@riverty/web-components 6.2.1 → 6.3.0

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 (397) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +78 -0
  3. package/custom-elements.json +4 -0
  4. package/package.json +3 -2
  5. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  6. package/dist/cjs/focusable-Oll_rmtP.js +0 -28
  7. package/dist/cjs/formData-B2DZyLxP.js +0 -44
  8. package/dist/cjs/index-BnETQtSf.js +0 -1834
  9. package/dist/cjs/index.cjs.js +0 -2
  10. package/dist/cjs/loader.cjs.js +0 -13
  11. package/dist/cjs/r-accordion-panel.cjs.entry.js +0 -24
  12. package/dist/cjs/r-accordion-section.cjs.entry.js +0 -125
  13. package/dist/cjs/r-accordion-trigger.cjs.entry.js +0 -93
  14. package/dist/cjs/r-accordion.cjs.entry.js +0 -20
  15. package/dist/cjs/r-alert.cjs.entry.js +0 -146
  16. package/dist/cjs/r-badge.cjs.entry.js +0 -40
  17. package/dist/cjs/r-button.cjs.entry.js +0 -149
  18. package/dist/cjs/r-checkbox-group.cjs.entry.js +0 -232
  19. package/dist/cjs/r-checkbox.cjs.entry.js +0 -269
  20. package/dist/cjs/r-design-system-devtools.cjs.entry.js +0 -31
  21. package/dist/cjs/r-dialog.cjs.entry.js +0 -107
  22. package/dist/cjs/r-hint_2.cjs.entry.js +0 -50
  23. package/dist/cjs/r-icon-button_2.cjs.entry.js +0 -467
  24. package/dist/cjs/r-icon.cjs.entry.js +0 -284
  25. package/dist/cjs/r-illustration.cjs.entry.js +0 -396
  26. package/dist/cjs/r-input-code.cjs.entry.js +0 -432
  27. package/dist/cjs/r-input-date.cjs.entry.js +0 -519
  28. package/dist/cjs/r-input-password.cjs.entry.js +0 -265
  29. package/dist/cjs/r-input-phone-number.cjs.entry.js +0 -2525
  30. package/dist/cjs/r-input.cjs.entry.js +0 -402
  31. package/dist/cjs/r-list-item.cjs.entry.js +0 -109
  32. package/dist/cjs/r-pagination.cjs.entry.js +0 -314
  33. package/dist/cjs/r-panel.cjs.entry.js +0 -184
  34. package/dist/cjs/r-popover-action.cjs.entry.js +0 -80
  35. package/dist/cjs/r-popover-content.cjs.entry.js +0 -62
  36. package/dist/cjs/r-popover-headline.cjs.entry.js +0 -28
  37. package/dist/cjs/r-popover-trigger.cjs.entry.js +0 -70
  38. package/dist/cjs/r-popover.cjs.entry.js +0 -347
  39. package/dist/cjs/r-progress-bar.cjs.entry.js +0 -25
  40. package/dist/cjs/r-radio-button-description.cjs.entry.js +0 -18
  41. package/dist/cjs/r-radio-button-leading.cjs.entry.js +0 -18
  42. package/dist/cjs/r-radio-button-title.cjs.entry.js +0 -18
  43. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +0 -18
  44. package/dist/cjs/r-radio-button.cjs.entry.js +0 -139
  45. package/dist/cjs/r-radio-group.cjs.entry.js +0 -425
  46. package/dist/cjs/r-select-option.cjs.entry.js +0 -130
  47. package/dist/cjs/r-select.cjs.entry.js +0 -1101
  48. package/dist/cjs/r-skip-link.cjs.entry.js +0 -19
  49. package/dist/cjs/r-stepper-item.cjs.entry.js +0 -42
  50. package/dist/cjs/r-stepper.cjs.entry.js +0 -99
  51. package/dist/cjs/r-tab-panel.cjs.entry.js +0 -26
  52. package/dist/cjs/r-tab.cjs.entry.js +0 -62
  53. package/dist/cjs/r-tabs-list.cjs.entry.js +0 -175
  54. package/dist/cjs/r-tabs.cjs.entry.js +0 -277
  55. package/dist/cjs/r-textarea.cjs.entry.js +0 -270
  56. package/dist/cjs/r-toast-group.cjs.entry.js +0 -46
  57. package/dist/cjs/r-toast.cjs.entry.js +0 -306
  58. package/dist/cjs/style-observer-D9zSP9wP.js +0 -1118
  59. package/dist/cjs/theming-NqxjhVJS.js +0 -109
  60. package/dist/cjs/web-components.cjs.js +0 -25
  61. package/dist/collection/collection-manifest.json +0 -60
  62. package/dist/collection/components/accordion/accordion.css +0 -24
  63. package/dist/collection/components/accordion/accordion.js +0 -90
  64. package/dist/collection/components/accordion/exports.js +0 -1
  65. package/dist/collection/components/accordion-panel/accordion-panel.css +0 -50
  66. package/dist/collection/components/accordion-panel/accordion-panel.js +0 -86
  67. package/dist/collection/components/accordion-section/accordion-section.css +0 -27
  68. package/dist/collection/components/accordion-section/accordion-section.js +0 -235
  69. package/dist/collection/components/accordion-trigger/accordion-trigger.css +0 -93
  70. package/dist/collection/components/accordion-trigger/accordion-trigger.js +0 -220
  71. package/dist/collection/components/alert/alert.css +0 -119
  72. package/dist/collection/components/alert/alert.js +0 -526
  73. package/dist/collection/components/alert/exports.js +0 -2
  74. package/dist/collection/components/badge/badge.css +0 -52
  75. package/dist/collection/components/badge/badge.js +0 -120
  76. package/dist/collection/components/badge/exports.js +0 -1
  77. package/dist/collection/components/button/button.css +0 -180
  78. package/dist/collection/components/button/button.js +0 -510
  79. package/dist/collection/components/button/exports.js +0 -5
  80. package/dist/collection/components/checkbox/checkbox.css +0 -116
  81. package/dist/collection/components/checkbox/checkbox.js +0 -777
  82. package/dist/collection/components/checkbox-group/checkbox-group.css +0 -48
  83. package/dist/collection/components/checkbox-group/checkbox-group.js +0 -718
  84. package/dist/collection/components/design-system-devtools/design-system-devtools.js +0 -59
  85. package/dist/collection/components/dialog/dialog.css +0 -125
  86. package/dist/collection/components/dialog/dialog.js +0 -345
  87. package/dist/collection/components/dialog/exports.js +0 -9
  88. package/dist/collection/components/hint/exports.js +0 -1
  89. package/dist/collection/components/hint/hint.css +0 -63
  90. package/dist/collection/components/hint/hint.js +0 -114
  91. package/dist/collection/components/icon/all-kit.js +0 -2
  92. package/dist/collection/components/icon/data.js +0 -90
  93. package/dist/collection/components/icon/exports.js +0 -7
  94. package/dist/collection/components/icon/icon.css +0 -105
  95. package/dist/collection/components/icon/icon.js +0 -379
  96. package/dist/collection/components/icon/riverty-kit.js +0 -2
  97. package/dist/collection/components/icon-button/icon-button.css +0 -105
  98. package/dist/collection/components/icon-button/icon-button.js +0 -343
  99. package/dist/collection/components/illustration/data.js +0 -112
  100. package/dist/collection/components/illustration/exports.js +0 -3
  101. package/dist/collection/components/illustration/illustration.css +0 -52
  102. package/dist/collection/components/illustration/illustration.js +0 -540
  103. package/dist/collection/components/illustration/illustrations-ui-kit.js +0 -2
  104. package/dist/collection/components/input/exports.js +0 -16
  105. package/dist/collection/components/input/input.css +0 -180
  106. package/dist/collection/components/input/input.js +0 -1572
  107. package/dist/collection/components/input-code/exports.js +0 -2
  108. package/dist/collection/components/input-code/input-code.css +0 -127
  109. package/dist/collection/components/input-code/input-code.js +0 -1139
  110. package/dist/collection/components/input-date/exports.js +0 -1
  111. package/dist/collection/components/input-date/input-date.css +0 -148
  112. package/dist/collection/components/input-date/input-date.js +0 -1228
  113. package/dist/collection/components/input-password/exports.js +0 -1
  114. package/dist/collection/components/input-password/input-password.css +0 -25
  115. package/dist/collection/components/input-password/input-password.js +0 -1051
  116. package/dist/collection/components/input-phone-number/input-phone-number.css +0 -61
  117. package/dist/collection/components/input-phone-number/input-phone-number.js +0 -874
  118. package/dist/collection/components/label/label.css +0 -38
  119. package/dist/collection/components/label/label.js +0 -47
  120. package/dist/collection/components/list-item/list-item/exports.js +0 -2
  121. package/dist/collection/components/list-item/list-item/list-item.css +0 -199
  122. package/dist/collection/components/list-item/list-item/list-item.js +0 -467
  123. package/dist/collection/components/pagination/exports.js +0 -3
  124. package/dist/collection/components/pagination/pagination.css +0 -118
  125. package/dist/collection/components/pagination/pagination.js +0 -799
  126. package/dist/collection/components/panel/exports.js +0 -1
  127. package/dist/collection/components/panel/panel.css +0 -192
  128. package/dist/collection/components/panel/panel.js +0 -473
  129. package/dist/collection/components/popover/exports.js +0 -3
  130. package/dist/collection/components/popover/popover.css +0 -251
  131. package/dist/collection/components/popover/popover.js +0 -741
  132. package/dist/collection/components/popover-action/popover-action.css +0 -21
  133. package/dist/collection/components/popover-action/popover-action.js +0 -150
  134. package/dist/collection/components/popover-content/popover-content.css +0 -9
  135. package/dist/collection/components/popover-content/popover-content.js +0 -130
  136. package/dist/collection/components/popover-headline/popover-headline.css +0 -7
  137. package/dist/collection/components/popover-headline/popover-headline.js +0 -28
  138. package/dist/collection/components/popover-trigger/exports.js +0 -1
  139. package/dist/collection/components/popover-trigger/popover-trigger.css +0 -4
  140. package/dist/collection/components/popover-trigger/popover-trigger.js +0 -163
  141. package/dist/collection/components/progress-bar/progress-bar.css +0 -41
  142. package/dist/collection/components/progress-bar/progress-bar.js +0 -71
  143. package/dist/collection/components/radio-button/radio-button.css +0 -126
  144. package/dist/collection/components/radio-button/radio-button.js +0 -559
  145. package/dist/collection/components/radio-button-description/radio-button-description.css +0 -5
  146. package/dist/collection/components/radio-button-description/radio-button-description.js +0 -22
  147. package/dist/collection/components/radio-button-leading/radio-button-leading.css +0 -3
  148. package/dist/collection/components/radio-button-leading/radio-button-leading.js +0 -22
  149. package/dist/collection/components/radio-button-title/radio-button-title.css +0 -8
  150. package/dist/collection/components/radio-button-title/radio-button-title.js +0 -22
  151. package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +0 -6
  152. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +0 -22
  153. package/dist/collection/components/radio-group/exports.js +0 -1
  154. package/dist/collection/components/radio-group/radio-group.css +0 -65
  155. package/dist/collection/components/radio-group/radio-group.js +0 -1020
  156. package/dist/collection/components/select/exports.js +0 -1
  157. package/dist/collection/components/select/select.css +0 -247
  158. package/dist/collection/components/select/select.js +0 -2011
  159. package/dist/collection/components/select-option/select-option.css +0 -93
  160. package/dist/collection/components/select-option/select-option.js +0 -459
  161. package/dist/collection/components/skip-link/exports.js +0 -1
  162. package/dist/collection/components/skip-link/skip-link.css +0 -37
  163. package/dist/collection/components/skip-link/skip-link.js +0 -52
  164. package/dist/collection/components/stepper/stepper.css +0 -25
  165. package/dist/collection/components/stepper/stepper.js +0 -216
  166. package/dist/collection/components/stepper-item/stepper-item.css +0 -62
  167. package/dist/collection/components/stepper-item/stepper-item.js +0 -171
  168. package/dist/collection/components/tab/tab.css +0 -81
  169. package/dist/collection/components/tab/tab.js +0 -169
  170. package/dist/collection/components/tab-panel/tab-panel.css +0 -19
  171. package/dist/collection/components/tab-panel/tab-panel.js +0 -72
  172. package/dist/collection/components/tabs/tabs.css +0 -4
  173. package/dist/collection/components/tabs/tabs.js +0 -345
  174. package/dist/collection/components/tabs-list/exports.js +0 -2
  175. package/dist/collection/components/tabs-list/tabs-list.css +0 -58
  176. package/dist/collection/components/tabs-list/tabs-list.js +0 -294
  177. package/dist/collection/components/textarea/exports.js +0 -8
  178. package/dist/collection/components/textarea/textarea.css +0 -148
  179. package/dist/collection/components/textarea/textarea.js +0 -1055
  180. package/dist/collection/components/toast/exports.js +0 -3
  181. package/dist/collection/components/toast/toast.css +0 -179
  182. package/dist/collection/components/toast/toast.js +0 -812
  183. package/dist/collection/components/toast-group/exports.js +0 -1
  184. package/dist/collection/components/toast-group/toast-group.css +0 -37
  185. package/dist/collection/components/toast-group/toast-group.js +0 -49
  186. package/dist/collection/components/tooltip/exports.js +0 -3
  187. package/dist/collection/components/tooltip/tooltip.css +0 -106
  188. package/dist/collection/components/tooltip/tooltip.js +0 -500
  189. package/dist/collection/index.js +0 -1
  190. package/dist/collection/utils/focusable.js +0 -24
  191. package/dist/collection/utils/formData.js +0 -40
  192. package/dist/collection/utils/theming.js +0 -103
  193. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  194. package/dist/esm/focusable-ky1yonnS.js +0 -26
  195. package/dist/esm/formData-DvLT8-y3.js +0 -42
  196. package/dist/esm/index-CTxpqopm.js +0 -1806
  197. package/dist/esm/index.js +0 -1
  198. package/dist/esm/loader.js +0 -11
  199. package/dist/esm/r-accordion-panel.entry.js +0 -22
  200. package/dist/esm/r-accordion-section.entry.js +0 -123
  201. package/dist/esm/r-accordion-trigger.entry.js +0 -91
  202. package/dist/esm/r-accordion.entry.js +0 -18
  203. package/dist/esm/r-alert.entry.js +0 -144
  204. package/dist/esm/r-badge.entry.js +0 -38
  205. package/dist/esm/r-button.entry.js +0 -147
  206. package/dist/esm/r-checkbox-group.entry.js +0 -230
  207. package/dist/esm/r-checkbox.entry.js +0 -267
  208. package/dist/esm/r-design-system-devtools.entry.js +0 -29
  209. package/dist/esm/r-dialog.entry.js +0 -105
  210. package/dist/esm/r-hint_2.entry.js +0 -47
  211. package/dist/esm/r-icon-button_2.entry.js +0 -464
  212. package/dist/esm/r-icon.entry.js +0 -282
  213. package/dist/esm/r-illustration.entry.js +0 -394
  214. package/dist/esm/r-input-code.entry.js +0 -430
  215. package/dist/esm/r-input-date.entry.js +0 -517
  216. package/dist/esm/r-input-password.entry.js +0 -263
  217. package/dist/esm/r-input-phone-number.entry.js +0 -2523
  218. package/dist/esm/r-input.entry.js +0 -400
  219. package/dist/esm/r-list-item.entry.js +0 -107
  220. package/dist/esm/r-pagination.entry.js +0 -312
  221. package/dist/esm/r-panel.entry.js +0 -182
  222. package/dist/esm/r-popover-action.entry.js +0 -78
  223. package/dist/esm/r-popover-content.entry.js +0 -60
  224. package/dist/esm/r-popover-headline.entry.js +0 -26
  225. package/dist/esm/r-popover-trigger.entry.js +0 -68
  226. package/dist/esm/r-popover.entry.js +0 -345
  227. package/dist/esm/r-progress-bar.entry.js +0 -23
  228. package/dist/esm/r-radio-button-description.entry.js +0 -16
  229. package/dist/esm/r-radio-button-leading.entry.js +0 -16
  230. package/dist/esm/r-radio-button-title.entry.js +0 -16
  231. package/dist/esm/r-radio-button-trailing.entry.js +0 -16
  232. package/dist/esm/r-radio-button.entry.js +0 -137
  233. package/dist/esm/r-radio-group.entry.js +0 -423
  234. package/dist/esm/r-select-option.entry.js +0 -128
  235. package/dist/esm/r-select.entry.js +0 -1099
  236. package/dist/esm/r-skip-link.entry.js +0 -17
  237. package/dist/esm/r-stepper-item.entry.js +0 -40
  238. package/dist/esm/r-stepper.entry.js +0 -97
  239. package/dist/esm/r-tab-panel.entry.js +0 -24
  240. package/dist/esm/r-tab.entry.js +0 -60
  241. package/dist/esm/r-tabs-list.entry.js +0 -173
  242. package/dist/esm/r-tabs.entry.js +0 -275
  243. package/dist/esm/r-textarea.entry.js +0 -268
  244. package/dist/esm/r-toast-group.entry.js +0 -44
  245. package/dist/esm/r-toast.entry.js +0 -304
  246. package/dist/esm/style-observer-4Uv3PpKT.js +0 -1116
  247. package/dist/esm/theming-DD2IrjpG.js +0 -106
  248. package/dist/esm/web-components.js +0 -21
  249. package/dist/index.cjs.js +0 -1
  250. package/dist/index.js +0 -1
  251. package/dist/types/components/accordion/accordion.d.ts +0 -27
  252. package/dist/types/components/accordion/exports.d.ts +0 -2
  253. package/dist/types/components/accordion-panel/accordion-panel.d.ts +0 -10
  254. package/dist/types/components/accordion-section/accordion-section.d.ts +0 -36
  255. package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +0 -33
  256. package/dist/types/components/alert/alert.d.ts +0 -67
  257. package/dist/types/components/alert/exports.d.ts +0 -4
  258. package/dist/types/components/badge/badge.d.ts +0 -23
  259. package/dist/types/components/badge/exports.d.ts +0 -2
  260. package/dist/types/components/button/button.d.ts +0 -89
  261. package/dist/types/components/button/exports.d.ts +0 -10
  262. package/dist/types/components/checkbox/checkbox.d.ts +0 -136
  263. package/dist/types/components/checkbox-group/checkbox-group.d.ts +0 -122
  264. package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +0 -15
  265. package/dist/types/components/dialog/dialog.d.ts +0 -69
  266. package/dist/types/components/dialog/exports.d.ts +0 -10
  267. package/dist/types/components/hint/exports.d.ts +0 -2
  268. package/dist/types/components/hint/hint.d.ts +0 -20
  269. package/dist/types/components/icon/all-kit.d.ts +0 -2890
  270. package/dist/types/components/icon/data.d.ts +0 -145
  271. package/dist/types/components/icon/exports.d.ts +0 -152
  272. package/dist/types/components/icon/icon.d.ts +0 -37
  273. package/dist/types/components/icon/riverty-kit.d.ts +0 -139
  274. package/dist/types/components/icon-button/icon-button.d.ts +0 -69
  275. package/dist/types/components/illustration/data.d.ts +0 -52
  276. package/dist/types/components/illustration/exports.d.ts +0 -23
  277. package/dist/types/components/illustration/illustration.d.ts +0 -51
  278. package/dist/types/components/illustration/illustrations-ui-kit.d.ts +0 -21
  279. package/dist/types/components/input/exports.d.ts +0 -10
  280. package/dist/types/components/input/input.d.ts +0 -300
  281. package/dist/types/components/input-code/exports.d.ts +0 -4
  282. package/dist/types/components/input-code/input-code.d.ts +0 -175
  283. package/dist/types/components/input-date/exports.d.ts +0 -5
  284. package/dist/types/components/input-date/input-date.d.ts +0 -172
  285. package/dist/types/components/input-password/exports.d.ts +0 -1
  286. package/dist/types/components/input-password/input-password.d.ts +0 -184
  287. package/dist/types/components/input-phone-number/input-phone-number.d.ts +0 -128
  288. package/dist/types/components/label/label.d.ts +0 -9
  289. package/dist/types/components/list-item/list-item/exports.d.ts +0 -4
  290. package/dist/types/components/list-item/list-item/list-item.d.ts +0 -61
  291. package/dist/types/components/pagination/exports.d.ts +0 -6
  292. package/dist/types/components/pagination/pagination.d.ts +0 -140
  293. package/dist/types/components/panel/exports.d.ts +0 -2
  294. package/dist/types/components/panel/panel.d.ts +0 -56
  295. package/dist/types/components/popover/exports.d.ts +0 -6
  296. package/dist/types/components/popover/popover.d.ts +0 -131
  297. package/dist/types/components/popover-action/popover-action.d.ts +0 -24
  298. package/dist/types/components/popover-content/popover-content.d.ts +0 -22
  299. package/dist/types/components/popover-headline/popover-headline.d.ts +0 -6
  300. package/dist/types/components/popover-trigger/exports.d.ts +0 -2
  301. package/dist/types/components/popover-trigger/popover-trigger.d.ts +0 -31
  302. package/dist/types/components/progress-bar/progress-bar.d.ts +0 -10
  303. package/dist/types/components/radio-button/radio-button.d.ts +0 -92
  304. package/dist/types/components/radio-button-description/radio-button-description.d.ts +0 -8
  305. package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +0 -8
  306. package/dist/types/components/radio-button-title/radio-button-title.d.ts +0 -8
  307. package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +0 -8
  308. package/dist/types/components/radio-group/exports.d.ts +0 -2
  309. package/dist/types/components/radio-group/radio-group.d.ts +0 -178
  310. package/dist/types/components/select/exports.d.ts +0 -2
  311. package/dist/types/components/select/select.d.ts +0 -317
  312. package/dist/types/components/select-option/select-option.d.ts +0 -113
  313. package/dist/types/components/skip-link/exports.d.ts +0 -2
  314. package/dist/types/components/skip-link/skip-link.d.ts +0 -6
  315. package/dist/types/components/stepper/stepper.d.ts +0 -22
  316. package/dist/types/components/stepper-item/stepper-item.d.ts +0 -23
  317. package/dist/types/components/tab/tab.d.ts +0 -23
  318. package/dist/types/components/tab-panel/tab-panel.d.ts +0 -7
  319. package/dist/types/components/tabs/tabs.d.ts +0 -49
  320. package/dist/types/components/tabs-list/exports.d.ts +0 -4
  321. package/dist/types/components/tabs-list/tabs-list.d.ts +0 -41
  322. package/dist/types/components/textarea/exports.d.ts +0 -2
  323. package/dist/types/components/textarea/textarea.d.ts +0 -158
  324. package/dist/types/components/toast/exports.d.ts +0 -6
  325. package/dist/types/components/toast/toast.d.ts +0 -146
  326. package/dist/types/components/toast-group/exports.d.ts +0 -2
  327. package/dist/types/components/toast-group/toast-group.d.ts +0 -9
  328. package/dist/types/components/tooltip/exports.d.ts +0 -6
  329. package/dist/types/components/tooltip/tooltip.d.ts +0 -131
  330. package/dist/types/components.d.ts +0 -6286
  331. package/dist/types/index.d.ts +0 -1
  332. package/dist/types/stencil-public-runtime.d.ts +0 -1732
  333. package/dist/types/types/jsx-shim.d.ts +0 -13
  334. package/dist/types/types/style-observer.d.ts +0 -20
  335. package/dist/types/utils/focusable.d.ts +0 -1
  336. package/dist/types/utils/formData.d.ts +0 -1
  337. package/dist/types/utils/theming.d.ts +0 -15
  338. package/dist/web-components/index.esm.js +0 -0
  339. package/dist/web-components/p-02b22f8e.entry.js +0 -1
  340. package/dist/web-components/p-075a8dc8.entry.js +0 -1
  341. package/dist/web-components/p-0a34d33b.entry.js +0 -1
  342. package/dist/web-components/p-10cc9983.entry.js +0 -1
  343. package/dist/web-components/p-253068b9.entry.js +0 -1
  344. package/dist/web-components/p-3b8c8951.entry.js +0 -1
  345. package/dist/web-components/p-3beacdab.entry.js +0 -1
  346. package/dist/web-components/p-4214867d.entry.js +0 -1
  347. package/dist/web-components/p-42c857e9.entry.js +0 -1
  348. package/dist/web-components/p-44f87e16.entry.js +0 -1
  349. package/dist/web-components/p-477614c5.entry.js +0 -1
  350. package/dist/web-components/p-495ba3d2.entry.js +0 -1
  351. package/dist/web-components/p-4Uv3PpKT.js +0 -1
  352. package/dist/web-components/p-4de76291.entry.js +0 -1
  353. package/dist/web-components/p-55600d47.entry.js +0 -1
  354. package/dist/web-components/p-562051aa.entry.js +0 -1
  355. package/dist/web-components/p-5b850e0f.entry.js +0 -1
  356. package/dist/web-components/p-6013dfc8.entry.js +0 -1
  357. package/dist/web-components/p-62e7ae04.entry.js +0 -1
  358. package/dist/web-components/p-71519d37.entry.js +0 -1
  359. package/dist/web-components/p-88f7b47f.entry.js +0 -1
  360. package/dist/web-components/p-8975a6a3.entry.js +0 -1
  361. package/dist/web-components/p-8e125826.entry.js +0 -1
  362. package/dist/web-components/p-91cc0bde.entry.js +0 -1
  363. package/dist/web-components/p-93435fcd.entry.js +0 -1
  364. package/dist/web-components/p-947969d7.entry.js +0 -1
  365. package/dist/web-components/p-95396b5c.entry.js +0 -1
  366. package/dist/web-components/p-9de3a1a5.entry.js +0 -1
  367. package/dist/web-components/p-9f583ed1.entry.js +0 -1
  368. package/dist/web-components/p-B9rsR6cQ.js +0 -1
  369. package/dist/web-components/p-CTxpqopm.js +0 -2
  370. package/dist/web-components/p-DQuL1Twl.js +0 -1
  371. package/dist/web-components/p-DvLT8-y3.js +0 -1
  372. package/dist/web-components/p-a1086abe.entry.js +0 -1
  373. package/dist/web-components/p-bbba6d79.entry.js +0 -1
  374. package/dist/web-components/p-bde44ec4.entry.js +0 -1
  375. package/dist/web-components/p-bfc7e6c0.entry.js +0 -1
  376. package/dist/web-components/p-c1030394.entry.js +0 -1
  377. package/dist/web-components/p-c80a5541.entry.js +0 -1
  378. package/dist/web-components/p-c96ee61a.entry.js +0 -1
  379. package/dist/web-components/p-caf8f067.entry.js +0 -1
  380. package/dist/web-components/p-cc363c3d.entry.js +0 -1
  381. package/dist/web-components/p-cf4ff357.entry.js +0 -1
  382. package/dist/web-components/p-d0310ed4.entry.js +0 -1
  383. package/dist/web-components/p-d1412932.entry.js +0 -1
  384. package/dist/web-components/p-d2447e30.entry.js +0 -1
  385. package/dist/web-components/p-dc9cca06.entry.js +0 -1
  386. package/dist/web-components/p-e5b943a2.entry.js +0 -1
  387. package/dist/web-components/p-e67b13df.entry.js +0 -1
  388. package/dist/web-components/p-efec231a.entry.js +0 -1
  389. package/dist/web-components/p-f867e4c3.entry.js +0 -1
  390. package/dist/web-components/p-ff6b1b8f.entry.js +0 -1
  391. package/dist/web-components/p-ky1yonnS.js +0 -1
  392. package/dist/web-components/web-components.esm.js +0 -1
  393. package/loader/cdn.js +0 -1
  394. package/loader/index.cjs.js +0 -1
  395. package/loader/index.d.ts +0 -24
  396. package/loader/index.es2017.js +0 -1
  397. package/loader/index.js +0 -2
