@gv-tech/ui-web 2.15.2 → 2.17.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/README.md +1 -1
- 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 +52 -0
- package/dist/index.mjs +101 -95
- 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/scroll-to-top.cjs +1 -0
- package/dist/scroll-to-top.d.ts +12 -0
- package/dist/scroll-to-top.mjs +86 -0
- 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/support-fab.cjs +1 -0
- package/dist/support-fab.d.ts +20 -0
- package/dist/support-fab.mjs +120 -0
- 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 +12 -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/scroll-to-top.tsx +134 -0
- package/src/select.tsx +7 -7
- package/src/separator.tsx +1 -1
- package/src/setupTests.ts +1 -1
- package/src/sheet.tsx +4 -4
- package/src/slider.tsx +1 -1
- package/src/support-fab.tsx +190 -0
- 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/scroll-area.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as h } from "./jsx-runtime-tc70JA_2.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as c from "react";
|
|
4
4
|
import { P as L, c as C } from "./index-K9FzbxYw.mjs";
|
|
5
5
|
import { P as O } from "./index-vuPgkS0V.mjs";
|
|
6
6
|
import { c as ae } from "./index-IZ2gq03c.mjs";
|
|
7
|
-
import { u as
|
|
7
|
+
import { u as A } from "./index-DLcqcWxM.mjs";
|
|
8
8
|
import { u as P } from "./index-0ioNhtNM.mjs";
|
|
9
9
|
import { u as ie } from "./index-CD6_IrA-.mjs";
|
|
10
10
|
import { u as de } from "./index-CCKe-Mpx.mjs";
|
|
11
11
|
import { c as ue } from "./index-rKs9bXHr.mjs";
|
|
12
|
-
import { c as $ } from "./utils-
|
|
12
|
+
import { c as $ } from "./utils-DY6fhrgS.mjs";
|
|
13
13
|
function fe(e, o) {
|
|
14
|
-
return
|
|
14
|
+
return c.useReducer((r, n) => o[r][n] ?? r, e);
|
|
15
15
|
}
|
|
16
|
-
var U = "ScrollArea", [q] = ae(U), [he, p] = q(U), G =
|
|
16
|
+
var U = "ScrollArea", [q] = ae(U), [he, p] = q(U), G = c.forwardRef(
|
|
17
17
|
(e, o) => {
|
|
18
18
|
const {
|
|
19
19
|
__scopeScrollArea: r,
|
|
20
20
|
type: n = "hover",
|
|
21
21
|
dir: t,
|
|
22
22
|
scrollHideDelay: l = 600,
|
|
23
|
-
...
|
|
24
|
-
} = e, [a, i] =
|
|
23
|
+
...s
|
|
24
|
+
} = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [m, w] = c.useState(null), [T, Y] = c.useState(null), [x, _] = c.useState(0), [M, D] = c.useState(0), [j, y] = c.useState(!1), [N, W] = c.useState(!1), S = A(o, (R) => i(R)), v = ie(t);
|
|
25
25
|
return /* @__PURE__ */ h.jsx(
|
|
26
26
|
he,
|
|
27
27
|
{
|
|
@@ -38,7 +38,7 @@ var U = "ScrollArea", [q] = ae(U), [he, p] = q(U), G = s.forwardRef(
|
|
|
38
38
|
onScrollbarXChange: w,
|
|
39
39
|
scrollbarXEnabled: j,
|
|
40
40
|
onScrollbarXEnabledChange: y,
|
|
41
|
-
scrollbarY:
|
|
41
|
+
scrollbarY: T,
|
|
42
42
|
onScrollbarYChange: Y,
|
|
43
43
|
scrollbarYEnabled: N,
|
|
44
44
|
onScrollbarYEnabledChange: W,
|
|
@@ -48,7 +48,7 @@ var U = "ScrollArea", [q] = ae(U), [he, p] = q(U), G = s.forwardRef(
|
|
|
48
48
|
L.div,
|
|
49
49
|
{
|
|
50
50
|
dir: v,
|
|
51
|
-
...
|
|
51
|
+
...s,
|
|
52
52
|
ref: S,
|
|
53
53
|
style: {
|
|
54
54
|
position: "relative",
|
|
@@ -64,9 +64,9 @@ var U = "ScrollArea", [q] = ae(U), [he, p] = q(U), G = s.forwardRef(
|
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
G.displayName = U;
|
|
67
|
-
var J = "ScrollAreaViewport", K =
|
|
67
|
+
var J = "ScrollAreaViewport", K = c.forwardRef(
|
|
68
68
|
(e, o) => {
|
|
69
|
-
const { __scopeScrollArea: r, children: n, nonce: t, ...l } = e,
|
|
69
|
+
const { __scopeScrollArea: r, children: n, nonce: t, ...l } = e, s = p(J, r), a = c.useRef(null), i = A(o, a, s.onViewportChange);
|
|
70
70
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
71
71
|
/* @__PURE__ */ h.jsx(
|
|
72
72
|
"style",
|
|
@@ -95,36 +95,36 @@ var J = "ScrollAreaViewport", K = s.forwardRef(
|
|
|
95
95
|
* the browser from having to work out whether to render native scrollbars or not,
|
|
96
96
|
* we tell it to with the intention of hiding them in CSS.
|
|
97
97
|
*/
|
|
98
|
-
overflowX:
|
|
99
|
-
overflowY:
|
|
98
|
+
overflowX: s.scrollbarXEnabled ? "scroll" : "hidden",
|
|
99
|
+
overflowY: s.scrollbarYEnabled ? "scroll" : "hidden",
|
|
100
100
|
...e.style
|
|
101
101
|
},
|
|
102
|
-
children: /* @__PURE__ */ h.jsx("div", { ref:
|
|
102
|
+
children: /* @__PURE__ */ h.jsx("div", { ref: s.onContentChange, style: { minWidth: "100%", display: "table" }, children: n })
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
] });
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
108
|
K.displayName = J;
|
|
109
|
-
var g = "ScrollAreaScrollbar",
|
|
109
|
+
var g = "ScrollAreaScrollbar", B = c.forwardRef(
|
|
110
110
|
(e, o) => {
|
|
111
|
-
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: l, onScrollbarYEnabledChange:
|
|
112
|
-
return
|
|
113
|
-
a ? l(!1) :
|
|
114
|
-
}), [a, l,
|
|
111
|
+
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: l, onScrollbarYEnabledChange: s } = t, a = e.orientation === "horizontal";
|
|
112
|
+
return c.useEffect(() => (a ? l(!0) : s(!0), () => {
|
|
113
|
+
a ? l(!1) : s(!1);
|
|
114
|
+
}), [a, l, s]), t.type === "hover" ? /* @__PURE__ */ h.jsx(be, { ...n, ref: o, forceMount: r }) : t.type === "scroll" ? /* @__PURE__ */ h.jsx(me, { ...n, ref: o, forceMount: r }) : t.type === "auto" ? /* @__PURE__ */ h.jsx(Q, { ...n, ref: o, forceMount: r }) : t.type === "always" ? /* @__PURE__ */ h.jsx(V, { ...n, ref: o }) : null;
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
|
-
|
|
118
|
-
var be =
|
|
119
|
-
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), [l,
|
|
120
|
-
return
|
|
117
|
+
B.displayName = g;
|
|
118
|
+
var be = c.forwardRef((e, o) => {
|
|
119
|
+
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), [l, s] = c.useState(!1);
|
|
120
|
+
return c.useEffect(() => {
|
|
121
121
|
const a = t.scrollArea;
|
|
122
122
|
let i = 0;
|
|
123
123
|
if (a) {
|
|
124
124
|
const f = () => {
|
|
125
|
-
window.clearTimeout(i),
|
|
125
|
+
window.clearTimeout(i), s(!0);
|
|
126
126
|
}, d = () => {
|
|
127
|
-
i = window.setTimeout(() =>
|
|
127
|
+
i = window.setTimeout(() => s(!1), t.scrollHideDelay);
|
|
128
128
|
};
|
|
129
129
|
return a.addEventListener("pointerenter", f), a.addEventListener("pointerleave", d), () => {
|
|
130
130
|
window.clearTimeout(i), a.removeEventListener("pointerenter", f), a.removeEventListener("pointerleave", d);
|
|
@@ -138,8 +138,8 @@ var be = s.forwardRef((e, o) => {
|
|
|
138
138
|
ref: o
|
|
139
139
|
}
|
|
140
140
|
) });
|
|
141
|
-
}), me =
|
|
142
|
-
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), l = e.orientation === "horizontal",
|
|
141
|
+
}), me = c.forwardRef((e, o) => {
|
|
142
|
+
const { forceMount: r, ...n } = e, t = p(g, e.__scopeScrollArea), l = e.orientation === "horizontal", s = X(() => i("SCROLL_END"), 100), [a, i] = fe("hidden", {
|
|
143
143
|
hidden: {
|
|
144
144
|
SCROLL: "scrolling"
|
|
145
145
|
},
|
|
@@ -157,23 +157,23 @@ var be = s.forwardRef((e, o) => {
|
|
|
157
157
|
POINTER_ENTER: "interacting"
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
return
|
|
160
|
+
return c.useEffect(() => {
|
|
161
161
|
if (a === "idle") {
|
|
162
162
|
const f = window.setTimeout(() => i("HIDE"), t.scrollHideDelay);
|
|
163
163
|
return () => window.clearTimeout(f);
|
|
164
164
|
}
|
|
165
|
-
}, [a, t.scrollHideDelay, i]),
|
|
165
|
+
}, [a, t.scrollHideDelay, i]), c.useEffect(() => {
|
|
166
166
|
const f = t.viewport, d = l ? "scrollLeft" : "scrollTop";
|
|
167
167
|
if (f) {
|
|
168
168
|
let b = f[d];
|
|
169
169
|
const u = () => {
|
|
170
170
|
const m = f[d];
|
|
171
|
-
b !== m && (i("SCROLL"),
|
|
171
|
+
b !== m && (i("SCROLL"), s()), b = m;
|
|
172
172
|
};
|
|
173
173
|
return f.addEventListener("scroll", u), () => f.removeEventListener("scroll", u);
|
|
174
174
|
}
|
|
175
|
-
}, [t.viewport, l, i,
|
|
176
|
-
|
|
175
|
+
}, [t.viewport, l, i, s]), /* @__PURE__ */ h.jsx(O, { present: r || a !== "hidden", children: /* @__PURE__ */ h.jsx(
|
|
176
|
+
V,
|
|
177
177
|
{
|
|
178
178
|
"data-state": a === "hidden" ? "hidden" : "visible",
|
|
179
179
|
...n,
|
|
@@ -182,23 +182,23 @@ var be = s.forwardRef((e, o) => {
|
|
|
182
182
|
onPointerLeave: C(e.onPointerLeave, () => i("POINTER_LEAVE"))
|
|
183
183
|
}
|
|
184
184
|
) });
|
|
185
|
-
}), Q =
|
|
186
|
-
const r = p(g, e.__scopeScrollArea), { forceMount: n, ...t } = e, [l,
|
|
185
|
+
}), Q = c.forwardRef((e, o) => {
|
|
186
|
+
const r = p(g, e.__scopeScrollArea), { forceMount: n, ...t } = e, [l, s] = c.useState(!1), a = e.orientation === "horizontal", i = X(() => {
|
|
187
187
|
if (r.viewport) {
|
|
188
188
|
const f = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
189
|
-
|
|
189
|
+
s(a ? f : d);
|
|
190
190
|
}
|
|
191
191
|
}, 10);
|
|
192
192
|
return E(r.viewport, i), E(r.content, i), /* @__PURE__ */ h.jsx(O, { present: n || l, children: /* @__PURE__ */ h.jsx(
|
|
193
|
-
|
|
193
|
+
V,
|
|
194
194
|
{
|
|
195
195
|
"data-state": l ? "visible" : "hidden",
|
|
196
196
|
...t,
|
|
197
197
|
ref: o
|
|
198
198
|
}
|
|
199
199
|
) });
|
|
200
|
-
}),
|
|
201
|
-
const { orientation: r = "vertical", ...n } = e, t = p(g, e.__scopeScrollArea), l =
|
|
200
|
+
}), V = c.forwardRef((e, o) => {
|
|
201
|
+
const { orientation: r = "vertical", ...n } = e, t = p(g, e.__scopeScrollArea), l = c.useRef(null), s = c.useRef(0), [a, i] = c.useState({
|
|
202
202
|
content: 0,
|
|
203
203
|
viewport: 0,
|
|
204
204
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -208,11 +208,11 @@ var be = s.forwardRef((e, o) => {
|
|
|
208
208
|
onSizesChange: i,
|
|
209
209
|
hasThumb: f > 0 && f < 1,
|
|
210
210
|
onThumbChange: (u) => l.current = u,
|
|
211
|
-
onThumbPointerUp: () =>
|
|
212
|
-
onThumbPointerDown: (u) =>
|
|
211
|
+
onThumbPointerUp: () => s.current = 0,
|
|
212
|
+
onThumbPointerDown: (u) => s.current = u
|
|
213
213
|
};
|
|
214
214
|
function b(u, m) {
|
|
215
|
-
return xe(u,
|
|
215
|
+
return xe(u, s.current, a, m);
|
|
216
216
|
}
|
|
217
217
|
return r === "horizontal" ? /* @__PURE__ */ h.jsx(
|
|
218
218
|
Se,
|
|
@@ -251,9 +251,9 @@ var be = s.forwardRef((e, o) => {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
) : null;
|
|
254
|
-
}), Se =
|
|
255
|
-
const { sizes: r, onSizesChange: n, ...t } = e, l = p(g, e.__scopeScrollArea), [
|
|
256
|
-
return
|
|
254
|
+
}), Se = c.forwardRef((e, o) => {
|
|
255
|
+
const { sizes: r, onSizesChange: n, ...t } = e, l = p(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(o, i, l.onScrollbarXChange);
|
|
256
|
+
return c.useEffect(() => {
|
|
257
257
|
i.current && a(getComputedStyle(i.current));
|
|
258
258
|
}, [i]), /* @__PURE__ */ h.jsx(
|
|
259
259
|
ee,
|
|
@@ -278,21 +278,21 @@ var be = s.forwardRef((e, o) => {
|
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
onResize: () => {
|
|
281
|
-
i.current && l.viewport &&
|
|
281
|
+
i.current && l.viewport && s && n({
|
|
282
282
|
content: l.viewport.scrollWidth,
|
|
283
283
|
viewport: l.viewport.offsetWidth,
|
|
284
284
|
scrollbar: {
|
|
285
285
|
size: i.current.clientWidth,
|
|
286
|
-
paddingStart: z(
|
|
287
|
-
paddingEnd: z(
|
|
286
|
+
paddingStart: z(s.paddingLeft),
|
|
287
|
+
paddingEnd: z(s.paddingRight)
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
|
-
}), pe =
|
|
294
|
-
const { sizes: r, onSizesChange: n, ...t } = e, l = p(g, e.__scopeScrollArea), [
|
|
295
|
-
return
|
|
293
|
+
}), pe = c.forwardRef((e, o) => {
|
|
294
|
+
const { sizes: r, onSizesChange: n, ...t } = e, l = p(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(o, i, l.onScrollbarYChange);
|
|
295
|
+
return c.useEffect(() => {
|
|
296
296
|
i.current && a(getComputedStyle(i.current));
|
|
297
297
|
}, [i]), /* @__PURE__ */ h.jsx(
|
|
298
298
|
ee,
|
|
@@ -318,52 +318,52 @@ var be = s.forwardRef((e, o) => {
|
|
|
318
318
|
}
|
|
319
319
|
},
|
|
320
320
|
onResize: () => {
|
|
321
|
-
i.current && l.viewport &&
|
|
321
|
+
i.current && l.viewport && s && n({
|
|
322
322
|
content: l.viewport.scrollHeight,
|
|
323
323
|
viewport: l.viewport.offsetHeight,
|
|
324
324
|
scrollbar: {
|
|
325
325
|
size: i.current.clientHeight,
|
|
326
|
-
paddingStart: z(
|
|
327
|
-
paddingEnd: z(
|
|
326
|
+
paddingStart: z(s.paddingTop),
|
|
327
|
+
paddingEnd: z(s.paddingBottom)
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
|
-
}), [ve, Z] = q(g), ee =
|
|
333
|
+
}), [ve, Z] = q(g), ee = c.forwardRef((e, o) => {
|
|
334
334
|
const {
|
|
335
335
|
__scopeScrollArea: r,
|
|
336
336
|
sizes: n,
|
|
337
337
|
hasThumb: t,
|
|
338
338
|
onThumbChange: l,
|
|
339
|
-
onThumbPointerUp:
|
|
339
|
+
onThumbPointerUp: s,
|
|
340
340
|
onThumbPointerDown: a,
|
|
341
341
|
onThumbPositionChange: i,
|
|
342
342
|
onDragScroll: f,
|
|
343
343
|
onWheelScroll: d,
|
|
344
344
|
onResize: b,
|
|
345
345
|
...u
|
|
346
|
-
} = e, m = p(g, r), [w,
|
|
346
|
+
} = e, m = p(g, r), [w, T] = c.useState(null), Y = A(o, (S) => T(S)), x = c.useRef(null), _ = c.useRef(""), M = m.viewport, D = n.content - n.viewport, j = P(d), y = P(i), N = X(b, 10);
|
|
347
347
|
function W(S) {
|
|
348
348
|
if (x.current) {
|
|
349
349
|
const v = S.clientX - x.current.left, R = S.clientY - x.current.top;
|
|
350
350
|
f({ x: v, y: R });
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
return
|
|
353
|
+
return c.useEffect(() => {
|
|
354
354
|
const S = (v) => {
|
|
355
355
|
const R = v.target;
|
|
356
356
|
w?.contains(R) && j(v, D);
|
|
357
357
|
};
|
|
358
358
|
return document.addEventListener("wheel", S, { passive: !1 }), () => document.removeEventListener("wheel", S, { passive: !1 });
|
|
359
|
-
}, [M, w, D, j]),
|
|
359
|
+
}, [M, w, D, j]), c.useEffect(y, [n, y]), E(w, N), E(m.content, N), /* @__PURE__ */ h.jsx(
|
|
360
360
|
ve,
|
|
361
361
|
{
|
|
362
362
|
scope: r,
|
|
363
363
|
scrollbar: w,
|
|
364
364
|
hasThumb: t,
|
|
365
365
|
onThumbChange: P(l),
|
|
366
|
-
onThumbPointerUp: P(
|
|
366
|
+
onThumbPointerUp: P(s),
|
|
367
367
|
onThumbPositionChange: y,
|
|
368
368
|
onThumbPointerDown: P(a),
|
|
369
369
|
children: /* @__PURE__ */ h.jsx(
|
|
@@ -384,20 +384,20 @@ var be = s.forwardRef((e, o) => {
|
|
|
384
384
|
)
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
|
-
}), H = "ScrollAreaThumb", re =
|
|
387
|
+
}), H = "ScrollAreaThumb", re = c.forwardRef(
|
|
388
388
|
(e, o) => {
|
|
389
389
|
const { forceMount: r, ...n } = e, t = Z(H, e.__scopeScrollArea);
|
|
390
390
|
return /* @__PURE__ */ h.jsx(O, { present: r || t.hasThumb, children: /* @__PURE__ */ h.jsx(we, { ref: o, ...n }) });
|
|
391
391
|
}
|
|
392
|
-
), we =
|
|
392
|
+
), we = c.forwardRef(
|
|
393
393
|
(e, o) => {
|
|
394
|
-
const { __scopeScrollArea: r, style: n, ...t } = e, l = p(H, r),
|
|
394
|
+
const { __scopeScrollArea: r, style: n, ...t } = e, l = p(H, r), s = Z(H, r), { onThumbPositionChange: a } = s, i = A(
|
|
395
395
|
o,
|
|
396
|
-
(b) =>
|
|
397
|
-
), f =
|
|
396
|
+
(b) => s.onThumbChange(b)
|
|
397
|
+
), f = c.useRef(void 0), d = X(() => {
|
|
398
398
|
f.current && (f.current(), f.current = void 0);
|
|
399
399
|
}, 100);
|
|
400
|
-
return
|
|
400
|
+
return c.useEffect(() => {
|
|
401
401
|
const b = l.viewport;
|
|
402
402
|
if (b) {
|
|
403
403
|
const u = () => {
|
|
@@ -411,7 +411,7 @@ var be = s.forwardRef((e, o) => {
|
|
|
411
411
|
}, [l.viewport, d, a]), /* @__PURE__ */ h.jsx(
|
|
412
412
|
L.div,
|
|
413
413
|
{
|
|
414
|
-
"data-state":
|
|
414
|
+
"data-state": s.hasThumb ? "visible" : "hidden",
|
|
415
415
|
...t,
|
|
416
416
|
ref: i,
|
|
417
417
|
style: {
|
|
@@ -420,30 +420,30 @@ var be = s.forwardRef((e, o) => {
|
|
|
420
420
|
...n
|
|
421
421
|
},
|
|
422
422
|
onPointerDownCapture: C(e.onPointerDownCapture, (b) => {
|
|
423
|
-
const m = b.target.getBoundingClientRect(), w = b.clientX - m.left,
|
|
424
|
-
|
|
423
|
+
const m = b.target.getBoundingClientRect(), w = b.clientX - m.left, T = b.clientY - m.top;
|
|
424
|
+
s.onThumbPointerDown({ x: w, y: T });
|
|
425
425
|
}),
|
|
426
|
-
onPointerUp: C(e.onPointerUp,
|
|
426
|
+
onPointerUp: C(e.onPointerUp, s.onThumbPointerUp)
|
|
427
427
|
}
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
);
|
|
431
431
|
re.displayName = H;
|
|
432
|
-
var k = "ScrollAreaCorner", oe =
|
|
432
|
+
var k = "ScrollAreaCorner", oe = c.forwardRef(
|
|
433
433
|
(e, o) => {
|
|
434
434
|
const r = p(k, e.__scopeScrollArea), n = !!(r.scrollbarX && r.scrollbarY);
|
|
435
435
|
return r.type !== "scroll" && n ? /* @__PURE__ */ h.jsx(ge, { ...e, ref: o }) : null;
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
438
|
oe.displayName = k;
|
|
439
|
-
var ge =
|
|
440
|
-
const { __scopeScrollArea: r, ...n } = e, t = p(k, r), [l,
|
|
439
|
+
var ge = c.forwardRef((e, o) => {
|
|
440
|
+
const { __scopeScrollArea: r, ...n } = e, t = p(k, r), [l, s] = c.useState(0), [a, i] = c.useState(0), f = !!(l && a);
|
|
441
441
|
return E(t.scrollbarX, () => {
|
|
442
442
|
const d = t.scrollbarX?.offsetHeight || 0;
|
|
443
443
|
t.onCornerHeightChange(d), i(d);
|
|
444
444
|
}), E(t.scrollbarY, () => {
|
|
445
445
|
const d = t.scrollbarY?.offsetWidth || 0;
|
|
446
|
-
t.onCornerWidthChange(d),
|
|
446
|
+
t.onCornerWidthChange(d), s(d);
|
|
447
447
|
}), f ? /* @__PURE__ */ h.jsx(
|
|
448
448
|
L.div,
|
|
449
449
|
{
|
|
@@ -473,12 +473,12 @@ function I(e) {
|
|
|
473
473
|
return Math.max(n, 18);
|
|
474
474
|
}
|
|
475
475
|
function xe(e, o, r, n = "ltr") {
|
|
476
|
-
const t = I(r), l = t / 2,
|
|
476
|
+
const t = I(r), l = t / 2, s = o || l, a = t - s, i = r.scrollbar.paddingStart + s, f = r.scrollbar.size - r.scrollbar.paddingEnd - a, d = r.content - r.viewport, b = n === "ltr" ? [0, d] : [d * -1, 0];
|
|
477
477
|
return ne([i, f], b)(e);
|
|
478
478
|
}
|
|
479
479
|
function F(e, o, r = "ltr") {
|
|
480
|
-
const n = I(o), t = o.scrollbar.paddingStart + o.scrollbar.paddingEnd, l = o.scrollbar.size - t,
|
|
481
|
-
return ne([0,
|
|
480
|
+
const n = I(o), t = o.scrollbar.paddingStart + o.scrollbar.paddingEnd, l = o.scrollbar.size - t, s = o.content - o.viewport, a = l - n, i = r === "ltr" ? [0, s] : [s * -1, 0], f = ue(e, i);
|
|
481
|
+
return ne([0, s], [0, a])(f);
|
|
482
482
|
}
|
|
483
483
|
function ne(e, o) {
|
|
484
484
|
return (r) => {
|
|
@@ -494,13 +494,13 @@ var Pe = (e, o = () => {
|
|
|
494
494
|
}) => {
|
|
495
495
|
let r = { left: e.scrollLeft, top: e.scrollTop }, n = 0;
|
|
496
496
|
return (function t() {
|
|
497
|
-
const l = { left: e.scrollLeft, top: e.scrollTop },
|
|
498
|
-
(
|
|
497
|
+
const l = { left: e.scrollLeft, top: e.scrollTop }, s = r.left !== l.left, a = r.top !== l.top;
|
|
498
|
+
(s || a) && o(), r = l, n = window.requestAnimationFrame(t);
|
|
499
499
|
})(), () => window.cancelAnimationFrame(n);
|
|
500
500
|
};
|
|
501
501
|
function X(e, o) {
|
|
502
|
-
const r = P(e), n =
|
|
503
|
-
return
|
|
502
|
+
const r = P(e), n = c.useRef(0);
|
|
503
|
+
return c.useEffect(() => () => window.clearTimeout(n.current), []), c.useCallback(() => {
|
|
504
504
|
window.clearTimeout(n.current), n.current = window.setTimeout(r, o);
|
|
505
505
|
}, [r, o]);
|
|
506
506
|
}
|
|
@@ -518,15 +518,15 @@ function E(e, o) {
|
|
|
518
518
|
}
|
|
519
519
|
}, [e, r]);
|
|
520
520
|
}
|
|
521
|
-
var
|
|
522
|
-
const Ee =
|
|
521
|
+
var ce = G, Ce = K, Re = oe;
|
|
522
|
+
const Ee = c.forwardRef(({ className: e, children: o, ...r }, n) => /* @__PURE__ */ h.jsxs(ce, { ref: n, className: $("relative overflow-hidden", e), ...r, children: [
|
|
523
523
|
/* @__PURE__ */ h.jsx(Ce, { className: "h-full w-full rounded-[inherit]", children: o }),
|
|
524
|
-
/* @__PURE__ */ h.jsx(
|
|
524
|
+
/* @__PURE__ */ h.jsx(se, {}),
|
|
525
525
|
/* @__PURE__ */ h.jsx(Re, {})
|
|
526
526
|
] }));
|
|
527
|
-
Ee.displayName =
|
|
528
|
-
const
|
|
529
|
-
|
|
527
|
+
Ee.displayName = ce?.displayName || "ScrollArea";
|
|
528
|
+
const se = c.forwardRef(({ className: e, orientation: o = "vertical", ...r }, n) => /* @__PURE__ */ h.jsx(
|
|
529
|
+
B,
|
|
530
530
|
{
|
|
531
531
|
ref: n,
|
|
532
532
|
orientation: o,
|
|
@@ -540,8 +540,8 @@ const ce = s.forwardRef(({ className: e, orientation: o = "vertical", ...r }, n)
|
|
|
540
540
|
children: /* @__PURE__ */ h.jsx(re, { className: "bg-border relative flex-1 rounded-full" })
|
|
541
541
|
}
|
|
542
542
|
));
|
|
543
|
-
|
|
543
|
+
se.displayName = B?.displayName || "ScrollBar";
|
|
544
544
|
export {
|
|
545
545
|
Ee as ScrollArea,
|
|
546
|
-
|
|
546
|
+
se as ScrollBar
|
|
547
547
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),E=require("lucide-react"),R=require("react"),S=require("./button.cjs"),O=require("./utils-cdbZV8DZ.js");function T(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const l=T(R),N=e=>typeof e.scrollY=="number",m=e=>N(e)?e.scrollY:e.scrollTop;function q({threshold:e=240,exitDuration:i=450,behavior:n="smooth",scrollTarget:t,className:x,label:b="Scroll to top",onClick:y,tabIndex:v,type:g,...h}){const[_,u]=l.useState(!1),[c,f]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>{const o=t===void 0?window:t;if(!o){u(!1);return}const r=()=>{const p=m(o);if(c){p<=e&&(u(!1),f(!1));return}u(p>e)};return r(),o.addEventListener("scroll",r,{passive:!0}),()=>{o.removeEventListener("scroll",r)}},[c,t,e]),l.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]);const s=c?"exiting":_?"visible":"hidden",j=o=>{if(y?.(o),o.defaultPrevented||c)return;const r=t===void 0?window:t;if(!r)return;f(!0);const p=Math.max(0,i);d.current=window.setTimeout(()=>{r.scrollTo({top:0,behavior:n});const w=m(r);u(!1),w<=e&&f(!1)},p)};return a.jsxRuntimeExports.jsxs(S.Button,{"aria-label":b,"data-state":s,type:g??"button",variant:"default",size:"icon",tabIndex:s==="hidden"?-1:v,className:O.cn("group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80","hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95",s==="visible"&&"translate-y-0 scale-100 opacity-100",s==="hidden"&&"pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none",s==="exiting"&&"pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none",x),onClick:j,...h,children:[a.jsxRuntimeExports.jsx("span",{className:"bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100"}),a.jsxRuntimeExports.jsx("span",{className:"border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100"}),a.jsxRuntimeExports.jsx(E.ArrowUp,{className:"relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:b})]})}exports.ScrollToTop=q;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { ScrollToTopBaseProps } from '../../ui-core/src';
|
|
4
|
+
|
|
5
|
+
export declare function ScrollToTop({ threshold, exitDuration, behavior, scrollTarget, className, label, onClick, tabIndex, type, ...props }: ScrollToTopProps): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare interface ScrollToTopProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, ScrollToTopBaseProps {
|
|
8
|
+
/** Optional custom scroll container; defaults to window when undefined. */
|
|
9
|
+
scrollTarget?: Window | HTMLElement | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { }
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime-tc70JA_2.mjs";
|
|
3
|
+
import { ArrowUp as E } from "lucide-react";
|
|
4
|
+
import * as s from "react";
|
|
5
|
+
import { Button as N } from "./button.mjs";
|
|
6
|
+
import { c as S } from "./utils-DY6fhrgS.mjs";
|
|
7
|
+
const R = (e) => typeof e.scrollY == "number", d = (e) => R(e) ? e.scrollY : e.scrollTop;
|
|
8
|
+
function k({
|
|
9
|
+
threshold: e = 240,
|
|
10
|
+
exitDuration: m = 450,
|
|
11
|
+
behavior: b = "smooth",
|
|
12
|
+
scrollTarget: r,
|
|
13
|
+
className: v,
|
|
14
|
+
label: p = "Scroll to top",
|
|
15
|
+
onClick: x,
|
|
16
|
+
tabIndex: y,
|
|
17
|
+
type: g,
|
|
18
|
+
...h
|
|
19
|
+
}) {
|
|
20
|
+
const [w, a] = s.useState(!1), [l, u] = s.useState(!1), f = s.useRef(null);
|
|
21
|
+
s.useEffect(() => {
|
|
22
|
+
const t = r === void 0 ? window : r;
|
|
23
|
+
if (!t) {
|
|
24
|
+
a(!1);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const o = () => {
|
|
28
|
+
const c = d(t);
|
|
29
|
+
if (l) {
|
|
30
|
+
c <= e && (a(!1), u(!1));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
a(c > e);
|
|
34
|
+
};
|
|
35
|
+
return o(), t.addEventListener("scroll", o, { passive: !0 }), () => {
|
|
36
|
+
t.removeEventListener("scroll", o);
|
|
37
|
+
};
|
|
38
|
+
}, [l, r, e]), s.useEffect(() => () => {
|
|
39
|
+
f.current !== null && window.clearTimeout(f.current);
|
|
40
|
+
}, []);
|
|
41
|
+
const i = l ? "exiting" : w ? "visible" : "hidden", _ = (t) => {
|
|
42
|
+
if (x?.(t), t.defaultPrevented || l)
|
|
43
|
+
return;
|
|
44
|
+
const o = r === void 0 ? window : r;
|
|
45
|
+
if (!o)
|
|
46
|
+
return;
|
|
47
|
+
u(!0);
|
|
48
|
+
const c = Math.max(0, m);
|
|
49
|
+
f.current = window.setTimeout(() => {
|
|
50
|
+
o.scrollTo({ top: 0, behavior: b });
|
|
51
|
+
const j = d(o);
|
|
52
|
+
a(!1), j <= e && u(!1);
|
|
53
|
+
}, c);
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ n.jsxs(
|
|
56
|
+
N,
|
|
57
|
+
{
|
|
58
|
+
"aria-label": p,
|
|
59
|
+
"data-state": i,
|
|
60
|
+
type: g ?? "button",
|
|
61
|
+
variant: "default",
|
|
62
|
+
size: "icon",
|
|
63
|
+
tabIndex: i === "hidden" ? -1 : y,
|
|
64
|
+
className: S(
|
|
65
|
+
"group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
66
|
+
"before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80",
|
|
67
|
+
"hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95",
|
|
68
|
+
i === "visible" && "translate-y-0 scale-100 opacity-100",
|
|
69
|
+
i === "hidden" && "pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none",
|
|
70
|
+
i === "exiting" && "pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none",
|
|
71
|
+
v
|
|
72
|
+
),
|
|
73
|
+
onClick: _,
|
|
74
|
+
...h,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ n.jsx("span", { className: "bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100" }),
|
|
77
|
+
/* @__PURE__ */ n.jsx("span", { className: "border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100" }),
|
|
78
|
+
/* @__PURE__ */ n.jsx(E, { className: "relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]" }),
|
|
79
|
+
/* @__PURE__ */ n.jsx("span", { className: "sr-only", children: p })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
k as ScrollToTop
|
|
86
|
+
};
|
package/dist/search.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),p=require("lucide-react"),h=require("react"),j=require("./button.cjs"),g=require("./command.cjs"),u=require("./utils-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./jsx-runtime-nZSsnGb7.js"),p=require("lucide-react"),h=require("react"),j=require("./button.cjs"),g=require("./command.cjs"),u=require("./utils-cdbZV8DZ.js");function y(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const d=y(h);function b({children:t,open:s,onOpenChange:e}){const[r,x]=d.useState(!1),a=s!==void 0,i=a?s:r,l=d.useCallback(o=>{let n;typeof o=="function"?n=o(i):n=o,a?e?.(n):x(n)},[a,i,e]);return d.useEffect(()=>{const o=n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),l(f=>!f))};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[l]),c.jsxRuntimeExports.jsx(g.CommandDialog,{open:i,onOpenChange:l,children:t})}const m=d.forwardRef(({className:t,placeholder:s,variant:e="default",responsive:r=!1,...x},a)=>{const l=s||(e==="compact"?"Search...":"Search docs...");return c.jsxRuntimeExports.jsxs(j.Button,{variant:"outline",className:u.cn("text-muted-foreground relative h-9 text-sm transition-all transition-colors",e==="default"?"w-full justify-start pr-12":u.cn("w-9 justify-center px-0",r&&"2xl:w-48 2xl:justify-start 2xl:px-3 2xl:pr-12"),t),ref:a,...x,children:[c.jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsxRuntimeExports.jsx(p.Search,{className:"h-4 w-4 shrink-0"}),c.jsxRuntimeExports.jsx("span",{className:u.cn("truncate",e==="compact"&&(r?"hidden 2xl:inline":"hidden")),children:l})]}),c.jsxRuntimeExports.jsxs("kbd",{className:u.cn("bg-muted pointer-events-none absolute top-1.5 right-1.5 hidden h-6 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none",e==="default"&&"sm:flex",e==="compact"&&r&&"2xl:flex"),children:[c.jsxRuntimeExports.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]})});m.displayName="SearchTrigger";exports.Search=b;exports.SearchTrigger=m;
|
package/dist/search.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { Search as u } from "lucide-react";
|
|
|
4
4
|
import * as d from "react";
|
|
5
5
|
import { Button as x } from "./button.mjs";
|
|
6
6
|
import { CommandDialog as h } from "./command.mjs";
|
|
7
|
-
import { c as i } from "./utils-
|
|
7
|
+
import { c as i } from "./utils-DY6fhrgS.mjs";
|
|
8
8
|
function N({ children: m, open: l, onOpenChange: t }) {
|
|
9
9
|
const [o, f] = d.useState(!1), r = l !== void 0, c = r ? l : o, a = d.useCallback(
|
|
10
10
|
(s) => {
|