@modul/mbui 0.0.26-beta-pv-53443-e53c0cf0 → 0.0.26-beta-pv-53443-fdc7b801
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/Input-OTP/Input.js
CHANGED
|
@@ -13,8 +13,8 @@ exports.InputOTPGroup = InputOTPGroup;
|
|
|
13
13
|
InputOTPGroup.displayName = 'InputOTPGroup';
|
|
14
14
|
const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
15
15
|
const inputOTPContext = React.useContext(input_otp_1.OTPInputContext);
|
|
16
|
-
const { char
|
|
17
|
-
return (React.createElement("div", { ref: ref, className: (0, utils_1.cn)('relative flex h-[48px] w-[20px] items-center justify-center border-b-[2px] border-input transition-all',
|
|
16
|
+
const { char } = inputOTPContext.slots[index];
|
|
17
|
+
return (React.createElement("div", { ref: ref, className: (0, utils_1.cn)('relative flex h-[48px] w-[20px] items-center justify-center border-b-[2px] border-input transition-all', char ? 'border-b-[--cl-blue-2]' : 'border-b-[--cl-blue-5]', className), ...props }, char && React.createElement("span", { className: 'bg-primary rounded-full size-[12px]' })));
|
|
18
18
|
});
|
|
19
19
|
exports.InputOTPSlot = InputOTPSlot;
|
|
20
20
|
InputOTPSlot.displayName = 'InputOTPSlot';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/Input-OTP/Input.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,yCAAqD;AACrD,0CAAmC;AAEnC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACrD,oBAAC,oBAAQ,IACR,GAAG,EAAE,GAAG,EACR,kBAAkB,EAAE,IAAA,UAAE,EAAC,8CAA8C,EAAE,kBAAkB,CAAC,EAC1F,SAAS,EAAE,IAA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EACR,SAAS,EAAE,IAAA,UAAE,EACZ,wGAAwG,EACxG,IAAI,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,wBAAwB,EAC1D,SAAS,CACT,KACG,KAAK,IAER,IAAI,IAAI,8BAAM,SAAS,EAAC,qCAAqC,GAAG,CAC5D,CACN,CAAA;AACF,CAAC,CAAC,CAAA;AAgBgC,oCAAY;AAf9C,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA;AAEzC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CACzC,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtB,6BACC,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,WAAW,KACZ,KAAK;IAET,8BAAM,SAAS,EAAC,qCAAqC,GAAG,CACnD,CACN,CACD,CAAA;AAG+C,8CAAiB;AAFjE,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAA"}
|
package/package.json
CHANGED
package/src/Input-OTP/Input.tsx
CHANGED
|
@@ -30,25 +30,19 @@ const InputOTPSlot = React.forwardRef<
|
|
|
30
30
|
React.ComponentPropsWithoutRef<'div'> & { index: number }
|
|
31
31
|
>(({ index, className, ...props }, ref) => {
|
|
32
32
|
const inputOTPContext = React.useContext(OTPInputContext)
|
|
33
|
-
const { char
|
|
33
|
+
const { char } = inputOTPContext.slots[index]
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<div
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
39
|
'relative flex h-[48px] w-[20px] items-center justify-center border-b-[2px] border-input transition-all',
|
|
40
|
-
|
|
40
|
+
char ? 'border-b-[--cl-blue-2]' : 'border-b-[--cl-blue-5]',
|
|
41
41
|
className
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
44
44
|
>
|
|
45
45
|
{char && <span className='bg-primary rounded-full size-[12px]' />}
|
|
46
|
-
|
|
47
|
-
{/* {hasFakeCaret && (
|
|
48
|
-
<div className="absolute inset-0 flex justify-center items-center pointer-events-none">
|
|
49
|
-
<div className="bg-primary w-[2px] h-[32px] animate-caret-blink duration-1000" />
|
|
50
|
-
</div>
|
|
51
|
-
)} */}
|
|
52
46
|
</div>
|
|
53
47
|
)
|
|
54
48
|
})
|