@quantinuum/quantinuum-ui 4.0.1-fix-update-radix.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  2. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
  3. package/dist/node_modules/@radix-ui/number/dist/index.mjs.js +3 -4
  4. package/dist/node_modules/@radix-ui/number/dist/index.mjs.js.map +1 -1
  5. package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js +6 -9
  6. package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js.map +1 -1
  7. package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js +267 -279
  8. package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js.map +1 -1
  9. package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js +92 -114
  10. package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js.map +1 -1
  11. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js +138 -255
  12. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js.map +1 -1
  13. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js +130 -135
  14. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js.map +1 -1
  15. package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js +88 -66
  16. package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js.map +1 -1
  17. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  18. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  19. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +21 -34
  20. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -1
  21. package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js +93 -72
  22. package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js.map +1 -1
  23. package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js +254 -297
  24. package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js.map +1 -1
  25. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  26. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  27. package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js +6 -8
  28. package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js.map +1 -1
  29. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js +217 -190
  30. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js.map +1 -1
  31. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js +217 -243
  32. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js.map +1 -1
  33. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js +25 -26
  34. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js.map +1 -1
  35. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js +259 -191
  36. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js.map +1 -1
  37. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js +205 -224
  38. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js.map +1 -1
  39. package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js +14 -11
  40. package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js.map +1 -1
  41. package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js +14 -22
  42. package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js.map +1 -1
  43. package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js +820 -765
  44. package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js.map +1 -1
  45. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  46. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  47. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js +730 -717
  48. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js.map +1 -1
  49. package/dist/node_modules/@radix-ui/react-popover/dist/index.mjs.js +199 -268
  50. package/dist/node_modules/@radix-ui/react-popover/dist/index.mjs.js.map +1 -1
  51. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  52. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  53. package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js +223 -267
  54. package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js.map +1 -1
  55. package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js +10 -14
  56. package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js.map +1 -1
  57. package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js +121 -122
  58. package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js.map +1 -1
  59. package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js +83 -39
  60. package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +1 -1
  61. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  62. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  63. package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js +78 -77
  64. package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js.map +1 -1
  65. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js +217 -264
  66. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js.map +1 -1
  67. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js +216 -204
  68. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js.map +1 -1
  69. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.js +9 -9
  70. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/number/dist/index.mjs.js +7 -0
  71. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/number/dist/index.mjs.js.map +1 -0
  72. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs.js +12 -0
  73. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs.js.map +1 -0
  74. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +40 -0
  75. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -0
  76. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.js +64 -0
  77. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.js.map +1 -0
  78. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs.js +12 -0
  79. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs.js.map +1 -0
  80. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.js +132 -0
  81. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.js.map +1 -0
  82. package/dist/node_modules/{cmdk → @radix-ui/react-scroll-area}/node_modules/@radix-ui/react-primitive/dist/index.mjs.js +1 -1
  83. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +1 -0
  84. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs.js +90 -0
  85. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -0
  86. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js +13 -0
  87. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +1 -0
  88. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js +8 -0
  89. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +1 -0
  90. package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js +1079 -1080
  91. package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js.map +1 -1
  92. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
  93. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  94. package/dist/node_modules/@radix-ui/react-separator/dist/index.mjs.js +43 -26
  95. package/dist/node_modules/@radix-ui/react-separator/dist/index.mjs.js.map +1 -1
  96. package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.js +1 -1
  97. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +37 -0
  98. package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -0
  99. package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js +112 -140
  100. package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js.map +1 -1
  101. package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js +141 -173
  102. package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js.map +1 -1
  103. package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js +25 -34
  104. package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js.map +1 -1
  105. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js +145 -154
  106. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js.map +1 -1
  107. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js +491 -462
  108. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js.map +1 -1
  109. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs.js +78 -13
  110. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
  111. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js +15 -9
  112. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +1 -1
  113. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js +43 -66
  114. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js.map +1 -1
  115. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js +18 -15
  116. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js.map +1 -1
  117. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js +9 -5
  118. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +1 -1
  119. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js +18 -12
  120. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js.map +1 -1
  121. package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js +48 -37
  122. package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js.map +1 -1
  123. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js +23 -32
  124. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js.map +1 -1
  125. package/dist/node_modules/aria-hidden/dist/es2015/index.js +16 -22
  126. package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
  127. package/dist/node_modules/class-variance-authority/dist/index.mjs.js +9 -7
  128. package/dist/node_modules/class-variance-authority/dist/index.mjs.js.map +1 -1
  129. package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js +4 -0
  130. package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
  131. package/dist/node_modules/cmdk/dist/index.mjs.js +4 -8
  132. package/dist/node_modules/cmdk/dist/index.mjs.js.map +1 -1
  133. package/dist/node_modules/cmdk/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
  134. package/dist/node_modules/cmdk/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
  135. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
  136. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
  137. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
  138. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
  139. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
  140. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
  141. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
  142. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
  143. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
  144. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
  145. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
  146. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
  147. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
  148. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
  149. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
  150. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
  151. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
  152. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
  153. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
  154. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
  155. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
  156. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
  157. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
  158. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
  159. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
  160. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
  161. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
  162. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
  163. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
  164. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
  165. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -0
  166. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
  167. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
  168. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
  169. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
  170. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
  171. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
  172. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
  173. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
  174. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
  175. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/medium.js +9 -0
  176. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
  177. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/sidecar.js +10 -0
  178. package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
  179. package/dist/node_modules/command-score/index.js +138 -0
  180. package/dist/node_modules/command-score/index.js.map +1 -0
  181. package/dist/node_modules/input-otp/dist/index.mjs.js +1 -1
  182. package/dist/node_modules/input-otp/dist/index.mjs.js.map +1 -1
  183. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +5 -23
  184. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
  185. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
  186. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
  187. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +6 -18
  188. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
  189. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +5 -25
  190. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
  191. package/dist/node_modules/sonner/dist/index.mjs.js +26 -46
  192. package/dist/node_modules/sonner/dist/index.mjs.js.map +1 -1
  193. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -27
  194. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  195. package/dist/src/index.js +1 -1
  196. package/dist/src/shadcn/ui/accordion.js +7 -7
  197. package/dist/src/shadcn/ui/avatar.js +7 -7
  198. package/dist/src/shadcn/ui/checkbox.js +3 -3
  199. package/dist/src/shadcn/ui/command.js +15 -15
  200. package/dist/src/shadcn/ui/dialog.js +14 -14
  201. package/dist/src/shadcn/ui/dropdown-menu.js +23 -23
  202. package/dist/src/shadcn/ui/hover-card.js +5 -5
  203. package/dist/src/shadcn/ui/label.js +3 -3
  204. package/dist/src/shadcn/ui/navigation-menu.js +15 -15
  205. package/dist/src/shadcn/ui/navigation-menu.js.map +1 -1
  206. package/dist/src/shadcn/ui/popover.js +6 -32
  207. package/dist/src/shadcn/ui/popover.js.map +1 -1
  208. package/dist/src/shadcn/ui/progress.js +3 -3
  209. package/dist/src/shadcn/ui/radio-group.js +5 -5
  210. package/dist/src/shadcn/ui/select.js +19 -19
  211. package/dist/src/shadcn/ui/separator.js +3 -3
  212. package/dist/src/shadcn/ui/sheet.js +14 -14
  213. package/dist/src/shadcn/ui/switch.js +3 -3
  214. package/dist/src/shadcn/ui/tabs.js +8 -8
  215. package/dist/src/shadcn/ui/toggle-group.js +5 -5
  216. package/dist/src/shadcn/ui/toggle.js +3 -3
  217. package/dist/src/shadcn/ui/tooltip.js +7 -7
  218. package/dist/src/tailwindTheme.js +12 -12
  219. package/dist/src/tailwindTheme.js.map +1 -1
  220. package/dist/tailwind-manifest.js +10978 -9482
  221. package/dist/types/src/shadcn/ui/command.d.ts +8 -44
  222. package/dist/types/src/shadcn/ui/popover.d.ts +4 -8
  223. package/dist/types/src/shadcn/ui/sheet.d.ts +1 -1
  224. package/dist/types/src/tailwindTheme.d.ts +4 -6
  225. package/dist/types/tailwind.config.d.ts +4 -6
  226. package/package.json +31 -11
  227. package/dist/_virtual/index.js +0 -4
  228. package/dist/_virtual/index.js.map +0 -1
  229. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
  230. package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
  231. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
  232. package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
  233. package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js +0 -26
  234. package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js.map +0 -1
  235. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.js +0 -18
  236. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.js.map +0 -1
  237. package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs.js +0 -4
  238. package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs.js.map +0 -1
  239. package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +0 -1
  240. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -107
  241. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  242. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -78
  243. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  244. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
  245. package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
