@govbr-ds/webcomponents 2.1.0 → 2.1.2

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 (866) hide show
  1. package/README.md +0 -11
  2. package/cem/custom-elements.json +272 -71
  3. package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
  4. package/dist/cjs/br-avatar.cjs.entry.js +248 -0
  5. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
  6. package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
  7. package/dist/cjs/br-button_2.cjs.entry.js +280 -0
  8. package/dist/cjs/br-card.cjs.entry.js +111 -0
  9. package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
  10. package/dist/cjs/br-carousel.cjs.entry.js +565 -0
  11. package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
  12. package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
  13. package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
  14. package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
  15. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
  16. package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
  17. package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
  18. package/dist/cjs/br-cookiebar-link.cjs.entry.js +55 -0
  19. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
  20. package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
  21. package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
  22. package/dist/cjs/br-crumb.cjs.entry.js +51 -0
  23. package/dist/cjs/br-date-picker_3.cjs.entry.js +2447 -0
  24. package/dist/cjs/br-datetime-picker.cjs.entry.js +1886 -0
  25. package/dist/cjs/br-divider.cjs.entry.js +225 -0
  26. package/dist/cjs/br-dropdown_2.cjs.entry.js +2000 -0
  27. package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
  28. package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
  29. package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
  30. package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
  31. package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
  32. package/dist/cjs/br-footer.cjs.entry.js +92 -0
  33. package/dist/cjs/br-header-function.cjs.entry.js +142 -0
  34. package/dist/cjs/br-header-link.cjs.entry.js +60 -0
  35. package/dist/cjs/br-header-list.cjs.entry.js +279 -0
  36. package/dist/cjs/br-header-logo.cjs.entry.js +178 -0
  37. package/dist/cjs/br-header.cjs.entry.js +642 -0
  38. package/dist/cjs/br-icon.cjs.entry.js +485 -0
  39. package/dist/cjs/br-input.cjs.entry.js +599 -0
  40. package/dist/cjs/br-item.cjs.entry.js +367 -0
  41. package/dist/cjs/br-link.cjs.entry.js +133 -0
  42. package/dist/cjs/br-loading.cjs.entry.js +505 -0
  43. package/dist/cjs/br-magic-button.cjs.entry.js +93 -0
  44. package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
  45. package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
  46. package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
  47. package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
  48. package/dist/cjs/br-menu-link.cjs.entry.js +56 -0
  49. package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
  50. package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
  51. package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
  52. package/dist/cjs/br-menu.cjs.entry.js +993 -0
  53. package/dist/cjs/br-modal.cjs.entry.js +496 -0
  54. package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
  55. package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
  56. package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
  57. package/dist/cjs/br-notification.cjs.entry.js +334 -0
  58. package/dist/cjs/br-pagination.cjs.entry.js +884 -0
  59. package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
  60. package/dist/cjs/br-radio.cjs.entry.js +357 -0
  61. package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
  62. package/dist/cjs/br-select-input_3.cjs.entry.js +988 -0
  63. package/dist/cjs/br-sign-in.cjs.entry.js +126 -0
  64. package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
  65. package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
  66. package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
  67. package/dist/cjs/br-slider.cjs.entry.js +687 -0
  68. package/dist/cjs/br-step_2.cjs.entry.js +628 -0
  69. package/dist/cjs/br-switch.cjs.entry.js +245 -0
  70. package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
  71. package/dist/cjs/br-tab.cjs.entry.js +397 -0
  72. package/dist/cjs/br-table-body.cjs.entry.js +37 -0
  73. package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
  74. package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
  75. package/dist/cjs/br-table-header.cjs.entry.js +37 -0
  76. package/dist/cjs/br-table-row.cjs.entry.js +81 -0
  77. package/dist/cjs/br-table.cjs.entry.js +680 -0
  78. package/dist/cjs/br-tag.cjs.entry.js +493 -0
  79. package/dist/cjs/br-textarea.cjs.entry.js +306 -0
  80. package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
  81. package/dist/cjs/br-upload.cjs.entry.js +581 -0
  82. package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
  83. package/dist/cjs/br-wizard.cjs.entry.js +708 -0
  84. package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
  85. package/dist/cjs/clamp-Co_hWptd.js +25 -0
  86. package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
  87. package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
  88. package/dist/cjs/event-CmVdNHxl.js +56 -0
  89. package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
  90. package/dist/cjs/floating-ui-MBI1osio.js +136 -0
  91. package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
  92. package/dist/cjs/focus-DuywwJPR.js +30 -0
  93. package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
  94. package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
  95. package/dist/cjs/id-CjRFMzf6.js +20 -0
  96. package/dist/cjs/index-C92n55ch.js +678 -0
  97. package/dist/cjs/index-CRdcutym.js +3287 -0
  98. package/dist/cjs/index.cjs.js +12 -0
  99. package/dist/cjs/isNil-DO5zWc3l.js +19 -0
  100. package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
  101. package/dist/cjs/loader.cjs.js +17 -0
  102. package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
  103. package/dist/cjs/navigation-AbzwcRCU.js +25 -0
  104. package/dist/cjs/parts-D5K3ae2C.js +19 -0
  105. package/dist/cjs/props-CScmBvKd.js +24 -0
  106. package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
  107. package/dist/cjs/slot-DAllytTj.js +48 -0
  108. package/dist/cjs/swipe-BU8_XE9f.js +345 -0
  109. package/dist/cjs/table-constants-BOPSay0B.js +183 -0
  110. package/dist/cjs/validator-CTCajtT9.js +123 -0
  111. package/dist/cjs/webcomponents.cjs.js +50 -0
  112. package/dist/collection/assets/icon-search.svg +6 -0
  113. package/dist/collection/assets/logo-negative.svg +1 -0
  114. package/dist/collection/assets/logo-positive.svg +1 -0
  115. package/dist/collection/assets/wc.svg +1 -0
  116. package/dist/collection/collection-manifest.json +113 -0
  117. package/dist/collection/components/avatar/avatar.css +1 -0
  118. package/dist/collection/components/avatar/avatar.js +589 -0
  119. package/dist/collection/components/avatar/avatar.types.js +1 -0
  120. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
  121. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
  122. package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
  123. package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
  124. package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
  125. package/dist/collection/components/button/button.css +1 -0
  126. package/dist/collection/components/button/button.js +546 -0
  127. package/dist/collection/components/button/button.types.js +1 -0
  128. package/dist/collection/components/card/card.css +1 -0
  129. package/dist/collection/components/card/card.js +225 -0
  130. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
  131. package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
  132. package/dist/collection/components/carousel/carousel.css +1 -0
  133. package/dist/collection/components/carousel/carousel.js +1217 -0
  134. package/dist/collection/components/carousel/carousel.types.js +1 -0
  135. package/dist/collection/components/checkbox/checkbox.css +1 -0
  136. package/dist/collection/components/checkbox/checkbox.js +823 -0
  137. package/dist/collection/components/checkbox/checkbox.types.js +1 -0
  138. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
  139. package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
  140. package/dist/collection/components/checkgroup/checkgroup.js +166 -0
  141. package/dist/collection/components/collapse/collapse.css +1 -0
  142. package/dist/collection/components/collapse/collapse.js +642 -0
  143. package/dist/collection/components/collapse/collapse.types.js +1 -0
  144. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
  145. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
  146. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
  147. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
  148. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
  149. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
  150. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
  151. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +201 -0
  152. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
  153. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
  154. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
  155. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
  156. package/dist/collection/components/cookiebar/cookiebar.css +1 -0
  157. package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
  158. package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
  159. package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
  160. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
  161. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
  162. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
  163. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
  164. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
  165. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
  166. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +826 -0
  167. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
  168. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
  169. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
  170. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
  171. package/dist/collection/components/datetime-picker/datetime-picker.js +1924 -0
  172. package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
  173. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
  174. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
  175. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
  176. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
  177. package/dist/collection/components/divider/divider.css +1 -0
  178. package/dist/collection/components/divider/divider.js +537 -0
  179. package/dist/collection/components/divider/divider.types.js +1 -0
  180. package/dist/collection/components/dropdown/dropdown.css +1 -0
  181. package/dist/collection/components/dropdown/dropdown.js +939 -0
  182. package/dist/collection/components/dropdown/dropdown.types.js +1 -0
  183. package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
  184. package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
  185. package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
  186. package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
  187. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
  188. package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
  189. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
  190. package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
  191. package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
  192. package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
  193. package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
  194. package/dist/collection/components/footer/footer.css +1 -0
  195. package/dist/collection/components/footer/footer.js +245 -0
  196. package/dist/collection/components/footer/footer.types.js +1 -0
  197. package/dist/collection/components/global.types.js +1 -0
  198. package/dist/collection/components/header/header-function/header-function.css +1 -0
  199. package/dist/collection/components/header/header-function/header-function.js +311 -0
  200. package/dist/collection/components/header/header-link/header-link.css +1 -0
  201. package/dist/collection/components/header/header-link/header-link.js +189 -0
  202. package/dist/collection/components/header/header-list/header-list.css +1 -0
  203. package/dist/collection/components/header/header-list/header-list.js +452 -0
  204. package/dist/collection/components/header/header-logo/header-logo.css +1 -0
  205. package/dist/collection/components/header/header-logo/header-logo.js +421 -0
  206. package/dist/collection/components/header/header.css +1 -0
  207. package/dist/collection/components/header/header.js +1131 -0
  208. package/dist/collection/components/header/header.types.js +1 -0
  209. package/dist/collection/components/icon/default-icons-cache.js +233 -0
  210. package/dist/collection/components/icon/icon.css +1 -0
  211. package/dist/collection/components/icon/icon.js +598 -0
  212. package/dist/collection/components/icon/icon.types.js +1 -0
  213. package/dist/collection/components/icon/icon.utils.js +33 -0
  214. package/dist/collection/components/input/input.css +1 -0
  215. package/dist/collection/components/input/input.js +1642 -0
  216. package/dist/collection/components/input/input.types.js +1 -0
  217. package/dist/collection/components/item/item.css +1 -0
  218. package/dist/collection/components/item/item.js +917 -0
  219. package/dist/collection/components/item/item.types.js +1 -0
  220. package/dist/collection/components/link/link.css +1 -0
  221. package/dist/collection/components/link/link.js +699 -0
  222. package/dist/collection/components/list/list.css +1 -0
  223. package/dist/collection/components/list/list.js +728 -0
  224. package/dist/collection/components/loading/loading.css +1 -0
  225. package/dist/collection/components/loading/loading.js +1169 -0
  226. package/dist/collection/components/loading/loading.types.js +1 -0
  227. package/dist/collection/components/magic-button/magic-button.css +1 -0
  228. package/dist/collection/components/magic-button/magic-button.js +238 -0
  229. package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
  230. package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
  231. package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
  232. package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
  233. package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
  234. package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
  235. package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
  236. package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
  237. package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
  238. package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
  239. package/dist/collection/components/menu/menu-link/menu-link.js +260 -0
  240. package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
  241. package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
  242. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
  243. package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
  244. package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
  245. package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
  246. package/dist/collection/components/menu/menu.css +1 -0
  247. package/dist/collection/components/menu/menu.js +1372 -0
  248. package/dist/collection/components/menu/menu.types.js +1 -0
  249. package/dist/collection/components/menu/menu.utils.js +279 -0
  250. package/dist/collection/components/message/message.css +1 -0
  251. package/dist/collection/components/message/message.js +508 -0
  252. package/dist/collection/components/modal/modal.css +1 -0
  253. package/dist/collection/components/modal/modal.js +842 -0
  254. package/dist/collection/components/modal/modal.types.js +1 -0
  255. package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
  256. package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
  257. package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
  258. package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
  259. package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
  260. package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
  261. package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
  262. package/dist/collection/components/notification/notification.css +1 -0
  263. package/dist/collection/components/notification/notification.js +838 -0
  264. package/dist/collection/components/notification/notification.types.js +1 -0
  265. package/dist/collection/components/pagination/pagination.css +1 -0
  266. package/dist/collection/components/pagination/pagination.js +1470 -0
  267. package/dist/collection/components/pagination/pagination.types.js +1 -0
  268. package/dist/collection/components/radio/radio.css +1 -0
  269. package/dist/collection/components/radio/radio.js +847 -0
  270. package/dist/collection/components/radio/radio.types.js +1 -0
  271. package/dist/collection/components/radio-group/radio-group.css +1 -0
  272. package/dist/collection/components/radio-group/radio-group.js +862 -0
  273. package/dist/collection/components/radio-group/radio-group.types.js +1 -0
  274. package/dist/collection/components/scrim/scrim.css +1 -0
  275. package/dist/collection/components/scrim/scrim.js +1825 -0
  276. package/dist/collection/components/scrim/scrim.types.js +1 -0
  277. package/dist/collection/components/scrim/scrim.utils.js +132 -0
  278. package/dist/collection/components/select/select-input/select-input.css +1 -0
  279. package/dist/collection/components/select/select-input/select-input.js +586 -0
  280. package/dist/collection/components/select/select-list/select-list.css +1 -0
  281. package/dist/collection/components/select/select-list/select-list.js +1159 -0
  282. package/dist/collection/components/select/select-option/select-option.css +1 -0
  283. package/dist/collection/components/select/select-option/select-option.js +564 -0
  284. package/dist/collection/components/select/select.constants.js +6 -0
  285. package/dist/collection/components/select/select.css +1 -0
  286. package/dist/collection/components/select/select.js +2692 -0
  287. package/dist/collection/components/select/select.types.js +1 -0
  288. package/dist/collection/components/select/select.utils.js +34 -0
  289. package/dist/collection/components/sign-in/sign-in.css +1 -0
  290. package/dist/collection/components/sign-in/sign-in.js +401 -0
  291. package/dist/collection/components/sign-in/sign-in.types.js +1 -0
  292. package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
  293. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
  294. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
  295. package/dist/collection/components/skip-link/skip-link.css +1 -0
  296. package/dist/collection/components/skip-link/skip-link.js +699 -0
  297. package/dist/collection/components/skip-link/skip-link.types.js +1 -0
  298. package/dist/collection/components/slider/slider.css +1 -0
  299. package/dist/collection/components/slider/slider.js +1324 -0
  300. package/dist/collection/components/slider/slider.types.js +1 -0
  301. package/dist/collection/components/step/step-item/step-item.css +1 -0
  302. package/dist/collection/components/step/step-item/step-item.js +604 -0
  303. package/dist/collection/components/step/step-item/step-item.types.js +1 -0
  304. package/dist/collection/components/step/step.css +1 -0
  305. package/dist/collection/components/step/step.js +896 -0
  306. package/dist/collection/components/step/step.types.js +1 -0
  307. package/dist/collection/components/switch/switch.css +1 -0
  308. package/dist/collection/components/switch/switch.js +715 -0
  309. package/dist/collection/components/switch/switch.types.js +1 -0
  310. package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
  311. package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
  312. package/dist/collection/components/tab/tab.css +1 -0
  313. package/dist/collection/components/tab/tab.js +724 -0
  314. package/dist/collection/components/tab/tab.types.js +1 -0
  315. package/dist/collection/components/table/table-body/table-body.css +1 -0
  316. package/dist/collection/components/table/table-body/table-body.js +51 -0
  317. package/dist/collection/components/table/table-cell/table-cell.css +1 -0
  318. package/dist/collection/components/table/table-cell/table-cell.js +373 -0
  319. package/dist/collection/components/table/table-constants.js +171 -0
  320. package/dist/collection/components/table/table-header/table-header.css +1 -0
  321. package/dist/collection/components/table/table-header/table-header.js +51 -0
  322. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  323. package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
  324. package/dist/collection/components/table/table-row/table-row.css +1 -0
  325. package/dist/collection/components/table/table-row/table-row.js +261 -0
  326. package/dist/collection/components/table/table-tokens.js +50 -0
  327. package/dist/collection/components/table/table-types.js +1 -0
  328. package/dist/collection/components/table/table-utils.js +44 -0
  329. package/dist/collection/components/table/table.css +1 -0
  330. package/dist/collection/components/table/table.js +1030 -0
  331. package/dist/collection/components/tag/tag.css +1 -0
  332. package/dist/collection/components/tag/tag.js +1152 -0
  333. package/dist/collection/components/tag/tag.types.js +1 -0
  334. package/dist/collection/components/textarea/textarea.css +1 -0
  335. package/dist/collection/components/textarea/textarea.js +985 -0
  336. package/dist/collection/components/textarea/textarea.types.js +1 -0
  337. package/dist/collection/components/tooltip/tooltip.css +1 -0
  338. package/dist/collection/components/tooltip/tooltip.js +1024 -0
  339. package/dist/collection/components/tooltip/tooltip.types.js +1 -0
  340. package/dist/collection/components/upload/upload.css +1 -0
  341. package/dist/collection/components/upload/upload.js +1314 -0
  342. package/dist/collection/components/upload/upload.types.js +1 -0
  343. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
  344. package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
  345. package/dist/collection/components/wizard/wizard.css +1 -0
  346. package/dist/collection/components/wizard/wizard.js +1228 -0
  347. package/dist/collection/index.js +14 -0
  348. package/dist/collection/pages/components/cookiebar/index.js +26 -0
  349. package/dist/collection/pages/components/link/index.js +29 -0
  350. package/dist/collection/pages/components/pagination/index.js +12 -0
  351. package/dist/collection/pages/components/slider/index.js +18 -0
  352. package/dist/collection/pages/scripts/code-editor.js +101 -0
  353. package/dist/collection/pages/scripts/component-controls.js +600 -0
  354. package/dist/collection/pages/scripts/dev-event-console.js +47 -0
  355. package/dist/collection/pages/scripts/menu.js +192 -0
  356. package/dist/collection/pages/scripts/pageLoader.js +1422 -0
  357. package/dist/collection/shared/utils/assetsPath.js +75 -0
  358. package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
  359. package/dist/collection/shared/utils/clamp.js +21 -0
  360. package/dist/collection/shared/utils/css-variables.js +12 -0
  361. package/dist/collection/shared/utils/cssVariables.js +37 -0
  362. package/dist/collection/shared/utils/date.js +405 -0
  363. package/dist/collection/shared/utils/debounce.js +39 -0
  364. package/dist/collection/shared/utils/event.js +55 -0
  365. package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
  366. package/dist/collection/shared/utils/floating-ui.js +131 -0
  367. package/dist/collection/shared/utils/focus.js +24 -0
  368. package/dist/collection/shared/utils/form.js +82 -0
  369. package/dist/collection/shared/utils/format-bytes.js +20 -0
  370. package/dist/collection/shared/utils/getNextElement.js +30 -0
  371. package/dist/collection/shared/utils/getRandom.js +27 -0
  372. package/dist/collection/shared/utils/helpers.js +31 -0
  373. package/dist/collection/shared/utils/id.js +16 -0
  374. package/dist/collection/shared/utils/index.js +60 -0
  375. package/dist/collection/shared/utils/interfaces.js +1 -0
  376. package/dist/collection/shared/utils/isClient.js +14 -0
  377. package/dist/collection/shared/utils/isDefined.js +19 -0
  378. package/dist/collection/shared/utils/isEmpty.js +30 -0
  379. package/dist/collection/shared/utils/isHTMLElement.js +16 -0
  380. package/dist/collection/shared/utils/isNil.js +15 -0
  381. package/dist/collection/shared/utils/isString.js +20 -0
  382. package/dist/collection/shared/utils/native-dialog.js +44 -0
  383. package/dist/collection/shared/utils/navigation.js +21 -0
  384. package/dist/collection/shared/utils/parts.js +15 -0
  385. package/dist/collection/shared/utils/prop-warning.js +7 -0
  386. package/dist/collection/shared/utils/props.js +37 -0
  387. package/dist/collection/shared/utils/raf-batcher.js +51 -0
  388. package/dist/collection/shared/utils/scrollLock.js +141 -0
  389. package/dist/collection/shared/utils/setRafTimeout.js +38 -0
  390. package/dist/collection/shared/utils/slot.js +113 -0
  391. package/dist/collection/shared/utils/ssr-date.js +33 -0
  392. package/dist/collection/shared/utils/stringToArray.js +29 -0
  393. package/dist/collection/shared/utils/swipe.js +342 -0
  394. package/dist/collection/shared/utils/transition.js +127 -0
  395. package/dist/collection/shared/utils/types.js +1 -0
  396. package/dist/collection/shared/utils/validator.js +51 -0
  397. package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
  398. package/dist/collection/value-accessors/index.js +6 -0
  399. package/dist/collection/value-accessors/vue-model-config.js +43 -0
  400. package/dist/components/br-avatar.d.ts +11 -0
  401. package/dist/components/br-avatar.js +5 -0
  402. package/dist/components/br-breadcrumb-item.d.ts +11 -0
  403. package/dist/components/br-breadcrumb-item.js +5 -0
  404. package/dist/components/br-breadcrumb.d.ts +11 -0
  405. package/dist/components/br-breadcrumb.js +5 -0
  406. package/dist/components/br-button.d.ts +11 -0
  407. package/dist/components/br-button.js +5 -0
  408. package/dist/components/br-card.d.ts +11 -0
  409. package/dist/components/br-card.js +5 -0
  410. package/dist/components/br-carousel-page.d.ts +11 -0
  411. package/dist/components/br-carousel-page.js +5 -0
  412. package/dist/components/br-carousel.d.ts +11 -0
  413. package/dist/components/br-carousel.js +5 -0
  414. package/dist/components/br-checkbox-group.d.ts +11 -0
  415. package/dist/components/br-checkbox-group.js +5 -0
  416. package/dist/components/br-checkbox.d.ts +11 -0
  417. package/dist/components/br-checkbox.js +5 -0
  418. package/dist/components/br-checkgroup.d.ts +11 -0
  419. package/dist/components/br-checkgroup.js +5 -0
  420. package/dist/components/br-collapse.d.ts +11 -0
  421. package/dist/components/br-collapse.js +5 -0
  422. package/dist/components/br-cookiebar-cookie.d.ts +11 -0
  423. package/dist/components/br-cookiebar-cookie.js +5 -0
  424. package/dist/components/br-cookiebar-group.d.ts +11 -0
  425. package/dist/components/br-cookiebar-group.js +5 -0
  426. package/dist/components/br-cookiebar-header.d.ts +11 -0
  427. package/dist/components/br-cookiebar-header.js +5 -0
  428. package/dist/components/br-cookiebar-link.d.ts +11 -0
  429. package/dist/components/br-cookiebar-link.js +5 -0
  430. package/dist/components/br-cookiebar-note-group.d.ts +11 -0
  431. package/dist/components/br-cookiebar-note-group.js +5 -0
  432. package/dist/components/br-cookiebar-note.d.ts +11 -0
  433. package/dist/components/br-cookiebar-note.js +5 -0
  434. package/dist/components/br-cookiebar.d.ts +11 -0
  435. package/dist/components/br-cookiebar.js +5 -0
  436. package/dist/components/br-crumb.d.ts +11 -0
  437. package/dist/components/br-crumb.js +5 -0
  438. package/dist/components/br-date-picker.d.ts +11 -0
  439. package/dist/components/br-date-picker.js +5 -0
  440. package/dist/components/br-datetime-input.d.ts +11 -0
  441. package/dist/components/br-datetime-input.js +5 -0
  442. package/dist/components/br-datetime-picker.d.ts +11 -0
  443. package/dist/components/br-datetime-picker.js +5 -0
  444. package/dist/components/br-divider.d.ts +11 -0
  445. package/dist/components/br-divider.js +5 -0
  446. package/dist/components/br-dropdown.d.ts +11 -0
  447. package/dist/components/br-dropdown.js +5 -0
  448. package/dist/components/br-footer-category.d.ts +11 -0
  449. package/dist/components/br-footer-category.js +5 -0
  450. package/dist/components/br-footer-item.d.ts +11 -0
  451. package/dist/components/br-footer-item.js +5 -0
  452. package/dist/components/br-footer-legal.d.ts +11 -0
  453. package/dist/components/br-footer-legal.js +5 -0
  454. package/dist/components/br-footer-logo.d.ts +11 -0
  455. package/dist/components/br-footer-logo.js +5 -0
  456. package/dist/components/br-footer-social.d.ts +11 -0
  457. package/dist/components/br-footer-social.js +5 -0
  458. package/dist/components/br-footer.d.ts +11 -0
  459. package/dist/components/br-footer.js +5 -0
  460. package/dist/components/br-header-function.d.ts +11 -0
  461. package/dist/components/br-header-function.js +5 -0
  462. package/dist/components/br-header-link.d.ts +11 -0
  463. package/dist/components/br-header-link.js +5 -0
  464. package/dist/components/br-header-list.d.ts +11 -0
  465. package/dist/components/br-header-list.js +5 -0
  466. package/dist/components/br-header-logo.d.ts +11 -0
  467. package/dist/components/br-header-logo.js +5 -0
  468. package/dist/components/br-header.d.ts +11 -0
  469. package/dist/components/br-header.js +5 -0
  470. package/dist/components/br-icon.d.ts +11 -0
  471. package/dist/components/br-icon.js +5 -0
  472. package/dist/components/br-input.d.ts +11 -0
  473. package/dist/components/br-input.js +5 -0
  474. package/dist/components/br-item.d.ts +11 -0
  475. package/dist/components/br-item.js +5 -0
  476. package/dist/components/br-link.d.ts +11 -0
  477. package/dist/components/br-link.js +5 -0
  478. package/dist/components/br-list.d.ts +11 -0
  479. package/dist/components/br-list.js +5 -0
  480. package/dist/components/br-loading.d.ts +11 -0
  481. package/dist/components/br-loading.js +5 -0
  482. package/dist/components/br-magic-button.d.ts +11 -0
  483. package/dist/components/br-magic-button.js +5 -0
  484. package/dist/components/br-menu-group.d.ts +11 -0
  485. package/dist/components/br-menu-group.js +5 -0
  486. package/dist/components/br-menu-header.d.ts +11 -0
  487. package/dist/components/br-menu-header.js +5 -0
  488. package/dist/components/br-menu-info.d.ts +11 -0
  489. package/dist/components/br-menu-info.js +5 -0
  490. package/dist/components/br-menu-item.d.ts +11 -0
  491. package/dist/components/br-menu-item.js +5 -0
  492. package/dist/components/br-menu-link.d.ts +11 -0
  493. package/dist/components/br-menu-link.js +5 -0
  494. package/dist/components/br-menu-list.d.ts +11 -0
  495. package/dist/components/br-menu-list.js +5 -0
  496. package/dist/components/br-menu-logo.d.ts +11 -0
  497. package/dist/components/br-menu-logo.js +5 -0
  498. package/dist/components/br-menu-social.d.ts +11 -0
  499. package/dist/components/br-menu-social.js +5 -0
  500. package/dist/components/br-menu.d.ts +11 -0
  501. package/dist/components/br-menu.js +5 -0
  502. package/dist/components/br-message.d.ts +11 -0
  503. package/dist/components/br-message.js +5 -0
  504. package/dist/components/br-modal.d.ts +11 -0
  505. package/dist/components/br-modal.js +5 -0
  506. package/dist/components/br-notification-body.d.ts +11 -0
  507. package/dist/components/br-notification-body.js +5 -0
  508. package/dist/components/br-notification-header.d.ts +11 -0
  509. package/dist/components/br-notification-header.js +5 -0
  510. package/dist/components/br-notification-item.d.ts +11 -0
  511. package/dist/components/br-notification-item.js +5 -0
  512. package/dist/components/br-notification.d.ts +11 -0
  513. package/dist/components/br-notification.js +5 -0
  514. package/dist/components/br-pagination.d.ts +11 -0
  515. package/dist/components/br-pagination.js +5 -0
  516. package/dist/components/br-radio-group.d.ts +11 -0
  517. package/dist/components/br-radio-group.js +5 -0
  518. package/dist/components/br-radio.d.ts +11 -0
  519. package/dist/components/br-radio.js +5 -0
  520. package/dist/components/br-scrim.d.ts +11 -0
  521. package/dist/components/br-scrim.js +5 -0
  522. package/dist/components/br-select-input.d.ts +11 -0
  523. package/dist/components/br-select-input.js +5 -0
  524. package/dist/components/br-select-list.d.ts +11 -0
  525. package/dist/components/br-select-list.js +5 -0
  526. package/dist/components/br-select-option.d.ts +11 -0
  527. package/dist/components/br-select-option.js +5 -0
  528. package/dist/components/br-select.d.ts +11 -0
  529. package/dist/components/br-select.js +5 -0
  530. package/dist/components/br-sign-in.d.ts +11 -0
  531. package/dist/components/br-sign-in.js +5 -0
  532. package/dist/components/br-skip-link-item.d.ts +11 -0
  533. package/dist/components/br-skip-link-item.js +5 -0
  534. package/dist/components/br-skip-link.d.ts +11 -0
  535. package/dist/components/br-skip-link.js +5 -0
  536. package/dist/components/br-skiplink-item.d.ts +11 -0
  537. package/dist/components/br-skiplink-item.js +5 -0
  538. package/dist/components/br-slider.d.ts +11 -0
  539. package/dist/components/br-slider.js +5 -0
  540. package/dist/components/br-step-item.d.ts +11 -0
  541. package/dist/components/br-step-item.js +5 -0
  542. package/dist/components/br-step.d.ts +11 -0
  543. package/dist/components/br-step.js +5 -0
  544. package/dist/components/br-switch.d.ts +11 -0
  545. package/dist/components/br-switch.js +5 -0
  546. package/dist/components/br-tab-item.d.ts +11 -0
  547. package/dist/components/br-tab-item.js +5 -0
  548. package/dist/components/br-tab.d.ts +11 -0
  549. package/dist/components/br-tab.js +5 -0
  550. package/dist/components/br-table-body.d.ts +11 -0
  551. package/dist/components/br-table-body.js +5 -0
  552. package/dist/components/br-table-cell.d.ts +11 -0
  553. package/dist/components/br-table-cell.js +5 -0
  554. package/dist/components/br-table-header-cell.d.ts +11 -0
  555. package/dist/components/br-table-header-cell.js +5 -0
  556. package/dist/components/br-table-header.d.ts +11 -0
  557. package/dist/components/br-table-header.js +5 -0
  558. package/dist/components/br-table-row.d.ts +11 -0
  559. package/dist/components/br-table-row.js +5 -0
  560. package/dist/components/br-table.d.ts +11 -0
  561. package/dist/components/br-table.js +5 -0
  562. package/dist/components/br-tag.d.ts +11 -0
  563. package/dist/components/br-tag.js +5 -0
  564. package/dist/components/br-textarea.d.ts +11 -0
  565. package/dist/components/br-textarea.js +5 -0
  566. package/dist/components/br-time-picker.d.ts +11 -0
  567. package/dist/components/br-time-picker.js +5 -0
  568. package/dist/components/br-tooltip.d.ts +11 -0
  569. package/dist/components/br-tooltip.js +5 -0
  570. package/dist/components/br-upload.d.ts +11 -0
  571. package/dist/components/br-upload.js +5 -0
  572. package/dist/components/br-wizard-panel.d.ts +11 -0
  573. package/dist/components/br-wizard-panel.js +5 -0
  574. package/dist/components/br-wizard.d.ts +11 -0
  575. package/dist/components/br-wizard.js +5 -0
  576. package/dist/components/index.d.ts +213 -0
  577. package/dist/components/index.js +5 -0
  578. package/dist/components/p-34Jfn-U-.js +5 -0
  579. package/dist/components/p-5z6jgH1D.js +5 -0
  580. package/dist/components/p-6OdfnwnK.js +5 -0
  581. package/dist/components/p-9S9bgUT0.js +5 -0
  582. package/dist/components/p-B-qLmYZC.js +5 -0
  583. package/dist/components/p-B55qsau4.js +5 -0
  584. package/dist/components/p-B7Amgxkp.js +5 -0
  585. package/dist/components/p-BC7f6MK8.js +5 -0
  586. package/dist/components/p-BKuMQJrQ.js +5 -0
  587. package/dist/components/p-BPJpHGOW.js +5 -0
  588. package/dist/components/p-BWXfdbQH.js +5 -0
  589. package/dist/components/p-Bb-nLtTG.js +5 -0
  590. package/dist/components/p-BeE7R9nu.js +5 -0
  591. package/dist/components/p-BkS6ujyf.js +5 -0
  592. package/dist/components/p-Bo0QYHJO.js +5 -0
  593. package/dist/components/p-C1yRmdso.js +5 -0
  594. package/dist/components/p-C2i2c_io.js +5 -0
  595. package/dist/components/p-C7v0lVlX.js +5 -0
  596. package/dist/components/p-CMBsvswx.js +5 -0
  597. package/dist/components/p-CRrimdz6.js +5 -0
  598. package/dist/components/p-CWORw84-.js +5 -0
  599. package/dist/components/p-CXMwM9m4.js +5 -0
  600. package/dist/components/p-CdDwqbBv.js +5 -0
  601. package/dist/components/p-CvUMXJCl.js +5 -0
  602. package/dist/components/p-D3usVJE2.js +16 -0
  603. package/dist/components/p-D6zroLx5.js +5 -0
  604. package/dist/components/p-DA5GS53D.js +5 -0
  605. package/dist/components/p-DBP6K_aq.js +5 -0
  606. package/dist/components/p-DBmwzG9E.js +5 -0
  607. package/dist/components/p-DCrVo-8T.js +5 -0
  608. package/dist/components/p-DFUKDNck.js +5 -0
  609. package/dist/components/p-DHicj0By.js +5 -0
  610. package/dist/components/p-DIK54tTj.js +5 -0
  611. package/dist/components/p-DQRSHR-D.js +5 -0
  612. package/dist/components/p-DRVMm1Py.js +5 -0
  613. package/dist/components/p-DWPmUV72.js +5 -0
  614. package/dist/components/p-DXjQyH6s.js +5 -0
  615. package/dist/components/p-DYA74R1r.js +5 -0
  616. package/dist/components/p-DmCxdB9P.js +5 -0
  617. package/dist/components/p-Dmfk7eEe.js +5 -0
  618. package/dist/components/p-Dp0xy_3n.js +5 -0
  619. package/dist/components/p-DxZJrIyL.js +5 -0
  620. package/dist/components/p-JAkkThgf.js +5 -0
  621. package/dist/components/p-Ud-WB0hx.js +5 -0
  622. package/dist/components/p-bhULC15U.js +5 -0
  623. package/dist/components/p-cF3ia5e9.js +5 -0
  624. package/dist/components/p-fpMNttbg.js +5 -0
  625. package/dist/components/p-gvnfuTjd.js +5 -0
  626. package/dist/components/p-qYONSNcf.js +5 -0
  627. package/dist/components/p-qhhHGJY1.js +5 -0
  628. package/dist/components/p-ttI0nvv_.js +5 -0
  629. package/dist/components/p-ukNmfGNP.js +5 -0
  630. package/dist/components/p-xa8e1kSW.js +5 -0
  631. package/dist/esm/app-globals-DVjNHTTs.js +7 -0
  632. package/dist/esm/br-avatar.entry.js +246 -0
  633. package/dist/esm/br-breadcrumb-item.entry.js +43 -0
  634. package/dist/esm/br-breadcrumb.entry.js +441 -0
  635. package/dist/esm/br-button_2.entry.js +277 -0
  636. package/dist/esm/br-card.entry.js +109 -0
  637. package/dist/esm/br-carousel-page.entry.js +78 -0
  638. package/dist/esm/br-carousel.entry.js +563 -0
  639. package/dist/esm/br-checkbox-group.entry.js +116 -0
  640. package/dist/esm/br-checkbox.entry.js +286 -0
  641. package/dist/esm/br-checkgroup.entry.js +18 -0
  642. package/dist/esm/br-collapse_2.entry.js +680 -0
  643. package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
  644. package/dist/esm/br-cookiebar-group.entry.js +307 -0
  645. package/dist/esm/br-cookiebar-header.entry.js +37 -0
  646. package/dist/esm/br-cookiebar-link.entry.js +53 -0
  647. package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
  648. package/dist/esm/br-cookiebar-note.entry.js +23 -0
  649. package/dist/esm/br-cookiebar.entry.js +756 -0
  650. package/dist/esm/br-crumb.entry.js +49 -0
  651. package/dist/esm/br-date-picker_3.entry.js +2443 -0
  652. package/dist/esm/br-datetime-picker.entry.js +1884 -0
  653. package/dist/esm/br-divider.entry.js +223 -0
  654. package/dist/esm/br-dropdown_2.entry.js +1997 -0
  655. package/dist/esm/br-footer-category.entry.js +100 -0
  656. package/dist/esm/br-footer-item.entry.js +50 -0
  657. package/dist/esm/br-footer-legal.entry.js +39 -0
  658. package/dist/esm/br-footer-logo.entry.js +102 -0
  659. package/dist/esm/br-footer-social.entry.js +69 -0
  660. package/dist/esm/br-footer.entry.js +90 -0
  661. package/dist/esm/br-header-function.entry.js +140 -0
  662. package/dist/esm/br-header-link.entry.js +58 -0
  663. package/dist/esm/br-header-list.entry.js +277 -0
  664. package/dist/esm/br-header-logo.entry.js +176 -0
  665. package/dist/esm/br-header.entry.js +640 -0
  666. package/dist/esm/br-icon.entry.js +483 -0
  667. package/dist/esm/br-input.entry.js +597 -0
  668. package/dist/esm/br-item.entry.js +365 -0
  669. package/dist/esm/br-link.entry.js +131 -0
  670. package/dist/esm/br-loading.entry.js +503 -0
  671. package/dist/esm/br-magic-button.entry.js +91 -0
  672. package/dist/esm/br-menu-group.entry.js +21 -0
  673. package/dist/esm/br-menu-header.entry.js +45 -0
  674. package/dist/esm/br-menu-info.entry.js +36 -0
  675. package/dist/esm/br-menu-item.entry.js +77 -0
  676. package/dist/esm/br-menu-link.entry.js +54 -0
  677. package/dist/esm/br-menu-list.entry.js +147 -0
  678. package/dist/esm/br-menu-logo.entry.js +73 -0
  679. package/dist/esm/br-menu-social.entry.js +63 -0
  680. package/dist/esm/br-menu.entry.js +991 -0
  681. package/dist/esm/br-modal.entry.js +494 -0
  682. package/dist/esm/br-notification-body.entry.js +69 -0
  683. package/dist/esm/br-notification-header.entry.js +46 -0
  684. package/dist/esm/br-notification-item.entry.js +108 -0
  685. package/dist/esm/br-notification.entry.js +332 -0
  686. package/dist/esm/br-pagination.entry.js +882 -0
  687. package/dist/esm/br-radio-group.entry.js +426 -0
  688. package/dist/esm/br-radio.entry.js +355 -0
  689. package/dist/esm/br-scrim.entry.js +1334 -0
  690. package/dist/esm/br-select-input_3.entry.js +984 -0
  691. package/dist/esm/br-sign-in.entry.js +124 -0
  692. package/dist/esm/br-skip-link-item.entry.js +18 -0
  693. package/dist/esm/br-skip-link.entry.js +360 -0
  694. package/dist/esm/br-skiplink-item.entry.js +190 -0
  695. package/dist/esm/br-slider.entry.js +685 -0
  696. package/dist/esm/br-step_2.entry.js +625 -0
  697. package/dist/esm/br-switch.entry.js +243 -0
  698. package/dist/esm/br-tab-item.entry.js +183 -0
  699. package/dist/esm/br-tab.entry.js +395 -0
  700. package/dist/esm/br-table-body.entry.js +35 -0
  701. package/dist/esm/br-table-cell.entry.js +182 -0
  702. package/dist/esm/br-table-header-cell.entry.js +171 -0
  703. package/dist/esm/br-table-header.entry.js +35 -0
  704. package/dist/esm/br-table-row.entry.js +79 -0
  705. package/dist/esm/br-table.entry.js +678 -0
  706. package/dist/esm/br-tag.entry.js +491 -0
  707. package/dist/esm/br-textarea.entry.js +304 -0
  708. package/dist/esm/br-tooltip.entry.js +625 -0
  709. package/dist/esm/br-upload.entry.js +579 -0
  710. package/dist/esm/br-wizard-panel.entry.js +52 -0
  711. package/dist/esm/br-wizard.entry.js +706 -0
  712. package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
  713. package/dist/esm/clamp-gvnfuTjd.js +23 -0
  714. package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
  715. package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
  716. package/dist/esm/event-DFN_so7I.js +48 -0
  717. package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
  718. package/dist/esm/floating-ui-BavFwMnx.js +134 -0
  719. package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
  720. package/dist/esm/focus-DxZJrIyL.js +26 -0
  721. package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
  722. package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
  723. package/dist/esm/id-BkS6ujyf.js +18 -0
  724. package/dist/esm/index-Bo-2igoO.js +671 -0
  725. package/dist/esm/index-C2RBydfd.js +3258 -0
  726. package/dist/esm/index.js +6 -0
  727. package/dist/esm/isNil-B-qLmYZC.js +17 -0
  728. package/dist/esm/isValid-DIUZX1qS.js +3684 -0
  729. package/dist/esm/loader.js +15 -0
  730. package/dist/esm/native-dialog-B55qsau4.js +46 -0
  731. package/dist/esm/navigation-bhULC15U.js +23 -0
  732. package/dist/esm/parts-Bb5vVlCC.js +17 -0
  733. package/dist/esm/props-DRVMm1Py.js +22 -0
  734. package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
  735. package/dist/esm/slot-BIG-yees.js +44 -0
  736. package/dist/esm/swipe-Dmfk7eEe.js +343 -0
  737. package/dist/esm/table-constants-CXMwM9m4.js +170 -0
  738. package/dist/esm/validator-D3tVP32U.js +113 -0
  739. package/dist/esm/webcomponents.js +46 -0
  740. package/dist/hydrate/index.d.ts +287 -0
  741. package/dist/hydrate/index.js +67516 -0
  742. package/dist/hydrate/index.mjs +67506 -0
  743. package/dist/hydrate/package.json +12 -0
  744. package/dist/index.cjs.js +1 -0
  745. package/dist/index.js +1 -0
  746. package/dist/loader/cdn.js +5 -0
  747. package/dist/loader/index.cjs.js +5 -0
  748. package/dist/loader/index.d.ts +24 -0
  749. package/dist/loader/index.es2017.js +5 -0
  750. package/dist/loader/index.js +6 -0
  751. package/dist/types/components/item/item.d.ts +1 -0
  752. package/dist/types/components/select/select-list/select-list.d.ts +1 -0
  753. package/dist/types/components/select/select-option/select-option.d.ts +1 -0
  754. package/dist/types/components/select/select.d.ts +14 -0
  755. package/dist/types/components/select/select.types.d.ts +2 -0
  756. package/dist/types/components/select/select.utils.d.ts +13 -0
  757. package/dist/webcomponents/index.esm.js +5 -0
  758. package/dist/webcomponents/p-0196804a.entry.js +5 -0
  759. package/dist/webcomponents/p-0410186a.entry.js +5 -0
  760. package/dist/webcomponents/p-0415ef22.entry.js +5 -0
  761. package/dist/webcomponents/p-0777c7b1.entry.js +5 -0
  762. package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
  763. package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
  764. package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
  765. package/dist/webcomponents/p-12286e73.entry.js +5 -0
  766. package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
  767. package/dist/webcomponents/p-1580beee.entry.js +5 -0
  768. package/dist/webcomponents/p-18ee6175.entry.js +5 -0
  769. package/dist/webcomponents/p-1bca4499.entry.js +5 -0
  770. package/dist/webcomponents/p-1c303a4e.entry.js +5 -0
  771. package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
  772. package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
  773. package/dist/webcomponents/p-224daaac.entry.js +5 -0
  774. package/dist/webcomponents/p-28426d2a.entry.js +5 -0
  775. package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
  776. package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
  777. package/dist/webcomponents/p-30c428b6.entry.js +5 -0
  778. package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
  779. package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
  780. package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
  781. package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
  782. package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
  783. package/dist/webcomponents/p-45356e9a.entry.js +5 -0
  784. package/dist/webcomponents/p-46513db4.entry.js +5 -0
  785. package/dist/webcomponents/p-4c13221a.entry.js +5 -0
  786. package/dist/webcomponents/p-51ce2c31.entry.js +5 -0
  787. package/dist/webcomponents/p-52df61cb.entry.js +5 -0
  788. package/dist/webcomponents/p-569134cf.entry.js +5 -0
  789. package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
  790. package/dist/webcomponents/p-5f373708.entry.js +5 -0
  791. package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
  792. package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
  793. package/dist/webcomponents/p-66006312.entry.js +5 -0
  794. package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
  795. package/dist/webcomponents/p-6OdfnwnK.js +5 -0
  796. package/dist/webcomponents/p-750799b7.entry.js +5 -0
  797. package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
  798. package/dist/webcomponents/p-765bfe27.entry.js +5 -0
  799. package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
  800. package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
  801. package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
  802. package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
  803. package/dist/webcomponents/p-82200563.entry.js +5 -0
  804. package/dist/webcomponents/p-83ff4579.entry.js +5 -0
  805. package/dist/webcomponents/p-85f8063b.entry.js +5 -0
  806. package/dist/webcomponents/p-8b558233.entry.js +5 -0
  807. package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
  808. package/dist/webcomponents/p-8e819355.entry.js +5 -0
  809. package/dist/webcomponents/p-92a9b9c4.entry.js +5 -0
  810. package/dist/webcomponents/p-966ad32f.entry.js +5 -0
  811. package/dist/webcomponents/p-9679d230.entry.js +5 -0
  812. package/dist/webcomponents/p-96dd663b.entry.js +5 -0
  813. package/dist/webcomponents/p-98843fa3.entry.js +5 -0
  814. package/dist/webcomponents/p-9S9bgUT0.js +5 -0
  815. package/dist/webcomponents/p-9a375eff.entry.js +5 -0
  816. package/dist/webcomponents/p-9b358cff.entry.js +5 -0
  817. package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
  818. package/dist/webcomponents/p-B-qLmYZC.js +5 -0
  819. package/dist/webcomponents/p-B55qsau4.js +5 -0
  820. package/dist/webcomponents/p-BIG-yees.js +5 -0
  821. package/dist/webcomponents/p-BWXfdbQH.js +5 -0
  822. package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
  823. package/dist/webcomponents/p-Bfm58jO6.js +5 -0
  824. package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
  825. package/dist/webcomponents/p-BkS6ujyf.js +5 -0
  826. package/dist/webcomponents/p-C2RBydfd.js +6 -0
  827. package/dist/webcomponents/p-CO5cOQQU.js +5 -0
  828. package/dist/webcomponents/p-CXMwM9m4.js +5 -0
  829. package/dist/webcomponents/p-D3tVP32U.js +5 -0
  830. package/dist/webcomponents/p-D3usVJE2.js +16 -0
  831. package/dist/webcomponents/p-DBmwzG9E.js +5 -0
  832. package/dist/webcomponents/p-DFN_so7I.js +5 -0
  833. package/dist/webcomponents/p-DIK54tTj.js +5 -0
  834. package/dist/webcomponents/p-DRVMm1Py.js +5 -0
  835. package/dist/webcomponents/p-DVjNHTTs.js +5 -0
  836. package/dist/webcomponents/p-DYA74R1r.js +5 -0
  837. package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
  838. package/dist/webcomponents/p-DxZJrIyL.js +5 -0
  839. package/dist/webcomponents/p-a382e115.entry.js +5 -0
  840. package/dist/webcomponents/p-a4ae72e3.entry.js +5 -0
  841. package/dist/webcomponents/p-a994c190.entry.js +5 -0
  842. package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
  843. package/dist/webcomponents/p-bhULC15U.js +5 -0
  844. package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
  845. package/dist/webcomponents/p-c211af17.entry.js +5 -0
  846. package/dist/webcomponents/p-c492d926.entry.js +5 -0
  847. package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
  848. package/dist/webcomponents/p-c846e784.entry.js +5 -0
  849. package/dist/webcomponents/p-c949d993.entry.js +5 -0
  850. package/dist/webcomponents/p-cF3ia5e9.js +5 -0
  851. package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
  852. package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
  853. package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
  854. package/dist/webcomponents/p-e1331288.entry.js +5 -0
  855. package/dist/webcomponents/p-e360a463.entry.js +5 -0
  856. package/dist/webcomponents/p-f078f972.entry.js +5 -0
  857. package/dist/webcomponents/p-f26038e2.entry.js +5 -0
  858. package/dist/webcomponents/p-f303f6b3.entry.js +5 -0
  859. package/dist/webcomponents/p-f6318e94.entry.js +5 -0
  860. package/dist/webcomponents/p-f85ee01c.entry.js +5 -0
  861. package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
  862. package/dist/webcomponents/p-ffe0241e.entry.js +5 -0
  863. package/dist/webcomponents/p-gvnfuTjd.js +5 -0
  864. package/dist/webcomponents/webcomponents.esm.js +5 -0
  865. package/package.json +3 -7
  866. package/cem/.gitkeep +0 -0
