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

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 (677) 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-9e985ad3.js → p-004dc91c.js} +1 -1
  4. package/dist/calcite/{p-256dd63d.js → p-035fa26b.js} +1 -1
  5. package/dist/calcite/{p-c7d55f76.js → p-05c3789b.js} +1 -1
  6. package/dist/calcite/{p-09d0b7df.entry.js → p-09749684.entry.js} +2 -2
  7. package/dist/calcite/{p-fb7f07bc.entry.js → p-0d96f830.entry.js} +2 -2
  8. package/dist/calcite/p-0f31433c.entry.js +6 -0
  9. package/dist/calcite/{p-74f724b5.entry.js → p-12f64f8b.entry.js} +2 -2
  10. package/dist/calcite/{p-829c6736.entry.js → p-14a7da73.entry.js} +2 -2
  11. package/dist/calcite/{p-b600b3f2.entry.js → p-1806b759.entry.js} +2 -2
  12. package/dist/calcite/{p-c566271a.js → p-18b9b69e.js} +1 -1
  13. package/dist/calcite/{p-3d2bd3a6.entry.js → p-18f9b87b.entry.js} +2 -2
  14. package/dist/calcite/{p-a1a76d84.entry.js → p-1cebb96f.entry.js} +2 -2
  15. package/dist/calcite/{p-2122e0d1.js → p-22c8223d.js} +1 -1
  16. package/dist/calcite/{p-b2e36784.js → p-24681cc9.js} +1 -1
  17. package/dist/calcite/{p-d61be3b7.entry.js → p-266871ba.entry.js} +2 -2
  18. package/dist/calcite/{p-cb7557e3.entry.js → p-26b693c2.entry.js} +2 -2
  19. package/dist/calcite/{p-63c436be.entry.js → p-29cf00c4.entry.js} +2 -2
  20. package/dist/calcite/{p-640cf4fa.entry.js → p-2a52b1af.entry.js} +2 -2
  21. package/dist/calcite/{p-f5f0f20c.entry.js → p-2c730d84.entry.js} +2 -2
  22. package/dist/calcite/{p-471d7ed4.js → p-2c9d7402.js} +2 -2
  23. package/dist/calcite/{p-423f219f.entry.js → p-2ebffb8e.entry.js} +2 -2
  24. package/dist/calcite/{p-d1e085b3.entry.js → p-308ed699.entry.js} +2 -2
  25. package/dist/calcite/{p-e9ed1444.js → p-31090aba.js} +1 -1
  26. package/dist/calcite/{p-852c2b37.js → p-319d0fb7.js} +2 -2
  27. package/dist/calcite/{p-b02b3316.js → p-32abefe9.js} +1 -1
  28. package/dist/calcite/{p-e5b8fd94.entry.js → p-3bb21f63.entry.js} +2 -2
  29. package/dist/calcite/p-3cc531b1.entry.js +6 -0
  30. package/dist/calcite/{p-ac49a5fc.entry.js → p-3d69f172.entry.js} +2 -2
  31. package/dist/calcite/p-3e9f366c.entry.js +6 -0
  32. package/dist/calcite/{p-030f8c3f.js → p-3ed7f5b5.js} +2 -2
  33. package/dist/calcite/p-42f22b60.js +6 -0
  34. package/dist/calcite/{p-66124d87.entry.js → p-431e0692.entry.js} +2 -2
  35. package/dist/calcite/{p-ec473061.js → p-4794e7df.js} +1 -1
  36. package/dist/calcite/{p-ddb93587.js → p-498de00a.js} +2 -2
  37. package/dist/calcite/{p-ba4b8115.entry.js → p-49a5573d.entry.js} +2 -2
  38. package/dist/calcite/p-4ada52dc.entry.js +6 -0
  39. package/dist/calcite/{p-08a381ac.js → p-4f72fc01.js} +1 -1
  40. package/dist/calcite/p-513fef9a.js +6 -0
  41. package/dist/calcite/{p-941609dd.js → p-5215672d.js} +2 -2
  42. package/dist/calcite/p-58de9d51.entry.js +6 -0
  43. package/dist/calcite/{p-25a557a3.entry.js → p-5c05198d.entry.js} +2 -2
  44. package/dist/calcite/p-5f59c538.entry.js +6 -0
  45. package/dist/calcite/{p-f2b115a1.entry.js → p-69d9a248.entry.js} +2 -2
  46. package/dist/calcite/{p-cc4a1d2e.entry.js → p-6bc879e0.entry.js} +2 -2
  47. package/dist/calcite/{p-ee6ce295.entry.js → p-6f30e051.entry.js} +2 -2
  48. package/dist/calcite/{p-93bd2d29.entry.js → p-73f93e1c.entry.js} +2 -2
  49. package/dist/calcite/{p-b00b7eb4.entry.js → p-77658bab.entry.js} +2 -2
  50. package/dist/calcite/{p-a6ad1cf2.entry.js → p-7def899e.entry.js} +2 -2
  51. package/dist/calcite/{p-3b385f23.entry.js → p-8021f786.entry.js} +2 -2
  52. package/dist/calcite/{p-680c3505.entry.js → p-810fcf41.entry.js} +2 -2
  53. package/dist/calcite/p-83617657.entry.js +16 -0
  54. package/dist/calcite/{p-6765a427.entry.js → p-953012fa.entry.js} +2 -2
  55. package/dist/calcite/{p-0aef0b8f.js → p-a2ab3648.js} +2 -2
  56. package/dist/calcite/{p-401439ec.entry.js → p-a359b901.entry.js} +2 -2
  57. package/dist/calcite/{p-d3910b2c.entry.js → p-a6f1ebf6.entry.js} +2 -2
  58. package/dist/calcite/{p-c079c310.js → p-ab3812ba.js} +1 -1
  59. package/dist/calcite/{p-afc65e56.entry.js → p-ac3ace5c.entry.js} +2 -2
  60. package/dist/calcite/{p-d248def9.entry.js → p-ac5e38a2.entry.js} +2 -2
  61. package/dist/calcite/{p-529b296e.js → p-b672fd97.js} +2 -2
  62. package/dist/calcite/{p-2f873464.entry.js → p-b7fbe5a9.entry.js} +2 -2
  63. package/dist/calcite/{p-4db062a5.entry.js → p-bb73d51b.entry.js} +2 -2
  64. package/dist/calcite/{p-30cff6ab.entry.js → p-bbd46504.entry.js} +2 -2
  65. package/dist/calcite/p-c24271dc.entry.js +6 -0
  66. package/dist/calcite/{p-7677636b.js → p-c3d50492.js} +1 -1
  67. package/dist/calcite/{p-34b91fe7.js → p-c8640992.js} +1 -1
  68. package/dist/calcite/{p-1df431db.entry.js → p-cb016c52.entry.js} +2 -2
  69. package/dist/calcite/{p-f80307a8.entry.js → p-cc2c16c4.entry.js} +2 -2
  70. package/dist/calcite/{p-ec7b54ca.js → p-cfaa9ea8.js} +2 -2
  71. package/dist/calcite/p-d010539f.entry.js +6 -0
  72. package/dist/calcite/p-d0681fe7.js +6 -0
  73. package/dist/calcite/{p-1ed5c382.js → p-d17b8ee9.js} +2 -2
  74. package/dist/calcite/{p-2a5bd5de.js → p-d25a6228.js} +1 -1
  75. package/dist/calcite/{p-6c655030.entry.js → p-d26767ec.entry.js} +2 -2
  76. package/dist/calcite/{p-e2380d5f.entry.js → p-d2f83c6a.entry.js} +2 -2
  77. package/dist/calcite/p-d4246ab6.js +6 -0
  78. package/dist/calcite/{p-9ac63c64.entry.js → p-d52deb05.entry.js} +2 -2
  79. package/dist/calcite/{p-9eb0a60c.entry.js → p-d5a92819.entry.js} +2 -2
  80. package/dist/calcite/{p-0207a04b.entry.js → p-d728f7e7.entry.js} +2 -2
  81. package/dist/calcite/{p-69333e74.entry.js → p-d935cc1b.entry.js} +2 -2
  82. package/dist/calcite/{p-22a21d2f.entry.js → p-da667566.entry.js} +2 -2
  83. package/dist/calcite/{p-eccd1832.entry.js → p-db293e50.entry.js} +2 -2
  84. package/dist/calcite/{p-12c4354b.entry.js → p-dcad31e0.entry.js} +2 -2
  85. package/dist/calcite/{p-f0a5c1cf.entry.js → p-ddb1b9bb.entry.js} +2 -2
  86. package/dist/calcite/{p-b3f707d1.js → p-deb7df1e.js} +1 -1
  87. package/dist/calcite/p-e2db7cb6.entry.js +6 -0
  88. package/dist/calcite/{p-676113f7.entry.js → p-e64e5cdc.entry.js} +2 -2
  89. package/dist/calcite/{p-a5925283.entry.js → p-e8d83a55.entry.js} +2 -2
  90. package/dist/calcite/p-f61babd1.js +6 -0
  91. package/dist/calcite/{p-67c2d744.entry.js → p-fb3e8b9b.entry.js} +2 -2
  92. package/dist/cjs/{ExpandToggle-eec7a74a.js → ExpandToggle-3cab12e1.js} +5 -5
  93. package/dist/cjs/{Heading-96c57bf1.js → Heading-79adac08.js} +3 -3
  94. package/dist/cjs/{app-globals-36bb7e5f.js → app-globals-0e5a6ce5.js} +2 -2
  95. package/dist/cjs/{array-144c5568.js → array-6a2dea2c.js} +1 -1
  96. package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
  97. package/dist/cjs/calcite-action-bar.cjs.entry.js +11 -11
  98. package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
  99. package/dist/cjs/calcite-action-menu.cjs.entry.js +8 -8
  100. package/dist/cjs/calcite-action-pad.cjs.entry.js +10 -10
  101. package/dist/cjs/calcite-action.cjs.entry.js +7 -7
  102. package/dist/cjs/calcite-alert.cjs.entry.js +10 -10
  103. package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
  104. package/dist/cjs/calcite-block_2.cjs.entry.js +11 -12
  105. package/dist/cjs/calcite-button.cjs.entry.js +9 -9
  106. package/dist/cjs/calcite-card.cjs.entry.js +7 -7
  107. package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
  108. package/dist/cjs/calcite-chip.cjs.entry.js +7 -7
  109. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +10 -10
  110. package/dist/cjs/calcite-combobox_3.cjs.entry.js +14 -14
  111. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +12 -12
  112. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +11 -11
  113. package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
  114. package/dist/cjs/calcite-filter.cjs.entry.js +9 -9
  115. package/dist/cjs/calcite-flow-item.cjs.entry.js +7 -7
  116. package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
  117. package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -12
  118. package/dist/cjs/calcite-handle.cjs.entry.js +5 -5
  119. package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
  120. package/dist/cjs/calcite-inline-editable.cjs.entry.js +8 -8
  121. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +15 -15
  122. package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
  123. package/dist/cjs/calcite-input-number.cjs.entry.js +12 -12
  124. package/dist/cjs/calcite-input-text.cjs.entry.js +9 -9
  125. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +11 -11
  126. package/dist/cjs/calcite-input.cjs.entry.js +12 -12
  127. package/dist/cjs/calcite-label.cjs.entry.js +6 -6
  128. package/dist/cjs/calcite-link.cjs.entry.js +6 -6
  129. package/dist/cjs/calcite-list_3.cjs.entry.js +10 -11
  130. package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
  131. package/dist/cjs/calcite-modal.cjs.entry.js +1281 -134
  132. package/dist/cjs/calcite-notice.cjs.entry.js +8 -8
  133. package/dist/cjs/calcite-option_3.cjs.entry.js +9 -9
  134. package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
  135. package/dist/cjs/calcite-panel.cjs.entry.js +11 -11
  136. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +33 -13
  137. package/dist/cjs/calcite-popover_2.cjs.entry.js +12 -13
  138. package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
  139. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
  140. package/dist/cjs/calcite-radio-button.cjs.entry.js +9 -9
  141. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +8 -8
  142. package/dist/cjs/calcite-rating.cjs.entry.js +9 -9
  143. package/dist/cjs/calcite-scrim.cjs.entry.js +2 -2
  144. package/dist/cjs/calcite-shell_3.cjs.entry.js +8 -8
  145. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
  146. package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
  147. package/dist/cjs/calcite-stepper_2.cjs.entry.js +9 -9
  148. package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
  149. package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
  150. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +4 -4
  151. package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
  152. package/dist/cjs/calcite-tip_3.cjs.entry.js +54 -56
  153. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +7 -7
  154. package/dist/cjs/calcite-tree_2.cjs.entry.js +8 -8
  155. package/dist/cjs/calcite-value-list_2.cjs.entry.js +30 -12
  156. package/dist/cjs/calcite.cjs.js +5 -5
  157. package/dist/cjs/{conditionalSlot-7f4a8e10.js → conditionalSlot-1322fc35.js} +13 -3
  158. package/dist/cjs/{debounce-3d8e527c.js → debounce-0f9e9abc.js} +1 -1
  159. package/dist/cjs/{dom-1c0b6833.js → dom-13de8dae.js} +3 -4
  160. package/dist/cjs/{filter-a043da6d.js → filter-b64d328c.js} +2 -2
  161. package/dist/cjs/{floating-ui-78db6436.js → floating-ui-81762090.js} +4 -4
  162. package/dist/cjs/{form-5cda2366.js → form-5d8e6d3d.js} +3 -3
  163. package/dist/cjs/{guid-0bb5fc1b.js → guid-4c424c40.js} +1 -1
  164. package/dist/cjs/{index-5bdde370.js → index-a6176241.js} +1 -1
  165. package/dist/cjs/index.cjs.js +1 -1
  166. package/dist/cjs/{interactive-19caf709.js → interactive-4c92331d.js} +1 -1
  167. package/dist/cjs/{interfaces-e83765f7.js → interfaces-31dee91d.js} +1 -1
  168. package/dist/cjs/{key-42ab632f.js → key-98575516.js} +1 -1
  169. package/dist/cjs/{label-2cc97ee2.js → label-40d2674d.js} +2 -2
  170. package/dist/cjs/loader.cjs.js +5 -5
  171. package/dist/cjs/{locale-e755b3f7.js → locale-59a564a4.js} +37 -49
  172. package/dist/cjs/{math-976c29c4.js → math-434fe599.js} +1 -1
  173. package/dist/cjs/{nonChromiumPlatformUtils-0e526ecf.js → nonChromiumPlatformUtils-4af36414.js} +6 -6
  174. package/dist/cjs/{observers-bcbecbbd.js → observers-5bc9fe46.js} +1 -1
  175. package/dist/cjs/{openCloseComponent-edbc7b2a.js → openCloseComponent-67cd4a5b.js} +1 -1
  176. package/dist/cjs/{resources-17fc0687.js → resources-69bd2041.js} +1 -1
  177. package/dist/cjs/{resources-511507b8.js → resources-73628073.js} +1 -1
  178. package/dist/cjs/{resources-749ca3c0.js → resources-a28e66cd.js} +1 -1
  179. package/dist/cjs/{resources-5fdad010.js → resources-a665ff66.js} +1 -3
  180. package/dist/cjs/{resources-1a9c1993.js → resources-aace079b.js} +3 -5
  181. package/dist/cjs/{resources-b4931f11.js → resources-e3e0e1e3.js} +39 -15
  182. package/dist/cjs/{sortable.esm-037a4c16.js → sortable.esm-c1959d54.js} +1 -1
  183. package/dist/cjs/{utils-ecc37d9b.js → utils-62376f8f.js} +1 -1
  184. package/dist/collection/components/accordion/accordion.js +1 -1
  185. package/dist/collection/components/accordion-item/accordion-item.js +1 -1
  186. package/dist/collection/components/accordion-item/resources.js +1 -1
  187. package/dist/collection/components/action/action.js +1 -1
  188. package/dist/collection/components/action/resources.js +1 -1
  189. package/dist/collection/components/action-bar/action-bar.js +1 -1
  190. package/dist/collection/components/action-bar/resources.js +1 -1
  191. package/dist/collection/components/action-bar/utils.js +1 -1
  192. package/dist/collection/components/action-group/action-group.js +1 -1
  193. package/dist/collection/components/action-group/resources.js +1 -1
  194. package/dist/collection/components/action-menu/action-menu.js +1 -1
  195. package/dist/collection/components/action-menu/resources.js +1 -1
  196. package/dist/collection/components/action-pad/action-pad.js +1 -1
  197. package/dist/collection/components/action-pad/resources.js +1 -1
  198. package/dist/collection/components/alert/alert.js +1 -1
  199. package/dist/collection/components/alert/interfaces.js +1 -1
  200. package/dist/collection/components/alert/resources.js +1 -1
  201. package/dist/collection/components/avatar/avatar.js +1 -1
  202. package/dist/collection/components/avatar/utils.js +1 -1
  203. package/dist/collection/components/block/block.js +3 -3
  204. package/dist/collection/components/block/resources.js +1 -2
  205. package/dist/collection/components/block-section/block-section.js +1 -1
  206. package/dist/collection/components/block-section/resources.js +1 -1
  207. package/dist/collection/components/button/button.js +1 -1
  208. package/dist/collection/components/button/resources.js +1 -1
  209. package/dist/collection/components/card/card.js +1 -1
  210. package/dist/collection/components/card/resources.js +1 -1
  211. package/dist/collection/components/checkbox/checkbox.js +1 -1
  212. package/dist/collection/components/chip/chip.js +1 -1
  213. package/dist/collection/components/chip/resources.js +1 -1
  214. package/dist/collection/components/color-picker/color-picker.js +1 -1
  215. package/dist/collection/components/color-picker/resources.js +1 -1
  216. package/dist/collection/components/color-picker/utils.js +1 -1
  217. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +1 -1
  218. package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
  219. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
  220. package/dist/collection/components/color-picker-swatch/resources.js +1 -1
  221. package/dist/collection/components/combobox/combobox.js +1 -1
  222. package/dist/collection/components/combobox/resources.js +1 -1
  223. package/dist/collection/components/combobox/utils.js +1 -1
  224. package/dist/collection/components/combobox-item/combobox-item.js +1 -1
  225. package/dist/collection/components/combobox-item/resources.js +1 -1
  226. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
  227. package/dist/collection/components/combobox-item-group/resources.js +1 -1
  228. package/dist/collection/components/date-picker/date-picker.js +3 -3
  229. package/dist/collection/components/date-picker/resources.js +1 -2
  230. package/dist/collection/components/date-picker/utils.js +1 -1
  231. package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
  232. package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
  233. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
  234. package/dist/collection/components/date-picker-month-header/resources.js +1 -1
  235. package/dist/collection/components/dropdown/dropdown.js +1 -1
  236. package/dist/collection/components/dropdown/resources.js +1 -1
  237. package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
  238. package/dist/collection/components/dropdown-group/resources.js +1 -1
  239. package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
  240. package/dist/collection/components/dropdown-item/resources.js +1 -1
  241. package/dist/collection/components/fab/fab.js +1 -1
  242. package/dist/collection/components/fab/resources.js +1 -1
  243. package/dist/collection/components/filter/filter.js +2 -2
  244. package/dist/collection/components/filter/resources.js +1 -1
  245. package/dist/collection/components/flow/flow.js +1 -1
  246. package/dist/collection/components/flow/resources.js +1 -1
  247. package/dist/collection/components/flow-item/flow-item.js +1 -1
  248. package/dist/collection/components/flow-item/resources.js +1 -1
  249. package/dist/collection/components/functional/ExpandToggle.js +1 -1
  250. package/dist/collection/components/functional/Heading.js +2 -2
  251. package/dist/collection/components/graph/graph.js +1 -1
  252. package/dist/collection/components/graph/util.js +1 -1
  253. package/dist/collection/components/handle/handle.js +1 -1
  254. package/dist/collection/components/handle/resources.js +1 -1
  255. package/dist/collection/components/icon/icon.js +1 -1
  256. package/dist/collection/components/icon/resources.js +1 -1
  257. package/dist/collection/components/icon/utils.js +1 -1
  258. package/dist/collection/components/inline-editable/inline-editable.js +1 -1
  259. package/dist/collection/components/inline-editable/resources.js +1 -1
  260. package/dist/collection/components/input/input.js +1 -1
  261. package/dist/collection/components/input/resources.js +1 -1
  262. package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
  263. package/dist/collection/components/input-date-picker/resources.js +1 -1
  264. package/dist/collection/components/input-message/input-message.js +1 -1
  265. package/dist/collection/components/input-message/interfaces.js +1 -1
  266. package/dist/collection/components/input-number/input-number.js +1 -1
  267. package/dist/collection/components/input-number/resources.js +1 -1
  268. package/dist/collection/components/input-text/input-text.js +1 -1
  269. package/dist/collection/components/input-text/resources.js +1 -1
  270. package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
  271. package/dist/collection/components/label/label.js +1 -1
  272. package/dist/collection/components/label/resources.js +1 -1
  273. package/dist/collection/components/link/link.js +1 -1
  274. package/dist/collection/components/list/list.js +1 -1
  275. package/dist/collection/components/list/resources.js +1 -1
  276. package/dist/collection/components/list-item/list-item.js +1 -1
  277. package/dist/collection/components/list-item/resources.js +1 -1
  278. package/dist/collection/components/list-item-group/list-item-group.js +2 -3
  279. package/dist/collection/components/list-item-group/resources.js +1 -2
  280. package/dist/collection/components/loader/loader.js +1 -1
  281. package/dist/collection/components/modal/modal.js +15 -28
  282. package/dist/collection/components/modal/resources.js +1 -1
  283. package/dist/collection/components/notice/notice.js +1 -1
  284. package/dist/collection/components/notice/resources.js +1 -1
  285. package/dist/collection/components/option/option.js +1 -1
  286. package/dist/collection/components/option-group/option-group.js +1 -1
  287. package/dist/collection/components/pagination/pagination.js +1 -1
  288. package/dist/collection/components/pagination/resources.js +1 -1
  289. package/dist/collection/components/panel/panel.js +3 -3
  290. package/dist/collection/components/panel/resources.js +1 -2
  291. package/dist/collection/components/pick-list/pick-list.js +100 -2
  292. package/dist/collection/components/pick-list/resources.js +1 -1
  293. package/dist/collection/components/pick-list/shared-list-logic.js +31 -7
  294. package/dist/collection/components/pick-list/shared-list-render.js +3 -3
  295. package/dist/collection/components/pick-list-group/pick-list-group.js +2 -3
  296. package/dist/collection/components/pick-list-group/resources.js +1 -2
  297. package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
  298. package/dist/collection/components/pick-list-item/resources.js +1 -1
  299. package/dist/collection/components/popover/PopoverManager.js +1 -1
  300. package/dist/collection/components/popover/popover.js +3 -3
  301. package/dist/collection/components/popover/resources.js +1 -2
  302. package/dist/collection/components/popover-manager/popover-manager.js +1 -1
  303. package/dist/collection/components/progress/progress.js +1 -1
  304. package/dist/collection/components/radio-button/radio-button.js +1 -1
  305. package/dist/collection/components/radio-button/resources.js +1 -1
  306. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  307. package/dist/collection/components/radio-group/radio-group.js +1 -1
  308. package/dist/collection/components/radio-group-item/radio-group-item.js +1 -1
  309. package/dist/collection/components/radio-group-item/resources.js +1 -1
  310. package/dist/collection/components/rating/rating.js +1 -1
  311. package/dist/collection/components/rating/resources.js +1 -1
  312. package/dist/collection/components/scrim/resources.js +1 -1
  313. package/dist/collection/components/scrim/scrim.js +1 -1
  314. package/dist/collection/components/select/resources.js +1 -1
  315. package/dist/collection/components/select/select.js +1 -1
  316. package/dist/collection/components/shell/resources.js +1 -1
  317. package/dist/collection/components/shell/shell.js +1 -1
  318. package/dist/collection/components/shell-center-row/resources.js +1 -1
  319. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
  320. package/dist/collection/components/shell-panel/resources.js +1 -1
  321. package/dist/collection/components/shell-panel/shell-panel.js +1 -1
  322. package/dist/collection/components/slider/resources.js +1 -1
  323. package/dist/collection/components/slider/slider.js +1 -1
  324. package/dist/collection/components/sortable-list/resources.js +1 -1
  325. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  326. package/dist/collection/components/split-button/resources.js +1 -1
  327. package/dist/collection/components/split-button/split-button.js +1 -1
  328. package/dist/collection/components/stepper/stepper.js +1 -1
  329. package/dist/collection/components/stepper-item/stepper-item.js +1 -1
  330. package/dist/collection/components/switch/switch.js +1 -1
  331. package/dist/collection/components/tab/tab.js +1 -1
  332. package/dist/collection/components/tab-nav/tab-nav.js +1 -1
  333. package/dist/collection/components/tab-title/tab-title.js +1 -1
  334. package/dist/collection/components/tabs/resources.js +1 -1
  335. package/dist/collection/components/tabs/tabs.js +1 -1
  336. package/dist/collection/components/tile/resources.js +1 -1
  337. package/dist/collection/components/tile/tile.js +1 -1
  338. package/dist/collection/components/tile-select/resources.js +1 -1
  339. package/dist/collection/components/tile-select/tile-select.js +1 -1
  340. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  341. package/dist/collection/components/time-picker/resources.js +1 -1
  342. package/dist/collection/components/time-picker/time-picker.js +1 -1
  343. package/dist/collection/components/tip/resources.js +1 -3
  344. package/dist/collection/components/tip/tip.js +3 -3
  345. package/dist/collection/components/tip-group/tip-group.js +1 -1
  346. package/dist/collection/components/tip-manager/resources.js +1 -2
  347. package/dist/collection/components/tip-manager/tip-manager.js +3 -3
  348. package/dist/collection/components/tooltip/TooltipManager.js +1 -1
  349. package/dist/collection/components/tooltip/resources.js +1 -1
  350. package/dist/collection/components/tooltip/tooltip.js +1 -1
  351. package/dist/collection/components/tooltip-manager/tooltip-manager.js +1 -1
  352. package/dist/collection/components/tree/interfaces.js +1 -1
  353. package/dist/collection/components/tree/tree.js +1 -1
  354. package/dist/collection/components/tree/utils.js +1 -1
  355. package/dist/collection/components/tree-item/resources.js +1 -1
  356. package/dist/collection/components/tree-item/tree-item.js +1 -1
  357. package/dist/collection/components/value-list/resources.js +1 -1
  358. package/dist/collection/components/value-list/utils.js +1 -1
  359. package/dist/collection/components/value-list/value-list.js +98 -2
  360. package/dist/collection/components/value-list-item/resources.js +1 -1
  361. package/dist/collection/components/value-list-item/value-list-item.js +1 -1
  362. package/dist/collection/utils/array.js +1 -1
  363. package/dist/collection/utils/conditionalSlot.js +11 -1
  364. package/dist/collection/utils/config.js +1 -1
  365. package/dist/collection/utils/date.js +1 -1
  366. package/dist/collection/utils/dom.js +29 -1
  367. package/dist/collection/utils/filter.js +1 -1
  368. package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
  369. package/dist/collection/utils/floating-ui.js +1 -1
  370. package/dist/collection/utils/focusTrapComponent.js +53 -0
  371. package/dist/collection/utils/form.js +1 -1
  372. package/dist/collection/utils/globalAttributes.js +1 -1
  373. package/dist/collection/utils/globalScript.js +1 -1
  374. package/dist/collection/utils/guid.js +1 -1
  375. package/dist/collection/utils/interactive.js +1 -1
  376. package/dist/collection/utils/key.js +1 -1
  377. package/dist/collection/utils/label.js +1 -1
  378. package/dist/collection/utils/locale.js +3 -3
  379. package/dist/collection/utils/math.js +1 -1
  380. package/dist/collection/utils/number.js +33 -46
  381. package/dist/collection/utils/observers.js +1 -1
  382. package/dist/collection/utils/openCloseComponent.js +1 -1
  383. package/dist/collection/utils/resources.js +1 -1
  384. package/dist/collection/utils/t9n.js +1 -1
  385. package/dist/collection/utils/theme.js +1 -1
  386. package/dist/collection/utils/time.js +1 -1
  387. package/dist/components/ExpandToggle.js +1 -1
  388. package/dist/components/Heading.js +2 -2
  389. package/dist/components/action-group.js +1 -1
  390. package/dist/components/action-menu.js +1 -1
  391. package/dist/components/action.js +1 -1
  392. package/dist/components/array.js +1 -1
  393. package/dist/components/button.js +2 -2
  394. package/dist/components/calcite-accordion-item.js +1 -1
  395. package/dist/components/calcite-accordion.js +1 -1
  396. package/dist/components/calcite-action-bar.js +1 -1
  397. package/dist/components/calcite-action-group.js +1 -1
  398. package/dist/components/calcite-action-menu.js +1 -1
  399. package/dist/components/calcite-action-pad.js +1 -1
  400. package/dist/components/calcite-action.js +1 -1
  401. package/dist/components/calcite-alert.js +1 -1
  402. package/dist/components/calcite-avatar.js +1 -1
  403. package/dist/components/calcite-block-section.js +1 -1
  404. package/dist/components/calcite-block.js +2 -3
  405. package/dist/components/calcite-button.js +1 -1
  406. package/dist/components/calcite-card.js +1 -1
  407. package/dist/components/calcite-checkbox.js +1 -1
  408. package/dist/components/calcite-chip.js +1 -1
  409. package/dist/components/calcite-color-picker-hex-input.js +1 -1
  410. package/dist/components/calcite-color-picker-swatch.js +1 -1
  411. package/dist/components/calcite-color-picker.js +1 -1
  412. package/dist/components/calcite-combobox-item-group.js +1 -1
  413. package/dist/components/calcite-combobox-item.js +1 -1
  414. package/dist/components/calcite-combobox.js +1 -1
  415. package/dist/components/calcite-date-picker-day.js +1 -1
  416. package/dist/components/calcite-date-picker-month-header.js +1 -1
  417. package/dist/components/calcite-date-picker-month.js +1 -1
  418. package/dist/components/calcite-date-picker.js +1 -1
  419. package/dist/components/calcite-dropdown-group.js +1 -1
  420. package/dist/components/calcite-dropdown-item.js +1 -1
  421. package/dist/components/calcite-dropdown.js +1 -1
  422. package/dist/components/calcite-fab.js +1 -1
  423. package/dist/components/calcite-filter.js +1 -1
  424. package/dist/components/calcite-flow-item.js +1 -1
  425. package/dist/components/calcite-flow.js +1 -1
  426. package/dist/components/calcite-graph.js +1 -1
  427. package/dist/components/calcite-handle.js +1 -1
  428. package/dist/components/calcite-icon.js +1 -1
  429. package/dist/components/calcite-inline-editable.js +1 -1
  430. package/dist/components/calcite-input-date-picker.js +1 -1
  431. package/dist/components/calcite-input-message.js +1 -1
  432. package/dist/components/calcite-input-number.js +1 -1
  433. package/dist/components/calcite-input-text.js +1 -1
  434. package/dist/components/calcite-input-time-picker.js +1 -1
  435. package/dist/components/calcite-input.js +1 -1
  436. package/dist/components/calcite-label.js +1 -1
  437. package/dist/components/calcite-link.js +1 -1
  438. package/dist/components/calcite-list-item-group.js +2 -3
  439. package/dist/components/calcite-list-item.js +1 -1
  440. package/dist/components/calcite-list.js +1 -1
  441. package/dist/components/calcite-loader.js +1 -1
  442. package/dist/components/calcite-modal.js +1275 -128
  443. package/dist/components/calcite-notice.js +1 -1
  444. package/dist/components/calcite-option-group.js +1 -1
  445. package/dist/components/calcite-option.js +1 -1
  446. package/dist/components/calcite-pagination.js +1 -1
  447. package/dist/components/calcite-panel.js +1 -1
  448. package/dist/components/calcite-pick-list-group.js +3 -3
  449. package/dist/components/calcite-pick-list-item.js +1 -1
  450. package/dist/components/calcite-pick-list.js +25 -2
  451. package/dist/components/calcite-popover-manager.js +1 -1
  452. package/dist/components/calcite-popover.js +1 -1
  453. package/dist/components/calcite-progress.js +1 -1
  454. package/dist/components/calcite-radio-button-group.js +1 -1
  455. package/dist/components/calcite-radio-button.js +1 -1
  456. package/dist/components/calcite-radio-group-item.js +1 -1
  457. package/dist/components/calcite-radio-group.js +1 -1
  458. package/dist/components/calcite-rating.js +1 -1
  459. package/dist/components/calcite-scrim.js +1 -1
  460. package/dist/components/calcite-select.js +1 -1
  461. package/dist/components/calcite-shell-center-row.js +1 -1
  462. package/dist/components/calcite-shell-panel.js +1 -1
  463. package/dist/components/calcite-shell.js +1 -1
  464. package/dist/components/calcite-slider.js +2 -2
  465. package/dist/components/calcite-sortable-list.js +1 -1
  466. package/dist/components/calcite-split-button.js +1 -1
  467. package/dist/components/calcite-stepper-item.js +1 -1
  468. package/dist/components/calcite-stepper.js +1 -1
  469. package/dist/components/calcite-switch.js +1 -1
  470. package/dist/components/calcite-tab-nav.js +1 -1
  471. package/dist/components/calcite-tab-title.js +1 -1
  472. package/dist/components/calcite-tab.js +1 -1
  473. package/dist/components/calcite-tabs.js +1 -1
  474. package/dist/components/calcite-tile-select-group.js +1 -1
  475. package/dist/components/calcite-tile-select.js +1 -1
  476. package/dist/components/calcite-tile.js +1 -1
  477. package/dist/components/calcite-time-picker.js +1 -1
  478. package/dist/components/calcite-tip-group.js +1 -1
  479. package/dist/components/calcite-tip-manager.js +28 -3
  480. package/dist/components/calcite-tip.js +2 -4
  481. package/dist/components/calcite-tooltip-manager.js +1 -1
  482. package/dist/components/calcite-tooltip.js +1 -1
  483. package/dist/components/calcite-tree-item.js +2 -2
  484. package/dist/components/calcite-tree.js +2 -2
  485. package/dist/components/calcite-value-list-item.js +1 -1
  486. package/dist/components/calcite-value-list.js +23 -2
  487. package/dist/components/checkbox.js +1 -1
  488. package/dist/components/chip.js +1 -1
  489. package/dist/components/color-picker-hex-input.js +1 -1
  490. package/dist/components/color-picker-swatch.js +1 -1
  491. package/dist/components/conditionalSlot.js +11 -1
  492. package/dist/components/date-picker-day.js +2 -2
  493. package/dist/components/date-picker-month-header.js +2 -2
  494. package/dist/components/date-picker-month.js +1 -1
  495. package/dist/components/date-picker.js +2 -3
  496. package/dist/components/date.js +1 -1
  497. package/dist/components/debounce.js +1 -1
  498. package/dist/components/dom.js +2 -2
  499. package/dist/components/dropdown.js +1 -1
  500. package/dist/components/filter.js +2 -2
  501. package/dist/components/filter2.js +1 -1
  502. package/dist/components/floating-ui.js +2 -2
  503. package/dist/components/form.js +2 -2
  504. package/dist/components/graph.js +1 -1
  505. package/dist/components/guid.js +1 -1
  506. package/dist/components/handle.js +1 -1
  507. package/dist/components/icon.js +1 -1
  508. package/dist/components/index.js +1 -1
  509. package/dist/components/input.js +1 -1
  510. package/dist/components/interactive.js +1 -1
  511. package/dist/components/interfaces.js +1 -1
  512. package/dist/components/interfaces2.js +1 -1
  513. package/dist/components/key.js +1 -1
  514. package/dist/components/label.js +1 -1
  515. package/dist/components/label2.js +2 -2
  516. package/dist/components/link.js +1 -1
  517. package/dist/components/loader.js +1 -1
  518. package/dist/components/locale.js +35 -47
  519. package/dist/components/math.js +1 -1
  520. package/dist/components/nonChromiumPlatformUtils.js +1 -1
  521. package/dist/components/observers.js +1 -1
  522. package/dist/components/openCloseComponent.js +1 -1
  523. package/dist/components/panel.js +2 -3
  524. package/dist/components/pick-list-item.js +1 -1
  525. package/dist/components/popover.js +2 -3
  526. package/dist/components/progress.js +1 -1
  527. package/dist/components/resources.js +1 -1
  528. package/dist/components/resources2.js +2 -3
  529. package/dist/components/scrim.js +1 -1
  530. package/dist/components/shared-list-render.js +34 -10
  531. package/dist/components/sortable.esm.js +1 -1
  532. package/dist/components/switch.js +1 -1
  533. package/dist/components/tab-nav.js +2 -2
  534. package/dist/components/tab-title.js +1 -1
  535. package/dist/components/tab.js +1 -1
  536. package/dist/components/tabs.js +1 -1
  537. package/dist/components/tile.js +1 -1
  538. package/dist/components/time-picker.js +1 -1
  539. package/dist/components/tooltip.js +1 -1
  540. package/dist/components/utils.js +1 -1
  541. package/dist/components/utils2.js +1 -1
  542. package/dist/esm/{ExpandToggle-8d1a3315.js → ExpandToggle-c1666d9f.js} +5 -5
  543. package/dist/esm/{Heading-fdaf2441.js → Heading-6f3b27d7.js} +3 -3
  544. package/dist/esm/{app-globals-62f1ea5d.js → app-globals-dc53e887.js} +2 -2
  545. package/dist/esm/{array-a3f4690d.js → array-ec97ab21.js} +1 -1
  546. package/dist/esm/calcite-accordion_2.entry.js +7 -7
  547. package/dist/esm/calcite-action-bar.entry.js +11 -11
  548. package/dist/esm/calcite-action-group.entry.js +9 -9
  549. package/dist/esm/calcite-action-menu.entry.js +8 -8
  550. package/dist/esm/calcite-action-pad.entry.js +10 -10
  551. package/dist/esm/calcite-action.entry.js +7 -7
  552. package/dist/esm/calcite-alert.entry.js +10 -10
  553. package/dist/esm/calcite-avatar.entry.js +6 -6
  554. package/dist/esm/calcite-block_2.entry.js +11 -12
  555. package/dist/esm/calcite-button.entry.js +9 -9
  556. package/dist/esm/calcite-card.entry.js +7 -7
  557. package/dist/esm/calcite-checkbox.entry.js +9 -9
  558. package/dist/esm/calcite-chip.entry.js +7 -7
  559. package/dist/esm/calcite-color-picker_3.entry.js +10 -10
  560. package/dist/esm/calcite-combobox_3.entry.js +14 -14
  561. package/dist/esm/calcite-date-picker_4.entry.js +12 -12
  562. package/dist/esm/calcite-dropdown_3.entry.js +11 -11
  563. package/dist/esm/calcite-fab.entry.js +6 -6
  564. package/dist/esm/calcite-filter.entry.js +9 -9
  565. package/dist/esm/calcite-flow-item.entry.js +7 -7
  566. package/dist/esm/calcite-flow.entry.js +3 -3
  567. package/dist/esm/calcite-graph_2.entry.js +12 -12
  568. package/dist/esm/calcite-handle.entry.js +5 -5
  569. package/dist/esm/calcite-icon.entry.js +6 -6
  570. package/dist/esm/calcite-inline-editable.entry.js +8 -8
  571. package/dist/esm/calcite-input-date-picker.entry.js +15 -15
  572. package/dist/esm/calcite-input-message.entry.js +5 -5
  573. package/dist/esm/calcite-input-number.entry.js +12 -12
  574. package/dist/esm/calcite-input-text.entry.js +9 -9
  575. package/dist/esm/calcite-input-time-picker_2.entry.js +11 -11
  576. package/dist/esm/calcite-input.entry.js +12 -12
  577. package/dist/esm/calcite-label.entry.js +6 -6
  578. package/dist/esm/calcite-link.entry.js +6 -6
  579. package/dist/esm/calcite-list_3.entry.js +10 -11
  580. package/dist/esm/calcite-loader.entry.js +3 -3
  581. package/dist/esm/calcite-modal.entry.js +1281 -134
  582. package/dist/esm/calcite-notice.entry.js +8 -8
  583. package/dist/esm/calcite-option_3.entry.js +9 -9
  584. package/dist/esm/calcite-pagination.entry.js +8 -8
  585. package/dist/esm/calcite-panel.entry.js +11 -11
  586. package/dist/esm/calcite-pick-list_3.entry.js +33 -13
  587. package/dist/esm/calcite-popover_2.entry.js +12 -13
  588. package/dist/esm/calcite-progress.entry.js +2 -2
  589. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  590. package/dist/esm/calcite-radio-button.entry.js +9 -9
  591. package/dist/esm/calcite-radio-group_2.entry.js +8 -8
  592. package/dist/esm/calcite-rating.entry.js +9 -9
  593. package/dist/esm/calcite-scrim.entry.js +2 -2
  594. package/dist/esm/calcite-shell_3.entry.js +8 -8
  595. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  596. package/dist/esm/calcite-split-button.entry.js +3 -3
  597. package/dist/esm/calcite-stepper_2.entry.js +9 -9
  598. package/dist/esm/calcite-switch.entry.js +9 -9
  599. package/dist/esm/calcite-tab_4.entry.js +7 -7
  600. package/dist/esm/calcite-tile-select_2.entry.js +4 -4
  601. package/dist/esm/calcite-tile.entry.js +8 -8
  602. package/dist/esm/calcite-tip_3.entry.js +54 -56
  603. package/dist/esm/calcite-tooltip_2.entry.js +7 -7
  604. package/dist/esm/calcite-tree_2.entry.js +8 -8
  605. package/dist/esm/calcite-value-list_2.entry.js +30 -12
  606. package/dist/esm/calcite.js +5 -5
  607. package/dist/esm/{conditionalSlot-7a623ab3.js → conditionalSlot-65d395e3.js} +13 -3
  608. package/dist/esm/{debounce-65d04f40.js → debounce-150a7fe8.js} +1 -1
  609. package/dist/esm/{dom-6ced0696.js → dom-cc5c3984.js} +4 -4
  610. package/dist/esm/{filter-a94d668f.js → filter-1ebb2c6b.js} +2 -2
  611. package/dist/esm/{floating-ui-88f3cab2.js → floating-ui-93789309.js} +4 -4
  612. package/dist/esm/{form-796899b4.js → form-255c911d.js} +3 -3
  613. package/dist/esm/{guid-4e7e998d.js → guid-f9660e6f.js} +1 -1
  614. package/dist/esm/{index-ee2154b8.js → index-d2393e84.js} +1 -1
  615. package/dist/esm/index.js +1 -1
  616. package/dist/esm/{interactive-c01b3adc.js → interactive-26a4cd50.js} +1 -1
  617. package/dist/esm/{interfaces-6e1adc71.js → interfaces-36e4a241.js} +1 -1
  618. package/dist/esm/{key-29710632.js → key-a4eb4c7a.js} +1 -1
  619. package/dist/esm/{label-d97fd95f.js → label-958c6dcb.js} +2 -2
  620. package/dist/esm/loader.js +5 -5
  621. package/dist/esm/{locale-9344d29f.js → locale-356e61ad.js} +37 -49
  622. package/dist/esm/{math-43507cd0.js → math-edfa7bd5.js} +1 -1
  623. package/dist/esm/{nonChromiumPlatformUtils-733b22ab.js → nonChromiumPlatformUtils-0826d52b.js} +6 -6
  624. package/dist/esm/{observers-3e969148.js → observers-8a9fc943.js} +1 -1
  625. package/dist/esm/{openCloseComponent-2c95053e.js → openCloseComponent-759e2351.js} +1 -1
  626. package/dist/esm/{resources-2c83579b.js → resources-03d3cf60.js} +2 -3
  627. package/dist/esm/{resources-07ad5aa9.js → resources-0fd6d659.js} +1 -1
  628. package/dist/esm/{resources-78c5b4d1.js → resources-64a95f35.js} +1 -1
  629. package/dist/esm/{resources-a8c464a5.js → resources-b9c5aaf9.js} +1 -1
  630. package/dist/esm/{resources-f36e2798.js → resources-c578caf8.js} +38 -15
  631. package/dist/esm/{resources-bc4bdc72.js → resources-d313bb62.js} +4 -5
  632. package/dist/esm/{sortable.esm-a5c12724.js → sortable.esm-6298e963.js} +1 -1
  633. package/dist/esm/{utils-e8657244.js → utils-18a922e5.js} +1 -1
  634. package/dist/extras/docs-json.json +131 -1
  635. package/dist/loader/cdn.js +1 -1
  636. package/dist/loader/index.cjs.js +1 -1
  637. package/dist/loader/index.es2017.js +1 -1
  638. package/dist/loader/index.js +1 -1
  639. package/dist/types/components/block/resources.d.ts +0 -1
  640. package/dist/types/components/date-picker/resources.d.ts +0 -1
  641. package/dist/types/components/functional/Heading.d.ts +1 -1
  642. package/dist/types/components/list-item-group/resources.d.ts +0 -1
  643. package/dist/types/components/modal/modal.d.ts +4 -4
  644. package/dist/types/components/panel/resources.d.ts +0 -1
  645. package/dist/types/components/pick-list/pick-list.d.ts +24 -0
  646. package/dist/types/components/pick-list/shared-list-logic.d.ts +4 -1
  647. package/dist/types/components/pick-list/shared-list-render.d.ts +4 -1
  648. package/dist/types/components/pick-list-group/resources.d.ts +0 -1
  649. package/dist/types/components/popover/resources.d.ts +0 -1
  650. package/dist/types/components/tip/resources.d.ts +0 -2
  651. package/dist/types/components/tip-manager/resources.d.ts +0 -1
  652. package/dist/types/components/value-list/value-list.d.ts +23 -0
  653. package/dist/types/components.d.ts +65 -1
  654. package/dist/types/preact.d.ts +4 -2
  655. package/dist/types/utils/conditionalSlot.d.ts +16 -0
  656. package/dist/types/utils/dom.d.ts +34 -0
  657. package/dist/types/utils/focusTrapComponent.d.ts +33 -0
  658. package/dist/types/utils/locale.d.ts +1 -2
  659. package/dist/types/utils/number.d.ts +13 -8
  660. package/hydrate/index.js +1453 -248
  661. package/package.json +2 -2
  662. package/dist/calcite/p-079e3c1e.js +0 -6
  663. package/dist/calcite/p-1993b247.js +0 -6
  664. package/dist/calcite/p-1a291a99.entry.js +0 -6
  665. package/dist/calcite/p-23f31b98.entry.js +0 -6
  666. package/dist/calcite/p-3a4f8c9a.entry.js +0 -6
  667. package/dist/calcite/p-5d9f0c37.entry.js +0 -6
  668. package/dist/calcite/p-8557fe8d.entry.js +0 -6
  669. package/dist/calcite/p-86c3dd63.entry.js +0 -6
  670. package/dist/calcite/p-8afa3d3c.js +0 -6
  671. package/dist/calcite/p-8d81edd4.entry.js +0 -6
  672. package/dist/calcite/p-9460a0c0.js +0 -6
  673. package/dist/calcite/p-9c6f7a63.entry.js +0 -6
  674. package/dist/calcite/p-a5fed565.entry.js +0 -6
  675. package/dist/calcite/p-b3571ee3.js +0 -6
  676. package/dist/calcite/p-e1084c73.entry.js +0 -6
  677. package/dist/components/resources3.js +0 -33
