@gv-tech/ui-web 2.15.2 → 2.16.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/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -3
- package/dist/alert-dialog.cjs +2 -2
- package/dist/alert-dialog.mjs +16 -16
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +34 -34
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +1 -1
- package/dist/chart.cjs +1 -1
- package/dist/chart.mjs +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +114 -114
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +68 -68
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +21 -21
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +16 -16
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +43 -43
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +1 -1
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +28 -0
- package/dist/index.mjs +22 -20
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +2 -2
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +77 -77
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +57 -57
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +1 -1
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +62 -62
- package/dist/progress.cjs +2 -2
- package/dist/progress.mjs +2 -2
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +36 -36
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +88 -88
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +74 -74
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +9 -9
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +12 -12
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +2 -2
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +12 -12
- package/dist/table-of-contents.cjs +1 -0
- package/dist/table-of-contents.d.ts +35 -0
- package/dist/table-of-contents.mjs +160 -0
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +41 -41
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/{theme-toggle-B4VZTDpe.js → theme-toggle-DXQGNfCe.js} +1 -1
- package/dist/{theme-toggle-WtPW9UZi.mjs → theme-toggle-tHXIbr8W.mjs} +1 -1
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +35 -35
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +15 -15
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +4 -4
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -3
- package/dist/utils-DY6fhrgS.mjs +12 -0
- package/dist/utils-cdbZV8DZ.js +1 -0
- package/package.json +1 -1
- package/src/accordion.tsx +2 -2
- package/src/alert-dialog.tsx +6 -6
- package/src/avatar.tsx +3 -3
- package/src/checkbox.tsx +1 -1
- package/src/command.tsx +7 -7
- package/src/context-menu.tsx +8 -8
- package/src/dialog.tsx +4 -4
- package/src/drawer.tsx +3 -3
- package/src/dropdown-menu.tsx +8 -8
- package/src/hover-card.tsx +1 -1
- package/src/index.ts +4 -1
- package/src/label.tsx +1 -1
- package/src/lib/utils.ts +10 -0
- package/src/menubar.tsx +10 -10
- package/src/navigation-menu.tsx +6 -6
- package/src/popover.tsx +1 -1
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +2 -2
- package/src/scroll-area.tsx +2 -2
- package/src/select.tsx +7 -7
- package/src/separator.tsx +1 -1
- package/src/sheet.tsx +4 -4
- package/src/slider.tsx +1 -1
- package/src/switch.tsx +1 -1
- package/src/table-of-contents.tsx +285 -0
- package/src/tabs.tsx +3 -3
- package/src/toast.tsx +6 -6
- package/src/toggle-group.tsx +2 -2
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +2 -2
- package/dist/utils-B6yFEsav.mjs +0 -8
- package/dist/utils-IjLH3w2e.js +0 -1
package/dist/navigation-menu.mjs
CHANGED
|
@@ -5,19 +5,19 @@ import _e from "react-dom";
|
|
|
5
5
|
import { c as je } from "./index-IZ2gq03c.mjs";
|
|
6
6
|
import { P as T, c as E, d as Z } from "./index-K9FzbxYw.mjs";
|
|
7
7
|
import { u as ne } from "./index-p6xVFRb4.mjs";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as A, c as Se } from "./index-DLcqcWxM.mjs";
|
|
9
9
|
import { u as De } from "./index-CD6_IrA-.mjs";
|
|
10
10
|
import { P as K } from "./index-vuPgkS0V.mjs";
|
|
11
11
|
import { u as oe } from "./index-DnFcfnA9.mjs";
|
|
12
12
|
import { c as re } from "./index-DFdF7K7v.mjs";
|
|
13
13
|
import { D as ke } from "./index-Dfzl8TxY.mjs";
|
|
14
|
-
import { u as
|
|
14
|
+
import { u as Le } from "./index-BZPx6jYI.mjs";
|
|
15
15
|
import { u as z } from "./index-CCKe-Mpx.mjs";
|
|
16
16
|
import { u as S } from "./index-0ioNhtNM.mjs";
|
|
17
|
-
import { R as
|
|
17
|
+
import { R as Ae } from "./index-DKN_vhyX.mjs";
|
|
18
18
|
import { cva as Oe } from "class-variance-authority";
|
|
19
19
|
import { ChevronDown as Fe } from "lucide-react";
|
|
20
|
-
import { c as D } from "./utils-
|
|
20
|
+
import { c as D } from "./utils-DY6fhrgS.mjs";
|
|
21
21
|
var k = "NavigationMenu", [W, ae, Ke] = re(k), [$, Ve, ze] = re(k), [Y] = je(
|
|
22
22
|
k,
|
|
23
23
|
[Ke, ze]
|
|
@@ -31,9 +31,9 @@ var k = "NavigationMenu", [W, ae, Ke] = re(k), [$, Ve, ze] = re(k), [Y] = je(
|
|
|
31
31
|
delayDuration: c = 200,
|
|
32
32
|
skipDelayDuration: d = 300,
|
|
33
33
|
orientation: l = "horizontal",
|
|
34
|
-
dir:
|
|
34
|
+
dir: x,
|
|
35
35
|
...u
|
|
36
|
-
} = e, [m, M] = r.useState(null), R =
|
|
36
|
+
} = e, [m, M] = r.useState(null), R = A(t, (h) => M(h)), p = De(x), w = r.useRef(0), C = r.useRef(0), y = r.useRef(0), [I, f] = r.useState(!0), [g, v] = ne({
|
|
37
37
|
prop: o,
|
|
38
38
|
onChange: (h) => {
|
|
39
39
|
const _ = h !== "", V = d > 0;
|
|
@@ -44,7 +44,7 @@ var k = "NavigationMenu", [W, ae, Ke] = re(k), [$, Ve, ze] = re(k), [Y] = je(
|
|
|
44
44
|
},
|
|
45
45
|
defaultProp: s ?? "",
|
|
46
46
|
caller: k
|
|
47
|
-
}),
|
|
47
|
+
}), N = r.useCallback(() => {
|
|
48
48
|
window.clearTimeout(C.current), C.current = window.setTimeout(() => v(""), 150);
|
|
49
49
|
}, [v]), P = r.useCallback(
|
|
50
50
|
(h) => {
|
|
@@ -74,10 +74,10 @@ var k = "NavigationMenu", [W, ae, Ke] = re(k), [$, Ve, ze] = re(k), [Y] = je(
|
|
|
74
74
|
window.clearTimeout(w.current), I ? j(h) : P(h);
|
|
75
75
|
},
|
|
76
76
|
onTriggerLeave: () => {
|
|
77
|
-
window.clearTimeout(w.current),
|
|
77
|
+
window.clearTimeout(w.current), N();
|
|
78
78
|
},
|
|
79
79
|
onContentEnter: () => window.clearTimeout(C.current),
|
|
80
|
-
onContentLeave:
|
|
80
|
+
onContentLeave: N,
|
|
81
81
|
onItemSelect: (h) => {
|
|
82
82
|
v((_) => _ === h ? "" : h);
|
|
83
83
|
},
|
|
@@ -106,7 +106,7 @@ var G = "NavigationMenuSub", He = r.forwardRef(
|
|
|
106
106
|
defaultValue: s,
|
|
107
107
|
orientation: c = "horizontal",
|
|
108
108
|
...d
|
|
109
|
-
} = e, l = b(G, n), [
|
|
109
|
+
} = e, l = b(G, n), [x, u] = ne({
|
|
110
110
|
prop: o,
|
|
111
111
|
onChange: i,
|
|
112
112
|
defaultProp: s ?? "",
|
|
@@ -117,7 +117,7 @@ var G = "NavigationMenuSub", He = r.forwardRef(
|
|
|
117
117
|
{
|
|
118
118
|
scope: n,
|
|
119
119
|
isRootMenu: !1,
|
|
120
|
-
value:
|
|
120
|
+
value: x,
|
|
121
121
|
dir: l.dir,
|
|
122
122
|
orientation: c,
|
|
123
123
|
rootNavigationMenu: l.rootNavigationMenu,
|
|
@@ -140,7 +140,7 @@ var se = (e) => {
|
|
|
140
140
|
children: c,
|
|
141
141
|
value: d,
|
|
142
142
|
onItemSelect: l,
|
|
143
|
-
onItemDismiss:
|
|
143
|
+
onItemDismiss: x,
|
|
144
144
|
onTriggerEnter: u,
|
|
145
145
|
onTriggerLeave: m,
|
|
146
146
|
onContentEnter: M,
|
|
@@ -153,7 +153,7 @@ var se = (e) => {
|
|
|
153
153
|
isRootMenu: n,
|
|
154
154
|
rootNavigationMenu: o,
|
|
155
155
|
value: d,
|
|
156
|
-
previousValue:
|
|
156
|
+
previousValue: Le(d),
|
|
157
157
|
baseId: oe(),
|
|
158
158
|
dir: i,
|
|
159
159
|
orientation: s,
|
|
@@ -166,9 +166,9 @@ var se = (e) => {
|
|
|
166
166
|
onContentEnter: S(M),
|
|
167
167
|
onContentLeave: S(R),
|
|
168
168
|
onItemSelect: S(l),
|
|
169
|
-
onItemDismiss: S(
|
|
169
|
+
onItemDismiss: S(x),
|
|
170
170
|
onViewportContentChange: r.useCallback((g, v) => {
|
|
171
|
-
y((
|
|
171
|
+
y((N) => (N.set(g, v), new Map(N)));
|
|
172
172
|
}, []),
|
|
173
173
|
onViewportContentRemove: r.useCallback((g) => {
|
|
174
174
|
y((v) => v.has(g) ? (v.delete(g), new Map(v)) : v);
|
|
@@ -179,13 +179,13 @@ var se = (e) => {
|
|
|
179
179
|
}, ce = "NavigationMenuList", ue = r.forwardRef(
|
|
180
180
|
(e, t) => {
|
|
181
181
|
const { __scopeNavigationMenu: n, ...o } = e, i = b(ce, n), s = /* @__PURE__ */ a.jsx(T.ul, { "data-orientation": i.orientation, ...o, ref: t });
|
|
182
|
-
return /* @__PURE__ */ a.jsx(T.div, { style: { position: "relative" }, ref: i.onIndicatorTrackChange, children: /* @__PURE__ */ a.jsx(W.Slot, { scope: n, children: i.isRootMenu ? /* @__PURE__ */ a.jsx(
|
|
182
|
+
return /* @__PURE__ */ a.jsx(T.div, { style: { position: "relative" }, ref: i.onIndicatorTrackChange, children: /* @__PURE__ */ a.jsx(W.Slot, { scope: n, children: i.isRootMenu ? /* @__PURE__ */ a.jsx(xe, { asChild: !0, children: s }) : s }) });
|
|
183
183
|
}
|
|
184
184
|
);
|
|
185
185
|
ue.displayName = ce;
|
|
186
186
|
var le = "NavigationMenuItem", [Be, de] = Y(le), fe = r.forwardRef(
|
|
187
187
|
(e, t) => {
|
|
188
|
-
const { __scopeNavigationMenu: n, value: o, ...i } = e, s = oe(), c = o || s || "LEGACY_REACT_AUTO_VALUE", d = r.useRef(null), l = r.useRef(null),
|
|
188
|
+
const { __scopeNavigationMenu: n, value: o, ...i } = e, s = oe(), c = o || s || "LEGACY_REACT_AUTO_VALUE", d = r.useRef(null), l = r.useRef(null), x = r.useRef(null), u = r.useRef(() => {
|
|
189
189
|
}), m = r.useRef(!1), M = r.useCallback((p = "start") => {
|
|
190
190
|
if (d.current) {
|
|
191
191
|
u.current();
|
|
@@ -205,7 +205,7 @@ var le = "NavigationMenuItem", [Be, de] = Y(le), fe = r.forwardRef(
|
|
|
205
205
|
value: c,
|
|
206
206
|
triggerRef: l,
|
|
207
207
|
contentRef: d,
|
|
208
|
-
focusProxyRef:
|
|
208
|
+
focusProxyRef: x,
|
|
209
209
|
wasEscapeCloseRef: m,
|
|
210
210
|
onEntryKeyDown: M,
|
|
211
211
|
onFocusProxyEnter: M,
|
|
@@ -218,12 +218,12 @@ var le = "NavigationMenuItem", [Be, de] = Y(le), fe = r.forwardRef(
|
|
|
218
218
|
);
|
|
219
219
|
fe.displayName = le;
|
|
220
220
|
var U = "NavigationMenuTrigger", ve = r.forwardRef((e, t) => {
|
|
221
|
-
const { __scopeNavigationMenu: n, disabled: o, ...i } = e, s = b(U, e.__scopeNavigationMenu), c = de(U, e.__scopeNavigationMenu), d = r.useRef(null), l =
|
|
221
|
+
const { __scopeNavigationMenu: n, disabled: o, ...i } = e, s = b(U, e.__scopeNavigationMenu), c = de(U, e.__scopeNavigationMenu), d = r.useRef(null), l = A(d, c.triggerRef, t), x = Ce(s.baseId, c.value), u = Me(s.baseId, c.value), m = r.useRef(!1), M = r.useRef(!1), R = c.value === s.value;
|
|
222
222
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
223
223
|
/* @__PURE__ */ a.jsx(W.ItemSlot, { scope: n, value: c.value, children: /* @__PURE__ */ a.jsx(he, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
224
224
|
T.button,
|
|
225
225
|
{
|
|
226
|
-
id:
|
|
226
|
+
id: x,
|
|
227
227
|
disabled: o,
|
|
228
228
|
"data-disabled": o ? "" : void 0,
|
|
229
229
|
"data-state": Q(R),
|
|
@@ -257,7 +257,7 @@ var U = "NavigationMenuTrigger", ve = r.forwardRef((e, t) => {
|
|
|
257
257
|
) }) }),
|
|
258
258
|
R && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
259
259
|
/* @__PURE__ */ a.jsx(
|
|
260
|
-
|
|
260
|
+
Ae,
|
|
261
261
|
{
|
|
262
262
|
"aria-hidden": !0,
|
|
263
263
|
tabIndex: 0,
|
|
@@ -290,12 +290,12 @@ var We = "NavigationMenuLink", ee = "navigationMenu.linkSelect", me = r.forwardR
|
|
|
290
290
|
bubbles: !0,
|
|
291
291
|
cancelable: !0
|
|
292
292
|
});
|
|
293
|
-
if (d.addEventListener(ee, (
|
|
294
|
-
const
|
|
293
|
+
if (d.addEventListener(ee, (x) => i?.(x), { once: !0 }), Z(d, l), !l.defaultPrevented && !c.metaKey) {
|
|
294
|
+
const x = new CustomEvent(O, {
|
|
295
295
|
bubbles: !0,
|
|
296
296
|
cancelable: !0
|
|
297
297
|
});
|
|
298
|
-
Z(d,
|
|
298
|
+
Z(d, x);
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
301
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -316,13 +316,13 @@ ge.displayName = q;
|
|
|
316
316
|
var Ye = r.forwardRef((e, t) => {
|
|
317
317
|
const { __scopeNavigationMenu: n, ...o } = e, i = b(q, n), s = ae(n), [c, d] = r.useState(
|
|
318
318
|
null
|
|
319
|
-
), [l,
|
|
319
|
+
), [l, x] = r.useState(null), u = i.orientation === "horizontal", m = !!i.value;
|
|
320
320
|
r.useEffect(() => {
|
|
321
321
|
const p = s().find((w) => w.value === i.value)?.ref.current;
|
|
322
322
|
p && d(p);
|
|
323
323
|
}, [s, i.value]);
|
|
324
324
|
const M = () => {
|
|
325
|
-
c &&
|
|
325
|
+
c && x({
|
|
326
326
|
size: u ? c.offsetWidth : c.offsetHeight,
|
|
327
327
|
offset: u ? c.offsetLeft : c.offsetTop
|
|
328
328
|
});
|
|
@@ -350,8 +350,8 @@ var Ye = r.forwardRef((e, t) => {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
) : null;
|
|
353
|
-
}),
|
|
354
|
-
const { forceMount: n, ...o } = e, i = b(
|
|
353
|
+
}), L = "NavigationMenuContent", pe = r.forwardRef((e, t) => {
|
|
354
|
+
const { forceMount: n, ...o } = e, i = b(L, e.__scopeNavigationMenu), s = de(L, e.__scopeNavigationMenu), c = A(s.contentRef, t), d = s.value === i.value, l = {
|
|
355
355
|
value: s.value,
|
|
356
356
|
triggerRef: s.triggerRef,
|
|
357
357
|
focusProxyRef: s.focusProxyRef,
|
|
@@ -379,9 +379,9 @@ var Ye = r.forwardRef((e, t) => {
|
|
|
379
379
|
}
|
|
380
380
|
) });
|
|
381
381
|
});
|
|
382
|
-
pe.displayName =
|
|
382
|
+
pe.displayName = L;
|
|
383
383
|
var qe = r.forwardRef((e, t) => {
|
|
384
|
-
const n = b(
|
|
384
|
+
const n = b(L, e.__scopeNavigationMenu), { onViewportContentChange: o, onViewportContentRemove: i } = n;
|
|
385
385
|
return z(() => {
|
|
386
386
|
o(e.value, {
|
|
387
387
|
ref: t,
|
|
@@ -397,8 +397,8 @@ var qe = r.forwardRef((e, t) => {
|
|
|
397
397
|
wasEscapeCloseRef: c,
|
|
398
398
|
onRootContentClose: d,
|
|
399
399
|
onContentFocusOutside: l,
|
|
400
|
-
...
|
|
401
|
-
} = e, u = b(
|
|
400
|
+
...x
|
|
401
|
+
} = e, u = b(L, n), m = r.useRef(null), M = A(m, t), R = Ce(u.baseId, o), p = Me(u.baseId, o), w = ae(n), C = r.useRef(null), { onItemDismiss: y } = u;
|
|
402
402
|
r.useEffect(() => {
|
|
403
403
|
const f = m.current;
|
|
404
404
|
if (u.isRootMenu && f) {
|
|
@@ -411,25 +411,25 @@ var qe = r.forwardRef((e, t) => {
|
|
|
411
411
|
const I = r.useMemo(() => {
|
|
412
412
|
const g = w().map((_) => _.value);
|
|
413
413
|
u.dir === "rtl" && g.reverse();
|
|
414
|
-
const v = g.indexOf(u.value),
|
|
414
|
+
const v = g.indexOf(u.value), N = g.indexOf(u.previousValue), P = o === u.value, j = N === g.indexOf(o);
|
|
415
415
|
if (!P && !j) return C.current;
|
|
416
416
|
const h = (() => {
|
|
417
|
-
if (v !==
|
|
418
|
-
if (P &&
|
|
419
|
-
if (j && v !== -1) return v >
|
|
417
|
+
if (v !== N) {
|
|
418
|
+
if (P && N !== -1) return v > N ? "from-end" : "from-start";
|
|
419
|
+
if (j && v !== -1) return v > N ? "to-start" : "to-end";
|
|
420
420
|
}
|
|
421
421
|
return null;
|
|
422
422
|
})();
|
|
423
423
|
return C.current = h, h;
|
|
424
424
|
}, [u.previousValue, u.value, u.dir, w, o]);
|
|
425
|
-
return /* @__PURE__ */ a.jsx(
|
|
425
|
+
return /* @__PURE__ */ a.jsx(xe, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
426
426
|
ke,
|
|
427
427
|
{
|
|
428
428
|
id: p,
|
|
429
429
|
"aria-labelledby": R,
|
|
430
430
|
"data-motion": I,
|
|
431
431
|
"data-orientation": u.orientation,
|
|
432
|
-
...
|
|
432
|
+
...x,
|
|
433
433
|
ref: M,
|
|
434
434
|
disableOutsidePointerEvents: !1,
|
|
435
435
|
onDismiss: () => {
|
|
@@ -445,13 +445,13 @@ var qe = r.forwardRef((e, t) => {
|
|
|
445
445
|
u.rootNavigationMenu?.contains(g) && f.preventDefault();
|
|
446
446
|
}),
|
|
447
447
|
onPointerDownOutside: E(e.onPointerDownOutside, (f) => {
|
|
448
|
-
const g = f.target, v = w().some((P) => P.ref.current?.contains(g)),
|
|
449
|
-
(v ||
|
|
448
|
+
const g = f.target, v = w().some((P) => P.ref.current?.contains(g)), N = u.isRootMenu && u.viewport?.contains(g);
|
|
449
|
+
(v || N || !u.isRootMenu) && f.preventDefault();
|
|
450
450
|
}),
|
|
451
451
|
onKeyDown: E(e.onKeyDown, (f) => {
|
|
452
452
|
const g = f.altKey || f.ctrlKey || f.metaKey;
|
|
453
453
|
if (f.key === "Tab" && !g) {
|
|
454
|
-
const
|
|
454
|
+
const N = H(f.currentTarget), P = document.activeElement, j = N.findIndex((V) => V === P), _ = f.shiftKey ? N.slice(0, j).reverse() : N.slice(j + 1, N.length);
|
|
455
455
|
J(_) ? f.preventDefault() : s.current?.focus();
|
|
456
456
|
}
|
|
457
457
|
}),
|
|
@@ -460,18 +460,18 @@ var qe = r.forwardRef((e, t) => {
|
|
|
460
460
|
})
|
|
461
461
|
}
|
|
462
462
|
) });
|
|
463
|
-
}), X = "NavigationMenuViewport",
|
|
463
|
+
}), X = "NavigationMenuViewport", Ne = r.forwardRef((e, t) => {
|
|
464
464
|
const { forceMount: n, ...o } = e, s = !!b(X, e.__scopeNavigationMenu).value;
|
|
465
465
|
return /* @__PURE__ */ a.jsx(K, { present: n || s, children: /* @__PURE__ */ a.jsx(Xe, { ...o, ref: t }) });
|
|
466
466
|
});
|
|
467
|
-
|
|
467
|
+
Ne.displayName = X;
|
|
468
468
|
var Xe = r.forwardRef((e, t) => {
|
|
469
|
-
const { __scopeNavigationMenu: n, children: o, ...i } = e, s = b(X, n), c =
|
|
470
|
-
|
|
469
|
+
const { __scopeNavigationMenu: n, children: o, ...i } = e, s = b(X, n), c = A(t, s.onViewportChange), d = Ue(
|
|
470
|
+
L,
|
|
471
471
|
e.__scopeNavigationMenu
|
|
472
|
-
), [l,
|
|
472
|
+
), [l, x] = r.useState(null), [u, m] = r.useState(null), M = l ? l?.width + "px" : void 0, R = l ? l?.height + "px" : void 0, p = !!s.value, w = p ? s.value : s.previousValue;
|
|
473
473
|
return B(u, () => {
|
|
474
|
-
u &&
|
|
474
|
+
u && x({ width: u.offsetWidth, height: u.offsetHeight });
|
|
475
475
|
}), /* @__PURE__ */ a.jsx(
|
|
476
476
|
T.div,
|
|
477
477
|
{
|
|
@@ -494,15 +494,15 @@ var Xe = r.forwardRef((e, t) => {
|
|
|
494
494
|
we,
|
|
495
495
|
{
|
|
496
496
|
...g,
|
|
497
|
-
ref: Se(I, (
|
|
498
|
-
v &&
|
|
497
|
+
ref: Se(I, (N) => {
|
|
498
|
+
v && N && m(N);
|
|
499
499
|
})
|
|
500
500
|
}
|
|
501
501
|
) }, y);
|
|
502
502
|
})
|
|
503
503
|
}
|
|
504
504
|
);
|
|
505
|
-
}), Je = "FocusGroup",
|
|
505
|
+
}), Je = "FocusGroup", xe = r.forwardRef(
|
|
506
506
|
(e, t) => {
|
|
507
507
|
const { __scopeNavigationMenu: n, ...o } = e, i = b(Je, n);
|
|
508
508
|
return /* @__PURE__ */ a.jsx($.Provider, { scope: n, children: /* @__PURE__ */ a.jsx($.Slot, { scope: n, children: /* @__PURE__ */ a.jsx(T.div, { dir: i.dir, ...o, ref: t }) }) });
|
|
@@ -579,7 +579,7 @@ function Me(e, t) {
|
|
|
579
579
|
function F(e) {
|
|
580
580
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
581
581
|
}
|
|
582
|
-
var Re = ie, ye = ue, et = fe, Ee = ve, tt = me, be = ge, Te = pe, Ie =
|
|
582
|
+
var Re = ie, ye = ue, et = fe, Ee = ve, tt = me, be = ge, Te = pe, Ie = Ne;
|
|
583
583
|
const nt = r.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ a.jsxs(
|
|
584
584
|
Re,
|
|
585
585
|
{
|
|
@@ -592,7 +592,7 @@ const nt = r.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__
|
|
|
592
592
|
]
|
|
593
593
|
}
|
|
594
594
|
));
|
|
595
|
-
nt.displayName = Re
|
|
595
|
+
nt.displayName = Re?.displayName || "NavigationMenu";
|
|
596
596
|
const ot = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
597
597
|
ye,
|
|
598
598
|
{
|
|
@@ -601,7 +601,7 @@ const ot = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
601
601
|
...t
|
|
602
602
|
}
|
|
603
603
|
));
|
|
604
|
-
ot.displayName = ye
|
|
604
|
+
ot.displayName = ye?.displayName || "NavigationMenuList";
|
|
605
605
|
const bt = et, rt = Oe(
|
|
606
606
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
607
607
|
), at = r.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ a.jsxs(
|
|
@@ -623,7 +623,7 @@ const bt = et, rt = Oe(
|
|
|
623
623
|
]
|
|
624
624
|
}
|
|
625
625
|
));
|
|
626
|
-
at.displayName = Ee
|
|
626
|
+
at.displayName = Ee?.displayName || "NavigationMenuTrigger";
|
|
627
627
|
const it = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
628
628
|
Te,
|
|
629
629
|
{
|
|
@@ -635,7 +635,7 @@ const it = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
635
635
|
...t
|
|
636
636
|
}
|
|
637
637
|
));
|
|
638
|
-
it.displayName = Te
|
|
638
|
+
it.displayName = Te?.displayName || "NavigationMenuContent";
|
|
639
639
|
const Tt = tt, Pe = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx("div", { className: D("absolute top-full left-0 flex justify-center"), children: /* @__PURE__ */ a.jsx(
|
|
640
640
|
Ie,
|
|
641
641
|
{
|
|
@@ -647,7 +647,7 @@ const Tt = tt, Pe = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
|
647
647
|
...t
|
|
648
648
|
}
|
|
649
649
|
) }));
|
|
650
|
-
Pe.displayName = Ie
|
|
650
|
+
Pe.displayName = Ie?.displayName || "NavigationMenuViewport";
|
|
651
651
|
const st = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
652
652
|
be,
|
|
653
653
|
{
|
|
@@ -660,7 +660,7 @@ const st = r.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
660
660
|
children: /* @__PURE__ */ a.jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
661
661
|
}
|
|
662
662
|
));
|
|
663
|
-
st.displayName = be
|
|
663
|
+
st.displayName = be?.displayName || "NavigationMenuIndicator";
|
|
664
664
|
export {
|
|
665
665
|
nt as NavigationMenu,
|
|
666
666
|
it as NavigationMenuContent,
|
package/dist/pagination.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-nZSsnGb7.js"),r=require("lucide-react"),j=require("react"),d=require("./button.cjs"),i=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-nZSsnGb7.js"),r=require("lucide-react"),j=require("react"),d=require("./button.cjs"),i=require("./utils-cdbZV8DZ.js");function P(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=P(j),c=({className:e,...t})=>n.jsxRuntimeExports.jsx("nav",{role:"navigation","aria-label":"pagination",className:i.cn("mx-auto flex w-full justify-center",e),...t});c.displayName="Pagination";const u=l.forwardRef(({className:e,...t},a)=>n.jsxRuntimeExports.jsx("ul",{ref:a,className:i.cn("flex flex-row items-center gap-1",e),...t}));u.displayName="PaginationContent";const x=l.forwardRef(({className:e,...t},a)=>n.jsxRuntimeExports.jsx("li",{ref:a,className:i.cn("",e),...t}));x.displayName="PaginationItem";const o=({className:e,isActive:t,size:a="icon",...s})=>n.jsxRuntimeExports.jsx("a",{"aria-current":t?"page":void 0,className:i.cn(d.buttonVariants({variant:t?"outline":"ghost",size:a}),e),...s});o.displayName="PaginationLink";const p=({className:e,...t})=>n.jsxRuntimeExports.jsxs(o,{"aria-label":"Go to previous page",size:"default",className:i.cn("gap-1 pl-2.5",e),...t,children:[n.jsxRuntimeExports.jsx(r.ChevronLeft,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{children:"Previous"})]});p.displayName="PaginationPrevious";const m=({className:e,...t})=>n.jsxRuntimeExports.jsxs(o,{"aria-label":"Go to next page",size:"default",className:i.cn("gap-1 pr-2.5",e),...t,children:[n.jsxRuntimeExports.jsx("span",{children:"Next"}),n.jsxRuntimeExports.jsx(r.ChevronRight,{className:"h-4 w-4"})]});m.displayName="PaginationNext";const g=({className:e,...t})=>n.jsxRuntimeExports.jsxs("span",{"aria-hidden":!0,className:i.cn("flex h-9 w-9 items-center justify-center",e),...t,children:[n.jsxRuntimeExports.jsx(r.MoreHorizontal,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"More pages"})]});g.displayName="PaginationEllipsis";exports.Pagination=c;exports.PaginationContent=u;exports.PaginationEllipsis=g;exports.PaginationItem=x;exports.PaginationLink=o;exports.PaginationNext=m;exports.PaginationPrevious=p;
|
package/dist/pagination.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { j as s } from "./jsx-runtime-tc70JA_2.mjs";
|
|
|
3
3
|
import { MoreHorizontal as r, ChevronRight as m, ChevronLeft as c } from "lucide-react";
|
|
4
4
|
import * as o from "react";
|
|
5
5
|
import { buttonVariants as p } from "./button.mjs";
|
|
6
|
-
import { c as e } from "./utils-
|
|
6
|
+
import { c as e } from "./utils-DY6fhrgS.mjs";
|
|
7
7
|
const g = ({ className: i, ...a }) => /* @__PURE__ */ s.jsx(
|
|
8
8
|
"nav",
|
|
9
9
|
{
|
package/dist/popover.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),I=require("react"),u=require("./index-BtZvtDmp.js"),O=require("./index-_XxjJPRD.js"),H=require("./index-D2HnlO3y.js"),z=require("./index-BoNjHhm4.js"),h=require("./index-B8dxbSWX.js"),L=require("./index-CefEQe_4.js"),f=require("./index-jv3B4mTd.js"),G=require("./index-CwyAfCwY.js"),A=require("./index-B2XtpfGY.js"),K=require("./index-Ce5TOFAK.js"),U=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),I=require("react"),u=require("./index-BtZvtDmp.js"),O=require("./index-_XxjJPRD.js"),H=require("./index-D2HnlO3y.js"),z=require("./index-BoNjHhm4.js"),h=require("./index-B8dxbSWX.js"),L=require("./index-CefEQe_4.js"),f=require("./index-jv3B4mTd.js"),G=require("./index-CwyAfCwY.js"),A=require("./index-B2XtpfGY.js"),K=require("./index-Ce5TOFAK.js"),U=require("./utils-cdbZV8DZ.js");function V(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const c=V(I);var C="Popover",[_]=H.createContextScope(C,[f.createPopperScope]),m=f.createPopperScope(),[W,l]=_(C),b=e=>{const{__scopePopover:r,children:o,open:n,defaultOpen:t,onOpenChange:s,modal:i=!1}=e,p=m(r),x=c.useRef(null),[P,g]=c.useState(!1),[R,d]=K.useControllableState({prop:n,defaultProp:t??!1,onChange:s,caller:C});return a.jsxRuntimeExports.jsx(f.Root2,{...p,children:a.jsxRuntimeExports.jsx(W,{scope:r,contentId:L.useId(),triggerRef:x,open:R,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(j=>!j),[d]),hasCustomAnchor:P,onCustomAnchorAdd:c.useCallback(()=>g(!0),[]),onCustomAnchorRemove:c.useCallback(()=>g(!1),[]),modal:i,children:o})})};b.displayName=C;var w="PopoverAnchor",y=c.forwardRef((e,r)=>{const{__scopePopover:o,...n}=e,t=l(w,o),s=m(o),{onCustomAnchorAdd:i,onCustomAnchorRemove:p}=t;return c.useEffect(()=>(i(),()=>p()),[i,p]),a.jsxRuntimeExports.jsx(f.Anchor,{...s,...n,ref:r})});y.displayName=w;var N="PopoverTrigger",S=c.forwardRef((e,r)=>{const{__scopePopover:o,...n}=e,t=l(N,o),s=m(o),i=O.useComposedRefs(r,t.triggerRef),p=a.jsxRuntimeExports.jsx(u.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":t.open,"aria-controls":t.contentId,"data-state":k(t.open),...n,ref:i,onClick:u.composeEventHandlers(e.onClick,t.onOpenToggle)});return t.hasCustomAnchor?p:a.jsxRuntimeExports.jsx(f.Anchor,{asChild:!0,...s,children:p})});S.displayName=N;var E="PopoverPortal",[Z,B]=_(E,{forceMount:void 0}),F=e=>{const{__scopePopover:r,forceMount:o,children:n,container:t}=e,s=l(E,r);return a.jsxRuntimeExports.jsx(Z,{scope:r,forceMount:o,children:a.jsxRuntimeExports.jsx(A.Presence,{present:o||s.open,children:a.jsxRuntimeExports.jsx(G.Portal,{asChild:!0,container:t,children:n})})})};F.displayName=E;var v="PopoverContent",D=c.forwardRef((e,r)=>{const o=B(v,e.__scopePopover),{forceMount:n=o.forceMount,...t}=e,s=l(v,e.__scopePopover);return a.jsxRuntimeExports.jsx(A.Presence,{present:n||s.open,children:s.modal?a.jsxRuntimeExports.jsx(Q,{...t,ref:r}):a.jsxRuntimeExports.jsx(X,{...t,ref:r})})});D.displayName=v;var J=u.createSlot("PopoverContent.RemoveScroll"),Q=c.forwardRef((e,r)=>{const o=l(v,e.__scopePopover),n=c.useRef(null),t=O.useComposedRefs(r,n),s=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return h.hideOthers(i)},[]),a.jsxRuntimeExports.jsx(h.ReactRemoveScroll,{as:J,allowPinchZoom:!0,children:a.jsxRuntimeExports.jsx(M,{...e,ref:t,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:u.composeEventHandlers(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:u.composeEventHandlers(e.onPointerDownOutside,i=>{const p=i.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,P=p.button===2||x;s.current=P},{checkForDefaultPrevented:!1}),onFocusOutside:u.composeEventHandlers(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),X=c.forwardRef((e,r)=>{const o=l(v,e.__scopePopover),n=c.useRef(!1),t=c.useRef(!1);return a.jsxRuntimeExports.jsx(M,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||o.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,t.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(t.current=!0));const i=s.target;o.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&t.current&&s.preventDefault()}})}),M=c.forwardRef((e,r)=>{const{__scopePopover:o,trapFocus:n,onOpenAutoFocus:t,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:P,onInteractOutside:g,...R}=e,d=l(v,o),j=m(o);return h.useFocusGuards(),a.jsxRuntimeExports.jsx(h.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:t,onUnmountAutoFocus:s,children:a.jsxRuntimeExports.jsx(z.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:g,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:P,onDismiss:()=>d.onOpenChange(!1),children:a.jsxRuntimeExports.jsx(f.Content,{"data-state":k(d.open),role:"dialog",id:d.contentId,...j,...R,ref:r,style:{...R.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",Y=c.forwardRef((e,r)=>{const{__scopePopover:o,...n}=e,t=l(T,o);return a.jsxRuntimeExports.jsx(u.Primitive.button,{type:"button",...n,ref:r,onClick:u.composeEventHandlers(e.onClick,()=>t.onOpenChange(!1))})});Y.displayName=T;var ee="PopoverArrow",oe=c.forwardRef((e,r)=>{const{__scopePopover:o,...n}=e,t=m(o);return a.jsxRuntimeExports.jsx(f.Arrow,{...t,...n,ref:r})});oe.displayName=ee;function k(e){return e?"open":"closed"}var te=b,re=y,ne=S,se=F,q=D;const ae=te,ce=ne,ie=re,$=c.forwardRef(({className:e,align:r="center",sideOffset:o=4,...n},t)=>a.jsxRuntimeExports.jsx(se,{children:a.jsxRuntimeExports.jsx(q,{ref:t,align:r,sideOffset:o,className:U.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none",e),...n})}));$.displayName=q?.displayName||"PopoverContent";exports.Popover=ae;exports.PopoverAnchor=ie;exports.PopoverContent=$;exports.PopoverTrigger=ce;
|