@@ -0,0 +1,233 @@
1
+ import _extends from '../../../../../@babel/runtime/helpers/esm/extends.js';
2
+ import { forwardRef, useContext, useState, useEffect, createElement, useRef, createContext } from 'react';
3
+ import { composeEventHandlers as $e42e1063c40fb3ef$export$b9ecd428b558ff10 } from '../../primitive/dist/index.module.js';
4
+ import { Primitive as $8927f6f2acc4f386$export$250ffa63cdc0d034, dispatchDiscreteCustomEvent as $8927f6f2acc4f386$export$6d1a0317bde7de7f } from '../../react-primitive/dist/index.module.js';
5
+ import { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../react-compose-refs/dist/index.module.js';
6
+ import { useCallbackRef as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from '../../react-use-callback-ref/dist/index.module.js';
7
+ import { useEscapeKeydown as $addc16e1bbe58fd0$export$3a72a57244d6e765 } from '../../react-use-escape-keydown/dist/index.module.js';
8
+
9
+ const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
10
+ const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
11
+ const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
12
+ let $5cb92bef7577960e$var$originalBodyPointerEvents;
13
+ const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ createContext({
14
+ layers: new Set(),
15
+ layersWithOutsidePointerEventsDisabled: new Set(),
16
+ branches: new Set()
17
+ });
18
+ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
19
+ const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
20
+ const context = useContext($5cb92bef7577960e$var$DismissableLayerContext);
21
+ const [node1, setNode] = useState(null);
22
+ const [, force] = useState({});
23
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
24
+ );
25
+ const layers = Array.from(context.layers);
26
+ const [highestLayerWithOutsidePointerEventsDisabled] = [
27
+ ...context.layersWithOutsidePointerEventsDisabled
28
+ ].slice(-1); // prettier-ignore
29
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
30
+ const index = node1 ? layers.indexOf(node1) : -1;
31
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
32
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
33
+ const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
34
+ const target = event.target;
35
+ const isPointerDownOnBranch = [
36
+ ...context.branches
37
+ ].some((branch)=>branch.contains(target)
38
+ );
39
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
40
+ onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
41
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
42
+ if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
43
+ });
44
+ const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
45
+ const target = event.target;
46
+ const isFocusInBranch = [
47
+ ...context.branches
48
+ ].some((branch)=>branch.contains(target)
49
+ );
50
+ if (isFocusInBranch) return;
51
+ onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
52
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
53
+ if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
54
+ });
55
+ $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
56
+ const isHighestLayer = index === context.layers.size - 1;
57
+ if (!isHighestLayer) return;
58
+ onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
59
+ if (!event.defaultPrevented && onDismiss) {
60
+ event.preventDefault();
61
+ onDismiss();
62
+ }
63
+ });
64
+ useEffect(()=>{
65
+ if (!node1) return;
66
+ if (disableOutsidePointerEvents) {
67
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
68
+ $5cb92bef7577960e$var$originalBodyPointerEvents = document.body.style.pointerEvents;
69
+ document.body.style.pointerEvents = 'none';
70
+ }
71
+ context.layersWithOutsidePointerEventsDisabled.add(node1);
72
+ }
73
+ context.layers.add(node1);
74
+ $5cb92bef7577960e$var$dispatchUpdate();
75
+ return ()=>{
76
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) document.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
77
+ };
78
+ }, [
79
+ node1,
80
+ disableOutsidePointerEvents,
81
+ context
82
+ ]);
83
+ /**
84
+ * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
85
+ * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
86
+ * and add it to the end again so the layering order wouldn't be _creation order_.
87
+ * We only want them to be removed from context stacks when unmounted.
88
+ */ useEffect(()=>{
89
+ return ()=>{
90
+ if (!node1) return;
91
+ context.layers.delete(node1);
92
+ context.layersWithOutsidePointerEventsDisabled.delete(node1);
93
+ $5cb92bef7577960e$var$dispatchUpdate();
94
+ };
95
+ }, [
96
+ node1,
97
+ context
98
+ ]);
99
+ useEffect(()=>{
100
+ const handleUpdate = ()=>force({})
101
+ ;
102
+ document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
103
+ return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
104
+ ;
105
+ }, []);
106
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
107
+ ref: composedRefs,
108
+ style: {
109
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
110
+ ...props.style
111
+ },
112
+ onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
113
+ onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
114
+ onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
115
+ }));
116
+ });
117
+ /* -----------------------------------------------------------------------------------------------*/ /**
118
+ * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
119
+ * to mimic layer dismissing behaviour present in OS.
120
+ * Returns props to pass to the node we want to check for outside events.
121
+ */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {
122
+ const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
123
+ const isPointerInsideReactTreeRef = useRef(false);
124
+ const handleClickRef = useRef(()=>{});
125
+ useEffect(()=>{
126
+ const handlePointerDown = (event)=>{
127
+ if (event.target && !isPointerInsideReactTreeRef.current) {
128
+ const eventDetail = {
129
+ originalEvent: event
130
+ };
131
+ function handleAndDispatchPointerDownOutsideEvent() {
132
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
133
+ discrete: true
134
+ });
135
+ }
136
+ /**
137
+ * On touch devices, we need to wait for a click event because browsers implement
138
+ * a ~350ms delay between the time the user stops touching the display and when the
139
+ * browser executres events. We need to ensure we don't reactivate pointer-events within
140
+ * this timeframe otherwise the browser may execute events that should have been prevented.
141
+ *
142
+ * Additionally, this also lets us deal automatically with cancellations when a click event
143
+ * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
144
+ *
145
+ * This is why we also continuously remove the previous listener, because we cannot be
146
+ * certain that it was raised, and therefore cleaned-up.
147
+ */ if (event.pointerType === 'touch') {
148
+ document.removeEventListener('click', handleClickRef.current);
149
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
150
+ document.addEventListener('click', handleClickRef.current, {
151
+ once: true
152
+ });
153
+ } else handleAndDispatchPointerDownOutsideEvent();
154
+ }
155
+ isPointerInsideReactTreeRef.current = false;
156
+ };
157
+ /**
158
+ * if this hook executes in a component that mounts via a `pointerdown` event, the event
159
+ * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
160
+ * this by delaying the event listener registration on the document.
161
+ * This is not React specific, but rather how the DOM works, ie:
162
+ * ```
163
+ * button.addEventListener('pointerdown', () => {
164
+ * console.log('I will log');
165
+ * document.addEventListener('pointerdown', () => {
166
+ * console.log('I will also log');
167
+ * })
168
+ * });
169
+ */ const timerId = window.setTimeout(()=>{
170
+ document.addEventListener('pointerdown', handlePointerDown);
171
+ }, 0);
172
+ return ()=>{
173
+ window.clearTimeout(timerId);
174
+ document.removeEventListener('pointerdown', handlePointerDown);
175
+ document.removeEventListener('click', handleClickRef.current);
176
+ };
177
+ }, [
178
+ handlePointerDownOutside
179
+ ]);
180
+ return {
181
+ // ensures we check React component tree (not just DOM tree)
182
+ onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
183
+ };
184
+ }
185
+ /**
186
+ * Listens for when focus happens outside a react subtree.
187
+ * Returns props to pass to the root (node) of the subtree we want to check.
188
+ */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside) {
189
+ const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
190
+ const isFocusInsideReactTreeRef = useRef(false);
191
+ useEffect(()=>{
192
+ const handleFocus = (event)=>{
193
+ if (event.target && !isFocusInsideReactTreeRef.current) {
194
+ const eventDetail = {
195
+ originalEvent: event
196
+ };
197
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
198
+ discrete: false
199
+ });
200
+ }
201
+ };
202
+ document.addEventListener('focusin', handleFocus);
203
+ return ()=>document.removeEventListener('focusin', handleFocus)
204
+ ;
205
+ }, [
206
+ handleFocusOutside
207
+ ]);
208
+ return {
209
+ onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
210
+ ,
211
+ onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
212
+ };
213
+ }
214
+ function $5cb92bef7577960e$var$dispatchUpdate() {
215
+ const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
216
+ document.dispatchEvent(event);
217
+ }
218
+ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
219
+ const target = detail.originalEvent.target;
220
+ const event = new CustomEvent(name, {
221
+ bubbles: false,
222
+ cancelable: true,
223
+ detail: detail
224
+ });
225
+ if (handler) target.addEventListener(name, handler, {
226
+ once: true
227
+ });
228
+ if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
229
+ else target.dispatchEvent(event);
230
+ }
231
+
232
+ export { $5cb92bef7577960e$export$177fb62ff3ec1f22 as DismissableLayer };
233
+ //# sourceMappingURL=index.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.js","sources":["../../../../../../../node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js"],"sourcesContent":["import $kqwpH$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef} from \"react\";\nimport {composeEventHandlers as $kqwpH$composeEventHandlers} from \"@radix-ui/primitive\";\nimport {Primitive as $kqwpH$Primitive, dispatchDiscreteCustomEvent as $kqwpH$dispatchDiscreteCustomEvent} from \"@radix-ui/react-primitive\";\nimport {useComposedRefs as $kqwpH$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {useCallbackRef as $kqwpH$useCallbackRef} from \"@radix-ui/react-use-callback-ref\";\nimport {useEscapeKeydown as $kqwpH$useEscapeKeydown} from \"@radix-ui/react-use-escape-keydown\";\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';\nconst $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\nlet $5cb92bef7577960e$var$originalBodyPointerEvents;\nconst $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ $kqwpH$createContext({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set()\n});\nconst $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ $kqwpH$forwardRef((props, forwardedRef)=>{\n const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;\n const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);\n const [node1, setNode] = $kqwpH$useState(null);\n const [, force] = $kqwpH$useState({});\n const composedRefs = $kqwpH$useComposedRefs(forwardedRef, (node)=>setNode(node)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n const index = node1 ? layers.indexOf(node1) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{\n const target = event.target;\n const isPointerDownOnBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n });\n const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{\n const target = event.target;\n const isFocusInBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (isFocusInBranch) return;\n onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n });\n $kqwpH$useEscapeKeydown((event)=>{\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n });\n $kqwpH$useEffect(()=>{\n if (!node1) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n $5cb92bef7577960e$var$originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node1);\n }\n context.layers.add(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n return ()=>{\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) document.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;\n };\n }, [\n node1,\n disableOutsidePointerEvents,\n context\n ]);\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */ $kqwpH$useEffect(()=>{\n return ()=>{\n if (!node1) return;\n context.layers.delete(node1);\n context.layersWithOutsidePointerEventsDisabled.delete(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n };\n }, [\n node1,\n context\n ]);\n $kqwpH$useEffect(()=>{\n const handleUpdate = ()=>force({})\n ;\n document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)\n ;\n }, []);\n return /*#__PURE__*/ $kqwpH$createElement($kqwpH$Primitive.div, $kqwpH$babelruntimehelpersesmextends({}, layerProps, {\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,\n ...props.style\n },\n onFocusCapture: $kqwpH$composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: $kqwpH$composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: $kqwpH$composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {\n displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';\nconst $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ $kqwpH$forwardRef((props, forwardedRef)=>{\n const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);\n const ref = $kqwpH$useRef(null);\n const composedRefs = $kqwpH$useComposedRefs(forwardedRef, ref);\n $kqwpH$useEffect(()=>{\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return ()=>{\n context.branches.delete(node);\n };\n }\n }, [\n context.branches\n ]);\n return /*#__PURE__*/ $kqwpH$createElement($kqwpH$Primitive.div, $kqwpH$babelruntimehelpersesmextends({}, props, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {\n displayName: $5cb92bef7577960e$var$BRANCH_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ /**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {\n const handlePointerDownOutside = $kqwpH$useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = $kqwpH$useRef(false);\n const handleClickRef = $kqwpH$useRef(()=>{});\n $kqwpH$useEffect(()=>{\n const handlePointerDown = (event)=>{\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n function handleAndDispatchPointerDownOutsideEvent() {\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {\n discrete: true\n });\n }\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */ if (event.pointerType === 'touch') {\n document.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n document.addEventListener('click', handleClickRef.current, {\n once: true\n });\n } else handleAndDispatchPointerDownOutsideEvent();\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */ const timerId = window.setTimeout(()=>{\n document.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return ()=>{\n window.clearTimeout(timerId);\n document.removeEventListener('pointerdown', handlePointerDown);\n document.removeEventListener('click', handleClickRef.current);\n };\n }, [\n handlePointerDownOutside\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true\n };\n}\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside) {\n const handleFocusOutside = $kqwpH$useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = $kqwpH$useRef(false);\n $kqwpH$useEffect(()=>{\n const handleFocus = (event)=>{\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n document.addEventListener('focusin', handleFocus);\n return ()=>document.removeEventListener('focusin', handleFocus)\n ;\n }, [\n handleFocusOutside\n ]);\n return {\n onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true\n ,\n onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false\n };\n}\nfunction $5cb92bef7577960e$var$dispatchUpdate() {\n const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail: detail\n });\n if (handler) target.addEventListener(name, handler, {\n once: true\n });\n if (discrete) $kqwpH$dispatchDiscreteCustomEvent(target, event);\n else target.dispatchEvent(event);\n}\nconst $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;\nconst $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;\n\n\n\n\nexport {$5cb92bef7577960e$export$177fb62ff3ec1f22 as DismissableLayer, $5cb92bef7577960e$export$4d5eb2109db14228 as DismissableLayerBranch, $5cb92bef7577960e$export$be92b6f5f03c0fe9 as Root, $5cb92bef7577960e$export$aecb2ddcb55c95be as Branch};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$kqwpH$createContext","$kqwpH$forwardRef","$kqwpH$useContext","$kqwpH$useState","$kqwpH$useComposedRefs","$kqwpH$useEscapeKeydown","$kqwpH$useEffect","$kqwpH$createElement","$kqwpH$Primitive","$kqwpH$babelruntimehelpersesmextends","$kqwpH$composeEventHandlers","$kqwpH$useCallbackRef","$kqwpH$useRef","$kqwpH$dispatchDiscreteCustomEvent"],"mappings":";;;;;;;;AAkBA,MAAM,oCAAoC,GAAG,yBAAyB,CAAC;AACvE,MAAM,0CAA0C,GAAG,qCAAqC,CAAC;AACzF,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AAC5E,IAAI,+CAA+C,CAAC;AACpD,MAAM,6CAA6C,iBAAiBA,aAAoB,CAAC;AACzF,IAAI,MAAM,EAAE,IAAI,GAAG,EAAE;AACrB,IAAI,sCAAsC,EAAE,IAAI,GAAG,EAAE;AACrD,IAAI,QAAQ,EAAE,IAAI,GAAG,EAAE;AACvB,CAAC,CAAC,CAAC;AACE,MAAC,yCAAyC,iBAAiBC,UAAiB,CAAC,CAAC,KAAK,EAAE,YAAY,GAAG;AACzG,IAAI,MAAM,EAAE,2BAA2B,EAAE,2BAA2B,GAAG,KAAK,GAAG,eAAe,EAAE,eAAe,GAAG,oBAAoB,EAAE,oBAAoB,GAAG,cAAc,EAAE,cAAc,GAAG,iBAAiB,EAAE,iBAAiB,GAA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7d1fb3fe6a$var$count = 0;
4
+ /**
5
+ * Injects a pair of focus guards at the edges of the whole DOM tree
6
+ * to ensure `focusin` & `focusout` events can be caught consistently.
7
+ */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
8
+ useEffect(()=>{
9
+ var _edgeGuards$, _edgeGuards$2;
10
+ const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
11
+ document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
12
+ document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
13
+ $3db38b7d1fb3fe6a$var$count++;
14
+ return ()=>{
15
+ if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
16
+ );
17
+ $3db38b7d1fb3fe6a$var$count--;
18
+ };
19
+ }, []);
20
+ }
21
+ function $3db38b7d1fb3fe6a$var$createFocusGuard() {
22
+ const element = document.createElement('span');
23
+ element.setAttribute('data-radix-focus-guard', '');
24
+ element.tabIndex = 0;
25
+ element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
26
+ return element;
27
+ }
28
+
29
+ export { $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c as useFocusGuards };
30
+ //# sourceMappingURL=index.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.js","sources":["../../../../../../../node_modules/cmdk/node_modules/@radix-ui/react-focus-guards/dist/index.module.js"],"sourcesContent":["import {useEffect as $1wErz$useEffect} from \"react\";\n\n\n/** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;\nfunction $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) {\n $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();\n return props.children;\n}\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {\n $1wErz$useEffect(()=>{\n var _edgeGuards$, _edgeGuards$2;\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());\n document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());\n $3db38b7d1fb3fe6a$var$count++;\n return ()=>{\n if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()\n );\n $3db38b7d1fb3fe6a$var$count--;\n };\n }, []);\n}\nfunction $3db38b7d1fb3fe6a$var$createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\nconst $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 = $3db38b7d1fb3fe6a$export$ac5b58043b79449b;\n\n\n\n\nexport {$3db38b7d1fb3fe6a$export$ac5b58043b79449b as FocusGuards, $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 as Root, $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c as useFocusGuards};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$1wErz$useEffect"],"mappings":";;AAGA,+EAA+E,IAAI,2BAA2B,GAAG,CAAC,CAAC;AAKnH;AACA;AACA;AACA,IAAI,SAAS,yCAAyC,GAAG;AACzD,IAAIA,SAAgB,CAAC,IAAI;AACzB,QAAQ,IAAI,YAAY,EAAE,aAAa,CAAC;AACxC,QAAQ,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AACjF,QAAQ,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,YAAY,EAAE,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,YAAY,GAAG,sCAAsC,EAAE,CAAC,CAAC;AACxL,QAAQ,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,CAAC,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,aAAa,GAAG,sCAAsC,EAAE,CAAC,CAAC;AAC1L,QAAQ,2BAA2B,EAAE,CAAC;AACtC,QAAQ,OAAO,IAAI;AACnB,YAAY,IAAI,2BAA2B,KAAK,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE;AACtI,aAAa,CAAC;AACd,YAAY,2BAA2B,EAAE,CAAC;AAC1C,SAAS,CAAC;AACV,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;AACD,SAAS,sCAAsC,GAAG;AAClD,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACnD,IAAI,OAAO,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;AACvD,IAAI,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACzB,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,kEAAkE,CAAC;AAC/F,IAAI,OAAO,OAAO,CAAC;AACnB;;;;"}
@@ -0,0 +1,252 @@
1
+ import _extends from '../../../../../@babel/runtime/helpers/esm/extends.js';
2
+ import { forwardRef, useState, useRef, useEffect, useCallback, createElement } from 'react';
3
+ import { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../react-compose-refs/dist/index.module.js';
4
+ import { Primitive as $8927f6f2acc4f386$export$250ffa63cdc0d034 } from '../../react-primitive/dist/index.module.js';
5
+ import { useCallbackRef as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from '../../react-use-callback-ref/dist/index.module.js';
6
+
7
+ const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
8
+ const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
9
+ const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
10
+ bubbles: false,
11
+ cancelable: true
12
+ };
13
+ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
14
+ const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
15
+ const [container1, setContainer] = useState(null);
16
+ const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
17
+ const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
18
+ const lastFocusedElementRef = useRef(null);
19
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
20
+ );
21
+ const focusScope = useRef({
22
+ paused: false,
23
+ pause () {
24
+ this.paused = true;
25
+ },
26
+ resume () {
27
+ this.paused = false;
28
+ }
29
+ }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
30
+ useEffect(()=>{
31
+ if (trapped) {
32
+ function handleFocusIn(event) {
33
+ if (focusScope.paused || !container1) return;
34
+ const target = event.target;
35
+ if (container1.contains(target)) lastFocusedElementRef.current = target;
36
+ else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
37
+ select: true
38
+ });
39
+ }
40
+ function handleFocusOut(event) {
41
+ if (focusScope.paused || !container1) return;
42
+ if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
43
+ select: true
44
+ });
45
+ }
46
+ document.addEventListener('focusin', handleFocusIn);
47
+ document.addEventListener('focusout', handleFocusOut);
48
+ return ()=>{
49
+ document.removeEventListener('focusin', handleFocusIn);
50
+ document.removeEventListener('focusout', handleFocusOut);
51
+ };
52
+ }
53
+ }, [
54
+ trapped,
55
+ container1,
56
+ focusScope.paused
57
+ ]);
58
+ useEffect(()=>{
59
+ if (container1) {
60
+ $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
61
+ const previouslyFocusedElement = document.activeElement;
62
+ const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
63
+ if (!hasFocusedCandidate) {
64
+ const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
65
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
66
+ container1.dispatchEvent(mountEvent);
67
+ if (!mountEvent.defaultPrevented) {
68
+ $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
69
+ select: true
70
+ });
71
+ if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
72
+ }
73
+ }
74
+ return ()=>{
75
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
76
+ // We need to delay the focus a little to get around it for now.
77
+ // See: https://github.com/facebook/react/issues/17894
78
+ setTimeout(()=>{
79
+ const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
80
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
81
+ container1.dispatchEvent(unmountEvent);
82
+ if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
83
+ select: true
84
+ });
85
+ // we need to remove the listener after we `dispatchEvent`
86
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
87
+ $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
88
+ }, 0);
89
+ };
90
+ }
91
+ }, [
92
+ container1,
93
+ onMountAutoFocus,
94
+ onUnmountAutoFocus,
95
+ focusScope
96
+ ]); // Takes care of looping focus (when tabbing whilst at the edges)
97
+ const handleKeyDown = useCallback((event)=>{
98
+ if (!loop && !trapped) return;
99
+ if (focusScope.paused) return;
100
+ const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
101
+ const focusedElement = document.activeElement;
102
+ if (isTabKey && focusedElement) {
103
+ const container = event.currentTarget;
104
+ const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
105
+ const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
106
+ if (!hasTabbableElementsInside) {
107
+ if (focusedElement === container) event.preventDefault();
108
+ } else {
109
+ if (!event.shiftKey && focusedElement === last) {
110
+ event.preventDefault();
111
+ if (loop) $d3863c46a17e8a28$var$focus(first, {
112
+ select: true
113
+ });
114
+ } else if (event.shiftKey && focusedElement === first) {
115
+ event.preventDefault();
116
+ if (loop) $d3863c46a17e8a28$var$focus(last, {
117
+ select: true
118
+ });
119
+ }
120
+ }
121
+ }
122
+ }, [
123
+ loop,
124
+ trapped,
125
+ focusScope.paused
126
+ ]);
127
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
128
+ tabIndex: -1
129
+ }, scopeProps, {
130
+ ref: composedRefs,
131
+ onKeyDown: handleKeyDown
132
+ }));
133
+ });
134
+ /* -------------------------------------------------------------------------------------------------
135
+ * Utils
136
+ * -----------------------------------------------------------------------------------------------*/ /**
137
+ * Attempts focusing the first element in a list of candidates.
138
+ * Stops when focus has actually moved.
139
+ */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
140
+ const previouslyFocusedElement = document.activeElement;
141
+ for (const candidate of candidates){
142
+ $d3863c46a17e8a28$var$focus(candidate, {
143
+ select: select
144
+ });
145
+ if (document.activeElement !== previouslyFocusedElement) return;
146
+ }
147
+ }
148
+ /**
149
+ * Returns the first and last tabbable elements inside a container.
150
+ */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
151
+ const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
152
+ const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
153
+ const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
154
+ return [
155
+ first,
156
+ last
157
+ ];
158
+ }
159
+ /**
160
+ * Returns a list of potential tabbable candidates.
161
+ *
162
+ * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
163
+ * elements are not visible. This cannot be worked out easily by just reading a property, but rather
164
+ * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
165
+ *
166
+ * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
167
+ * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
168
+ */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
169
+ const nodes = [];
170
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
171
+ acceptNode: (node)=>{
172
+ const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
173
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
174
+ // runtime's understanding of tabbability, so this automatically accounts
175
+ // for any kind of element that could be tabbed to.
176
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
177
+ }
178
+ });
179
+ while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
180
+ // hinders accessibility to have tab order different from visual order.
181
+ return nodes;
182
+ }
183
+ /**
184
+ * Returns the first visible element in a list.
185
+ * NOTE: Only checks visibility up to the `container`.
186
+ */ function $d3863c46a17e8a28$var$findVisible(elements, container) {
187
+ for (const element of elements){
188
+ // we stop checking if it's hidden at the `container` level (excluding)
189
+ if (!$d3863c46a17e8a28$var$isHidden(element, {
190
+ upTo: container
191
+ })) return element;
192
+ }
193
+ }
194
+ function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {
195
+ if (getComputedStyle(node).visibility === 'hidden') return true;
196
+ while(node){
197
+ // we stop at `upTo` (excluding it)
198
+ if (upTo !== undefined && node === upTo) return false;
199
+ if (getComputedStyle(node).display === 'none') return true;
200
+ node = node.parentElement;
201
+ }
202
+ return false;
203
+ }
204
+ function $d3863c46a17e8a28$var$isSelectableInput(element) {
205
+ return element instanceof HTMLInputElement && 'select' in element;
206
+ }
207
+ function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {
208
+ // only focus if that element is focusable
209
+ if (element && element.focus) {
210
+ const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
211
+ element.focus({
212
+ preventScroll: true
213
+ }); // only select if its not the same element, it supports selection and we need to select
214
+ if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
215
+ }
216
+ }
217
+ /* -------------------------------------------------------------------------------------------------
218
+ * FocusScope stack
219
+ * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
220
+ function $d3863c46a17e8a28$var$createFocusScopesStack() {
221
+ /** A stack of focus scopes, with the active one at the top */ let stack = [];
222
+ return {
223
+ add (focusScope) {
224
+ // pause the currently active focus scope (at the top of the stack)
225
+ const activeFocusScope = stack[0];
226
+ if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
227
+ // remove in case it already exists (because we'll re-add it at the top of the stack)
228
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
229
+ stack.unshift(focusScope);
230
+ },
231
+ remove (focusScope) {
232
+ var _stack$;
233
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
234
+ (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
235
+ }
236
+ };
237
+ }
238
+ function $d3863c46a17e8a28$var$arrayRemove(array, item) {
239
+ const updatedArray = [
240
+ ...array
241
+ ];
242
+ const index = updatedArray.indexOf(item);
243
+ if (index !== -1) updatedArray.splice(index, 1);
244
+ return updatedArray;
245
+ }
246
+ function $d3863c46a17e8a28$var$removeLinks(items) {
247
+ return items.filter((item)=>item.tagName !== 'A'
248
+ );
249
+ }
250
+
251
+ export { $d3863c46a17e8a28$export$20e40289641fbbb6 as FocusScope };
252
+ //# sourceMappingURL=index.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.js","sources":["../../../../../../../node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.module.js"],"sourcesContent":["import $45QHv$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $45QHv$forwardRef, useState as $45QHv$useState, useRef as $45QHv$useRef, useEffect as $45QHv$useEffect, useCallback as $45QHv$useCallback, createElement as $45QHv$createElement} from \"react\";\nimport {useComposedRefs as $45QHv$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {Primitive as $45QHv$Primitive} from \"@radix-ui/react-primitive\";\nimport {useCallbackRef as $45QHv$useCallbackRef} from \"@radix-ui/react-use-callback-ref\";\n\n\n\n\n\n\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst $d3863c46a17e8a28$var$EVENT_OPTIONS = {\n bubbles: false,\n cancelable: true\n};\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME = 'FocusScope';\nconst $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ $45QHv$forwardRef((props, forwardedRef)=>{\n const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;\n const [container1, setContainer] = $45QHv$useState(null);\n const onMountAutoFocus = $45QHv$useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = $45QHv$useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = $45QHv$useRef(null);\n const composedRefs = $45QHv$useComposedRefs(forwardedRef, (node)=>setContainer(node)\n );\n const focusScope = $45QHv$useRef({\n paused: false,\n pause () {\n this.paused = true;\n },\n resume () {\n this.paused = false;\n }\n }).current; // Takes care of trapping focus if focus is moved outside programmatically for example\n $45QHv$useEffect(()=>{\n if (trapped) {\n function handleFocusIn(event) {\n if (focusScope.paused || !container1) return;\n const target = event.target;\n if (container1.contains(target)) lastFocusedElementRef.current = target;\n else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n }\n function handleFocusOut(event) {\n if (focusScope.paused || !container1) return;\n if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n }\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n return ()=>{\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n };\n }\n }, [\n trapped,\n container1,\n focusScope.paused\n ]);\n $45QHv$useEffect(()=>{\n if (container1) {\n $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container1.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container1.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {\n select: true\n });\n if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);\n }\n }\n return ()=>{\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(()=>{\n const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container1.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {\n select: true\n });\n // we need to remove the listener after we `dispatchEvent`\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [\n container1,\n onMountAutoFocus,\n onUnmountAutoFocus,\n focusScope\n ]); // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = $45QHv$useCallback((event)=>{\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container = event.currentTarget;\n const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);\n const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(first, {\n select: true\n });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(last, {\n select: true\n });\n }\n }\n }\n }, [\n loop,\n trapped,\n focusScope.paused\n ]);\n return /*#__PURE__*/ $45QHv$createElement($45QHv$Primitive.div, $45QHv$babelruntimehelpersesmextends({\n tabIndex: -1\n }, scopeProps, {\n ref: composedRefs,\n onKeyDown: handleKeyDown\n }));\n});\n/*#__PURE__*/ Object.assign($d3863c46a17e8a28$export$20e40289641fbbb6, {\n displayName: $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates){\n $d3863c46a17e8a28$var$focus(candidate, {\n select: select\n });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n/**\n * Returns the first and last tabbable elements inside a container.\n */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {\n const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);\n const first = $d3863c46a17e8a28$var$findVisible(candidates, container);\n const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);\n return [\n first,\n last\n ];\n}\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node)=>{\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */ function $d3863c46a17e8a28$var$findVisible(elements, container) {\n for (const element of elements){\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!$d3863c46a17e8a28$var$isHidden(element, {\n upTo: container\n })) return element;\n }\n}\nfunction $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while(node){\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction $d3863c46a17e8a28$var$isSelectableInput(element) {\n return element instanceof HTMLInputElement && 'select' in element;\n}\nfunction $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({\n preventScroll: true\n }); // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();\n }\n}\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();\nfunction $d3863c46a17e8a28$var$createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */ let stack = [];\n return {\n add (focusScope) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove (focusScope) {\n var _stack$;\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();\n }\n };\n}\nfunction $d3863c46a17e8a28$var$arrayRemove(array, item) {\n const updatedArray = [\n ...array\n ];\n const index = updatedArray.indexOf(item);\n if (index !== -1) updatedArray.splice(index, 1);\n return updatedArray;\n}\nfunction $d3863c46a17e8a28$var$removeLinks(items) {\n return items.filter((item)=>item.tagName !== 'A'\n );\n}\nconst $d3863c46a17e8a28$export$be92b6f5f03c0fe9 = $d3863c46a17e8a28$export$20e40289641fbbb6;\n\n\n\n\nexport {$d3863c46a17e8a28$export$20e40289641fbbb6 as FocusScope, $d3863c46a17e8a28$export$be92b6f5f03c0fe9 as Root};\n//# sourceMappingURL=index.module.js.map\n"],"names":["$45QHv$forwardRef","$45QHv$useState","$45QHv$useCallbackRef","$45QHv$useRef","$45QHv$useComposedRefs","$45QHv$useEffect","$45QHv$useCallback","$45QHv$createElement","$45QHv$Primitive","$45QHv$babelruntimehelpersesmextends"],"mappings":";;;;;;AAWA,MAAM,wCAAwC,GAAG,6BAA6B,CAAC;AAC/E,MAAM,0CAA0C,GAAG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