package/hydrate/index.js CHANGED
@@ -1,7 +1,7 @@
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.631
4
+ * v1.0.0-next.633
5
5
  */
6
6
  'use strict';
7
7
 
@@ -6021,7 +6021,7 @@ function getElementProp(el, prop, fallbackValue) {
6021
6021
  const closest = el.closest(selector);
6022
6022
  return closest ? closest.getAttribute(prop) : fallbackValue;
6023
6023
  }
6024
- function getRootNode(el) {
6024
+ function getRootNode$1(el) {
6025
6025
  return el.getRootNode();
6026
6026
  }
6027
6027
  function getHost(root) {
@@ -6048,7 +6048,7 @@ function queryElementRoots(element, { selector, id }) {
6048
6048
  if (el.assignedSlot) {
6049
6049
  el = el.assignedSlot;
6050
6050
  }
6051
- const rootNode = getRootNode(el);
6051
+ const rootNode = getRootNode$1(el);
6052
6052
  const found = id
6053
6053
  ? "getElementById" in rootNode
6054
6054
  ? /*
@@ -6068,7 +6068,7 @@ function queryElementRoots(element, { selector, id }) {
6068
6068
  function closestElementCrossShadowBoundary(element, selector) {
6069
6069
  // based on https://stackoverflow.com/q/54520554/194216
6070
6070
  function closestFrom(el) {
6071
- return el ? el.closest(selector) || closestFrom(getHost(getRootNode(el))) : null;
6071
+ return el ? el.closest(selector) || closestFrom(getHost(getRootNode$1(el))) : null;
6072
6072
  }
6073
6073
  return closestFrom(element);
6074
6074
  }
@@ -6184,6 +6184,11 @@ const observerOptions = { childList: true };
6184
6184
  * Helper to set up a conditional slot component on connectedCallback.
6185
6185
  *
6186
6186
  * @param component
6187
+ * @deprecated Use `onSlotchange` event with `slotChangeHasAssignedElement` DOM utility instead.
6188
+ *
6189
+ * ```
6190
+ * <slot onSlotchange={(event) => this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}
6191
+ * ```
6187
6192
  */
6188
6193
  function connectConditionalSlotComponent(component) {
6189
6194
  if (!mutationObserver$1) {
@@ -6195,6 +6200,11 @@ function connectConditionalSlotComponent(component) {
6195
6200
  * Helper to tear down a conditional slot component on disconnectedCallback.
6196
6201
  *
6197
6202
  * @param component
6203
+ * @deprecated Use `onSlotchange` event with `slotChangeHasAssignedElement` DOM utility instead.
6204
+ *
6205
+ * ```
6206
+ * <slot onSlotchange={(event) => this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}
6207
+ * ```
6198
6208
  */
6199
6209
  function disconnectConditionalSlotComponent(component) {
6200
6210
  observed.delete(component.el);
@@ -8844,9 +8854,15 @@ function disconnectOpenCloseComponent(component) {
8844
8854
  componentToTransitionListeners.delete(component);
8845
8855
  }
8846
8856
 
8857
+ const defaultMinusSignRegex = new RegExp("-", "g");
8858
+ const unnecessaryDecimalRegex = new RegExp("\\.?0+$");
8847
8859
  // adopted from https://stackoverflow.com/a/66939244
8848
8860
  class BigDecimal {
8849
8861
  constructor(input) {
8862
+ this.add = (num) => BigDecimal.fromBigInt(this.value + new BigDecimal(num).value);
8863
+ this.subtract = (num) => BigDecimal.fromBigInt(this.value - new BigDecimal(num).value);
8864
+ this.multiply = (num) => BigDecimal._divRound(this.value * new BigDecimal(num).value, BigDecimal.SHIFT);
8865
+ this.divide = (num) => BigDecimal._divRound(this.value * BigDecimal.SHIFT, new BigDecimal(num).value);
8850
8866
  if (input instanceof BigDecimal) {
8851
8867
  return input;
8852
8868
  }
@@ -8856,65 +8872,47 @@ class BigDecimal {
8856
8872
  BigInt(BigDecimal.ROUNDED && decimals[BigDecimal.DECIMALS] >= "5");
8857
8873
  this.isNegative = input.charAt(0) === "-";
8858
8874
  }
8859
- static _divRound(dividend, divisor) {
8860
- return BigDecimal.fromBigInt(dividend / divisor + (BigDecimal.ROUNDED ? ((dividend * BigInt(2)) / divisor) % BigInt(2) : BigInt(0)));
8861
- }
8862
- static fromBigInt(bigint) {
8863
- return Object.assign(Object.create(BigDecimal.prototype), { value: bigint });
8864
- }
8865
- toString() {
8875
+ getIntegersAndDecimals() {
8866
8876
  const s = this.value
8867
8877
  .toString()
8868
- .replace(new RegExp("-", "g"), "")
8878
+ .replace(defaultMinusSignRegex, "")
8869
8879
  .padStart(BigDecimal.DECIMALS + 1, "0");
8870
- const i = s.slice(0, -BigDecimal.DECIMALS);
8871
- const d = s.slice(-BigDecimal.DECIMALS).replace(/\.?0+$/, "");
8872
- const value = i.concat(d.length ? "." + d : "");
8873
- return `${this.isNegative ? "-" : ""}${value}`;
8880
+ const integers = s.slice(0, -BigDecimal.DECIMALS);
8881
+ const decimals = s.slice(-BigDecimal.DECIMALS).replace(unnecessaryDecimalRegex, "");
8882
+ return { integers, decimals };
8883
+ }
8884
+ toString() {
8885
+ const { integers, decimals } = this.getIntegersAndDecimals();
8886
+ return `${this.isNegative ? "-" : ""}${integers}${decimals.length ? "." + decimals : ""}`;
8874
8887
  }
8875
8888
  formatToParts(formatter) {
8876
- const s = this.value
8877
- .toString()
8878
- .replace(new RegExp("-", "g"), "")
8879
- .padStart(BigDecimal.DECIMALS + 1, "0");
8880
- const i = s.slice(0, -BigDecimal.DECIMALS);
8881
- const d = s.slice(-BigDecimal.DECIMALS).replace(/\.?0+$/, "");
8882
- const parts = formatter.formatToParts(BigInt(i));
8883
- this.isNegative && parts.unshift({ type: "minusSign", value: numberStringFormatter.minusSign });
8884
- if (d.length) {
8885
- parts.push({ type: "decimal", value: numberStringFormatter.decimal });
8886
- d.split("").forEach((char) => parts.push({ type: "fraction", value: char }));
8889
+ const { integers, decimals } = this.getIntegersAndDecimals();
8890
+ const parts = formatter.numberFormatter.formatToParts(BigInt(integers));
8891
+ this.isNegative && parts.unshift({ type: "minusSign", value: formatter.minusSign });
8892
+ if (decimals.length) {
8893
+ parts.push({ type: "decimal", value: formatter.decimal });
8894
+ decimals.split("").forEach((char) => parts.push({ type: "fraction", value: char }));
8887
8895
  }
8888
8896
  return parts;
8889
8897
  }
8890
8898
  format(formatter) {
8891
- const s = this.value
8892
- .toString()
8893
- .replace(new RegExp("-", "g"), "")
8894
- .padStart(BigDecimal.DECIMALS + 1, "0");
8895
- const i = s.slice(0, -BigDecimal.DECIMALS);
8896
- const d = s.slice(-BigDecimal.DECIMALS).replace(/\.?0+$/, "");
8897
- const iFormatted = `${this.isNegative ? numberStringFormatter.minusSign : ""}${formatter.format(BigInt(i))}`;
8898
- const dFormatted = d.length ? `${numberStringFormatter.decimal}${formatter.format(BigInt(d))}` : "";
8899
- return `${iFormatted}${dFormatted}`;
8900
- }
8901
- add(num) {
8902
- return BigDecimal.fromBigInt(this.value + new BigDecimal(num).value);
8903
- }
8904
- subtract(num) {
8905
- return BigDecimal.fromBigInt(this.value - new BigDecimal(num).value);
8906
- }
8907
- multiply(num) {
8908
- return BigDecimal._divRound(this.value * new BigDecimal(num).value, BigDecimal.SHIFT);
8909
- }
8910
- divide(num) {
8911
- return BigDecimal._divRound(this.value * BigDecimal.SHIFT, new BigDecimal(num).value);
8899
+ const { integers, decimals } = this.getIntegersAndDecimals();
8900
+ const integersFormatted = `${this.isNegative ? formatter.minusSign : ""}${formatter.numberFormatter.format(BigInt(integers))}`;
8901
+ const decimalsFormatted = decimals.length
8902
+ ? `${formatter.decimal}${decimals
8903
+ .split("")
8904
+ .map((char) => formatter.numberFormatter.format(Number(char)))
8905
+ .join("")}`
8906
+ : "";
8907
+ return `${integersFormatted}${decimalsFormatted}`;
8912
8908
  }
8913
8909
  }
8914
8910
  // Configuration: constants
8915
8911
  BigDecimal.DECIMALS = 100; // number of decimals on all instances
8916
8912
  BigDecimal.ROUNDED = true; // numbers are truncated (false) or rounded (true)
8917
8913
  BigDecimal.SHIFT = BigInt("1" + "0".repeat(BigDecimal.DECIMALS)); // derived constant
8914
+ BigDecimal._divRound = (dividend, divisor) => BigDecimal.fromBigInt(dividend / divisor + (BigDecimal.ROUNDED ? ((dividend * BigInt(2)) / divisor) % BigInt(2) : BigInt(0)));
8915
+ BigDecimal.fromBigInt = (bigint) => Object.assign(Object.create(BigDecimal.prototype), { value: bigint });
8918
8916
  function isValidNumber(numberString) {
8919
8917
  return !(!numberString || isNaN(Number(numberString)));
8920
8918
  }
@@ -9156,7 +9154,7 @@ class NumberStringFormat {
9156
9154
  this.localize = (numberString) => this._numberFormatOptions
9157
9155
  ? sanitizeExponentialNumberString(numberString, (nonExpoNumString) => isValidNumber(nonExpoNumString.trim())
9158
9156
  ? new BigDecimal(nonExpoNumString.trim())
9159
- .format(this._numberFormatter)
9157
+ .format(this)
9160
9158
  .replace(new RegExp(`[${this._actualGroup}]`, "g"), this._group)
9161
9159
  : nonExpoNumString)
9162
9160
  : numberString;
@@ -9765,13 +9763,12 @@ const ICONS$d = {
9765
9763
  invalid: "exclamation-mark-triangle",
9766
9764
  refresh: "refresh"
9767
9765
  };
9768
- const HEADING_LEVEL$7 = 4;
9769
9766
 
9770
9767
  function constrainHeadingLevel(level) {
9771
9768
  return Math.min(Math.max(Math.ceil(level), 1), 6);
9772
9769
  }
9773
9770
  const Heading = (props, children) => {
9774
- const HeadingTag = `h${props.level}`;
9771
+ const HeadingTag = props.level ? `h${props.level}` : "div";
9775
9772
  delete props.level;
9776
9773
  return hAsync(HeadingTag, { ...props }, children);
9777
9774
  };
@@ -9898,7 +9895,7 @@ class Block {
9898
9895
  }
9899
9896
  renderTitle() {
9900
9897
  const { heading, headingLevel, summary, description } = this;
9901
- return heading || summary || description ? (hAsync("div", { class: CSS$P.title }, hAsync(Heading, { class: CSS$P.heading, level: headingLevel || HEADING_LEVEL$7 }, heading), summary || description ? (hAsync("div", { class: CSS$P.description }, summary || description)) : null)) : null;
9898
+ return heading || summary || description ? (hAsync("div", { class: CSS$P.title }, hAsync(Heading, { class: CSS$P.heading, level: headingLevel }, heading), summary || description ? (hAsync("div", { class: CSS$P.description }, summary || description)) : null)) : null;
9902
9899
  }
9903
9900
  render() {
9904
9901
  const { collapsible, el, intlCollapse, intlExpand, loading, open, intlLoading } = this;
@@ -17475,7 +17472,6 @@ function getValueAsDateRange(value) {
17475
17472
  return value.map((v, index) => dateFromISO(v, index === 1));
17476
17473
  }
17477
17474
 
17478
- const HEADING_LEVEL$6 = 2;
17479
17475
  const TEXT$i = {
17480
17476
  nextMonth: "Next month",
17481
17477
  prevMonth: "Previous month",
@@ -17838,7 +17834,7 @@ class DatePicker {
17838
17834
  */
17839
17835
  renderCalendar(activeDate, maxDate, minDate, date, endDate) {
17840
17836
  return (this.localeData && [
17841
- hAsync("calcite-date-picker-month-header", { activeDate: activeDate, headingLevel: this.headingLevel || HEADING_LEVEL$6, intlNextMonth: this.intlNextMonth, intlPrevMonth: this.intlPrevMonth, intlYear: this.intlYear, localeData: this.localeData, max: maxDate, min: minDate, onCalciteDatePickerSelect: this.monthHeaderSelectChange, scale: this.scale, selectedDate: this.activeRange === "end" ? endDate : date || new Date() }),
17837
+ hAsync("calcite-date-picker-month-header", { activeDate: activeDate, headingLevel: this.headingLevel, intlNextMonth: this.intlNextMonth, intlPrevMonth: this.intlPrevMonth, intlYear: this.intlYear, localeData: this.localeData, max: maxDate, min: minDate, onCalciteDatePickerSelect: this.monthHeaderSelectChange, scale: this.scale, selectedDate: this.activeRange === "end" ? endDate : date || new Date() }),
17842
17838
  hAsync("calcite-date-picker-month", { activeDate: activeDate, endDate: this.range ? endDate : undefined, hoverRange: this.hoverRange, localeData: this.localeData, max: maxDate, min: minDate, onCalciteDatePickerActiveDateChange: this.monthActiveDateChange, onCalciteDatePickerSelect: this.monthDateChange, onCalciteInternalDatePickerHover: this.monthHoverChange, onCalciteInternalDatePickerMouseOut: this.monthMouseOutChange, scale: this.scale, selectedDate: this.activeRange === "end" ? endDate : date, startDate: this.range ? date : undefined })
17843
17839
  ]);
17844
17840
  }
@@ -19524,7 +19520,7 @@ class Filter {
19524
19520
  //
19525
19521
  //--------------------------------------------------------------------------
19526
19522
  componentWillLoad() {
19527
- this.filter(this.value);
19523
+ this.updateFiltered(filter(this.items, this.value));
19528
19524
  }
19529
19525
  // --------------------------------------------------------------------------
19530
19526
  //
@@ -19762,7 +19758,6 @@ const TEXT$f = {
19762
19758
  open: "Open",
19763
19759
  options: "Options"
19764
19760
  };
19765
- const HEADING_LEVEL$5 = 3;
19766
19761
 
19767
19762
  const flowItemCss = "@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*/.sc-calcite-flow-item: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*/.calcite-animate.sc-calcite-flow-item{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-flow-item{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-flow-item{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-flow-item{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-flow-item{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-flow-item:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-flow-item-h{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}/*!@:host **/.sc-calcite-flow-item-h *.sc-calcite-flow-item{box-sizing:border-box}/*!@:root*/.sc-calcite-flow-item:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-flow-item-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-flow-item-h{pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host*/.sc-calcite-flow-item-h{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-flow-item-h[disabled] .sc-calcite-flow-item-s>[calcite-hydrated][disabled],[disabled].sc-calcite-flow-item-h [calcite-hydrated][disabled].sc-calcite-flow-item{opacity:1}/*!@.back-button*/.back-button.sc-calcite-flow-item{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}";
19768
19763
 
@@ -23923,7 +23918,6 @@ const CSS$o = {
23923
23918
  heading: "heading",
23924
23919
  container: "container"
23925
23920
  };
23926
- const HEADING_LEVEL$4 = 3;
23927
23921
 
23928
23922
  const listItemGroupCss = "@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*/.sc-calcite-list-item-group: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*/.calcite-animate.sc-calcite-list-item-group{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-list-item-group{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-list-item-group{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-list-item-group{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-list-item-group{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-list-item-group:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-list-item-group:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-list-item-group-h{display:none}/*!@:host*/.sc-calcite-list-item-group-h{display:flex;flex-direction:column}/*!@.heading*/.heading.sc-calcite-list-item-group{margin:0px;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-2);padding:0.75rem;font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}/*!@.container*/.container.sc-calcite-list-item-group{display:flex;inline-size:100%;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}/*!@::slotted(calcite-list-item-group)*/.sc-calcite-list-item-group-s>calcite-list-item-group{padding-inline-start:0.5rem}";
23929
23923
 
@@ -23944,7 +23938,7 @@ class ListItemGroup {
23944
23938
  const { el, heading, headingLevel } = this;
23945
23939
  const parentLevel = (_a = el.closest("calcite-list, calcite-list-item-group")) === null || _a === void 0 ? void 0 : _a.headingLevel;
23946
23940
  const relativeLevel = parentLevel ? constrainHeadingLevel(parentLevel + 1) : null;
23947
- const level = headingLevel || relativeLevel || HEADING_LEVEL$4;
23941
+ const level = headingLevel || relativeLevel;
23948
23942
  return (hAsync(Host, null, heading ? (hAsync(Heading, { class: CSS$o.heading, level: level }, heading)) : null, hAsync("div", { class: CSS$o.container, role: "group" }, hAsync("slot", null))));
23949
23943
  }
23950
23944
  get el() { return getElement(this); }
@@ -24061,109 +24055,6 @@ class Loader {
24061
24055
  }; }
24062
24056
  }
24063
24057
 
24064
- /**
24065
- * Traverses the slots of the open shadowroots and returns all children matching the query.
24066
- * @param {ShadowRoot | HTMLElement} root
24067
- * @param skipNode
24068
- * @param isMatch
24069
- * @param {number} maxDepth
24070
- * @param {number} depth
24071
- * @returns {HTMLElement[]}
24072
- */
24073
- function queryShadowRoot(root, skipNode, isMatch, maxDepth = 20, depth = 0) {
24074
- let matches = [];
24075
- // If the depth is above the max depth, abort the searching here.
24076
- if (depth >= maxDepth) {
24077
- return matches;
24078
- }
24079
- // Traverses a slot element
24080
- const traverseSlot = ($slot) => {
24081
- // Only check nodes that are of the type Node.ELEMENT_NODE
24082
- // Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
24083
- const assignedNodes = $slot.assignedNodes().filter(node => node.nodeType === 1);
24084
- if (assignedNodes.length > 0) {
24085
- return queryShadowRoot(assignedNodes[0].parentElement, skipNode, isMatch, maxDepth, depth + 1);
24086
- }
24087
- return [];
24088
- };
24089
- // Go through each child and continue the traversing if necessary
24090
- // Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.
24091
- // Therefore we fallback to an empty array if it is undefined.
24092
- const children = Array.from(root.children || []);
24093
- for (const $child of children) {
24094
- // Check if the node and its descendants should be skipped
24095
- if (skipNode($child)) {
24096
- continue;
24097
- }
24098
- // If the child matches we always add it
24099
- if (isMatch($child)) {
24100
- matches.push($child);
24101
- }
24102
- if ($child.shadowRoot != null) {
24103
- matches.push(...queryShadowRoot($child.shadowRoot, skipNode, isMatch, maxDepth, depth + 1));
24104
- }
24105
- else if ($child.tagName === "SLOT") {
24106
- matches.push(...traverseSlot($child));
24107
- }
24108
- else {
24109
- matches.push(...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1));
24110
- }
24111
- }
24112
- return matches;
24113
- }
24114
-
24115
- /**
24116
- * Returns whether the element is hidden.
24117
- * @param $elem
24118
- */
24119
- function isHidden($elem) {
24120
- return $elem.hasAttribute("hidden")
24121
- || ($elem.hasAttribute("aria-hidden") && $elem.getAttribute("aria-hidden") !== "false")
24122
- // A quick and dirty way to check whether the element is hidden.
24123
- // For a more fine-grained check we could use "window.getComputedStyle" but we don't because of bad performance.
24124
- // If the element has visibility set to "hidden" or "collapse", display set to "none" or opacity set to "0" through CSS
24125
- // we won't be able to catch it here. We accept it due to the huge performance benefits.
24126
- || $elem.style.display === `none`
24127
- || $elem.style.opacity === `0`
24128
- || $elem.style.visibility === `hidden`
24129
- || $elem.style.visibility === `collapse`;
24130
- // If offsetParent is null we can assume that the element is hidden
24131
- // https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null
24132
- //|| $elem.offsetParent == null;
24133
- }
24134
- /**
24135
- * Returns whether the element is disabled.
24136
- * @param $elem
24137
- */
24138
- function isDisabled($elem) {
24139
- return $elem.hasAttribute("disabled")
24140
- || ($elem.hasAttribute("aria-disabled") && $elem.getAttribute("aria-disabled") !== "false");
24141
- }
24142
- /**
24143
- * Determines whether an element is focusable.
24144
- * Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194
24145
- * Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable
24146
- * @param $elem
24147
- */
24148
- function isFocusable($elem) {
24149
- // Discard elements that are removed from the tab order.
24150
- if ($elem.getAttribute("tabindex") === "-1" || isHidden($elem) || isDisabled($elem)) {
24151
- return false;
24152
- }
24153
- return (
24154
- // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists
24155
- $elem.hasAttribute("tabindex")
24156
- // Anchor tags or area tags with a href set
24157
- || ($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute("href")
24158
- // Form elements which are not disabled
24159
- || ($elem instanceof HTMLButtonElement
24160
- || $elem instanceof HTMLInputElement
24161
- || $elem instanceof HTMLTextAreaElement
24162
- || $elem instanceof HTMLSelectElement)
24163
- // IFrames
24164
- || $elem instanceof HTMLIFrameElement);
24165
- }
24166
-
24167
24058
  const CSS$n = {
24168
24059
  modal: "modal",
24169
24060
  modalOpen: "modal--open",
@@ -24197,14 +24088,1270 @@ const TEXT$a = {
24197
24088
  close: "Close"
24198
24089
  };
24199
24090
 
24200
- 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*/.sc-calcite-modal: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*/.calcite-animate.sc-calcite-modal{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-modal{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-modal{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-modal{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-modal{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-modal:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-modal:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-modal-h{display:none}/*!@:host*/.sc-calcite-modal-h{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])*/[scale=s].sc-calcite-modal-h{--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])*/[scale=m].sc-calcite-modal-h{--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])*/[scale=l].sc-calcite-modal-h{--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*/.scrim.sc-calcite-modal{--calcite-scrim-background:rgba(0, 0, 0, 0.75);position:fixed;inset:0px;display:flex;overflow-y:hidden}/*!@.modal*/.modal.sc-calcite-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*/.modal--opening-idle.sc-calcite-modal{transform:var(--calcite-modal-hidden-position)}/*!@.modal--opening-active*/.modal--opening-active.sc-calcite-modal{transform:var(--calcite-modal-shown-position)}/*!@.modal--closing-idle*/.modal--closing-idle.sc-calcite-modal{transform:var(--calcite-modal-shown-position)}/*!@.modal--closing-active*/.modal--closing-active.sc-calcite-modal{transform:var(--calcite-modal-hidden-position)}/*!@:host([open])*/[open].sc-calcite-modal-h{opacity:1;visibility:visible !important;transition-delay:0ms}/*!@:host([open]) .modal--open*/[open].sc-calcite-modal-h .modal--open.sc-calcite-modal{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*/.header.sc-calcite-modal{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*/.close.sc-calcite-modal{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*/.close.sc-calcite-modal calcite-icon.sc-calcite-modal{pointer-events:none;vertical-align:-2px}/*!@.close:focus*/.close.sc-calcite-modal:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}/*!@.close:hover, .close:focus, .close:active*/.close.sc-calcite-modal:hover,.close.sc-calcite-modal:focus,.close.sc-calcite-modal:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}/*!@.title*/.title.sc-calcite-modal{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(*),\n*::slotted([slot=header])*/slot[name=header].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[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*/.content.sc-calcite-modal{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*/.content--spaced.sc-calcite-modal{padding:var(--calcite-modal-padding)}/*!@.content--no-footer*/.content--no-footer.sc-calcite-modal{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}/*!@slot[name=content]::slotted(*),\n*::slotted([slot=content])*/slot[name=content].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[slot=content]{font-size:var(--calcite-modal-content-text, var(--calcite-modal-context-text-internal))}/*!@:host([background-color=grey]) .content*/[background-color=grey].sc-calcite-modal-h .content.sc-calcite-modal{background-color:var(--calcite-ui-background)}/*!@.footer*/.footer.sc-calcite-modal{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,\n.footer--hide-secondary .secondary*/.footer--hide-back.sc-calcite-modal .back.sc-calcite-modal,.footer--hide-secondary.sc-calcite-modal .secondary.sc-calcite-modal{display:none}/*!@.back*/.back.sc-calcite-modal{display:block;margin-inline-end:auto}/*!@.secondary*/.secondary.sc-calcite-modal{margin-inline:0.25rem;display:block}/*!@slot[name=primary]*/slot[name=primary].sc-calcite-modal{display:block}/*!@:host([width=small]) .modal*/[width=small].sc-calcite-modal-h .modal.sc-calcite-modal{inline-size:auto}/*!@:host([width=s]) .modal*/[width=s].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:32rem}@media screen and (max-width: 35rem){/*!@:host([width=s]) .modal*/[width=s].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=s]) .content*/[width=s].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=s][docked])*/[width=s][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([width=m]) .modal*/[width=m].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:48rem}@media screen and (max-width: 51rem){/*!@:host([width=m]) .modal*/[width=m].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=m]) .content*/[width=m].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=m][docked])*/[width=m][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([width=l]) .modal*/[width=l].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:94rem}@media screen and (max-width: 97rem){/*!@:host([width=l]) .modal*/[width=l].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=l]) .content*/[width=l].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=l][docked])*/[width=l][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([fullscreen])*/[fullscreen].sc-calcite-modal-h{background-color:transparent}/*!@:host([fullscreen]) .modal*/[fullscreen].sc-calcite-modal-h .modal.sc-calcite-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*/[fullscreen].sc-calcite-modal-h .content.sc-calcite-modal{max-block-size:100%;flex:1 1 auto}/*!@:host([open][fullscreen]) .header*/[open][fullscreen].sc-calcite-modal-h .header.sc-calcite-modal{border-radius:0}/*!@:host([open][fullscreen]) .footer*/[open][fullscreen].sc-calcite-modal-h .footer.sc-calcite-modal{border-radius:0}/*!@:host([docked]) .modal*/[docked].sc-calcite-modal-h .modal.sc-calcite-modal{block-size:auto}/*!@:host([docked]) .content*/[docked].sc-calcite-modal-h .content.sc-calcite-modal{block-size:auto;flex:1 1 auto}@media screen and (max-width: 860px){/*!@:host([docked]) .modal*/[docked].sc-calcite-modal-h .modal.sc-calcite-modal{border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}/*!@:host([docked]) .close*/[docked].sc-calcite-modal-h .close.sc-calcite-modal{border-start-end-radius:var(--calcite-border-radius)}}/*!@:host([color=red]) .modal*/[color=red].sc-calcite-modal-h .modal.sc-calcite-modal{border-color:var(--calcite-ui-danger)}/*!@:host([color=blue]) .modal*/[color=blue].sc-calcite-modal-h .modal.sc-calcite-modal{border-color:var(--calcite-ui-info)}/*!@:host([color=red]) .modal,\n:host([color=blue]) .modal*/[color=red].sc-calcite-modal-h .modal.sc-calcite-modal,[color=blue].sc-calcite-modal-h .modal.sc-calcite-modal{border-width:0px;border-block-start-width:4px;border-style:solid}/*!@:host([color=red]) .header,\n:host([color=blue]) .header*/[color=red].sc-calcite-modal-h .header.sc-calcite-modal,[color=blue].sc-calcite-modal-h .header.sc-calcite-modal{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){/*!@slot[name=header]::slotted(*),\n*::slotted([slot=header])*/slot[name=header].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[slot=header]{font-size:var(--calcite-font-size-1)}/*!@.footer*/.footer.sc-calcite-modal{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){/*!@.footer*/.footer.sc-calcite-modal{flex-direction:column}/*!@.back,\n.secondary*/.back.sc-calcite-modal,.secondary.sc-calcite-modal{margin:0px;margin-block-end:0.25rem}}";
24091
+ /*!
24092
+ * tabbable 6.0.1
24093
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
24094
+ */
24095
+ 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'];
24096
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
24097
+ var NoElement = typeof Element === 'undefined';
24098
+ var matches$1 = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
24099
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
24100
+ return element.getRootNode();
24101
+ } : function (element) {
24102
+ return element.ownerDocument;
24103
+ };
24104
+
24105
+ /**
24106
+ * @param {Element} el container to check in
24107
+ * @param {boolean} includeContainer add container to check
24108
+ * @param {(node: Element) => boolean} filter filter candidates
24109
+ * @returns {Element[]}
24110
+ */
24111
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
24112
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
24113
+ if (includeContainer && matches$1.call(el, candidateSelector)) {
24114
+ candidates.unshift(el);
24115
+ }
24116
+ candidates = candidates.filter(filter);
24117
+ return candidates;
24118
+ };
24119
+
24120
+ /**
24121
+ * @callback GetShadowRoot
24122
+ * @param {Element} element to check for shadow root
24123
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
24124
+ */
24125
+
24126
+ /**
24127
+ * @callback ShadowRootFilter
24128
+ * @param {Element} shadowHostNode the element which contains shadow content
24129
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
24130
+ */
24131
+
24132
+ /**
24133
+ * @typedef {Object} CandidateScope
24134
+ * @property {Element} scopeParent contains inner candidates
24135
+ * @property {Element[]} candidates list of candidates found in the scope parent
24136
+ */
24137
+
24138
+ /**
24139
+ * @typedef {Object} IterativeOptions
24140
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
24141
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
24142
+ * or a boolean stating if it has an undisclosed shadow root
24143
+ * @property {(node: Element) => boolean} filter filter candidates
24144
+ * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
24145
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
24146
+ */
24147
+
24148
+ /**
24149
+ * @param {Element[]} elements list of element containers to match candidates from
24150
+ * @param {boolean} includeContainer add container list to check
24151
+ * @param {IterativeOptions} options
24152
+ * @returns {Array.<Element|CandidateScope>}
24153
+ */
24154
+ var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
24155
+ var candidates = [];
24156
+ var elementsToCheck = Array.from(elements);
24157
+ while (elementsToCheck.length) {
24158
+ var element = elementsToCheck.shift();
24159
+ if (element.tagName === 'SLOT') {
24160
+ // add shadow dom slot scope (slot itself cannot be focusable)
24161
+ var assigned = element.assignedElements();
24162
+ var content = assigned.length ? assigned : element.children;
24163
+ var nestedCandidates = getCandidatesIteratively(content, true, options);
24164
+ if (options.flatten) {
24165
+ candidates.push.apply(candidates, nestedCandidates);
24166
+ } else {
24167
+ candidates.push({
24168
+ scopeParent: element,
24169
+ candidates: nestedCandidates
24170
+ });
24171
+ }
24172
+ } else {
24173
+ // check candidate element
24174
+ var validCandidate = matches$1.call(element, candidateSelector);
24175
+ if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
24176
+ candidates.push(element);
24177
+ }
24178
+
24179
+ // iterate over shadow content if possible
24180
+ var shadowRoot = element.shadowRoot ||
24181
+ // check for an undisclosed shadow
24182
+ typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
24183
+ var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
24184
+ if (shadowRoot && validShadowRoot) {
24185
+ // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
24186
+ // shadow exists, so look at light dom children as fallback BUT create a scope for any
24187
+ // child candidates found because they're likely slotted elements (elements that are
24188
+ // children of the web component element (which has the shadow), in the light dom, but
24189
+ // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
24190
+ // _after_ we return from this recursive call
24191
+ var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
24192
+ if (options.flatten) {
24193
+ candidates.push.apply(candidates, _nestedCandidates);
24194
+ } else {
24195
+ candidates.push({
24196
+ scopeParent: element,
24197
+ candidates: _nestedCandidates
24198
+ });
24199
+ }
24200
+ } else {
24201
+ // there's not shadow so just dig into the element's (light dom) children
24202
+ // __without__ giving the element special scope treatment
24203
+ elementsToCheck.unshift.apply(elementsToCheck, element.children);
24204
+ }
24205
+ }
24206
+ }
24207
+ return candidates;
24208
+ };
24209
+ var getTabindex = function getTabindex(node, isScope) {
24210
+ if (node.tabIndex < 0) {
24211
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
24212
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
24213
+ // yet they are still part of the regular tab order; in FF, they get a default
24214
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
24215
+ // order, consider their tab index to be 0.
24216
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
24217
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
24218
+ //
24219
+ // isScope is positive for custom element with shadow root or slot that by default
24220
+ // have tabIndex -1, but need to be sorted by document order in order for their
24221
+ // content to be inserted in the correct position
24222
+ if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
24223
+ return 0;
24224
+ }
24225
+ }
24226
+ return node.tabIndex;
24227
+ };
24228
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
24229
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
24230
+ };
24231
+ var isInput = function isInput(node) {
24232
+ return node.tagName === 'INPUT';
24233
+ };
24234
+ var isHiddenInput = function isHiddenInput(node) {
24235
+ return isInput(node) && node.type === 'hidden';
24236
+ };
24237
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
24238
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
24239
+ return child.tagName === 'SUMMARY';
24240
+ });
24241
+ return r;
24242
+ };
24243
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
24244
+ for (var i = 0; i < nodes.length; i++) {
24245
+ if (nodes[i].checked && nodes[i].form === form) {
24246
+ return nodes[i];
24247
+ }
24248
+ }
24249
+ };
24250
+ var isTabbableRadio = function isTabbableRadio(node) {
24251
+ if (!node.name) {
24252
+ return true;
24253
+ }
24254
+ var radioScope = node.form || getRootNode(node);
24255
+ var queryRadios = function queryRadios(name) {
24256
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
24257
+ };
24258
+ var radioSet;
24259
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
24260
+ radioSet = queryRadios(window.CSS.escape(node.name));
24261
+ } else {
24262
+ try {
24263
+ radioSet = queryRadios(node.name);
24264
+ } catch (err) {
24265
+ // eslint-disable-next-line no-console
24266
+ 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);
24267
+ return false;
24268
+ }
24269
+ }
24270
+ var checked = getCheckedRadio(radioSet, node.form);
24271
+ return !checked || checked === node;
24272
+ };
24273
+ var isRadio = function isRadio(node) {
24274
+ return isInput(node) && node.type === 'radio';
24275
+ };
24276
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
24277
+ return isRadio(node) && !isTabbableRadio(node);
24278
+ };
24279
+
24280
+ // determines if a node is ultimately attached to the window's document
24281
+ var isNodeAttached = function isNodeAttached(node) {
24282
+ var _nodeRootHost;
24283
+ // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
24284
+ // (but NOT _the_ document; see second 'If' comment below for more).
24285
+ // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
24286
+ // is attached, and the one we need to check if it's in the document or not (because the
24287
+ // shadow, and all nodes it contains, is never considered in the document since shadows
24288
+ // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
24289
+ // is hidden, or is not in the document itself but is detached, it will affect the shadow's
24290
+ // visibility, including all the nodes it contains). The host could be any normal node,
24291
+ // or a custom element (i.e. web component). Either way, that's the one that is considered
24292
+ // part of the document, not the shadow root, nor any of its children (i.e. the node being
24293
+ // tested).
24294
+ // To further complicate things, we have to look all the way up until we find a shadow HOST
24295
+ // that is attached (or find none) because the node might be in nested shadows...
24296
+ // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
24297
+ // document (per the docs) and while it's a Document-type object, that document does not
24298
+ // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
24299
+ // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
24300
+ // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
24301
+ // node is actually detached.
24302
+ var nodeRootHost = getRootNode(node).host;
24303
+ var attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && _nodeRootHost.ownerDocument.contains(nodeRootHost) || node.ownerDocument.contains(node));
24304
+ while (!attached && nodeRootHost) {
24305
+ var _nodeRootHost2;
24306
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
24307
+ // which means we need to get the host's host and check if that parent host is contained
24308
+ // in (i.e. attached to) the document
24309
+ nodeRootHost = getRootNode(nodeRootHost).host;
24310
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && _nodeRootHost2.ownerDocument.contains(nodeRootHost));
24311
+ }
24312
+ return attached;
24313
+ };
24314
+ var isZeroArea = function isZeroArea(node) {
24315
+ var _node$getBoundingClie = node.getBoundingClientRect(),
24316
+ width = _node$getBoundingClie.width,
24317
+ height = _node$getBoundingClie.height;
24318
+ return width === 0 && height === 0;
24319
+ };
24320
+ var isHidden = function isHidden(node, _ref) {
24321
+ var displayCheck = _ref.displayCheck,
24322
+ getShadowRoot = _ref.getShadowRoot;
24323
+ // NOTE: visibility will be `undefined` if node is detached from the document
24324
+ // (see notes about this further down), which means we will consider it visible
24325
+ // (this is legacy behavior from a very long way back)
24326
+ // NOTE: we check this regardless of `displayCheck="none"` because this is a
24327
+ // _visibility_ check, not a _display_ check
24328
+ if (getComputedStyle(node).visibility === 'hidden') {
24329
+ return true;
24330
+ }
24331
+ var isDirectSummary = matches$1.call(node, 'details>summary:first-of-type');
24332
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
24333
+ if (matches$1.call(nodeUnderDetails, 'details:not([open]) *')) {
24334
+ return true;
24335
+ }
24336
+ if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
24337
+ if (typeof getShadowRoot === 'function') {
24338
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
24339
+ // 'non-zero-area' fallback
24340
+ var originalNode = node;
24341
+ while (node) {
24342
+ var parentElement = node.parentElement;
24343
+ var rootNode = getRootNode(node);
24344
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
24345
+ ) {
24346
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
24347
+ // fall back to a non-zero-area test
24348
+ return isZeroArea(node);
24349
+ } else if (node.assignedSlot) {
24350
+ // iterate up slot
24351
+ node = node.assignedSlot;
24352
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
24353
+ // cross shadow boundary
24354
+ node = rootNode.host;
24355
+ } else {
24356
+ // iterate up normal dom
24357
+ node = parentElement;
24358
+ }
24359
+ }
24360
+ node = originalNode;
24361
+ }
24362
+ // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
24363
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
24364
+ // it might be a falsy value, which means shadow DOM support is disabled
24365
+
24366
+ // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
24367
+ // now we can just test to see if it would normally be visible or not, provided it's
24368
+ // attached to the main document.
24369
+ // NOTE: We must consider case where node is inside a shadow DOM and given directly to
24370
+ // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
24371
+
24372
+ if (isNodeAttached(node)) {
24373
+ // this works wherever the node is: if there's at least one client rect, it's
24374
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
24375
+ // node itself is hidden in place of its contents; and there's no need to search
24376
+ // up the hierarchy either
24377
+ return !node.getClientRects().length;
24378
+ }
24379
+
24380
+ // Else, the node isn't attached to the document, which means the `getClientRects()`
24381
+ // API will __always__ return zero rects (this can happen, for example, if React
24382
+ // is used to render nodes onto a detached tree, as confirmed in this thread:
24383
+ // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
24384
+ //
24385
+ // It also means that even window.getComputedStyle(node).display will return `undefined`
24386
+ // because styles are only computed for nodes that are in the document.
24387
+ //
24388
+ // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
24389
+ // somehow. Though it was never stated officially, anyone who has ever used tabbable
24390
+ // APIs on nodes in detached containers has actually implicitly used tabbable in what
24391
+ // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
24392
+ // considering __everything__ to be visible because of the innability to determine styles.
24393
+ //
24394
+ // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
24395
+ // nodes as visible with the 'none' fallback.__
24396
+ if (displayCheck !== 'legacy-full') {
24397
+ return true; // hidden
24398
+ }
24399
+ // else, fallback to 'none' mode and consider the node visible
24400
+ } else if (displayCheck === 'non-zero-area') {
24401
+ // NOTE: Even though this tests that the node's client rect is non-zero to determine
24402
+ // whether it's displayed, and that a detached node will __always__ have a zero-area
24403
+ // client rect, we don't special-case for whether the node is attached or not. In
24404
+ // this mode, we do want to consider nodes that have a zero area to be hidden at all
24405
+ // times, and that includes attached or not.
24406
+ return isZeroArea(node);
24407
+ }
24408
+
24409
+ // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
24410
+ // it's visible
24411
+ return false;
24412
+ };
24413
+
24414
+ // form fields (nested) inside a disabled fieldset are not focusable/tabbable
24415
+ // unless they are in the _first_ <legend> element of the top-most disabled
24416
+ // fieldset
24417
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
24418
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
24419
+ var parentNode = node.parentElement;
24420
+ // check if `node` is contained in a disabled <fieldset>
24421
+ while (parentNode) {
24422
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
24423
+ // look for the first <legend> among the children of the disabled <fieldset>
24424
+ for (var i = 0; i < parentNode.children.length; i++) {
24425
+ var child = parentNode.children.item(i);
24426
+ // when the first <legend> (in document order) is found
24427
+ if (child.tagName === 'LEGEND') {
24428
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
24429
+ // return whether `node` is a descendant of its first <legend>
24430
+ return matches$1.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
24431
+ }
24432
+ }
24433
+ // the disabled <fieldset> containing `node` has no <legend>
24434
+ return true;
24435
+ }
24436
+ parentNode = parentNode.parentElement;
24437
+ }
24438
+ }
24439
+
24440
+ // else, node's tabbable/focusable state should not be affected by a fieldset's
24441
+ // enabled/disabled state
24442
+ return false;
24443
+ };
24444
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
24445
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
24446
+ // For a details element with a summary, the summary element gets the focus
24447
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
24448
+ return false;
24449
+ }
24450
+ return true;
24451
+ };
24452
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
24453
+ if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
24454
+ return false;
24455
+ }
24456
+ return true;
24457
+ };
24458
+ var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
24459
+ var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
24460
+ if (isNaN(tabIndex) || tabIndex >= 0) {
24461
+ return true;
24462
+ }
24463
+ // If a custom element has an explicit negative tabindex,
24464
+ // browsers will not allow tab targeting said element's children.
24465
+ return false;
24466
+ };
24467
+
24468
+ /**
24469
+ * @param {Array.<Element|CandidateScope>} candidates
24470
+ * @returns Element[]
24471
+ */
24472
+ var sortByOrder = function sortByOrder(candidates) {
24473
+ var regularTabbables = [];
24474
+ var orderedTabbables = [];
24475
+ candidates.forEach(function (item, i) {
24476
+ var isScope = !!item.scopeParent;
24477
+ var element = isScope ? item.scopeParent : item;
24478
+ var candidateTabindex = getTabindex(element, isScope);
24479
+ var elements = isScope ? sortByOrder(item.candidates) : element;
24480
+ if (candidateTabindex === 0) {
24481
+ isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
24482
+ } else {
24483
+ orderedTabbables.push({
24484
+ documentOrder: i,
24485
+ tabIndex: candidateTabindex,
24486
+ item: item,
24487
+ isScope: isScope,
24488
+ content: elements
24489
+ });
24490
+ }
24491
+ });
24492
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
24493
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
24494
+ return acc;
24495
+ }, []).concat(regularTabbables);
24496
+ };
24497
+ var tabbable = function tabbable(el, options) {
24498
+ options = options || {};
24499
+ var candidates;
24500
+ if (options.getShadowRoot) {
24501
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
24502
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
24503
+ flatten: false,
24504
+ getShadowRoot: options.getShadowRoot,
24505
+ shadowRootFilter: isValidShadowRootTabbable
24506
+ });
24507
+ } else {
24508
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
24509
+ }
24510
+ return sortByOrder(candidates);
24511
+ };
24512
+ var focusable = function focusable(el, options) {
24513
+ options = options || {};
24514
+ var candidates;
24515
+ if (options.getShadowRoot) {
24516
+ candidates = getCandidatesIteratively([el], options.includeContainer, {
24517
+ filter: isNodeMatchingSelectorFocusable.bind(null, options),
24518
+ flatten: true,
24519
+ getShadowRoot: options.getShadowRoot
24520
+ });
24521
+ } else {
24522
+ candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
24523
+ }
24524
+ return candidates;
24525
+ };
24526
+ var isTabbable = function isTabbable(node, options) {
24527
+ options = options || {};
24528
+ if (!node) {
24529
+ throw new Error('No node provided');
24530
+ }
24531
+ if (matches$1.call(node, candidateSelector) === false) {
24532
+ return false;
24533
+ }
24534
+ return isNodeMatchingSelectorTabbable(options, node);
24535
+ };
24536
+ var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
24537
+ var isFocusable = function isFocusable(node, options) {
24538
+ options = options || {};
24539
+ if (!node) {
24540
+ throw new Error('No node provided');
24541
+ }
24542
+ if (matches$1.call(node, focusableCandidateSelector) === false) {
24543
+ return false;
24544
+ }
24545
+ return isNodeMatchingSelectorFocusable(options, node);
24546
+ };
24547
+
24548
+ /*!
24549
+ * focus-trap 7.0.0
24550
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
24551
+ */
24552
+
24553
+ function ownKeys$1(object, enumerableOnly) {
24554
+ var keys = Object.keys(object);
24555
+
24556
+ if (Object.getOwnPropertySymbols) {
24557
+ var symbols = Object.getOwnPropertySymbols(object);
24558
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
24559
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
24560
+ })), keys.push.apply(keys, symbols);
24561
+ }
24562
+
24563
+ return keys;
24564
+ }
24565
+
24566
+ function _objectSpread2$1(target) {
24567
+ for (var i = 1; i < arguments.length; i++) {
24568
+ var source = null != arguments[i] ? arguments[i] : {};
24569
+ i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
24570
+ _defineProperty$1(target, key, source[key]);
24571
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
24572
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
24573
+ });
24574
+ }
24575
+
24576
+ return target;
24577
+ }
24578
+
24579
+ function _defineProperty$1(obj, key, value) {
24580
+ if (key in obj) {
24581
+ Object.defineProperty(obj, key, {
24582
+ value: value,
24583
+ enumerable: true,
24584
+ configurable: true,
24585
+ writable: true
24586
+ });
24587
+ } else {
24588
+ obj[key] = value;
24589
+ }
24590
+
24591
+ return obj;
24592
+ }
24593
+
24594
+ var activeFocusTraps = function () {
24595
+ var trapQueue = [];
24596
+ return {
24597
+ activateTrap: function activateTrap(trap) {
24598
+ if (trapQueue.length > 0) {
24599
+ var activeTrap = trapQueue[trapQueue.length - 1];
24600
+
24601
+ if (activeTrap !== trap) {
24602
+ activeTrap.pause();
24603
+ }
24604
+ }
24605
+
24606
+ var trapIndex = trapQueue.indexOf(trap);
24607
+
24608
+ if (trapIndex === -1) {
24609
+ trapQueue.push(trap);
24610
+ } else {
24611
+ // move this existing trap to the front of the queue
24612
+ trapQueue.splice(trapIndex, 1);
24613
+ trapQueue.push(trap);
24614
+ }
24615
+ },
24616
+ deactivateTrap: function deactivateTrap(trap) {
24617
+ var trapIndex = trapQueue.indexOf(trap);
24618
+
24619
+ if (trapIndex !== -1) {
24620
+ trapQueue.splice(trapIndex, 1);
24621
+ }
24622
+
24623
+ if (trapQueue.length > 0) {
24624
+ trapQueue[trapQueue.length - 1].unpause();
24625
+ }
24626
+ }
24627
+ };
24628
+ }();
24629
+
24630
+ var isSelectableInput = function isSelectableInput(node) {
24631
+ return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
24632
+ };
24201
24633
 