@@ -1,2011 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { appendControlToFormData } from "../../utils/formData";
3
- import StyleObserver from "style-observer";
4
- /**
5
- * A select allows the user to choose between a set of options.
6
- *
7
- * Overall behavior is based on native `<select>`
8
- *
9
- */
10
- export class Select {
11
- constructor() {
12
- /** Define if select should render as a text item or a block */
13
- this.fullWidth = false;
14
- /** Define wether listbox appears on top or at the bottom of the select */
15
- this.listboxPosition = 'bottom';
16
- /**
17
- * Defines aria label for combobox toggle button
18
- * @default "Toggle combobox"
19
- */
20
- this.toggleButtonAriaLabel = 'Toggle combobox';
21
- /**
22
- * Defines the text that will be displayed if no results are found
23
- * @default "No results found"
24
- */
25
- this.noResultsFound = 'No results found';
26
- /** Custom validity state passed after validation */
27
- this.validityState = '';
28
- /** Custom validity message passed after validation */
29
- this.validityMessage = '';
30
- /** Is select expanded */
31
- this.isExpanded = false;
32
- /** Current state, reflecting if select is readonly */
33
- this.isReadonly = false;
34
- /** Save current value */
35
- this.currentValue = '';
36
- /** Value that must be displayed as selected option */
37
- this.valueToDisplay = '';
38
- this.isInitializing = false;
39
- this.isResetting = false;
40
- this.focusedOption = null;
41
- this.isValueFocused = false;
42
- this.isNoResultsFound = false;
43
- /** Indicates if the user has interacted with the select (focused/clicked) */
44
- this.touched = false;
45
- /** Indicates if the value has been changed by user interaction */
46
- this.dirty = false;
47
- this.handleSlotChange = () => {
48
- setTimeout(() => {
49
- this.initialize();
50
- this.defineHostWidth();
51
- }, 0);
52
- };
53
- /**
54
- * Initial attributes state
55
- * */
56
- this.initial = {};
57
- /** Unique id */
58
- this.uniqueId = `r-select-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
59
- this.getValidityStateData = (element) => {
60
- let validityState = '';
61
- let validityMessage = '';
62
- for (const state in element.validity) {
63
- if (element.validity[state]) {
64
- validityState = state;
65
- if (this[state + 'Message']) {
66
- validityMessage = this[state + 'Message'];
67
- return { validityState, validityMessage };
68
- }
69
- validityMessage = element.validationMessage;
70
- }
71
- }
72
- return { validityState, validityMessage };
73
- };
74
- this.validateFormElement = (element = null) => {
75
- if (element === null)
76
- return;
77
- if (this.isNoValidate)
78
- return;
79
- if (this.error)
80
- return;
81
- const { validityState, validityMessage } = this.getValidityStateData(element);
82
- this.validityState = validityState;
83
- this.validityMessage = validityMessage;
84
- const isValid = this.validityState === 'valid';
85
- this.valid = isValid;
86
- this.invalid = !isValid;
87
- this.rValidate.emit({
88
- state: this.validityState,
89
- message: this.validityMessage
90
- });
91
- };
92
- // Typeahead buffer + last matched index
93
- this.typeaheadBuffer = '';
94
- this.typeaheadTimeout = null;
95
- this.lastTypeaheadIndex = -1;
96
- this.contributeToFormData = (event) => {
97
- appendControlToFormData(this.nativeElement, event.formData);
98
- };
99
- this.onValueClick = (e) => {
100
- var _a;
101
- if (this.disabled)
102
- return;
103
- e.preventDefault();
104
- e.stopPropagation();
105
- // Mark as touched when user clicks on the select
106
- this.touched = true;
107
- this.toggle();
108
- if (!this.isExpanded)
109
- return;
110
- if (this.combobox)
111
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.focus();
112
- this.defineListboxPositionState();
113
- };
114
- // Returns a handler for a key
115
- this.keyboardEventHandlerFactory = (code, altKey = false) => {
116
- switch (code) {
117
- case 'Enter':
118
- return () => {
119
- var _a;
120
- if (this.isExpanded) {
121
- const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
122
- if (newValue !== this.currentValue) {
123
- this.dirty = true;
124
- }
125
- this.setValueFromUserInteraction(newValue);
126
- return;
127
- }
128
- this.expand();
129
- this.setOptionFocus(this.selectedElement);
130
- };
131
- case 'Escape':
132
- return () => {
133
- this.collapse();
134
- this.reportValidity();
135
- };
136
- case 'ArrowUp':
137
- return () => {
138
- var _a;
139
- if (!this.isExpanded) {
140
- this.expand();
141
- const indexToFocus = this.combobox ? this.optionElements.length - 1 : 0;
142
- this.setOptionFocus(this.selectedElement || this.optionElements[indexToFocus]);
143
- return;
144
- }
145
- if (this.focusedOption && altKey) {
146
- const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
147
- if (newValue !== this.currentValue) {
148
- this.dirty = true;
149
- }
150
- this.setValueFromUserInteraction(newValue);
151
- return;
152
- }
153
- if (!this.combobox && this.focusedOption === this.optionElements[0])
154
- return;
155
- if (this.focusedOption) {
156
- this.focusPrevOption();
157
- return;
158
- }
159
- this.setOptionFocus(this.selectedElement || this.optionElements[0]);
160
- };
161
- case 'ArrowDown':
162
- return () => {
163
- if (!this.isExpanded) {
164
- this.expand();
165
- if (altKey)
166
- return;
167
- this.setOptionFocus(this.selectedElement || this.optionElements[0]);
168
- return;
169
- }
170
- if (!this.combobox && this.focusedOption === this.optionElements[this.optionElements.length - 1])
171
- return;
172
- if (this.focusedOption) {
173
- this.focusNextOption();
174
- return;
175
- }
176
- this.setOptionFocus(this.selectedElement || this.optionElements[0]);
177
- };
178
- case 'Home':
179
- return () => {
180
- if (!this.isExpanded) {
181
- this.expand();
182
- this.setOptionFocus(this.selectedElement || this.optionElements[0]);
183
- return;
184
- }
185
- this.setOptionFocus(this.optionElements[0]);
186
- };
187
- case 'End':
188
- return () => {
189
- if (!this.isExpanded) {
190
- this.expand();
191
- this.setOptionFocus(this.selectedElement || this.optionElements[this.optionElements.length - 1]);
192
- return;
193
- }
194
- this.setOptionFocus(this.optionElements[this.optionElements.length - 1]);
195
- };
196
- case 'PageUp': {
197
- return () => {
198
- if (!this.isExpanded)
199
- return;
200
- if (this.focusedOption === null)
201
- return;
202
- const currentIndex = this.optionElementsArray.indexOf(this.focusedOption);
203
- if (currentIndex === -1)
204
- return;
205
- const targetIndex = currentIndex - 10 >= 0 ? currentIndex - 10 : 0;
206
- this.setOptionFocus(this.optionElements[targetIndex]);
207
- };
208
- }
209
- case 'PageDown': {
210
- return () => {
211
- if (!this.isExpanded)
212
- return;
213
- if (this.focusedOption === null)
214
- return;
215
- const currentIndex = this.optionElementsArray.indexOf(this.focusedOption);
216
- if (currentIndex === -1)
217
- return;
218
- const lastIndex = this.optionElements.length - 1;
219
- const targetIndex = currentIndex + 10 <= lastIndex ? currentIndex + 10 : lastIndex;
220
- this.setOptionFocus(this.optionElements[targetIndex]);
221
- };
222
- }
223
- case 'Tab':
224
- return () => {
225
- var _a;
226
- const newValue = ((_a = this.focusedOption) === null || _a === void 0 ? void 0 : _a.value) || '';
227
- if (newValue !== this.currentValue) {
228
- this.dirty = true;
229
- }
230
- this.setValueFromUserInteraction(newValue);
231
- };
232
- default:
233
- // No matching key handler: intentional no-op
234
- return () => { void 0; };
235
- }
236
- };
237
- this.onValueKeydown = (e) => {
238
- e.stopPropagation();
239
- const preventCodes = [
240
- 'ArrowUp',
241
- 'ArrowDown',
242
- 'Home',
243
- 'End',
244
- 'PageUp',
245
- 'PageDown',
246
- 'Space',
247
- 'Enter',
248
- 'Escape'
249
- ];
250
- if (preventCodes.includes(e.code)) {
251
- e.preventDefault();
252
- }
253
- else if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
254
- // Tab will also be skipped here
255
- if (!this.isExpanded)
256
- this.expand();
257
- this.handleTypeahead(e.key);
258
- return;
259
- }
260
- switch (e.code) {
261
- case 'Space':
262
- this.keyboardEventHandlerFactory('Enter')();
263
- break;
264
- case 'Tab':
265
- if (this.focusedOption === null)
266
- break;
267
- this.keyboardEventHandlerFactory('Tab')();
268
- break;
269
- default:
270
- this.keyboardEventHandlerFactory(e.code, e.altKey)();
271
- break;
272
- }
273
- };
274
- this.onComboboxKeydown = (e) => {
275
- e.stopPropagation();
276
- const preventCodes = [
277
- 'ArrowUp',
278
- 'ArrowDown',
279
- 'Home',
280
- 'End',
281
- 'PageUp',
282
- 'PageDown',
283
- 'Enter',
284
- 'Escape'
285
- ];
286
- if (preventCodes.includes(e.code)) {
287
- e.preventDefault();
288
- }
289
- switch (e.code) {
290
- case 'Tab':
291
- if (this.focusedOption === null) {
292
- this.collapse();
293
- break;
294
- }
295
- this.keyboardEventHandlerFactory('Tab')();
296
- break;
297
- case 'Escape':
298
- if (this.isExpanded) {
299
- this.keyboardEventHandlerFactory('Escape')();
300
- return;
301
- }
302
- this.valueElement.value = '';
303
- const newValue = '';
304
- if (newValue !== this.currentValue) {
305
- this.dirty = true;
306
- }
307
- this.setValueFromUserInteraction(newValue);
308
- this.reportValidity();
309
- break;
310
- default:
311
- this.keyboardEventHandlerFactory(e.code, e.altKey)();
312
- break;
313
- }
314
- };
315
- this.onValueBlur = () => {
316
- this.isValueFocused = false;
317
- const { isBusy, isExpanded } = this;
318
- if (isBusy || isExpanded)
319
- return;
320
- this.reportValidity();
321
- };
322
- this.onValueFocus = () => {
323
- this.isValueFocused = true;
324
- // Mark as touched when user focuses on the select
325
- this.touched = true;
326
- };
327
- this.filterOptionsListByComboboxValue = (value = '') => {
328
- const options = Array.from(this.host.querySelectorAll('r-select-option:not([data-no-results="true"])'));
329
- options.forEach((option) => {
330
- var _a, _b;
331
- const optionText = (_b = (_a = option === null || option === void 0 ? void 0 : option.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase();
332
- const hasMatch = optionText.search(value.toLowerCase()) !== -1;
333
- option.setAttribute('aria-hidden', `${!hasMatch}`);
334
- });
335
- this.isNoResultsFound = options.every((option) => (option === null || option === void 0 ? void 0 : option.getAttribute('aria-hidden')) === 'true');
336
- if (this.isNoResultsFound) {
337
- this.statusElement.innerHTML = this.noResultsFound;
338
- setTimeout(() => {
339
- this.statusElement.innerText = '';
340
- }, 1000);
341
- }
342
- };
343
- this.clearComboboxOptions = () => {
344
- if (!this.combobox)
345
- return;
346
- this.filterOptionsListByComboboxValue();
347
- };
348
- this.onComboboxChange = (event) => {
349
- this.filterOptionsListByComboboxValue(event.target.value);
350
- };
351
- this.onComboboxInput = (event) => {
352
- this.filterOptionsListByComboboxValue(event.target.value);
353
- if (!this.isExpanded) {
354
- this.expand();
355
- this.defineListboxPositionState();
356
- }
357
- };
358
- this.onSubmitForm = (event) => {
359
- if (this.isNoValidate)
360
- return;
361
- this.reportValidity();
362
- if (this.invalid) {
363
- event.preventDefault();
364
- event.stopPropagation();
365
- }
366
- };
367
- // Clear validation results and emit rReset event
368
- this.onResetForm = () => {
369
- // Clear validation results
370
- this.resetValidation();
371
- // Reset touched and dirty states
372
- this.markAsPristine();
373
- // Restore initial value
374
- this.setValue(this.initial['value']);
375
- // Emit rReset
376
- this.rReset.emit({
377
- element: this.host,
378
- value: this.currentValue
379
- });
380
- };
381
- this.renderSelect = (comboboxAttrs) => {
382
- var _a, _b;
383
- return (h("span", Object.assign({ class: "r-select--value", role: "combobox" }, comboboxAttrs, { ref: el => this.valueElement = el, onClick: this.isInteractive ? this.onValueClick : null, onKeyDown: this.isInteractive ? this.onValueKeydown : null, onBlur: this.isInteractive ? this.onValueBlur : null, onFocus: this.isInteractive ? this.onValueFocus : null }), h("span", { class: "r-select--value-display" }, this.isLeadingSlotRendered ? h("slot", { name: "leading" }) : null, h("span", { class: "r-select--value-selected", innerHTML: ((_b = (_a = this.valueToDisplay) === null || _a === void 0 ? void 0 : _a.trim) === null || _b === void 0 ? void 0 : _b.call(_a)) || this.placeholder || '' })), h("span", { class: "r-select--value-arrow" }, h("r-icon", { class: "r-select--trailing-icon", name: "angle-down", size: "s" }))));
384
- };
385
- this.renderCombobox = (comboboxAttrs) => {
386
- var _a, _b, _c;
387
- return (h("div", { class: "r-select--value", onClick: this.isInteractive ? this.onValueClick : null, ref: el => this.comboboxContainerElement = el }, h("div", { class: "r-select--value-display" }, this.isLeadingSlotRendered ? h("slot", { name: "leading" }) : null, h("input", Object.assign({ role: "combobox", autocomplete: "off", "aria-autocomplete": "list", disabled: this.disabled, readonly: this.readonly, type: "text" }, comboboxAttrs, { class: "r-select--input", ref: el => this.valueElement = el, onKeyDown: this.isInteractive ? this.onComboboxKeydown : null, onBlur: this.isInteractive ? this.onValueBlur : null, onFocus: this.isInteractive ? this.onValueFocus : null, onChange: this.isInteractive ? this.onComboboxChange : null, onInput: this.isInteractive ? this.onComboboxInput : null, placeholder: this.placeholder || '', value: ((_c = (_b = (_a = this.selectedElement) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim) === null || _c === void 0 ? void 0 : _c.call(_b)) || '' }))), h("button", { "aria-label": this.toggleButtonAriaLabel, "aria-expanded": `${this.expanded || false}`, "aria-controls": `${this.uniqueId}-list`, disabled: this.disabled, tabindex: "-1", class: "r-select--value-arrow-button r-select--value-arrow" }, h("r-icon", { class: "r-select--trailing-icon", name: "angle-down", size: "s" })), h("div", { class: "visually-hidden", role: "status", ref: (el) => this.statusElement = el })));
388
- };
389
- }
390
- /** Sets the component into `readonly` state */
391
- async setReadonly() {
392
- this.collapse();
393
- this.resetValidation();
394
- this.isReadonly = true;
395
- }
396
- /** Clears readonly state from the component */
397
- async clearReadonly() {
398
- this.isReadonly = false;
399
- }
400
- handleListboxPositionChange() {
401
- this.defineListboxPositionState();
402
- }
403
- handleExpandedChange() {
404
- this.expanded ? this.expand() : this.collapse();
405
- }
406
- handleReadonlyChange() {
407
- this.readonly ? this.setReadonly() : this.clearReadonly();
408
- }
409
- handleValueChange(value, oldValue) {
410
- if (this.isInitializing)
411
- return;
412
- // Only process if this is not the initial load (oldValue is defined)
413
- if (oldValue !== undefined && oldValue !== value) {
414
- // This is a programmatic change from parent attribute
415
- // Do NOT mark as dirty, do NOT emit rChange
416
- this._renderSelected(value, false);
417
- this.clearComboboxOptions();
418
- }
419
- }
420
- /** Listen for custom event triggered by "onClick" event on `<r-select-option>` */
421
- optionSelectAction(e) {
422
- e.stopPropagation();
423
- if (this.disabled)
424
- return;
425
- // Mark as dirty only if value actually changes
426
- if (e.target.value !== this.currentValue) {
427
- this.dirty = true;
428
- }
429
- this.setValueFromUserInteraction(e.target.value);
430
- }
431
- tooltipFocusAction() {
432
- this.collapse();
433
- this.reportValidity();
434
- }
435
- onMouseup(e) {
436
- if (!this.isExpanded)
437
- return;
438
- e.stopPropagation();
439
- if (!this.host.contains(e.target)) {
440
- this.collapse();
441
- this.reportValidity();
442
- }
443
- }
444
- onKeyup(e) {
445
- if (!this.isExpanded)
446
- return;
447
- e.stopPropagation();
448
- const path = e.composedPath ? e.composedPath() : [];
449
- const isInsideSelect = path.includes(this.host);
450
- if (!isInsideSelect) {
451
- this.collapse();
452
- this.reportValidity();
453
- }
454
- }
455
- /**
456
- * Listen on window scroll
457
- * and update tooltip position if needed
458
- */
459
- handleScrolling() {
460
- if (this.isExpanded)
461
- this.defineListboxPositionState();
462
- }
463
- /**
464
- * Listen on window resizing
465
- * and update tooltip position if needed
466
- */
467
- handleResizing() {
468
- if (this.isExpanded)
469
- this.defineListboxPositionState();
470
- }
471
- /**
472
- * Set value of the select programmatically.
473
- * Does NOT mark as dirty or emit change events.
474
- * Use this for programmatic value updates.
475
- */
476
- async setValue(value = '') {
477
- // Clear validation results
478
- this.resetValidation();
479
- // Don't emit change event for programmatic updates
480
- this._renderSelected(value, false);
481
- this.clearComboboxOptions();
482
- }
483
- /**
484
- * Internal method to set value from user interaction.
485
- * Assumes dirty flag is already set by the caller.
486
- * Will emit rChange if dirty flag is true.
487
- */
488
- setValueFromUserInteraction(value = '') {
489
- // Clear validation results
490
- this.resetValidation();
491
- // Emit change event for user interactions (if dirty is set)
492
- this._renderSelected(value, true);
493
- this.clearComboboxOptions();
494
- }
495
- /** Set value of the select */
496
- async getValue() {
497
- return this.currentValue || '';
498
- }
499
- /** Reset select to its initial state */
500
- async reset() {
501
- // Clear validation results
502
- this.resetValidation();
503
- // Reset touched and dirty states
504
- this.markAsPristine();
505
- // Collapse options listbox
506
- this.collapse();
507
- // Restore unfiltered list
508
- this.clearComboboxOptions();
509
- // If value has not changed --> nothing to reset
510
- if (this.currentValue === this.initial['value'])
511
- return;
512
- // If initial value is not an empty string
513
- if (this.initial['value'] !== '' && this.initiallySelectedElement) {
514
- this.isResetting = true;
515
- this.setValue(this.initial['value']);
516
- this.isResetting = false;
517
- return;
518
- }
519
- // Clear any selected option
520
- this.deselectOptions();
521
- // Set value of the select to null
522
- this.currentValue = '';
523
- this.valueToDisplay = '';
524
- }
525
- /**
526
- * Clears validation results.
527
- */
528
- async resetValidation() {
529
- // Clear validity message
530
- this.validityMessage = null;
531
- // Clear validity state
532
- this.validityState = null;
533
- // Reset props to initial
534
- this.invalid = this.initial['invalid'];
535
- this.valid = !this.invalid;
536
- }
537
- /**
538
- * Returns whether the select has been touched (focused/clicked by user).
539
- * @returns A boolean indicating whether the select has been touched.
540
- */
541
- async isTouched() {
542
- return this.touched;
543
- }
544
- /**
545
- * Returns whether the select value has been changed by user interaction.
546
- * @returns A boolean indicating whether the select is dirty.
547
- */
548
- async isDirty() {
549
- return this.dirty;
550
- }
551
- /**
552
- * Marks the select as untouched and pristine (not dirty).
553
- */
554
- async markAsPristine() {
555
- this.touched = false;
556
- this.dirty = false;
557
- }
558
- /**
559
- * Validates the textarea without triggering UI and returns a boolean indicating its validity.
560
- * @returns A boolean indicating whether the textarea is valid.
561
- */
562
- async checkValidity() {
563
- const { validityState } = this.getValidityStateData(this.nativeElement);
564
- return validityState === 'valid';
565
- }
566
- /** Check validity and reveal validation state and message */
567
- async reportValidity() {
568
- this.validateFormElement(this.nativeElement);
569
- return this.validityState === 'valid';
570
- }
571
- /** Set focus on the element */
572
- async setFocus() {
573
- var _a;
574
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.focus();
575
- }
576
- /** Remove focus from the element */
577
- async setBlur() {
578
- var _a;
579
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.blur();
580
- }
581
- /** Expand options listbox */
582
- async expand() {
583
- this.isExpanded = true;
584
- }
585
- /** Collapse options listbox */
586
- async collapse() {
587
- this.isExpanded = false;
588
- if (this.isBusy)
589
- return;
590
- this.clearOptionsFocus();
591
- this.setComboboxValueOnCollapse();
592
- }
593
- /**
594
- * Retrieves the currently focused option within this select component.
595
- *
596
- * The focused option is identified by the presence of the `data-focused="true"`
597
- * attribute on an `r-select-option` element inside the component's host.
598
- *
599
- * @returns Promise resolving to the focused `HTMLRSelectOptionElement`, or `null`
600
- * if no option is currently marked as focused.
601
- */
602
- async getFocusedOption() {
603
- return this.host.querySelector('r-select-option[data-focused="true"]') || null;
604
- }
605
- /**
606
- * Sets focus to the option at the specified index.
607
- *
608
- * Retrieves the option element from the internal optionElements collection
609
- * and delegates focusing logic to `setOptionFocus`.
610
- *
611
- * @param index - Zero-based index of the option to focus. If the index is out of bounds
612
- * or the corresponding option element is unavailable, the method will no-op.
613
- *
614
- * @returns A promise that resolves with the result of `setOptionFocus`, typically indicating
615
- * success or failure of applying focus (implementation dependent).
616
- */
617
- async setFocusedOption(index) {
618
- return this.setOptionFocus(this.optionElements[index]);
619
- }
620
- clearOptionsFocus() {
621
- var _a;
622
- this.focusedOption = null;
623
- try {
624
- this.valueElement.ariaActiveDescendantElement = null;
625
- }
626
- catch (_b) {
627
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('aria-activedescendant');
628
- }
629
- this.focusedOptions.forEach(option => option.setBlur());
630
- }
631
- setComboboxValueOnCollapse() {
632
- var _a, _b, _c;
633
- if (!this.combobox)
634
- return;
635
- this.valueElement.value = ((_c = (_b = (_a = this.selectedElement) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim) === null || _c === void 0 ? void 0 : _c.call(_b)) || '';
636
- this.clearComboboxOptions();
637
- }
638
- get focusedOptions() {
639
- return Array.from(this.host.querySelectorAll('r-select-option[data-focused="true"]'));
640
- }
641
- toggle() {
642
- this.isExpanded = !this.isExpanded;
643
- }
644
- get selectedElement() {
645
- return this.host.querySelector(`r-select-option[value="${this.currentValue}"]`);
646
- }
647
- get initiallySelectedElement() {
648
- return this.host.querySelector(`r-select-option[value="${this.initial['value']}"]`) || null;
649
- }
650
- /** Identify wrapping form element */
651
- get parentFormEl() {
652
- return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
653
- }
654
- /**
655
- * Determine whether this element should be ignored
656
- * during Constraint Validation API validation.
657
- * */
658
- get isNoValidate() {
659
- var _a;
660
- return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
661
- this.novalidate ||
662
- false);
663
- }
664
- get optionElements() {
665
- return this.host.querySelectorAll('r-select-option:not([disabled]:not([disabled="false"])):not([aria-hidden="true"])') || null;
666
- }
667
- get optionElementsArray() {
668
- return Array.from(this.optionElements);
669
- }
670
- deselectOptions() {
671
- if (!this.optionElements)
672
- return;
673
- this.optionElements.forEach(option => option.clearSelected());
674
- }
675
- get isBusy() {
676
- return this.isInitializing || this.isResetting;
677
- }
678
- _renderSelected(value = '', emitValue = true) {
679
- var _a, _b;
680
- // Update value of `<r-select>`
681
- this.currentValue = value;
682
- if (this.currentValue === null)
683
- this.host.removeAttribute('value');
684
- else
685
- this.host.setAttribute('value', this.currentValue);
686
- const elementToSelect = this.host.querySelector(`r-select-option[value="${(_a = this.currentValue) === null || _a === void 0 ? void 0 : _a.trim()}"]`);
687
- this.valueToDisplay = (elementToSelect === null || elementToSelect === void 0 ? void 0 : elementToSelect.innerHTML) || (elementToSelect === null || elementToSelect === void 0 ? void 0 : elementToSelect.textContent) || this.currentValue || '';
688
- // Switch `selected` value for each option
689
- (_b = this.optionElements) === null || _b === void 0 ? void 0 : _b.forEach(option => {
690
- option.value === value ? option.setSelected() : option.clearSelected();
691
- });
692
- this._renderNativeOption();
693
- if (this.isExpanded)
694
- this.collapse();
695
- if (!this.isBusy) {
696
- this.reportValidity();
697
- }
698
- // Only emit rChange if:
699
- // 1. emitValue is true
700
- // 2. Not during initialization or reset
701
- // 3. The component is dirty (user has interacted)
702
- if (emitValue && !this.isBusy && this.dirty) {
703
- this.rChange.emit({
704
- element: this.host,
705
- value: value
706
- });
707
- }
708
- }
709
- setOptionFocus(element = this.selectedElement) {
710
- if (!element)
711
- return;
712
- if (this.optionElements === null)
713
- return;
714
- // Helper: fallback to scrollIntoView
715
- const _scrollIntoViewFallback = (element, container) => {
716
- const top = element.offsetTop;
717
- const bottom = top + element.offsetHeight;
718
- const viewTop = container.scrollTop;
719
- const viewBottom = viewTop + container.clientHeight;
720
- if (top < viewTop) {
721
- container.scrollTop = top;
722
- }
723
- else if (bottom > viewBottom) {
724
- container.scrollTop = bottom - container.clientHeight;
725
- }
726
- };
727
- // Helper: defines if scrollIntoView can be used or calls optional fallback
728
- const _scrollIntoView = (element, container) => {
729
- var _a, _b;
730
- if (!container)
731
- return;
732
- // Try native scrollIntoView first (some browsers optimize this)
733
- try {
734
- (_a = element.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(element, {
735
- block: 'nearest',
736
- inline: 'nearest'
737
- });
738
- }
739
- catch (_c) {
740
- // Older Safari without options signature
741
- (_b = element.scrollIntoView) === null || _b === void 0 ? void 0 : _b.call(element, false);
742
- }
743
- // Manual correction if still out of view
744
- const optRect = element.getBoundingClientRect();
745
- const contRect = container.getBoundingClientRect();
746
- const outside = optRect.top < contRect.top || optRect.bottom > contRect.bottom;
747
- if (outside) {
748
- _scrollIntoViewFallback(element, container);
749
- }
750
- };
751
- requestAnimationFrame(() => {
752
- var _a;
753
- this.clearOptionsFocus();
754
- element.setFocus();
755
- this.focusedOption = element;
756
- try {
757
- this.valueElement.ariaActiveDescendantElement = element;
758
- }
759
- catch (_b) {
760
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-activedescendant', element.id);
761
- }
762
- _scrollIntoView(element, this.listboxElement);
763
- });
764
- }
765
- focusPrevOption(currentElement = this.focusedOption || this.selectedElement) {
766
- if (this.optionElements === null)
767
- return;
768
- const currentIndex = this.optionElementsArray.indexOf(currentElement);
769
- const prevIndex = currentIndex - 1;
770
- const isPrevIndex = prevIndex >= 0;
771
- const prevElement = isPrevIndex ? this.optionElements[prevIndex] : this.optionElements[this.optionElements.length - 1];
772
- this.setOptionFocus(prevElement);
773
- }
774
- focusNextOption(currentElement = this.focusedOption || this.selectedElement) {
775
- if (this.optionElements === null)
776
- return;
777
- const currentIndex = this.optionElementsArray.indexOf(currentElement);
778
- const nextIndex = currentIndex + 1;
779
- const lastIndex = this.optionElements.length - 1;
780
- const isNextIndex = nextIndex <= lastIndex;
781
- const nextElement = isNextIndex ? this.optionElements[nextIndex] : this.optionElements[0];
782
- this.setOptionFocus(nextElement);
783
- }
784
- /**
785
- * Return option elements whose label starts with the filter text (case-insensitive).
786
- */
787
- filterOptions(options, filter) {
788
- if (!filter)
789
- return [];
790
- const f = filter.toLowerCase();
791
- return options.filter(o => !o.disabled &&
792
- (o.textContent || '').trim().toLowerCase().startsWith(f));
793
- }
794
- /**
795
- * Return the index (within the provided array) of an option matching the filter.
796
- * If the filter is multiple iterations of the same letter (e.g. 'aaa'), cycle through
797
- * first-letter matches starting from startIndex.
798
- * Returns -1 if no match.
799
- */
800
- getIndexByLetter(options, filter, startIndex = 0) {
801
- if (!options.length || !filter)
802
- return -1;
803
- const ordered = [...options.slice(startIndex), ...options.slice(0, startIndex)];
804
- const matchesFull = this
805
- .filterOptions(ordered, filter)
806
- .sort((a, b) => ((a.textContent || '').trim().toLowerCase())
807
- .localeCompare((b.textContent || '').trim().toLowerCase()));
808
- const allSame = filter.split('').every(c => c === filter[0]);
809
- if (matchesFull[0]) {
810
- return options.indexOf(matchesFull[0]);
811
- }
812
- else if (allSame) {
813
- const firstLetterMatches = this.filterOptions(ordered, filter[0]);
814
- if (firstLetterMatches[0]) {
815
- return options.indexOf(firstLetterMatches[0]);
816
- }
817
- return -1;
818
- }
819
- return -1;
820
- }
821
- handleTypeahead(char) {
822
- const RESET_MS = 500;
823
- clearTimeout(this.typeaheadTimeout);
824
- const options = this.optionElementsArray;
825
- // Append character
826
- this.typeaheadBuffer += char.toLowerCase();
827
- const allSame = this.typeaheadBuffer.split('').every(c => c === this.typeaheadBuffer[0]);
828
- // Starting point for search:
829
- let startIndex;
830
- if (allSame && this.lastTypeaheadIndex !== -1) {
831
- // Cycle through same-letter matches
832
- startIndex = (this.lastTypeaheadIndex + 1) % options.length;
833
- }
834
- else {
835
- const focusBase = (this.focusedOption || this.selectedElement);
836
- const baseIndex = options.indexOf(focusBase);
837
- startIndex = baseIndex === -1 ? 0 : (baseIndex + 1) % options.length;
838
- }
839
- const idx = this.getIndexByLetter(options, this.typeaheadBuffer, startIndex);
840
- if (idx !== -1) {
841
- this.lastTypeaheadIndex = idx;
842
- const el = options[idx];
843
- if (!this.isExpanded)
844
- this.expand();
845
- this.setOptionFocus(el);
846
- }
847
- // Reset buffer after inactivity
848
- this.typeaheadTimeout = setTimeout(() => {
849
- this.typeaheadBuffer = '';
850
- }, RESET_MS);
851
- }
852
- connectFormEventListeners() {
853
- if (!this.parentFormEl)
854
- return;
855
- this.parentFormEl.addEventListener('formdata', this.contributeToFormData);
856
- this.parentFormEl.addEventListener('submit', this.onSubmitForm, { capture: true });
857
- this.parentFormEl.addEventListener('reset', this.onResetForm);
858
- }
859
- disconnectFormEventListeners() {
860
- if (!this.parentFormEl)
861
- return;
862
- this.parentFormEl.removeEventListener('formdata', this.contributeToFormData);
863
- this.parentFormEl.removeEventListener('submit', this.onSubmitForm);
864
- this.parentFormEl.removeEventListener('reset', this.onResetForm);
865
- }
866
- defineHostWidth() {
867
- if (this.fullWidth)
868
- return;
869
- const nativeWidth = this.host.shadowRoot.querySelector('.r-select--native').getBoundingClientRect().width;
870
- const valueWidth = (this.combobox ? this.comboboxContainerElement : this.valueElement).getBoundingClientRect().width;
871
- const listWidth = this.listboxElement.getBoundingClientRect().width;
872
- const structuralWidth = Math.max(nativeWidth, valueWidth, listWidth);
873
- this.host.style.setProperty('--width', `${structuralWidth}px`);
874
- }
875
- _renderNativeOption() {
876
- var _a, _b, _c, _d, _e;
877
- const optionElement = document.createElement("option");
878
- const optionText = document.createTextNode((_c = (_b = (_a = this.selectedElement) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim) === null || _c === void 0 ? void 0 : _c.call(_b));
879
- optionElement.value = this.currentValue;
880
- optionElement.selected = true;
881
- optionElement.appendChild(optionText);
882
- if (!this.nativeElement)
883
- return;
884
- this.nativeElement.innerHTML = '';
885
- (_d = this.nativeElement) === null || _d === void 0 ? void 0 : _d.appendChild(optionElement);
886
- this.nativeElement.value = this.currentValue;
887
- (_e = this.nativeElement) === null || _e === void 0 ? void 0 : _e.setAttribute('value', this.currentValue);
888
- }
889
- notVisible(element) {
890
- return getComputedStyle(element).overflow !== "visible";
891
- }
892
- /**
893
- * Finds first element's parent with not visible overflow.
894
- * @param element -- parent element
895
- * @param initEl -- initial(child) element
896
- */
897
- findOverflowParent(element) {
898
- var _a, _b;
899
- if (((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.DOCUMENT_FRAGMENT_NODE) {
900
- return this.findOverflowParent((_b = element.parentNode) === null || _b === void 0 ? void 0 : _b.host);
901
- }
902
- if (this.notVisible(element)) {
903
- return element;
904
- }
905
- if (element.parentElement) {
906
- return this.findOverflowParent(element.parentElement);
907
- }
908
- return null;
909
- }
910
- get ariaDescribedBy() {
911
- const describedBy = `${this.uniqueId}-message`;
912
- return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
913
- }
914
- /**
915
- * Parent with non visible overflow
916
- */
917
- get overflowedParent() {
918
- return this.findOverflowParent(this.host.parentElement);
919
- }
920
- /**
921
- * Available space at the top
922
- */
923
- get top() {
924
- var _a, _b;
925
- return (!this.overflowedParent ?
926
- (_a = this.valueElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().top :
927
- Math.abs(this.overflowedParent.getBoundingClientRect().top - ((_b = this.valueElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().top)));
928
- }
929
- /**
930
- * Available space at the bottom
931
- */
932
- get bottom() {
933
- var _a;
934
- function calculateBottomSpace(element) {
935
- return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
936
- }
937
- const styles = window.getComputedStyle(this.messageContainer);
938
- const messageContainerHeight = ((_a = this.messageContainer) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) + parseFloat(styles['marginTop']);
939
- const calculatedHostBottomSpace = calculateBottomSpace(this.host) + messageContainerHeight;
940
- return !this.overflowedParent ? calculatedHostBottomSpace + messageContainerHeight : Math.abs(calculateBottomSpace(this.overflowedParent) - calculatedHostBottomSpace);
941
- }
942
- /**
943
- * Set correct tooltip position.
944
- * First it checks the available space for a defined position and then sets the new one based on the available space.
945
- */
946
- defineListboxPositionState() {
947
- var _a, _b;
948
- const isBottomSpace = ((_a = this.listboxElement) === null || _a === void 0 ? void 0 : _a.offsetHeight) < this.bottom;
949
- const isTopSpace = ((_b = this.listboxElement) === null || _b === void 0 ? void 0 : _b.offsetHeight) < this.top;
950
- const isTop = this.listboxPosition === 'top';
951
- const isBottom = this.listboxPosition === 'bottom';
952
- /** Don't change the position if there is sufficient space for the listbox
953
- * or insufficient space for another position.
954
- * */
955
- if ((isTop && (isTopSpace || !isBottomSpace)) || (isBottom && (isBottomSpace || !isTopSpace))) {
956
- this.listboxPositionState = this.listboxPosition;
957
- return;
958
- }
959
- switch (this.listboxPosition) {
960
- case 'top':
961
- this.listboxPositionState = !isTopSpace ? 'bottom' : 'top';
962
- break;
963
- case 'bottom':
964
- this.listboxPositionState = !isBottomSpace ? 'top' : 'bottom';
965
- break;
966
- }
967
- }
968
- initialize() {
969
- var _a;
970
- const currentValue = this.value || '';
971
- this.initial['value'] = this.value || '';
972
- this.initial['invalid'] = this.invalid || false;
973
- this.listboxPositionState = this.listboxPosition;
974
- // Search for the option to select
975
- const elementToSelect = this.optionElementsArray.find((el) => el.value.trim() === currentValue);
976
- // Select the matching element if found
977
- if (elementToSelect) {
978
- this.isInitializing = true;
979
- this.setValue(currentValue);
980
- this.isInitializing = false;
981
- return;
982
- }
983
- if (this.placeholder)
984
- return;
985
- if (this.combobox)
986
- return;
987
- const firstOption = (_a = this.optionElements) === null || _a === void 0 ? void 0 : _a[0];
988
- if (firstOption) {
989
- this.isInitializing = true;
990
- this.setValue(firstOption === null || firstOption === void 0 ? void 0 : firstOption.value);
991
- this.isInitializing = false;
992
- }
993
- }
994
- initializeStyleObserver() {
995
- if (this.listboxWidthObserver || !this.listboxElement)
996
- return;
997
- const observerCallback = () => {
998
- if (!this.listboxElement)
999
- return;
1000
- // Only recompute if listbox grew beyond current host width
1001
- const listboxWidth = this.listboxElement.getBoundingClientRect().width;
1002
- const hostWidth = this.host.getBoundingClientRect().width;
1003
- if (listboxWidth <= hostWidth)
1004
- return;
1005
- this.defineHostWidth();
1006
- };
1007
- this.listboxWidthObserver = new StyleObserver(observerCallback);
1008
- this.listboxWidthObserver
1009
- .observe([this.listboxElement], ['width']);
1010
- }
1011
- get hasError() {
1012
- var _a;
1013
- return this.invalid && ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0;
1014
- }
1015
- get hasValidationError() {
1016
- var _a;
1017
- return this.validityState !== 'valid' && ((_a = this.validityMessage) === null || _a === void 0 ? void 0 : _a.length) > 0;
1018
- }
1019
- get hasMessage() {
1020
- return this.hasError || this.hasValidationError;
1021
- }
1022
- get isInteractive() {
1023
- return !this.disabled && !this.isReadonly;
1024
- }
1025
- get hasLeadingSlot() {
1026
- return !!this.host.querySelector('[slot="leading"]');
1027
- }
1028
- get hasOptionIcon() {
1029
- return !!this.optionElementsArray.find(el => !!el.querySelector('[slot="icon"]'));
1030
- }
1031
- get isLeadingSlotRendered() {
1032
- return this.hasLeadingSlot && this.hasOptionIcon && !this.currentValue;
1033
- }
1034
- get isPlaceholder() {
1035
- var _a, _b;
1036
- const { placeholder } = this;
1037
- return (((_b = (_a = this.valueToDisplay) === null || _a === void 0 ? void 0 : _a.trim) === null || _b === void 0 ? void 0 : _b.call(_a)) || placeholder || '') === placeholder;
1038
- }
1039
- connectedCallback() {
1040
- this.connectFormEventListeners();
1041
- }
1042
- disconnectedCallback() {
1043
- this.disconnectFormEventListeners();
1044
- }
1045
- componentWillLoad() {
1046
- this.isExpanded = this.expanded;
1047
- this.isReadonly = this.readonly;
1048
- }
1049
- componentDidLoad() {
1050
- this.defineListboxPositionState();
1051
- this.initializeStyleObserver();
1052
- }
1053
- render() {
1054
- var _a;
1055
- const { uniqueId, disabled, isExpanded, fieldIndicator, invalid, placeholder, required, hint, label, internal } = this;
1056
- const labelAttr = label ? {
1057
- fieldIndicator
1058
- } : {};
1059
- const isRequired = this.isInteractive ? !!required : false;
1060
- const comboboxAttrs = {
1061
- id: `${uniqueId}-value`,
1062
- tabindex: `${disabled ? -1 : 0}`,
1063
- 'aria-controls': `${uniqueId}-list`,
1064
- 'aria-describedby': this.ariaDescribedBy,
1065
- 'aria-disabled': `${disabled || false}`,
1066
- 'aria-expanded': `${isExpanded || false}`,
1067
- 'aria-invalid': `${invalid || false}`,
1068
- 'aria-readonly': `${!this.isInteractive || false}`,
1069
- 'aria-required': `${isRequired}`,
1070
- 'aria-labelledby': `${uniqueId}-label`
1071
- };
1072
- const listboxAttrs = {
1073
- 'aria-label': label
1074
- };
1075
- const nativeAttrs = {
1076
- placeholder,
1077
- name: this.name,
1078
- value: this.currentValue,
1079
- 'aria-hidden': 'true',
1080
- tabindex: '-1',
1081
- invalid,
1082
- disabled,
1083
- required: isRequired
1084
- };
1085
- return (h(Host, { key: 'f52fa96bdacace6070cd2baa15f8fab939d05916', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: '80326d43674f8caac11678ca4d5a6ca8178f9454', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '25fa25960350a338c7c9156d38c974c0ad8a0861', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'b52ac4d91e32df39459492bbeaf166d2a71d165c', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'ac75955086f424e781baf66e6853cbc89ec20d56' }, labelAttr), label)), h("slot", { key: '4cd953da5c64a473070ce4b8a3e5721a36561685', name: "popover" })), hint &&
1086
- h("r-hint", { key: '2d6a2e9eae51d56f31886725274c637e76ab4d75', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '8107a1d2475d11d6e827d7394ade84f9c4c85ea5', class: "r-select" }, h("select", Object.assign({ key: 'd7a60a4ff2f8f568da1ea90d859d5de78a1e73ef', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: '9d49470c7e4cc179dfd93cb1233e2bbf86ac7641', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '9594f3439c7591a4e4ef359a205a55d1c56dbb80', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'ae0ef701ff3e7db4c17aba7d57265122c3bf6587', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '012fcee55283c7bc5a3230ff23b692eca33d853b', onSlotchange: this.handleSlotChange })))), h("div", { key: '94fc769d8eeb0bd92f1d12d553b033a3de9ad8dc', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '881e60130bd3cbc9004aacbb027911357286a516', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage))));
1087
- }
1088
- static get is() { return "r-select"; }
1089
- static get encapsulation() { return "shadow"; }
1090
- static get originalStyleUrls() {
1091
- return {
1092
- "$": ["select.css"]
1093
- };
1094
- }
1095
- static get styleUrls() {
1096
- return {
1097
- "$": ["select.css"]
1098
- };
1099
- }
1100
- static get properties() {
1101
- return {
1102
- "form": {
1103
- "type": "string",
1104
- "attribute": "form",
1105
- "mutable": false,
1106
- "complexType": {
1107
- "original": "string",
1108
- "resolved": "string",
1109
- "references": {}
1110
- },
1111
- "required": false,
1112
- "optional": true,
1113
- "docs": {
1114
- "tags": [],
1115
- "text": "Specifies the `id` of the `<form>` to which the element belongs"
1116
- },
1117
- "getter": false,
1118
- "setter": false,
1119
- "reflect": true
1120
- },
1121
- "novalidate": {
1122
- "type": "boolean",
1123
- "attribute": "novalidate",
1124
- "mutable": false,
1125
- "complexType": {
1126
- "original": "boolean",
1127
- "resolved": "boolean",
1128
- "references": {}
1129
- },
1130
- "required": false,
1131
- "optional": true,
1132
- "docs": {
1133
- "tags": [],
1134
- "text": "Specifies if element must be ignored during validation of the form elements"
1135
- },
1136
- "getter": false,
1137
- "setter": false,
1138
- "reflect": false
1139
- },
1140
- "name": {
1141
- "type": "string",
1142
- "attribute": "name",
1143
- "mutable": false,
1144
- "complexType": {
1145
- "original": "string",
1146
- "resolved": "string",
1147
- "references": {}
1148
- },
1149
- "required": false,
1150
- "optional": true,
1151
- "docs": {
1152
- "tags": [],
1153
- "text": "Name of element (data) within a form"
1154
- },
1155
- "getter": false,
1156
- "setter": false,
1157
- "reflect": true
1158
- },
1159
- "value": {
1160
- "type": "string",
1161
- "attribute": "value",
1162
- "mutable": false,
1163
- "complexType": {
1164
- "original": "string",
1165
- "resolved": "string",
1166
- "references": {}
1167
- },
1168
- "required": false,
1169
- "optional": true,
1170
- "docs": {
1171
- "tags": [],
1172
- "text": "Selected value"
1173
- },
1174
- "getter": false,
1175
- "setter": false,
1176
- "reflect": true
1177
- },
1178
- "label": {
1179
- "type": "string",
1180
- "attribute": "label",
1181
- "mutable": false,
1182
- "complexType": {
1183
- "original": "string",
1184
- "resolved": "string",
1185
- "references": {}
1186
- },
1187
- "required": true,
1188
- "optional": false,
1189
- "docs": {
1190
- "tags": [],
1191
- "text": "The text on the label"
1192
- },
1193
- "getter": false,
1194
- "setter": false,
1195
- "reflect": true
1196
- },
1197
- "internal": {
1198
- "type": "boolean",
1199
- "attribute": "internal",
1200
- "mutable": false,
1201
- "complexType": {
1202
- "original": "boolean",
1203
- "resolved": "boolean",
1204
- "references": {}
1205
- },
1206
- "required": false,
1207
- "optional": true,
1208
- "docs": {
1209
- "tags": [],
1210
- "text": "Specifies if the component is internal"
1211
- },
1212
- "getter": false,
1213
- "setter": false,
1214
- "reflect": true
1215
- },
1216
- "placeholder": {
1217
- "type": "string",
1218
- "attribute": "placeholder",
1219
- "mutable": false,
1220
- "complexType": {
1221
- "original": "string",
1222
- "resolved": "string",
1223
- "references": {}
1224
- },
1225
- "required": false,
1226
- "optional": true,
1227
- "docs": {
1228
- "tags": [],
1229
- "text": "Text that is presented until an option has been selected"
1230
- },
1231
- "getter": false,
1232
- "setter": false,
1233
- "reflect": true
1234
- },
1235
- "hint": {
1236
- "type": "string",
1237
- "attribute": "hint",
1238
- "mutable": false,
1239
- "complexType": {
1240
- "original": "string",
1241
- "resolved": "string",
1242
- "references": {}
1243
- },
1244
- "required": false,
1245
- "optional": true,
1246
- "docs": {
1247
- "tags": [],
1248
- "text": "Optional hint, visually presented under the select,\ngiving additional context to the user"
1249
- },
1250
- "getter": false,
1251
- "setter": false,
1252
- "reflect": true
1253
- },
1254
- "disabled": {
1255
- "type": "boolean",
1256
- "attribute": "disabled",
1257
- "mutable": false,
1258
- "complexType": {
1259
- "original": "boolean",
1260
- "resolved": "boolean",
1261
- "references": {}
1262
- },
1263
- "required": false,
1264
- "optional": true,
1265
- "docs": {
1266
- "tags": [],
1267
- "text": "Prevent user interaction and apply disabled style"
1268
- },
1269
- "getter": false,
1270
- "setter": false,
1271
- "reflect": true
1272
- },
1273
- "required": {
1274
- "type": "boolean",
1275
- "attribute": "required",
1276
- "mutable": false,
1277
- "complexType": {
1278
- "original": "boolean",
1279
- "resolved": "boolean",
1280
- "references": {}
1281
- },
1282
- "required": false,
1283
- "optional": true,
1284
- "docs": {
1285
- "tags": [],
1286
- "text": "Specifies that select value is required"
1287
- },
1288
- "getter": false,
1289
- "setter": false,
1290
- "reflect": true
1291
- },
1292
- "fieldIndicator": {
1293
- "type": "string",
1294
- "attribute": "field-indicator",
1295
- "mutable": false,
1296
- "complexType": {
1297
- "original": "string",
1298
- "resolved": "string",
1299
- "references": {}
1300
- },
1301
- "required": false,
1302
- "optional": true,
1303
- "docs": {
1304
- "tags": [],
1305
- "text": "Text of an additional marker in the label"
1306
- },
1307
- "getter": false,
1308
- "setter": false,
1309
- "reflect": true
1310
- },
1311
- "valid": {
1312
- "type": "boolean",
1313
- "attribute": "valid",
1314
- "mutable": true,
1315
- "complexType": {
1316
- "original": "boolean",
1317
- "resolved": "boolean",
1318
- "references": {}
1319
- },
1320
- "required": false,
1321
- "optional": true,
1322
- "docs": {
1323
- "tags": [],
1324
- "text": "Visual indication of valid state"
1325
- },
1326
- "getter": false,
1327
- "setter": false,
1328
- "reflect": true
1329
- },
1330
- "invalid": {
1331
- "type": "boolean",
1332
- "attribute": "invalid",
1333
- "mutable": true,
1334
- "complexType": {
1335
- "original": "boolean",
1336
- "resolved": "boolean",
1337
- "references": {}
1338
- },
1339
- "required": false,
1340
- "optional": true,
1341
- "docs": {
1342
- "tags": [],
1343
- "text": "Validity indicator, serving to change UI of the component"
1344
- },
1345
- "getter": false,
1346
- "setter": false,
1347
- "reflect": true
1348
- },
1349
- "error": {
1350
- "type": "string",
1351
- "attribute": "error",
1352
- "mutable": false,
1353
- "complexType": {
1354
- "original": "string",
1355
- "resolved": "string",
1356
- "references": {}
1357
- },
1358
- "required": false,
1359
- "optional": true,
1360
- "docs": {
1361
- "tags": [],
1362
- "text": "Custom validation error message"
1363
- },
1364
- "getter": false,
1365
- "setter": false,
1366
- "reflect": true
1367
- },
1368
- "fullWidth": {
1369
- "type": "boolean",
1370
- "attribute": "full-width",
1371
- "mutable": false,
1372
- "complexType": {
1373
- "original": "boolean",
1374
- "resolved": "boolean",
1375
- "references": {}
1376
- },
1377
- "required": false,
1378
- "optional": false,
1379
- "docs": {
1380
- "tags": [],
1381
- "text": "Define if select should render as a text item or a block"
1382
- },
1383
- "getter": false,
1384
- "setter": false,
1385
- "reflect": true,
1386
- "defaultValue": "false"
1387
- },
1388
- "listboxPosition": {
1389
- "type": "string",
1390
- "attribute": "listbox-position",
1391
- "mutable": false,
1392
- "complexType": {
1393
- "original": "ListboxPosition",
1394
- "resolved": "\"bottom\" | \"top\"",
1395
- "references": {
1396
- "ListboxPosition": {
1397
- "location": "import",
1398
- "path": "./exports",
1399
- "id": "src/components/select/exports.ts::ListboxPosition"
1400
- }
1401
- }
1402
- },
1403
- "required": false,
1404
- "optional": false,
1405
- "docs": {
1406
- "tags": [],
1407
- "text": "Define wether listbox appears on top or at the bottom of the select"
1408
- },
1409
- "getter": false,
1410
- "setter": false,
1411
- "reflect": false,
1412
- "defaultValue": "'bottom'"
1413
- },
1414
- "valueMissingMessage": {
1415
- "type": "string",
1416
- "attribute": "value-missing-message",
1417
- "mutable": false,
1418
- "complexType": {
1419
- "original": "string",
1420
- "resolved": "string",
1421
- "references": {}
1422
- },
1423
- "required": false,
1424
- "optional": true,
1425
- "docs": {
1426
- "tags": [],
1427
- "text": "Set custom message for `valueMissing` property of a ValidityState object (set by `required`) within Constrain Validation API"
1428
- },
1429
- "getter": false,
1430
- "setter": false,
1431
- "reflect": true
1432
- },
1433
- "customErrorMessage": {
1434
- "type": "string",
1435
- "attribute": "custom-error-message",
1436
- "mutable": false,
1437
- "complexType": {
1438
- "original": "string",
1439
- "resolved": "string",
1440
- "references": {}
1441
- },
1442
- "required": false,
1443
- "optional": true,
1444
- "docs": {
1445
- "tags": [],
1446
- "text": "Set custom message for `customError` property of a ValidityState object indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method."
1447
- },
1448
- "getter": false,
1449
- "setter": false,
1450
- "reflect": true
1451
- },
1452
- "expanded": {
1453
- "type": "boolean",
1454
- "attribute": "expanded",
1455
- "mutable": false,
1456
- "complexType": {
1457
- "original": "boolean",
1458
- "resolved": "boolean",
1459
- "references": {}
1460
- },
1461
- "required": false,
1462
- "optional": true,
1463
- "docs": {
1464
- "tags": [],
1465
- "text": "Defines if select is expanded"
1466
- },
1467
- "getter": false,
1468
- "setter": false,
1469
- "reflect": false
1470
- },
1471
- "readonly": {
1472
- "type": "boolean",
1473
- "attribute": "readonly",
1474
- "mutable": false,
1475
- "complexType": {
1476
- "original": "boolean",
1477
- "resolved": "boolean",
1478
- "references": {}
1479
- },
1480
- "required": false,
1481
- "optional": true,
1482
- "docs": {
1483
- "tags": [],
1484
- "text": "Defines if select is in readonly state"
1485
- },
1486
- "getter": false,
1487
- "setter": false,
1488
- "reflect": true
1489
- },
1490
- "combobox": {
1491
- "type": "boolean",
1492
- "attribute": "combobox",
1493
- "mutable": false,
1494
- "complexType": {
1495
- "original": "boolean",
1496
- "resolved": "boolean",
1497
- "references": {}
1498
- },
1499
- "required": false,
1500
- "optional": true,
1501
- "docs": {
1502
- "tags": [],
1503
- "text": "Enable combobox functionality to allow users to reduce the list of options by filtering."
1504
- },
1505
- "getter": false,
1506
- "setter": false,
1507
- "reflect": true
1508
- },
1509
- "toggleButtonAriaLabel": {
1510
- "type": "string",
1511
- "attribute": "toggle-button-aria-label",
1512
- "mutable": false,
1513
- "complexType": {
1514
- "original": "string",
1515
- "resolved": "string",
1516
- "references": {}
1517
- },
1518
- "required": false,
1519
- "optional": true,
1520
- "docs": {
1521
- "tags": [{
1522
- "name": "default",
1523
- "text": "\"Toggle combobox\""
1524
- }],
1525
- "text": "Defines aria label for combobox toggle button"
1526
- },
1527
- "getter": false,
1528
- "setter": false,
1529
- "reflect": false,
1530
- "defaultValue": "'Toggle combobox'"
1531
- },
1532
- "noResultsFound": {
1533
- "type": "string",
1534
- "attribute": "no-results-found",
1535
- "mutable": false,
1536
- "complexType": {
1537
- "original": "string",
1538
- "resolved": "string",
1539
- "references": {}
1540
- },
1541
- "required": false,
1542
- "optional": true,
1543
- "docs": {
1544
- "tags": [{
1545
- "name": "default",
1546
- "text": "\"No results found\""
1547
- }],
1548
- "text": "Defines the text that will be displayed if no results are found"
1549
- },
1550
- "getter": false,
1551
- "setter": false,
1552
- "reflect": false,
1553
- "defaultValue": "'No results found'"
1554
- }
1555
- };
1556
- }
1557
- static get states() {
1558
- return {
1559
- "listboxPositionState": {},
1560
- "validityState": {},
1561
- "validityMessage": {},
1562
- "isExpanded": {},
1563
- "isReadonly": {},
1564
- "currentValue": {},
1565
- "valueToDisplay": {},
1566
- "isInitializing": {},
1567
- "isResetting": {},
1568
- "focusedOption": {},
1569
- "isValueFocused": {},
1570
- "isNoResultsFound": {},
1571
- "touched": {},
1572
- "dirty": {}
1573
- };
1574
- }
1575
- static get events() {
1576
- return [{
1577
- "method": "rValidate",
1578
- "name": "rValidate",
1579
- "bubbles": true,
1580
- "cancelable": true,
1581
- "composed": true,
1582
- "docs": {
1583
- "tags": [],
1584
- "text": "Emits event after each validation"
1585
- },
1586
- "complexType": {
1587
- "original": "{\n state: string,\n message: string\n }",
1588
- "resolved": "{ state: string; message: string; }",
1589
- "references": {}
1590
- }
1591
- }, {
1592
- "method": "rChange",
1593
- "name": "rChange",
1594
- "bubbles": true,
1595
- "cancelable": true,
1596
- "composed": true,
1597
- "docs": {
1598
- "tags": [],
1599
- "text": "Emits `rChange` event when `<r-select>` value property changes"
1600
- },
1601
- "complexType": {
1602
- "original": "{\n element: HTMLRSelectElement,\n value: any\n }",
1603
- "resolved": "{ element: HTMLRSelectElement; value: any; }",
1604
- "references": {
1605
- "HTMLRSelectElement": {
1606
- "location": "global",
1607
- "id": "global::HTMLRSelectElement"
1608
- }
1609
- }
1610
- }
1611
- }, {
1612
- "method": "rReset",
1613
- "name": "rReset",
1614
- "bubbles": true,
1615
- "cancelable": true,
1616
- "composed": true,
1617
- "docs": {
1618
- "tags": [],
1619
- "text": "Emits `rReset` event when `<r-select>` onReset event happens"
1620
- },
1621
- "complexType": {
1622
- "original": "{\n element: HTMLRSelectElement,\n value: any\n }",
1623
- "resolved": "{ element: HTMLRSelectElement; value: any; }",
1624
- "references": {
1625
- "HTMLRSelectElement": {
1626
- "location": "global",
1627
- "id": "global::HTMLRSelectElement"
1628
- }
1629
- }
1630
- }
1631
- }];
1632
- }
1633
- static get methods() {
1634
- return {
1635
- "setReadonly": {
1636
- "complexType": {
1637
- "signature": "() => Promise<void>",
1638
- "parameters": [],
1639
- "references": {
1640
- "Promise": {
1641
- "location": "global",
1642
- "id": "global::Promise"
1643
- }
1644
- },
1645
- "return": "Promise<void>"
1646
- },
1647
- "docs": {
1648
- "text": "Sets the component into `readonly` state",
1649
- "tags": []
1650
- }
1651
- },
1652
- "clearReadonly": {
1653
- "complexType": {
1654
- "signature": "() => Promise<void>",
1655
- "parameters": [],
1656
- "references": {
1657
- "Promise": {
1658
- "location": "global",
1659
- "id": "global::Promise"
1660
- }
1661
- },
1662
- "return": "Promise<void>"
1663
- },
1664
- "docs": {
1665
- "text": "Clears readonly state from the component",
1666
- "tags": []
1667
- }
1668
- },
1669
- "setValue": {
1670
- "complexType": {
1671
- "signature": "(value?: string) => Promise<void>",
1672
- "parameters": [{
1673
- "name": "value",
1674
- "type": "string",
1675
- "docs": ""
1676
- }],
1677
- "references": {
1678
- "Promise": {
1679
- "location": "global",
1680
- "id": "global::Promise"
1681
- }
1682
- },
1683
- "return": "Promise<void>"
1684
- },
1685
- "docs": {
1686
- "text": "Set value of the select programmatically.\nDoes NOT mark as dirty or emit change events.\nUse this for programmatic value updates.",
1687
- "tags": []
1688
- }
1689
- },
1690
- "getValue": {
1691
- "complexType": {
1692
- "signature": "() => Promise<string>",
1693
- "parameters": [],
1694
- "references": {
1695
- "Promise": {
1696
- "location": "global",
1697
- "id": "global::Promise"
1698
- }
1699
- },
1700
- "return": "Promise<string>"
1701
- },
1702
- "docs": {
1703
- "text": "Set value of the select",
1704
- "tags": []
1705
- }
1706
- },
1707
- "reset": {
1708
- "complexType": {
1709
- "signature": "() => Promise<void>",
1710
- "parameters": [],
1711
- "references": {
1712
- "Promise": {
1713
- "location": "global",
1714
- "id": "global::Promise"
1715
- }
1716
- },
1717
- "return": "Promise<void>"
1718
- },
1719
- "docs": {
1720
- "text": "Reset select to its initial state",
1721
- "tags": []
1722
- }
1723
- },
1724
- "resetValidation": {
1725
- "complexType": {
1726
- "signature": "() => Promise<void>",
1727
- "parameters": [],
1728
- "references": {
1729
- "Promise": {
1730
- "location": "global",
1731
- "id": "global::Promise"
1732
- }
1733
- },
1734
- "return": "Promise<void>"
1735
- },
1736
- "docs": {
1737
- "text": "Clears validation results.",
1738
- "tags": []
1739
- }
1740
- },
1741
- "isTouched": {
1742
- "complexType": {
1743
- "signature": "() => Promise<boolean>",
1744
- "parameters": [],
1745
- "references": {
1746
- "Promise": {
1747
- "location": "global",
1748
- "id": "global::Promise"
1749
- }
1750
- },
1751
- "return": "Promise<boolean>"
1752
- },
1753
- "docs": {
1754
- "text": "Returns whether the select has been touched (focused/clicked by user).",
1755
- "tags": [{
1756
- "name": "returns",
1757
- "text": "A boolean indicating whether the select has been touched."
1758
- }]
1759
- }
1760
- },
1761
- "isDirty": {
1762
- "complexType": {
1763
- "signature": "() => Promise<boolean>",
1764
- "parameters": [],
1765
- "references": {
1766
- "Promise": {
1767
- "location": "global",
1768
- "id": "global::Promise"
1769
- }
1770
- },
1771
- "return": "Promise<boolean>"
1772
- },
1773
- "docs": {
1774
- "text": "Returns whether the select value has been changed by user interaction.",
1775
- "tags": [{
1776
- "name": "returns",
1777
- "text": "A boolean indicating whether the select is dirty."
1778
- }]
1779
- }
1780
- },
1781
- "markAsPristine": {
1782
- "complexType": {
1783
- "signature": "() => Promise<void>",
1784
- "parameters": [],
1785
- "references": {
1786
- "Promise": {
1787
- "location": "global",
1788
- "id": "global::Promise"
1789
- }
1790
- },
1791
- "return": "Promise<void>"
1792
- },
1793
- "docs": {
1794
- "text": "Marks the select as untouched and pristine (not dirty).",
1795
- "tags": []
1796
- }
1797
- },
1798
- "checkValidity": {
1799
- "complexType": {
1800
- "signature": "() => Promise<boolean>",
1801
- "parameters": [],
1802
- "references": {
1803
- "Promise": {
1804
- "location": "global",
1805
- "id": "global::Promise"
1806
- }
1807
- },
1808
- "return": "Promise<boolean>"
1809
- },
1810
- "docs": {
1811
- "text": "Validates the textarea without triggering UI and returns a boolean indicating its validity.",
1812
- "tags": [{
1813
- "name": "returns",
1814
- "text": "A boolean indicating whether the textarea is valid."
1815
- }]
1816
- }
1817
- },
1818
- "reportValidity": {
1819
- "complexType": {
1820
- "signature": "() => Promise<boolean>",
1821
- "parameters": [],
1822
- "references": {
1823
- "Promise": {
1824
- "location": "global",
1825
- "id": "global::Promise"
1826
- }
1827
- },
1828
- "return": "Promise<boolean>"
1829
- },
1830
- "docs": {
1831
- "text": "Check validity and reveal validation state and message",
1832
- "tags": []
1833
- }
1834
- },
1835
- "setFocus": {
1836
- "complexType": {
1837
- "signature": "() => Promise<void>",
1838
- "parameters": [],
1839
- "references": {
1840
- "Promise": {
1841
- "location": "global",
1842
- "id": "global::Promise"
1843
- }
1844
- },
1845
- "return": "Promise<void>"
1846
- },
1847
- "docs": {
1848
- "text": "Set focus on the element",
1849
- "tags": []
1850
- }
1851
- },
1852
- "setBlur": {
1853
- "complexType": {
1854
- "signature": "() => Promise<void>",
1855
- "parameters": [],
1856
- "references": {
1857
- "Promise": {
1858
- "location": "global",
1859
- "id": "global::Promise"
1860
- }
1861
- },
1862
- "return": "Promise<void>"
1863
- },
1864
- "docs": {
1865
- "text": "Remove focus from the element",
1866
- "tags": []
1867
- }
1868
- },
1869
- "expand": {
1870
- "complexType": {
1871
- "signature": "() => Promise<void>",
1872
- "parameters": [],
1873
- "references": {
1874
- "Promise": {
1875
- "location": "global",
1876
- "id": "global::Promise"
1877
- }
1878
- },
1879
- "return": "Promise<void>"
1880
- },
1881
- "docs": {
1882
- "text": "Expand options listbox",
1883
- "tags": []
1884
- }
1885
- },
1886
- "collapse": {
1887
- "complexType": {
1888
- "signature": "() => Promise<void>",
1889
- "parameters": [],
1890
- "references": {
1891
- "Promise": {
1892
- "location": "global",
1893
- "id": "global::Promise"
1894
- }
1895
- },
1896
- "return": "Promise<void>"
1897
- },
1898
- "docs": {
1899
- "text": "Collapse options listbox",
1900
- "tags": []
1901
- }
1902
- },
1903
- "getFocusedOption": {
1904
- "complexType": {
1905
- "signature": "() => Promise<HTMLRSelectOptionElement>",
1906
- "parameters": [],
1907
- "references": {
1908
- "Promise": {
1909
- "location": "global",
1910
- "id": "global::Promise"
1911
- },
1912
- "HTMLRSelectOptionElement": {
1913
- "location": "global",
1914
- "id": "global::HTMLRSelectOptionElement"
1915
- }
1916
- },
1917
- "return": "Promise<HTMLRSelectOptionElement>"
1918
- },
1919
- "docs": {
1920
- "text": "Retrieves the currently focused option within this select component.\n\nThe focused option is identified by the presence of the `data-focused=\"true\"`\nattribute on an `r-select-option` element inside the component's host.",
1921
- "tags": [{
1922
- "name": "returns",
1923
- "text": "Promise resolving to the focused `HTMLRSelectOptionElement`, or `null`\nif no option is currently marked as focused."
1924
- }]
1925
- }
1926
- },
1927
- "setFocusedOption": {
1928
- "complexType": {
1929
- "signature": "(index: any) => Promise<void>",
1930
- "parameters": [{
1931
- "name": "index",
1932
- "type": "any",
1933
- "docs": "- Zero-based index of the option to focus. If the index is out of bounds\nor the corresponding option element is unavailable, the method will no-op."
1934
- }],
1935
- "references": {
1936
- "Promise": {
1937
- "location": "global",
1938
- "id": "global::Promise"
1939
- }
1940
- },
1941
- "return": "Promise<void>"
1942
- },
1943
- "docs": {
1944
- "text": "Sets focus to the option at the specified index.\n\nRetrieves the option element from the internal optionElements collection\nand delegates focusing logic to `setOptionFocus`.",
1945
- "tags": [{
1946
- "name": "param",
1947
- "text": "index - Zero-based index of the option to focus. If the index is out of bounds\nor the corresponding option element is unavailable, the method will no-op."
1948
- }, {
1949
- "name": "returns",
1950
- "text": "A promise that resolves with the result of `setOptionFocus`, typically indicating\nsuccess or failure of applying focus (implementation dependent)."
1951
- }]
1952
- }
1953
- }
1954
- };
1955
- }
1956
- static get elementRef() { return "host"; }
1957
- static get watchers() {
1958
- return [{
1959
- "propName": "listboxPosition",
1960
- "methodName": "handleListboxPositionChange"
1961
- }, {
1962
- "propName": "expanded",
1963
- "methodName": "handleExpandedChange"
1964
- }, {
1965
- "propName": "readonly",
1966
- "methodName": "handleReadonlyChange"
1967
- }, {
1968
- "propName": "value",
1969
- "methodName": "handleValueChange"
1970
- }];
1971
- }
1972
- static get listeners() {
1973
- return [{
1974
- "name": "optionClick",
1975
- "method": "optionSelectAction",
1976
- "target": undefined,
1977
- "capture": false,
1978
- "passive": false
1979
- }, {
1980
- "name": "rTooltipFocus",
1981
- "method": "tooltipFocusAction",
1982
- "target": undefined,
1983
- "capture": false,
1984
- "passive": false
1985
- }, {
1986
- "name": "mouseup",
1987
- "method": "onMouseup",
1988
- "target": "window",
1989
- "capture": false,
1990
- "passive": true
1991
- }, {
1992
- "name": "keyup",
1993
- "method": "onKeyup",
1994
- "target": "window",
1995
- "capture": false,
1996
- "passive": false
1997
- }, {
1998
- "name": "scroll",
1999
- "method": "handleScrolling",
2000
- "target": "window",
2001
- "capture": false,
2002
- "passive": true
2003
- }, {
2004
- "name": "resize",
2005
- "method": "handleResizing",
2006
- "target": "window",
2007
- "capture": false,
2008
- "passive": true
2009
- }];
2010
- }
2011
- }