@devalok/shilp-sutra 0.1.0

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 (488) hide show
  1. package/dist/composed/avatar-group.d.ts +17 -0
  2. package/dist/composed/avatar-group.d.ts.map +1 -0
  3. package/dist/composed/avatar-group.js +103 -0
  4. package/dist/composed/command-palette.d.ts +29 -0
  5. package/dist/composed/command-palette.d.ts.map +1 -0
  6. package/dist/composed/command-palette.js +215 -0
  7. package/dist/composed/content-card.d.ts +15 -0
  8. package/dist/composed/content-card.d.ts.map +1 -0
  9. package/dist/composed/content-card.js +108 -0
  10. package/dist/composed/date-picker/calendar-grid.d.ts +21 -0
  11. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -0
  12. package/dist/composed/date-picker/calendar-grid.js +173 -0
  13. package/dist/composed/date-picker/date-picker.d.ts +14 -0
  14. package/dist/composed/date-picker/date-picker.d.ts.map +1 -0
  15. package/dist/composed/date-picker/date-picker.js +123 -0
  16. package/dist/composed/date-picker/date-range-picker.d.ts +23 -0
  17. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -0
  18. package/dist/composed/date-picker/date-range-picker.js +166 -0
  19. package/dist/composed/date-picker/date-time-picker.d.ts +24 -0
  20. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -0
  21. package/dist/composed/date-picker/date-time-picker.js +192 -0
  22. package/dist/composed/date-picker/index.d.ts +18 -0
  23. package/dist/composed/date-picker/index.d.ts.map +1 -0
  24. package/dist/composed/date-picker/month-picker.d.ts +10 -0
  25. package/dist/composed/date-picker/month-picker.d.ts.map +1 -0
  26. package/dist/composed/date-picker/month-picker.js +52 -0
  27. package/dist/composed/date-picker/presets.d.ts +9 -0
  28. package/dist/composed/date-picker/presets.d.ts.map +1 -0
  29. package/dist/composed/date-picker/presets.js +83 -0
  30. package/dist/composed/date-picker/time-picker.d.ts +24 -0
  31. package/dist/composed/date-picker/time-picker.d.ts.map +1 -0
  32. package/dist/composed/date-picker/time-picker.js +180 -0
  33. package/dist/composed/date-picker/use-calendar.d.ts +9 -0
  34. package/dist/composed/date-picker/use-calendar.d.ts.map +1 -0
  35. package/dist/composed/date-picker/use-calendar.js +16 -0
  36. package/dist/composed/date-picker/year-picker.d.ts +10 -0
  37. package/dist/composed/date-picker/year-picker.d.ts.map +1 -0
  38. package/dist/composed/date-picker/year-picker.js +44 -0
  39. package/dist/composed/empty-state.d.ts +12 -0
  40. package/dist/composed/empty-state.d.ts.map +1 -0
  41. package/dist/composed/empty-state.js +74 -0
  42. package/dist/composed/error-boundary.d.ts +8 -0
  43. package/dist/composed/error-boundary.d.ts.map +1 -0
  44. package/dist/composed/error-boundary.js +114 -0
  45. package/dist/composed/global-loading.d.ts +7 -0
  46. package/dist/composed/global-loading.d.ts.map +1 -0
  47. package/dist/composed/global-loading.js +43 -0
  48. package/dist/composed/index.d.ts +28 -0
  49. package/dist/composed/index.d.ts.map +1 -0
  50. package/dist/composed/index.js +54 -0
  51. package/dist/composed/lib/string-utils.d.ts +6 -0
  52. package/dist/composed/lib/string-utils.d.ts.map +1 -0
  53. package/dist/composed/lib/string-utils.js +7 -0
  54. package/dist/composed/loading-skeleton.d.ts +22 -0
  55. package/dist/composed/loading-skeleton.d.ts.map +1 -0
  56. package/dist/composed/loading-skeleton.js +164 -0
  57. package/dist/composed/member-picker.d.ts +17 -0
  58. package/dist/composed/member-picker.d.ts.map +1 -0
  59. package/dist/composed/member-picker.js +81 -0
  60. package/dist/composed/page-header.d.ts +15 -0
  61. package/dist/composed/page-header.d.ts.map +1 -0
  62. package/dist/composed/page-header.js +65 -0
  63. package/dist/composed/page-skeletons.d.ts +6 -0
  64. package/dist/composed/page-skeletons.d.ts.map +1 -0
  65. package/dist/composed/page-skeletons.js +128 -0
  66. package/dist/composed/priority-indicator.d.ts +12 -0
  67. package/dist/composed/priority-indicator.d.ts.map +1 -0
  68. package/dist/composed/priority-indicator.js +86 -0
  69. package/dist/composed/rich-text-editor.d.ts +16 -0
  70. package/dist/composed/rich-text-editor.d.ts.map +1 -0
  71. package/dist/composed/rich-text-editor.js +222 -0
  72. package/dist/composed/status-badge.d.ts +13 -0
  73. package/dist/composed/status-badge.d.ts.map +1 -0
  74. package/dist/composed/status-badge.js +69 -0
  75. package/dist/hooks/index.d.ts +4 -0
  76. package/dist/hooks/index.d.ts.map +1 -0
  77. package/dist/hooks/use-color-mode.d.ts +7 -0
  78. package/dist/hooks/use-color-mode.d.ts.map +1 -0
  79. package/dist/hooks/use-color-mode.js +23 -0
  80. package/dist/hooks/use-mobile.d.ts +2 -0
  81. package/dist/hooks/use-mobile.d.ts.map +1 -0
  82. package/dist/hooks/use-mobile.js +14 -0
  83. package/dist/hooks/use-toast.d.ts +46 -0
  84. package/dist/hooks/use-toast.d.ts.map +1 -0
  85. package/dist/hooks/use-toast.js +97 -0
  86. package/dist/primitives/_internal/number.d.ts +7 -0
  87. package/dist/primitives/_internal/number.d.ts.map +1 -0
  88. package/dist/primitives/_internal/number.js +6 -0
  89. package/dist/primitives/_internal/primitive.d.ts +17 -0
  90. package/dist/primitives/_internal/primitive.d.ts.map +1 -0
  91. package/dist/primitives/_internal/primitive.js +9 -0
  92. package/dist/primitives/_internal/react-arrow.d.ts +14 -0
  93. package/dist/primitives/_internal/react-arrow.d.ts.map +1 -0
  94. package/dist/primitives/_internal/react-arrow.js +24 -0
  95. package/dist/primitives/_internal/react-collection.d.ts +22 -0
  96. package/dist/primitives/_internal/react-collection.d.ts.map +1 -0
  97. package/dist/primitives/_internal/react-collection.js +48 -0
  98. package/dist/primitives/_internal/react-compose-refs.d.ts +10 -0
  99. package/dist/primitives/_internal/react-compose-refs.d.ts.map +1 -0
  100. package/dist/primitives/_internal/react-compose-refs.js +29 -0
  101. package/dist/primitives/_internal/react-context.d.ts +25 -0
  102. package/dist/primitives/_internal/react-context.d.ts.map +1 -0
  103. package/dist/primitives/_internal/react-context.js +74 -0
  104. package/dist/primitives/_internal/react-direction.d.ts +16 -0
  105. package/dist/primitives/_internal/react-direction.d.ts.map +1 -0
  106. package/dist/primitives/_internal/react-direction.js +10 -0
  107. package/dist/primitives/_internal/react-dismissable-layer.d.ts +30 -0
  108. package/dist/primitives/_internal/react-dismissable-layer.d.ts.map +1 -0
  109. package/dist/primitives/_internal/react-dismissable-layer.js +131 -0
  110. package/dist/primitives/_internal/react-focus-guards.d.ts +12 -0
  111. package/dist/primitives/_internal/react-focus-guards.d.ts.map +1 -0
  112. package/dist/primitives/_internal/react-focus-guards.js +17 -0
  113. package/dist/primitives/_internal/react-focus-scope.d.ts +18 -0
  114. package/dist/primitives/_internal/react-focus-scope.d.ts.map +1 -0
  115. package/dist/primitives/_internal/react-focus-scope.js +137 -0
  116. package/dist/primitives/_internal/react-id.d.ts +7 -0
  117. package/dist/primitives/_internal/react-id.d.ts.map +1 -0
  118. package/dist/primitives/_internal/react-id.js +14 -0
  119. package/dist/primitives/_internal/react-popper.d.ts +50 -0
  120. package/dist/primitives/_internal/react-popper.d.ts.map +1 -0
  121. package/dist/primitives/_internal/react-popper.js +199 -0
  122. package/dist/primitives/_internal/react-portal.d.ts +15 -0
  123. package/dist/primitives/_internal/react-portal.d.ts.map +1 -0
  124. package/dist/primitives/_internal/react-portal.js +16 -0
  125. package/dist/primitives/_internal/react-presence.d.ts +16 -0
  126. package/dist/primitives/_internal/react-presence.d.ts.map +1 -0
  127. package/dist/primitives/_internal/react-presence.js +71 -0
  128. package/dist/primitives/_internal/react-primitive.d.ts +20 -0
  129. package/dist/primitives/_internal/react-primitive.d.ts.map +1 -0
  130. package/dist/primitives/_internal/react-primitive.js +36 -0
  131. package/dist/primitives/_internal/react-use-callback-ref.d.ts +7 -0
  132. package/dist/primitives/_internal/react-use-callback-ref.d.ts.map +1 -0
  133. package/dist/primitives/_internal/react-use-callback-ref.js +13 -0
  134. package/dist/primitives/_internal/react-use-controllable-state.d.ts +16 -0
  135. package/dist/primitives/_internal/react-use-controllable-state.d.ts.map +1 -0
  136. package/dist/primitives/_internal/react-use-controllable-state.js +44 -0
  137. package/dist/primitives/_internal/react-use-effect-event.d.ts +8 -0
  138. package/dist/primitives/_internal/react-use-effect-event.d.ts.map +1 -0
  139. package/dist/primitives/_internal/react-use-escape-keydown.d.ts +7 -0
  140. package/dist/primitives/_internal/react-use-escape-keydown.d.ts.map +1 -0
  141. package/dist/primitives/_internal/react-use-escape-keydown.js +14 -0
  142. package/dist/primitives/_internal/react-use-is-hydrated.d.ts +7 -0
  143. package/dist/primitives/_internal/react-use-is-hydrated.d.ts.map +1 -0
  144. package/dist/primitives/_internal/react-use-is-hydrated.js +15 -0
  145. package/dist/primitives/_internal/react-use-layout-effect.d.ts +8 -0
  146. package/dist/primitives/_internal/react-use-layout-effect.d.ts.map +1 -0
  147. package/dist/primitives/_internal/react-use-layout-effect.js +6 -0
  148. package/dist/primitives/_internal/react-use-previous.d.ts +7 -0
  149. package/dist/primitives/_internal/react-use-previous.d.ts.map +1 -0
  150. package/dist/primitives/_internal/react-use-previous.js +8 -0
  151. package/dist/primitives/_internal/react-use-rect.d.ts +4 -0
  152. package/dist/primitives/_internal/react-use-rect.d.ts.map +1 -0
  153. package/dist/primitives/_internal/react-use-size.d.ts +10 -0
  154. package/dist/primitives/_internal/react-use-size.d.ts.map +1 -0
  155. package/dist/primitives/_internal/react-use-size.js +27 -0
  156. package/dist/primitives/_internal/rect.d.ts +12 -0
  157. package/dist/primitives/_internal/rect.d.ts.map +1 -0
  158. package/dist/primitives/react-accordion.js +239 -0
  159. package/dist/primitives/react-alert-dialog.js +127 -0
  160. package/dist/primitives/react-aspect-ratio.js +43 -0
  161. package/dist/primitives/react-avatar.js +75 -0
  162. package/dist/primitives/react-checkbox.js +251 -0
  163. package/dist/primitives/react-collapsible.js +120 -0
  164. package/dist/primitives/react-context-menu.js +240 -0
  165. package/dist/primitives/react-dialog.js +262 -0
  166. package/dist/primitives/react-dropdown-menu.js +227 -0
  167. package/dist/primitives/react-hover-card.js +187 -0
  168. package/dist/primitives/react-label.js +20 -0
  169. package/dist/primitives/react-menu.js +652 -0
  170. package/dist/primitives/react-menubar.js +355 -0
  171. package/dist/primitives/react-navigation-menu.js +607 -0
  172. package/dist/primitives/react-popover.js +243 -0
  173. package/dist/primitives/react-progress.js +84 -0
  174. package/dist/primitives/react-radio-group.js +238 -0
  175. package/dist/primitives/react-roving-focus.js +183 -0
  176. package/dist/primitives/react-select.js +862 -0
  177. package/dist/primitives/react-separator.js +24 -0
  178. package/dist/primitives/react-slider.js +437 -0
  179. package/dist/primitives/react-slot.d.ts +27 -0
  180. package/dist/primitives/react-slot.d.ts.map +1 -0
  181. package/dist/primitives/react-slot.js +70 -0
  182. package/dist/primitives/react-switch.js +132 -0
  183. package/dist/primitives/react-tabs.js +163 -0
  184. package/dist/primitives/react-toast.js +446 -0
  185. package/dist/primitives/react-toggle-group.js +137 -0
  186. package/dist/primitives/react-toggle.js +33 -0
  187. package/dist/primitives/react-tooltip.js +338 -0
  188. package/dist/primitives/react-visually-hidden.js +32 -0
  189. package/dist/shell/app-command-palette.d.ts +35 -0
  190. package/dist/shell/app-command-palette.d.ts.map +1 -0
  191. package/dist/shell/app-command-palette.js +196 -0
  192. package/dist/shell/bottom-navbar.d.ts +35 -0
  193. package/dist/shell/bottom-navbar.d.ts.map +1 -0
  194. package/dist/shell/bottom-navbar.js +160 -0
  195. package/dist/shell/index.d.ts +7 -0
  196. package/dist/shell/index.d.ts.map +1 -0
  197. package/dist/shell/index.js +14 -0
  198. package/dist/shell/notification-center.d.ts +50 -0
  199. package/dist/shell/notification-center.d.ts.map +1 -0
  200. package/dist/shell/notification-center.js +221 -0
  201. package/dist/shell/notification-preferences.d.ts +41 -0
  202. package/dist/shell/notification-preferences.d.ts.map +1 -0
  203. package/dist/shell/notification-preferences.js +183 -0
  204. package/dist/shell/sidebar.d.ts +51 -0
  205. package/dist/shell/sidebar.d.ts.map +1 -0
  206. package/dist/shell/sidebar.js +101 -0
  207. package/dist/shell/top-bar.d.ts +33 -0
  208. package/dist/shell/top-bar.d.ts.map +1 -0
  209. package/dist/shell/top-bar.js +140 -0
  210. package/dist/tailwind/index.d.ts +2 -0
  211. package/dist/tailwind/index.d.ts.map +1 -0
  212. package/dist/tailwind/index.js +4 -0
  213. package/dist/tailwind/preset.d.ts +4 -0
  214. package/dist/tailwind/preset.d.ts.map +1 -0
  215. package/dist/tailwind/preset.js +310 -0
  216. package/dist/tokens/index.css +3 -0
  217. package/dist/tokens/primitives.css +189 -0
  218. package/dist/tokens/semantic.css +426 -0
  219. package/dist/tokens/typography-semantic.css +100 -0
  220. package/dist/tokens/typography.css +393 -0
  221. package/dist/ui/accordion.d.ts +53 -0
  222. package/dist/ui/accordion.d.ts.map +1 -0
  223. package/dist/ui/accordion.js +46 -0
  224. package/dist/ui/alert-dialog.d.ts +21 -0
  225. package/dist/ui/alert-dialog.d.ts.map +1 -0
  226. package/dist/ui/alert-dialog.js +117 -0
  227. package/dist/ui/alert.d.ts +47 -0
  228. package/dist/ui/alert.d.ts.map +1 -0
  229. package/dist/ui/alert.js +52 -0
  230. package/dist/ui/aspect-ratio.d.ts +4 -0
  231. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  232. package/dist/ui/aspect-ratio.js +6 -0
  233. package/dist/ui/autocomplete.d.ts +49 -0
  234. package/dist/ui/autocomplete.d.ts.map +1 -0
  235. package/dist/ui/autocomplete.js +124 -0
  236. package/dist/ui/avatar.d.ts +51 -0
  237. package/dist/ui/avatar.d.ts.map +1 -0
  238. package/dist/ui/avatar.js +91 -0
  239. package/dist/ui/badge.d.ts +43 -0
  240. package/dist/ui/badge.d.ts.map +1 -0
  241. package/dist/ui/badge.js +64 -0
  242. package/dist/ui/banner.d.ts +43 -0
  243. package/dist/ui/banner.d.ts.map +1 -0
  244. package/dist/ui/banner.js +50 -0
  245. package/dist/ui/breadcrumb.d.ts +20 -0
  246. package/dist/ui/breadcrumb.d.ts.map +1 -0
  247. package/dist/ui/breadcrumb.js +83 -0
  248. package/dist/ui/button-group.d.ts +51 -0
  249. package/dist/ui/button-group.d.ts.map +1 -0
  250. package/dist/ui/button-group.js +41 -0
  251. package/dist/ui/button.d.ts +63 -0
  252. package/dist/ui/button.d.ts.map +1 -0
  253. package/dist/ui/button.js +105 -0
  254. package/dist/ui/card.d.ts +64 -0
  255. package/dist/ui/card.d.ts.map +1 -0
  256. package/dist/ui/card.js +79 -0
  257. package/dist/ui/charts/_internal/animation.d.ts +5 -0
  258. package/dist/ui/charts/_internal/animation.d.ts.map +1 -0
  259. package/dist/ui/charts/_internal/animation.js +17 -0
  260. package/dist/ui/charts/_internal/axes.d.ts +17 -0
  261. package/dist/ui/charts/_internal/axes.d.ts.map +1 -0
  262. package/dist/ui/charts/_internal/axes.js +41 -0
  263. package/dist/ui/charts/_internal/colors.d.ts +8 -0
  264. package/dist/ui/charts/_internal/colors.d.ts.map +1 -0
  265. package/dist/ui/charts/_internal/colors.js +20 -0
  266. package/dist/ui/charts/_internal/grid-lines.d.ts +16 -0
  267. package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -0
  268. package/dist/ui/charts/_internal/grid-lines.js +42 -0
  269. package/dist/ui/charts/_internal/legend.d.ts +15 -0
  270. package/dist/ui/charts/_internal/legend.d.ts.map +1 -0
  271. package/dist/ui/charts/_internal/legend.js +28 -0
  272. package/dist/ui/charts/_internal/scales.d.ts +5 -0
  273. package/dist/ui/charts/_internal/scales.d.ts.map +1 -0
  274. package/dist/ui/charts/_internal/tooltip.d.ts +23 -0
  275. package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -0
  276. package/dist/ui/charts/_internal/tooltip.js +38 -0
  277. package/dist/ui/charts/_internal/types.d.ts +17 -0
  278. package/dist/ui/charts/_internal/types.d.ts.map +1 -0
  279. package/dist/ui/charts/_internal/types.js +9 -0
  280. package/dist/ui/charts/area-chart.d.ts +39 -0
  281. package/dist/ui/charts/area-chart.d.ts.map +1 -0
  282. package/dist/ui/charts/area-chart.js +244 -0
  283. package/dist/ui/charts/bar-chart.d.ts +41 -0
  284. package/dist/ui/charts/bar-chart.d.ts.map +1 -0
  285. package/dist/ui/charts/bar-chart.js +152 -0
  286. package/dist/ui/charts/chart-container.d.ts +20 -0
  287. package/dist/ui/charts/chart-container.d.ts.map +1 -0
  288. package/dist/ui/charts/chart-container.js +26 -0
  289. package/dist/ui/charts/gauge-chart.d.ts +32 -0
  290. package/dist/ui/charts/gauge-chart.d.ts.map +1 -0
  291. package/dist/ui/charts/gauge-chart.js +71 -0
  292. package/dist/ui/charts/index.d.ts +10 -0
  293. package/dist/ui/charts/index.d.ts.map +1 -0
  294. package/dist/ui/charts/line-chart.d.ts +37 -0
  295. package/dist/ui/charts/line-chart.d.ts.map +1 -0
  296. package/dist/ui/charts/line-chart.js +162 -0
  297. package/dist/ui/charts/pie-chart.d.ts +37 -0
  298. package/dist/ui/charts/pie-chart.d.ts.map +1 -0
  299. package/dist/ui/charts/pie-chart.js +131 -0
  300. package/dist/ui/charts/radar-chart.d.ts +34 -0
  301. package/dist/ui/charts/radar-chart.d.ts.map +1 -0
  302. package/dist/ui/charts/radar-chart.js +222 -0
  303. package/dist/ui/charts/sparkline.d.ts +22 -0
  304. package/dist/ui/charts/sparkline.d.ts.map +1 -0
  305. package/dist/ui/charts/sparkline.js +123 -0
  306. package/dist/ui/checkbox.d.ts +36 -0
  307. package/dist/ui/checkbox.d.ts.map +1 -0
  308. package/dist/ui/checkbox.js +33 -0
  309. package/dist/ui/chip.d.ts +66 -0
  310. package/dist/ui/chip.d.ts.map +1 -0
  311. package/dist/ui/chip.js +105 -0
  312. package/dist/ui/code.d.ts +30 -0
  313. package/dist/ui/code.d.ts.map +1 -0
  314. package/dist/ui/code.js +32 -0
  315. package/dist/ui/collapsible.d.ts +7 -0
  316. package/dist/ui/collapsible.d.ts.map +1 -0
  317. package/dist/ui/collapsible.js +21 -0
  318. package/dist/ui/combobox.d.ts +76 -0
  319. package/dist/ui/combobox.d.ts.map +1 -0
  320. package/dist/ui/combobox.js +286 -0
  321. package/dist/ui/container.d.ts +10 -0
  322. package/dist/ui/container.d.ts.map +1 -0
  323. package/dist/ui/container.js +24 -0
  324. package/dist/ui/context-menu.d.ts +28 -0
  325. package/dist/ui/context-menu.d.ts.map +1 -0
  326. package/dist/ui/context-menu.js +145 -0
  327. package/dist/ui/data-table-toolbar.d.ts +16 -0
  328. package/dist/ui/data-table-toolbar.d.ts.map +1 -0
  329. package/dist/ui/data-table-toolbar.js +136 -0
  330. package/dist/ui/data-table.d.ts +111 -0
  331. package/dist/ui/data-table.d.ts.map +1 -0
  332. package/dist/ui/data-table.js +491 -0
  333. package/dist/ui/dialog.d.ts +74 -0
  334. package/dist/ui/dialog.d.ts.map +1 -0
  335. package/dist/ui/dialog.js +110 -0
  336. package/dist/ui/dropdown-menu.d.ts +88 -0
  337. package/dist/ui/dropdown-menu.d.ts.map +1 -0
  338. package/dist/ui/dropdown-menu.js +144 -0
  339. package/dist/ui/file-upload.d.ts +67 -0
  340. package/dist/ui/file-upload.d.ts.map +1 -0
  341. package/dist/ui/file-upload.js +226 -0
  342. package/dist/ui/form.d.ts +56 -0
  343. package/dist/ui/form.d.ts.map +1 -0
  344. package/dist/ui/form.js +46 -0
  345. package/dist/ui/hover-card.d.ts +7 -0
  346. package/dist/ui/hover-card.d.ts.map +1 -0
  347. package/dist/ui/hover-card.js +23 -0
  348. package/dist/ui/icon-button.d.ts +46 -0
  349. package/dist/ui/icon-button.d.ts.map +1 -0
  350. package/dist/ui/icon-button.js +26 -0
  351. package/dist/ui/index.d.ts +68 -0
  352. package/dist/ui/index.d.ts.map +1 -0
  353. package/dist/ui/index.js +344 -0
  354. package/dist/ui/input-otp.d.ts +35 -0
  355. package/dist/ui/input-otp.d.ts.map +1 -0
  356. package/dist/ui/input-otp.js +48 -0
  357. package/dist/ui/input.d.ts +44 -0
  358. package/dist/ui/input.d.ts.map +1 -0
  359. package/dist/ui/input.js +58 -0
  360. package/dist/ui/label.d.ts +8 -0
  361. package/dist/ui/label.d.ts.map +1 -0
  362. package/dist/ui/label.js +23 -0
  363. package/dist/ui/lib/motion.d.ts +10 -0
  364. package/dist/ui/lib/motion.d.ts.map +1 -0
  365. package/dist/ui/lib/motion.js +32 -0
  366. package/dist/ui/lib/slot.d.ts +8 -0
  367. package/dist/ui/lib/slot.d.ts.map +1 -0
  368. package/dist/ui/lib/use-reduced-motion.d.ts +3 -0
  369. package/dist/ui/lib/use-reduced-motion.d.ts.map +1 -0
  370. package/dist/ui/lib/use-reduced-motion.js +14 -0
  371. package/dist/ui/lib/use-ripple.d.ts +13 -0
  372. package/dist/ui/lib/use-ripple.d.ts.map +1 -0
  373. package/dist/ui/lib/use-ripple.js +13 -0
  374. package/dist/ui/lib/utils.d.ts +3 -0
  375. package/dist/ui/lib/utils.d.ts.map +1 -0
  376. package/dist/ui/lib/utils.js +15 -0
  377. package/dist/ui/link.d.ts +8 -0
  378. package/dist/ui/link.d.ts.map +1 -0
  379. package/dist/ui/link.js +24 -0
  380. package/dist/ui/menubar.d.ts +29 -0
  381. package/dist/ui/menubar.d.ts.map +1 -0
  382. package/dist/ui/menubar.js +176 -0
  383. package/dist/ui/navigation-menu.d.ts +12 -0
  384. package/dist/ui/navigation-menu.d.ts.map +1 -0
  385. package/dist/ui/navigation-menu.js +103 -0
  386. package/dist/ui/number-input.d.ts +40 -0
  387. package/dist/ui/number-input.d.ts.map +1 -0
  388. package/dist/ui/number-input.js +80 -0
  389. package/dist/ui/pagination.d.ts +74 -0
  390. package/dist/ui/pagination.d.ts.map +1 -0
  391. package/dist/ui/pagination.js +159 -0
  392. package/dist/ui/popover.d.ts +8 -0
  393. package/dist/ui/popover.d.ts.map +1 -0
  394. package/dist/ui/popover.js +24 -0
  395. package/dist/ui/progress.d.ts +49 -0
  396. package/dist/ui/progress.d.ts.map +1 -0
  397. package/dist/ui/progress.js +75 -0
  398. package/dist/ui/radio.d.ts +6 -0
  399. package/dist/ui/radio.d.ts.map +1 -0
  400. package/dist/ui/radio.js +29 -0
  401. package/dist/ui/search-input.d.ts +44 -0
  402. package/dist/ui/search-input.d.ts.map +1 -0
  403. package/dist/ui/search-input.js +63 -0
  404. package/dist/ui/segmented-control.d.ts +122 -0
  405. package/dist/ui/segmented-control.d.ts.map +1 -0
  406. package/dist/ui/segmented-control.js +270 -0
  407. package/dist/ui/select.d.ts +49 -0
  408. package/dist/ui/select.d.ts.map +1 -0
  409. package/dist/ui/select.js +132 -0
  410. package/dist/ui/separator.d.ts +5 -0
  411. package/dist/ui/separator.d.ts.map +1 -0
  412. package/dist/ui/separator.js +24 -0
  413. package/dist/ui/sheet.d.ts +108 -0
  414. package/dist/ui/sheet.d.ts.map +1 -0
  415. package/dist/ui/sheet.js +110 -0
  416. package/dist/ui/sidebar.d.ts +67 -0
  417. package/dist/ui/sidebar.d.ts.map +1 -0
  418. package/dist/ui/sidebar.js +562 -0
  419. package/dist/ui/skeleton.d.ts +40 -0
  420. package/dist/ui/skeleton.d.ts.map +1 -0
  421. package/dist/ui/skeleton.js +36 -0
  422. package/dist/ui/slider.d.ts +5 -0
  423. package/dist/ui/slider.d.ts.map +1 -0
  424. package/dist/ui/slider.js +29 -0
  425. package/dist/ui/spinner.d.ts +38 -0
  426. package/dist/ui/spinner.d.ts.map +1 -0
  427. package/dist/ui/spinner.js +47 -0
  428. package/dist/ui/stack.d.ts +15 -0
  429. package/dist/ui/stack.d.ts.map +1 -0
  430. package/dist/ui/stack.js +41 -0
  431. package/dist/ui/stat-card.d.ts +54 -0
  432. package/dist/ui/stat-card.d.ts.map +1 -0
  433. package/dist/ui/stat-card.js +52 -0
  434. package/dist/ui/stepper.d.ts +57 -0
  435. package/dist/ui/stepper.d.ts.map +1 -0
  436. package/dist/ui/stepper.js +90 -0
  437. package/dist/ui/switch.d.ts +5 -0
  438. package/dist/ui/switch.d.ts.map +1 -0
  439. package/dist/ui/switch.js +27 -0
  440. package/dist/ui/table.d.ts +11 -0
  441. package/dist/ui/table.d.ts.map +1 -0
  442. package/dist/ui/table.js +91 -0
  443. package/dist/ui/tabs.d.ts +81 -0
  444. package/dist/ui/tabs.d.ts.map +1 -0
  445. package/dist/ui/tabs.js +74 -0
  446. package/dist/ui/text.d.ts +47 -0
  447. package/dist/ui/text.d.ts.map +1 -0
  448. package/dist/ui/text.js +59 -0
  449. package/dist/ui/textarea.d.ts +40 -0
  450. package/dist/ui/textarea.d.ts.map +1 -0
  451. package/dist/ui/textarea.js +47 -0
  452. package/dist/ui/toast.d.ts +32 -0
  453. package/dist/ui/toast.d.ts.map +1 -0
  454. package/dist/ui/toast.js +98 -0
  455. package/dist/ui/toaster.d.ts +42 -0
  456. package/dist/ui/toaster.d.ts.map +1 -0
  457. package/dist/ui/toaster.js +23 -0
  458. package/dist/ui/toggle-group.d.ts +13 -0
  459. package/dist/ui/toggle-group.d.ts.map +1 -0
  460. package/dist/ui/toggle-group.js +40 -0
  461. package/dist/ui/toggle.d.ts +13 -0
  462. package/dist/ui/toggle.d.ts.map +1 -0
  463. package/dist/ui/toggle.js +37 -0
  464. package/dist/ui/tooltip.d.ts +8 -0
  465. package/dist/ui/tooltip.d.ts.map +1 -0
  466. package/dist/ui/tooltip.js +23 -0
  467. package/dist/ui/transitions.d.ts +16 -0
  468. package/dist/ui/transitions.d.ts.map +1 -0
  469. package/dist/ui/transitions.js +100 -0
  470. package/dist/ui/tree-view/index.d.ts +4 -0
  471. package/dist/ui/tree-view/index.d.ts.map +1 -0
  472. package/dist/ui/tree-view/tree-item.d.ts +22 -0
  473. package/dist/ui/tree-view/tree-item.d.ts.map +1 -0
  474. package/dist/ui/tree-view/tree-item.js +136 -0
  475. package/dist/ui/tree-view/tree-view.d.ts +29 -0
  476. package/dist/ui/tree-view/tree-view.d.ts.map +1 -0
  477. package/dist/ui/tree-view/tree-view.js +139 -0
  478. package/dist/ui/tree-view/use-tree.d.ts +26 -0
  479. package/dist/ui/tree-view/use-tree.d.ts.map +1 -0
  480. package/dist/ui/tree-view/use-tree.js +37 -0
  481. package/dist/ui/visually-hidden.d.ts +6 -0
  482. package/dist/ui/visually-hidden.d.ts.map +1 -0
  483. package/dist/ui/visually-hidden.js +10 -0
  484. package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
  485. package/fonts/GoogleSans-Variable.ttf +0 -0
  486. package/fonts/Ranade-Variable.ttf +0 -0
  487. package/fonts/Ranade-VariableItalic.ttf +0 -0
  488. package/package.json +83 -0
