@sekyro/elements 0.1.0-rc.23 → 0.1.0-rc.25
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/CHANGELOG.md +24 -0
- package/dist/cdn/chunks/capture-session-doc-56O6IQ3D-FTWOAELH.js +1 -0
- package/dist/cdn/chunks/challenge-frame-LWDSKM5K-J3CNO3XT.js +1 -0
- package/dist/cdn/chunks/{chunk-HHBISLBD.js → chunk-23W5VB46.js} +1 -1
- package/dist/cdn/chunks/{chunk-ZWC7BGLD.js → chunk-34QKBDWM.js} +1 -1
- package/dist/cdn/chunks/{chunk-RCDZUOGM.js → chunk-43I6I3SU.js} +1 -1
- package/dist/cdn/chunks/{chunk-PXF2CWO3.js → chunk-4EWD6VW3.js} +1 -1
- package/dist/cdn/chunks/chunk-4VFGV3VA.js +1 -0
- package/dist/cdn/chunks/{chunk-POVLMWGM.js → chunk-53PI7QVO.js} +1 -1
- package/dist/cdn/chunks/chunk-5ZUDZLHN.js +1 -0
- package/dist/cdn/chunks/chunk-7UCVVWRT.js +1 -0
- package/dist/cdn/chunks/chunk-AXCBMN2S.js +33 -0
- package/dist/cdn/chunks/{chunk-RVPBL3KC.js → chunk-B5QW2GSC.js} +1 -1
- package/dist/cdn/chunks/{chunk-UMGCNKDP.js → chunk-E7S6A26U.js} +1 -1
- package/dist/cdn/chunks/chunk-F6BL7IXJ.js +1 -0
- package/dist/cdn/chunks/chunk-IHKI3APK.js +25 -0
- package/dist/cdn/chunks/chunk-PNQ5TDY5.js +1 -0
- package/dist/cdn/chunks/{chunk-BZCLR3ZW.js → chunk-PPERVFSD.js} +1 -1
- package/dist/cdn/chunks/{chunk-B7JVGTNG.js → chunk-SS7SVE6O.js} +1 -1
- package/dist/cdn/chunks/{chunk-HM5EP25H.js → chunk-UALTP6H4.js} +1 -1
- package/dist/cdn/chunks/chunk-VD2BADU2.js +1 -0
- package/dist/cdn/chunks/chunk-VQSFTT4B.js +3 -0
- package/dist/cdn/chunks/{chunk-QFCNXANK.js → chunk-W5QMFEZY.js} +1 -1
- package/dist/cdn/chunks/chunk-W5WWCOOW.js +1 -0
- package/dist/cdn/chunks/chunk-XYXBZEKH.js +1 -0
- package/dist/cdn/chunks/{chunk-MLNUIPVU.js → chunk-YR7GTH7M.js} +1 -1
- package/dist/cdn/chunks/{chunk-NGWIL3RI.js → chunk-YWAPDHEW.js} +1 -1
- package/dist/cdn/chunks/create-document-capture-TTMHZP7R-YI3GL7MF.js +1 -0
- package/dist/cdn/chunks/document-capture-view-5EYETVEI-UMC6FOKY.js +1 -0
- package/dist/cdn/chunks/{eid-view-FEJHQBSB-YSYB6LNM.js → eid-view-INQTMVDU-FRHHODOC.js} +1 -1
- package/dist/cdn/chunks/{email-otp-view-4EY5CKR5-QMWJOSCD.js → email-otp-view-OO535PQT-6N2IPXEG.js} +1 -1
- package/dist/cdn/chunks/flow-views-EW2KEEFU-7LTB52QC.js +1 -0
- package/dist/cdn/chunks/form-view-LJLYP54G-N2BB5ZXR.js +1 -0
- package/dist/cdn/chunks/icons-form-R366YPMB-6C7SJPCB.js +1 -0
- package/dist/cdn/chunks/mrz-band-IH54XO42-AE4D3F2E.js +1 -0
- package/dist/cdn/chunks/overlay-de-VGC75M5R-ZUC7ZPRY.js +1 -0
- package/dist/cdn/chunks/overlay-es-CSXBWVAG-IQMHKRYH.js +1 -0
- package/dist/cdn/chunks/overlay-pt-RGTYSSOJ-EH2IJ6QI.js +1 -0
- package/dist/cdn/chunks/plan-runner-FW3EAJCC-H4N5NEL4.js +1 -0
- package/dist/cdn/chunks/{portrait-capture-view-Q6XYTGE7-BL2EYATL.js → portrait-capture-view-N36CKIFR-JIO6P6XN.js} +1 -1
- package/dist/cdn/chunks/{portrait-review-view-KZVKR6XN-QEZYASJF.js → portrait-review-view-OG23OEMA-E4JD5Q5S.js} +1 -1
- package/dist/cdn/chunks/{proof-of-address-view-YYZTILHQ-BVR6FUOS.js → proof-of-address-view-CHM5JRHI-PUHZCNXH.js} +1 -1
- package/dist/cdn/define.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/{chunk-XZZPJ2FQ.js → chunk-2PJRIGH2.js} +1 -1
- package/dist/{chunk-ZBTWLEPS.js → chunk-2QEYDBI7.js} +1 -1
- package/dist/{chunk-OAQM45LZ.js → chunk-FFRJKCZK.js} +1 -1
- package/dist/chunk-GDADEN5C.js +33 -0
- package/dist/chunk-HBK2ROSI.js +1 -0
- package/dist/{chunk-3J5LUPKY.js → chunk-JAEOFYLJ.js} +1 -1
- package/dist/chunk-JW4QXADM.js +25 -0
- package/dist/{chunk-TEJOSW5W.js → chunk-KEN7JBVG.js} +1 -1
- package/dist/{chunk-NHOIIIGP.js → chunk-MLH4M6JP.js} +1 -1
- package/dist/chunk-NMUB5C2E.js +1 -0
- package/dist/{chunk-PEFS2JPA.js → chunk-OEZKZQC4.js} +1 -1
- package/dist/{chunk-5KU4GIMW.js → chunk-RAF7Z7I3.js} +1 -1
- package/dist/{chunk-ZTBXWO2O.js → chunk-RJVZHRDP.js} +1 -1
- package/dist/{chunk-APMABLNO.js → chunk-RXILZ6JM.js} +1 -1
- package/dist/{chunk-L2F6LQ7G.js → chunk-SD4A47RM.js} +1 -1
- package/dist/define.cjs +5 -5
- package/dist/define.js +1 -1
- package/dist/document-capture-view-5EYETVEI-ZQ5RAN4Y.js +1 -0
- package/dist/{eid-view-FEJHQBSB-NDFXLUCN.js → eid-view-INQTMVDU-H7KHUN3L.js} +1 -1
- package/dist/{email-otp-view-4EY5CKR5-PXH6WYZN.js → email-otp-view-OO535PQT-6EYUU43N.js} +1 -1
- package/dist/flow-views-EW2KEEFU-H7LOLIEJ.js +1 -0
- package/dist/form-view-LJLYP54G-OUW66I62.js +1 -0
- package/dist/icons-form-R366YPMB-KUTXHC7X.js +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +1 -1
- package/dist/overlay-de-VGC75M5R-C6XYWRT5.js +1 -0
- package/dist/overlay-es-CSXBWVAG-MSMVW5KX.js +1 -0
- package/dist/overlay-pt-RGTYSSOJ-QA5FJP3U.js +1 -0
- package/dist/{portrait-capture-view-Q6XYTGE7-VKH2G5FA.js → portrait-capture-view-N36CKIFR-S2H37PI5.js} +1 -1
- package/dist/{portrait-review-view-KZVKR6XN-RIAO3V65.js → portrait-review-view-OG23OEMA-MO3FN432.js} +1 -1
- package/dist/{proof-of-address-view-YYZTILHQ-7OJWBD3P.js → proof-of-address-view-CHM5JRHI-U6ARAGX7.js} +1 -1
- package/dist/styles.css +54 -0
- package/package.json +2 -2
- package/sbom.cdx.json +4 -4
- package/dist/cdn/chunks/capture-session-doc-ENDGVJ3L-IMAPC36N.js +0 -1
- package/dist/cdn/chunks/challenge-frame-FGQBS3HD-S3UO5OUT.js +0 -1
- package/dist/cdn/chunks/chunk-4RREQCYP.js +0 -1
- package/dist/cdn/chunks/chunk-BG7ZLMF3.js +0 -1
- package/dist/cdn/chunks/chunk-CUFOLAZN.js +0 -25
- package/dist/cdn/chunks/chunk-FUMXKBXY.js +0 -3
- package/dist/cdn/chunks/chunk-HHII35OF.js +0 -1
- package/dist/cdn/chunks/chunk-LSBUNQZU.js +0 -1
- package/dist/cdn/chunks/chunk-NNIK6RGK.js +0 -1
- package/dist/cdn/chunks/chunk-NU2VUYVN.js +0 -1
- package/dist/cdn/chunks/chunk-PSLOZIUH.js +0 -33
- package/dist/cdn/chunks/chunk-TCXBCGZF.js +0 -1
- package/dist/cdn/chunks/create-document-capture-SZ4SIVVC-P4MMZXVZ.js +0 -1
- package/dist/cdn/chunks/document-capture-view-ZQONDCSM-CX2F54ZS.js +0 -1
- package/dist/cdn/chunks/flow-views-JC2DWBW3-GP5F4777.js +0 -1
- package/dist/cdn/chunks/form-view-GPITA6X5-YDYPXP7W.js +0 -1
- package/dist/cdn/chunks/mrz-band-A6NIHZV3-GJO4UMKB.js +0 -1
- package/dist/cdn/chunks/overlay-de-7NCDPEIN-KI2BS6I6.js +0 -1
- package/dist/cdn/chunks/overlay-es-6MGCPCFO-CYCUQRCB.js +0 -1
- package/dist/cdn/chunks/overlay-pt-VTK6XJDH-VFNANCPU.js +0 -1
- package/dist/cdn/chunks/plan-runner-MC6KC7PK-E55J5SPN.js +0 -1
- package/dist/chunk-AVSVM522.js +0 -25
- package/dist/chunk-GDJMAPFB.js +0 -33
- package/dist/chunk-QNR2GBZ5.js +0 -1
- package/dist/document-capture-view-ZQONDCSM-HUO7JCZZ.js +0 -1
- package/dist/flow-views-JC2DWBW3-YYRQOY3A.js +0 -1
- package/dist/form-view-GPITA6X5-VZF6Y2HM.js +0 -1
- package/dist/overlay-de-7NCDPEIN-BWTDIED4.js +0 -1
- package/dist/overlay-es-6MGCPCFO-SV56NQSV.js +0 -1
- package/dist/overlay-pt-VTK6XJDH-IWQLAZ7L.js +0 -1
package/dist/cdn/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as r,c as t,d as o,e as i,f as a,g as f}from"./chunks/chunk-
|
|
1
|
+
import{a as e,b as r,c as t,d as o,e as i,f as a,g as f}from"./chunks/chunk-AXCBMN2S.js";import"./chunks/chunk-YWAPDHEW.js";import"./chunks/chunk-5ZUDZLHN.js";import"./chunks/chunk-E7S6A26U.js";import"./chunks/chunk-SS7SVE6O.js";import"./chunks/chunk-7UCVVWRT.js";import"./chunks/chunk-SIBJ56BG.js";import"./chunks/chunk-VD2BADU2.js";import"./chunks/chunk-4EWD6VW3.js";import"./chunks/chunk-23W5VB46.js";import"./chunks/chunk-W5QMFEZY.js";import{a as n}from"./chunks/chunk-VQSFTT4B.js";import"./chunks/chunk-YR7GTH7M.js";import"./chunks/chunk-UALTP6H4.js";import"./chunks/chunk-34QKBDWM.js";import"./chunks/chunk-IHKI3APK.js";import"./chunks/chunk-XYXBZEKH.js";import"./chunks/chunk-B5QW2GSC.js";import"./chunks/chunk-43I6I3SU.js";import"./chunks/chunk-P7K7ELYZ.js";import"./chunks/chunk-5QL6W6FW.js";import"./chunks/chunk-6MYG4HWP.js";import"./chunks/chunk-JS2IXPNL.js";import"./chunks/chunk-SLLJX5QK.js";import"./chunks/chunk-4FHWXBOB.js";export{r as ATTRIBUTES,i as EVENTS,t as PROPERTIES,o as SLOTS,a as SekyroVerificationElement,e as TAG_NAME,n as createVerification,f as defineSekyroElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X,b as z}from"./chunk-AVSVM522.js";import{a,c as Z,i as n}from"./chunk-SSU37LFQ.js";var u=Z(X(),1),J=Z(X(),1),s=Z(z(),1),h=Z(z(),1);import{normalizeNni as pe}from"@sekyro/web";var ue="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",j;function Q(e){return j??(j=new Map(ue.split(" ").map(l=>{let[r,t]=l.slice(2).split("/");return[l.slice(0,2),[r,t]]}))),j.get(e.toUpperCase())}a(Q,"z");n(Q,"entryOf");function he(e){return Q(e)?.[0]}a(he,"Ne");n(he,"dialCodeOf");function re(e){return Q(e)?.[1]}a(re,"ee");n(re,"nationalPrefixOf");var ee=n(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold");function ne(e,l){let r=ee(l.trim());return r===""?e:e.filter(t=>ee(t.name).includes(r)||t.code.toLowerCase()===r)}a(ne,"ce");n(ne,"matchCountries");function ae({countries:e,label:l,searchPlaceholder:r,noMatch:t,onPick:v,selected:P,searchRef:f,scroll:E=!1,searchable:w=!0,detail:D,extra:y}){let[M,b]=(0,J.useState)(""),c=(0,J.useId)(),T=ne(e,M),N=(0,s.jsxs)("ul",{className:`sekyro-rows${E?" sekyro-rows--scroll":""}`,children:[T.map(d=>{let S=D?.(d.code);return(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",className:"sekyro-row-btn","aria-current":P===d.code||void 0,onClick:a(()=>v(d.code),"onClick"),children:[(0,s.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:se(d.code)}),(0,s.jsx)("span",{className:"sekyro-row-btn__name",children:d.name}),S!==void 0?(0,s.jsx)("bdi",{className:"sekyro-row-btn__detail",dir:"ltr",children:S}):null]})},d.code)}),y!==void 0?(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",className:"sekyro-row-btn","aria-current":y.current||void 0,onClick:y.onPick,children:[(0,s.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:"🌐"}),(0,s.jsx)("span",{className:"sekyro-row-btn__name",children:y.label})]})}):null]});return w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"sekyro-field",children:[(0,s.jsx)("label",{className:"sekyro-label",htmlFor:c,children:l}),(0,s.jsx)("input",{ref:f,id:c,type:"search",className:"sekyro-input",placeholder:r,value:M,onChange:a(d=>b(d.target.value),"onChange")})]}),T.length===0&&y===void 0?(0,s.jsx)("p",{className:"sekyro-text-muted",children:t}):N]}):N}a(ae,"te");n(ae,"CountryList");function U(e){let l=pe(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${l}`:l.startsWith("00")?`+${l.slice(2)}`:l}a(U,"H");n(U,"digitsOf");var le=n((e,l)=>(l.trunk!==void 0&&e.startsWith(l.trunk)?e.slice(l.trunk.length):e).slice(0,Math.max(...l.lengths)),"fitDigits");function Y(e,l){let r="",t=0;for(let v of l?.formats?.find(P=>new RegExp(`^(?:${P.leading})`).test(e))?.groups??[])t<e.length&&(r+=(t>0?" ":"")+e.slice(t,t+v)),t+=v;return r+e.slice(t)}a(Y,"Z");n(Y,"groupDigits");function oe(e,l){let r=0;for(let t=l;t>0&&r<e.length;r+=1)e[r]!==" "&&(t-=1);return r}a(oe,"oe");n(oe,"caretAfter");var ie=n((e,l)=>l.find(r=>e.startsWith(r.dial)),"countryOfNumber"),me=n((e,l)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${l} $1`),"lengthsLabel");function q(e){let l=U(e).replace("+","");return/^\d{8,15}$/.test(l)?`+${l}`:null}a(q,"le");n(q,"normalizedPhone");var se=n(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),l=>127397+l.charCodeAt(0))),"flagOf");function ce(e,l){if(l===null||!e.startsWith(l.dial))return q(e);let r=e.slice(l.dial.length).replace(/\D/g,""),t=re(l.code);return t!==void 0&&r.startsWith(t)&&(r=r.slice(t.length)),q(l.dial+r)}a(ce,"ye");n(ce,"e164Of");var te=n((e,l)=>(ie(e,l)??l[0])?.code??null,"countryFor");function de(e){let l=null;try{l=new Intl.DisplayNames([e],{type:"region"})}catch{}return r=>`${l?.of(r.code)??r.code} (${r.dial})`}a(de,"me");n(de,"countryLabels");var fe="other",ye=8;function ge({countries:e,international:l,closed:r,defaultPhone:t}){let[v,P]=(0,u.useState)(()=>te(t,e)),[f,E]=(0,u.useState)(t),[w,D]=(0,u.useState)(!1),[y,M]=(0,u.useState)(!1),b=e.map(o=>o.code).join(","),c=e.find(o=>o.code===v)??null,T=(0,u.useRef)(c);c!==null&&(T.current=c),(0,u.useEffect)(()=>{if(v===null||!e.some(o=>o.code===v)){let o=te(t,e);P(o);let i=T.current,k=e.find(C=>C.code===o)?.dial;k!==void 0&&E(C=>i!==null&&C.startsWith(i.dial)?k+C.slice(i.dial.length):C.startsWith("+")?C:k)}},[b,t]);let N=w||c===null,d=N||f.startsWith("+")&&!f.startsWith(c.dial),S=d?void 0:c.rule,x=d?f:f.replace(c.dial,"").replace(/\D/g,""),p=S?le(x,S):x,W=d&&!N&&!l&&r&&!e.some(o=>o.dial.startsWith(f)),I=W?null:S?S.lengths.includes(p.length)?c.dial+p:null:N&&!f.startsWith("+")?null:ce(f,w?null:c),H=d||c===null?I??f:`${c.dial} ${Y(p,S)}`,B=d?U(f).replace("+","")==="":p==="";return{countries:e,international:l,phone:f,selected:c,other:w,whole:d,free:N,rule:S,national:p,refused:W,typed:I,shown:H,empty:B,lengthShown:y,setLengthShown:M,onNumber:n(o=>{let i=o.target,k=o.nativeEvent.inputType,C=Math.max(0,i.value.lastIndexOf("+")),G=U(i.value.slice(C)),A=ie(G,e),_=U(i.value.slice(C,i.selectionStart)).length,F=G,V=G;if(M(!1),!A&&(N||G.startsWith("+")))l&&D(!0);else{let R=A??c,g=A?G.slice(A.dial.length):G;if(P(R.code),D(!1),g===p&&k?.startsWith("delete")&&(k.endsWith("Forward")||(_-=1),g=g.slice(0,_)+g.slice(_+1)),R.rule){let $=le(g,R.rule),O=g.length-$.length;_-=O,g=O>0&&!A&&p.length===$.length?p:$}V=R.dial+g,F=Y(g,R.rule)}E(V),i.value=F;let K=oe(F,_);i.setSelectionRange(K,K)},"onNumber"),onCountry:n(o=>{M(!1);let i=e.find(k=>k.code===o);D(i===void 0),i!==void 0&&P(i.code),E(i===void 0?"":i.dial+(d?"":p))},"onCountry")}}a(ge,"_e");n(ge,"usePhoneField");function Ne({field:e,id:l,locale:r,t,inputRef:v,invalid:P=!1,describedby:f,required:E,compact:w=!1,ready:D}){let{selected:y,whole:M,other:b,free:c,national:T,rule:N,phone:d,refused:S,typed:x,countries:p,international:W}=e,[I,H]=(0,u.useState)(!1),B=(0,u.useRef)(null),o=(0,u.useRef)(null),i=(0,u.useRef)(null),k=(0,u.useRef)(null),C=v??k,G=(0,u.useId)(),A=S?t("otp.reason_otp_destination_not_allowed"):e.lengthShown&&N?t("otp.phoneLengthError",{digits:me(N,t("otp.or"))}):"",_=p.length>1||W,F=de(r),V=(0,u.useMemo)(()=>{let m=null;try{m=new Intl.DisplayNames([r],{type:"region"})}catch{}return p.map(L=>({code:L.code,name:m?.of(L.code)??L.code}))},[p,r]),K=p.length>ye,R=[M?"":`${l}-dial ${l}-hint`,A?`${l}-error`:"",f??""].join(" ").trim()||void 0,g=n(m=>{H(!1),requestAnimationFrame(()=>(m==="lead"?B.current:C.current)?.focus())},"close"),$=n(()=>{if(I)return g("lead");H(!0),requestAnimationFrame(()=>(i.current??o.current?.querySelector('[aria-current="true"]')??o.current?.querySelector("button"))?.focus())},"toggle"),O=n(()=>(0,h.jsxs)("span",{className:"sekyro-phone__dial",id:`${l}-dial`,"aria-hidden":_||void 0,children:[(0,h.jsx)("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:b?"🌐":se(y.code)}),b?null:y.dial]}),"dial");return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:`sekyro-phone${w?" sekyro-phone--compact":""}`,dir:"ltr",children:[y===null||M&&!b?null:_?(0,h.jsx)("button",{ref:B,type:"button",className:"sekyro-phone__lead sekyro-phone__pick","aria-label":`${t("otp.countryLabel")}: ${b?t("otp.otherCountry"):F(y)}`,"aria-expanded":I,"aria-controls":I?G:void 0,onClick:$,children:O()}):(0,h.jsx)("div",{className:"sekyro-phone__lead",children:O()}),(0,h.jsx)("input",{ref:C,id:l,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",required:E,"aria-describedby":R,"aria-invalid":!!A||P||void 0,placeholder:c?"+":void 0,value:M?d:Y(T,N),onChange:e.onNumber,onKeyDown:a(m=>{m.key==="Enter"&&D===!1&&e.setLengthShown(!0)},"onKeyDown"),onBlur:a(m=>{let L=m.relatedTarget;L!==null&&(B.current?.contains(L)||o.current?.contains(L))||e.setLengthShown(T!==""&&x===null)},"onBlur")})]}),I?(0,h.jsx)("div",{ref:o,id:G,className:"sekyro-phone__list",onKeyDown:a(m=>{m.key==="Escape"&&(m.preventDefault(),g("lead"))},"onKeyDown"),children:(0,h.jsx)(ae,{countries:V,label:(0,h.jsx)("span",{className:"sekyro-visually-hidden",children:t("otp.countrySearch")}),searchPlaceholder:t("otp.countrySearch"),noMatch:t("doc.noCountryMatch"),searchable:K,scroll:!0,...K?{searchRef:i}:{},...!b&&y!==null?{selected:y.code}:{},detail:a(m=>p.find(L=>L.code===m)?.dial,"detail"),onPick:a(m=>{e.onCountry(m),g("number")},"onPick"),...W?{extra:{label:t("otp.otherCountry"),current:b,onPick:n(()=>{e.onCountry(fe),g("number")},"onPick")}}:{}})}):null,M?null:(0,h.jsx)("span",{className:"sekyro-help",id:`${l}-hint`,children:t("otp.phonePlaceholderGeneric")}),A?(0,h.jsx)("span",{className:"sekyro-help is-danger",id:`${l}-error`,role:"alert",children:A}):null]})}a(Ne,"xe");n(Ne,"PhoneField");export{he as a,ae as b,se as c,ge as d,Ne as e};
|
|
1
|
+
import{a as X,b as z}from"./chunk-JW4QXADM.js";import{a,c as Z,i as n}from"./chunk-SSU37LFQ.js";var u=Z(X(),1),J=Z(X(),1),s=Z(z(),1),h=Z(z(),1);import{normalizeNni as pe}from"@sekyro/web";var ue="AC247 AD376 AE971/0 AF93/0 AG1/1 AI1/1 AL355/0 AM374/0 AO244 AR54/0 AS1/1 AT43/0 AU61/0 AW297 AX358/0 AZ994/0 BA387/0 BB1/1 BD880/0 BE32/0 BF226 BG359/0 BH973 BI257 BJ229 BL590/0 BM1/1 BN673 BO591/0 BQ599 BR55/0 BS1/1 BT975 BW267 BY375/8 BZ501 CA1/1 CC61/0 CD243/0 CF236 CG242 CH41/0 CI225 CK682 CL56 CM237 CN86/0 CO57/0 CR506 CU53/0 CV238 CW599 CX61/0 CY357 CZ420 DE49/0 DJ253 DK45 DM1/1 DO1/1 DZ213/0 EC593/0 EE372 EG20/0 EH212/0 ER291/0 ES34 ET251/0 FI358/0 FJ679 FK500 FM691 FO298 FR33/0 GA241 GB44/0 GD1/1 GE995/0 GF594/0 GG44/0 GH233/0 GI350 GL299 GM220 GN224 GP590/0 GQ240 GR30 GT502 GU1/1 GW245 GY592 HK852 HN504 HR385/0 HT509 HU36/06 ID62/0 IE353/0 IL972/0 IM44/0 IN91/0 IO246 IQ964/0 IR98/0 IS354 IT39 JE44/0 JM1/1 JO962/0 JP81/0 KE254/0 KG996/0 KH855/0 KI686/0 KM269 KN1/1 KP850/0 KR82/0 KW965 KY1/1 KZ7/8 LA856/0 LB961/0 LC1/1 LI423/0 LK94/0 LR231/0 LS266 LT370/0 LU352 LV371 LY218/0 MA212/0 MC377/0 MD373/0 ME382/0 MF590/0 MG261/0 MH692/1 MK389/0 ML223 MM95/0 MN976/0 MO853 MP1/1 MQ596/0 MR222 MS1/1 MT356 MU230 MV960 MW265/0 MX52 MY60/0 MZ258 NA264/0 NC687 NE227 NF672 NG234/0 NI505 NL31/0 NO47 NP977/0 NR674 NU683 NZ64/0 OM968 PA507 PE51/0 PF689 PG675 PH63/0 PK92/0 PL48 PM508/0 PR1/1 PS970/0 PT351 PW680 PY595/0 QA974 RE262/0 RO40/0 RS381/0 RU7/8 RW250/0 SA966/0 SB677 SC248 SD249/0 SE46/0 SG65 SH290 SI386/0 SJ47 SK421/0 SL232/0 SM378 SN221 SO252/0 SR597 SS211/0 ST239 SV503 SX1/1 SY963/0 SZ268 TA290 TC1/1 TD235 TG228 TH66/0 TJ992 TK690 TL670 TM993/8 TN216 TO676 TR90/0 TT1/1 TV688 TW886/0 TZ255/0 UA380/0 UG256/0 US1/1 UY598/0 UZ998 VA39 VC1/1 VE58/0 VG1/1 VI1/1 VN84/0 VU678 WF681 WS685 XK383/0 YE967/0 YT262/0 ZA27/0 ZM260/0 ZW263/0",j;function Q(e){return j??(j=new Map(ue.split(" ").map(l=>{let[r,t]=l.slice(2).split("/");return[l.slice(0,2),[r,t]]}))),j.get(e.toUpperCase())}a(Q,"z");n(Q,"entryOf");function he(e){return Q(e)?.[0]}a(he,"Ne");n(he,"dialCodeOf");function re(e){return Q(e)?.[1]}a(re,"ee");n(re,"nationalPrefixOf");var ee=n(e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),"fold");function ne(e,l){let r=ee(l.trim());return r===""?e:e.filter(t=>ee(t.name).includes(r)||t.code.toLowerCase()===r)}a(ne,"ce");n(ne,"matchCountries");function ae({countries:e,label:l,searchPlaceholder:r,noMatch:t,onPick:v,selected:P,searchRef:f,scroll:E=!1,searchable:w=!0,detail:D,extra:y}){let[M,b]=(0,J.useState)(""),c=(0,J.useId)(),T=ne(e,M),N=(0,s.jsxs)("ul",{className:`sekyro-rows${E?" sekyro-rows--scroll":""}`,children:[T.map(d=>{let S=D?.(d.code);return(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",className:"sekyro-row-btn","aria-current":P===d.code||void 0,onClick:a(()=>v(d.code),"onClick"),children:[(0,s.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:se(d.code)}),(0,s.jsx)("span",{className:"sekyro-row-btn__name",children:d.name}),S!==void 0?(0,s.jsx)("bdi",{className:"sekyro-row-btn__detail",dir:"ltr",children:S}):null]})},d.code)}),y!==void 0?(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",className:"sekyro-row-btn","aria-current":y.current||void 0,onClick:y.onPick,children:[(0,s.jsx)("span",{className:"sekyro-row-btn__flag","aria-hidden":"true",children:"🌐"}),(0,s.jsx)("span",{className:"sekyro-row-btn__name",children:y.label})]})}):null]});return w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"sekyro-field",children:[(0,s.jsx)("label",{className:"sekyro-label",htmlFor:c,children:l}),(0,s.jsx)("input",{ref:f,id:c,type:"search",className:"sekyro-input",placeholder:r,value:M,onChange:a(d=>b(d.target.value),"onChange")})]}),T.length===0&&y===void 0?(0,s.jsx)("p",{className:"sekyro-text-muted",children:t}):N]}):N}a(ae,"te");n(ae,"CountryList");function U(e){let l=pe(e).replace(/\D/g,"");return/^\D*\+/.test(e)?`+${l}`:l.startsWith("00")?`+${l.slice(2)}`:l}a(U,"H");n(U,"digitsOf");var le=n((e,l)=>(l.trunk!==void 0&&e.startsWith(l.trunk)?e.slice(l.trunk.length):e).slice(0,Math.max(...l.lengths)),"fitDigits");function Y(e,l){let r="",t=0;for(let v of l?.formats?.find(P=>new RegExp(`^(?:${P.leading})`).test(e))?.groups??[])t<e.length&&(r+=(t>0?" ":"")+e.slice(t,t+v)),t+=v;return r+e.slice(t)}a(Y,"Z");n(Y,"groupDigits");function oe(e,l){let r=0;for(let t=l;t>0&&r<e.length;r+=1)e[r]!==" "&&(t-=1);return r}a(oe,"oe");n(oe,"caretAfter");var ie=n((e,l)=>l.find(r=>e.startsWith(r.dial)),"countryOfNumber"),me=n((e,l)=>e.lengths.join(", ").replace(/, (\d+)$/,` ${l} $1`),"lengthsLabel");function q(e){let l=U(e).replace("+","");return/^\d{8,15}$/.test(l)?`+${l}`:null}a(q,"le");n(q,"normalizedPhone");var se=n(e=>String.fromCodePoint(...Array.from(e.toUpperCase(),l=>127397+l.charCodeAt(0))),"flagOf");function ce(e,l){if(l===null||!e.startsWith(l.dial))return q(e);let r=e.slice(l.dial.length).replace(/\D/g,""),t=re(l.code);return t!==void 0&&r.startsWith(t)&&(r=r.slice(t.length)),q(l.dial+r)}a(ce,"ye");n(ce,"e164Of");var te=n((e,l)=>(ie(e,l)??l[0])?.code??null,"countryFor");function de(e){let l=null;try{l=new Intl.DisplayNames([e],{type:"region"})}catch{}return r=>`${l?.of(r.code)??r.code} (${r.dial})`}a(de,"me");n(de,"countryLabels");var fe="other",ye=8;function ge({countries:e,international:l,closed:r,defaultPhone:t}){let[v,P]=(0,u.useState)(()=>te(t,e)),[f,E]=(0,u.useState)(t),[w,D]=(0,u.useState)(!1),[y,M]=(0,u.useState)(!1),b=e.map(o=>o.code).join(","),c=e.find(o=>o.code===v)??null,T=(0,u.useRef)(c);c!==null&&(T.current=c),(0,u.useEffect)(()=>{if(v===null||!e.some(o=>o.code===v)){let o=te(t,e);P(o);let i=T.current,k=e.find(C=>C.code===o)?.dial;k!==void 0&&E(C=>i!==null&&C.startsWith(i.dial)?k+C.slice(i.dial.length):C.startsWith("+")?C:k)}},[b,t]);let N=w||c===null,d=N||f.startsWith("+")&&!f.startsWith(c.dial),S=d?void 0:c.rule,x=d?f:f.replace(c.dial,"").replace(/\D/g,""),p=S?le(x,S):x,W=d&&!N&&!l&&r&&!e.some(o=>o.dial.startsWith(f)),I=W?null:S?S.lengths.includes(p.length)?c.dial+p:null:N&&!f.startsWith("+")?null:ce(f,w?null:c),H=d||c===null?I??f:`${c.dial} ${Y(p,S)}`,B=d?U(f).replace("+","")==="":p==="";return{countries:e,international:l,phone:f,selected:c,other:w,whole:d,free:N,rule:S,national:p,refused:W,typed:I,shown:H,empty:B,lengthShown:y,setLengthShown:M,onNumber:n(o=>{let i=o.target,k=o.nativeEvent.inputType,C=Math.max(0,i.value.lastIndexOf("+")),G=U(i.value.slice(C)),A=ie(G,e),_=U(i.value.slice(C,i.selectionStart)).length,F=G,V=G;if(M(!1),!A&&(N||G.startsWith("+")))l&&D(!0);else{let R=A??c,g=A?G.slice(A.dial.length):G;if(P(R.code),D(!1),g===p&&k?.startsWith("delete")&&(k.endsWith("Forward")||(_-=1),g=g.slice(0,_)+g.slice(_+1)),R.rule){let $=le(g,R.rule),O=g.length-$.length;_-=O,g=O>0&&!A&&p.length===$.length?p:$}V=R.dial+g,F=Y(g,R.rule)}E(V),i.value=F;let K=oe(F,_);i.setSelectionRange(K,K)},"onNumber"),onCountry:n(o=>{M(!1);let i=e.find(k=>k.code===o);D(i===void 0),i!==void 0&&P(i.code),E(i===void 0?"":i.dial+(d?"":p))},"onCountry")}}a(ge,"_e");n(ge,"usePhoneField");function Ne({field:e,id:l,locale:r,t,inputRef:v,invalid:P=!1,describedby:f,required:E,compact:w=!1,ready:D}){let{selected:y,whole:M,other:b,free:c,national:T,rule:N,phone:d,refused:S,typed:x,countries:p,international:W}=e,[I,H]=(0,u.useState)(!1),B=(0,u.useRef)(null),o=(0,u.useRef)(null),i=(0,u.useRef)(null),k=(0,u.useRef)(null),C=v??k,G=(0,u.useId)(),A=S?t("otp.reason_otp_destination_not_allowed"):e.lengthShown&&N?t("otp.phoneLengthError",{digits:me(N,t("otp.or"))}):"",_=p.length>1||W,F=de(r),V=(0,u.useMemo)(()=>{let m=null;try{m=new Intl.DisplayNames([r],{type:"region"})}catch{}return p.map(L=>({code:L.code,name:m?.of(L.code)??L.code}))},[p,r]),K=p.length>ye,R=[M?"":`${l}-dial ${l}-hint`,A?`${l}-error`:"",f??""].join(" ").trim()||void 0,g=n(m=>{H(!1),requestAnimationFrame(()=>(m==="lead"?B.current:C.current)?.focus())},"close"),$=n(()=>{if(I)return g("lead");H(!0),requestAnimationFrame(()=>(i.current??o.current?.querySelector('[aria-current="true"]')??o.current?.querySelector("button"))?.focus())},"toggle"),O=n(()=>(0,h.jsxs)("span",{className:"sekyro-phone__dial",id:`${l}-dial`,"aria-hidden":_||void 0,children:[(0,h.jsx)("span",{className:"sekyro-phone__flag","aria-hidden":"true",children:b?"🌐":se(y.code)}),b?null:y.dial]}),"dial");return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:`sekyro-phone${w?" sekyro-phone--compact":""}`,dir:"ltr",children:[y===null||M&&!b?null:_?(0,h.jsx)("button",{ref:B,type:"button",className:"sekyro-phone__lead sekyro-phone__pick","aria-label":`${t("otp.countryLabel")}: ${b?t("otp.otherCountry"):F(y)}`,"aria-expanded":I,"aria-controls":I?G:void 0,onClick:$,children:O()}):(0,h.jsx)("div",{className:"sekyro-phone__lead",children:O()}),(0,h.jsx)("input",{ref:C,id:l,className:"sekyro-phone__input",type:"tel",dir:"ltr",inputMode:"tel",autoComplete:"tel",required:E,"aria-describedby":R,"aria-invalid":!!A||P||void 0,placeholder:c?"+":void 0,value:M?d:Y(T,N),onChange:e.onNumber,onKeyDown:a(m=>{m.key==="Enter"&&D===!1&&e.setLengthShown(!0)},"onKeyDown"),onBlur:a(m=>{let L=m.relatedTarget;L!==null&&(B.current?.contains(L)||o.current?.contains(L))||e.setLengthShown(T!==""&&x===null)},"onBlur")})]}),I?(0,h.jsx)("div",{ref:o,id:G,className:"sekyro-phone__list",onKeyDown:a(m=>{m.key==="Escape"&&(m.preventDefault(),g("lead"))},"onKeyDown"),children:(0,h.jsx)(ae,{countries:V,label:(0,h.jsx)("span",{className:"sekyro-visually-hidden",children:t("otp.countrySearch")}),searchPlaceholder:t("otp.countrySearch"),noMatch:t("doc.noCountryMatch"),searchable:K,scroll:!0,...K?{searchRef:i}:{},...!b&&y!==null?{selected:y.code}:{},detail:a(m=>p.find(L=>L.code===m)?.dial,"detail"),onPick:a(m=>{e.onCountry(m),g("number")},"onPick"),...W?{extra:{label:t("otp.otherCountry"),current:b,onPick:n(()=>{e.onCountry(fe),g("number")},"onPick")}}:{}})}):null,M?null:(0,h.jsx)("span",{className:"sekyro-help",id:`${l}-hint`,children:t("otp.phonePlaceholderGeneric")}),A?(0,h.jsx)("span",{className:"sekyro-help is-danger",id:`${l}-error`,role:"alert",children:A}):null]})}a(Ne,"xe");n(Ne,"PhoneField");export{he as a,ae as b,se as c,ge as d,Ne as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,t as r,v as l,y as o}from"./chunk-
|
|
1
|
+
import{b,t as r,v as l,y as o}from"./chunk-JW4QXADM.js";import{a,c as p,i}from"./chunk-SSU37LFQ.js";var s=p(b(),1);function f({tone:d,icon:n,busy:c,title:m,titleId:e,children:u,actions:t,live:y,testId:h}){let k=r();return(0,s.jsxs)("section",{className:"sekyro-step sekyro-status",...e!==void 0?{"aria-labelledby":e}:{},...y?{role:"status","aria-live":"polite"}:{},"data-testid":h,children:[(0,s.jsxs)("div",{className:"sekyro-status__body",children:[(0,s.jsx)("span",{className:`sekyro-tile sekyro-tile--${d}${c?" is-busy":""}`,"aria-hidden":"true",children:(0,s.jsx)(l,{name:n})}),(0,s.jsxs)("div",{className:"sekyro-heading sekyro-status__text",children:[(0,s.jsx)("h2",{id:e,ref:k,tabIndex:-1,className:"sekyro-text-body",children:m}),u]})]}),t!=null&&t!==!1?(0,s.jsx)(o,{children:t}):null]})}a(f,"g");i(f,"StatusPage");export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,c as t,v as s,w as i,y as l}from"./chunk-
|
|
1
|
+
import{b,c as t,v as s,w as i,y as l}from"./chunk-JW4QXADM.js";import{a as o,c as k,i as r}from"./chunk-SSU37LFQ.js";var a=k(b(),1);function x({title:n,lead:d,cameraLabel:c,uploadLabel:m,notice:p,testId:e,onCamera:h,onUpload:u,onPhone:f=!1}){return(0,a.jsxs)("section",{className:"sekyro-step","data-testid":e,children:[(0,a.jsx)(i,{title:n,lead:d}),p,(0,a.jsxs)(l,{children:[(0,a.jsxs)(t,{full:!0,onClick:h,"data-testid":`${e}-camera`,children:[(0,a.jsx)(s,{name:f?"smartphone":"camera"}),c]}),(0,a.jsx)(t,{full:!0,kind:"ghost",onClick:u,"data-testid":`${e}-upload`,children:m})]})]})}o(x,"k");r(x,"PhotoSourceView");export{x as a};
|