@jamsrui/otp-input 0.0.15 → 0.0.17
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/index.d.mts +10 -0
- package/dist/index.mjs +1 -1
- package/dist/styles.d.mts +9 -0
- package/dist/styles.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -20,5 +20,15 @@ declare const OtpInput: ((props: OtpInput$1.Props) => react_jsx_runtime.JSX.Elem
|
|
|
20
20
|
Separator: (props: OtpInputSeparator.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
21
21
|
Group: (props: OtpInputGroup.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
22
22
|
};
|
|
23
|
+
declare namespace OtpInput {
|
|
24
|
+
interface Props extends OtpInput$1.Props {
|
|
25
|
+
}
|
|
26
|
+
interface Group extends OtpInputGroup.Props {
|
|
27
|
+
}
|
|
28
|
+
interface Separator extends OtpInputSeparator.Props {
|
|
29
|
+
}
|
|
30
|
+
interface Slot extends OtpInputSlot.Props {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
23
33
|
|
|
24
34
|
export { OtpInput };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OtpInput as t}from"./otp-input.mjs";import{OtpInputGroup as p}from"./otp-input-group.mjs";import{OtpInputSeparator as o}from"./otp-input-separator.mjs";import{OtpInputSlot as r}from"./otp-input-slot.mjs";import{OtpInputConfig as
|
|
1
|
+
import{OtpInput as t}from"./otp-input.mjs";import{OtpInputGroup as p}from"./otp-input-group.mjs";import{OtpInputSeparator as o}from"./otp-input-separator.mjs";import{OtpInputSlot as r}from"./otp-input-slot.mjs";import{OtpInputConfig as f,useOtpInputConfig as x}from"./otp-input-config.mjs";import{REGEXP_ONLY_CHARS as i,REGEXP_ONLY_DIGITS as m,REGEXP_ONLY_DIGITS_AND_CHARS as G}from"./regexp.mjs";const O=Object.assign(t,{Root:t,Slot:r,Separator:o,Group:p});export{O as OtpInput,f as OtpInputConfig,i as REGEXP_ONLY_CHARS,m as REGEXP_ONLY_DIGITS,G as REGEXP_ONLY_DIGITS_AND_CHARS,x as useOtpInputConfig};
|
package/dist/styles.d.mts
CHANGED
|
@@ -26,6 +26,9 @@ declare const otpInputVariants: _jamsrui_utils.TVReturnType<{
|
|
|
26
26
|
caret: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
isInvalid: {
|
|
30
|
+
true: {};
|
|
31
|
+
};
|
|
29
32
|
}, {
|
|
30
33
|
root: string;
|
|
31
34
|
group: string;
|
|
@@ -58,6 +61,9 @@ declare const otpInputVariants: _jamsrui_utils.TVReturnType<{
|
|
|
58
61
|
caret: string;
|
|
59
62
|
};
|
|
60
63
|
};
|
|
64
|
+
isInvalid: {
|
|
65
|
+
true: {};
|
|
66
|
+
};
|
|
61
67
|
}, {
|
|
62
68
|
root: string;
|
|
63
69
|
group: string;
|
|
@@ -90,6 +96,9 @@ declare const otpInputVariants: _jamsrui_utils.TVReturnType<{
|
|
|
90
96
|
caret: string;
|
|
91
97
|
};
|
|
92
98
|
};
|
|
99
|
+
isInvalid: {
|
|
100
|
+
true: {};
|
|
101
|
+
};
|
|
93
102
|
}, {
|
|
94
103
|
root: string;
|
|
95
104
|
group: string;
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{radiusVariant as t,tv as r}from"@jamsrui/utils";const o=r({slots:{root:"otp-input otp-input__root relative flex gap-2 items-center group data-disabled:opacity-50 data-disabled:cursor-not-allowed",group:"otp-input__group flex",slot:"otp-input__slot border-divider relative flex items-center justify-center border-y border-r first:border-l first:rounded-l-md last:rounded-r-md transition-all duration-300 ease-in-out outline-solid outline-0 outline-accent-foreground/20 group-data-hover:border-primary-foreground/20 group-focus-within:border-primary-foreground/30 data-active:outline-primary-foreground",separator:"otp-input__separator w-4 h-1 bg-divider",input:["otp-input__input absolute bg-transparent inset-0 size-full outline-none outline-0 border-none border-0","z-10 text-transparent selection:text-transparent selection:bg-transparent"],caret:"otp-input__caret absolute pointer-events-none flex w-[1.5px] bg-primary-foreground animate-caret-blink z-1"},variants:{radius:t(["group","separator"],"otp-input"),size:{sm:{slot:"w-8 h-8 data-active:outline-2",caret:"h-4"},md:{slot:"w-10 h-10 data-active:outline-3",caret:"h-5"},lg:{slot:"w-12 h-12 data-active:outline-4",caret:"h-6"}}},defaultVariants:{radius:"md",size:"md"}});export{o as otpInputVariants};
|
|
1
|
+
import{radiusVariant as t,tv as r}from"@jamsrui/utils";const o=r({slots:{root:"otp-input otp-input__root relative flex gap-2 items-center group data-disabled:opacity-50 data-disabled:cursor-not-allowed",group:"otp-input__group flex",slot:"otp-input__slot border-divider relative flex items-center justify-center border-y border-r first:border-l first:rounded-l-md last:rounded-r-md transition-all duration-300 ease-in-out outline-solid outline-0 outline-accent-foreground/20 group-data-hover:border-primary-foreground/20 group-focus-within:border-primary-foreground/30 data-active:outline-primary-foreground",separator:"otp-input__separator w-4 h-1 bg-divider",input:["otp-input__input absolute bg-transparent inset-0 size-full outline-none outline-0 border-none border-0","z-10 text-transparent selection:text-transparent selection:bg-transparent"],caret:"otp-input__caret absolute pointer-events-none flex w-[1.5px] bg-primary-foreground animate-caret-blink z-1"},variants:{radius:t(["group","separator"],"otp-input"),size:{sm:{slot:"w-8 h-8 data-active:outline-2",caret:"h-4"},md:{slot:"w-10 h-10 data-active:outline-3",caret:"h-5"},lg:{slot:"w-12 h-12 data-active:outline-4",caret:"h-6"}},isInvalid:{true:{}}},defaultVariants:{radius:"md",size:"md"}});export{o as otpInputVariants};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/otp-input",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@jamsrui/core": "^0.0.13",
|
|
9
|
-
"@jamsrui/hooks": "^0.0.
|
|
10
|
-
"@jamsrui/utils": "^0.0.
|
|
9
|
+
"@jamsrui/hooks": "^0.0.16",
|
|
10
|
+
"@jamsrui/utils": "^0.0.16"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|