@@ -0,0 +1,607 @@
1
+ import * as a from "react";
2
+ import Ie from "react-dom";
3
+ import { createContextScope as ye } from "./_internal/react-context.js";
4
+ import { composeEventHandlers as I } from "./_internal/primitive.js";
5
+ import { Primitive as _, dispatchDiscreteCustomEvent as Q } from "./_internal/react-primitive.js";
6
+ import { useControllableState as oe } from "./_internal/react-use-controllable-state.js";
7
+ import { useComposedRefs as k, composeRefs as be } from "./_internal/react-compose-refs.js";
8
+ import { useDirection as _e } from "./_internal/react-direction.js";
9
+ import { Presence as K } from "./_internal/react-presence.js";
10
+ import { useId as re } from "./_internal/react-id.js";
11
+ import { createCollection as ie } from "./_internal/react-collection.js";
12
+ import { DismissableLayer as Pe } from "./_internal/react-dismissable-layer.js";
13
+ import { usePrevious as xe } from "./_internal/react-use-previous.js";
14
+ import { useLayoutEffect as G } from "./_internal/react-use-layout-effect.js";
15
+ import { useCallbackRef as S } from "./_internal/react-use-callback-ref.js";
16
+ import { Root as De } from "./react-visually-hidden.js";
17
+ import { jsx as l, jsxs as Z, Fragment as ee } from "react/jsx-runtime";
18
+ var A = "NavigationMenu", [$, ae, Se] = ie(A), [z, Ae, Oe] = ie(A), [Y] = ye(
19
+ A,
20
+ [Se, Oe]
21
+ ), [ke, b] = Y(A), [Fe, Le] = Y(A), se = a.forwardRef(
22
+ (e, t) => {
23
+ const {
24
+ __scopeNavigationMenu: r,
25
+ value: i,
26
+ onValueChange: n,
27
+ defaultValue: o,
28
+ delayDuration: s = 200,
29
+ skipDelayDuration: d = 300,
30
+ orientation: c = "horizontal",
31
+ dir: R,
32
+ ...u
33
+ } = e, [g, h] = a.useState(null), E = k(t, (w) => h(w)), C = _e(R), p = a.useRef(0), M = a.useRef(0), T = a.useRef(0), [P, f] = a.useState(!0), [m, v] = oe({
34
+ prop: i,
35
+ onChange: (w) => {
36
+ const D = w !== "", V = d > 0;
37
+ D ? (window.clearTimeout(T.current), V && f(!1)) : (window.clearTimeout(T.current), T.current = window.setTimeout(
38
+ () => f(!0),
39
+ d
40
+ )), n == null || n(w);
41
+ },
42
+ defaultProp: o ?? "",
43
+ caller: A
44
+ }), N = a.useCallback(() => {
45
+ window.clearTimeout(M.current), M.current = window.setTimeout(() => v(""), 150);
46
+ }, [v]), y = a.useCallback(
47
+ (w) => {
48
+ window.clearTimeout(M.current), v(w);
49
+ },
50
+ [v]
51
+ ), x = a.useCallback(
52
+ (w) => {
53
+ m === w ? window.clearTimeout(M.current) : p.current = window.setTimeout(() => {
54
+ window.clearTimeout(M.current), v(w);
55
+ }, s);
56
+ },
57
+ [m, v, s]
58
+ );
59
+ return a.useEffect(() => () => {
60
+ window.clearTimeout(p.current), window.clearTimeout(M.current), window.clearTimeout(T.current);
61
+ }, []), /* @__PURE__ */ l(
62
+ ce,
63
+ {
64
+ scope: r,
65
+ isRootMenu: !0,
66
+ value: m,
67
+ dir: C,
68
+ orientation: c,
69
+ rootNavigationMenu: g,
70
+ onTriggerEnter: (w) => {
71
+ window.clearTimeout(p.current), P ? x(w) : y(w);
72
+ },
73
+ onTriggerLeave: () => {
74
+ window.clearTimeout(p.current), N();
75
+ },
76
+ onContentEnter: () => window.clearTimeout(M.current),
77
+ onContentLeave: N,
78
+ onItemSelect: (w) => {
79
+ v((D) => D === w ? "" : w);
80
+ },
81
+ onItemDismiss: () => v(""),
82
+ children: /* @__PURE__ */ l(
83
+ _.nav,
84
+ {
85
+ "aria-label": "Main",
86
+ "data-orientation": c,
87
+ dir: C,
88
+ ...u,
89
+ ref: E
90
+ }
91
+ )
92
+ }
93
+ );
94
+ }
95
+ );
96
+ se.displayName = A;
97
+ var U = "NavigationMenuSub", Ke = a.forwardRef(
98
+ (e, t) => {
99
+ const {
100
+ __scopeNavigationMenu: r,
101
+ value: i,
102
+ onValueChange: n,
103
+ defaultValue: o,
104
+ orientation: s = "horizontal",
105
+ ...d
106
+ } = e, c = b(U, r), [R, u] = oe({
107
+ prop: i,
108
+ onChange: n,
109
+ defaultProp: o ?? "",
110
+ caller: U
111
+ });
112
+ return /* @__PURE__ */ l(
113
+ ce,
114
+ {
115
+ scope: r,
116
+ isRootMenu: !1,
117
+ value: R,
118
+ dir: c.dir,
119
+ orientation: s,
120
+ rootNavigationMenu: c.rootNavigationMenu,
121
+ onTriggerEnter: (g) => u(g),
122
+ onItemSelect: (g) => u(g),
123
+ onItemDismiss: () => u(""),
124
+ children: /* @__PURE__ */ l(_.div, { "data-orientation": s, ...d, ref: t })
125
+ }
126
+ );
127
+ }
128
+ );
129
+ Ke.displayName = U;
130
+ var ce = (e) => {
131
+ const {
132
+ scope: t,
133
+ isRootMenu: r,
134
+ rootNavigationMenu: i,
135
+ dir: n,
136
+ orientation: o,
137
+ children: s,
138
+ value: d,
139
+ onItemSelect: c,
140
+ onItemDismiss: R,
141
+ onTriggerEnter: u,
142
+ onTriggerLeave: g,
143
+ onContentEnter: h,
144
+ onContentLeave: E
145
+ } = e, [C, p] = a.useState(null), [M, T] = a.useState(/* @__PURE__ */ new Map()), [P, f] = a.useState(null);
146
+ return /* @__PURE__ */ l(
147
+ ke,
148
+ {
149
+ scope: t,
150
+ isRootMenu: r,
151
+ rootNavigationMenu: i,
152
+ value: d,
153
+ previousValue: xe(d),
154
+ baseId: re(),
155
+ dir: n,
156
+ orientation: o,
157
+ viewport: C,
158
+ onViewportChange: p,
159
+ indicatorTrack: P,
160
+ onIndicatorTrackChange: f,
161
+ onTriggerEnter: S(u),
162
+ onTriggerLeave: S(g),
163
+ onContentEnter: S(h),
164
+ onContentLeave: S(E),
165
+ onItemSelect: S(c),
166
+ onItemDismiss: S(R),
167
+ onViewportContentChange: a.useCallback((m, v) => {
168
+ T((N) => (N.set(m, v), new Map(N)));
169
+ }, []),
170
+ onViewportContentRemove: a.useCallback((m) => {
171
+ T((v) => v.has(m) ? (v.delete(m), new Map(v)) : v);
172
+ }, []),
173
+ children: /* @__PURE__ */ l($.Provider, { scope: t, children: /* @__PURE__ */ l(Fe, { scope: t, items: M, children: s }) })
174
+ }
175
+ );
176
+ }, ue = "NavigationMenuList", le = a.forwardRef(
177
+ (e, t) => {
178
+ const { __scopeNavigationMenu: r, ...i } = e, n = b(ue, r), o = /* @__PURE__ */ l(_.ul, { "data-orientation": n.orientation, ...i, ref: t });
179
+ return /* @__PURE__ */ l(_.div, { style: { position: "relative" }, ref: n.onIndicatorTrackChange, children: /* @__PURE__ */ l($.Slot, { scope: r, children: n.isRootMenu ? /* @__PURE__ */ l(Me, { asChild: !0, children: o }) : o }) });
180
+ }
181
+ );
182
+ le.displayName = ue;
183
+ var de = "NavigationMenuItem", [Ve, ve] = Y(de), fe = a.forwardRef(
184
+ (e, t) => {
185
+ const { __scopeNavigationMenu: r, value: i, ...n } = e, o = re(), s = i || o || "LEGACY_REACT_AUTO_VALUE", d = a.useRef(null), c = a.useRef(null), R = a.useRef(null), u = a.useRef(() => {
186
+ }), g = a.useRef(!1), h = a.useCallback((C = "start") => {
187
+ if (d.current) {
188
+ u.current();
189
+ const p = B(d.current);
190
+ p.length && X(C === "start" ? p : p.reverse());
191
+ }
192
+ }, []), E = a.useCallback(() => {
193
+ if (d.current) {
194
+ const C = B(d.current);
195
+ C.length && (u.current = $e(C));
196
+ }
197
+ }, []);
198
+ return /* @__PURE__ */ l(
199
+ Ve,
200
+ {
201
+ scope: r,
202
+ value: s,
203
+ triggerRef: c,
204
+ contentRef: d,
205
+ focusProxyRef: R,
206
+ wasEscapeCloseRef: g,
207
+ onEntryKeyDown: h,
208
+ onFocusProxyEnter: h,
209
+ onRootContentClose: E,
210
+ onContentFocusOutside: E,
211
+ children: /* @__PURE__ */ l(_.li, { ...n, ref: t })
212
+ }
213
+ );
214
+ }
215
+ );
216
+ fe.displayName = de;
217
+ var H = "NavigationMenuTrigger", me = a.forwardRef((e, t) => {
218
+ const { __scopeNavigationMenu: r, disabled: i, ...n } = e, o = b(H, e.__scopeNavigationMenu), s = ve(H, e.__scopeNavigationMenu), d = a.useRef(null), c = k(d, s.triggerRef, t), R = he(o.baseId, s.value), u = Ee(o.baseId, s.value), g = a.useRef(!1), h = a.useRef(!1), E = s.value === o.value;
219
+ return /* @__PURE__ */ Z(ee, { children: [
220
+ /* @__PURE__ */ l($.ItemSlot, { scope: r, value: s.value, children: /* @__PURE__ */ l(Ne, { asChild: !0, children: /* @__PURE__ */ l(
221
+ _.button,
222
+ {
223
+ id: R,
224
+ disabled: i,
225
+ "data-disabled": i ? "" : void 0,
226
+ "data-state": J(E),
227
+ "aria-expanded": E,
228
+ "aria-controls": u,
229
+ ...n,
230
+ ref: c,
231
+ onPointerEnter: I(e.onPointerEnter, () => {
232
+ h.current = !1, s.wasEscapeCloseRef.current = !1;
233
+ }),
234
+ onPointerMove: I(
235
+ e.onPointerMove,
236
+ L(() => {
237
+ i || h.current || s.wasEscapeCloseRef.current || g.current || (o.onTriggerEnter(s.value), g.current = !0);
238
+ })
239
+ ),
240
+ onPointerLeave: I(
241
+ e.onPointerLeave,
242
+ L(() => {
243
+ i || (o.onTriggerLeave(), g.current = !1);
244
+ })
245
+ ),
246
+ onClick: I(e.onClick, () => {
247
+ o.onItemSelect(s.value), h.current = E;
248
+ }),
249
+ onKeyDown: I(e.onKeyDown, (C) => {
250
+ const M = { horizontal: "ArrowDown", vertical: o.dir === "rtl" ? "ArrowLeft" : "ArrowRight" }[o.orientation];
251
+ E && C.key === M && (s.onEntryKeyDown(), C.preventDefault());
252
+ })
253
+ }
254
+ ) }) }),
255
+ E && /* @__PURE__ */ Z(ee, { children: [
256
+ /* @__PURE__ */ l(
257
+ De,
258
+ {
259
+ "aria-hidden": !0,
260
+ tabIndex: 0,
261
+ ref: s.focusProxyRef,
262
+ onFocus: (C) => {
263
+ const p = s.contentRef.current, M = C.relatedTarget, T = M === d.current, P = p == null ? void 0 : p.contains(M);
264
+ (T || !P) && s.onFocusProxyEnter(T ? "start" : "end");
265
+ }
266
+ }
267
+ ),
268
+ o.viewport && /* @__PURE__ */ l("span", { "aria-owns": u })
269
+ ] })
270
+ ] });
271
+ });
272
+ me.displayName = H;
273
+ var Ge = "NavigationMenuLink", te = "navigationMenu.linkSelect", ge = a.forwardRef(
274
+ (e, t) => {
275
+ const { __scopeNavigationMenu: r, active: i, onSelect: n, ...o } = e;
276
+ return /* @__PURE__ */ l(Ne, { asChild: !0, children: /* @__PURE__ */ l(
277
+ _.a,
278
+ {
279
+ "data-active": i ? "" : void 0,
280
+ "aria-current": i ? "page" : void 0,
281
+ ...o,
282
+ ref: t,
283
+ onClick: I(
284
+ e.onClick,
285
+ (s) => {
286
+ const d = s.target, c = new CustomEvent(te, {
287
+ bubbles: !0,
288
+ cancelable: !0
289
+ });
290
+ if (d.addEventListener(te, (R) => n == null ? void 0 : n(R), { once: !0 }), Q(d, c), !c.defaultPrevented && !s.metaKey) {
291
+ const R = new CustomEvent(F, {
292
+ bubbles: !0,
293
+ cancelable: !0
294
+ });
295
+ Q(d, R);
296
+ }
297
+ },
298
+ { checkForDefaultPrevented: !1 }
299
+ )
300
+ }
301
+ ) });
302
+ }
303
+ );
304
+ ge.displayName = Ge;
305
+ var j = "NavigationMenuIndicator", pe = a.forwardRef((e, t) => {
306
+ const { forceMount: r, ...i } = e, n = b(j, e.__scopeNavigationMenu), o = !!n.value;
307
+ return n.indicatorTrack ? Ie.createPortal(
308
+ /* @__PURE__ */ l(K, { present: r || o, children: /* @__PURE__ */ l(ze, { ...i, ref: t }) }),
309
+ n.indicatorTrack
310
+ ) : null;
311
+ });
312
+ pe.displayName = j;
313
+ var ze = a.forwardRef((e, t) => {
314
+ const { __scopeNavigationMenu: r, ...i } = e, n = b(j, r), o = ae(r), [s, d] = a.useState(
315
+ null
316
+ ), [c, R] = a.useState(null), u = n.orientation === "horizontal", g = !!n.value;
317
+ a.useEffect(() => {
318
+ var p;
319
+ const C = (p = o().find((M) => M.value === n.value)) == null ? void 0 : p.ref.current;
320
+ C && d(C);
321
+ }, [o, n.value]);
322
+ const h = () => {
323
+ s && R({
324
+ size: u ? s.offsetWidth : s.offsetHeight,
325
+ offset: u ? s.offsetLeft : s.offsetTop
326
+ });
327
+ };
328
+ return W(s, h), W(n.indicatorTrack, h), c ? /* @__PURE__ */ l(
329
+ _.div,
330
+ {
331
+ "aria-hidden": !0,
332
+ "data-state": g ? "visible" : "hidden",
333
+ "data-orientation": n.orientation,
334
+ ...i,
335
+ ref: t,
336
+ style: {
337
+ position: "absolute",
338
+ ...u ? {
339
+ left: 0,
340
+ width: c.size + "px",
341
+ transform: `translateX(${c.offset}px)`
342
+ } : {
343
+ top: 0,
344
+ height: c.size + "px",
345
+ transform: `translateY(${c.offset}px)`
346
+ },
347
+ ...i.style
348
+ }
349
+ }
350
+ ) : null;
351
+ }), O = "NavigationMenuContent", we = a.forwardRef((e, t) => {
352
+ const { forceMount: r, ...i } = e, n = b(O, e.__scopeNavigationMenu), o = ve(O, e.__scopeNavigationMenu), s = k(o.contentRef, t), d = o.value === n.value, c = {
353
+ value: o.value,
354
+ triggerRef: o.triggerRef,
355
+ focusProxyRef: o.focusProxyRef,
356
+ wasEscapeCloseRef: o.wasEscapeCloseRef,
357
+ onContentFocusOutside: o.onContentFocusOutside,
358
+ onRootContentClose: o.onRootContentClose,
359
+ ...i
360
+ };
361
+ return n.viewport ? /* @__PURE__ */ l(Ue, { forceMount: r, ...c, ref: s }) : /* @__PURE__ */ l(K, { present: r || d, children: /* @__PURE__ */ l(
362
+ Ce,
363
+ {
364
+ "data-state": J(d),
365
+ ...c,
366
+ ref: s,
367
+ onPointerEnter: I(e.onPointerEnter, n.onContentEnter),
368
+ onPointerLeave: I(
369
+ e.onPointerLeave,
370
+ L(n.onContentLeave)
371
+ ),
372
+ style: {
373
+ // Prevent interaction when animating out
374
+ pointerEvents: !d && n.isRootMenu ? "none" : void 0,
375
+ ...c.style
376
+ }
377
+ }
378
+ ) });
379
+ });
380
+ we.displayName = O;
381
+ var Ue = a.forwardRef((e, t) => {
382
+ const r = b(O, e.__scopeNavigationMenu), { onViewportContentChange: i, onViewportContentRemove: n } = r;
383
+ return G(() => {
384
+ i(e.value, {
385
+ ref: t,
386
+ ...e
387
+ });
388
+ }, [e, t, i]), G(() => () => n(e.value), [e.value, n]), null;
389
+ }), F = "navigationMenu.rootContentDismiss", Ce = a.forwardRef((e, t) => {
390
+ const {
391
+ __scopeNavigationMenu: r,
392
+ value: i,
393
+ triggerRef: n,
394
+ focusProxyRef: o,
395
+ wasEscapeCloseRef: s,
396
+ onRootContentClose: d,
397
+ onContentFocusOutside: c,
398
+ ...R
399
+ } = e, u = b(O, r), g = a.useRef(null), h = k(g, t), E = he(u.baseId, i), C = Ee(u.baseId, i), p = ae(r), M = a.useRef(null), { onItemDismiss: T } = u;
400
+ a.useEffect(() => {
401
+ const f = g.current;
402
+ if (u.isRootMenu && f) {
403
+ const m = () => {
404
+ var v;
405
+ T(), d(), f.contains(document.activeElement) && ((v = n.current) == null || v.focus());
406
+ };
407
+ return f.addEventListener(F, m), () => f.removeEventListener(F, m);
408
+ }
409
+ }, [u.isRootMenu, e.value, n, T, d]);
410
+ const P = a.useMemo(() => {
411
+ const m = p().map((D) => D.value);
412
+ u.dir === "rtl" && m.reverse();
413
+ const v = m.indexOf(u.value), N = m.indexOf(u.previousValue), y = i === u.value, x = N === m.indexOf(i);
414
+ if (!y && !x) return M.current;
415
+ const w = (() => {
416
+ if (v !== N) {
417
+ if (y && N !== -1) return v > N ? "from-end" : "from-start";
418
+ if (x && v !== -1) return v > N ? "to-start" : "to-end";
419
+ }
420
+ return null;
421
+ })();
422
+ return M.current = w, w;
423
+ }, [u.previousValue, u.value, u.dir, p, i]);
424
+ return /* @__PURE__ */ l(Me, { asChild: !0, children: /* @__PURE__ */ l(
425
+ Pe,
426
+ {
427
+ id: C,
428
+ "aria-labelledby": E,
429
+ "data-motion": P,
430
+ "data-orientation": u.orientation,
431
+ ...R,
432
+ ref: h,
433
+ disableOutsidePointerEvents: !1,
434
+ onDismiss: () => {
435
+ var m;
436
+ const f = new Event(F, {
437
+ bubbles: !0,
438
+ cancelable: !0
439
+ });
440
+ (m = g.current) == null || m.dispatchEvent(f);
441
+ },
442
+ onFocusOutside: I(e.onFocusOutside, (f) => {
443
+ var v;
444
+ c();
445
+ const m = f.target;
446
+ (v = u.rootNavigationMenu) != null && v.contains(m) && f.preventDefault();
447
+ }),
448
+ onPointerDownOutside: I(e.onPointerDownOutside, (f) => {
449
+ var y;
450
+ const m = f.target, v = p().some((x) => {
451
+ var w;
452
+ return (w = x.ref.current) == null ? void 0 : w.contains(m);
453
+ }), N = u.isRootMenu && ((y = u.viewport) == null ? void 0 : y.contains(m));
454
+ (v || N || !u.isRootMenu) && f.preventDefault();
455
+ }),
456
+ onKeyDown: I(e.onKeyDown, (f) => {
457
+ var N;
458
+ const m = f.altKey || f.ctrlKey || f.metaKey;
459
+ if (f.key === "Tab" && !m) {
460
+ const y = B(f.currentTarget), x = document.activeElement, w = y.findIndex((Te) => Te === x), V = f.shiftKey ? y.slice(0, w).reverse() : y.slice(w + 1, y.length);
461
+ X(V) ? f.preventDefault() : (N = o.current) == null || N.focus();
462
+ }
463
+ }),
464
+ onEscapeKeyDown: I(e.onEscapeKeyDown, (f) => {
465
+ s.current = !0;
466
+ })
467
+ }
468
+ ) });
469
+ }), q = "NavigationMenuViewport", Re = a.forwardRef((e, t) => {
470
+ const { forceMount: r, ...i } = e, o = !!b(q, e.__scopeNavigationMenu).value;
471
+ return /* @__PURE__ */ l(K, { present: r || o, children: /* @__PURE__ */ l(He, { ...i, ref: t }) });
472
+ });
473
+ Re.displayName = q;
474
+ var He = a.forwardRef((e, t) => {
475
+ const { __scopeNavigationMenu: r, children: i, ...n } = e, o = b(q, r), s = k(t, o.onViewportChange), d = Le(
476
+ O,
477
+ e.__scopeNavigationMenu
478
+ ), [c, R] = a.useState(null), [u, g] = a.useState(null), h = c ? (c == null ? void 0 : c.width) + "px" : void 0, E = c ? (c == null ? void 0 : c.height) + "px" : void 0, C = !!o.value, p = C ? o.value : o.previousValue;
479
+ return W(u, () => {
480
+ u && R({ width: u.offsetWidth, height: u.offsetHeight });
481
+ }), /* @__PURE__ */ l(
482
+ _.div,
483
+ {
484
+ "data-state": J(C),
485
+ "data-orientation": o.orientation,
486
+ ...n,
487
+ ref: s,
488
+ style: {
489
+ // Prevent interaction when animating out
490
+ pointerEvents: !C && o.isRootMenu ? "none" : void 0,
491
+ "--radix-navigation-menu-viewport-width": h,
492
+ "--radix-navigation-menu-viewport-height": E,
493
+ ...n.style
494
+ },
495
+ onPointerEnter: I(e.onPointerEnter, o.onContentEnter),
496
+ onPointerLeave: I(e.onPointerLeave, L(o.onContentLeave)),
497
+ children: Array.from(d.items).map(([T, { ref: P, forceMount: f, ...m }]) => {
498
+ const v = p === T;
499
+ return /* @__PURE__ */ l(K, { present: f || v, children: /* @__PURE__ */ l(
500
+ Ce,
501
+ {
502
+ ...m,
503
+ ref: be(P, (N) => {
504
+ v && N && g(N);
505
+ })
506
+ }
507
+ ) }, T);
508
+ })
509
+ }
510
+ );
511
+ }), Be = "FocusGroup", Me = a.forwardRef(
512
+ (e, t) => {
513
+ const { __scopeNavigationMenu: r, ...i } = e, n = b(Be, r);
514
+ return /* @__PURE__ */ l(z.Provider, { scope: r, children: /* @__PURE__ */ l(z.Slot, { scope: r, children: /* @__PURE__ */ l(_.div, { dir: n.dir, ...i, ref: t }) }) });
515
+ }
516
+ ), ne = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], We = "FocusGroupItem", Ne = a.forwardRef(
517
+ (e, t) => {
518
+ const { __scopeNavigationMenu: r, ...i } = e, n = Ae(r), o = b(We, r);
519
+ return /* @__PURE__ */ l(z.ItemSlot, { scope: r, children: /* @__PURE__ */ l(
520
+ _.button,
521
+ {
522
+ ...i,
523
+ ref: t,
524
+ onKeyDown: I(e.onKeyDown, (s) => {
525
+ if (["Home", "End", ...ne].includes(s.key)) {
526
+ let c = n().map((g) => g.ref.current);
527
+ if ([o.dir === "rtl" ? "ArrowRight" : "ArrowLeft", "ArrowUp", "End"].includes(s.key) && c.reverse(), ne.includes(s.key)) {
528
+ const g = c.indexOf(s.currentTarget);
529
+ c = c.slice(g + 1);
530
+ }
531
+ setTimeout(() => X(c)), s.preventDefault();
532
+ }
533
+ })
534
+ }
535
+ ) });
536
+ }
537
+ );
538
+ function B(e) {
539
+ const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
540
+ acceptNode: (i) => {
541
+ const n = i.tagName === "INPUT" && i.type === "hidden";
542
+ return i.disabled || i.hidden || n ? NodeFilter.FILTER_SKIP : i.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
543
+ }
544
+ });
545
+ for (; r.nextNode(); ) t.push(r.currentNode);
546
+ return t;
547
+ }
548
+ function X(e) {
549
+ const t = document.activeElement;
550
+ return e.some((r) => r === t ? !0 : (r.focus(), document.activeElement !== t));
551
+ }
552
+ function $e(e) {
553
+ return e.forEach((t) => {
554
+ t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
555
+ }), () => {
556
+ e.forEach((t) => {
557
+ const r = t.dataset.tabindex;
558
+ t.setAttribute("tabindex", r);
559
+ });
560
+ };
561
+ }
562
+ function W(e, t) {
563
+ const r = S(t);
564
+ G(() => {
565
+ let i = 0;
566
+ if (e) {
567
+ const n = new ResizeObserver(() => {
568
+ cancelAnimationFrame(i), i = window.requestAnimationFrame(r);
569
+ });
570
+ return n.observe(e), () => {
571
+ window.cancelAnimationFrame(i), n.unobserve(e);
572
+ };
573
+ }
574
+ }, [e, r]);
575
+ }
576
+ function J(e) {
577
+ return e ? "open" : "closed";
578
+ }
579
+ function he(e, t) {
580
+ return `${e}-trigger-${t}`;
581
+ }
582
+ function Ee(e, t) {
583
+ return `${e}-content-${t}`;
584
+ }
585
+ function L(e) {
586
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
587
+ }
588
+ var ut = se, lt = le, dt = fe, vt = me, ft = ge, mt = pe, gt = we, pt = Re;
589
+ export {
590
+ gt as Content,
591
+ mt as Indicator,
592
+ dt as Item,
593
+ ft as Link,
594
+ lt as List,
595
+ se as NavigationMenu,
596
+ we as NavigationMenuContent,
597
+ pe as NavigationMenuIndicator,
598
+ fe as NavigationMenuItem,
599
+ ge as NavigationMenuLink,
600
+ le as NavigationMenuList,
601
+ Ke as NavigationMenuSub,
602
+ me as NavigationMenuTrigger,
603
+ Re as NavigationMenuViewport,
604
+ ut as Root,
605
+ vt as Trigger,
606
+ pt as Viewport
607
+ };