commerce-toolkit 0.3.0 → 0.4.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 (137) hide show
  1. package/dist/Combination-BYVrsWzR.js +674 -0
  2. package/dist/Combination-BYVrsWzR.js.map +1 -0
  3. package/dist/Combination-CMyKl2HP.cjs +42 -0
  4. package/dist/Combination-CMyKl2HP.cjs.map +1 -0
  5. package/dist/{checkbox-indicator-os50dewx.js → checkbox-indicator-C9hf5wZD.js} +2 -2
  6. package/dist/{checkbox-indicator-os50dewx.js.map → checkbox-indicator-C9hf5wZD.js.map} +1 -1
  7. package/dist/{checkbox-indicator-GNoyS6OL.cjs → checkbox-indicator-D3X4eolv.cjs} +2 -2
  8. package/dist/{checkbox-indicator-GNoyS6OL.cjs.map → checkbox-indicator-D3X4eolv.cjs.map} +1 -1
  9. package/dist/{checkbox-root-B9W2Y8rY.js → checkbox-root-CFYnDr-v.js} +115 -118
  10. package/dist/checkbox-root-CFYnDr-v.js.map +1 -0
  11. package/dist/checkbox-root-oz6K_T-0.cjs +2 -0
  12. package/dist/checkbox-root-oz6K_T-0.cjs.map +1 -0
  13. package/dist/checkbox.cjs +1 -1
  14. package/dist/checkbox.js +2 -2
  15. package/dist/compare-card.cjs +1 -1
  16. package/dist/compare-card.js +2 -2
  17. package/dist/components/form-status/form-status.d.ts +27 -0
  18. package/dist/components/form-status/form-status.d.ts.map +1 -0
  19. package/dist/components/form-status/index.d.ts +3 -0
  20. package/dist/components/form-status/index.d.ts.map +1 -0
  21. package/dist/components/form-status/primitives/form-status-root.d.ts +7 -0
  22. package/dist/components/form-status/primitives/form-status-root.d.ts.map +1 -0
  23. package/dist/components/form-status/primitives.d.ts +2 -0
  24. package/dist/components/form-status/primitives.d.ts.map +1 -0
  25. package/dist/components/logo/index.d.ts +0 -1
  26. package/dist/components/logo/index.d.ts.map +1 -1
  27. package/dist/components/logo/primitives/logo-text.d.ts +3 -1
  28. package/dist/components/logo/primitives/logo-text.d.ts.map +1 -1
  29. package/dist/components/navigation-menu/index.d.ts +3 -0
  30. package/dist/components/navigation-menu/index.d.ts.map +1 -0
  31. package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
  32. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  33. package/dist/components/navigation-menu/primitives/navigation-menu-content.d.ts +5 -0
  34. package/dist/components/navigation-menu/primitives/navigation-menu-content.d.ts.map +1 -0
  35. package/dist/components/navigation-menu/primitives/navigation-menu-grid-column.d.ts +4 -0
  36. package/dist/components/navigation-menu/primitives/navigation-menu-grid-column.d.ts.map +1 -0
  37. package/dist/components/navigation-menu/primitives/navigation-menu-grid-label.d.ts +5 -0
  38. package/dist/components/navigation-menu/primitives/navigation-menu-grid-label.d.ts.map +1 -0
  39. package/dist/components/navigation-menu/primitives/navigation-menu-grid-link.d.ts +5 -0
  40. package/dist/components/navigation-menu/primitives/navigation-menu-grid-link.d.ts.map +1 -0
  41. package/dist/components/navigation-menu/primitives/navigation-menu-grid.d.ts +4 -0
  42. package/dist/components/navigation-menu/primitives/navigation-menu-grid.d.ts.map +1 -0
  43. package/dist/components/navigation-menu/primitives/navigation-menu-item.d.ts +5 -0
  44. package/dist/components/navigation-menu/primitives/navigation-menu-item.d.ts.map +1 -0
  45. package/dist/components/navigation-menu/primitives/navigation-menu-link.d.ts +5 -0
  46. package/dist/components/navigation-menu/primitives/navigation-menu-link.d.ts.map +1 -0
  47. package/dist/components/navigation-menu/primitives/navigation-menu-list.d.ts +5 -0
  48. package/dist/components/navigation-menu/primitives/navigation-menu-list.d.ts.map +1 -0
  49. package/dist/components/navigation-menu/primitives/navigation-menu-panel.d.ts +4 -0
  50. package/dist/components/navigation-menu/primitives/navigation-menu-panel.d.ts.map +1 -0
  51. package/dist/components/navigation-menu/primitives/navigation-menu-root.d.ts +8 -0
  52. package/dist/components/navigation-menu/primitives/navigation-menu-root.d.ts.map +1 -0
  53. package/dist/components/navigation-menu/primitives/navigation-menu-slot.d.ts +4 -0
  54. package/dist/components/navigation-menu/primitives/navigation-menu-slot.d.ts.map +1 -0
  55. package/dist/components/navigation-menu/primitives/navigation-menu-trigger.d.ts +5 -0
  56. package/dist/components/navigation-menu/primitives/navigation-menu-trigger.d.ts.map +1 -0
  57. package/dist/components/navigation-menu/primitives/navigation-menu-viewport.d.ts +5 -0
  58. package/dist/components/navigation-menu/primitives/navigation-menu-viewport.d.ts.map +1 -0
  59. package/dist/components/navigation-menu/primitives.d.ts +13 -0
  60. package/dist/components/navigation-menu/primitives.d.ts.map +1 -0
  61. package/dist/{dropdown-menu-node-zOplWIzZ.cjs → dropdown-menu-node-C0Oe_nJV.cjs} +3 -3
  62. package/dist/{dropdown-menu-node-zOplWIzZ.cjs.map → dropdown-menu-node-C0Oe_nJV.cjs.map} +1 -1
  63. package/dist/{dropdown-menu-node-4Pe3uXjC.js → dropdown-menu-node-CrYNKRZ0.js} +20 -19
  64. package/dist/{dropdown-menu-node-4Pe3uXjC.js.map → dropdown-menu-node-CrYNKRZ0.js.map} +1 -1
  65. package/dist/dropdown-menu.cjs +1 -1
  66. package/dist/dropdown-menu.js +1 -1
  67. package/dist/form-status.cjs +2 -0
  68. package/dist/form-status.cjs.map +1 -0
  69. package/dist/form-status.js +33 -0
  70. package/dist/form-status.js.map +1 -0
  71. package/dist/index-BSyIT6yC.cjs +2 -0
  72. package/dist/index-BSyIT6yC.cjs.map +1 -0
  73. package/dist/index-BZPx6jYI.js +9 -0
  74. package/dist/index-BZPx6jYI.js.map +1 -0
  75. package/dist/index-CY_4_uMy.cjs +6 -0
  76. package/dist/{index-BppAzNV8.cjs.map → index-CY_4_uMy.cjs.map} +1 -1
  77. package/dist/index-DYxWvftI.cjs +2 -0
  78. package/dist/index-DYxWvftI.cjs.map +1 -0
  79. package/dist/index-DoAIVWjZ.js +135 -0
  80. package/dist/index-DoAIVWjZ.js.map +1 -0
  81. package/dist/{index-ChSlzMYI.js → index-DthUnpqb.js} +17 -16
  82. package/dist/{index-ChSlzMYI.js.map → index-DthUnpqb.js.map} +1 -1
  83. package/dist/index.cjs +3 -3
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +678 -678
  88. package/dist/index.js.map +1 -1
  89. package/dist/logo-skeleton-CgTRdVwc.js +44 -0
  90. package/dist/logo-skeleton-CgTRdVwc.js.map +1 -0
  91. package/dist/logo-skeleton-CpbzziY-.cjs +2 -0
  92. package/dist/logo-skeleton-CpbzziY-.cjs.map +1 -0
  93. package/dist/logo.cjs +1 -1
  94. package/dist/logo.cjs.map +1 -1
  95. package/dist/logo.js +4 -10
  96. package/dist/logo.js.map +1 -1
  97. package/dist/{modal-title-CuB6IpxH.cjs → modal-title-BrR2NosO.cjs} +2 -2
  98. package/dist/{modal-title-CuB6IpxH.cjs.map → modal-title-BrR2NosO.cjs.map} +1 -1
  99. package/dist/{modal-title-MIH3Xsp2.js → modal-title-ji5CKbNn.js} +2 -2
  100. package/dist/{modal-title-MIH3Xsp2.js.map → modal-title-ji5CKbNn.js.map} +1 -1
  101. package/dist/modal.cjs +1 -1
  102. package/dist/modal.js +1 -1
  103. package/dist/navigation-menu.cjs +2 -0
  104. package/dist/navigation-menu.cjs.map +1 -0
  105. package/dist/navigation-menu.js +880 -0
  106. package/dist/navigation-menu.js.map +1 -0
  107. package/dist/{product-card-label-D43AXtRL.cjs → product-card-label-B1EwGQhM.cjs} +2 -2
  108. package/dist/{product-card-label-D43AXtRL.cjs.map → product-card-label-B1EwGQhM.cjs.map} +1 -1
  109. package/dist/{product-card-label-CJmC9ICf.js → product-card-label-Djn5qQC4.js} +3 -3
  110. package/dist/{product-card-label-CJmC9ICf.js.map → product-card-label-Djn5qQC4.js.map} +1 -1
  111. package/dist/{product-card-skeleton-CCQkDMNl.cjs → product-card-skeleton-B2lGkIgo.cjs} +2 -2
  112. package/dist/{product-card-skeleton-CCQkDMNl.cjs.map → product-card-skeleton-B2lGkIgo.cjs.map} +1 -1
  113. package/dist/{product-card-skeleton-Dkqf-bfA.js → product-card-skeleton-Rvy8Ocb0.js} +2 -2
  114. package/dist/{product-card-skeleton-Dkqf-bfA.js.map → product-card-skeleton-Rvy8Ocb0.js.map} +1 -1
  115. package/dist/product-card.cjs +1 -1
  116. package/dist/product-card.js +2 -2
  117. package/dist/{side-panel-close-DVJwOxdM.js → side-panel-close-BtypdE9q.js} +2 -2
  118. package/dist/{side-panel-close-DVJwOxdM.js.map → side-panel-close-BtypdE9q.js.map} +1 -1
  119. package/dist/{side-panel-close-Bjcn4BEE.cjs → side-panel-close-DIP8gLRZ.cjs} +2 -2
  120. package/dist/{side-panel-close-Bjcn4BEE.cjs.map → side-panel-close-DIP8gLRZ.cjs.map} +1 -1
  121. package/dist/side-panel.cjs +1 -1
  122. package/dist/side-panel.js +1 -1
  123. package/package.json +21 -1
  124. package/dist/Combination-49q9aXeT.js +0 -801
  125. package/dist/Combination-49q9aXeT.js.map +0 -1
  126. package/dist/Combination-DAFZFTdA.cjs +0 -42
  127. package/dist/Combination-DAFZFTdA.cjs.map +0 -1
  128. package/dist/checkbox-root-B9W2Y8rY.js.map +0 -1
  129. package/dist/checkbox-root-g9HcYZCP.cjs +0 -2
  130. package/dist/checkbox-root-g9HcYZCP.cjs.map +0 -1
  131. package/dist/components/logo/logo.d.ts +0 -32
  132. package/dist/components/logo/logo.d.ts.map +0 -1
  133. package/dist/index-BppAzNV8.cjs +0 -6
  134. package/dist/logo-text-CK4vcNPY.js +0 -39
  135. package/dist/logo-text-CK4vcNPY.js.map +0 -1
  136. package/dist/logo-text-Db3yd3b1.cjs +0 -2
  137. package/dist/logo-text-Db3yd3b1.cjs.map +0 -1