24202
- const isFocusableExtended = (el) => {
24203
- return isCalciteFocusable(el) || isFocusable(el);
24634
+ var isEscapeEvent = function isEscapeEvent(e) {
24635
+ return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
24204
24636
  };
24205
- const getFocusableElements = (el) => {
24206
- return queryShadowRoot(el, isHidden, isFocusableExtended);
24637
+
24638
+ var isTabEvent = function isTabEvent(e) {
24639
+ return e.key === 'Tab' || e.keyCode === 9;
24640
+ };
24641
+
24642
+ var delay = function delay(fn) {
24643
+ return setTimeout(fn, 0);
24644
+ }; // Array.find/findIndex() are not supported on IE; this replicates enough
24645
+ // of Array.findIndex() for our needs
24646
+
24647
+
24648
+ var findIndex = function findIndex(arr, fn) {
24649
+ var idx = -1;
24650
+ arr.every(function (value, i) {
24651
+ if (fn(value)) {
24652
+ idx = i;
24653
+ return false; // break
24654
+ }
24655
+
24656
+ return true; // next
24657
+ });
24658
+ return idx;
24207
24659
  };
24660
+ /**
24661
+ * Get an option's value when it could be a plain value, or a handler that provides
24662
+ * the value.
24663
+ * @param {*} value Option's value to check.
24664
+ * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
24665
+ * @returns {*} The `value`, or the handler's returned value.
24666
+ */
24667
+
24668
+
24669
+ var valueOrHandler = function valueOrHandler(value) {
24670
+ for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
24671
+ params[_key - 1] = arguments[_key];
24672
+ }
24673
+
24674
+ return typeof value === 'function' ? value.apply(void 0, params) : value;
24675
+ };
24676
+
24677
+ var getActualTarget = function getActualTarget(event) {
24678
+ // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
24679
+ // shadow host. However, event.target.composedPath() will be an array of
24680
+ // nodes "clicked" from inner-most (the actual element inside the shadow) to
24681
+ // outer-most (the host HTML document). If we have access to composedPath(),
24682
+ // then use its first element; otherwise, fall back to event.target (and
24683
+ // this only works for an _open_ shadow DOM; otherwise,
24684
+ // composedPath()[0] === event.target always).
24685
+ return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
24686
+ };
24687
+
24688
+ var createFocusTrap = function createFocusTrap(elements, userOptions) {
24689
+ // SSR: a live trap shouldn't be created in this type of environment so this
24690
+ // should be safe code to execute if the `document` option isn't specified
24691
+ var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
24692
+
24693
+ var config = _objectSpread2$1({
24694
+ returnFocusOnDeactivate: true,
24695
+ escapeDeactivates: true,
24696
+ delayInitialFocus: true
24697
+ }, userOptions);
24698
+
24699
+ var state = {
24700
+ // containers given to createFocusTrap()
24701
+ // @type {Array<HTMLElement>}
24702
+ containers: [],
24703
+ // list of objects identifying tabbable nodes in `containers` in the trap
24704
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
24705
+ // is active, but the trap should never get to a state where there isn't at least one group
24706
+ // with at least one tabbable node in it (that would lead to an error condition that would
24707
+ // result in an error being thrown)
24708
+ // @type {Array<{
24709
+ // container: HTMLElement,
24710
+ // tabbableNodes: Array<HTMLElement>, // empty if none
24711
+ // focusableNodes: Array<HTMLElement>, // empty if none
24712
+ // firstTabbableNode: HTMLElement|null,
24713
+ // lastTabbableNode: HTMLElement|null,
24714
+ // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
24715
+ // }>}
24716
+ containerGroups: [],
24717
+ // same order/length as `containers` list
24718
+ // references to objects in `containerGroups`, but only those that actually have
24719
+ // tabbable nodes in them
24720
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
24721
+ // the same length
24722
+ tabbableGroups: [],
24723
+ nodeFocusedBeforeActivation: null,
24724
+ mostRecentlyFocusedNode: null,
24725
+ active: false,
24726
+ paused: false,
24727
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
24728
+ // has been delayed during activation
24729
+ delayInitialFocusTimer: undefined
24730
+ };
24731
+ 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
24732
+
24733
+ /**
24734
+ * Gets a configuration option value.
24735
+ * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
24736
+ * value will be taken from this object. Otherwise, value will be taken from base configuration.
24737
+ * @param {string} optionName Name of the option whose value is sought.
24738
+ * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
24739
+ * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
24740
+ */
24741
+
24742
+ var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
24743
+ return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
24744
+ };
24745
+ /**
24746
+ * Finds the index of the container that contains the element.
24747
+ * @param {HTMLElement} element
24748
+ * @returns {number} Index of the container in either `state.containers` or
24749
+ * `state.containerGroups` (the order/length of these lists are the same); -1
24750
+ * if the element isn't found.
24751
+ */
24752
+
24753
+
24754
+ var findContainerIndex = function findContainerIndex(element) {
24755
+ // NOTE: search `containerGroups` because it's possible a group contains no tabbable
24756
+ // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
24757
+ // and we still need to find the element in there
24758
+ return state.containerGroups.findIndex(function (_ref) {
24759
+ var container = _ref.container,
24760
+ tabbableNodes = _ref.tabbableNodes;
24761
+ return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
24762
+ // web components if the `tabbableOptions.getShadowRoot` option was used for
24763
+ // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
24764
+ // look inside web components even if open)
24765
+ tabbableNodes.find(function (node) {
24766
+ return node === element;
24767
+ });
24768
+ });
24769
+ };
24770
+ /**
24771
+ * Gets the node for the given option, which is expected to be an option that
24772
+ * can be either a DOM node, a string that is a selector to get a node, `false`
24773
+ * (if a node is explicitly NOT given), or a function that returns any of these
24774
+ * values.
24775
+ * @param {string} optionName
24776
+ * @returns {undefined | false | HTMLElement | SVGElement} Returns
24777
+ * `undefined` if the option is not specified; `false` if the option
24778
+ * resolved to `false` (node explicitly not given); otherwise, the resolved
24779
+ * DOM node.
24780
+ * @throws {Error} If the option is set, not `false`, and is not, or does not
24781
+ * resolve to a node.
24782
+ */
24783
+
24784
+
24785
+ var getNodeForOption = function getNodeForOption(optionName) {
24786
+ var optionValue = config[optionName];
24787
+
24788
+ if (typeof optionValue === 'function') {
24789
+ for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
24790
+ params[_key2 - 1] = arguments[_key2];
24791
+ }
24792
+
24793
+ optionValue = optionValue.apply(void 0, params);
24794
+ }
24795
+
24796
+ if (optionValue === true) {
24797
+ optionValue = undefined; // use default value
24798
+ }
24799
+
24800
+ if (!optionValue) {
24801
+ if (optionValue === undefined || optionValue === false) {
24802
+ return optionValue;
24803
+ } // else, empty string (invalid), null (invalid), 0 (invalid)
24804
+
24805
+
24806
+ throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
24807
+ }
24808
+
24809
+ var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
24810
+
24811
+ if (typeof optionValue === 'string') {
24812
+ node = doc.querySelector(optionValue); // resolve to node, or null if fails
24813
+
24814
+ if (!node) {
24815
+ throw new Error("`".concat(optionName, "` as selector refers to no known node"));
24816
+ }
24817
+ }
24818
+
24819
+ return node;
24820
+ };
24821
+
24822
+ var getInitialFocusNode = function getInitialFocusNode() {
24823
+ var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
24824
+
24825
+ if (node === false) {
24826
+ return false;
24827
+ }
24828
+
24829
+ if (node === undefined) {
24830
+ // option not specified: use fallback options
24831
+ if (findContainerIndex(doc.activeElement) >= 0) {
24832
+ node = doc.activeElement;
24833
+ } else {
24834
+ var firstTabbableGroup = state.tabbableGroups[0];
24835
+ var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
24836
+
24837
+ node = firstTabbableNode || getNodeForOption('fallbackFocus');
24838
+ }
24839
+ }
24840
+
24841
+ if (!node) {
24842
+ throw new Error('Your focus-trap needs to have at least one focusable element');
24843
+ }
24844
+
24845
+ return node;
24846
+ };
24847
+
24848
+ var updateTabbableNodes = function updateTabbableNodes() {
24849
+ state.containerGroups = state.containers.map(function (container) {
24850
+ var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
24851
+ // are a superset of tabbable nodes
24852
+
24853
+ var focusableNodes = focusable(container, config.tabbableOptions);
24854
+ return {
24855
+ container: container,
24856
+ tabbableNodes: tabbableNodes,
24857
+ focusableNodes: focusableNodes,
24858
+ firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
24859
+ lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
24860
+
24861
+ /**
24862
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
24863
+ * in this container, if any.
24864
+ * @param {HTMLElement} node
24865
+ * @param {boolean} [forward] True if going in forward tab order; false if going
24866
+ * in reverse.
24867
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
24868
+ */
24869
+ nextTabbableNode: function nextTabbableNode(node) {
24870
+ var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
24871
+ // NOTE: If tabindex is positive (in order to manipulate the tab order separate
24872
+ // from the DOM order), this __will not work__ because the list of focusableNodes,
24873
+ // while it contains tabbable nodes, does not sort its nodes in any order other
24874
+ // than DOM order, because it can't: Where would you place focusable (but not
24875
+ // tabbable) nodes in that order? They have no order, because they aren't tabbale...
24876
+ // Support for positive tabindex is already broken and hard to manage (possibly
24877
+ // not supportable, TBD), so this isn't going to make things worse than they
24878
+ // already are, and at least makes things better for the majority of cases where
24879
+ // tabindex is either 0/unset or negative.
24880
+ // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
24881
+ var nodeIdx = focusableNodes.findIndex(function (n) {
24882
+ return n === node;
24883
+ });
24884
+
24885
+ if (nodeIdx < 0) {
24886
+ return undefined;
24887
+ }
24888
+
24889
+ if (forward) {
24890
+ return focusableNodes.slice(nodeIdx + 1).find(function (n) {
24891
+ return isTabbable(n, config.tabbableOptions);
24892
+ });
24893
+ }
24894
+
24895
+ return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
24896
+ return isTabbable(n, config.tabbableOptions);
24897
+ });
24898
+ }
24899
+ };
24900
+ });
24901
+ state.tabbableGroups = state.containerGroups.filter(function (group) {
24902
+ return group.tabbableNodes.length > 0;
24903
+ }); // throw if no groups have tabbable nodes and we don't have a fallback focus node either
24904
+
24905
+ if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
24906
+ ) {
24907
+ throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
24908
+ }
24909
+ };
24910
+
24911
+ var tryFocus = function tryFocus(node) {
24912
+ if (node === false) {
24913
+ return;
24914
+ }
24915
+
24916
+ if (node === doc.activeElement) {
24917
+ return;
24918
+ }
24919
+
24920
+ if (!node || !node.focus) {
24921
+ tryFocus(getInitialFocusNode());
24922
+ return;
24923
+ }
24924
+
24925
+ node.focus({
24926
+ preventScroll: !!config.preventScroll
24927
+ });
24928
+ state.mostRecentlyFocusedNode = node;
24929
+
24930
+ if (isSelectableInput(node)) {
24931
+ node.select();
24932
+ }
24933
+ };
24934
+
24935
+ var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
24936
+ var node = getNodeForOption('setReturnFocus', previousActiveElement);
24937
+ return node ? node : node === false ? false : previousActiveElement;
24938
+ }; // This needs to be done on mousedown and touchstart instead of click
24939
+ // so that it precedes the focus event.
24940
+
24941
+
24942
+ var checkPointerDown = function checkPointerDown(e) {
24943
+ var target = getActualTarget(e);
24944
+
24945
+ if (findContainerIndex(target) >= 0) {
24946
+ // allow the click since it ocurred inside the trap
24947
+ return;
24948
+ }
24949
+
24950
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
24951
+ // immediately deactivate the trap
24952
+ trap.deactivate({
24953
+ // if, on deactivation, we should return focus to the node originally-focused
24954
+ // when the trap was activated (or the configured `setReturnFocus` node),
24955
+ // then assume it's also OK to return focus to the outside node that was
24956
+ // just clicked, causing deactivation, as long as that node is focusable;
24957
+ // if it isn't focusable, then return focus to the original node focused
24958
+ // on activation (or the configured `setReturnFocus` node)
24959
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
24960
+ // which will result in the outside click setting focus to the node
24961
+ // that was clicked, whether it's focusable or not; by setting
24962
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
24963
+ // on activation (or the configured `setReturnFocus` node)
24964
+ returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
24965
+ });
24966
+ return;
24967
+ } // This is needed for mobile devices.
24968
+ // (If we'll only let `click` events through,
24969
+ // then on mobile they will be blocked anyways if `touchstart` is blocked.)
24970
+
24971
+
24972
+ if (valueOrHandler(config.allowOutsideClick, e)) {
24973
+ // allow the click outside the trap to take place
24974
+ return;
24975
+ } // otherwise, prevent the click
24976
+
24977
+
24978
+ e.preventDefault();
24979
+ }; // In case focus escapes the trap for some strange reason, pull it back in.
24980
+
24981
+
24982
+ var checkFocusIn = function checkFocusIn(e) {
24983
+ var target = getActualTarget(e);
24984
+ var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.
24985
+
24986
+ if (targetContained || target instanceof Document) {
24987
+ if (targetContained) {
24988
+ state.mostRecentlyFocusedNode = target;
24989
+ }
24990
+ } else {
24991
+ // escaped! pull it back in to where it just left
24992
+ e.stopImmediatePropagation();
24993
+ tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
24994
+ }
24995
+ }; // Hijack Tab events on the first and last focusable nodes of the trap,
24996
+ // in order to prevent focus from escaping. If it escapes for even a
24997
+ // moment it can end up scrolling the page and causing confusion so we
24998
+ // kind of need to capture the action at the keydown phase.
24999
+
25000
+
25001
+ var checkTab = function checkTab(e) {
25002
+ var target = getActualTarget(e);
25003
+ updateTabbableNodes();
25004
+ var destinationNode = null;
25005
+
25006
+ if (state.tabbableGroups.length > 0) {
25007
+ // make sure the target is actually contained in a group
25008
+ // NOTE: the target may also be the container itself if it's focusable
25009
+ // with tabIndex='-1' and was given initial focus
25010
+ var containerIndex = findContainerIndex(target);
25011
+ var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
25012
+
25013
+ if (containerIndex < 0) {
25014
+ // target not found in any group: quite possible focus has escaped the trap,
25015
+ // so bring it back in to...
25016
+ if (e.shiftKey) {
25017
+ // ...the last node in the last group
25018
+ destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
25019
+ } else {
25020
+ // ...the first node in the first group
25021
+ destinationNode = state.tabbableGroups[0].firstTabbableNode;
25022
+ }
25023
+ } else if (e.shiftKey) {
25024
+ // REVERSE
25025
+ // is the target the first tabbable node in a group?
25026
+ var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
25027
+ var firstTabbableNode = _ref2.firstTabbableNode;
25028
+ return target === firstTabbableNode;
25029
+ });
25030
+
25031
+ if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
25032
+ // an exception case where the target is either the container itself, or
25033
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
25034
+ // and user clicked on it or node was programmatically given focus)
25035
+ // and is not followed by any other tabbable node, in which
25036
+ // case, we should handle shift+tab as if focus were on the container's
25037
+ // first tabbable node, and go to the last tabbable node of the LAST group
25038
+ startOfGroupIndex = containerIndex;
25039
+ }
25040
+
25041
+ if (startOfGroupIndex >= 0) {
25042
+ // YES: then shift+tab should go to the last tabbable node in the
25043
+ // previous group (and wrap around to the last tabbable node of
25044
+ // the LAST group if it's the first tabbable node of the FIRST group)
25045
+ var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
25046
+ var destinationGroup = state.tabbableGroups[destinationGroupIndex];
25047
+ destinationNode = destinationGroup.lastTabbableNode;
25048
+ }
25049
+ } else {
25050
+ // FORWARD
25051
+ // is the target the last tabbable node in a group?
25052
+ var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
25053
+ var lastTabbableNode = _ref3.lastTabbableNode;
25054
+ return target === lastTabbableNode;
25055
+ });
25056
+
25057
+ if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
25058
+ // an exception case where the target is the container itself, or
25059
+ // a non-tabbable node that was given focus (i.e. tabindex is negative
25060
+ // and user clicked on it or node was programmatically given focus)
25061
+ // and is not followed by any other tabbable node, in which
25062
+ // case, we should handle tab as if focus were on the container's
25063
+ // last tabbable node, and go to the first tabbable node of the FIRST group
25064
+ lastOfGroupIndex = containerIndex;
25065
+ }
25066
+
25067
+ if (lastOfGroupIndex >= 0) {
25068
+ // YES: then tab should go to the first tabbable node in the next
25069
+ // group (and wrap around to the first tabbable node of the FIRST
25070
+ // group if it's the last tabbable node of the LAST group)
25071
+ var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
25072
+
25073
+ var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
25074
+ destinationNode = _destinationGroup.firstTabbableNode;
25075
+ }
25076
+ }
25077
+ } else {
25078
+ // NOTE: the fallbackFocus option does not support returning false to opt-out
25079
+ destinationNode = getNodeForOption('fallbackFocus');
25080
+ }
25081
+
25082
+ if (destinationNode) {
25083
+ e.preventDefault();
25084
+ tryFocus(destinationNode);
25085
+ } // else, let the browser take care of [shift+]tab and move the focus
25086
+
25087
+ };
25088
+
25089
+ var checkKey = function checkKey(e) {
25090
+ if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
25091
+ e.preventDefault();
25092
+ trap.deactivate();
25093
+ return;
25094
+ }
25095
+
25096
+ if (isTabEvent(e)) {
25097
+ checkTab(e);
25098
+ return;
25099
+ }
25100
+ };
25101
+
25102
+ var checkClick = function checkClick(e) {
25103
+ var target = getActualTarget(e);
25104
+
25105
+ if (findContainerIndex(target) >= 0) {
25106
+ return;
25107
+ }
25108
+
25109
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
25110
+ return;
25111
+ }
25112
+
25113
+ if (valueOrHandler(config.allowOutsideClick, e)) {
25114
+ return;
25115
+ }
25116
+
25117
+ e.preventDefault();
25118
+ e.stopImmediatePropagation();
25119
+ }; //
25120
+ // EVENT LISTENERS
25121
+ //
25122
+
25123
+
25124
+ var addListeners = function addListeners() {
25125
+ if (!state.active) {
25126
+ return;
25127
+ } // There can be only one listening focus trap at a time
25128
+
25129
+
25130
+ activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
25131
+ // that caused the focus trap activation.
25132
+
25133
+ state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
25134
+ tryFocus(getInitialFocusNode());
25135
+ }) : tryFocus(getInitialFocusNode());
25136
+ doc.addEventListener('focusin', checkFocusIn, true);
25137
+ doc.addEventListener('mousedown', checkPointerDown, {
25138
+ capture: true,
25139
+ passive: false
25140
+ });
25141
+ doc.addEventListener('touchstart', checkPointerDown, {
25142
+ capture: true,
25143
+ passive: false
25144
+ });
25145
+ doc.addEventListener('click', checkClick, {
25146
+ capture: true,
25147
+ passive: false
25148
+ });
25149
+ doc.addEventListener('keydown', checkKey, {
25150
+ capture: true,
25151
+ passive: false
25152
+ });
25153
+ return trap;
25154
+ };
25155
+
25156
+ var removeListeners = function removeListeners() {
25157
+ if (!state.active) {
25158
+ return;
25159
+ }
25160
+
25161
+ doc.removeEventListener('focusin', checkFocusIn, true);
25162
+ doc.removeEventListener('mousedown', checkPointerDown, true);
25163
+ doc.removeEventListener('touchstart', checkPointerDown, true);
25164
+ doc.removeEventListener('click', checkClick, true);
25165
+ doc.removeEventListener('keydown', checkKey, true);
25166
+ return trap;
25167
+ }; //
25168
+ // TRAP DEFINITION
25169
+ //
25170
+
25171
+
25172
+ trap = {
25173
+ get active() {
25174
+ return state.active;
25175
+ },
25176
+
25177
+ get paused() {
25178
+ return state.paused;
25179
+ },
25180
+
25181
+ activate: function activate(activateOptions) {
25182
+ if (state.active) {
25183
+ return this;
25184
+ }
25185
+
25186
+ var onActivate = getOption(activateOptions, 'onActivate');
25187
+ var onPostActivate = getOption(activateOptions, 'onPostActivate');
25188
+ var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
25189
+
25190
+ if (!checkCanFocusTrap) {
25191
+ updateTabbableNodes();
25192
+ }
25193
+
25194
+ state.active = true;
25195
+ state.paused = false;
25196
+ state.nodeFocusedBeforeActivation = doc.activeElement;
25197
+
25198
+ if (onActivate) {
25199
+ onActivate();
25200
+ }
25201
+
25202
+ var finishActivation = function finishActivation() {
25203
+ if (checkCanFocusTrap) {
25204
+ updateTabbableNodes();
25205
+ }
25206
+
25207
+ addListeners();
25208
+
25209
+ if (onPostActivate) {
25210
+ onPostActivate();
25211
+ }
25212
+ };
25213
+
25214
+ if (checkCanFocusTrap) {
25215
+ checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
25216
+ return this;
25217
+ }
25218
+
25219
+ finishActivation();
25220
+ return this;
25221
+ },
25222
+ deactivate: function deactivate(deactivateOptions) {
25223
+ if (!state.active) {
25224
+ return this;
25225
+ }
25226
+
25227
+ var options = _objectSpread2$1({
25228
+ onDeactivate: config.onDeactivate,
25229
+ onPostDeactivate: config.onPostDeactivate,
25230
+ checkCanReturnFocus: config.checkCanReturnFocus
25231
+ }, deactivateOptions);
25232
+
25233
+ clearTimeout(state.delayInitialFocusTimer); // noop if undefined
25234
+
25235
+ state.delayInitialFocusTimer = undefined;
25236
+ removeListeners();
25237
+ state.active = false;
25238
+ state.paused = false;
25239
+ activeFocusTraps.deactivateTrap(trap);
25240
+ var onDeactivate = getOption(options, 'onDeactivate');
25241
+ var onPostDeactivate = getOption(options, 'onPostDeactivate');
25242
+ var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
25243
+ var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
25244
+
25245
+ if (onDeactivate) {
25246
+ onDeactivate();
25247
+ }
25248
+
25249
+ var finishDeactivation = function finishDeactivation() {
25250
+ delay(function () {
25251
+ if (returnFocus) {
25252
+ tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
25253
+ }
25254
+
25255
+ if (onPostDeactivate) {
25256
+ onPostDeactivate();
25257
+ }
25258
+ });
25259
+ };
25260
+
25261
+ if (returnFocus && checkCanReturnFocus) {
25262
+ checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
25263
+ return this;
25264
+ }
25265
+
25266
+ finishDeactivation();
25267
+ return this;
25268
+ },
25269
+ pause: function pause() {
25270
+ if (state.paused || !state.active) {
25271
+ return this;
25272
+ }
25273
+
25274
+ state.paused = true;
25275
+ removeListeners();
25276
+ return this;
25277
+ },
25278
+ unpause: function unpause() {
25279
+ if (!state.paused || !state.active) {
25280
+ return this;
25281
+ }
25282
+
25283
+ state.paused = false;
25284
+ updateTabbableNodes();
25285
+ addListeners();
25286
+ return this;
25287
+ },
25288
+ updateContainerElements: function updateContainerElements(containerElements) {
25289
+ var elementsAsArray = [].concat(containerElements).filter(Boolean);
25290
+ state.containers = elementsAsArray.map(function (element) {
25291
+ return typeof element === 'string' ? doc.querySelector(element) : element;
25292
+ });
25293
+
25294
+ if (state.active) {
25295
+ updateTabbableNodes();
25296
+ }
25297
+
25298
+ return this;
25299
+ }
25300
+ }; // initialize container elements
25301
+
25302
+ trap.updateContainerElements(elements);
25303
+ return trap;
25304
+ };
25305
+
25306
+ /**
25307
+ * Helper to set up focus trap component.
25308
+ *
25309
+ * @param component
25310
+ */
25311
+ function connectFocusTrap(component) {
25312
+ const { focusTrapEl } = component;
25313
+ if (!focusTrapEl) {
25314
+ return;
25315
+ }
25316
+ if (focusTrapEl.tabIndex == null) {
25317
+ focusTrapEl.tabIndex = -1;
25318
+ }
25319
+ const focusTrapOptions = {
25320
+ allowOutsideClick: true,
25321
+ clickOutsideDeactivates: false,
25322
+ escapeDeactivates: false,
25323
+ fallbackFocus: focusTrapEl,
25324
+ setReturnFocus: (el) => {
25325
+ focusElement(el);
25326
+ return false;
25327
+ },
25328
+ tabbableOptions: {
25329
+ getShadowRoot: true
25330
+ }
25331
+ };
25332
+ component.focusTrap = createFocusTrap(focusTrapEl, focusTrapOptions);
25333
+ }
25334
+ /**
25335
+ * Helper to activate focus trap component.
25336
+ *
25337
+ * @param component
25338
+ */
25339
+ function activateFocusTrap(component) {
25340
+ var _a;
25341
+ (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
25342
+ }
25343
+ /**
25344
+ * Helper to tear deactivate focus trap component.
25345
+ *
25346
+ * @param component
25347
+ */
25348
+ function deactivateFocusTrap(component) {
25349
+ var _a;
25350
+ (_a = component.focusTrap) === null || _a === void 0 ? void 0 : _a.deactivate();
25351
+ }
25352
+
25353
+ 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*/.sc-calcite-modal: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*/.calcite-animate.sc-calcite-modal{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-modal{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-modal{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-modal{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-modal{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-modal:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-modal:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-modal-h{display:none}/*!@:host*/.sc-calcite-modal-h{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])*/[scale=s].sc-calcite-modal-h{--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])*/[scale=m].sc-calcite-modal-h{--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])*/[scale=l].sc-calcite-modal-h{--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*/.scrim.sc-calcite-modal{--calcite-scrim-background:rgba(0, 0, 0, 0.75);position:fixed;inset:0px;display:flex;overflow-y:hidden}/*!@.modal*/.modal.sc-calcite-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*/.modal--opening-idle.sc-calcite-modal{transform:var(--calcite-modal-hidden-position)}/*!@.modal--opening-active*/.modal--opening-active.sc-calcite-modal{transform:var(--calcite-modal-shown-position)}/*!@.modal--closing-idle*/.modal--closing-idle.sc-calcite-modal{transform:var(--calcite-modal-shown-position)}/*!@.modal--closing-active*/.modal--closing-active.sc-calcite-modal{transform:var(--calcite-modal-hidden-position)}/*!@:host([open])*/[open].sc-calcite-modal-h{opacity:1;visibility:visible !important;transition-delay:0ms}/*!@:host([open]) .modal--open*/[open].sc-calcite-modal-h .modal--open.sc-calcite-modal{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*/.header.sc-calcite-modal{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*/.close.sc-calcite-modal{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*/.close.sc-calcite-modal calcite-icon.sc-calcite-modal{pointer-events:none;vertical-align:-2px}/*!@.close:focus*/.close.sc-calcite-modal:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}/*!@.close:hover, .close:focus, .close:active*/.close.sc-calcite-modal:hover,.close.sc-calcite-modal:focus,.close.sc-calcite-modal:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}/*!@.title*/.title.sc-calcite-modal{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(*),\n*::slotted([slot=header])*/slot[name=header].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[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*/.content.sc-calcite-modal{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*/.content--spaced.sc-calcite-modal{padding:var(--calcite-modal-padding)}/*!@.content--no-footer*/.content--no-footer.sc-calcite-modal{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}/*!@slot[name=content]::slotted(*),\n*::slotted([slot=content])*/slot[name=content].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[slot=content]{font-size:var(--calcite-modal-content-text, var(--calcite-modal-context-text-internal))}/*!@:host([background-color=grey]) .content*/[background-color=grey].sc-calcite-modal-h .content.sc-calcite-modal{background-color:var(--calcite-ui-background)}/*!@.footer*/.footer.sc-calcite-modal{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,\n.footer--hide-secondary .secondary*/.footer--hide-back.sc-calcite-modal .back.sc-calcite-modal,.footer--hide-secondary.sc-calcite-modal .secondary.sc-calcite-modal{display:none}/*!@.back*/.back.sc-calcite-modal{display:block;margin-inline-end:auto}/*!@.secondary*/.secondary.sc-calcite-modal{margin-inline:0.25rem;display:block}/*!@slot[name=primary]*/slot[name=primary].sc-calcite-modal{display:block}/*!@:host([width=small]) .modal*/[width=small].sc-calcite-modal-h .modal.sc-calcite-modal{inline-size:auto}/*!@:host([width=s]) .modal*/[width=s].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:32rem}@media screen and (max-width: 35rem){/*!@:host([width=s]) .modal*/[width=s].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=s]) .content*/[width=s].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=s][docked])*/[width=s][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([width=m]) .modal*/[width=m].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:48rem}@media screen and (max-width: 51rem){/*!@:host([width=m]) .modal*/[width=m].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=m]) .content*/[width=m].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=m][docked])*/[width=m][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([width=l]) .modal*/[width=l].sc-calcite-modal-h .modal.sc-calcite-modal{max-inline-size:94rem}@media screen and (max-width: 97rem){/*!@:host([width=l]) .modal*/[width=l].sc-calcite-modal-h .modal.sc-calcite-modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px}/*!@:host([width=l]) .content*/[width=l].sc-calcite-modal-h .content.sc-calcite-modal{flex:1 1 auto;max-block-size:unset}/*!@:host([width=l][docked])*/[width=l][docked].sc-calcite-modal-h{align-items:flex-end}}/*!@:host([fullscreen])*/[fullscreen].sc-calcite-modal-h{background-color:transparent}/*!@:host([fullscreen]) .modal*/[fullscreen].sc-calcite-modal-h .modal.sc-calcite-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*/[fullscreen].sc-calcite-modal-h .content.sc-calcite-modal{max-block-size:100%;flex:1 1 auto}/*!@:host([open][fullscreen]) .header*/[open][fullscreen].sc-calcite-modal-h .header.sc-calcite-modal{border-radius:0}/*!@:host([open][fullscreen]) .footer*/[open][fullscreen].sc-calcite-modal-h .footer.sc-calcite-modal{border-radius:0}/*!@:host([docked]) .modal*/[docked].sc-calcite-modal-h .modal.sc-calcite-modal{block-size:auto}/*!@:host([docked]) .content*/[docked].sc-calcite-modal-h .content.sc-calcite-modal{block-size:auto;flex:1 1 auto}@media screen and (max-width: 860px){/*!@:host([docked]) .modal*/[docked].sc-calcite-modal-h .modal.sc-calcite-modal{border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}/*!@:host([docked]) .close*/[docked].sc-calcite-modal-h .close.sc-calcite-modal{border-start-end-radius:var(--calcite-border-radius)}}/*!@:host([color=red]) .modal*/[color=red].sc-calcite-modal-h .modal.sc-calcite-modal{border-color:var(--calcite-ui-danger)}/*!@:host([color=blue]) .modal*/[color=blue].sc-calcite-modal-h .modal.sc-calcite-modal{border-color:var(--calcite-ui-info)}/*!@:host([color=red]) .modal,\n:host([color=blue]) .modal*/[color=red].sc-calcite-modal-h .modal.sc-calcite-modal,[color=blue].sc-calcite-modal-h .modal.sc-calcite-modal{border-width:0px;border-block-start-width:4px;border-style:solid}/*!@:host([color=red]) .header,\n:host([color=blue]) .header*/[color=red].sc-calcite-modal-h .header.sc-calcite-modal,[color=blue].sc-calcite-modal-h .header.sc-calcite-modal{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){/*!@slot[name=header]::slotted(*),\n*::slotted([slot=header])*/slot[name=header].sc-calcite-modal-s>*,*.sc-calcite-modal-s>[slot=header]{font-size:var(--calcite-font-size-1)}/*!@.footer*/.footer.sc-calcite-modal{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){/*!@.footer*/.footer.sc-calcite-modal{flex-direction:column}/*!@.back,\n.secondary*/.back.sc-calcite-modal,.secondary.sc-calcite-modal{margin:0px;margin-block-end:0.25rem}}";
25354
+
24208
25355
  /**
24209
25356
  * @slot header - A slot for adding header text.
24210
25357
  * @slot content - A slot for adding the component's content.
@@ -24276,10 +25423,13 @@ class Modal {
24276
25423
  this.setTransitionEl = (el) => {
24277
25424
  this.transitionEl = el;
24278
25425
  connectOpenCloseComponent(this);
25426
+ this.focusTrapEl = el;
25427
+ connectFocusTrap(this);
24279
25428
  };
24280
25429
  this.openEnd = () => {
24281
25430
  this.setFocus();
24282
25431
  this.el.removeEventListener("calciteModalOpen", this.openEnd);
25432
+ activateFocusTrap(this);
24283
25433
  };
24284
25434
  this.handleOutsideClose = () => {
24285
25435
  if (this.disableOutsideClose) {
@@ -24292,22 +25442,9 @@ class Modal {
24292
25442
  return this.beforeClose(this.el).then(() => {
24293
25443
  this.open = false;
24294
25444
  this.isOpen = false;
24295
- focusElement(this.previousActiveElement);
24296
25445
  this.removeOverflowHiddenClass();
24297
25446
  });
24298
25447
  };
24299
- this.focusFirstElement = () => {
24300
- focusElement(this.disableCloseButton ? getFocusableElements(this.el)[0] : this.closeButtonEl);
24301
- };
24302
- this.focusLastElement = () => {
24303
- const focusableElements = getFocusableElements(this.el).filter((el) => !el.getAttribute("data-focus-fence"));
24304
- if (focusableElements.length > 0) {
24305
- focusElement(focusableElements[focusableElements.length - 1]);
24306
- }
24307
- else {
24308
- focusElement(this.closeButtonEl);
24309
- }
24310
- };
24311
25448
  this.updateFooterVisibility = () => {
24312
25449
  this.hasFooter = !!getSlotted(this.el, [SLOTS$d.back, SLOTS$d.primary, SLOTS$d.secondary]);
24313
25450
  };
@@ -24342,16 +25479,17 @@ class Modal {
24342
25479
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
24343
25480
  disconnectConditionalSlotComponent(this);
24344
25481
  disconnectOpenCloseComponent(this);
25482
+ deactivateFocusTrap(this);
24345
25483
  }
24346
25484
  render() {
24347
25485
  return (hAsync(Host, { "aria-describedby": this.contentId, "aria-labelledby": this.titleId, "aria-modal": "true", role: "dialog" }, hAsync("calcite-scrim", { class: CSS$n.scrim, onClick: this.handleOutsideClose }), this.renderStyle(), hAsync("div", { class: {
24348
25486
  [CSS$n.modal]: true,
24349
25487
  [CSS$n.modalOpen]: this.isOpen
24350
- }, ref: this.setTransitionEl }, hAsync("div", { "data-focus-fence": true, onFocus: this.focusLastElement, tabindex: "0" }), hAsync("div", { class: CSS$n.header }, this.renderCloseButton(), hAsync("header", { class: CSS$n.title }, hAsync("slot", { name: CSS$n.header }))), hAsync("div", { class: {
25488
+ }, ref: this.setTransitionEl }, hAsync("div", { class: CSS$n.header }, this.renderCloseButton(), hAsync("header", { class: CSS$n.title }, hAsync("slot", { name: CSS$n.header }))), hAsync("div", { class: {
24351
25489
  content: true,
24352
25490
  "content--spaced": !this.noPadding,
24353
25491
  "content--no-footer": !this.hasFooter
24354
- }, ref: (el) => (this.modalContent = el) }, hAsync("slot", { name: SLOTS$d.content })), this.renderFooter(), hAsync("div", { "data-focus-fence": true, onFocus: this.focusFirstElement, tabindex: "0" }))));
25492
+ }, ref: (el) => (this.modalContent = el) }, hAsync("slot", { name: SLOTS$d.content })), this.renderFooter())));
24355
25493
  }
24356
25494
  renderFooter() {
24357
25495
  return this.hasFooter ? (hAsync("div", { class: CSS$n.footer, key: "footer" }, hAsync("span", { class: CSS$n.back }, hAsync("slot", { name: SLOTS$d.back })), hAsync("span", { class: CSS$n.secondary }, hAsync("slot", { name: SLOTS$d.secondary })), hAsync("span", { class: CSS$n.primary }, hAsync("slot", { name: SLOTS$d.primary })))) : null;
@@ -24418,8 +25556,11 @@ class Modal {
24418
25556
  * @param focusId
24419
25557
  */
24420
25558
  async setFocus(focusId) {
24421
- const closeButton = this.closeButtonEl;
24422
- return focusElement(focusId === "close-button" ? closeButton : getFocusableElements(this.el)[0] || closeButton);
25559
+ const { closeButtonEl } = this;
25560
+ if (closeButtonEl && focusId === "close-button") {
25561
+ return focusElement(closeButtonEl);
25562
+ }
25563
+ activateFocusTrap(this);
24423
25564
  }
24424
25565
  /**
24425
25566
  * Sets the scroll top of the component's content.
@@ -24453,6 +25594,7 @@ class Modal {
24453
25594
  onClose() {
24454
25595
  this.transitionEl.classList.remove(CSS$n.closingIdle, CSS$n.closingActive);
24455
25596
  this.calciteModalClose.emit();
25597
+ deactivateFocusTrap(this);
24456
25598
  }
24457
25599
  activeHandler(value) {
24458
25600
  this.open = value;
@@ -24471,7 +25613,6 @@ class Modal {
24471
25613
  }
24472
25614
  /** Open the modal */
24473
25615
  openModal() {
24474
- this.previousActiveElement = document.activeElement;
24475
25616
  this.el.addEventListener("calciteModalOpen", this.openEnd);
24476
25617
  this.open = true;
24477
25618
  this.isOpen = true;
@@ -25319,7 +26460,7 @@ class Panel {
25319
26460
  }
25320
26461
  renderHeaderContent() {
25321
26462
  const { heading, headingLevel, summary, description, hasHeaderContent } = this;
25322
- const headingNode = heading ? (hAsync(Heading, { class: CSS$z.heading, level: headingLevel || HEADING_LEVEL$5 }, heading)) : null;
26463
+ const headingNode = heading ? (hAsync(Heading, { class: CSS$z.heading, level: headingLevel }, heading)) : null;
25323
26464
  const descriptionNode = description || summary ? hAsync("span", { class: CSS$z.description }, description || summary) : null;
25324
26465
  return !hasHeaderContent && (headingNode || descriptionNode) ? (hAsync("div", { class: CSS$z.headerContent, key: "header-content" }, headingNode, descriptionNode)) : null;
25325
26466
  }
@@ -25447,7 +26588,6 @@ const CSS$j = {
25447
26588
  const SLOTS$a = {
25448
26589
  parentItem: "parent-item"
25449
26590
  };
25450
- const HEADING_LEVEL$3 = 3;
25451
26591
 
25452
26592
  function mutationObserverCallback() {
25453
26593
  this.setUpItems();
@@ -25464,6 +26604,7 @@ function initialize() {
25464
26604
  this.setUpItems();
25465
26605
  this.setUpFilter();
25466
26606
  this.emitCalciteListChange = debounce(internalCalciteListChangeEvent.bind(this), 0);
26607
+ this.emitCalciteListFilter = debounce(internalCalciteListFilterEvent.bind(this), 0);
25467
26608
  }
25468
26609
  function initializeObserver() {
25469
26610
  var _a;
@@ -25579,6 +26720,9 @@ function getItemIndex(list, item) {
25579
26720
  function filterOutDisabled(items) {
25580
26721
  return items.filter((item) => !item.disabled);
25581
26722
  }
26723
+ function internalCalciteListFilterEvent() {
26724
+ this.calciteListFilter.emit();
26725
+ }
25582
26726
  function internalCalciteListChangeEvent() {
25583
26727
  this.calciteListChange.emit(this.selectedValues);
25584
26728
  }
@@ -25692,26 +26836,27 @@ function selectSiblings(item, deselect = false) {
25692
26836
  });
25693
26837
  }
25694
26838
  let groups;
25695
- function handleFilter(event) {
25696
- const { filteredItems } = event.currentTarget;
25697
- const values = filteredItems.map((item) => item.value);
26839
+ function handleFilter(emit = false) {
26840
+ var _a;
26841
+ const { filteredData, filterText } = this;
26842
+ const values = filteredData.map((item) => item.value);
25698
26843
  let hasSelectedMatch = false;
25699
26844
  if (!groups) {
25700
26845
  groups = new Set();
25701
26846
  }
25702
- const matchedItems = this.items.filter((item) => {
26847
+ const matchedItems = ((_a = this.items) === null || _a === void 0 ? void 0 : _a.filter((item) => {
25703
26848
  const parent = item.parentElement;
25704
26849
  const grouped = parent.matches("calcite-pick-list-group");
25705
26850
  if (grouped) {
25706
26851
  groups.add(parent);
25707
26852
  }
25708
- const matches = values.includes(item.value);
26853
+ const matches = filterText ? values.includes(item.value) : true;
25709
26854
  item.hidden = !matches;
25710
26855
  if (!hasSelectedMatch) {
25711
26856
  hasSelectedMatch = matches && item.selected;
25712
26857
  }
25713
26858
  return matches;
25714
- });
26859
+ })) || [];
25715
26860
  groups.forEach((group) => {
25716
26861
  const hasAtLeastOneMatch = matchedItems.some((item) => group.contains(item));
25717
26862
  group.hidden = !hasAtLeastOneMatch;
@@ -25730,6 +26875,25 @@ function handleFilter(event) {
25730
26875
  if (matchedItems.length > 0 && !hasSelectedMatch && !this.multiple) {
25731
26876
  toggleSingleSelectItemTabbing(matchedItems[0], true);
25732
26877
  }
26878
+ this.setFilteredItems(matchedItems);
26879
+ if (emit) {
26880
+ this.emitCalciteListFilter();
26881
+ }
26882
+ }
26883
+ function handleInitialFilter() {
26884
+ var _a;
26885
+ const filteredItems = (_a = this.filterEl) === null || _a === void 0 ? void 0 : _a.filteredItems;
26886
+ if (filteredItems) {
26887
+ this.filteredData = filteredItems;
26888
+ }
26889
+ this.handleFilter();
26890
+ }
26891
+ function handleFilterEvent(event) {
26892
+ event.stopPropagation();
26893
+ const { filteredItems, value } = event.currentTarget;
26894
+ this.filterText = value;
26895
+ this.filteredData = filteredItems;
26896
+ this.handleFilter(true);
25733
26897
  }
25734
26898
  function getItemData() {
25735
26899
  return this.items.map((item) => ({
@@ -25740,13 +26904,13 @@ function getItemData() {
25740
26904
  }));
25741
26905
  }
25742
26906
 
25743
- const List = ({ props: { disabled, loading, filterEnabled, dataForFilter, handleFilter, filterPlaceholder, setFilterEl, dragEnabled, storeAssistiveEl }, ...rest }) => {
26907
+ const List = ({ props: { disabled, loading, filterEnabled, dataForFilter, handleFilterEvent, filterPlaceholder, filterText, setFilterEl, dragEnabled, storeAssistiveEl }, ...rest }) => {
25744
26908
  const defaultSlot = hAsync("slot", null);
25745
26909
  return (hAsync(Host, { "aria-busy": toAriaBoolean(loading), role: "menu", ...rest },
25746
26910
  hAsync("section", null,
25747
26911
  dragEnabled ? (hAsync("span", { "aria-live": "assertive", class: "assistive-text", ref: storeAssistiveEl })) : null,
25748
26912
  hAsync("header", { class: { [CSS$k.sticky]: true } },
25749
- filterEnabled ? (hAsync("calcite-filter", { "aria-label": filterPlaceholder, disabled: loading || disabled, items: dataForFilter, onCalciteFilterChange: handleFilter, placeholder: filterPlaceholder, ref: setFilterEl })) : null,
26913
+ filterEnabled ? (hAsync("calcite-filter", { "aria-label": filterPlaceholder, disabled: loading || disabled, items: dataForFilter, onCalciteFilterChange: handleFilterEvent, placeholder: filterPlaceholder, ref: setFilterEl, value: filterText })) : null,
25750
26914
  hAsync("slot", { name: SLOTS$b.menuActions })),
25751
26915
  loading ? hAsync("calcite-scrim", { loading: loading }) : null,
25752
26916
  defaultSlot)));
@@ -25762,6 +26926,7 @@ class PickList {
25762
26926
  constructor(hostRef) {
25763
26927
  registerInstance(this, hostRef);
25764
26928
  this.calciteListChange = createEvent(this, "calciteListChange", 6);
26929
+ this.calciteListFilter = createEvent(this, "calciteListFilter", 6);
25765
26930
  // --------------------------------------------------------------------------
25766
26931
  //
25767
26932
  // Properties
@@ -25771,6 +26936,18 @@ class PickList {
25771
26936
  * When `true`, interaction is prevented and the component is displayed with lower opacity.
25772
26937
  */
25773
26938
  this.disabled = false;
26939
+ /**
26940
+ * **read-only** The currently filtered items
26941
+ *
26942
+ * @readonly
26943
+ */
26944
+ this.filteredItems = [];
26945
+ /**
26946
+ * **read-only** The currently filtered items
26947
+ *
26948
+ * @readonly
26949
+ */
26950
+ this.filteredData = [];
25774
26951
  /**
25775
26952
  * When `true`, an input appears at the top of the list that can be used by end users to filter items in the list.
25776
26953
  */
@@ -25802,10 +26979,14 @@ class PickList {
25802
26979
  this.setFilterEl = (el) => {
25803
26980
  this.filterEl = el;
25804
26981
  };
26982
+ this.setFilteredItems = (filteredItems) => {
26983
+ this.filteredItems = filteredItems;
26984
+ };
25805
26985
  this.deselectRemovedItems = deselectRemovedItems.bind(this);
25806
26986
  this.deselectSiblingItems = deselectSiblingItems.bind(this);
25807
26987
  this.selectSiblings = selectSiblings.bind(this);
25808
26988
  this.handleFilter = handleFilter.bind(this);
26989
+ this.handleFilterEvent = handleFilterEvent.bind(this);
25809
26990
  this.getItemData = getItemData.bind(this);
25810
26991
  this.keyDownHandler = keyDownHandler.bind(this);
25811
26992
  }
@@ -25821,6 +27002,9 @@ class PickList {
25821
27002
  disconnectedCallback() {
25822
27003
  cleanUpObserver.call(this);
25823
27004
  }
27005
+ componentDidLoad() {
27006
+ handleInitialFilter.call(this);
27007
+ }
25824
27008
  componentDidRender() {
25825
27009
  updateHostInteraction(this);
25826
27010
  }
@@ -25889,8 +27073,11 @@ class PickList {
25889
27073
  "$tagName$": "calcite-pick-list",
25890
27074
  "$members$": {
25891
27075
  "disabled": [516],
27076
+ "filteredItems": [1040],
27077
+ "filteredData": [1040],
25892
27078
  "filterEnabled": [516, "filter-enabled"],
25893
27079
  "filterPlaceholder": [513, "filter-placeholder"],
27080
+ "filterText": [1537, "filter-text"],
25894
27081
  "headingLevel": [514, "heading-level"],
25895
27082
  "loading": [516],
25896
27083
  "multiple": [516],
@@ -25902,7 +27089,7 @@ class PickList {
25902
27089
  },
25903
27090
  "$listeners$": [[0, "calciteListItemRemove", "calciteListItemRemoveHandler"], [0, "calciteListItemChange", "calciteListItemChangeHandler"], [0, "calciteInternalListItemPropsChange", "calciteInternalListItemPropsChangeHandler"], [0, "calciteInternalListItemValueChange", "calciteInternalListItemValueChangeHandler"], [0, "focusout", "calciteListFocusOutHandler"]],
25904
27091
  "$lazyBundleId$": "-",
25905
- "$attrsToReflect$": [["disabled", "disabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["headingLevel", "heading-level"], ["loading", "loading"], ["multiple", "multiple"], ["selectionFollowsFocus", "selection-follows-focus"]]
27092
+ "$attrsToReflect$": [["disabled", "disabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["filterText", "filter-text"], ["headingLevel", "heading-level"], ["loading", "loading"], ["multiple", "multiple"], ["selectionFollowsFocus", "selection-follows-focus"]]
25906
27093
  }; }
25907
27094
  }
25908
27095
 
@@ -25942,7 +27129,7 @@ class PickListGroup {
25942
27129
  const title = groupTitle;
25943
27130
  const parentLevel = (_a = el.closest("calcite-pick-list")) === null || _a === void 0 ? void 0 : _a.headingLevel;
25944
27131
  const relativeLevel = parentLevel ? constrainHeadingLevel(parentLevel + 1) : null;
25945
- const level = headingLevel || relativeLevel || HEADING_LEVEL$3;
27132
+ const level = headingLevel || relativeLevel;
25946
27133
  return (hAsync(Fragment, null, title ? (hAsync(Heading, { class: CSS$j.heading, level: level }, title)) : null, hAsync("slot", { name: SLOTS$a.parentItem }), hAsync("section", { class: sectionClasses }, hAsync("slot", null))));
25947
27134
  }
25948
27135
  get el() { return getElement(this); }
@@ -26194,7 +27381,6 @@ const TEXT$6 = {
26194
27381
  const defaultPopoverPlacement = "auto";
26195
27382
  const ARIA_CONTROLS = "aria-controls";
26196
27383
  const ARIA_EXPANDED = "aria-expanded";
26197
- const HEADING_LEVEL$2 = 2;
26198
27384
 
26199
27385
  class PopoverManager$1 {
26200
27386
  constructor() {
@@ -26577,7 +27763,7 @@ class Popover {
26577
27763
  }
26578
27764
  renderHeader() {
26579
27765
  const { heading, headingLevel } = this;
26580
- const headingNode = heading ? (hAsync(Heading, { class: CSS$h.heading, level: headingLevel || HEADING_LEVEL$2 }, heading)) : null;
27766
+ const headingNode = heading ? (hAsync(Heading, { class: CSS$h.heading, level: headingLevel }, heading)) : null;
26581
27767
  return headingNode ? (hAsync("div", { class: CSS$h.header }, headingNode, this.renderCloseButton())) : null;
26582
27768
  }
26583
27769
  render() {
@@ -35018,33 +36204,6 @@ class TimePicker {
35018
36204
  }
35019
36205
 
35020
36206
  const CSS$4 = {
35021
- header: "header",
35022
- heading: "heading",
35023
- close: "close",
35024
- container: "container",
35025
- tipContainer: "tip-container",
35026
- tipContainerAdvancing: "tip-container--advancing",
35027
- tipContainerRetreating: "tip-container--retreating",
35028
- pagination: "pagination",
35029
- pagePosition: "page-position",
35030
- pageNext: "page-next",
35031
- pagePrevious: "page-previous"
35032
- };
35033
- const ICONS$3 = {
35034
- chevronLeft: "chevron-left",
35035
- chevronRight: "chevron-right",
35036
- close: "x"
35037
- };
35038
- const TEXT$1 = {
35039
- defaultGroupTitle: "Tips",
35040
- defaultPaginationLabel: "Tip",
35041
- close: "Close",
35042
- previous: "Previous",
35043
- next: "Next"
35044
- };
35045
- const HEADING_LEVEL$1 = 2;
35046
-
35047
- const CSS$3 = {
35048
36207
  container: "container",
35049
36208
  header: "header",
35050
36209
  heading: "heading",
@@ -35053,16 +36212,15 @@ const CSS$3 = {
35053
36212
  content: "content",
35054
36213
  info: "info"
35055
36214
  };
35056
- const ICONS$2 = {
36215
+ const ICONS$3 = {
35057
36216
  close: "x"
35058
36217
  };
35059
36218
  const SLOTS$2 = {
35060
36219
  thumbnail: "thumbnail"
35061
36220
  };
35062
- const TEXT = {
36221
+ const TEXT$1 = {
35063
36222
  close: "Close"
35064
36223
  };
35065
- const HEADING_LEVEL = (HEADING_LEVEL$1 + 1);
35066
36224
 
35067
36225
  const tipCss = "@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*/.sc-calcite-tip: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*/.calcite-animate.sc-calcite-tip{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-tip{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-tip{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-tip{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-tip{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-tip:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-tip:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-tip-h{display:none}/*!@:host*/.sc-calcite-tip-h{position:relative;margin:1rem;box-sizing:border-box;display:flex;flex-direction:row;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}/*!@:host **/.sc-calcite-tip-h *.sc-calcite-tip{box-sizing:border-box}/*!@.container*/.container.sc-calcite-tip{inline-size:100%;padding:1rem}/*!@:host([dismissed]),\n:host([dismissed]) .container*/[dismissed].sc-calcite-tip-h,[dismissed].sc-calcite-tip-h .container.sc-calcite-tip{display:none}/*!@:host([selected]) .container*/[selected].sc-calcite-tip-h .container.sc-calcite-tip{margin:0px;border-style:none;padding:0px}/*!@.header*/.header.sc-calcite-tip{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-tip{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-tip .heading.sc-calcite-tip{flex:1 1 auto;padding:0.5rem}/*!@.header*/.header.sc-calcite-tip{margin-block-end:0.5rem}/*!@.header .heading*/.header.sc-calcite-tip .heading.sc-calcite-tip{padding:0px;font-size:var(--calcite-font-size-0);line-height:1.25rem;color:var(--calcite-ui-text-1)}/*!@.container[hidden]*/.container[hidden].sc-calcite-tip{display:none}/*!@.content*/.content.sc-calcite-tip{display:flex}/*!@.info*/.info.sc-calcite-tip{padding-block:0px;padding-inline:1rem;inline-size:70%}/*!@.info:only-child*/.info.sc-calcite-tip:only-child{inline-size:100%;padding-inline:0px}/*!@::slotted(p)*/.sc-calcite-tip-s>p{margin-block-start:0px}/*!@::slotted(a)*/.sc-calcite-tip-s>a{outline-color:transparent;color:var(--calcite-ui-brand)}/*!@::slotted(a:focus)*/.sc-calcite-tip-s>a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}/*!@.image-frame*/.image-frame.sc-calcite-tip{inline-size:25%}/*!@.image-frame img*/.image-frame.sc-calcite-tip img.sc-calcite-tip{max-inline-size:100%}/*!@::slotted(img)*/.sc-calcite-tip-s>img{max-inline-size:100%}";
35068
36226
 
@@ -35124,26 +36282,26 @@ class Tip {
35124
36282
  const { heading, headingLevel, el } = this;
35125
36283
  const parentLevel = (_a = el.closest("calcite-tip-manager")) === null || _a === void 0 ? void 0 : _a.headingLevel;
35126
36284
  const relativeLevel = parentLevel ? constrainHeadingLevel(parentLevel + 1) : null;
35127
- const level = headingLevel || relativeLevel || HEADING_LEVEL;
35128
- return heading ? (hAsync("header", { class: CSS$3.header }, hAsync(Heading, { class: CSS$3.heading, level: level }, heading))) : null;
36285
+ const level = headingLevel || relativeLevel;
36286
+ return heading ? (hAsync("header", { class: CSS$4.header }, hAsync(Heading, { class: CSS$4.heading, level: level }, heading))) : null;
35129
36287
  }
35130
36288
  renderDismissButton() {
35131
36289
  const { nonDismissible, hideTip, intlClose } = this;
35132
- const text = intlClose || TEXT.close;
35133
- return !nonDismissible ? (hAsync("calcite-action", { class: CSS$3.close, icon: ICONS$2.close, onClick: hideTip, scale: "l", text: text })) : null;
36290
+ const text = intlClose || TEXT$1.close;
36291
+ return !nonDismissible ? (hAsync("calcite-action", { class: CSS$4.close, icon: ICONS$3.close, onClick: hideTip, scale: "l", text: text })) : null;
35134
36292
  }
35135
36293
  renderImageFrame() {
35136
36294
  const { el } = this;
35137
- return getSlotted(el, SLOTS$2.thumbnail) ? (hAsync("div", { class: CSS$3.imageFrame, key: "thumbnail" }, hAsync("slot", { name: SLOTS$2.thumbnail }))) : null;
36295
+ return getSlotted(el, SLOTS$2.thumbnail) ? (hAsync("div", { class: CSS$4.imageFrame, key: "thumbnail" }, hAsync("slot", { name: SLOTS$2.thumbnail }))) : null;
35138
36296
  }
35139
36297
  renderInfoNode() {
35140
- return (hAsync("div", { class: CSS$3.info }, hAsync("slot", null)));
36298
+ return (hAsync("div", { class: CSS$4.info }, hAsync("slot", null)));
35141
36299
  }
35142
36300
  renderContent() {
35143
- return (hAsync("div", { class: CSS$3.content }, this.renderImageFrame(), this.renderInfoNode()));
36301
+ return (hAsync("div", { class: CSS$4.content }, this.renderImageFrame(), this.renderInfoNode()));
35144
36302
  }
35145
36303
  render() {
35146
- return (hAsync(Fragment, null, hAsync("article", { class: CSS$3.container }, this.renderHeader(), this.renderContent()), this.renderDismissButton()));
36304
+ return (hAsync(Fragment, null, hAsync("article", { class: CSS$4.container }, this.renderHeader(), this.renderContent()), this.renderDismissButton()));
35147
36305
  }
35148
36306
  get el() { return getElement(this); }
35149
36307
  static get style() { return tipCss; }
@@ -35189,6 +36347,32 @@ class TipGroup {
35189
36347
  }; }
35190
36348
  }
35191
36349
 
36350
+ const CSS$3 = {
36351
+ header: "header",
36352
+ heading: "heading",
36353
+ close: "close",
36354
+ container: "container",
36355
+ tipContainer: "tip-container",
36356
+ tipContainerAdvancing: "tip-container--advancing",
36357
+ tipContainerRetreating: "tip-container--retreating",
36358
+ pagination: "pagination",
36359
+ pagePosition: "page-position",
36360
+ pageNext: "page-next",
36361
+ pagePrevious: "page-previous"
36362
+ };
36363
+ const ICONS$2 = {
36364
+ chevronLeft: "chevron-left",
36365
+ chevronRight: "chevron-right",
36366
+ close: "x"
36367
+ };
36368
+ const TEXT = {
36369
+ defaultGroupTitle: "Tips",
36370
+ defaultPaginationLabel: "Tip",
36371
+ close: "Close",
36372
+ previous: "Previous",
36373
+ next: "Next"
36374
+ };
36375
+
35192
36376
  const tipManagerCss = "@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*/.sc-calcite-tip-manager: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*/.calcite-animate.sc-calcite-tip-manager{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-tip-manager{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-tip-manager{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-tip-manager{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-tip-manager{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-tip-manager:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-tip-manager:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}/*!@:host([hidden])*/[hidden].sc-calcite-tip-manager-h{display:none}/*!@:host*/.sc-calcite-tip-manager-h{box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2);--calcite-tip-manager-height:19vh}/*!@:host **/.sc-calcite-tip-manager-h *.sc-calcite-tip-manager{box-sizing:border-box}/*!@:host([closed])*/[closed].sc-calcite-tip-manager-h{display:none}/*!@.header*/.header.sc-calcite-tip-manager{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-tip-manager{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-tip-manager .heading.sc-calcite-tip-manager{flex:1 1 auto;padding:0.5rem}/*!@.header*/.header.sc-calcite-tip-manager{border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline-end:0px;padding-inline-start:1rem}/*!@.header .heading*/.header.sc-calcite-tip-manager .heading.sc-calcite-tip-manager{padding:0px;font-size:var(--calcite-font-size-1);line-height:1.5rem;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1)}/*!@.container*/.container.sc-calcite-tip-manager{position:relative;overflow:hidden;outline-color:transparent;min-block-size:150px}/*!@.container:focus*/.container.sc-calcite-tip-manager:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}/*!@.tip-container*/.tip-container.sc-calcite-tip-manager{margin-block-start:1px;display:flex;align-items:flex-start;justify-content:center;overflow:auto;outline-color:transparent;animation-name:none;animation-duration:var(--calcite-animation-timing);block-size:var(--calcite-tip-manager-height)}/*!@.tip-container:focus*/.tip-container.sc-calcite-tip-manager:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}/*!@::slotted(calcite-tip)*/.sc-calcite-tip-manager-s>calcite-tip{border-style:none;padding:0.75rem;max-inline-size:var(--calcite-tip-max-width)}/*!@.tip-container--advancing*/.tip-container--advancing.sc-calcite-tip-manager{animation-name:tip-advance}/*!@.tip-container--retreating*/.tip-container--retreating.sc-calcite-tip-manager{animation-name:tip-retreat}/*!@.pagination*/.pagination.sc-calcite-tip-manager{display:flex;align-items:center;justify-content:center;padding-inline:0px;padding-block:0.75rem 0.5rem}/*!@.page-position*/.page-position.sc-calcite-tip-manager{margin-block:0px;margin-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}@keyframes tip-advance{0%{opacity:0;transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-retreat{0%{opacity:0;transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}";
35193
36377
 
35194
36378
  /**
@@ -35316,7 +36500,7 @@ class TipManager {
35316
36500
  updateGroupTitle() {
35317
36501
  const selectedTip = this.tips[this.selectedIndex];
35318
36502
  const tipParent = selectedTip.closest("calcite-tip-group");
35319
- this.groupTitle = (tipParent === null || tipParent === void 0 ? void 0 : tipParent.groupTitle) || this.intlDefaultTitle || TEXT$1.defaultGroupTitle;
36503
+ this.groupTitle = (tipParent === null || tipParent === void 0 ? void 0 : tipParent.groupTitle) || this.intlDefaultTitle || TEXT.defaultGroupTitle;
35320
36504
  }
35321
36505
  // --------------------------------------------------------------------------
35322
36506
  //
@@ -35326,21 +36510,21 @@ class TipManager {
35326
36510
  renderPagination() {
35327
36511
  const dir = getElementDir(this.el);
35328
36512
  const { selectedIndex, tips, total, intlNext, intlPrevious, intlPaginationLabel } = this;
35329
- const nextLabel = intlNext || TEXT$1.next;
35330
- const previousLabel = intlPrevious || TEXT$1.previous;
35331
- const paginationLabel = intlPaginationLabel || TEXT$1.defaultPaginationLabel;
35332
- return tips.length > 1 ? (hAsync("footer", { class: CSS$4.pagination }, hAsync("calcite-action", { class: CSS$4.pagePrevious, icon: dir === "ltr" ? ICONS$3.chevronLeft : ICONS$3.chevronRight, onClick: this.previousClicked, scale: "m", text: previousLabel }), hAsync("span", { class: CSS$4.pagePosition }, `${paginationLabel} ${selectedIndex + 1}/${total}`), hAsync("calcite-action", { class: CSS$4.pageNext, icon: dir === "ltr" ? ICONS$3.chevronRight : ICONS$3.chevronLeft, onClick: this.nextClicked, scale: "m", text: nextLabel }))) : null;
36513
+ const nextLabel = intlNext || TEXT.next;
36514
+ const previousLabel = intlPrevious || TEXT.previous;
36515
+ const paginationLabel = intlPaginationLabel || TEXT.defaultPaginationLabel;
36516
+ return tips.length > 1 ? (hAsync("footer", { class: CSS$3.pagination }, hAsync("calcite-action", { class: CSS$3.pagePrevious, icon: dir === "ltr" ? ICONS$2.chevronLeft : ICONS$2.chevronRight, onClick: this.previousClicked, scale: "m", text: previousLabel }), hAsync("span", { class: CSS$3.pagePosition }, `${paginationLabel} ${selectedIndex + 1}/${total}`), hAsync("calcite-action", { class: CSS$3.pageNext, icon: dir === "ltr" ? ICONS$2.chevronRight : ICONS$2.chevronLeft, onClick: this.nextClicked, scale: "m", text: nextLabel }))) : null;
35333
36517
  }
35334
36518
  render() {
35335
36519
  const { closed, direction, headingLevel, groupTitle, selectedIndex, intlClose, total } = this;
35336
- const closeLabel = intlClose || TEXT$1.close;
36520
+ const closeLabel = intlClose || TEXT.close;
35337
36521
  if (total === 0) {
35338
36522
  return null;
35339
36523
  }
35340
- return (hAsync("section", { "aria-hidden": toAriaBoolean(closed), class: CSS$4.container, hidden: closed, onKeyDown: this.tipManagerKeyDownHandler, ref: this.storeContainerRef, tabIndex: 0 }, hAsync("header", { class: CSS$4.header }, hAsync(Heading, { class: CSS$4.heading, level: headingLevel || HEADING_LEVEL$1 }, groupTitle), hAsync("calcite-action", { class: CSS$4.close, onClick: this.hideTipManager, scale: "m", text: closeLabel }, hAsync("calcite-icon", { icon: ICONS$3.close, scale: "m" }))), hAsync("div", { class: {
35341
- [CSS$4.tipContainer]: true,
35342
- [CSS$4.tipContainerAdvancing]: !closed && direction === "advancing",
35343
- [CSS$4.tipContainerRetreating]: !closed && direction === "retreating"
36524
+ return (hAsync("section", { "aria-hidden": toAriaBoolean(closed), class: CSS$3.container, hidden: closed, onKeyDown: this.tipManagerKeyDownHandler, ref: this.storeContainerRef, tabIndex: 0 }, hAsync("header", { class: CSS$3.header }, hAsync(Heading, { class: CSS$3.heading, level: headingLevel }, groupTitle), hAsync("calcite-action", { class: CSS$3.close, onClick: this.hideTipManager, scale: "m", text: closeLabel }, hAsync("calcite-icon", { icon: ICONS$2.close, scale: "m" }))), hAsync("div", { class: {
36525
+ [CSS$3.tipContainer]: true,
36526
+ [CSS$3.tipContainerAdvancing]: !closed && direction === "advancing",
36527
+ [CSS$3.tipContainerRetreating]: !closed && direction === "retreating"
35344
36528
  }, key: selectedIndex, tabIndex: 0 }, hAsync("slot", null)), this.renderPagination()));
35345
36529
  }
35346
36530
  get el() { return getElement(this); }
@@ -36016,7 +37200,7 @@ class Tree {
36016
37200
  }
36017
37201
  if (event.key === "ArrowRight" && !target.disabled) {
36018
37202
  if (target.hasChildren) {
36019
- if (target.expanded && getRootNode(this.el).activeElement === target) {
37203
+ if (target.expanded && getRootNode$1(this.el).activeElement === target) {
36020
37204
  // When focus is on an open node, moves focus to the first child node.
36021
37205
  (_a = getEnabledSiblingItem(target.querySelector("calcite-tree-item"), "down")) === null || _a === void 0 ? void 0 : _a.focus();
36022
37206
  event.preventDefault();
@@ -36437,6 +37621,7 @@ class ValueList {
36437
37621
  registerInstance(this, hostRef);
36438
37622
  this.calciteListChange = createEvent(this, "calciteListChange", 6);
36439
37623
  this.calciteListOrderChange = createEvent(this, "calciteListOrderChange", 6);
37624
+ this.calciteListFilter = createEvent(this, "calciteListFilter", 6);
36440
37625
  // --------------------------------------------------------------------------
36441
37626
  //
36442
37627
  // Properties
@@ -36450,6 +37635,18 @@ class ValueList {
36450
37635
  * When `true`, `calcite-value-list-item`s are sortable via a draggable button.
36451
37636
  */
36452
37637
  this.dragEnabled = false;
37638
+ /**
37639
+ * **read-only** The currently filtered items
37640
+ *
37641
+ * @readonly
37642
+ */
37643
+ this.filteredItems = [];
37644
+ /**
37645
+ * **read-only** The currently filtered items
37646
+ *
37647
+ * @readonly
37648
+ */
37649
+ this.filteredData = [];
36453
37650
  /**
36454
37651
  * When `true`, an input appears at the top of the component that can be used by end users to filter list items.
36455
37652
  */
@@ -36481,10 +37678,14 @@ class ValueList {
36481
37678
  this.setFilterEl = (el) => {
36482
37679
  this.filterEl = el;
36483
37680
  };
37681
+ this.setFilteredItems = (filteredItems) => {
37682
+ this.filteredItems = filteredItems;
37683
+ };
36484
37684
  this.deselectRemovedItems = deselectRemovedItems.bind(this);
36485
37685
  this.deselectSiblingItems = deselectSiblingItems.bind(this);
36486
37686
  this.selectSiblings = selectSiblings.bind(this);
36487
37687
  this.handleFilter = handleFilter.bind(this);
37688
+ this.handleFilterEvent = handleFilterEvent.bind(this);
36488
37689
  this.getItemData = getItemData.bind(this);
36489
37690
  this.keyDownHandler = (event) => {
36490
37691
  if (event.defaultPrevented) {
@@ -36545,6 +37746,7 @@ class ValueList {
36545
37746
  }
36546
37747
  componentDidLoad() {
36547
37748
  this.setUpDragAndDrop();
37749
+ handleInitialFilter.call(this);
36548
37750
  }
36549
37751
  componentDidRender() {
36550
37752
  updateHostInteraction(this);
@@ -36659,8 +37861,11 @@ class ValueList {
36659
37861
  "$members$": {
36660
37862
  "disabled": [516],
36661
37863
  "dragEnabled": [516, "drag-enabled"],
37864
+ "filteredItems": [1040],
37865
+ "filteredData": [1040],
36662
37866
  "filterEnabled": [516, "filter-enabled"],
36663
37867
  "filterPlaceholder": [513, "filter-placeholder"],
37868
+ "filterText": [1537, "filter-text"],
36664
37869
  "group": [513],
36665
37870
  "loading": [516],
36666
37871
  "multiple": [516],
@@ -36676,7 +37881,7 @@ class ValueList {
36676
37881
  },
36677
37882
  "$listeners$": [[0, "focusout", "calciteListFocusOutHandler"], [0, "calciteListItemRemove", "calciteListItemRemoveHandler"], [0, "calciteListItemChange", "calciteListItemChangeHandler"], [0, "calciteInternalListItemPropsChange", "calciteInternalListItemPropsChangeHandler"], [0, "calciteInternalListItemValueChange", "calciteInternalListItemValueChangeHandler"]],
36678
37883
  "$lazyBundleId$": "-",
36679
- "$attrsToReflect$": [["disabled", "disabled"], ["dragEnabled", "drag-enabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["group", "group"], ["loading", "loading"], ["multiple", "multiple"], ["selectionFollowsFocus", "selection-follows-focus"]]
37884
+ "$attrsToReflect$": [["disabled", "disabled"], ["dragEnabled", "drag-enabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["filterText", "filter-text"], ["group", "group"], ["loading", "loading"], ["multiple", "multiple"], ["selectionFollowsFocus", "selection-follows-focus"]]
36680
37885
  }; }
36681
37886
  }
36682
37887