@vjdesigns/vjdesigns-ui 2.3.0 → 2.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 (81) hide show
  1. package/dist/ai/llms-full.txt +67 -32
  2. package/dist/ai/registry.json +136 -17
  3. package/dist/components/data-display/Badge/Badge.cjs.js +1 -1
  4. package/dist/components/data-display/Badge/Badge.d.ts +7 -2
  5. package/dist/components/data-display/Badge/Badge.mjs +2 -1
  6. package/dist/components/data-display/Badge/Badge.module.css.cjs.js +1 -1
  7. package/dist/components/data-display/Badge/Badge.module.css.mjs +33 -32
  8. package/dist/components/navigation/Navbar/Navbar.cjs.js +1 -1
  9. package/dist/components/navigation/Navbar/Navbar.d.ts +65 -2
  10. package/dist/components/navigation/Navbar/Navbar.mjs +309 -169
  11. package/dist/components/navigation/Navbar/Navbar.module.css.cjs.js +1 -1
  12. package/dist/components/navigation/Navbar/Navbar.module.css.mjs +20 -11
  13. package/dist/i18n/en.cjs.js +1 -1
  14. package/dist/i18n/en.mjs +1 -0
  15. package/dist/i18n/types.d.ts +5 -0
  16. package/dist/index.cjs.js +1 -1
  17. package/dist/index.mjs +35 -35
  18. package/dist/locales/ar.cjs.js +1 -1
  19. package/dist/locales/ar.mjs +1 -0
  20. package/dist/locales/bn.cjs.js +1 -1
  21. package/dist/locales/bn.mjs +1 -0
  22. package/dist/locales/cs.cjs.js +1 -1
  23. package/dist/locales/cs.mjs +1 -0
  24. package/dist/locales/da.cjs.js +1 -1
  25. package/dist/locales/da.mjs +1 -0
  26. package/dist/locales/de.cjs.js +1 -1
  27. package/dist/locales/de.mjs +1 -0
  28. package/dist/locales/el.cjs.js +1 -1
  29. package/dist/locales/el.mjs +1 -0
  30. package/dist/locales/es.cjs.js +1 -1
  31. package/dist/locales/es.mjs +1 -0
  32. package/dist/locales/fa.cjs.js +1 -1
  33. package/dist/locales/fa.mjs +1 -0
  34. package/dist/locales/fi.cjs.js +1 -1
  35. package/dist/locales/fi.mjs +1 -0
  36. package/dist/locales/fr.cjs.js +1 -1
  37. package/dist/locales/fr.mjs +1 -0
  38. package/dist/locales/he.cjs.js +1 -1
  39. package/dist/locales/he.mjs +1 -0
  40. package/dist/locales/hi.cjs.js +1 -1
  41. package/dist/locales/hi.mjs +1 -0
  42. package/dist/locales/hu.cjs.js +1 -1
  43. package/dist/locales/hu.mjs +1 -0
  44. package/dist/locales/id.cjs.js +1 -1
  45. package/dist/locales/id.mjs +1 -0
  46. package/dist/locales/it.cjs.js +1 -1
  47. package/dist/locales/it.mjs +1 -0
  48. package/dist/locales/ja.cjs.js +1 -1
  49. package/dist/locales/ja.mjs +1 -0
  50. package/dist/locales/ko.cjs.js +1 -1
  51. package/dist/locales/ko.mjs +1 -0
  52. package/dist/locales/nb.cjs.js +1 -1
  53. package/dist/locales/nb.mjs +1 -0
  54. package/dist/locales/nl.cjs.js +1 -1
  55. package/dist/locales/nl.mjs +1 -0
  56. package/dist/locales/pl.cjs.js +1 -1
  57. package/dist/locales/pl.mjs +1 -0
  58. package/dist/locales/pt-BR.cjs.js +1 -1
  59. package/dist/locales/pt-BR.mjs +1 -0
  60. package/dist/locales/ro.cjs.js +1 -1
  61. package/dist/locales/ro.mjs +1 -0
  62. package/dist/locales/ru.cjs.js +1 -1
  63. package/dist/locales/ru.mjs +1 -0
  64. package/dist/locales/sv.cjs.js +1 -1
  65. package/dist/locales/sv.mjs +1 -0
  66. package/dist/locales/th.cjs.js +1 -1
  67. package/dist/locales/th.mjs +1 -0
  68. package/dist/locales/tr.cjs.js +1 -1
  69. package/dist/locales/tr.mjs +1 -0
  70. package/dist/locales/uk.cjs.js +1 -1
  71. package/dist/locales/uk.mjs +1 -0
  72. package/dist/locales/ur.cjs.js +1 -1
  73. package/dist/locales/ur.mjs +1 -0
  74. package/dist/locales/vi.cjs.js +1 -1
  75. package/dist/locales/vi.mjs +1 -0
  76. package/dist/locales/zh-Hans.cjs.js +1 -1
  77. package/dist/locales/zh-Hans.mjs +1 -0
  78. package/dist/locales/zh-Hant.cjs.js +1 -1
  79. package/dist/locales/zh-Hant.mjs +1 -0
  80. package/dist/vjdesigns-ui.css +1 -1
  81. package/package.json +1 -1
@@ -1,57 +1,60 @@
1
1
  import { breakpoints as e } from "../../../types/common.mjs";
2
2
  import { useControllableState as t } from "../../../hooks/useControllableState.mjs";
