@epilot/zenith-react 0.2.0-next.3 → 0.2.0-next.5

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 (274) hide show
  1. package/README.md +37 -1
  2. package/codemods/README.md +182 -0
  3. package/codemods/format.ts +86 -0
  4. package/codemods/migrate/base-elements/accordion.ts +132 -0
  5. package/codemods/migrate/base-elements/alert.ts +81 -0
  6. package/codemods/migrate/base-elements/avatar.ts +116 -0
  7. package/codemods/migrate/base-elements/button.ts +188 -0
  8. package/codemods/migrate/base-elements/checkbox.ts +17 -0
  9. package/codemods/migrate/base-elements/chip.ts +87 -0
  10. package/codemods/migrate/base-elements/chip360.ts +162 -0
  11. package/codemods/migrate/base-elements/circular-progress.ts +73 -0
  12. package/codemods/migrate/base-elements/dialog.ts +323 -0
  13. package/codemods/migrate/base-elements/divider.ts +61 -0
  14. package/codemods/migrate/base-elements/feedback-message.ts +95 -0
  15. package/codemods/migrate/base-elements/icon-button.ts +203 -0
  16. package/codemods/migrate/base-elements/index.ts +55 -0
  17. package/codemods/migrate/base-elements/mui-props.ts +29 -0
  18. package/codemods/migrate/base-elements/notification.ts +98 -0
  19. package/codemods/migrate/base-elements/paper.ts +78 -0
  20. package/codemods/migrate/base-elements/select.ts +328 -0
  21. package/codemods/migrate/base-elements/shared.ts +910 -0
  22. package/codemods/migrate/base-elements/skeleton.ts +83 -0
  23. package/codemods/migrate/base-elements/switch.ts +19 -0
  24. package/codemods/migrate/base-elements/tabs.ts +222 -0
  25. package/codemods/migrate/base-elements/text-field.ts +425 -0
  26. package/codemods/migrate/base-elements/toggle-button.ts +185 -0
  27. package/codemods/migrate/base-elements/tooltip.ts +231 -0
  28. package/codemods/migrate/base-elements/typography.ts +247 -0
  29. package/codemods/migrate/base-elements/unsupported.ts +277 -0
  30. package/codemods/migrate/from-base-elements.ts +26 -0
  31. package/codemods/migrate/from-volt.ts +26 -0
  32. package/codemods/migrate/lib/imports.ts +399 -0
  33. package/codemods/migrate/lib/jsx.ts +313 -0
  34. package/codemods/migrate/lib/run-migration.ts +528 -0
  35. package/codemods/migrate/lib/source.ts +6 -0
  36. package/codemods/migrate/lib/todo.ts +107 -0
  37. package/codemods/migrate/lib/types.ts +114 -0
  38. package/codemods/migrate/volt/class-helpers.ts +37 -0
  39. package/codemods/migrate/volt/index.ts +18 -0
  40. package/codemods/migrate/volt/pagination.ts +26 -0
  41. package/codemods/migrate/volt/same-name.ts +293 -0
  42. package/codemods/migrate/volt/stylesheets.ts +18 -0
  43. package/codemods/migrate/volt/tanstack-types.ts +20 -0
  44. package/codemods/radix-to-base-ui.ts +677 -0
  45. package/dist/_virtual/_zenith-runtime-family_accordion.js +7 -0
  46. package/dist/_virtual/_zenith-runtime-family_accordion.js.map +1 -0
  47. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js +7 -0
  48. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js.map +1 -0
  49. package/dist/_virtual/_zenith-runtime-family_avatar.js +7 -0
  50. package/dist/_virtual/_zenith-runtime-family_avatar.js.map +1 -0
  51. package/dist/_virtual/_zenith-runtime-family_button.js +7 -0
  52. package/dist/_virtual/_zenith-runtime-family_button.js.map +1 -0
  53. package/dist/_virtual/_zenith-runtime-family_checkbox.js +7 -0
  54. package/dist/_virtual/_zenith-runtime-family_checkbox.js.map +1 -0
  55. package/dist/_virtual/_zenith-runtime-family_csp-provider.js +7 -0
  56. package/dist/_virtual/_zenith-runtime-family_csp-provider.js.map +1 -0
  57. package/dist/_virtual/_zenith-runtime-family_dialog.js +7 -0
  58. package/dist/_virtual/_zenith-runtime-family_dialog.js.map +1 -0
  59. package/dist/_virtual/_zenith-runtime-family_direction-provider.js +8 -0
  60. package/dist/_virtual/_zenith-runtime-family_direction-provider.js.map +1 -0
  61. package/dist/_virtual/_zenith-runtime-family_menu.js +7 -0
  62. package/dist/_virtual/_zenith-runtime-family_menu.js.map +1 -0
  63. package/dist/_virtual/_zenith-runtime-family_merge-props.js +11 -0
  64. package/dist/_virtual/_zenith-runtime-family_merge-props.js.map +1 -0
  65. package/dist/_virtual/_zenith-runtime-family_popover.js +7 -0
  66. package/dist/_virtual/_zenith-runtime-family_popover.js.map +1 -0
  67. package/dist/_virtual/_zenith-runtime-family_radio-group.js +7 -0
  68. package/dist/_virtual/_zenith-runtime-family_radio-group.js.map +1 -0
  69. package/dist/_virtual/_zenith-runtime-family_radio.js +7 -0
  70. package/dist/_virtual/_zenith-runtime-family_radio.js.map +1 -0
  71. package/dist/_virtual/_zenith-runtime-family_scroll-area.js +7 -0
  72. package/dist/_virtual/_zenith-runtime-family_scroll-area.js.map +1 -0
  73. package/dist/_virtual/_zenith-runtime-family_select.js +7 -0
  74. package/dist/_virtual/_zenith-runtime-family_select.js.map +1 -0
  75. package/dist/_virtual/_zenith-runtime-family_separator.js +7 -0
  76. package/dist/_virtual/_zenith-runtime-family_separator.js.map +1 -0
  77. package/dist/_virtual/_zenith-runtime-family_switch.js +7 -0
  78. package/dist/_virtual/_zenith-runtime-family_switch.js.map +1 -0
  79. package/dist/_virtual/_zenith-runtime-family_tabs.js +7 -0
  80. package/dist/_virtual/_zenith-runtime-family_tabs.js.map +1 -0
  81. package/dist/_virtual/_zenith-runtime-family_toast.js +7 -0
  82. package/dist/_virtual/_zenith-runtime-family_toast.js.map +1 -0
  83. package/dist/_virtual/_zenith-runtime-family_toggle-group.js +7 -0
  84. package/dist/_virtual/_zenith-runtime-family_toggle-group.js.map +1 -0
  85. package/dist/_virtual/_zenith-runtime-family_toggle.js +7 -0
  86. package/dist/_virtual/_zenith-runtime-family_toggle.js.map +1 -0
  87. package/dist/_virtual/_zenith-runtime-family_tooltip.js +7 -0
  88. package/dist/_virtual/_zenith-runtime-family_tooltip.js.map +1 -0
  89. package/dist/_virtual/_zenith-runtime-family_use-render.js +7 -0
  90. package/dist/_virtual/_zenith-runtime-family_use-render.js.map +1 -0
  91. package/dist/components/accordion/accordion.js +179 -96
  92. package/dist/components/accordion/accordion.js.map +1 -1
  93. package/dist/components/alert-dialog/alert-dialog.js +243 -206
  94. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  95. package/dist/components/avatar/avatar.js +94 -82
  96. package/dist/components/avatar/avatar.js.map +1 -1
  97. package/dist/components/badge/badge.js +11 -11
  98. package/dist/components/breadcrumb/breadcrumb.js +69 -70
  99. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  100. package/dist/components/button/button.js +119 -102
  101. package/dist/components/button/button.js.map +1 -1
  102. package/dist/components/checkbox/checkbox.js +68 -51
  103. package/dist/components/checkbox/checkbox.js.map +1 -1
  104. package/dist/components/date-range-picker/date-range-picker.js +100 -90
  105. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  106. package/dist/components/date-time-picker/date-time-picker-input.js +118 -108
  107. package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
  108. package/dist/components/date-time-picker/date-time-picker-panel.js +91 -94
  109. package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
  110. package/dist/components/dialog/dialog.js +238 -228
  111. package/dist/components/dialog/dialog.js.map +1 -1
  112. package/dist/components/drawer/drawer.js +259 -321
  113. package/dist/components/drawer/drawer.js.map +1 -1
  114. package/dist/components/dropdown-menu/dropdown-menu.js +533 -279
  115. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  116. package/dist/components/field/field-combobox.js +205 -186
  117. package/dist/components/field/field-combobox.js.map +1 -1
  118. package/dist/components/field/field-select.js +37 -22
  119. package/dist/components/field/field-select.js.map +1 -1
  120. package/dist/components/list/list-sortable.js +104 -0
  121. package/dist/components/list/list-sortable.js.map +1 -0
  122. package/dist/components/list/list.js +246 -324
  123. package/dist/components/list/list.js.map +1 -1
  124. package/dist/components/option-card/option-card.js +121 -117
  125. package/dist/components/option-card/option-card.js.map +1 -1
  126. package/dist/components/pill/pill.js +7 -7
  127. package/dist/components/popover/popover.js +223 -127
  128. package/dist/components/popover/popover.js.map +1 -1
  129. package/dist/components/radio/radio-group-base.js +54 -0
  130. package/dist/components/radio/radio-group-base.js.map +1 -0
  131. package/dist/components/radio/radio.js +71 -60
  132. package/dist/components/radio/radio.js.map +1 -1
  133. package/dist/components/scroll-area/scroll-area.js +142 -108
  134. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  135. package/dist/components/scroll-overflow/scroll-overflow.js +156 -127
  136. package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
  137. package/dist/components/segmented-control/segmented-control.js +93 -81
  138. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  139. package/dist/components/select/select.js +485 -310
  140. package/dist/components/select/select.js.map +1 -1
  141. package/dist/components/separator/separator.js.map +1 -1
  142. package/dist/components/slot/compose-as-child.js +15 -12
  143. package/dist/components/slot/compose-as-child.js.map +1 -1
  144. package/dist/components/switch/switch.js +75 -68
  145. package/dist/components/switch/switch.js.map +1 -1
  146. package/dist/components/table/table-pagination.js +212 -175
  147. package/dist/components/table/table-pagination.js.map +1 -1
  148. package/dist/components/tabs/tabs.js +193 -190
  149. package/dist/components/tabs/tabs.js.map +1 -1
  150. package/dist/components/toast/toast.js +610 -148
  151. package/dist/components/toast/toast.js.map +1 -1
  152. package/dist/components/toggle/toggle-group.js +143 -32
  153. package/dist/components/toggle/toggle-group.js.map +1 -1
  154. package/dist/components/toggle/toggle.js +82 -49
  155. package/dist/components/toggle/toggle.js.map +1 -1
  156. package/dist/components/tooltip/tooltip.js +298 -138
  157. package/dist/components/tooltip/tooltip.js.map +1 -1
  158. package/dist/index.d.ts +2336 -2130
  159. package/dist/index.js +24 -23
  160. package/dist/list/sortable/index.d.ts +29 -0
  161. package/dist/list/sortable/index.js +5 -0
  162. package/dist/{_virtual → list/sortable}/index.js.map +1 -1
  163. package/dist/packages/tokens/dist/delivery/index.js +10 -10
  164. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  165. package/dist/packages/tokens/dist/generated/core.generated.js +6 -15
  166. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -1
  167. package/dist/packages/tokens/dist/generated/palette.generated.js +4 -5
  168. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  169. package/dist/packages/tokens/dist/generated/palette.meta.generated.js +5 -0
  170. package/dist/packages/tokens/dist/generated/palette.meta.generated.js.map +1 -0
  171. package/dist/packages/tokens/dist/install.js +40 -17
  172. package/dist/packages/tokens/dist/install.js.map +1 -1
  173. package/dist/renderer/runtime-contract.generated.js +8 -0
  174. package/dist/renderer/runtime-contract.generated.js.map +1 -0
  175. package/dist/renderer/served.js +39 -0
  176. package/dist/renderer/served.js.map +1 -0
  177. package/dist/tokens/core.meta.generated.js +2 -2
  178. package/dist/tokens/core.meta.generated.js.map +1 -1
  179. package/dist/tokens/index.d.ts +1028 -1028
  180. package/dist/tokens/index.js +863 -863
  181. package/dist/tokens/index.js.map +1 -1
  182. package/dist/tokens/palette.meta.generated.js +5 -0
  183. package/dist/tokens/palette.meta.generated.js.map +1 -0
  184. package/dist/tokens.json +1 -1
  185. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +57 -62
  186. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +1 -1
  187. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +32 -38
  188. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +1 -1
  189. package/package.json +29 -21
  190. package/scripts/migration-diagnostics-core.mjs +302 -10
  191. package/scripts/migration-diagnostics.mjs +31 -8
  192. package/scripts/migration-sweep.mjs +10 -10
  193. package/testing/setup.cjs +87 -0
  194. package/dist/_virtual/index.js +0 -6
  195. package/dist/_virtual/index2.js +0 -5
  196. package/dist/_virtual/index2.js.map +0 -1
  197. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
  198. package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
  199. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
  200. package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
  201. package/dist/tokens/palette.generated.js +0 -5
  202. package/dist/tokens/palette.generated.js.map +0 -1
  203. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js +0 -512
  204. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  205. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js +0 -396
  206. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  207. package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -233
  208. package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
  209. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
  210. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  211. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  212. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  213. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js +0 -7
  214. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js.map +0 -1
  215. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js +0 -240
  216. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js.map +0 -1
  217. package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js +0 -128
  218. package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js.map +0 -1
  219. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js +0 -25
  220. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js.map +0 -1
  221. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js +0 -76
  222. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js.map +0 -1
  223. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js +0 -252
  224. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js.map +0 -1
  225. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js +0 -121
  226. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js.map +0 -1
  227. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js +0 -49
  228. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js.map +0 -1
  229. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js +0 -11
  230. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js.map +0 -1
  231. package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js +0 -228
  232. package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js.map +0 -1
  233. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js +0 -653
  234. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js.map +0 -1
  235. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js +0 -244
  236. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js.map +0 -1
  237. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js +0 -222
  238. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js.map +0 -1
  239. package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js +0 -239
  240. package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js.map +0 -1
  241. package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js +0 -184
  242. package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js.map +0 -1
  243. package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js +0 -535
  244. package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js.map +0 -1
  245. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js +0 -863
  246. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js.map +0 -1
  247. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -63
  248. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
  249. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js +0 -133
  250. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js.map +0 -1
  251. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js +0 -164
  252. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js.map +0 -1
  253. package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js +0 -138
  254. package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js.map +0 -1
  255. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js +0 -34
  256. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js.map +0 -1
  257. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js +0 -340
  258. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js.map +0 -1
  259. package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js +0 -16
  260. package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js.map +0 -1
  261. package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js +0 -9
  262. package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js.map +0 -1
  263. package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js +0 -28
  264. package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js.map +0 -1
  265. package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js +0 -33
  266. package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js.map +0 -1
  267. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js +0 -747
  268. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js.map +0 -1
  269. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -68
  270. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  271. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -56
  272. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  273. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js +0 -11
  274. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js.map +0 -1
