@riverty/web-components 6.3.0 → 6.3.1

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 +6 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/focusable-Oll_rmtP.js +28 -0
  4. package/dist/cjs/formData-B2DZyLxP.js +44 -0
  5. package/dist/cjs/index-BnETQtSf.js +1834 -0
  6. package/dist/cjs/index.cjs.js +37 -0
  7. package/dist/cjs/loader.cjs.js +13 -0
  8. package/dist/cjs/r-accordion-panel.cjs.entry.js +24 -0
  9. package/dist/cjs/r-accordion-section.cjs.entry.js +125 -0
  10. package/dist/cjs/r-accordion-trigger.cjs.entry.js +93 -0
  11. package/dist/cjs/r-accordion.cjs.entry.js +20 -0
  12. package/dist/cjs/r-alert.cjs.entry.js +146 -0
  13. package/dist/cjs/r-badge.cjs.entry.js +41 -0
  14. package/dist/cjs/r-button.cjs.entry.js +149 -0
  15. package/dist/cjs/r-checkbox-group.cjs.entry.js +237 -0
  16. package/dist/cjs/r-checkbox.cjs.entry.js +274 -0
  17. package/dist/cjs/r-design-system-devtools.cjs.entry.js +31 -0
  18. package/dist/cjs/r-dialog.cjs.entry.js +107 -0
  19. package/dist/cjs/r-hint_2.cjs.entry.js +50 -0
  20. package/dist/cjs/r-icon-button_2.cjs.entry.js +492 -0
  21. package/dist/cjs/r-icon.cjs.entry.js +284 -0
  22. package/dist/cjs/r-illustration.cjs.entry.js +396 -0
  23. package/dist/cjs/r-input-code.cjs.entry.js +437 -0
  24. package/dist/cjs/r-input-date.cjs.entry.js +524 -0
  25. package/dist/cjs/r-input-password.cjs.entry.js +270 -0
  26. package/dist/cjs/r-input-phone-number.cjs.entry.js +2525 -0
  27. package/dist/cjs/r-input.cjs.entry.js +618 -0
  28. package/dist/cjs/r-list-item.cjs.entry.js +109 -0
  29. package/dist/cjs/r-pagination.cjs.entry.js +320 -0
  30. package/dist/cjs/r-panel.cjs.entry.js +184 -0
  31. package/dist/cjs/r-popover-action.cjs.entry.js +80 -0
  32. package/dist/cjs/r-popover-content.cjs.entry.js +62 -0
  33. package/dist/cjs/r-popover-headline.cjs.entry.js +28 -0
  34. package/dist/cjs/r-popover-trigger.cjs.entry.js +70 -0
  35. package/dist/cjs/r-popover.cjs.entry.js +347 -0
  36. package/dist/cjs/r-progress-bar.cjs.entry.js +25 -0
  37. package/dist/cjs/r-radio-button-description.cjs.entry.js +18 -0
  38. package/dist/cjs/r-radio-button-leading.cjs.entry.js +18 -0
  39. package/dist/cjs/r-radio-button-title.cjs.entry.js +18 -0
  40. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +18 -0
  41. package/dist/cjs/r-radio-button.cjs.entry.js +139 -0
  42. package/dist/cjs/r-radio-group.cjs.entry.js +428 -0
  43. package/dist/cjs/r-select-option.cjs.entry.js +130 -0
  44. package/dist/cjs/r-select.cjs.entry.js +1107 -0
  45. package/dist/cjs/r-skip-link.cjs.entry.js +19 -0
  46. package/dist/cjs/r-stepper-item.cjs.entry.js +42 -0
  47. package/dist/cjs/r-stepper.cjs.entry.js +99 -0
  48. package/dist/cjs/r-tab-panel.cjs.entry.js +26 -0
  49. package/dist/cjs/r-tab.cjs.entry.js +62 -0
  50. package/dist/cjs/r-tabs-list.cjs.entry.js +175 -0
  51. package/dist/cjs/r-tabs.cjs.entry.js +277 -0
  52. package/dist/cjs/r-textarea.cjs.entry.js +270 -0
  53. package/dist/cjs/r-toast-group.cjs.entry.js +46 -0
  54. package/dist/cjs/r-toast.cjs.entry.js +314 -0
  55. package/dist/cjs/style-observer-D9zSP9wP.js +1118 -0
  56. package/dist/cjs/theming-NqxjhVJS.js +109 -0
  57. package/dist/cjs/web-components.cjs.js +25 -0
  58. package/dist/collection/collection-manifest.json +60 -0
  59. package/dist/collection/components/accordion/accordion.css +24 -0
  60. package/dist/collection/components/accordion/accordion.js +90 -0
  61. package/dist/collection/components/accordion/exports.js +1 -0
  62. package/dist/collection/components/accordion-panel/accordion-panel.css +50 -0
  63. package/dist/collection/components/accordion-panel/accordion-panel.js +86 -0
  64. package/dist/collection/components/accordion-section/accordion-section.css +27 -0
  65. package/dist/collection/components/accordion-section/accordion-section.js +235 -0
  66. package/dist/collection/components/accordion-trigger/accordion-trigger.css +93 -0
  67. package/dist/collection/components/accordion-trigger/accordion-trigger.js +220 -0
  68. package/dist/collection/components/alert/alert.css +120 -0
  69. package/dist/collection/components/alert/alert.js +526 -0
  70. package/dist/collection/components/alert/exports.js +2 -0
  71. package/dist/collection/components/badge/badge.css +62 -0
  72. package/dist/collection/components/badge/badge.js +124 -0
  73. package/dist/collection/components/badge/exports.js +1 -0
  74. package/dist/collection/components/button/button.css +180 -0
  75. package/dist/collection/components/button/button.js +510 -0
  76. package/dist/collection/components/button/exports.js +5 -0
  77. package/dist/collection/components/checkbox/checkbox.css +116 -0
  78. package/dist/collection/components/checkbox/checkbox.js +803 -0
  79. package/dist/collection/components/checkbox-group/checkbox-group.css +48 -0
  80. package/dist/collection/components/checkbox-group/checkbox-group.js +744 -0
  81. package/dist/collection/components/design-system-devtools/design-system-devtools.js +59 -0
  82. package/dist/collection/components/dialog/dialog.css +125 -0
  83. package/dist/collection/components/dialog/dialog.js +345 -0
  84. package/dist/collection/components/dialog/exports.js +9 -0
  85. package/dist/collection/components/hint/exports.js +1 -0
  86. package/dist/collection/components/hint/hint.css +63 -0
  87. package/dist/collection/components/hint/hint.js +114 -0
  88. package/dist/collection/components/icon/all-kit.js +2 -0
  89. package/dist/collection/components/icon/data.js +90 -0
  90. package/dist/collection/components/icon/exports.js +7 -0
  91. package/dist/collection/components/icon/icon.css +105 -0
  92. package/dist/collection/components/icon/icon.js +379 -0
  93. package/dist/collection/components/icon/riverty-kit.js +2 -0
  94. package/dist/collection/components/icon-button/icon-button.css +105 -0
  95. package/dist/collection/components/icon-button/icon-button.js +343 -0
  96. package/dist/collection/components/illustration/data.js +112 -0
  97. package/dist/collection/components/illustration/exports.js +3 -0
  98. package/dist/collection/components/illustration/illustration.css +52 -0
  99. package/dist/collection/components/illustration/illustration.js +540 -0
  100. package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
  101. package/dist/collection/components/input/exports.js +62 -0
  102. package/dist/collection/components/input/input.css +186 -0
  103. package/dist/collection/components/input/input.js +1861 -0
  104. package/dist/collection/components/input-code/exports.js +2 -0
  105. package/dist/collection/components/input-code/input-code.css +127 -0
  106. package/dist/collection/components/input-code/input-code.js +1165 -0
  107. package/dist/collection/components/input-date/exports.js +1 -0
  108. package/dist/collection/components/input-date/input-date.css +148 -0
  109. package/dist/collection/components/input-date/input-date.js +1254 -0
  110. package/dist/collection/components/input-password/exports.js +1 -0
  111. package/dist/collection/components/input-password/input-password.css +25 -0
  112. package/dist/collection/components/input-password/input-password.js +1077 -0
  113. package/dist/collection/components/input-phone-number/input-phone-number.css +61 -0
  114. package/dist/collection/components/input-phone-number/input-phone-number.js +893 -0
  115. package/dist/collection/components/label/label.css +38 -0
  116. package/dist/collection/components/label/label.js +47 -0
  117. package/dist/collection/components/list-item/list-item/exports.js +2 -0
  118. package/dist/collection/components/list-item/list-item/list-item.css +199 -0
  119. package/dist/collection/components/list-item/list-item/list-item.js +467 -0
  120. package/dist/collection/components/pagination/exports.js +3 -0
  121. package/dist/collection/components/pagination/pagination.css +118 -0
  122. package/dist/collection/components/pagination/pagination.js +814 -0
  123. package/dist/collection/components/panel/exports.js +1 -0
  124. package/dist/collection/components/panel/panel.css +192 -0
  125. package/dist/collection/components/panel/panel.js +473 -0
  126. package/dist/collection/components/popover/exports.js +3 -0
  127. package/dist/collection/components/popover/popover.css +251 -0
  128. package/dist/collection/components/popover/popover.js +741 -0
  129. package/dist/collection/components/popover-action/popover-action.css +21 -0
  130. package/dist/collection/components/popover-action/popover-action.js +150 -0
  131. package/dist/collection/components/popover-content/popover-content.css +9 -0
  132. package/dist/collection/components/popover-content/popover-content.js +130 -0
  133. package/dist/collection/components/popover-headline/popover-headline.css +7 -0
  134. package/dist/collection/components/popover-headline/popover-headline.js +28 -0
  135. package/dist/collection/components/popover-trigger/exports.js +1 -0
  136. package/dist/collection/components/popover-trigger/popover-trigger.css +4 -0
  137. package/dist/collection/components/popover-trigger/popover-trigger.js +163 -0
  138. package/dist/collection/components/progress-bar/progress-bar.css +41 -0
  139. package/dist/collection/components/progress-bar/progress-bar.js +71 -0
  140. package/dist/collection/components/radio-button/radio-button.css +126 -0
  141. package/dist/collection/components/radio-button/radio-button.js +559 -0
  142. package/dist/collection/components/radio-button-description/radio-button-description.css +5 -0
  143. package/dist/collection/components/radio-button-description/radio-button-description.js +22 -0
  144. package/dist/collection/components/radio-button-leading/radio-button-leading.css +3 -0
  145. package/dist/collection/components/radio-button-leading/radio-button-leading.js +22 -0
  146. package/dist/collection/components/radio-button-title/radio-button-title.css +8 -0
  147. package/dist/collection/components/radio-button-title/radio-button-title.js +22 -0
  148. package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +6 -0
  149. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +22 -0
  150. package/dist/collection/components/radio-group/exports.js +1 -0
  151. package/dist/collection/components/radio-group/radio-group.css +65 -0
  152. package/dist/collection/components/radio-group/radio-group.js +1023 -0
  153. package/dist/collection/components/select/exports.js +1 -0
  154. package/dist/collection/components/select/select.css +247 -0
  155. package/dist/collection/components/select/select.js +2038 -0
  156. package/dist/collection/components/select-option/select-option.css +93 -0
  157. package/dist/collection/components/select-option/select-option.js +459 -0
  158. package/dist/collection/components/skip-link/exports.js +1 -0
  159. package/dist/collection/components/skip-link/skip-link.css +37 -0
  160. package/dist/collection/components/skip-link/skip-link.js +52 -0
  161. package/dist/collection/components/stepper/stepper.css +25 -0
  162. package/dist/collection/components/stepper/stepper.js +216 -0
  163. package/dist/collection/components/stepper-item/stepper-item.css +62 -0
  164. package/dist/collection/components/stepper-item/stepper-item.js +171 -0
  165. package/dist/collection/components/tab/tab.css +81 -0
  166. package/dist/collection/components/tab/tab.js +169 -0
  167. package/dist/collection/components/tab-panel/tab-panel.css +19 -0
  168. package/dist/collection/components/tab-panel/tab-panel.js +72 -0
  169. package/dist/collection/components/tabs/tabs.css +4 -0
  170. package/dist/collection/components/tabs/tabs.js +345 -0
  171. package/dist/collection/components/tabs-list/exports.js +2 -0
  172. package/dist/collection/components/tabs-list/tabs-list.css +58 -0
  173. package/dist/collection/components/tabs-list/tabs-list.js +294 -0
  174. package/dist/collection/components/textarea/exports.js +8 -0
  175. package/dist/collection/components/textarea/textarea.css +148 -0
  176. package/dist/collection/components/textarea/textarea.js +1055 -0
  177. package/dist/collection/components/toast/exports.js +3 -0
  178. package/dist/collection/components/toast/toast.css +179 -0
  179. package/dist/collection/components/toast/toast.js +820 -0
  180. package/dist/collection/components/toast-group/exports.js +1 -0
  181. package/dist/collection/components/toast-group/toast-group.css +37 -0
  182. package/dist/collection/components/toast-group/toast-group.js +49 -0
  183. package/dist/collection/components/tooltip/exports.js +3 -0
  184. package/dist/collection/components/tooltip/tooltip.css +77 -0
  185. package/dist/collection/components/tooltip/tooltip.js +525 -0
  186. package/dist/collection/index.js +2 -0
  187. package/dist/collection/utils/focusable.js +24 -0
  188. package/dist/collection/utils/formData.js +40 -0
  189. package/dist/collection/utils/theming.js +103 -0
  190. package/dist/collection/utils/version-checker.js +33 -0
  191. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  192. package/dist/esm/focusable-ky1yonnS.js +26 -0
  193. package/dist/esm/formData-DvLT8-y3.js +42 -0
  194. package/dist/esm/index-CTxpqopm.js +1806 -0
  195. package/dist/esm/index.js +35 -0
  196. package/dist/esm/loader.js +11 -0
  197. package/dist/esm/r-accordion-panel.entry.js +22 -0
  198. package/dist/esm/r-accordion-section.entry.js +123 -0
  199. package/dist/esm/r-accordion-trigger.entry.js +91 -0
  200. package/dist/esm/r-accordion.entry.js +18 -0
  201. package/dist/esm/r-alert.entry.js +144 -0
  202. package/dist/esm/r-badge.entry.js +39 -0
  203. package/dist/esm/r-button.entry.js +147 -0
  204. package/dist/esm/r-checkbox-group.entry.js +235 -0
  205. package/dist/esm/r-checkbox.entry.js +272 -0
  206. package/dist/esm/r-design-system-devtools.entry.js +29 -0
  207. package/dist/esm/r-dialog.entry.js +105 -0
  208. package/dist/esm/r-hint_2.entry.js +47 -0
  209. package/dist/esm/r-icon-button_2.entry.js +489 -0
  210. package/dist/esm/r-icon.entry.js +282 -0
  211. package/dist/esm/r-illustration.entry.js +394 -0
  212. package/dist/esm/r-input-code.entry.js +435 -0
  213. package/dist/esm/r-input-date.entry.js +522 -0
  214. package/dist/esm/r-input-password.entry.js +268 -0
  215. package/dist/esm/r-input-phone-number.entry.js +2523 -0
  216. package/dist/esm/r-input.entry.js +616 -0
  217. package/dist/esm/r-list-item.entry.js +107 -0
  218. package/dist/esm/r-pagination.entry.js +318 -0
  219. package/dist/esm/r-panel.entry.js +182 -0
  220. package/dist/esm/r-popover-action.entry.js +78 -0
  221. package/dist/esm/r-popover-content.entry.js +60 -0
  222. package/dist/esm/r-popover-headline.entry.js +26 -0
  223. package/dist/esm/r-popover-trigger.entry.js +68 -0
  224. package/dist/esm/r-popover.entry.js +345 -0
  225. package/dist/esm/r-progress-bar.entry.js +23 -0
  226. package/dist/esm/r-radio-button-description.entry.js +16 -0
  227. package/dist/esm/r-radio-button-leading.entry.js +16 -0
  228. package/dist/esm/r-radio-button-title.entry.js +16 -0
  229. package/dist/esm/r-radio-button-trailing.entry.js +16 -0
  230. package/dist/esm/r-radio-button.entry.js +137 -0
  231. package/dist/esm/r-radio-group.entry.js +426 -0
  232. package/dist/esm/r-select-option.entry.js +128 -0
  233. package/dist/esm/r-select.entry.js +1105 -0
  234. package/dist/esm/r-skip-link.entry.js +17 -0
  235. package/dist/esm/r-stepper-item.entry.js +40 -0
  236. package/dist/esm/r-stepper.entry.js +97 -0
  237. package/dist/esm/r-tab-panel.entry.js +24 -0
  238. package/dist/esm/r-tab.entry.js +60 -0
  239. package/dist/esm/r-tabs-list.entry.js +173 -0
  240. package/dist/esm/r-tabs.entry.js +275 -0
  241. package/dist/esm/r-textarea.entry.js +268 -0
  242. package/dist/esm/r-toast-group.entry.js +44 -0
  243. package/dist/esm/r-toast.entry.js +312 -0
  244. package/dist/esm/style-observer-4Uv3PpKT.js +1116 -0
  245. package/dist/esm/theming-DD2IrjpG.js +106 -0
  246. package/dist/esm/web-components.js +21 -0
  247. package/dist/index.cjs.js +1 -0
  248. package/dist/index.js +1 -0
  249. package/dist/types/components/accordion/accordion.d.ts +27 -0
  250. package/dist/types/components/accordion/exports.d.ts +2 -0
  251. package/dist/types/components/accordion-panel/accordion-panel.d.ts +10 -0
  252. package/dist/types/components/accordion-section/accordion-section.d.ts +36 -0
  253. package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +33 -0
  254. package/dist/types/components/alert/alert.d.ts +67 -0
  255. package/dist/types/components/alert/exports.d.ts +4 -0
  256. package/dist/types/components/badge/badge.d.ts +26 -0
  257. package/dist/types/components/badge/exports.d.ts +2 -0
  258. package/dist/types/components/button/button.d.ts +89 -0
  259. package/dist/types/components/button/exports.d.ts +10 -0
  260. package/dist/types/components/checkbox/checkbox.d.ts +138 -0
  261. package/dist/types/components/checkbox-group/checkbox-group.d.ts +124 -0
  262. package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +15 -0
  263. package/dist/types/components/dialog/dialog.d.ts +69 -0
  264. package/dist/types/components/dialog/exports.d.ts +10 -0
  265. package/dist/types/components/hint/exports.d.ts +2 -0
  266. package/dist/types/components/hint/hint.d.ts +20 -0
  267. package/dist/types/components/icon/all-kit.d.ts +2890 -0
  268. package/dist/types/components/icon/data.d.ts +145 -0
  269. package/dist/types/components/icon/exports.d.ts +152 -0
  270. package/dist/types/components/icon/icon.d.ts +37 -0
  271. package/dist/types/components/icon/riverty-kit.d.ts +139 -0
  272. package/dist/types/components/icon-button/icon-button.d.ts +69 -0
  273. package/dist/types/components/illustration/data.d.ts +52 -0
  274. package/dist/types/components/illustration/exports.d.ts +23 -0
  275. package/dist/types/components/illustration/illustration.d.ts +51 -0
  276. package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
  277. package/dist/types/components/input/exports.d.ts +55 -0
  278. package/dist/types/components/input/input.d.ts +365 -0
  279. package/dist/types/components/input-code/exports.d.ts +4 -0
  280. package/dist/types/components/input-code/input-code.d.ts +177 -0
  281. package/dist/types/components/input-date/exports.d.ts +5 -0
  282. package/dist/types/components/input-date/input-date.d.ts +174 -0
  283. package/dist/types/components/input-password/exports.d.ts +1 -0
  284. package/dist/types/components/input-password/input-password.d.ts +186 -0
  285. package/dist/types/components/input-phone-number/input-phone-number.d.ts +130 -0
  286. package/dist/types/components/label/label.d.ts +9 -0
  287. package/dist/types/components/list-item/list-item/exports.d.ts +4 -0
  288. package/dist/types/components/list-item/list-item/list-item.d.ts +61 -0
  289. package/dist/types/components/pagination/exports.d.ts +6 -0
  290. package/dist/types/components/pagination/pagination.d.ts +140 -0
  291. package/dist/types/components/panel/exports.d.ts +2 -0
  292. package/dist/types/components/panel/panel.d.ts +56 -0
  293. package/dist/types/components/popover/exports.d.ts +6 -0
  294. package/dist/types/components/popover/popover.d.ts +131 -0
  295. package/dist/types/components/popover-action/popover-action.d.ts +24 -0
  296. package/dist/types/components/popover-content/popover-content.d.ts +22 -0
  297. package/dist/types/components/popover-headline/popover-headline.d.ts +6 -0
  298. package/dist/types/components/popover-trigger/exports.d.ts +2 -0
  299. package/dist/types/components/popover-trigger/popover-trigger.d.ts +31 -0
  300. package/dist/types/components/progress-bar/progress-bar.d.ts +10 -0
  301. package/dist/types/components/radio-button/radio-button.d.ts +92 -0
  302. package/dist/types/components/radio-button-description/radio-button-description.d.ts +8 -0
  303. package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +8 -0
  304. package/dist/types/components/radio-button-title/radio-button-title.d.ts +8 -0
  305. package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +8 -0
  306. package/dist/types/components/radio-group/exports.d.ts +2 -0
  307. package/dist/types/components/radio-group/radio-group.d.ts +179 -0
  308. package/dist/types/components/select/exports.d.ts +2 -0
  309. package/dist/types/components/select/select.d.ts +319 -0
  310. package/dist/types/components/select-option/select-option.d.ts +113 -0
  311. package/dist/types/components/skip-link/exports.d.ts +2 -0
  312. package/dist/types/components/skip-link/skip-link.d.ts +6 -0
  313. package/dist/types/components/stepper/stepper.d.ts +22 -0
  314. package/dist/types/components/stepper-item/stepper-item.d.ts +23 -0
  315. package/dist/types/components/tab/tab.d.ts +23 -0
  316. package/dist/types/components/tab-panel/tab-panel.d.ts +7 -0
  317. package/dist/types/components/tabs/tabs.d.ts +49 -0
  318. package/dist/types/components/tabs-list/exports.d.ts +4 -0
  319. package/dist/types/components/tabs-list/tabs-list.d.ts +41 -0
  320. package/dist/types/components/textarea/exports.d.ts +2 -0
  321. package/dist/types/components/textarea/textarea.d.ts +158 -0
  322. package/dist/types/components/toast/exports.d.ts +6 -0
  323. package/dist/types/components/toast/toast.d.ts +146 -0
  324. package/dist/types/components/toast-group/exports.d.ts +2 -0
  325. package/dist/types/components/toast-group/toast-group.d.ts +9 -0
  326. package/dist/types/components/tooltip/exports.d.ts +6 -0
  327. package/dist/types/components/tooltip/tooltip.d.ts +132 -0
  328. package/dist/types/components.d.ts +6347 -0
  329. package/dist/types/index.d.ts +1 -0
  330. package/dist/types/stencil-public-runtime.d.ts +1732 -0
  331. package/dist/types/types/jsx-shim.d.ts +13 -0
  332. package/dist/types/types/style-observer.d.ts +20 -0
  333. package/dist/types/utils/focusable.d.ts +1 -0
  334. package/dist/types/utils/formData.d.ts +1 -0
  335. package/dist/types/utils/theming.d.ts +15 -0
  336. package/dist/types/utils/version-checker.d.ts +1 -0
  337. package/dist/web-components/index.esm.js +1 -0
  338. package/dist/web-components/p-01aefcf0.entry.js +1 -0
  339. package/dist/web-components/p-05cb55db.entry.js +1 -0
  340. package/dist/web-components/p-0a34d33b.entry.js +1 -0
  341. package/dist/web-components/p-11b22309.entry.js +1 -0
  342. package/dist/web-components/p-2d878934.entry.js +1 -0
  343. package/dist/web-components/p-325dbedf.entry.js +1 -0
  344. package/dist/web-components/p-34b9457b.entry.js +1 -0
  345. package/dist/web-components/p-36abd05a.entry.js +1 -0
  346. package/dist/web-components/p-386d1ef9.entry.js +1 -0
  347. package/dist/web-components/p-3d67b77b.entry.js +1 -0
  348. package/dist/web-components/p-4Uv3PpKT.js +1 -0
  349. package/dist/web-components/p-4b12fbc0.entry.js +1 -0
  350. package/dist/web-components/p-52f7b505.entry.js +1 -0
  351. package/dist/web-components/p-55600d47.entry.js +1 -0
  352. package/dist/web-components/p-57ebc474.entry.js +1 -0
  353. package/dist/web-components/p-57edf7f4.entry.js +1 -0
  354. package/dist/web-components/p-69a24fe2.entry.js +1 -0
  355. package/dist/web-components/p-6d92648c.entry.js +1 -0
  356. package/dist/web-components/p-75052597.entry.js +1 -0
  357. package/dist/web-components/p-7b2c5b63.entry.js +1 -0
  358. package/dist/web-components/p-7bf463ff.entry.js +1 -0
  359. package/dist/web-components/p-838e43d4.entry.js +1 -0
  360. package/dist/web-components/p-8c16d038.entry.js +1 -0
  361. package/dist/web-components/p-8f8313de.entry.js +1 -0
  362. package/dist/web-components/p-9026d5a2.entry.js +1 -0
  363. package/dist/web-components/p-95396b5c.entry.js +1 -0
  364. package/dist/web-components/p-9c31c7c4.entry.js +1 -0
  365. package/dist/web-components/p-9c415b9c.entry.js +1 -0
  366. package/dist/web-components/p-9f583ed1.entry.js +1 -0
  367. package/dist/web-components/p-B9rsR6cQ.js +1 -0
  368. package/dist/web-components/p-CTxpqopm.js +2 -0
  369. package/dist/web-components/p-DQuL1Twl.js +1 -0
  370. package/dist/web-components/p-DvLT8-y3.js +1 -0
  371. package/dist/web-components/p-b303b2cc.entry.js +1 -0
  372. package/dist/web-components/p-b8df041d.entry.js +1 -0
  373. package/dist/web-components/p-bc30844f.entry.js +1 -0
  374. package/dist/web-components/p-c4a77a65.entry.js +1 -0
  375. package/dist/web-components/p-c549addf.entry.js +1 -0
  376. package/dist/web-components/p-c65df19f.entry.js +1 -0
  377. package/dist/web-components/p-c80a5541.entry.js +1 -0
  378. package/dist/web-components/p-c96ee61a.entry.js +1 -0
  379. package/dist/web-components/p-cf3f044d.entry.js +1 -0
  380. package/dist/web-components/p-d1412932.entry.js +1 -0
  381. package/dist/web-components/p-d9778cfa.entry.js +1 -0
  382. package/dist/web-components/p-dbe4ccb8.entry.js +1 -0
  383. package/dist/web-components/p-ded50850.entry.js +1 -0
  384. package/dist/web-components/p-e5be895b.entry.js +1 -0
  385. package/dist/web-components/p-e6b34c1e.entry.js +1 -0
  386. package/dist/web-components/p-ec3c4800.entry.js +1 -0
  387. package/dist/web-components/p-f670fd87.entry.js +1 -0
  388. package/dist/web-components/p-f867e4c3.entry.js +1 -0
  389. package/dist/web-components/p-ff6b1b8f.entry.js +1 -0
  390. package/dist/web-components/p-ky1yonnS.js +1 -0
  391. package/dist/web-components/web-components.esm.js +1 -0
  392. package/loader/cdn.js +1 -0
  393. package/loader/index.cjs.js +1 -0
  394. package/loader/index.d.ts +24 -0
  395. package/loader/index.es2017.js +1 -0
  396. package/loader/index.js +2 -0
  397. package/package.json +1 -1
