@riverty/web-components 6.2.0 → 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 +30 -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.js +0 -540
  102. package/dist/collection/components/illustration/illustration.scss +0 -56
  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-c1f59ed1.entry.js +0 -1
  378. package/dist/web-components/p-c80a5541.entry.js +0 -1
  379. package/dist/web-components/p-c96ee61a.entry.js +0 -1
  380. package/dist/web-components/p-caf8f067.entry.js +0 -1
  381. package/dist/web-components/p-cc363c3d.entry.js +0 -1
  382. package/dist/web-components/p-cf4ff357.entry.js +0 -1
  383. package/dist/web-components/p-d0310ed4.entry.js +0 -1
  384. package/dist/web-components/p-d1412932.entry.js +0 -1
  385. package/dist/web-components/p-d2447e30.entry.js +0 -1
  386. package/dist/web-components/p-dc9cca06.entry.js +0 -1
  387. package/dist/web-components/p-e5b943a2.entry.js +0 -1
  388. package/dist/web-components/p-e67b13df.entry.js +0 -1
  389. package/dist/web-components/p-efec231a.entry.js +0 -1
  390. package/dist/web-components/p-f867e4c3.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,500 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- const OFFSET = 20;
3
- export class Tooltip {
4
- constructor() {
5
- /** Tooltip display text */
6
- this.text = '';
7
- /** Specifies tooltip position */
8
- this.position = 'top';
9
- this.arrowPositionState = 'left';
10
- this.isShown = false;
11
- this.uniqueId = `r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
12
- this.getOffsetLeft = (arrowPosition) => {
13
- var _a, _b, _c;
14
- const offsetLeft = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width));
15
- switch (arrowPosition) {
16
- case 'center':
17
- return offsetLeft / 2;
18
- case 'right':
19
- return offsetLeft;
20
- default:
21
- return 0;
22
- }
23
- };
24
- this.alignTooltipPosition = () => {
25
- var _a, _b, _c, _d, _e, _f, _g;
26
- const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
27
- const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
28
- const hostHeight = ((_e = (_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height) + this.arrowHeight || 0;
29
- const hostWidth = ((_g = (_f = this.element) === null || _f === void 0 ? void 0 : _f.getBoundingClientRect()) === null || _g === void 0 ? void 0 : _g.width) + this.arrowWidth || 0;
30
- switch (this.positionState) {
31
- case 'top':
32
- this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
33
- break;
34
- case 'bottom':
35
- this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
36
- break;
37
- case 'left':
38
- this.alignPosition(this.tooltip, -this.tooltipContainerWidth, -offsetHeight);
39
- break;
40
- case 'right':
41
- this.alignPosition(this.tooltip, hostWidth, -offsetHeight);
42
- break;
43
- default:
44
- break;
45
- }
46
- };
47
- this.alignArrowPosition = () => {
48
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
49
- const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.arrow) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
50
- const offsetLeft = Math.abs(((_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect().width) - ((_f = (_e = this.arrow) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.width)) / 2;
51
- const hostHeight = ((_h = (_g = this.element) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect()) === null || _h === void 0 ? void 0 : _h.height) || 0;
52
- const hostWidth = ((_k = (_j = this.element) === null || _j === void 0 ? void 0 : _j.getBoundingClientRect()) === null || _k === void 0 ? void 0 : _k.width) || 0;
53
- switch (this.positionState) {
54
- case 'top':
55
- this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
56
- break;
57
- case 'bottom':
58
- this.alignPosition(this.arrow, offsetLeft, hostHeight);
59
- break;
60
- case 'left':
61
- this.alignPosition(this.arrow, -this.arrowWidth, offsetHeight);
62
- break;
63
- case 'right':
64
- this.alignPosition(this.arrow, hostWidth, offsetHeight);
65
- break;
66
- default:
67
- break;
68
- }
69
- };
70
- this.alignPosition = (element, offsetLeft, offsetTop) => {
71
- var _a;
72
- if (!element) {
73
- return;
74
- }
75
- let elementOffset = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
76
- let left = elementOffset.left + offsetLeft;
77
- let top = elementOffset.top + offsetTop;
78
- element.style.left = `${left > 0 ? left : 0}px`;
79
- element.style.top = `${top}px`;
80
- };
81
- /**
82
- * Listen on hovering tooltip element and update tooltip position if needed
83
- */
84
- this.handleHover = () => {
85
- this.showTooltip();
86
- this.setCorrectPosition();
87
- };
88
- /**
89
- * Listen on focusing tooltip element and update tooltip position if needed
90
- */
91
- this.handleFocus = () => {
92
- this.showTooltip();
93
- this.setCorrectPosition();
94
- this.rTooltipFocus.emit({ element: this.element });
95
- };
96
- this.showTooltip = () => {
97
- var _a;
98
- this.isShown = true;
99
- this.tooltip.classList.add('r-tooltip--content--visible');
100
- const interactiveElement = this.getInteractiveElement(this.activeElement);
101
- interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-description', (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.innerText);
102
- };
103
- this.removeTooltip = () => {
104
- this.isShown = false;
105
- this.tooltip.style.width = 'max-content';
106
- this.tooltip.classList.remove('r-tooltip--content--visible');
107
- const interactiveElement = this.getInteractiveElement(this.activeElement);
108
- interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.removeAttribute('aria-description');
109
- };
110
- this.handleScroll = () => {
111
- if (!this.isShown) {
112
- return;
113
- }
114
- if (!this.isOnScreen) {
115
- this.removeTooltip();
116
- return;
117
- }
118
- this.setCorrectPosition();
119
- };
120
- }
121
- /**
122
- * Watch on position value change and update tooltip position if needed
123
- */
124
- handleVerticalPosition() {
125
- this.setCorrectPosition();
126
- }
127
- /**
128
- * Listen on window scroll and update tooltip position if needed
129
- */
130
- handleScrolling() {
131
- this.setCorrectPosition();
132
- }
133
- /**
134
- * Listen on window resizing and update tooltip position if needed
135
- */
136
- handleResizing() {
137
- this.setCorrectPosition();
138
- }
139
- /**
140
- * Listen on window keydown and hide tooltip if needed
141
- */
142
- handleKeydown(event) {
143
- if (this.isShown && event.key === 'Escape') {
144
- this.removeTooltip();
145
- }
146
- }
147
- /**
148
- * Parent with non visible overflow
149
- */
150
- get overflowedParent() {
151
- return this.findOverflowParent(this.element.parentElement);
152
- }
153
- get arrowWidth() {
154
- var _a;
155
- return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0;
156
- }
157
- get arrowHeight() {
158
- var _a;
159
- return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
160
- }
161
- get tooltipContainerWidth() {
162
- var _a, _b;
163
- return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) + this.arrowWidth || 0;
164
- }
165
- get tooltipContainerHeight() {
166
- var _a, _b;
167
- return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) + this.arrowHeight || 0;
168
- }
169
- /**
170
- * Available space at the top
171
- */
172
- get top() {
173
- return this.element.getBoundingClientRect().top;
174
- }
175
- /**
176
- * Available space on the left
177
- */
178
- get left() {
179
- return this.element.getBoundingClientRect().left;
180
- }
181
- get isOnScreen() {
182
- const parent = this.overflowedParent || document.documentElement;
183
- const parentRect = parent.getBoundingClientRect();
184
- const elementRect = this.element.getBoundingClientRect();
185
- const isVerticallyVisible = elementRect.top >= parentRect.top && elementRect.bottom <= parentRect.bottom;
186
- const isHorizontallyVisible = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
187
- return isVerticallyVisible && isHorizontallyVisible;
188
- }
189
- /**
190
- * Available space at the bottom
191
- */
192
- get bottom() {
193
- function calculateBottomSpace(element) {
194
- return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
195
- }
196
- return calculateBottomSpace(this.element);
197
- }
198
- /**
199
- * Available space on the right
200
- */
201
- get right() {
202
- function calculateRightSpace(element) {
203
- return window.innerWidth - element.getBoundingClientRect().left - element.getBoundingClientRect().width;
204
- }
205
- return calculateRightSpace(this.element);
206
- }
207
- /**
208
- * Defines which horizontal placement is available
209
- */
210
- get horizontalPlacement() {
211
- return this.tooltipContainerWidth + OFFSET < this.left ? 'left' : 'right';
212
- }
213
- /**
214
- * Defines which vertical placement is available
215
- */
216
- get verticalPlacement() {
217
- return this.tooltipContainerHeight + OFFSET < this.top ? 'top' : 'bottom';
218
- }
219
- /**
220
- * Checks if there is enough space for placing tooltip vertically
221
- */
222
- get isEnoughSpaceVertically() {
223
- return this.tooltipContainerHeight + OFFSET < this.top || this.tooltipContainerHeight + OFFSET < this.bottom;
224
- }
225
- /**
226
- * Checks if there is enough space for placing tooltip horizontally
227
- */
228
- get isEnoughSpaceHorizontally() {
229
- return this.tooltipContainerWidth + OFFSET < this.left || this.tooltipContainerWidth + OFFSET < this.right;
230
- }
231
- get activeElement() {
232
- return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
233
- }
234
- /**
235
- * Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM,
236
- * or returns the element itself if it's already interactive
237
- */
238
- getInteractiveElement(element) {
239
- if (!element)
240
- return null;
241
- if (element.tagName === 'R-BUTTON' || element.tagName === 'R-ICON-BUTTON') {
242
- const shadowRoot = element.shadowRoot;
243
- if (shadowRoot) {
244
- return shadowRoot.querySelector('button, a');
245
- }
246
- }
247
- return element;
248
- }
249
- /**
250
- * Define position state
251
- */
252
- componentWillLoad() {
253
- this.positionState = this.position;
254
- }
255
- /**
256
- * Listen to active child element
257
- */
258
- componentDidLoad() {
259
- var _a, _b, _c;
260
- (_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
261
- this.handleFocus();
262
- });
263
- (_b = this.activeElement) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => {
264
- this.removeTooltip();
265
- });
266
- (_c = this.overflowedParent) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', () => {
267
- this.handleScroll();
268
- });
269
- }
270
- /**
271
- * Finds first element's parent with not visible overflow.
272
- * @param element -- parent element
273
- * @param initEl -- initial(child) element
274
- */
275
- findOverflowParent(element) {
276
- var _a, _b;
277
- function notVisible(element) {
278
- return getComputedStyle(element).overflow !== "visible";
279
- }
280
- if (!element) {
281
- return null;
282
- }
283
- if (((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.DOCUMENT_FRAGMENT_NODE) {
284
- return this.findOverflowParent((_b = element.parentNode) === null || _b === void 0 ? void 0 : _b.host);
285
- }
286
- if (notVisible(element)) {
287
- return element;
288
- }
289
- if (element.parentElement) {
290
- return this.findOverflowParent(element.parentElement);
291
- }
292
- return null;
293
- }
294
- /**
295
- * Checks the alternative tooltip position.
296
- * For example: If defined position is "top" and there is no free space for this position at the top of the component,
297
- * first it checks available vertical space to place tooltip at the bottom.
298
- * If there is no available space at the bottom, it checks the available space horizontally and sets it horizontally.
299
- */
300
- getAlternativePosition() {
301
- switch (this.position) {
302
- case 'top':
303
- return this.isEnoughSpaceVertically ? 'bottom' : this.horizontalPlacement;
304
- case 'bottom':
305
- return this.isEnoughSpaceVertically ? 'top' : this.horizontalPlacement;
306
- case 'left':
307
- return this.isEnoughSpaceHorizontally ? 'right' : this.verticalPlacement;
308
- case 'right':
309
- return this.isEnoughSpaceHorizontally ? 'left' : this.verticalPlacement;
310
- }
311
- }
312
- /**
313
- * Set correct tooltip position.
314
- * First it checks the available space for a defined position and then sets the new one based on the available space.
315
- */
316
- setCorrectPosition() {
317
- if (!this.tooltip || !this.isShown) {
318
- return;
319
- }
320
- switch (this.position) {
321
- case 'top':
322
- this.positionState = this.tooltipContainerHeight + OFFSET < this.top ? this.position : this.getAlternativePosition();
323
- break;
324
- case 'bottom':
325
- this.positionState = this.tooltipContainerHeight + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
326
- break;
327
- case 'left':
328
- this.positionState = this.tooltipContainerWidth + OFFSET < this.left ? this.position : this.getAlternativePosition();
329
- break;
330
- case 'right':
331
- this.positionState = this.tooltipContainerWidth + OFFSET < this.right ? this.position : this.getAlternativePosition();
332
- break;
333
- }
334
- this.adjustArrowPosition();
335
- this.alignTooltipPosition();
336
- this.alignArrowPosition();
337
- // Allow tooltip content wrap and recalculate position
338
- if (this.tooltip.style.width === 'fit-content') {
339
- return;
340
- }
341
- this.tooltip.style.width = 'fit-content';
342
- this.alignTooltipPosition();
343
- }
344
- /**
345
- * Adjusts arrow correct position.
346
- * For bottom & top tooltip positions there are 3 possible arrow.
347
- * For right & left tooltip positions there is only one position = "center".
348
- */
349
- adjustArrowPosition() {
350
- const isEnoughTooltipSpaceLeft = this.tooltipContainerWidth / 2 + OFFSET < this.left;
351
- const isEnoughTooltipSpaceRight = this.tooltipContainerWidth / 2 + OFFSET < this.right;
352
- if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || !isEnoughTooltipSpaceLeft && !isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
353
- this.arrowPositionState = 'center';
354
- }
355
- else if (!isEnoughTooltipSpaceLeft) {
356
- this.arrowPositionState = 'left';
357
- }
358
- else if (!isEnoughTooltipSpaceRight) {
359
- this.arrowPositionState = 'right';
360
- }
361
- }
362
- render() {
363
- const { text, arrowPositionState, positionState, isShown, uniqueId } = this;
364
- const hostAttrs = {
365
- 'data-arrow-position': arrowPositionState,
366
- 'data-position': positionState
367
- };
368
- const triggerAttrs = {
369
- tabindex: !this.activeElement ? 0 : null,
370
- role: !this.activeElement ? 'button' : null,
371
- 'aria-describedby': !this.activeElement && isShown ? uniqueId : null
372
- };
373
- const contentAttrs = {
374
- id: uniqueId,
375
- role: 'tooltip',
376
- 'aria-hidden': `${!isShown}`
377
- };
378
- return (h(Host, Object.assign({ key: '5d8a002a227895d5e633e8b1df95ba449a9e253a' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: '4e6340639dc27fc7d0e981ca7cf8a4046737527f', class: "r-tooltip" }, h("div", Object.assign({ key: 'bcf2d5c73b427b2941be8de56b9ce2f296ae07eb', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: 'be7037ba07bf11b4957910c52f4a3f329b514007' })), h("div", Object.assign({ key: '300a3ef08b7c73b6b07161c58860df518ae9a862', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), h("div", { key: '73912349289b0dc365552331197d94bd0896ff3c', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
379
- }
380
- static get is() { return "r-tooltip"; }
381
- static get encapsulation() { return "shadow"; }
382
- static get originalStyleUrls() {
383
- return {
384
- "$": ["tooltip.css"]
385
- };
386
- }
387
- static get styleUrls() {
388
- return {
389
- "$": ["tooltip.css"]
390
- };
391
- }
392
- static get properties() {
393
- return {
394
- "text": {
395
- "type": "string",
396
- "attribute": "text",
397
- "mutable": false,
398
- "complexType": {
399
- "original": "string",
400
- "resolved": "string",
401
- "references": {}
402
- },
403
- "required": false,
404
- "optional": false,
405
- "docs": {
406
- "tags": [],
407
- "text": "Tooltip display text"
408
- },
409
- "getter": false,
410
- "setter": false,
411
- "reflect": true,
412
- "defaultValue": "''"
413
- },
414
- "position": {
415
- "type": "string",
416
- "attribute": "position",
417
- "mutable": false,
418
- "complexType": {
419
- "original": "TooltipPosition",
420
- "resolved": "\"bottom\" | \"left\" | \"right\" | \"top\"",
421
- "references": {
422
- "TooltipPosition": {
423
- "location": "import",
424
- "path": "./exports",
425
- "id": "src/components/tooltip/exports.ts::TooltipPosition"
426
- }
427
- }
428
- },
429
- "required": false,
430
- "optional": false,
431
- "docs": {
432
- "tags": [],
433
- "text": "Specifies tooltip position"
434
- },
435
- "getter": false,
436
- "setter": false,
437
- "reflect": true,
438
- "defaultValue": "'top'"
439
- }
440
- };
441
- }
442
- static get states() {
443
- return {
444
- "positionState": {},
445
- "arrowPositionState": {},
446
- "isShown": {}
447
- };
448
- }
449
- static get events() {
450
- return [{
451
- "method": "rTooltipFocus",
452
- "name": "rTooltipFocus",
453
- "bubbles": true,
454
- "cancelable": true,
455
- "composed": true,
456
- "docs": {
457
- "tags": [],
458
- "text": "Tooltip focus event"
459
- },
460
- "complexType": {
461
- "original": "{\n element: HTMLRTooltipElement\n }",
462
- "resolved": "{ element: HTMLRTooltipElement; }",
463
- "references": {
464
- "HTMLRTooltipElement": {
465
- "location": "global",
466
- "id": "global::HTMLRTooltipElement"
467
- }
468
- }
469
- }
470
- }];
471
- }
472
- static get elementRef() { return "element"; }
473
- static get watchers() {
474
- return [{
475
- "propName": "position",
476
- "methodName": "handleVerticalPosition"
477
- }];
478
- }
479
- static get listeners() {
480
- return [{
481
- "name": "scroll",
482
- "method": "handleScrolling",
483
- "target": "window",
484
- "capture": false,
485
- "passive": true
486
- }, {
487
- "name": "resize",
488
- "method": "handleResizing",
489
- "target": "window",
490
- "capture": false,
491
- "passive": true
492
- }, {
493
- "name": "keydown",
494
- "method": "handleKeydown",
495
- "target": "window",
496
- "capture": false,
497
- "passive": false
498
- }];
499
- }
500
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- export function focusableElements(root) {
2
- const selectors = [
3
- 'a[href]',
4
- 'button:not([disabled])',
5
- 'textarea:not([disabled])',
6
- 'input:not([disabled])',
7
- 'select:not([disabled])',
8
- '[tabindex]:not([tabindex="-1"])',
9
- 'r-button',
10
- 'r-checkbox',
11
- 'r-radio-button',
12
- 'r-input',
13
- 'r-textarea',
14
- 'r-select',
15
- 'r-input-code',
16
- 'r-input-date',
17
- 'r-input-password',
18
- 'r-input-phone-number'
19
- ];
20
- return Array.from(root.querySelectorAll(selectors.join(',')))
21
- .filter((el) => el instanceof HTMLElement &&
22
- !el.hasAttribute('disabled') &&
23
- !el.getAttribute('aria-hidden')) || null;
24
- }
@@ -1,40 +0,0 @@
1
- export function appendControlToFormData(controlOrControls, formData) {
2
- var _a, _b, _c;
3
- const controls = Array.isArray(controlOrControls)
4
- ? controlOrControls
5
- : [controlOrControls];
6
- for (const control of controls) {
7
- const name = control.name;
8
- if (!name)
9
- continue;
10
- if (control.disabled)
11
- continue;
12
- const tag = (_b = (_a = control.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase) === null || _b === void 0 ? void 0 : _b.call(_a);
13
- if (tag === 'BUTTON' || tag === 'FIELDSET')
14
- continue;
15
- let valueToAppend = '';
16
- switch (control.type) {
17
- case 'checkbox':
18
- case 'radio':
19
- if (!control.checked)
20
- continue;
21
- valueToAppend = control.value || 'on';
22
- break;
23
- case 'file':
24
- if (control.files && control.files.length > 0) {
25
- for (const file of control.files) {
26
- formData.append(name, file);
27
- }
28
- continue;
29
- }
30
- else {
31
- formData.append(name, new File([], ''));
32
- continue;
33
- }
34
- default:
35
- valueToAppend = (_c = control.value) !== null && _c !== void 0 ? _c : '';
36
- break;
37
- }
38
- formData.append(name, valueToAppend);
39
- }
40
- }
@@ -1,103 +0,0 @@
1
- import StyleObserver from "style-observer";
2
- // Track observers per theme context element
3
- const contextObservers = new Map();
4
- // Track which elements already have inverse theme setup to avoid duplicates
5
- const inverseThemeTargets = new WeakMap();
6
- // Special design token defined for this purpose. Defined as either 'light' or 'dark'.
7
- const THEME_STATE_PROPERTY = '--r-internal-theme-state';
8
- /**
9
- * Sets up an inverse theme relationship between a target element and its theme context element.
10
- * The target will automatically update its theme to be the inverse of its parent context.
11
- * @param targetElement Element that should have inverse theme
12
- * @param themeContextElement Element that contains the theme context
13
- */
14
- export const setupInverseThemeAwareness = (targetElement, themeContextElement) => {
15
- if (!themeContextElement || !targetElement)
16
- return;
17
- // Check if this target is already set up with this context
18
- const existingTargets = inverseThemeTargets.get(themeContextElement);
19
- if (existingTargets === null || existingTargets === void 0 ? void 0 : existingTargets.has(targetElement))
20
- return;
21
- // Store this target as set up
22
- if (!existingTargets) {
23
- inverseThemeTargets.set(themeContextElement, new Set([targetElement]));
24
- }
25
- else {
26
- existingTargets.add(targetElement);
27
- }
28
- // Find or create observer for this context
29
- let observer = contextObservers.get(themeContextElement);
30
- if (!observer) {
31
- const observerCallback = (records) => {
32
- const record = records[0];
33
- if (!record)
34
- return;
35
- const theme = resolveTheme(record.value);
36
- const inverseTheme = theme === 'dark' ? 'light' : 'dark';
37
- // Update all targets for this context
38
- const targets = inverseThemeTargets.get(themeContextElement);
39
- targets === null || targets === void 0 ? void 0 : targets.forEach(target => {
40
- target.setAttribute('data-theme', inverseTheme);
41
- });
42
- };
43
- observer = new StyleObserver(observerCallback, {
44
- target: themeContextElement,
45
- properties: THEME_STATE_PROPERTY
46
- });
47
- contextObservers.set(themeContextElement, observer);
48
- // Immediate check for initial value
49
- const computedStyle = window.getComputedStyle(themeContextElement);
50
- const initialValue = computedStyle.getPropertyValue(THEME_STATE_PROPERTY);
51
- observerCallback([{
52
- target: themeContextElement,
53
- property: THEME_STATE_PROPERTY,
54
- value: initialValue,
55
- oldValue: null
56
- }]);
57
- }
58
- else {
59
- // Observer exists already, just need to set initial theme on the new target
60
- const computedStyle = window.getComputedStyle(themeContextElement);
61
- const initialValue = computedStyle.getPropertyValue(THEME_STATE_PROPERTY);
62
- const theme = resolveTheme(initialValue);
63
- const inverseTheme = theme === 'dark' ? 'light' : 'dark';
64
- targetElement.setAttribute('data-theme', inverseTheme);
65
- }
66
- };
67
- /**
68
- * Removes the inverse theme relationship between a target element and its theme context element.
69
- * This function cleans up any observers and references created by setupInverseThemeAwareness.
70
- * @param targetElement Element that has inverse theme
71
- * @param themeContextElement Element that contains the theme context
72
- */
73
- export const stopInverseThemeAwareness = (targetElement, themeContextElement) => {
74
- if (!themeContextElement || !targetElement)
75
- return;
76
- // Get the set of targets for this context
77
- const targets = inverseThemeTargets.get(themeContextElement);
78
- if (!targets || !targets.has(targetElement))
79
- return;
80
- // Remove the target from the set
81
- targets.delete(targetElement);
82
- // If no more targets for this context, clean up the observer
83
- if (targets.size === 0) {
84
- inverseThemeTargets.delete(themeContextElement);
85
- const observer = contextObservers.get(themeContextElement);
86
- if (observer) {
87
- // Remove the observer (StyleObserver has no disconnect method, it auto-cleans)
88
- contextObservers.delete(themeContextElement);
89
- }
90
- }
91
- };
92
- /**
93
- * Resolves theme based on CSS property value
94
- * @param value - The value of the CSS property (should be 'light' or 'dark')
95
- * @returns The resolved theme
96
- */
97
- const resolveTheme = (value) => {
98
- const trimmedValue = value === null || value === void 0 ? void 0 : value.trim();
99
- if (trimmedValue === 'dark') {
100
- return 'dark';
101
- }
102
- return 'light';
103
- };
@@ -1,3 +0,0 @@
1
- const globalScripts = () => {};
2
-
3
- export { globalScripts as g };