@esri/calcite-components 1.0.0-next.633 → 1.0.0-next.635

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 (664) hide show
  1. package/dist/calcite/calcite.esm.js +2 -2
  2. package/dist/calcite/index.esm.js +1 -1
  3. package/dist/calcite/{p-bbd46504.entry.js → p-003cd928.entry.js} +2 -2
  4. package/dist/calcite/{p-29cf00c4.entry.js → p-02319a55.entry.js} +2 -2
  5. package/dist/calcite/{p-0f31433c.entry.js → p-047a894c.entry.js} +2 -2
  6. package/dist/calcite/p-050bcfa7.js +6 -0
  7. package/dist/calcite/{p-cb016c52.entry.js → p-0cdac321.entry.js} +2 -2
  8. package/dist/calcite/p-0d0ca23e.entry.js +6 -0
  9. package/dist/calcite/{p-4794e7df.js → p-0dae116f.js} +1 -1
  10. package/dist/calcite/{p-7def899e.entry.js → p-0e1b3356.entry.js} +2 -2
  11. package/dist/calcite/{p-d25a6228.js → p-126fa44e.js} +1 -1
  12. package/dist/calcite/{p-22c8223d.js → p-16bb1c44.js} +1 -1
  13. package/dist/calcite/{p-d52deb05.entry.js → p-174f21bd.entry.js} +2 -2
  14. package/dist/calcite/{p-2a52b1af.entry.js → p-184e54f7.entry.js} +2 -2
  15. package/dist/calcite/{p-a359b901.entry.js → p-1c63d0d7.entry.js} +2 -2
  16. package/dist/calcite/p-1c7d5079.entry.js +6 -0
  17. package/dist/calcite/{p-431e0692.entry.js → p-1fb2b938.entry.js} +2 -2
  18. package/dist/calcite/{p-810fcf41.entry.js → p-20544b89.entry.js} +2 -2
  19. package/dist/calcite/{p-c3d50492.js → p-2210ff78.js} +1 -1
  20. package/dist/calcite/{p-bb73d51b.entry.js → p-227e6007.entry.js} +2 -2
  21. package/dist/calcite/{p-73f93e1c.entry.js → p-23e39973.entry.js} +2 -2
  22. package/dist/calcite/p-2431bbda.entry.js +6 -0
  23. package/dist/calcite/{p-1cebb96f.entry.js → p-28db2e6a.entry.js} +2 -2
  24. package/dist/calcite/{p-4f72fc01.js → p-2c1fcd36.js} +1 -1
  25. package/dist/calcite/{p-d935cc1b.entry.js → p-2c2b7c1c.entry.js} +2 -2
  26. package/dist/calcite/{p-14a7da73.entry.js → p-2c3d72da.entry.js} +2 -2
  27. package/dist/calcite/{p-ab3812ba.js → p-2e729f17.js} +1 -1
  28. package/dist/calcite/{p-a6f1ebf6.entry.js → p-32aabd8a.entry.js} +2 -2
  29. package/dist/calcite/{p-c8640992.js → p-3318431e.js} +1 -1
  30. package/dist/calcite/{p-c24271dc.entry.js → p-34a924fa.entry.js} +2 -2
  31. package/dist/calcite/p-35b23b55.js +15 -0
  32. package/dist/calcite/{p-31090aba.js → p-3aadc225.js} +1 -1
  33. package/dist/calcite/p-4058beb9.entry.js +6 -0
  34. package/dist/calcite/{p-24681cc9.js → p-419c5f27.js} +1 -1
  35. package/dist/calcite/{p-deb7df1e.js → p-41cf73d5.js} +1 -1
  36. package/dist/calcite/{p-18f9b87b.entry.js → p-430967c9.entry.js} +2 -2
  37. package/dist/calcite/p-44dfb0b5.entry.js +6 -0
  38. package/dist/calcite/{p-a2ab3648.js → p-4a735f17.js} +1 -1
  39. package/dist/calcite/{p-18b9b69e.js → p-4ebf8ec4.js} +1 -1
  40. package/dist/calcite/{p-ac3ace5c.entry.js → p-4f052c43.entry.js} +2 -2
  41. package/dist/calcite/{p-09749684.entry.js → p-4feb2c51.entry.js} +2 -2
  42. package/dist/calcite/{p-12f64f8b.entry.js → p-510399e0.entry.js} +2 -2
  43. package/dist/calcite/{p-cfaa9ea8.js → p-51b3eb60.js} +2 -2
  44. package/dist/calcite/{p-3e9f366c.entry.js → p-59fa4629.entry.js} +2 -2
  45. package/dist/calcite/{p-2c730d84.entry.js → p-5e999bda.entry.js} +2 -2
  46. package/dist/calcite/{p-05c3789b.js → p-63030c4f.js} +1 -1
  47. package/dist/calcite/p-64d1a9ae.entry.js +6 -0
  48. package/dist/calcite/{p-69d9a248.entry.js → p-66f8f8e2.entry.js} +2 -2
  49. package/dist/calcite/{p-f61babd1.js → p-68f451fb.js} +2 -2
  50. package/dist/calcite/{p-308ed699.entry.js → p-6a76beed.entry.js} +2 -2
  51. package/dist/calcite/{p-513fef9a.js → p-6ffc1716.js} +2 -2
  52. package/dist/calcite/p-71cf6916.entry.js +6 -0
  53. package/dist/calcite/{p-d5a92819.entry.js → p-733b274a.entry.js} +2 -2
  54. package/dist/calcite/{p-ac5e38a2.entry.js → p-73fa7a5f.entry.js} +2 -2
  55. package/dist/calcite/{p-3d69f172.entry.js → p-789a8048.entry.js} +2 -2
  56. package/dist/calcite/{p-2c9d7402.js → p-7b8c4581.js} +2 -2
  57. package/dist/calcite/{p-3cc531b1.entry.js → p-7d295cf3.entry.js} +2 -2
  58. package/dist/calcite/{p-d26767ec.entry.js → p-7d3f0c98.entry.js} +2 -2
  59. package/dist/calcite/{p-5c05198d.entry.js → p-7f789875.entry.js} +2 -2
  60. package/dist/calcite/{p-6f30e051.entry.js → p-7fbb463d.entry.js} +2 -2
  61. package/dist/calcite/{p-db293e50.entry.js → p-87d5f0a3.entry.js} +2 -2
  62. package/dist/calcite/{p-d17b8ee9.js → p-8d124d33.js} +2 -2
  63. package/dist/calcite/p-9d61b3b9.entry.js +6 -0
  64. package/dist/calcite/{p-1806b759.entry.js → p-9e38e176.entry.js} +2 -2
  65. package/dist/calcite/{p-004dc91c.js → p-9e930bb8.js} +1 -1
  66. package/dist/calcite/{p-e8d83a55.entry.js → p-9ec94c00.entry.js} +2 -2
  67. package/dist/calcite/{p-dcad31e0.entry.js → p-9fc23e93.entry.js} +2 -2
  68. package/dist/calcite/{p-319d0fb7.js → p-a3092903.js} +2 -2
  69. package/dist/calcite/{p-3bb21f63.entry.js → p-a9fc00ba.entry.js} +2 -2
  70. package/dist/calcite/{p-26b693c2.entry.js → p-abe0e309.entry.js} +2 -2
  71. package/dist/calcite/{p-49a5573d.entry.js → p-b0b67288.entry.js} +2 -2
  72. package/dist/calcite/{p-498de00a.js → p-b27c59bc.js} +2 -2
  73. package/dist/calcite/{p-e2db7cb6.entry.js → p-b2fee745.entry.js} +2 -2
  74. package/dist/calcite/{p-953012fa.entry.js → p-b5c98e4a.entry.js} +2 -2
  75. package/dist/calcite/{p-266871ba.entry.js → p-b5fdb4aa.entry.js} +2 -2
  76. package/dist/calcite/{p-da667566.entry.js → p-b6d67959.entry.js} +2 -2
  77. package/dist/calcite/{p-d4246ab6.js → p-b7fd85f7.js} +2 -2
  78. package/dist/calcite/p-bb80464d.js +6 -0
  79. package/dist/calcite/{p-d010539f.entry.js → p-c1629836.entry.js} +2 -2
  80. package/dist/calcite/{p-fb3e8b9b.entry.js → p-c8c0d267.entry.js} +2 -2
  81. package/dist/calcite/p-d1cfc4b3.entry.js +6 -0
  82. package/dist/calcite/{p-cc2c16c4.entry.js → p-dd5132ff.entry.js} +2 -2
  83. package/dist/calcite/{p-d2f83c6a.entry.js → p-e17b4359.entry.js} +2 -2
  84. package/dist/calcite/{p-5215672d.js → p-e1a01667.js} +2 -2
  85. package/dist/calcite/{p-8021f786.entry.js → p-e2015219.entry.js} +2 -2
  86. package/dist/calcite/{p-4ada52dc.entry.js → p-e334b08c.entry.js} +2 -2
  87. package/dist/calcite/{p-035fa26b.js → p-e985b1ca.js} +1 -1
  88. package/dist/calcite/{p-32abefe9.js → p-ee4b7f4b.js} +1 -1
  89. package/dist/calcite/{p-b672fd97.js → p-efe6b273.js} +2 -2
  90. package/dist/calcite/p-f651dccb.js +6 -0
  91. package/dist/calcite/{p-58de9d51.entry.js → p-f660df45.entry.js} +2 -2
  92. package/dist/calcite/{p-2ebffb8e.entry.js → p-f6d1d1d5.entry.js} +2 -2
  93. package/dist/cjs/{ExpandToggle-3cab12e1.js → ExpandToggle-e018641b.js} +5 -5
  94. package/dist/cjs/{Heading-79adac08.js → Heading-2e9dceb8.js} +2 -2
  95. package/dist/cjs/{app-globals-0e5a6ce5.js → app-globals-0949b975.js} +2 -2
  96. package/dist/cjs/{array-6a2dea2c.js → array-8cbd5b4a.js} +1 -1
  97. package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
  98. package/dist/cjs/calcite-action-bar.cjs.entry.js +11 -11
  99. package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
  100. package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
  101. package/dist/cjs/calcite-action-pad.cjs.entry.js +10 -10
  102. package/dist/cjs/calcite-action.cjs.entry.js +8 -8
  103. package/dist/cjs/calcite-alert.cjs.entry.js +10 -10
  104. package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
  105. package/dist/cjs/calcite-block_2.cjs.entry.js +10 -10
  106. package/dist/cjs/calcite-button.cjs.entry.js +10 -10
  107. package/dist/cjs/calcite-card.cjs.entry.js +8 -8
  108. package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
  109. package/dist/cjs/calcite-chip.cjs.entry.js +7 -7
  110. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +10 -10
  111. package/dist/cjs/calcite-combobox_3.cjs.entry.js +14 -14
  112. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +11 -11
  113. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +11 -11
  114. package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
  115. package/dist/cjs/calcite-filter.cjs.entry.js +8 -8
  116. package/dist/cjs/calcite-flow-item.cjs.entry.js +7 -7
  117. package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
  118. package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -12
  119. package/dist/cjs/calcite-handle.cjs.entry.js +5 -5
  120. package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
  121. package/dist/cjs/calcite-inline-editable.cjs.entry.js +8 -8
  122. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +15 -15
  123. package/dist/cjs/calcite-input-message.cjs.entry.js +12 -7
  124. package/dist/cjs/calcite-input-number.cjs.entry.js +12 -12
  125. package/dist/cjs/calcite-input-text.cjs.entry.js +9 -9
  126. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +12 -12
  127. package/dist/cjs/calcite-input.cjs.entry.js +12 -12
  128. package/dist/cjs/calcite-label.cjs.entry.js +6 -6
  129. package/dist/cjs/calcite-link.cjs.entry.js +6 -6
  130. package/dist/cjs/calcite-list_3.cjs.entry.js +9 -9
  131. package/dist/cjs/calcite-loader.cjs.entry.js +10 -5
  132. package/dist/cjs/calcite-modal.cjs.entry.js +14 -1275
  133. package/dist/cjs/calcite-notice.cjs.entry.js +8 -8
  134. package/dist/cjs/calcite-option_3.cjs.entry.js +9 -9
  135. package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
  136. package/dist/cjs/calcite-panel.cjs.entry.js +10 -10
  137. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +12 -12
  138. package/dist/cjs/calcite-popover_2.cjs.entry.js +24 -13
  139. package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
  140. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
  141. package/dist/cjs/calcite-radio-button.cjs.entry.js +9 -9
  142. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +8 -8
  143. package/dist/cjs/calcite-rating.cjs.entry.js +9 -9
  144. package/dist/cjs/calcite-scrim.cjs.entry.js +3 -3
  145. package/dist/cjs/calcite-shell_3.cjs.entry.js +8 -8
  146. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
  147. package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
  148. package/dist/cjs/calcite-stepper_2.cjs.entry.js +9 -9
  149. package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
  150. package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
  151. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +4 -4
  152. package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
  153. package/dist/cjs/calcite-tip_3.cjs.entry.js +8 -8
  154. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +37 -13
  155. package/dist/cjs/calcite-tree_2.cjs.entry.js +8 -8
  156. package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -12
  157. package/dist/cjs/calcite.cjs.js +5 -5
  158. package/dist/cjs/{conditionalSlot-1322fc35.js → conditionalSlot-c28021dc.js} +3 -3
  159. package/dist/cjs/{debounce-0f9e9abc.js → debounce-27f4872f.js} +1 -1
  160. package/dist/cjs/{dom-13de8dae.js → dom-5245652b.js} +3 -3
  161. package/dist/cjs/{filter-b64d328c.js → filter-47f3c4df.js} +2 -2
  162. package/dist/cjs/{floating-ui-81762090.js → floating-ui-c4264248.js} +4 -4
  163. package/dist/cjs/focusTrapComponent-ff4957d9.js +1274 -0
  164. package/dist/cjs/{form-5d8e6d3d.js → form-2ee231ac.js} +3 -3
  165. package/dist/cjs/{guid-4c424c40.js → guid-88aff5b7.js} +1 -1
  166. package/dist/cjs/{index-a6176241.js → index-3d158670.js} +1 -1
  167. package/dist/cjs/index.cjs.js +1 -1
  168. package/dist/cjs/{interactive-4c92331d.js → interactive-659fd37c.js} +1 -1
  169. package/dist/cjs/{interfaces-31dee91d.js → interfaces-40ceb8ba.js} +1 -1
  170. package/dist/cjs/{key-98575516.js → key-feab4f11.js} +1 -1
  171. package/dist/cjs/{label-40d2674d.js → label-dd4edfec.js} +2 -2
  172. package/dist/cjs/loader.cjs.js +5 -5
  173. package/dist/cjs/{locale-59a564a4.js → locale-3825dbc0.js} +4 -4
  174. package/dist/cjs/{math-434fe599.js → math-3ef4a1ed.js} +1 -1
  175. package/dist/cjs/{nonChromiumPlatformUtils-4af36414.js → nonChromiumPlatformUtils-96decf6b.js} +6 -6
  176. package/dist/cjs/{observers-5bc9fe46.js → observers-460db0ff.js} +1 -1
  177. package/dist/cjs/{openCloseComponent-67cd4a5b.js → openCloseComponent-389f3b15.js} +1 -1
  178. package/dist/cjs/{resources-a665ff66.js → resources-4ba7daaf.js} +1 -1
  179. package/dist/cjs/{resources-a28e66cd.js → resources-8cec4531.js} +1 -1
  180. package/dist/cjs/{resources-73628073.js → resources-8d870113.js} +1 -1
  181. package/dist/cjs/{resources-e3e0e1e3.js → resources-90e2407e.js} +5 -5
  182. package/dist/cjs/{resources-aace079b.js → resources-adc133e8.js} +3 -3
  183. package/dist/cjs/{resources-69bd2041.js → resources-eef7f920.js} +1 -1
  184. package/dist/cjs/{sortable.esm-c1959d54.js → sortable.esm-2847bee5.js} +1 -1
  185. package/dist/cjs/{utils-62376f8f.js → utils-42d63f28.js} +1 -1
  186. package/dist/collection/components/accordion/accordion.js +1 -1
  187. package/dist/collection/components/accordion-item/accordion-item.js +1 -1
  188. package/dist/collection/components/accordion-item/resources.js +1 -1
  189. package/dist/collection/components/action/action.js +2 -2
  190. package/dist/collection/components/action/resources.js +1 -1
  191. package/dist/collection/components/action-bar/action-bar.js +1 -1
  192. package/dist/collection/components/action-bar/resources.js +1 -1
  193. package/dist/collection/components/action-bar/utils.js +1 -1
  194. package/dist/collection/components/action-group/action-group.js +1 -1
  195. package/dist/collection/components/action-group/resources.js +1 -1
  196. package/dist/collection/components/action-menu/action-menu.js +2 -2
  197. package/dist/collection/components/action-menu/resources.js +1 -1
  198. package/dist/collection/components/action-pad/action-pad.js +1 -1
  199. package/dist/collection/components/action-pad/resources.js +1 -1
  200. package/dist/collection/components/alert/alert.js +1 -1
  201. package/dist/collection/components/alert/interfaces.js +1 -1
  202. package/dist/collection/components/alert/resources.js +1 -1
  203. package/dist/collection/components/avatar/avatar.js +1 -1
  204. package/dist/collection/components/avatar/utils.js +1 -1
  205. package/dist/collection/components/block/block.js +1 -1
  206. package/dist/collection/components/block/resources.js +1 -1
  207. package/dist/collection/components/block-section/block-section.js +1 -1
  208. package/dist/collection/components/block-section/resources.js +1 -1
  209. package/dist/collection/components/button/button.js +2 -2
  210. package/dist/collection/components/button/resources.js +1 -1
  211. package/dist/collection/components/card/card.js +2 -2
  212. package/dist/collection/components/card/resources.js +1 -1
  213. package/dist/collection/components/checkbox/checkbox.js +1 -1
  214. package/dist/collection/components/chip/chip.js +1 -1
  215. package/dist/collection/components/chip/resources.js +1 -1
  216. package/dist/collection/components/color-picker/color-picker.js +1 -1
  217. package/dist/collection/components/color-picker/resources.js +1 -1
  218. package/dist/collection/components/color-picker/utils.js +1 -1
  219. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +1 -1
  220. package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
  221. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
  222. package/dist/collection/components/color-picker-swatch/resources.js +1 -1
  223. package/dist/collection/components/combobox/combobox.js +1 -1
  224. package/dist/collection/components/combobox/resources.js +1 -1
  225. package/dist/collection/components/combobox/utils.js +1 -1
  226. package/dist/collection/components/combobox-item/combobox-item.js +1 -1
  227. package/dist/collection/components/combobox-item/resources.js +1 -1
  228. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
  229. package/dist/collection/components/combobox-item-group/resources.js +1 -1
  230. package/dist/collection/components/date-picker/date-picker.js +1 -1
  231. package/dist/collection/components/date-picker/resources.js +1 -1
  232. package/dist/collection/components/date-picker/utils.js +1 -1
  233. package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
  234. package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
  235. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
  236. package/dist/collection/components/date-picker-month-header/resources.js +1 -1
  237. package/dist/collection/components/dropdown/dropdown.js +1 -1
  238. package/dist/collection/components/dropdown/resources.js +1 -1
  239. package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
  240. package/dist/collection/components/dropdown-group/resources.js +1 -1
  241. package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
  242. package/dist/collection/components/dropdown-item/resources.js +1 -1
  243. package/dist/collection/components/fab/fab.js +1 -1
  244. package/dist/collection/components/fab/resources.js +1 -1
  245. package/dist/collection/components/filter/filter.js +1 -1
  246. package/dist/collection/components/filter/resources.js +1 -1
  247. package/dist/collection/components/flow/flow.js +1 -1
  248. package/dist/collection/components/flow/resources.js +1 -1
  249. package/dist/collection/components/flow-item/flow-item.js +1 -1
  250. package/dist/collection/components/flow-item/resources.js +1 -1
  251. package/dist/collection/components/functional/ExpandToggle.js +1 -1
  252. package/dist/collection/components/functional/Heading.js +1 -1
  253. package/dist/collection/components/graph/graph.js +1 -1
  254. package/dist/collection/components/graph/util.js +1 -1
  255. package/dist/collection/components/handle/handle.js +1 -1
  256. package/dist/collection/components/handle/resources.js +1 -1
  257. package/dist/collection/components/icon/icon.js +1 -1
  258. package/dist/collection/components/icon/resources.js +1 -1
  259. package/dist/collection/components/icon/utils.js +1 -1
  260. package/dist/collection/components/inline-editable/inline-editable.js +1 -1
  261. package/dist/collection/components/inline-editable/resources.js +1 -1
  262. package/dist/collection/components/input/input.js +1 -1
  263. package/dist/collection/components/input/resources.js +1 -1
  264. package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
  265. package/dist/collection/components/input-date-picker/resources.js +1 -1
  266. package/dist/collection/components/input-message/input-message.css +6 -16
  267. package/dist/collection/components/input-message/input-message.js +14 -3
  268. package/dist/collection/components/input-message/interfaces.js +1 -1
  269. package/dist/collection/components/input-number/input-number.js +1 -1
  270. package/dist/collection/components/input-number/resources.js +1 -1
  271. package/dist/collection/components/input-text/input-text.js +1 -1
  272. package/dist/collection/components/input-text/resources.js +1 -1
  273. package/dist/collection/components/input-time-picker/input-time-picker.js +2 -2
  274. package/dist/collection/components/label/label.js +1 -1
  275. package/dist/collection/components/label/resources.js +1 -1
  276. package/dist/collection/components/link/link.js +1 -1
  277. package/dist/collection/components/list/list.js +1 -1
  278. package/dist/collection/components/list/resources.js +1 -1
  279. package/dist/collection/components/list-item/list-item.js +1 -1
  280. package/dist/collection/components/list-item/resources.js +1 -1
  281. package/dist/collection/components/list-item-group/list-item-group.js +1 -1
  282. package/dist/collection/components/list-item-group/resources.js +1 -1
  283. package/dist/collection/components/loader/loader.css +0 -7
  284. package/dist/collection/components/loader/loader.js +14 -3
  285. package/dist/collection/components/modal/modal.js +1 -1
  286. package/dist/collection/components/modal/resources.js +1 -1
  287. package/dist/collection/components/notice/notice.js +1 -1
  288. package/dist/collection/components/notice/resources.js +1 -1
  289. package/dist/collection/components/option/option.js +1 -1
  290. package/dist/collection/components/option-group/option-group.js +1 -1
  291. package/dist/collection/components/pagination/pagination.js +1 -1
  292. package/dist/collection/components/pagination/resources.js +1 -1
  293. package/dist/collection/components/panel/panel.js +1 -1
  294. package/dist/collection/components/panel/resources.js +1 -1
  295. package/dist/collection/components/pick-list/pick-list.js +1 -1
  296. package/dist/collection/components/pick-list/resources.js +1 -1
  297. package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
  298. package/dist/collection/components/pick-list/shared-list-render.js +1 -1
  299. package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
  300. package/dist/collection/components/pick-list-group/resources.js +1 -1
  301. package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
  302. package/dist/collection/components/pick-list-item/resources.js +1 -1
  303. package/dist/collection/components/popover/PopoverManager.js +1 -1
  304. package/dist/collection/components/popover/popover.js +32 -3
  305. package/dist/collection/components/popover/resources.js +1 -1
  306. package/dist/collection/components/popover-manager/popover-manager.js +1 -1
  307. package/dist/collection/components/progress/progress.js +1 -1
  308. package/dist/collection/components/radio-button/radio-button.js +1 -1
  309. package/dist/collection/components/radio-button/resources.js +1 -1
  310. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  311. package/dist/collection/components/radio-group/radio-group.js +1 -1
  312. package/dist/collection/components/radio-group-item/radio-group-item.js +1 -1
  313. package/dist/collection/components/radio-group-item/resources.js +1 -1
  314. package/dist/collection/components/rating/rating.js +1 -1
  315. package/dist/collection/components/rating/resources.js +1 -1
  316. package/dist/collection/components/scrim/resources.js +1 -1
  317. package/dist/collection/components/scrim/scrim.js +2 -2
  318. package/dist/collection/components/select/resources.js +1 -1
  319. package/dist/collection/components/select/select.js +1 -1
  320. package/dist/collection/components/shell/resources.js +1 -1
  321. package/dist/collection/components/shell/shell.js +1 -1
  322. package/dist/collection/components/shell-center-row/resources.js +1 -1
  323. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
  324. package/dist/collection/components/shell-panel/resources.js +1 -1
  325. package/dist/collection/components/shell-panel/shell-panel.js +1 -1
  326. package/dist/collection/components/slider/resources.js +1 -1
  327. package/dist/collection/components/slider/slider.js +1 -1
  328. package/dist/collection/components/sortable-list/resources.js +1 -1
  329. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  330. package/dist/collection/components/split-button/resources.js +1 -1
  331. package/dist/collection/components/split-button/split-button.js +1 -1
  332. package/dist/collection/components/stepper/stepper.js +1 -1
  333. package/dist/collection/components/stepper-item/stepper-item.js +1 -1
  334. package/dist/collection/components/switch/switch.js +1 -1
  335. package/dist/collection/components/tab/tab.js +1 -1
  336. package/dist/collection/components/tab-nav/tab-nav.js +1 -1
  337. package/dist/collection/components/tab-title/tab-title.js +1 -1
  338. package/dist/collection/components/tabs/resources.js +1 -1
  339. package/dist/collection/components/tabs/tabs.js +1 -1
  340. package/dist/collection/components/tile/resources.js +1 -1
  341. package/dist/collection/components/tile/tile.js +1 -1
  342. package/dist/collection/components/tile-select/resources.js +1 -1
  343. package/dist/collection/components/tile-select/tile-select.js +1 -1
  344. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  345. package/dist/collection/components/time-picker/resources.js +1 -1
  346. package/dist/collection/components/time-picker/time-picker.js +1 -1
  347. package/dist/collection/components/tip/resources.js +1 -1
  348. package/dist/collection/components/tip/tip.js +1 -1
  349. package/dist/collection/components/tip-group/tip-group.js +1 -1
  350. package/dist/collection/components/tip-manager/resources.js +1 -1
  351. package/dist/collection/components/tip-manager/tip-manager.js +1 -1
  352. package/dist/collection/components/tooltip/TooltipManager.js +1 -1
  353. package/dist/collection/components/tooltip/resources.js +1 -1
  354. package/dist/collection/components/tooltip/tooltip.js +90 -7
  355. package/dist/collection/components/tooltip-manager/tooltip-manager.js +1 -1
  356. package/dist/collection/components/tree/interfaces.js +1 -1
  357. package/dist/collection/components/tree/tree.js +1 -1
  358. package/dist/collection/components/tree/utils.js +1 -1
  359. package/dist/collection/components/tree-item/resources.js +1 -1
  360. package/dist/collection/components/tree-item/tree-item.js +1 -1
  361. package/dist/collection/components/value-list/resources.js +1 -1
  362. package/dist/collection/components/value-list/utils.js +1 -1
  363. package/dist/collection/components/value-list/value-list.js +1 -1
  364. package/dist/collection/components/value-list-item/resources.js +1 -1
  365. package/dist/collection/components/value-list-item/value-list-item.js +1 -1
  366. package/dist/collection/utils/array.js +1 -1
  367. package/dist/collection/utils/conditionalSlot.js +1 -1
  368. package/dist/collection/utils/config.js +1 -1
  369. package/dist/collection/utils/date.js +1 -1
  370. package/dist/collection/utils/dom.js +1 -1
  371. package/dist/collection/utils/filter.js +1 -1
  372. package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
  373. package/dist/collection/utils/floating-ui.js +1 -1
  374. package/dist/collection/utils/focusTrapComponent.js +1 -1
  375. package/dist/collection/utils/form.js +1 -1
  376. package/dist/collection/utils/globalAttributes.js +1 -1
  377. package/dist/collection/utils/globalScript.js +1 -1
  378. package/dist/collection/utils/guid.js +1 -1
  379. package/dist/collection/utils/interactive.js +1 -1
  380. package/dist/collection/utils/key.js +1 -1
  381. package/dist/collection/utils/label.js +1 -1
  382. package/dist/collection/utils/locale.js +1 -1
  383. package/dist/collection/utils/math.js +1 -1
  384. package/dist/collection/utils/number.js +1 -1
  385. package/dist/collection/utils/observers.js +1 -1
  386. package/dist/collection/utils/openCloseComponent.js +1 -1
  387. package/dist/collection/utils/resources.js +1 -1
  388. package/dist/collection/utils/t9n.js +1 -1
  389. package/dist/collection/utils/theme.js +1 -1
  390. package/dist/collection/utils/time.js +1 -1
  391. package/dist/components/ExpandToggle.js +1 -1
  392. package/dist/components/Heading.js +1 -1
  393. package/dist/components/action-group.js +1 -1
  394. package/dist/components/action-menu.js +2 -2
  395. package/dist/components/action.js +2 -2
  396. package/dist/components/array.js +1 -1
  397. package/dist/components/button.js +2 -2
  398. package/dist/components/calcite-accordion-item.js +1 -1
  399. package/dist/components/calcite-accordion.js +1 -1
  400. package/dist/components/calcite-action-bar.js +1 -1
  401. package/dist/components/calcite-action-group.js +1 -1
  402. package/dist/components/calcite-action-menu.js +1 -1
  403. package/dist/components/calcite-action-pad.js +1 -1
  404. package/dist/components/calcite-action.js +1 -1
  405. package/dist/components/calcite-alert.js +1 -1
  406. package/dist/components/calcite-avatar.js +1 -1
  407. package/dist/components/calcite-block-section.js +1 -1
  408. package/dist/components/calcite-block.js +1 -1
  409. package/dist/components/calcite-button.js +1 -1
  410. package/dist/components/calcite-card.js +2 -2
  411. package/dist/components/calcite-checkbox.js +1 -1
  412. package/dist/components/calcite-chip.js +1 -1
  413. package/dist/components/calcite-color-picker-hex-input.js +1 -1
  414. package/dist/components/calcite-color-picker-swatch.js +1 -1
  415. package/dist/components/calcite-color-picker.js +1 -1
  416. package/dist/components/calcite-combobox-item-group.js +1 -1
  417. package/dist/components/calcite-combobox-item.js +1 -1
  418. package/dist/components/calcite-combobox.js +1 -1
  419. package/dist/components/calcite-date-picker-day.js +1 -1
  420. package/dist/components/calcite-date-picker-month-header.js +1 -1
  421. package/dist/components/calcite-date-picker-month.js +1 -1
  422. package/dist/components/calcite-date-picker.js +1 -1
  423. package/dist/components/calcite-dropdown-group.js +1 -1
  424. package/dist/components/calcite-dropdown-item.js +1 -1
  425. package/dist/components/calcite-dropdown.js +1 -1
  426. package/dist/components/calcite-fab.js +1 -1
  427. package/dist/components/calcite-filter.js +1 -1
  428. package/dist/components/calcite-flow-item.js +1 -1
  429. package/dist/components/calcite-flow.js +1 -1
  430. package/dist/components/calcite-graph.js +1 -1
  431. package/dist/components/calcite-handle.js +1 -1
  432. package/dist/components/calcite-icon.js +1 -1
  433. package/dist/components/calcite-inline-editable.js +1 -1
  434. package/dist/components/calcite-input-date-picker.js +1 -1
  435. package/dist/components/calcite-input-message.js +8 -3
  436. package/dist/components/calcite-input-number.js +1 -1
  437. package/dist/components/calcite-input-text.js +1 -1
  438. package/dist/components/calcite-input-time-picker.js +2 -2
  439. package/dist/components/calcite-input.js +1 -1
  440. package/dist/components/calcite-label.js +1 -1
  441. package/dist/components/calcite-link.js +1 -1
  442. package/dist/components/calcite-list-item-group.js +1 -1
  443. package/dist/components/calcite-list-item.js +1 -1
  444. package/dist/components/calcite-list.js +1 -1
  445. package/dist/components/calcite-loader.js +1 -1
  446. package/dist/components/calcite-modal.js +3 -1264
  447. package/dist/components/calcite-notice.js +1 -1
  448. package/dist/components/calcite-option-group.js +1 -1
  449. package/dist/components/calcite-option.js +1 -1
  450. package/dist/components/calcite-pagination.js +1 -1
  451. package/dist/components/calcite-panel.js +1 -1
  452. package/dist/components/calcite-pick-list-group.js +1 -1
  453. package/dist/components/calcite-pick-list-item.js +1 -1
  454. package/dist/components/calcite-pick-list.js +1 -1
  455. package/dist/components/calcite-popover-manager.js +1 -1
  456. package/dist/components/calcite-popover.js +1 -1
  457. package/dist/components/calcite-progress.js +1 -1
  458. package/dist/components/calcite-radio-button-group.js +1 -1
  459. package/dist/components/calcite-radio-button.js +1 -1
  460. package/dist/components/calcite-radio-group-item.js +1 -1
  461. package/dist/components/calcite-radio-group.js +1 -1
  462. package/dist/components/calcite-rating.js +1 -1
  463. package/dist/components/calcite-scrim.js +1 -1
  464. package/dist/components/calcite-select.js +1 -1
  465. package/dist/components/calcite-shell-center-row.js +1 -1
  466. package/dist/components/calcite-shell-panel.js +1 -1
  467. package/dist/components/calcite-shell.js +1 -1
  468. package/dist/components/calcite-slider.js +1 -1
  469. package/dist/components/calcite-sortable-list.js +1 -1
  470. package/dist/components/calcite-split-button.js +1 -1
  471. package/dist/components/calcite-stepper-item.js +1 -1
  472. package/dist/components/calcite-stepper.js +1 -1
  473. package/dist/components/calcite-switch.js +1 -1
  474. package/dist/components/calcite-tab-nav.js +1 -1
  475. package/dist/components/calcite-tab-title.js +1 -1
  476. package/dist/components/calcite-tab.js +1 -1
  477. package/dist/components/calcite-tabs.js +1 -1
  478. package/dist/components/calcite-tile-select-group.js +1 -1
  479. package/dist/components/calcite-tile-select.js +1 -1
  480. package/dist/components/calcite-tile.js +1 -1
  481. package/dist/components/calcite-time-picker.js +1 -1
  482. package/dist/components/calcite-tip-group.js +1 -1
  483. package/dist/components/calcite-tip-manager.js +1 -1
  484. package/dist/components/calcite-tip.js +1 -1
  485. package/dist/components/calcite-tooltip-manager.js +1 -1
  486. package/dist/components/calcite-tooltip.js +1 -1
  487. package/dist/components/calcite-tree-item.js +1 -1
  488. package/dist/components/calcite-tree.js +1 -1
  489. package/dist/components/calcite-value-list-item.js +1 -1
  490. package/dist/components/calcite-value-list.js +1 -1
  491. package/dist/components/checkbox.js +1 -1
  492. package/dist/components/chip.js +1 -1
  493. package/dist/components/color-picker-hex-input.js +1 -1
  494. package/dist/components/color-picker-swatch.js +1 -1
  495. package/dist/components/conditionalSlot.js +1 -1
  496. package/dist/components/date-picker-day.js +1 -1
  497. package/dist/components/date-picker-month-header.js +1 -1
  498. package/dist/components/date-picker-month.js +1 -1
  499. package/dist/components/date-picker.js +1 -1
  500. package/dist/components/date.js +1 -1
  501. package/dist/components/debounce.js +1 -1
  502. package/dist/components/dom.js +1 -1
  503. package/dist/components/dropdown.js +1 -1
  504. package/dist/components/filter.js +1 -1
  505. package/dist/components/filter2.js +1 -1
  506. package/dist/components/floating-ui.js +1 -1
  507. package/dist/components/focusTrapComponent.js +1270 -0
  508. package/dist/components/form.js +1 -1
  509. package/dist/components/graph.js +1 -1
  510. package/dist/components/guid.js +1 -1
  511. package/dist/components/handle.js +1 -1
  512. package/dist/components/icon.js +1 -1
  513. package/dist/components/index.js +1 -1
  514. package/dist/components/input.js +1 -1
  515. package/dist/components/interactive.js +1 -1
  516. package/dist/components/interfaces.js +1 -1
  517. package/dist/components/interfaces2.js +1 -1
  518. package/dist/components/key.js +1 -1
  519. package/dist/components/label.js +1 -1
  520. package/dist/components/label2.js +1 -1
  521. package/dist/components/link.js +1 -1
  522. package/dist/components/loader.js +8 -3
  523. package/dist/components/locale.js +1 -1
  524. package/dist/components/math.js +1 -1
  525. package/dist/components/nonChromiumPlatformUtils.js +1 -1
  526. package/dist/components/observers.js +1 -1
  527. package/dist/components/openCloseComponent.js +1 -1
  528. package/dist/components/panel.js +1 -1
  529. package/dist/components/pick-list-item.js +1 -1
  530. package/dist/components/popover.js +15 -3
  531. package/dist/components/progress.js +1 -1
  532. package/dist/components/resources.js +1 -1
  533. package/dist/components/resources2.js +1 -1
  534. package/dist/components/scrim.js +2 -2
  535. package/dist/components/shared-list-render.js +1 -1
  536. package/dist/components/sortable.esm.js +1 -1
  537. package/dist/components/switch.js +1 -1
  538. package/dist/components/tab-nav.js +1 -1
  539. package/dist/components/tab-title.js +1 -1
  540. package/dist/components/tab.js +1 -1
  541. package/dist/components/tabs.js +1 -1
  542. package/dist/components/tile.js +1 -1
  543. package/dist/components/time-picker.js +1 -1
  544. package/dist/components/tooltip.js +32 -8
  545. package/dist/components/utils.js +1 -1
  546. package/dist/components/utils2.js +1 -1
  547. package/dist/esm/{ExpandToggle-c1666d9f.js → ExpandToggle-41774b7f.js} +5 -5
  548. package/dist/esm/{Heading-6f3b27d7.js → Heading-c29c5794.js} +2 -2
  549. package/dist/esm/{app-globals-dc53e887.js → app-globals-d9f28e13.js} +2 -2
  550. package/dist/esm/{array-ec97ab21.js → array-0a4488f1.js} +1 -1
  551. package/dist/esm/calcite-accordion_2.entry.js +7 -7
  552. package/dist/esm/calcite-action-bar.entry.js +11 -11
  553. package/dist/esm/calcite-action-group.entry.js +9 -9
  554. package/dist/esm/calcite-action-menu.entry.js +9 -9
  555. package/dist/esm/calcite-action-pad.entry.js +10 -10
  556. package/dist/esm/calcite-action.entry.js +8 -8
  557. package/dist/esm/calcite-alert.entry.js +10 -10
  558. package/dist/esm/calcite-avatar.entry.js +6 -6
  559. package/dist/esm/calcite-block_2.entry.js +10 -10
  560. package/dist/esm/calcite-button.entry.js +10 -10
  561. package/dist/esm/calcite-card.entry.js +8 -8
  562. package/dist/esm/calcite-checkbox.entry.js +9 -9
  563. package/dist/esm/calcite-chip.entry.js +7 -7
  564. package/dist/esm/calcite-color-picker_3.entry.js +10 -10
  565. package/dist/esm/calcite-combobox_3.entry.js +14 -14
  566. package/dist/esm/calcite-date-picker_4.entry.js +11 -11
  567. package/dist/esm/calcite-dropdown_3.entry.js +11 -11
  568. package/dist/esm/calcite-fab.entry.js +6 -6
  569. package/dist/esm/calcite-filter.entry.js +8 -8
  570. package/dist/esm/calcite-flow-item.entry.js +7 -7
  571. package/dist/esm/calcite-flow.entry.js +3 -3
  572. package/dist/esm/calcite-graph_2.entry.js +12 -12
  573. package/dist/esm/calcite-handle.entry.js +5 -5
  574. package/dist/esm/calcite-icon.entry.js +6 -6
  575. package/dist/esm/calcite-inline-editable.entry.js +8 -8
  576. package/dist/esm/calcite-input-date-picker.entry.js +15 -15
  577. package/dist/esm/calcite-input-message.entry.js +12 -7
  578. package/dist/esm/calcite-input-number.entry.js +12 -12
  579. package/dist/esm/calcite-input-text.entry.js +9 -9
  580. package/dist/esm/calcite-input-time-picker_2.entry.js +12 -12
  581. package/dist/esm/calcite-input.entry.js +12 -12
  582. package/dist/esm/calcite-label.entry.js +6 -6
  583. package/dist/esm/calcite-link.entry.js +6 -6
  584. package/dist/esm/calcite-list_3.entry.js +9 -9
  585. package/dist/esm/calcite-loader.entry.js +10 -5
  586. package/dist/esm/calcite-modal.entry.js +9 -1270
  587. package/dist/esm/calcite-notice.entry.js +8 -8
  588. package/dist/esm/calcite-option_3.entry.js +9 -9
  589. package/dist/esm/calcite-pagination.entry.js +8 -8
  590. package/dist/esm/calcite-panel.entry.js +10 -10
  591. package/dist/esm/calcite-pick-list_3.entry.js +12 -12
  592. package/dist/esm/calcite-popover_2.entry.js +24 -13
  593. package/dist/esm/calcite-progress.entry.js +2 -2
  594. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  595. package/dist/esm/calcite-radio-button.entry.js +9 -9
  596. package/dist/esm/calcite-radio-group_2.entry.js +8 -8
  597. package/dist/esm/calcite-rating.entry.js +9 -9
  598. package/dist/esm/calcite-scrim.entry.js +3 -3
  599. package/dist/esm/calcite-shell_3.entry.js +8 -8
  600. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  601. package/dist/esm/calcite-split-button.entry.js +3 -3
  602. package/dist/esm/calcite-stepper_2.entry.js +9 -9
  603. package/dist/esm/calcite-switch.entry.js +9 -9
  604. package/dist/esm/calcite-tab_4.entry.js +7 -7
  605. package/dist/esm/calcite-tile-select_2.entry.js +4 -4
  606. package/dist/esm/calcite-tile.entry.js +8 -8
  607. package/dist/esm/calcite-tip_3.entry.js +8 -8
  608. package/dist/esm/calcite-tooltip_2.entry.js +37 -13
  609. package/dist/esm/calcite-tree_2.entry.js +8 -8
  610. package/dist/esm/calcite-value-list_2.entry.js +12 -12
  611. package/dist/esm/calcite.js +5 -5
  612. package/dist/esm/{conditionalSlot-65d395e3.js → conditionalSlot-966590ec.js} +3 -3
  613. package/dist/esm/{debounce-150a7fe8.js → debounce-f66bdfff.js} +1 -1
  614. package/dist/esm/{dom-cc5c3984.js → dom-db31979f.js} +3 -3
  615. package/dist/esm/{filter-1ebb2c6b.js → filter-a2ddf863.js} +2 -2
  616. package/dist/esm/{floating-ui-93789309.js → floating-ui-5f769d28.js} +4 -4
  617. package/dist/esm/focusTrapComponent-692f0964.js +1270 -0
  618. package/dist/esm/{form-255c911d.js → form-b9b0dbc4.js} +3 -3
  619. package/dist/esm/{guid-f9660e6f.js → guid-245906d2.js} +1 -1
  620. package/dist/esm/{index-d2393e84.js → index-89e9515d.js} +1 -1
  621. package/dist/esm/index.js +1 -1
  622. package/dist/esm/{interactive-26a4cd50.js → interactive-870aacaa.js} +1 -1
  623. package/dist/esm/{interfaces-36e4a241.js → interfaces-405b7654.js} +1 -1
  624. package/dist/esm/{key-a4eb4c7a.js → key-be044e8f.js} +1 -1
  625. package/dist/esm/{label-958c6dcb.js → label-dac2bce3.js} +2 -2
  626. package/dist/esm/loader.js +5 -5
  627. package/dist/esm/{locale-356e61ad.js → locale-8d9e26c2.js} +4 -4
  628. package/dist/esm/{math-edfa7bd5.js → math-6a5196d6.js} +1 -1
  629. package/dist/esm/{nonChromiumPlatformUtils-0826d52b.js → nonChromiumPlatformUtils-44255917.js} +6 -6
  630. package/dist/esm/{observers-8a9fc943.js → observers-1dcaab27.js} +1 -1
  631. package/dist/esm/{openCloseComponent-759e2351.js → openCloseComponent-6ed97ece.js} +1 -1
  632. package/dist/esm/{resources-0fd6d659.js → resources-46a1e1f9.js} +1 -1
  633. package/dist/esm/{resources-03d3cf60.js → resources-46cbddb4.js} +1 -1
  634. package/dist/esm/{resources-c578caf8.js → resources-6f2cd008.js} +5 -5
  635. package/dist/esm/{resources-d313bb62.js → resources-8d0752ff.js} +3 -3
  636. package/dist/esm/{resources-b9c5aaf9.js → resources-b744d1ce.js} +1 -1
  637. package/dist/esm/{resources-64a95f35.js → resources-c02a7a33.js} +1 -1
  638. package/dist/esm/{sortable.esm-6298e963.js → sortable.esm-5b4f86a2.js} +1 -1
  639. package/dist/esm/{utils-18a922e5.js → utils-7a1067a8.js} +1 -1
  640. package/dist/extras/docs-json.json +79 -5
  641. package/dist/loader/cdn.js +1 -1
  642. package/dist/loader/index.cjs.js +1 -1
  643. package/dist/loader/index.es2017.js +1 -1
  644. package/dist/loader/index.js +1 -1
  645. package/dist/types/components/input-message/input-message.d.ts +6 -1
  646. package/dist/types/components/loader/loader.d.ts +6 -1
  647. package/dist/types/components/popover/popover.d.ts +8 -1
  648. package/dist/types/components/tooltip/tooltip.d.ts +18 -2
  649. package/dist/types/components.d.ts +36 -0
  650. package/dist/types/preact.d.ts +6 -1
  651. package/hydrate/index.js +64 -20
  652. package/package.json +1 -1
  653. package/dist/calcite/p-0d96f830.entry.js +0 -6
  654. package/dist/calcite/p-3ed7f5b5.js +0 -6
  655. package/dist/calcite/p-42f22b60.js +0 -6
  656. package/dist/calcite/p-5f59c538.entry.js +0 -6
  657. package/dist/calcite/p-6bc879e0.entry.js +0 -6
  658. package/dist/calcite/p-77658bab.entry.js +0 -6
  659. package/dist/calcite/p-83617657.entry.js +0 -16
  660. package/dist/calcite/p-b7fbe5a9.entry.js +0 -6
  661. package/dist/calcite/p-d0681fe7.js +0 -6
  662. package/dist/calcite/p-d728f7e7.entry.js +0 -6
  663. package/dist/calcite/p-ddb1b9bb.entry.js +0 -6
  664. package/dist/calcite/p-e64e5cdc.entry.js +0 -6
