@cellarnode/auth 0.6.2 → 0.6.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp-slots.d.ts","sourceRoot":"","sources":["../../src/react/input-otp-slots.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAItD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IAClE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"input-otp-slots.d.ts","sourceRoot":"","sources":["../../src/react/input-otp-slots.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAItD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IAClE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AA+BF,wBAAgB,QAAQ,CAAC,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAcvE;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAS7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,kDAwEjD;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAkB7B"}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
|
-
import {
|
|
6
|
+
import { Minus } from "lucide-react";
|
|
7
|
+
const OTP_STYLES = `
|
|
8
|
+
@keyframes caretBlink {
|
|
9
|
+
0%, 70% { opacity: 1; }
|
|
10
|
+
71%, 100% { opacity: 0; }
|
|
11
|
+
}
|
|
12
|
+
@keyframes fadeInSlot {
|
|
13
|
+
from { opacity: 0; transform: scale(0.8); }
|
|
14
|
+
to { opacity: 1; transform: scale(1); }
|
|
15
|
+
}
|
|
16
|
+
[data-slot="input-otp-group"] > [data-slot="input-otp-slot"] {
|
|
17
|
+
border-left-width: 0;
|
|
18
|
+
}
|
|
19
|
+
[data-slot="input-otp-group"] > [data-slot="input-otp-slot"]:first-child {
|
|
20
|
+
border-left-width: 2px;
|
|
21
|
+
border-top-left-radius: 12px;
|
|
22
|
+
border-bottom-left-radius: 12px;
|
|
23
|
+
}
|
|
24
|
+
[data-slot="input-otp-group"] > [data-slot="input-otp-slot"]:last-child {
|
|
25
|
+
border-top-right-radius: 12px;
|
|
26
|
+
border-bottom-right-radius: 12px;
|
|
27
|
+
}
|
|
28
|
+
[data-slot="input-otp-slot"][data-active] {
|
|
29
|
+
border-radius: 12px !important;
|
|
30
|
+
border-left-width: 2px !important;
|
|
31
|
+
border-color: var(--primary, #2d6a5e) !important;
|
|
32
|
+
z-index: 10;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
7
35
|
export function InputOTP({ containerClassName, ...props }) {
|
|
8
|
-
return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: clsx("flex items-center has-disabled:opacity-50", containerClassName), ...props }));
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { dangerouslySetInnerHTML: { __html: OTP_STYLES } }), _jsx(OTPInput, { "data-slot": "input-otp", containerClassName: clsx("flex items-center has-disabled:opacity-50", containerClassName), ...props })] }));
|
|
9
37
|
}
|
|
10
38
|
export function InputOTPGroup({ className, style, ...props }) {
|
|
11
|
-
return (_jsx("div", { "data-slot": "input-otp-group", style: { display: "flex", alignItems: "center",
|
|
39
|
+
return (_jsx("div", { "data-slot": "input-otp-group", style: { display: "flex", alignItems: "center", ...style }, className: className, ...props }));
|
|
12
40
|
}
|
|
13
41
|
export function InputOTPSlot({ index, className, ...props }) {
|
|
14
42
|
const inputOTPContext = React.useContext(OTPInputContext);
|
|
@@ -23,16 +51,11 @@ export function InputOTPSlot({ index, className, ...props }) {
|
|
|
23
51
|
justifyContent: "center",
|
|
24
52
|
width: "52px",
|
|
25
53
|
height: "60px",
|
|
26
|
-
borderRadius: "12px",
|
|
27
54
|
fontSize: "24px",
|
|
28
55
|
fontWeight: 600,
|
|
29
56
|
lineHeight: 1,
|
|
30
57
|
transition: "all 150ms ease",
|
|
31
|
-
border:
|
|
32
|
-
? "2px solid var(--primary, #2d6a5e)"
|
|
33
|
-
: char
|
|
34
|
-
? "2px solid var(--border, #d1d5db)"
|
|
35
|
-
: "2px solid var(--border, #d1d5db)",
|
|
58
|
+
border: "2px solid var(--border, #d1d5db)",
|
|
36
59
|
background: char
|
|
37
60
|
? "var(--accent, #f1f5f9)"
|
|
38
61
|
: "var(--background, #ffffff)",
|
|
@@ -59,27 +82,16 @@ export function InputOTPSlot({ index, className, ...props }) {
|
|
|
59
82
|
borderRadius: "1px",
|
|
60
83
|
background: "var(--primary, #2d6a5e)",
|
|
61
84
|
animation: "caretBlink 1.1s ease infinite",
|
|
62
|
-
} }) }))
|
|
63
|
-
__html: `
|
|
64
|
-
@keyframes caretBlink {
|
|
65
|
-
0%, 70% { opacity: 1; }
|
|
66
|
-
71%, 100% { opacity: 0; }
|
|
67
|
-
}
|
|
68
|
-
@keyframes fadeInSlot {
|
|
69
|
-
from { opacity: 0; transform: scale(0.8); }
|
|
70
|
-
to { opacity: 1; transform: scale(1); }
|
|
71
|
-
}
|
|
72
|
-
`,
|
|
73
|
-
} })] }));
|
|
85
|
+
} }) }))] }));
|
|
74
86
|
}
|
|
75
87
|
export function InputOTPSeparator({ style, ...props }) {
|
|
76
88
|
return (_jsx("div", { "data-slot": "input-otp-separator", role: "separator", style: {
|
|
77
89
|
display: "flex",
|
|
78
90
|
alignItems: "center",
|
|
79
91
|
justifyContent: "center",
|
|
80
|
-
width: "
|
|
92
|
+
width: "24px",
|
|
81
93
|
color: "var(--muted-foreground, #94a3b8)",
|
|
82
94
|
...style,
|
|
83
|
-
}, ...props, children: _jsx(
|
|
95
|
+
}, ...props, children: _jsx(Minus, { style: { width: "20px", height: "20px" } }) }));
|
|
84
96
|
}
|
|
85
97
|
//# sourceMappingURL=input-otp-slots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp-slots.js","sourceRoot":"","sources":["../../src/react/input-otp-slots.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"input-otp-slots.js","sourceRoot":"","sources":["../../src/react/input-otp-slots.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AA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