@@ -0,0 +1,489 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
2
+
3
+ const iconButtonCss = ":host{display:inline-flex;vertical-align:top;--r-icon-button--color:inherit}:host(:hover:not([disabled]:not([disabled=false])):not(:active)){--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false]))){--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within:not(:active):not([disabled]:not([disabled=false]))){box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}:host([disabled]:not([disabled=false])){opacity:0.4;--r-icon-button--cursor:not-allowed;--r-icon-button--box-shadow:none;--r-icon-button--background-color:transparent}:host([variant=contained]){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--box-shadow:none}:host([variant=contained]:hover:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=contained]:active:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=contained][disabled]:not([disabled=false])){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828)}:host([size=s]){--r-icon-button--height:1.5rem;--r-icon-button--width:1.5rem}:host([size=m]){--r-icon-button--height:2.25rem;--r-icon-button--width:2.25rem}:host([size=l]){--r-icon-button--height:2.75rem;--r-icon-button--width:2.75rem}.r-icon-button{display:var(--r-icon-button--display, inline-flex);align-items:var(--r-icon-button--align-items, center);justify-content:var(--r-icon-button--justify-content, center);outline:var(--r-icon-button--outline, none);cursor:var(--r-icon-button--cursor, pointer);pointer-events:var(--r-icon-button--pointer-events, initial);padding:var(--r-icon-button--padding, 0);border:var(--r-icon-button--border, none);color:var(--r-icon-button--color, inherit);background-color:var(--r-icon-button--background-color, transparent);box-sizing:var(--r-icon-button--box-sizing, border-box);border-width:var(--r-icon-button--border-width, 1px);border-style:var(--r-icon-button--border-style, solid);border-color:var(--r-icon-button--border-color, transparent);border-radius:var(--r-icon-button--border-radius, 50%);z-index:var(--r-icon-button--z-index, initial);width:var(--r-icon-button--width, 2.25rem);height:var(--r-icon-button--height, 2.25rem)}.r-icon-button--target-area{position:var(--r-icon-button--target-area--position, absolute);background:var(--r-icon-button--target-area--background, rgba(0, 0, 0, 0));width:var(--r-icon-button--target-area--width, 2.75rem);height:var(--r-icon-button--target-area--height, 2.75rem);z-index:var(--r-icon-button--target-area--z-index, 1)}.r-icon-button--icon{display:flex;align-items:center;justify-content:center}.visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";
4
+
5
+ const IconButton = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.rClick = createEvent(this, "rClick");
9
+ /**
10
+ * Defines the size of the icon used within the button.
11
+ */
12
+ this.size = 'm';
13
+ /**
14
+ * @deprecated Use the `<r-tooltip>` component as a wrapper instead.
15
+ * Sets position for the tooltip.
16
+ * - `top`: Tooltip appears above the button.
17
+ * - `bottom`: Tooltip appears below the button.
18
+ * - `left`: Tooltip appears to the left of the button.
19
+ * - `right`: Tooltip appears to the right of the button.
20
+ */
21
+ this.tooltipPosition = 'top';
22
+ /**
23
+ * Defines the visual style of the button.
24
+ * - `standard`: Default button style.
25
+ * - `contained`: Button with a contained background.
26
+ */
27
+ this.variant = 'standard';
28
+ this._handleClick = (event) => {
29
+ if (this.disabled) {
30
+ event.preventDefault();
31
+ return;
32
+ }
33
+ this.rClick.emit();
34
+ };
35
+ this.onFocus = () => {
36
+ this.setFocus();
37
+ };
38
+ this.onBlur = () => {
39
+ this.setBlur();
40
+ };
41
+ }
42
+ /** Simulate a button click */
43
+ async triggerClick() {
44
+ var _a;
45
+ (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.click();
46
+ }
47
+ /** Set focus on the button */
48
+ async setFocus() {
49
+ var _a;
50
+ (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
51
+ }
52
+ /** Remove focus from the button */
53
+ async setBlur() {
54
+ var _a;
55
+ (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
56
+ }
57
+ render() {
58
+ const { name, size, disabled, tooltipText, tooltipPosition } = this;
59
+ const buttonAttrs = {
60
+ disabled,
61
+ };
62
+ const iconAttrs = {
63
+ name,
64
+ size
65
+ };
66
+ const buttonTemplate = () => (h("button", Object.assign({ key: 'df699957ba93858e755bfdf29de83a3ab9718fe3', type: "button", tabindex: !this.disabled && this.rTabindex || null, class: "r-icon-button", "aria-label": this.host.getAttribute('aria-label') || null }, buttonAttrs, { onClick: this._handleClick, onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.nativeElement = el) }), name ?
67
+ h("r-icon", Object.assign({}, iconAttrs))
68
+ :
69
+ h("r-icon", { size: size, class: "r-icon-button--icon" }, h("slot", null)), h("span", { key: '86e9640751a2e75f24ba6eb1d75850251f629579', class: "r-icon-button--label visually-hidden" }, this.label), h("span", { key: '509e3f6870a4da1e788082a8af5a50c93e8360b5', class: "r-icon-button--target-area" })));
70
+ return (h(Host, { key: 'e829d0c5038ebe4893b998b832bbff3c62335327' }, !disabled && tooltipText ?
71
+ h("r-tooltip", { text: tooltipText, position: tooltipPosition }, buttonTemplate())
72
+ :
73
+ buttonTemplate()));
74
+ }
75
+ get host() { return getElement(this); }
76
+ };
77
+ IconButton.style = iconButtonCss;
78
+
79
+ const tooltipCss = ":host{display:inline-block}:host slot{display:contents}:host([data-position=bottom]){--r-tooltip--arrow--transform:rotate(0)}:host([data-position=right]){--r-tooltip--arrow--transform:rotate(270deg)}:host([data-position=left]){--r-tooltip--arrow--transform:rotate(90deg)}.r-tooltip{position:var(--r-tooltip--position, relative)}.r-tooltip:has(.r-tooltip--content--visible){--r-tooltip--content--display:flex;--r-tooltip--content--z-index:1060;--r-tooltip--arrow--display:flex}.r-tooltip--trigger{color:var(--r-tooltip--trigger--color, inherit);box-shadow:var(--r-tooltip--trigger--box-shadow, none);outline:var(--r-tooltip--trigger--outline, none);outline-offset:var(--r-tooltip--trigger--outline-offset, 0)}.r-tooltip--trigger:focus{--r-tooltip--trigger--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-tooltip--trigger--outline:2px solid var(--r-border-focused);--r-tooltip--trigger--outline-offset:2px}.r-tooltip--content{position:var(--r-tooltip--content--position, fixed);display:var(--r-tooltip--content--display, none);justify-content:var(--r-tooltip--content--justify-content, center);align-items:var(--r-tooltip--content--align-items, center);color:var(--r-tooltip--content--color, var(--r-text-inverse));background-color:var(--r-tooltip--content--background-color, var(--r-background-inverse));font-family:var(--r-tooltip--content--font-family, var(--r-font-family-text));font-weight:var(--r-tooltip--content--font-weight, var(--r-font-weight-regular));font-size:var(--r-tooltip--content--font-size, var(--r-font-size-200));line-height:var(--r-tooltip--content--line-height, var(--r-line-height-s));min-width:var(--r-tooltip--content--min-width, 32px);max-width:var(--r-tooltip--content--max-width, 300px);min-height:var(--r-tooltip--content--min-height, 32px);padding:var(--r-tooltip--content--padding, var(--r-spacing-050) var(--r-spacing-100));width:var(--r-tooltip--content--width, max-content);word-break:var(--r-tooltip--content--word-break, break-word);box-sizing:var(--r-tooltip--content--box-sizing, border-box);z-index:var(--r-tooltip--content--z-index, 0);white-space:var(--r-tooltip--content--white-space, normal)}.r-tooltip--arrow{display:var(--r-tooltip--arrow--display, none);position:var(--r-tooltip--arrow--position, fixed);width:var(--r-tooltip--arrow--width, 12px);height:var(--r-tooltip--arrow--height, 12px);transform:var(--r-tooltip--arrow--transform, rotate(180deg));z-index:var(--r-tooltip--content--z-index)}.r-tooltip--arrow:after{content:var(--r-tooltip--arrow--inner-content, \"\");display:var(--r-tooltip--arrow--inner--display, block);width:var(--r-tooltip--arrow--inner--width, 12px);height:var(--r-tooltip--arrow--inner--height, 6px);background-color:var(--r-tooltip--arrow--inner--background-color, var(--r-background-inverse));clip-path:var(--r-tooltip--arrow--inner--clip-path, polygon(50% 0%, 0% 100%, 100% 100%));border-radius:var(--r-tooltip--arrow--inner--border-radius, 0);align-self:var(--r-tooltip--arrow--inner--align-self, flex-end)}";
80
+
81
+ const OFFSET = 20;
82
+ const Tooltip = class {
83
+ constructor(hostRef) {
84
+ registerInstance(this, hostRef);
85
+ this.rTooltipFocus = createEvent(this, "rTooltipFocus");
86
+ /** Tooltip display text */
87
+ this.text = '';
88
+ /** Specifies tooltip position */
89
+ this.position = 'top';
90
+ this.arrowPositionState = 'left';
91
+ this.isShown = false;
92
+ this.uniqueId = `r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
93
+ this.getOffsetLeft = (arrowPosition) => {
94
+ var _a, _b, _c;
95
+ 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));
96
+ switch (arrowPosition) {
97
+ case 'center':
98
+ return offsetLeft / 2;
99
+ case 'right':
100
+ return offsetLeft;
101
+ default:
102
+ return 0;
103
+ }
104
+ };
105
+ this.alignTooltipPosition = () => {
106
+ var _a, _b;
107
+ const elementRect = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
108
+ const tooltipRect = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
109
+ const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
110
+ const hostHeight = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.height) + this.arrowHeight || 0;
111
+ switch (this.positionState) {
112
+ case 'top':
113
+ this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
114
+ break;
115
+ case 'bottom':
116
+ this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
117
+ break;
118
+ case 'left':
119
+ this.tooltip.style.left = `${elementRect.left - tooltipRect.width - this.arrowWidth}px`;
120
+ this.tooltip.style.top = `${elementRect.top + elementRect.height / 2 - tooltipRect.height / 2}px`;
121
+ break;
122
+ case 'right':
123
+ this.tooltip.style.left = `${elementRect.left + elementRect.width + this.arrowWidth}px`;
124
+ this.tooltip.style.top = `${elementRect.top + elementRect.height / 2 - tooltipRect.height / 2}px`;
125
+ break;
126
+ }
127
+ };
128
+ this.alignArrowPosition = () => {
129
+ var _a, _b, _c, _d;
130
+ const elementRect = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
131
+ const tooltipRect = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
132
+ const hostHeight = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.height) || 0;
133
+ const offsetLeft = Math.abs((elementRect === null || elementRect === void 0 ? void 0 : elementRect.width) - ((_d = (_c = this.arrow) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) === null || _d === void 0 ? void 0 : _d.width)) / 2;
134
+ const arrowCenterY = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.top) + elementRect.height / 2 - this.arrowHeight / 2;
135
+ switch (this.positionState) {
136
+ case 'top':
137
+ this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
138
+ break;
139
+ case 'bottom':
140
+ this.alignPosition(this.arrow, offsetLeft, hostHeight);
141
+ break;
142
+ case 'left':
143
+ this.arrow.style.left = `${tooltipRect.left + tooltipRect.width}px`;
144
+ this.arrow.style.top = `${arrowCenterY}px`;
145
+ break;
146
+ case 'right':
147
+ this.arrow.style.left = `${tooltipRect.left - this.arrowWidth}px`;
148
+ this.arrow.style.top = `${arrowCenterY}px`;
149
+ break;
150
+ }
151
+ };
152
+ this.alignPosition = (element, offsetLeft, offsetTop) => {
153
+ var _a;
154
+ if (!element) {
155
+ return;
156
+ }
157
+ let elementOffset = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
158
+ let left = elementOffset.left + offsetLeft;
159
+ let top = elementOffset.top + offsetTop;
160
+ element.style.left = `${left > 0 ? left : 0}px`;
161
+ element.style.top = `${top}px`;
162
+ };
163
+ /**
164
+ * Listen on hovering tooltip element and update tooltip position if needed
165
+ */
166
+ this.handleHover = () => {
167
+ this.showTooltip();
168
+ this.setCorrectPosition();
169
+ };
170
+ /**
171
+ * Listen on focusing tooltip element and update tooltip position if needed
172
+ */
173
+ this.handleFocus = () => {
174
+ this.showTooltip();
175
+ this.setCorrectPosition();
176
+ this.rTooltipFocus.emit({ element: this.element });
177
+ };
178
+ this.showTooltip = () => {
179
+ var _a;
180
+ this.isShown = true;
181
+ this.tooltip.classList.add('r-tooltip--content--visible');
182
+ this.updateZIndex();
183
+ const interactiveElement = this.getInteractiveElement(this.activeElement);
184
+ interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-description', (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.innerText);
185
+ };
186
+ this.removeTooltip = () => {
187
+ this.isShown = false;
188
+ this.tooltip.style.width = 'max-content';
189
+ this.tooltip.style.zIndex = '';
190
+ this.arrow.style.zIndex = '';
191
+ this.tooltip.classList.remove('r-tooltip--content--visible');
192
+ const interactiveElement = this.getInteractiveElement(this.activeElement);
193
+ interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.removeAttribute('aria-description');
194
+ };
195
+ this.handleScroll = () => {
196
+ if (!this.isShown) {
197
+ return;
198
+ }
199
+ if (!this.isOnScreen) {
200
+ this.removeTooltip();
201
+ return;
202
+ }
203
+ this.setCorrectPosition();
204
+ };
205
+ }
206
+ /**
207
+ * Watch on position value change and update tooltip position if needed
208
+ */
209
+ handleVerticalPosition() {
210
+ this.setCorrectPosition();
211
+ }
212
+ /**
213
+ * Listen on window scroll and update tooltip position if needed
214
+ */
215
+ handleScrolling() {
216
+ this.setCorrectPosition();
217
+ }
218
+ /**
219
+ * Listen on window resizing and update tooltip position if needed
220
+ */
221
+ handleResizing() {
222
+ this.setCorrectPosition();
223
+ }
224
+ /**
225
+ * Listen on window keydown and hide tooltip if needed
226
+ */
227
+ handleKeydown(event) {
228
+ if (this.isShown && event.key === 'Escape') {
229
+ this.removeTooltip();
230
+ }
231
+ }
232
+ /**
233
+ * Parent with non visible overflow
234
+ */
235
+ get overflowedParent() {
236
+ return this.findOverflowParent(this.element.parentElement);
237
+ }
238
+ get arrowWidth() {
239
+ var _a;
240
+ return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0;
241
+ }
242
+ get arrowHeight() {
243
+ var _a;
244
+ return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
245
+ }
246
+ get tooltipContainerWidth() {
247
+ var _a, _b;
248
+ return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) + this.arrowWidth || 0;
249
+ }
250
+ get tooltipContainerHeight() {
251
+ var _a, _b;
252
+ return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) + this.arrowHeight || 0;
253
+ }
254
+ /**
255
+ * Available space at the top
256
+ */
257
+ get top() {
258
+ return this.element.getBoundingClientRect().top;
259
+ }
260
+ /**
261
+ * Available space on the left
262
+ */
263
+ get left() {
264
+ return this.element.getBoundingClientRect().left;
265
+ }
266
+ get isOnScreen() {
267
+ const parent = this.overflowedParent || document.documentElement;
268
+ const parentRect = parent.getBoundingClientRect();
269
+ const elementRect = this.element.getBoundingClientRect();
270
+ const isVerticallyVisible = elementRect.top >= parentRect.top && elementRect.bottom <= parentRect.bottom;
271
+ const isHorizontallyVisible = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
272
+ return isVerticallyVisible && isHorizontallyVisible;
273
+ }
274
+ /**
275
+ * Available space at the bottom
276
+ */
277
+ get bottom() {
278
+ function calculateBottomSpace(element) {
279
+ return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
280
+ }
281
+ return calculateBottomSpace(this.element);
282
+ }
283
+ /**
284
+ * Available space on the right
285
+ */
286
+ get right() {
287
+ function calculateRightSpace(element) {
288
+ return window.innerWidth - element.getBoundingClientRect().left - element.getBoundingClientRect().width;
289
+ }
290
+ return calculateRightSpace(this.element);
291
+ }
292
+ /**
293
+ * Defines which horizontal placement is available
294
+ */
295
+ get horizontalPlacement() {
296
+ return this.tooltipContainerWidth + OFFSET < this.left ? 'left' : 'right';
297
+ }
298
+ /**
299
+ * Defines which vertical placement is available
300
+ */
301
+ get verticalPlacement() {
302
+ return this.tooltipContainerHeight + OFFSET < this.top ? 'top' : 'bottom';
303
+ }
304
+ /**
305
+ * Checks if there is enough space for placing tooltip vertically
306
+ */
307
+ get isEnoughSpaceVertically() {
308
+ return this.tooltipContainerHeight + OFFSET < this.top || this.tooltipContainerHeight + OFFSET < this.bottom;
309
+ }
310
+ /**
311
+ * Checks if there is enough space for placing tooltip horizontally
312
+ */
313
+ get isEnoughSpaceHorizontally() {
314
+ return this.tooltipContainerWidth + OFFSET < this.left || this.tooltipContainerWidth + OFFSET < this.right;
315
+ }
316
+ get activeElement() {
317
+ return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
318
+ }
319
+ /**
320
+ * Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM,
321
+ * or returns the element itself if it's already interactive
322
+ */
323
+ getInteractiveElement(element) {
324
+ if (!element)
325
+ return null;
326
+ if (element.tagName === 'R-BUTTON' || element.tagName === 'R-ICON-BUTTON') {
327
+ const shadowRoot = element.shadowRoot;
328
+ if (shadowRoot) {
329
+ return shadowRoot.querySelector('button, a');
330
+ }
331
+ }
332
+ return element;
333
+ }
334
+ /**
335
+ * Define position state
336
+ */
337
+ componentWillLoad() {
338
+ this.positionState = this.position;
339
+ }
340
+ /**
341
+ * Listen to active child element
342
+ */
343
+ componentDidLoad() {
344
+ var _a, _b, _c;
345
+ (_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
346
+ this.handleFocus();
347
+ });
348
+ (_b = this.activeElement) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => {
349
+ this.removeTooltip();
350
+ });
351
+ (_c = this.overflowedParent) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', () => {
352
+ this.handleScroll();
353
+ });
354
+ }
355
+ /**
356
+ * Finds first element's parent with not visible overflow.
357
+ * @param element -- parent element
358
+ * @param initEl -- initial(child) element
359
+ */
360
+ findOverflowParent(element) {
361
+ var _a, _b;
362
+ function notVisible(element) {
363
+ return getComputedStyle(element).overflow !== "visible";
364
+ }
365
+ if (!element) {
366
+ return null;
367
+ }
368
+ if (((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.DOCUMENT_FRAGMENT_NODE) {
369
+ return this.findOverflowParent((_b = element.parentNode) === null || _b === void 0 ? void 0 : _b.host);
370
+ }
371
+ if (notVisible(element)) {
372
+ return element;
373
+ }
374
+ if (element.parentElement) {
375
+ return this.findOverflowParent(element.parentElement);
376
+ }
377
+ return null;
378
+ }
379
+ /**
380
+ * Checks the alternative tooltip position.
381
+ * For example: If defined position is "top" and there is no free space for this position at the top of the component,
382
+ * first it checks available vertical space to place tooltip at the bottom.
383
+ * If there is no available space at the bottom, it checks the available space horizontally and sets it horizontally.
384
+ */
385
+ getAlternativePosition() {
386
+ switch (this.position) {
387
+ case 'top':
388
+ return this.isEnoughSpaceVertically ? 'bottom' : this.horizontalPlacement;
389
+ case 'bottom':
390
+ return this.isEnoughSpaceVertically ? 'top' : this.horizontalPlacement;
391
+ case 'left':
392
+ return this.isEnoughSpaceHorizontally ? 'right' : this.verticalPlacement;
393
+ case 'right':
394
+ return this.isEnoughSpaceHorizontally ? 'left' : this.verticalPlacement;
395
+ }
396
+ }
397
+ /**
398
+ * Set correct tooltip position.
399
+ * First it checks the available space for a defined position and then sets the new one based on the available space.
400
+ */
401
+ setCorrectPosition() {
402
+ if (!this.tooltip || !this.isShown) {
403
+ return;
404
+ }
405
+ switch (this.position) {
406
+ case 'top':
407
+ this.positionState = this.tooltipContainerHeight + OFFSET < this.top ? this.position : this.getAlternativePosition();
408
+ break;
409
+ case 'bottom':
410
+ this.positionState = this.tooltipContainerHeight + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
411
+ break;
412
+ case 'left':
413
+ this.positionState = this.tooltipContainerWidth + OFFSET < this.left ? this.position : this.getAlternativePosition();
414
+ break;
415
+ case 'right':
416
+ this.positionState = this.tooltipContainerWidth + OFFSET < this.right ? this.position : this.getAlternativePosition();
417
+ break;
418
+ }
419
+ this.adjustArrowPosition();
420
+ this.alignTooltipPosition();
421
+ this.alignArrowPosition();
422
+ // Allow tooltip content wrap and recalculate position
423
+ if (this.tooltip.style.width === 'fit-content') {
424
+ return;
425
+ }
426
+ this.tooltip.style.width = 'fit-content';
427
+ this.alignTooltipPosition();
428
+ }
429
+ /**
430
+ * Adjusts arrow correct position.
431
+ * For bottom & top tooltip positions there are 3 possible arrow.
432
+ * For right & left tooltip positions there is only one position = "center".
433
+ */
434
+ adjustArrowPosition() {
435
+ const isEnoughTooltipSpaceLeft = this.tooltipContainerWidth / 2 + OFFSET < this.left;
436
+ const isEnoughTooltipSpaceRight = this.tooltipContainerWidth / 2 + OFFSET < this.right;
437
+ if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || !isEnoughTooltipSpaceLeft && !isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
438
+ this.arrowPositionState = 'center';
439
+ }
440
+ else if (!isEnoughTooltipSpaceLeft) {
441
+ this.arrowPositionState = 'left';
442
+ }
443
+ else if (!isEnoughTooltipSpaceRight) {
444
+ this.arrowPositionState = 'right';
445
+ }
446
+ }
447
+ updateZIndex() {
448
+ const dialogs = document.querySelectorAll('dialog[open]');
449
+ let highestZIndex = 0;
450
+ dialogs.forEach((dialog) => {
451
+ const htmlDialog = dialog;
452
+ if (htmlDialog.open) {
453
+ const style = getComputedStyle(htmlDialog);
454
+ const zIndex = parseInt(style.zIndex, 10);
455
+ if (!isNaN(zIndex) && zIndex > highestZIndex) {
456
+ highestZIndex = zIndex;
457
+ }
458
+ }
459
+ });
460
+ const tooltipZIndex = highestZIndex > 0 ? highestZIndex + 10 : 1060;
461
+ this.tooltip.style.zIndex = `${tooltipZIndex}`;
462
+ this.arrow.style.zIndex = `${tooltipZIndex}`;
463
+ }
464
+ render() {
465
+ const { text, arrowPositionState, positionState, isShown, uniqueId } = this;
466
+ const hostAttrs = {
467
+ 'data-arrow-position': arrowPositionState,
468
+ 'data-position': positionState
469
+ };
470
+ const triggerAttrs = {
471
+ tabindex: !this.activeElement ? 0 : null,
472
+ role: !this.activeElement ? 'button' : null,
473
+ 'aria-describedby': !this.activeElement && isShown ? uniqueId : null
474
+ };
475
+ const contentAttrs = {
476
+ id: uniqueId,
477
+ role: 'tooltip',
478
+ 'aria-hidden': `${!isShown}`
479
+ };
480
+ return (h(Host, Object.assign({ key: '19155344b057a413834706bf19dd5a1bc082549d' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: '298c77b5c9611aba36d3df450f2c4ebda728113a', class: "r-tooltip" }, h("div", Object.assign({ key: 'e97a5fb30b6b67cde30734b02acdd1f354d58219', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: '3ad175db2674badbe9e022f52794a6f16afee7f5' })), h("div", Object.assign({ key: '6ed4995a7765422ff604e8da0797f651c12b1e8a', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), h("div", { key: '98e5991e801b1e54138c2a5156061237cafa2459', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
481
+ }
482
+ get element() { return getElement(this); }
483
+ static get watchers() { return {
484
+ "position": ["handleVerticalPosition"]
485
+ }; }
486
+ };
487
+ Tooltip.style = tooltipCss;
488
+
489
+ export { IconButton as r_icon_button, Tooltip as r_tooltip };