@vritti/quantum-ui 0.1.8 → 0.1.9
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/Label.js +40 -0
- package/dist/Label.js.map +1 -0
- package/dist/OTPField.d.ts +17 -0
- package/dist/PasswordField.d.ts +2 -0
- package/dist/PasswordField.js +26 -5
- package/dist/PasswordField.js.map +1 -1
- package/dist/PhoneField.d.ts +24 -0
- package/dist/PhoneField.js +10411 -0
- package/dist/PhoneField.js.map +1 -0
- package/dist/TextField.js +2 -40
- package/dist/TextField.js.map +1 -1
- package/dist/assets/quantum-ui.css +133 -0
- package/dist/components/OTPField.d.ts +2 -0
- package/dist/components/OTPField.js +135 -0
- package/dist/components/OTPField.js.map +1 -0
- package/dist/components/PhoneField.d.ts +2 -0
- package/dist/components/PhoneField.js +2 -0
- package/dist/components/PhoneField.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +13 -2
package/dist/TextField.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { c as cn } from './utils.js';
|
|
3
|
-
import
|
|
4
|
-
import { P as Primitive } from './index2.js';
|
|
3
|
+
import { L as Label } from './Label.js';
|
|
5
4
|
|
|
6
5
|
function Input({ className, type, ...props }) {
|
|
7
6
|
return /* @__PURE__ */ jsx(
|
|
@@ -20,39 +19,6 @@ function Input({ className, type, ...props }) {
|
|
|
20
19
|
);
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
var NAME = "Label";
|
|
24
|
-
var Label$1 = React.forwardRef((props, forwardedRef) => {
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
-
Primitive.label,
|
|
27
|
-
{
|
|
28
|
-
...props,
|
|
29
|
-
ref: forwardedRef,
|
|
30
|
-
onMouseDown: (event) => {
|
|
31
|
-
const target = event.target;
|
|
32
|
-
if (target.closest("button, input, select, textarea")) return;
|
|
33
|
-
props.onMouseDown?.(event);
|
|
34
|
-
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
Label$1.displayName = NAME;
|
|
40
|
-
var Root = Label$1;
|
|
41
|
-
|
|
42
|
-
function Label({ className, ...props }) {
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
Root,
|
|
45
|
-
{
|
|
46
|
-
"data-slot": "label",
|
|
47
|
-
className: cn(
|
|
48
|
-
"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",
|
|
49
|
-
className
|
|
50
|
-
),
|
|
51
|
-
...props
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
22
|
const TextField = ({
|
|
57
23
|
label,
|
|
58
24
|
message,
|
|
@@ -70,11 +36,7 @@ const TextField = ({
|
|
|
70
36
|
/* @__PURE__ */ jsx(
|
|
71
37
|
Input,
|
|
72
38
|
{
|
|
73
|
-
className: cn(
|
|
74
|
-
className,
|
|
75
|
-
startAdornment && "pl-10",
|
|
76
|
-
endAdornment && "pr-10"
|
|
77
|
-
),
|
|
39
|
+
className: cn(className, startAdornment && "pl-10", endAdornment && "pr-10"),
|
|
78
40
|
"aria-describedby": message ? `${id || "field"}-message` : void 0,
|
|
79
41
|
"aria-invalid": error,
|
|
80
42
|
"data-slot": "input",
|
package/dist/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../shadcn/shadcnInput/Input.tsx","../
|
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../shadcn/shadcnInput/Input.tsx","../lib/components/TextField/TextField.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot='input'\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import React from 'react';\nimport { Input } from '../../../shadcn/shadcnInput';\nimport { Label } from '../../../shadcn/shadcnLabel';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface TextFieldProps extends React.ComponentProps<'input'> {\n /**\n * Label for the field\n */\n label?: string;\n\n /**\n * Helper or error message to display below the field\n */\n message?: React.ReactNode;\n\n /**\n * Whether the message represents an error state\n */\n error?: boolean;\n\n /**\n * Element to display at the start of the input (e.g., icon)\n */\n startAdornment?: React.ReactNode;\n\n /**\n * Element to display at the end of the input (e.g., icon button)\n */\n endAdornment?: React.ReactNode;\n}\n\n// TextField molecule - Input + Label composition\nexport const TextField: React.FC<TextFieldProps> = ({\n label,\n message,\n error = false,\n className,\n id,\n startAdornment,\n endAdornment,\n ...props\n}) => {\n return (\n <div className='space-y-2' data-slot='field'>\n {label && <Label data-slot='label'>{label}</Label>}\n\n <div className='relative'>\n {startAdornment && (\n <div className='absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none'>{startAdornment}</div>\n )}\n <Input\n className={cn(className, startAdornment && 'pl-10', endAdornment && 'pr-10')}\n aria-describedby={message ? `${id || 'field'}-message` : undefined}\n aria-invalid={error}\n data-slot='input'\n {...props}\n />\n {endAdornment && <div className='absolute inset-y-0 right-0 flex items-center pr-3'>{endAdornment}</div>}\n </div>\n\n {message && (\n <div\n id={`${id || 'field'}-message`}\n className={cn('text-xs', error ? 'text-destructive' : 'text-muted-foreground')}\n role={error ? 'alert' : undefined}\n data-slot='message'\n >\n {message}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AAIA,SAAS,MAAM,EAAE,SAAA,EAAW,IAAA,EAAM,GAAG,OAAM,EAAkC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,WAAA,EAAU,OAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,icAAA;AAAA,QACA,+EAAA;AAAA,QACA,wGAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;ACeO,MAAM,YAAsC,CAAC;AAAA,EAClD,KAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,SAAA;AAAA,EACA,EAAA;AAAA,EACA,cAAA;AAAA,EACA,YAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAM;AACJ,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,WAAA,EAAY,aAAU,OAAA,EAClC,QAAA,EAAA;AAAA,IAAA,KAAA,oBAAS,GAAA,CAAC,KAAA,EAAA,EAAM,WAAA,EAAU,OAAA,EAAS,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,oBAE1C,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,UAAA,EACZ,QAAA,EAAA;AAAA,MAAA,cAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,sEAAA,EAAwE,QAAA,EAAA,cAAA,EAAe,CAAA;AAAA,sBAExG,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,WAAW,EAAA,CAAG,SAAA,EAAW,cAAA,IAAkB,OAAA,EAAS,gBAAgB,OAAO,CAAA;AAAA,UAC3E,kBAAA,EAAkB,OAAA,GAAU,CAAA,EAAG,EAAA,IAAM,OAAO,CAAA,QAAA,CAAA,GAAa,MAAA;AAAA,UACzD,cAAA,EAAc,KAAA;AAAA,UACd,WAAA,EAAU,OAAA;AAAA,UACT,GAAG;AAAA;AAAA,OACN;AAAA,MACC,YAAA,oBAAgB,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qDAAqD,QAAA,EAAA,YAAA,EAAa;AAAA,KAAA,EACpG,CAAA;AAAA,IAEC,OAAA,oBACC,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAI,CAAA,EAAG,EAAA,IAAM,OAAO,CAAA,QAAA,CAAA;AAAA,QACpB,SAAA,EAAW,EAAA,CAAG,SAAA,EAAW,KAAA,GAAQ,qBAAqB,uBAAuB,CAAA;AAAA,QAC7E,IAAA,EAAM,QAAQ,OAAA,GAAU,MAAA;AAAA,QACxB,WAAA,EAAU,SAAA;AAAA,QAET,QAAA,EAAA;AAAA;AAAA;AACH,GAAA,EAEJ,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* CSS variables. */
|
|
2
|
+
:root {
|
|
3
|
+
--PhoneInput-color--focus: #03b2cb;
|
|
4
|
+
--PhoneInputInternationalIconPhone-opacity: 0.8;
|
|
5
|
+
--PhoneInputInternationalIconGlobe-opacity: 0.65;
|
|
6
|
+
--PhoneInputCountrySelect-marginRight: 0.35em;
|
|
7
|
+
--PhoneInputCountrySelectArrow-width: 0.3em;
|
|
8
|
+
--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);
|
|
9
|
+
--PhoneInputCountrySelectArrow-borderWidth: 1px;
|
|
10
|
+
--PhoneInputCountrySelectArrow-opacity: 0.45;
|
|
11
|
+
--PhoneInputCountrySelectArrow-color: currentColor;
|
|
12
|
+
--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);
|
|
13
|
+
--PhoneInputCountrySelectArrow-transform: rotate(45deg);
|
|
14
|
+
--PhoneInputCountryFlag-aspectRatio: 1.5;
|
|
15
|
+
--PhoneInputCountryFlag-height: 1em;
|
|
16
|
+
--PhoneInputCountryFlag-borderWidth: 1px;
|
|
17
|
+
--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);
|
|
18
|
+
--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);
|
|
19
|
+
--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.PhoneInput {
|
|
23
|
+
/* This is done to stretch the contents of this component. */
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.PhoneInputInput {
|
|
29
|
+
/* The phone number input stretches to fill all empty space */
|
|
30
|
+
flex: 1;
|
|
31
|
+
/* The phone number input should shrink
|
|
32
|
+
to make room for the extension input */
|
|
33
|
+
min-width: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.PhoneInputCountryIcon {
|
|
37
|
+
width: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));
|
|
38
|
+
height: var(--PhoneInputCountryFlag-height);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.PhoneInputCountryIcon--square {
|
|
42
|
+
width: var(--PhoneInputCountryFlag-height);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.PhoneInputCountryIcon--border {
|
|
46
|
+
/* Removed `background-color` because when an `<img/>` was still loading
|
|
47
|
+
it would show a dark gray rectangle. */
|
|
48
|
+
/* For some reason the `<img/>` is not stretched to 100% width and height
|
|
49
|
+
and sometime there can be seen white pixels of the background at top and bottom. */
|
|
50
|
+
background-color: var(--PhoneInputCountryFlag-backgroundColor--loading);
|
|
51
|
+
/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */
|
|
52
|
+
/* For some reason the `<img/>` is not stretched to 100% width and height
|
|
53
|
+
and sometime there can be seen white pixels of the background at top and bottom,
|
|
54
|
+
so an additional "inset" border is added. */
|
|
55
|
+
box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),
|
|
56
|
+
inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.PhoneInputCountryIconImg {
|
|
60
|
+
/* Fixes weird vertical space above the flag icon. */
|
|
61
|
+
/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */
|
|
62
|
+
display: block;
|
|
63
|
+
/* 3rd party <SVG/> flag icons won't stretch if they have `width` and `height`.
|
|
64
|
+
Also, if an <SVG/> icon's aspect ratio was different, it wouldn't fit too. */
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.PhoneInputInternationalIconPhone {
|
|
70
|
+
opacity: var(--PhoneInputInternationalIconPhone-opacity);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.PhoneInputInternationalIconGlobe {
|
|
74
|
+
opacity: var(--PhoneInputInternationalIconGlobe-opacity);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Styling native country `<select/>`. */
|
|
78
|
+
|
|
79
|
+
.PhoneInputCountry {
|
|
80
|
+
position: relative;
|
|
81
|
+
align-self: stretch;
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
margin-right: var(--PhoneInputCountrySelect-marginRight);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.PhoneInputCountrySelect {
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 0;
|
|
90
|
+
left: 0;
|
|
91
|
+
height: 100%;
|
|
92
|
+
width: 100%;
|
|
93
|
+
z-index: 1;
|
|
94
|
+
border: 0;
|
|
95
|
+
opacity: 0;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.PhoneInputCountrySelect[disabled],
|
|
100
|
+
.PhoneInputCountrySelect[readonly] {
|
|
101
|
+
cursor: default;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.PhoneInputCountrySelectArrow {
|
|
105
|
+
display: block;
|
|
106
|
+
content: '';
|
|
107
|
+
width: var(--PhoneInputCountrySelectArrow-width);
|
|
108
|
+
height: var(--PhoneInputCountrySelectArrow-width);
|
|
109
|
+
margin-left: var(--PhoneInputCountrySelectArrow-marginLeft);
|
|
110
|
+
border-style: solid;
|
|
111
|
+
border-color: var(--PhoneInputCountrySelectArrow-color);
|
|
112
|
+
border-top-width: 0;
|
|
113
|
+
border-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);
|
|
114
|
+
border-left-width: 0;
|
|
115
|
+
border-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);
|
|
116
|
+
transform: var(--PhoneInputCountrySelectArrow-transform);
|
|
117
|
+
opacity: var(--PhoneInputCountrySelectArrow-opacity);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
color: var(--PhoneInputCountrySelectArrow-color--focus);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {
|
|
126
|
+
box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),
|
|
127
|
+
inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
color: var(--PhoneInputCountrySelectArrow-color--focus);
|
|
133
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { c as cn } from '../utils.js';
|
|
5
|
+
import { L as Label } from '../Label.js';
|
|
6
|
+
import { c as createLucideIcon } from '../createLucideIcon.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.544.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const __iconNode = [["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]];
|
|
17
|
+
const Dot = createLucideIcon("dot", __iconNode);
|
|
18
|
+
|
|
19
|
+
var Bt=Object.defineProperty,At=Object.defineProperties;var kt=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var gt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;var vt=(r,s,e)=>s in r?Bt(r,s,{enumerable:true,configurable:true,writable:true,value:e}):r[s]=e,St=(r,s)=>{for(var e in s||(s={}))gt.call(s,e)&&vt(r,e,s[e]);if(Y)for(var e of Y(s))Et.call(s,e)&&vt(r,e,s[e]);return r},bt=(r,s)=>At(r,kt(s));var Pt=(r,s)=>{var e={};for(var u in r)gt.call(r,u)&&s.indexOf(u)<0&&(e[u]=r[u]);if(r!=null&&Y)for(var u of Y(r))s.indexOf(u)<0&&Et.call(r,u)&&(e[u]=r[u]);return e};function ht(r){let s=setTimeout(r,0),e=setTimeout(r,10),u=setTimeout(r,50);return [s,e,u]}function _t(r){let s=React.useRef();return React.useEffect(()=>{s.current=r;}),s.current}var Ot=18,wt=40,Gt=`${wt}px`,xt=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Tt({containerRef:r,inputRef:s,pushPasswordManagerStrategy:e,isFocused:u}){let[P,D]=React.useState(false),[G,H]=React.useState(false),[F,W]=React.useState(false),Z=React.useMemo(()=>e==="none"?false:(e==="increase-width"||e==="experimental-no-flickering")&&P&&G,[P,G,e]),T=React.useCallback(()=>{let f=r.current,h=s.current;if(!f||!h||F||e==="none")return;let a=f,B=a.getBoundingClientRect().left+a.offsetWidth,A=a.getBoundingClientRect().top+a.offsetHeight/2,z=B-Ot,q=A;document.querySelectorAll(xt).length===0&&document.elementFromPoint(z,q)===f||(D(true),W(true));},[r,s,F,e]);return React.useEffect(()=>{let f=r.current;if(!f||e==="none")return;function h(){let A=window.innerWidth-f.getBoundingClientRect().right;H(A>=wt);}h();let a=setInterval(h,1e3);return ()=>{clearInterval(a);}},[r,e]),React.useEffect(()=>{let f=u||document.activeElement===s.current;if(e==="none"||!f)return;let h=setTimeout(T,0),a=setTimeout(T,2e3),B=setTimeout(T,5e3),A=setTimeout(()=>{W(true);},6e3);return ()=>{clearTimeout(h),clearTimeout(a),clearTimeout(B),clearTimeout(A);}},[s,u,e,T]),{hasPWMBadge:P,willPushPWMBadge:Z,PWM_BADGE_SPACE_WIDTH:Gt}}var jt=React.createContext({}),Lt=React.forwardRef((A,B)=>{var z=A,{value:r,onChange:s,maxLength:e,textAlign:u="left",pattern:P,placeholder:D,inputMode:G="numeric",onComplete:H,pushPasswordManagerStrategy:F="increase-width",pasteTransformer:W,containerClassName:Z,noScriptCSSFallback:T=Nt,render:f,children:h}=z,a=Pt(z,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);var X,lt,ut,dt,ft;let[q,nt]=React.useState(typeof a.defaultValue=="string"?a.defaultValue:""),i=r!=null?r:q,I=_t(i),x=React.useCallback(t=>{s==null||s(t),nt(t);},[s]),m=React.useMemo(()=>P?typeof P=="string"?new RegExp(P):P:null,[P]),l=React.useRef(null),K=React.useRef(null),J=React.useRef({value:i,onChange:x,isIOS:typeof window!="undefined"&&((lt=(X=window==null?void 0:window.CSS)==null?void 0:X.supports)==null?void 0:lt.call(X,"-webkit-touch-callout","none"))}),V=React.useRef({prev:[(ut=l.current)==null?void 0:ut.selectionStart,(dt=l.current)==null?void 0:dt.selectionEnd,(ft=l.current)==null?void 0:ft.selectionDirection]});React.useImperativeHandle(B,()=>l.current,[]),React.useEffect(()=>{let t=l.current,o=K.current;if(!t||!o)return;J.current.value!==t.value&&J.current.onChange(t.value),V.current.prev=[t.selectionStart,t.selectionEnd,t.selectionDirection];function d(){if(document.activeElement!==t){L(null),N(null);return}let c=t.selectionStart,b=t.selectionEnd,mt=t.selectionDirection,v=t.maxLength,C=t.value,_=V.current.prev,g=-1,E=-1,w;if(C.length!==0&&c!==null&&b!==null){let Dt=c===b,Ht=c===C.length&&C.length<v;if(Dt&&!Ht){let y=c;if(y===0)g=0,E=1,w="forward";else if(y===v)g=y-1,E=y,w="backward";else if(v>1&&C.length>1){let et=0;if(_[0]!==null&&_[1]!==null){w=y<_[1]?"backward":"forward";let Wt=_[0]===_[1]&&_[0]<v;w==="backward"&&!Wt&&(et=-1);}g=et+y,E=et+y+1;}}g!==-1&&E!==-1&&g!==E&&l.current.setSelectionRange(g,E,w);}let pt=g!==-1?g:c,Rt=E!==-1?E:b,yt=w!=null?w:mt;L(pt),N(Rt),V.current.prev=[pt,Rt,yt];}if(document.addEventListener("selectionchange",d,{capture:true}),d(),document.activeElement===t&&Q(true),!document.getElementById("input-otp-style")){let c=document.createElement("style");if(c.id="input-otp-style",document.head.appendChild(c),c.sheet){let b="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;";$(c.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),$(c.sheet,`[data-input-otp]:autofill { ${b} }`),$(c.sheet,`[data-input-otp]:-webkit-autofill { ${b} }`),$(c.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; } }"),$(c.sheet,"[data-input-otp] + * { pointer-events: all !important; }");}}let R=()=>{o&&o.style.setProperty("--root-height",`${t.clientHeight}px`);};R();let p=new ResizeObserver(R);return p.observe(t),()=>{document.removeEventListener("selectionchange",d,{capture:true}),p.disconnect();}},[]);let[ot,rt]=React.useState(false),[j,Q]=React.useState(false),[M,L]=React.useState(null),[k,N]=React.useState(null);React.useEffect(()=>{ht(()=>{var R,p,c,b;(R=l.current)==null||R.dispatchEvent(new Event("input"));let t=(p=l.current)==null?void 0:p.selectionStart,o=(c=l.current)==null?void 0:c.selectionEnd,d=(b=l.current)==null?void 0:b.selectionDirection;t!==null&&o!==null&&(L(t),N(o),V.current.prev=[t,o,d]);});},[i,j]),React.useEffect(()=>{I!==void 0&&i!==I&&I.length<e&&i.length===e&&(H==null||H(i));},[e,H,I,i]);let O=Tt({containerRef:K,inputRef:l,pushPasswordManagerStrategy:F,isFocused:j}),st=React.useCallback(t=>{let o=t.currentTarget.value.slice(0,e);if(o.length>0&&m&&!m.test(o)){t.preventDefault();return}typeof I=="string"&&o.length<I.length&&document.dispatchEvent(new Event("selectionchange")),x(o);},[e,x,I,m]),at=React.useCallback(()=>{var t;if(l.current){let o=Math.min(l.current.value.length,e-1),d=l.current.value.length;(t=l.current)==null||t.setSelectionRange(o,d),L(o),N(d);}Q(true);},[e]),ct=React.useCallback(t=>{var g,E;let o=l.current;if(!W&&(!J.current.isIOS||!t.clipboardData||!o))return;let d=t.clipboardData.getData("text/plain"),R=W?W(d):d;t.preventDefault();let p=(g=l.current)==null?void 0:g.selectionStart,c=(E=l.current)==null?void 0:E.selectionEnd,v=(p!==c?i.slice(0,p)+R+i.slice(c):i.slice(0,p)+R+i.slice(p)).slice(0,e);if(v.length>0&&m&&!m.test(v))return;o.value=v,x(v);let C=Math.min(v.length,e-1),_=v.length;o.setSelectionRange(C,_),L(C),N(_);},[e,x,m,i]),It=React.useMemo(()=>({position:"relative",cursor:a.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[a.disabled]),it=React.useMemo(()=>({position:"absolute",inset:0,width:O.willPushPWMBadge?`calc(100% + ${O.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:O.willPushPWMBadge?`inset(0 ${O.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:u,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)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[O.PWM_BADGE_SPACE_WIDTH,O.willPushPWMBadge,u]),Mt=React.useMemo(()=>React.createElement("input",bt(St({autoComplete:a.autoComplete||"one-time-code"},a),{"data-input-otp":true,"data-input-otp-placeholder-shown":i.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":k,inputMode:G,pattern:m==null?void 0:m.source,"aria-placeholder":D,style:it,maxLength:e,value:i,ref:l,onPaste:t=>{var o;ct(t),(o=a.onPaste)==null||o.call(a,t);},onChange:st,onMouseOver:t=>{var o;rt(true),(o=a.onMouseOver)==null||o.call(a,t);},onMouseLeave:t=>{var o;rt(false),(o=a.onMouseLeave)==null||o.call(a,t);},onFocus:t=>{var o;at(),(o=a.onFocus)==null||o.call(a,t);},onBlur:t=>{var o;Q(false),(o=a.onBlur)==null||o.call(a,t);}})),[st,at,ct,G,it,e,k,M,a,m==null?void 0:m.source,i]),tt=React.useMemo(()=>({slots:Array.from({length:e}).map((t,o)=>{var c;let d=j&&M!==null&&k!==null&&(M===k&&o===M||o>=M&&o<k),R=i[o]!==void 0?i[o]:null,p=i[0]!==void 0?null:(c=D==null?void 0:D[o])!=null?c:null;return {char:R,placeholderChar:p,isActive:d,hasFakeCaret:d&&R===null}}),isFocused:j,isHovering:!a.disabled&&ot}),[j,ot,e,k,M,a.disabled,i]),Ct=React.useMemo(()=>f?f(tt):React.createElement(jt.Provider,{value:tt},h),[h,tt,f]);return React.createElement(React.Fragment,null,T!==null&&React.createElement("noscript",null,React.createElement("style",null,T)),React.createElement("div",{ref:K,"data-input-otp-container":true,style:It,className:Z},Ct,React.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Mt)))});Lt.displayName="Input";function $(r,s){try{r.insertRule(s);}catch(e){console.error("input-otp could not insert CSS rule:",s);}}var Nt=`
|
|
20
|
+
[data-input-otp] {
|
|
21
|
+
--nojs-bg: white !important;
|
|
22
|
+
--nojs-fg: black !important;
|
|
23
|
+
|
|
24
|
+
background-color: var(--nojs-bg) !important;
|
|
25
|
+
color: var(--nojs-fg) !important;
|
|
26
|
+
caret-color: var(--nojs-fg) !important;
|
|
27
|
+
letter-spacing: .25em !important;
|
|
28
|
+
text-align: center !important;
|
|
29
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
30
|
+
border-radius: 4px !important;
|
|
31
|
+
width: 100% !important;
|
|
32
|
+
}
|
|
33
|
+
@media (prefers-color-scheme: dark) {
|
|
34
|
+
[data-input-otp] {
|
|
35
|
+
--nojs-bg: black !important;
|
|
36
|
+
--nojs-fg: white !important;
|
|
37
|
+
}
|
|
38
|
+
}`;
|
|
39
|
+
|
|
40
|
+
const InputOTP = React.forwardRef(
|
|
41
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
42
|
+
Lt,
|
|
43
|
+
{
|
|
44
|
+
ref,
|
|
45
|
+
containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName),
|
|
46
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
InputOTP.displayName = "InputOTP";
|
|
52
|
+
const InputOTPGroup = React.forwardRef(
|
|
53
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
54
|
+
);
|
|
55
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
56
|
+
const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
57
|
+
const inputOTPContext = React.useContext(jt);
|
|
58
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
59
|
+
return /* @__PURE__ */ jsxs(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
className: cn(
|
|
64
|
+
"relative flex h-12 w-12 items-center justify-center border-y border-r border-input text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
65
|
+
"bg-transparent dark:bg-input/30 text-foreground",
|
|
66
|
+
"focus-within:outline-none focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
|
|
67
|
+
isActive && "z-10 border-ring ring-ring/50 ring-[3px]",
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
...props,
|
|
71
|
+
children: [
|
|
72
|
+
char,
|
|
73
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
79
|
+
const InputOTPSeparator = React.forwardRef(
|
|
80
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Dot, {}) })
|
|
81
|
+
);
|
|
82
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
83
|
+
|
|
84
|
+
const OTPField = ({
|
|
85
|
+
value,
|
|
86
|
+
onChange,
|
|
87
|
+
length = 6,
|
|
88
|
+
label,
|
|
89
|
+
message,
|
|
90
|
+
error,
|
|
91
|
+
disabled,
|
|
92
|
+
required,
|
|
93
|
+
className
|
|
94
|
+
}) => {
|
|
95
|
+
const fieldId = React__default.useId();
|
|
96
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", "data-slot": "field", children: [
|
|
97
|
+
label && /* @__PURE__ */ jsxs(Label, { "data-slot": "label", children: [
|
|
98
|
+
label,
|
|
99
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
InputOTP,
|
|
103
|
+
{
|
|
104
|
+
maxLength: length,
|
|
105
|
+
value,
|
|
106
|
+
onChange,
|
|
107
|
+
disabled,
|
|
108
|
+
containerClassName: cn("justify-center", className),
|
|
109
|
+
children: /* @__PURE__ */ jsx(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx(
|
|
110
|
+
InputOTPSlot,
|
|
111
|
+
{
|
|
112
|
+
index,
|
|
113
|
+
className: cn(
|
|
114
|
+
error && "border-destructive focus-within:ring-destructive/20 dark:focus-within:ring-destructive/40"
|
|
115
|
+
)
|
|
116
|
+
},
|
|
117
|
+
index
|
|
118
|
+
)) })
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
message && /* @__PURE__ */ jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
id: `${fieldId}-message`,
|
|
125
|
+
className: cn("text-xs text-center", error ? "text-destructive" : "text-muted-foreground"),
|
|
126
|
+
role: error ? "alert" : void 0,
|
|
127
|
+
"data-slot": "message",
|
|
128
|
+
children: message
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] });
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export { OTPField };
|
|
135
|
+
//# sourceMappingURL=OTPField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTPField.js","sources":["../../node_modules/lucide-react/dist/esm/icons/dot.js","../../node_modules/input-otp/dist/index.mjs","../../shadcn/shadcnInputOTP/InputOTP.tsx","../../lib/components/OTPField/OTPField.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"circle\", { cx: \"12.1\", cy: \"12.1\", r: \"1\", key: \"18d7e5\" }]];\nconst Dot = createLucideIcon(\"dot\", __iconNode);\n\nexport { __iconNode, Dot as default };\n//# sourceMappingURL=dot.js.map\n","var Bt=Object.defineProperty,At=Object.defineProperties;var kt=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var gt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;var vt=(r,s,e)=>s in r?Bt(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,St=(r,s)=>{for(var e in s||(s={}))gt.call(s,e)&&vt(r,e,s[e]);if(Y)for(var e of Y(s))Et.call(s,e)&&vt(r,e,s[e]);return r},bt=(r,s)=>At(r,kt(s));var Pt=(r,s)=>{var e={};for(var u in r)gt.call(r,u)&&s.indexOf(u)<0&&(e[u]=r[u]);if(r!=null&&Y)for(var u of Y(r))s.indexOf(u)<0&&Et.call(r,u)&&(e[u]=r[u]);return e};import*as n from\"react\";function ht(r){let s=setTimeout(r,0),e=setTimeout(r,10),u=setTimeout(r,50);return[s,e,u]}import*as U from\"react\";function _t(r){let s=U.useRef();return U.useEffect(()=>{s.current=r}),s.current}import*as S from\"react\";var Ot=18,wt=40,Gt=`${wt}px`,xt=[\"[data-lastpass-icon-root]\",\"com-1password-button\",\"[data-dashlanecreated]\",'[style$=\"2147483647 !important;\"]'].join(\",\");function Tt({containerRef:r,inputRef:s,pushPasswordManagerStrategy:e,isFocused:u}){let[P,D]=S.useState(!1),[G,H]=S.useState(!1),[F,W]=S.useState(!1),Z=S.useMemo(()=>e===\"none\"?!1:(e===\"increase-width\"||e===\"experimental-no-flickering\")&&P&&G,[P,G,e]),T=S.useCallback(()=>{let f=r.current,h=s.current;if(!f||!h||F||e===\"none\")return;let a=f,B=a.getBoundingClientRect().left+a.offsetWidth,A=a.getBoundingClientRect().top+a.offsetHeight/2,z=B-Ot,q=A;document.querySelectorAll(xt).length===0&&document.elementFromPoint(z,q)===f||(D(!0),W(!0))},[r,s,F,e]);return S.useEffect(()=>{let f=r.current;if(!f||e===\"none\")return;function h(){let A=window.innerWidth-f.getBoundingClientRect().right;H(A>=wt)}h();let a=setInterval(h,1e3);return()=>{clearInterval(a)}},[r,e]),S.useEffect(()=>{let f=u||document.activeElement===s.current;if(e===\"none\"||!f)return;let h=setTimeout(T,0),a=setTimeout(T,2e3),B=setTimeout(T,5e3),A=setTimeout(()=>{W(!0)},6e3);return()=>{clearTimeout(h),clearTimeout(a),clearTimeout(B),clearTimeout(A)}},[s,u,e,T]),{hasPWMBadge:P,willPushPWMBadge:Z,PWM_BADGE_SPACE_WIDTH:Gt}}var jt=n.createContext({}),Lt=n.forwardRef((A,B)=>{var z=A,{value:r,onChange:s,maxLength:e,textAlign:u=\"left\",pattern:P,placeholder:D,inputMode:G=\"numeric\",onComplete:H,pushPasswordManagerStrategy:F=\"increase-width\",pasteTransformer:W,containerClassName:Z,noScriptCSSFallback:T=Nt,render:f,children:h}=z,a=Pt(z,[\"value\",\"onChange\",\"maxLength\",\"textAlign\",\"pattern\",\"placeholder\",\"inputMode\",\"onComplete\",\"pushPasswordManagerStrategy\",\"pasteTransformer\",\"containerClassName\",\"noScriptCSSFallback\",\"render\",\"children\"]);var X,lt,ut,dt,ft;let[q,nt]=n.useState(typeof a.defaultValue==\"string\"?a.defaultValue:\"\"),i=r!=null?r:q,I=_t(i),x=n.useCallback(t=>{s==null||s(t),nt(t)},[s]),m=n.useMemo(()=>P?typeof P==\"string\"?new RegExp(P):P:null,[P]),l=n.useRef(null),K=n.useRef(null),J=n.useRef({value:i,onChange:x,isIOS:typeof window!=\"undefined\"&&((lt=(X=window==null?void 0:window.CSS)==null?void 0:X.supports)==null?void 0:lt.call(X,\"-webkit-touch-callout\",\"none\"))}),V=n.useRef({prev:[(ut=l.current)==null?void 0:ut.selectionStart,(dt=l.current)==null?void 0:dt.selectionEnd,(ft=l.current)==null?void 0:ft.selectionDirection]});n.useImperativeHandle(B,()=>l.current,[]),n.useEffect(()=>{let t=l.current,o=K.current;if(!t||!o)return;J.current.value!==t.value&&J.current.onChange(t.value),V.current.prev=[t.selectionStart,t.selectionEnd,t.selectionDirection];function d(){if(document.activeElement!==t){L(null),N(null);return}let c=t.selectionStart,b=t.selectionEnd,mt=t.selectionDirection,v=t.maxLength,C=t.value,_=V.current.prev,g=-1,E=-1,w;if(C.length!==0&&c!==null&&b!==null){let Dt=c===b,Ht=c===C.length&&C.length<v;if(Dt&&!Ht){let y=c;if(y===0)g=0,E=1,w=\"forward\";else if(y===v)g=y-1,E=y,w=\"backward\";else if(v>1&&C.length>1){let et=0;if(_[0]!==null&&_[1]!==null){w=y<_[1]?\"backward\":\"forward\";let Wt=_[0]===_[1]&&_[0]<v;w===\"backward\"&&!Wt&&(et=-1)}g=et+y,E=et+y+1}}g!==-1&&E!==-1&&g!==E&&l.current.setSelectionRange(g,E,w)}let pt=g!==-1?g:c,Rt=E!==-1?E:b,yt=w!=null?w:mt;L(pt),N(Rt),V.current.prev=[pt,Rt,yt]}if(document.addEventListener(\"selectionchange\",d,{capture:!0}),d(),document.activeElement===t&&Q(!0),!document.getElementById(\"input-otp-style\")){let c=document.createElement(\"style\");if(c.id=\"input-otp-style\",document.head.appendChild(c),c.sheet){let b=\"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;\";$(c.sheet,\"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }\"),$(c.sheet,`[data-input-otp]:autofill { ${b} }`),$(c.sheet,`[data-input-otp]:-webkit-autofill { ${b} }`),$(c.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; } }\"),$(c.sheet,\"[data-input-otp] + * { pointer-events: all !important; }\")}}let R=()=>{o&&o.style.setProperty(\"--root-height\",`${t.clientHeight}px`)};R();let p=new ResizeObserver(R);return p.observe(t),()=>{document.removeEventListener(\"selectionchange\",d,{capture:!0}),p.disconnect()}},[]);let[ot,rt]=n.useState(!1),[j,Q]=n.useState(!1),[M,L]=n.useState(null),[k,N]=n.useState(null);n.useEffect(()=>{ht(()=>{var R,p,c,b;(R=l.current)==null||R.dispatchEvent(new Event(\"input\"));let t=(p=l.current)==null?void 0:p.selectionStart,o=(c=l.current)==null?void 0:c.selectionEnd,d=(b=l.current)==null?void 0:b.selectionDirection;t!==null&&o!==null&&(L(t),N(o),V.current.prev=[t,o,d])})},[i,j]),n.useEffect(()=>{I!==void 0&&i!==I&&I.length<e&&i.length===e&&(H==null||H(i))},[e,H,I,i]);let O=Tt({containerRef:K,inputRef:l,pushPasswordManagerStrategy:F,isFocused:j}),st=n.useCallback(t=>{let o=t.currentTarget.value.slice(0,e);if(o.length>0&&m&&!m.test(o)){t.preventDefault();return}typeof I==\"string\"&&o.length<I.length&&document.dispatchEvent(new Event(\"selectionchange\")),x(o)},[e,x,I,m]),at=n.useCallback(()=>{var t;if(l.current){let o=Math.min(l.current.value.length,e-1),d=l.current.value.length;(t=l.current)==null||t.setSelectionRange(o,d),L(o),N(d)}Q(!0)},[e]),ct=n.useCallback(t=>{var g,E;let o=l.current;if(!W&&(!J.current.isIOS||!t.clipboardData||!o))return;let d=t.clipboardData.getData(\"text/plain\"),R=W?W(d):d;t.preventDefault();let p=(g=l.current)==null?void 0:g.selectionStart,c=(E=l.current)==null?void 0:E.selectionEnd,v=(p!==c?i.slice(0,p)+R+i.slice(c):i.slice(0,p)+R+i.slice(p)).slice(0,e);if(v.length>0&&m&&!m.test(v))return;o.value=v,x(v);let C=Math.min(v.length,e-1),_=v.length;o.setSelectionRange(C,_),L(C),N(_)},[e,x,m,i]),It=n.useMemo(()=>({position:\"relative\",cursor:a.disabled?\"default\":\"text\",userSelect:\"none\",WebkitUserSelect:\"none\",pointerEvents:\"none\"}),[a.disabled]),it=n.useMemo(()=>({position:\"absolute\",inset:0,width:O.willPushPWMBadge?`calc(100% + ${O.PWM_BADGE_SPACE_WIDTH})`:\"100%\",clipPath:O.willPushPWMBadge?`inset(0 ${O.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:\"100%\",display:\"flex\",textAlign:u,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)\",fontFamily:\"monospace\",fontVariantNumeric:\"tabular-nums\"}),[O.PWM_BADGE_SPACE_WIDTH,O.willPushPWMBadge,u]),Mt=n.useMemo(()=>n.createElement(\"input\",bt(St({autoComplete:a.autoComplete||\"one-time-code\"},a),{\"data-input-otp\":!0,\"data-input-otp-placeholder-shown\":i.length===0||void 0,\"data-input-otp-mss\":M,\"data-input-otp-mse\":k,inputMode:G,pattern:m==null?void 0:m.source,\"aria-placeholder\":D,style:it,maxLength:e,value:i,ref:l,onPaste:t=>{var o;ct(t),(o=a.onPaste)==null||o.call(a,t)},onChange:st,onMouseOver:t=>{var o;rt(!0),(o=a.onMouseOver)==null||o.call(a,t)},onMouseLeave:t=>{var o;rt(!1),(o=a.onMouseLeave)==null||o.call(a,t)},onFocus:t=>{var o;at(),(o=a.onFocus)==null||o.call(a,t)},onBlur:t=>{var o;Q(!1),(o=a.onBlur)==null||o.call(a,t)}})),[st,at,ct,G,it,e,k,M,a,m==null?void 0:m.source,i]),tt=n.useMemo(()=>({slots:Array.from({length:e}).map((t,o)=>{var c;let d=j&&M!==null&&k!==null&&(M===k&&o===M||o>=M&&o<k),R=i[o]!==void 0?i[o]:null,p=i[0]!==void 0?null:(c=D==null?void 0:D[o])!=null?c:null;return{char:R,placeholderChar:p,isActive:d,hasFakeCaret:d&&R===null}}),isFocused:j,isHovering:!a.disabled&&ot}),[j,ot,e,k,M,a.disabled,i]),Ct=n.useMemo(()=>f?f(tt):n.createElement(jt.Provider,{value:tt},h),[h,tt,f]);return n.createElement(n.Fragment,null,T!==null&&n.createElement(\"noscript\",null,n.createElement(\"style\",null,T)),n.createElement(\"div\",{ref:K,\"data-input-otp-container\":!0,style:It,className:Z},Ct,n.createElement(\"div\",{style:{position:\"absolute\",inset:0,pointerEvents:\"none\"}},Mt)))});Lt.displayName=\"Input\";function $(r,s){try{r.insertRule(s)}catch(e){console.error(\"input-otp could not insert CSS rule:\",s)}}var Nt=`\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}`;var Kt=\"^\\\\d+$\",Jt=\"^[a-zA-Z]+$\",Qt=\"^[a-zA-Z0-9]+$\";export{Lt as OTPInput,jt as OTPInputContext,Jt as REGEXP_ONLY_CHARS,Kt as REGEXP_ONLY_DIGITS,Qt as REGEXP_ONLY_DIGITS_AND_CHARS};\n//# sourceMappingURL=index.mjs.map","import * as React from 'react';\nimport { OTPInput, OTPInputContext } from 'input-otp';\nimport { Dot } from 'lucide-react';\n\nimport { cn } from '../utils';\n\nconst InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(\n ({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn('flex items-center gap-2 has-[:disabled]:opacity-50', containerClassName)}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n);\nInputOTP.displayName = 'InputOTP';\n\nconst InputOTPGroup = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('flex items-center', className)} {...props} />\n);\nInputOTPGroup.displayName = 'InputOTPGroup';\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n 'relative flex h-12 w-12 items-center justify-center border-y border-r border-input text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n 'bg-transparent dark:bg-input/30 text-foreground',\n 'focus-within:outline-none focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\n isActive && 'z-10 border-ring ring-ring/50 ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nInputOTPSlot.displayName = 'InputOTPSlot';\n\nconst InputOTPSeparator = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(\n ({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n )\n);\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n","import React from 'react';\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from '../../../shadcn/shadcnInputOTP';\nimport { Label } from '../../../shadcn/shadcnLabel';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface OTPFieldProps {\n /**\n * OTP value\n */\n value: string;\n\n /**\n * Callback when OTP changes\n */\n onChange: (value: string) => void;\n\n /**\n * Number of OTP digits\n * @default 6\n */\n length?: number;\n\n /**\n * Label for the field\n */\n label?: string;\n\n /**\n * Helper or error message to display below the field\n */\n message?: string;\n\n /**\n * Whether the message represents an error state\n */\n error?: boolean;\n\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the field is required\n */\n required?: boolean;\n\n /**\n * CSS class name for styling\n */\n className?: string;\n}\n\n// OTPField component - specialized input for one-time passwords\nexport const OTPField: React.FC<OTPFieldProps> = ({\n value,\n onChange,\n length = 6,\n label,\n message,\n error,\n disabled,\n required,\n className,\n}) => {\n const fieldId = React.useId();\n\n return (\n <div className='space-y-2' data-slot='field'>\n {label && (\n <Label data-slot='label'>\n {label}\n {required && <span className='text-destructive ml-1'>*</span>}\n </Label>\n )}\n\n <InputOTP\n maxLength={length}\n value={value}\n onChange={onChange}\n disabled={disabled}\n containerClassName={cn('justify-center', className)}\n >\n <InputOTPGroup>\n {Array.from({ length }, (_, index) => (\n <InputOTPSlot\n key={index}\n index={index}\n className={cn(\n error && 'border-destructive focus-within:ring-destructive/20 dark:focus-within:ring-destructive/40'\n )}\n />\n ))}\n </InputOTPGroup>\n </InputOTP>\n\n {message && (\n <div\n id={`${fieldId}-message`}\n className={cn('text-xs text-center', error ? 'text-destructive' : 'text-muted-foreground')}\n role={error ? 'alert' : undefined}\n data-slot='message'\n >\n {message}\n </div>\n )}\n </div>\n );\n};\n"],"names":["U","S","n","OTPInput","OTPInputContext","React"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClF,MAAM,GAAG,GAAG,gBAAgB,CAAC,K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
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
|
+
import { Country } from 'react-phone-number-input';
|
|
3
4
|
import { default as default_2 } from 'react';
|
|
5
|
+
import { isValidPhoneNumber } from 'react-phone-number-input';
|
|
6
|
+
import { Value as PhoneValue } from 'react-phone-number-input';
|
|
4
7
|
import * as React_2 from 'react';
|
|
5
8
|
import { VariantProps } from 'class-variance-authority';
|
|
6
9
|
|
|
@@ -115,13 +118,33 @@ export declare function cn(...inputs: ClassValue[]) {
|
|
|
115
118
|
return twMerge(clsx(inputs));
|
|
116
119
|
}
|
|
117
120
|
|
|
121
|
+
export { isValidPhoneNumber }
|
|
122
|
+
|
|
118
123
|
export declare const PasswordField: default_2.FC<PasswordFieldProps>;
|
|
119
124
|
|
|
120
125
|
declare interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endAdornment'> {
|
|
121
126
|
showStrengthIndicator?: boolean;
|
|
127
|
+
showMatchIndicator?: boolean;
|
|
128
|
+
matchPassword?: string;
|
|
122
129
|
toggleAriaLabel?: string;
|
|
123
130
|
}
|
|
124
131
|
|
|
132
|
+
export declare const PhoneField: default_2.FC<PhoneFieldProps>;
|
|
133
|
+
|
|
134
|
+
export declare interface PhoneFieldProps {
|
|
135
|
+
value?: PhoneValue;
|
|
136
|
+
onChange: (value: PhoneValue | undefined) => void;
|
|
137
|
+
defaultCountry?: Country;
|
|
138
|
+
label?: string;
|
|
139
|
+
message?: string;
|
|
140
|
+
error?: boolean;
|
|
141
|
+
disabled?: boolean;
|
|
142
|
+
className?: string;
|
|
143
|
+
placeholder?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { PhoneValue }
|
|
147
|
+
|
|
125
148
|
export declare const TextField: default_2.FC<TextFieldProps>;
|
|
126
149
|
|
|
127
150
|
declare interface TextFieldProps extends default_2.ComponentProps<'input'> {
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { C as Card, a as CardContent, b as CardDescription, c as CardFooter, d a
|
|
|
4
4
|
export { C as Checkbox } from './Checkbox.js';
|
|
5
5
|
export { T as TextField } from './TextField.js';
|
|
6
6
|
export { P as PasswordField } from './PasswordField.js';
|
|
7
|
+
export { P as PhoneField, i as isValidPhoneNumber } from './PhoneField.js';
|
|
7
8
|
export { T as ThemeToggle } from './ThemeToggle.js';
|
|
8
9
|
export { T as Typography } from './Typography.js';
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.9",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"repository": {
|
|
@@ -63,7 +63,16 @@
|
|
|
63
63
|
"./PasswordField": {
|
|
64
64
|
"types": "./dist/PasswordField.d.ts",
|
|
65
65
|
"import": "./dist/components/PasswordField.js"
|
|
66
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"./PhoneField": {
|
|
68
|
+
"types": "./dist/PhoneField.d.ts",
|
|
69
|
+
"import": "./dist/components/PhoneField.js"
|
|
70
|
+
},
|
|
71
|
+
"./OTPField": {
|
|
72
|
+
"types": "./dist/OTPField.d.ts",
|
|
73
|
+
"import": "./dist/components/OTPField.js"
|
|
74
|
+
},
|
|
75
|
+
"./dist/assets/quantum-ui.css": "./dist/assets/quantum-ui.css"
|
|
67
76
|
},
|
|
68
77
|
"files": [
|
|
69
78
|
"dist"
|
|
@@ -118,7 +127,9 @@
|
|
|
118
127
|
"@tailwindcss/vite": "^4.1.13",
|
|
119
128
|
"class-variance-authority": "^0.7.1",
|
|
120
129
|
"clsx": "^2.1.1",
|
|
130
|
+
"input-otp": "^1.4.2",
|
|
121
131
|
"lucide-react": "^0.544.0",
|
|
132
|
+
"react-phone-number-input": "^3.4.12",
|
|
122
133
|
"tailwind-merge": "^3.3.1"
|
|
123
134
|
}
|
|
124
135
|
}
|