@@ -0,0 +1,1825 @@
1
+ /*!
2
+ * Construído por SERPRO
3
+ * © https://serpro.gov.br/ - MIT License.
4
+ */
5
+ import { Host, h, } from "@stencil/core";
6
+ import { generateUniqueId } from "../../shared/utils/id";
7
+ import { supportsNativeModalDialog, syncNativeModalDialog } from "../../shared/utils/native-dialog";
8
+ import { createRafBatcher } from "../../shared/utils/raf-batcher";
9
+ import { lockBodyScroll, unlockBodyScroll } from "../../shared/utils/scrollLock";
10
+ /**
11
+ * ## Design System
12
+ *
13
+ * Para a documentação completa de design, incluindo diretrizes de uso, acessibilidade e exemplos visuais, consulte o [Design System do GovBR](https://www.gov.br/ds/components/scrim?tab=designer).
14
+ *
15
+ * @category Feedback
16
+ * @status stable
17
+ * @slot default - Slot para o conteúdo principal a ser exibido sobre o fundo escurecido do scrim.
18
+ * @slot activator - Slot para o elemento ativador do scrim, com prioridade sobre a propriedade activator.
19
+ */
20
+ export class Scrim {
21
+ constructor() {
22
+ this.legibilityBatch = createRafBatcher(() => this.computeLegibilityRect());
23
+ this.hasActivatorSlot = false;
24
+ /** Rect do elemento alvo do scrim vazado. */
25
+ this.spotlightRect = null;
26
+ /**
27
+ * Identificador único.
28
+ * Caso não seja fornecido, um ID gerado automaticamente será usado.
29
+ */
30
+ this.customId = generateUniqueId();
31
+ /**
32
+ * Ativa/desativa o scrim
33
+ */
34
+ this.isOpen = false;
35
+ /**
36
+ * Desativa o fechamento do scrim ao ser clicado
37
+ */
38
+ this.disableCloseOnClick = false;
39
+ /**
40
+ * Define o valor de z-index do scrim
41
+ */
42
+ this.zIndex = null;
43
+ /**
44
+ * Cor de fundo personalizada para o scrim.
45
+ * Aceita os seguintes formatos de cor:
46
+ * - Cores nomeadas do CSS: 'red', 'blue', 'green', 'yellow', etc.
47
+ * - Códigos hexadecimais: '#ff0000', '#00ff00', '#0000ff', etc.
48
+ * - Valores RGB: 'rgb(255, 0, 0)', 'rgb(0, 255, 0)', etc.
49
+ * - Valores RGBA: 'rgba(255, 0, 0, 0.5)', 'rgba(0, 255, 0, 0.8)', etc.
50
+ * - Valores HSL: 'hsl(0, 100%, 50%)', 'hsl(120, 100%, 50%)', etc.
51
+ * - Valores HSLA: 'hsla(0, 100%, 50%, 0.5)', 'hsla(240, 100%, 50%, 0.7)', etc.
52
+ * Se não especificada, usa a cor padrão do tema.
53
+ */
54
+ this.bgColor = null;
55
+ /**
56
+ * Define a opacidade personalizada do scrim
57
+ */
58
+ this.customOpacity = null;
59
+ /**
60
+ * Define o modo de exibição do scrim:
61
+ * - `'fullscreen'`: Ocupa toda a tela (`position: fixed`). (_padrão_)
62
+ * - `'parent'`: Ocupa apenas o elemento pai (`position: absolute`).
63
+ * O elemento pai deve ter `position: relative` ou outro valor diferente de `static`.
64
+ *
65
+ * Para a variante `'legibility'`, este atributo é ignorado: o posicionamento é sempre
66
+ * calculado automaticamente a partir das coordenadas do elemento pai.
67
+ */
68
+ this.displayMode = 'fullscreen';
69
+ /**
70
+ * Determina quanto de rolagem (em pixels) é necessário para acionar a ação de fechamento automático do scrim.
71
+ */
72
+ this.scrollThreshold = 50;
73
+ /**
74
+ * Define o seletor para o elemento activator.
75
+ * Nota: O slot 'activator' tem prioridade sobre esta propriedade.
76
+ */
77
+ this.activator = null;
78
+ /**
79
+ * Define um rótulo acessível personalizado para o diálogo.
80
+ * Se não fornecido, será usado "Conteúdo do diálogo" como padrão.
81
+ */
82
+ this.ariaLabel = null;
83
+ /**
84
+ * Define a variante semântica do scrim
85
+ * - `'focus'`: Redireciona o foco hierárquico do usuário. Cor #000000 com opacidade 40%. (_padrão_)
86
+ * - `'spotlight'`: Scrim vazado — destaca um elemento específico criando uma fresta no overlay.
87
+ * Aplica as mesmas cores da variante `'focus'`. Use `spotlightTargetId` para indicar o elemento a ser destacado.
88
+ * - `'legibility'`: Melhora o contraste e leitura de texto sobre superfícies. Cor #000000 com opacidade 64%.
89
+ * Para cobertura parcial, use `legibilityAnchor` + `legibilitySize`.
90
+ * Para gradiente suave, use `bgColor` com um valor de gradiente CSS e `customOpacity="1"`,
91
+ * ex.: `bg-color="linear-gradient(to top, rgba(0,0,0,0.64), transparent)"`..
92
+ *
93
+ * Quando definida, aplica automaticamente as especificações de cor e opacidade do Design System.
94
+ * As propriedades `bgColor` e `customOpacity` têm prioridade e sobrepõem os valores da variante.
95
+ */
96
+ this.variant = 'focus';
97
+ /**
98
+ * Define a borda de ancoragem da faixa de cobertura da variante `legibility`.
99
+ *
100
+ * Controla de qual borda (ou centro) do elemento a máscara de overlay cresce,
101
+ * tendo seu tamanho determinado por `legibilitySize`.
102
+ *
103
+ * - `'top'`: faixa ancorada na borda superior, cresce para baixo.
104
+ * - `'bottom'`: faixa ancorada na borda inferior, cresce para cima.
105
+ * - `'left'`: faixa ancorada na borda esquerda, cresce para a direita.
106
+ * - `'right'`: faixa ancorada na borda direita, cresce para a esquerda.
107
+ * - `'center'`: faixa centralizada verticalmente no elemento.
108
+ *
109
+ * Quando `legibilitySize` é `null`, a máscara ocupa 100% independentemente
110
+ * da âncora definida, equivalendo a uma cobertura total.
111
+ *
112
+ * Só tem efeito quando `variant="legibility"`.
113
+ */
114
+ this.legibilityAnchor = 'bottom';
115
+ /**
116
+ * Define o tamanho da faixa de cobertura da variante `legibility`, usado em
117
+ * conjunto com `legibilityAnchor`.
118
+ *
119
+ * Aceita qualquer valor CSS de comprimento válido:
120
+ * - Percentual relativo ao elemento pai: `'40%'`, `'75%'`
121
+ * - Comprimento absoluto: `'120px'`, `'8rem'`, `'6em'`
122
+ * - Função CSS: `'calc(100% - 2rem)'`
123
+ *
124
+ * Quando `null` (padrão), a máscara ocupa **100%** da dimensão relevante:
125
+ * - **altura** para âncoras `top`, `bottom` e `center`
126
+ * - **largura** para âncoras `left` e `right`
127
+ *
128
+ * Só tem efeito quando `variant="legibility"` está definido.
129
+ */
130
+ this.legibilitySize = null;
131
+ /**
132
+ * Ativa o modo de scrim vazado (variante 'spotlight'), criando uma área de fresta no overlay
133
+ * que destaca o elemento referenciado pelo seletor CSS fornecido.
134
+ */
135
+ this.spotlightTargetId = null;
136
+ /**
137
+ * Espaçamento interno (em pixels) ao redor da área de fresta no scrim vazado.
138
+ */
139
+ this.spotlightPadding = 8;
140
+ /**
141
+ * Define a forma da área de fresta no scrim vazado.
142
+ * - 'rect': Retangular com bordas retas.
143
+ * - 'rounded': Retangular com bordas arredondadas (border-radius de 8px).
144
+ * - 'circle': Elipse inscrita na área do elemento alvo.
145
+ */
146
+ this.spotlightShape = 'rect';
147
+ /**
148
+ * Define como o scrim aplica estilos de layout ao elemento filho (slot padrão).
149
+ *
150
+ * - `'default'`: O scrim gerencia o layout do conteúdo, centralizando, animando e aplicando transformações e opacidade automaticamente.
151
+ *
152
+ * - `'none'`: o scrim age como um componente controlado pelo pai. O filho recebe apenas a máscara visual, sem interferência de posicionamento, transformação ou opacidade.
153
+ * Adequado para componentes que gerenciam seu próprio layout e estado de abertura. Além disso:
154
+ *
155
+ * - Foco e eventos globais** não são interceptados pelo scrim — o componente filho gerencia seu próprio foco, navegação por teclado e fechamento via ESC.
156
+ * - Clique no scrim emite `brScrimClose` sem fechar o scrim internamente, delegando o controle de estado ao pai (quem define `isOpen`).
157
+ * - Use `zIndex` apenas para sobrescrever a camada bloqueadora no fallback CSS. Máscara e painel devem usar subcamadas locais, sem aritmética entre camadas globais.
158
+ *
159
+ */
160
+ this.contentLayout = 'default';
161
+ /** Indica se o atributo `display-mode` foi explicitamente informado pelo usuário */
162
+ this.displayModeExplicit = false;
163
+ // ======================================================================
164
+ // PROPRIEDADES PRIVADAS E VARIÁVEIS INTERNAS
165
+ // ======================================================================
166
+ this.contentRef = null;
167
+ this.activatorElement = null;
168
+ this.lastScrollTop = 0;
169
+ this.scrollOrigin = null;
170
+ this.previouslyFocusedElement = null;
171
+ this.focusTimeoutId = null;
172
+ this.restoreFocusTimeoutId = null;
173
+ /** ResizeObserver que monitora o elemento alvo do spotlight para recalcular a posição. */
174
+ this.spotlightResizeObserver = null;
175
+ /** Elemento atualmente sendo destacado pelo scrim vazado. */
176
+ this.spotlightTargetElement = null;
177
+ /** Referência ao container interno para estilos locais e fallback sem `<dialog>`. */
178
+ this.scrimDivRef = null;
179
+ this.nativeDialogRef = null;
180
+ /** ResizeObserver que monitora o elemento pai para recalcular a posição da variante legibility. */
181
+ this.legibilityResizeObserver = null;
182
+ this.globalInterceptionAttached = false;
183
+ /**
184
+ * Flag que suprime handleGlobalFocus enquanto a modal filha está
185
+ * gerenciando ativamente sua própria sequência de foco (moveFocusIntoModal).
186
+ */
187
+ this.isModalFocusing = false;
188
+ this.modalFocusSuppressId = null;
189
+ /**
190
+ * Handler para o evento `brModalFocusReady` emitido pela modal filha.
191
+ * Desativa o guard imediatamente assim que o foco está estabilizado,
192
+ * cancelando o timeout de segurança do `suppressFocusGuard`.
193
+ */
194
+ this.handleModalFocusReady = () => {
195
+ if (!this.isModalFocusing)
196
+ return;
197
+ this.isModalFocusing = false;
198
+ if (this.modalFocusSuppressId !== null) {
199
+ clearTimeout(this.modalFocusSuppressId);
200
+ this.modalFocusSuppressId = null;
201
+ }
202
+ };
203
+ /**
204
+ * Handler para evento brModalOpen emitido por modal filha
205
+ */
206
+ this.handleModalOpen = (event) => {
207
+ const modalElement = event.target;
208
+ if (!this.isDirectChild(modalElement))
209
+ return;
210
+ this.suppressFocusGuard();
211
+ if (!this.isOpen) {
212
+ this.open();
213
+ }
214
+ };
215
+ /**
216
+ * Handler para evento brModalClose emitido por modal filha
217
+ */
218
+ this.handleModalClose = (event) => {
219
+ const modalElement = event.target;
220
+ if (!this.isDirectChild(modalElement))
221
+ return;
222
+ this.close();
223
+ };
224
+ this.handleActivatorClick = () => {
225
+ this.toggle();
226
+ };
227
+ this.handleScrollClose = () => {
228
+ if (this.scrollStrategy === 'close' && this.isActive) {
229
+ const currentScroll = this.getScrollPosition();
230
+ const reference = this.scrollOrigin ?? this.lastScrollTop;
231
+ if (Math.abs(currentScroll - reference) > this.scrollThreshold) {
232
+ this.scrollOrigin = null;
233
+ // Não fecha se tiver modal filha com autoClose=false (padrão)
234
+ if (this.hasModalWithAutoClose()) {
235
+ return;
236
+ }
237
+ this.isOpen = false;
238
+ return;
239
+ }
240
+ this.lastScrollTop = currentScroll;
241
+ }
242
+ };
243
+ // ======================================================================
244
+ // NAVEGAÇÃO POR TECLADO E INTERCEPTAÇÃO DE EVENTOS
245
+ // ======================================================================
246
+ this.handleKeyDown = (event) => {
247
+ if (!this.isActive)
248
+ return;
249
+ if (this.shouldHandleEscape(event)) {
250
+ this.isOpen = false;
251
+ return;
252
+ }
253
+ if (event.key === 'Tab') {
254
+ const modalChild = this.findModalChild();
255
+ if (modalChild?.show)
256
+ return;
257
+ this.handleTabNavigation(event);
258
+ }
259
+ };
260
+ this.handleGlobalKeyDown = (event) => {
261
+ if (!this.isActive)
262
+ return;
263
+ if (event.key === 'Escape' && !this.disableCloseOnClick) {
264
+ if (this.hasModalWithAutoClose())
265
+ return;
266
+ event.preventDefault();
267
+ this.isOpen = false;
268
+ return;
269
+ }
270
+ const realTarget = (event.composedPath?.()[0] ?? event.target);
271
+ if (!this.isElementInsideScrim(realTarget)) {
272
+ event.preventDefault();
273
+ event.stopPropagation();
274
+ event.stopImmediatePropagation();
275
+ this.focusFirstElement();
276
+ return;
277
+ }
278
+ };
279
+ // Intercepta TODOS os eventos de clique globalmente quando scrim está ativo
280
+ this.handleGlobalClick = (event) => {
281
+ if (!this.isActive)
282
+ return;
283
+ const target = (event.composedPath?.()[0] ?? event.target);
284
+ if (!this.isElementInsideScrim(target)) {
285
+ event.preventDefault();
286
+ event.stopPropagation();
287
+ event.stopImmediatePropagation();
288
+ if (!this.disableCloseOnClick) {
289
+ this.close();
290
+ }
291
+ return;
292
+ }
293
+ };
294
+ /**
295
+ * Intercepta eventos de foco globalmente
296
+ */
297
+ this.handleGlobalFocus = (event) => {
298
+ if (!this.isActive)
299
+ return;
300
+ const realTarget = (event.composedPath?.()[0] ?? event.target);
301
+ const insideScrim = this.isElementInsideScrim(realTarget);
302
+ if (this.isModalFocusing)
303
+ return;
304
+ if (!insideScrim) {
305
+ event.preventDefault();
306
+ event.stopPropagation();
307
+ event.stopImmediatePropagation();
308
+ requestAnimationFrame(() => {
309
+ this.focusFirstElement();
310
+ });
311
+ }
312
+ };
313
+ /**
314
+ * Handler para clique na máscara do scrim.
315
+ * Fecha o scrim se disableCloseOnClick for false e não houver modal filha com autoClose=false.
316
+ * Não afeta o comportamento de ESC, que sempre fecha (W3C Dialog Pattern).
317
+ */
318
+ this.handleMaskClick = (_event) => {
319
+ if (!this.disableCloseOnClick) {
320
+ if (this.hasModalWithAutoClose()) {
321
+ return;
322
+ }
323
+ if (this.contentLayout === 'none') {
324
+ this.brScrimClose.emit();
325
+ return;
326
+ }
327
+ this.close();
328
+ }
329
+ };
330
+ this.handleNativeCancel = (event) => {
331
+ event.preventDefault();
332
+ this.isOpen = false;
333
+ };
334
+ /**
335
+ * Recalcula as coordenadas da fresta com base no bounding rect do elemento alvo.
336
+ * Coordenadas são relativas ao viewport (mode-fullscreen) ou ao elemento pai (mode-parent).
337
+ */
338
+ this.computeSpotlightRect = () => {
339
+ if (this.spotlightTargetElement === null)
340
+ return;
341
+ const targetRect = this.spotlightTargetElement.getBoundingClientRect();
342
+ if (this.effectiveDisplayMode === 'parent' && this.el.parentElement !== null) {
343
+ const parentRect = this.el.parentElement.getBoundingClientRect();
344
+ this.spotlightRect = new DOMRect(targetRect.left - parentRect.left, targetRect.top - parentRect.top, targetRect.width, targetRect.height);
345
+ }
346
+ else {
347
+ this.spotlightRect = new DOMRect(targetRect.left, targetRect.top, targetRect.width, targetRect.height);
348
+ }
349
+ };
350
+ /**
351
+ * Recalcula as coordenadas do elemento pai via getBoundingClientRect e aplica
352
+ * como estilos inline no div interno, sobrepondo o `inset: 0` do mode-fullscreen.
353
+ */
354
+ this.computeLegibilityRect = () => {
355
+ const parent = this.el.parentElement;
356
+ if (parent === null || this.scrimDivRef === null)
357
+ return;
358
+ const rect = parent.getBoundingClientRect();
359
+ this.scrimDivRef.style.setProperty('position', 'fixed');
360
+ this.scrimDivRef.style.setProperty('inset', 'unset');
361
+ this.scrimDivRef.style.setProperty('top', '0');
362
+ this.scrimDivRef.style.setProperty('left', '0');
363
+ this.scrimDivRef.style.setProperty('width', `${rect.width}px`);
364
+ this.scrimDivRef.style.setProperty('height', `${rect.height}px`);
365
+ // Um ancestral transformado redefine a origem de position: fixed (caso dos previews).
366
+ const fixedOrigin = this.scrimDivRef.getBoundingClientRect();
367
+ this.scrimDivRef.style.setProperty('top', `${rect.top - fixedOrigin.top}px`);
368
+ this.scrimDivRef.style.setProperty('left', `${rect.left - fixedOrigin.left}px`);
369
+ };
370
+ this.scheduleLegibilityRect = () => this.legibilityBatch.schedule(undefined);
371
+ }
372
+ get isActive() {
373
+ return this.isLegibilityVariant || this.isOpen;
374
+ }
375
+ // ======================================================================
376
+ // LIFECYCLE HOOKS E WATCHERS
377
+ // ======================================================================
378
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: sincroniza foco, scroll, spotlight e emissão de eventos para abertura/fechamento.
379
+ handleOpenChange(newValue) {
380
+ // Cancelar qualquer timeout anterior
381
+ if (this.focusTimeoutId !== null) {
382
+ clearTimeout(this.focusTimeoutId);
383
+ this.focusTimeoutId = null;
384
+ }
385
+ if (this.restoreFocusTimeoutId !== null) {
386
+ clearTimeout(this.restoreFocusTimeoutId);
387
+ this.restoreFocusTimeoutId = null;
388
+ }
389
+ // Legibility é sempre ativo — ignora tentativas de fechar
390
+ if (this.isLegibilityVariant) {
391
+ this.updateStyles();
392
+ if (newValue)
393
+ this.brScrimOpen.emit();
394
+ return;
395
+ }
396
+ if (newValue && this.scrollStrategy === 'close') {
397
+ const currentScroll = window.scrollY;
398
+ this.lastScrollTop = currentScroll;
399
+ this.scrollOrigin = currentScroll;
400
+ }
401
+ this.updateStyles();
402
+ if (this.isActive) {
403
+ this.previouslyFocusedElement = document.activeElement;
404
+ this.applyScrollStrategy();
405
+ if (this.contentLayout !== 'none' && !this.usesNativeTopLayer) {
406
+ this.addGlobalEventInterception();
407
+ const hasModalChild = this.findModalChild() !== null;
408
+ if (hasModalChild) {
409
+ this.suppressFocusGuard();
410
+ }
411
+ else {
412
+ this.focusTimeoutId = setTimeout(() => {
413
+ this.focusFirstElement();
414
+ }, 100);
415
+ }
416
+ }
417
+ this.setupSpotlight();
418
+ this.brScrimOpen.emit();
419
+ }
420
+ else {
421
+ this.closeModalChild();
422
+ this.cleanupSpotlight();
423
+ this.resetScrolling();
424
+ if (this.contentLayout !== 'none') {
425
+ this.removeGlobalEventInterception();
426
+ this.restoreFocus();
427
+ this.brScrimClose.emit();
428
+ }
429
+ }
430
+ }
431
+ updateStyles() {
432
+ // Aplica defaults da variante antes dos overrides manuais
433
+ this.applyVariantDefaults();
434
+ if (this.zIndex !== null && this.zIndex !== undefined) {
435
+ this.el.style.zIndex = `${this.zIndex}`;
436
+ this.el.style.setProperty('--z-index-layer-4', `${this.zIndex}`);
437
+ }
438
+ // bgColor e customOpacity sobrepõem os valores da variante
439
+ if (this.bgColor !== null) {
440
+ this.el.style.setProperty('--surface-overlay-scrim', this.bgColor);
441
+ }
442
+ if (this.customOpacity !== null) {
443
+ this.el.style.setProperty('--br-scrim-opacity', `${this.customOpacity}`);
444
+ }
445
+ }
446
+ handleVariantChange() {
447
+ this.updateStyles();
448
+ if (this.isActive) {
449
+ if (this.isLegibilityVariant) {
450
+ this.removeGlobalEventInterception();
451
+ this.resetScrolling();
452
+ this.cleanupSpotlight();
453
+ this.setupLegibility();
454
+ }
455
+ else if (this.variant === 'spotlight') {
456
+ this.cleanupLegibility();
457
+ if (!this.usesNativeTopLayer)
458
+ this.addGlobalEventInterception();
459
+ this.setupSpotlight();
460
+ }
461
+ else {
462
+ this.cleanupLegibility();
463
+ if (!this.usesNativeTopLayer)
464
+ this.addGlobalEventInterception();
465
+ this.cleanupSpotlight();
466
+ }
467
+ }
468
+ }
469
+ handleLayerModeChange() {
470
+ this.removeGlobalEventInterception();
471
+ if (this.isActive && this.contentLayout !== 'none' && !this.usesNativeTopLayer) {
472
+ this.addGlobalEventInterception();
473
+ }
474
+ }
475
+ handleSpotlightChange() {
476
+ if (this.isActive) {
477
+ this.setupSpotlight();
478
+ }
479
+ }
480
+ handleActivatorChange() {
481
+ this.removeActivatorClickListener();
482
+ this.setupActivator();
483
+ }
484
+ connectedCallback() {
485
+ if (this.scrollStrategy === 'close') {
486
+ const currentScroll = window.scrollY;
487
+ this.lastScrollTop = currentScroll;
488
+ this.scrollOrigin = currentScroll;
489
+ window.addEventListener('scroll', this.handleScrollClose, { passive: true });
490
+ }
491
+ }
492
+ disconnectedCallback() {
493
+ // Limpar timeouts pendentes
494
+ if (this.focusTimeoutId !== null) {
495
+ clearTimeout(this.focusTimeoutId);
496
+ this.focusTimeoutId = null;
497
+ }
498
+ if (this.restoreFocusTimeoutId !== null) {
499
+ clearTimeout(this.restoreFocusTimeoutId);
500
+ this.restoreFocusTimeoutId = null;
501
+ }
502
+ window.removeEventListener('scroll', this.handleScrollClose);
503
+ if (this.scrollStrategy === 'block' && this.isActive) {
504
+ unlockBodyScroll();
505
+ }
506
+ if (this.contentRef !== null) {
507
+ this.contentRef.removeEventListener('keydown', this.handleKeyDown);
508
+ }
509
+ this.removeActivatorClickListener();
510
+ this.cleanupActivatorSlotClick();
511
+ this.removeGlobalEventInterception();
512
+ this.removeModalEventListener();
513
+ this.cleanupSpotlight();
514
+ this.cleanupLegibility();
515
+ if (this.modalFocusSuppressId !== null) {
516
+ clearTimeout(this.modalFocusSuppressId);
517
+ this.modalFocusSuppressId = null;
518
+ }
519
+ }
520
+ componentWillLoad() {
521
+ this.hasActivatorSlot = this.checkActivatorSlot('activator');
522
+ this.displayModeExplicit = this.el.hasAttribute('display-mode');
523
+ }
524
+ componentDidLoad() {
525
+ this.updateStyles();
526
+ this.setupActivator();
527
+ this.setupActivatorSlotClick();
528
+ this.addContentEventListener();
529
+ this.listenToModalEvents();
530
+ if (this.isLegibilityVariant) {
531
+ this.setupLegibility();
532
+ }
533
+ else if (this.isActive) {
534
+ this.applyScrollStrategy();
535
+ if (this.contentLayout !== 'none' && !this.usesNativeTopLayer) {
536
+ this.addGlobalEventInterception();
537
+ const modalChild = this.findModalChild();
538
+ if (modalChild === null) {
539
+ this.focusFirstElement();
540
+ this.setupSpotlight();
541
+ }
542
+ else {
543
+ this.suppressFocusGuard();
544
+ }
545
+ }
546
+ }
547
+ }
548
+ componentDidRender() {
549
+ syncNativeModalDialog(this.nativeDialogRef, this.isActive && this.usesNativeDialog);
550
+ }
551
+ // ======================================================================
552
+ // MÉTODOS PÚBLICOS (API)
553
+ // ======================================================================
554
+ /**
555
+ * Define o limite de rolagem para o fechamento automático do scrim.
556
+ */
557
+ async setScrollThreshold(threshold) {
558
+ this.scrollThreshold = threshold;
559
+ }
560
+ /**
561
+ * Método público para exibir o scrim
562
+ */
563
+ async open() {
564
+ this.isOpen = true;
565
+ }
566
+ /**
567
+ * Método público para esconder o scrim
568
+ */
569
+ async close() {
570
+ if (this.isLegibilityVariant)
571
+ return;
572
+ this.isOpen = false;
573
+ }
574
+ /**
575
+ * Método público para alternar o estado de exibição do scrim
576
+ */
577
+ async toggle() {
578
+ if (this.isLegibilityVariant)
579
+ return;
580
+ this.isOpen = !this.isActive;
581
+ }
582
+ /**
583
+ * Recalcula manualmente a posição e dimensões da fresta do scrim vazado.
584
+ * Útil quando o elemento alvo muda de posição sem disparar resize ou scroll.
585
+ */
586
+ async updateSpotlight() {
587
+ this.computeSpotlightRect();
588
+ }
589
+ /**
590
+ * Adiciona event listener ao contentRef para capturar eventos de teclado
591
+ * e gerenciar a navegação por teclado dentro do scrim.
592
+ */
593
+ addContentEventListener() {
594
+ if (this.contentRef !== null) {
595
+ this.contentRef.addEventListener('keydown', this.handleKeyDown);
596
+ }
597
+ }
598
+ // ======================================================================
599
+ // GERENCIAMENTO DE COMPONENTES FILHOS
600
+ // ======================================================================
601
+ /**
602
+ * Ativa o guard que suprime `handleGlobalFocus` enquanto a modal filha executa
603
+ * sua sequência assíncrona de foco (`moveFocusIntoModal`).
604
+ *
605
+ * O guard é desativado assim que o evento `brModalFocusReady` chega (via
606
+ * `handleModalFocusReady`). O timeout é apenas um safety net para o caso de
607
+ * o evento nunca chegar (ex: erro interno na modal).
608
+ */
609
+ suppressFocusGuard(safetyMs = 1000) {
610
+ this.isModalFocusing = true;
611
+ if (this.modalFocusSuppressId !== null) {
612
+ clearTimeout(this.modalFocusSuppressId);
613
+ }
614
+ this.modalFocusSuppressId = setTimeout(() => {
615
+ this.isModalFocusing = false;
616
+ this.modalFocusSuppressId = null;
617
+ }, safetyMs);
618
+ }
619
+ /**
620
+ * Verifica se um elemento é filho direto deste scrim (não nested)
621
+ */
622
+ isDirectChild(element) {
623
+ const children = this.getDirectChildren();
624
+ return children.some((child) => child === element || child.contains(element));
625
+ }
626
+ /**
627
+ * Adiciona listeners para eventos brModalOpen, brModalClose e brModalFocusReady das modais filhas
628
+ */
629
+ listenToModalEvents() {
630
+ this.el.addEventListener('brModalOpen', this.handleModalOpen);
631
+ this.el.addEventListener('brModalClose', this.handleModalClose);
632
+ this.el.addEventListener('brModalOpened', this.handleModalFocusReady);
633
+ }
634
+ /**
635
+ * Remove listeners dos eventos da modal
636
+ */
637
+ removeModalEventListener() {
638
+ this.el.removeEventListener('brModalOpen', this.handleModalOpen);
639
+ this.el.removeEventListener('brModalClose', this.handleModalClose);
640
+ this.el.removeEventListener('brModalOpened', this.handleModalFocusReady);
641
+ }
642
+ /**
643
+ * Retorna os elementos filhos diretos do scrim via slot padrão
644
+ */
645
+ getDirectChildren() {
646
+ const shadowRoot = this.el.shadowRoot;
647
+ if (shadowRoot === null)
648
+ return [];
649
+ const slot = shadowRoot.querySelector('slot:not([name])');
650
+ if (slot === null)
651
+ return [];
652
+ return slot.assignedElements();
653
+ }
654
+ /**
655
+ * Busca uma modal filha direta do scrim
656
+ */
657
+ findModalChild() {
658
+ const children = this.getDirectChildren();
659
+ const modalElement = children.find((child) => child.tagName === 'BR-MODAL');
660
+ return modalElement ?? null;
661
+ }
662
+ /**
663
+ * Verifica se há uma modal filha com autoClose=false (padrão ou explícito)
664
+ * Retorna true se:
665
+ * - Existe modal filha E autoClose não é explicitamente true
666
+ */
667
+ hasModalWithAutoClose() {
668
+ const modal = this.findModalChild();
669
+ return modal !== null && modal.autoClose !== true;
670
+ }
671
+ /**
672
+ * Fecha a modal filha direta, se existir e estiver aberta.
673
+ * Chamado quando o scrim é fechado (ex: via ESC) para garantir sincronização de estado.
674
+ */
675
+ closeModalChild() {
676
+ const modal = this.findModalChild();
677
+ if (modal?.show) {
678
+ modal.show = false;
679
+ }
680
+ }
681
+ // ======================================================================
682
+ // GERENCIAMENTO DO ACTIVATOR (ELEMENTO ACIONADOR)
683
+ // ======================================================================
684
+ checkActivatorSlot(slotName) {
685
+ return this.el.querySelector(`[slot="${slotName}"]`) !== null;
686
+ }
687
+ setupActivatorSlotClick() {
688
+ if (this.el.shadowRoot === null)
689
+ return;
690
+ const slotEl = this.el.shadowRoot.querySelector('slot[name="activator"]');
691
+ if (slotEl === null || slotEl === undefined)
692
+ return;
693
+ const assignedElements = slotEl.assignedElements?.() ?? [];
694
+ if (assignedElements.length === 1) {
695
+ const el = assignedElements[0];
696
+ if (el && typeof el.addEventListener === 'function') {
697
+ el.addEventListener('click', this.handleActivatorClick);
698
+ }
699
+ }
700
+ else if (assignedElements.length > 1) {
701
+ console.warn('br-scrim: Slot "activator" deve conter apenas um elemento para aplicar o onClick automaticamente.');
702
+ }
703
+ }
704
+ setupActivator() {
705
+ this.removeActivatorClickListener();
706
+ this.activatorElement = null;
707
+ if (this.hasActivatorSlot || this.activator == null || this.activator === '') {
708
+ return;
709
+ }
710
+ if (this.activator === 'parent') {
711
+ const parentElement = this.el.parentElement;
712
+ if (parentElement !== null) {
713
+ this.activatorElement = parentElement;
714
+ }
715
+ }
716
+ else {
717
+ try {
718
+ const element = document.querySelector(this.activator);
719
+ if (element instanceof HTMLElement) {
720
+ this.activatorElement = element;
721
+ }
722
+ }
723
+ catch {
724
+ console.warn(`br-scrim: Seletor activator inválido: ${this.activator}`);
725
+ }
726
+ }
727
+ this.addActivatorClickListener();
728
+ }
729
+ addActivatorClickListener() {
730
+ if (this.activatorElement === null || this.activatorElement === undefined)
731
+ return;
732
+ this.activatorElement.addEventListener('click', this.handleActivatorClick);
733
+ }
734
+ removeActivatorClickListener() {
735
+ if (this.activatorElement === null || this.activatorElement === undefined)
736
+ return;
737
+ this.activatorElement.removeEventListener('click', this.handleActivatorClick);
738
+ }
739
+ cleanupActivatorSlotClick() {
740
+ if (this.el.shadowRoot === null)
741
+ return;
742
+ const slotEl = this.el.shadowRoot.querySelector('slot[name="activator"]');
743
+ const assignedElements = slotEl?.assignedElements?.() ?? [];
744
+ if (assignedElements.length === 1) {
745
+ const element = assignedElements[0];
746
+ if (element && typeof element.removeEventListener === 'function') {
747
+ element.removeEventListener('click', this.handleActivatorClick);
748
+ }
749
+ }
750
+ }
751
+ // ======================================================================
752
+ // ESTRATÉGIAS DE ROLAGEM (SCROLL)
753
+ // ======================================================================
754
+ applyScrollStrategy() {
755
+ if (this.scrollStrategy === 'block') {
756
+ this.enableScrollBlock();
757
+ }
758
+ else if (this.scrollStrategy === 'close') {
759
+ this.enableScrollWatcher();
760
+ }
761
+ }
762
+ getScrollPosition() {
763
+ const targetWindow = this.el?.ownerDocument?.defaultView || window;
764
+ return targetWindow?.scrollY ?? targetWindow?.pageYOffset ?? 0;
765
+ }
766
+ enableScrollBlock() {
767
+ lockBodyScroll();
768
+ }
769
+ enableScrollWatcher() {
770
+ const currentScroll = window.scrollY;
771
+ this.lastScrollTop = currentScroll;
772
+ this.scrollOrigin = currentScroll;
773
+ window.addEventListener('scroll', this.handleScrollClose, { passive: true });
774
+ }
775
+ resetScrolling() {
776
+ if (this.scrollStrategy === 'block') {
777
+ unlockBodyScroll();
778
+ }
779
+ window.removeEventListener('scroll', this.handleScrollClose);
780
+ this.scrollOrigin = null;
781
+ }
782
+ // ======================================================================
783
+ // ACESSIBILIDADE E GERENCIAMENTO DE FOCO
784
+ // ======================================================================
785
+ focusFirstElement() {
786
+ if (this.contentRef == null)
787
+ return;
788
+ const modalChild = this.findModalChild();
789
+ if (modalChild?.show) {
790
+ // Devolver foco ao container da modal — a própria modal gerencia Tab/Shift+Tab internamente
791
+ const modalDialogEl = modalChild.shadowRoot?.querySelector('.br-modal');
792
+ modalDialogEl?.focus();
793
+ return;
794
+ }
795
+ this.contentRef.setAttribute('tabindex', '-1');
796
+ this.contentRef.focus();
797
+ const focusableElements = this.getFocusableElements();
798
+ if (focusableElements.length > 0) {
799
+ const firstElement = focusableElements[0];
800
+ if (firstElement !== null && firstElement !== undefined) {
801
+ firstElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
802
+ firstElement.focus({ preventScroll: true });
803
+ }
804
+ }
805
+ }
806
+ restoreFocus() {
807
+ let targetElement = null;
808
+ if (this.previouslyFocusedElement instanceof HTMLElement && this.previouslyFocusedElement.isConnected) {
809
+ targetElement = this.previouslyFocusedElement;
810
+ }
811
+ else if (this.activatorElement instanceof HTMLElement) {
812
+ targetElement = this.activatorElement;
813
+ }
814
+ else {
815
+ const slotEl = this.el.shadowRoot?.querySelector('slot[name="activator"]');
816
+ if (this.hasActivatorSlot) {
817
+ const assignedElements = slotEl.assignedElements?.() ?? [];
818
+ if (assignedElements.length > 0 && assignedElements[0] instanceof HTMLElement) {
819
+ targetElement = assignedElements[0];
820
+ }
821
+ }
822
+ }
823
+ if (targetElement !== null && targetElement !== undefined) {
824
+ this.restoreFocusTimeoutId = setTimeout(() => {
825
+ try {
826
+ targetElement?.focus();
827
+ }
828
+ catch (error) {
829
+ console.warn('br-scrim: Erro ao restaurar foco:', error);
830
+ }
831
+ }, 100);
832
+ }
833
+ }
834
+ getFocusableElements() {
835
+ if (this.contentRef == null)
836
+ return [];
837
+ const defaultSlot = this.contentRef.querySelector('slot:not([name])');
838
+ if (defaultSlot === null || defaultSlot === undefined)
839
+ return [];
840
+ const assignedElements = defaultSlot.assignedElements({ flatten: true });
841
+ const focusableElements = [];
842
+ assignedElements.forEach((el) => {
843
+ if (!(el instanceof HTMLElement))
844
+ return;
845
+ if (el.matches(Scrim.FOCUSABLE_SELECTORS)) {
846
+ focusableElements.push(el);
847
+ }
848
+ const nestedFocusables = Array.from(el.querySelectorAll(Scrim.FOCUSABLE_SELECTORS));
849
+ focusableElements.push(...nestedFocusables);
850
+ });
851
+ return this.filterVisibleElements(focusableElements);
852
+ }
853
+ filterVisibleElements(elements) {
854
+ return elements.filter((el) => el.offsetWidth > 0 && el.offsetHeight > 0 && getComputedStyle(el).visibility !== 'hidden');
855
+ }
856
+ /**
857
+ * Intercepta todos os eventos de teclado globalmente quando o scrim está ativo.
858
+ *
859
+ * Usa `composedPath()[0]` para obter o elemento real com foco, mesmo dentro de shadow roots.
860
+ * `event.target` é redirecionado ao cruzar shadow boundaries e não reflete o elemento concreto
861
+ * quando o foco está dentro do shadow DOM de componentes filhos como `br-modal`.
862
+ */
863
+ handleDocumentKeyDown(event) {
864
+ if (!this.isActive)
865
+ return;
866
+ if ((event.key === 'Escape' || event.key === 'Esc') && !this.disableCloseOnClick) {
867
+ if (this.hasModalWithAutoClose())
868
+ return;
869
+ this.close();
870
+ }
871
+ }
872
+ shouldHandleEscape(event) {
873
+ return (event.key === 'Escape' || event.key === 'Esc') && this.isActive;
874
+ }
875
+ handleTabNavigation(event) {
876
+ const focusableElements = this.getFocusableElements();
877
+ if (focusableElements.length === 0) {
878
+ event.preventDefault();
879
+ return;
880
+ }
881
+ const firstElement = focusableElements[0];
882
+ const lastElement = focusableElements[focusableElements.length - 1];
883
+ const isTabForward = !event.shiftKey;
884
+ if (this.shouldTrapFocus(isTabForward, firstElement, lastElement, event)) {
885
+ event.preventDefault();
886
+ this.wrapFocus(isTabForward, firstElement, lastElement);
887
+ }
888
+ }
889
+ shouldTrapFocus(isTabForward, firstElement, lastElement, event) {
890
+ const activeEl = (event?.composedPath?.()[0] ?? document.activeElement);
891
+ return (isTabForward && activeEl === lastElement) || (!isTabForward && activeEl === firstElement);
892
+ }
893
+ wrapFocus(isTabForward, firstElement, lastElement) {
894
+ (isTabForward ? firstElement : lastElement).focus();
895
+ }
896
+ /**
897
+ * Verifica se um elemento está dentro do scrim.
898
+ * Funciona com shadow DOM: aceita tanto o host (br-modal) quanto elementos
899
+ * dentro de shadow roots filhos — verifica o host mais próximo via getRootNode.
900
+ */
901
+ isElementInsideScrim(element) {
902
+ if (this.el.contains(element)) {
903
+ return true;
904
+ }
905
+ let node = element;
906
+ while (node !== null && node !== document) {
907
+ const root = node.getRootNode();
908
+ if (root instanceof ShadowRoot) {
909
+ const host = root.host;
910
+ if (this.el.contains(host)) {
911
+ return true;
912
+ }
913
+ node = host;
914
+ }
915
+ else {
916
+ break;
917
+ }
918
+ }
919
+ return false;
920
+ }
921
+ /**
922
+ * Adiciona interceptação global de eventos
923
+ */
924
+ addGlobalEventInterception() {
925
+ if (this.globalInterceptionAttached)
926
+ return;
927
+ document.addEventListener('keydown', this.handleGlobalKeyDown, true);
928
+ // Intercepta eventos de clique globalmente
929
+ document.addEventListener('click', this.handleGlobalClick, true);
930
+ document.addEventListener('mousedown', this.handleGlobalClick, true);
931
+ document.addEventListener('mouseup', this.handleGlobalClick, true);
932
+ // Intercepta eventos de foco.
933
+ document.addEventListener('focusin', this.handleGlobalFocus, true);
934
+ this.globalInterceptionAttached = true;
935
+ }
936
+ /**
937
+ * Remove interceptação global de eventos
938
+ */
939
+ removeGlobalEventInterception() {
940
+ if (!this.globalInterceptionAttached)
941
+ return;
942
+ document.removeEventListener('keydown', this.handleGlobalKeyDown, true);
943
+ document.removeEventListener('click', this.handleGlobalClick, true);
944
+ document.removeEventListener('mousedown', this.handleGlobalClick, true);
945
+ document.removeEventListener('mouseup', this.handleGlobalClick, true);
946
+ document.removeEventListener('focusin', this.handleGlobalFocus, true);
947
+ this.globalInterceptionAttached = false;
948
+ }
949
+ // ======================================================================
950
+ // VARIANTE SEMÂNTICA (FOCO / LEGIBILIDADE / INIBIÇÃO)
951
+ // ======================================================================
952
+ /**
953
+ * Retorna true quando a variante é 'legibility'.
954
+ * Nesse modo o scrim é puramente decorativo: nunca fecha, nunca intercepta
955
+ * eventos de teclado/foco/clique e nunca bloqueia rolagem.
956
+ */
957
+ get isLegibilityVariant() {
958
+ return this.variant === 'legibility';
959
+ }
960
+ /**
961
+ * Resolve o display-mode efetivo.
962
+ * Para a variante 'legibility', usa 'parent' por padrão — a menos que o
963
+ * atributo `display-mode` tenha sido explicitamente definido pelo usuário.
964
+ */
965
+ get effectiveDisplayMode() {
966
+ if (this.variant === 'legibility' && !this.displayModeExplicit) {
967
+ return 'parent';
968
+ }
969
+ return this.displayMode;
970
+ }
971
+ get usesNativeDialog() {
972
+ return this.effectiveDisplayMode === 'fullscreen' && !this.isLegibilityVariant && this.contentLayout !== 'none';
973
+ }
974
+ get usesNativeTopLayer() {
975
+ return this.usesNativeDialog && supportsNativeModalDialog();
976
+ }
977
+ /**
978
+ * Aplica as especificações de cor e opacidade conforme a variante selecionada.
979
+ */
980
+ applyVariantDefaults() {
981
+ this.el.style.removeProperty('--surface-overlay-scrim');
982
+ this.el.style.removeProperty('--br-scrim-opacity');
983
+ this.el.style.removeProperty('--br-scrim-mask-size');
984
+ switch (this.variant) {
985
+ case 'focus':
986
+ case 'spotlight':
987
+ if (this.bgColor === null) {
988
+ this.el.style.setProperty('--surface-overlay-scrim', '#000000');
989
+ }
990
+ if (this.customOpacity === null) {
991
+ this.el.style.setProperty('--br-scrim-opacity', '0.4');
992
+ }
993
+ break;
994
+ case 'legibility': {
995
+ if (this.legibilitySize !== null) {
996
+ this.el.style.setProperty('--br-scrim-mask-size', this.legibilitySize);
997
+ }
998
+ else {
999
+ this.el.style.removeProperty('--br-scrim-mask-size');
1000
+ }
1001
+ if (this.bgColor === null) {
1002
+ this.el.style.setProperty('--surface-overlay-scrim', '#000000');
1003
+ }
1004
+ if (this.customOpacity === null) {
1005
+ // Se bgColor for um gradiente, o usuário deve setar customOpacity=1 ou omitir
1006
+ this.el.style.setProperty('--br-scrim-opacity', '0.64');
1007
+ }
1008
+ break;
1009
+ }
1010
+ }
1011
+ }
1012
+ // ======================================================================
1013
+ // SCRIM VAZADO (SPOTLIGHT)
1014
+ // ======================================================================
1015
+ /**
1016
+ * Inicializa o modo de scrim vazado: resolve o elemento alvo, calcula o rect
1017
+ * inicial e instala um ResizeObserver para atualizar automaticamente.
1018
+ * Só opera quando `variant === 'spotlight'`.
1019
+ */
1020
+ setupSpotlight() {
1021
+ this.cleanupSpotlight();
1022
+ if (this.variant !== 'spotlight')
1023
+ return;
1024
+ const target = this.resolveSpotlightTarget();
1025
+ if (target === null)
1026
+ return;
1027
+ this.spotlightTargetElement = target;
1028
+ this.computeSpotlightRect();
1029
+ if (typeof ResizeObserver !== 'undefined') {
1030
+ this.spotlightResizeObserver = new ResizeObserver(this.computeSpotlightRect);
1031
+ this.spotlightResizeObserver.observe(target);
1032
+ }
1033
+ window.addEventListener('resize', this.computeSpotlightRect);
1034
+ window.addEventListener('scroll', this.computeSpotlightRect, { capture: true, passive: true });
1035
+ }
1036
+ /**
1037
+ * Desmonta o modo de scrim vazado, removendo observers e limpando o estado.
1038
+ */
1039
+ cleanupSpotlight() {
1040
+ if (this.spotlightResizeObserver !== null) {
1041
+ this.spotlightResizeObserver.disconnect();
1042
+ this.spotlightResizeObserver = null;
1043
+ }
1044
+ this.spotlightTargetElement = null;
1045
+ this.spotlightRect = null;
1046
+ window.removeEventListener('resize', this.computeSpotlightRect);
1047
+ window.removeEventListener('scroll', this.computeSpotlightRect, true);
1048
+ }
1049
+ /**
1050
+ * Resolve o elemento alvo do spotlight via prop `spotlightTargetId` (seletor CSS).
1051
+ */
1052
+ resolveSpotlightTarget() {
1053
+ if (this.spotlightTargetId !== null && this.spotlightTargetId !== '') {
1054
+ try {
1055
+ return document.querySelector(this.spotlightTargetId);
1056
+ }
1057
+ catch {
1058
+ console.warn(`br-scrim: Seletor spotlightTargetId inválido: ${this.spotlightTargetId}`);
1059
+ }
1060
+ }
1061
+ return null;
1062
+ }
1063
+ // ======================================================================
1064
+ // VARIANTE LEGIBILITY — POSICIONAMENTO POR BOUNDING RECT
1065
+ // ======================================================================
1066
+ /**
1067
+ * Inicializa o posicionamento da variante legibility.
1068
+ *
1069
+ * Aplica `position: fixed` com as coordenadas exatas do elemento pai via
1070
+ * `getBoundingClientRect`, sem exigir nenhum CSS adicional no pai.
1071
+ *
1072
+ * Com `ResizeObserver`, observa o pai **e todos os seus ancestrais**: quando um
1073
+ * elemento irmão muda de tamanho (ex: menu abrindo), o ancestral comum redimensiona
1074
+ * e o callback reposiciona o scrim automaticamente.
1075
+ */
1076
+ setupLegibility() {
1077
+ this.cleanupLegibility();
1078
+ if (!this.isLegibilityVariant)
1079
+ return;
1080
+ const parent = this.el.parentElement;
1081
+ if (parent === null)
1082
+ return;
1083
+ this.computeLegibilityRect();
1084
+ if (typeof ResizeObserver !== 'undefined') {
1085
+ this.legibilityResizeObserver = new ResizeObserver(() => this.scheduleLegibilityRect());
1086
+ this.legibilityResizeObserver.observe(parent);
1087
+ // Observa ancestrais até document.body para detectar deslocamentos causados
1088
+ // por elementos irmãos que empurram o pai (ex: menu abrindo acima dele).
1089
+ let ancestor = parent.parentElement;
1090
+ while (ancestor !== null && ancestor !== document.documentElement) {
1091
+ this.legibilityResizeObserver.observe(ancestor);
1092
+ ancestor = ancestor.parentElement;
1093
+ }
1094
+ }
1095
+ else {
1096
+ requestAnimationFrame(() => requestAnimationFrame(this.scheduleLegibilityRect));
1097
+ window.addEventListener('resize', this.scheduleLegibilityRect);
1098
+ }
1099
+ window.addEventListener('scroll', this.scheduleLegibilityRect, { capture: true, passive: true });
1100
+ window.addEventListener('load', this.scheduleLegibilityRect);
1101
+ }
1102
+ /**
1103
+ * Desmonta o posicionamento da variante legibility, removendo observers e listeners
1104
+ * e limpando os estilos inline aplicados ao div interno do scrim.
1105
+ */
1106
+ cleanupLegibility() {
1107
+ if (this.legibilityResizeObserver !== null) {
1108
+ this.legibilityResizeObserver.disconnect();
1109
+ this.legibilityResizeObserver = null;
1110
+ }
1111
+ this.legibilityBatch.cancel();
1112
+ window.removeEventListener('resize', this.scheduleLegibilityRect);
1113
+ window.removeEventListener('scroll', this.scheduleLegibilityRect, true);
1114
+ window.removeEventListener('load', this.scheduleLegibilityRect);
1115
+ this.resetLegibilityStyles();
1116
+ }
1117
+ /**
1118
+ * Remove os estilos inline de posicionamento aplicados pelo computeLegibilityRect.
1119
+ */
1120
+ resetLegibilityStyles() {
1121
+ if (this.scrimDivRef === null)
1122
+ return;
1123
+ this.scrimDivRef.style.removeProperty('position');
1124
+ this.scrimDivRef.style.removeProperty('inset');
1125
+ this.scrimDivRef.style.removeProperty('top');
1126
+ this.scrimDivRef.style.removeProperty('left');
1127
+ this.scrimDivRef.style.removeProperty('width');
1128
+ this.scrimDivRef.style.removeProperty('height');
1129
+ }
1130
+ // ======================================================================
1131
+ // UTILITÁRIOS
1132
+ // ======================================================================
1133
+ /**
1134
+ * Renderiza o SVG de overlay do scrim vazado (spotlight).
1135
+ * Retorna null quando não há elemento alvo resolvido.
1136
+ */
1137
+ renderSpotlightOverlay(maskId, rect, padding) {
1138
+ const spotlightShape = this.spotlightShape === 'circle' ? (h("ellipse", { cx: rect.left + rect.width / 2, cy: rect.top + rect.height / 2, rx: rect.width / 2 + padding, ry: rect.height / 2 + padding, fill: "black" })) : (h("rect", { x: rect.left - padding, y: rect.top - padding, width: rect.width + padding * 2, height: rect.height + padding * 2, rx: this.spotlightShape === 'rounded' ? 8 : 0, ry: this.spotlightShape === 'rounded' ? 8 : 0, fill: "black" }));
1139
+ return (h("svg", { class: "spotlight-overlay", "aria-hidden": "true", onClick: this.handleMaskClick, xmlns: "http://www.w3.org/2000/svg" }, h("defs", null, h("mask", { id: maskId }, h("rect", { width: "100%", height: "100%", fill: "white" }), spotlightShape)), h("rect", { class: "spotlight-overlay-rect", width: "100%", height: "100%", mask: `url(#${maskId})` })));
1140
+ }
1141
+ getCssClassMap() {
1142
+ return {
1143
+ 'br-scrim': true,
1144
+ opened: this.isActive,
1145
+ 'scroll-block': this.scrollStrategy === 'block',
1146
+ 'position-top': this.positionContent === 'top',
1147
+ 'position-bottom': this.positionContent === 'bottom',
1148
+ 'position-left': this.positionContent === 'left',
1149
+ 'position-right': this.positionContent === 'right',
1150
+ 'position-center': this.positionContent === 'center',
1151
+ 'mode-fullscreen': this.effectiveDisplayMode === 'fullscreen',
1152
+ 'mode-parent': this.effectiveDisplayMode === 'parent',
1153
+ 'variant-focus': this.variant === 'focus',
1154
+ 'variant-spotlight': this.variant === 'spotlight',
1155
+ 'variant-legibility': this.variant === 'legibility',
1156
+ 'legibility-anchor-top': this.variant === 'legibility' && this.legibilityAnchor === 'top',
1157
+ 'legibility-anchor-bottom': this.variant === 'legibility' && this.legibilityAnchor === 'bottom',
1158
+ 'legibility-anchor-left': this.variant === 'legibility' && this.legibilityAnchor === 'left',
1159
+ 'legibility-anchor-right': this.variant === 'legibility' && this.legibilityAnchor === 'right',
1160
+ 'legibility-anchor-center': this.variant === 'legibility' && this.legibilityAnchor === 'center',
1161
+ 'has-spotlight': this.spotlightRect !== null,
1162
+ 'content-layout-none': this.contentLayout === 'none',
1163
+ };
1164
+ }
1165
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: render preserva as variantes pública, local e nativa sem duplicar o conteúdo.
1166
+ render() {
1167
+ const maskId = `${this.customId}-spotlight-mask`;
1168
+ const padding = this.spotlightPadding;
1169
+ const rect = this.spotlightRect;
1170
+ const isDialogContainer = !this.isLegibilityVariant && this.contentLayout !== 'none';
1171
+ const maskElement = this.isLegibilityVariant ? (h("div", { class: "mask" })) : (h("div", { class: "mask", role: "button", "aria-label": "Fechar sobreposi\u00E7\u00E3o", tabIndex: 0, onClick: this.handleMaskClick, onKeyDown: (event) => {
1172
+ if (event.key === 'Enter' || event.key === ' ') {
1173
+ event.preventDefault();
1174
+ this.handleMaskClick(event);
1175
+ }
1176
+ } }));
1177
+ const contentElement = (h("div", { key: 'f5046cd6fdf7a128bed5b76fb7065fa3a7dcad24', ref: (el) => (this.contentRef = el ?? null), id: `${this.customId}-content`, class: this.contentLayout === 'none' ? 'content content-unwrapped' : 'content', tabIndex: this.contentLayout === 'none' ? undefined : -1 }, h("slot", { key: 'd341205278a651d39ebbd18e1802f14aeab1c1a4' })));
1178
+ return (h(Host, { key: 'a9aa507c3a541fc1978acc5269954b2ffebf2f6d' }, h("slot", { key: '53eb86b0900da07d1aa4ea6dd2116ae2c02a91d0', name: "activator" }), this.usesNativeDialog ? (h("dialog", { ref: (el) => {
1179
+ this.nativeDialogRef = el;
1180
+ this.scrimDivRef = el;
1181
+ }, class: this.getCssClassMap(), id: this.customId, role: this.usesNativeTopLayer ? undefined : 'dialog', "aria-modal": "true", "aria-label": this.ariaLabel || 'Conteúdo do diálogo', "data-visible": this.isActive ? 'true' : 'false', onCancel: this.handleNativeCancel, onKeyDown: this.handleKeyDown }, maskElement, rect !== null && this.renderSpotlightOverlay(maskId, rect, padding), contentElement)) : isDialogContainer ? (h("div", { ref: (el) => {
1182
+ this.nativeDialogRef = null;
1183
+ this.scrimDivRef = el;
1184
+ }, class: this.getCssClassMap(), id: this.customId, role: "dialog", "aria-modal": "true", "aria-label": this.ariaLabel || 'Conteúdo do diálogo', "data-visible": this.isActive ? 'true' : 'false', onKeyDown: this.handleKeyDown }, maskElement, rect !== null && this.renderSpotlightOverlay(maskId, rect, padding), contentElement)) : (h("div", { ref: (el) => {
1185
+ this.nativeDialogRef = null;
1186
+ this.scrimDivRef = el;
1187
+ }, class: this.getCssClassMap(), id: this.customId, role: "presentation", "data-visible": this.isActive ? 'true' : 'false' }, maskElement, rect !== null && this.renderSpotlightOverlay(maskId, rect, padding), contentElement))));
1188
+ }
1189
+ static get is() { return "br-scrim"; }
1190
+ static get encapsulation() { return "shadow"; }
1191
+ static get originalStyleUrls() {
1192
+ return {
1193
+ "$": ["scrim.scss"]
1194
+ };
1195
+ }
1196
+ static get styleUrls() {
1197
+ return {
1198
+ "$": ["scrim.css"]
1199
+ };
1200
+ }
1201
+ static get properties() {
1202
+ return {
1203
+ "customId": {
1204
+ "type": "string",
1205
+ "mutable": false,
1206
+ "complexType": {
1207
+ "original": "string",
1208
+ "resolved": "string",
1209
+ "references": {}
1210
+ },
1211
+ "required": false,
1212
+ "optional": false,
1213
+ "docs": {
1214
+ "tags": [],
1215
+ "text": "Identificador \u00FAnico.\nCaso n\u00E3o seja fornecido, um ID gerado automaticamente ser\u00E1 usado."
1216
+ },
1217
+ "getter": false,
1218
+ "setter": false,
1219
+ "reflect": true,
1220
+ "attribute": "custom-id",
1221
+ "defaultValue": "generateUniqueId()"
1222
+ },
1223
+ "isOpen": {
1224
+ "type": "boolean",
1225
+ "mutable": true,
1226
+ "complexType": {
1227
+ "original": "boolean",
1228
+ "resolved": "boolean",
1229
+ "references": {}
1230
+ },
1231
+ "required": false,
1232
+ "optional": false,
1233
+ "docs": {
1234
+ "tags": [],
1235
+ "text": "Ativa/desativa o scrim"
1236
+ },
1237
+ "getter": false,
1238
+ "setter": false,
1239
+ "reflect": true,
1240
+ "attribute": "is-open",
1241
+ "defaultValue": "false"
1242
+ },
1243
+ "positionContent": {
1244
+ "type": "string",
1245
+ "mutable": false,
1246
+ "complexType": {
1247
+ "original": "ScrimPositionContent",
1248
+ "resolved": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\"",
1249
+ "references": {
1250
+ "ScrimPositionContent": {
1251
+ "location": "import",
1252
+ "path": "./scrim.types",
1253
+ "id": "src/components/scrim/scrim.types.ts::ScrimPositionContent",
1254
+ "referenceLocation": "ScrimPositionContent"
1255
+ }
1256
+ }
1257
+ },
1258
+ "required": true,
1259
+ "optional": false,
1260
+ "docs": {
1261
+ "tags": [],
1262
+ "text": "Posiciona o conte\u00FAdo no topo, centro, direita, esquerda, abaixo dentro do scrim"
1263
+ },
1264
+ "getter": false,
1265
+ "setter": false,
1266
+ "reflect": false,
1267
+ "attribute": "position-content"
1268
+ },
1269
+ "disableCloseOnClick": {
1270
+ "type": "boolean",
1271
+ "mutable": false,
1272
+ "complexType": {
1273
+ "original": "boolean",
1274
+ "resolved": "boolean",
1275
+ "references": {}
1276
+ },
1277
+ "required": false,
1278
+ "optional": false,
1279
+ "docs": {
1280
+ "tags": [],
1281
+ "text": "Desativa o fechamento do scrim ao ser clicado"
1282
+ },
1283
+ "getter": false,
1284
+ "setter": false,
1285
+ "reflect": false,
1286
+ "attribute": "disable-close-on-click",
1287
+ "defaultValue": "false"
1288
+ },
1289
+ "zIndex": {
1290
+ "type": "number",
1291
+ "mutable": false,
1292
+ "complexType": {
1293
+ "original": "number | null",
1294
+ "resolved": "number",
1295
+ "references": {}
1296
+ },
1297
+ "required": false,
1298
+ "optional": false,
1299
+ "docs": {
1300
+ "tags": [],
1301
+ "text": "Define o valor de z-index do scrim"
1302
+ },
1303
+ "getter": false,
1304
+ "setter": false,
1305
+ "reflect": false,
1306
+ "attribute": "z-index",
1307
+ "defaultValue": "null"
1308
+ },
1309
+ "bgColor": {
1310
+ "type": "string",
1311
+ "mutable": false,
1312
+ "complexType": {
1313
+ "original": "string | null",
1314
+ "resolved": "string",
1315
+ "references": {}
1316
+ },
1317
+ "required": false,
1318
+ "optional": false,
1319
+ "docs": {
1320
+ "tags": [],
1321
+ "text": "Cor de fundo personalizada para o scrim.\nAceita os seguintes formatos de cor:\n- Cores nomeadas do CSS: 'red', 'blue', 'green', 'yellow', etc.\n- C\u00F3digos hexadecimais: '#ff0000', '#00ff00', '#0000ff', etc.\n- Valores RGB: 'rgb(255, 0, 0)', 'rgb(0, 255, 0)', etc.\n- Valores RGBA: 'rgba(255, 0, 0, 0.5)', 'rgba(0, 255, 0, 0.8)', etc.\n- Valores HSL: 'hsl(0, 100%, 50%)', 'hsl(120, 100%, 50%)', etc.\n- Valores HSLA: 'hsla(0, 100%, 50%, 0.5)', 'hsla(240, 100%, 50%, 0.7)', etc.\nSe n\u00E3o especificada, usa a cor padr\u00E3o do tema."
1322
+ },
1323
+ "getter": false,
1324
+ "setter": false,
1325
+ "reflect": false,
1326
+ "attribute": "bg-color",
1327
+ "defaultValue": "null"
1328
+ },
1329
+ "customOpacity": {
1330
+ "type": "number",
1331
+ "mutable": false,
1332
+ "complexType": {
1333
+ "original": "number | null",
1334
+ "resolved": "number",
1335
+ "references": {}
1336
+ },
1337
+ "required": false,
1338
+ "optional": false,
1339
+ "docs": {
1340
+ "tags": [],
1341
+ "text": "Define a opacidade personalizada do scrim"
1342
+ },
1343
+ "getter": false,
1344
+ "setter": false,
1345
+ "reflect": false,
1346
+ "attribute": "custom-opacity",
1347
+ "defaultValue": "null"
1348
+ },
1349
+ "displayMode": {
1350
+ "type": "string",
1351
+ "mutable": false,
1352
+ "complexType": {
1353
+ "original": "ScrimDisplayMode",
1354
+ "resolved": "\"fullscreen\" | \"parent\"",
1355
+ "references": {
1356
+ "ScrimDisplayMode": {
1357
+ "location": "import",
1358
+ "path": "./scrim.types",
1359
+ "id": "src/components/scrim/scrim.types.ts::ScrimDisplayMode",
1360
+ "referenceLocation": "ScrimDisplayMode"
1361
+ }
1362
+ }
1363
+ },
1364
+ "required": false,
1365
+ "optional": false,
1366
+ "docs": {
1367
+ "tags": [],
1368
+ "text": "Define o modo de exibi\u00E7\u00E3o do scrim:\n- `'fullscreen'`: Ocupa toda a tela (`position: fixed`). (_padr\u00E3o_)\n- `'parent'`: Ocupa apenas o elemento pai (`position: absolute`).\n O elemento pai deve ter `position: relative` ou outro valor diferente de `static`.\n\nPara a variante `'legibility'`, este atributo \u00E9 ignorado: o posicionamento \u00E9 sempre\ncalculado automaticamente a partir das coordenadas do elemento pai."
1369
+ },
1370
+ "getter": false,
1371
+ "setter": false,
1372
+ "reflect": true,
1373
+ "attribute": "display-mode",
1374
+ "defaultValue": "'fullscreen'"
1375
+ },
1376
+ "scrollStrategy": {
1377
+ "type": "string",
1378
+ "mutable": false,
1379
+ "complexType": {
1380
+ "original": "ScrimScrollStrategy",
1381
+ "resolved": "\"block\" | \"close\"",
1382
+ "references": {
1383
+ "ScrimScrollStrategy": {
1384
+ "location": "import",
1385
+ "path": "./scrim.types",
1386
+ "id": "src/components/scrim/scrim.types.ts::ScrimScrollStrategy",
1387
+ "referenceLocation": "ScrimScrollStrategy"
1388
+ }
1389
+ }
1390
+ },
1391
+ "required": true,
1392
+ "optional": false,
1393
+ "docs": {
1394
+ "tags": [],
1395
+ "text": "Define a estrat\u00E9gia de manipula\u00E7\u00E3o de rolagem quando scrim est\u00E1 aberto\n- 'block': Impede a rolagem completamente\n- 'close': Fecha o scrim quando ocorre rolagem"
1396
+ },
1397
+ "getter": false,
1398
+ "setter": false,
1399
+ "reflect": false,
1400
+ "attribute": "scroll-strategy"
1401
+ },
1402
+ "scrollThreshold": {
1403
+ "type": "number",
1404
+ "mutable": true,
1405
+ "complexType": {
1406
+ "original": "number",
1407
+ "resolved": "number",
1408
+ "references": {}
1409
+ },
1410
+ "required": false,
1411
+ "optional": false,
1412
+ "docs": {
1413
+ "tags": [],
1414
+ "text": "Determina quanto de rolagem (em pixels) \u00E9 necess\u00E1rio para acionar a a\u00E7\u00E3o de fechamento autom\u00E1tico do scrim."
1415
+ },
1416
+ "getter": false,
1417
+ "setter": false,
1418
+ "reflect": false,
1419
+ "attribute": "scroll-threshold",
1420
+ "defaultValue": "50"
1421
+ },
1422
+ "activator": {
1423
+ "type": "string",
1424
+ "mutable": false,
1425
+ "complexType": {
1426
+ "original": "string | null",
1427
+ "resolved": "string",
1428
+ "references": {}
1429
+ },
1430
+ "required": false,
1431
+ "optional": false,
1432
+ "docs": {
1433
+ "tags": [],
1434
+ "text": "Define o seletor para o elemento activator.\nNota: O slot 'activator' tem prioridade sobre esta propriedade."
1435
+ },
1436
+ "getter": false,
1437
+ "setter": false,
1438
+ "reflect": false,
1439
+ "attribute": "activator",
1440
+ "defaultValue": "null"
1441
+ },
1442
+ "ariaLabel": {
1443
+ "type": "string",
1444
+ "mutable": false,
1445
+ "complexType": {
1446
+ "original": "string | null",
1447
+ "resolved": "string",
1448
+ "references": {}
1449
+ },
1450
+ "required": false,
1451
+ "optional": false,
1452
+ "docs": {
1453
+ "tags": [],
1454
+ "text": "Define um r\u00F3tulo acess\u00EDvel personalizado para o di\u00E1logo.\nSe n\u00E3o fornecido, ser\u00E1 usado \"Conte\u00FAdo do di\u00E1logo\" como padr\u00E3o."
1455
+ },
1456
+ "getter": false,
1457
+ "setter": false,
1458
+ "reflect": false,
1459
+ "attribute": "aria-label",
1460
+ "defaultValue": "null"
1461
+ },
1462
+ "variant": {
1463
+ "type": "string",
1464
+ "mutable": false,
1465
+ "complexType": {
1466
+ "original": "ScrimVariant",
1467
+ "resolved": "\"focus\" | \"legibility\" | \"spotlight\"",
1468
+ "references": {
1469
+ "ScrimVariant": {
1470
+ "location": "import",
1471
+ "path": "./scrim.types",
1472
+ "id": "src/components/scrim/scrim.types.ts::ScrimVariant",
1473
+ "referenceLocation": "ScrimVariant"
1474
+ }
1475
+ }
1476
+ },
1477
+ "required": false,
1478
+ "optional": false,
1479
+ "docs": {
1480
+ "tags": [],
1481
+ "text": "Define a variante sem\u00E2ntica do scrim\n- `'focus'`: Redireciona o foco hier\u00E1rquico do usu\u00E1rio. Cor #000000 com opacidade 40%. (_padr\u00E3o_)\n- `'spotlight'`: Scrim vazado \u2014 destaca um elemento espec\u00EDfico criando uma fresta no overlay.\n Aplica as mesmas cores da variante `'focus'`. Use `spotlightTargetId` para indicar o elemento a ser destacado.\n- `'legibility'`: Melhora o contraste e leitura de texto sobre superf\u00EDcies. Cor #000000 com opacidade 64%.\n Para cobertura parcial, use `legibilityAnchor` + `legibilitySize`.\n Para gradiente suave, use `bgColor` com um valor de gradiente CSS e `customOpacity=\"1\"`,\n ex.: `bg-color=\"linear-gradient(to top, rgba(0,0,0,0.64), transparent)\"`..\n\nQuando definida, aplica automaticamente as especifica\u00E7\u00F5es de cor e opacidade do Design System.\nAs propriedades `bgColor` e `customOpacity` t\u00EAm prioridade e sobrep\u00F5em os valores da variante."
1482
+ },
1483
+ "getter": false,
1484
+ "setter": false,
1485
+ "reflect": false,
1486
+ "attribute": "variant",
1487
+ "defaultValue": "'focus'"
1488
+ },
1489
+ "legibilityAnchor": {
1490
+ "type": "string",
1491
+ "mutable": false,
1492
+ "complexType": {
1493
+ "original": "ScrimLegibilityAnchor",
1494
+ "resolved": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\"",
1495
+ "references": {
1496
+ "ScrimLegibilityAnchor": {
1497
+ "location": "import",
1498
+ "path": "./scrim.types",
1499
+ "id": "src/components/scrim/scrim.types.ts::ScrimLegibilityAnchor",
1500
+ "referenceLocation": "ScrimLegibilityAnchor"
1501
+ }
1502
+ }
1503
+ },
1504
+ "required": false,
1505
+ "optional": false,
1506
+ "docs": {
1507
+ "tags": [],
1508
+ "text": "Define a borda de ancoragem da faixa de cobertura da variante `legibility`.\n\nControla de qual borda (ou centro) do elemento a m\u00E1scara de overlay cresce,\ntendo seu tamanho determinado por `legibilitySize`.\n\n- `'top'`: faixa ancorada na borda superior, cresce para baixo.\n- `'bottom'`: faixa ancorada na borda inferior, cresce para cima.\n- `'left'`: faixa ancorada na borda esquerda, cresce para a direita.\n- `'right'`: faixa ancorada na borda direita, cresce para a esquerda.\n- `'center'`: faixa centralizada verticalmente no elemento.\n\nQuando `legibilitySize` \u00E9 `null`, a m\u00E1scara ocupa 100% independentemente\nda \u00E2ncora definida, equivalendo a uma cobertura total.\n\nS\u00F3 tem efeito quando `variant=\"legibility\"`."
1509
+ },
1510
+ "getter": false,
1511
+ "setter": false,
1512
+ "reflect": false,
1513
+ "attribute": "legibility-anchor",
1514
+ "defaultValue": "'bottom'"
1515
+ },
1516
+ "legibilitySize": {
1517
+ "type": "string",
1518
+ "mutable": false,
1519
+ "complexType": {
1520
+ "original": "string | null",
1521
+ "resolved": "string",
1522
+ "references": {}
1523
+ },
1524
+ "required": false,
1525
+ "optional": false,
1526
+ "docs": {
1527
+ "tags": [],
1528
+ "text": "Define o tamanho da faixa de cobertura da variante `legibility`, usado em\nconjunto com `legibilityAnchor`.\n\nAceita qualquer valor CSS de comprimento v\u00E1lido:\n- Percentual relativo ao elemento pai: `'40%'`, `'75%'`\n- Comprimento absoluto: `'120px'`, `'8rem'`, `'6em'`\n- Fun\u00E7\u00E3o CSS: `'calc(100% - 2rem)'`\n\nQuando `null` (padr\u00E3o), a m\u00E1scara ocupa **100%** da dimens\u00E3o relevante:\n- **altura** para \u00E2ncoras `top`, `bottom` e `center`\n- **largura** para \u00E2ncoras `left` e `right`\n\nS\u00F3 tem efeito quando `variant=\"legibility\"` est\u00E1 definido."
1529
+ },
1530
+ "getter": false,
1531
+ "setter": false,
1532
+ "reflect": false,
1533
+ "attribute": "legibility-size",
1534
+ "defaultValue": "null"
1535
+ },
1536
+ "spotlightTargetId": {
1537
+ "type": "string",
1538
+ "mutable": false,
1539
+ "complexType": {
1540
+ "original": "string | null",
1541
+ "resolved": "string",
1542
+ "references": {}
1543
+ },
1544
+ "required": false,
1545
+ "optional": false,
1546
+ "docs": {
1547
+ "tags": [],
1548
+ "text": "Ativa o modo de scrim vazado (variante 'spotlight'), criando uma \u00E1rea de fresta no overlay\nque destaca o elemento referenciado pelo seletor CSS fornecido."
1549
+ },
1550
+ "getter": false,
1551
+ "setter": false,
1552
+ "reflect": false,
1553
+ "attribute": "spotlight-target-id",
1554
+ "defaultValue": "null"
1555
+ },
1556
+ "spotlightPadding": {
1557
+ "type": "number",
1558
+ "mutable": false,
1559
+ "complexType": {
1560
+ "original": "number",
1561
+ "resolved": "number",
1562
+ "references": {}
1563
+ },
1564
+ "required": false,
1565
+ "optional": false,
1566
+ "docs": {
1567
+ "tags": [],
1568
+ "text": "Espa\u00E7amento interno (em pixels) ao redor da \u00E1rea de fresta no scrim vazado."
1569
+ },
1570
+ "getter": false,
1571
+ "setter": false,
1572
+ "reflect": false,
1573
+ "attribute": "spotlight-padding",
1574
+ "defaultValue": "8"
1575
+ },
1576
+ "spotlightShape": {
1577
+ "type": "string",
1578
+ "mutable": false,
1579
+ "complexType": {
1580
+ "original": "ScrimSpotlightShape",
1581
+ "resolved": "\"circle\" | \"rect\" | \"rounded\"",
1582
+ "references": {
1583
+ "ScrimSpotlightShape": {
1584
+ "location": "import",
1585
+ "path": "./scrim.types",
1586
+ "id": "src/components/scrim/scrim.types.ts::ScrimSpotlightShape",
1587
+ "referenceLocation": "ScrimSpotlightShape"
1588
+ }
1589
+ }
1590
+ },
1591
+ "required": false,
1592
+ "optional": false,
1593
+ "docs": {
1594
+ "tags": [],
1595
+ "text": "Define a forma da \u00E1rea de fresta no scrim vazado.\n- 'rect': Retangular com bordas retas.\n- 'rounded': Retangular com bordas arredondadas (border-radius de 8px).\n- 'circle': Elipse inscrita na \u00E1rea do elemento alvo."
1596
+ },
1597
+ "getter": false,
1598
+ "setter": false,
1599
+ "reflect": false,
1600
+ "attribute": "spotlight-shape",
1601
+ "defaultValue": "'rect'"
1602
+ },
1603
+ "contentLayout": {
1604
+ "type": "string",
1605
+ "mutable": false,
1606
+ "complexType": {
1607
+ "original": "ScrimContentLayout",
1608
+ "resolved": "\"default\" | \"none\"",
1609
+ "references": {
1610
+ "ScrimContentLayout": {
1611
+ "location": "import",
1612
+ "path": "./scrim.types",
1613
+ "id": "src/components/scrim/scrim.types.ts::ScrimContentLayout",
1614
+ "referenceLocation": "ScrimContentLayout"
1615
+ }
1616
+ }
1617
+ },
1618
+ "required": false,
1619
+ "optional": false,
1620
+ "docs": {
1621
+ "tags": [],
1622
+ "text": "Define como o scrim aplica estilos de layout ao elemento filho (slot padr\u00E3o).\n\n- `'default'`: O scrim gerencia o layout do conte\u00FAdo, centralizando, animando e aplicando transforma\u00E7\u00F5es e opacidade automaticamente.\n\n- `'none'`: o scrim age como um componente controlado pelo pai. O filho recebe apenas a m\u00E1scara visual, sem interfer\u00EAncia de posicionamento, transforma\u00E7\u00E3o ou opacidade.\nAdequado para componentes que gerenciam seu pr\u00F3prio layout e estado de abertura. Al\u00E9m disso:\n\n - Foco e eventos globais** n\u00E3o s\u00E3o interceptados pelo scrim \u2014 o componente filho gerencia seu pr\u00F3prio foco, navega\u00E7\u00E3o por teclado e fechamento via ESC.\n - Clique no scrim emite `brScrimClose` sem fechar o scrim internamente, delegando o controle de estado ao pai (quem define `isOpen`).\n - Use `zIndex` apenas para sobrescrever a camada bloqueadora no fallback CSS. M\u00E1scara e painel devem usar subcamadas locais, sem aritm\u00E9tica entre camadas globais."
1623
+ },
1624
+ "getter": false,
1625
+ "setter": false,
1626
+ "reflect": true,
1627
+ "attribute": "content-layout",
1628
+ "defaultValue": "'default'"
1629
+ }
1630
+ };
1631
+ }
1632
+ static get states() {
1633
+ return {
1634
+ "hasActivatorSlot": {},
1635
+ "spotlightRect": {}
1636
+ };
1637
+ }
1638
+ static get events() {
1639
+ return [{
1640
+ "method": "brScrimOpen",
1641
+ "name": "brScrimOpen",
1642
+ "bubbles": true,
1643
+ "cancelable": true,
1644
+ "composed": true,
1645
+ "docs": {
1646
+ "tags": [],
1647
+ "text": "Indica que o scrim foi aberto."
1648
+ },
1649
+ "complexType": {
1650
+ "original": "void",
1651
+ "resolved": "void",
1652
+ "references": {}
1653
+ }
1654
+ }, {
1655
+ "method": "brScrimClose",
1656
+ "name": "brScrimClose",
1657
+ "bubbles": true,
1658
+ "cancelable": true,
1659
+ "composed": true,
1660
+ "docs": {
1661
+ "tags": [],
1662
+ "text": "Indica que o scrim foi fechado"
1663
+ },
1664
+ "complexType": {
1665
+ "original": "void",
1666
+ "resolved": "void",
1667
+ "references": {}
1668
+ }
1669
+ }];
1670
+ }
1671
+ static get methods() {
1672
+ return {
1673
+ "setScrollThreshold": {
1674
+ "complexType": {
1675
+ "signature": "(threshold: number) => Promise<void>",
1676
+ "parameters": [{
1677
+ "name": "threshold",
1678
+ "type": "number",
1679
+ "docs": ""
1680
+ }],
1681
+ "references": {
1682
+ "Promise": {
1683
+ "location": "global",
1684
+ "id": "global::Promise"
1685
+ }
1686
+ },
1687
+ "return": "Promise<void>"
1688
+ },
1689
+ "docs": {
1690
+ "text": "Define o limite de rolagem para o fechamento autom\u00E1tico do scrim.",
1691
+ "tags": []
1692
+ }
1693
+ },
1694
+ "open": {
1695
+ "complexType": {
1696
+ "signature": "() => Promise<void>",
1697
+ "parameters": [],
1698
+ "references": {
1699
+ "Promise": {
1700
+ "location": "global",
1701
+ "id": "global::Promise"
1702
+ }
1703
+ },
1704
+ "return": "Promise<void>"
1705
+ },
1706
+ "docs": {
1707
+ "text": "M\u00E9todo p\u00FAblico para exibir o scrim",
1708
+ "tags": []
1709
+ }
1710
+ },
1711
+ "close": {
1712
+ "complexType": {
1713
+ "signature": "() => Promise<void>",
1714
+ "parameters": [],
1715
+ "references": {
1716
+ "Promise": {
1717
+ "location": "global",
1718
+ "id": "global::Promise"
1719
+ }
1720
+ },
1721
+ "return": "Promise<void>"
1722
+ },
1723
+ "docs": {
1724
+ "text": "M\u00E9todo p\u00FAblico para esconder o scrim",
1725
+ "tags": []
1726
+ }
1727
+ },
1728
+ "toggle": {
1729
+ "complexType": {
1730
+ "signature": "() => Promise<void>",
1731
+ "parameters": [],
1732
+ "references": {
1733
+ "Promise": {
1734
+ "location": "global",
1735
+ "id": "global::Promise"
1736
+ }
1737
+ },
1738
+ "return": "Promise<void>"
1739
+ },
1740
+ "docs": {
1741
+ "text": "M\u00E9todo p\u00FAblico para alternar o estado de exibi\u00E7\u00E3o do scrim",
1742
+ "tags": []
1743
+ }
1744
+ },
1745
+ "updateSpotlight": {
1746
+ "complexType": {
1747
+ "signature": "() => Promise<void>",
1748
+ "parameters": [],
1749
+ "references": {
1750
+ "Promise": {
1751
+ "location": "global",
1752
+ "id": "global::Promise"
1753
+ }
1754
+ },
1755
+ "return": "Promise<void>"
1756
+ },
1757
+ "docs": {
1758
+ "text": "Recalcula manualmente a posi\u00E7\u00E3o e dimens\u00F5es da fresta do scrim vazado.\n\u00DAtil quando o elemento alvo muda de posi\u00E7\u00E3o sem disparar resize ou scroll.",
1759
+ "tags": []
1760
+ }
1761
+ }
1762
+ };
1763
+ }
1764
+ static get elementRef() { return "el"; }
1765
+ static get watchers() {
1766
+ return [{
1767
+ "propName": "isOpen",
1768
+ "methodName": "handleOpenChange"
1769
+ }, {
1770
+ "propName": "zIndex",
1771
+ "methodName": "updateStyles"
1772
+ }, {
1773
+ "propName": "bgColor",
1774
+ "methodName": "updateStyles"
1775
+ }, {
1776
+ "propName": "customOpacity",
1777
+ "methodName": "updateStyles"
1778
+ }, {
1779
+ "propName": "legibilitySize",
1780
+ "methodName": "updateStyles"
1781
+ }, {
1782
+ "propName": "variant",
1783
+ "methodName": "handleVariantChange"
1784
+ }, {
1785
+ "propName": "displayMode",
1786
+ "methodName": "handleLayerModeChange"
1787
+ }, {
1788
+ "propName": "contentLayout",
1789
+ "methodName": "handleLayerModeChange"
1790
+ }, {
1791
+ "propName": "spotlightTargetId",
1792
+ "methodName": "handleSpotlightChange"
1793
+ }, {
1794
+ "propName": "spotlightPadding",
1795
+ "methodName": "handleSpotlightChange"
1796
+ }, {
1797
+ "propName": "spotlightShape",
1798
+ "methodName": "handleSpotlightChange"
1799
+ }, {
1800
+ "propName": "activator",
1801
+ "methodName": "handleActivatorChange"
1802
+ }];
1803
+ }
1804
+ static get listeners() {
1805
+ return [{
1806
+ "name": "keydown",
1807
+ "method": "handleDocumentKeyDown",
1808
+ "target": "document",
1809
+ "capture": false,
1810
+ "passive": false
1811
+ }];
1812
+ }
1813
+ }
1814
+ Scrim.FOCUSABLE_SELECTORS = [
1815
+ 'a[href]:not([disabled])',
1816
+ 'button:not([disabled])',
1817
+ 'br-button:not([disabled])',
1818
+ 'input:not([disabled])',
1819
+ 'br-input:not([disabled])',
1820
+ 'select:not([disabled])',
1821
+ 'br-select:not([disabled])',
1822
+ 'textarea:not([disabled])',
1823
+ 'br-textarea:not([disabled])',
1824
+ '[tabindex]:not([tabindex="-1"])',
1825
+ ].join(',');