@gv-tech/ui-web 2.19.0 → 2.21.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-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
package/dist/scroll-to-top.mjs
CHANGED
|
@@ -1,86 +1,73 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Button as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
);
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
4
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
5
|
+
import { Button as n } from "./button.mjs";
|
|
6
|
+
import * as r from "react";
|
|
7
|
+
import { ArrowUp as i } from "lucide-react";
|
|
8
|
+
//#region src/scroll-to-top.tsx
|
|
9
|
+
var a = e(), o = (e) => typeof e.scrollY == "number", s = (e) => o(e) ? e.scrollY : e.scrollTop;
|
|
10
|
+
function c({ threshold: e = 240, exitDuration: o = 450, behavior: c = "smooth", scrollTarget: l, className: u, label: d = "Scroll to top", onClick: f, tabIndex: p, type: m, ...h }) {
|
|
11
|
+
let [g, _] = r.useState(!1), [v, y] = r.useState(!1), b = r.useRef(null);
|
|
12
|
+
r.useEffect(() => {
|
|
13
|
+
let t = l === void 0 ? window : l;
|
|
14
|
+
if (!t) {
|
|
15
|
+
_(!1);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let n = () => {
|
|
19
|
+
let n = s(t);
|
|
20
|
+
if (v) {
|
|
21
|
+
n <= e && (_(!1), y(!1));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
_(n > e);
|
|
25
|
+
};
|
|
26
|
+
return n(), t.addEventListener("scroll", n, { passive: !0 }), () => {
|
|
27
|
+
t.removeEventListener("scroll", n);
|
|
28
|
+
};
|
|
29
|
+
}, [
|
|
30
|
+
v,
|
|
31
|
+
l,
|
|
32
|
+
e
|
|
33
|
+
]), r.useEffect(() => () => {
|
|
34
|
+
b.current !== null && window.clearTimeout(b.current);
|
|
35
|
+
}, []);
|
|
36
|
+
let x = v ? "exiting" : g ? "visible" : "hidden";
|
|
37
|
+
return /* @__PURE__ */ (0, a.jsxs)(n, {
|
|
38
|
+
"aria-label": d,
|
|
39
|
+
"data-state": x,
|
|
40
|
+
type: m ?? "button",
|
|
41
|
+
variant: "default",
|
|
42
|
+
size: "icon",
|
|
43
|
+
tabIndex: x === "hidden" ? -1 : p,
|
|
44
|
+
className: t("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", x === "visible" && "translate-y-0 scale-100 opacity-100", x === "hidden" && "pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none", x === "exiting" && "pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none", u),
|
|
45
|
+
onClick: (t) => {
|
|
46
|
+
if (f?.(t), t.defaultPrevented || v) return;
|
|
47
|
+
let n = l === void 0 ? window : l;
|
|
48
|
+
if (!n) return;
|
|
49
|
+
y(!0);
|
|
50
|
+
let r = Math.max(0, o);
|
|
51
|
+
b.current = window.setTimeout(() => {
|
|
52
|
+
n.scrollTo({
|
|
53
|
+
top: 0,
|
|
54
|
+
behavior: c
|
|
55
|
+
});
|
|
56
|
+
let t = s(n);
|
|
57
|
+
_(!1), t <= e && y(!1);
|
|
58
|
+
}, r);
|
|
59
|
+
},
|
|
60
|
+
...h,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ (0, a.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" }),
|
|
63
|
+
/* @__PURE__ */ (0, a.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" }),
|
|
64
|
+
/* @__PURE__ */ (0, a.jsx)(i, { className: "relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]" }),
|
|
65
|
+
/* @__PURE__ */ (0, a.jsx)("span", {
|
|
66
|
+
className: "sr-only",
|
|
67
|
+
children: d
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
83
71
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { c as ScrollToTop };
|
package/dist/search.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./button.cjs`),r=require(`./command-D7hksKY6.js`);let i=require(`react`);i=e.i(i);let a=require(`lucide-react`);var o=e.t();function s({children:e,open:t,onOpenChange:n}){let[a,s]=i.useState(!1),c=t!==void 0,l=c?t:a,u=i.useCallback(e=>{let t;t=typeof e==`function`?e(l):e,c?n?.(t):s(t)},[c,l,n]);return i.useEffect(()=>{let e=e=>{e.key===`k`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),u(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u]),(0,o.jsx)(r.n,{open:l,onOpenChange:u,children:e})}var c=i.forwardRef(({className:e,placeholder:r,variant:i=`default`,responsive:s=!1,...c},l)=>{let u=r||(i===`compact`?`Search...`:`Search docs...`);return(0,o.jsxs)(n.Button,{variant:`outline`,className:t.t(`text-muted-foreground relative h-9 text-sm transition-all transition-colors`,i===`default`?`w-full justify-start pr-12`:t.t(`w-9 justify-center px-0`,s&&`2xl:w-48 2xl:justify-start 2xl:px-3 2xl:pr-12`),e),ref:l,...c,children:[(0,o.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,o.jsx)(a.Search,{className:`h-4 w-4 shrink-0`}),(0,o.jsx)(`span`,{className:t.t(`truncate`,i===`compact`&&(s?`hidden 2xl:inline`:`hidden`)),children:u})]}),(0,o.jsxs)(`kbd`,{className:t.t(`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`,i===`default`&&`sm:flex`,i===`compact`&&s&&`2xl:flex`),children:[(0,o.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})});c.displayName=`SearchTrigger`,exports.Search=s,exports.SearchTrigger=c;
|
package/dist/search.mjs
CHANGED
|
@@ -1,65 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Button as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
4
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
5
|
+
import { Button as n } from "./button.mjs";
|
|
6
|
+
import { n as r } from "./command-Ws_iF1hM.mjs";
|
|
7
|
+
import * as i from "react";
|
|
8
|
+
import { Search as a } from "lucide-react";
|
|
9
|
+
//#region src/search.tsx
|
|
10
|
+
var o = e();
|
|
11
|
+
function s({ children: e, open: t, onOpenChange: n }) {
|
|
12
|
+
let [a, s] = i.useState(!1), c = t !== void 0, l = c ? t : a, u = i.useCallback((e) => {
|
|
13
|
+
let t;
|
|
14
|
+
t = typeof e == "function" ? e(l) : e, c ? n?.(t) : s(t);
|
|
15
|
+
}, [
|
|
16
|
+
c,
|
|
17
|
+
l,
|
|
18
|
+
n
|
|
19
|
+
]);
|
|
20
|
+
return i.useEffect(() => {
|
|
21
|
+
let e = (e) => {
|
|
22
|
+
e.key === "k" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), u((e) => !e));
|
|
23
|
+
};
|
|
24
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
25
|
+
}, [u]), /* @__PURE__ */ (0, o.jsx)(r, {
|
|
26
|
+
open: l,
|
|
27
|
+
onOpenChange: u,
|
|
28
|
+
children: e
|
|
29
|
+
});
|
|
22
30
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
t === "compact" && o && "2xl:flex"
|
|
49
|
-
),
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ n.jsx("span", { className: "text-xs", children: "⌘" }),
|
|
52
|
-
"K"
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
j.displayName = "SearchTrigger";
|
|
62
|
-
export {
|
|
63
|
-
N as Search,
|
|
64
|
-
j as SearchTrigger
|
|
65
|
-
};
|
|
31
|
+
var c = i.forwardRef(({ className: e, placeholder: r, variant: i = "default", responsive: s = !1, ...c }, l) => {
|
|
32
|
+
let u = r || (i === "compact" ? "Search..." : "Search docs...");
|
|
33
|
+
return /* @__PURE__ */ (0, o.jsxs)(n, {
|
|
34
|
+
variant: "outline",
|
|
35
|
+
className: t("text-muted-foreground relative h-9 text-sm transition-all transition-colors", i === "default" ? "w-full justify-start pr-12" : t("w-9 justify-center px-0", s && "2xl:w-48 2xl:justify-start 2xl:px-3 2xl:pr-12"), e),
|
|
36
|
+
ref: l,
|
|
37
|
+
...c,
|
|
38
|
+
children: [/* @__PURE__ */ (0, o.jsxs)("span", {
|
|
39
|
+
className: "inline-flex items-center gap-2",
|
|
40
|
+
children: [/* @__PURE__ */ (0, o.jsx)(a, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ (0, o.jsx)("span", {
|
|
41
|
+
className: t("truncate", i === "compact" && (s ? "hidden 2xl:inline" : "hidden")),
|
|
42
|
+
children: u
|
|
43
|
+
})]
|
|
44
|
+
}), /* @__PURE__ */ (0, o.jsxs)("kbd", {
|
|
45
|
+
className: t("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", i === "default" && "sm:flex", i === "compact" && s && "2xl:flex"),
|
|
46
|
+
children: [/* @__PURE__ */ (0, o.jsx)("span", {
|
|
47
|
+
className: "text-xs",
|
|
48
|
+
children: "⌘"
|
|
49
|
+
}), "K"]
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
c.displayName = "SearchTrigger";
|
|
54
|
+
//#endregion
|
|
55
|
+
export { s as Search, c as SearchTrigger };
|