@@ -1,653 +0,0 @@
1
- import * as r from "react";
2
- import { composeEventHandlers as h } from "../../../../../@radix-ui_primitive@1.1.3/vendor/@radix-ui/primitive/dist/index.js";
3
- import { createCollection as $e } from "../../../../../@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js";
4
- import { useComposedRefs as N, composeRefs as qe } from "../../../../../@radix-ui_react-compose-refs@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-compose-refs/dist/index.js";
5
- import { createContextScope as Je } from "../../../../../@radix-ui_react-context@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-context/dist/index.js";
6
- import { useDirection as Qe } from "../../../../../@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js";
7
- import { DismissableLayer as et } from "../../../../../@radix-ui_react-dismissable-layer@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-dismissable-layer/dist/index.js";
8
- import { useFocusGuards as tt } from "../../../../../@radix-ui_react-focus-guards@1.1.3_0ac650c021fb1b59/vendor/@radix-ui/react-focus-guards/dist/index.js";
9
- import { FocusScope as nt } from "../../../../../@radix-ui_react-focus-scope@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-focus-scope/dist/index.js";
10
- import { useId as Me } from "../../../../../@radix-ui_react-id@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-id/dist/index.js";
11
- import { Root as ve, Anchor as ot, createPopperScope as Ce, Content as rt, Arrow as ct } from "../../../../../@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js";
12
- import { Portal as at } from "../../../../../@radix-ui_react-portal@1.1.9_2b23df507bdda662/vendor/@radix-ui/react-portal/dist/index.js";
13
- import { Presence as W } from "../../../../../@radix-ui_react-presence@1.1.5_2b23df507bdda662/vendor/@radix-ui/react-presence/dist/index.js";
14
- import { Primitive as F, dispatchDiscreteCustomEvent as st } from "../../../../../@radix-ui_react-primitive@2.1.3_2b23df507bdda662/vendor/@radix-ui/react-primitive/dist/index.js";
15
- import { Item as ut, Root as it, createRovingFocusGroupScope as ge } from "../../../../../@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js";
16
- import { createSlot as lt } from "../../../../../@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js";
17
- import { useCallbackRef as ee } from "../../../../../@radix-ui_react-use-callback-ref@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-callback-ref/dist/index.js";
18
- import { hideOthers as dt } from "../../../../../aria-hidden@1.2.6/vendor/aria-hidden/dist/es2015/index.js";
19
- import ft from "../../../../../react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/Combination.js";
20
- import { jsx as u } from "react/jsx-runtime";
21
- var Q = ["Enter", " "], mt = ["ArrowDown", "PageUp", "Home"], _e = ["ArrowUp", "PageDown", "End"], pt = [...mt, ..._e], Mt = {
22
- ltr: [...Q, "ArrowRight"],
23
- rtl: [...Q, "ArrowLeft"]
24
- }, ht = {
25
- ltr: ["ArrowLeft"],
26
- rtl: ["ArrowRight"]
27
- }, L = "Menu", [D, vt, Ct] = $e(L), [I, cn] = Je(L, [
28
- Ct,
29
- Ce,
30
- ge
31
- ]), K = Ce(), Re = ge(), [Se, E] = I(L), [gt, G] = I(L), Pe = (e) => {
32
- const { __scopeMenu: n, open: t = !1, children: o, dir: s, onOpenChange: a, modal: l = !0 } = e, p = K(n), [M, m] = r.useState(null), f = r.useRef(!1), c = ee(a), d = Qe(s);
33
- return r.useEffect(() => {
34
- const C = () => {
35
- f.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
36
- }, v = () => f.current = !1;
37
- return document.addEventListener("keydown", C, { capture: !0 }), () => {
38
- document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
39
- };
40
- }, []), /* @__PURE__ */ u(ve, { ...p, children: /* @__PURE__ */ u(
41
- Se,
42
- {
43
- scope: n,
44
- open: t,
45
- onOpenChange: c,
46
- content: M,
47
- onContentChange: m,
48
- children: /* @__PURE__ */ u(
49
- gt,
50
- {
51
- scope: n,
52
- onClose: r.useCallback(() => c(!1), [c]),
53
- isUsingKeyboardRef: f,
54
- dir: d,
55
- modal: l,
56
- children: o
57
- }
58
- )
59
- }
60
- ) });
61
- };
62
- Pe.displayName = L;
63
- var _t = "MenuAnchor", te = r.forwardRef(
64
- (e, n) => {
65
- const { __scopeMenu: t, ...o } = e, s = K(t);
66
- return /* @__PURE__ */ u(ot, { ...s, ...o, ref: n });
67
- }
68
- );
69
- te.displayName = _t;
70
- var ne = "MenuPortal", [Rt, Ee] = I(ne, {
71
- forceMount: void 0
72
- }), we = (e) => {
73
- const { __scopeMenu: n, forceMount: t, children: o, container: s } = e, a = E(ne, n);
74
- return /* @__PURE__ */ u(Rt, { scope: n, forceMount: t, children: /* @__PURE__ */ u(W, { present: t || a.open, children: /* @__PURE__ */ u(at, { asChild: !0, container: s, children: o }) }) });
75
- };
76
- we.displayName = ne;
77
- var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
78
- (e, n) => {
79
- const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu);
80
- return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || a.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: l.modal ? /* @__PURE__ */ u(Pt, { ...s, ref: n }) : /* @__PURE__ */ u(Et, { ...s, ref: n }) }) }) });
81
- }
82
- ), Pt = r.forwardRef(
83
- (e, n) => {
84
- const t = E(_, e.__scopeMenu), o = r.useRef(null), s = N(n, o);
85
- return r.useEffect(() => {
86
- const a = o.current;
87
- if (a) return dt(a);
88
- }, []), /* @__PURE__ */ u(
89
- re,
90
- {
91
- ...e,
92
- ref: s,
93
- trapFocus: t.open,
94
- disableOutsidePointerEvents: t.open,
95
- disableOutsideScroll: !0,
96
- onFocusOutside: h(
97
- e.onFocusOutside,
98
- (a) => a.preventDefault(),
99
- { checkForDefaultPrevented: !1 }
100
- ),
101
- onDismiss: () => t.onOpenChange(!1)
102
- }
103
- );
104
- }
105
- ), Et = r.forwardRef((e, n) => {
106
- const t = E(_, e.__scopeMenu);
107
- return /* @__PURE__ */ u(
108
- re,
109
- {
110
- ...e,
111
- ref: n,
112
- trapFocus: !1,
113
- disableOutsidePointerEvents: !1,
114
- disableOutsideScroll: !1,
115
- onDismiss: () => t.onOpenChange(!1)
116
- }
117
- );
118
- }), wt = lt("MenuContent.ScrollLock"), re = r.forwardRef(
119
- (e, n) => {
120
- const {
121
- __scopeMenu: t,
122
- loop: o = !1,
123
- trapFocus: s,
124
- onOpenAutoFocus: a,
125
- onCloseAutoFocus: l,
126
- disableOutsidePointerEvents: p,
127
- onEntryFocus: M,
128
- onEscapeKeyDown: m,
129
- onPointerDownOutside: f,
130
- onFocusOutside: c,
131
- onInteractOutside: d,
132
- onDismiss: C,
133
- disableOutsideScroll: v,
134
- ...w
135
- } = e, y = E(_, t), T = G(_, t), U = K(t), B = Re(t), ie = vt(t), [Xe, le] = r.useState(null), V = r.useRef(null), je = N(n, V, y.onContentChange), Y = r.useRef(0), X = r.useRef(""), He = r.useRef(0), Z = r.useRef(null), de = r.useRef("right"), $ = r.useRef(0), We = v ? ft : r.Fragment, ze = v ? { as: wt, allowPinchZoom: !0 } : void 0, Ze = (i) => {
136
- var b, me;
137
- const g = X.current + i, R = ie().filter((S) => !S.disabled), P = document.activeElement, q = (b = R.find((S) => S.ref.current === P)) == null ? void 0 : b.textValue, J = R.map((S) => S.textValue), fe = Lt(J, g, q), A = (me = R.find((S) => S.textValue === fe)) == null ? void 0 : me.ref.current;
138
- (function S(pe) {
139
- X.current = pe, window.clearTimeout(Y.current), pe !== "" && (Y.current = window.setTimeout(() => S(""), 1e3));
140
- })(g), A && setTimeout(() => A.focus());
141
- };
142
- r.useEffect(() => () => window.clearTimeout(Y.current), []), tt();
143
- const x = r.useCallback((i) => {
144
- var R, P;
145
- return de.current === ((R = Z.current) == null ? void 0 : R.side) && Gt(i, (P = Z.current) == null ? void 0 : P.area);
146
- }, []);
147
- return /* @__PURE__ */ u(
148
- St,
149
- {
150
- scope: t,
151
- searchRef: X,
152
- onItemEnter: r.useCallback(
153
- (i) => {
154
- x(i) && i.preventDefault();
155
- },
156
- [x]
157
- ),
158
- onItemLeave: r.useCallback(
159
- (i) => {
160
- var g;
161
- x(i) || ((g = V.current) == null || g.focus(), le(null));
162
- },
163
- [x]
164
- ),
165
- onTriggerLeave: r.useCallback(
166
- (i) => {
167
- x(i) && i.preventDefault();
168
- },
169
- [x]
170
- ),
171
- pointerGraceTimerRef: He,
172
- onPointerGraceIntentChange: r.useCallback((i) => {
173
- Z.current = i;
174
- }, []),
175
- children: /* @__PURE__ */ u(We, { ...ze, children: /* @__PURE__ */ u(
176
- nt,
177
- {
178
- asChild: !0,
179
- trapped: s,
180
- onMountAutoFocus: h(a, (i) => {
181
- var g;
182
- i.preventDefault(), (g = V.current) == null || g.focus({ preventScroll: !0 });
183
- }),
184
- onUnmountAutoFocus: l,
185
- children: /* @__PURE__ */ u(
186
- et,
187
- {
188
- asChild: !0,
189
- disableOutsidePointerEvents: p,
190
- onEscapeKeyDown: m,
191
- onPointerDownOutside: f,
192
- onFocusOutside: c,
193
- onInteractOutside: d,
194
- onDismiss: C,
195
- children: /* @__PURE__ */ u(
196
- it,
197
- {
198
- asChild: !0,
199
- ...B,
200
- dir: T.dir,
201
- orientation: "vertical",
202
- loop: o,
203
- currentTabStopId: Xe,
204
- onCurrentTabStopIdChange: le,
205
- onEntryFocus: h(M, (i) => {
206
- T.isUsingKeyboardRef.current || i.preventDefault();
207
- }),
208
- preventScrollOnEntryFocus: !0,
209
- children: /* @__PURE__ */ u(
210
- rt,
211
- {
212
- role: "menu",
213
- "aria-orientation": "vertical",
214
- "data-state": Ye(y.open),
215
- "data-radix-menu-content": "",
216
- dir: T.dir,
217
- ...U,
218
- ...w,
219
- ref: je,
220
- style: { outline: "none", ...w.style },
221
- onKeyDown: h(w.onKeyDown, (i) => {
222
- const R = i.target.closest("[data-radix-menu-content]") === i.currentTarget, P = i.ctrlKey || i.altKey || i.metaKey, q = i.key.length === 1;
223
- R && (i.key === "Tab" && i.preventDefault(), !P && q && Ze(i.key));
224
- const J = V.current;
225
- if (i.target !== J || !pt.includes(i.key)) return;
226
- i.preventDefault();
227
- const A = ie().filter((b) => !b.disabled).map((b) => b.ref.current);
228
- _e.includes(i.key) && A.reverse(), Nt(A);
229
- }),
230
- onBlur: h(e.onBlur, (i) => {
231
- i.currentTarget.contains(i.target) || (window.clearTimeout(Y.current), X.current = "");
232
- }),
233
- onPointerMove: h(
234
- e.onPointerMove,
235
- k((i) => {
236
- const g = i.target, R = $.current !== i.clientX;
237
- if (i.currentTarget.contains(g) && R) {
238
- const P = i.clientX > $.current ? "right" : "left";
239
- de.current = P, $.current = i.clientX;
240
- }
241
- })
242
- )
243
- }
244
- )
245
- }
246
- )
247
- }
248
- )
249
- }
250
- ) })
251
- }
252
- );
253
- }
254
- );
255
- Ie.displayName = _;
256
- var It = "MenuGroup", ce = r.forwardRef(
257
- (e, n) => {
258
- const { __scopeMenu: t, ...o } = e;
259
- return /* @__PURE__ */ u(F.div, { role: "group", ...o, ref: n });
260
- }
261
- );
262
- ce.displayName = It;
263
- var yt = "MenuLabel", ye = r.forwardRef(
264
- (e, n) => {
265
- const { __scopeMenu: t, ...o } = e;
266
- return /* @__PURE__ */ u(F.div, { ...o, ref: n });
267
- }
268
- );
269
- ye.displayName = yt;
270
- var j = "MenuItem", he = "menu.itemSelect", z = r.forwardRef(
271
- (e, n) => {
272
- const { disabled: t = !1, onSelect: o, ...s } = e, a = r.useRef(null), l = G(j, e.__scopeMenu), p = oe(j, e.__scopeMenu), M = N(n, a), m = r.useRef(!1), f = () => {
273
- const c = a.current;
274
- if (!t && c) {
275
- const d = new CustomEvent(he, { bubbles: !0, cancelable: !0 });
276
- c.addEventListener(he, (C) => o == null ? void 0 : o(C), { once: !0 }), st(c, d), d.defaultPrevented ? m.current = !1 : l.onClose();
277
- }
278
- };
279
- return /* @__PURE__ */ u(
280
- xe,
281
- {
282
- ...s,
283
- ref: M,
284
- disabled: t,
285
- onClick: h(e.onClick, f),
286
- onPointerDown: (c) => {
287
- var d;
288
- (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
289
- },
290
- onPointerUp: h(e.onPointerUp, (c) => {
291
- var d;
292
- m.current || (d = c.currentTarget) == null || d.click();
293
- }),
294
- onKeyDown: h(e.onKeyDown, (c) => {
295
- const d = p.searchRef.current !== "";
296
- t || d && c.key === " " || Q.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
297
- })
298
- }
299
- );
300
- }
301
- );
302
- z.displayName = j;
303
- var xe = r.forwardRef(
304
- (e, n) => {
305
- const { __scopeMenu: t, disabled: o = !1, textValue: s, ...a } = e, l = oe(j, t), p = Re(t), M = r.useRef(null), m = N(n, M), [f, c] = r.useState(!1), [d, C] = r.useState("");
306
- return r.useEffect(() => {
307
- const v = M.current;
308
- v && C((v.textContent ?? "").trim());
309
- }, [a.children]), /* @__PURE__ */ u(
310
- D.ItemSlot,
311
- {
312
- scope: t,
313
- disabled: o,
314
- textValue: s ?? d,
315
- children: /* @__PURE__ */ u(ut, { asChild: !0, ...p, focusable: !o, children: /* @__PURE__ */ u(
316
- F.div,
317
- {
318
- role: "menuitem",
319
- "data-highlighted": f ? "" : void 0,
320
- "aria-disabled": o || void 0,
321
- "data-disabled": o ? "" : void 0,
322
- ...a,
323
- ref: m,
324
- onPointerMove: h(
325
- e.onPointerMove,
326
- k((v) => {
327
- o ? l.onItemLeave(v) : (l.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
328
- })
329
- ),
330
- onPointerLeave: h(
331
- e.onPointerLeave,
332
- k((v) => l.onItemLeave(v))
333
- ),
334
- onFocus: h(e.onFocus, () => c(!0)),
335
- onBlur: h(e.onBlur, () => c(!1))
336
- }
337
- ) })
338
- }
339
- );
340
- }
341
- ), xt = "MenuCheckboxItem", be = r.forwardRef(
342
- (e, n) => {
343
- const { checked: t = !1, onCheckedChange: o, ...s } = e;
344
- return /* @__PURE__ */ u(ke, { scope: e.__scopeMenu, checked: t, children: /* @__PURE__ */ u(
345
- z,
346
- {
347
- role: "menuitemcheckbox",
348
- "aria-checked": H(t) ? "mixed" : t,
349
- ...s,
350
- ref: n,
351
- "data-state": ue(t),
352
- onSelect: h(
353
- s.onSelect,
354
- () => o == null ? void 0 : o(H(t) ? !0 : !t),
355
- { checkForDefaultPrevented: !1 }
356
- )
357
- }
358
- ) });
359
- }
360
- );
361
- be.displayName = xt;
362
- var Te = "MenuRadioGroup", [bt, Tt] = I(
363
- Te,
364
- { value: void 0, onValueChange: () => {
365
- } }
366
- ), Ae = r.forwardRef(
367
- (e, n) => {
368
- const { value: t, onValueChange: o, ...s } = e, a = ee(o);
369
- return /* @__PURE__ */ u(bt, { scope: e.__scopeMenu, value: t, onValueChange: a, children: /* @__PURE__ */ u(ce, { ...s, ref: n }) });
370
- }
371
- );
372
- Ae.displayName = Te;
373
- var Oe = "MenuRadioItem", De = r.forwardRef(
374
- (e, n) => {
375
- const { value: t, ...o } = e, s = Tt(Oe, e.__scopeMenu), a = t === s.value;
376
- return /* @__PURE__ */ u(ke, { scope: e.__scopeMenu, checked: a, children: /* @__PURE__ */ u(
377
- z,
378
- {
379
- role: "menuitemradio",
380
- "aria-checked": a,
381
- ...o,
382
- ref: n,
383
- "data-state": ue(a),
384
- onSelect: h(
385
- o.onSelect,
386
- () => {
387
- var l;
388
- return (l = s.onValueChange) == null ? void 0 : l.call(s, t);
389
- },
390
- { checkForDefaultPrevented: !1 }
391
- )
392
- }
393
- ) });
394
- }
395
- );
396
- De.displayName = Oe;
397
- var ae = "MenuItemIndicator", [ke, At] = I(
398
- ae,
399
- { checked: !1 }
400
- ), Ne = r.forwardRef(
401
- (e, n) => {
402
- const { __scopeMenu: t, forceMount: o, ...s } = e, a = At(ae, t);
403
- return /* @__PURE__ */ u(
404
- W,
405
- {
406
- present: o || H(a.checked) || a.checked === !0,
407
- children: /* @__PURE__ */ u(
408
- F.span,
409
- {
410
- ...s,
411
- ref: n,
412
- "data-state": ue(a.checked)
413
- }
414
- )
415
- }
416
- );
417
- }
418
- );
419
- Ne.displayName = ae;
420
- var Ot = "MenuSeparator", Fe = r.forwardRef(
421
- (e, n) => {
422
- const { __scopeMenu: t, ...o } = e;
423
- return /* @__PURE__ */ u(
424
- F.div,
425
- {
426
- role: "separator",
427
- "aria-orientation": "horizontal",
428
- ...o,
429
- ref: n
430
- }
431
- );
432
- }
433
- );
434
- Fe.displayName = Ot;
435
- var Dt = "MenuArrow", Le = r.forwardRef(
436
- (e, n) => {
437
- const { __scopeMenu: t, ...o } = e, s = K(t);
438
- return /* @__PURE__ */ u(ct, { ...s, ...o, ref: n });
439
- }
440
- );
441
- Le.displayName = Dt;
442
- var se = "MenuSub", [kt, Ke] = I(se), Ge = (e) => {
443
- const { __scopeMenu: n, children: t, open: o = !1, onOpenChange: s } = e, a = E(se, n), l = K(n), [p, M] = r.useState(null), [m, f] = r.useState(null), c = ee(s);
444
- return r.useEffect(() => (a.open === !1 && c(!1), () => c(!1)), [a.open, c]), /* @__PURE__ */ u(ve, { ...l, children: /* @__PURE__ */ u(
445
- Se,
446
- {
447
- scope: n,
448
- open: o,
449
- onOpenChange: c,
450
- content: m,
451
- onContentChange: f,
452
- children: /* @__PURE__ */ u(
453
- kt,
454
- {
455
- scope: n,
456
- contentId: Me(),
457
- triggerId: Me(),
458
- trigger: p,
459
- onTriggerChange: M,
460
- children: t
461
- }
462
- )
463
- }
464
- ) });
465
- };
466
- Ge.displayName = se;
467
- var O = "MenuSubTrigger", Ue = r.forwardRef(
468
- (e, n) => {
469
- const t = E(O, e.__scopeMenu), o = G(O, e.__scopeMenu), s = Ke(O, e.__scopeMenu), a = oe(O, e.__scopeMenu), l = r.useRef(null), { pointerGraceTimerRef: p, onPointerGraceIntentChange: M } = a, m = { __scopeMenu: e.__scopeMenu }, f = r.useCallback(() => {
470
- l.current && window.clearTimeout(l.current), l.current = null;
471
- }, []);
472
- return r.useEffect(() => f, [f]), r.useEffect(() => {
473
- const c = p.current;
474
- return () => {
475
- window.clearTimeout(c), M(null);
476
- };
477
- }, [p, M]), /* @__PURE__ */ u(te, { asChild: !0, ...m, children: /* @__PURE__ */ u(
478
- xe,
479
- {
480
- id: s.triggerId,
481
- "aria-haspopup": "menu",
482
- "aria-expanded": t.open,
483
- "aria-controls": s.contentId,
484
- "data-state": Ye(t.open),
485
- ...e,
486
- ref: qe(n, s.onTriggerChange),
487
- onClick: (c) => {
488
- var d;
489
- (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), t.open || t.onOpenChange(!0));
490
- },
491
- onPointerMove: h(
492
- e.onPointerMove,
493
- k((c) => {
494
- a.onItemEnter(c), !c.defaultPrevented && !e.disabled && !t.open && !l.current && (a.onPointerGraceIntentChange(null), l.current = window.setTimeout(() => {
495
- t.onOpenChange(!0), f();
496
- }, 100));
497
- })
498
- ),
499
- onPointerLeave: h(
500
- e.onPointerLeave,
501
- k((c) => {
502
- var C, v;
503
- f();
504
- const d = (C = t.content) == null ? void 0 : C.getBoundingClientRect();
505
- if (d) {
506
- const w = (v = t.content) == null ? void 0 : v.dataset.side, y = w === "right", T = y ? -5 : 5, U = d[y ? "left" : "right"], B = d[y ? "right" : "left"];
507
- a.onPointerGraceIntentChange({
508
- area: [
509
- // Apply a bleed on clientX to ensure that our exit point is
510
- // consistently within polygon bounds
511
- { x: c.clientX + T, y: c.clientY },
512
- { x: U, y: d.top },
513
- { x: B, y: d.top },
514
- { x: B, y: d.bottom },
515
- { x: U, y: d.bottom }
516
- ],
517
- side: w
518
- }), window.clearTimeout(p.current), p.current = window.setTimeout(
519
- () => a.onPointerGraceIntentChange(null),
520
- 300
521
- );
522
- } else {
523
- if (a.onTriggerLeave(c), c.defaultPrevented) return;
524
- a.onPointerGraceIntentChange(null);
525
- }
526
- })
527
- ),
528
- onKeyDown: h(e.onKeyDown, (c) => {
529
- var C;
530
- const d = a.searchRef.current !== "";
531
- e.disabled || d && c.key === " " || Mt[o.dir].includes(c.key) && (t.onOpenChange(!0), (C = t.content) == null || C.focus(), c.preventDefault());
532
- })
533
- }
534
- ) });
535
- }
536
- );
537
- Ue.displayName = O;
538
- var Be = "MenuSubContent", Ve = r.forwardRef(
539
- (e, n) => {
540
- const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu), p = Ke(Be, e.__scopeMenu), M = r.useRef(null), m = N(n, M);
541
- return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || a.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(
542
- re,
543
- {
544
- id: p.contentId,
545
- "aria-labelledby": p.triggerId,
546
- ...s,
547
- ref: m,
548
- align: "start",
549
- side: l.dir === "rtl" ? "left" : "right",
550
- disableOutsidePointerEvents: !1,
551
- disableOutsideScroll: !1,
552
- trapFocus: !1,
553
- onOpenAutoFocus: (f) => {
554
- var c;
555
- l.isUsingKeyboardRef.current && ((c = M.current) == null || c.focus()), f.preventDefault();
556
- },
557
- onCloseAutoFocus: (f) => f.preventDefault(),
558
- onFocusOutside: h(e.onFocusOutside, (f) => {
559
- f.target !== p.trigger && a.onOpenChange(!1);
560
- }),
561
- onEscapeKeyDown: h(e.onEscapeKeyDown, (f) => {
562
- l.onClose(), f.preventDefault();
563
- }),
564
- onKeyDown: h(e.onKeyDown, (f) => {
565
- var C;
566
- const c = f.currentTarget.contains(f.target), d = ht[l.dir].includes(f.key);
567
- c && d && (a.onOpenChange(!1), (C = p.trigger) == null || C.focus(), f.preventDefault());
568
- })
569
- }
570
- ) }) }) });
571
- }
572
- );
573
- Ve.displayName = Be;
574
- function Ye(e) {
575
- return e ? "open" : "closed";
576
- }
577
- function H(e) {
578
- return e === "indeterminate";
579
- }
580
- function ue(e) {
581
- return H(e) ? "indeterminate" : e ? "checked" : "unchecked";
582
- }
583
- function Nt(e) {
584
- const n = document.activeElement;
585
- for (const t of e)
586
- if (t === n || (t.focus(), document.activeElement !== n)) return;
587
- }
588
- function Ft(e, n) {
589
- return e.map((t, o) => e[(n + o) % e.length]);
590
- }
591
- function Lt(e, n, t) {
592
- const s = n.length > 1 && Array.from(n).every((m) => m === n[0]) ? n[0] : n, a = t ? e.indexOf(t) : -1;
593
- let l = Ft(e, Math.max(a, 0));
594
- s.length === 1 && (l = l.filter((m) => m !== t));
595
- const M = l.find(
596
- (m) => m.toLowerCase().startsWith(s.toLowerCase())
597
- );
598
- return M !== t ? M : void 0;
599
- }
600
- function Kt(e, n) {
601
- const { x: t, y: o } = e;
602
- let s = !1;
603
- for (let a = 0, l = n.length - 1; a < n.length; l = a++) {
604
- const p = n[a], M = n[l], m = p.x, f = p.y, c = M.x, d = M.y;
605
- f > o != d > o && t < (c - m) * (o - f) / (d - f) + m && (s = !s);
606
- }
607
- return s;
608
- }
609
- function Gt(e, n) {
610
- if (!n) return !1;
611
- const t = { x: e.clientX, y: e.clientY };
612
- return Kt(t, n);
613
- }
614
- function k(e) {
615
- return (n) => n.pointerType === "mouse" ? e(n) : void 0;
616
- }
617
- var an = Pe, sn = te, un = we, ln = Ie, dn = ce, fn = ye, mn = z, pn = be, Mn = Ae, hn = De, vn = Ne, Cn = Fe, gn = Le, _n = Ge, Rn = Ue, Sn = Ve;
618
- export {
619
- sn as Anchor,
620
- gn as Arrow,
621
- pn as CheckboxItem,
622
- ln as Content,
623
- dn as Group,
624
- mn as Item,
625
- vn as ItemIndicator,
626
- fn as Label,
627
- Pe as Menu,
628
- te as MenuAnchor,
629
- Le as MenuArrow,
630
- be as MenuCheckboxItem,
631
- Ie as MenuContent,
632
- ce as MenuGroup,
633
- z as MenuItem,
634
- Ne as MenuItemIndicator,
635
- ye as MenuLabel,
636
- we as MenuPortal,
637
- Ae as MenuRadioGroup,
638
- De as MenuRadioItem,
639
- Fe as MenuSeparator,
640
- Ge as MenuSub,
641
- Ve as MenuSubContent,
642
- Ue as MenuSubTrigger,
643
- un as Portal,
644
- Mn as RadioGroup,
645
- hn as RadioItem,
646
- an as Root,
647
- Cn as Separator,
648
- _n as Sub,
649
- Sn as SubContent,
650
- Rn as SubTrigger,
651
- cn as createMenuScope
652
- };
653
- //# sourceMappingURL=index.js.map