@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.
- package/dist/ai/llms-full.txt +67 -32
- package/dist/ai/registry.json +136 -17
- package/dist/components/data-display/Badge/Badge.cjs.js +1 -1
- package/dist/components/data-display/Badge/Badge.d.ts +7 -2
- package/dist/components/data-display/Badge/Badge.mjs +2 -1
- package/dist/components/data-display/Badge/Badge.module.css.cjs.js +1 -1
- package/dist/components/data-display/Badge/Badge.module.css.mjs +33 -32
- package/dist/components/navigation/Navbar/Navbar.cjs.js +1 -1
- package/dist/components/navigation/Navbar/Navbar.d.ts +65 -2
- package/dist/components/navigation/Navbar/Navbar.mjs +309 -169
- package/dist/components/navigation/Navbar/Navbar.module.css.cjs.js +1 -1
- package/dist/components/navigation/Navbar/Navbar.module.css.mjs +20 -11
- package/dist/i18n/en.cjs.js +1 -1
- package/dist/i18n/en.mjs +1 -0
- package/dist/i18n/types.d.ts +5 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +35 -35
- package/dist/locales/ar.cjs.js +1 -1
- package/dist/locales/ar.mjs +1 -0
- package/dist/locales/bn.cjs.js +1 -1
- package/dist/locales/bn.mjs +1 -0
- package/dist/locales/cs.cjs.js +1 -1
- package/dist/locales/cs.mjs +1 -0
- package/dist/locales/da.cjs.js +1 -1
- package/dist/locales/da.mjs +1 -0
- package/dist/locales/de.cjs.js +1 -1
- package/dist/locales/de.mjs +1 -0
- package/dist/locales/el.cjs.js +1 -1
- package/dist/locales/el.mjs +1 -0
- package/dist/locales/es.cjs.js +1 -1
- package/dist/locales/es.mjs +1 -0
- package/dist/locales/fa.cjs.js +1 -1
- package/dist/locales/fa.mjs +1 -0
- package/dist/locales/fi.cjs.js +1 -1
- package/dist/locales/fi.mjs +1 -0
- package/dist/locales/fr.cjs.js +1 -1
- package/dist/locales/fr.mjs +1 -0
- package/dist/locales/he.cjs.js +1 -1
- package/dist/locales/he.mjs +1 -0
- package/dist/locales/hi.cjs.js +1 -1
- package/dist/locales/hi.mjs +1 -0
- package/dist/locales/hu.cjs.js +1 -1
- package/dist/locales/hu.mjs +1 -0
- package/dist/locales/id.cjs.js +1 -1
- package/dist/locales/id.mjs +1 -0
- package/dist/locales/it.cjs.js +1 -1
- package/dist/locales/it.mjs +1 -0
- package/dist/locales/ja.cjs.js +1 -1
- package/dist/locales/ja.mjs +1 -0
- package/dist/locales/ko.cjs.js +1 -1
- package/dist/locales/ko.mjs +1 -0
- package/dist/locales/nb.cjs.js +1 -1
- package/dist/locales/nb.mjs +1 -0
- package/dist/locales/nl.cjs.js +1 -1
- package/dist/locales/nl.mjs +1 -0
- package/dist/locales/pl.cjs.js +1 -1
- package/dist/locales/pl.mjs +1 -0
- package/dist/locales/pt-BR.cjs.js +1 -1
- package/dist/locales/pt-BR.mjs +1 -0
- package/dist/locales/ro.cjs.js +1 -1
- package/dist/locales/ro.mjs +1 -0
- package/dist/locales/ru.cjs.js +1 -1
- package/dist/locales/ru.mjs +1 -0
- package/dist/locales/sv.cjs.js +1 -1
- package/dist/locales/sv.mjs +1 -0
- package/dist/locales/th.cjs.js +1 -1
- package/dist/locales/th.mjs +1 -0
- package/dist/locales/tr.cjs.js +1 -1
- package/dist/locales/tr.mjs +1 -0
- package/dist/locales/uk.cjs.js +1 -1
- package/dist/locales/uk.mjs +1 -0
- package/dist/locales/ur.cjs.js +1 -1
- package/dist/locales/ur.mjs +1 -0
- package/dist/locales/vi.cjs.js +1 -1
- package/dist/locales/vi.mjs +1 -0
- package/dist/locales/zh-Hans.cjs.js +1 -1
- package/dist/locales/zh-Hans.mjs +1 -0
- package/dist/locales/zh-Hant.cjs.js +1 -1
- package/dist/locales/zh-Hant.mjs +1 -0
- package/dist/vjdesigns-ui.css +1 -1
- 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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
|
16
|
-
accent:
|
|
17
|
-
primary:
|
|
18
|
-
neutral:
|
|
19
|
-
},
|
|
20
|
-
surface:
|
|
21
|
-
transparent:
|
|
22
|
-
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:
|
|
33
|
-
md:
|
|
34
|
-
lg:
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
42
|
-
function
|
|
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
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
let e =
|
|
53
|
-
if (!e ||
|
|
54
|
-
let t =
|
|
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
|
-
}, [
|
|
63
|
-
let [
|
|
64
|
-
value:
|
|
65
|
+
}, [s, u]);
|
|
66
|
+
let [J, Y] = t({
|
|
67
|
+
value: O,
|
|
65
68
|
defaultValue: N,
|
|
66
69
|
onChange: P
|
|
67
|
-
}),
|
|
68
|
-
|
|
69
|
-
if (!
|
|
70
|
-
let t = window.matchMedia(`(min-width: ${e[
|
|
71
|
-
t.matches && (
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
]),
|
|
79
|
-
if (
|
|
80
|
-
|
|
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(
|
|
83
|
-
}, [
|
|
84
|
-
if (!
|
|
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,
|
|
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
|
-
}, [
|
|
94
|
-
let
|
|
95
|
-
open:
|
|
96
|
-
setOpen:
|
|
97
|
-
menuId:
|
|
98
|
-
menuTitle:
|
|
99
|
-
menuSide:
|
|
100
|
-
toggleRef:
|
|
101
|
-
registerNav:
|
|
102
|
-
activeTone:
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
q,
|
|
107
|
-
U,
|
|
108
|
-
L,
|
|
110
|
+
J,
|
|
111
|
+
Q,
|
|
109
112
|
X,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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:
|
|
124
|
-
children: [
|
|
125
|
-
ref:
|
|
126
|
-
"aria-label":
|
|
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":
|
|
129
|
-
"aria-controls":
|
|
130
|
-
variant:
|
|
131
|
-
tone:
|
|
132
|
-
size:
|
|
133
|
-
className:
|
|
134
|
-
onClick: () =>
|
|
135
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
142
|
-
function
|
|
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__ */
|
|
152
|
+
return /* @__PURE__ */ E(t ?? (a ? "a" : "div"), {
|
|
145
153
|
...i,
|
|
146
|
-
className:
|
|
154
|
+
className: c(h.brand, a && h.brandLink, n),
|
|
147
155
|
children: r
|
|
148
156
|
});
|
|
149
157
|
}
|
|
150
|
-
|
|
151
|
-
var
|
|
152
|
-
start:
|
|
153
|
-
center:
|
|
154
|
-
end:
|
|
155
|
-
},
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
let
|
|
159
|
-
return
|
|
160
|
-
"aria-label": l ? void 0 :
|
|
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
|
-
...
|
|
163
|
-
className:
|
|
170
|
+
...u,
|
|
171
|
+
className: c(h.nav, B[t], ...w, r),
|
|
164
172
|
style: {
|
|
165
|
-
...
|
|
166
|
-
...
|
|
173
|
+
...C,
|
|
174
|
+
...a
|
|
167
175
|
},
|
|
168
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ E(P.Provider, {
|
|
169
177
|
value: "bar",
|
|
170
|
-
children: /* @__PURE__ */
|
|
171
|
-
className:
|
|
178
|
+
children: /* @__PURE__ */ E("ul", {
|
|
179
|
+
className: h.list,
|
|
172
180
|
children: e
|
|
173
181
|
})
|
|
174
182
|
})
|
|
175
|
-
}), /* @__PURE__ */
|
|
176
|
-
open:
|
|
183
|
+
}), /* @__PURE__ */ E(m, {
|
|
184
|
+
open: p,
|
|
177
185
|
onOpenChange: g,
|
|
178
|
-
side:
|
|
186
|
+
side: y,
|
|
179
187
|
size: "sm",
|
|
180
|
-
finalFocusRef:
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
id:
|
|
183
|
-
children: [/* @__PURE__ */
|
|
184
|
-
"aria-label": l ? void 0 :
|
|
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__ */
|
|
194
|
+
children: /* @__PURE__ */ E(P.Provider, {
|
|
187
195
|
value: "drawer",
|
|
188
|
-
children: /* @__PURE__ */
|
|
189
|
-
className:
|
|
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
|
-
|
|
198
|
-
var
|
|
199
|
-
let a =
|
|
200
|
-
return n !== "both" && n !== a ? null : /* @__PURE__ */
|
|
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:
|
|
204
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
|
230
|
-
className:
|
|
231
|
-
children:
|
|
266
|
+
return g ? S : /* @__PURE__ */ E("li", {
|
|
267
|
+
className: c(h.item, m !== "bar" && h.itemDrawer),
|
|
268
|
+
children: S
|
|
232
269
|
});
|
|
233
270
|
}
|
|
234
|
-
|
|
235
|
-
var
|
|
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:
|
|
376
|
+
className: c(h.actions, e),
|
|
238
377
|
children: t
|
|
239
378
|
});
|
|
240
|
-
|
|
241
|
-
var
|
|
242
|
-
Brand:
|
|
243
|
-
Nav:
|
|
244
|
-
Item:
|
|
245
|
-
Link:
|
|
246
|
-
|
|
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 {
|
|
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=`
|
|
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 = "
|
|
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: "
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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,
|
|
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 };
|