@@ -0,0 +1,880 @@
1
+ import { jsx as i, jsxs as Z, Fragment as ee } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import Ee from "react-dom";
4
+ import { c as Te, P as K } from "./index-Df-2-3xv.js";
5
+ import { c as y } from "./index-B695uy69.js";
6
+ import { P as E, u as z, d as te } from "./index-BzgbBl8b.js";
7
+ import { u as re } from "./index-Cn_ZXVPF.js";
8
+ import { u as O, c as Ie } from "./index-DLcqcWxM.js";
9
+ import { u as _e } from "./index-ByaXH_ih.js";
10
+ import { u as ae } from "./index-9BYBSfjb.js";
11
+ import { c as ie } from "./index-Aj7AU26N.js";
12
+ import { D as Pe } from "./index-DoAIVWjZ.js";
13
+ import { u as ke } from "./index-BZPx6jYI.js";
14
+ import { u as L } from "./index-0ioNhtNM.js";
15
+ import { c as T } from "./utils-BOGlfttm.js";
16
+ var Se = Object.freeze({
17
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
18
+ position: "absolute",
19
+ border: 0,
20
+ width: 1,
21
+ height: 1,
22
+ padding: 0,
23
+ margin: -1,
24
+ overflow: "hidden",
25
+ clip: "rect(0, 0, 0, 0)",
26
+ whiteSpace: "nowrap",
27
+ wordWrap: "normal"
28
+ }), Le = "VisuallyHidden", se = s.forwardRef(
29
+ (e, t) => /* @__PURE__ */ i(
30
+ E.span,
31
+ {
32
+ ...e,
33
+ ref: t,
34
+ style: { ...Se, ...e.style }
35
+ }
36
+ )
37
+ );
38
+ se.displayName = Le;
39
+ var De = se, D = "NavigationMenu", [j, ue, Ae] = ie(D), [U, Oe, Fe] = ie(D), [Y] = Te(
40
+ D,
41
+ [Ae, Fe]
42
+ ), [Ve, I] = Y(D), [Ke, Ge] = Y(D), ce = s.forwardRef(
43
+ (e, t) => {
44
+ const {
45
+ __scopeNavigationMenu: n,
46
+ value: r,
47
+ onValueChange: o,
48
+ defaultValue: a,
49
+ delayDuration: u = 200,
50
+ skipDelayDuration: v = 300,
51
+ orientation: l = "horizontal",
52
+ dir: b,
53
+ ...c
54
+ } = e, [g, M] = s.useState(null), x = O(t, (N) => M(N)), p = _e(b), w = s.useRef(0), C = s.useRef(0), R = s.useRef(0), [_, d] = s.useState(!0), [m, f] = re({
55
+ prop: r,
56
+ onChange: (N) => {
57
+ const k = N !== "", G = v > 0;
58
+ k ? (window.clearTimeout(R.current), G && d(!1)) : (window.clearTimeout(R.current), R.current = window.setTimeout(
59
+ () => d(!0),
60
+ v
61
+ )), o?.(N);
62
+ },
63
+ defaultProp: a ?? "",
64
+ caller: D
65
+ }), h = s.useCallback(() => {
66
+ window.clearTimeout(C.current), C.current = window.setTimeout(() => f(""), 150);
67
+ }, [f]), P = s.useCallback(
68
+ (N) => {
69
+ window.clearTimeout(C.current), f(N);
70
+ },
71
+ [f]
72
+ ), S = s.useCallback(
73
+ (N) => {
74
+ m === N ? window.clearTimeout(C.current) : w.current = window.setTimeout(() => {
75
+ window.clearTimeout(C.current), f(N);
76
+ }, u);
77
+ },
78
+ [m, f, u]
79
+ );
80
+ return s.useEffect(() => () => {
81
+ window.clearTimeout(w.current), window.clearTimeout(C.current), window.clearTimeout(R.current);
82
+ }, []), /* @__PURE__ */ i(
83
+ le,
84
+ {
85
+ scope: n,
86
+ isRootMenu: !0,
87
+ value: m,
88
+ dir: p,
89
+ orientation: l,
90
+ rootNavigationMenu: g,
91
+ onTriggerEnter: (N) => {
92
+ window.clearTimeout(w.current), _ ? S(N) : P(N);
93
+ },
94
+ onTriggerLeave: () => {
95
+ window.clearTimeout(w.current), h();
96
+ },
97
+ onContentEnter: () => window.clearTimeout(C.current),
98
+ onContentLeave: h,
99
+ onItemSelect: (N) => {
100
+ f((k) => k === N ? "" : N);
101
+ },
102
+ onItemDismiss: () => f(""),
103
+ children: /* @__PURE__ */ i(
104
+ E.nav,
105
+ {
106
+ "aria-label": "Main",
107
+ "data-orientation": l,
108
+ dir: p,
109
+ ...c,
110
+ ref: x
111
+ }
112
+ )
113
+ }
114
+ );
115
+ }
116
+ );
117
+ ce.displayName = D;
118
+ var H = "NavigationMenuSub", ze = s.forwardRef(
119
+ (e, t) => {
120
+ const {
121
+ __scopeNavigationMenu: n,
122
+ value: r,
123
+ onValueChange: o,
124
+ defaultValue: a,
125
+ orientation: u = "horizontal",
126
+ ...v
127
+ } = e, l = I(H, n), [b, c] = re({
128
+ prop: r,
129
+ onChange: o,
130
+ defaultProp: a ?? "",
131
+ caller: H
132
+ });
133
+ return /* @__PURE__ */ i(
134
+ le,
135
+ {
136
+ scope: n,
137
+ isRootMenu: !1,
138
+ value: b,
139
+ dir: l.dir,
140
+ orientation: u,
141
+ rootNavigationMenu: l.rootNavigationMenu,
142
+ onTriggerEnter: (g) => c(g),
143
+ onItemSelect: (g) => c(g),
144
+ onItemDismiss: () => c(""),
145
+ children: /* @__PURE__ */ i(E.div, { "data-orientation": u, ...v, ref: t })
146
+ }
147
+ );
148
+ }
149
+ );
150
+ ze.displayName = H;
151
+ var le = (e) => {
152
+ const {
153
+ scope: t,
154
+ isRootMenu: n,
155
+ rootNavigationMenu: r,
156
+ dir: o,
157
+ orientation: a,
158
+ children: u,
159
+ value: v,
160
+ onItemSelect: l,
161
+ onItemDismiss: b,
162
+ onTriggerEnter: c,
163
+ onTriggerLeave: g,
164
+ onContentEnter: M,
165
+ onContentLeave: x
166
+ } = e, [p, w] = s.useState(null), [C, R] = s.useState(/* @__PURE__ */ new Map()), [_, d] = s.useState(null);
167
+ return /* @__PURE__ */ i(
168
+ Ve,
169
+ {
170
+ scope: t,
171
+ isRootMenu: n,
172
+ rootNavigationMenu: r,
173
+ value: v,
174
+ previousValue: ke(v),
175
+ baseId: ae(),
176
+ dir: o,
177
+ orientation: a,
178
+ viewport: p,
179
+ onViewportChange: w,
180
+ indicatorTrack: _,
181
+ onIndicatorTrackChange: d,
182
+ onTriggerEnter: L(c),
183
+ onTriggerLeave: L(g),
184
+ onContentEnter: L(M),
185
+ onContentLeave: L(x),
186
+ onItemSelect: L(l),
187
+ onItemDismiss: L(b),
188
+ onViewportContentChange: s.useCallback((m, f) => {
189
+ R((h) => (h.set(m, f), new Map(h)));
190
+ }, []),
191
+ onViewportContentRemove: s.useCallback((m) => {
192
+ R((f) => f.has(m) ? (f.delete(m), new Map(f)) : f);
193
+ }, []),
194
+ children: /* @__PURE__ */ i(j.Provider, { scope: t, children: /* @__PURE__ */ i(Ke, { scope: t, items: C, children: u }) })
195
+ }
196
+ );
197
+ }, ve = "NavigationMenuList", de = s.forwardRef(
198
+ (e, t) => {
199
+ const { __scopeNavigationMenu: n, ...r } = e, o = I(ve, n), a = /* @__PURE__ */ i(E.ul, { "data-orientation": o.orientation, ...r, ref: t });
200
+ return /* @__PURE__ */ i(E.div, { style: { position: "relative" }, ref: o.onIndicatorTrackChange, children: /* @__PURE__ */ i(j.Slot, { scope: n, children: o.isRootMenu ? /* @__PURE__ */ i(Ce, { asChild: !0, children: a }) : a }) });
201
+ }
202
+ );
203
+ de.displayName = ve;
204
+ var fe = "NavigationMenuItem", [Ue, ge] = Y(fe), me = s.forwardRef(
205
+ (e, t) => {
206
+ const { __scopeNavigationMenu: n, value: r, ...o } = e, a = ae(), u = r || a || "LEGACY_REACT_AUTO_VALUE", v = s.useRef(null), l = s.useRef(null), b = s.useRef(null), c = s.useRef(() => {
207
+ }), g = s.useRef(!1), M = s.useCallback((p = "start") => {
208
+ if (v.current) {
209
+ c.current();
210
+ const w = W(v.current);
211
+ w.length && J(p === "start" ? w : w.reverse());
212
+ }
213
+ }, []), x = s.useCallback(() => {
214
+ if (v.current) {
215
+ const p = W(v.current);
216
+ p.length && (c.current = Xe(p));
217
+ }
218
+ }, []);
219
+ return /* @__PURE__ */ i(
220
+ Ue,
221
+ {
222
+ scope: n,
223
+ value: u,
224
+ triggerRef: l,
225
+ contentRef: v,
226
+ focusProxyRef: b,
227
+ wasEscapeCloseRef: g,
228
+ onEntryKeyDown: M,
229
+ onFocusProxyEnter: M,
230
+ onRootContentClose: x,
231
+ onContentFocusOutside: x,
232
+ children: /* @__PURE__ */ i(E.li, { ...o, ref: t })
233
+ }
234
+ );
235
+ }
236
+ );
237
+ me.displayName = fe;
238
+ var $ = "NavigationMenuTrigger", pe = s.forwardRef((e, t) => {
239
+ const { __scopeNavigationMenu: n, disabled: r, ...o } = e, a = I($, e.__scopeNavigationMenu), u = ge($, e.__scopeNavigationMenu), v = s.useRef(null), l = O(v, u.triggerRef, t), b = xe(a.baseId, u.value), c = Re(a.baseId, u.value), g = s.useRef(!1), M = s.useRef(!1), x = u.value === a.value;
240
+ return /* @__PURE__ */ Z(ee, { children: [
241
+ /* @__PURE__ */ i(j.ItemSlot, { scope: n, value: u.value, children: /* @__PURE__ */ i(Me, { asChild: !0, children: /* @__PURE__ */ i(
242
+ E.button,
243
+ {
244
+ id: b,
245
+ disabled: r,
246
+ "data-disabled": r ? "" : void 0,
247
+ "data-state": Q(x),
248
+ "aria-expanded": x,
249
+ "aria-controls": c,
250
+ ...o,
251
+ ref: l,
252
+ onPointerEnter: y(e.onPointerEnter, () => {
253
+ M.current = !1, u.wasEscapeCloseRef.current = !1;
254
+ }),
255
+ onPointerMove: y(
256
+ e.onPointerMove,
257
+ V(() => {
258
+ r || M.current || u.wasEscapeCloseRef.current || g.current || (a.onTriggerEnter(u.value), g.current = !0);
259
+ })
260
+ ),
261
+ onPointerLeave: y(
262
+ e.onPointerLeave,
263
+ V(() => {
264
+ r || (a.onTriggerLeave(), g.current = !1);
265
+ })
266
+ ),
267
+ onClick: y(e.onClick, () => {
268
+ a.onItemSelect(u.value), M.current = x;
269
+ }),
270
+ onKeyDown: y(e.onKeyDown, (p) => {
271
+ const C = { horizontal: "ArrowDown", vertical: a.dir === "rtl" ? "ArrowLeft" : "ArrowRight" }[a.orientation];
272
+ x && p.key === C && (u.onEntryKeyDown(), p.preventDefault());
273
+ })
274
+ }
275
+ ) }) }),
276
+ x && /* @__PURE__ */ Z(ee, { children: [
277
+ /* @__PURE__ */ i(
278
+ De,
279
+ {
280
+ "aria-hidden": !0,
281
+ tabIndex: 0,
282
+ ref: u.focusProxyRef,
283
+ onFocus: (p) => {
284
+ const w = u.contentRef.current, C = p.relatedTarget, R = C === v.current, _ = w?.contains(C);
285
+ (R || !_) && u.onFocusProxyEnter(R ? "start" : "end");
286
+ }
287
+ }
288
+ ),
289
+ a.viewport && /* @__PURE__ */ i("span", { "aria-owns": c })
290
+ ] })
291
+ ] });
292
+ });
293
+ pe.displayName = $;
294
+ var He = "NavigationMenuLink", ne = "navigationMenu.linkSelect", we = s.forwardRef(
295
+ (e, t) => {
296
+ const { __scopeNavigationMenu: n, active: r, onSelect: o, ...a } = e;
297
+ return /* @__PURE__ */ i(Me, { asChild: !0, children: /* @__PURE__ */ i(
298
+ E.a,
299
+ {
300
+ "data-active": r ? "" : void 0,
301
+ "aria-current": r ? "page" : void 0,
302
+ ...a,
303
+ ref: t,
304
+ onClick: y(
305
+ e.onClick,
306
+ (u) => {
307
+ const v = u.target, l = new CustomEvent(ne, {
308
+ bubbles: !0,
309
+ cancelable: !0
310
+ });
311
+ if (v.addEventListener(ne, (b) => o?.(b), { once: !0 }), te(v, l), !l.defaultPrevented && !u.metaKey) {
312
+ const b = new CustomEvent(F, {
313
+ bubbles: !0,
314
+ cancelable: !0
315
+ });
316
+ te(v, b);
317
+ }
318
+ },
319
+ { checkForDefaultPrevented: !1 }
320
+ )
321
+ }
322
+ ) });
323
+ }
324
+ );
325
+ we.displayName = He;
326
+ var q = "NavigationMenuIndicator", $e = s.forwardRef((e, t) => {
327
+ const { forceMount: n, ...r } = e, o = I(q, e.__scopeNavigationMenu), a = !!o.value;
328
+ return o.indicatorTrack ? Ee.createPortal(
329
+ /* @__PURE__ */ i(K, { present: n || a, children: /* @__PURE__ */ i(We, { ...r, ref: t }) }),
330
+ o.indicatorTrack
331
+ ) : null;
332
+ });
333
+ $e.displayName = q;
334
+ var We = s.forwardRef((e, t) => {
335
+ const { __scopeNavigationMenu: n, ...r } = e, o = I(q, n), a = ue(n), [u, v] = s.useState(
336
+ null
337
+ ), [l, b] = s.useState(null), c = o.orientation === "horizontal", g = !!o.value;
338
+ s.useEffect(() => {
339
+ const p = a().find((w) => w.value === o.value)?.ref.current;
340
+ p && v(p);
341
+ }, [a, o.value]);
342
+ const M = () => {
343
+ u && b({
344
+ size: c ? u.offsetWidth : u.offsetHeight,
345
+ offset: c ? u.offsetLeft : u.offsetTop
346
+ });
347
+ };
348
+ return B(u, M), B(o.indicatorTrack, M), l ? /* @__PURE__ */ i(
349
+ E.div,
350
+ {
351
+ "aria-hidden": !0,
352
+ "data-state": g ? "visible" : "hidden",
353
+ "data-orientation": o.orientation,
354
+ ...r,
355
+ ref: t,
356
+ style: {
357
+ position: "absolute",
358
+ ...c ? {
359
+ left: 0,
360
+ width: l.size + "px",
361
+ transform: `translateX(${l.offset}px)`
362
+ } : {
363
+ top: 0,
364
+ height: l.size + "px",
365
+ transform: `translateY(${l.offset}px)`
366
+ },
367
+ ...r.style
368
+ }
369
+ }
370
+ ) : null;
371
+ }), A = "NavigationMenuContent", he = s.forwardRef((e, t) => {
372
+ const { forceMount: n, ...r } = e, o = I(A, e.__scopeNavigationMenu), a = ge(A, e.__scopeNavigationMenu), u = O(a.contentRef, t), v = a.value === o.value, l = {
373
+ value: a.value,
374
+ triggerRef: a.triggerRef,
375
+ focusProxyRef: a.focusProxyRef,
376
+ wasEscapeCloseRef: a.wasEscapeCloseRef,
377
+ onContentFocusOutside: a.onContentFocusOutside,
378
+ onRootContentClose: a.onRootContentClose,
379
+ ...r
380
+ };
381
+ return o.viewport ? /* @__PURE__ */ i(Be, { forceMount: n, ...l, ref: u }) : /* @__PURE__ */ i(K, { present: n || v, children: /* @__PURE__ */ i(
382
+ be,
383
+ {
384
+ "data-state": Q(v),
385
+ ...l,
386
+ ref: u,
387
+ onPointerEnter: y(e.onPointerEnter, o.onContentEnter),
388
+ onPointerLeave: y(
389
+ e.onPointerLeave,
390
+ V(o.onContentLeave)
391
+ ),
392
+ style: {
393
+ // Prevent interaction when animating out
394
+ pointerEvents: !v && o.isRootMenu ? "none" : void 0,
395
+ ...l.style
396
+ }
397
+ }
398
+ ) });
399
+ });
400
+ he.displayName = A;
401
+ var Be = s.forwardRef((e, t) => {
402
+ const n = I(A, e.__scopeNavigationMenu), { onViewportContentChange: r, onViewportContentRemove: o } = n;
403
+ return z(() => {
404
+ r(e.value, {
405
+ ref: t,
406
+ ...e
407
+ });
408
+ }, [e, t, r]), z(() => () => o(e.value), [e.value, o]), null;
409
+ }), F = "navigationMenu.rootContentDismiss", be = s.forwardRef((e, t) => {
410
+ const {
411
+ __scopeNavigationMenu: n,
412
+ value: r,
413
+ triggerRef: o,
414
+ focusProxyRef: a,
415
+ wasEscapeCloseRef: u,
416
+ onRootContentClose: v,
417
+ onContentFocusOutside: l,
418
+ ...b
419
+ } = e, c = I(A, n), g = s.useRef(null), M = O(g, t), x = xe(c.baseId, r), p = Re(c.baseId, r), w = ue(n), C = s.useRef(null), { onItemDismiss: R } = c;
420
+ s.useEffect(() => {
421
+ const d = g.current;
422
+ if (c.isRootMenu && d) {
423
+ const m = () => {
424
+ R(), v(), d.contains(document.activeElement) && o.current?.focus();
425
+ };
426
+ return d.addEventListener(F, m), () => d.removeEventListener(F, m);
427
+ }
428
+ }, [c.isRootMenu, e.value, o, R, v]);
429
+ const _ = s.useMemo(() => {
430
+ const m = w().map((k) => k.value);
431
+ c.dir === "rtl" && m.reverse();
432
+ const f = m.indexOf(c.value), h = m.indexOf(c.previousValue), P = r === c.value, S = h === m.indexOf(r);
433
+ if (!P && !S) return C.current;
434
+ const N = (() => {
435
+ if (f !== h) {
436
+ if (P && h !== -1) return f > h ? "from-end" : "from-start";
437
+ if (S && f !== -1) return f > h ? "to-start" : "to-end";
438
+ }
439
+ return null;
440
+ })();
441
+ return C.current = N, N;
442
+ }, [c.previousValue, c.value, c.dir, w, r]);
443
+ return /* @__PURE__ */ i(Ce, { asChild: !0, children: /* @__PURE__ */ i(
444
+ Pe,
445
+ {
446
+ id: p,
447
+ "aria-labelledby": x,
448
+ "data-motion": _,
449
+ "data-orientation": c.orientation,
450
+ ...b,
451
+ ref: M,
452
+ disableOutsidePointerEvents: !1,
453
+ onDismiss: () => {
454
+ const d = new Event(F, {
455
+ bubbles: !0,
456
+ cancelable: !0
457
+ });
458
+ g.current?.dispatchEvent(d);
459
+ },
460
+ onFocusOutside: y(e.onFocusOutside, (d) => {
461
+ l();
462
+ const m = d.target;
463
+ c.rootNavigationMenu?.contains(m) && d.preventDefault();
464
+ }),
465
+ onPointerDownOutside: y(e.onPointerDownOutside, (d) => {
466
+ const m = d.target, f = w().some((P) => P.ref.current?.contains(m)), h = c.isRootMenu && c.viewport?.contains(m);
467
+ (f || h || !c.isRootMenu) && d.preventDefault();
468
+ }),
469
+ onKeyDown: y(e.onKeyDown, (d) => {
470
+ const m = d.altKey || d.ctrlKey || d.metaKey;
471
+ if (d.key === "Tab" && !m) {
472
+ const h = W(d.currentTarget), P = document.activeElement, S = h.findIndex((G) => G === P), k = d.shiftKey ? h.slice(0, S).reverse() : h.slice(S + 1, h.length);
473
+ J(k) ? d.preventDefault() : a.current?.focus();
474
+ }
475
+ }),
476
+ onEscapeKeyDown: y(e.onEscapeKeyDown, (d) => {
477
+ u.current = !0;
478
+ })
479
+ }
480
+ ) });
481
+ }), X = "NavigationMenuViewport", Ne = s.forwardRef((e, t) => {
482
+ const { forceMount: n, ...r } = e, a = !!I(X, e.__scopeNavigationMenu).value;
483
+ return /* @__PURE__ */ i(K, { present: n || a, children: /* @__PURE__ */ i(je, { ...r, ref: t }) });
484
+ });
485
+ Ne.displayName = X;
486
+ var je = s.forwardRef((e, t) => {
487
+ const { __scopeNavigationMenu: n, children: r, ...o } = e, a = I(X, n), u = O(t, a.onViewportChange), v = Ge(
488
+ A,
489
+ e.__scopeNavigationMenu
490
+ ), [l, b] = s.useState(null), [c, g] = s.useState(null), M = l ? l?.width + "px" : void 0, x = l ? l?.height + "px" : void 0, p = !!a.value, w = p ? a.value : a.previousValue;
491
+ return B(c, () => {
492
+ c && b({ width: c.offsetWidth, height: c.offsetHeight });
493
+ }), /* @__PURE__ */ i(
494
+ E.div,
495
+ {
496
+ "data-state": Q(p),
497
+ "data-orientation": a.orientation,
498
+ ...o,
499
+ ref: u,
500
+ style: {
501
+ // Prevent interaction when animating out
502
+ pointerEvents: !p && a.isRootMenu ? "none" : void 0,
503
+ "--radix-navigation-menu-viewport-width": M,
504
+ "--radix-navigation-menu-viewport-height": x,
505
+ ...o.style
506
+ },
507
+ onPointerEnter: y(e.onPointerEnter, a.onContentEnter),
508
+ onPointerLeave: y(e.onPointerLeave, V(a.onContentLeave)),
509
+ children: Array.from(v.items).map(([R, { ref: _, forceMount: d, ...m }]) => {
510
+ const f = w === R;
511
+ return /* @__PURE__ */ i(K, { present: d || f, children: /* @__PURE__ */ i(
512
+ be,
513
+ {
514
+ ...m,
515
+ ref: Ie(_, (h) => {
516
+ f && h && g(h);
517
+ })
518
+ }
519
+ ) }, R);
520
+ })
521
+ }
522
+ );
523
+ }), Ye = "FocusGroup", Ce = s.forwardRef(
524
+ (e, t) => {
525
+ const { __scopeNavigationMenu: n, ...r } = e, o = I(Ye, n);
526
+ return /* @__PURE__ */ i(U.Provider, { scope: n, children: /* @__PURE__ */ i(U.Slot, { scope: n, children: /* @__PURE__ */ i(E.div, { dir: o.dir, ...r, ref: t }) }) });
527
+ }
528
+ ), oe = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], qe = "FocusGroupItem", Me = s.forwardRef(
529
+ (e, t) => {
530
+ const { __scopeNavigationMenu: n, ...r } = e, o = Oe(n), a = I(qe, n);
531
+ return /* @__PURE__ */ i(U.ItemSlot, { scope: n, children: /* @__PURE__ */ i(
532
+ E.button,
533
+ {
534
+ ...r,
535
+ ref: t,
536
+ onKeyDown: y(e.onKeyDown, (u) => {
537
+ if (["Home", "End", ...oe].includes(u.key)) {
538
+ let l = o().map((g) => g.ref.current);
539
+ if ([a.dir === "rtl" ? "ArrowRight" : "ArrowLeft", "ArrowUp", "End"].includes(u.key) && l.reverse(), oe.includes(u.key)) {
540
+ const g = l.indexOf(u.currentTarget);
541
+ l = l.slice(g + 1);
542
+ }
543
+ setTimeout(() => J(l)), u.preventDefault();
544
+ }
545
+ })
546
+ }
547
+ ) });
548
+ }
549
+ );
550
+ function W(e) {
551
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
552
+ acceptNode: (r) => {
553
+ const o = r.tagName === "INPUT" && r.type === "hidden";
554
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
555
+ }
556
+ });
557
+ for (; n.nextNode(); ) t.push(n.currentNode);
558
+ return t;
559
+ }
560
+ function J(e) {
561
+ const t = document.activeElement;
562
+ return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
563
+ }
564
+ function Xe(e) {
565
+ return e.forEach((t) => {
566
+ t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
567
+ }), () => {
568
+ e.forEach((t) => {
569
+ const n = t.dataset.tabindex;
570
+ t.setAttribute("tabindex", n);
571
+ });
572
+ };
573
+ }
574
+ function B(e, t) {
575
+ const n = L(t);
576
+ z(() => {
577
+ let r = 0;
578
+ if (e) {
579
+ const o = new ResizeObserver(() => {
580
+ cancelAnimationFrame(r), r = window.requestAnimationFrame(n);
581
+ });
582
+ return o.observe(e), () => {
583
+ window.cancelAnimationFrame(r), o.unobserve(e);
584
+ };
585
+ }
586
+ }, [e, n]);
587
+ }
588
+ function Q(e) {
589
+ return e ? "open" : "closed";
590
+ }
591
+ function xe(e, t) {
592
+ return `${e}-trigger-${t}`;
593
+ }
594
+ function Re(e, t) {
595
+ return `${e}-content-${t}`;
596
+ }
597
+ function V(e) {
598
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
599
+ }
600
+ var Je = ce, Qe = de, Ze = me, et = pe, ye = we, tt = he, nt = Ne;
601
+ function wt({
602
+ children: e,
603
+ className: t,
604
+ viewport: n,
605
+ columns: r = 5,
606
+ ...o
607
+ }) {
608
+ return /* @__PURE__ */ i(
609
+ Je,
610
+ {
611
+ className: T(
612
+ // Base layout
613
+ "group/navigation-menu relative flex w-full flex-1 items-center justify-center",
614
+ t
615
+ ),
616
+ "data-columns": r,
617
+ "data-slot": "navigation-menu-root",
618
+ "data-viewport": n,
619
+ ...o,
620
+ children: e
621
+ }
622
+ );
623
+ }
624
+ function ht({
625
+ className: e,
626
+ children: t,
627
+ ...n
628
+ }) {
629
+ return /* @__PURE__ */ i(
630
+ nt,
631
+ {
632
+ className: T(
633
+ // Base layout
634
+ "origin-top-center relative mt-2 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden",
635
+ // Colors
636
+ "bg-[var(--nav-viewport-background,hsl(var(--background)))] text-[var(--nav-text,hsl(var(--foreground)))]",
637
+ // Borders & rounded
638
+ "rounded-3xl border border-[var(--nav-viewport-border,color-mix(in_oklab,hsl(var(--foreground))_15%,transparent))]",
639
+ // Effects
640
+ "shadow",
641
+ // Closed state
642
+ "data-[state=closed]:animate-out data-[state=closed]:zoom-out-95",
643
+ // Open state
644
+ "data-[state=open]:animate-in data-[state=open]:zoom-in-90",
645
+ e
646
+ ),
647
+ "data-slot": "navigation-menu-viewport",
648
+ ...n,
649
+ children: t
650
+ }
651
+ );
652
+ }
653
+ function bt({ children: e, className: t, ...n }) {
654
+ return /* @__PURE__ */ i(
655
+ "div",
656
+ {
657
+ className: T(
658
+ // Base layout
659
+ "absolute left-0 right-0 top-full z-50 mx-auto w-full max-w-5xl",
660
+ t
661
+ ),
662
+ "data-slot": "navigation-menu-panel",
663
+ ...n,
664
+ children: e
665
+ }
666
+ );
667
+ }
668
+ function Nt({ children: e, className: t, ...n }) {
669
+ return /* @__PURE__ */ i(
670
+ Qe,
671
+ {
672
+ className: T(
673
+ // Base layout
674
+ "group flex w-full flex-1 list-none items-center justify-center gap-1",
675
+ t
676
+ ),
677
+ "data-slot": "navigation-menu-list",
678
+ ...n,
679
+ children: e
680
+ }
681
+ );
682
+ }
683
+ function Ct({ children: e, className: t, ...n }) {
684
+ return /* @__PURE__ */ i(
685
+ Ze,
686
+ {
687
+ className: T(
688
+ // Base layout
689
+ "relative",
690
+ t
691
+ ),
692
+ "data-slot": "navigation-menu-item",
693
+ ...n,
694
+ children: e
695
+ }
696
+ );
697
+ }
698
+ function Mt({
699
+ children: e,
700
+ className: t,
701
+ ...n
702
+ }) {
703
+ return /* @__PURE__ */ i(
704
+ et,
705
+ {
706
+ className: T(
707
+ // Base layout
708
+ "group inline-flex h-9 w-max items-center justify-center rounded-full bg-[var(--nav-link-background,transparent)] px-4 py-2",
709
+ // Typography
710
+ "text-sm font-semibold text-[var(--nav-link-text,hsl(var(--foreground)))] outline-none transition-colors duration-200 [font-family:var(--nav-link-font-family,var(--font-family-body))]",
711
+ // Background
712
+ "bg-background",
713
+ // Transitions
714
+ "outline-none transition-[color,box-shadow]",
715
+ // Hover state
716
+ "hover:bg-[var(--nav-link-background-hover,hsl(var(--contrast-100)))] hover:text-[var(--nav-link-text-hover,hsl(var(--foreground)))]",
717
+ // Focus state
718
+ "focus:bg-[var(--nav-link-background-hover,hsl(var(--contrast-100)))] focus:text-[var(--nav-link-text-hover,hsl(var(--foreground)))]",
719
+ // Focus-visible state
720
+ "focus-visible:outline-2 focus-visible:outline-[var(--nav-focus,hsl(var(--primary)))]",
721
+ // Open state
722
+ "data-[state=open]:bg-contrast-100/50 data-[state=open]:text-foreground",
723
+ "data-[state=open]:hover:bg-contrast-100 data-[state=open]:focus:bg-contrast-100",
724
+ // Disabled state
725
+ "disabled:pointer-events-none disabled:opacity-50",
726
+ t
727
+ ),
728
+ "data-slot": "navigation-menu-trigger",
729
+ ...n,
730
+ children: e
731
+ }
732
+ );
733
+ }
734
+ function xt({
735
+ className: e,
736
+ children: t,
737
+ ...n
738
+ }) {
739
+ return /* @__PURE__ */ i(
740
+ tt,
741
+ {
742
+ className: T(
743
+ // Base layout
744
+ "flex w-full gap-5 @container",
745
+ // Spacing
746
+ "p-5",
747
+ e
748
+ ),
749
+ "data-slot": "navigation-menu-content",
750
+ ...n,
751
+ children: t
752
+ }
753
+ );
754
+ }
755
+ function Rt({ className: e, children: t, ...n }) {
756
+ return /* @__PURE__ */ i(
757
+ "ul",
758
+ {
759
+ className: T(
760
+ // Base layout
761
+ "flex flex-1 flex-wrap gap-5",
762
+ e
763
+ ),
764
+ "data-slot": "navigation-menu-grid",
765
+ ...n,
766
+ children: t
767
+ }
768
+ );
769
+ }
770
+ function yt({
771
+ className: e,
772
+ children: t,
773
+ ...n
774
+ }) {
775
+ return /* @__PURE__ */ i(
776
+ "li",
777
+ {
778
+ className: T(
779
+ // Base layout - fixed width, no shrinking
780
+ "flex w-40 shrink-0 flex-col gap-0.5",
781
+ e
782
+ ),
783
+ "data-slot": "navigation-menu-grid-column",
784
+ ...n,
785
+ children: t
786
+ }
787
+ );
788
+ }
789
+ function Et({
790
+ className: e,
791
+ children: t,
792
+ ...n
793
+ }) {
794
+ return /* @__PURE__ */ i(
795
+ ye,
796
+ {
797
+ className: T(
798
+ // Base layout
799
+ "rounded-lg",
800
+ // Spacing
801
+ "px-3 py-2",
802
+ // Typography
803
+ "font-[family-name:var(--nav-grid-label-font-family,var(--font-family-body))] font-medium",
804
+ // Colors
805
+ "bg-[var(--nav-grid-label-background,transparent)] text-[var(--nav-grid-label-text,hsl(var(--foreground)))]",
806
+ // Transitions
807
+ "transition-colors",
808
+ // Hover state
809
+ "hover:bg-[var(--nav-grid-label-background-hover,hsl(var(--contrast-100)))] hover:text-[var(--nav-grid-label-text-hover,hsl(var(--foreground)))]",
810
+ // Focus-visible state
811
+ "focus-visible:bg-[var(--nav-grid-label-background-hover,hsl(var(--contrast-100)))] focus-visible:text-[var(--nav-grid-label-text-hover,hsl(var(--foreground)))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--nav-focus,hsl(var(--primary)))]",
812
+ e
813
+ ),
814
+ "data-slot": "navigation-menu-grid-label",
815
+ ...n,
816
+ children: t
817
+ }
818
+ );
819
+ }
820
+ function Tt({
821
+ className: e,
822
+ children: t,
823
+ ...n
824
+ }) {
825
+ return /* @__PURE__ */ i(
826
+ ye,
827
+ {
828
+ className: T(
829
+ // Base layout
830
+ "rounded-lg",
831
+ // Spacing
832
+ "px-3 py-2",
833
+ // Typography
834
+ "font-[family-name:var(--nav-grid-link-font-family,var(--font-family-body))] text-sm font-semibold",
835
+ // Colors
836
+ "bg-[var(--nav-grid-link-background,transparent)] text-[var(--nav-grid-link-text,hsl(var(--contrast-500)))]",
837
+ // Transitions
838
+ "transition-colors",
839
+ // Hover state
840
+ "hover:bg-[var(--nav-grid-label-background-hover,hsl(var(--contrast-100)))] hover:text-[var(--nav-grid-label-text-hover,hsl(var(--foreground)))]",
841
+ // Focus-visible state
842
+ "focus-visible:bg-[var(--nav-grid-label-background-hover,hsl(var(--contrast-100)))] focus-visible:text-[var(--nav-grid-label-text-hover,hsl(var(--foreground)))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--nav-focus,hsl(var(--primary)))]",
843
+ e
844
+ ),
845
+ "data-slot": "navigation-menu-grid-link",
846
+ ...n,
847
+ children: t
848
+ }
849
+ );
850
+ }
851
+ function It({ className: e, children: t, ...n }) {
852
+ return /* @__PURE__ */ i(
853
+ "div",
854
+ {
855
+ className: T(
856
+ // Base layout
857
+ "w-full max-w-72 flex-auto",
858
+ e
859
+ ),
860
+ "data-slot": "navigation-menu-slot",
861
+ ...n,
862
+ children: t
863
+ }
864
+ );
865
+ }
866
+ export {
867
+ xt as Content,
868
+ Rt as Grid,
869
+ yt as GridColumn,
870
+ Et as GridLabel,
871
+ Tt as GridLink,
872
+ Ct as Item,
873
+ Nt as List,
874
+ bt as Panel,
875
+ wt as Root,
876
+ It as Slot,
877
+ Mt as Trigger,
878
+ ht as Viewport
879
+ };
880
+ //# sourceMappingURL=navigation-menu.js.map