diff --git a/index.html b/index.html index 415c914..090cdc9 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
Declarative pin code component for Svelte.
",u=$(),i=f("p"),i.innerHTML='GitHub repo',k=$(),y=f("p"),y.textContent="A pin code is a short sequence of characters (usually numeric) used for verification. It differs from a password in that it is typically ephemeral and is not predetermined by the user.",x=$(),P=f("p"),P.innerHTML='Try it in the Svelte REPL.',I=$(),T=f("hr"),C=$(),L=f("p"),L.innerHTML="Table of Contents",M=f("ul"),M.innerHTML='code
or value
prop.",B=$(),V=f("ul"),V.innerHTML="string[]
): Array of input values. An empty string represents an undefined value.string
): code
joined as a string.selectTextOnFocus
to true
for the input value text to be selected when focused.",jn=$(),Hn=f("div"),G(On.$$.fragment),Nn=$(),En=f("button"),En.textContent="Focus input\n",Sn=f("pre"),_n=$(),Fn=f("h3"),Fn.textContent="Numeric variant",An=$(),qn=f("p"),qn.textContent="By default, this component accepts alphanumeric values.",Dn=$(),zn=f("p"),zn.innerHTML="Set type
to "numeric"
to only allow numbers.",Bn=$(),Jn=f("div"),G(Rn.$$.fragment),Vn=f("pre"),Un=$(),Gn=f("h3"),Gn.textContent="Initial values",Zn=$(),Kn=f("p"),Kn.innerHTML="Define intitial input values by using the code
prop or value
prop on PincodeInput
.",Yn=$(),Qn=f("div"),G(Wn.$$.fragment),ns=$(),ss=f("div"),as=m("code: "),ts=f("code"),es=m(Pt),ps=f("pre"),os=$(),cs=f("h3"),cs.textContent="Validating upon completion",ls=$(),us=f("p"),us.textContent="Actual validation is left to the consumer.",is=$(),rs=f("p"),rs.innerHTML="This example illustrates how you can validate the code once all inputs have a value by binding to the complete
prop.",ks=$(),ds=f("div"),G(gs.$$.fragment),$s=$(),hs=f("div"),Et&&Et.c(),vs=$(),St&&St.c(),ys=$(),_t&&_t.c(),xs=$(),bs=f("pre"),ws=$(),Ps=f("p"),Ps.innerHTML="Use the dispatched “complete” event as an alternative to binding the complete
prop.",Is=$(),Ts=f("pre"),Cs=$(),Ls=f("h3"),Ls.textContent="Programmatic usage",Ms=$(),js=f("p"),js.innerHTML="code
can be set programmatically.",Hs=$(),Os=f("p"),Os.textContent="In the following example, type some initial values and try setting or clearing the code.",Ns=$(),Es=f("div"),G(Ss.$$.fragment),Fs=$(),As=f("div"),qs=m("code: "),Ds=f("code"),zs=m(It),Bs=$(),Js=f("button"),Js.textContent="Set code",Rs=$(),Vs=f("button"),Vs.textContent="Clear code\n",Us=f("pre"),Gs=$(),Zs=f("h3"),Zs.textContent="Focusing the first input",Ks=$(),Ys=f("p"),Ys.innerHTML="To programmatically focus the first input, invoke the focusFirstInput
method in a component reference.",Qs=$(),Ws=f("div"),G(Xs.$$.fragment),na=$(),sa=f("button"),sa.textContent="Focus first input\n",aa=f("pre"),ta=$(),ea=f("h3"),ea.textContent="Focusing the next empty input",pa=$(),oa=f("p"),oa.innerHTML="To focus the next input with no value, invoke the focusNextEmptyInput
method.",ca=$(),la=f("div"),G(ua.$$.fragment),ia=$(),ra=f("button"),ra.textContent="Focus next empty input\n",ka=f("pre"),da=$(),ga=f("h3"),ga.textContent="Focusing the last input",fa=$(),ma=f("p"),ma.innerHTML="To focus the last input, invoke the focusLastInput
method.",$a=$(),ha=f("div"),G(va.$$.fragment),ya=$(),xa=f("button"),xa.textContent="Focus last input\n",ba=f("pre"),wa=$(),Pa=f("h2"),Pa.textContent="Styling",Ia=$(),Ta=f("h3"),Ta.textContent="Customization",Ca=$(),La=f("p"),La.innerHTML="This component is minimally styled; override the default styles by targeting the data-pincode
selector:",Ma=$(),ja=f("pre"),Ha=$(),Oa=f("h3"),Oa.textContent="Unstyled components",Na=$(),Ea=f("p"),Ea.innerHTML="Use the unstyled components located in the svelte/src/unstyled
folder if you prefer to style the components from scratch.",Sa=$(),_a=f("pre"),Fa=$(),Aa=f("h2"),Aa.textContent="API",qa=$(),Da=f("h3"),Da.textContent="Pincode",za=$(),Ba=f("h4"),Ba.textContent="Props",Ja=$(),Ra=f("table"),Ra.innerHTML='string[]
[]
string
""
"alphanumeric"
or "numeric"
"alphanumeric"
boolean
false
focusFirstInput
focusNextEmptyInput
focusLastInput
string
"input" + Math.random().toString(36)
HTMLInputElement
null
Declarative pin code component for Svelte.
",u=$(),i=f("p"),i.innerHTML='GitHub repo',k=$(),y=f("p"),y.textContent="A pin code is a short sequence of characters (usually numeric) used for verification. It differs from a password in that it is typically ephemeral and is not predetermined by the user.",x=$(),P=f("p"),P.innerHTML='Try it in the Svelte REPL.',I=$(),T=f("hr"),C=$(),L=f("p"),L.innerHTML="Table of Contents",M=f("ul"),M.innerHTML='code
or value
prop.",en=$(),on=f("ul"),on.innerHTML="string[]
): Array of input values. An empty string represents an undefined value.string
): code
joined as a string.selectTextOnFocus
to true
for the input value text to be selected when focused.",Dn=$(),zn=f("div"),G(Bn.$$.fragment),Jn=$(),Rn=f("button"),Rn.textContent="Focus input\n",Vn=f("pre"),Un=$(),Gn=f("h3"),Gn.textContent="Numeric variant",Zn=$(),Kn=f("p"),Kn.textContent="By default, this component accepts alphanumeric values.",Yn=$(),Qn=f("p"),Qn.innerHTML="Set type
to "numeric"
to only allow numbers.",Wn=$(),Xn=f("div"),G(ns.$$.fragment),ss=f("pre"),as=$(),ts=f("h3"),ts.textContent="Initial values",es=$(),ps=f("p"),ps.innerHTML="Define intitial input values by using the code
prop or value
prop on PincodeInput
.",os=$(),cs=f("div"),G(ls.$$.fragment),is=$(),rs=f("div"),ks=m("code: "),ds=f("code"),gs=m(At),fs=f("pre"),ms=$(),$s=f("h3"),$s.textContent="Validating upon completion",hs=$(),vs=f("p"),vs.textContent="Actual validation is left to the consumer.",ys=$(),xs=f("p"),xs.innerHTML="This example illustrates how you can validate the code once all inputs have a value by binding to the complete
prop.",bs=$(),ws=f("div"),G(Ps.$$.fragment),Cs=$(),Ls=f("div"),Zt&&Zt.c(),Ms=$(),Kt&&Kt.c(),Hs=$(),Yt&&Yt.c(),js=$(),Os=f("pre"),Ns=$(),Ss=f("p"),Ss.innerHTML="Use the dispatched “complete” event as an alternative to binding the complete
prop.",Es=$(),_s=f("pre"),Fs=$(),As=f("h3"),As.textContent="Programmatic usage",qs=$(),Ds=f("p"),Ds.innerHTML="code
can be set programmatically.",zs=$(),Bs=f("p"),Bs.textContent="In the following example, type some initial values and try setting or clearing the code.",Js=$(),Rs=f("div"),G(Vs.$$.fragment),Gs=$(),Zs=f("div"),Ks=m("code: "),Ys=f("code"),Qs=m(qt),Ws=$(),Xs=f("button"),Xs.textContent="Set code",na=$(),sa=f("button"),sa.textContent="Clear code\n",aa=f("pre"),ta=$(),ea=f("h3"),ea.textContent="Focusing the first input",pa=$(),oa=f("p"),oa.innerHTML="To programmatically focus the first input, invoke the focusFirstInput
method in a component reference.",ca=$(),la=f("div"),G(ua.$$.fragment),ia=$(),ra=f("button"),ra.textContent="Focus first input\n",ka=f("pre"),da=$(),ga=f("h3"),ga.textContent="Focusing the next empty input",fa=$(),ma=f("p"),ma.innerHTML="To focus the next input with no value, invoke the focusNextEmptyInput
method.",$a=$(),ha=f("div"),G(va.$$.fragment),ya=$(),xa=f("button"),xa.textContent="Focus next empty input\n",ba=f("pre"),wa=$(),Pa=f("h3"),Pa.textContent="Focusing the last input",Ia=$(),Ta=f("p"),Ta.innerHTML="To focus the last input, invoke the focusLastInput
method.",Ca=$(),La=f("div"),G(Ma.$$.fragment),Ha=$(),ja=f("button"),ja.textContent="Focus last input\n",Oa=f("pre"),Na=$(),Sa=f("h2"),Sa.textContent="Styling",Ea=$(),_a=f("h3"),_a.textContent="Customization",Fa=$(),Aa=f("p"),Aa.innerHTML="This component is minimally styled; override the default styles by targeting the data-pincode
selector:",qa=$(),Da=f("pre"),za=$(),Ba=f("h3"),Ba.textContent="Unstyled components",Ja=$(),Ra=f("p"),Ra.innerHTML="Use the unstyled components located in the svelte/src/unstyled
folder if you prefer to style the components from scratch.",Va=$(),Ua=f("pre"),Ga=$(),Za=f("h2"),Za.textContent="API",Ka=$(),Ya=f("h3"),Ya.textContent="Pincode",Qa=$(),Wa=f("h4"),Wa.textContent="Props",Xa=$(),nt=f("table"),nt.innerHTML='string[]
[]
string
""
"alphanumeric"
or "numeric"
"alphanumeric"
boolean
false
focusFirstInput
focusNextEmptyInput
focusLastInput
string
"input" + Math.random().toString(36)
HTMLInputElement
null