@@ -0,0 +1,1270 @@
1
+ /*!
2
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
+ * v1.0.0-next.635
5
+ */
6
+ import { f as focusElement } from './dom.js';
7
+
8
+ /*!
9
+ * tabbable 6.0.1
10
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
11
+ */
12
+ var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
13
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
14
+ var NoElement = typeof Element === 'undefined';
15
+ var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
16
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
17
+ return element.getRootNode();
18
+ } : function (element) {
19
+ return element.ownerDocument;
20
+ };
21
+
22
+ /**
23
+ * @param {Element} el container to check in
24
+ * @param {boolean} includeContainer add container to check
25
+ * @param {(node: Element) => boolean} filter filter candidates
26
+ * @returns {Element[]}
27
+ */
28
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
29
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
30
+ if (includeContainer && matches.call(el, candidateSelector)) {
31
+ candidates.unshift(el);
32
+ }
33
+ candidates = candidates.filter(filter);
34
+ return candidates;
35
+ };
36
+
37
+ /**
38
+ * @callback GetShadowRoot
39
+ * @param {Element} element to check for shadow root
40
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
41
+ */
42
+
43
+ /**
44
+ * @callback ShadowRootFilter
45
+ * @param {Element} shadowHostNode the element which contains shadow content
46
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
47
+ */
48
+
49
+ /**
50
+ * @typedef {Object} CandidateScope
51
+ * @property {Element} scopeParent contains inner candidates
52
+ * @property {Element[]} candidates list of candidates found in the scope parent
53
+ */
54
+
55
+ /**
56
+ * @typedef {Object} IterativeOptions
57
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
58
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
59
+ * or a boolean stating if it has an undisclosed shadow root
60
+ * @property {(node: Element) => boolean} filter filter candidates
61
+ * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
62
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
63
+ */
64
+
65
+ /**
66
+ * @param {Element[]} elements list of element containers to match candidates from
67
+ * @param {boolean} includeContainer add container list to check
68
+ * @param {IterativeOptions} options
69
+ * @returns {Array.<Element|CandidateScope>}
70
+ */
71
+ var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
72
+ var candidates = [];
73
+ var elementsToCheck = Array.from(elements);
74
+ while (elementsToCheck.length) {
75
+ var element = elementsToCheck.shift();
76
+ if (element.tagName === 'SLOT') {
77
+ // add shadow dom slot scope (slot itself cannot be focusable)
78
+ var assigned = element.assignedElements();
79
+ var content = assigned.length ? assigned : element.children;
80
+ var nestedCandidates = getCandidatesIteratively(content, true, options);
81
+ if (options.flatten) {
82
+ candidates.push.apply(candidates, nestedCandidates);
83
+ } else {
84
+ candidates.push({
85
+ scopeParent: element,
86
+ candidates: nestedCandidates
87
+ });
88
+ }
89
+ } else {
90
+ // check candidate element
91
+ var validCandidate = matches.call(element, candidateSelector);
92
+ if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
93
+ candidates.push(element);
94
+ }
95
+
96
+ // iterate over shadow content if possible
97
+ var shadowRoot = element.shadowRoot ||
98
+ // check for an undisclosed shadow
99
+ typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
100
+ var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
101
+ if (shadowRoot && validShadowRoot) {
102
+ // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
103
+ // shadow exists, so look at light dom children as fallback BUT create a scope for any
104
+ // child candidates found because they're likely slotted elements (elements that are
105
+ // children of the web component element (which has the shadow), in the light dom, but
106
+ // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
107
+ // _after_ we return from this recursive call
108
+ var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
109
+ if (options.flatten) {
110
+ candidates.push.apply(candidates, _nestedCandidates);
111
+ } else {
112
+ candidates.push({
113
+ scopeParent: element,
114
+ candidates: _nestedCandidates
115
+ });
116
+ }
117
+ } else {
118
+ // there's not shadow so just dig into the element's (light dom) children
119
+ // __without__ giving the element special scope treatment
120
+ elementsToCheck.unshift.apply(elementsToCheck, element.children);
121
+ }
122
+ }
123
+ }
124
+ return candidates;
125
+ };
126
+ var getTabindex = function getTabindex(node, isScope) {
127
+ if (node.tabIndex < 0) {
128
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
129
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
130
+ // yet they are still part of the regular tab order; in FF, they get a default
131
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
132
+ // order, consider their tab index to be 0.
133
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
134
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
135
+ //
136
+ // isScope is positive for custom element with shadow root or slot that by default
137
+ // have tabIndex -1, but need to be sorted by document order in order for their
138
+ // content to be inserted in the correct position
139
+ if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
140
+ return 0;
141
+ }
142
+ }
143
+ return node.tabIndex;
144
+ };
145
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
146
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
147
+ };
148
+ var isInput = function isInput(node) {
149
+ return node.tagName === 'INPUT';
150
+ };
151
+ var isHiddenInput = function isHiddenInput(node) {
152
+ return isInput(node) && node.type === 'hidden';
153
+ };
154
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
155
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
156
+ return child.tagName === 'SUMMARY';
157
+ });
158
+ return r;
159
+ };
160
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
161
+ for (var i = 0; i < nodes.length; i++) {
162
+ if (nodes[i].checked && nodes[i].form === form) {
163
+ return nodes[i];
164
+ }
165
+ }
166
+ };
167
+ var isTabbableRadio = function isTabbableRadio(node) {
168
+ if (!node.name) {
169
+ return true;
170
+ }
171
+ var radioScope = node.form || getRootNode(node);
172
+ var queryRadios = function queryRadios(name) {
173
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
174
+ };
175
+ var radioSet;
176
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
177
+ radioSet = queryRadios(window.CSS.escape(node.name));
178
+ } else {
179
+ try {
180
+ radioSet = queryRadios(node.name);
181
+ } catch (err) {
182
+ // eslint-disable-next-line no-console
183
+ console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
184
+ return false;
185
+ }
186
+ }
187
+ var checked = getCheckedRadio(radioSet, node.form);
188
+ return !checked || checked === node;
189
+ };
190
+ var isRadio = function isRadio(node) {
191
+ return isInput(node) && node.type === 'radio';
192
+ };
193
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
194
+ return isRadio(node) && !isTabbableRadio(node);
195
+ };
196
+
197
+ // determines if a node is ultimately attached to the window's document
198
+ var isNodeAttached = function isNodeAttached(node) {
199
+ var _nodeRootHost;
200
+ // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
201
+ // (but NOT _the_ document; see second 'If' comment below for more).
202
+ // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
203
+ // is attached, and the one we need to check if it's in the document or not (because the
204
+ // shadow, and all nodes it contains, is never considered in the document since shadows
205
+ // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
206
+ // is hidden, or is not in the document itself but is detached, it will affect the shadow's
207
+ // visibility, including all the nodes it contains). The host could be any normal node,
208
+ // or a custom element (i.e. web component). Either way, that's the one that is considered
209
+ // part of the document, not the shadow root, nor any of its children (i.e. the node being
210
+ // tested).
211
+ // To further complicate things, we have to look all the way up until we find a shadow HOST
212
+ // that is attached (or find none) because the node might be in nested shadows...
213
+ // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
214
+ // document (per the docs) and while it's a Document-type object, that document does not
215
+ // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
216
+ // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
217
+ // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
218
+ // node is actually detached.
219
+ var nodeRootHost = getRootNode(node).host;
220
+ var attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && _nodeRootHost.ownerDocument.contains(nodeRootHost) || node.ownerDocument.contains(node));
221
+ while (!attached && nodeRootHost) {
222
+ var _nodeRootHost2;
223
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
224
+ // which means we need to get the host's host and check if that parent host is contained
225
+ // in (i.e. attached to) the document
226
+ nodeRootHost = getRootNode(nodeRootHost).host;
227
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && _nodeRootHost2.ownerDocument.contains(nodeRootHost));
228
+ }
229
+ return attached;
230
+ };
231
+ var isZeroArea = function isZeroArea(node) {
232
+ var _node$getBoundingClie = node.getBoundingClientRect(),
233
+ width = _node$getBoundingClie.width,
234
+ height = _node$getBoundingClie.height;
235
+ return width === 0 && height === 0;
236
+ };
237
+ var isHidden = function isHidden(node, _ref) {
238
+ var displayCheck = _ref.displayCheck,
239
+ getShadowRoot = _ref.getShadowRoot;
240
+ // NOTE: visibility will be `undefined` if node is detached from the document
241
+ // (see notes about this further down), which means we will consider it visible
242
+ // (this is legacy behavior from a very long way back)
243
+ // NOTE: we check this regardless of `displayCheck="none"` because this is a
244
+ // _visibility_ check, not a _display_ check
245
+ if (getComputedStyle(node).visibility === 'hidden') {
246
+ return true;
247
+ }
248
+ var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
249
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
250
+ if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
251
+ return true;
252
+ }
253
+ if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
254
+ if (typeof getShadowRoot === 'function') {
255
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
256
+ // 'non-zero-area' fallback
257
+ var originalNode = node;
258
+ while (node) {
259
+ var parentElement = node.parentElement;
260
+ var rootNode = getRootNode(node);
261
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
262
+ ) {
263
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
264
+ // fall back to a non-zero-area test
265
+ return isZeroArea(node);
266
+ } else if (node.assignedSlot) {
267
+ // iterate up slot
268
+ node = node.assignedSlot;
269
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
270
+ // cross shadow boundary
271
+ node = rootNode.host;
272
+ } else {
273
+ // iterate up normal dom
274
+ node = parentElement;
275
+ }
276
+ }
277
+ node = originalNode;
278
+ }
279
+ // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
280
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
281
+ // it might be a falsy value, which means shadow DOM support is disabled
282
+
283
+ // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
284
+ // now we can just test to see if it would normally be visible or not, provided it's
285
+ // attached to the main document.
286
+ // NOTE: We must consider case where node is inside a shadow DOM and given directly to
287
+ // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
288
+
289
+ if (isNodeAttached(node)) {
290
+ // this works wherever the node is: if there's at least one client rect, it's
291
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
292
+ // node itself is hidden in place of its contents; and there's no need to search
293
+ // up the hierarchy either
294
+ return !node.getClientRects().length;
295
+ }
296
+
297
+ // Else, the node isn't attached to the document, which means the `getClientRects()`
298
+ // API will __always__ return zero rects (this can happen, for example, if React
299
+ // is used to render nodes onto a detached tree, as confirmed in this thread:
300
+ // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
301
+ //
302
+ // It also means that even window.getComputedStyle(node).display will return `undefined`
303
+ // because styles are only computed for nodes that are in the document.
304
+ //
305
+ // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
306
+ // somehow. Though it was never stated officially, anyone who has ever used tabbable
307
+ // APIs on nodes in detached containers has actually implicitly used tabbable in what
308
+ // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
309
+ // considering __everything__ to be visible because of the innability to determine styles.
310
+ //
311
+ // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
312
+ // nodes as visible with the 'none' fallback.__
313
+ if (displayCheck !== 'legacy-full') {
314
+ return true; // hidden
315
+ }
316
+ // else, fallback to 'none' mode and consider the node visible
317
+ } else if (displayCheck === 'non-zero-area') {
318
+ // NOTE: Even though this tests that the node's client rect is non-zero to determine
319
+ // whether it's displayed, and that a detached node will __always__ have a zero-area
320
+ // client rect, we don't special-case for whether the node is attached or not. In
321
+ // this mode, we do want to consider nodes that have a zero area to be hidden at all
322
+ // times, and that includes attached or not.
323
+ return isZeroArea(node);
324
+ }
325
+
326
+ // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
327
+ // it's visible
328
+ return false;
329
+ };
330
+
331
+ // form fields (nested) inside a disabled fieldset are not focusable/tabbable
332
+ // unless they are in the _first_ <legend> element of the top-most disabled
333
+ // fieldset
334
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
335
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
336
+ var parentNode = node.parentElement;
337
+ // check if `node` is contained in a disabled <fieldset>
338
+ while (parentNode) {
339
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
340
+ // look for the first <legend> among the children of the disabled <fieldset>
341
+ for (var i = 0; i < parentNode.children.length; i++) {
342
+ var child = parentNode.children.item(i);
343
+ // when the first <legend> (in document order) is found
344
+ if (child.tagName === 'LEGEND') {
345
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
346
+ // return whether `node` is a descendant of its first <legend>
347
+ return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
348
+ }
349
+ }
350
+ // the disabled <fieldset> containing `node` has no <legend>
351
+ return true;
352
+ }
353
+ parentNode = parentNode.parentElement;
354
+ }
355
+ }
356
+
357
+ // else, node's tabbable/focusable state should not be affected by a fieldset's
358
+ // enabled/disabled state
359
+ return false;
360
+ };
361
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
362
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
363
+ // For a details element with a summary, the summary element gets the focus
364
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
365
+ return false;
366
+ }
367
+ return true;
368
+ };
369
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
370
+ if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
371
+ return false;
372
+ }
373
+ return true;
374
+ };
375
+ var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
376
+ var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
377
+ if (isNaN(tabIndex) || tabIndex >= 0) {
378
+ return true;
379
+ }
380
+ // If a custom element has an explicit negative tabindex,
381
+ // browsers will not allow tab targeting said element's children.
382
+ return false;
383
+ };
384
+
385
+ /**
386
+ * @param {Array.<Element|CandidateScope>} candidates
387
+ * @returns Element[]
388
+ */
389
+ var sortByOrder = function sortByOrder(candidates) {
390
+ var regularTabbables = [];
391
+ var orderedTabbables = [];
392
+ candidates.forEach(function (item, i) {
393
+ var isScope = !!item.scopeParent;
394
+ var element = isScope ? item.scopeParent : item;
395
+ var candidateTabindex = getTabindex(element, isScope);
396
+ var elements = isScope ? sortByOrder(item.candidates) : element;
397
+ if (candidateTabindex === 0) {
398
+ isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
399
+ } else {
400
+ orderedTabbables.push({
401
+ documentOrder: i,
402
+ tabIndex: candidateTabindex,
403
+ item: item,
404
+ isScope: isScope,
405
+ content: elements
406
+ });
407
+ }
408
+ });
409
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
410
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
411
+ return acc;
412
+ }, []).concat(regularTabbables);
413
+ };
414
+ var tabbable = function tabbable(el, options) {
415
+ options = options || {};
416
+ var candidates;
417
+ if (options.getShadowRoot) {
418
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
419
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
420
+ flatten: false,
421
+ getShadowRoot: options.getShadowRoot,
422
+ shadowRootFilter: isValidShadowRootTabbable
423
+ });
424
+ } else {
425
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
426
+ }
427
+ return sortByOrder(candidates);
428
+ };
429
+ var focusable = function focusable(el, options) {
430
+ options = options || {};
431
+ var candidates;
432
+ if (options.getShadowRoot) {
433
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
434
+ filter: isNodeMatchingSelectorFocusable.bind(null, options),
435
+ flatten: true,
436
+ getShadowRoot: options.getShadowRoot
437
+ });
438
+ } else {
439
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
440
+ }
441
+ return candidates;
442
+ };
443
+ var isTabbable = function isTabbable(node, options) {
444
+ options = options || {};
445
+ if (!node) {
446
+ throw new Error('No node provided');
447
+ }
448
+ if (matches.call(node, candidateSelector) === false) {
449
+ return false;
450
+ }
451
+ return isNodeMatchingSelectorTabbable(options, node);
452
+ };
453
+ var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
454
+ var isFocusable = function isFocusable(node, options) {
455
+ options = options || {};
456
+ if (!node) {
457
+ throw new Error('No node provided');
458
+ }
459
+ if (matches.call(node, focusableCandidateSelector) === false) {
460
+ return false;
461
+ }
462
+ return isNodeMatchingSelectorFocusable(options, node);
463
+ };
464
+
465
+ /*!
466
+ * focus-trap 7.0.0
467
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
468
+ */
469
+
470
+ function ownKeys(object, enumerableOnly) {
471
+ var keys = Object.keys(object);
472
+
473
+ if (Object.getOwnPropertySymbols) {
474
+ var symbols = Object.getOwnPropertySymbols(object);
475
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
476
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
477
+ })), keys.push.apply(keys, symbols);
478
+ }
479
+
480
+ return keys;
481
+ }
482
+
483
+ function _objectSpread2(target) {
484
+ for (var i = 1; i < arguments.length; i++) {
485
+ var source = null != arguments[i] ? arguments[i] : {};
486
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
487
+ _defineProperty(target, key, source[key]);
488
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
489
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
490
+ });
491
+ }
492
+
493
+ return target;
494
+ }
495
+
496
+ function _defineProperty(obj, key, value) {
497
+ if (key in obj) {
498
+ Object.defineProperty(obj, key, {
499
+ value: value,
500
+ enumerable: true,
501
+ configurable: true,
502
+ writable: true
503
+ });
504
+ } else {
505
+ obj[key] = value;
506
+ }
507
+
508
+ return obj;
509
+ }
510
+
511
+ var activeFocusTraps = function () {
512
+ var trapQueue = [];
513
+ return {
514
+ activateTrap: function activateTrap(trap) {
515
+ if (trapQueue.length > 0) {
516
+ var activeTrap = trapQueue[trapQueue.length - 1];
517
+
518
+ if (activeTrap !== trap) {
519
+ activeTrap.pause();
520
+ }
521
+ }
522
+
523
+ var trapIndex = trapQueue.indexOf(trap);
524
+
525
+ if (trapIndex === -1) {
526
+ trapQueue.push(trap);
527
+ } else {
528
+ // move this existing trap to the front of the queue
529
+ trapQueue.splice(trapIndex, 1);
530
+ trapQueue.push(trap);
531
+ }
532
+ },
533
+ deactivateTrap: function deactivateTrap(trap) {
534
+ var trapIndex = trapQueue.indexOf(trap);
535
+
536
+ if (trapIndex !== -1) {
537
+ trapQueue.splice(trapIndex, 1);
538
+ }
539
+
540
+ if (trapQueue.length > 0) {
541
+ trapQueue[trapQueue.length - 1].unpause();
542
+ }
543
+ }
544
+ };
545
+ }();
546
+
547
+ var isSelectableInput = function isSelectableInput(node) {
548
+ return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
549
+ };
550
+
551
+ var isEscapeEvent = function isEscapeEvent(e) {
552
+ return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
553
+ };
554
+
555
+ var isTabEvent = function isTabEvent(e) {
556
+ return e.key === 'Tab' || e.keyCode === 9;
557
+ };
558
+
559
+ var delay = function delay(fn) {
560
+ return setTimeout(fn, 0);
561
+ }; // Array.find/findIndex() are not supported on IE; this replicates enough
562
+ // of Array.findIndex() for our needs
563
+
564
+
565
+ var findIndex = function findIndex(arr, fn) {
566
+ var idx = -1;
567
+ arr.every(function (value, i) {
568
+ if (fn(value)) {
569
+ idx = i;
570
+ return false; // break
571
+ }
572
+
573
+ return true; // next
574
+ });
575
+ return idx;
576
+ };
577
+ /**
578
+ * Get an option's value when it could be a plain value, or a handler that provides
579
+ * the value.
580
+ * @param {*} value Option's value to check.
581
+ * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
582
+ * @returns {*} The `value`, or the handler's returned value.
583
+ */
584
+
585
+
586
+ var valueOrHandler = function valueOrHandler(value) {
587
+ for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
588
+ params[_key - 1] = arguments[_key];
589
+ }
590
+
591
+ return typeof value === 'function' ? value.apply(void 0, params) : value;
592
+ };
593
+
594
+ var getActualTarget = function getActualTarget(event) {
595
+ // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
596
+ // shadow host. However, event.target.composedPath() will be an array of
597
+ // nodes "clicked" from inner-most (the actual element inside the shadow) to
598
+ // outer-most (the host HTML document). If we have access to composedPath(),
599
+ // then use its first element; otherwise, fall back to event.target (and
600
+ // this only works for an _open_ shadow DOM; otherwise,
601
+ // composedPath()[0] === event.target always).
602
+ return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
603
+ };
604
+
605
+ var createFocusTrap = function createFocusTrap(elements, userOptions) {
606
+ // SSR: a live trap shouldn't be created in this type of environment so this
607
+ // should be safe code to execute if the `document` option isn't specified
608
+ var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
609
+
610
+ var config = _objectSpread2({
611
+ returnFocusOnDeactivate: true,
612
+ escapeDeactivates: true,
613
+ delayInitialFocus: true
614
+ }, userOptions);
615
+
616
+ var state = {
617
+ // containers given to createFocusTrap()
618
+ // @type {Array<HTMLElement>}
619
+ containers: [],
620
+ // list of objects identifying tabbable nodes in `containers` in the trap
621
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
622
+ // is active, but the trap should never get to a state where there isn't at least one group
623
+ // with at least one tabbable node in it (that would lead to an error condition that would
624
+ // result in an error being thrown)
625
+ // @type {Array<{
626
+ // container: HTMLElement,
627
+ // tabbableNodes: Array<HTMLElement>, // empty if none
628
+ // focusableNodes: Array<HTMLElement>, // empty if none
629
+ // firstTabbableNode: HTMLElement|null,
630
+ // lastTabbableNode: HTMLElement|null,
631
+ // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
632
+ // }>}
633
+ containerGroups: [],
634
+ // same order/length as `containers` list
635
+ // references to objects in `containerGroups`, but only those that actually have
636
+ // tabbable nodes in them
637
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
638
+ // the same length
639
+ tabbableGroups: [],
640
+ nodeFocusedBeforeActivation: null,
641
+ mostRecentlyFocusedNode: null,
642
+ active: false,
643
+ paused: false,
644
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
645
+ // has been delayed during activation
646
+ delayInitialFocusTimer: undefined
647
+ };
648
+ var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
649
+
650
+ /**
651
+ * Gets a configuration option value.
652
+ * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
653
+ * value will be taken from this object. Otherwise, value will be taken from base configuration.
654
+ * @param {string} optionName Name of the option whose value is sought.
655
+ * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
656
+ * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
657
+ */
658
+
659
+ var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
660
+ return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
661
+ };
662
+ /**
663
+ * Finds the index of the container that contains the element.
664
+ * @param {HTMLElement} element
665
+ * @returns {number} Index of the container in either `state.containers` or
666
+ * `state.containerGroups` (the order/length of these lists are the same); -1
667
+ * if the element isn't found.
668
+ */
669
+
670
+
671
+ var findContainerIndex = function findContainerIndex(element) {
672
+ // NOTE: search `containerGroups` because it's possible a group contains no tabbable
673
+ // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
674
+ // and we still need to find the element in there
675
+ return state.containerGroups.findIndex(function (_ref) {
676
+ var container = _ref.container,
677
+ tabbableNodes = _ref.tabbableNodes;
678
+ return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
679
+ // web components if the `tabbableOptions.getShadowRoot` option was used for
680
+ // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
681
+ // look inside web components even if open)
682
+ tabbableNodes.find(function (node) {
683
+ return node === element;
684
+ });
685
+ });
686
+ };
687
+ /**
688
+ * Gets the node for the given option, which is expected to be an option that
689
+ * can be either a DOM node, a string that is a selector to get a node, `false`
690
+ * (if a node is explicitly NOT given), or a function that returns any of these
691
+ * values.
692
+ * @param {string} optionName
693
+ * @returns {undefined | false | HTMLElement | SVGElement} Returns
694
+ * `undefined` if the option is not specified; `false` if the option
695
+ * resolved to `false` (node explicitly not given); otherwise, the resolved
696
+ * DOM node.
697
+ * @throws {Error} If the option is set, not `false`, and is not, or does not
698
+ * resolve to a node.
699
+ */
700
+
701
+
702
+ var getNodeForOption = function getNodeForOption(optionName) {
703
+ var optionValue = config[optionName];
704
+
705
+ if (typeof optionValue === 'function') {
706
+ for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
707
+ params[_key2 - 1] = arguments[_key2];
708
+ }
709
+
710
+ optionValue = optionValue.apply(void 0, params);
711
+ }
712
+
713
+ if (optionValue === true) {
714
+ optionValue = undefined; // use default value
715
+ }
716
+
717
+ if (!optionValue) {
718
+ if (optionValue === undefined || optionValue === false) {
719
+ return optionValue;
720
+ } // else, empty string (invalid), null (invalid), 0 (invalid)
721
+
722
+
723
+ throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
724
+ }
725
+
726
+ var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
727
+
728
+ if (typeof optionValue === 'string') {
729
+ node = doc.querySelector(optionValue); // resolve to node, or null if fails
730
+
731
+ if (!node) {
732
+ throw new Error("`".concat(optionName, "` as selector refers to no known node"));
733
+ }
734
+ }
735
+
736
+ return node;
737
+ };
738
+
739
+ var getInitialFocusNode = function getInitialFocusNode() {
740
+ var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
741
+
742
+ if (node === false) {
743
+ return false;
744
+ }
745
+
746
+ if (node === undefined) {
747
+ // option not specified: use fallback options
748
+ if (findContainerIndex(doc.activeElement) >= 0) {
749
+ node = doc.activeElement;
750
+ } else {
751
+ var firstTabbableGroup = state.tabbableGroups[0];
752
+ var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
753
+
754
+ node = firstTabbableNode || getNodeForOption('fallbackFocus');
755
+ }
756
+ }
757
+
758
+ if (!node) {
759
+ throw new Error('Your focus-trap needs to have at least one focusable element');
760
+ }
761
+
762
+ return node;
763
+ };
764
+
765
+ var updateTabbableNodes = function updateTabbableNodes() {
766
+ state.containerGroups = state.containers.map(function (container) {
767
+ var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
768
+ // are a superset of tabbable nodes
769
+
770
+ var focusableNodes = focusable(container, config.tabbableOptions);
771
+ return {
772
+ container: container,
773
+ tabbableNodes: tabbableNodes,
774
+ focusableNodes: focusableNodes,
775
+ firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
776
+ lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
777
+
778
+ /**
779
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
780
+ * in this container, if any.
781
+ * @param {HTMLElement} node
782
+ * @param {boolean} [forward] True if going in forward tab order; false if going
783
+ * in reverse.
784
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
785
+ */
786
+ nextTabbableNode: function nextTabbableNode(node) {
787
+ var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
788
+ // NOTE: If tabindex is positive (in order to manipulate the tab order separate
789
+ // from the DOM order), this __will not work__ because the list of focusableNodes,
790
+ // while it contains tabbable nodes, does not sort its nodes in any order other
791
+ // than DOM order, because it can't: Where would you place focusable (but not
792
+ // tabbable) nodes in that order? They have no order, because they aren't tabbale...
793
+ // Support for positive tabindex is already broken and hard to manage (possibly
794
+ // not supportable, TBD), so this isn't going to make things worse than they
795
+ // already are, and at least makes things better for the majority of cases where
796
+ // tabindex is either 0/unset or negative.
797
+ // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
798
+ var nodeIdx = focusableNodes.findIndex(function (n) {
799
+ return n === node;
800
+ });
801
+
802
+ if (nodeIdx < 0) {
803
+ return undefined;
804
+ }
805
+
806
+ if (forward) {
807
+ return focusableNodes.slice(nodeIdx + 1).find(function (n) {
808
+ return isTabbable(n, config.tabbableOptions);
809
+ });
810
+ }
811
+
812
+ return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
813
+ return isTabbable(n, config.tabbableOptions);
814
+ });
815
+ }
816
+ };
817
+ });
818
+ state.tabbableGroups = state.containerGroups.filter(function (group) {
819
+ return group.tabbableNodes.length > 0;
820
+ }); // throw if no groups have tabbable nodes and we don't have a fallback focus node either
821
+
822
+ if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
823
+ ) {
824
+ throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
825
+ }
826
+ };
827
+
828
+ var tryFocus = function tryFocus(node) {
829
+ if (node === false) {
830
+ return;
831
+ }
832
+
833
+ if (node === doc.activeElement) {
834
+ return;
835
+ }
836
+
837
+ if (!node || !node.focus) {
838
+ tryFocus(getInitialFocusNode());
839
+ return;
840
+ }
841
+
842
+ node.focus({
843
+ preventScroll: !!config.preventScroll
844
+ });
845
+ state.mostRecentlyFocusedNode = node;
846
+
847
+ if (isSelectableInput(node)) {
848
+ node.select();
849
+ }
850
+ };
851
+
852
+ var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
853
+ var node = getNodeForOption('setReturnFocus', previousActiveElement);
854
+ return node ? node : node === false ? false : previousActiveElement;
855
+ }; // This needs to be done on mousedown and touchstart instead of click
856
+ // so that it precedes the focus event.
857
+
858
+
859
+ var checkPointerDown = function checkPointerDown(e) {
860
+ var target = getActualTarget(e);
861
+
862
+ if (findContainerIndex(target) >= 0) {
863
+ // allow the click since it ocurred inside the trap
864
+ return;
865
+ }
866
+
867
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
868
+ // immediately deactivate the trap
869
+ trap.deactivate({
870
+ // if, on deactivation, we should return focus to the node originally-focused
871
+ // when the trap was activated (or the configured `setReturnFocus` node),
872
+ // then assume it's also OK to return focus to the outside node that was
873
+ // just clicked, causing deactivation, as long as that node is focusable;
874
+ // if it isn't focusable, then return focus to the original node focused
875
+ // on activation (or the configured `setReturnFocus` node)
876
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
877
+ // which will result in the outside click setting focus to the node
878
+ // that was clicked, whether it's focusable or not; by setting
879
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
880
+ // on activation (or the configured `setReturnFocus` node)
881
+ returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
882
+ });
883
+ return;
884
+ } // This is needed for mobile devices.
885
+ // (If we'll only let `click` events through,
886
+ // then on mobile they will be blocked anyways if `touchstart` is blocked.)
887
+
888
+
889
+ if (valueOrHandler(config.allowOutsideClick, e)) {
890
+ // allow the click outside the trap to take place
891
+ return;
892
+ } // otherwise, prevent the click
893
+
894
+
895
+ e.preventDefault();
896
+ }; // In case focus escapes the trap for some strange reason, pull it back in.
897
+
898
+
899
+ var checkFocusIn = function checkFocusIn(e) {
900
+ var target = getActualTarget(e);
901
+ var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.
902
+
903
+ if (targetContained || target instanceof Document) {
904
+ if (targetContained) {
905
+ state.mostRecentlyFocusedNode = target;
906
+ }
907
+ } else {
908
+ // escaped! pull it back in to where it just left
909
+ e.stopImmediatePropagation();
910
+ tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
911
+ }
912
+ }; // Hijack Tab events on the first and last focusable nodes of the trap,
913
+ // in order to prevent focus from escaping. If it escapes for even a
914
+ // moment it can end up scrolling the page and causing confusion so we
915
+ // kind of need to capture the action at the keydown phase.
916
+
917
+
918
+ var checkTab = function checkTab(e) {
919
+ var target = getActualTarget(e);
920
+ updateTabbableNodes();
921
+ var destinationNode = null;
922
+
923
+ if (state.tabbableGroups.length > 0) {
924
+ // make sure the target is actually contained in a group
925
+ // NOTE: the target may also be the container itself if it's focusable
926
+ // with tabIndex='-1' and was given initial focus
927
+ var containerIndex = findContainerIndex(target);
928
+ var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
929
+
930
+ if (containerIndex < 0) {
931
+ // target not found in any group: quite possible focus has escaped the trap,
932
+ // so bring it back in to...
933
+ if (e.shiftKey) {
934
+ // ...the last node in the last group
935
+ destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
936
+ } else {
937
+ // ...the first node in the first group
938
+ destinationNode = state.tabbableGroups[0].firstTabbableNode;
939
+ }
940
+ } else if (e.shiftKey) {
941
+ // REVERSE
942
+ // is the target the first tabbable node in a group?
943
+ var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
944
+ var firstTabbableNode = _ref2.firstTabbableNode;
945
+ return target === firstTabbableNode;
946
+ });
947
+
948
+ if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
949
+ // an exception case where the target is either the container itself, or
950
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
951
+ // and user clicked on it or node was programmatically given focus)
952
+ // and is not followed by any other tabbable node, in which
953
+ // case, we should handle shift+tab as if focus were on the container's
954
+ // first tabbable node, and go to the last tabbable node of the LAST group
955
+ startOfGroupIndex = containerIndex;
956
+ }
957
+
958
+ if (startOfGroupIndex >= 0) {
959
+ // YES: then shift+tab should go to the last tabbable node in the
960
+ // previous group (and wrap around to the last tabbable node of
961
+ // the LAST group if it's the first tabbable node of the FIRST group)
962
+ var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
963
+ var destinationGroup = state.tabbableGroups[destinationGroupIndex];
964
+ destinationNode = destinationGroup.lastTabbableNode;
965
+ }
966
+ } else {
967
+ // FORWARD
968
+ // is the target the last tabbable node in a group?
969
+ var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
970
+ var lastTabbableNode = _ref3.lastTabbableNode;
971
+ return target === lastTabbableNode;
972
+ });
973
+
974
+ if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
975
+ // an exception case where the target is the container itself, or
976
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
977
+ // and user clicked on it or node was programmatically given focus)
978
+ // and is not followed by any other tabbable node, in which
979
+ // case, we should handle tab as if focus were on the container's
980
+ // last tabbable node, and go to the first tabbable node of the FIRST group
981
+ lastOfGroupIndex = containerIndex;
982
+ }
983
+
984
+ if (lastOfGroupIndex >= 0) {
985
+ // YES: then tab should go to the first tabbable node in the next
986
+ // group (and wrap around to the first tabbable node of the FIRST
987
+ // group if it's the last tabbable node of the LAST group)
988
+ var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
989
+
990
+ var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
991
+ destinationNode = _destinationGroup.firstTabbableNode;
992
+ }
993
+ }
994
+ } else {
995
+ // NOTE: the fallbackFocus option does not support returning false to opt-out
996
+ destinationNode = getNodeForOption('fallbackFocus');
997
+ }
998
+
999
+ if (destinationNode) {
1000
+ e.preventDefault();
1001
+ tryFocus(destinationNode);
1002
+ } // else, let the browser take care of [shift+]tab and move the focus
1003
+
1004
+ };
1005
+
1006
+ var checkKey = function checkKey(e) {
1007
+ if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
1008
+ e.preventDefault();
1009
+ trap.deactivate();
1010
+ return;
1011
+ }
1012
+
1013
+ if (isTabEvent(e)) {
1014
+ checkTab(e);
1015
+ return;
1016
+ }
1017
+ };
1018
+
1019
+ var checkClick = function checkClick(e) {
1020
+ var target = getActualTarget(e);
1021
+
1022
+ if (findContainerIndex(target) >= 0) {
1023
+ return;
1024
+ }
1025
+
1026
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
1027
+ return;
1028
+ }
1029
+
1030
+ if (valueOrHandler(config.allowOutsideClick, e)) {
1031
+ return;
1032
+ }
1033
+
1034
+ e.preventDefault();
1035
+ e.stopImmediatePropagation();
1036
+ }; //
1037
+ // EVENT LISTENERS
1038
+ //
1039
+
1040
+
1041
+ var addListeners = function addListeners() {
1042
+ if (!state.active) {
1043
+ return;
1044
+ } // There can be only one listening focus trap at a time
1045
+
1046
+
1047
+ activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
1048
+ // that caused the focus trap activation.
1049
+
1050
+ state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
1051
+ tryFocus(getInitialFocusNode());
1052
+ }) : tryFocus(getInitialFocusNode());
1053
+ doc.addEventListener('focusin', checkFocusIn, true);
1054
+ doc.addEventListener('mousedown', checkPointerDown, {
1055
+ capture: true,
1056
+ passive: false
1057
+ });
1058
+ doc.addEventListener('touchstart', checkPointerDown, {
1059
+ capture: true,
1060
+ passive: false
1061
+ });
1062
+ doc.addEventListener('click', checkClick, {
1063
+ capture: true,
1064
+ passive: false
1065
+ });
1066
+ doc.addEventListener('keydown', checkKey, {
1067
+ capture: true,
1068
+ passive: false
1069
+ });
1070
+ return trap;
1071
+ };
1072
+
1073
+ var removeListeners = function removeListeners() {
1074
+ if (!state.active) {
1075
+ return;
1076
+ }
1077
+
1078
+ doc.removeEventListener('focusin', checkFocusIn, true);
1079
+ doc.removeEventListener('mousedown', checkPointerDown, true);
1080
+ doc.removeEventListener('touchstart', checkPointerDown, true);
1081
+ doc.removeEventListener('click', checkClick, true);
1082
+ doc.removeEventListener('keydown', checkKey, true);
1083
+ return trap;
1084
+ }; //
1085
+ // TRAP DEFINITION
1086
+ //
1087
+
1088
+
1089
+ trap = {
1090
+ get active() {
1091
+ return state.active;
1092
+ },
1093
+
1094
+ get paused() {
1095
+ return state.paused;
1096
+ },
1097
+
1098
+ activate: function activate(activateOptions) {
1099
+ if (state.active) {
1100
+ return this;
1101
+ }
1102
+
1103
+ var onActivate = getOption(activateOptions, 'onActivate');
1104
+ var onPostActivate = getOption(activateOptions, 'onPostActivate');
1105
+ var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
1106
+
1107
+ if (!checkCanFocusTrap) {
1108
+ updateTabbableNodes();
1109
+ }
1110
+
1111
+ state.active = true;
1112
+ state.paused = false;
1113
+ state.nodeFocusedBeforeActivation = doc.activeElement;
1114
+
1115
+ if (onActivate) {
1116
+ onActivate();
1117
+ }
1118
+
1119
+ var finishActivation = function finishActivation() {
1120
+ if (checkCanFocusTrap) {
1121
+ updateTabbableNodes();
1122
+ }
1123
+
1124
+ addListeners();
1125
+
1126
+ if (onPostActivate) {
1127
+ onPostActivate();
1128
+ }
1129
+ };
1130
+
1131
+ if (checkCanFocusTrap) {
1132
+ checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
1133
+ return this;
1134
+ }
1135
+
1136
+ finishActivation();
1137
+ return this;
1138
+ },
1139
+ deactivate: function deactivate(deactivateOptions) {
1140
+ if (!state.active) {
1141
+ return this;
1142
+ }
1143
+
1144
+ var options = _objectSpread2({
1145
+ onDeactivate: config.onDeactivate,
1146
+ onPostDeactivate: config.onPostDeactivate,
1147
+ checkCanReturnFocus: config.checkCanReturnFocus
1148
+ }, deactivateOptions);
1149
+
1150
+ clearTimeout(state.delayInitialFocusTimer); // noop if undefined
1151
+
1152
+ state.delayInitialFocusTimer = undefined;
1153
+ removeListeners();
1154
+ state.active = false;
1155
+ state.paused = false;
1156
+ activeFocusTraps.deactivateTrap(trap);
1157
+ var onDeactivate = getOption(options, 'onDeactivate');
1158
+ var onPostDeactivate = getOption(options, 'onPostDeactivate');
1159
+ var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
1160
+ var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
1161
+
1162
+ if (onDeactivate) {
1163
+ onDeactivate();
1164
+ }
1165
+
1166
+ var finishDeactivation = function finishDeactivation() {
1167
+ delay(function () {
1168
+ if (returnFocus) {
1169
+ tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
1170
+ }
1171
+
1172
+ if (onPostDeactivate) {
1173
+ onPostDeactivate();
1174
+ }
1175
+ });
1176
+ };
1177
+
1178
+ if (returnFocus && checkCanReturnFocus) {
1179
+ checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
1180
+ return this;
1181
+ }
1182
+
1183
+ finishDeactivation();
1184
+ return this;
1185
+ },
1186
+ pause: function pause() {
1187
+ if (state.paused || !state.active) {
1188
+ return this;
1189
+ }
1190
+
1191
+ state.paused = true;
1192
+ removeListeners();
1193
+ return this;
1194
+ },
1195
+ unpause: function unpause() {
1196
+ if (!state.paused || !state.active) {
1197
+ return this;
1198
+ }
1199
+
1200
+ state.paused = false;
1201
+ updateTabbableNodes();
1202
+ addListeners();
1203
+ return this;
1204
+ },
1205
+ updateContainerElements: function updateContainerElements(containerElements) {
1206
+ var elementsAsArray = [].concat(containerElements).filter(Boolean);
1207
+ state.containers = elementsAsArray.map(function (element) {
1208
+ return typeof element === 'string' ? doc.querySelector(element) : element;
1209
+ });
1210
+
1211
+ if (state.active) {
1212
+ updateTabbableNodes();
1213
+ }
1214
+
1215
+ return this;
1216
+ }
1217
+ }; // initialize container elements
1218
+
1219
+ trap.updateContainerElements(elements);
1220
+ return trap;
1221
+ };
1222
+
1223
+ /**
1224
+ * Helper to set up focus trap component.
1225
+ *
1226
+ * @param component
1227
+ */
1228
+ function connectFocusTrap(component) {
1229
+ const { focusTrapEl } = component;
1230
+ if (!focusTrapEl) {
1231
+ return;
1232
+ }
1233
+ if (focusTrapEl.tabIndex == null) {
1234
+ focusTrapEl.tabIndex = -1;
1235
+ }
1236
+ const focusTrapOptions = {
1237
+ allowOutsideClick: true,
1238
+ clickOutsideDeactivates: false,
1239
+ escapeDeactivates: false,
1240
+ fallbackFocus: focusTrapEl,
1241
+ setReturnFocus: (el) => {
1242
+ focusElement(el);
1243
+ return false;
1244
+ },
1245
+ tabbableOptions: {
1246
+ getShadowRoot: true
1247
+ }
1248
+ };
1249
+ component.focusTrap = createFocusTrap(focusTrapEl, focusTrapOptions);
1250
+ }
1251
+ /**
1252
+ * Helper to activate focus trap component.
1253
+ *
1254
+ * @param component
1255
+ */
1256
+ function activateFocusTrap(component) {
1257
+ var _a;
1258
+ (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
1259
+ }
1260
+ /**
1261
+ * Helper to tear deactivate focus trap component.
1262
+ *
1263
+ * @param component
1264
+ */
1265
+ function deactivateFocusTrap(component) {
1266
+ var _a;
1267
+ (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.deactivate();
1268
+ }
1269
+
1270
+ export { activateFocusTrap as a, connectFocusTrap as c, deactivateFocusTrap as d };