@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
@@ -1,13 +1,14 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.0.0-next.633
4
+ * v1.0.0-next.635
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client/index.js';
7
- import { f as focusElement, b as getSlotted, h as ensureId } from './dom.js';
7
+ import { b as getSlotted, f as focusElement, h as ensureId } from './dom.js';
8
8
  import { c as createObserver } from './observers.js';
9
9
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot.js';
10
10
  import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent.js';
11
+ import { c as connectFocusTrap, a as activateFocusTrap, d as deactivateFocusTrap } from './focusTrapComponent.js';
11
12
  import { d as defineCustomElement$4 } from './icon.js';
12
13
  import { d as defineCustomElement$3 } from './loader.js';
13
14
  import { d as defineCustomElement$2 } from './scrim.js';
@@ -45,1268 +46,6 @@ const TEXT = {
45
46
  close: "Close"
46
47
  };
47
48
 
48
- /*!
49
- * tabbable 6.0.1
50
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
51
- */
52
- 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'];
53
- var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
54
- var NoElement = typeof Element === 'undefined';
55
- var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
56
- var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
57
- return element.getRootNode();
58
- } : function (element) {
59
- return element.ownerDocument;
60
- };
61
-
62
- /**
63
- * @param {Element} el container to check in
64
- * @param {boolean} includeContainer add container to check
65
- * @param {(node: Element) => boolean} filter filter candidates
66
- * @returns {Element[]}
67
- */
68
- var getCandidates = function getCandidates(el, includeContainer, filter) {
69
- var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
70
- if (includeContainer && matches.call(el, candidateSelector)) {
71
- candidates.unshift(el);
72
- }
73
- candidates = candidates.filter(filter);
74
- return candidates;
75
- };
76
-
77
- /**
78
- * @callback GetShadowRoot
79
- * @param {Element} element to check for shadow root
80
- * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
81
- */
82
-
83
- /**
84
- * @callback ShadowRootFilter
85
- * @param {Element} shadowHostNode the element which contains shadow content
86
- * @returns {boolean} true if a shadow root could potentially contain valid candidates.
87
- */
88
-
89
- /**
90
- * @typedef {Object} CandidateScope
91
- * @property {Element} scopeParent contains inner candidates
92
- * @property {Element[]} candidates list of candidates found in the scope parent
93
- */
94
-
95
- /**
96
- * @typedef {Object} IterativeOptions
97
- * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
98
- * if a function, implies shadow support is enabled and either returns the shadow root of an element
99
- * or a boolean stating if it has an undisclosed shadow root
100
- * @property {(node: Element) => boolean} filter filter candidates
101
- * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
102
- * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
103
- */
104
-
105
- /**
106
- * @param {Element[]} elements list of element containers to match candidates from
107
- * @param {boolean} includeContainer add container list to check
108
- * @param {IterativeOptions} options
109
- * @returns {Array.<Element|CandidateScope>}
110
- */
111
- var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
112
- var candidates = [];
113
- var elementsToCheck = Array.from(elements);
114
- while (elementsToCheck.length) {
115
- var element = elementsToCheck.shift();
116
- if (element.tagName === 'SLOT') {
117
- // add shadow dom slot scope (slot itself cannot be focusable)
118
- var assigned = element.assignedElements();
119
- var content = assigned.length ? assigned : element.children;
120
- var nestedCandidates = getCandidatesIteratively(content, true, options);
121
- if (options.flatten) {
122
- candidates.push.apply(candidates, nestedCandidates);
123
- } else {
124
- candidates.push({
125
- scopeParent: element,
126
- candidates: nestedCandidates
127
- });
128
- }
129
- } else {
130
- // check candidate element
131
- var validCandidate = matches.call(element, candidateSelector);
132
- if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
133
- candidates.push(element);
134
- }
135
-
136
- // iterate over shadow content if possible
137
- var shadowRoot = element.shadowRoot ||
138
- // check for an undisclosed shadow
139
- typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
140
- var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
141
- if (shadowRoot && validShadowRoot) {
142
- // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
143
- // shadow exists, so look at light dom children as fallback BUT create a scope for any
144
- // child candidates found because they're likely slotted elements (elements that are
145
- // children of the web component element (which has the shadow), in the light dom, but
146
- // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
147
- // _after_ we return from this recursive call
148
- var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
149
- if (options.flatten) {
150
- candidates.push.apply(candidates, _nestedCandidates);
151
- } else {
152
- candidates.push({
153
- scopeParent: element,
154
- candidates: _nestedCandidates
155
- });
156
- }
157
- } else {
158
- // there's not shadow so just dig into the element's (light dom) children
159
- // __without__ giving the element special scope treatment
160
- elementsToCheck.unshift.apply(elementsToCheck, element.children);
161
- }
162
- }
163
- }
164
- return candidates;
165
- };
166
- var getTabindex = function getTabindex(node, isScope) {
167
- if (node.tabIndex < 0) {
168
- // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
169
- // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
170
- // yet they are still part of the regular tab order; in FF, they get a default
171
- // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
172
- // order, consider their tab index to be 0.
173
- // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
174
- // so if they don't have a tabindex attribute specifically set, assume it's 0.
175
- //
176
- // isScope is positive for custom element with shadow root or slot that by default
177
- // have tabIndex -1, but need to be sorted by document order in order for their
178
- // content to be inserted in the correct position
179
- if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
180
- return 0;
181
- }
182
- }
183
- return node.tabIndex;
184
- };
185
- var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
186
- return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
187
- };
188
- var isInput = function isInput(node) {
189
- return node.tagName === 'INPUT';
190
- };
191
- var isHiddenInput = function isHiddenInput(node) {
192
- return isInput(node) && node.type === 'hidden';
193
- };
194
- var isDetailsWithSummary = function isDetailsWithSummary(node) {
195
- var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
196
- return child.tagName === 'SUMMARY';
197
- });
198
- return r;
199
- };
200
- var getCheckedRadio = function getCheckedRadio(nodes, form) {
201
- for (var i = 0; i < nodes.length; i++) {
202
- if (nodes[i].checked && nodes[i].form === form) {
203
- return nodes[i];
204
- }
205
- }
206
- };
207
- var isTabbableRadio = function isTabbableRadio(node) {
208
- if (!node.name) {
209
- return true;
210
- }
211
- var radioScope = node.form || getRootNode(node);
212
- var queryRadios = function queryRadios(name) {
213
- return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
214
- };
215
- var radioSet;
216
- if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
217
- radioSet = queryRadios(window.CSS.escape(node.name));
218
- } else {
219
- try {
220
- radioSet = queryRadios(node.name);
221
- } catch (err) {
222
- // eslint-disable-next-line no-console
223
- 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);
224
- return false;
225
- }
226
- }
227
- var checked = getCheckedRadio(radioSet, node.form);
228
- return !checked || checked === node;
229
- };
230
- var isRadio = function isRadio(node) {
231
- return isInput(node) && node.type === 'radio';
232
- };
233
- var isNonTabbableRadio = function isNonTabbableRadio(node) {
234
- return isRadio(node) && !isTabbableRadio(node);
235
- };
236
-
237
- // determines if a node is ultimately attached to the window's document
238
- var isNodeAttached = function isNodeAttached(node) {
239
- var _nodeRootHost;
240
- // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
241
- // (but NOT _the_ document; see second 'If' comment below for more).
242
- // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
243
- // is attached, and the one we need to check if it's in the document or not (because the
244
- // shadow, and all nodes it contains, is never considered in the document since shadows
245
- // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
246
- // is hidden, or is not in the document itself but is detached, it will affect the shadow's
247
- // visibility, including all the nodes it contains). The host could be any normal node,
248
- // or a custom element (i.e. web component). Either way, that's the one that is considered
249
- // part of the document, not the shadow root, nor any of its children (i.e. the node being
250
- // tested).
251
- // To further complicate things, we have to look all the way up until we find a shadow HOST
252
- // that is attached (or find none) because the node might be in nested shadows...
253
- // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
254
- // document (per the docs) and while it's a Document-type object, that document does not
255
- // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
256
- // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
257
- // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
258
- // node is actually detached.
259
- var nodeRootHost = getRootNode(node).host;
260
- var attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && _nodeRootHost.ownerDocument.contains(nodeRootHost) || node.ownerDocument.contains(node));
261
- while (!attached && nodeRootHost) {
262
- var _nodeRootHost2;
263
- // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
264
- // which means we need to get the host's host and check if that parent host is contained
265
- // in (i.e. attached to) the document
266
- nodeRootHost = getRootNode(nodeRootHost).host;
267
- attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && _nodeRootHost2.ownerDocument.contains(nodeRootHost));
268
- }
269
- return attached;
270
- };
271
- var isZeroArea = function isZeroArea(node) {
272
- var _node$getBoundingClie = node.getBoundingClientRect(),
273
- width = _node$getBoundingClie.width,
274
- height = _node$getBoundingClie.height;
275
- return width === 0 && height === 0;
276
- };
277
- var isHidden = function isHidden(node, _ref) {
278
- var displayCheck = _ref.displayCheck,
279
- getShadowRoot = _ref.getShadowRoot;
280
- // NOTE: visibility will be `undefined` if node is detached from the document
281
- // (see notes about this further down), which means we will consider it visible
282
- // (this is legacy behavior from a very long way back)
283
- // NOTE: we check this regardless of `displayCheck="none"` because this is a
284
- // _visibility_ check, not a _display_ check
285
- if (getComputedStyle(node).visibility === 'hidden') {
286
- return true;
287
- }
288
- var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
289
- var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
290
- if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
291
- return true;
292
- }
293
- if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
294
- if (typeof getShadowRoot === 'function') {
295
- // figure out if we should consider the node to be in an undisclosed shadow and use the
296
- // 'non-zero-area' fallback
297
- var originalNode = node;
298
- while (node) {
299
- var parentElement = node.parentElement;
300
- var rootNode = getRootNode(node);
301
- if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
302
- ) {
303
- // node has an undisclosed shadow which means we can only treat it as a black box, so we
304
- // fall back to a non-zero-area test
305
- return isZeroArea(node);
306
- } else if (node.assignedSlot) {
307
- // iterate up slot
308
- node = node.assignedSlot;
309
- } else if (!parentElement && rootNode !== node.ownerDocument) {
310
- // cross shadow boundary
311
- node = rootNode.host;
312
- } else {
313
- // iterate up normal dom
314
- node = parentElement;
315
- }
316
- }
317
- node = originalNode;
318
- }
319
- // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
320
- // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
321
- // it might be a falsy value, which means shadow DOM support is disabled
322
-
323
- // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
324
- // now we can just test to see if it would normally be visible or not, provided it's
325
- // attached to the main document.
326
- // NOTE: We must consider case where node is inside a shadow DOM and given directly to
327
- // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
328
-
329
- if (isNodeAttached(node)) {
330
- // this works wherever the node is: if there's at least one client rect, it's
331
- // somehow displayed; it also covers the CSS 'display: contents' case where the
332
- // node itself is hidden in place of its contents; and there's no need to search
333
- // up the hierarchy either
334
- return !node.getClientRects().length;
335
- }
336
-
337
- // Else, the node isn't attached to the document, which means the `getClientRects()`
338
- // API will __always__ return zero rects (this can happen, for example, if React
339
- // is used to render nodes onto a detached tree, as confirmed in this thread:
340
- // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
341
- //
342
- // It also means that even window.getComputedStyle(node).display will return `undefined`
343
- // because styles are only computed for nodes that are in the document.
344
- //
345
- // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
346
- // somehow. Though it was never stated officially, anyone who has ever used tabbable
347
- // APIs on nodes in detached containers has actually implicitly used tabbable in what
348
- // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
349
- // considering __everything__ to be visible because of the innability to determine styles.
350
- //
351
- // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
352
- // nodes as visible with the 'none' fallback.__
353
- if (displayCheck !== 'legacy-full') {
354
- return true; // hidden
355
- }
356
- // else, fallback to 'none' mode and consider the node visible
357
- } else if (displayCheck === 'non-zero-area') {
358
- // NOTE: Even though this tests that the node's client rect is non-zero to determine
359
- // whether it's displayed, and that a detached node will __always__ have a zero-area
360
- // client rect, we don't special-case for whether the node is attached or not. In
361
- // this mode, we do want to consider nodes that have a zero area to be hidden at all
362
- // times, and that includes attached or not.
363
- return isZeroArea(node);
364
- }
365
-
366
- // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
367
- // it's visible
368
- return false;
369
- };
370
-
371
- // form fields (nested) inside a disabled fieldset are not focusable/tabbable
372
- // unless they are in the _first_ <legend> element of the top-most disabled
373
- // fieldset
374
- var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
375
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
376
- var parentNode = node.parentElement;
377
- // check if `node` is contained in a disabled <fieldset>
378
- while (parentNode) {
379
- if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
380
- // look for the first <legend> among the children of the disabled <fieldset>
381
- for (var i = 0; i < parentNode.children.length; i++) {
382
- var child = parentNode.children.item(i);
383
- // when the first <legend> (in document order) is found
384
- if (child.tagName === 'LEGEND') {
385
- // if its parent <fieldset> is not nested in another disabled <fieldset>,
386
- // return whether `node` is a descendant of its first <legend>
387
- return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
388
- }
389
- }
390
- // the disabled <fieldset> containing `node` has no <legend>
391
- return true;
392
- }
393
- parentNode = parentNode.parentElement;
394
- }
395
- }
396
-
397
- // else, node's tabbable/focusable state should not be affected by a fieldset's
398
- // enabled/disabled state
399
- return false;
400
- };
401
- var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
402
- if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
403
- // For a details element with a summary, the summary element gets the focus
404
- isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
405
- return false;
406
- }
407
- return true;
408
- };
409
- var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
410
- if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
411
- return false;
412
- }
413
- return true;
414
- };
415
- var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
416
- var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
417
- if (isNaN(tabIndex) || tabIndex >= 0) {
418
- return true;
419
- }
420
- // If a custom element has an explicit negative tabindex,
421
- // browsers will not allow tab targeting said element's children.
422
- return false;
423
- };
424
-
425
- /**
426
- * @param {Array.<Element|CandidateScope>} candidates
427
- * @returns Element[]
428
- */
429
- var sortByOrder = function sortByOrder(candidates) {
430
- var regularTabbables = [];
431
- var orderedTabbables = [];
432
- candidates.forEach(function (item, i) {
433
- var isScope = !!item.scopeParent;
434
- var element = isScope ? item.scopeParent : item;
435
- var candidateTabindex = getTabindex(element, isScope);
436
- var elements = isScope ? sortByOrder(item.candidates) : element;
437
- if (candidateTabindex === 0) {
438
- isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
439
- } else {
440
- orderedTabbables.push({
441
- documentOrder: i,
442
- tabIndex: candidateTabindex,
443
- item: item,
444
- isScope: isScope,
445
- content: elements
446
- });
447
- }
448
- });
449
- return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
450
- sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
451
- return acc;
452
- }, []).concat(regularTabbables);
453
- };
454
- var tabbable = function tabbable(el, options) {
455
- options = options || {};
456
- var candidates;
457
- if (options.getShadowRoot) {
458
- candidates = getCandidatesIteratively([el], options.includeContainer, {
459
- filter: isNodeMatchingSelectorTabbable.bind(null, options),
460
- flatten: false,
461
- getShadowRoot: options.getShadowRoot,
462
- shadowRootFilter: isValidShadowRootTabbable
463
- });
464
- } else {
465
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
466
- }
467
- return sortByOrder(candidates);
468
- };
469
- var focusable = function focusable(el, options) {
470
- options = options || {};
471
- var candidates;
472
- if (options.getShadowRoot) {
473
- candidates = getCandidatesIteratively([el], options.includeContainer, {
474
- filter: isNodeMatchingSelectorFocusable.bind(null, options),
475
- flatten: true,
476
- getShadowRoot: options.getShadowRoot
477
- });
478
- } else {
479
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
480
- }
481
- return candidates;
482
- };
483
- var isTabbable = function isTabbable(node, options) {
484
- options = options || {};
485
- if (!node) {
486
- throw new Error('No node provided');
487
- }
488
- if (matches.call(node, candidateSelector) === false) {
489
- return false;
490
- }
491
- return isNodeMatchingSelectorTabbable(options, node);
492
- };
493
- var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
494
- var isFocusable = function isFocusable(node, options) {
495
- options = options || {};
496
- if (!node) {
497
- throw new Error('No node provided');
498
- }
499
- if (matches.call(node, focusableCandidateSelector) === false) {
500
- return false;
501
- }
502
- return isNodeMatchingSelectorFocusable(options, node);
503
- };
504
-
505
- /*!
506
- * focus-trap 7.0.0
507
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
508
- */
509
-
510
- function ownKeys(object, enumerableOnly) {
511
- var keys = Object.keys(object);
512
-
513
- if (Object.getOwnPropertySymbols) {
514
- var symbols = Object.getOwnPropertySymbols(object);
515
- enumerableOnly && (symbols = symbols.filter(function (sym) {
516
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
517
- })), keys.push.apply(keys, symbols);
518
- }
519
-
520
- return keys;
521
- }
522
-
523
- function _objectSpread2(target) {
524
- for (var i = 1; i < arguments.length; i++) {
525
- var source = null != arguments[i] ? arguments[i] : {};
526
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
527
- _defineProperty(target, key, source[key]);
528
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
529
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
530
- });
531
- }
532
-
533
- return target;
534
- }
535
-
536
- function _defineProperty(obj, key, value) {
537
- if (key in obj) {
538
- Object.defineProperty(obj, key, {
539
- value: value,
540
- enumerable: true,
541
- configurable: true,
542
- writable: true
543
- });
544
- } else {
545
- obj[key] = value;
546
- }
547
-
548
- return obj;
549
- }
550
-
551
- var activeFocusTraps = function () {
552
- var trapQueue = [];
553
- return {
554
- activateTrap: function activateTrap(trap) {
555
- if (trapQueue.length > 0) {
556
- var activeTrap = trapQueue[trapQueue.length - 1];
557
-
558
- if (activeTrap !== trap) {
559
- activeTrap.pause();
560
- }
561
- }
562
-
563
- var trapIndex = trapQueue.indexOf(trap);
564
-
565
- if (trapIndex === -1) {
566
- trapQueue.push(trap);
567
- } else {
568
- // move this existing trap to the front of the queue
569
- trapQueue.splice(trapIndex, 1);
570
- trapQueue.push(trap);
571
- }
572
- },
573
- deactivateTrap: function deactivateTrap(trap) {
574
- var trapIndex = trapQueue.indexOf(trap);
575
-
576
- if (trapIndex !== -1) {
577
- trapQueue.splice(trapIndex, 1);
578
- }
579
-
580
- if (trapQueue.length > 0) {
581
- trapQueue[trapQueue.length - 1].unpause();
582
- }
583
- }
584
- };
585
- }();
586
-
587
- var isSelectableInput = function isSelectableInput(node) {
588
- return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
589
- };
590
-
591
- var isEscapeEvent = function isEscapeEvent(e) {
592
- return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
593
- };
594
-
595
- var isTabEvent = function isTabEvent(e) {
596
- return e.key === 'Tab' || e.keyCode === 9;
597
- };
598
-
599
- var delay = function delay(fn) {
600
- return setTimeout(fn, 0);
601
- }; // Array.find/findIndex() are not supported on IE; this replicates enough
602
- // of Array.findIndex() for our needs
603
-
604
-
605
- var findIndex = function findIndex(arr, fn) {
606
- var idx = -1;
607
- arr.every(function (value, i) {
608
- if (fn(value)) {
609
- idx = i;
610
- return false; // break
611
- }
612
-
613
- return true; // next
614
- });
615
- return idx;
616
- };
617
- /**
618
- * Get an option's value when it could be a plain value, or a handler that provides
619
- * the value.
620
- * @param {*} value Option's value to check.
621
- * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
622
- * @returns {*} The `value`, or the handler's returned value.
623
- */
624
-
625
-
626
- var valueOrHandler = function valueOrHandler(value) {
627
- for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
628
- params[_key - 1] = arguments[_key];
629
- }
630
-
631
- return typeof value === 'function' ? value.apply(void 0, params) : value;
632
- };
633
-
634
- var getActualTarget = function getActualTarget(event) {
635
- // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
636
- // shadow host. However, event.target.composedPath() will be an array of
637
- // nodes "clicked" from inner-most (the actual element inside the shadow) to
638
- // outer-most (the host HTML document). If we have access to composedPath(),
639
- // then use its first element; otherwise, fall back to event.target (and
640
- // this only works for an _open_ shadow DOM; otherwise,
641
- // composedPath()[0] === event.target always).
642
- return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
643
- };
644
-
645
- var createFocusTrap = function createFocusTrap(elements, userOptions) {
646
- // SSR: a live trap shouldn't be created in this type of environment so this
647
- // should be safe code to execute if the `document` option isn't specified
648
- var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
649
-
650
- var config = _objectSpread2({
651
- returnFocusOnDeactivate: true,
652
- escapeDeactivates: true,
653
- delayInitialFocus: true
654
- }, userOptions);
655
-
656
- var state = {
657
- // containers given to createFocusTrap()
658
- // @type {Array<HTMLElement>}
659
- containers: [],
660
- // list of objects identifying tabbable nodes in `containers` in the trap
661
- // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
662
- // is active, but the trap should never get to a state where there isn't at least one group
663
- // with at least one tabbable node in it (that would lead to an error condition that would
664
- // result in an error being thrown)
665
- // @type {Array<{
666
- // container: HTMLElement,
667
- // tabbableNodes: Array<HTMLElement>, // empty if none
668
- // focusableNodes: Array<HTMLElement>, // empty if none
669
- // firstTabbableNode: HTMLElement|null,
670
- // lastTabbableNode: HTMLElement|null,
671
- // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
672
- // }>}
673
- containerGroups: [],
674
- // same order/length as `containers` list
675
- // references to objects in `containerGroups`, but only those that actually have
676
- // tabbable nodes in them
677
- // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
678
- // the same length
679
- tabbableGroups: [],
680
- nodeFocusedBeforeActivation: null,
681
- mostRecentlyFocusedNode: null,
682
- active: false,
683
- paused: false,
684
- // timer ID for when delayInitialFocus is true and initial focus in this trap
685
- // has been delayed during activation
686
- delayInitialFocusTimer: undefined
687
- };
688
- 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
689
-
690
- /**
691
- * Gets a configuration option value.
692
- * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
693
- * value will be taken from this object. Otherwise, value will be taken from base configuration.
694
- * @param {string} optionName Name of the option whose value is sought.
695
- * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
696
- * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
697
- */
698
-
699
- var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
700
- return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
701
- };
702
- /**
703
- * Finds the index of the container that contains the element.
704
- * @param {HTMLElement} element
705
- * @returns {number} Index of the container in either `state.containers` or
706
- * `state.containerGroups` (the order/length of these lists are the same); -1
707
- * if the element isn't found.
708
- */
709
-
710
-
711
- var findContainerIndex = function findContainerIndex(element) {
712
- // NOTE: search `containerGroups` because it's possible a group contains no tabbable
713
- // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
714
- // and we still need to find the element in there
715
- return state.containerGroups.findIndex(function (_ref) {
716
- var container = _ref.container,
717
- tabbableNodes = _ref.tabbableNodes;
718
- return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
719
- // web components if the `tabbableOptions.getShadowRoot` option was used for
720
- // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
721
- // look inside web components even if open)
722
- tabbableNodes.find(function (node) {
723
- return node === element;
724
- });
725
- });
726
- };
727
- /**
728
- * Gets the node for the given option, which is expected to be an option that
729
- * can be either a DOM node, a string that is a selector to get a node, `false`
730
- * (if a node is explicitly NOT given), or a function that returns any of these
731
- * values.
732
- * @param {string} optionName
733
- * @returns {undefined | false | HTMLElement | SVGElement} Returns
734
- * `undefined` if the option is not specified; `false` if the option
735
- * resolved to `false` (node explicitly not given); otherwise, the resolved
736
- * DOM node.
737
- * @throws {Error} If the option is set, not `false`, and is not, or does not
738
- * resolve to a node.
739
- */
740
-
741
-
742
- var getNodeForOption = function getNodeForOption(optionName) {
743
- var optionValue = config[optionName];
744
-
745
- if (typeof optionValue === 'function') {
746
- for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
747
- params[_key2 - 1] = arguments[_key2];
748
- }
749
-
750
- optionValue = optionValue.apply(void 0, params);
751
- }
752
-
753
- if (optionValue === true) {
754
- optionValue = undefined; // use default value
755
- }
756
-
757
- if (!optionValue) {
758
- if (optionValue === undefined || optionValue === false) {
759
- return optionValue;
760
- } // else, empty string (invalid), null (invalid), 0 (invalid)
761
-
762
-
763
- throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
764
- }
765
-
766
- var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
767
-
768
- if (typeof optionValue === 'string') {
769
- node = doc.querySelector(optionValue); // resolve to node, or null if fails
770
-
771
- if (!node) {
772
- throw new Error("`".concat(optionName, "` as selector refers to no known node"));
773
- }
774
- }
775
-
776
- return node;
777
- };
778
-
779
- var getInitialFocusNode = function getInitialFocusNode() {
780
- var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
781
-
782
- if (node === false) {
783
- return false;
784
- }
785
-
786
- if (node === undefined) {
787
- // option not specified: use fallback options
788
- if (findContainerIndex(doc.activeElement) >= 0) {
789
- node = doc.activeElement;
790
- } else {
791
- var firstTabbableGroup = state.tabbableGroups[0];
792
- var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
793
-
794
- node = firstTabbableNode || getNodeForOption('fallbackFocus');
795
- }
796
- }
797
-
798
- if (!node) {
799
- throw new Error('Your focus-trap needs to have at least one focusable element');
800
- }
801
-
802
- return node;
803
- };
804
-
805
- var updateTabbableNodes = function updateTabbableNodes() {
806
- state.containerGroups = state.containers.map(function (container) {
807
- var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
808
- // are a superset of tabbable nodes
809
-
810
- var focusableNodes = focusable(container, config.tabbableOptions);
811
- return {
812
- container: container,
813
- tabbableNodes: tabbableNodes,
814
- focusableNodes: focusableNodes,
815
- firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
816
- lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
817
-
818
- /**
819
- * Finds the __tabbable__ node that follows the given node in the specified direction,
820
- * in this container, if any.
821
- * @param {HTMLElement} node
822
- * @param {boolean} [forward] True if going in forward tab order; false if going
823
- * in reverse.
824
- * @returns {HTMLElement|undefined} The next tabbable node, if any.
825
- */
826
- nextTabbableNode: function nextTabbableNode(node) {
827
- var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
828
- // NOTE: If tabindex is positive (in order to manipulate the tab order separate
829
- // from the DOM order), this __will not work__ because the list of focusableNodes,
830
- // while it contains tabbable nodes, does not sort its nodes in any order other
831
- // than DOM order, because it can't: Where would you place focusable (but not
832
- // tabbable) nodes in that order? They have no order, because they aren't tabbale...
833
- // Support for positive tabindex is already broken and hard to manage (possibly
834
- // not supportable, TBD), so this isn't going to make things worse than they
835
- // already are, and at least makes things better for the majority of cases where
836
- // tabindex is either 0/unset or negative.
837
- // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
838
- var nodeIdx = focusableNodes.findIndex(function (n) {
839
- return n === node;
840
- });
841
-
842
- if (nodeIdx < 0) {
843
- return undefined;
844
- }
845
-
846
- if (forward) {
847
- return focusableNodes.slice(nodeIdx + 1).find(function (n) {
848
- return isTabbable(n, config.tabbableOptions);
849
- });
850
- }
851
-
852
- return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
853
- return isTabbable(n, config.tabbableOptions);
854
- });
855
- }
856
- };
857
- });
858
- state.tabbableGroups = state.containerGroups.filter(function (group) {
859
- return group.tabbableNodes.length > 0;
860
- }); // throw if no groups have tabbable nodes and we don't have a fallback focus node either
861
-
862
- if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
863
- ) {
864
- throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
865
- }
866
- };
867
-
868
- var tryFocus = function tryFocus(node) {
869
- if (node === false) {
870
- return;
871
- }
872
-
873
- if (node === doc.activeElement) {
874
- return;
875
- }
876
-
877
- if (!node || !node.focus) {
878
- tryFocus(getInitialFocusNode());
879
- return;
880
- }
881
-
882
- node.focus({
883
- preventScroll: !!config.preventScroll
884
- });
885
- state.mostRecentlyFocusedNode = node;
886
-
887
- if (isSelectableInput(node)) {
888
- node.select();
889
- }
890
- };
891
-
892
- var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
893
- var node = getNodeForOption('setReturnFocus', previousActiveElement);
894
- return node ? node : node === false ? false : previousActiveElement;
895
- }; // This needs to be done on mousedown and touchstart instead of click
896
- // so that it precedes the focus event.
897
-
898
-
899
- var checkPointerDown = function checkPointerDown(e) {
900
- var target = getActualTarget(e);
901
-
902
- if (findContainerIndex(target) >= 0) {
903
- // allow the click since it ocurred inside the trap
904
- return;
905
- }
906
-
907
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
908
- // immediately deactivate the trap
909
- trap.deactivate({
910
- // if, on deactivation, we should return focus to the node originally-focused
911
- // when the trap was activated (or the configured `setReturnFocus` node),
912
- // then assume it's also OK to return focus to the outside node that was
913
- // just clicked, causing deactivation, as long as that node is focusable;
914
- // if it isn't focusable, then return focus to the original node focused
915
- // on activation (or the configured `setReturnFocus` node)
916
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
917
- // which will result in the outside click setting focus to the node
918
- // that was clicked, whether it's focusable or not; by setting
919
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
920
- // on activation (or the configured `setReturnFocus` node)
921
- returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
922
- });
923
- return;
924
- } // This is needed for mobile devices.
925
- // (If we'll only let `click` events through,
926
- // then on mobile they will be blocked anyways if `touchstart` is blocked.)
927
-
928
-
929
- if (valueOrHandler(config.allowOutsideClick, e)) {
930
- // allow the click outside the trap to take place
931
- return;
932
- } // otherwise, prevent the click
933
-
934
-
935
- e.preventDefault();
936
- }; // In case focus escapes the trap for some strange reason, pull it back in.
937
-
938
-
939
- var checkFocusIn = function checkFocusIn(e) {
940
- var target = getActualTarget(e);
941
- var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.
942
-
943
- if (targetContained || target instanceof Document) {
944
- if (targetContained) {
945
- state.mostRecentlyFocusedNode = target;
946
- }
947
- } else {
948
- // escaped! pull it back in to where it just left
949
- e.stopImmediatePropagation();
950
- tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
951
- }
952
- }; // Hijack Tab events on the first and last focusable nodes of the trap,
953
- // in order to prevent focus from escaping. If it escapes for even a
954
- // moment it can end up scrolling the page and causing confusion so we
955
- // kind of need to capture the action at the keydown phase.
956
-
957
-
958
- var checkTab = function checkTab(e) {
959
- var target = getActualTarget(e);
960
- updateTabbableNodes();
961
- var destinationNode = null;
962
-
963
- if (state.tabbableGroups.length > 0) {
964
- // make sure the target is actually contained in a group
965
- // NOTE: the target may also be the container itself if it's focusable
966
- // with tabIndex='-1' and was given initial focus
967
- var containerIndex = findContainerIndex(target);
968
- var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
969
-
970
- if (containerIndex < 0) {
971
- // target not found in any group: quite possible focus has escaped the trap,
972
- // so bring it back in to...
973
- if (e.shiftKey) {
974
- // ...the last node in the last group
975
- destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
976
- } else {
977
- // ...the first node in the first group
978
- destinationNode = state.tabbableGroups[0].firstTabbableNode;
979
- }
980
- } else if (e.shiftKey) {
981
- // REVERSE
982
- // is the target the first tabbable node in a group?
983
- var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
984
- var firstTabbableNode = _ref2.firstTabbableNode;
985
- return target === firstTabbableNode;
986
- });
987
-
988
- if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
989
- // an exception case where the target is either the container itself, or
990
- // a non-tabbable node that was given focus (i.e. tabindex is negative
991
- // and user clicked on it or node was programmatically given focus)
992
- // and is not followed by any other tabbable node, in which
993
- // case, we should handle shift+tab as if focus were on the container's
994
- // first tabbable node, and go to the last tabbable node of the LAST group
995
- startOfGroupIndex = containerIndex;
996
- }
997
-
998
- if (startOfGroupIndex >= 0) {
999
- // YES: then shift+tab should go to the last tabbable node in the
1000
- // previous group (and wrap around to the last tabbable node of
1001
- // the LAST group if it's the first tabbable node of the FIRST group)
1002
- var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
1003
- var destinationGroup = state.tabbableGroups[destinationGroupIndex];
1004
- destinationNode = destinationGroup.lastTabbableNode;
1005
- }
1006
- } else {
1007
- // FORWARD
1008
- // is the target the last tabbable node in a group?
1009
- var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
1010
- var lastTabbableNode = _ref3.lastTabbableNode;
1011
- return target === lastTabbableNode;
1012
- });
1013
-
1014
- if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
1015
- // an exception case where the target is the container itself, or
1016
- // a non-tabbable node that was given focus (i.e. tabindex is negative
1017
- // and user clicked on it or node was programmatically given focus)
1018
- // and is not followed by any other tabbable node, in which
1019
- // case, we should handle tab as if focus were on the container's
1020
- // last tabbable node, and go to the first tabbable node of the FIRST group
1021
- lastOfGroupIndex = containerIndex;
1022
- }
1023
-
1024
- if (lastOfGroupIndex >= 0) {
1025
- // YES: then tab should go to the first tabbable node in the next
1026
- // group (and wrap around to the first tabbable node of the FIRST
1027
- // group if it's the last tabbable node of the LAST group)
1028
- var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
1029
-
1030
- var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
1031
- destinationNode = _destinationGroup.firstTabbableNode;
1032
- }
1033
- }
1034
- } else {
1035
- // NOTE: the fallbackFocus option does not support returning false to opt-out
1036
- destinationNode = getNodeForOption('fallbackFocus');
1037
- }
1038
-
1039
- if (destinationNode) {
1040
- e.preventDefault();
1041
- tryFocus(destinationNode);
1042
- } // else, let the browser take care of [shift+]tab and move the focus
1043
-
1044
- };
1045
-
1046
- var checkKey = function checkKey(e) {
1047
- if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
1048
- e.preventDefault();
1049
- trap.deactivate();
1050
- return;
1051
- }
1052
-
1053
- if (isTabEvent(e)) {
1054
- checkTab(e);
1055
- return;
1056
- }
1057
- };
1058
-
1059
- var checkClick = function checkClick(e) {
1060
- var target = getActualTarget(e);
1061
-
1062
- if (findContainerIndex(target) >= 0) {
1063
- return;
1064
- }
1065
-
1066
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
1067
- return;
1068
- }
1069
-
1070
- if (valueOrHandler(config.allowOutsideClick, e)) {
1071
- return;
1072
- }
1073
-
1074
- e.preventDefault();
1075
- e.stopImmediatePropagation();
1076
- }; //
1077
- // EVENT LISTENERS
1078
- //
1079
-
1080
-
1081
- var addListeners = function addListeners() {
1082
- if (!state.active) {
1083
- return;
1084
- } // There can be only one listening focus trap at a time
1085
-
1086
-
1087
- activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
1088
- // that caused the focus trap activation.
1089
-
1090
- state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
1091
- tryFocus(getInitialFocusNode());
1092
- }) : tryFocus(getInitialFocusNode());
1093
- doc.addEventListener('focusin', checkFocusIn, true);
1094
- doc.addEventListener('mousedown', checkPointerDown, {
1095
- capture: true,
1096
- passive: false
1097
- });
1098
- doc.addEventListener('touchstart', checkPointerDown, {
1099
- capture: true,
1100
- passive: false
1101
- });
1102
- doc.addEventListener('click', checkClick, {
1103
- capture: true,
1104
- passive: false
1105
- });
1106
- doc.addEventListener('keydown', checkKey, {
1107
- capture: true,
1108
- passive: false
1109
- });
1110
- return trap;
1111
- };
1112
-
1113
- var removeListeners = function removeListeners() {
1114
- if (!state.active) {
1115
- return;
1116
- }
1117
-
1118
- doc.removeEventListener('focusin', checkFocusIn, true);
1119
- doc.removeEventListener('mousedown', checkPointerDown, true);
1120
- doc.removeEventListener('touchstart', checkPointerDown, true);
1121
- doc.removeEventListener('click', checkClick, true);
1122
- doc.removeEventListener('keydown', checkKey, true);
1123
- return trap;
1124
- }; //
1125
- // TRAP DEFINITION
1126
- //
1127
-
1128
-
1129
- trap = {
1130
- get active() {
1131
- return state.active;
1132
- },
1133
-
1134
- get paused() {
1135
- return state.paused;
1136
- },
1137
-
1138
- activate: function activate(activateOptions) {
1139
- if (state.active) {
1140
- return this;
1141
- }
1142
-
1143
- var onActivate = getOption(activateOptions, 'onActivate');
1144
- var onPostActivate = getOption(activateOptions, 'onPostActivate');
1145
- var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
1146
-
1147
- if (!checkCanFocusTrap) {
1148
- updateTabbableNodes();
1149
- }
1150
-
1151
- state.active = true;
1152
- state.paused = false;
1153
- state.nodeFocusedBeforeActivation = doc.activeElement;
1154
-
1155
- if (onActivate) {
1156
- onActivate();
1157
- }
1158
-
1159
- var finishActivation = function finishActivation() {
1160
- if (checkCanFocusTrap) {
1161
- updateTabbableNodes();
1162
- }
1163
-
1164
- addListeners();
1165
-
1166
- if (onPostActivate) {
1167
- onPostActivate();
1168
- }
1169
- };
1170
-
1171
- if (checkCanFocusTrap) {
1172
- checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
1173
- return this;
1174
- }
1175
-
1176
- finishActivation();
1177
- return this;
1178
- },
1179
- deactivate: function deactivate(deactivateOptions) {
1180
- if (!state.active) {
1181
- return this;
1182
- }
1183
-
1184
- var options = _objectSpread2({
1185
- onDeactivate: config.onDeactivate,
1186
- onPostDeactivate: config.onPostDeactivate,
1187
- checkCanReturnFocus: config.checkCanReturnFocus
1188
- }, deactivateOptions);
1189
-
1190
- clearTimeout(state.delayInitialFocusTimer); // noop if undefined
1191
-
1192
- state.delayInitialFocusTimer = undefined;
1193
- removeListeners();
1194
- state.active = false;
1195
- state.paused = false;
1196
- activeFocusTraps.deactivateTrap(trap);
1197
- var onDeactivate = getOption(options, 'onDeactivate');
1198
- var onPostDeactivate = getOption(options, 'onPostDeactivate');
1199
- var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
1200
- var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
1201
-
1202
- if (onDeactivate) {
1203
- onDeactivate();
1204
- }
1205
-
1206
- var finishDeactivation = function finishDeactivation() {
1207
- delay(function () {
1208
- if (returnFocus) {
1209
- tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
1210
- }
1211
-
1212
- if (onPostDeactivate) {
1213
- onPostDeactivate();
1214
- }
1215
- });
1216
- };
1217
-
1218
- if (returnFocus && checkCanReturnFocus) {
1219
- checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
1220
- return this;
1221
- }
1222
-
1223
- finishDeactivation();
1224
- return this;
1225
- },
1226
- pause: function pause() {
1227
- if (state.paused || !state.active) {
1228
- return this;
1229
- }
1230
-
1231
- state.paused = true;
1232
- removeListeners();
1233
- return this;
1234
- },
1235
- unpause: function unpause() {
1236
- if (!state.paused || !state.active) {
1237
- return this;
1238
- }
1239
-
1240
- state.paused = false;
1241
- updateTabbableNodes();
1242
- addListeners();
1243
- return this;
1244
- },
1245
- updateContainerElements: function updateContainerElements(containerElements) {
1246
- var elementsAsArray = [].concat(containerElements).filter(Boolean);
1247
- state.containers = elementsAsArray.map(function (element) {
1248
- return typeof element === 'string' ? doc.querySelector(element) : element;
1249
- });
1250
-
1251
- if (state.active) {
1252
- updateTabbableNodes();
1253
- }
1254
-
1255
- return this;
1256
- }
1257
- }; // initialize container elements
1258
-
1259
- trap.updateContainerElements(elements);
1260
- return trap;
1261
- };
1262
-
1263
- /**
1264
- * Helper to set up focus trap component.
1265
- *
1266
- * @param component
1267
- */
1268
- function connectFocusTrap(component) {
1269
- const { focusTrapEl } = component;
1270
- if (!focusTrapEl) {
1271
- return;
1272
- }
1273
- if (focusTrapEl.tabIndex == null) {
1274
- focusTrapEl.tabIndex = -1;
1275
- }
1276
- const focusTrapOptions = {
1277
- allowOutsideClick: true,
1278
- clickOutsideDeactivates: false,
1279
- escapeDeactivates: false,
1280
- fallbackFocus: focusTrapEl,
1281
- setReturnFocus: (el) => {
1282
- focusElement(el);
1283
- return false;
1284
- },
1285
- tabbableOptions: {
1286
- getShadowRoot: true
1287
- }
1288
- };
1289
- component.focusTrap = createFocusTrap(focusTrapEl, focusTrapOptions);
1290
- }
1291
- /**
1292
- * Helper to activate focus trap component.
1293
- *
1294
- * @param component
1295
- */
1296
- function activateFocusTrap(component) {
1297
- var _a;
1298
- (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
1299
- }
1300
- /**
1301
- * Helper to tear deactivate focus trap component.
1302
- *
1303
- * @param component
1304
- */
1305
- function deactivateFocusTrap(component) {
1306
- var _a;
1307
- (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.deactivate();
1308
- }
1309
-
1310
49
  const modalCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:fixed;inset:0px;z-index:700;display:flex;align-items:center;justify-content:center;overflow-y:hidden;color:var(--calcite-ui-text-2);opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([scale=s]){--calcite-modal-padding:0.75rem;--calcite-modal-padding-large:1rem;--calcite-modal-title-text:var(--calcite-font-size-1);--calcite-modal-content-text:var(--calcite-font-size--1);--calcite-modal-padding-internal:0.75rem;--calcite-modal-padding-large-internal:1rem;--calcite-modal-title-text-internal:var(--calcite-font-size-1);--calcite-modal-content-text-internal:var(--calcite-font-size--1)}:host([scale=m]){--calcite-modal-padding:1rem;--calcite-modal-padding-large:1.25rem;--calcite-modal-title-text:var(--calcite-font-size-2);--calcite-modal-content-text:var(--calcite-font-size-0);--calcite-modal-padding-internal:1rem;--calcite-modal-padding-large-internal:1.25rem;--calcite-modal-title-text-internal:var(--calcite-font-size-2);--calcite-modal-content-text-internal:var(--calcite-font-size-0)}:host([scale=l]){--calcite-modal-padding:1.25rem;--calcite-modal-padding-large:1.5rem;--calcite-modal-title-text:var(--calcite-font-size-3);--calcite-modal-content-text:var(--calcite-font-size-1);--calcite-modal-padding-internal:1.25rem;--calcite-modal-padding-large-internal:1.5rem;--calcite-modal-title-text-internal:var(--calcite-font-size-3);--calcite-modal-content-text-internal:var(--calcite-font-size-1)}.scrim{--calcite-scrim-background:rgba(0, 0, 0, 0.75);position:fixed;inset:0px;display:flex;overflow-y:hidden}.modal{pointer-events:none;z-index:800;float:none;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);opacity:0;--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-hidden-position:translate3d(0, 20px, 0);--calcite-modal-shown-position:translate3d(0, 0, 0)}.modal--opening-idle{transform:var(--calcite-modal-hidden-position)}.modal--opening-active{transform:var(--calcite-modal-shown-position)}.modal--closing-idle{transform:var(--calcite-modal-shown-position)}.modal--closing-active{transform:var(--calcite-modal-hidden-position)}:host([open]){opacity:1;visibility:visible !important;transition-delay:0ms}:host([open]) .modal--open{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}.header{z-index:400;display:flex;min-inline-size:0px;max-inline-size:100%;border-start-start-radius:0.25rem;border-start-end-radius:0.25rem;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto}.close{order:2;margin:0px;cursor:pointer;-webkit-appearance:none;appearance:none;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-start-end-radius:0.25rem;padding-block:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));padding-inline:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));flex:0 0 auto}.close calcite-icon{pointer-events:none;vertical-align:-2px}.close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.close:hover,.close:focus,.close:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.title{order:1;display:flex;min-inline-size:0px;align-items:center;flex:1 1 auto;padding-block:var(--calcite-modal-padding, var(--calcite-model-padding-internal));padding-inline:var(--calcite-modal-padding-large, var(--calcite-modal-padding-large-internal))}slot[name=header]::slotted(*),*::slotted([slot=header]){margin:0px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1);font-size:var(--calcite-modal-title-text, var(--calcite-modal-title-text-internal))}.content{position:relative;box-sizing:border-box;display:block;block-size:100%;overflow:auto;background-color:var(--calcite-ui-foreground-1);padding:0px;max-block-size:calc(100vh - 12rem)}.content--spaced{padding:var(--calcite-modal-padding)}.content--no-footer{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}slot[name=content]::slotted(*),*::slotted([slot=content]){font-size:var(--calcite-modal-content-text, var(--calcite-modal-context-text-internal))}:host([background-color=grey]) .content{background-color:var(--calcite-ui-background)}.footer{z-index:400;margin-block-start:auto;box-sizing:border-box;display:flex;inline-size:100%;justify-content:space-between;border-end-end-radius:0.25rem;border-end-start-radius:0.25rem;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding-block:var(--calcite-modal-padding, var(--calcite-modal-padding-internal));padding-inline:var(--calcite-modal-padding-large, var(--calcite-modal-padding-large-internal))}.footer--hide-back .back,.footer--hide-secondary .secondary{display:none}.back{display:block;margin-inline-end:auto}.secondary{margin-inline:0.25rem;display:block}slot[name=primary]{display:block}:host([width=small]) .modal{inline-size:auto}:host([width=s]) .modal{max-inline-size:32rem}@media screen and (max-width: 35rem){:host([width=s]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=s]) .content{flex:1 1 auto;max-block-size:unset}:host([width=s][docked]){align-items:flex-end}}:host([width=m]) .modal{max-inline-size:48rem}@media screen and (max-width: 51rem){:host([width=m]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=m]) .content{flex:1 1 auto;max-block-size:unset}:host([width=m][docked]){align-items:flex-end}}:host([width=l]) .modal{max-inline-size:94rem}@media screen and (max-width: 97rem){:host([width=l]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}:host([width=l]) .content{flex:1 1 auto;max-block-size:unset}:host([width=l][docked]){align-items:flex-end}}:host([fullscreen]){background-color:transparent}:host([fullscreen]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;--calcite-modal-hidden-position:translate3D(0, 20px, 0) scale(0.95);--calcite-modal-shown-position:translate3D(0, 0, 0) scale(1)}:host([fullscreen]) .content{max-block-size:100%;flex:1 1 auto}:host([open][fullscreen]) .header{border-radius:0}:host([open][fullscreen]) .footer{border-radius:0}:host([docked]) .modal{block-size:auto}:host([docked]) .content{block-size:auto;flex:1 1 auto}@media screen and (max-width: 860px){:host([docked]) .modal{border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}:host([docked]) .close{border-start-end-radius:var(--calcite-border-radius)}}:host([color=red]) .modal{border-color:var(--calcite-ui-danger)}:host([color=blue]) .modal{border-color:var(--calcite-ui-info)}:host([color=red]) .modal,:host([color=blue]) .modal{border-width:0px;border-block-start-width:4px;border-style:solid}:host([color=red]) .header,:host([color=blue]) .header{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){slot[name=header]::slotted(*),*::slotted([slot=header]){font-size:var(--calcite-font-size-1)}.footer{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){.footer{flex-direction:column}.back,.secondary{margin:0px;margin-block-end:0.25rem}}";
1311
50
 
1312
51
  const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {