@alixpartners/ui-components 2.0.0-beta.9 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +2 -2
  2. package/dist/ap-logos-Cl1TR5nm.js +4 -0
  3. package/dist/assets/Banner.css +1 -1
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/Checkbox.css +1 -1
  6. package/dist/assets/Dialog.css +1 -1
  7. package/dist/assets/DragAndDrop.css +1 -1
  8. package/dist/assets/Dropdown.css +1 -1
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/LogosGallery.css +1 -0
  11. package/dist/assets/NavBar.css +1 -1
  12. package/dist/assets/SplitButton.css +1 -1
  13. package/dist/assets/TabNavigation.css +1 -1
  14. package/dist/assets/Tag.css +1 -1
  15. package/dist/assets/Textarea.css +1 -1
  16. package/dist/assets/Toast.css +1 -1
  17. package/dist/assets/ap-icons-types.d.ts +1 -1
  18. package/dist/assets/ap-icons.d.ts +1 -1
  19. package/dist/assets/ap-logos-types.d.ts +1 -0
  20. package/dist/assets/ap-logos.d.ts +1 -0
  21. package/dist/assets/main.css +1 -1
  22. package/dist/components/Button/Button.d.ts +11 -12
  23. package/dist/components/Button/Button.js +15 -14
  24. package/dist/components/Creatable/Creatable.d.ts +3 -1
  25. package/dist/components/Creatable/Creatable.js +26 -25
  26. package/dist/components/Dialog/Dialog.d.ts +15 -4
  27. package/dist/components/Dialog/Dialog.js +58 -42
  28. package/dist/components/DragAndDrop/DragAndDrop.d.ts +4 -1
  29. package/dist/components/DragAndDrop/DragAndDrop.js +82 -72
  30. package/dist/components/Dropdown/Dropdown.d.ts +8 -1
  31. package/dist/components/Dropdown/Dropdown.js +354 -320
  32. package/dist/components/Icons/IconsGallery.js +1 -1
  33. package/dist/components/Input/Input.d.ts +23 -22
  34. package/dist/components/Input/Input.js +62 -60
  35. package/dist/components/Logo/Logo.d.ts +8 -0
  36. package/dist/components/Logo/Logo.js +57 -0
  37. package/dist/components/Logos/LogosGallery.d.ts +1 -0
  38. package/dist/components/Logos/LogosGallery.js +16 -0
  39. package/dist/components/NavBar/NavBar.d.ts +13 -5
  40. package/dist/components/NavBar/NavBar.js +246 -230
  41. package/dist/components/SplitButton/SplitButton.js +20 -18
  42. package/dist/components/Tab/Tab.js +19 -19
  43. package/dist/components/TabNavigation/TabNavigation.js +11 -10
  44. package/dist/components/Tag/Tag.js +8 -8
  45. package/dist/components/Textarea/Textarea.d.ts +2 -2
  46. package/dist/components/Toast/Toast.js +2 -2
  47. package/dist/components/Toast/Toast.test.js +1 -1
  48. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  49. package/dist/components/Tooltip/Tooltip.js +12 -10
  50. package/dist/main.d.ts +5 -3
  51. package/dist/main.js +29 -25
  52. package/dist/storybook-docs-page.d.ts +4 -1
  53. package/package.json +1 -1
@@ -1,190 +1,192 @@
1
- import { jsx as e, jsxs as M } from "react/jsx-runtime";
2
- import q from "../Tag/Tag.js";
3
- import B from "../Icon/Icon.js";
4
- import { c as U } from "../../clsx-OuTLNxxd.js";
5
- import * as u from "react";
6
- import { u as ee, c as j, a as ae, R as re, I as ne } from "../../index-CjQV7MmW.js";
7
- import { u as oe, c as te, P as V, d as ie, a as N } from "../../index-DWydnyjJ.js";
8
- import { u as T } from "../../index-2H7slGYV.js";
9
- import { c as ue, R as se, A as ce, P as le, C as me, I as de, G as be, L as pe, a as ve, b as _e, d as fe, e as ge, S as he, f as Me, g as Ne, h as Re } from "../../index-CVWHq7Pr.js";
10
- import '../../assets/NavBar.css';var x = "Menubar", [O, xe, Se] = ae(x), [z, ta] = te(x, [
1
+ import { jsx as e, jsxs as C } from "react/jsx-runtime";
2
+ import ae from "../Tag/Tag.js";
3
+ import D from "../Icon/Icon.js";
4
+ import { c as G } from "../../clsx-OuTLNxxd.js";
5
+ import re from "../Logo/Logo.js";
6
+ import * as s from "react";
7
+ import { useState as S } from "react";
8
+ import { u as ne, c as H, a as oe, R as te, I as ie } from "../../index-CjQV7MmW.js";
9
+ import { u as ue, c as se, P as z, d as ce, a as R } from "../../index-DWydnyjJ.js";
10
+ import { u as K } from "../../index-2H7slGYV.js";
11
+ import { c as le, R as de, A as me, P as be, C as ve, I as pe, G as _e, L as fe, a as ge, b as he, d as Me, e as Ne, S as Ce, f as Re, g as Pe, h as we } from "../../index-CVWHq7Pr.js";
12
+ import '../../assets/NavBar.css';var x = "Menubar", [L, xe, Se] = oe(x), [Y, ca] = se(x, [
11
13
  Se,
12
- j
13
- ]), p = ue(), H = j(), [we, G] = z(x), Y = u.forwardRef(
14
- (a, t) => {
14
+ H
15
+ ]), p = le(), Q = H(), [Ae, V] = Y(x), X = s.forwardRef(
16
+ (a, o) => {
15
17
  const {
16
- __scopeMenubar: n,
17
- value: o,
18
- onValueChange: r,
19
- defaultValue: h,
20
- loop: s = !0,
21
- dir: c,
22
- ...m
23
- } = a, v = ee(c), l = H(n), [f, b] = oe({
24
- prop: o,
25
- onChange: r,
26
- defaultProp: h ?? "",
18
+ __scopeMenubar: r,
19
+ value: n,
20
+ onValueChange: i,
21
+ defaultValue: M,
22
+ loop: v = !0,
23
+ dir: t,
24
+ ...d
25
+ } = a, _ = ne(t), l = Q(r), [g, m] = ue({
26
+ prop: n,
27
+ onChange: i,
28
+ defaultProp: M ?? "",
27
29
  caller: x
28
- }), [g, d] = u.useState(null);
30
+ }), [h, c] = s.useState(null);
29
31
  return /* @__PURE__ */ e(
30
- we,
32
+ Ae,
31
33
  {
32
- scope: n,
33
- value: f,
34
- onMenuOpen: u.useCallback(
35
- (_) => {
36
- b(_), d(_);
34
+ scope: r,
35
+ value: g,
36
+ onMenuOpen: s.useCallback(
37
+ (f) => {
38
+ m(f), c(f);
37
39
  },
38
- [b]
40
+ [m]
39
41
  ),
40
- onMenuClose: u.useCallback(() => b(""), [b]),
41
- onMenuToggle: u.useCallback(
42
- (_) => {
43
- b((k) => k ? "" : _), d(_);
42
+ onMenuClose: s.useCallback(() => m(""), [m]),
43
+ onMenuToggle: s.useCallback(
44
+ (f) => {
45
+ m((w) => w ? "" : f), c(f);
44
46
  },
45
- [b]
47
+ [m]
46
48
  ),
47
- dir: v,
48
- loop: s,
49
- children: /* @__PURE__ */ e(O.Provider, { scope: n, children: /* @__PURE__ */ e(O.Slot, { scope: n, children: /* @__PURE__ */ e(
50
- re,
49
+ dir: _,
50
+ loop: v,
51
+ children: /* @__PURE__ */ e(L.Provider, { scope: r, children: /* @__PURE__ */ e(L.Slot, { scope: r, children: /* @__PURE__ */ e(
52
+ te,
51
53
  {
52
54
  asChild: !0,
53
55
  ...l,
54
56
  orientation: "horizontal",
55
- loop: s,
56
- dir: v,
57
- currentTabStopId: g,
58
- onCurrentTabStopIdChange: d,
59
- children: /* @__PURE__ */ e(V.div, { role: "menubar", ...m, ref: t })
57
+ loop: v,
58
+ dir: _,
59
+ currentTabStopId: h,
60
+ onCurrentTabStopIdChange: c,
61
+ children: /* @__PURE__ */ e(z.div, { role: "menubar", ...d, ref: o })
60
62
  }
61
63
  ) }) })
62
64
  }
63
65
  );
64
66
  }
65
67
  );
66
- Y.displayName = x;
67
- var K = "MenubarMenu", [Ce, Q] = z(K), X = (a) => {
68
- const { __scopeMenubar: t, value: n, ...o } = a, r = T(), h = n || r || "LEGACY_REACT_AUTO_VALUE", s = G(K, t), c = p(t), m = u.useRef(null), v = u.useRef(!1), l = s.value === h;
69
- return u.useEffect(() => {
70
- l || (v.current = !1);
68
+ X.displayName = x;
69
+ var j = "MenubarMenu", [ye, J] = Y(j), W = (a) => {
70
+ const { __scopeMenubar: o, value: r, ...n } = a, i = K(), M = r || i || "LEGACY_REACT_AUTO_VALUE", v = V(j, o), t = p(o), d = s.useRef(null), _ = s.useRef(!1), l = v.value === M;
71
+ return s.useEffect(() => {
72
+ l || (_.current = !1);
71
73
  }, [l]), /* @__PURE__ */ e(
72
- Ce,
74
+ ye,
73
75
  {
74
- scope: t,
75
- value: h,
76
- triggerId: T(),
77
- triggerRef: m,
78
- contentId: T(),
79
- wasKeyboardTriggerOpenRef: v,
76
+ scope: o,
77
+ value: M,
78
+ triggerId: K(),
79
+ triggerRef: d,
80
+ contentId: K(),
81
+ wasKeyboardTriggerOpenRef: _,
80
82
  children: /* @__PURE__ */ e(
81
- se,
83
+ de,
82
84
  {
83
- ...c,
85
+ ...t,
84
86
  open: l,
85
- onOpenChange: (f) => {
86
- f || s.onMenuClose();
87
+ onOpenChange: (g) => {
88
+ g || v.onMenuClose();
87
89
  },
88
90
  modal: !1,
89
- dir: s.dir,
90
- ...o
91
+ dir: v.dir,
92
+ ...n
91
93
  }
92
94
  )
93
95
  }
94
96
  );
95
97
  };
96
- X.displayName = K;
97
- var I = "MenubarTrigger", W = u.forwardRef(
98
- (a, t) => {
99
- const { __scopeMenubar: n, disabled: o = !1, ...r } = a, h = H(n), s = p(n), c = G(I, n), m = Q(I, n), v = u.useRef(null), l = ie(t, v, m.triggerRef), [f, b] = u.useState(!1), g = c.value === m.value;
100
- return /* @__PURE__ */ e(O.ItemSlot, { scope: n, value: m.value, disabled: o, children: /* @__PURE__ */ e(
101
- ne,
98
+ W.displayName = j;
99
+ var F = "MenubarTrigger", Z = s.forwardRef(
100
+ (a, o) => {
101
+ const { __scopeMenubar: r, disabled: n = !1, ...i } = a, M = Q(r), v = p(r), t = V(F, r), d = J(F, r), _ = s.useRef(null), l = ce(o, _, d.triggerRef), [g, m] = s.useState(!1), h = t.value === d.value;
102
+ return /* @__PURE__ */ e(L.ItemSlot, { scope: r, value: d.value, disabled: n, children: /* @__PURE__ */ e(
103
+ ie,
102
104
  {
103
105
  asChild: !0,
104
- ...h,
105
- focusable: !o,
106
- tabStopId: m.value,
107
- children: /* @__PURE__ */ e(ce, { asChild: !0, ...s, children: /* @__PURE__ */ e(
108
- V.button,
106
+ ...M,
107
+ focusable: !n,
108
+ tabStopId: d.value,
109
+ children: /* @__PURE__ */ e(me, { asChild: !0, ...v, children: /* @__PURE__ */ e(
110
+ z.button,
109
111
  {
110
112
  type: "button",
111
113
  role: "menuitem",
112
- id: m.triggerId,
114
+ id: d.triggerId,
113
115
  "aria-haspopup": "menu",
114
- "aria-expanded": g,
115
- "aria-controls": g ? m.contentId : void 0,
116
- "data-highlighted": f ? "" : void 0,
117
- "data-state": g ? "open" : "closed",
118
- "data-disabled": o ? "" : void 0,
119
- disabled: o,
120
- ...r,
116
+ "aria-expanded": h,
117
+ "aria-controls": h ? d.contentId : void 0,
118
+ "data-highlighted": g ? "" : void 0,
119
+ "data-state": h ? "open" : "closed",
120
+ "data-disabled": n ? "" : void 0,
121
+ disabled: n,
122
+ ...i,
121
123
  ref: l,
122
- onPointerDown: N(a.onPointerDown, (d) => {
123
- !o && d.button === 0 && d.ctrlKey === !1 && (c.onMenuOpen(m.value), g || d.preventDefault());
124
+ onPointerDown: R(a.onPointerDown, (c) => {
125
+ !n && c.button === 0 && c.ctrlKey === !1 && (t.onMenuOpen(d.value), h || c.preventDefault());
124
126
  }),
125
- onPointerEnter: N(a.onPointerEnter, () => {
126
- var _;
127
- !!c.value && !g && (c.onMenuOpen(m.value), (_ = v.current) == null || _.focus());
127
+ onPointerEnter: R(a.onPointerEnter, () => {
128
+ var f;
129
+ !!t.value && !h && (t.onMenuOpen(d.value), (f = _.current) == null || f.focus());
128
130
  }),
129
- onKeyDown: N(a.onKeyDown, (d) => {
130
- o || (["Enter", " "].includes(d.key) && c.onMenuToggle(m.value), d.key === "ArrowDown" && c.onMenuOpen(m.value), ["Enter", " ", "ArrowDown"].includes(d.key) && (m.wasKeyboardTriggerOpenRef.current = !0, d.preventDefault()));
131
+ onKeyDown: R(a.onKeyDown, (c) => {
132
+ n || (["Enter", " "].includes(c.key) && t.onMenuToggle(d.value), c.key === "ArrowDown" && t.onMenuOpen(d.value), ["Enter", " ", "ArrowDown"].includes(c.key) && (d.wasKeyboardTriggerOpenRef.current = !0, c.preventDefault()));
131
133
  }),
132
- onFocus: N(a.onFocus, () => b(!0)),
133
- onBlur: N(a.onBlur, () => b(!1))
134
+ onFocus: R(a.onFocus, () => m(!0)),
135
+ onBlur: R(a.onBlur, () => m(!1))
134
136
  }
135
137
  ) })
136
138
  }
137
139
  ) });
138
140
  }
139
141
  );
140
- W.displayName = I;
141
- var Ae = "MenubarPortal", Z = (a) => {
142
- const { __scopeMenubar: t, ...n } = a, o = p(t);
143
- return /* @__PURE__ */ e(le, { ...o, ...n });
142
+ Z.displayName = F;
143
+ var Oe = "MenubarPortal", $ = (a) => {
144
+ const { __scopeMenubar: o, ...r } = a, n = p(o);
145
+ return /* @__PURE__ */ e(be, { ...n, ...r });
144
146
  };
145
- Z.displayName = Ae;
146
- var D = "MenubarContent", $ = u.forwardRef(
147
- (a, t) => {
148
- const { __scopeMenubar: n, align: o = "start", ...r } = a, h = p(n), s = G(D, n), c = Q(D, n), m = xe(n), v = u.useRef(!1);
147
+ $.displayName = Oe;
148
+ var U = "MenubarContent", q = s.forwardRef(
149
+ (a, o) => {
150
+ const { __scopeMenubar: r, align: n = "start", ...i } = a, M = p(r), v = V(U, r), t = J(U, r), d = xe(r), _ = s.useRef(!1);
149
151
  return /* @__PURE__ */ e(
150
- me,
152
+ ve,
151
153
  {
152
- id: c.contentId,
153
- "aria-labelledby": c.triggerId,
154
+ id: t.contentId,
155
+ "aria-labelledby": t.triggerId,
154
156
  "data-radix-menubar-content": "",
155
- ...h,
156
- ...r,
157
- ref: t,
158
- align: o,
159
- onCloseAutoFocus: N(a.onCloseAutoFocus, (l) => {
160
- var b;
161
- !!!s.value && !v.current && ((b = c.triggerRef.current) == null || b.focus()), v.current = !1, l.preventDefault();
157
+ ...M,
158
+ ...i,
159
+ ref: o,
160
+ align: n,
161
+ onCloseAutoFocus: R(a.onCloseAutoFocus, (l) => {
162
+ var m;
163
+ !!!v.value && !_.current && ((m = t.triggerRef.current) == null || m.focus()), _.current = !1, l.preventDefault();
162
164
  }),
163
- onFocusOutside: N(a.onFocusOutside, (l) => {
164
- const f = l.target;
165
- m().some((g) => {
166
- var d;
167
- return (d = g.ref.current) == null ? void 0 : d.contains(f);
165
+ onFocusOutside: R(a.onFocusOutside, (l) => {
166
+ const g = l.target;
167
+ d().some((h) => {
168
+ var c;
169
+ return (c = h.ref.current) == null ? void 0 : c.contains(g);
168
170
  }) && l.preventDefault();
169
171
  }),
170
- onInteractOutside: N(a.onInteractOutside, () => {
171
- v.current = !0;
172
+ onInteractOutside: R(a.onInteractOutside, () => {
173
+ _.current = !0;
172
174
  }),
173
175
  onEntryFocus: (l) => {
174
- c.wasKeyboardTriggerOpenRef.current || l.preventDefault();
176
+ t.wasKeyboardTriggerOpenRef.current || l.preventDefault();
175
177
  },
176
- onKeyDown: N(
178
+ onKeyDown: R(
177
179
  a.onKeyDown,
178
180
  (l) => {
179
181
  if (["ArrowRight", "ArrowLeft"].includes(l.key)) {
180
- const f = l.target, b = f.hasAttribute("data-radix-menubar-subtrigger"), g = f.closest("[data-radix-menubar-content]") !== l.currentTarget, _ = (s.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === l.key;
181
- if (!_ && b || g && _) return;
182
- let R = m().filter((E) => !E.disabled).map((E) => E.value);
183
- _ && R.reverse();
184
- const F = R.indexOf(c.value);
185
- R = s.loop ? We(R, F + 1) : R.slice(F + 1);
186
- const [L] = R;
187
- L && s.onMenuOpen(L);
182
+ const g = l.target, m = g.hasAttribute("data-radix-menubar-subtrigger"), h = g.closest("[data-radix-menubar-content]") !== l.currentTarget, f = (v.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === l.key;
183
+ if (!f && m || h && f) return;
184
+ let N = d().filter((k) => !k.disabled).map((k) => k.value);
185
+ f && N.reverse();
186
+ const b = N.indexOf(t.value);
187
+ N = v.loop ? $e(N, b + 1) : N.slice(b + 1);
188
+ const [P] = N;
189
+ P && v.onMenuOpen(P);
188
190
  }
189
191
  },
190
192
  { checkForDefaultPrevented: !1 }
@@ -201,93 +203,93 @@ var D = "MenubarContent", $ = u.forwardRef(
201
203
  );
202
204
  }
203
205
  );
204
- $.displayName = D;
205
- var ye = "MenubarGroup", Pe = u.forwardRef(
206
- (a, t) => {
207
- const { __scopeMenubar: n, ...o } = a, r = p(n);
208
- return /* @__PURE__ */ e(be, { ...r, ...o, ref: t });
209
- }
210
- );
211
- Pe.displayName = ye;
212
- var Ee = "MenubarLabel", Be = u.forwardRef(
213
- (a, t) => {
214
- const { __scopeMenubar: n, ...o } = a, r = p(n);
215
- return /* @__PURE__ */ e(pe, { ...r, ...o, ref: t });
206
+ q.displayName = U;
207
+ var Ee = "MenubarGroup", Be = s.forwardRef(
208
+ (a, o) => {
209
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
210
+ return /* @__PURE__ */ e(_e, { ...i, ...n, ref: o });
216
211
  }
217
212
  );
218
213
  Be.displayName = Ee;
219
- var Te = "MenubarItem", J = u.forwardRef(
220
- (a, t) => {
221
- const { __scopeMenubar: n, ...o } = a, r = p(n);
222
- return /* @__PURE__ */ e(de, { ...r, ...o, ref: t });
214
+ var Te = "MenubarLabel", Ie = s.forwardRef(
215
+ (a, o) => {
216
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
217
+ return /* @__PURE__ */ e(fe, { ...i, ...n, ref: o });
223
218
  }
224
219
  );
225
- J.displayName = Te;
226
- var Oe = "MenubarCheckboxItem", Ie = u.forwardRef(
227
- (a, t) => {
228
- const { __scopeMenubar: n, ...o } = a, r = p(n);
229
- return /* @__PURE__ */ e(ve, { ...r, ...o, ref: t });
220
+ Ie.displayName = Te;
221
+ var ke = "MenubarItem", ee = s.forwardRef(
222
+ (a, o) => {
223
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
224
+ return /* @__PURE__ */ e(pe, { ...i, ...n, ref: o });
230
225
  }
231
226
  );
232
- Ie.displayName = Oe;
233
- var De = "MenubarRadioGroup", Ge = u.forwardRef(
234
- (a, t) => {
235
- const { __scopeMenubar: n, ...o } = a, r = p(n);
236
- return /* @__PURE__ */ e(_e, { ...r, ...o, ref: t });
227
+ ee.displayName = ke;
228
+ var De = "MenubarCheckboxItem", Ge = s.forwardRef(
229
+ (a, o) => {
230
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
231
+ return /* @__PURE__ */ e(ge, { ...i, ...n, ref: o });
237
232
  }
238
233
  );
239
234
  Ge.displayName = De;
240
- var Ke = "MenubarRadioItem", ke = u.forwardRef(
241
- (a, t) => {
242
- const { __scopeMenubar: n, ...o } = a, r = p(n);
243
- return /* @__PURE__ */ e(fe, { ...r, ...o, ref: t });
235
+ var Ke = "MenubarRadioGroup", Le = s.forwardRef(
236
+ (a, o) => {
237
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
238
+ return /* @__PURE__ */ e(he, { ...i, ...n, ref: o });
244
239
  }
245
240
  );
246
- ke.displayName = Ke;
247
- var Fe = "MenubarItemIndicator", Le = u.forwardRef((a, t) => {
248
- const { __scopeMenubar: n, ...o } = a, r = p(n);
249
- return /* @__PURE__ */ e(ge, { ...r, ...o, ref: t });
241
+ Le.displayName = Ke;
242
+ var Fe = "MenubarRadioItem", Ue = s.forwardRef(
243
+ (a, o) => {
244
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
245
+ return /* @__PURE__ */ e(Me, { ...i, ...n, ref: o });
246
+ }
247
+ );
248
+ Ue.displayName = Fe;
249
+ var Ve = "MenubarItemIndicator", je = s.forwardRef((a, o) => {
250
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
251
+ return /* @__PURE__ */ e(Ne, { ...i, ...n, ref: o });
250
252
  });
251
- Le.displayName = Fe;
252
- var Ue = "MenubarSeparator", je = u.forwardRef(
253
- (a, t) => {
254
- const { __scopeMenubar: n, ...o } = a, r = p(n);
255
- return /* @__PURE__ */ e(he, { ...r, ...o, ref: t });
253
+ je.displayName = Ve;
254
+ var He = "MenubarSeparator", ze = s.forwardRef(
255
+ (a, o) => {
256
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
257
+ return /* @__PURE__ */ e(Ce, { ...i, ...n, ref: o });
256
258
  }
257
259
  );
258
- je.displayName = Ue;
259
- var Ve = "MenubarArrow", ze = u.forwardRef(
260
- (a, t) => {
261
- const { __scopeMenubar: n, ...o } = a, r = p(n);
262
- return /* @__PURE__ */ e(Me, { ...r, ...o, ref: t });
260
+ ze.displayName = He;
261
+ var Ye = "MenubarArrow", Qe = s.forwardRef(
262
+ (a, o) => {
263
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
264
+ return /* @__PURE__ */ e(Re, { ...i, ...n, ref: o });
263
265
  }
264
266
  );
265
- ze.displayName = Ve;
266
- var He = "MenubarSubTrigger", Ye = u.forwardRef(
267
- (a, t) => {
268
- const { __scopeMenubar: n, ...o } = a, r = p(n);
267
+ Qe.displayName = Ye;
268
+ var Xe = "MenubarSubTrigger", Je = s.forwardRef(
269
+ (a, o) => {
270
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
269
271
  return /* @__PURE__ */ e(
270
- Ne,
272
+ Pe,
271
273
  {
272
274
  "data-radix-menubar-subtrigger": "",
273
- ...r,
274
- ...o,
275
- ref: t
275
+ ...i,
276
+ ...n,
277
+ ref: o
276
278
  }
277
279
  );
278
280
  }
279
281
  );
280
- Ye.displayName = He;
281
- var Qe = "MenubarSubContent", Xe = u.forwardRef(
282
- (a, t) => {
283
- const { __scopeMenubar: n, ...o } = a, r = p(n);
282
+ Je.displayName = Xe;
283
+ var We = "MenubarSubContent", Ze = s.forwardRef(
284
+ (a, o) => {
285
+ const { __scopeMenubar: r, ...n } = a, i = p(r);
284
286
  return /* @__PURE__ */ e(
285
- Re,
287
+ we,
286
288
  {
287
- ...r,
289
+ ...i,
288
290
  "data-radix-menubar-content": "",
289
- ...o,
290
- ref: t,
291
+ ...n,
292
+ ref: o,
291
293
  style: {
292
294
  ...a.style,
293
295
  "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
@@ -300,24 +302,29 @@ var Qe = "MenubarSubContent", Xe = u.forwardRef(
300
302
  );
301
303
  }
302
304
  );
303
- Xe.displayName = Qe;
304
- function We(a, t) {
305
- return a.map((n, o) => a[(t + o) % a.length]);
305
+ Ze.displayName = We;
306
+ function $e(a, o) {
307
+ return a.map((r, n) => a[(o + n) % a.length]);
306
308
  }
307
- var S = Y, w = X, C = W, A = Z, y = $, P = J;
308
- const i = {
309
+ var A = X, y = W, O = Z, E = $, B = q, T = ee;
310
+ const u = {
311
+ "navbar-wrapper": "NavBar-module__navbar-wrapper___e-f8y",
309
312
  "navbar-container": "NavBar-module__navbar-container___KnbUz",
310
313
  "navbar-logo-container": "NavBar-module__navbar-logo-container___VXWAo",
314
+ "navbar-logo-link": "NavBar-module__navbar-logo-link___r8CV2",
311
315
  "navbar-project-name-separator": "NavBar-module__navbar-project-name-separator___SmBBN",
312
316
  "navbar-project-name": "NavBar-module__navbar-project-name___zQY4u",
313
317
  "navbar-menu": "NavBar-module__navbar-menu___QDrB4",
318
+ "navbar-menu-button": "NavBar-module__navbar-menu-button___f1doV",
314
319
  "navbar-menu-list": "NavBar-module__navbar-menu-list___xZE02",
315
320
  "navbar-menu-list-item": "NavBar-module__navbar-menu-list-item___Y87cK",
316
321
  "navbar-menu-list-item-trigger-container": "NavBar-module__navbar-menu-list-item-trigger-container___OsXar",
317
322
  "navbar-menu-list-item-action": "NavBar-module__navbar-menu-list-item-action___MPFZz",
323
+ "navbar-menu-list-item-action-active": "NavBar-module__navbar-menu-list-item-action-active___J7eRN",
318
324
  "navbar-menu-list-item-arrow": "NavBar-module__navbar-menu-list-item-arrow___QoJsh",
319
325
  "navbar-menu-list-item-submenu": "NavBar-module__navbar-menu-list-item-submenu___goVcf",
320
326
  "navbar-menu-list-item-submenu-item": "NavBar-module__navbar-menu-list-item-submenu-item___sH6du",
327
+ "navbar-menu-additional-separator": "NavBar-module__navbar-menu-additional-separator___F7jfY",
321
328
  "navbar-menu-additional": "NavBar-module__navbar-menu-additional___B8kH-",
322
329
  "navbar-menu-additional-trigger": "NavBar-module__navbar-menu-additional-trigger___IpMHL",
323
330
  "navbar-menu-additional-icon": "NavBar-module__navbar-menu-additional-icon___jhULk",
@@ -325,49 +332,58 @@ const i = {
325
332
  "navbar-notification-container": "NavBar-module__navbar-notification-container___K2YeD",
326
333
  "navbar-notification-badge": "NavBar-module__navbar-notification-badge___vp5bK"
327
334
  };
328
- function ia({
329
- projectName: a,
330
- projectLogoSrc: t,
331
- projectTag: n,
332
- menuItems: o,
333
- additionalItems: r,
334
- className: h
335
+ function la({
336
+ activeMenuItemHref: a,
337
+ projectName: o,
338
+ projectLogoIcon: r,
339
+ projectLogoOnClick: n,
340
+ projectTag: i,
341
+ menuItems: M,
342
+ menuButton: v,
343
+ additionalItems: t,
344
+ className: d,
345
+ maxWidth: _
335
346
  }) {
336
- return /* @__PURE__ */ M("div", { className: U(i["navbar-container"], h), children: [
337
- /* @__PURE__ */ M("div", { className: i["navbar-logo-container"], children: [
338
- /* @__PURE__ */ e("img", { src: t, alt: "NavBar" }),
339
- /* @__PURE__ */ e("span", { className: i["navbar-project-name-separator"] }),
340
- /* @__PURE__ */ e("span", { className: i["navbar-project-name"], children: a }),
341
- n && /* @__PURE__ */ e(q, { type: "success", size: "md", structure: "border", label: n })
347
+ const l = (b) => b ? a === b : !1, [g, m] = S(!1), [h, c] = S(!1), [f, w] = S(!1), [I, N] = S(null);
348
+ return /* @__PURE__ */ e("div", { className: G(u["navbar-wrapper"], d), children: /* @__PURE__ */ C("div", { className: u["navbar-container"], style: {
349
+ maxWidth: _
350
+ }, children: [
351
+ /* @__PURE__ */ C("div", { className: u["navbar-logo-container"], children: [
352
+ /* @__PURE__ */ e("a", { onClick: n, className: u["navbar-logo-link"], children: /* @__PURE__ */ e(re, { logo: r, color: "white" }) }),
353
+ /* @__PURE__ */ e("span", { className: u["navbar-project-name-separator"] }),
354
+ /* @__PURE__ */ e("span", { className: u["navbar-project-name"], children: o }),
355
+ i && /* @__PURE__ */ e(ae, { type: "basic", color: "green", size: "md", structure: "border", label: i })
342
356
  ] }),
343
- /* @__PURE__ */ M("div", { className: i["navbar-menu"], children: [
344
- /* @__PURE__ */ e(S, { className: i["navbar-menu-list"], children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ M(w, { children: [
345
- /* @__PURE__ */ e(C, { className: i["navbar-menu-list-item"], children: s.menuItems ? /* @__PURE__ */ M("span", { className: i["navbar-menu-list-item-trigger-container"], children: [
346
- /* @__PURE__ */ e("span", { children: s.label }),
347
- /* @__PURE__ */ e(B, { icon: "ap-icon-expand-more", className: U(i["navbar-menu-list-item-arrow"]) })
348
- ] }) : /* @__PURE__ */ e("a", { className: i["navbar-menu-list-item-action"], href: s.href, children: s.label }) }),
349
- s.menuItems && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(y, { className: i["navbar-menu-list-item-submenu"], children: s.menuItems.map((c) => /* @__PURE__ */ e(P, { className: i["navbar-menu-list-item-submenu-item"], children: /* @__PURE__ */ e("a", { href: c.href, children: c.label }) }, c.label)) }) })
350
- ] }, s.label)) }),
351
- /* @__PURE__ */ M("div", { className: i["navbar-menu-additional"], children: [
352
- (r == null ? void 0 : r.notifications) && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ M(w, { children: [
353
- /* @__PURE__ */ e(C, { className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ M("div", { className: i["navbar-notification-container"], children: [
354
- /* @__PURE__ */ e(B, { icon: "ap-icon-notification-filled", className: i["navbar-menu-additional-icon"] }),
355
- r.notifications.count > 0 && /* @__PURE__ */ e("span", { className: i["navbar-notification-badge"], children: r.notifications.count > 99 ? "99+" : r.notifications.count })
357
+ /* @__PURE__ */ C("div", { className: u["navbar-menu"], children: [
358
+ /* @__PURE__ */ e("div", { className: u["navbar-menu-button"], children: v }),
359
+ /* @__PURE__ */ e(A, { className: u["navbar-menu-list"], children: M == null ? void 0 : M.map((b) => /* @__PURE__ */ e("div", { onPointerLeave: () => N(null), children: /* @__PURE__ */ C(y, { open: I === b.label, onOpenChange: (P) => N(P ? b.label : null), children: [
360
+ /* @__PURE__ */ e(O, { "data-state": I === b.label ? "open" : "closed", onClick: () => N(b.label), onPointerMove: () => N(b.label), className: u["navbar-menu-list-item"], children: b.menuItems ? /* @__PURE__ */ C("span", { className: u["navbar-menu-list-item-trigger-container"], children: [
361
+ /* @__PURE__ */ e("span", { children: b.label }),
362
+ /* @__PURE__ */ e(D, { icon: "ap-icon-expand-more", className: G(u["navbar-menu-list-item-arrow"]) })
363
+ ] }) : /* @__PURE__ */ e("a", { className: G(u["navbar-menu-list-item-action"], l(b.href) && u["navbar-menu-list-item-action-active"]), onClick: b.onClick, children: b.label }) }),
364
+ b.menuItems && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { className: u["navbar-menu-list-item-submenu"], children: b.menuItems.map((P) => /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: /* @__PURE__ */ e("a", { onClick: P.onClick, children: P.label }) }, P.label)) }) })
365
+ ] }) }, b.label)) }),
366
+ t && /* @__PURE__ */ e("span", { className: u["navbar-menu-additional-separator"] }),
367
+ /* @__PURE__ */ C("div", { className: u["navbar-menu-additional"], children: [
368
+ (t == null ? void 0 : t.notifications) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => m(!1), children: /* @__PURE__ */ C(y, { open: g, onOpenChange: m, children: [
369
+ /* @__PURE__ */ e(O, { onClick: () => m(!0), onPointerMove: () => m(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ C("div", { className: u["navbar-notification-container"], children: [
370
+ /* @__PURE__ */ e(D, { icon: "ap-icon-notification-filled", className: u["navbar-menu-additional-icon"] }),
371
+ t.notifications.count > 0 && /* @__PURE__ */ e("span", { className: u["navbar-notification-badge"], children: t.notifications.count > 99 ? "99+" : t.notifications.count })
356
372
  ] }) }),
357
- /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(y, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(P, { className: i["navbar-menu-list-item-submenu-item"], children: r.notifications.content }) }) })
358
- ] }) }),
359
- (r == null ? void 0 : r.help) && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ M(w, { children: [
360
- /* @__PURE__ */ e(C, { className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e(B, { icon: "ap-icon-help-filled", className: i["navbar-menu-additional-icon"] }) }),
361
- /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(y, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(P, { className: i["navbar-menu-list-item-submenu-item"], children: r.help }) }) })
362
- ] }) }),
363
- (r == null ? void 0 : r.userProfile) && /* @__PURE__ */ e(S, { children: /* @__PURE__ */ M(w, { children: [
364
- /* @__PURE__ */ e(C, { className: i["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e("span", { className: i["navbar-menu-additional-user-profile"], children: r.userProfile.initials }) }),
365
- /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(y, { align: "end", className: i["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(P, { className: i["navbar-menu-list-item-submenu-item"], children: r.userProfile.content }) }) })
366
- ] }) })
373
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.notifications.content }) }) })
374
+ ] }) }) }),
375
+ (t == null ? void 0 : t.help) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => c(!1), children: /* @__PURE__ */ C(y, { open: h, onOpenChange: c, children: [
376
+ /* @__PURE__ */ e(O, { onClick: () => c(!0), onPointerMove: () => c(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e(D, { icon: "ap-icon-help-filled", className: u["navbar-menu-additional-icon"] }) }),
377
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.help }) }) })
378
+ ] }) }) }),
379
+ (t == null ? void 0 : t.userProfile) && /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e("div", { onPointerLeave: () => w(!1), children: /* @__PURE__ */ C(y, { open: f, onOpenChange: w, children: [
380
+ /* @__PURE__ */ e(O, { onClick: () => w(!0), onPointerMove: () => w(!0), className: u["navbar-menu-additional-trigger"], children: /* @__PURE__ */ e("span", { className: u["navbar-menu-additional-user-profile"], children: t.userProfile.initials }) }),
381
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(B, { align: "end", className: u["navbar-menu-list-item-submenu"], children: /* @__PURE__ */ e(T, { className: u["navbar-menu-list-item-submenu-item"], children: t.userProfile.content }) }) })
382
+ ] }) }) })
367
383
  ] })
368
384
  ] })
369
- ] });
385
+ ] }) });
370
386
  }
371
387
  export {
372
- ia as default
388
+ la as default
373
389
  };