@gv-tech/ui-native 2.16.0 → 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/index.d.ts +66 -3
- package/dist/ui-native.mjs +965 -726
- package/package.json +1 -1
- package/src/index.ts +9 -1
- package/src/popover.tsx +82 -6
- package/src/progress.tsx +22 -8
- package/src/scroll-to-top.tsx +186 -0
- package/src/support-fab.tsx +144 -0
- package/src/table-of-contents.tsx +5 -2
- package/src/tabs.tsx +6 -3
- package/src/tooltip.tsx +16 -22
package/dist/ui-native.mjs
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { twMerge as
|
|
6
|
-
import * as
|
|
7
|
-
import { ChevronDown as
|
|
8
|
-
import
|
|
9
|
-
import { cva as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import { toggleVariants as
|
|
22
|
-
import { toggleVariants as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
function
|
|
28
|
-
return
|
|
1
|
+
import { jsx as r, jsxs as g, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { Text as m, View as i, Pressable as $, StyleSheet as U, Platform as H, TextInput as ie, Modal as Se, Animated as P, AccessibilityInfo as ke, Linking as Ae, TouchableOpacity as le, ScrollView as De } from "react-native";
|
|
4
|
+
import { clsx as Pe } from "clsx";
|
|
5
|
+
import { twMerge as Oe } from "tailwind-merge";
|
|
6
|
+
import * as T from "@rn-primitives/accordion";
|
|
7
|
+
import { ChevronDown as Z, Check as de, X as ee, Circle as Ie, ChevronUp as Ve, ArrowUp as ze, Coffee as He, ExternalLink as Fe } from "lucide-react-native";
|
|
8
|
+
import k, { useDerivedValue as je, withTiming as Y, useAnimatedStyle as ce, interpolate as Le, Extrapolation as Be, FadeOut as j, FadeIn as L, SlideOutRight as Ee, SlideInRight as Ge, useSharedValue as Me, withRepeat as Ue, withSequence as $e, Layout as Ye, FadeOutDown as qe, FadeInUp as We } from "react-native-reanimated";
|
|
9
|
+
import { cva as B } from "class-variance-authority";
|
|
10
|
+
import * as N from "@rn-primitives/alert-dialog";
|
|
11
|
+
import * as E from "@rn-primitives/avatar";
|
|
12
|
+
import * as J from "@rn-primitives/checkbox";
|
|
13
|
+
import * as te from "@rn-primitives/collapsible";
|
|
14
|
+
import * as u from "@rn-primitives/dialog";
|
|
15
|
+
import * as K from "@rn-primitives/label";
|
|
16
|
+
import * as G from "@rn-primitives/radio-group";
|
|
17
|
+
import * as p from "@rn-primitives/select";
|
|
18
|
+
import * as me from "@rn-primitives/separator";
|
|
19
|
+
import * as Q from "@rn-primitives/switch";
|
|
20
|
+
import * as F from "@rn-primitives/tabs";
|
|
21
|
+
import { toggleVariants as ue } from "@gv-tech/ui-core";
|
|
22
|
+
import { toggleVariants as So } from "@gv-tech/ui-core";
|
|
23
|
+
import * as fe from "@rn-primitives/toggle";
|
|
24
|
+
import * as X from "@rn-primitives/toggle-group";
|
|
25
|
+
import * as M from "@rn-primitives/tooltip";
|
|
26
|
+
import * as A from "@rn-primitives/toast";
|
|
27
|
+
function _(t, e = m, o = {}) {
|
|
28
|
+
return a.Children.map(t, (s) => typeof s == "string" || typeof s == "number" ? /* @__PURE__ */ r(e, { ...o, children: s }) : s);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function n(...t) {
|
|
31
|
+
return Oe(Pe(t));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function Xe(t) {
|
|
34
|
+
return t.toString().toLowerCase().trim().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-");
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
const { isExpanded: l } =
|
|
44
|
-
() => l ?
|
|
45
|
-
),
|
|
36
|
+
const _e = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(T.Root, { ref: o, className: n("web:gap-0", t), ...e }));
|
|
37
|
+
_e.displayName = T.Root?.displayName || "Accordion";
|
|
38
|
+
const Je = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(T.Item, { ref: o, className: n("border-border overflow-hidden border-b", t), ...e }));
|
|
39
|
+
Je.displayName = T.Item?.displayName || "AccordionItem";
|
|
40
|
+
const Ke = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(T.Header, { ref: o, className: n("flex flex-row", t), ...e }));
|
|
41
|
+
Ke.displayName = T.Header?.displayName || "AccordionHeader";
|
|
42
|
+
const Qe = a.forwardRef(({ className: t, children: e, ...o }, s) => {
|
|
43
|
+
const { isExpanded: l } = T.useItemContext(), d = je(
|
|
44
|
+
() => l ? Y(1, { duration: 250 }) : Y(0, { duration: 200 })
|
|
45
|
+
), c = ce(() => ({
|
|
46
46
|
transform: [{ rotate: `${d.value * 180}deg` }],
|
|
47
|
-
opacity:
|
|
47
|
+
opacity: Le(d.value, [0, 1], [1, 0.8], Be.CLAMP)
|
|
48
48
|
}));
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
49
|
+
return /* @__PURE__ */ r(T.Header, { className: "flex", children: /* @__PURE__ */ g(
|
|
50
|
+
T.Trigger,
|
|
51
51
|
{
|
|
52
|
-
ref:
|
|
53
|
-
className:
|
|
52
|
+
ref: s,
|
|
53
|
+
className: n(
|
|
54
54
|
"flex flex-row items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
55
|
-
|
|
55
|
+
t
|
|
56
56
|
),
|
|
57
|
-
...
|
|
57
|
+
...o,
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ r(W, { children: e }),
|
|
60
|
+
/* @__PURE__ */ r(k.View, { style: c, children: /* @__PURE__ */ r(Z, { className: "text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" }) })
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
) });
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
65
|
+
Qe.displayName = T.Trigger?.displayName || "AccordionTrigger";
|
|
66
|
+
const Ze = a.forwardRef(({ className: t, children: e, ...o }, s) => /* @__PURE__ */ r(
|
|
67
|
+
T.Content,
|
|
68
68
|
{
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
69
|
+
ref: s,
|
|
70
|
+
className: n(
|
|
71
71
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all",
|
|
72
|
-
|
|
72
|
+
t
|
|
73
73
|
),
|
|
74
|
-
...
|
|
75
|
-
children: /* @__PURE__ */
|
|
74
|
+
...o,
|
|
75
|
+
children: /* @__PURE__ */ r(i, { className: n("pt-0 pb-4", t), children: e })
|
|
76
76
|
}
|
|
77
77
|
));
|
|
78
|
-
|
|
79
|
-
const
|
|
78
|
+
Ze.displayName = T.Content?.displayName || "AccordionContent";
|
|
79
|
+
const et = B("relative w-full rounded-lg border p-4", {
|
|
80
80
|
variants: {
|
|
81
81
|
variant: {
|
|
82
82
|
default: "bg-background border-border",
|
|
@@ -88,24 +88,24 @@ const Be = I("relative w-full rounded-lg border p-4", {
|
|
|
88
88
|
defaultVariants: {
|
|
89
89
|
variant: "default"
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
({ className:
|
|
95
|
-
|
|
91
|
+
}), tt = a.forwardRef(({ className: t, variant: e, children: o, ...s }, l) => /* @__PURE__ */ r(i, { ref: l, className: n(et({ variant: e }), t), ...s, children: _(o) }));
|
|
92
|
+
tt.displayName = "Alert";
|
|
93
|
+
const rt = a.forwardRef(
|
|
94
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
95
|
+
m,
|
|
96
96
|
{
|
|
97
|
-
ref:
|
|
98
|
-
className:
|
|
97
|
+
ref: o,
|
|
98
|
+
className: n("text-foreground mb-1 leading-none font-medium tracking-tight", t),
|
|
99
99
|
...e
|
|
100
100
|
}
|
|
101
101
|
)
|
|
102
102
|
);
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
({ className:
|
|
103
|
+
rt.displayName = "AlertTitle";
|
|
104
|
+
const ot = a.forwardRef(
|
|
105
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(m, { ref: o, className: n("text-muted-foreground text-sm leading-relaxed", t), ...e })
|
|
106
106
|
);
|
|
107
|
-
|
|
108
|
-
const
|
|
107
|
+
ot.displayName = "AlertDescription";
|
|
108
|
+
const re = B(
|
|
109
109
|
"flex-row items-center justify-center gap-2 rounded-md transition-colors active:opacity-80",
|
|
110
110
|
{
|
|
111
111
|
variants: {
|
|
@@ -129,7 +129,7 @@ const _ = I(
|
|
|
129
129
|
size: "default"
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
),
|
|
132
|
+
), at = B("text-sm font-medium", {
|
|
133
133
|
variants: {
|
|
134
134
|
variant: {
|
|
135
135
|
default: "text-primary-foreground",
|
|
@@ -143,100 +143,100 @@ const _ = I(
|
|
|
143
143
|
defaultVariants: {
|
|
144
144
|
variant: "default"
|
|
145
145
|
}
|
|
146
|
-
}),
|
|
147
|
-
({ className:
|
|
148
|
-
|
|
146
|
+
}), q = a.forwardRef(
|
|
147
|
+
({ className: t, variant: e, size: o, onPress: s, children: l, disabled: d, ...c }, f) => /* @__PURE__ */ r(
|
|
148
|
+
$,
|
|
149
149
|
{
|
|
150
|
-
ref:
|
|
151
|
-
onPress:
|
|
150
|
+
ref: f,
|
|
151
|
+
onPress: s,
|
|
152
152
|
disabled: d,
|
|
153
|
-
className:
|
|
154
|
-
...
|
|
155
|
-
children:
|
|
156
|
-
className:
|
|
153
|
+
className: n(re({ variant: e, size: o, className: t }), d && "opacity-50"),
|
|
154
|
+
...c,
|
|
155
|
+
children: _(l, m, {
|
|
156
|
+
className: n(at({ variant: e }))
|
|
157
157
|
})
|
|
158
158
|
}
|
|
159
159
|
)
|
|
160
160
|
);
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
161
|
+
q.displayName = "Button";
|
|
162
|
+
const zr = N.Root, Hr = N.Trigger, nt = N.Portal, pe = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(N.Overlay, { style: U.absoluteFill, asChild: !0, ref: o, ...e, children: /* @__PURE__ */ r(
|
|
163
|
+
k.View,
|
|
164
164
|
{
|
|
165
|
-
entering:
|
|
166
|
-
exiting:
|
|
167
|
-
className:
|
|
165
|
+
entering: L.duration(150),
|
|
166
|
+
exiting: j.duration(150),
|
|
167
|
+
className: n("z-50 flex items-center justify-center bg-black/80 p-2", t)
|
|
168
168
|
}
|
|
169
169
|
) }));
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
170
|
+
pe.displayName = N.Overlay?.displayName || "AlertDialogOverlay";
|
|
171
|
+
const st = a.forwardRef(({ className: t, portalHost: e, overlayClassName: o, overlayStyle: s, ...l }, d) => /* @__PURE__ */ g(nt, { hostName: e, children: [
|
|
172
|
+
/* @__PURE__ */ r(pe, { className: o, style: s }),
|
|
173
|
+
/* @__PURE__ */ r(N.Content, { ref: d, asChild: !0, ...l, children: /* @__PURE__ */ r(
|
|
174
|
+
k.View,
|
|
175
175
|
{
|
|
176
|
-
entering:
|
|
177
|
-
exiting:
|
|
178
|
-
className:
|
|
176
|
+
entering: L.duration(150),
|
|
177
|
+
exiting: j.duration(150),
|
|
178
|
+
className: n(
|
|
179
179
|
"border-border bg-background z-50 w-full max-w-lg gap-4 rounded-xl border p-6 shadow-lg sm:rounded-lg",
|
|
180
|
-
|
|
180
|
+
t
|
|
181
181
|
)
|
|
182
182
|
}
|
|
183
183
|
) })
|
|
184
184
|
] }));
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
|
|
185
|
+
st.displayName = N.Content?.displayName || "AlertDialogContent";
|
|
186
|
+
const it = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col gap-2 text-center sm:text-left", t), ...e });
|
|
187
|
+
it.displayName = "AlertDialogHeader";
|
|
188
|
+
const lt = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t), ...e });
|
|
189
|
+
lt.displayName = "AlertDialogFooter";
|
|
190
|
+
const dt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
191
|
+
N.Title,
|
|
192
192
|
{
|
|
193
|
-
ref:
|
|
194
|
-
className:
|
|
193
|
+
ref: o,
|
|
194
|
+
className: n("native:text-xl text-foreground text-lg font-semibold", t),
|
|
195
195
|
...e
|
|
196
196
|
}
|
|
197
197
|
));
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
|
|
198
|
+
dt.displayName = N.Title?.displayName || "AlertDialogTitle";
|
|
199
|
+
const ct = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
200
|
+
N.Description,
|
|
201
201
|
{
|
|
202
|
-
ref:
|
|
203
|
-
className:
|
|
202
|
+
ref: o,
|
|
203
|
+
className: n("native:text-base text-muted-foreground text-sm", t),
|
|
204
204
|
...e
|
|
205
205
|
}
|
|
206
206
|
));
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
|
|
207
|
+
ct.displayName = N.Description?.displayName || "AlertDialogDescription";
|
|
208
|
+
const mt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(N.Action, { ref: o, className: n(re(), t), ...e }));
|
|
209
|
+
mt.displayName = N.Action?.displayName || "AlertDialogAction";
|
|
210
|
+
const ut = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
211
|
+
N.Cancel,
|
|
212
212
|
{
|
|
213
|
-
ref:
|
|
214
|
-
className:
|
|
213
|
+
ref: o,
|
|
214
|
+
className: n(re({ variant: "outline" }), "mt-2 sm:mt-0", t),
|
|
215
215
|
...e
|
|
216
216
|
}
|
|
217
217
|
));
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
218
|
+
ut.displayName = N.Cancel?.displayName || "AlertDialogCancel";
|
|
219
|
+
const Fr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "aspect-ratio is not yet implemented for React Native" }) }), ft = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
220
|
+
E.Root,
|
|
221
221
|
{
|
|
222
|
-
ref:
|
|
223
|
-
className:
|
|
222
|
+
ref: o,
|
|
223
|
+
className: n("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", t),
|
|
224
224
|
...e
|
|
225
225
|
}
|
|
226
226
|
));
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
227
|
+
ft.displayName = E.Root?.displayName || "Avatar";
|
|
228
|
+
const pt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(E.Image, { ref: o, className: n("aspect-square h-full w-full", t), ...e }));
|
|
229
|
+
pt.displayName = E.Image?.displayName || "AvatarImage";
|
|
230
|
+
const gt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
231
|
+
E.Fallback,
|
|
232
232
|
{
|
|
233
|
-
ref:
|
|
234
|
-
className:
|
|
233
|
+
ref: o,
|
|
234
|
+
className: n("bg-muted flex h-full w-full items-center justify-center rounded-full", t),
|
|
235
235
|
...e
|
|
236
236
|
}
|
|
237
237
|
));
|
|
238
|
-
|
|
239
|
-
const
|
|
238
|
+
gt.displayName = E.Fallback?.displayName || "AvatarFallback";
|
|
239
|
+
const bt = B("flex-row items-center rounded-md border px-2 py-0.5", {
|
|
240
240
|
variants: {
|
|
241
241
|
variant: {
|
|
242
242
|
default: "border-transparent bg-primary",
|
|
@@ -248,7 +248,7 @@ const at = I("flex-row items-center rounded-md border px-2 py-0.5", {
|
|
|
248
248
|
defaultVariants: {
|
|
249
249
|
variant: "default"
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
251
|
+
}), ht = B("text-xs font-semibold", {
|
|
252
252
|
variants: {
|
|
253
253
|
variant: {
|
|
254
254
|
default: "text-primary-foreground",
|
|
@@ -261,84 +261,84 @@ const at = I("flex-row items-center rounded-md border px-2 py-0.5", {
|
|
|
261
261
|
variant: "default"
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
function
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
className:
|
|
264
|
+
function jr({ className: t, textClassName: e, variant: o, children: s, ...l }) {
|
|
265
|
+
return /* @__PURE__ */ r(i, { className: n(bt({ variant: o }), t), ...l, children: _(s, m, {
|
|
266
|
+
className: n(ht({ variant: o }), e)
|
|
267
267
|
}) });
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
({ className:
|
|
269
|
+
const Lr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "breadcrumb is not yet implemented for React Native" }) }), Br = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "calendar is not yet implemented for React Native" }) }), yt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("border-border bg-card rounded-xl border shadow-sm", t), ...e }));
|
|
270
|
+
yt.displayName = "Card";
|
|
271
|
+
const xt = a.forwardRef(
|
|
272
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("flex flex-col space-y-1.5 p-6", t), ...e })
|
|
273
273
|
);
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
({ className:
|
|
277
|
-
|
|
274
|
+
xt.displayName = "CardHeader";
|
|
275
|
+
const Nt = a.forwardRef(
|
|
276
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
277
|
+
m,
|
|
278
278
|
{
|
|
279
|
-
ref:
|
|
280
|
-
className:
|
|
279
|
+
ref: o,
|
|
280
|
+
className: n("text-card-foreground text-lg leading-none font-semibold tracking-tight", t),
|
|
281
281
|
...e
|
|
282
282
|
}
|
|
283
283
|
)
|
|
284
284
|
);
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
({ className:
|
|
285
|
+
Nt.displayName = "CardTitle";
|
|
286
|
+
const wt = a.forwardRef(
|
|
287
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(m, { ref: o, className: n("text-muted-foreground text-sm", t), ...e })
|
|
288
288
|
);
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
({ className:
|
|
289
|
+
wt.displayName = "CardDescription";
|
|
290
|
+
const vt = a.forwardRef(
|
|
291
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("p-6 pt-0", t), ...e, children: _(e.children, m, { className: "text-sm text-card-foreground" }) })
|
|
292
292
|
);
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
({ className:
|
|
293
|
+
vt.displayName = "CardContent";
|
|
294
|
+
const Rt = a.forwardRef(
|
|
295
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("flex flex-row items-center p-6 pt-0", t), ...e })
|
|
296
296
|
);
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
|
|
297
|
+
Rt.displayName = "CardFooter";
|
|
298
|
+
const Er = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "carousel is not yet implemented for React Native" }) }), Gr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "chart is not yet implemented for React Native" }) }), Tt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
299
|
+
J.Root,
|
|
300
300
|
{
|
|
301
|
-
ref:
|
|
302
|
-
className:
|
|
301
|
+
ref: o,
|
|
302
|
+
className: n(
|
|
303
303
|
"web:peer native:h-[20] native:w-[20] native:rounded border-primary web:ring-offset-background web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 h-4 w-4 shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:opacity-50",
|
|
304
304
|
e.checked && "bg-primary",
|
|
305
|
-
|
|
305
|
+
t
|
|
306
306
|
),
|
|
307
307
|
...e,
|
|
308
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ r(J.Indicator, { className: n("h-full w-full items-center justify-center"), children: /* @__PURE__ */ r(de, { size: 12, strokeWidth: H.OS === "web" ? 2.5 : 3.5, className: "text-primary-foreground" }) })
|
|
309
309
|
}
|
|
310
310
|
));
|
|
311
|
-
|
|
312
|
-
const
|
|
313
|
-
|
|
311
|
+
Tt.displayName = J.Root?.displayName || "Checkbox";
|
|
312
|
+
const Mr = te.Root, Ur = te.Trigger, $r = te.Content, Yr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "command is not yet implemented for React Native" }) }), qr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "context-menu is not yet implemented for React Native" }) }), Ct = u.Root, Wr = u.Trigger, St = u.Portal, Xr = u.Close, ge = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(u.Overlay, { style: U.absoluteFill, asChild: !0, ref: o, ...e, children: /* @__PURE__ */ r(
|
|
313
|
+
k.View,
|
|
314
314
|
{
|
|
315
|
-
entering:
|
|
316
|
-
exiting:
|
|
317
|
-
className:
|
|
315
|
+
entering: L.duration(150),
|
|
316
|
+
exiting: j.duration(150),
|
|
317
|
+
className: n("z-50 flex items-center justify-center bg-black/80 p-2", t)
|
|
318
318
|
}
|
|
319
319
|
) }));
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
({ className:
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
|
|
320
|
+
ge.displayName = u.Overlay?.displayName || "DialogOverlay";
|
|
321
|
+
const be = a.forwardRef(
|
|
322
|
+
({ className: t, children: e, portalHost: o, overlayClassName: s, overlayStyle: l, ...d }, c) => /* @__PURE__ */ g(St, { hostName: o, children: [
|
|
323
|
+
/* @__PURE__ */ r(ge, { className: s, style: l }),
|
|
324
|
+
/* @__PURE__ */ r(u.Content, { ref: c, asChild: !0, ...d, children: /* @__PURE__ */ g(
|
|
325
|
+
k.View,
|
|
326
326
|
{
|
|
327
|
-
entering:
|
|
328
|
-
exiting:
|
|
329
|
-
className:
|
|
327
|
+
entering: L.duration(150),
|
|
328
|
+
exiting: j.duration(150),
|
|
329
|
+
className: n(
|
|
330
330
|
"border-border bg-background z-50 w-full max-w-lg gap-4 rounded-xl border p-6 shadow-lg sm:rounded-lg",
|
|
331
|
-
|
|
331
|
+
t
|
|
332
332
|
),
|
|
333
333
|
children: [
|
|
334
334
|
e,
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
|
|
335
|
+
/* @__PURE__ */ g(
|
|
336
|
+
u.Close,
|
|
337
337
|
{
|
|
338
338
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",
|
|
339
339
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ r(ee, { size: 18, className: "text-muted-foreground" }),
|
|
341
|
+
/* @__PURE__ */ r(i, { className: "sr-only", children: /* @__PURE__ */ r(u.Title, { children: "Close" }) })
|
|
342
342
|
]
|
|
343
343
|
}
|
|
344
344
|
)
|
|
@@ -347,225 +347,352 @@ const ut = n.forwardRef(
|
|
|
347
347
|
) })
|
|
348
348
|
] })
|
|
349
349
|
);
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
|
|
350
|
+
be.displayName = u.Content?.displayName || "DialogContent";
|
|
351
|
+
const he = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col gap-1.5 text-center sm:text-left", t), ...e });
|
|
352
|
+
he.displayName = "DialogHeader";
|
|
353
|
+
const kt = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t), ...e });
|
|
354
|
+
kt.displayName = "DialogFooter";
|
|
355
|
+
const ye = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
356
|
+
u.Title,
|
|
357
357
|
{
|
|
358
|
-
ref:
|
|
359
|
-
className:
|
|
358
|
+
ref: o,
|
|
359
|
+
className: n("native:text-xl text-foreground text-lg leading-none font-semibold tracking-tight", t),
|
|
360
360
|
...e
|
|
361
361
|
}
|
|
362
362
|
));
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
|
|
363
|
+
ye.displayName = u.Title?.displayName || "DialogTitle";
|
|
364
|
+
const xe = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
365
|
+
u.Description,
|
|
366
366
|
{
|
|
367
|
-
ref:
|
|
368
|
-
className:
|
|
367
|
+
ref: o,
|
|
368
|
+
className: n("native:text-base text-muted-foreground text-sm", t),
|
|
369
369
|
...e
|
|
370
370
|
}
|
|
371
371
|
));
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
({ className:
|
|
375
|
-
|
|
372
|
+
xe.displayName = u.Description?.displayName || "DialogDescription";
|
|
373
|
+
const _r = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "drawer is not yet implemented for React Native" }) }), Jr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "dropdown-menu is not yet implemented for React Native" }) }), Kr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "form is not yet implemented for React Native" }) }), Qr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "hover-card is not yet implemented for React Native" }) }), At = a.forwardRef(
|
|
374
|
+
({ className: t, placeholderClassName: e, ...o }, s) => /* @__PURE__ */ r(
|
|
375
|
+
ie,
|
|
376
376
|
{
|
|
377
|
-
ref:
|
|
378
|
-
className:
|
|
377
|
+
ref: s,
|
|
378
|
+
className: n(
|
|
379
379
|
"border-input text-foreground placeholder:text-muted-foreground focus:border-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm transition-colors disabled:opacity-50",
|
|
380
|
-
|
|
380
|
+
t
|
|
381
381
|
),
|
|
382
|
-
placeholderClassName:
|
|
383
|
-
...
|
|
382
|
+
placeholderClassName: n("text-muted-foreground", e),
|
|
383
|
+
...o
|
|
384
384
|
}
|
|
385
385
|
)
|
|
386
386
|
);
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
|
|
387
|
+
At.displayName = "Input";
|
|
388
|
+
const Dt = a.forwardRef(({ className: t, onPress: e, onLongPress: o, onPressIn: s, onPressOut: l, ...d }, c) => /* @__PURE__ */ r(
|
|
389
|
+
K.Root,
|
|
390
390
|
{
|
|
391
391
|
className: "web:cursor-default",
|
|
392
392
|
onPress: e,
|
|
393
|
-
onLongPress:
|
|
394
|
-
onPressIn:
|
|
393
|
+
onLongPress: o,
|
|
394
|
+
onPressIn: s,
|
|
395
395
|
onPressOut: l,
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
|
|
396
|
+
children: /* @__PURE__ */ r(
|
|
397
|
+
K.Text,
|
|
398
398
|
{
|
|
399
|
-
ref:
|
|
400
|
-
className:
|
|
399
|
+
ref: c,
|
|
400
|
+
className: n(
|
|
401
401
|
"text-foreground native:text-base web:peer-disabled:cursor-not-allowed web:peer-disabled:opacity-70 text-sm leading-none font-medium",
|
|
402
|
-
|
|
402
|
+
t
|
|
403
403
|
),
|
|
404
404
|
...d
|
|
405
405
|
}
|
|
406
406
|
)
|
|
407
407
|
}
|
|
408
408
|
));
|
|
409
|
-
|
|
410
|
-
const
|
|
411
|
-
|
|
409
|
+
Dt.displayName = K.Root?.displayName || "Label";
|
|
410
|
+
const Zr = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "menubar is not yet implemented for React Native" }) }), eo = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "navigation-menu is not yet implemented for React Native" }) }), to = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "pagination is not yet implemented for React Native" }) }), oe = a.createContext({
|
|
411
|
+
open: !1,
|
|
412
|
+
setOpen: () => {
|
|
413
|
+
}
|
|
414
|
+
}), Pt = a.forwardRef(({ children: t, open: e, onOpenChange: o, ...s }, l) => {
|
|
415
|
+
const [d, c] = a.useState(!1), f = e !== void 0, y = f ? e : d, w = f ? o || (() => {
|
|
416
|
+
}) : c;
|
|
417
|
+
return /* @__PURE__ */ r(oe.Provider, { value: { open: y, setOpen: w }, children: /* @__PURE__ */ r(i, { ref: l, ...s, children: t }) });
|
|
418
|
+
});
|
|
419
|
+
Pt.displayName = "Popover";
|
|
420
|
+
const Ot = a.forwardRef(({ children: t, ...e }, o) => {
|
|
421
|
+
const { setOpen: s } = a.useContext(oe);
|
|
422
|
+
return /* @__PURE__ */ r($, { ref: o, onPress: () => s(!0), ...e, children: t });
|
|
423
|
+
});
|
|
424
|
+
Ot.displayName = "PopoverTrigger";
|
|
425
|
+
const It = a.forwardRef(({ ...t }, e) => /* @__PURE__ */ r(i, { ref: e, ...t }));
|
|
426
|
+
It.displayName = "PopoverAnchor";
|
|
427
|
+
const Vt = a.forwardRef(({ className: t, children: e, ...o }, s) => {
|
|
428
|
+
const { open: l, setOpen: d } = a.useContext(oe);
|
|
429
|
+
return /* @__PURE__ */ r(Se, { visible: l, transparent: !0, animationType: "fade", onRequestClose: () => d(!1), children: /* @__PURE__ */ r($, { className: "flex-1", onPress: () => d(!1), children: /* @__PURE__ */ r(i, { className: "flex-1 items-center justify-center bg-black/50", children: /* @__PURE__ */ r($, { onPress: () => {
|
|
430
|
+
}, children: /* @__PURE__ */ r(
|
|
431
|
+
i,
|
|
432
|
+
{
|
|
433
|
+
ref: s,
|
|
434
|
+
className: n("bg-popover border-border mx-4 w-full max-w-sm rounded-md border p-4 shadow-lg", t),
|
|
435
|
+
...o,
|
|
436
|
+
children: e
|
|
437
|
+
}
|
|
438
|
+
) }) }) }) });
|
|
439
|
+
});
|
|
440
|
+
Vt.displayName = "PopoverContent";
|
|
441
|
+
const zt = a.forwardRef(({ className: t, value: e, ...o }, s) => /* @__PURE__ */ r(
|
|
442
|
+
i,
|
|
443
|
+
{
|
|
444
|
+
ref: s,
|
|
445
|
+
className: n("bg-muted relative h-2 w-full overflow-hidden rounded-full", t),
|
|
446
|
+
accessibilityRole: "progressbar",
|
|
447
|
+
role: "progressbar",
|
|
448
|
+
...o,
|
|
449
|
+
children: /* @__PURE__ */ r(i, { className: "bg-primary h-full rounded-full", style: { width: `${e || 0}%` } })
|
|
450
|
+
}
|
|
451
|
+
));
|
|
452
|
+
zt.displayName = "Progress";
|
|
453
|
+
const Ht = a.forwardRef(
|
|
454
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(G.Root, { className: n("web:grid gap-2", t), ...e, ref: o })
|
|
412
455
|
);
|
|
413
|
-
|
|
414
|
-
const
|
|
415
|
-
({ className:
|
|
416
|
-
|
|
456
|
+
Ht.displayName = G.Root?.displayName || "RadioGroup";
|
|
457
|
+
const Ft = a.forwardRef(
|
|
458
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
459
|
+
G.Item,
|
|
417
460
|
{
|
|
418
|
-
ref:
|
|
419
|
-
className:
|
|
461
|
+
ref: o,
|
|
462
|
+
className: n(
|
|
420
463
|
"native:h-5 native:w-5 border-primary text-primary web:ring-offset-background web:focus:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 aspect-square h-4 w-4 rounded-full border",
|
|
421
464
|
e.disabled && "web:cursor-not-allowed opacity-50",
|
|
422
|
-
|
|
465
|
+
t
|
|
423
466
|
),
|
|
424
467
|
...e,
|
|
425
|
-
children: /* @__PURE__ */
|
|
468
|
+
children: /* @__PURE__ */ r(G.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ r(Ie, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
426
469
|
}
|
|
427
470
|
)
|
|
428
471
|
);
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
({ className:
|
|
432
|
-
|
|
472
|
+
Ft.displayName = G.Item?.displayName || "RadioGroupItem";
|
|
473
|
+
const ro = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "ResizablePanelGroup is not yet implemented for React Native" }) }), oo = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "ResizablePanel is not yet implemented for React Native" }) }), ao = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "ResizableHandle is not yet implemented for React Native" }) }), no = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "scroll-area is not yet implemented for React Native" }) }), so = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "Search is not yet implemented for React Native" }) }), io = p.Root, lo = p.Group, co = p.Value, jt = a.forwardRef(
|
|
474
|
+
({ className: t, children: e, ...o }, s) => /* @__PURE__ */ g(
|
|
475
|
+
p.Trigger,
|
|
433
476
|
{
|
|
434
|
-
ref:
|
|
435
|
-
className:
|
|
477
|
+
ref: s,
|
|
478
|
+
className: n(
|
|
436
479
|
"native:h-12 border-input bg-background text-muted-foreground web:ring-offset-background web:focus:outline-none web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 flex h-10 flex-row items-center justify-between rounded-md border px-3 py-2 text-sm [&>span]:line-clamp-1",
|
|
437
|
-
|
|
438
|
-
|
|
480
|
+
o.disabled && "web:cursor-not-allowed opacity-50",
|
|
481
|
+
t
|
|
439
482
|
),
|
|
440
|
-
...
|
|
483
|
+
...o,
|
|
441
484
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ r(W, { children: e }),
|
|
486
|
+
/* @__PURE__ */ r(Z, { size: 16, "aria-hidden": !0, className: "text-foreground opacity-50" })
|
|
444
487
|
]
|
|
445
488
|
}
|
|
446
489
|
)
|
|
447
490
|
);
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
|
|
491
|
+
jt.displayName = p.Trigger?.displayName || "SelectTrigger";
|
|
492
|
+
const Ne = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
493
|
+
p.ScrollUpButton,
|
|
451
494
|
{
|
|
452
|
-
ref:
|
|
453
|
-
className:
|
|
495
|
+
ref: o,
|
|
496
|
+
className: n("flex cursor-default items-center justify-center py-1", t),
|
|
454
497
|
...e,
|
|
455
|
-
children: /* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ r(Ve, { size: 14, className: "text-foreground" })
|
|
456
499
|
}
|
|
457
500
|
));
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
|
|
501
|
+
Ne.displayName = p.ScrollUpButton?.displayName || "SelectScrollUpButton";
|
|
502
|
+
const we = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
503
|
+
p.ScrollDownButton,
|
|
461
504
|
{
|
|
462
|
-
ref:
|
|
463
|
-
className:
|
|
505
|
+
ref: o,
|
|
506
|
+
className: n("flex cursor-default items-center justify-center py-1", t),
|
|
464
507
|
...e,
|
|
465
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ r(Z, { size: 14, className: "text-foreground" })
|
|
466
509
|
}
|
|
467
510
|
));
|
|
468
|
-
|
|
469
|
-
const
|
|
470
|
-
({ className:
|
|
471
|
-
const { open:
|
|
472
|
-
return /* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
|
|
511
|
+
we.displayName = p.ScrollDownButton?.displayName || "SelectScrollDownButton";
|
|
512
|
+
const Lt = a.forwardRef(
|
|
513
|
+
({ className: t, children: e, position: o = "popper", portalHost: s, overlayClassName: l, overlayStyle: d, ...c }, f) => {
|
|
514
|
+
const { open: y } = p.useRootContext();
|
|
515
|
+
return /* @__PURE__ */ g(p.Portal, { hostName: s, children: [
|
|
516
|
+
/* @__PURE__ */ r(p.Overlay, { style: H.OS !== "web" ? U.absoluteFill : void 0, asChild: !0, children: /* @__PURE__ */ r(k.View, { className: l, style: d }) }),
|
|
517
|
+
/* @__PURE__ */ g(
|
|
518
|
+
p.Content,
|
|
476
519
|
{
|
|
477
|
-
ref:
|
|
478
|
-
className:
|
|
520
|
+
ref: f,
|
|
521
|
+
className: n(
|
|
479
522
|
"border-border bg-popover data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] rounded-md border shadow-md",
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
523
|
+
o === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
524
|
+
y ? "web:zoom-in-95 web:animate-in web:fade-in-0" : "web:zoom-out-95 web:animate-out web:fade-out-0",
|
|
525
|
+
t
|
|
483
526
|
),
|
|
484
|
-
position:
|
|
485
|
-
...
|
|
527
|
+
position: o,
|
|
528
|
+
...c,
|
|
486
529
|
children: [
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
530
|
+
/* @__PURE__ */ r(Ne, {}),
|
|
531
|
+
/* @__PURE__ */ r(
|
|
532
|
+
p.Viewport,
|
|
490
533
|
{
|
|
491
|
-
className:
|
|
534
|
+
className: n(
|
|
492
535
|
"p-1",
|
|
493
|
-
|
|
536
|
+
o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
494
537
|
),
|
|
495
538
|
children: e
|
|
496
539
|
}
|
|
497
540
|
),
|
|
498
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ r(we, {})
|
|
499
542
|
]
|
|
500
543
|
}
|
|
501
544
|
)
|
|
502
545
|
] });
|
|
503
546
|
}
|
|
504
547
|
);
|
|
505
|
-
|
|
506
|
-
const
|
|
507
|
-
({ className:
|
|
508
|
-
|
|
548
|
+
Lt.displayName = p.Content?.displayName || "SelectContent";
|
|
549
|
+
const Bt = a.forwardRef(
|
|
550
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
551
|
+
p.Label,
|
|
509
552
|
{
|
|
510
|
-
ref:
|
|
511
|
-
className:
|
|
553
|
+
ref: o,
|
|
554
|
+
className: n("text-popover-foreground py-1.5 pr-2 pl-8 text-sm font-semibold", t),
|
|
512
555
|
...e
|
|
513
556
|
}
|
|
514
557
|
)
|
|
515
558
|
);
|
|
516
|
-
|
|
517
|
-
const
|
|
518
|
-
({ className:
|
|
519
|
-
const d =
|
|
520
|
-
return /* @__PURE__ */
|
|
521
|
-
|
|
559
|
+
Bt.displayName = p.Label?.displayName || "SelectLabel";
|
|
560
|
+
const Et = a.forwardRef(
|
|
561
|
+
({ className: t, children: e, label: o, ...s }, l) => {
|
|
562
|
+
const d = o || (typeof e == "string" ? e : "");
|
|
563
|
+
return /* @__PURE__ */ g(
|
|
564
|
+
p.Item,
|
|
522
565
|
{
|
|
523
566
|
ref: l,
|
|
524
567
|
label: d,
|
|
525
|
-
className:
|
|
568
|
+
className: n(
|
|
526
569
|
"web:hover:bg-accent/50 web:focus:bg-accent web:focus:text-accent-foreground web:hover:text-accent-foreground relative flex w-full cursor-default flex-row items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:opacity-50",
|
|
527
|
-
|
|
528
|
-
|
|
570
|
+
s.disabled && "web:pointer-events-none",
|
|
571
|
+
t
|
|
529
572
|
),
|
|
530
|
-
...
|
|
573
|
+
...s,
|
|
531
574
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
|
|
575
|
+
/* @__PURE__ */ r(
|
|
576
|
+
i,
|
|
534
577
|
{
|
|
535
578
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
536
|
-
children: /* @__PURE__ */
|
|
579
|
+
children: /* @__PURE__ */ r(p.ItemIndicator, { children: /* @__PURE__ */ r(de, { size: 14, strokeWidth: 3, className: "text-popover-foreground" }) })
|
|
537
580
|
}
|
|
538
581
|
),
|
|
539
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ r(p.ItemText, { className: "text-popover-foreground native:text-base text-sm", children: e })
|
|
540
583
|
]
|
|
541
584
|
}
|
|
542
585
|
);
|
|
543
586
|
}
|
|
544
587
|
);
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
({ className:
|
|
548
|
-
|
|
588
|
+
Et.displayName = p.Item?.displayName || "SelectItem";
|
|
589
|
+
const Gt = a.forwardRef(
|
|
590
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
591
|
+
p.Separator,
|
|
549
592
|
{
|
|
550
|
-
ref:
|
|
551
|
-
className:
|
|
593
|
+
ref: o,
|
|
594
|
+
className: n("bg-muted -mx-1 my-1 h-px", t),
|
|
552
595
|
...e
|
|
553
596
|
}
|
|
554
597
|
)
|
|
555
598
|
);
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
599
|
+
Gt.displayName = p.Separator?.displayName || "SelectSeparator";
|
|
600
|
+
const Mt = a.forwardRef(
|
|
601
|
+
({
|
|
602
|
+
threshold: t = 240,
|
|
603
|
+
exitDuration: e = 450,
|
|
604
|
+
behavior: o,
|
|
605
|
+
// Native uses 'smooth' or just scrolls
|
|
606
|
+
label: s = "Scroll to top",
|
|
607
|
+
className: l,
|
|
608
|
+
scrollRef: d,
|
|
609
|
+
animationDuration: c = 300,
|
|
610
|
+
...f
|
|
611
|
+
}, y) => {
|
|
612
|
+
const [w, O] = a.useState(!1), [I, V] = a.useState(!1), b = a.useRef(new P.Value(0)).current, h = a.useRef(new P.Value(20)).current, v = () => {
|
|
613
|
+
P.parallel([
|
|
614
|
+
P.timing(b, {
|
|
615
|
+
toValue: 1,
|
|
616
|
+
duration: c,
|
|
617
|
+
useNativeDriver: !0
|
|
618
|
+
}),
|
|
619
|
+
P.timing(h, {
|
|
620
|
+
toValue: 0,
|
|
621
|
+
duration: c,
|
|
622
|
+
useNativeDriver: !0
|
|
623
|
+
})
|
|
624
|
+
]).start();
|
|
625
|
+
}, R = () => {
|
|
626
|
+
P.parallel([
|
|
627
|
+
P.timing(b, {
|
|
628
|
+
toValue: 0,
|
|
629
|
+
duration: c,
|
|
630
|
+
useNativeDriver: !0
|
|
631
|
+
}),
|
|
632
|
+
P.timing(h, {
|
|
633
|
+
toValue: 20,
|
|
634
|
+
duration: c,
|
|
635
|
+
useNativeDriver: !0
|
|
636
|
+
})
|
|
637
|
+
]).start(() => {
|
|
638
|
+
I || O(!1);
|
|
639
|
+
});
|
|
640
|
+
}, D = (C) => {
|
|
641
|
+
const x = C.nativeEvent.contentOffset.y;
|
|
642
|
+
if (I) {
|
|
643
|
+
x <= t && (O(!1), V(!1));
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
x > t && !w ? (O(!0), v()) : x <= t && w && R();
|
|
647
|
+
}, z = () => {
|
|
648
|
+
V(!0), R(), setTimeout(() => {
|
|
649
|
+
if (d?.current) {
|
|
650
|
+
const C = d.current;
|
|
651
|
+
"scrollToOffset" in C && typeof C.scrollToOffset == "function" ? C.scrollToOffset({ offset: 0, animated: o !== "auto" }) : "scrollTo" in C && typeof C.scrollTo == "function" && C.scrollTo({ y: 0, animated: o !== "auto" });
|
|
652
|
+
}
|
|
653
|
+
(H.OS === "ios" || H.OS === "android") && ke.announceForAccessibility("Scrolled to top");
|
|
654
|
+
}, e);
|
|
655
|
+
};
|
|
656
|
+
return a.useImperativeHandle(y, () => ({
|
|
657
|
+
handleScroll: D,
|
|
658
|
+
scrollToTop: z
|
|
659
|
+
})), !w && !I ? null : /* @__PURE__ */ r(
|
|
660
|
+
i,
|
|
661
|
+
{
|
|
662
|
+
pointerEvents: "box-none",
|
|
663
|
+
style: {
|
|
664
|
+
position: "absolute",
|
|
665
|
+
bottom: 24,
|
|
666
|
+
right: 24,
|
|
667
|
+
zIndex: 50
|
|
668
|
+
},
|
|
669
|
+
children: /* @__PURE__ */ r(
|
|
670
|
+
P.View,
|
|
671
|
+
{
|
|
672
|
+
style: {
|
|
673
|
+
opacity: b,
|
|
674
|
+
transform: [{ translateY: h }]
|
|
675
|
+
},
|
|
676
|
+
children: /* @__PURE__ */ r(
|
|
677
|
+
q,
|
|
678
|
+
{
|
|
679
|
+
variant: "outline",
|
|
680
|
+
size: "icon",
|
|
681
|
+
className: n("bg-background/80 h-12 w-12 rounded-full border-2 shadow-lg", l),
|
|
682
|
+
onPress: z,
|
|
683
|
+
"aria-label": s,
|
|
684
|
+
...f,
|
|
685
|
+
children: /* @__PURE__ */ r(ze, { size: 24, className: "text-foreground" })
|
|
686
|
+
}
|
|
687
|
+
)
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
}
|
|
691
|
+
);
|
|
565
692
|
}
|
|
566
|
-
)
|
|
567
|
-
|
|
568
|
-
const
|
|
693
|
+
);
|
|
694
|
+
Mt.displayName = "ScrollToTop";
|
|
695
|
+
const ae = a.createContext(void 0), Ut = B("text-foreground", {
|
|
569
696
|
variants: {
|
|
570
697
|
variant: {
|
|
571
698
|
h1: "text-4xl font-extrabold tracking-tight",
|
|
@@ -582,58 +709,163 @@ const J = n.createContext(void 0), kt = I("text-foreground", {
|
|
|
582
709
|
defaultVariants: {
|
|
583
710
|
variant: "body"
|
|
584
711
|
}
|
|
585
|
-
}), S =
|
|
586
|
-
({ className:
|
|
712
|
+
}), S = a.forwardRef(
|
|
713
|
+
({ className: t, variant: e = "body", children: o, ...s }, l) => /* @__PURE__ */ r(m, { ref: l, className: n(Ut({ variant: e, className: t })), ...s, children: o })
|
|
587
714
|
);
|
|
588
715
|
S.displayName = "Text";
|
|
589
|
-
const
|
|
590
|
-
|
|
716
|
+
const $t = (t) => {
|
|
717
|
+
const e = t.trim();
|
|
718
|
+
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
719
|
+
}, Yt = (t) => t.trim().replace(/^@+/, ""), qt = (t, e) => {
|
|
720
|
+
const o = $t(t), s = encodeURIComponent(Yt(e));
|
|
721
|
+
return `${o}/${s}`;
|
|
722
|
+
};
|
|
723
|
+
function mo({
|
|
724
|
+
supportUrl: t = "https://www.buymeacoffee.com",
|
|
725
|
+
creatorId: e,
|
|
726
|
+
title: o = "Buy me a coffee",
|
|
727
|
+
description: s = "Support the project directly from this panel.",
|
|
728
|
+
open: l,
|
|
729
|
+
defaultOpen: d = !1,
|
|
730
|
+
onOpenChange: c,
|
|
731
|
+
positionClassName: f,
|
|
732
|
+
buttonClassName: y,
|
|
733
|
+
panelClassName: w,
|
|
734
|
+
className: O,
|
|
735
|
+
...I
|
|
736
|
+
}) {
|
|
737
|
+
const V = l !== void 0, [b, h] = a.useState(d), v = V ? l : b, R = a.useCallback(
|
|
738
|
+
(x) => {
|
|
739
|
+
V || h(x), c?.(x);
|
|
740
|
+
},
|
|
741
|
+
[V, c]
|
|
742
|
+
), D = a.useMemo(() => qt(t, e), [e, t]), z = a.useCallback(async () => {
|
|
743
|
+
try {
|
|
744
|
+
await Ae.openURL(D);
|
|
745
|
+
} catch (x) {
|
|
746
|
+
console.warn("Failed to open external link:", x);
|
|
747
|
+
}
|
|
748
|
+
}, [D]), C = /* @__PURE__ */ r(
|
|
749
|
+
i,
|
|
750
|
+
{
|
|
751
|
+
style: {
|
|
752
|
+
position: "absolute",
|
|
753
|
+
bottom: 24,
|
|
754
|
+
right: 24,
|
|
755
|
+
zIndex: 50
|
|
756
|
+
},
|
|
757
|
+
className: f,
|
|
758
|
+
children: /* @__PURE__ */ r(
|
|
759
|
+
q,
|
|
760
|
+
{
|
|
761
|
+
variant: "outline",
|
|
762
|
+
size: "icon",
|
|
763
|
+
className: n(
|
|
764
|
+
"h-14 w-14 rounded-full border border-black/15 bg-[#ffdd00] shadow-lg",
|
|
765
|
+
y,
|
|
766
|
+
O
|
|
767
|
+
),
|
|
768
|
+
onPress: () => R(!0),
|
|
769
|
+
"aria-label": "Support this project",
|
|
770
|
+
...I,
|
|
771
|
+
children: /* @__PURE__ */ r(He, { size: 24, className: "text-black" })
|
|
772
|
+
}
|
|
773
|
+
)
|
|
774
|
+
}
|
|
775
|
+
);
|
|
776
|
+
return /* @__PURE__ */ g(W, { children: [
|
|
777
|
+
C,
|
|
778
|
+
/* @__PURE__ */ r(Ct, { open: v, onOpenChange: R, children: /* @__PURE__ */ g(be, { className: n("max-w-sm", w), children: [
|
|
779
|
+
/* @__PURE__ */ g(he, { children: [
|
|
780
|
+
/* @__PURE__ */ r(ye, { children: o }),
|
|
781
|
+
/* @__PURE__ */ r(xe, { children: s })
|
|
782
|
+
] }),
|
|
783
|
+
/* @__PURE__ */ g(i, { className: "flex flex-col gap-4", children: [
|
|
784
|
+
/* @__PURE__ */ r(i, { className: "overflow-hidden rounded-md border", children: /* @__PURE__ */ r(i, { className: "bg-muted flex h-48 items-center justify-center", children: /* @__PURE__ */ g(S, { className: "text-muted-foreground text-center text-sm", children: [
|
|
785
|
+
"Embedded support form would appear here on web.",
|
|
786
|
+
`
|
|
787
|
+
`,
|
|
788
|
+
"On mobile, this opens the external support page."
|
|
789
|
+
] }) }) }),
|
|
790
|
+
/* @__PURE__ */ g(i, { className: "text-muted-foreground flex items-center justify-between gap-2 text-xs", children: [
|
|
791
|
+
/* @__PURE__ */ r(S, { className: "text-muted-foreground flex-1 text-xs", children: "If the embedded checkout is unavailable, open the support page directly." }),
|
|
792
|
+
/* @__PURE__ */ g(
|
|
793
|
+
q,
|
|
794
|
+
{
|
|
795
|
+
variant: "outline",
|
|
796
|
+
size: "sm",
|
|
797
|
+
onPress: z,
|
|
798
|
+
className: "flex flex-row items-center gap-1",
|
|
799
|
+
children: [
|
|
800
|
+
/* @__PURE__ */ r(S, { className: "text-xs", children: "Open Buy Me a Coffee" }),
|
|
801
|
+
/* @__PURE__ */ r(Fe, { size: 12, className: "text-muted-foreground" })
|
|
802
|
+
]
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
] })
|
|
806
|
+
] })
|
|
807
|
+
] }) })
|
|
808
|
+
] });
|
|
809
|
+
}
|
|
810
|
+
const Wt = a.forwardRef(({ className: t, orientation: e = "horizontal", decorative: o = !0, ...s }, l) => /* @__PURE__ */ r(
|
|
811
|
+
me.Root,
|
|
812
|
+
{
|
|
813
|
+
ref: l,
|
|
814
|
+
decorative: o,
|
|
815
|
+
orientation: e,
|
|
816
|
+
className: n("bg-border shrink-0", e === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", t),
|
|
817
|
+
...s
|
|
818
|
+
}
|
|
819
|
+
));
|
|
820
|
+
Wt.displayName = me.Root?.displayName || "Separator";
|
|
821
|
+
const uo = u.Root, fo = u.Trigger, po = u.Close, Xt = u.Portal, ve = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
822
|
+
u.Overlay,
|
|
591
823
|
{
|
|
592
|
-
style:
|
|
824
|
+
style: H.OS !== "web" ? U.absoluteFill : void 0,
|
|
593
825
|
asChild: !0,
|
|
594
|
-
ref:
|
|
826
|
+
ref: o,
|
|
595
827
|
...e,
|
|
596
|
-
children: /* @__PURE__ */
|
|
597
|
-
|
|
828
|
+
children: /* @__PURE__ */ r(
|
|
829
|
+
k.View,
|
|
598
830
|
{
|
|
599
|
-
entering:
|
|
600
|
-
exiting:
|
|
601
|
-
className:
|
|
831
|
+
entering: L.duration(150),
|
|
832
|
+
exiting: j.duration(150),
|
|
833
|
+
className: n("web:cursor-default absolute inset-0 z-50 bg-black/80", t)
|
|
602
834
|
}
|
|
603
835
|
)
|
|
604
836
|
}
|
|
605
837
|
));
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
({ className:
|
|
609
|
-
const
|
|
610
|
-
return /* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
613
|
-
|
|
838
|
+
ve.displayName = u.Overlay?.displayName || "SheetOverlay";
|
|
839
|
+
const _t = a.forwardRef(
|
|
840
|
+
({ className: t, children: e, side: o = "right", overlayClassName: s, overlayStyle: l, ...d }, c) => {
|
|
841
|
+
const f = H.OS === "web", y = f ? void 0 : Ge, w = f ? void 0 : Ee;
|
|
842
|
+
return /* @__PURE__ */ g(Xt, { children: [
|
|
843
|
+
/* @__PURE__ */ r(ve, { className: s, style: l }),
|
|
844
|
+
/* @__PURE__ */ r(u.Content, { ref: c, asChild: !0, ...d, children: /* @__PURE__ */ g(
|
|
845
|
+
k.View,
|
|
614
846
|
{
|
|
615
|
-
entering:
|
|
616
|
-
exiting:
|
|
617
|
-
className:
|
|
847
|
+
entering: y,
|
|
848
|
+
exiting: w,
|
|
849
|
+
className: n(
|
|
618
850
|
"bg-background web:cursor-default web:duration-200 web:ease-in-out absolute z-50 h-full w-3/4 gap-4 p-6 shadow-lg",
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
851
|
+
o === "right" && "border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right top-0 right-0 border-l",
|
|
852
|
+
o === "left" && "border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left top-0 left-0 border-r",
|
|
853
|
+
o === "top" && "border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top top-0 w-full border-b",
|
|
854
|
+
o === "bottom" && "border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom bottom-0 w-full border-t",
|
|
855
|
+
t
|
|
624
856
|
),
|
|
625
857
|
children: [
|
|
626
858
|
e,
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
|
|
859
|
+
/* @__PURE__ */ g(
|
|
860
|
+
u.Close,
|
|
629
861
|
{
|
|
630
|
-
className:
|
|
862
|
+
className: n(
|
|
631
863
|
"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",
|
|
632
864
|
"web:absolute web:right-4 web:top-4"
|
|
633
865
|
),
|
|
634
866
|
children: [
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ r(ee, { size: 24, className: "text-muted-foreground" }),
|
|
868
|
+
/* @__PURE__ */ r(S, { className: "sr-only", children: "Close" })
|
|
637
869
|
]
|
|
638
870
|
}
|
|
639
871
|
)
|
|
@@ -643,46 +875,46 @@ const Pt = n.forwardRef(
|
|
|
643
875
|
] });
|
|
644
876
|
}
|
|
645
877
|
);
|
|
646
|
-
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
function
|
|
656
|
-
const
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
878
|
+
_t.displayName = u.Content?.displayName || "SheetContent";
|
|
879
|
+
const Jt = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col space-y-2 text-center sm:text-left", t), ...e });
|
|
880
|
+
Jt.displayName = "SheetHeader";
|
|
881
|
+
const Kt = ({ className: t, ...e }) => /* @__PURE__ */ r(i, { className: n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t), ...e });
|
|
882
|
+
Kt.displayName = "SheetFooter";
|
|
883
|
+
const Qt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(u.Title, { ref: o, className: n("text-foreground text-lg font-semibold", t), ...e }));
|
|
884
|
+
Qt.displayName = u.Title?.displayName || "SheetTitle";
|
|
885
|
+
const Zt = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(u.Description, { ref: o, className: n("text-muted-foreground text-sm", t), ...e }));
|
|
886
|
+
Zt.displayName = u.Description?.displayName || "SheetDescription";
|
|
887
|
+
function go({ className: t, ...e }) {
|
|
888
|
+
const o = Me(0.5);
|
|
889
|
+
a.useEffect(() => {
|
|
890
|
+
o.value = Ue(
|
|
891
|
+
$e(Y(0.2, { duration: 500 }), Y(0.5, { duration: 500 })),
|
|
660
892
|
-1,
|
|
661
893
|
!0
|
|
662
894
|
);
|
|
663
895
|
}, []);
|
|
664
|
-
const
|
|
665
|
-
opacity:
|
|
896
|
+
const s = ce(() => ({
|
|
897
|
+
opacity: o.value
|
|
666
898
|
}));
|
|
667
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ r(k.View, { className: n("bg-muted rounded-md", t), style: s, ...e });
|
|
668
900
|
}
|
|
669
|
-
const
|
|
670
|
-
({ className:
|
|
671
|
-
|
|
901
|
+
const bo = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "slider is not yet implemented for React Native" }) }), ho = () => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "Toaster (Sonner) is not yet implemented for React Native" }) }), er = a.forwardRef(
|
|
902
|
+
({ className: t, checked: e, onCheckedChange: o, ...s }, l) => /* @__PURE__ */ r(
|
|
903
|
+
Q.Root,
|
|
672
904
|
{
|
|
673
|
-
className:
|
|
905
|
+
className: n(
|
|
674
906
|
"peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-6 w-11 shrink-0 cursor-pointer flex-row items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
675
|
-
|
|
907
|
+
t
|
|
676
908
|
),
|
|
677
|
-
...
|
|
909
|
+
...s,
|
|
678
910
|
checked: e ?? !1,
|
|
679
|
-
onCheckedChange:
|
|
911
|
+
onCheckedChange: o || (() => {
|
|
680
912
|
}),
|
|
681
913
|
ref: l,
|
|
682
|
-
children: /* @__PURE__ */
|
|
683
|
-
|
|
914
|
+
children: /* @__PURE__ */ r(
|
|
915
|
+
Q.Thumb,
|
|
684
916
|
{
|
|
685
|
-
className:
|
|
917
|
+
className: n(
|
|
686
918
|
"bg-background pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
687
919
|
)
|
|
688
920
|
}
|
|
@@ -690,92 +922,94 @@ const Qr = () => /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(c, { childre
|
|
|
690
922
|
}
|
|
691
923
|
)
|
|
692
924
|
);
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
({ className:
|
|
925
|
+
er.displayName = Q.Root?.displayName || "Switch";
|
|
926
|
+
const tr = a.forwardRef(
|
|
927
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("w-full caption-bottom text-sm", t), ...e })
|
|
696
928
|
);
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
({ className:
|
|
929
|
+
tr.displayName = "Table";
|
|
930
|
+
const rr = a.forwardRef(
|
|
931
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("border-border border-b", t), ...e })
|
|
700
932
|
);
|
|
701
|
-
|
|
702
|
-
const
|
|
703
|
-
({ className:
|
|
933
|
+
rr.displayName = "TableHeader";
|
|
934
|
+
const or = a.forwardRef(
|
|
935
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("flex-1", t), ...e })
|
|
704
936
|
);
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
({ className:
|
|
937
|
+
or.displayName = "TableBody";
|
|
938
|
+
const ar = a.forwardRef(
|
|
939
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(i, { ref: o, className: n("bg-muted/50 font-medium [&>tr]:last:border-b-0", t), ...e })
|
|
708
940
|
);
|
|
709
|
-
|
|
710
|
-
const
|
|
711
|
-
({ className:
|
|
712
|
-
|
|
941
|
+
ar.displayName = "TableFooter";
|
|
942
|
+
const nr = a.forwardRef(
|
|
943
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
944
|
+
i,
|
|
713
945
|
{
|
|
714
|
-
ref:
|
|
715
|
-
className:
|
|
946
|
+
ref: o,
|
|
947
|
+
className: n(
|
|
716
948
|
"border-border hover:bg-muted/50 data-[state=selected]:bg-muted flex-row border-b transition-colors",
|
|
717
|
-
|
|
949
|
+
t
|
|
718
950
|
),
|
|
719
951
|
...e
|
|
720
952
|
}
|
|
721
953
|
)
|
|
722
954
|
);
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
({ className:
|
|
955
|
+
nr.displayName = "TableRow";
|
|
956
|
+
const sr = a.forwardRef(
|
|
957
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
726
958
|
S,
|
|
727
959
|
{
|
|
728
|
-
ref:
|
|
729
|
-
className:
|
|
960
|
+
ref: o,
|
|
961
|
+
className: n(
|
|
730
962
|
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
731
|
-
|
|
963
|
+
t
|
|
732
964
|
),
|
|
733
965
|
...e
|
|
734
966
|
}
|
|
735
967
|
)
|
|
736
968
|
);
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
({ className:
|
|
969
|
+
sr.displayName = "TableHead";
|
|
970
|
+
const ir = a.forwardRef(
|
|
971
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(S, { ref: o, className: n("p-4 align-middle [&:has([role=checkbox])]:pr-0", t), ...e })
|
|
740
972
|
);
|
|
741
|
-
|
|
742
|
-
const
|
|
743
|
-
({ className:
|
|
973
|
+
ir.displayName = "TableCell";
|
|
974
|
+
const lr = a.forwardRef(
|
|
975
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(S, { ref: o, className: n("text-muted-foreground mt-4 text-sm", t), ...e })
|
|
744
976
|
);
|
|
745
|
-
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
|
|
977
|
+
lr.displayName = "TableCaption";
|
|
978
|
+
const dr = a.forwardRef((t, e) => /* @__PURE__ */ r(F.Root, { ref: e, ...t }));
|
|
979
|
+
dr.displayName = "Tabs";
|
|
980
|
+
const cr = a.forwardRef(
|
|
981
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
982
|
+
F.List,
|
|
749
983
|
{
|
|
750
|
-
ref:
|
|
751
|
-
className:
|
|
984
|
+
ref: o,
|
|
985
|
+
className: n(
|
|
752
986
|
"bg-muted text-muted-foreground inline-flex h-10 flex-row items-center justify-center rounded-md p-1",
|
|
753
|
-
|
|
987
|
+
t
|
|
754
988
|
),
|
|
755
989
|
...e
|
|
756
990
|
}
|
|
757
991
|
)
|
|
758
992
|
);
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
({ className:
|
|
762
|
-
const { value:
|
|
763
|
-
return /* @__PURE__ */
|
|
764
|
-
|
|
993
|
+
cr.displayName = F.List?.displayName || "TabsList";
|
|
994
|
+
const mr = a.forwardRef(
|
|
995
|
+
({ className: t, ...e }, o) => {
|
|
996
|
+
const { value: s } = F.useRootContext();
|
|
997
|
+
return /* @__PURE__ */ r(
|
|
998
|
+
ae.Provider,
|
|
765
999
|
{
|
|
766
|
-
value:
|
|
1000
|
+
value: n(
|
|
767
1001
|
"text-sm native:text-base font-medium text-muted-foreground web:transition-all",
|
|
768
|
-
|
|
1002
|
+
s === e.value && "text-foreground"
|
|
769
1003
|
),
|
|
770
|
-
children: /* @__PURE__ */
|
|
771
|
-
|
|
1004
|
+
children: /* @__PURE__ */ r(
|
|
1005
|
+
F.Trigger,
|
|
772
1006
|
{
|
|
773
|
-
ref:
|
|
774
|
-
className:
|
|
1007
|
+
ref: o,
|
|
1008
|
+
className: n(
|
|
775
1009
|
"ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center rounded-sm px-3 py-1.5 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",
|
|
776
1010
|
e.disabled && "opacity-50",
|
|
777
|
-
|
|
778
|
-
|
|
1011
|
+
s === e.value && "bg-background shadow-foreground/10 shadow-sm",
|
|
1012
|
+
t
|
|
779
1013
|
),
|
|
780
1014
|
...e
|
|
781
1015
|
}
|
|
@@ -784,104 +1018,104 @@ const qt = n.forwardRef(
|
|
|
784
1018
|
);
|
|
785
1019
|
}
|
|
786
1020
|
);
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
({ className:
|
|
790
|
-
|
|
1021
|
+
mr.displayName = F.Trigger?.displayName || "TabsTrigger";
|
|
1022
|
+
const ur = a.forwardRef(
|
|
1023
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
1024
|
+
F.Content,
|
|
791
1025
|
{
|
|
792
|
-
ref:
|
|
793
|
-
className:
|
|
1026
|
+
ref: o,
|
|
1027
|
+
className: n(
|
|
794
1028
|
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
795
|
-
|
|
1029
|
+
t
|
|
796
1030
|
),
|
|
797
1031
|
...e
|
|
798
1032
|
}
|
|
799
1033
|
)
|
|
800
1034
|
);
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
({ className:
|
|
804
|
-
|
|
1035
|
+
ur.displayName = F.Content?.displayName || "TabsContent";
|
|
1036
|
+
const fr = a.forwardRef(
|
|
1037
|
+
({ className: t, placeholderClassName: e, ...o }, s) => /* @__PURE__ */ r(
|
|
1038
|
+
ie,
|
|
805
1039
|
{
|
|
806
|
-
ref:
|
|
1040
|
+
ref: s,
|
|
807
1041
|
multiline: !0,
|
|
808
|
-
numberOfLines:
|
|
809
|
-
className:
|
|
1042
|
+
numberOfLines: o.numberOfLines || 3,
|
|
1043
|
+
className: n(
|
|
810
1044
|
"border-input bg-background text-foreground placeholder:text-muted-foreground focus:border-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-base shadow-sm transition-colors disabled:opacity-50",
|
|
811
|
-
|
|
1045
|
+
t
|
|
812
1046
|
),
|
|
813
|
-
placeholderClassName:
|
|
1047
|
+
placeholderClassName: n("text-muted-foreground", e),
|
|
814
1048
|
textAlignVertical: "top",
|
|
815
|
-
...
|
|
1049
|
+
...o
|
|
816
1050
|
}
|
|
817
1051
|
)
|
|
818
1052
|
);
|
|
819
|
-
|
|
820
|
-
const
|
|
821
|
-
({ className:
|
|
822
|
-
|
|
1053
|
+
fr.displayName = "Textarea";
|
|
1054
|
+
const pr = a.forwardRef(
|
|
1055
|
+
({ className: t, variant: e, size: o, ...s }, l) => /* @__PURE__ */ r(
|
|
1056
|
+
ae.Provider,
|
|
823
1057
|
{
|
|
824
|
-
value:
|
|
1058
|
+
value: n(
|
|
825
1059
|
"text-sm native:text-base text-foreground font-medium",
|
|
826
|
-
|
|
827
|
-
|
|
1060
|
+
s.pressed && "text-accent-foreground",
|
|
1061
|
+
t
|
|
828
1062
|
),
|
|
829
|
-
children: /* @__PURE__ */
|
|
830
|
-
|
|
1063
|
+
children: /* @__PURE__ */ r(
|
|
1064
|
+
fe.Root,
|
|
831
1065
|
{
|
|
832
1066
|
ref: l,
|
|
833
|
-
className:
|
|
834
|
-
...
|
|
835
|
-
pressed:
|
|
836
|
-
onPressedChange:
|
|
1067
|
+
className: n(ue({ variant: e, size: o, className: t })),
|
|
1068
|
+
...s,
|
|
1069
|
+
pressed: s.pressed || !1,
|
|
1070
|
+
onPressedChange: s.onPressedChange || (() => {
|
|
837
1071
|
})
|
|
838
1072
|
}
|
|
839
1073
|
)
|
|
840
1074
|
}
|
|
841
1075
|
)
|
|
842
1076
|
);
|
|
843
|
-
|
|
844
|
-
const
|
|
1077
|
+
pr.displayName = fe.Root?.displayName || "Toggle";
|
|
1078
|
+
const Re = a.createContext({
|
|
845
1079
|
size: "default",
|
|
846
1080
|
variant: "default"
|
|
847
|
-
}),
|
|
848
|
-
({ className:
|
|
849
|
-
|
|
1081
|
+
}), gr = a.forwardRef(
|
|
1082
|
+
({ className: t, variant: e, size: o, children: s, type: l, value: d, onValueChange: c, ...f }, y) => /* @__PURE__ */ r(
|
|
1083
|
+
X.Root,
|
|
850
1084
|
{
|
|
851
|
-
ref:
|
|
1085
|
+
ref: y,
|
|
852
1086
|
type: l,
|
|
853
1087
|
value: d,
|
|
854
|
-
onValueChange:
|
|
855
|
-
className:
|
|
856
|
-
...
|
|
857
|
-
children: /* @__PURE__ */
|
|
1088
|
+
onValueChange: c,
|
|
1089
|
+
className: n("flex flex-row items-center justify-center gap-1", t),
|
|
1090
|
+
...f,
|
|
1091
|
+
children: /* @__PURE__ */ r(Re.Provider, { value: { variant: e, size: o }, children: s })
|
|
858
1092
|
}
|
|
859
1093
|
)
|
|
860
1094
|
);
|
|
861
|
-
|
|
862
|
-
const
|
|
863
|
-
({ className:
|
|
864
|
-
const
|
|
865
|
-
return /* @__PURE__ */
|
|
866
|
-
|
|
1095
|
+
gr.displayName = X.Root?.displayName || "ToggleGroup";
|
|
1096
|
+
const br = a.forwardRef(
|
|
1097
|
+
({ className: t, children: e, variant: o, size: s, value: l, ...d }, c) => {
|
|
1098
|
+
const f = a.useContext(Re);
|
|
1099
|
+
return /* @__PURE__ */ r(
|
|
1100
|
+
ae.Provider,
|
|
867
1101
|
{
|
|
868
|
-
value:
|
|
1102
|
+
value: n(
|
|
869
1103
|
"text-sm native:text-base text-foreground font-medium",
|
|
870
1104
|
d.disabled && "web:cursor-not-allowed opacity-50",
|
|
871
1105
|
l === "" && "text-accent-foreground",
|
|
872
|
-
|
|
1106
|
+
t
|
|
873
1107
|
),
|
|
874
|
-
children: /* @__PURE__ */
|
|
875
|
-
|
|
1108
|
+
children: /* @__PURE__ */ r(
|
|
1109
|
+
X.Item,
|
|
876
1110
|
{
|
|
877
|
-
ref:
|
|
1111
|
+
ref: c,
|
|
878
1112
|
value: l,
|
|
879
|
-
className:
|
|
880
|
-
|
|
881
|
-
variant:
|
|
882
|
-
size:
|
|
1113
|
+
className: n(
|
|
1114
|
+
ue({
|
|
1115
|
+
variant: f.variant || o,
|
|
1116
|
+
size: f.size || s
|
|
883
1117
|
}),
|
|
884
|
-
|
|
1118
|
+
t
|
|
885
1119
|
),
|
|
886
1120
|
...d,
|
|
887
1121
|
children: e
|
|
@@ -891,321 +1125,326 @@ const Jt = n.forwardRef(
|
|
|
891
1125
|
);
|
|
892
1126
|
}
|
|
893
1127
|
);
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
N.View,
|
|
898
|
-
{
|
|
899
|
-
entering: P,
|
|
900
|
-
exiting: A,
|
|
901
|
-
className: o(
|
|
902
|
-
"border-border bg-popover web:animate-in web:fade-in-0 web:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 shadow-md",
|
|
903
|
-
r
|
|
904
|
-
),
|
|
905
|
-
children: /* @__PURE__ */ t(S, { className: "text-popover-foreground native:text-base text-sm", children: a.children })
|
|
906
|
-
}
|
|
907
|
-
) }) })
|
|
908
|
-
);
|
|
909
|
-
Kt.displayName = O.Content?.displayName || "TooltipContent";
|
|
910
|
-
const aa = ({ children: r }) => /* @__PURE__ */ t(q, { children: r }), Qt = n.forwardRef(({ className: r, variant: e = "default", ...a }, i) => /* @__PURE__ */ t(
|
|
911
|
-
R.Root,
|
|
1128
|
+
br.displayName = X.Item?.displayName || "ToggleGroupItem";
|
|
1129
|
+
const yo = M.Root, xo = M.Trigger, hr = a.forwardRef(({ className: t, portalHost: e, ...o }, s) => /* @__PURE__ */ r(M.Portal, { hostName: e, children: /* @__PURE__ */ r(M.Overlay, { style: H.OS !== "web" ? U.absoluteFill : void 0, children: /* @__PURE__ */ r(
|
|
1130
|
+
k.View,
|
|
912
1131
|
{
|
|
913
|
-
|
|
914
|
-
|
|
1132
|
+
entering: L,
|
|
1133
|
+
exiting: j,
|
|
1134
|
+
className: n(
|
|
1135
|
+
"border-border bg-popover web:animate-in web:fade-in-0 web:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 shadow-md",
|
|
1136
|
+
t
|
|
1137
|
+
),
|
|
1138
|
+
children: /* @__PURE__ */ r(S, { className: "text-popover-foreground native:text-base text-sm", children: o.children })
|
|
1139
|
+
}
|
|
1140
|
+
) }) }));
|
|
1141
|
+
hr.displayName = M.Content?.displayName || "TooltipContent";
|
|
1142
|
+
const No = ({ children: t }) => /* @__PURE__ */ r(W, { children: t }), yr = a.forwardRef(({ className: t, variant: e = "default", ...o }, s) => /* @__PURE__ */ r(
|
|
1143
|
+
A.Root,
|
|
1144
|
+
{
|
|
1145
|
+
ref: s,
|
|
1146
|
+
className: n(
|
|
915
1147
|
"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",
|
|
916
1148
|
e === "default" ? "border-border bg-background" : "border-destructive bg-destructive",
|
|
917
|
-
|
|
1149
|
+
t
|
|
918
1150
|
),
|
|
919
|
-
...
|
|
920
|
-
children: /* @__PURE__ */
|
|
1151
|
+
...o,
|
|
1152
|
+
children: /* @__PURE__ */ r(k.View, { entering: We, exiting: qe, layout: Ye, className: "w-full flex-row items-center", children: o.children })
|
|
921
1153
|
}
|
|
922
1154
|
));
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
|
|
1155
|
+
yr.displayName = A.Root?.displayName || "Toast";
|
|
1156
|
+
const xr = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(A.Title, { ref: o, className: n("text-foreground text-sm font-semibold", t), ...e }));
|
|
1157
|
+
xr.displayName = A.Title?.displayName || "ToastTitle";
|
|
1158
|
+
const Nr = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
1159
|
+
A.Description,
|
|
928
1160
|
{
|
|
929
|
-
ref:
|
|
930
|
-
className:
|
|
1161
|
+
ref: o,
|
|
1162
|
+
className: n("text-muted-foreground text-sm opacity-90", t),
|
|
931
1163
|
...e
|
|
932
1164
|
}
|
|
933
1165
|
));
|
|
934
|
-
|
|
935
|
-
const
|
|
936
|
-
|
|
1166
|
+
Nr.displayName = A.Description?.displayName || "ToastDescription";
|
|
1167
|
+
const wr = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
1168
|
+
A.Close,
|
|
937
1169
|
{
|
|
938
|
-
ref:
|
|
939
|
-
className:
|
|
1170
|
+
ref: o,
|
|
1171
|
+
className: n(
|
|
940
1172
|
"text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100 focus:ring-1 focus:outline-none",
|
|
941
|
-
|
|
1173
|
+
t
|
|
942
1174
|
),
|
|
943
1175
|
...e,
|
|
944
|
-
children: /* @__PURE__ */
|
|
1176
|
+
children: /* @__PURE__ */ r(ee, { size: 16, className: "text-muted-foreground" })
|
|
945
1177
|
}
|
|
946
1178
|
));
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
1179
|
+
wr.displayName = A.Close?.displayName || "ToastClose";
|
|
1180
|
+
const vr = a.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ r(
|
|
1181
|
+
A.Action,
|
|
950
1182
|
{
|
|
951
|
-
ref:
|
|
952
|
-
className:
|
|
1183
|
+
ref: o,
|
|
1184
|
+
className: n(
|
|
953
1185
|
"hover:bg-secondary focus:ring-ring 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",
|
|
954
|
-
|
|
1186
|
+
t
|
|
955
1187
|
),
|
|
956
1188
|
...e
|
|
957
1189
|
}
|
|
958
1190
|
));
|
|
959
|
-
|
|
960
|
-
function
|
|
961
|
-
return /* @__PURE__ */
|
|
1191
|
+
vr.displayName = A.Action?.displayName || "ToastAction";
|
|
1192
|
+
function wo({ children: t }) {
|
|
1193
|
+
return /* @__PURE__ */ r(i, { style: { flex: 1 }, children: t });
|
|
962
1194
|
}
|
|
963
|
-
function
|
|
964
|
-
return /* @__PURE__ */
|
|
965
|
-
}, children: /* @__PURE__ */
|
|
1195
|
+
function vo() {
|
|
1196
|
+
return /* @__PURE__ */ r(le, { onPress: () => {
|
|
1197
|
+
}, children: /* @__PURE__ */ r(i, { style: { padding: 10, backgroundColor: "#eee", borderRadius: 5 }, children: /* @__PURE__ */ r(m, { children: "Toggle Theme" }) }) });
|
|
966
1198
|
}
|
|
967
|
-
function
|
|
968
|
-
return /* @__PURE__ */
|
|
1199
|
+
function Ro() {
|
|
1200
|
+
return /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: "Toaster is not yet implemented for React Native" }) });
|
|
969
1201
|
}
|
|
970
|
-
const
|
|
971
|
-
function
|
|
972
|
-
const
|
|
973
|
-
if (!
|
|
1202
|
+
const Te = a.createContext(void 0);
|
|
1203
|
+
function ne() {
|
|
1204
|
+
const t = a.useContext(Te);
|
|
1205
|
+
if (!t)
|
|
974
1206
|
throw new Error("useTOC must be used within a TableOfContents provider");
|
|
975
|
-
return
|
|
1207
|
+
return t;
|
|
976
1208
|
}
|
|
977
|
-
function
|
|
978
|
-
const [
|
|
979
|
-
const
|
|
980
|
-
return
|
|
981
|
-
}, [
|
|
982
|
-
|
|
983
|
-
const
|
|
984
|
-
return
|
|
1209
|
+
function se({ children: t, activeId: e }) {
|
|
1210
|
+
const [o, s] = a.useState([]), [l, d] = a.useState(null), c = a.useRef(null), f = a.useMemo(() => {
|
|
1211
|
+
const b = e || l;
|
|
1212
|
+
return o.find((h) => h.id === b)?.text || null;
|
|
1213
|
+
}, [o, l, e]), y = a.useCallback((b, h, v, R) => {
|
|
1214
|
+
s((D) => {
|
|
1215
|
+
const z = D.find((x) => x.id === b);
|
|
1216
|
+
return z && Math.abs(z.pageY - R) < 1 ? D : (z ? D.map((x) => x.id === b ? { id: b, text: h, level: v, pageY: R } : x) : [...D, { id: b, text: h, level: v, pageY: R }]).sort((x, Ce) => x.pageY - Ce.pageY);
|
|
985
1217
|
});
|
|
986
|
-
}, []),
|
|
987
|
-
|
|
988
|
-
}, []),
|
|
989
|
-
(
|
|
990
|
-
const
|
|
991
|
-
|
|
1218
|
+
}, []), w = a.useCallback((b) => {
|
|
1219
|
+
s((h) => h.filter((v) => v.id !== b));
|
|
1220
|
+
}, []), O = a.useCallback(
|
|
1221
|
+
(b) => {
|
|
1222
|
+
const h = o.find((v) => v.id === b);
|
|
1223
|
+
h && c.current && c.current.scrollTo({ y: h.pageY - 20, animated: !0 });
|
|
992
1224
|
},
|
|
993
|
-
[
|
|
994
|
-
),
|
|
995
|
-
(
|
|
996
|
-
const
|
|
1225
|
+
[o]
|
|
1226
|
+
), I = a.useCallback(
|
|
1227
|
+
(b) => {
|
|
1228
|
+
const h = b.nativeEvent.contentOffset.y;
|
|
997
1229
|
let v = null;
|
|
998
|
-
for (let
|
|
999
|
-
if (
|
|
1000
|
-
v =
|
|
1230
|
+
for (let R = o.length - 1; R >= 0; R--)
|
|
1231
|
+
if (h >= o[R].pageY - 100) {
|
|
1232
|
+
v = o[R].id;
|
|
1001
1233
|
break;
|
|
1002
1234
|
}
|
|
1003
1235
|
v !== l && d(v);
|
|
1004
1236
|
},
|
|
1005
|
-
[
|
|
1006
|
-
),
|
|
1237
|
+
[o, l]
|
|
1238
|
+
), V = a.useMemo(
|
|
1007
1239
|
() => ({
|
|
1008
|
-
headings:
|
|
1240
|
+
headings: o,
|
|
1009
1241
|
activeId: e || l,
|
|
1010
|
-
activeHeadingText:
|
|
1011
|
-
registerHeading:
|
|
1012
|
-
unregisterHeading:
|
|
1013
|
-
scrollToHeading:
|
|
1014
|
-
onScroll:
|
|
1015
|
-
scrollViewRef:
|
|
1242
|
+
activeHeadingText: f,
|
|
1243
|
+
registerHeading: y,
|
|
1244
|
+
unregisterHeading: w,
|
|
1245
|
+
scrollToHeading: O,
|
|
1246
|
+
onScroll: I,
|
|
1247
|
+
scrollViewRef: c
|
|
1016
1248
|
}),
|
|
1017
1249
|
[
|
|
1018
|
-
|
|
1250
|
+
o,
|
|
1019
1251
|
l,
|
|
1020
1252
|
e,
|
|
1021
|
-
|
|
1253
|
+
f,
|
|
1254
|
+
y,
|
|
1022
1255
|
w,
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
ee
|
|
1256
|
+
O,
|
|
1257
|
+
I
|
|
1026
1258
|
]
|
|
1027
1259
|
);
|
|
1028
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ r(Te.Provider, { value: V, children: /* @__PURE__ */ r(i, { className: "flex-1", children: t }) });
|
|
1029
1261
|
}
|
|
1030
|
-
function
|
|
1031
|
-
children:
|
|
1262
|
+
function Rr({
|
|
1263
|
+
children: t,
|
|
1032
1264
|
level: e = 2,
|
|
1033
|
-
id:
|
|
1034
|
-
className:
|
|
1265
|
+
id: o,
|
|
1266
|
+
className: s
|
|
1035
1267
|
}) {
|
|
1036
|
-
const { registerHeading: l, unregisterHeading: d } =
|
|
1037
|
-
(
|
|
1038
|
-
const { y:
|
|
1039
|
-
l(
|
|
1268
|
+
const { registerHeading: l, unregisterHeading: d } = ne(), c = o || Xe(t), f = a.useCallback(
|
|
1269
|
+
(y) => {
|
|
1270
|
+
const { y: w } = y.nativeEvent.layout;
|
|
1271
|
+
l(c, t, e, w);
|
|
1040
1272
|
},
|
|
1041
|
-
[
|
|
1273
|
+
[c, t, e, l]
|
|
1042
1274
|
);
|
|
1043
|
-
return
|
|
1275
|
+
return a.useEffect(() => () => d(c), [c, d]), /* @__PURE__ */ r(i, { onLayout: f, children: /* @__PURE__ */ r(S, { variant: e === 1 ? "h1" : e === 2 ? "h2" : e === 3 ? "h3" : "h4", className: s, children: t }) });
|
|
1044
1276
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const { headings: e, activeId:
|
|
1277
|
+
function Tr({ className: t }) {
|
|
1278
|
+
const { headings: e, activeId: o, scrollToHeading: s } = ne();
|
|
1047
1279
|
if (e.length === 0)
|
|
1048
1280
|
return null;
|
|
1049
1281
|
const l = Math.min(...e.map((d) => d.level));
|
|
1050
|
-
return /* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ g(i, { className: n("space-y-2 p-4", t), children: [
|
|
1283
|
+
/* @__PURE__ */ r(S, { variant: "overline", className: "mb-2 font-bold", children: "On this page" }),
|
|
1052
1284
|
e.map((d) => {
|
|
1053
|
-
const
|
|
1054
|
-
return /* @__PURE__ */
|
|
1055
|
-
|
|
1285
|
+
const c = o === d.id, f = (d.level - l) * 16;
|
|
1286
|
+
return /* @__PURE__ */ r(
|
|
1287
|
+
le,
|
|
1056
1288
|
{
|
|
1057
|
-
onPress: () =>
|
|
1058
|
-
style: { paddingLeft:
|
|
1289
|
+
onPress: () => s(d.id),
|
|
1290
|
+
style: { paddingLeft: f },
|
|
1059
1291
|
className: "py-1",
|
|
1060
|
-
children: /* @__PURE__ */
|
|
1292
|
+
children: /* @__PURE__ */ r(m, { className: n("text-sm", c ? "text-primary font-bold" : "text-muted-foreground"), children: d.text })
|
|
1061
1293
|
},
|
|
1062
1294
|
d.id
|
|
1063
1295
|
);
|
|
1064
1296
|
})
|
|
1065
1297
|
] });
|
|
1066
1298
|
}
|
|
1067
|
-
function
|
|
1068
|
-
const { scrollViewRef:
|
|
1069
|
-
return /* @__PURE__ */
|
|
1070
|
-
|
|
1299
|
+
function Cr({ children: t, className: e }) {
|
|
1300
|
+
const { scrollViewRef: o, onScroll: s } = ne();
|
|
1301
|
+
return /* @__PURE__ */ r(
|
|
1302
|
+
De,
|
|
1071
1303
|
{
|
|
1072
|
-
ref:
|
|
1073
|
-
onScroll:
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1304
|
+
ref: o,
|
|
1305
|
+
onScroll: s,
|
|
1306
|
+
className: n("flex-1", e),
|
|
1307
|
+
...H.OS !== "web" && {
|
|
1308
|
+
scrollEventThrottle: 16,
|
|
1309
|
+
contentContainerStyle: { padding: 16 }
|
|
1310
|
+
},
|
|
1311
|
+
children: t
|
|
1078
1312
|
}
|
|
1079
1313
|
);
|
|
1080
1314
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1315
|
+
se.List = Tr;
|
|
1316
|
+
se.Content = Cr;
|
|
1317
|
+
se.Heading = Rr;
|
|
1084
1318
|
export {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
ar as
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1319
|
+
_e as Accordion,
|
|
1320
|
+
Ze as AccordionContent,
|
|
1321
|
+
Je as AccordionItem,
|
|
1322
|
+
Qe as AccordionTrigger,
|
|
1323
|
+
tt as Alert,
|
|
1324
|
+
ot as AlertDescription,
|
|
1325
|
+
zr as AlertDialog,
|
|
1326
|
+
mt as AlertDialogAction,
|
|
1327
|
+
ut as AlertDialogCancel,
|
|
1328
|
+
st as AlertDialogContent,
|
|
1329
|
+
ct as AlertDialogDescription,
|
|
1330
|
+
lt as AlertDialogFooter,
|
|
1331
|
+
it as AlertDialogHeader,
|
|
1332
|
+
pe as AlertDialogOverlay,
|
|
1333
|
+
nt as AlertDialogPortal,
|
|
1334
|
+
dt as AlertDialogTitle,
|
|
1335
|
+
Hr as AlertDialogTrigger,
|
|
1336
|
+
rt as AlertTitle,
|
|
1337
|
+
Fr as AspectRatio,
|
|
1338
|
+
ft as Avatar,
|
|
1339
|
+
gt as AvatarFallback,
|
|
1340
|
+
pt as AvatarImage,
|
|
1341
|
+
jr as Badge,
|
|
1342
|
+
Lr as Breadcrumb,
|
|
1343
|
+
q as Button,
|
|
1344
|
+
Br as Calendar,
|
|
1345
|
+
yt as Card,
|
|
1346
|
+
vt as CardContent,
|
|
1347
|
+
wt as CardDescription,
|
|
1348
|
+
Rt as CardFooter,
|
|
1349
|
+
xt as CardHeader,
|
|
1350
|
+
Nt as CardTitle,
|
|
1351
|
+
Er as Carousel,
|
|
1352
|
+
Gr as Chart,
|
|
1353
|
+
Tt as Checkbox,
|
|
1354
|
+
Mr as Collapsible,
|
|
1355
|
+
$r as CollapsibleContent,
|
|
1356
|
+
Ur as CollapsibleTrigger,
|
|
1357
|
+
Yr as Command,
|
|
1358
|
+
qr as ContextMenu,
|
|
1359
|
+
Ct as Dialog,
|
|
1360
|
+
Xr as DialogClose,
|
|
1361
|
+
be as DialogContent,
|
|
1362
|
+
xe as DialogDescription,
|
|
1363
|
+
kt as DialogFooter,
|
|
1364
|
+
he as DialogHeader,
|
|
1365
|
+
ye as DialogTitle,
|
|
1366
|
+
Wr as DialogTrigger,
|
|
1367
|
+
_r as Drawer,
|
|
1368
|
+
Jr as DropdownMenu,
|
|
1369
|
+
Kr as Form,
|
|
1370
|
+
Qr as HoverCard,
|
|
1371
|
+
At as Input,
|
|
1372
|
+
Dt as Label,
|
|
1373
|
+
Zr as Menubar,
|
|
1374
|
+
eo as NavigationMenu,
|
|
1375
|
+
to as Pagination,
|
|
1376
|
+
Pt as Popover,
|
|
1377
|
+
It as PopoverAnchor,
|
|
1378
|
+
Vt as PopoverContent,
|
|
1379
|
+
Ot as PopoverTrigger,
|
|
1380
|
+
zt as Progress,
|
|
1381
|
+
Ht as RadioGroup,
|
|
1382
|
+
Ft as RadioGroupItem,
|
|
1383
|
+
ao as ResizableHandle,
|
|
1384
|
+
oo as ResizablePanel,
|
|
1385
|
+
ro as ResizablePanelGroup,
|
|
1386
|
+
no as ScrollArea,
|
|
1387
|
+
Mt as ScrollToTop,
|
|
1388
|
+
so as Search,
|
|
1389
|
+
io as Select,
|
|
1390
|
+
Lt as SelectContent,
|
|
1391
|
+
lo as SelectGroup,
|
|
1392
|
+
Et as SelectItem,
|
|
1393
|
+
Bt as SelectLabel,
|
|
1394
|
+
we as SelectScrollDownButton,
|
|
1395
|
+
Ne as SelectScrollUpButton,
|
|
1396
|
+
Gt as SelectSeparator,
|
|
1397
|
+
jt as SelectTrigger,
|
|
1398
|
+
co as SelectValue,
|
|
1399
|
+
Wt as Separator,
|
|
1400
|
+
uo as Sheet,
|
|
1401
|
+
po as SheetClose,
|
|
1402
|
+
_t as SheetContent,
|
|
1403
|
+
Zt as SheetDescription,
|
|
1404
|
+
Kt as SheetFooter,
|
|
1405
|
+
Jt as SheetHeader,
|
|
1406
|
+
ve as SheetOverlay,
|
|
1407
|
+
Xt as SheetPortal,
|
|
1408
|
+
Qt as SheetTitle,
|
|
1409
|
+
fo as SheetTrigger,
|
|
1410
|
+
go as Skeleton,
|
|
1411
|
+
bo as Slider,
|
|
1412
|
+
ho as Sonner,
|
|
1413
|
+
mo as SupportFab,
|
|
1414
|
+
er as Switch,
|
|
1415
|
+
tr as Table,
|
|
1416
|
+
or as TableBody,
|
|
1417
|
+
lr as TableCaption,
|
|
1418
|
+
ir as TableCell,
|
|
1419
|
+
ar as TableFooter,
|
|
1420
|
+
sr as TableHead,
|
|
1421
|
+
rr as TableHeader,
|
|
1422
|
+
se as TableOfContents,
|
|
1423
|
+
Cr as TableOfContentsContent,
|
|
1424
|
+
Rr as TableOfContentsHeading,
|
|
1425
|
+
Tr as TableOfContentsList,
|
|
1426
|
+
nr as TableRow,
|
|
1427
|
+
dr as Tabs,
|
|
1428
|
+
ur as TabsContent,
|
|
1429
|
+
cr as TabsList,
|
|
1430
|
+
mr as TabsTrigger,
|
|
1192
1431
|
S as Text,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1432
|
+
fr as Textarea,
|
|
1433
|
+
wo as ThemeProvider,
|
|
1434
|
+
vo as ThemeToggle,
|
|
1435
|
+
yr as Toast,
|
|
1436
|
+
Ro as Toaster,
|
|
1437
|
+
pr as Toggle,
|
|
1438
|
+
gr as ToggleGroup,
|
|
1439
|
+
br as ToggleGroupItem,
|
|
1440
|
+
yo as Tooltip,
|
|
1441
|
+
hr as TooltipContent,
|
|
1442
|
+
No as TooltipProvider,
|
|
1443
|
+
xo as TooltipTrigger,
|
|
1444
|
+
bt as badgeVariants,
|
|
1445
|
+
re as buttonVariants,
|
|
1446
|
+
n as cn,
|
|
1447
|
+
Ut as textVariants,
|
|
1448
|
+
So as toggleVariants,
|
|
1449
|
+
_ as wrapTextChildren
|
|
1211
1450
|
};
|