3
- import { useMessages as n } from "../../utilities/LocaleProvider/LocaleProvider.mjs";
4
- import { useMergedRef as r } from "../../../hooks/useMergedRef.mjs";
5
- import { responsiveClasses as i, responsiveVars as a } from "../../../utils/responsive.mjs";
6
- import { cx as o } from "../../../utils/cx.mjs";
7
- import { IconButton as s } from "../../primitives/Button/Button.mjs";
8
- import { MenuIcon as c } from "../../primitives/Icon/icons.mjs";
9
- import { Container as l } from "../../layout/Container/Container.mjs";
10
- import { Drawer as u } from "../../overlays/Drawer/Drawer.mjs";
11
- import d from "./Navbar.module.css.mjs";
12
- import { createContext as f, useCallback as p, useContext as m, useEffect as h, useId as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b } from "react";
13
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
3
+ import { useDismiss as n } from "../../../hooks/useDismiss.mjs";
4
+ import { useFloatingPosition as r } from "../../../hooks/useFloatingPosition.mjs";
5
+ import { useMessages as i } from "../../utilities/LocaleProvider/LocaleProvider.mjs";
6
+ import { useMergedRef as a } from "../../../hooks/useMergedRef.mjs";
7
+ import { responsiveClasses as o, responsiveVars as s } from "../../../utils/responsive.mjs";
8
+ import { cx as c } from "../../../utils/cx.mjs";
9
+ import { IconButton as l } from "../../primitives/Button/Button.mjs";
10
+ import { ChevronDownIcon as u, MenuIcon as d } from "../../primitives/Icon/icons.mjs";
11
+ import { Container as f } from "../../layout/Container/Container.mjs";
12
+ import { Badge as p } from "../../data-display/Badge/Badge.mjs";
13
+ import { Drawer as m } from "../../overlays/Drawer/Drawer.mjs";
14
+ import h from "./Navbar.module.css.mjs";
15
+ import { createContext as g, useCallback as _, useContext as v, useEffect as y, useId as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w } from "react";
16
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
14
17
  //#region src/components/navigation/Navbar/Navbar.tsx
