@devalok/shilp-sutra 0.57.0 → 0.59.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 (258) hide show
  1. package/MIGRATION.md +91 -0
  2. package/dist/_chunks/badge-group.js +75 -188
  3. package/dist/_chunks/badge-group.js.map +1 -1
  4. package/dist/_chunks/chat.js +244 -243
  5. package/dist/_chunks/chat.js.map +1 -1
  6. package/dist/_chunks/image-preview.js +71 -70
  7. package/dist/_chunks/image-preview.js.map +1 -1
  8. package/dist/_chunks/motion-preference.js +15 -0
  9. package/dist/_chunks/motion-preference.js.map +1 -0
  10. package/dist/_chunks/motion-provider.js +1 -1
  11. package/dist/_chunks/motion-provider.js.map +1 -1
  12. package/dist/_chunks/popover.js +50 -49
  13. package/dist/_chunks/popover.js.map +1 -1
  14. package/dist/_chunks/primitives-internal.js +29 -29
  15. package/dist/_chunks/primitives-internal.js.map +1 -1
  16. package/dist/_chunks/shared.js +48 -47
  17. package/dist/_chunks/shared.js.map +1 -1
  18. package/dist/_chunks/success.js +34 -34
  19. package/dist/_chunks/tree-view.js +1 -1
  20. package/dist/_chunks/tree-view.js.map +1 -1
  21. package/dist/ai/block-renderer.js +8 -8
  22. package/dist/ai/command-bar.js +65 -65
  23. package/dist/ai/command-bar.js.map +1 -1
  24. package/dist/ai/conversation.js +35 -35
  25. package/dist/ai/conversation.js.map +1 -1
  26. package/dist/ai/index.js +4 -4
  27. package/dist/composed/activity-feed.d.ts.map +1 -1
  28. package/dist/composed/activity-feed.js +108 -107
  29. package/dist/composed/activity-feed.js.map +1 -1
  30. package/dist/composed/command-palette.js +137 -137
  31. package/dist/composed/command-palette.js.map +1 -1
  32. package/dist/composed/content-card.js +1 -1
  33. package/dist/composed/content-card.js.map +1 -1
  34. package/dist/composed/date-picker/index.js +5 -5
  35. package/dist/composed/date-picker/index.js.map +1 -1
  36. package/dist/composed/empty-state.js +4 -4
  37. package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
  38. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  39. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  40. package/dist/composed/file-preview.js +151 -150
  41. package/dist/composed/file-preview.js.map +1 -1
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +53 -52
  44. package/dist/composed/filter-bar.js.map +1 -1
  45. package/dist/composed/form-section.d.ts.map +1 -1
  46. package/dist/composed/form-section.js +38 -37
  47. package/dist/composed/form-section.js.map +1 -1
  48. package/dist/composed/master-detail.d.ts.map +1 -1
  49. package/dist/composed/master-detail.js +1 -1
  50. package/dist/composed/master-detail.js.map +1 -1
  51. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  52. package/dist/composed/multi-select-popover.js +109 -108
  53. package/dist/composed/multi-select-popover.js.map +1 -1
  54. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  55. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  56. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  57. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  58. package/dist/composed/rich-chat-input.js +467 -466
  59. package/dist/composed/rich-chat-input.js.map +1 -1
  60. package/dist/composed/rich-text-editor.js +3 -3
  61. package/dist/composed/rich-text-editor.js.map +1 -1
  62. package/dist/composed/schedule-view.js +2 -2
  63. package/dist/composed/schedule-view.js.map +1 -1
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +29 -28
  66. package/dist/composed/status-badge.js.map +1 -1
  67. package/dist/motion/index.d.ts +1 -0
  68. package/dist/motion/index.d.ts.map +1 -1
  69. package/dist/motion/index.js +2 -15
  70. package/dist/motion/motion-preference.d.ts +36 -0
  71. package/dist/motion/motion-preference.d.ts.map +1 -0
  72. package/dist/motion/motion-provider.d.ts +2 -1
  73. package/dist/motion/motion-provider.d.ts.map +1 -1
  74. package/dist/motion/primitives-index.js +103 -102
  75. package/dist/motion/primitives-index.js.map +1 -1
  76. package/dist/motion/primitives.d.ts.map +1 -1
  77. package/dist/shell/bottom-navbar.js +19 -19
  78. package/dist/shell/bottom-navbar.js.map +1 -1
  79. package/dist/shell/index.d.ts +1 -1
  80. package/dist/shell/index.d.ts.map +1 -1
  81. package/dist/shell/notification-center.d.ts +17 -0
  82. package/dist/shell/notification-center.d.ts.map +1 -1
  83. package/dist/shell/notification-center.js +109 -104
  84. package/dist/shell/notification-center.js.map +1 -1
  85. package/dist/shell/notification-preferences.js +1 -1
  86. package/dist/shell/notification-preferences.js.map +1 -1
  87. package/dist/shell/top-bar.js +1 -1
  88. package/dist/shell/top-bar.js.map +1 -1
  89. package/dist/tokens/index.css +1 -0
  90. package/dist/tokens/palettes.css +292 -0
  91. package/dist/tokens/semantic.css +72 -8
  92. package/dist/tokens/shilp-sutra.css +1 -0
  93. package/dist/tokens/utilities.css +10 -7
  94. package/dist/ui/accordion.d.ts.map +1 -1
  95. package/dist/ui/accordion.js +27 -26
  96. package/dist/ui/accordion.js.map +1 -1
  97. package/dist/ui/alert-dialog.d.ts.map +1 -1
  98. package/dist/ui/alert-dialog.js +60 -59
  99. package/dist/ui/alert-dialog.js.map +1 -1
  100. package/dist/ui/alert.d.ts.map +1 -1
  101. package/dist/ui/alert.js +55 -113
  102. package/dist/ui/alert.js.map +1 -1
  103. package/dist/ui/autocomplete.js +80 -80
  104. package/dist/ui/autocomplete.js.map +1 -1
  105. package/dist/ui/avatar.d.ts.map +1 -1
  106. package/dist/ui/avatar.js +69 -68
  107. package/dist/ui/avatar.js.map +1 -1
  108. package/dist/ui/badge-indicator.d.ts +4 -8
  109. package/dist/ui/badge-indicator.d.ts.map +1 -1
  110. package/dist/ui/badge-indicator.js +3 -8
  111. package/dist/ui/badge-indicator.js.map +1 -1
  112. package/dist/ui/badge.d.ts +8 -1
  113. package/dist/ui/badge.d.ts.map +1 -1
  114. package/dist/ui/banner.d.ts.map +1 -1
  115. package/dist/ui/banner.js +42 -40
  116. package/dist/ui/banner.js.map +1 -1
  117. package/dist/ui/button-group.d.ts.map +1 -1
  118. package/dist/ui/button-group.js +3 -23
  119. package/dist/ui/button-group.js.map +1 -1
  120. package/dist/ui/button.d.ts +10 -1
  121. package/dist/ui/button.d.ts.map +1 -1
  122. package/dist/ui/button.js +79 -212
  123. package/dist/ui/button.js.map +1 -1
  124. package/dist/ui/card.d.ts.map +1 -1
  125. package/dist/ui/card.js +75 -72
  126. package/dist/ui/card.js.map +1 -1
  127. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  128. package/dist/ui/charts/radar-chart.js +1 -1
  129. package/dist/ui/charts/radar-chart.js.map +1 -1
  130. package/dist/ui/chat/message-list.d.ts.map +1 -1
  131. package/dist/ui/chat/message.d.ts.map +1 -1
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
  133. package/dist/ui/code.js +1 -1
  134. package/dist/ui/code.js.map +1 -1
  135. package/dist/ui/color-input.d.ts.map +1 -1
  136. package/dist/ui/color-input.js +151 -150
  137. package/dist/ui/color-input.js.map +1 -1
  138. package/dist/ui/combobox.d.ts +14 -0
  139. package/dist/ui/combobox.d.ts.map +1 -1
  140. package/dist/ui/combobox.js +152 -148
  141. package/dist/ui/combobox.js.map +1 -1
  142. package/dist/ui/context-menu.d.ts.map +1 -1
  143. package/dist/ui/context-menu.js +70 -69
  144. package/dist/ui/context-menu.js.map +1 -1
  145. package/dist/ui/data-table-body.js +2 -2
  146. package/dist/ui/data-table-body.js.map +1 -1
  147. package/dist/ui/data-table-context.js +2 -2
  148. package/dist/ui/data-table-context.js.map +1 -1
  149. package/dist/ui/data-table-header.d.ts.map +1 -1
  150. package/dist/ui/data-table-header.js +41 -40
  151. package/dist/ui/data-table-header.js.map +1 -1
  152. package/dist/ui/data-table-pagination.js +2 -2
  153. package/dist/ui/data-table-pagination.js.map +1 -1
  154. package/dist/ui/dialog.d.ts.map +1 -1
  155. package/dist/ui/dialog.js +61 -60
  156. package/dist/ui/dialog.js.map +1 -1
  157. package/dist/ui/dot.d.ts.map +1 -1
  158. package/dist/ui/dot.js +10 -41
  159. package/dist/ui/dot.js.map +1 -1
  160. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  161. package/dist/ui/dropdown-menu.js +79 -78
  162. package/dist/ui/dropdown-menu.js.map +1 -1
  163. package/dist/ui/file-upload.d.ts.map +1 -1
  164. package/dist/ui/file-upload.js +116 -115
  165. package/dist/ui/file-upload.js.map +1 -1
  166. package/dist/ui/form.d.ts.map +1 -1
  167. package/dist/ui/form.js +27 -26
  168. package/dist/ui/form.js.map +1 -1
  169. package/dist/ui/hover-card.d.ts.map +1 -1
  170. package/dist/ui/hover-card.js +26 -25
  171. package/dist/ui/hover-card.js.map +1 -1
  172. package/dist/ui/icon.js +7 -7
  173. package/dist/ui/index.d.ts +2 -2
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +3 -3
  176. package/dist/ui/index.js.map +1 -1
  177. package/dist/ui/input.js +1 -1
  178. package/dist/ui/input.js.map +1 -1
  179. package/dist/ui/menubar.d.ts.map +1 -1
  180. package/dist/ui/menubar.js +73 -72
  181. package/dist/ui/menubar.js.map +1 -1
  182. package/dist/ui/navigation-menu.d.ts.map +1 -1
  183. package/dist/ui/navigation-menu.js +80 -79
  184. package/dist/ui/navigation-menu.js.map +1 -1
  185. package/dist/ui/popover.d.ts.map +1 -1
  186. package/dist/ui/progress.d.ts.map +1 -1
  187. package/dist/ui/progress.js +72 -68
  188. package/dist/ui/progress.js.map +1 -1
  189. package/dist/ui/radio.d.ts.map +1 -1
  190. package/dist/ui/radio.js +32 -31
  191. package/dist/ui/radio.js.map +1 -1
  192. package/dist/ui/search-input.d.ts.map +1 -1
  193. package/dist/ui/search-input.js +28 -27
  194. package/dist/ui/search-input.js.map +1 -1
  195. package/dist/ui/select.d.ts.map +1 -1
  196. package/dist/ui/select.js +64 -63
  197. package/dist/ui/select.js.map +1 -1
  198. package/dist/ui/sidebar.d.ts.map +1 -1
  199. package/dist/ui/sidebar.js +4 -4
  200. package/dist/ui/sidebar.js.map +1 -1
  201. package/dist/ui/slider.d.ts +63 -9
  202. package/dist/ui/slider.d.ts.map +1 -1
  203. package/dist/ui/slider.js +74 -32
  204. package/dist/ui/slider.js.map +1 -1
  205. package/dist/ui/split-button.d.ts +8 -2
  206. package/dist/ui/split-button.d.ts.map +1 -1
  207. package/dist/ui/split-button.js +49 -95
  208. package/dist/ui/split-button.js.map +1 -1
  209. package/dist/ui/stat-card.d.ts.map +1 -1
  210. package/dist/ui/stat-card.js +89 -88
  211. package/dist/ui/stat-card.js.map +1 -1
  212. package/dist/ui/stat-flash.js +16 -16
  213. package/dist/ui/stepper.d.ts.map +1 -1
  214. package/dist/ui/stepper.js +63 -62
  215. package/dist/ui/stepper.js.map +1 -1
  216. package/dist/ui/table.js +3 -3
  217. package/dist/ui/table.js.map +1 -1
  218. package/dist/ui/tabs.d.ts.map +1 -1
  219. package/dist/ui/tabs.js +67 -66
  220. package/dist/ui/tabs.js.map +1 -1
  221. package/dist/ui/textarea.js +1 -1
  222. package/dist/ui/textarea.js.map +1 -1
  223. package/dist/ui/toast.d.ts.map +1 -1
  224. package/dist/ui/toast.js +195 -194
  225. package/dist/ui/toast.js.map +1 -1
  226. package/dist/ui/toggle.d.ts.map +1 -1
  227. package/dist/ui/toggle.js +24 -22
  228. package/dist/ui/toggle.js.map +1 -1
  229. package/dist/ui/tooltip.d.ts.map +1 -1
  230. package/dist/ui/tooltip.js +37 -36
  231. package/dist/ui/tooltip.js.map +1 -1
  232. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  233. package/docs/recipes/customize-brand.md +58 -0
  234. package/docs/recipes/install-astro.md +1 -1
  235. package/docs/recipes/install-next-app-router.md +1 -1
  236. package/docs/recipes/install-next-pages.md +22 -1
  237. package/docs/recipes/install-remix.md +1 -1
  238. package/docs/recipes/install-tanstack-start.md +1 -1
  239. package/docs/recipes/install-vite.md +2 -1
  240. package/docs/recipes/server-components.md +7 -4
  241. package/docs/recipes/troubleshoot.md +1 -0
  242. package/llms.txt +1 -1
  243. package/mcp-manifest.json +9 -4
  244. package/package.json +3 -2
  245. package/skill/SKILL.md +1 -1
  246. package/skill/references/components.md +1 -1
  247. package/skill/references/customize-brand.md +58 -0
  248. package/skill/references/server-components.md +7 -4
  249. package/skill/references/setup-astro.md +1 -1
  250. package/skill/references/setup-next-app-router.md +1 -1
  251. package/skill/references/setup-next-pages.md +22 -1
  252. package/skill/references/setup-remix.md +1 -1
  253. package/skill/references/setup-tanstack-start.md +1 -1
  254. package/skill/references/setup-vite.md +2 -1
  255. package/skill/references/troubleshoot.md +1 -0
  256. package/dist/motion/check-motion-provider.d.ts +0 -2
  257. package/dist/motion/check-motion-provider.d.ts.map +0 -1
  258. package/dist/motion/index.js.map +0 -1
