@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/tabs.mjs
CHANGED
|
@@ -1,196 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { c as F } from "./index-IZ2gq03c.mjs";
|
|
6
|
-
import { R as $, I as D, c as y } from "./index-Bv7qrYW6.mjs";
|
|
7
|
-
import { P as V } from "./index-vuPgkS0V.mjs";
|
|
8
|
-
import { u as k } from "./index-CD6_IrA-.mjs";
|
|
9
|
-
import { u as G } from "./index-p6xVFRb4.mjs";
|
|
10
|
-
import { u as L } from "./index-DnFcfnA9.mjs";
|
|
11
|
-
import { c as T } from "./utils-DY6fhrgS.mjs";
|
|
12
|
-
var g = "Tabs", [K] = F(g, [
|
|
13
|
-
y
|
|
14
|
-
]), h = y(), [B, x] = K(g), C = l.forwardRef(
|
|
15
|
-
(e, t) => {
|
|
16
|
-
const {
|
|
17
|
-
__scopeTabs: a,
|
|
18
|
-
value: o,
|
|
19
|
-
onValueChange: r,
|
|
20
|
-
defaultValue: d,
|
|
21
|
-
orientation: n = "horizontal",
|
|
22
|
-
dir: u,
|
|
23
|
-
activationMode: m = "automatic",
|
|
24
|
-
...b
|
|
25
|
-
} = e, i = k(u), [s, f] = G({
|
|
26
|
-
prop: o,
|
|
27
|
-
onChange: r,
|
|
28
|
-
defaultProp: d ?? "",
|
|
29
|
-
caller: g
|
|
30
|
-
});
|
|
31
|
-
return /* @__PURE__ */ c.jsx(
|
|
32
|
-
B,
|
|
33
|
-
{
|
|
34
|
-
scope: a,
|
|
35
|
-
baseId: L(),
|
|
36
|
-
value: s,
|
|
37
|
-
onValueChange: f,
|
|
38
|
-
orientation: n,
|
|
39
|
-
dir: i,
|
|
40
|
-
activationMode: m,
|
|
41
|
-
children: /* @__PURE__ */ c.jsx(
|
|
42
|
-
v.div,
|
|
43
|
-
{
|
|
44
|
-
dir: i,
|
|
45
|
-
"data-orientation": n,
|
|
46
|
-
...b,
|
|
47
|
-
ref: t
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
C.displayName = g;
|
|
55
|
-
var N = "TabsList", R = l.forwardRef(
|
|
56
|
-
(e, t) => {
|
|
57
|
-
const { __scopeTabs: a, loop: o = !0, ...r } = e, d = x(N, a), n = h(a);
|
|
58
|
-
return /* @__PURE__ */ c.jsx(
|
|
59
|
-
$,
|
|
60
|
-
{
|
|
61
|
-
asChild: !0,
|
|
62
|
-
...n,
|
|
63
|
-
orientation: d.orientation,
|
|
64
|
-
dir: d.dir,
|
|
65
|
-
loop: o,
|
|
66
|
-
children: /* @__PURE__ */ c.jsx(
|
|
67
|
-
v.div,
|
|
68
|
-
{
|
|
69
|
-
role: "tablist",
|
|
70
|
-
"aria-orientation": d.orientation,
|
|
71
|
-
...r,
|
|
72
|
-
ref: t
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
R.displayName = N;
|
|
80
|
-
var I = "TabsTrigger", j = l.forwardRef(
|
|
81
|
-
(e, t) => {
|
|
82
|
-
const { __scopeTabs: a, value: o, disabled: r = !1, ...d } = e, n = x(I, a), u = h(a), m = A(n.baseId, o), b = P(n.baseId, o), i = o === n.value;
|
|
83
|
-
return /* @__PURE__ */ c.jsx(
|
|
84
|
-
D,
|
|
85
|
-
{
|
|
86
|
-
asChild: !0,
|
|
87
|
-
...u,
|
|
88
|
-
focusable: !r,
|
|
89
|
-
active: i,
|
|
90
|
-
children: /* @__PURE__ */ c.jsx(
|
|
91
|
-
v.button,
|
|
92
|
-
{
|
|
93
|
-
type: "button",
|
|
94
|
-
role: "tab",
|
|
95
|
-
"aria-selected": i,
|
|
96
|
-
"aria-controls": b,
|
|
97
|
-
"data-state": i ? "active" : "inactive",
|
|
98
|
-
"data-disabled": r ? "" : void 0,
|
|
99
|
-
disabled: r,
|
|
100
|
-
id: m,
|
|
101
|
-
...d,
|
|
102
|
-
ref: t,
|
|
103
|
-
onMouseDown: p(e.onMouseDown, (s) => {
|
|
104
|
-
!r && s.button === 0 && s.ctrlKey === !1 ? n.onValueChange(o) : s.preventDefault();
|
|
105
|
-
}),
|
|
106
|
-
onKeyDown: p(e.onKeyDown, (s) => {
|
|
107
|
-
[" ", "Enter"].includes(s.key) && n.onValueChange(o);
|
|
108
|
-
}),
|
|
109
|
-
onFocus: p(e.onFocus, () => {
|
|
110
|
-
const s = n.activationMode !== "manual";
|
|
111
|
-
!i && !r && s && n.onValueChange(o);
|
|
112
|
-
})
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
j.displayName = I;
|
|
120
|
-
var w = "TabsContent", _ = l.forwardRef(
|
|
121
|
-
(e, t) => {
|
|
122
|
-
const { __scopeTabs: a, value: o, forceMount: r, children: d, ...n } = e, u = x(w, a), m = A(u.baseId, o), b = P(u.baseId, o), i = o === u.value, s = l.useRef(i);
|
|
123
|
-
return l.useEffect(() => {
|
|
124
|
-
const f = requestAnimationFrame(() => s.current = !1);
|
|
125
|
-
return () => cancelAnimationFrame(f);
|
|
126
|
-
}, []), /* @__PURE__ */ c.jsx(V, { present: r || i, children: ({ present: f }) => /* @__PURE__ */ c.jsx(
|
|
127
|
-
v.div,
|
|
128
|
-
{
|
|
129
|
-
"data-state": i ? "active" : "inactive",
|
|
130
|
-
"data-orientation": u.orientation,
|
|
131
|
-
role: "tabpanel",
|
|
132
|
-
"aria-labelledby": m,
|
|
133
|
-
hidden: !f,
|
|
134
|
-
id: b,
|
|
135
|
-
tabIndex: 0,
|
|
136
|
-
...n,
|
|
137
|
-
ref: t,
|
|
138
|
-
style: {
|
|
139
|
-
...e.style,
|
|
140
|
-
animationDuration: s.current ? "0s" : void 0
|
|
141
|
-
},
|
|
142
|
-
children: f && d
|
|
143
|
-
}
|
|
144
|
-
) });
|
|
145
|
-
}
|
|
146
|
-
);
|
|
147
|
-
_.displayName = w;
|
|
148
|
-
function A(e, t) {
|
|
149
|
-
return `${e}-trigger-${t}`;
|
|
150
|
-
}
|
|
151
|
-
function P(e, t) {
|
|
152
|
-
return `${e}-content-${t}`;
|
|
153
|
-
}
|
|
154
|
-
var q = C, E = R, M = j, S = _;
|
|
155
|
-
const ae = q, z = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
156
|
-
E,
|
|
157
|
-
{
|
|
158
|
-
ref: a,
|
|
159
|
-
className: T(
|
|
160
|
-
"bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",
|
|
161
|
-
e
|
|
162
|
-
),
|
|
163
|
-
...t
|
|
164
|
-
}
|
|
165
|
-
));
|
|
166
|
-
z.displayName = E?.displayName || "TabsList";
|
|
167
|
-
const H = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
168
|
-
M,
|
|
169
|
-
{
|
|
170
|
-
ref: a,
|
|
171
|
-
className: T(
|
|
172
|
-
"ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",
|
|
173
|
-
e
|
|
174
|
-
),
|
|
175
|
-
...t
|
|
176
|
-
}
|
|
177
|
-
));
|
|
178
|
-
H.displayName = M?.displayName || "TabsTrigger";
|
|
179
|
-
const O = l.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ c.jsx(
|
|
180
|
-
S,
|
|
181
|
-
{
|
|
182
|
-
ref: a,
|
|
183
|
-
className: T(
|
|
184
|
-
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
185
|
-
e
|
|
186
|
-
),
|
|
187
|
-
...t
|
|
188
|
-
}
|
|
189
|
-
));
|
|
190
|
-
O.displayName = S?.displayName || "TabsContent";
|
|
191
|
-
export {
|
|
192
|
-
ae as Tabs,
|
|
193
|
-
O as TabsContent,
|
|
194
|
-
z as TabsList,
|
|
195
|
-
H as TabsTrigger
|
|
196
|
-
};
|
|
2
|
+
"use client";
|
|
3
|
+
import { i as e, n as t, r as n, t as r } from "./tabs-DqAKyl9T.mjs";
|
|
4
|
+
export { r as Tabs, t as TabsContent, n as TabsList, e as TabsTrigger };
|
package/dist/text.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`);let n=require(`react`);n=e.i(n);let r=require(`class-variance-authority`);var i=e.t(),a=(0,r.cva)(``,{variants:{variant:{h1:`scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl`,h2:`scroll-m-20 text-3xl font-semibold tracking-tight`,h3:`scroll-m-20 text-2xl font-semibold tracking-tight`,h4:`scroll-m-20 text-xl font-semibold tracking-tight`,body:`leading-7`,bodySmall:`text-sm leading-6`,caption:`text-xs text-muted-foreground`,label:`text-sm font-medium leading-none`,overline:`text-xs font-semibold uppercase tracking-widest text-muted-foreground`}},defaultVariants:{variant:`body`}}),o={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,body:`p`,bodySmall:`p`,caption:`span`,label:`label`,overline:`span`},s=n.forwardRef(({className:e,variant:n=`body`,as:r,children:s,...c},l)=>(0,i.jsx)(r||o[n??`body`]||`p`,{ref:l,className:t.t(a({variant:n,className:e})),...c,children:s}));s.displayName=`Text`,exports.Text=s,exports.textVariants=a;
|
package/dist/text.mjs
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
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
|
-
};
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
4
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import { cva as r } from "class-variance-authority";
|
|
7
|
+
//#region src/text.tsx
|
|
8
|
+
var i = e(), a = r("", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
|
|
11
|
+
h2: "scroll-m-20 text-3xl font-semibold tracking-tight",
|
|
12
|
+
h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
|
|
13
|
+
h4: "scroll-m-20 text-xl font-semibold tracking-tight",
|
|
14
|
+
body: "leading-7",
|
|
15
|
+
bodySmall: "text-sm leading-6",
|
|
16
|
+
caption: "text-xs text-muted-foreground",
|
|
17
|
+
label: "text-sm font-medium leading-none",
|
|
18
|
+
overline: "text-xs font-semibold uppercase tracking-widest text-muted-foreground"
|
|
19
|
+
} },
|
|
20
|
+
defaultVariants: { variant: "body" }
|
|
21
|
+
}), o = {
|
|
22
|
+
h1: "h1",
|
|
23
|
+
h2: "h2",
|
|
24
|
+
h3: "h3",
|
|
25
|
+
h4: "h4",
|
|
26
|
+
body: "p",
|
|
27
|
+
bodySmall: "p",
|
|
28
|
+
caption: "span",
|
|
29
|
+
label: "label",
|
|
30
|
+
overline: "span"
|
|
31
|
+
}, s = n.forwardRef(({ className: e, variant: n = "body", as: r, children: s, ...c }, l) => /* @__PURE__ */ (0, i.jsx)(r || o[n ?? "body"] || "p", {
|
|
32
|
+
ref: l,
|
|
33
|
+
className: t(a({
|
|
34
|
+
variant: n,
|
|
35
|
+
className: e
|
|
36
|
+
})),
|
|
37
|
+
...c,
|
|
38
|
+
children: s
|
|
39
|
+
}));
|
|
40
|
+
s.displayName = "Text";
|
|
41
|
+
//#endregion
|
|
42
|
+
export { s as Text, a as textVariants };
|
package/dist/textarea.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`);let n=require(`react`);n=e.i(n);var r=e.t(),i=n.forwardRef(({className:e,...n},i)=>(0,r.jsx)(`textarea`,{className:t.t(`border-input placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:i,...n}));i.displayName=`Textarea`,exports.Textarea=i;
|
package/dist/textarea.mjs
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ref: t,
|
|
13
|
-
...r
|
|
14
|
-
}
|
|
15
|
-
));
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
4
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
//#region src/textarea.tsx
|
|
7
|
+
var r = e(), i = n.forwardRef(({ className: e, ...n }, i) => /* @__PURE__ */ (0, r.jsx)("textarea", {
|
|
8
|
+
className: t("border-input placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
9
|
+
ref: i,
|
|
10
|
+
...n
|
|
11
|
+
}));
|
|
16
12
|
i.displayName = "Textarea";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as Textarea };
|
package/dist/theme-provider.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`);let t=require(`next-themes`);var n=e.t();function r({children:e,...r}){return(0,n.jsx)(t.ThemeProvider,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,...r,children:e})}exports.ThemeProvider=r;
|
package/dist/theme-provider.mjs
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
4
|
+
import { ThemeProvider as t } from "next-themes";
|
|
5
|
+
//#region src/theme-provider.tsx
|
|
6
|
+
var n = e();
|
|
7
|
+
function r({ children: e, ...r }) {
|
|
8
|
+
return /* @__PURE__ */ (0, n.jsx)(t, {
|
|
9
|
+
attribute: "class",
|
|
10
|
+
defaultTheme: "system",
|
|
11
|
+
enableSystem: !0,
|
|
12
|
+
...r,
|
|
13
|
+
children: e
|
|
14
|
+
});
|
|
6
15
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as ThemeProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./button.cjs`),r=require(`./dropdown-menu-uGMnmGL-.js`);let i=require(`lucide-react`),a=require(`next-themes`),o=require(`@gv-tech/design-tokens`);function s(){let e=(0,a.useTheme)(),{resolvedTheme:t}=e,n=t===`dark`?o.theme.dark:o.theme.light;return{...e,tokens:n}}var c=e.t();function l({variant:e=`binary`,onThemeChange:a,customTheme:o,className:l}){let{theme:u,setTheme:d,resolvedTheme:f}=s(),p=o??u,m=(o||f)===`dark`,h=p===`system`,g=e=>{a?a(e):d(e)},_=()=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.Sun,{className:t.t(`h-[1.2rem] w-[1.2rem] transition-all`,!h&&!m?`scale-100 rotate-0`:`scale-0 -rotate-90`)}),(0,c.jsx)(i.Moon,{className:t.t(`absolute h-[1.2rem] w-[1.2rem] transition-all`,!h&&m?`scale-100 rotate-0`:`scale-0 rotate-90`)}),(0,c.jsx)(i.SunMoon,{className:t.t(`absolute h-[1.2rem] w-[1.2rem] transition-all`,h?`scale-100 rotate-0`:`scale-0 rotate-90`)}),(0,c.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`})]});return e===`ternary`?(0,c.jsxs)(r.t,{children:[(0,c.jsx)(r.h,{asChild:!0,children:(0,c.jsx)(n.Button,{variant:`ghost`,size:`icon`,className:t.t(`relative h-9 w-9`,l),children:(0,c.jsx)(_,{})})}),(0,c.jsxs)(r.r,{align:`end`,children:[(0,c.jsxs)(r.a,{onClick:()=>g(`light`),children:[(0,c.jsx)(i.Sun,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`Light`})]}),(0,c.jsxs)(r.a,{onClick:()=>g(`dark`),children:[(0,c.jsx)(i.Moon,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`Dark`})]}),(0,c.jsxs)(r.a,{onClick:()=>g(`system`),children:[(0,c.jsx)(i.SunMoon,{className:`mr-2 h-4 w-4`}),(0,c.jsx)(`span`,{children:`System`})]})]})]}):(0,c.jsx)(n.Button,{variant:`ghost`,size:`icon`,className:t.t(`relative h-9 w-9`,l),onClick:()=>g(p===`dark`?`light`:`dark`),"aria-label":`Toggle theme`,children:(0,c.jsx)(_,{})})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
+
import { Button as n } from "./button.mjs";
|
|
4
|
+
import { a as r, h as i, r as a, t as o } from "./dropdown-menu-BGkQXJ-r.mjs";
|
|
5
|
+
import { Moon as s, Sun as c, SunMoon as l } from "lucide-react";
|
|
6
|
+
import { useTheme as u } from "next-themes";
|
|
7
|
+
import { theme as d } from "@gv-tech/design-tokens";
|
|
8
|
+
//#region src/hooks/use-theme.ts
|
|
9
|
+
function f() {
|
|
10
|
+
let e = u(), { resolvedTheme: t } = e, n = t === "dark" ? d.dark : d.light;
|
|
11
|
+
return {
|
|
12
|
+
...e,
|
|
13
|
+
tokens: n
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/theme-toggle.tsx
|
|
18
|
+
var p = e();
|
|
19
|
+
function m({ variant: e = "binary", onThemeChange: u, customTheme: d, className: m }) {
|
|
20
|
+
let { theme: h, setTheme: g, resolvedTheme: _ } = f(), v = d ?? h, y = (d || _) === "dark", b = v === "system", x = (e) => {
|
|
21
|
+
u ? u(e) : g(e);
|
|
22
|
+
}, S = () => /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
|
|
23
|
+
/* @__PURE__ */ (0, p.jsx)(c, { className: t("h-[1.2rem] w-[1.2rem] transition-all", !b && !y ? "scale-100 rotate-0" : "scale-0 -rotate-90") }),
|
|
24
|
+
/* @__PURE__ */ (0, p.jsx)(s, { className: t("absolute h-[1.2rem] w-[1.2rem] transition-all", !b && y ? "scale-100 rotate-0" : "scale-0 rotate-90") }),
|
|
25
|
+
/* @__PURE__ */ (0, p.jsx)(l, { className: t("absolute h-[1.2rem] w-[1.2rem] transition-all", b ? "scale-100 rotate-0" : "scale-0 rotate-90") }),
|
|
26
|
+
/* @__PURE__ */ (0, p.jsx)("span", {
|
|
27
|
+
className: "sr-only",
|
|
28
|
+
children: "Toggle theme"
|
|
29
|
+
})
|
|
30
|
+
] });
|
|
31
|
+
return e === "ternary" ? /* @__PURE__ */ (0, p.jsxs)(o, { children: [/* @__PURE__ */ (0, p.jsx)(i, {
|
|
32
|
+
asChild: !0,
|
|
33
|
+
children: /* @__PURE__ */ (0, p.jsx)(n, {
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "icon",
|
|
36
|
+
className: t("relative h-9 w-9", m),
|
|
37
|
+
children: /* @__PURE__ */ (0, p.jsx)(S, {})
|
|
38
|
+
})
|
|
39
|
+
}), /* @__PURE__ */ (0, p.jsxs)(a, {
|
|
40
|
+
align: "end",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
43
|
+
onClick: () => x("light"),
|
|
44
|
+
children: [/* @__PURE__ */ (0, p.jsx)(c, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Light" })]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
47
|
+
onClick: () => x("dark"),
|
|
48
|
+
children: [/* @__PURE__ */ (0, p.jsx)(s, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Dark" })]
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ (0, p.jsxs)(r, {
|
|
51
|
+
onClick: () => x("system"),
|
|
52
|
+
children: [/* @__PURE__ */ (0, p.jsx)(l, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ (0, p.jsx)("span", { children: "System" })]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})] }) : /* @__PURE__ */ (0, p.jsx)(n, {
|
|
56
|
+
variant: "ghost",
|
|
57
|
+
size: "icon",
|
|
58
|
+
className: t("relative h-9 w-9", m),
|
|
59
|
+
onClick: () => x(v === "dark" ? "light" : "dark"),
|
|
60
|
+
"aria-label": "Toggle theme",
|
|
61
|
+
children: /* @__PURE__ */ (0, p.jsx)(S, {})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { f as n, m as t };
|
package/dist/theme-toggle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./button.cjs`);const e=require(`./theme-toggle-DKQmD-FO.js`);exports.ThemeToggle=e.t;
|
package/dist/theme-toggle.mjs
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import "lucide-react";
|
|
2
|
+
"use client";
|
|
4
3
|
import "./button.mjs";
|
|
5
|
-
import "./
|
|
6
|
-
|
|
7
|
-
import "./utils-DY6fhrgS.mjs";
|
|
8
|
-
export {
|
|
9
|
-
T as ThemeToggle
|
|
10
|
-
};
|
|
4
|
+
import { t as e } from "./theme-toggle-dQbFWNI8.mjs";
|
|
5
|
+
export { e as ThemeToggle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./dist-Kqk0oQYU.js`),r=require(`./dist-CsEsK2jW.js`),i=require(`./dist-DmmUjo_P.js`),a=require(`./dist-Ci2whnVp.js`),o=require(`./dist-CscAxhT8.js`),s=require(`./dist-B5VmV2K7.js`),c=require(`./dist-_Osar3kp.js`),l=require(`./dist-cRjbOZRf.js`),u=require(`./dist-C2ArLRnq.js`),d=require(`./dist-CL1DhkaL.js`),f=require(`./dist-BfFVoFJN.js`);let p=require(`react`),m=e.i(p,1);p=e.i(p);let h=require(`react-dom`);h=e.i(h,1);let g=require(`lucide-react`),_=require(`class-variance-authority`);var v=e.t(),y=`ToastProvider`,[b,x,S]=a.t(`Toast`),[C,w]=n.n(`Toast`,[S]),[T,E]=C(y),D=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=m.useState(null),[l,u]=m.useState(0),d=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${y}\`. Expected non-empty \`string\`.`),(0,v.jsx)(b.Provider,{scope:t,children:(0,v.jsx)(T,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:m.useCallback(()=>u(e=>e+1),[]),onToastRemove:m.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};D.displayName=y;var O=`ToastViewport`,k=[`F8`],A=`toast.viewportPause`,j=`toast.viewportResume`,M=m.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:a=k,label:o=`Notifications ({hotkey})`,...s}=e,c=E(O,n),l=x(n),d=m.useRef(null),f=m.useRef(null),p=m.useRef(null),h=m.useRef(null),g=r.n(t,h,c.onViewportChange),_=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),y=c.toastCount>0;m.useEffect(()=>{let e=e=>{a.length!==0&&a.every(t=>e[t]||e.code===t)&&h.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),m.useEffect(()=>{let e=d.current,t=h.current;if(y&&e&&t){let n=()=>{if(!c.isClosePausedRef.current){let e=new CustomEvent(A);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},r=()=>{if(c.isClosePausedRef.current){let e=new CustomEvent(j);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[y,c.isClosePausedRef]);let S=m.useCallback(({tabbingDirection:e})=>{let t=l().map(t=>{let n=t.ref.current,r=[n,...ce(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[l]);return m.useEffect(()=>{let e=h.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){f.current?.focus();return}let i=S({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Z(i.slice(a+1))?t.preventDefault():r?f.current?.focus():p.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[l,S]),(0,v.jsxs)(u.t,{ref:d,role:`region`,"aria-label":o.replace(`{hotkey}`,_),tabIndex:-1,style:{pointerEvents:y?void 0:`none`},children:[y&&(0,v.jsx)(P,{ref:f,onFocusFromOutsideViewport:()=>{Z(S({tabbingDirection:`forwards`}))}}),(0,v.jsx)(b.Slot,{scope:n,children:(0,v.jsx)(i.t.ol,{tabIndex:-1,...s,ref:g})}),y&&(0,v.jsx)(P,{ref:p,onFocusFromOutsideViewport:()=>{Z(S({tabbingDirection:`backwards`}))}})]})});M.displayName=O;var N=`ToastFocusProxy`,P=m.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=E(N,n);return(0,v.jsx)(f.r,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});P.displayName=N;var F=`Toast`,ee=`toast.swipeStart`,te=`toast.swipeMove`,ne=`toast.swipeCancel`,re=`toast.swipeEnd`,I=m.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...u}=e,[d,f]=s.t({prop:r,defaultProp:a??!0,onChange:o,caller:F});return(0,v.jsx)(c.t,{present:n||d,children:(0,v.jsx)(R,{open:d,...u,ref:t,onClose:()=>f(!1),onPause:l.t(e.onPause),onResume:l.t(e.onResume),onSwipeStart:i.r(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:i.r(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:i.r(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:i.r(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),f(!1)})})})});I.displayName=F;var[ie,L]=C(F,{onClose(){}}),R=m.forwardRef((e,t)=>{let{__scopeToast:n,type:a=`foreground`,duration:o,open:s,onClose:c,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:_,onSwipeCancel:y,onSwipeEnd:x,...S}=e,C=E(F,n),[w,T]=m.useState(null),D=r.n(t,e=>T(e)),O=m.useRef(null),k=m.useRef(null),M=o||C.duration,N=m.useRef(0),P=m.useRef(M),I=m.useRef(0),{onToastAdd:L,onToastRemove:R}=C,z=l.t(()=>{w?.contains(document.activeElement)&&C.viewport?.focus(),c()}),B=m.useCallback(e=>{!e||e===1/0||(window.clearTimeout(I.current),N.current=new Date().getTime(),I.current=window.setTimeout(z,e))},[z]);m.useEffect(()=>{let e=C.viewport;if(e){let t=()=>{B(P.current),p?.()},n=()=>{let e=new Date().getTime()-N.current;P.current-=e,window.clearTimeout(I.current),f?.()};return e.addEventListener(A,n),e.addEventListener(j,t),()=>{e.removeEventListener(A,n),e.removeEventListener(j,t)}}},[C.viewport,M,f,p,B]),m.useEffect(()=>{s&&!C.isClosePausedRef.current&&B(M)},[s,M,C.isClosePausedRef,B]),m.useEffect(()=>(L(),()=>R()),[L,R]);let V=m.useMemo(()=>w?J(w):null,[w]);return C.viewport?(0,v.jsxs)(v.Fragment,{children:[V&&(0,v.jsx)(ae,{__scopeToast:n,role:`status`,"aria-live":a===`foreground`?`assertive`:`polite`,children:V}),(0,v.jsx)(ie,{scope:n,onClose:z,children:h.createPortal((0,v.jsx)(b.ItemSlot,{scope:n,children:(0,v.jsx)(u.r,{asChild:!0,onEscapeKeyDown:i.r(d,()=>{C.isFocusedToastEscapeKeyDownRef.current||z(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,v.jsx)(i.t.li,{tabIndex:0,"data-state":s?`open`:`closed`,"data-swipe-direction":C.swipeDirection,...S,ref:D,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:i.r(e.onKeyDown,e=>{e.key===`Escape`&&(d?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:i.r(e.onPointerDown,e=>{e.button===0&&(O.current={x:e.clientX,y:e.clientY})}),onPointerMove:i.r(e.onPointerMove,e=>{if(!O.current)return;let t=e.clientX-O.current.x,n=e.clientY-O.current.y,r=!!k.current,i=[`left`,`right`].includes(C.swipeDirection),a=[`left`,`up`].includes(C.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(k.current=l,Y(te,_,u,{discrete:!1})):X(l,C.swipeDirection,c)?(k.current=l,Y(ee,g,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(O.current=null)}),onPointerUp:i.r(e.onPointerUp,e=>{let t=k.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),k.current=null,O.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};X(t,C.swipeDirection,C.swipeThreshold)?Y(re,x,r,{discrete:!0}):Y(ne,y,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),ae=e=>{let{__scopeToast:t,children:n,...r}=e,i=E(F,t),[a,o]=m.useState(!1),[s,c]=m.useState(!1);return oe(()=>o(!0)),m.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,v.jsx)(d.t,{asChild:!0,children:(0,v.jsx)(f.r,{...r,children:a&&(0,v.jsxs)(v.Fragment,{children:[i.label,` `,n]})})})},z=`ToastTitle`,B=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(i.t.div,{...r,ref:t})});B.displayName=z;var V=`ToastDescription`,H=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(i.t.div,{...r,ref:t})});H.displayName=V;var U=`ToastAction`,W=m.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,v.jsx)(q,{altText:n,asChild:!0,children:(0,v.jsx)(K,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${U}\`. Expected non-empty \`string\`.`),null)});W.displayName=U;var G=`ToastClose`,K=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,a=L(G,n);return(0,v.jsx)(q,{asChild:!0,children:(0,v.jsx)(i.t.button,{type:`button`,...r,ref:t,onClick:i.r(e.onClick,a.onClose)})})});K.displayName=G;var q=m.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...a}=e;return(0,v.jsx)(i.t.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function J(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),se(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...J(e))}}),t}function Y(e,t,n,{discrete:r}){let a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?i.n(a,o):a.dispatchEvent(o)}var X=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function oe(e=()=>{}){let t=l.t(e);o.t(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function se(e){return e.nodeType===e.ELEMENT_NODE}function ce(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Z(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var le=D,Q=M,$=I,ue=B,de=H,fe=W,pe=K,me=le,he=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(Q,{ref:r,className:t.t(`fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]`,e),...n}));he.displayName=Q?.displayName||`ToastViewport`;var ge=(0,_.cva)(`group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),_e=p.forwardRef(({className:e,variant:n,...r},i)=>(0,v.jsx)($,{ref:i,className:t.t(ge({variant:n}),e),...r}));_e.displayName=$?.displayName||`Toast`;var ve=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(fe,{ref:r,className:t.t(`hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50`,e),...n}));ve.displayName=fe?.displayName||`ToastAction`;var ye=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(pe,{ref:r,className:t.t(`text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...n,children:(0,v.jsx)(g.X,{className:`h-4 w-4`})}));ye.displayName=pe?.displayName||`ToastClose`;var be=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(ue,{ref:r,className:t.t(`text-sm font-semibold [&+div]:text-xs`,e),...n}));be.displayName=ue?.displayName||`ToastTitle`;var xe=p.forwardRef(({className:e,...n},r)=>(0,v.jsx)(de,{ref:r,className:t.t(`text-sm opacity-90`,e),...n}));xe.displayName=de?.displayName||`ToastDescription`,Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _e}});
|