@gv-tech/ui-web 2.29.1 → 2.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +53 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +99 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -3
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +10 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +26 -26
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +49 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -5
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +13 -13
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +5 -5
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +13 -13
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +5 -5
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +97 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +107 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +19 -2
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +13 -14
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +161 -2
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +89 -2
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +123 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +41 -42
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +8 -9
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +126 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +2 -3
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +37 -38
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +34 -35
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +30 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +27 -28
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +45 -2
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +29 -29
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +2 -3
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +13 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +5 -5
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +133 -2
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +59 -2
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +79 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +15 -16
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +54 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +19 -2
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +168 -2
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +25 -2
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +26 -2
- package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +35 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +6 -11
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +12 -13
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +98 -2
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +15 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +39 -40
- package/dist/{sidebar-DM9ee9wf.mjs → sidebar-DrU3nKaL.mjs} +137 -135
- package/dist/sidebar-uOtFHnBs.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +3 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +34 -2
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +2 -3
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +18 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +5 -6
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -3
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +44 -2
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +14 -12
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.mjs +1 -2
- package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-9KtAIRxy.mjs} +18 -20
- package/dist/theme-toggle-DkNI3bfh.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +52 -2
- package/dist/{toaster-gT2b7mfE.mjs → toaster-8RrHPtlc.mjs} +10 -12
- package/dist/toaster-AFud4l6l.js +1 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -2
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +49 -2
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +35 -2
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +34 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +3 -3
- package/dist/accordion-D5QXSsCK.mjs +0 -248
- package/dist/accordion-DjyDOX-h.js +0 -1
- package/dist/alert-dialog-B-a0Wa1M.mjs +0 -182
- package/dist/alert-dialog-DYQAhGBC.js +0 -1
- package/dist/aspect-ratio-C-KOOyGP.js +0 -1
- package/dist/aspect-ratio-s7Ji1MSr.mjs +0 -40
- package/dist/avatar-4K3XjhP8.js +0 -1
- package/dist/avatar-d8Di248f.mjs +0 -138
- package/dist/calendar-DFj14O6r.js +0 -1
- package/dist/calendar-UW8h9dfh.mjs +0 -3182
- package/dist/carousel-CNGpg5df.js +0 -1
- package/dist/carousel-DG9xGJns.mjs +0 -1171
- package/dist/checkbox-BCgbTAdU.js +0 -1
- package/dist/checkbox-Dq8VHKDH.mjs +0 -186
- package/dist/chunk-BmowowmI.mjs +0 -14
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-HBS6WEDP-aK8IuEX9.mjs +0 -63
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-CpPIGtPJ.js +0 -4
- package/dist/combobox-b4OmCNw1.mjs +0 -5887
- package/dist/command-5hobOyGG.mjs +0 -545
- package/dist/command-Dbqnm9kI.js +0 -1
- package/dist/context-menu-DyTUismw.js +0 -1
- package/dist/context-menu-DzzU-_v8.mjs +0 -317
- package/dist/dist-1zUKVGvf.js +0 -1
- package/dist/dist-B057I8ju.mjs +0 -30
- package/dist/dist-BB78QQyQ.mjs +0 -41
- package/dist/dist-BBvidwzC.js +0 -1
- package/dist/dist-BEbV0Hal.mjs +0 -45
- package/dist/dist-BPL7gUpg.mjs +0 -18
- package/dist/dist-BTUvBzOm.js +0 -1
- package/dist/dist-BU-TFzJf.js +0 -1
- package/dist/dist-Bb5W_J2F.mjs +0 -39
- package/dist/dist-BbI6NHqR.mjs +0 -23
- package/dist/dist-BexAB6yo.mjs +0 -192
- package/dist/dist-BgXIqHHq.js +0 -1
- package/dist/dist-Bvfb4y_L.mjs +0 -100
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-CPAF050o.mjs +0 -90
- package/dist/dist-CS572Be42.mjs +0 -11
- package/dist/dist-CUvxOuXM.mjs +0 -551
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-ClYM7l1t.js +0 -1
- package/dist/dist-CpKLY_uZ.mjs +0 -96
- package/dist/dist-D1qkELLT.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-DEpkkABT.js +0 -1
- package/dist/dist-DI1vapnL.mjs +0 -20
- package/dist/dist-DJqkhIXb2.js +0 -1
- package/dist/dist-DKXojpVG.js +0 -1
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DZiOPWLp.js +0 -1
- package/dist/dist-DatgTWLz.mjs +0 -202
- package/dist/dist-Dm3IQk5b.mjs +0 -685
- package/dist/dist-DoivLw3t.js +0 -1
- package/dist/dist-Dq-h6VAy.mjs +0 -118
- package/dist/dist-Dt6m-kwU.mjs +0 -221
- package/dist/dist-E8ieJTBC.mjs +0 -190
- package/dist/dist-GazS1kfR.mjs +0 -5
- package/dist/dist-N97cIp0_.js +0 -1
- package/dist/dist-OqDzLHTa.mjs +0 -460
- package/dist/dist-Qm9hFvM1.js +0 -1
- package/dist/dist-UkWa-Arh.mjs +0 -16
- package/dist/dist-UnTrOmPV.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-Zs2sjYhL.js +0 -1
- package/dist/dist-hFLuJoMi.js +0 -1
- package/dist/dist-s7ibhASj.mjs +0 -181
- package/dist/dist-vu20fMUK.mjs +0 -93
- package/dist/dropdown-menu-BqAhn64y.mjs +0 -313
- package/dist/dropdown-menu-BtKOr--r.js +0 -1
- package/dist/es2015-DbAsWDbs.js +0 -41
- package/dist/es2015-DbsmTzuc.mjs +0 -571
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/floating-ui.react-dom-CyupHsR6.mjs +0 -1062
- package/dist/hover-card-DMsxpR9G.mjs +0 -178
- package/dist/hover-card-DWXusgiI.js +0 -1
- package/dist/input-otp-D49Y9VcH.mjs +0 -409
- package/dist/input-otp-u3obpt-Q.js +0 -20
- package/dist/label-Dacwh21G.js +0 -1
- package/dist/label-DsSICLPc.mjs +0 -28
- package/dist/menubar-BYNeRuzx.js +0 -1
- package/dist/menubar-DZqEj6S1.mjs +0 -407
- package/dist/message-scroller-CS4t7Ypn.mjs +0 -824
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-B36G3O83.js +0 -1
- package/dist/navigation-menu-RO6thDOF.mjs +0 -636
- package/dist/popover-DSBkc70V.mjs +0 -243
- package/dist/popover-DUHbvKB8.js +0 -1
- package/dist/progress-B9z08UXf.js +0 -6
- package/dist/progress-CQ4nQ85t.mjs +0 -92
- package/dist/questionnaire-CVED7G7R.mjs +0 -1159
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-Bd3WbH5I.js +0 -1
- package/dist/radio-group-TRiAhMZB.mjs +0 -266
- package/dist/resizable-Cq60hEWB.js +0 -1
- package/dist/resizable-Qc8cVUKd.mjs +0 -2857
- package/dist/scroll-area-D6MiNHnJ.mjs +0 -564
- package/dist/scroll-area-DFUdJeSZ.js +0 -1
- package/dist/select-BFJUmjvX.mjs +0 -830
- package/dist/select-iQFoKU1s.js +0 -1
- package/dist/separator-2kr96SyF.mjs +0 -40
- package/dist/separator-Bo49G2aj.js +0 -1
- package/dist/sidebar-C6O8hLkz.js +0 -1
- package/dist/slider-CagVxozY.js +0 -1
- package/dist/slider-CdTCoQu1.mjs +0 -485
- package/dist/switch-CoeAC1Wk.js +0 -1
- package/dist/switch-zUBdj7jK.mjs +0 -174
- package/dist/tabs-DaE9pEbo.mjs +0 -160
- package/dist/tabs-TMhXe20x.js +0 -1
- package/dist/theme-toggle-DKh8WFLT.js +0 -1
- package/dist/toast-B0S3F09s.js +0 -1
- package/dist/toast-D0Yb-K84.mjs +0 -445
- package/dist/toaster-CX9im8R_.js +0 -1
- package/dist/toggle-B0hXPsi7.js +0 -1
- package/dist/toggle-BAeKd2N0.mjs +0 -59
- package/dist/toggle-group-CEKhUozD.mjs +0 -167
- package/dist/toggle-group-htyug3G7.js +0 -1
- package/dist/tooltip-BZazhXDZ.js +0 -1
- package/dist/tooltip-R_nK_Qh5.mjs +0 -390
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-Dm3IQk5b.mjs";
|
|
2
|
-
import { a as t } from "./dist-Dq-h6VAy.mjs";
|
|
3
|
-
import { t as n } from "./dist-BEbV0Hal.mjs";
|
|
4
|
-
import { t as r } from "./dist-CPAF050o.mjs";
|
|
5
|
-
import { t as i } from "./dist-BB78QQyQ.mjs";
|
|
6
|
-
import { t as a } from "./dist-Bvfb4y_L.mjs";
|
|
7
|
-
import { t as o } from "./dist-CpKLY_uZ.mjs";
|
|
8
|
-
import { t as s } from "./dist-s7ibhASj.mjs";
|
|
9
|
-
import { r as c } from "./dist-E8ieJTBC.mjs";
|
|
10
|
-
import { t as l } from "./dist-DI1vapnL.mjs";
|
|
11
|
-
import { a as u, i as d, n as f, t as p } from "./dist-Dt6m-kwU.mjs";
|
|
12
|
-
import * as m from "react";
|
|
13
|
-
import { jsx as h } from "react/jsx-runtime";
|
|
14
|
-
//#region ../../node_modules/.bun/@radix-ui+react-hover-card@1.2.1+b146eb580f4286be/node_modules/@radix-ui/react-hover-card/dist/index.mjs
|
|
15
|
-
var g = Object.defineProperty, _ = (e, t) => g(e, "name", {
|
|
16
|
-
value: t,
|
|
17
|
-
configurable: !0
|
|
18
|
-
}), v, y = "HoverCard", [b, x] = r(y, [u]), S = u(), [C, w] = b(y), T = /* @__PURE__ */ _((e) => {
|
|
19
|
-
let { __scopeHoverCard: t, children: n, open: r, defaultOpen: i, onOpenChange: o, openDelay: s = 700, closeDelay: c = 300 } = e, l = S(t), u = m.useRef(0), d = m.useRef(0), f = m.useRef(!1), g = m.useRef(!1), [_, v] = a({
|
|
20
|
-
prop: r,
|
|
21
|
-
defaultProp: i ?? !1,
|
|
22
|
-
onChange: o,
|
|
23
|
-
caller: y
|
|
24
|
-
}), b = m.useCallback(() => {
|
|
25
|
-
clearTimeout(d.current), u.current = window.setTimeout(() => v(!0), s);
|
|
26
|
-
}, [s, v]), x = m.useCallback(() => {
|
|
27
|
-
clearTimeout(u.current), !f.current && !g.current && (d.current = window.setTimeout(() => v(!1), c));
|
|
28
|
-
}, [c, v]), w = m.useCallback(() => v(!1), [v]);
|
|
29
|
-
return m.useEffect(() => () => {
|
|
30
|
-
clearTimeout(u.current), clearTimeout(d.current);
|
|
31
|
-
}, []), /* @__PURE__ */ h(C, {
|
|
32
|
-
scope: t,
|
|
33
|
-
open: _,
|
|
34
|
-
onOpenChange: v,
|
|
35
|
-
onOpen: b,
|
|
36
|
-
onClose: x,
|
|
37
|
-
onDismiss: w,
|
|
38
|
-
hasSelectionRef: f,
|
|
39
|
-
isPointerDownOnContentRef: g,
|
|
40
|
-
children: /* @__PURE__ */ h(p, {
|
|
41
|
-
...l,
|
|
42
|
-
children: n
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
}, "HoverCard"), E = "HoverCardTrigger", D = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ _(function(e, t) {
|
|
46
|
-
let { __scopeHoverCard: r, ...a } = e, o = w(E, r);
|
|
47
|
-
return /* @__PURE__ */ h(f, {
|
|
48
|
-
asChild: !0,
|
|
49
|
-
...S(r),
|
|
50
|
-
children: /* @__PURE__ */ h(n.a, {
|
|
51
|
-
"data-state": o.open ? "open" : "closed",
|
|
52
|
-
...a,
|
|
53
|
-
ref: t,
|
|
54
|
-
onPointerEnter: i(e.onPointerEnter, F(o.onOpen)),
|
|
55
|
-
onPointerLeave: i(e.onPointerLeave, F(o.onClose)),
|
|
56
|
-
onFocus: i(e.onFocus, o.onOpen),
|
|
57
|
-
onBlur: i(e.onBlur, o.onClose),
|
|
58
|
-
onTouchStart: i(e.onTouchStart, (e) => e.preventDefault())
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
}, "HoverCardTrigger")), O = "HoverCardPortal", [k, A] = b(O, { forceMount: void 0 }), j = /* @__PURE__ */ _((e) => {
|
|
62
|
-
let { __scopeHoverCard: t, forceMount: n, children: r, container: i } = e, a = w(O, t);
|
|
63
|
-
return /* @__PURE__ */ h(k, {
|
|
64
|
-
scope: t,
|
|
65
|
-
forceMount: n,
|
|
66
|
-
children: /* @__PURE__ */ h(o, {
|
|
67
|
-
present: n || a.open,
|
|
68
|
-
children: /* @__PURE__ */ h(l, {
|
|
69
|
-
asChild: !0,
|
|
70
|
-
container: i,
|
|
71
|
-
children: r
|
|
72
|
-
})
|
|
73
|
-
})
|
|
74
|
-
});
|
|
75
|
-
}, "HoverCardPortal"), M = "HoverCardContent", N = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ _(function(e, t) {
|
|
76
|
-
let n = A(M, e.__scopeHoverCard), { forceMount: r = n.forceMount, ...a } = e, s = w(M, e.__scopeHoverCard);
|
|
77
|
-
return /* @__PURE__ */ h(o, {
|
|
78
|
-
present: r || s.open,
|
|
79
|
-
children: /* @__PURE__ */ h(P, {
|
|
80
|
-
"data-state": s.open ? "open" : "closed",
|
|
81
|
-
...a,
|
|
82
|
-
onPointerEnter: i(e.onPointerEnter, F(s.onOpen)),
|
|
83
|
-
onPointerLeave: i(e.onPointerLeave, F(s.onClose)),
|
|
84
|
-
ref: t
|
|
85
|
-
})
|
|
86
|
-
});
|
|
87
|
-
}, "HoverCardContent")), P = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ _(function(e, n) {
|
|
88
|
-
let { __scopeHoverCard: r, onEscapeKeyDown: a, onPointerDownOutside: o, onFocusOutside: l, onInteractOutside: u, ...f } = e, p = w(M, r), g = S(r), y = m.useRef(null), [b, x] = m.useState(null), C = t(n, y, x);
|
|
89
|
-
c(b);
|
|
90
|
-
let [T, E] = m.useState(!1);
|
|
91
|
-
return m.useEffect(() => {
|
|
92
|
-
if (T) {
|
|
93
|
-
let e = document.body;
|
|
94
|
-
return v = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
|
|
95
|
-
e.style.userSelect = v, e.style.webkitUserSelect = v;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}, [T]), m.useEffect(() => {
|
|
99
|
-
if (y.current) {
|
|
100
|
-
let e = /* @__PURE__ */ _(() => {
|
|
101
|
-
E(!1), p.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
102
|
-
document.getSelection()?.toString() !== "" && (p.hasSelectionRef.current = !0);
|
|
103
|
-
});
|
|
104
|
-
}, "handlePointerUp");
|
|
105
|
-
return document.addEventListener("pointerup", e), () => {
|
|
106
|
-
document.removeEventListener("pointerup", e), p.hasSelectionRef.current = !1, p.isPointerDownOnContentRef.current = !1;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}, [p.isPointerDownOnContentRef, p.hasSelectionRef]), m.useEffect(() => {
|
|
110
|
-
y.current && I(y.current).forEach((e) => e.setAttribute("tabindex", "-1"));
|
|
111
|
-
}), /* @__PURE__ */ h(s, {
|
|
112
|
-
asChild: !0,
|
|
113
|
-
disableOutsidePointerEvents: !1,
|
|
114
|
-
onInteractOutside: u,
|
|
115
|
-
onEscapeKeyDown: a,
|
|
116
|
-
onPointerDownOutside: o,
|
|
117
|
-
onFocusOutside: i(l, (e) => {
|
|
118
|
-
e.preventDefault();
|
|
119
|
-
}),
|
|
120
|
-
onDismiss: p.onDismiss,
|
|
121
|
-
children: /* @__PURE__ */ h(d, {
|
|
122
|
-
...g,
|
|
123
|
-
...f,
|
|
124
|
-
onPointerDown: i(f.onPointerDown, (e) => {
|
|
125
|
-
e.currentTarget.contains(e.target) && E(!0), p.hasSelectionRef.current = !1, p.isPointerDownOnContentRef.current = !0;
|
|
126
|
-
}),
|
|
127
|
-
ref: C,
|
|
128
|
-
style: {
|
|
129
|
-
...f.style,
|
|
130
|
-
userSelect: T ? "text" : void 0,
|
|
131
|
-
WebkitUserSelect: T ? "text" : void 0,
|
|
132
|
-
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
133
|
-
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
134
|
-
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
135
|
-
"--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
|
|
136
|
-
"--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
});
|
|
140
|
-
}, "HoverCardContentImpl"));
|
|
141
|
-
function F(e) {
|
|
142
|
-
return (t) => t.pointerType === "touch" ? void 0 : e();
|
|
143
|
-
}
|
|
144
|
-
_(F, "excludeTouch");
|
|
145
|
-
function I(e) {
|
|
146
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ _((e) => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode") });
|
|
147
|
-
for (; n.nextNode();) t.push(n.currentNode);
|
|
148
|
-
return t;
|
|
149
|
-
}
|
|
150
|
-
_(I, "getTabbableNodes");
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/hover-card.tsx
|
|
153
|
-
function L({ ...e }) {
|
|
154
|
-
return /* @__PURE__ */ h(T, {
|
|
155
|
-
"data-slot": "hover-card",
|
|
156
|
-
...e
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function R({ ...e }) {
|
|
160
|
-
return /* @__PURE__ */ h(D, {
|
|
161
|
-
"data-slot": "hover-card-trigger",
|
|
162
|
-
...e
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function z({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
|
|
166
|
-
return /* @__PURE__ */ h(j, {
|
|
167
|
-
"data-slot": "hover-card-portal",
|
|
168
|
-
children: /* @__PURE__ */ h(N, {
|
|
169
|
-
"data-slot": "hover-card-content",
|
|
170
|
-
align: n,
|
|
171
|
-
sideOffset: r,
|
|
172
|
-
className: e("bg-popover text-popover-foreground ring-foreground/10 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100", t),
|
|
173
|
-
...i
|
|
174
|
-
})
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
export { z as n, R as r, L as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-BBvidwzC.js"),r=require("./dist-hFLuJoMi.js"),i=require("./dist-DYUvPCPC.js"),a=require("./dist-DZiOPWLp.js"),o=require("./dist-YAADIsyo.js"),s=require("./dist-D7-Fky36.js"),c=require("./dist-BU-TFzJf.js"),l=require("./dist-Qm9hFvM1.js"),u=require("./dist-1zUKVGvf.js"),d=require("./dist-N97cIp0_.js");let f=require("react"),p=e.r(f,1);f=e.r(f);let m=require("react/jsx-runtime");var h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0}),_,v=`HoverCard`,[y,b]=i.t(v,[d.a]),x=d.a(),[S,C]=y(v),w=g(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:c=300}=e,l=x(t),u=p.useRef(0),f=p.useRef(0),h=p.useRef(!1),g=p.useRef(!1),[_,y]=o.t({prop:r,defaultProp:i??!1,onChange:a,caller:v}),b=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>y(!0),s)},[s,y]),C=p.useCallback(()=>{clearTimeout(u.current),!h.current&&!g.current&&(f.current=window.setTimeout(()=>y(!1),c))},[c,y]),w=p.useCallback(()=>y(!1),[y]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),(0,m.jsx)(S,{scope:t,open:_,onOpenChange:y,onOpen:b,onClose:C,onDismiss:w,hasSelectionRef:h,isPointerDownOnContentRef:g,children:(0,m.jsx)(d.t,{...l,children:n})})},`HoverCard`),T=`HoverCardTrigger`,E=p.forwardRef(g(function(e,t){let{__scopeHoverCard:n,...i}=e,o=C(T,n),s=x(n);return(0,m.jsx)(d.n,{asChild:!0,...s,children:(0,m.jsx)(r.t.a,{"data-state":o.open?`open`:`closed`,...i,ref:t,onPointerEnter:a.t(e.onPointerEnter,P(o.onOpen)),onPointerLeave:a.t(e.onPointerLeave,P(o.onClose)),onFocus:a.t(e.onFocus,o.onOpen),onBlur:a.t(e.onBlur,o.onClose),onTouchStart:a.t(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),D=`HoverCardPortal`,[O,k]=y(D,{forceMount:void 0}),A=g(e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=C(D,t);return(0,m.jsx)(O,{scope:t,forceMount:n,children:(0,m.jsx)(s.t,{present:n||a.open,children:(0,m.jsx)(u.t,{asChild:!0,container:i,children:r})})})},`HoverCardPortal`),j=`HoverCardContent`,M=p.forwardRef(g(function(e,t){let n=k(j,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,o=C(j,e.__scopeHoverCard);return(0,m.jsx)(s.t,{present:r||o.open,children:(0,m.jsx)(N,{"data-state":o.open?`open`:`closed`,...i,onPointerEnter:a.t(e.onPointerEnter,P(o.onOpen)),onPointerLeave:a.t(e.onPointerLeave,P(o.onClose)),ref:t})})},`HoverCardContent`)),N=p.forwardRef(g(function(e,t){let{__scopeHoverCard:r,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,...f}=e,h=C(j,r),v=x(r),y=p.useRef(null),[b,S]=p.useState(null),w=n.a(t,y,S);l.r(b);let[T,E]=p.useState(!1);return p.useEffect(()=>{if(T){let e=document.body;return _=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=_,e.style.webkitUserSelect=_}}},[T]),p.useEffect(()=>{if(y.current){let e=g(()=>{E(!1),h.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(h.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),h.hasSelectionRef.current=!1,h.isPointerDownOnContentRef.current=!1}}},[h.isPointerDownOnContentRef,h.hasSelectionRef]),p.useEffect(()=>{y.current&&F(y.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,m.jsx)(c.t,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:u,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a.t(s,e=>{e.preventDefault()}),onDismiss:h.onDismiss,children:(0,m.jsx)(d.i,{...v,...f,onPointerDown:a.t(f.onPointerDown,e=>{e.currentTarget.contains(e.target)&&E(!0),h.hasSelectionRef.current=!1,h.isPointerDownOnContentRef.current=!0}),ref:w,style:{...f.style,userSelect:T?`text`:void 0,WebkitUserSelect:T?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function P(e){return t=>t.pointerType===`touch`?void 0:e()}g(P,`excludeTouch`);function F(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:g(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}g(F,`getTabbableNodes`);function I({...e}){return(0,m.jsx)(w,{"data-slot":`hover-card`,...e})}function L({...e}){return(0,m.jsx)(E,{"data-slot":`hover-card-trigger`,...e})}function R({className:e,align:n=`center`,sideOffset:r=4,...i}){return(0,m.jsx)(A,{"data-slot":`hover-card-portal`,children:(0,m.jsx)(M,{"data-slot":`hover-card-content`,align:n,sideOffset:r,className:t.t(`bg-popover text-popover-foreground ring-foreground/10 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100`,e),...i})})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return I}});
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-Dm3IQk5b.mjs";
|
|
2
|
-
import { MinusIcon as t } from "lucide-react";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../node_modules/.bun/input-otp@1.5.0+ab9c01e4ccdf52df/node_modules/input-otp/dist/index.mjs
|
|
6
|
-
var a = Object.defineProperty, o = Object.defineProperties, s = Object.getOwnPropertyDescriptors, c = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, u = Object.prototype.propertyIsEnumerable, d = (e, t, n) => t in e ? a(e, t, {
|
|
7
|
-
enumerable: !0,
|
|
8
|
-
configurable: !0,
|
|
9
|
-
writable: !0,
|
|
10
|
-
value: n
|
|
11
|
-
}) : e[t] = n, f = (e, t) => {
|
|
12
|
-
for (var n in t ||= {}) l.call(t, n) && d(e, n, t[n]);
|
|
13
|
-
if (c) for (var n of c(t)) u.call(t, n) && d(e, n, t[n]);
|
|
14
|
-
return e;
|
|
15
|
-
}, p = (e, t) => o(e, s(t)), m = (e, t) => {
|
|
16
|
-
var n = {};
|
|
17
|
-
for (var r in e) l.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
18
|
-
if (e != null && c) for (var r of c(e)) t.indexOf(r) < 0 && u.call(e, r) && (n[r] = e[r]);
|
|
19
|
-
return n;
|
|
20
|
-
};
|
|
21
|
-
function h(e) {
|
|
22
|
-
return [
|
|
23
|
-
setTimeout(e, 0),
|
|
24
|
-
setTimeout(e, 10),
|
|
25
|
-
setTimeout(e, 50)
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
function g(e) {
|
|
29
|
-
let t = n.useRef();
|
|
30
|
-
return n.useEffect(() => {
|
|
31
|
-
t.current = e;
|
|
32
|
-
}), t.current;
|
|
33
|
-
}
|
|
34
|
-
var _ = 18, v = 40, y = `${v}px`;
|
|
35
|
-
function b(e) {
|
|
36
|
-
let t = e.getBoundingClientRect().right, n = e;
|
|
37
|
-
for (; n;) {
|
|
38
|
-
if (getComputedStyle(n).overflowX !== "visible") return n.getBoundingClientRect().left + n.clientLeft + n.clientWidth - t;
|
|
39
|
-
n = n.parentElement;
|
|
40
|
-
}
|
|
41
|
-
return document.documentElement.clientWidth - t;
|
|
42
|
-
}
|
|
43
|
-
var x = [
|
|
44
|
-
"[data-lastpass-icon-root]",
|
|
45
|
-
"com-1password-button",
|
|
46
|
-
"[data-dashlanecreated]",
|
|
47
|
-
"[style$=\"2147483647 !important;\"]"
|
|
48
|
-
].join(",");
|
|
49
|
-
function S({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: r, isFocused: i }) {
|
|
50
|
-
let [a, o] = n.useState(!1), [s, c] = n.useState(!1), [l, u] = n.useState(!1), d = n.useMemo(() => r === "none" ? !1 : (r === "increase-width" || r === "experimental-no-flickering") && a && s, [
|
|
51
|
-
a,
|
|
52
|
-
s,
|
|
53
|
-
r
|
|
54
|
-
]), f = n.useCallback(() => {
|
|
55
|
-
let n = e.current, i = t.current;
|
|
56
|
-
if (!n || !i || l || r === "none") return;
|
|
57
|
-
let a = n, s = a.getBoundingClientRect().left + a.offsetWidth, d = a.getBoundingClientRect().top + a.offsetHeight / 2, f = s - _, p = d;
|
|
58
|
-
document.querySelectorAll(x).length === 0 && document.elementFromPoint(f, p) === n || (c(b(n) >= v), o(!0), u(!0));
|
|
59
|
-
}, [
|
|
60
|
-
e,
|
|
61
|
-
t,
|
|
62
|
-
l,
|
|
63
|
-
r
|
|
64
|
-
]);
|
|
65
|
-
return n.useEffect(() => {
|
|
66
|
-
let t = e.current;
|
|
67
|
-
if (!t || r === "none") return;
|
|
68
|
-
function n() {
|
|
69
|
-
c(b(t) >= v);
|
|
70
|
-
}
|
|
71
|
-
n();
|
|
72
|
-
let i = setInterval(n, 1e3);
|
|
73
|
-
return () => {
|
|
74
|
-
clearInterval(i);
|
|
75
|
-
};
|
|
76
|
-
}, [e, r]), n.useEffect(() => {
|
|
77
|
-
let e = i || document.activeElement === t.current;
|
|
78
|
-
if (r === "none" || !e) return;
|
|
79
|
-
let n = setTimeout(f, 0), a = setTimeout(f, 2e3), o = setTimeout(f, 5e3), s = setTimeout(() => {
|
|
80
|
-
u(!0);
|
|
81
|
-
}, 6e3);
|
|
82
|
-
return () => {
|
|
83
|
-
clearTimeout(n), clearTimeout(a), clearTimeout(o), clearTimeout(s);
|
|
84
|
-
};
|
|
85
|
-
}, [
|
|
86
|
-
t,
|
|
87
|
-
i,
|
|
88
|
-
r,
|
|
89
|
-
f
|
|
90
|
-
]), {
|
|
91
|
-
hasPWMBadge: a,
|
|
92
|
-
willPushPWMBadge: d,
|
|
93
|
-
PWM_BADGE_SPACE_WIDTH: y
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
var C = n.createContext({}), w = n.forwardRef((e, t) => {
|
|
97
|
-
var r = e, { value: i, onChange: a, maxLength: o, textAlign: s = "left", pattern: c, placeholder: l, inputMode: u = "numeric", onComplete: d, pushPasswordManagerStrategy: _ = "increase-width", pasteTransformer: v, containerClassName: y, noScriptCSSFallback: b = E, nonce: x, render: w, children: D } = r, O = m(r, [
|
|
98
|
-
"value",
|
|
99
|
-
"onChange",
|
|
100
|
-
"maxLength",
|
|
101
|
-
"textAlign",
|
|
102
|
-
"pattern",
|
|
103
|
-
"placeholder",
|
|
104
|
-
"inputMode",
|
|
105
|
-
"onComplete",
|
|
106
|
-
"pushPasswordManagerStrategy",
|
|
107
|
-
"pasteTransformer",
|
|
108
|
-
"containerClassName",
|
|
109
|
-
"noScriptCSSFallback",
|
|
110
|
-
"nonce",
|
|
111
|
-
"render",
|
|
112
|
-
"children"
|
|
113
|
-
]), k;
|
|
114
|
-
let [A, j] = n.useState(typeof O.defaultValue == "string" ? O.defaultValue : ""), M = i ?? A, N = g(M), P = n.useCallback((e) => {
|
|
115
|
-
a?.(e), j(e);
|
|
116
|
-
}, [a]), F = n.useMemo(() => c ? typeof c == "string" ? new RegExp(c) : c : null, [c]), I = n.useRef(null), L = n.useRef(null), R = n.useRef({
|
|
117
|
-
value: M,
|
|
118
|
-
onChange: P,
|
|
119
|
-
isIOS: typeof window < "u" && ((k = window == null ? void 0 : window.CSS)?.supports)?.call(k, "-webkit-touch-callout", "none")
|
|
120
|
-
}), z = n.useRef({ prev: [
|
|
121
|
-
I.current?.selectionStart,
|
|
122
|
-
I.current?.selectionEnd,
|
|
123
|
-
I.current?.selectionDirection
|
|
124
|
-
] });
|
|
125
|
-
n.useImperativeHandle(t, () => I.current, []), n.useEffect(() => {
|
|
126
|
-
let e = I.current, t = L.current;
|
|
127
|
-
if (!e || !t) return;
|
|
128
|
-
R.current.value !== e.value && R.current.onChange(e.value), z.current.prev = [
|
|
129
|
-
e.selectionStart,
|
|
130
|
-
e.selectionEnd,
|
|
131
|
-
e.selectionDirection
|
|
132
|
-
];
|
|
133
|
-
function n() {
|
|
134
|
-
if (document.activeElement !== e) {
|
|
135
|
-
G(null), q(null);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
let t = e.selectionStart, n = e.selectionEnd, r = e.selectionDirection, i = e.maxLength, a = e.value, o = z.current.prev, s = -1, c = -1, l;
|
|
139
|
-
if (a.length !== 0 && t !== null && n !== null) {
|
|
140
|
-
let r = t === n, u = t === a.length && a.length < i;
|
|
141
|
-
if (r && !u) {
|
|
142
|
-
let e = t;
|
|
143
|
-
if (e === 0) s = 0, c = 1, l = "forward";
|
|
144
|
-
else if (e === i) s = e - 1, c = e, l = "backward";
|
|
145
|
-
else if (i > 1 && a.length > 1) {
|
|
146
|
-
let t = 0;
|
|
147
|
-
if (o[0] !== null && o[1] !== null) {
|
|
148
|
-
l = e < o[1] ? "backward" : "forward";
|
|
149
|
-
let n = o[0] === o[1] && o[0] < i;
|
|
150
|
-
l === "backward" && !n && (t = -1);
|
|
151
|
-
}
|
|
152
|
-
s = t + e, c = t + e + 1;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
s !== -1 && c !== -1 && s !== c && e.setSelectionRange(s, c, l);
|
|
156
|
-
}
|
|
157
|
-
let u = s === -1 ? t : s, d = c === -1 ? n : c, f = l ?? r;
|
|
158
|
-
G(u), q(d), z.current.prev = [
|
|
159
|
-
u,
|
|
160
|
-
d,
|
|
161
|
-
f
|
|
162
|
-
];
|
|
163
|
-
}
|
|
164
|
-
if (document.addEventListener("selectionchange", n, { capture: !0 }), n(), document.activeElement === e && U(!0), !document.getElementById("input-otp-style")) {
|
|
165
|
-
let e = document.createElement("style");
|
|
166
|
-
if (e.id = "input-otp-style", x && e.setAttribute("nonce", x), document.head.appendChild(e), e.sheet) {
|
|
167
|
-
let t = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
168
|
-
T(e.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), T(e.sheet, `[data-input-otp]:autofill { ${t} }`), T(e.sheet, `[data-input-otp]:-webkit-autofill { ${t} }`), T(e.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), T(e.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
let r = () => {
|
|
172
|
-
t && t.style.setProperty("--root-height", `${e.clientHeight}px`);
|
|
173
|
-
};
|
|
174
|
-
r();
|
|
175
|
-
let i = typeof ResizeObserver > "u" ? null : new ResizeObserver(r);
|
|
176
|
-
return i?.observe(e), () => {
|
|
177
|
-
document.removeEventListener("selectionchange", n, { capture: !0 }), i?.disconnect();
|
|
178
|
-
};
|
|
179
|
-
}, []);
|
|
180
|
-
let [B, V] = n.useState(!1), [H, U] = n.useState(!1), [W, G] = n.useState(null), [K, q] = n.useState(null);
|
|
181
|
-
n.useEffect(() => {
|
|
182
|
-
let e = h(() => {
|
|
183
|
-
var e;
|
|
184
|
-
(e = I.current) == null || e.dispatchEvent(new Event("input"));
|
|
185
|
-
let t = I.current?.selectionStart, n = I.current?.selectionEnd, r = I.current?.selectionDirection;
|
|
186
|
-
t !== null && n !== null && (G(t), q(n), z.current.prev = [
|
|
187
|
-
t,
|
|
188
|
-
n,
|
|
189
|
-
r
|
|
190
|
-
]);
|
|
191
|
-
});
|
|
192
|
-
return () => {
|
|
193
|
-
e.forEach((e) => clearTimeout(e));
|
|
194
|
-
};
|
|
195
|
-
}, [M, H]), n.useEffect(() => {
|
|
196
|
-
N !== void 0 && M !== N && N.length < o && M.length === o && d?.(M);
|
|
197
|
-
}, [
|
|
198
|
-
o,
|
|
199
|
-
d,
|
|
200
|
-
N,
|
|
201
|
-
M
|
|
202
|
-
]);
|
|
203
|
-
let J = S({
|
|
204
|
-
containerRef: L,
|
|
205
|
-
inputRef: I,
|
|
206
|
-
pushPasswordManagerStrategy: _,
|
|
207
|
-
isFocused: H
|
|
208
|
-
}), Y = n.useCallback((e) => {
|
|
209
|
-
let t = e.currentTarget.value.slice(0, o);
|
|
210
|
-
if (t.length > 0 && F && !F.test(t)) {
|
|
211
|
-
e.preventDefault();
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
typeof N == "string" && t.length < N.length && document.dispatchEvent(new Event("selectionchange")), P(t);
|
|
215
|
-
}, [
|
|
216
|
-
o,
|
|
217
|
-
P,
|
|
218
|
-
N,
|
|
219
|
-
F
|
|
220
|
-
]), X = n.useCallback(() => {
|
|
221
|
-
var e;
|
|
222
|
-
if (I.current) {
|
|
223
|
-
let t = Math.min(I.current.value.length, o - 1), n = I.current.value.length;
|
|
224
|
-
(e = I.current) == null || e.setSelectionRange(t, n), G(t), q(n);
|
|
225
|
-
}
|
|
226
|
-
U(!0);
|
|
227
|
-
}, [o]), Z = n.useCallback((e) => {
|
|
228
|
-
let t = I.current;
|
|
229
|
-
if (!v && (!R.current.isIOS || !e.clipboardData || !t)) return;
|
|
230
|
-
let n = e.clipboardData.getData("text/plain"), r = v ? v(n) : n;
|
|
231
|
-
e.preventDefault();
|
|
232
|
-
let i = I.current?.selectionStart, a = I.current?.selectionEnd, s = (i === a ? M.slice(0, i) + r + M.slice(i) : M.slice(0, i) + r + M.slice(a)).slice(0, o);
|
|
233
|
-
if (s.length > 0 && F && !F.test(s)) return;
|
|
234
|
-
t.value = s, P(s);
|
|
235
|
-
let c = Math.min(s.length, o - 1), l = s.length;
|
|
236
|
-
t.setSelectionRange(c, l), G(c), q(l);
|
|
237
|
-
}, [
|
|
238
|
-
o,
|
|
239
|
-
P,
|
|
240
|
-
v,
|
|
241
|
-
F,
|
|
242
|
-
M
|
|
243
|
-
]), ee = n.useMemo(() => ({
|
|
244
|
-
position: "relative",
|
|
245
|
-
cursor: O.disabled ? "default" : "text",
|
|
246
|
-
userSelect: "none",
|
|
247
|
-
WebkitUserSelect: "none",
|
|
248
|
-
pointerEvents: "none"
|
|
249
|
-
}), [O.disabled]), Q = n.useMemo(() => ({
|
|
250
|
-
position: "absolute",
|
|
251
|
-
inset: 0,
|
|
252
|
-
width: J.willPushPWMBadge ? `calc(100% + ${J.PWM_BADGE_SPACE_WIDTH})` : "100%",
|
|
253
|
-
clipPath: J.willPushPWMBadge ? `inset(0 ${J.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0,
|
|
254
|
-
height: "100%",
|
|
255
|
-
display: "flex",
|
|
256
|
-
textAlign: s,
|
|
257
|
-
opacity: "1",
|
|
258
|
-
color: "transparent",
|
|
259
|
-
pointerEvents: "all",
|
|
260
|
-
background: "transparent",
|
|
261
|
-
caretColor: "transparent",
|
|
262
|
-
border: "0 solid transparent",
|
|
263
|
-
outline: "0 solid transparent",
|
|
264
|
-
boxShadow: "none",
|
|
265
|
-
lineHeight: "1",
|
|
266
|
-
letterSpacing: "-.5em",
|
|
267
|
-
fontSize: "var(--root-height, 16px)",
|
|
268
|
-
fontFamily: "monospace",
|
|
269
|
-
fontVariantNumeric: "tabular-nums"
|
|
270
|
-
}), [
|
|
271
|
-
J.PWM_BADGE_SPACE_WIDTH,
|
|
272
|
-
J.willPushPWMBadge,
|
|
273
|
-
s
|
|
274
|
-
]), te = n.useMemo(() => n.createElement("input", p(f({ autoComplete: O.autoComplete || "one-time-code" }, O), {
|
|
275
|
-
"data-input-otp": !0,
|
|
276
|
-
"data-input-otp-placeholder-shown": M.length === 0 || void 0,
|
|
277
|
-
"data-input-otp-mss": W,
|
|
278
|
-
"data-input-otp-mse": K,
|
|
279
|
-
inputMode: u,
|
|
280
|
-
pattern: F?.source,
|
|
281
|
-
"aria-placeholder": l,
|
|
282
|
-
style: Q,
|
|
283
|
-
maxLength: o,
|
|
284
|
-
value: M,
|
|
285
|
-
ref: I,
|
|
286
|
-
spellCheck: O.spellCheck ?? !1,
|
|
287
|
-
onPaste: (e) => {
|
|
288
|
-
var t;
|
|
289
|
-
Z(e), (t = O.onPaste) == null || t.call(O, e);
|
|
290
|
-
},
|
|
291
|
-
onChange: Y,
|
|
292
|
-
onMouseOver: (e) => {
|
|
293
|
-
var t;
|
|
294
|
-
V(!0), (t = O.onMouseOver) == null || t.call(O, e);
|
|
295
|
-
},
|
|
296
|
-
onMouseLeave: (e) => {
|
|
297
|
-
var t;
|
|
298
|
-
V(!1), (t = O.onMouseLeave) == null || t.call(O, e);
|
|
299
|
-
},
|
|
300
|
-
onFocus: (e) => {
|
|
301
|
-
var t;
|
|
302
|
-
X(), (t = O.onFocus) == null || t.call(O, e);
|
|
303
|
-
},
|
|
304
|
-
onBlur: (e) => {
|
|
305
|
-
var t;
|
|
306
|
-
U(!1), (t = O.onBlur) == null || t.call(O, e);
|
|
307
|
-
}
|
|
308
|
-
})), [
|
|
309
|
-
Y,
|
|
310
|
-
X,
|
|
311
|
-
Z,
|
|
312
|
-
u,
|
|
313
|
-
Q,
|
|
314
|
-
o,
|
|
315
|
-
K,
|
|
316
|
-
W,
|
|
317
|
-
l,
|
|
318
|
-
O,
|
|
319
|
-
F?.source,
|
|
320
|
-
M
|
|
321
|
-
]), $ = n.useMemo(() => ({
|
|
322
|
-
slots: Array.from({ length: o }).map((e, t) => {
|
|
323
|
-
let n = H && W !== null && K !== null && (W === K && t === W || t >= W && t < K), r = M[t] === void 0 ? null : M[t];
|
|
324
|
-
return {
|
|
325
|
-
char: r,
|
|
326
|
-
placeholderChar: M[0] === void 0 ? l?.[t] ?? null : null,
|
|
327
|
-
isActive: n,
|
|
328
|
-
hasFakeCaret: n && r === null
|
|
329
|
-
};
|
|
330
|
-
}),
|
|
331
|
-
isFocused: H,
|
|
332
|
-
isHovering: !O.disabled && B
|
|
333
|
-
}), [
|
|
334
|
-
H,
|
|
335
|
-
B,
|
|
336
|
-
o,
|
|
337
|
-
K,
|
|
338
|
-
W,
|
|
339
|
-
l,
|
|
340
|
-
O.disabled,
|
|
341
|
-
M
|
|
342
|
-
]), ne = n.useMemo(() => w ? w($) : n.createElement(C.Provider, { value: $ }, D), [
|
|
343
|
-
D,
|
|
344
|
-
$,
|
|
345
|
-
w
|
|
346
|
-
]);
|
|
347
|
-
return n.createElement(n.Fragment, null, b !== null && n.createElement("noscript", null, n.createElement("style", null, b)), n.createElement("div", {
|
|
348
|
-
ref: L,
|
|
349
|
-
"data-input-otp-container": !0,
|
|
350
|
-
translate: "no",
|
|
351
|
-
style: ee,
|
|
352
|
-
className: y
|
|
353
|
-
}, ne, n.createElement("div", { style: {
|
|
354
|
-
position: "absolute",
|
|
355
|
-
inset: 0,
|
|
356
|
-
pointerEvents: "none"
|
|
357
|
-
} }, te)));
|
|
358
|
-
});
|
|
359
|
-
w.displayName = "Input";
|
|
360
|
-
function T(e, t) {
|
|
361
|
-
try {
|
|
362
|
-
e.insertRule(t);
|
|
363
|
-
} catch {
|
|
364
|
-
console.warn("input-otp could not insert CSS rule:", t);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
var E = "\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}";
|
|
368
|
-
//#endregion
|
|
369
|
-
//#region src/input-otp.tsx
|
|
370
|
-
function D({ className: t, containerClassName: n, ...i }) {
|
|
371
|
-
return /* @__PURE__ */ r(w, {
|
|
372
|
-
"data-slot": "input-otp",
|
|
373
|
-
containerClassName: e("cn-input-otp flex items-center has-disabled:opacity-50", n),
|
|
374
|
-
spellCheck: !1,
|
|
375
|
-
className: e("disabled:cursor-not-allowed", t),
|
|
376
|
-
...i
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
function O({ className: t, ...n }) {
|
|
380
|
-
return /* @__PURE__ */ r("div", {
|
|
381
|
-
"data-slot": "input-otp-group",
|
|
382
|
-
className: e("has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center rounded-lg has-aria-invalid:ring-3", t),
|
|
383
|
-
...n
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
function k({ index: t, className: a, ...o }) {
|
|
387
|
-
let { char: s, hasFakeCaret: c, isActive: l } = n.useContext(C)?.slots[t] ?? {};
|
|
388
|
-
return /* @__PURE__ */ i("div", {
|
|
389
|
-
"data-slot": "input-otp-slot",
|
|
390
|
-
"data-active": l,
|
|
391
|
-
className: e("border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex size-8 items-center justify-center border-y border-e text-sm transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg data-[active=true]:z-10 data-[active=true]:ring-3", a),
|
|
392
|
-
...o,
|
|
393
|
-
children: [s, c && /* @__PURE__ */ r("div", {
|
|
394
|
-
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
395
|
-
children: /* @__PURE__ */ r("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
|
|
396
|
-
})]
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
function A({ ...e }) {
|
|
400
|
-
return /* @__PURE__ */ r("div", {
|
|
401
|
-
"data-slot": "input-otp-separator",
|
|
402
|
-
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
403
|
-
"aria-hidden": "true",
|
|
404
|
-
...e,
|
|
405
|
-
children: /* @__PURE__ */ r(t, {})
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
//#endregion
|
|
409
|
-
export { k as i, O as n, A as r, D as t };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js");let n=require("lucide-react"),r=require("react"),i=e.r(r,1);r=e.r(r);let a=require("react/jsx-runtime");var o=Object.defineProperty,s=Object.defineProperties,c=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||={})u.call(t,n)&&f(e,n,t[n]);if(l)for(var n of l(t))d.call(t,n)&&f(e,n,t[n]);return e},m=(e,t)=>s(e,c(t)),h=(e,t)=>{var n={};for(var r in e)u.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&l)for(var r of l(e))t.indexOf(r)<0&&d.call(e,r)&&(n[r]=e[r]);return n};function g(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function _(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var v=18,y=40,b=`${y}px`;function x(e){let t=e.getBoundingClientRect().right,n=e;for(;n;){if(getComputedStyle(n).overflowX!==`visible`)return n.getBoundingClientRect().left+n.clientLeft+n.clientWidth-t;n=n.parentElement}return document.documentElement.clientWidth-t}var S=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function C({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,o]=i.useState(!1),[s,c]=i.useState(!1),[l,u]=i.useState(!1),d=i.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&a&&s,[a,s,n]),f=i.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||l||n===`none`)return;let a=r,s=a.getBoundingClientRect().left+a.offsetWidth,d=a.getBoundingClientRect().top+a.offsetHeight/2,f=s-v,p=d;document.querySelectorAll(S).length===0&&document.elementFromPoint(f,p)===r||(c(x(r)>=y),o(!0),u(!0))},[e,t,l,n]);return i.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){c(x(t)>=y)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),i.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(f,0),a=setTimeout(f,2e3),o=setTimeout(f,5e3),s=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,f]),{hasPWMBadge:a,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:b}}var w=i.createContext({}),T=i.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:o,textAlign:s=`left`,pattern:c,placeholder:l,inputMode:u=`numeric`,onComplete:d,pushPasswordManagerStrategy:f=`increase-width`,pasteTransformer:v,containerClassName:y,noScriptCSSFallback:b=D,nonce:x,render:S,children:T}=n,O=h(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`nonce`,`render`,`children`]),k;let[A,j]=i.useState(typeof O.defaultValue==`string`?O.defaultValue:``),M=r??A,N=_(M),P=i.useCallback(e=>{a?.(e),j(e)},[a]),F=i.useMemo(()=>c?typeof c==`string`?new RegExp(c):c:null,[c]),I=i.useRef(null),L=i.useRef(null),R=i.useRef({value:M,onChange:P,isIOS:typeof window<`u`&&((k=window==null?void 0:window.CSS)?.supports)?.call(k,`-webkit-touch-callout`,`none`)}),z=i.useRef({prev:[I.current?.selectionStart,I.current?.selectionEnd,I.current?.selectionDirection]});i.useImperativeHandle(t,()=>I.current,[]),i.useEffect(()=>{let e=I.current,t=L.current;if(!e||!t)return;R.current.value!==e.value&&R.current.onChange(e.value),z.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){G(null),q(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=z.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let r=t===n,u=t===a.length&&a.length<i;if(r&&!u){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&e.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;G(u),q(d),z.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&U(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,x&&e.setAttribute(`nonce`,x),document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;E(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),E(e.sheet,`[data-input-otp]:autofill { ${t} }`),E(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),E(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),E(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=typeof ResizeObserver>`u`?null:new ResizeObserver(r);return i?.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i?.disconnect()}},[]);let[B,V]=i.useState(!1),[H,U]=i.useState(!1),[W,G]=i.useState(null),[K,q]=i.useState(null);i.useEffect(()=>{let e=g(()=>{var e;(e=I.current)==null||e.dispatchEvent(new Event(`input`));let t=I.current?.selectionStart,n=I.current?.selectionEnd,r=I.current?.selectionDirection;t!==null&&n!==null&&(G(t),q(n),z.current.prev=[t,n,r])});return()=>{e.forEach(e=>clearTimeout(e))}},[M,H]),i.useEffect(()=>{N!==void 0&&M!==N&&N.length<o&&M.length===o&&d?.(M)},[o,d,N,M]);let J=C({containerRef:L,inputRef:I,pushPasswordManagerStrategy:f,isFocused:H}),Y=i.useCallback(e=>{let t=e.currentTarget.value.slice(0,o);if(t.length>0&&F&&!F.test(t)){e.preventDefault();return}typeof N==`string`&&t.length<N.length&&document.dispatchEvent(new Event(`selectionchange`)),P(t)},[o,P,N,F]),X=i.useCallback(()=>{var e;if(I.current){let t=Math.min(I.current.value.length,o-1),n=I.current.value.length;(e=I.current)==null||e.setSelectionRange(t,n),G(t),q(n)}U(!0)},[o]),Z=i.useCallback(e=>{let t=I.current;if(!v&&(!R.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=v?v(n):n;e.preventDefault();let i=I.current?.selectionStart,a=I.current?.selectionEnd,s=(i===a?M.slice(0,i)+r+M.slice(i):M.slice(0,i)+r+M.slice(a)).slice(0,o);if(s.length>0&&F&&!F.test(s))return;t.value=s,P(s);let c=Math.min(s.length,o-1),l=s.length;t.setSelectionRange(c,l),G(c),q(l)},[o,P,v,F,M]),ee=i.useMemo(()=>({position:`relative`,cursor:O.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[O.disabled]),Q=i.useMemo(()=>({position:`absolute`,inset:0,width:J.willPushPWMBadge?`calc(100% + ${J.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:J.willPushPWMBadge?`inset(0 ${J.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:s,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height, 16px)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[J.PWM_BADGE_SPACE_WIDTH,J.willPushPWMBadge,s]),te=i.useMemo(()=>i.createElement(`input`,m(p({autoComplete:O.autoComplete||`one-time-code`},O),{"data-input-otp":!0,"data-input-otp-placeholder-shown":M.length===0||void 0,"data-input-otp-mss":W,"data-input-otp-mse":K,inputMode:u,pattern:F?.source,"aria-placeholder":l,style:Q,maxLength:o,value:M,ref:I,spellCheck:O.spellCheck??!1,onPaste:e=>{var t;Z(e),(t=O.onPaste)==null||t.call(O,e)},onChange:Y,onMouseOver:e=>{var t;V(!0),(t=O.onMouseOver)==null||t.call(O,e)},onMouseLeave:e=>{var t;V(!1),(t=O.onMouseLeave)==null||t.call(O,e)},onFocus:e=>{var t;X(),(t=O.onFocus)==null||t.call(O,e)},onBlur:e=>{var t;U(!1),(t=O.onBlur)==null||t.call(O,e)}})),[Y,X,Z,u,Q,o,K,W,l,O,F?.source,M]),$=i.useMemo(()=>({slots:Array.from({length:o}).map((e,t)=>{let n=H&&W!==null&&K!==null&&(W===K&&t===W||t>=W&&t<K),r=M[t]===void 0?null:M[t];return{char:r,placeholderChar:M[0]===void 0?l?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:H,isHovering:!O.disabled&&B}),[H,B,o,K,W,l,O.disabled,M]),ne=i.useMemo(()=>S?S($):i.createElement(w.Provider,{value:$},T),[T,$,S]);return i.createElement(i.Fragment,null,b!==null&&i.createElement(`noscript`,null,i.createElement(`style`,null,b)),i.createElement(`div`,{ref:L,"data-input-otp-container":!0,translate:`no`,style:ee,className:y},ne,i.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},te)))});T.displayName=`Input`;function E(e,t){try{e.insertRule(t)}catch{console.warn(`input-otp could not insert CSS rule:`,t)}}var D=`
|
|
2
|
-
[data-input-otp] {
|
|
3
|
-
--nojs-bg: white !important;
|
|
4
|
-
--nojs-fg: black !important;
|
|
5
|
-
|
|
6
|
-
background-color: var(--nojs-bg) !important;
|
|
7
|
-
color: var(--nojs-fg) !important;
|
|
8
|
-
caret-color: var(--nojs-fg) !important;
|
|
9
|
-
letter-spacing: .25em !important;
|
|
10
|
-
text-align: center !important;
|
|
11
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
12
|
-
border-radius: 4px !important;
|
|
13
|
-
width: 100% !important;
|
|
14
|
-
}
|
|
15
|
-
@media (prefers-color-scheme: dark) {
|
|
16
|
-
[data-input-otp] {
|
|
17
|
-
--nojs-bg: black !important;
|
|
18
|
-
--nojs-fg: white !important;
|
|
19
|
-
}
|
|
20
|
-
}`;function O({className:e,containerClassName:n,...r}){return(0,a.jsx)(T,{"data-slot":`input-otp`,containerClassName:t.t(`cn-input-otp flex items-center has-disabled:opacity-50`,n),spellCheck:!1,className:t.t(`disabled:cursor-not-allowed`,e),...r})}function k({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`input-otp-group`,className:t.t(`has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center rounded-lg has-aria-invalid:ring-3`,e),...n})}function A({index:e,className:n,...i}){let{char:o,hasFakeCaret:s,isActive:c}=r.useContext(w)?.slots[e]??{};return(0,a.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":c,className:t.t(`border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex size-8 items-center justify-center border-y border-e text-sm transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg data-[active=true]:z-10 data-[active=true]:ring-3`,n),...i,children:[o,s&&(0,a.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,a.jsx)(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function j({...e}){return(0,a.jsx)(`div`,{"data-slot":`input-otp-separator`,className:`flex items-center [&_svg:not([class*='size-'])]:size-4`,"aria-hidden":`true`,...e,children:(0,a.jsx)(n.MinusIcon,{})})}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return O}});
|
package/dist/label-Dacwh21G.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-mLOUI7ql.js"),t=require("./dist-C_iFkwIX.js"),n=require("./dist-hFLuJoMi.js");let r=require("react"),i=e.r(r,1);r=e.r(r);let a=require("react/jsx-runtime");var o=Object.defineProperty,s=i.forwardRef(((e,t)=>o(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,a.jsx)(n.t.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`));function c({className:e,...n}){return(0,a.jsx)(s,{"data-slot":`label`,className:t.t(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...n})}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
package/dist/label-DsSICLPc.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist-Dm3IQk5b.mjs";
|
|
2
|
-
import { t } from "./dist-BEbV0Hal.mjs";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../node_modules/.bun/@radix-ui+react-label@2.1.17+b146eb580f4286be/node_modules/@radix-ui/react-label/dist/index.mjs
|
|
6
|
-
var i = Object.defineProperty, a = /* @__PURE__ */ n.forwardRef(/* @__PURE__ */ ((e, t) => i(e, "name", {
|
|
7
|
-
value: t,
|
|
8
|
-
configurable: !0
|
|
9
|
-
}))(function(e, n) {
|
|
10
|
-
return /* @__PURE__ */ r(t.label, {
|
|
11
|
-
...e,
|
|
12
|
-
ref: n,
|
|
13
|
-
onMouseDown: (t) => {
|
|
14
|
-
t.target.closest("button, input, select, textarea") || (e.onMouseDown?.(t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}, "Label"));
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/label.tsx
|
|
20
|
-
function o({ className: t, ...n }) {
|
|
21
|
-
return /* @__PURE__ */ r(a, {
|
|
22
|
-
"data-slot": "label",
|
|
23
|
-
className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", t),
|
|
24
|
-
...n
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { o as t };
|