@@ -1,61 +1,62 @@
1
1
  "use client";
2
2
  import { springs as e, tweens as t } from "./lib/motion.js";
3
- import { cn as n } from "./lib/utils.js";
4
- import { Icon as r } from "./icon.js";
5
- import { CheckboxItem2 as i, Content2 as a, Group2 as o, Item3 as s, ItemIndicator2 as c, Label2 as l, Menu as u, Portal2 as d, RadioGroup2 as f, RadioItem2 as p, Root3 as m, Separator2 as h, Sub2 as g, SubContent2 as _, SubTrigger2 as v, Trigger as y } from "../_chunks/primitives/react-menubar.js";
6
- import * as b from "react";
7
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
8
- import { IconCheck as C, IconChevronRight as w, IconCircle as T } from "@tabler/icons-react";
9
- import { AnimatePresence as E, motion as D } from "framer-motion";
3
+ import { MotionPreference as n } from "../_chunks/motion-preference.js";
4
+ import { cn as r } from "./lib/utils.js";
5
+ import { Icon as i } from "./icon.js";
6
+ import { CheckboxItem2 as a, Content2 as o, Group2 as s, Item3 as c, ItemIndicator2 as l, Label2 as u, Menu as d, Portal2 as f, RadioGroup2 as p, RadioItem2 as m, Root3 as h, Separator2 as g, Sub2 as _, SubContent2 as v, SubTrigger2 as y, Trigger as b } from "../_chunks/primitives/react-menubar.js";
7
+ import * as x from "react";
8
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
9
+ import { IconCheck as w, IconChevronRight as T, IconCircle as E } from "@tabler/icons-react";
10
+ import { AnimatePresence as D, motion as O } from "framer-motion";
10
11
  //#region src/ui/menubar.tsx