15
- var w = {
16
- accent: d.activeAccent,
17
- primary: d.activePrimary,
18
- neutral: d.activeNeutral
19
- }, T = {
20
- surface: d.surface,
21
- transparent: d.transparent,
22
- solid: d.solid
23
- }, E = {
24
- sm: d.sm,
25
- md: d.md,
26
- lg: d.lg
27
- }, D = {
28
- static: d.static,
29
- sticky: d.sticky,
30
- fixed: d.fixed
18
+ var O = {
19
+ accent: h.activeAccent,
20
+ primary: h.activePrimary,
21
+ neutral: h.activeNeutral
22
+ }, k = {
23
+ surface: h.surface,
24
+ transparent: h.transparent,
25
+ solid: h.solid
31
26
  }, ee = {
32
- sm: d.collapseSm,
33
- md: d.collapseMd,
34
- lg: d.collapseLg
35
- }, O = f(null);
36
- function k(e) {
37
- let t = m(O);
27
+ sm: h.sm,
28
+ md: h.md,
29
+ lg: h.lg
30
+ }, A = {
31
+ static: h.static,
32
+ sticky: h.sticky,
33
+ fixed: h.fixed
34
+ }, j = {
35
+ sm: h.collapseSm,
36
+ md: h.collapseMd,
37
+ lg: h.collapseLg
38
+ }, M = g(null);
39
+ function N(e) {
40
+ let t = v(M);
38
41
  if (!t) throw Error(`${e} must be used inside <Navbar>.`);
39
42
  return t;
40
43
  }
41
- var A = f("bar"), j = f(!1);
42
- function te(e) {
44
+ var P = g("bar"), F = g(null), I = g(!1);
45
+ function L(e) {
43
46
  for (let t = e.parentElement; t && t !== document.body; t = t.parentElement) {
44
47
  let { overflowY: e } = getComputedStyle(t);
45
48
  if (e === "auto" || e === "scroll" || e === "overlay") return t;
46
49
  }
47
50
  return document.documentElement;
48
51
  }
49
- var M = ({ children: i, variant: a = "surface", size: u = "md", position: f = "sticky", reserveScrollPadding: m = !0, bordered: _ = !1, elevated: x = !1, elevateOnScroll: w = !1, contained: k = !0, maxWidth: A = "xl", collapseBelow: j = "md", open: M, defaultOpen: N = !1, onOpenChange: P, menuLabel: F, menuTitle: I, menuSide: L = "end", activeTone: R = "accent", className: z, ref: B, ...V }) => {
50
- let H = n(), ne = F ?? H.navbar.openMenu, U = I ?? H.navbar.menu, W = y(null), re = r(W, B);
51
- h(() => {
52
- let e = W.current;
53
- if (!e || f === "static" || !m) return;
54
- let t = f === "fixed" ? document.documentElement : te(e), n = t.style.scrollPaddingTop, r = () => {
52
+ var R = ({ children: n, variant: r = "surface", size: o = "md", position: s = "sticky", reserveScrollPadding: u = !0, bordered: p = !1, elevated: m = !1, elevateOnScroll: g = !1, contained: v = !0, maxWidth: x = "xl", collapseBelow: T = "md", open: O, defaultOpen: N = !1, onOpenChange: P, menuLabel: F, menuTitle: I, menuSide: R = "end", activeTone: z = "accent", className: B, ref: V, ...H }) => {
53
+ let U = i(), W = F ?? U.navbar.openMenu, G = I ?? U.navbar.menu, K = C(null), q = a(K, V);
54
+ y(() => {
55
+ let e = K.current;
56
+ if (!e || s === "static" || !u) return;
57
+ let t = s === "fixed" ? document.documentElement : L(e), n = t.style.scrollPaddingTop, r = () => {
55
58
  t.style.scrollPaddingTop = `${e.offsetHeight}px`;
56
59
  };
57
60
  r();
@@ -59,134 +62,139 @@ var M = ({ children: i, variant: a = "surface", size: u = "md", position: f = "s
59
62
  return i?.observe(e), () => {
60
63
  i?.disconnect(), t.style.scrollPaddingTop = n;
61
64
  };
62
- }, [f, m]);
63
- let [G, K] = t({
64
- value: M,
65
+ }, [s, u]);
66
+ let [J, Y] = t({
67
+ value: O,
65
68
  defaultValue: N,
66
69
  onChange: P
67
- }), q = `${g()}-menu`, J = y(null), [ie, Y] = b(0), [ae, oe] = b(!1), X = p(() => (Y((e) => e + 1), () => Y((e) => e - 1)), []), Z = p((e) => K(e), [K]), Q = y(!1);
68
- h(() => {
69
- if (!G || typeof window > "u" || !window.matchMedia) return;
70
- let t = window.matchMedia(`(min-width: ${e[j]}px)`), n = () => {
71
- t.matches && (Q.current = !0, Z(!1));
70
+ }), X = `${b()}-menu`, Z = C(null), [te, ne] = w(0), [re, ie] = w(!1), [ae, oe] = w(null), se = _(() => (ne((e) => e + 1), () => ne((e) => e - 1)), []), Q = _((e) => Y(e), [Y]), $ = C(!1);
71
+ y(() => {
72
+ if (!J || typeof window > "u" || !window.matchMedia) return;
73
+ let t = window.matchMedia(`(min-width: ${e[T]}px)`), n = () => {
74
+ t.matches && ($.current = !0, Q(!1));
72
75
  };
73
76
  return n(), t.addEventListener("change", n), () => t.removeEventListener("change", n);
74
77
  }, [
75
- G,
76
- j,
77
- Z
78
- ]), h(() => {
79
- if (G || !Q.current) return;
80
- Q.current = !1;
78
+ J,
79
+ T,
80
+ Q
81
+ ]), y(() => {
82
+ if (J || !$.current) return;
83
+ $.current = !1;
81
84
  let e = document.activeElement;
82
- (!e || e === document.body || document.getElementById(q)?.contains(e)) && J.current?.closest("header")?.querySelector("nav a[href], nav button:not([disabled])")?.focus();
83
- }, [G, q]), h(() => {
84
- if (!w || typeof window > "u") return;
85
+ (!e || e === document.body || document.getElementById(X)?.contains(e)) && Z.current?.closest("header")?.querySelector("nav a[href], nav button:not([disabled])")?.focus();
86
+ }, [J, X]), y(() => {
87
+ if (!g || typeof window > "u") return;
85
88
  let e = 0, t = () => {
86
- e = 0, oe(window.scrollY > 0);
89
+ e = 0, ie(window.scrollY > 0);
87
90
  }, n = () => {
88
91
  e ||= window.requestAnimationFrame(t);
89
92
  };
90
93
  return t(), window.addEventListener("scroll", n, { passive: !0 }), () => {
91
94
  window.removeEventListener("scroll", n), e && window.cancelAnimationFrame(e);
92
95
  };
93
- }, [w]);
94
- let se = v(() => ({
95
- open: G,
96
- setOpen: Z,
97
- menuId: q,
98
- menuTitle: U,
99
- menuSide: L,
100
- toggleRef: J,
101
- registerNav: X,
102
- activeTone: R
96
+ }, [g]);
97
+ let ce = S(() => ({
98
+ open: J,
99
+ setOpen: Q,
100
+ menuId: X,
101
+ menuTitle: G,
102
+ menuSide: R,
103
+ toggleRef: Z,
104
+ registerNav: se,
105
+ activeTone: z,
106
+ variant: r,
107
+ openGroup: ae,
108
+ setOpenGroup: oe
103
109
  }), [
104
- G,
105
- Z,
106
- q,
107
- U,
108
- L,
110
+ J,
111
+ Q,
109
112
  X,
110
- R
111
- ]), $ = w && ae, ce = ie > 0;
112
- return /* @__PURE__ */ S(O.Provider, {
113
- value: se,
114
- children: /* @__PURE__ */ S("header", {
115
- "data-variant": a,
116
- ...V,
117
- ref: re,
118
- className: o(d.root, T[a], E[u], D[f], ee[j], _ && d.bordered, (x || $) && d.elevated, $ && d.scrolled, z),
119
- children: /* @__PURE__ */ C(l, {
120
- size: A,
121
- fluid: !k,
113
+ G,
114
+ R,
115
+ se,
116
+ z,
117
+ r,
118
+ ae
119
+ ]), le = g && re, ue = te > 0;
120
+ return /* @__PURE__ */ E(M.Provider, {
121
+ value: ce,
122
+ children: /* @__PURE__ */ E("header", {
123
+ "data-variant": r,
124
+ ...H,
125
+ ref: q,
126
+ className: c(h.root, k[r], ee[o], A[s], j[T], p && h.bordered, (m || le) && h.elevated, le && h.scrolled, B),
127
+ children: /* @__PURE__ */ D(f, {
128
+ size: x,
129
+ fluid: !v,
122
130
  gutter: "responsive",
123
- className: d.inner,
124
- children: [i, ce && /* @__PURE__ */ S(s, {
125
- ref: J,
126
- "aria-label": ne,
131
+ className: h.inner,
132
+ children: [n, ue && /* @__PURE__ */ E(l, {
133
+ ref: Z,
134
+ "aria-label": W,
127
135
  "aria-haspopup": "dialog",
128
- "aria-expanded": G,
129
- "aria-controls": G ? q : void 0,
130
- variant: a === "solid" ? "solid" : "ghost",
131
- tone: a === "solid" ? "primary" : "neutral",
132
- size: u,
133
- className: d.toggle,
134
- onClick: () => Z(!G),
135
- children: /* @__PURE__ */ S(c, {})
136
+ "aria-expanded": J,
137
+ "aria-controls": J ? X : void 0,
138
+ variant: r === "solid" ? "solid" : "ghost",
139
+ tone: r === "solid" ? "primary" : "neutral",
140
+ size: o,
141
+ className: h.toggle,
142
+ onClick: () => Q(!J),
143
+ children: /* @__PURE__ */ E(d, {})
136
144
  })]
137
145
  })
138
146
  })
139
147
  });
140
148
  };
141
- M.displayName = "Navbar";
142
- function N(e) {
149
+ R.displayName = "Navbar";
150
+ function z(e) {
143
151
  let { as: t, className: n, children: r, ...i } = e, a = t !== void 0 || i.href !== void 0;
144
- return /* @__PURE__ */ S(t ?? (a ? "a" : "div"), {
152
+ return /* @__PURE__ */ E(t ?? (a ? "a" : "div"), {
145
153
  ...i,
146
- className: o(d.brand, a && d.brandLink, n),
154
+ className: c(h.brand, a && h.brandLink, n),
147
155
  children: r
148
156
  });
149
157
  }
150
- N.displayName = "Navbar.Brand";
151
- var P = {
152
- start: d.alignStart,
153
- center: d.alignCenter,
154
- end: d.alignEnd
155
- }, F = i(d, "navGap"), I = ({ children: e, align: t = "start", gap: r, className: i, style: s, "aria-label": c, "aria-labelledby": l, ...f }) => {
156
- let p = n(), m = c ?? p.navbar.nav, { open: h, setOpen: g, menuId: v, menuTitle: y, menuSide: b, toggleRef: w, registerNav: T } = k("Navbar.Nav");
157
- _(() => T(), [T]);
158
- let E = {}, D = [];
159
- return a("navbar-nav-gap", r, (e) => `var(--space-${e})`, F, E, D), /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("nav", {
160
- "aria-label": l ? void 0 : m,
158
+ z.displayName = "Navbar.Brand";
159
+ var B = {
160
+ start: h.alignStart,
161
+ center: h.alignCenter,
162
+ end: h.alignEnd
163
+ }, V = o(h, "navGap"), H = ({ children: e, align: t = "start", gap: n, className: r, style: a, "aria-label": o, "aria-labelledby": l, ...u }) => {
164
+ let d = i(), f = o ?? d.navbar.nav, { open: p, setOpen: g, menuId: _, menuTitle: v, menuSide: y, toggleRef: b, registerNav: S } = N("Navbar.Nav");
165
+ x(() => S(), [S]);
166
+ let C = {}, w = [];
167
+ return s("navbar-nav-gap", n, (e) => `var(--space-${e})`, V, C, w), /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("nav", {
168
+ "aria-label": l ? void 0 : f,
161
169
  "aria-labelledby": l,
162
- ...f,
163
- className: o(d.nav, P[t], ...D, i),
170
+ ...u,
171
+ className: c(h.nav, B[t], ...w, r),
164
172
  style: {
165
- ...E,
166
- ...s
173
+ ...C,
174
+ ...a
167
175
  },
168
- children: /* @__PURE__ */ S(A.Provider, {
176
+ children: /* @__PURE__ */ E(P.Provider, {
169
177
  value: "bar",
170
- children: /* @__PURE__ */ S("ul", {
171
- className: d.list,
178
+ children: /* @__PURE__ */ E("ul", {
179
+ className: h.list,
172
180
  children: e
173
181
  })
174
182
  })
175
- }), /* @__PURE__ */ S(u, {
176
- open: h,
183
+ }), /* @__PURE__ */ E(m, {
184
+ open: p,
177
185
  onOpenChange: g,
178
- side: b,
186
+ side: y,
179
187
  size: "sm",
180
- finalFocusRef: w,
181
- children: /* @__PURE__ */ C(u.Content, {
182
- id: v,
183
- children: [/* @__PURE__ */ S(u.Header, { children: /* @__PURE__ */ S(u.Title, { children: y }) }), /* @__PURE__ */ S(u.Body, { children: /* @__PURE__ */ S("nav", {
184
- "aria-label": l ? void 0 : m,
188
+ finalFocusRef: b,
189
+ children: /* @__PURE__ */ D(m.Content, {
190
+ id: _,
191
+ children: [/* @__PURE__ */ E(m.Header, { children: /* @__PURE__ */ E(m.Title, { children: v }) }), /* @__PURE__ */ E(m.Body, { children: /* @__PURE__ */ E("nav", {
192
+ "aria-label": l ? void 0 : f,
185
193
  "aria-labelledby": l,
186
- children: /* @__PURE__ */ S(A.Provider, {
194
+ children: /* @__PURE__ */ E(P.Provider, {
187
195
  value: "drawer",
188
- children: /* @__PURE__ */ S("ul", {
189
- className: d.drawerList,
196
+ children: /* @__PURE__ */ E("ul", {
197
+ className: h.drawerList,
190
198
  children: e
191
199
  })
192
200
  })
@@ -194,56 +202,188 @@ var P = {
194
202
  })
195
203
  })] });
196
204
  };
197
- I.displayName = "Navbar.Nav";
198
- var L = ({ className: e, children: t, showIn: n = "both", ref: r, ...i }) => {
199
- let a = m(A);
200
- return n !== "both" && n !== a ? null : /* @__PURE__ */ S("li", {
205
+ H.displayName = "Navbar.Nav";
206
+ var U = ({ className: e, children: t, showIn: n = "both", ref: r, ...i }) => {
207
+ let a = v(P);
208
+ return n !== "both" && n !== a ? null : /* @__PURE__ */ E("li", {
201
209
  ...i,
202
210
  ref: a === "drawer" ? void 0 : r,
203
- className: o(d.item, a === "drawer" && d.itemDrawer, e),
204
- children: /* @__PURE__ */ S(j.Provider, {
211
+ className: c(h.item, a === "drawer" && h.itemDrawer, e),
212
+ children: /* @__PURE__ */ E(I.Provider, {
205
213
  value: !0,
206
214
  children: t
207
215
  })
208
216
  });
209
217
  };
210
- L.displayName = "Navbar.Item";
211
- function R(e) {
212
- let { as: t, active: n = !1, icon: r, className: i, children: a, onClick: s, "aria-current": c, ref: l, ...u } = e, f = m(A), p = m(j), h = m(O), g = t ?? "a", _ = (e) => {
213
- s?.(e), f === "drawer" && h?.setOpen(!1);
214
- }, v = /* @__PURE__ */ C(g, {
215
- ...u,
216
- ref: f === "drawer" ? void 0 : l,
217
- "aria-current": n ? "page" : c,
218
- onClick: _,
219
- className: o(d.link, f === "drawer" ? d.linkDrawer : d.linkBar, n && d.active, n && w[h?.activeTone ?? "accent"], i),
220
- children: [r != null && /* @__PURE__ */ S("span", {
221
- className: d.linkIcon,
222
- "aria-hidden": "true",
223
- children: r
224
- }), /* @__PURE__ */ S("span", {
225
- className: d.linkLabel,
226
- children: a
227
- })]
218
+ U.displayName = "Navbar.Item";
219
+ var W = (e) => e !== void 0 && e !== "" && e !== 0;
220
+ function G(e, t, n, r) {
221
+ if (!W(e)) return null;
222
+ let i = r && n === void 0, a = {
223
+ variant: i ? "inverse" : "solid",
224
+ tone: i ? "primary" : n ?? "accent",
225
+ size: "sm",
226
+ label: t
227
+ };
228
+ return /* @__PURE__ */ D(T, { children: [" ", /* @__PURE__ */ E("span", {
229
+ className: h.linkBadge,
230
+ children: typeof e == "number" ? /* @__PURE__ */ E(p, {
231
+ ...a,
232
+ count: e
233
+ }) : /* @__PURE__ */ E(p, {
234
+ ...a,
235
+ children: e
236
+ })
237
+ })] });
238
+ }
239
+ var K = {
240
+ bar: h.linkBar,
241
+ drawer: h.linkDrawer,
242
+ panel: h.linkPanel
243
+ };
244
+ function q(e) {
245
+ let { as: t, active: n = !1, icon: r, badge: i, badgeLabel: a, badgeTone: o, className: s, children: l, onClick: u, "aria-current": d, ref: f, ...p } = e, m = v(P), g = v(I), _ = v(M), y = v(F), b = t ?? "a", x = (e) => {
246
+ u?.(e), m === "drawer" && _?.setOpen(!1), m === "panel" && y?.();
247
+ }, S = /* @__PURE__ */ D(b, {
248
+ ...p,
249
+ ref: m === "drawer" ? void 0 : f,
250
+ "aria-current": n ? "page" : d,
251
+ onClick: x,
252
+ className: c(h.link, K[m], n && h.active, n && O[_?.activeTone ?? "accent"], s),
253
+ children: [
254
+ r != null && /* @__PURE__ */ E("span", {
255
+ className: h.linkIcon,
256
+ "aria-hidden": "true",
257
+ children: r
258
+ }),
259
+ /* @__PURE__ */ E("span", {
260
+ className: h.linkLabel,
261
+ children: l
262
+ }),
263
+ G(i, a, o, m === "bar" && _?.variant === "solid")
264
+ ]
228
265
  });
229
- return p ? v : /* @__PURE__ */ S("li", {
230
- className: o(d.item, f === "drawer" && d.itemDrawer),
231
- children: v
266
+ return g ? S : /* @__PURE__ */ E("li", {
267
+ className: c(h.item, m !== "bar" && h.itemDrawer),
268
+ children: S
232
269
  });
233
270
  }
234
- R.displayName = "Navbar.Link";
235
- var z = ({ className: e, children: t, ...n }) => /* @__PURE__ */ S("div", {
271
+ q.displayName = "Navbar.Link";
272
+ var J = (e) => e ? "bottom-end" : "bottom-start", Y = ({ label: e, icon: i, children: a, active: o = !1, badge: s, badgeLabel: l, badgeTone: d, open: f, defaultOpen: p = !1, onOpenChange: m, disabled: g = !1, className: S, ref: T, ...k }) => {
273
+ let ee = v(P), A = N("Navbar.Group"), j = ee === "bar", M = b(), I = `${M}-list`, L = C(null), R = C(null), z = C(!1), [B, V] = t({
274
+ value: j ? f : void 0,
275
+ defaultValue: j ? p : p || o,
276
+ onChange: j ? m : void 0
277
+ }), { openGroup: H, setOpenGroup: U } = A;
278
+ y(() => {
279
+ j && B && U(M);
280
+ }, [
281
+ j,
282
+ B,
283
+ M,
284
+ U
285
+ ]), y(() => {
286
+ j && H !== null && H !== M && V(!1);
287
+ }, [
288
+ j,
289
+ H,
290
+ M,
291
+ V
292
+ ]);
293
+ let W = _((e) => {
294
+ V(!1), e && L.current?.focus();
295
+ }, [V]);
296
+ n([L, R], {
297
+ active: j && B,
298
+ onDismiss: (e) => W(e.type === "keydown")
299
+ });
300
+ let [K, q] = w(!1);
301
+ x(() => {
302
+ j && B && L.current && q(getComputedStyle(L.current).direction === "rtl");
303
+ }, [j, B]);
304
+ let Y = r(L, R, {
305
+ open: j && B,
306
+ placement: J(K),
307
+ offset: 4
308
+ }), X = /* @__PURE__ */ D("button", {
309
+ ref: L,
310
+ type: "button",
311
+ disabled: g,
312
+ "aria-expanded": B,
313
+ "aria-controls": B ? I : void 0,
314
+ onClick: () => V(!B),
315
+ className: c(h.link, h.groupButton, j ? h.linkBar : h.linkDrawer, B && h.groupOpen, o && h.active, o && O[A.activeTone]),
316
+ children: [
317
+ i != null && /* @__PURE__ */ E("span", {
318
+ className: h.linkIcon,
319
+ "aria-hidden": "true",
320
+ children: i
321
+ }),
322
+ /* @__PURE__ */ E("span", {
323
+ className: h.linkLabel,
324
+ children: e
325
+ }),
326
+ G(s, l, d, j && A.variant === "solid"),
327
+ /* @__PURE__ */ E("span", {
328
+ className: h.chevron,
329
+ "aria-hidden": "true",
330
+ children: /* @__PURE__ */ E(u, {})
331
+ })
332
+ ]
333
+ });
334
+ return j ? /* @__PURE__ */ D("li", {
335
+ ...k,
336
+ ref: T,
337
+ className: c(h.item, S),
338
+ onPointerDown: () => {
339
+ z.current = !0, window.setTimeout(() => {
340
+ z.current = !1;
341
+ }, 0);
342
+ },
343
+ onBlur: (e) => {
344
+ let t = e.relatedTarget, n = z.current;
345
+ z.current = !1, B && (t ? !e.currentTarget.contains(t) : !n) && V(!1);
346
+ },
347
+ children: [X, B && /* @__PURE__ */ E("div", {
348
+ ref: R,
349
+ className: h.panelPositioner,
350
+ style: Y.style,
351
+ children: /* @__PURE__ */ E(P.Provider, {
352
+ value: "panel",
353
+ children: /* @__PURE__ */ E(F.Provider, {
354
+ value: () => W(!1),
355
+ children: /* @__PURE__ */ E("ul", {
356
+ id: I,
357
+ className: h.panel,
358
+ children: a
359
+ })
360
+ })
361
+ })
362
+ })]
363
+ }) : /* @__PURE__ */ D("li", {
364
+ ...k,
365
+ className: c(h.item, h.itemDrawer, S),
366
+ children: [X, B && /* @__PURE__ */ E("ul", {
367
+ id: I,
368
+ className: h.drawerSubList,
369
+ children: a
370
+ })]
371
+ });
372
+ };
373
+ Y.displayName = "Navbar.Group";
374
+ var X = ({ className: e, children: t, ...n }) => /* @__PURE__ */ E("div", {
236
375
  ...n,
237
- className: o(d.actions, e),
376
+ className: c(h.actions, e),
238
377
  children: t
239
378
  });
240
- z.displayName = "Navbar.Actions";
241
- var B = Object.assign(M, {
242
- Brand: N,
243
- Nav: I,
244
- Item: L,
245
- Link: R,
246
- Actions: z
379
+ X.displayName = "Navbar.Actions";
380
+ var Z = Object.assign(R, {
381
+ Brand: z,
382
+ Nav: H,
383
+ Item: U,
384
+ Link: q,
385
+ Group: Y,
386
+ Actions: X
247
387
  });
248
388
  //#endregion
249
- export { B as Navbar, z as NavbarActions, N as NavbarBrand, L as NavbarItem, R as NavbarLink, I as NavbarNav };
389
+ export { Z as Navbar, X as NavbarActions, z as NavbarBrand, Y as NavbarGroup, U as NavbarItem, q as NavbarLink, H as NavbarNav };
@@ -1 +1 @@
1
- var e=`_root_1oq16_39`,t=`_sm_1oq16_75`,n=`_md_1oq16_93`,r=`_lg_1oq16_109`,i=`_sticky_1oq16_137`,a=`_fixed_1oq16_149`,o=`_surface_1oq16_165`,s=`_transparent_1oq16_175`,c=`_scrolled_1oq16_187`,l=`_solid_1oq16_203`,u=`_bordered_1oq16_219`,d=`_elevated_1oq16_235`,f=`_inner_1oq16_251`,p=`_brand_1oq16_269`,m=`_brandLink_1oq16_311`,h=`_nav_1oq16_347`,g=`_list_1oq16_359`,_=`_item_1oq16_383`,v=`_alignStart_1oq16_397`,y=`_alignCenter_1oq16_403`,b=`_alignEnd_1oq16_409`,x=`_navGapBase_1oq16_425`,S=`_navGapSm_1oq16_433`,C=`_navGapMd_1oq16_443`,w=`_navGapLg_1oq16_453`,T=`_navGapXl_1oq16_463`,E=`_navGap2xl_1oq16_473`,D=`_actions_1oq16_485`,O=`_toggle_1oq16_507`,k=`_collapseSm_1oq16_527`,A=`_collapseMd_1oq16_545`,j=`_collapseLg_1oq16_563`,M=`_link_1oq16_587`,N=`_linkIcon_1oq16_657`,P=`_linkLabel_1oq16_683`,F=`_activeAccent_1oq16_719`,I=`_activePrimary_1oq16_731`,L=`_activeNeutral_1oq16_743`,R=`_active_1oq16_719`,z=`_linkBar_1oq16_797`,B=`_drawerList_1oq16_859`,V=`_itemDrawer_1oq16_877`,H=`_linkDrawer_1oq16_885`,U={root:e,sm:t,md:n,lg:r,static:`_static_1oq16_129`,sticky:i,fixed:a,surface:o,transparent:s,scrolled:c,solid:l,bordered:u,elevated:d,inner:f,brand:p,brandLink:m,nav:h,list:g,item:_,alignStart:v,alignCenter:y,alignEnd:b,navGapBase:x,navGapSm:S,navGapMd:C,navGapLg:w,navGapXl:T,navGap2xl:E,actions:D,toggle:O,collapseSm:k,collapseMd:A,collapseLg:j,link:M,linkIcon:N,linkLabel:P,activeAccent:F,activePrimary:I,activeNeutral:L,active:R,linkBar:z,drawerList:B,itemDrawer:V,linkDrawer:H};exports.actions=D,exports.active=R,exports.activeAccent=F,exports.activeNeutral=L,exports.activePrimary=I,exports.alignCenter=y,exports.alignEnd=b,exports.alignStart=v,exports.bordered=u,exports.brand=p,exports.brandLink=m,exports.collapseLg=j,exports.collapseMd=A,exports.collapseSm=k,exports.default=U,exports.drawerList=B,exports.elevated=d,exports.fixed=a,exports.inner=f,exports.item=_,exports.itemDrawer=V,exports.lg=r,exports.link=M,exports.linkBar=z,exports.linkDrawer=H,exports.linkIcon=N,exports.linkLabel=P,exports.list=g,exports.md=n,exports.nav=h,exports.navGap2xl=E,exports.navGapBase=x,exports.navGapLg=w,exports.navGapMd=C,exports.navGapSm=S,exports.navGapXl=T,exports.root=e,exports.scrolled=c,exports.sm=t,exports.solid=l,exports.sticky=i,exports.surface=o,exports.toggle=O,exports.transparent=s;
1
+ var e=`_root_10yn2_39`,t=`_sm_10yn2_75`,n=`_md_10yn2_93`,r=`_lg_10yn2_109`,i=`_sticky_10yn2_137`,a=`_fixed_10yn2_149`,o=`_surface_10yn2_165`,s=`_transparent_10yn2_175`,c=`_scrolled_10yn2_187`,l=`_solid_10yn2_203`,u=`_bordered_10yn2_219`,d=`_elevated_10yn2_235`,f=`_inner_10yn2_251`,p=`_brand_10yn2_269`,m=`_brandLink_10yn2_311`,h=`_nav_10yn2_347`,g=`_list_10yn2_359`,_=`_item_10yn2_383`,v=`_alignStart_10yn2_397`,y=`_alignCenter_10yn2_403`,b=`_alignEnd_10yn2_409`,x=`_navGapBase_10yn2_425`,S=`_navGapSm_10yn2_433`,C=`_navGapMd_10yn2_443`,w=`_navGapLg_10yn2_453`,T=`_navGapXl_10yn2_463`,E=`_navGap2xl_10yn2_473`,D=`_actions_10yn2_485`,O=`_toggle_10yn2_507`,k=`_collapseSm_10yn2_527`,A=`_collapseMd_10yn2_545`,j=`_collapseLg_10yn2_563`,M=`_link_10yn2_587`,N=`_linkIcon_10yn2_657`,P=`_linkLabel_10yn2_683`,F=`_linkBadge_10yn2_699`,I=`_linkDrawer_10yn2_711`,L=`_groupButton_10yn2_731`,R=`_chevron_10yn2_765`,z=`_groupOpen_10yn2_805`,B=`_panelPositioner_10yn2_815`,V=`_panel_10yn2_815`,H=`_linkPanel_10yn2_883`,U=`_active_10yn2_909`,W=`_drawerSubList_10yn2_923`,G=`_activeAccent_10yn2_973`,K=`_activePrimary_10yn2_985`,q=`_activeNeutral_10yn2_997`,J=`_linkBar_10yn2_1051`,Y=`_drawerList_10yn2_1113`,X=`_itemDrawer_10yn2_1131`,Z={root:e,sm:t,md:n,lg:r,static:`_static_10yn2_129`,sticky:i,fixed:a,surface:o,transparent:s,scrolled:c,solid:l,bordered:u,elevated:d,inner:f,brand:p,brandLink:m,nav:h,list:g,item:_,alignStart:v,alignCenter:y,alignEnd:b,navGapBase:x,navGapSm:S,navGapMd:C,navGapLg:w,navGapXl:T,navGap2xl:E,actions:D,toggle:O,collapseSm:k,collapseMd:A,collapseLg:j,link:M,linkIcon:N,linkLabel:P,linkBadge:F,linkDrawer:I,groupButton:L,chevron:R,groupOpen:z,panelPositioner:B,panel:V,"panel-enter":`_panel-enter_10yn2_1`,linkPanel:H,active:U,drawerSubList:W,activeAccent:G,activePrimary:K,activeNeutral:q,linkBar:J,drawerList:Y,itemDrawer:X};exports.actions=D,exports.active=U,exports.activeAccent=G,exports.activeNeutral=q,exports.activePrimary=K,exports.alignCenter=y,exports.alignEnd=b,exports.alignStart=v,exports.bordered=u,exports.brand=p,exports.brandLink=m,exports.chevron=R,exports.collapseLg=j,exports.collapseMd=A,exports.collapseSm=k,exports.default=Z,exports.drawerList=Y,exports.drawerSubList=W,exports.elevated=d,exports.fixed=a,exports.groupButton=L,exports.groupOpen=z,exports.inner=f,exports.item=_,exports.itemDrawer=X,exports.lg=r,exports.link=M,exports.linkBadge=F,exports.linkBar=J,exports.linkDrawer=I,exports.linkIcon=N,exports.linkLabel=P,exports.linkPanel=H,exports.list=g,exports.md=n,exports.nav=h,exports.navGap2xl=E,exports.navGapBase=x,exports.navGapLg=w,exports.navGapMd=C,exports.navGapSm=S,exports.navGapXl=T,exports.panel=V,exports.panelPositioner=B,exports.root=e,exports.scrolled=c,exports.sm=t,exports.solid=l,exports.sticky=i,exports.surface=o,exports.toggle=O,exports.transparent=s;
@@ -1,10 +1,10 @@
1
1
  //#region src/components/navigation/Navbar/Navbar.module.css
2
- var e = "_root_1oq16_39", t = "_sm_1oq16_75", n = "_md_1oq16_93", r = "_lg_1oq16_109", i = "_sticky_1oq16_137", a = "_fixed_1oq16_149", o = "_surface_1oq16_165", s = "_transparent_1oq16_175", c = "_scrolled_1oq16_187", l = "_solid_1oq16_203", u = "_bordered_1oq16_219", d = "_elevated_1oq16_235", f = "_inner_1oq16_251", p = "_brand_1oq16_269", m = "_brandLink_1oq16_311", h = "_nav_1oq16_347", g = "_list_1oq16_359", _ = "_item_1oq16_383", v = "_alignStart_1oq16_397", y = "_alignCenter_1oq16_403", b = "_alignEnd_1oq16_409", x = "_navGapBase_1oq16_425", S = "_navGapSm_1oq16_433", C = "_navGapMd_1oq16_443", w = "_navGapLg_1oq16_453", T = "_navGapXl_1oq16_463", E = "_navGap2xl_1oq16_473", D = "_actions_1oq16_485", O = "_toggle_1oq16_507", k = "_collapseSm_1oq16_527", A = "_collapseMd_1oq16_545", j = "_collapseLg_1oq16_563", M = "_link_1oq16_587", N = "_linkIcon_1oq16_657", P = "_linkLabel_1oq16_683", F = "_activeAccent_1oq16_719", I = "_activePrimary_1oq16_731", L = "_activeNeutral_1oq16_743", R = "_active_1oq16_719", z = "_linkBar_1oq16_797", B = "_drawerList_1oq16_859", V = "_itemDrawer_1oq16_877", H = "_linkDrawer_1oq16_885", U = {
2
+ var e = "_root_10yn2_39", t = "_sm_10yn2_75", n = "_md_10yn2_93", r = "_lg_10yn2_109", i = "_sticky_10yn2_137", a = "_fixed_10yn2_149", o = "_surface_10yn2_165", s = "_transparent_10yn2_175", c = "_scrolled_10yn2_187", l = "_solid_10yn2_203", u = "_bordered_10yn2_219", d = "_elevated_10yn2_235", f = "_inner_10yn2_251", p = "_brand_10yn2_269", m = "_brandLink_10yn2_311", h = "_nav_10yn2_347", g = "_list_10yn2_359", _ = "_item_10yn2_383", v = "_alignStart_10yn2_397", y = "_alignCenter_10yn2_403", b = "_alignEnd_10yn2_409", x = "_navGapBase_10yn2_425", S = "_navGapSm_10yn2_433", C = "_navGapMd_10yn2_443", w = "_navGapLg_10yn2_453", T = "_navGapXl_10yn2_463", E = "_navGap2xl_10yn2_473", D = "_actions_10yn2_485", O = "_toggle_10yn2_507", k = "_collapseSm_10yn2_527", A = "_collapseMd_10yn2_545", j = "_collapseLg_10yn2_563", M = "_link_10yn2_587", N = "_linkIcon_10yn2_657", P = "_linkLabel_10yn2_683", F = "_linkBadge_10yn2_699", I = "_linkDrawer_10yn2_711", L = "_groupButton_10yn2_731", R = "_chevron_10yn2_765", z = "_groupOpen_10yn2_805", B = "_panelPositioner_10yn2_815", V = "_panel_10yn2_815", H = "_linkPanel_10yn2_883", U = "_active_10yn2_909", W = "_drawerSubList_10yn2_923", G = "_activeAccent_10yn2_973", K = "_activePrimary_10yn2_985", q = "_activeNeutral_10yn2_997", J = "_linkBar_10yn2_1051", Y = "_drawerList_10yn2_1113", X = "_itemDrawer_10yn2_1131", Z = {
3
3
  root: e,
4
4
  sm: t,
5
5
  md: n,
6
6
  lg: r,
7
- static: "_static_1oq16_129",
7
+ static: "_static_10yn2_129",
8
8
  sticky: i,
9
9
  fixed: a,
10
10
  surface: o,
@@ -36,14 +36,23 @@ var e = "_root_1oq16_39", t = "_sm_1oq16_75", n = "_md_1oq16_93", r = "_lg_1oq16
36
36
  link: M,
37
37
  linkIcon: N,
38
38
  linkLabel: P,
39
- activeAccent: F,
40
- activePrimary: I,
41
- activeNeutral: L,
42
- active: R,
43
- linkBar: z,
44
- drawerList: B,
45
- itemDrawer: V,
46
- linkDrawer: H
39
+ linkBadge: F,
40
+ linkDrawer: I,
41
+ groupButton: L,
42
+ chevron: R,
43
+ groupOpen: z,
44
+ panelPositioner: B,
45
+ panel: V,
46
+ "panel-enter": "_panel-enter_10yn2_1",
47
+ linkPanel: H,
48
+ active: U,
49
+ drawerSubList: W,
50
+ activeAccent: G,
51
+ activePrimary: K,
52
+ activeNeutral: q,
53
+ linkBar: J,
54
+ drawerList: Y,
55
+ itemDrawer: X
47
56
  };
48
57
  //#endregion
49
- export { D as actions, R as active, F as activeAccent, L as activeNeutral, I as activePrimary, y as alignCenter, b as alignEnd, v as alignStart, u as bordered, p as brand, m as brandLink, j as collapseLg, A as collapseMd, k as collapseSm, U as default, B as drawerList, d as elevated, a as fixed, f as inner, _ as item, V as itemDrawer, r as lg, M as link, z as linkBar, H as linkDrawer, N as linkIcon, P as linkLabel, g as list, n as md, h as nav, E as navGap2xl, x as navGapBase, w as navGapLg, C as navGapMd, S as navGapSm, T as navGapXl, e as root, c as scrolled, t as sm, l as solid, i as sticky, o as surface, O as toggle, s as transparent };
58
+ export { D as actions, U as active, G as activeAccent, q as activeNeutral, K as activePrimary, y as alignCenter, b as alignEnd, v as alignStart, u as bordered, p as brand, m as brandLink, R as chevron, j as collapseLg, A as collapseMd, k as collapseSm, Z as default, Y as drawerList, W as drawerSubList, d as elevated, a as fixed, L as groupButton, z as groupOpen, f as inner, _ as item, X as itemDrawer, r as lg, M as link, F as linkBadge, J as linkBar, I as linkDrawer, N as linkIcon, P as linkLabel, H as linkPanel, g as list, n as md, h as nav, E as navGap2xl, x as navGapBase, w as navGapLg, C as navGapMd, S as navGapSm, T as navGapXl, V as panel, B as panelPositioner, e as root, c as scrolled, t as sm, l as solid, i as sticky, o as surface, O as toggle, s as transparent };