11
- var O = b.createContext(!1), k = (e) => /* @__PURE__ */ x(u, { ...e });
12
- k.displayName = "MenubarMenu";
13
- var A = o, j = d, M = ({ open: e, defaultOpen: t = !1, onOpenChange: n, ...r }) => {
14
- let [i, a] = b.useState(t), o = e !== void 0, s = o ? e : i, c = b.useCallback((e) => {
12
+ var k = x.createContext(!1), A = (e) => /* @__PURE__ */ S(d, { ...e });
13
+ A.displayName = "MenubarMenu";
14
+ var j = s, M = f, N = ({ open: e, defaultOpen: t = !1, onOpenChange: n, ...r }) => {
15
+ let [i, a] = x.useState(t), o = e !== void 0, s = o ? e : i, c = x.useCallback((e) => {
15
16
  o || a(e), n?.(e);
16
17
  }, [o, n]);
17
- return /* @__PURE__ */ x(O.Provider, {
18
+ return /* @__PURE__ */ S(k.Provider, {
18
19
  value: s,
19
- children: /* @__PURE__ */ x(g, {
20
+ children: /* @__PURE__ */ S(_, {
20
21
  open: s,
21
22
  onOpenChange: c,
22
23
  ...r
23
24
  })
24
25
  });
25
26
  };
26
- M.displayName = "MenubarSub";
27
- var N = f, P = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ x(m, {
28
- ref: r,
29
- className: n("flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised", e),
27
+ N.displayName = "MenubarSub";
28
+ var P = p, F = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ S(h, {
29
+ ref: n,
30
+ className: r("flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised", e),
30
31
  ...t
31
32
  }));
32
- P.displayName = m.displayName;
33
- var F = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ x(y, {
34
- ref: r,
35
- className: n("flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-body-md font-medium outline-hidden transition-colors hover:bg-surface-panel-hover focus-visible:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover", e),
33
+ F.displayName = h.displayName;
34
+ var I = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ S(b, {
35
+ ref: n,
36
+ className: r("flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-body-md font-medium outline-hidden transition-colors hover:bg-surface-panel-hover focus-visible:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover", e),
36
37
  ...t
37
38
  }));
38
- F.displayName = y.displayName;
39
- var I = b.forwardRef(({ className: e, inset: t, children: i, ...a }, o) => /* @__PURE__ */ S(v, {
39
+ I.displayName = b.displayName;
40
+ var L = x.forwardRef(({ className: e, inset: t, children: n, ...a }, o) => /* @__PURE__ */ C(y, {
40
41
  ref: o,
41
- className: n("flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden focus:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0", t && "pl-ds-07", e),
42
+ className: r("flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden focus:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0", t && "pl-ds-07", e),
42
43
  ...a,
43
- children: [/* @__PURE__ */ x("span", {
44
+ children: [/* @__PURE__ */ S("span", {
44
45
  className: "min-w-0 truncate",
45
- children: i
46
- }), /* @__PURE__ */ x(r, {
47
- icon: w,
46
+ children: n
47
+ }), /* @__PURE__ */ S(i, {
48
+ icon: T,
48
49
  size: "sm",
49
50
  className: "ml-auto shrink-0"
50
51
  })]
51
52
  }));
52
- I.displayName = v.displayName;
53
- var L = b.forwardRef(({ className: r, children: i, ...a }, o) => /* @__PURE__ */ x(E, { children: b.useContext(O) && /* @__PURE__ */ x(_, {
54
- ref: o,
53
+ L.displayName = y.displayName;
54
+ var R = x.forwardRef(({ className: i, children: a, ...o }, s) => /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(D, { children: x.useContext(k) && /* @__PURE__ */ S(v, {
55
+ ref: s,
55
56
  forceMount: !0,
56
57
  asChild: !0,
57
- ...a,
58
- children: /* @__PURE__ */ x(D.div, {
58
+ ...o,
59
+ children: /* @__PURE__ */ S(O.div, {
59
60
  initial: {
60
61
  opacity: 0,
61
62
  scale: .95
@@ -72,70 +73,70 @@ var L = b.forwardRef(({ className: r, children: i, ...a }, o) => /* @__PURE__ */
72
73
  ...e.snappy,
73
74
  opacity: t.fade
74
75
  },
75
- className: n("z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", r),
76
- children: i
76
+ className: r("z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", i),
77
+ children: a
77
78
  })
78
- }) }));
79
- L.displayName = _.displayName;
80
- var R = b.forwardRef(({ className: e, align: t = "start", alignOffset: r = -4, sideOffset: i = 8, children: o, ...s }, c) => /* @__PURE__ */ x(d, { children: /* @__PURE__ */ x(a, {
79
+ }) }) }));
80
+ R.displayName = v.displayName;
81
+ var z = x.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: i = 8, children: a, ...s }, c) => /* @__PURE__ */ S(f, { children: /* @__PURE__ */ S(o, {
81
82
  ref: c,
82
83
  align: t,
83
- alignOffset: r,
84
+ alignOffset: n,
84
85
  sideOffset: i,
85
- className: n("z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", "data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out", e),
86
+ className: r("z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating", "data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out", e),
86
87
  ...s,
87
- children: o
88
+ children: a
88
89
  }) }));
89
- R.displayName = a.displayName;
90
- var z = b.forwardRef(({ className: e, inset: t, ...r }, i) => /* @__PURE__ */ x(s, {
90
+ z.displayName = o.displayName;
91
+ var B = x.forwardRef(({ className: e, inset: t, ...n }, i) => /* @__PURE__ */ S(c, {
91
92
  ref: i,
92
- className: n("relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0", t && "pl-ds-07", e),
93
- ...r
93
+ className: r("relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0", t && "pl-ds-07", e),
94
+ ...n
94
95
  }));
95
- z.displayName = s.displayName;
96
- var B = b.forwardRef(({ className: e, children: t, checked: a, ...o }, s) => /* @__PURE__ */ S(i, {
96
+ B.displayName = c.displayName;
97
+ var V = x.forwardRef(({ className: e, children: t, checked: n, ...o }, s) => /* @__PURE__ */ C(a, {
97
98
  ref: s,
98
- className: n("relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
99
- checked: a,
99
+ className: r("relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
100
+ checked: n,
100
101
  ...o,
101
- children: [/* @__PURE__ */ x("span", {
102
+ children: [/* @__PURE__ */ S("span", {
102
103
  className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center",
103
- children: /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x(r, {
104
- icon: C,
104
+ children: /* @__PURE__ */ S(l, { children: /* @__PURE__ */ S(i, {
105
+ icon: w,
105
106
  size: "sm"
106
107
  }) })
107
108
  }), t]
108
109
  }));
109
- B.displayName = i.displayName;
110
- var V = b.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ S(p, {
110
+ V.displayName = a.displayName;
111
+ var H = x.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ C(m, {
111
112
  ref: i,
112
- className: n("relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
113
- ...r,
114
- children: [/* @__PURE__ */ x("span", {
113
+ className: r("relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled", e),
114
+ ...n,
115
+ children: [/* @__PURE__ */ S("span", {
115
116
  className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center",
116
- children: /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x(T, { className: "h-2 w-2 fill-current" }) })
117
- }), /* @__PURE__ */ x("span", {
117
+ children: /* @__PURE__ */ S(l, { children: /* @__PURE__ */ S(E, { className: "h-2 w-2 fill-current" }) })
118
+ }), /* @__PURE__ */ S("span", {
118
119
  className: "min-w-0 truncate",
119
120
  children: t
120
121
  })]
121
122
  }));
122
- V.displayName = p.displayName;
123
- var H = b.forwardRef(({ className: e, inset: t, ...r }, i) => /* @__PURE__ */ x(l, {
123
+ H.displayName = m.displayName;
124
+ var U = x.forwardRef(({ className: e, inset: t, ...n }, i) => /* @__PURE__ */ S(u, {
124
125
  ref: i,
125
- className: n("px-ds-03 py-ds-02b text-body-md font-semibold", t && "pl-ds-07", e),
126
- ...r
126
+ className: r("px-ds-03 py-ds-02b text-body-md font-semibold", t && "pl-ds-07", e),
127
+ ...n
127
128
  }));
128
- H.displayName = l.displayName;
129
- var U = b.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ x(h, {
130
- ref: r,
131
- className: n("-mx-ds-01 my-ds-02 h-px bg-surface-border", e),
129
+ U.displayName = u.displayName;
130
+ var W = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ S(g, {
131
+ ref: n,
132
+ className: r("-mx-ds-01 my-ds-02 h-px bg-surface-border", e),
132
133
  ...t
133
134
  }));
134
- U.displayName = h.displayName;
135
- var W = ({ className: e, ...t }) => /* @__PURE__ */ x("span", {
136
- className: n("ml-auto text-body-sm text-surface-fg-subtle", e),
135
+ W.displayName = g.displayName;
136
+ var G = ({ className: e, ...t }) => /* @__PURE__ */ S("span", {
137
+ className: r("ml-auto text-body-sm text-surface-fg-subtle", e),
137
138
  ...t
138
139
  });
139
- W.displayName = "MenubarShortcut";
140
+ G.displayName = "MenubarShortcut";
140
141
  //#endregion
141
- export { P as Menubar, B as MenubarCheckboxItem, R as MenubarContent, A as MenubarGroup, z as MenubarItem, H as MenubarLabel, k as MenubarMenu, j as MenubarPortal, N as MenubarRadioGroup, V as MenubarRadioItem, U as MenubarSeparator, W as MenubarShortcut, M as MenubarSub, L as MenubarSubContent, I as MenubarSubTrigger, F as MenubarTrigger };
142
+ export { F as Menubar, V as MenubarCheckboxItem, z as MenubarContent, j as MenubarGroup, B as MenubarItem, U as MenubarLabel, A as MenubarMenu, M as MenubarPortal, P as MenubarRadioGroup, H as MenubarRadioItem, W as MenubarSeparator, G as MenubarShortcut, N as MenubarSub, R as MenubarSubContent, L as MenubarSubTrigger, I as MenubarTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","names":[],"sources":["../../src/ui/menubar.tsx"],"sourcesContent":["'use client'\n\nimport * as MenubarPrimitive from '@primitives/react-menubar'\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n// ── Internal contexts to thread open state ──\n\nconst MenubarSubOpenContext = React.createContext(false)\n\nconst MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>> = (props) => {\n // MenubarPrimitive.Menu doesn't expose open/onOpenChange directly.\n // We derive open from data-state on the trigger via a callback ref approach,\n // but the cleanest way is to use the Menubar root's value prop.\n // Since MenubarMenu doesn't have open/onOpenChange, we track via a wrapper\n // that observes the trigger's data-state.\n //\n // Alternative: MenubarPrimitive.Menu has a `value` that the root uses.\n // We'll use a simpler approach: track open via content mount state.\n return <MenubarPrimitive.Menu {...props} />\n}\nMenubarMenu.displayName = 'MenubarMenu'\n\n// For Menubar, the Menu doesn't expose open/onOpenChange. Instead, we'll use a\n// different approach: wrap Content to use a local presence state based on data-state.\n// We create a wrapper component that tracks whether content should be shown.\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n ...props\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : uncontrolledOpen\n\n const handleOpenChange = React.useCallback(\n (value: boolean) => {\n if (!isControlled) setUncontrolledOpen(value)\n onOpenChange?.(value)\n },\n [isControlled, onOpenChange],\n )\n\n return (\n <MenubarSubOpenContext.Provider value={open}>\n <MenubarPrimitive.Sub open={open} onOpenChange={handleOpenChange} {...props} />\n </MenubarSubOpenContext.Provider>\n )\n}\nMenubarSub.displayName = 'MenubarSub'\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup =\n MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised',\n className,\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-body-md font-medium outline-hidden transition-colors hover:bg-surface-panel-hover focus-visible:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover',\n className,\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden focus:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n <Icon icon={IconChevronRight} size=\"sm\" className=\"ml-auto shrink-0\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(MenubarSubOpenContext)\n\n return (\n <AnimatePresence>\n {open && (\n <MenubarPrimitive.SubContent\n ref={ref}\n forceMount\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n className,\n )}\n >\n {children}\n </motion.div>\n </MenubarPrimitive.SubContent>\n )}\n </AnimatePresence>\n )\n})\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\n// For MenubarContent, since MenubarMenu doesn't expose open/onOpenChange,\n// we use a wrapper that reads presence from a callback approach.\n// The cleanest solution: use a local state tracker via onCloseAutoFocus/onOpenAutoFocus\n// or simply keep CSS-free and let Radix handle mount/unmount naturally.\n//\n// Since Menubar menus are opened by the Menubar root (which tracks which menu value is open),\n// and MenubarPrimitive.Content already handles mount/unmount, we can use a ref-based approach\n// to detect the data-state attribute. However, the simplest reliable approach is to use\n// a wrapper that detects mount via useEffect.\n\n// MenubarContent uses CSS data-state animations instead of framer-motion because\n// MenubarPrimitive.Menu doesn't expose open/onOpenChange, making AnimatePresence\n// impossible to wire up for exit animations. The popover-in/popover-out keyframes\n// are defined in the tailwind preset and triggered by Radix's data-state attribute.\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = 'start', alignOffset = -4, sideOffset = 8, children, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n 'data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out',\n className,\n )}\n {...props}\n >\n {children}\n </MenubarPrimitive.Content>\n </MenubarPrimitive.Portal>\n ),\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n <span className=\"min-w-0 truncate\">{children}</span>\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n 'px-ds-03 py-ds-02b text-body-md font-semibold',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'ml-auto text-body-sm text-surface-fg-subtle',\n className,\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayName = 'MenubarShortcut'\n\nexport type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\nexport type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>\n\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,IAAwB,EAAM,cAAc,EAAK,GAEjD,KAAuF,MASpF,kBAAC,GAAD,EAAuB,GAAI,EAAQ,CAAA;AAE5C,EAAY,cAAc;AAM1B,IAAM,IAA8C,GAE9C,IAAgD,GAEhD,KAAqF,EACzF,MAAM,GACN,iBAAc,IACd,iBACA,GAAG,QACC;CACJ,IAAM,CAAC,GAAkB,KAAuB,EAAM,SAAS,CAAW,GACpE,IAAe,MAAmB,KAAA,GAClC,IAAO,IAAe,IAAiB,GAEvC,IAAmB,EAAM,aAC5B,MAAmB;EAElB,AADK,KAAc,EAAoB,CAAK,GAC5C,IAAe,CAAK;CACtB,GACA,CAAC,GAAc,CAAY,CAC7B;CAEA,OACE,kBAAC,EAAsB,UAAvB;EAAgC,OAAO;YACrC,kBAAC,GAAD;GAA4B;GAAM,cAAc;GAAkB,GAAI;EAAQ,CAAA;CAChD,CAAA;AAEpC;AACA,EAAW,cAAc;AAEzB,IAAM,IACJ,GAEI,IAAU,EAAM,YAGnB,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6C,CAAS;CACpE,GAAI;AACL,CAAA,CACF;AACD,EAAiB,cAAA,EAAyC;AAE1D,IAAM,KAAmB,EACvB,cACA,GAAG,QAGD,kBAAC,QAAD;CACE,WAAW,EACT,+CACA,CACF;CACA,GAAI;AACL,CAAA;AAGL,EAAgB,cAAc"}
1
+ {"version":3,"file":"menubar.js","names":[],"sources":["../../src/ui/menubar.tsx"],"sourcesContent":["'use client'\n\nimport * as MenubarPrimitive from '@primitives/react-menubar'\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { MotionPreference } from '../motion/motion-preference'\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n// ── Internal contexts to thread open state ──\n\nconst MenubarSubOpenContext = React.createContext(false)\n\nconst MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>> = (props) => {\n // MenubarPrimitive.Menu doesn't expose open/onOpenChange directly.\n // We derive open from data-state on the trigger via a callback ref approach,\n // but the cleanest way is to use the Menubar root's value prop.\n // Since MenubarMenu doesn't have open/onOpenChange, we track via a wrapper\n // that observes the trigger's data-state.\n //\n // Alternative: MenubarPrimitive.Menu has a `value` that the root uses.\n // We'll use a simpler approach: track open via content mount state.\n return <MenubarPrimitive.Menu {...props} />\n}\nMenubarMenu.displayName = 'MenubarMenu'\n\n// For Menubar, the Menu doesn't expose open/onOpenChange. Instead, we'll use a\n// different approach: wrap Content to use a local presence state based on data-state.\n// We create a wrapper component that tracks whether content should be shown.\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n ...props\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : uncontrolledOpen\n\n const handleOpenChange = React.useCallback(\n (value: boolean) => {\n if (!isControlled) setUncontrolledOpen(value)\n onOpenChange?.(value)\n },\n [isControlled, onOpenChange],\n )\n\n return (\n <MenubarSubOpenContext.Provider value={open}>\n <MenubarPrimitive.Sub open={open} onOpenChange={handleOpenChange} {...props} />\n </MenubarSubOpenContext.Provider>\n )\n}\nMenubarSub.displayName = 'MenubarSub'\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup =\n MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised',\n className,\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-body-md font-medium outline-hidden transition-colors hover:bg-surface-panel-hover focus-visible:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover',\n className,\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden focus:bg-surface-panel-hover data-[state=open]:bg-surface-panel-hover [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n <Icon icon={IconChevronRight} size=\"sm\" className=\"ml-auto shrink-0\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(MenubarSubOpenContext)\n\n return (\n <MotionPreference>\n <AnimatePresence>\n {open && (\n <MenubarPrimitive.SubContent\n ref={ref}\n forceMount\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n className,\n )}\n >\n {children}\n </motion.div>\n </MenubarPrimitive.SubContent>\n )}\n </AnimatePresence>\n </MotionPreference>\n )\n})\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\n// For MenubarContent, since MenubarMenu doesn't expose open/onOpenChange,\n// we use a wrapper that reads presence from a callback approach.\n// The cleanest solution: use a local state tracker via onCloseAutoFocus/onOpenAutoFocus\n// or simply keep CSS-free and let Radix handle mount/unmount naturally.\n//\n// Since Menubar menus are opened by the Menubar root (which tracks which menu value is open),\n// and MenubarPrimitive.Content already handles mount/unmount, we can use a ref-based approach\n// to detect the data-state attribute. However, the simplest reliable approach is to use\n// a wrapper that detects mount via useEffect.\n\n// MenubarContent uses CSS data-state animations instead of framer-motion because\n// MenubarPrimitive.Menu doesn't expose open/onOpenChange, making AnimatePresence\n// impossible to wire up for exit animations. The popover-in/popover-out keyframes\n// are defined in the tailwind preset and triggered by Radix's data-state attribute.\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = 'start', alignOffset = -4, sideOffset = 8, children, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n 'data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out',\n className,\n )}\n {...props}\n >\n {children}\n </MenubarPrimitive.Content>\n </MenubarPrimitive.Portal>\n ),\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-body-md outline-hidden transition-colors focus:bg-surface-panel-hover focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n <span className=\"min-w-0 truncate\">{children}</span>\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n 'px-ds-03 py-ds-02b text-body-md font-semibold',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'ml-auto text-body-sm text-surface-fg-subtle',\n className,\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayName = 'MenubarShortcut'\n\nexport type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\nexport type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>\n\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n}\n"],"mappings":";;;;;;;;;;;AAcA,IAAM,IAAwB,EAAM,cAAc,EAAK,GAEjD,KAAuF,MASpF,kBAAC,GAAD,EAAuB,GAAI,EAAQ,CAAA;AAE5C,EAAY,cAAc;AAM1B,IAAM,IAA8C,GAE9C,IAAgD,GAEhD,KAAqF,EACzF,MAAM,GACN,iBAAc,IACd,iBACA,GAAG,QACC;CACJ,IAAM,CAAC,GAAkB,KAAuB,EAAM,SAAS,CAAW,GACpE,IAAe,MAAmB,KAAA,GAClC,IAAO,IAAe,IAAiB,GAEvC,IAAmB,EAAM,aAC5B,MAAmB;EAElB,AADK,KAAc,EAAoB,CAAK,G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ACvB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,GACvB,CAAA"}
1
+ {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../src/ui/navigation-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,uBAAuB,MAAM,mCAAmC,CAAA;AAG5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,QAAA,MAAM,cAAc,iKAelB,CAAA;AAGF,QAAA,MAAM,kBAAkB,+KAYtB,CAAA;AAGF,QAAA,MAAM,kBAAkB,uHAA+B,CAAA;AAEvD,QAAA,MAAM,qBAAqB,oLAezB,CAAA;AAaF,QAAA,MAAM,qBAAqB,8KAuEzB,CAAA;AAGF,QAAA,MAAM,kBAAkB,2HAA+B,CAAA;AAIvD,QAAA,MAAM,sBAAsB,+KAwD1B,CAAA;AAMF,QAAA,MAAM,uBAAuB,gLAsD3B,CAAA;AAIF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAA;AACrG,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAA;AAE/G,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,GACvB,CAAA"}
@@ -1,42 +1,43 @@
1
1
  "use client";
2
2
  import { springs as e, tweens as t } from "./lib/motion.js";
3
- import { cn as n } from "./lib/utils.js";
4
- import { Icon as r } from "./icon.js";
5
- import { Content as i, Indicator as a, Item as o, Link as s, List as c, Root2 as l, Trigger as u, Viewport as d } from "../_chunks/primitives/react-navigation-menu.js";
6
- import * as f from "react";
7
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
- import { IconChevronDown as h } from "@tabler/icons-react";
9
- import { motion as g } from "framer-motion";
3
+ import { MotionPreference as n } from "../_chunks/motion-preference.js";
4
+ import { cn as r } from "./lib/utils.js";
5
+ import { Icon as i } from "./icon.js";
6
+ import { Content as a, Indicator as o, Item as s, Link as c, List as l, Root2 as u, Trigger as d, Viewport as f } from "../_chunks/primitives/react-navigation-menu.js";
7
+ import * as p from "react";
8
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
9
+ import { IconChevronDown as g } from "@tabler/icons-react";
10
+ import { motion as _ } from "framer-motion";
10
11
  //#region src/ui/navigation-menu.tsx
11
- var _ = f.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ m(l, {
12
+ var v = p.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ h(u, {
12
13
  ref: i,
13
- className: n("relative z-raised flex max-w-max flex-1 items-center justify-center", e),
14
- ...r,
15
- children: [t, /* @__PURE__ */ p(w, {})]
14
+ className: r("relative z-raised flex max-w-max flex-1 items-center justify-center", e),
15
+ ...n,
16
+ children: [t, /* @__PURE__ */ m(T, {})]
16
17
  }));
17
- _.displayName = l.displayName;
18
- var v = f.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ p(c, {
19
- ref: r,
20
- className: n("group flex flex-1 list-none items-center justify-center space-x-ds-02", e),
18
+ v.displayName = u.displayName;
19
+ var y = p.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m(l, {
20
+ ref: n,
21
+ className: r("group flex flex-1 list-none items-center justify-center space-x-ds-02", e),
21
22
  ...t
22
23
  }));
23
- v.displayName = c.displayName;
24
- var y = o, b = f.forwardRef(({ className: e, children: t, ...i }, a) => /* @__PURE__ */ m(u, {
24
+ y.displayName = l.displayName;
25
+ var b = s, x = p.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ h(d, {
25
26
  ref: a,
26
- className: n("group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-control bg-transparent px-ds-05 py-ds-03 text-body-md font-medium transition-colors hover:bg-surface-panel-hover focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 disabled:pointer-events-none disabled:opacity-action-disabled", e),
27
- ...i,
27
+ className: r("group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-control bg-transparent px-ds-05 py-ds-03 text-body-md font-medium transition-colors hover:bg-surface-panel-hover focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 disabled:pointer-events-none disabled:opacity-action-disabled", e),
28
+ ...n,
28
29
  children: [
29
30
  t,
30
31
  " ",
31
- /* @__PURE__ */ p(r, {
32
- icon: h,
32
+ /* @__PURE__ */ m(i, {
33
+ icon: g,
33
34
  size: "sm",
34
35
  className: "relative top-[1px] ml-ds-02 transition-transform duration-moderate-02 group-data-[state=open]:rotate-180"
35
36
  })
36
37
  ]
37
38
  }));
38
- b.displayName = u.displayName;
39
- var x = {
39
+ x.displayName = d.displayName;
40
+ var S = {
40
41
  "from-start": {
41
42
  x: "-13rem",
42
43
  opacity: 0
@@ -57,19 +58,19 @@ var x = {
57
58
  x: 0,
58
59
  opacity: 1
59
60
  }
60
- }, S = f.forwardRef(({ className: r, ...a }, o) => {
61
- let s = f.useRef(null), c = f.useCallback((e) => {
62
- s.current = e, typeof o == "function" ? o(e) : o && (o.current = e);
63
- }, [o]), [l, u] = f.useState(null);
64
- f.useEffect(() => {
65
- let e = s.current;
61
+ }, C = p.forwardRef(({ className: i, ...o }, s) => {
62
+ let c = p.useRef(null), l = p.useCallback((e) => {
63
+ c.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
64
+ }, [s]), [u, d] = p.useState(null);
65
+ p.useEffect(() => {
66
+ let e = c.current;
66
67
  if (!e) return;
67
68
  let t = e.getAttribute("data-motion");
68
- t && u(t);
69
+ t && d(t);
69
70
  let n = new MutationObserver((t) => {
70
71
  for (let n of t) if (n.attributeName === "data-motion") {
71
72
  let t = e.getAttribute("data-motion");
72
- u(t);
73
+ d(t);
73
74
  }
74
75
  });
75
76
  return n.observe(e, {
@@ -77,54 +78,54 @@ var x = {
77
78
  attributeFilter: ["data-motion"]
78
79
  }), () => n.disconnect();
79
80
  }, []);
80
- let d = l && l.startsWith("from-") ? x[l] : l && l.startsWith("to-") ? x.center : {
81
+ let f = u && u.startsWith("from-") ? S[u] : u && u.startsWith("to-") ? S.center : {
81
82
  x: 0,
82
83
  opacity: 0
83
- }, m = l && l.startsWith("from-") ? x.center : l && l.startsWith("to-") ? x[l] : x.center;
84
- return /* @__PURE__ */ p(i, {
85
- ref: c,
86
- className: n("left-0 top-0 w-full md:absolute md:w-auto", r),
87
- ...a,
88
- children: /* @__PURE__ */ p(g.div, {
89
- initial: d,
90
- animate: m,
84
+ }, h = u && u.startsWith("from-") ? S.center : u && u.startsWith("to-") ? S[u] : S.center;
85
+ return /* @__PURE__ */ m(n, { children: /* @__PURE__ */ m(a, {
86
+ ref: l,
87
+ className: r("left-0 top-0 w-full md:absolute md:w-auto", i),
88
+ ...o,
89
+ children: /* @__PURE__ */ m(_.div, {
90
+ initial: f,
91
+ animate: h,
91
92
  transition: {
92
93
  ...e.smooth,
93
94
  opacity: t.fade
94
95
  },
95
96
  className: "w-full",
96
- children: a.children
97
- }, l)
98
- });
97
+ children: o.children
98
+ }, u)
99
+ }) });
99
100
  });
100
- S.displayName = i.displayName;
101
- var C = s, w = f.forwardRef(({ className: r, ...i }, a) => {
102
- let o = f.useRef(null), s = f.useCallback((e) => {
103
- o.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
104
- }, [a]), [c, l] = f.useState(!1);
105
- return f.useEffect(() => {
106
- let e = o.current;
101
+ C.displayName = a.displayName;
102
+ var w = c, T = p.forwardRef(({ className: i, ...a }, o) => {
103
+ let s = p.useRef(null), c = p.useCallback((e) => {
104
+ s.current = e, typeof o == "function" ? o(e) : o && (o.current = e);
105
+ }, [o]), [l, u] = p.useState(!1);
106
+ return p.useEffect(() => {
107
+ let e = s.current;
107
108
  if (!e) return;
108
109
  let t = e.getAttribute("data-state");
109
- l(t === "open");
110
+ u(t === "open");
110
111
  let n = new MutationObserver((t) => {
111
- for (let n of t) n.attributeName === "data-state" && l(e.getAttribute("data-state") === "open");
112
+ for (let n of t) n.attributeName === "data-state" && u(e.getAttribute("data-state") === "open");
112
113
  });
113
114
  return n.observe(e, {
114
115
  attributes: !0,
115
116
  attributeFilter: ["data-state"]
116
117
  }), () => n.disconnect();
117
- }, []), /* @__PURE__ */ m("div", {
118
- className: n("absolute left-0 top-full flex justify-center"),
119
- children: [/* @__PURE__ */ p(d, {
120
- className: n("origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-overlay bg-surface-overlay shadow-floating md:w-[var(--radix-navigation-menu-viewport-width)]", r),
121
- ref: s,
122
- ...i
123
- }), /* @__PURE__ */ p(g.div, {
118
+ }, []), /* @__PURE__ */ m(n, { children: /* @__PURE__ */ h("div", {
119
+ className: r("absolute left-0 top-full flex justify-center"),
120
+ children: [/* @__PURE__ */ m(f, {
121
+ className: r("origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-overlay bg-surface-overlay shadow-floating md:w-[var(--radix-navigation-menu-viewport-width)]", i),
122
+ ref: c,
123
+ ...a
124
+ }), /* @__PURE__ */ m(_.div, {
124
125
  "aria-hidden": !0,
125
126
  className: "absolute inset-0 pointer-events-none",
126
127
  initial: !1,
127
- animate: c ? {
128
+ animate: l ? {
128
129
  opacity: 1,
129
130
  scale: 1
130
131
  } : {
@@ -136,38 +137,38 @@ var C = s, w = f.forwardRef(({ className: r, ...i }, a) => {
136
137
  opacity: t.fade
137
138
  }
138
139
  })]
139
- });
140
+ }) });
140
141
  });
141
- w.displayName = d.displayName;
142
- var T = f.forwardRef(({ className: e, ...r }, i) => {
143
- let o = f.useRef(null), s = f.useCallback((e) => {
144
- o.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
145
- }, [i]), [c, l] = f.useState(!1);
146
- return f.useEffect(() => {
147
- let e = o.current;
142
+ T.displayName = f.displayName;
143
+ var E = p.forwardRef(({ className: e, ...i }, a) => {
144
+ let s = p.useRef(null), c = p.useCallback((e) => {
145
+ s.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
146
+ }, [a]), [l, u] = p.useState(!1);
147
+ return p.useEffect(() => {
148
+ let e = s.current;
148
149
  if (!e) return;
149
150
  let t = e.getAttribute("data-state");
150
- l(t === "visible");
151
+ u(t === "visible");
151
152
  let n = new MutationObserver((t) => {
152
- for (let n of t) n.attributeName === "data-state" && l(e.getAttribute("data-state") === "visible");
153
+ for (let n of t) n.attributeName === "data-state" && u(e.getAttribute("data-state") === "visible");
153
154
  });
154
155
  return n.observe(e, {
155
156
  attributes: !0,
156
157
  attributeFilter: ["data-state"]
157
158
  }), () => n.disconnect();
158
- }, []), /* @__PURE__ */ p(a, {
159
- ref: s,
160
- className: n("top-full z-base flex h-ds-02b items-end justify-center overflow-hidden", e),
161
- ...r,
162
- children: /* @__PURE__ */ p(g.div, {
159
+ }, []), /* @__PURE__ */ m(n, { children: /* @__PURE__ */ m(o, {
160
+ ref: c,
161
+ className: r("top-full z-base flex h-ds-02b items-end justify-center overflow-hidden", e),
162
+ ...i,
163
+ children: /* @__PURE__ */ m(_.div, {
163
164
  layout: !0,
164
165
  initial: !1,
165
- animate: c ? { opacity: 1 } : { opacity: 0 },
166
+ animate: l ? { opacity: 1 } : { opacity: 0 },
166
167
  transition: t.fade,
167
168
  className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-control-inner bg-surface-border shadow-raised-hover"
168
169
  })
169
- });
170
+ }) });
170
171
  });
171
- T.displayName = a.displayName;
172
+ E.displayName = o.displayName;
172
173
  //#endregion
173
- export { _ as NavigationMenu, S as NavigationMenuContent, T as NavigationMenuIndicator, y as NavigationMenuItem, C as NavigationMenuLink, v as NavigationMenuList, b as NavigationMenuTrigger, w as NavigationMenuViewport };
174
+ export { v as NavigationMenu, C as NavigationMenuContent, E as NavigationMenuIndicator, b as NavigationMenuItem, w as NavigationMenuLink, y as NavigationMenuList, x as NavigationMenuTrigger, T as NavigationMenuViewport };
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.js","names":[],"sources":["../../src/ui/navigation-menu.tsx"],"sourcesContent":["'use client'\n\nimport * as NavigationMenuPrimitive from '@primitives/react-navigation-menu'\nimport { IconChevronDown } from '@tabler/icons-react'\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n 'relative z-raised flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n 'group flex flex-1 list-none items-center justify-center space-x-ds-02',\n className,\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-control bg-transparent px-ds-05 py-ds-03 text-body-md font-medium transition-colors hover:bg-surface-panel-hover focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 disabled:pointer-events-none disabled:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n {children}{' '}\n <Icon icon={IconChevronDown} size=\"sm\" className=\"relative top-[1px] ml-ds-02 transition-transform duration-moderate-02 group-data-[state=open]:rotate-180\" />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\n// ── NavigationMenuContent — directional slide using data-motion ──\n\nconst contentSlideVariants = {\n 'from-start': { x: '-13rem', opacity: 0 },\n 'from-end': { x: '13rem', opacity: 0 },\n 'to-start': { x: '-13rem', opacity: 0 },\n 'to-end': { x: '13rem', opacity: 0 },\n center: { x: 0, opacity: 1 },\n} as const\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [motionDir, setMotionDir] = React.useState<string | null>(null)\n\n // Observe data-motion attribute changes from Radix\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n // Read initial value\n const initial = el.getAttribute('data-motion')\n if (initial) setMotionDir(initial)\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-motion') {\n const val = el.getAttribute('data-motion')\n setMotionDir(val)\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-motion'] })\n return () => observer.disconnect()\n }, [])\n\n const initial = motionDir && motionDir.startsWith('from-')\n ? contentSlideVariants[motionDir as keyof typeof contentSlideVariants]\n : motionDir && motionDir.startsWith('to-')\n ? contentSlideVariants.center\n : { x: 0, opacity: 0 }\n\n const animate = motionDir && motionDir.startsWith('from-')\n ? contentSlideVariants.center\n : motionDir && motionDir.startsWith('to-')\n ? contentSlideVariants[motionDir as keyof typeof contentSlideVariants]\n : contentSlideVariants.center\n\n return (\n <NavigationMenuPrimitive.Content\n ref={composedRef}\n className={cn(\n 'left-0 top-0 w-full md:absolute md:w-auto',\n className,\n )}\n {...props}\n >\n <motion.div\n key={motionDir}\n initial={initial}\n animate={animate}\n transition={{ ...springs.smooth, opacity: tweens.fade }}\n className=\"w-full\"\n >\n {props.children}\n </motion.div>\n </NavigationMenuPrimitive.Content>\n )\n})\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\n// ── NavigationMenuViewport — scale + fade with layout for size changes ──\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n const initial = el.getAttribute('data-state')\n setIsOpen(initial === 'open')\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-state') {\n setIsOpen(el.getAttribute('data-state') === 'open')\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-state'] })\n return () => observer.disconnect()\n }, [])\n\n return (\n <div className={cn('absolute left-0 top-full flex justify-center')}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n 'origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-overlay bg-surface-overlay shadow-floating md:w-[var(--radix-navigation-menu-viewport-width)]',\n className,\n )}\n ref={composedRef}\n {...props}\n />\n {/* Overlay motion element for scale+fade animation */}\n <motion.div\n aria-hidden\n className=\"absolute inset-0 pointer-events-none\"\n initial={false}\n animate={isOpen ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }}\n transition={{ ...springs.smooth, opacity: tweens.fade }}\n />\n </div>\n )\n})\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\n// ── NavigationMenuIndicator — fade + layout position sliding ──\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [isVisible, setIsVisible] = React.useState(false)\n\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n const initial = el.getAttribute('data-state')\n setIsVisible(initial === 'visible')\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-state') {\n setIsVisible(el.getAttribute('data-state') === 'visible')\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-state'] })\n return () => observer.disconnect()\n }, [])\n\n return (\n <NavigationMenuPrimitive.Indicator\n ref={composedRef}\n className={cn(\n 'top-full z-base flex h-ds-02b items-end justify-center overflow-hidden',\n className,\n )}\n {...props}\n >\n <motion.div\n layout\n initial={false}\n animate={isVisible ? { opacity: 1 } : { opacity: 0 }}\n transition={tweens.fade}\n className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-control-inner bg-surface-border shadow-raised-hover\"\n />\n </NavigationMenuPrimitive.Indicator>\n )\n})\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport type NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\nexport type NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAiB,EAAM,YAG1B,EAAE,cAAW,aAAU,GAAG,KAAS,MACpC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,uEACA,CACF;CACA,GAAI;WANN,CAQG,GACD,kBAAC,GAAD,CAAyB,CAAA,CACG;EAC/B;AACD,EAAe,cAAA,EAA2C;AAE1D,IAAM,IAAqB,EAAM,YAG9B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EACT,yEACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AACD,EAAmB,cAAA,EAA2C;AAE9D,IAAM,IAAqB,GAErB,IAAwB,EAAM,YAGjC,EAAE,cAAW,aAAU,GAAG,KAAS,MACpC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,yUACA,CACF;CACA,GAAI;WANN;EAQG;EAAU;EACX,kBAAC,GAAD;GAAM,MAAM;GAAiB,MAAK;GAAK,WAAU;EAA4G,CAAA;CAC9H;EAClC;AACD,EAAsB,cAAA,EAA8C;AAIpE,IAAM,IAAuB;CAC3B,cAAc;EAAE,GAAG;EAAU,SAAS;CAAE;CACxC,YAAY;EAAE,GAAG;EAAS,SAAS;CAAE;CACrC,YAAY;EAAE,GAAG;EAAU,SAAS;CAAE;CACtC,UAAU;EAAE,GAAG;EAAS,SAAS;CAAE;CACnC,QAAQ;EAAE,GAAG;EAAG,SAAS;CAAE;AAC7B,GAEM,IAAwB,EAAM,YA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aAAY,EAAI,CAAI,IAC9B,MAAK,EAAuD,UAAU;CACjF,GACA,CAAC,CAAG,CACN,GAEM,CAAC,GAAW,KAAgB,EAAM,SAAS,EAAK;CAoBtD,OAlBA,EAAM,gBAAgB;EACpB,IAAM,IAAK,EAAS;EACpB,IAAI,CAAC,GAAI;EAET,IAAM,IAAU,EAAG,aAAa,YAAY;EAC5C,EAAa,MAAY,SAAS;EAElC,IAAM,IAAW,IAAI,kBAAkB,MAAc;GACnD,KAAK,IAAM,KAAK,GACd,AAAI,EAAE,kBAAkB,gBACtB,EAAa,EAAG,aAAa,YAAY,MAAM,SAAS;EAG9D,CAAC;EAED,OADA,EAAS,QAAQ,GAAI;GAAE,YAAY;GAAM,iBAAiB,CAAC,YAAY;EAAE,CAAC,SAC7D,EAAS,WAAW;CACnC,GAAG,CAAC,CAAC,GAGH,kBAAC,GAAD;EACE,KAAK;EACL,WAAW,EACT,0EACA,CACF;EACA,GAAI;YAEJ,kBAAC,EAAO,KAAR;GACE,QAAA;GACA,SAAS;GACT,SAAS,IAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;GACnD,YAAY,EAAO;GACnB,WAAU;EACX,CAAA;CACgC,CAAA;AAEvC,CAAC;AACD,EAAwB,cAAA,EACY"}
1
+ {"version":3,"file":"navigation-menu.js","names":[],"sources":["../../src/ui/navigation-menu.tsx"],"sourcesContent":["'use client'\n\nimport * as NavigationMenuPrimitive from '@primitives/react-navigation-menu'\nimport { IconChevronDown } from '@tabler/icons-react'\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { MotionPreference } from '../motion/motion-preference'\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n 'relative z-raised flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n 'group flex flex-1 list-none items-center justify-center space-x-ds-02',\n className,\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-control bg-transparent px-ds-05 py-ds-03 text-body-md font-medium transition-colors hover:bg-surface-panel-hover focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 disabled:pointer-events-none disabled:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n {children}{' '}\n <Icon icon={IconChevronDown} size=\"sm\" className=\"relative top-[1px] ml-ds-02 transition-transform duration-moderate-02 group-data-[state=open]:rotate-180\" />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\n// ── NavigationMenuContent — directional slide using data-motion ──\n\nconst contentSlideVariants = {\n 'from-start': { x: '-13rem', opacity: 0 },\n 'from-end': { x: '13rem', opacity: 0 },\n 'to-start': { x: '-13rem', opacity: 0 },\n 'to-end': { x: '13rem', opacity: 0 },\n center: { x: 0, opacity: 1 },\n} as const\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [motionDir, setMotionDir] = React.useState<string | null>(null)\n\n // Observe data-motion attribute changes from Radix\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n // Read initial value\n const initial = el.getAttribute('data-motion')\n if (initial) setMotionDir(initial)\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-motion') {\n const val = el.getAttribute('data-motion')\n setMotionDir(val)\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-motion'] })\n return () => observer.disconnect()\n }, [])\n\n const initial = motionDir && motionDir.startsWith('from-')\n ? contentSlideVariants[motionDir as keyof typeof contentSlideVariants]\n : motionDir && motionDir.startsWith('to-')\n ? contentSlideVariants.center\n : { x: 0, opacity: 0 }\n\n const animate = motionDir && motionDir.startsWith('from-')\n ? contentSlideVariants.center\n : motionDir && motionDir.startsWith('to-')\n ? contentSlideVariants[motionDir as keyof typeof contentSlideVariants]\n : contentSlideVariants.center\n\n return (\n <MotionPreference>\n <NavigationMenuPrimitive.Content\n ref={composedRef}\n className={cn(\n 'left-0 top-0 w-full md:absolute md:w-auto',\n className,\n )}\n {...props}\n >\n <motion.div\n key={motionDir}\n initial={initial}\n animate={animate}\n transition={{ ...springs.smooth, opacity: tweens.fade }}\n className=\"w-full\"\n >\n {props.children}\n </motion.div>\n </NavigationMenuPrimitive.Content>\n </MotionPreference>\n )\n})\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\n// ── NavigationMenuViewport — scale + fade with layout for size changes ──\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [isOpen, setIsOpen] = React.useState(false)\n\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n const initial = el.getAttribute('data-state')\n setIsOpen(initial === 'open')\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-state') {\n setIsOpen(el.getAttribute('data-state') === 'open')\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-state'] })\n return () => observer.disconnect()\n }, [])\n\n return (\n <MotionPreference>\n <div className={cn('absolute left-0 top-full flex justify-center')}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n 'origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-overlay bg-surface-overlay shadow-floating md:w-[var(--radix-navigation-menu-viewport-width)]',\n className,\n )}\n ref={composedRef}\n {...props}\n />\n {/* Overlay motion element for scale+fade animation */}\n <motion.div\n aria-hidden\n className=\"absolute inset-0 pointer-events-none\"\n initial={false}\n animate={isOpen ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }}\n transition={{ ...springs.smooth, opacity: tweens.fade }}\n />\n </div>\n </MotionPreference>\n )\n})\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\n// ── NavigationMenuIndicator — fade + layout position sliding ──\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (innerRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n },\n [ref],\n )\n\n const [isVisible, setIsVisible] = React.useState(false)\n\n React.useEffect(() => {\n const el = innerRef.current\n if (!el) return\n\n const initial = el.getAttribute('data-state')\n setIsVisible(initial === 'visible')\n\n const observer = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.attributeName === 'data-state') {\n setIsVisible(el.getAttribute('data-state') === 'visible')\n }\n }\n })\n observer.observe(el, { attributes: true, attributeFilter: ['data-state'] })\n return () => observer.disconnect()\n }, [])\n\n return (\n <MotionPreference>\n <NavigationMenuPrimitive.Indicator\n ref={composedRef}\n className={cn(\n 'top-full z-base flex h-ds-02b items-end justify-center overflow-hidden',\n className,\n )}\n {...props}\n >\n <motion.div\n layout\n initial={false}\n animate={isVisible ? { opacity: 1 } : { opacity: 0 }}\n transition={tweens.fade}\n className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-control-inner bg-surface-border shadow-raised-hover\"\n />\n </NavigationMenuPrimitive.Indicator>\n </MotionPreference>\n )\n})\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport type NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\nexport type NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n}\n"],"mappings":";;;;;;;;;;;AAYA,IAAM,IAAiB,EAAM,YAG1B,EAAE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M,KAAK,GACd,AAAI,EAAE,kBAAkB,gBACtB,EAAa,EAAG,aAAa,YAAY,MAAM,SAAS;EAG9D,CAAC;EAED,OADA,EAAS,QAAQ,GAAI;GAAE,YAAY;GAAM,iBAAiB,CAAC,YAAY;EAAE,CAAC,SAC7D,EAAS,WAAW;CACnC,GAAG,CAAC,CAAC,GAGH,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EACE,KAAK;EACL,WAAW,EACT,0EACA,CACF;EACA,GAAI;YAEJ,kBAAC,EAAO,KAAR;GACE,QAAA;GACA,SAAS;GACT,SAAS,IAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;GACnD,YAAY,EAAO;GACnB,WAAU;EACX,CAAA;CACgC,CAAA,EACnB,CAAA;AAEtB,CAAC;AACD,EAAwB,cAAA,EACY"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAkBnF,CAAA;AAGD,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,aAAa,4GAA0B,CAAA;AAE7C,QAAA,MAAM,cAAc,gKAiDlB,CAAA;AAGF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAEjG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAC,cAAc,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAkBnF,CAAA;AAGD,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,aAAa,4GAA0B,CAAA;AAE7C,QAAA,MAAM,cAAc,gKAmDlB,CAAA;AAGF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAEjG,OAAO,EAAE,OAAO,EAAE,aAAa,EAAC,cAAc,EAAE,cAAc,EAAE,CAAA"}