@worldcoin/mini-apps-ui-kit-react 0.0.1
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/README.md +78 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/create-plugin.js +4 -0
- package/dist/_virtual/createPlugin.js +4 -0
- package/dist/_virtual/dynamic-import-helper.js +16 -0
- package/dist/components/Button/Button.d.ts +49 -0
- package/dist/components/Button/Button.js +103 -0
- package/dist/components/Button/Spinner.d.ts +8 -0
- package/dist/components/Button/Spinner.js +36 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.js +23 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +4 -0
- package/dist/components/Chip/Chip.d.ts +25 -0
- package/dist/components/Chip/Chip.js +31 -0
- package/dist/components/Chip/index.d.ts +1 -0
- package/dist/components/Chip/index.js +4 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +16 -0
- package/dist/components/ColorPicker/ColorPicker.js +41 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ColorPicker/index.js +5 -0
- package/dist/components/Drawer/Drawer.d.ts +6 -0
- package/dist/components/Drawer/Drawer.js +31 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Drawer/index.js +7 -0
- package/dist/components/Flag/Flag.d.ts +14 -0
- package/dist/components/Flag/Flag.js +12 -0
- package/dist/components/Flag/LazyFlag.d.ts +13 -0
- package/dist/components/Flag/LazyFlag.js +25 -0
- package/dist/components/Flag/constants.d.ts +2 -0
- package/dist/components/Flag/constants.js +7 -0
- package/dist/components/Flag/flag-components/ad.d.ts +3 -0
- package/dist/components/Flag/flag-components/ad.js +56 -0
- package/dist/components/Flag/flag-components/ae.d.ts +3 -0
- package/dist/components/Flag/flag-components/ae.js +48 -0
- package/dist/components/Flag/flag-components/af.d.ts +3 -0
- package/dist/components/Flag/flag-components/af.js +55 -0
- package/dist/components/Flag/flag-components/ag.d.ts +3 -0
- package/dist/components/Flag/flag-components/ag.js +62 -0
- package/dist/components/Flag/flag-components/ai.d.ts +3 -0
- package/dist/components/Flag/flag-components/ai.js +90 -0
- package/dist/components/Flag/flag-components/al.d.ts +3 -0
- package/dist/components/Flag/flag-components/al.js +34 -0
- package/dist/components/Flag/flag-components/am.d.ts +3 -0
- package/dist/components/Flag/flag-components/am.js +41 -0
- package/dist/components/Flag/flag-components/ao.d.ts +3 -0
- package/dist/components/Flag/flag-components/ao.js +55 -0
- package/dist/components/Flag/flag-components/ar.d.ts +3 -0
- package/dist/components/Flag/flag-components/ar.js +48 -0
- package/dist/components/Flag/flag-components/as.d.ts +3 -0
- package/dist/components/Flag/flag-components/as.js +62 -0
- package/dist/components/Flag/flag-components/at.d.ts +3 -0
- package/dist/components/Flag/flag-components/at.js +41 -0
- package/dist/components/Flag/flag-components/au.d.ts +3 -0
- package/dist/components/Flag/flag-components/au.js +98 -0
- package/dist/components/Flag/flag-components/aw.d.ts +3 -0
- package/dist/components/Flag/flag-components/aw.js +62 -0
- package/dist/components/Flag/flag-components/ax.d.ts +3 -0
- package/dist/components/Flag/flag-components/ax.js +62 -0
- package/dist/components/Flag/flag-components/az.d.ts +3 -0
- package/dist/components/Flag/flag-components/az.js +55 -0
- package/dist/components/Flag/flag-components/ba.d.ts +3 -0
- package/dist/components/Flag/flag-components/ba.js +48 -0
- package/dist/components/Flag/flag-components/bb.d.ts +3 -0
- package/dist/components/Flag/flag-components/bb.js +48 -0
- package/dist/components/Flag/flag-components/bd.d.ts +3 -0
- package/dist/components/Flag/flag-components/bd.js +34 -0
- package/dist/components/Flag/flag-components/be.d.ts +3 -0
- package/dist/components/Flag/flag-components/be.js +41 -0
- package/dist/components/Flag/flag-components/bf.d.ts +3 -0
- package/dist/components/Flag/flag-components/bf.js +49 -0
- package/dist/components/Flag/flag-components/bg.d.ts +3 -0
- package/dist/components/Flag/flag-components/bg.js +41 -0
- package/dist/components/Flag/flag-components/bh.d.ts +3 -0
- package/dist/components/Flag/flag-components/bh.js +34 -0
- package/dist/components/Flag/flag-components/bi.d.ts +3 -0
- package/dist/components/Flag/flag-components/bi.js +83 -0
- package/dist/components/Flag/flag-components/bj.d.ts +3 -0
- package/dist/components/Flag/flag-components/bj.js +41 -0
- package/dist/components/Flag/flag-components/bl.d.ts +3 -0
- package/dist/components/Flag/flag-components/bl.js +71 -0
- package/dist/components/Flag/flag-components/bm.d.ts +3 -0
- package/dist/components/Flag/flag-components/bm.js +85 -0
- package/dist/components/Flag/flag-components/bn.d.ts +3 -0
- package/dist/components/Flag/flag-components/bn.js +66 -0
- package/dist/components/Flag/flag-components/bo.d.ts +3 -0
- package/dist/components/Flag/flag-components/bo.js +41 -0
- package/dist/components/Flag/flag-components/bq.d.ts +3 -0
- package/dist/components/Flag/flag-components/bq.js +55 -0
- package/dist/components/Flag/flag-components/br.d.ts +3 -0
- package/dist/components/Flag/flag-components/br.js +55 -0
- package/dist/components/Flag/flag-components/bs.d.ts +3 -0
- package/dist/components/Flag/flag-components/bs.js +48 -0
- package/dist/components/Flag/flag-components/bt.d.ts +3 -0
- package/dist/components/Flag/flag-components/bt.js +48 -0
- package/dist/components/Flag/flag-components/bw.d.ts +3 -0
- package/dist/components/Flag/flag-components/bw.js +48 -0
- package/dist/components/Flag/flag-components/by.d.ts +3 -0
- package/dist/components/Flag/flag-components/by.js +83 -0
- package/dist/components/Flag/flag-components/bz.d.ts +3 -0
- package/dist/components/Flag/flag-components/bz.js +70 -0
- package/dist/components/Flag/flag-components/ca.d.ts +3 -0
- package/dist/components/Flag/flag-components/ca.js +48 -0
- package/dist/components/Flag/flag-components/cc.d.ts +3 -0
- package/dist/components/Flag/flag-components/cc.js +90 -0
- package/dist/components/Flag/flag-components/cd.d.ts +3 -0
- package/dist/components/Flag/flag-components/cd.js +55 -0
- package/dist/components/Flag/flag-components/cf.d.ts +3 -0
- package/dist/components/Flag/flag-components/cf.js +85 -0
- package/dist/components/Flag/flag-components/cg.d.ts +3 -0
- package/dist/components/Flag/flag-components/cg.js +41 -0
- package/dist/components/Flag/flag-components/ch.d.ts +3 -0
- package/dist/components/Flag/flag-components/ch.js +34 -0
- package/dist/components/Flag/flag-components/ci.d.ts +3 -0
- package/dist/components/Flag/flag-components/ci.js +41 -0
- package/dist/components/Flag/flag-components/ck.d.ts +3 -0
- package/dist/components/Flag/flag-components/ck.js +111 -0
- package/dist/components/Flag/flag-components/cl.d.ts +3 -0
- package/dist/components/Flag/flag-components/cl.js +48 -0
- package/dist/components/Flag/flag-components/cm.d.ts +3 -0
- package/dist/components/Flag/flag-components/cm.js +48 -0
- package/dist/components/Flag/flag-components/cn.d.ts +3 -0
- package/dist/components/Flag/flag-components/cn.js +62 -0
- package/dist/components/Flag/flag-components/co.d.ts +3 -0
- package/dist/components/Flag/flag-components/co.js +41 -0
- package/dist/components/Flag/flag-components/cr.d.ts +3 -0
- package/dist/components/Flag/flag-components/cr.js +48 -0
- package/dist/components/Flag/flag-components/cu.d.ts +3 -0
- package/dist/components/Flag/flag-components/cu.js +63 -0
- package/dist/components/Flag/flag-components/cv.d.ts +3 -0
- package/dist/components/Flag/flag-components/cv.js +118 -0
- package/dist/components/Flag/flag-components/cw.d.ts +3 -0
- package/dist/components/Flag/flag-components/cw.js +55 -0
- package/dist/components/Flag/flag-components/cy.d.ts +3 -0
- package/dist/components/Flag/flag-components/cy.js +41 -0
- package/dist/components/Flag/flag-components/cz.d.ts +3 -0
- package/dist/components/Flag/flag-components/cz.js +41 -0
- package/dist/components/Flag/flag-components/de.d.ts +3 -0
- package/dist/components/Flag/flag-components/de.js +41 -0
- package/dist/components/Flag/flag-components/dj.d.ts +3 -0
- package/dist/components/Flag/flag-components/dj.js +48 -0
- package/dist/components/Flag/flag-components/dk.d.ts +3 -0
- package/dist/components/Flag/flag-components/dk.js +55 -0
- package/dist/components/Flag/flag-components/dm.d.ts +3 -0
- package/dist/components/Flag/flag-components/dm.js +195 -0
- package/dist/components/Flag/flag-components/do.d.ts +3 -0
- package/dist/components/Flag/flag-components/do.js +76 -0
- package/dist/components/Flag/flag-components/dz.d.ts +3 -0
- package/dist/components/Flag/flag-components/dz.js +48 -0
- package/dist/components/Flag/flag-components/ec.d.ts +3 -0
- package/dist/components/Flag/flag-components/ec.js +62 -0
- package/dist/components/Flag/flag-components/ee.d.ts +3 -0
- package/dist/components/Flag/flag-components/ee.js +41 -0
- package/dist/components/Flag/flag-components/eg.d.ts +3 -0
- package/dist/components/Flag/flag-components/eg.js +48 -0
- package/dist/components/Flag/flag-components/er.d.ts +3 -0
- package/dist/components/Flag/flag-components/er.js +48 -0
- package/dist/components/Flag/flag-components/es.d.ts +3 -0
- package/dist/components/Flag/flag-components/es.js +41 -0
- package/dist/components/Flag/flag-components/et.d.ts +3 -0
- package/dist/components/Flag/flag-components/et.js +62 -0
- package/dist/components/Flag/flag-components/fi.d.ts +3 -0
- package/dist/components/Flag/flag-components/fi.js +34 -0
- package/dist/components/Flag/flag-components/fj.d.ts +3 -0
- package/dist/components/Flag/flag-components/fj.js +77 -0
- package/dist/components/Flag/flag-components/fk.d.ts +3 -0
- package/dist/components/Flag/flag-components/fk.js +83 -0
- package/dist/components/Flag/flag-components/fm.d.ts +3 -0
- package/dist/components/Flag/flag-components/fm.js +55 -0
- package/dist/components/Flag/flag-components/fo.d.ts +3 -0
- package/dist/components/Flag/flag-components/fo.js +41 -0
- package/dist/components/Flag/flag-components/fr.d.ts +3 -0
- package/dist/components/Flag/flag-components/fr.js +41 -0
- package/dist/components/Flag/flag-components/ga.d.ts +3 -0
- package/dist/components/Flag/flag-components/ga.js +41 -0
- package/dist/components/Flag/flag-components/gb.d.ts +3 -0
- package/dist/components/Flag/flag-components/gb.js +118 -0
- package/dist/components/Flag/flag-components/gd.d.ts +3 -0
- package/dist/components/Flag/flag-components/gd.js +140 -0
- package/dist/components/Flag/flag-components/ge.d.ts +3 -0
- package/dist/components/Flag/flag-components/ge.js +62 -0
- package/dist/components/Flag/flag-components/gg.d.ts +3 -0
- package/dist/components/Flag/flag-components/gg.js +41 -0
- package/dist/components/Flag/flag-components/gh.d.ts +3 -0
- package/dist/components/Flag/flag-components/gh.js +48 -0
- package/dist/components/Flag/flag-components/gi.d.ts +3 -0
- package/dist/components/Flag/flag-components/gi.js +48 -0
- package/dist/components/Flag/flag-components/gl.d.ts +3 -0
- package/dist/components/Flag/flag-components/gl.js +48 -0
- package/dist/components/Flag/flag-components/gm.d.ts +3 -0
- package/dist/components/Flag/flag-components/gm.js +48 -0
- package/dist/components/Flag/flag-components/gn.d.ts +3 -0
- package/dist/components/Flag/flag-components/gn.js +41 -0
- package/dist/components/Flag/flag-components/gp.d.ts +3 -0
- package/dist/components/Flag/flag-components/gp.js +41 -0
- package/dist/components/Flag/flag-components/gq.d.ts +3 -0
- package/dist/components/Flag/flag-components/gq.js +63 -0
- package/dist/components/Flag/flag-components/gr.d.ts +3 -0
- package/dist/components/Flag/flag-components/gr.js +62 -0
- package/dist/components/Flag/flag-components/gt.d.ts +3 -0
- package/dist/components/Flag/flag-components/gt.js +55 -0
- package/dist/components/Flag/flag-components/gu.d.ts +3 -0
- package/dist/components/Flag/flag-components/gu.js +71 -0
- package/dist/components/Flag/flag-components/gw.d.ts +3 -0
- package/dist/components/Flag/flag-components/gw.js +55 -0
- package/dist/components/Flag/flag-components/gy.d.ts +3 -0
- package/dist/components/Flag/flag-components/gy.js +62 -0
- package/dist/components/Flag/flag-components/hk.d.ts +3 -0
- package/dist/components/Flag/flag-components/hk.js +62 -0
- package/dist/components/Flag/flag-components/hn.d.ts +3 -0
- package/dist/components/Flag/flag-components/hn.js +76 -0
- package/dist/components/Flag/flag-components/hr.d.ts +3 -0
- package/dist/components/Flag/flag-components/hr.js +108 -0
- package/dist/components/Flag/flag-components/ht.d.ts +3 -0
- package/dist/components/Flag/flag-components/ht.js +64 -0
- package/dist/components/Flag/flag-components/hu.d.ts +3 -0
- package/dist/components/Flag/flag-components/hu.js +41 -0
- package/dist/components/Flag/flag-components/id.d.ts +3 -0
- package/dist/components/Flag/flag-components/id.js +34 -0
- package/dist/components/Flag/flag-components/ie.d.ts +3 -0
- package/dist/components/Flag/flag-components/ie.js +41 -0
- package/dist/components/Flag/flag-components/il.d.ts +3 -0
- package/dist/components/Flag/flag-components/il.js +48 -0
- package/dist/components/Flag/flag-components/im.d.ts +3 -0
- package/dist/components/Flag/flag-components/im.js +34 -0
- package/dist/components/Flag/flag-components/in.d.ts +3 -0
- package/dist/components/Flag/flag-components/in.js +62 -0
- package/dist/components/Flag/flag-components/index.d.ts +231 -0
- package/dist/components/Flag/flag-components/index.js +464 -0
- package/dist/components/Flag/flag-components/io.d.ts +3 -0
- package/dist/components/Flag/flag-components/io.js +136 -0
- package/dist/components/Flag/flag-components/iq.d.ts +3 -0
- package/dist/components/Flag/flag-components/iq.js +62 -0
- package/dist/components/Flag/flag-components/ir.d.ts +3 -0
- package/dist/components/Flag/flag-components/ir.js +48 -0
- package/dist/components/Flag/flag-components/is.d.ts +3 -0
- package/dist/components/Flag/flag-components/is.js +62 -0
- package/dist/components/Flag/flag-components/it.d.ts +3 -0
- package/dist/components/Flag/flag-components/it.js +41 -0
- package/dist/components/Flag/flag-components/je.d.ts +3 -0
- package/dist/components/Flag/flag-components/je.js +48 -0
- package/dist/components/Flag/flag-components/jm.d.ts +3 -0
- package/dist/components/Flag/flag-components/jm.js +55 -0
- package/dist/components/Flag/flag-components/jo.d.ts +3 -0
- package/dist/components/Flag/flag-components/jo.js +55 -0
- package/dist/components/Flag/flag-components/jp.d.ts +3 -0
- package/dist/components/Flag/flag-components/jp.js +34 -0
- package/dist/components/Flag/flag-components/ke.d.ts +3 -0
- package/dist/components/Flag/flag-components/ke.js +90 -0
- package/dist/components/Flag/flag-components/kg.d.ts +3 -0
- package/dist/components/Flag/flag-components/kg.js +69 -0
- package/dist/components/Flag/flag-components/kh.d.ts +3 -0
- package/dist/components/Flag/flag-components/kh.js +48 -0
- package/dist/components/Flag/flag-components/ki.d.ts +3 -0
- package/dist/components/Flag/flag-components/ki.js +76 -0
- package/dist/components/Flag/flag-components/km.d.ts +3 -0
- package/dist/components/Flag/flag-components/km.js +90 -0
- package/dist/components/Flag/flag-components/kp.d.ts +3 -0
- package/dist/components/Flag/flag-components/kp.js +62 -0
- package/dist/components/Flag/flag-components/kr.d.ts +3 -0
- package/dist/components/Flag/flag-components/kr.js +167 -0
- package/dist/components/Flag/flag-components/kw.d.ts +3 -0
- package/dist/components/Flag/flag-components/kw.js +48 -0
- package/dist/components/Flag/flag-components/ky.d.ts +3 -0
- package/dist/components/Flag/flag-components/ky.js +91 -0
- package/dist/components/Flag/flag-components/kz.d.ts +3 -0
- package/dist/components/Flag/flag-components/kz.js +48 -0
- package/dist/components/Flag/flag-components/la.d.ts +3 -0
- package/dist/components/Flag/flag-components/la.js +48 -0
- package/dist/components/Flag/flag-components/lb.d.ts +3 -0
- package/dist/components/Flag/flag-components/lb.js +48 -0
- package/dist/components/Flag/flag-components/lc.d.ts +3 -0
- package/dist/components/Flag/flag-components/lc.js +30 -0
- package/dist/components/Flag/flag-components/li.d.ts +3 -0
- package/dist/components/Flag/flag-components/li.js +41 -0
- package/dist/components/Flag/flag-components/lk.d.ts +3 -0
- package/dist/components/Flag/flag-components/lk.js +50 -0
- package/dist/components/Flag/flag-components/lr.d.ts +3 -0
- package/dist/components/Flag/flag-components/lr.js +118 -0
- package/dist/components/Flag/flag-components/ls.d.ts +3 -0
- package/dist/components/Flag/flag-components/ls.js +48 -0
- package/dist/components/Flag/flag-components/lt.d.ts +3 -0
- package/dist/components/Flag/flag-components/lt.js +41 -0
- package/dist/components/Flag/flag-components/lu.d.ts +3 -0
- package/dist/components/Flag/flag-components/lu.js +41 -0
- package/dist/components/Flag/flag-components/lv.d.ts +3 -0
- package/dist/components/Flag/flag-components/lv.js +41 -0
- package/dist/components/Flag/flag-components/ly.d.ts +3 -0
- package/dist/components/Flag/flag-components/ly.js +55 -0
- package/dist/components/Flag/flag-components/ma.d.ts +3 -0
- package/dist/components/Flag/flag-components/ma.js +34 -0
- package/dist/components/Flag/flag-components/mc.d.ts +3 -0
- package/dist/components/Flag/flag-components/mc.js +34 -0
- package/dist/components/Flag/flag-components/md.d.ts +3 -0
- package/dist/components/Flag/flag-components/md.js +56 -0
- package/dist/components/Flag/flag-components/me.d.ts +3 -0
- package/dist/components/Flag/flag-components/me.js +56 -0
- package/dist/components/Flag/flag-components/mg.d.ts +3 -0
- package/dist/components/Flag/flag-components/mg.js +41 -0
- package/dist/components/Flag/flag-components/mh.d.ts +3 -0
- package/dist/components/Flag/flag-components/mh.js +48 -0
- package/dist/components/Flag/flag-components/mk.d.ts +3 -0
- package/dist/components/Flag/flag-components/mk.js +97 -0
- package/dist/components/Flag/flag-components/ml.d.ts +3 -0
- package/dist/components/Flag/flag-components/ml.js +41 -0
- package/dist/components/Flag/flag-components/mm.d.ts +3 -0
- package/dist/components/Flag/flag-components/mm.js +48 -0
- package/dist/components/Flag/flag-components/mn.d.ts +3 -0
- package/dist/components/Flag/flag-components/mn.js +66 -0
- package/dist/components/Flag/flag-components/mo.d.ts +3 -0
- package/dist/components/Flag/flag-components/mo.js +83 -0
- package/dist/components/Flag/flag-components/mp.d.ts +3 -0
- package/dist/components/Flag/flag-components/mp.js +55 -0
- package/dist/components/Flag/flag-components/mq.d.ts +3 -0
- package/dist/components/Flag/flag-components/mq.js +83 -0
- package/dist/components/Flag/flag-components/mr.d.ts +3 -0
- package/dist/components/Flag/flag-components/mr.js +41 -0
- package/dist/components/Flag/flag-components/ms.d.ts +3 -0
- package/dist/components/Flag/flag-components/ms.js +76 -0
- package/dist/components/Flag/flag-components/mt.d.ts +3 -0
- package/dist/components/Flag/flag-components/mt.js +41 -0
- package/dist/components/Flag/flag-components/mu.d.ts +3 -0
- package/dist/components/Flag/flag-components/mu.js +48 -0
- package/dist/components/Flag/flag-components/mv.d.ts +3 -0
- package/dist/components/Flag/flag-components/mv.js +35 -0
- package/dist/components/Flag/flag-components/mw.d.ts +3 -0
- package/dist/components/Flag/flag-components/mw.js +48 -0
- package/dist/components/Flag/flag-components/mx.d.ts +3 -0
- package/dist/components/Flag/flag-components/mx.js +55 -0
- package/dist/components/Flag/flag-components/my.d.ts +3 -0
- package/dist/components/Flag/flag-components/my.js +76 -0
- package/dist/components/Flag/flag-components/mz.d.ts +3 -0
- package/dist/components/Flag/flag-components/mz.js +70 -0
- package/dist/components/Flag/flag-components/na.d.ts +3 -0
- package/dist/components/Flag/flag-components/na.js +55 -0
- package/dist/components/Flag/flag-components/ne.d.ts +3 -0
- package/dist/components/Flag/flag-components/ne.js +48 -0
- package/dist/components/Flag/flag-components/nf.d.ts +3 -0
- package/dist/components/Flag/flag-components/nf.js +48 -0
- package/dist/components/Flag/flag-components/ng.d.ts +3 -0
- package/dist/components/Flag/flag-components/ng.js +41 -0
- package/dist/components/Flag/flag-components/ni.d.ts +3 -0
- package/dist/components/Flag/flag-components/ni.js +63 -0
- package/dist/components/Flag/flag-components/nl.d.ts +3 -0
- package/dist/components/Flag/flag-components/nl.js +41 -0
- package/dist/components/Flag/flag-components/no.d.ts +3 -0
- package/dist/components/Flag/flag-components/no.js +62 -0
- package/dist/components/Flag/flag-components/np.d.ts +3 -0
- package/dist/components/Flag/flag-components/np.js +63 -0
- package/dist/components/Flag/flag-components/nr.d.ts +3 -0
- package/dist/components/Flag/flag-components/nr.js +55 -0
- package/dist/components/Flag/flag-components/nu.d.ts +3 -0
- package/dist/components/Flag/flag-components/nu.js +91 -0
- package/dist/components/Flag/flag-components/nz.d.ts +3 -0
- package/dist/components/Flag/flag-components/nz.js +83 -0
- package/dist/components/Flag/flag-components/om.d.ts +3 -0
- package/dist/components/Flag/flag-components/om.js +62 -0
- package/dist/components/Flag/flag-components/pa.d.ts +3 -0
- package/dist/components/Flag/flag-components/pa.js +55 -0
- package/dist/components/Flag/flag-components/pe.d.ts +3 -0
- package/dist/components/Flag/flag-components/pe.js +41 -0
- package/dist/components/Flag/flag-components/pf.d.ts +3 -0
- package/dist/components/Flag/flag-components/pf.js +58 -0
- package/dist/components/Flag/flag-components/pg.d.ts +3 -0
- package/dist/components/Flag/flag-components/pg.js +76 -0
- package/dist/components/Flag/flag-components/ph.d.ts +3 -0
- package/dist/components/Flag/flag-components/ph.js +69 -0
- package/dist/components/Flag/flag-components/pk.d.ts +3 -0
- package/dist/components/Flag/flag-components/pk.js +55 -0
- package/dist/components/Flag/flag-components/pl.d.ts +3 -0
- package/dist/components/Flag/flag-components/pl.js +34 -0
- package/dist/components/Flag/flag-components/pn.d.ts +3 -0
- package/dist/components/Flag/flag-components/pn.js +83 -0
- package/dist/components/Flag/flag-components/pr.d.ts +3 -0
- package/dist/components/Flag/flag-components/pr.js +62 -0
- package/dist/components/Flag/flag-components/ps.d.ts +3 -0
- package/dist/components/Flag/flag-components/ps.js +48 -0
- package/dist/components/Flag/flag-components/pt.d.ts +3 -0
- package/dist/components/Flag/flag-components/pt.js +55 -0
- package/dist/components/Flag/flag-components/pw.d.ts +3 -0
- package/dist/components/Flag/flag-components/pw.js +34 -0
- package/dist/components/Flag/flag-components/py.d.ts +3 -0
- package/dist/components/Flag/flag-components/py.js +55 -0
- package/dist/components/Flag/flag-components/qa.d.ts +3 -0
- package/dist/components/Flag/flag-components/qa.js +34 -0
- package/dist/components/Flag/flag-components/ro.d.ts +3 -0
- package/dist/components/Flag/flag-components/ro.js +41 -0
- package/dist/components/Flag/flag-components/rs.d.ts +3 -0
- package/dist/components/Flag/flag-components/rs.js +69 -0
- package/dist/components/Flag/flag-components/ru.d.ts +3 -0
- package/dist/components/Flag/flag-components/ru.js +41 -0
- package/dist/components/Flag/flag-components/rw.d.ts +3 -0
- package/dist/components/Flag/flag-components/rw.js +48 -0
- package/dist/components/Flag/flag-components/sa.d.ts +3 -0
- package/dist/components/Flag/flag-components/sa.js +57 -0
- package/dist/components/Flag/flag-components/sb.d.ts +3 -0
- package/dist/components/Flag/flag-components/sb.js +76 -0
- package/dist/components/Flag/flag-components/sc.d.ts +3 -0
- package/dist/components/Flag/flag-components/sc.js +55 -0
- package/dist/components/Flag/flag-components/sd.d.ts +3 -0
- package/dist/components/Flag/flag-components/sd.js +48 -0
- package/dist/components/Flag/flag-components/se.d.ts +3 -0
- package/dist/components/Flag/flag-components/se.js +63 -0
- package/dist/components/Flag/flag-components/sg.d.ts +3 -0
- package/dist/components/Flag/flag-components/sg.js +76 -0
- package/dist/components/Flag/flag-components/si.d.ts +3 -0
- package/dist/components/Flag/flag-components/si.js +48 -0
- package/dist/components/Flag/flag-components/sk.d.ts +3 -0
- package/dist/components/Flag/flag-components/sk.js +69 -0
- package/dist/components/Flag/flag-components/sl.d.ts +3 -0
- package/dist/components/Flag/flag-components/sl.js +41 -0
- package/dist/components/Flag/flag-components/sm.d.ts +3 -0
- package/dist/components/Flag/flag-components/sm.js +69 -0
- package/dist/components/Flag/flag-components/sn.d.ts +3 -0
- package/dist/components/Flag/flag-components/sn.js +48 -0
- package/dist/components/Flag/flag-components/so.d.ts +3 -0
- package/dist/components/Flag/flag-components/so.js +34 -0
- package/dist/components/Flag/flag-components/sr.d.ts +3 -0
- package/dist/components/Flag/flag-components/sr.js +55 -0
- package/dist/components/Flag/flag-components/ss.d.ts +3 -0
- package/dist/components/Flag/flag-components/ss.js +62 -0
- package/dist/components/Flag/flag-components/st.d.ts +3 -0
- package/dist/components/Flag/flag-components/st.js +62 -0
- package/dist/components/Flag/flag-components/sv.d.ts +3 -0
- package/dist/components/Flag/flag-components/sv.js +56 -0
- package/dist/components/Flag/flag-components/sx.d.ts +3 -0
- package/dist/components/Flag/flag-components/sx.js +76 -0
- package/dist/components/Flag/flag-components/sy.d.ts +3 -0
- package/dist/components/Flag/flag-components/sy.js +55 -0
- package/dist/components/Flag/flag-components/sz.d.ts +3 -0
- package/dist/components/Flag/flag-components/sz.js +80 -0
- package/dist/components/Flag/flag-components/tc.d.ts +3 -0
- package/dist/components/Flag/flag-components/tc.js +90 -0
- package/dist/components/Flag/flag-components/td.d.ts +3 -0
- package/dist/components/Flag/flag-components/td.js +41 -0
- package/dist/components/Flag/flag-components/tg.d.ts +3 -0
- package/dist/components/Flag/flag-components/tg.js +62 -0
- package/dist/components/Flag/flag-components/th.d.ts +3 -0
- package/dist/components/Flag/flag-components/th.js +48 -0
- package/dist/components/Flag/flag-components/tj.d.ts +3 -0
- package/dist/components/Flag/flag-components/tj.js +97 -0
- package/dist/components/Flag/flag-components/tk.d.ts +3 -0
- package/dist/components/Flag/flag-components/tk.js +62 -0
- package/dist/components/Flag/flag-components/tl.d.ts +3 -0
- package/dist/components/Flag/flag-components/tl.js +48 -0
- package/dist/components/Flag/flag-components/tm.d.ts +3 -0
- package/dist/components/Flag/flag-components/tm.js +161 -0
- package/dist/components/Flag/flag-components/tn.d.ts +3 -0
- package/dist/components/Flag/flag-components/tn.js +48 -0
- package/dist/components/Flag/flag-components/to.d.ts +3 -0
- package/dist/components/Flag/flag-components/to.js +41 -0
- package/dist/components/Flag/flag-components/tr.d.ts +3 -0
- package/dist/components/Flag/flag-components/tr.js +41 -0
- package/dist/components/Flag/flag-components/tt.d.ts +3 -0
- package/dist/components/Flag/flag-components/tt.js +48 -0
- package/dist/components/Flag/flag-components/tv.d.ts +3 -0
- package/dist/components/Flag/flag-components/tv.js +120 -0
- package/dist/components/Flag/flag-components/tw.d.ts +3 -0
- package/dist/components/Flag/flag-components/tw.js +55 -0
- package/dist/components/Flag/flag-components/tz.d.ts +3 -0
- package/dist/components/Flag/flag-components/tz.js +48 -0
- package/dist/components/Flag/flag-components/ua.d.ts +3 -0
- package/dist/components/Flag/flag-components/ua.js +34 -0
- package/dist/components/Flag/flag-components/ug.d.ts +3 -0
- package/dist/components/Flag/flag-components/ug.js +69 -0
- package/dist/components/Flag/flag-components/us.d.ts +3 -0
- package/dist/components/Flag/flag-components/us.js +62 -0
- package/dist/components/Flag/flag-components/uy.d.ts +3 -0
- package/dist/components/Flag/flag-components/uy.js +69 -0
- package/dist/components/Flag/flag-components/uz.d.ts +3 -0
- package/dist/components/Flag/flag-components/uz.js +146 -0
- package/dist/components/Flag/flag-components/va.d.ts +3 -0
- package/dist/components/Flag/flag-components/va.js +48 -0
- package/dist/components/Flag/flag-components/vc.d.ts +3 -0
- package/dist/components/Flag/flag-components/vc.js +70 -0
- package/dist/components/Flag/flag-components/ve.d.ts +3 -0
- package/dist/components/Flag/flag-components/ve.js +97 -0
- package/dist/components/Flag/flag-components/vg.d.ts +3 -0
- package/dist/components/Flag/flag-components/vg.js +83 -0
- package/dist/components/Flag/flag-components/vn.d.ts +3 -0
- package/dist/components/Flag/flag-components/vn.js +34 -0
- package/dist/components/Flag/flag-components/vu.d.ts +3 -0
- package/dist/components/Flag/flag-components/vu.js +189 -0
- package/dist/components/Flag/flag-components/ws.d.ts +3 -0
- package/dist/components/Flag/flag-components/ws.js +69 -0
- package/dist/components/Flag/flag-components/xk.d.ts +3 -0
- package/dist/components/Flag/flag-components/xk.js +76 -0
- package/dist/components/Flag/flag-components/ye.d.ts +3 -0
- package/dist/components/Flag/flag-components/ye.js +41 -0
- package/dist/components/Flag/flag-components/za.d.ts +3 -0
- package/dist/components/Flag/flag-components/za.js +62 -0
- package/dist/components/Flag/flag-components/zm.d.ts +3 -0
- package/dist/components/Flag/flag-components/zm.js +55 -0
- package/dist/components/Flag/flag-components/zw.d.ts +3 -0
- package/dist/components/Flag/flag-components/zw.js +97 -0
- package/dist/components/Flag/index.d.ts +3 -0
- package/dist/components/Flag/index.js +6 -0
- package/dist/components/Flag/utils.d.ts +2 -0
- package/dist/components/Flag/utils.js +5 -0
- package/dist/components/Form/Form.d.ts +12 -0
- package/dist/components/Form/Form.js +39 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.js +4 -0
- package/dist/components/Icons/Magnifier.d.ts +8 -0
- package/dist/components/Icons/Magnifier.js +31 -0
- package/dist/components/Icons/Tick.d.ts +8 -0
- package/dist/components/Icons/Tick.js +29 -0
- package/dist/components/Input/Input.d.ts +54 -0
- package/dist/components/Input/Input.js +98 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.js +6 -0
- package/dist/components/ListItem/ListItem.d.ts +9 -0
- package/dist/components/ListItem/ListItem.js +25 -0
- package/dist/components/ListItem/index.d.ts +1 -0
- package/dist/components/ListItem/index.js +4 -0
- package/dist/components/NumberPad/Delete.d.ts +8 -0
- package/dist/components/NumberPad/Delete.js +27 -0
- package/dist/components/NumberPad/NumberPad.d.ts +16 -0
- package/dist/components/NumberPad/NumberPad.js +47 -0
- package/dist/components/NumberPad/index.d.ts +1 -0
- package/dist/components/NumberPad/index.js +4 -0
- package/dist/components/OTPField/OTPField.d.ts +55 -0
- package/dist/components/OTPField/OTPField.js +47 -0
- package/dist/components/OTPField/index.d.ts +1 -0
- package/dist/components/OTPField/index.js +4 -0
- package/dist/components/PasteButton/PasteButton.d.ts +20 -0
- package/dist/components/PasteButton/PasteButton.js +37 -0
- package/dist/components/PasteButton/index.d.ts +1 -0
- package/dist/components/PasteButton/index.js +4 -0
- package/dist/components/PhoneField/ArrowDown.d.ts +2 -0
- package/dist/components/PhoneField/ArrowDown.js +27 -0
- package/dist/components/PhoneField/CountryListItem.d.ts +13 -0
- package/dist/components/PhoneField/CountryListItem.js +39 -0
- package/dist/components/PhoneField/CountrySelectorButton.d.ts +9 -0
- package/dist/components/PhoneField/CountrySelectorButton.js +41 -0
- package/dist/components/PhoneField/PhoneField.d.ts +64 -0
- package/dist/components/PhoneField/PhoneField.js +204 -0
- package/dist/components/PhoneField/constants.d.ts +4 -0
- package/dist/components/PhoneField/constants.js +26 -0
- package/dist/components/PhoneField/index.d.ts +1 -0
- package/dist/components/PhoneField/index.js +4 -0
- package/dist/components/PhoneField/utils.d.ts +4 -0
- package/dist/components/PhoneField/utils.js +14 -0
- package/dist/components/Pill/Pill.d.ts +19 -0
- package/dist/components/Pill/Pill.js +40 -0
- package/dist/components/Pill/index.d.ts +1 -0
- package/dist/components/Pill/index.js +4 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +34 -0
- package/dist/components/RadioGroup/RadioGroup.js +47 -0
- package/dist/components/RadioGroup/RadioGroupItem.d.ts +13 -0
- package/dist/components/RadioGroup/RadioGroupItem.js +37 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup/index.js +6 -0
- package/dist/components/SearchField/SearchField.d.ts +23 -0
- package/dist/components/SearchField/SearchField.js +43 -0
- package/dist/components/SearchField/index.d.ts +1 -0
- package/dist/components/SearchField/index.js +4 -0
- package/dist/components/Select/ArrowDown.d.ts +2 -0
- package/dist/components/Select/ArrowDown.js +27 -0
- package/dist/components/Select/Select.d.ts +65 -0
- package/dist/components/Select/Select.js +121 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +4 -0
- package/dist/components/Switch/Switch.d.ts +19 -0
- package/dist/components/Switch/Switch.js +23 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/index.js +4 -0
- package/dist/components/Token/Token.d.ts +13 -0
- package/dist/components/Token/Token.js +10 -0
- package/dist/components/Token/icons/btc.d.ts +3 -0
- package/dist/components/Token/icons/btc.js +74 -0
- package/dist/components/Token/icons/eth.d.ts +3 -0
- package/dist/components/Token/icons/eth.js +76 -0
- package/dist/components/Token/icons/index.d.ts +4 -0
- package/dist/components/Token/icons/index.js +10 -0
- package/dist/components/Token/icons/usdc.d.ts +3 -0
- package/dist/components/Token/icons/usdc.js +74 -0
- package/dist/components/Token/icons/wld.d.ts +3 -0
- package/dist/components/Token/icons/wld.js +58 -0
- package/dist/components/Token/index.d.ts +1 -0
- package/dist/components/Token/index.js +4 -0
- package/dist/components/Typography/Typography.d.ts +41 -0
- package/dist/components/Typography/Typography.js +150 -0
- package/dist/components/Typography/index.d.ts +1 -0
- package/dist/components/Typography/index.js +5 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +53 -0
- package/dist/lib/constants/dropdownStyles.d.ts +1 -0
- package/dist/lib/constants/dropdownStyles.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.6.8/node_modules/@floating-ui/core/dist/floating-ui.core.js +525 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.6.12/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +392 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +207 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +131 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.8/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.0/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.1_wfj52omijboqejc6zhpwkjvyjq/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._5vtvszwgvdmnkk62ia2dob365m/node_modules/@radix-ui/react-checkbox/dist/index.js +136 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.js +49 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.js +70 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._vurlugjqrhlu53o6edaj3yx2bq/node_modules/@radix-ui/react-dialog/dist/index.js +262 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types__ejthwt4vwbnzwtfufv7q3bddiy/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@_4owg5o3kd7femmpae5yic5inii/node_modules/@radix-ui/react-focus-scope/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-form@0.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_z32yjmfa36dn2egycaeb5u52lm/node_modules/@radix-ui/react-form/dist/index.js +316 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.1_qr7n7ocfbwauilv6obluyms2qy/node_modules/@radix-ui/react-label/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._z2gu7tymhfvx6ebd6lqqykecmq/node_modules/@radix-ui/react-popper/dist/index.js +221 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._jmui37rk6fvzofztyauznikgpi/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._pqwkltkxenlrsgmgun6icjiigu/node_modules/@radix-ui/react-presence/dist/index.js +72 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18_sspjpiczol7qxzbuuyfihuep4u/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group@1.2.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@_2u6lfd2xt65wmbxn7lgvaxqbmy/node_modules/@radix-ui/react-radio-group/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.js +181 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._atdh45n5c7sked5b6tbwgdz7re/node_modules/@radix-ui/react-select/dist/index.js +846 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._udl6ccyllphugejc6sszfrese4/node_modules/@radix-ui/react-switch/dist/index.js +119 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.1_@types_react-dom@18.3.5_@types_react@18.3.18__@types_re_m7thze522i3jfpb2tnge6dybgi/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.4/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +35 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/countries-list@3.1.1/node_modules/countries-list/mjs/index.js +8 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/input-otp@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-otp/dist/index.js +197 -0
- package/dist/node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js +335 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +64 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.6.2_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@18.3.18_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@18.3.18_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@18.3.18_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2265 -0
- package/dist/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/public/create-plugin.js +20 -0
- package/dist/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/util/createPlugin.js +28 -0
- package/dist/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/plugin.js +9 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.18_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.18_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.18_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.18_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.18_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_react-dom@18.3._7iqkcrcg5qjc3n2ixm6rnrnx3e/node_modules/vaul/dist/index.js +1066 -0
- package/dist/tailwind/index.d.ts +5 -0
- package/dist/tailwind/index.js +104 -0
- package/package.json +172 -0
- package/public/SFMono-Regular.otf +0 -0
- package/public/globals.css +1885 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
import * as t from "react";
|
2
|
+
var Me = Object.defineProperty, xe = Object.defineProperties, Re = Object.getOwnPropertyDescriptors, Z = Object.getOwnPropertySymbols, me = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable, de = (r, l, a) => l in r ? Me(r, l, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[l] = a, ke = (r, l) => {
|
3
|
+
for (var a in l || (l = {})) me.call(l, a) && de(r, a, l[a]);
|
4
|
+
if (Z) for (var a of Z(l)) fe.call(l, a) && de(r, a, l[a]);
|
5
|
+
return r;
|
6
|
+
}, Te = (r, l) => xe(r, Re(l)), De = (r, l) => {
|
7
|
+
var a = {};
|
8
|
+
for (var s in r) me.call(r, s) && l.indexOf(s) < 0 && (a[s] = r[s]);
|
9
|
+
if (r != null && Z) for (var s of Z(r)) l.indexOf(s) < 0 && fe.call(r, s) && (a[s] = r[s]);
|
10
|
+
return a;
|
11
|
+
};
|
12
|
+
function _e(r) {
|
13
|
+
let l = setTimeout(r, 0), a = setTimeout(r, 10), s = setTimeout(r, 50);
|
14
|
+
return [l, a, s];
|
15
|
+
}
|
16
|
+
function Ae(r) {
|
17
|
+
let l = t.useRef();
|
18
|
+
return t.useEffect(() => {
|
19
|
+
l.current = r;
|
20
|
+
}), l.current;
|
21
|
+
}
|
22
|
+
var Oe = 18, ve = 40, Ie = `${ve}px`, We = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
|
23
|
+
function Be({ containerRef: r, inputRef: l, pushPasswordManagerStrategy: a, isFocused: s }) {
|
24
|
+
let [M, p] = t.useState(!1), [j, x] = t.useState(!1), [A, H] = t.useState(!1), F = t.useMemo(() => a === "none" ? !1 : (a === "increase-width" || a === "experimental-no-flickering") && M && j, [M, j, a]), O = t.useCallback(() => {
|
25
|
+
let v = r.current, P = l.current;
|
26
|
+
if (!v || !P || A || a === "none") return;
|
27
|
+
let h = v, w = h.getBoundingClientRect().left + h.offsetWidth, I = h.getBoundingClientRect().top + h.offsetHeight / 2, i = w - Oe, L = I;
|
28
|
+
document.querySelectorAll(We).length === 0 && document.elementFromPoint(i, L) === v || (p(!0), H(!0));
|
29
|
+
}, [r, l, A, a]);
|
30
|
+
return t.useEffect(() => {
|
31
|
+
let v = r.current;
|
32
|
+
if (!v || a === "none") return;
|
33
|
+
function P() {
|
34
|
+
let w = window.innerWidth - v.getBoundingClientRect().right;
|
35
|
+
x(w >= ve);
|
36
|
+
}
|
37
|
+
P();
|
38
|
+
let h = setInterval(P, 1e3);
|
39
|
+
return () => {
|
40
|
+
clearInterval(h);
|
41
|
+
};
|
42
|
+
}, [r, a]), t.useEffect(() => {
|
43
|
+
let v = s || document.activeElement === l.current;
|
44
|
+
if (a === "none" || !v) return;
|
45
|
+
let P = setTimeout(O, 0), h = setTimeout(O, 2e3), w = setTimeout(O, 5e3), I = setTimeout(() => {
|
46
|
+
H(!0);
|
47
|
+
}, 6e3);
|
48
|
+
return () => {
|
49
|
+
clearTimeout(P), clearTimeout(h), clearTimeout(w), clearTimeout(I);
|
50
|
+
};
|
51
|
+
}, [l, s, a, O]), { hasPWMBadge: M, willPushPWMBadge: F, PWM_BADGE_SPACE_WIDTH: Ie };
|
52
|
+
}
|
53
|
+
var je = t.createContext({}), He = t.forwardRef((r, l) => {
|
54
|
+
var a = r, { value: s, onChange: M, maxLength: p, textAlign: j = "left", pattern: x, placeholder: A, inputMode: H = "numeric", onComplete: F, pushPasswordManagerStrategy: O = "increase-width", pasteTransformer: v, containerClassName: P, noScriptCSSFallback: h = Fe, render: w, children: I } = a, i = De(a, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), L, ee, te, ne, re;
|
55
|
+
let [ge, he] = t.useState(typeof i.defaultValue == "string" ? i.defaultValue : ""), u = s ?? ge, R = Ae(u), G = t.useCallback((e) => {
|
56
|
+
M == null || M(e), he(e);
|
57
|
+
}, [M]), E = t.useMemo(() => x ? typeof x == "string" ? new RegExp(x) : x : null, [x]), c = t.useRef(null), q = t.useRef(null), J = t.useRef({ value: u, onChange: G, isIOS: typeof window < "u" && ((ee = (L = window == null ? void 0 : window.CSS) == null ? void 0 : L.supports) == null ? void 0 : ee.call(L, "-webkit-touch-callout", "none")) }), X = t.useRef({ prev: [(te = c.current) == null ? void 0 : te.selectionStart, (ne = c.current) == null ? void 0 : ne.selectionEnd, (re = c.current) == null ? void 0 : re.selectionDirection] });
|
58
|
+
t.useImperativeHandle(l, () => c.current, []), t.useEffect(() => {
|
59
|
+
let e = c.current, n = q.current;
|
60
|
+
if (!e || !n) return;
|
61
|
+
J.current.value !== e.value && J.current.onChange(e.value), X.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
|
62
|
+
function d() {
|
63
|
+
if (document.activeElement !== e) {
|
64
|
+
$(null), z(null);
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
let o = e.selectionStart, f = e.selectionEnd, Y = e.selectionDirection, b = e.maxLength, T = e.value, S = X.current.prev, C = -1, y = -1, D;
|
68
|
+
if (T.length !== 0 && o !== null && f !== null) {
|
69
|
+
let Pe = o === f, Ce = o === T.length && T.length < b;
|
70
|
+
if (Pe && !Ce) {
|
71
|
+
let _ = o;
|
72
|
+
if (_ === 0) C = 0, y = 1, D = "forward";
|
73
|
+
else if (_ === b) C = _ - 1, y = _, D = "backward";
|
74
|
+
else if (b > 1 && T.length > 1) {
|
75
|
+
let U = 0;
|
76
|
+
if (S[0] !== null && S[1] !== null) {
|
77
|
+
D = _ < S[1] ? "backward" : "forward";
|
78
|
+
let ye = S[0] === S[1] && S[0] < b;
|
79
|
+
D === "backward" && !ye && (U = -1);
|
80
|
+
}
|
81
|
+
C = U + _, y = U + _ + 1;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
C !== -1 && y !== -1 && C !== y && c.current.setSelectionRange(C, y, D);
|
85
|
+
}
|
86
|
+
let se = C !== -1 ? C : o, pe = y !== -1 ? y : f, Se = D ?? Y;
|
87
|
+
$(se), z(pe), X.current.prev = [se, pe, Se];
|
88
|
+
}
|
89
|
+
if (document.addEventListener("selectionchange", d, { capture: !0 }), d(), document.activeElement === e && K(!0), !document.getElementById("input-otp-style")) {
|
90
|
+
let o = document.createElement("style");
|
91
|
+
if (o.id = "input-otp-style", document.head.appendChild(o), o.sheet) {
|
92
|
+
let f = "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;";
|
93
|
+
V(o.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), V(o.sheet, `[data-input-otp]:autofill { ${f} }`), V(o.sheet, `[data-input-otp]:-webkit-autofill { ${f} }`), V(o.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; } }"), V(o.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
94
|
+
}
|
95
|
+
}
|
96
|
+
let g = () => {
|
97
|
+
n && n.style.setProperty("--root-height", `${e.clientHeight}px`);
|
98
|
+
};
|
99
|
+
g();
|
100
|
+
let m = new ResizeObserver(g);
|
101
|
+
return m.observe(e), () => {
|
102
|
+
document.removeEventListener("selectionchange", d, { capture: !0 }), m.disconnect();
|
103
|
+
};
|
104
|
+
}, []);
|
105
|
+
let [le, ae] = t.useState(!1), [N, K] = t.useState(!1), [k, $] = t.useState(null), [W, z] = t.useState(null);
|
106
|
+
t.useEffect(() => {
|
107
|
+
_e(() => {
|
108
|
+
var e, n, d, g;
|
109
|
+
(e = c.current) == null || e.dispatchEvent(new Event("input"));
|
110
|
+
let m = (n = c.current) == null ? void 0 : n.selectionStart, o = (d = c.current) == null ? void 0 : d.selectionEnd, f = (g = c.current) == null ? void 0 : g.selectionDirection;
|
111
|
+
m !== null && o !== null && ($(m), z(o), X.current.prev = [m, o, f]);
|
112
|
+
});
|
113
|
+
}, [u, N]), t.useEffect(() => {
|
114
|
+
R !== void 0 && u !== R && R.length < p && u.length === p && (F == null || F(u));
|
115
|
+
}, [p, F, R, u]);
|
116
|
+
let B = Be({ containerRef: q, inputRef: c, pushPasswordManagerStrategy: O, isFocused: N }), oe = t.useCallback((e) => {
|
117
|
+
let n = e.currentTarget.value.slice(0, p);
|
118
|
+
if (n.length > 0 && E && !E.test(n)) {
|
119
|
+
e.preventDefault();
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
typeof R == "string" && n.length < R.length && document.dispatchEvent(new Event("selectionchange")), G(n);
|
123
|
+
}, [p, G, R, E]), ie = t.useCallback(() => {
|
124
|
+
var e;
|
125
|
+
if (c.current) {
|
126
|
+
let n = Math.min(c.current.value.length, p - 1), d = c.current.value.length;
|
127
|
+
(e = c.current) == null || e.setSelectionRange(n, d), $(n), z(d);
|
128
|
+
}
|
129
|
+
K(!0);
|
130
|
+
}, [p]), ue = t.useCallback((e) => {
|
131
|
+
var n, d;
|
132
|
+
let g = c.current;
|
133
|
+
if (!v && (!J.current.isIOS || !e.clipboardData || !g)) return;
|
134
|
+
let m = e.clipboardData.getData("text/plain"), o = v ? v(m) : m;
|
135
|
+
console.log({ _content: m, content: o }), e.preventDefault();
|
136
|
+
let f = (n = c.current) == null ? void 0 : n.selectionStart, Y = (d = c.current) == null ? void 0 : d.selectionEnd, b = (f !== Y ? u.slice(0, f) + o + u.slice(Y) : u.slice(0, f) + o + u.slice(f)).slice(0, p);
|
137
|
+
if (b.length > 0 && E && !E.test(b)) return;
|
138
|
+
g.value = b, G(b);
|
139
|
+
let T = Math.min(b.length, p - 1), S = b.length;
|
140
|
+
g.setSelectionRange(T, S), $(T), z(S);
|
141
|
+
}, [p, G, E, u]), be = t.useMemo(() => ({ position: "relative", cursor: i.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [i.disabled]), ce = t.useMemo(() => ({ position: "absolute", inset: 0, width: B.willPushPWMBadge ? `calc(100% + ${B.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: B.willPushPWMBadge ? `inset(0 ${B.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: j, 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" }), [B.PWM_BADGE_SPACE_WIDTH, B.willPushPWMBadge, j]), Ee = t.useMemo(() => t.createElement("input", Te(ke({ autoComplete: i.autoComplete || "one-time-code" }, i), { "data-input-otp": !0, "data-input-otp-placeholder-shown": u.length === 0 || void 0, "data-input-otp-mss": k, "data-input-otp-mse": W, inputMode: H, pattern: E == null ? void 0 : E.source, "aria-placeholder": A, style: ce, maxLength: p, value: u, ref: c, onPaste: (e) => {
|
142
|
+
var n;
|
143
|
+
ue(e), (n = i.onPaste) == null || n.call(i, e);
|
144
|
+
}, onChange: oe, onMouseOver: (e) => {
|
145
|
+
var n;
|
146
|
+
ae(!0), (n = i.onMouseOver) == null || n.call(i, e);
|
147
|
+
}, onMouseLeave: (e) => {
|
148
|
+
var n;
|
149
|
+
ae(!1), (n = i.onMouseLeave) == null || n.call(i, e);
|
150
|
+
}, onFocus: (e) => {
|
151
|
+
var n;
|
152
|
+
ie(), (n = i.onFocus) == null || n.call(i, e);
|
153
|
+
}, onBlur: (e) => {
|
154
|
+
var n;
|
155
|
+
K(!1), (n = i.onBlur) == null || n.call(i, e);
|
156
|
+
} })), [oe, ie, ue, H, ce, p, W, k, i, E == null ? void 0 : E.source, u]), Q = t.useMemo(() => ({ slots: Array.from({ length: p }).map((e, n) => {
|
157
|
+
var d;
|
158
|
+
let g = N && k !== null && W !== null && (k === W && n === k || n >= k && n < W), m = u[n] !== void 0 ? u[n] : null, o = u[0] !== void 0 ? null : (d = A == null ? void 0 : A[n]) != null ? d : null;
|
159
|
+
return { char: m, placeholderChar: o, isActive: g, hasFakeCaret: g && m === null };
|
160
|
+
}), isFocused: N, isHovering: !i.disabled && le }), [N, le, p, W, k, i.disabled, u]), we = t.useMemo(() => w ? w(Q) : t.createElement(je.Provider, { value: Q }, I), [I, Q, w]);
|
161
|
+
return t.createElement(t.Fragment, null, h !== null && t.createElement("noscript", null, t.createElement("style", null, h)), t.createElement("div", { ref: q, "data-input-otp-container": !0, style: be, className: P }, we, t.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ee)));
|
162
|
+
});
|
163
|
+
He.displayName = "Input";
|
164
|
+
function V(r, l) {
|
165
|
+
try {
|
166
|
+
r.insertRule(l);
|
167
|
+
} catch {
|
168
|
+
console.error("input-otp could not insert CSS rule:", l);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
var Fe = `
|
172
|
+
[data-input-otp] {
|
173
|
+
--nojs-bg: white !important;
|
174
|
+
--nojs-fg: black !important;
|
175
|
+
|
176
|
+
background-color: var(--nojs-bg) !important;
|
177
|
+
color: var(--nojs-fg) !important;
|
178
|
+
caret-color: var(--nojs-fg) !important;
|
179
|
+
letter-spacing: .25em !important;
|
180
|
+
text-align: center !important;
|
181
|
+
border: 1px solid var(--nojs-fg) !important;
|
182
|
+
border-radius: 4px !important;
|
183
|
+
width: 100% !important;
|
184
|
+
}
|
185
|
+
@media (prefers-color-scheme: dark) {
|
186
|
+
[data-input-otp] {
|
187
|
+
--nojs-bg: black !important;
|
188
|
+
--nojs-fg: white !important;
|
189
|
+
}
|
190
|
+
}`, Le = "^\\d+$", Ge = "^[a-zA-Z]+$", Ne = "^[a-zA-Z0-9]+$";
|
191
|
+
export {
|
192
|
+
He as OTPInput,
|
193
|
+
je as OTPInputContext,
|
194
|
+
Ge as REGEXP_ONLY_CHARS,
|
195
|
+
Le as REGEXP_ONLY_DIGITS,
|
196
|
+
Ne as REGEXP_ONLY_DIGITS_AND_CHARS
|
197
|
+
};
|
@@ -0,0 +1,335 @@
|
|
1
|
+
import x, { forwardRef as te, useImperativeHandle as ae, useRef as j, useCallback as q, useMemo as J, useEffect as O, useState as R } from "react";
|
2
|
+
var K = [["Afghanistan", "af", "93"], ["Albania", "al", "355"], ["Algeria", "dz", "213"], ["Andorra", "ad", "376"], ["Angola", "ao", "244"], ["Antigua and Barbuda", "ag", "1268"], ["Argentina", "ar", "54", "(..) ........", 0], ["Armenia", "am", "374", ".. ......"], ["Aruba", "aw", "297"], ["Australia", "au", "61", { default: ". .... ....", "/^4/": "... ... ...", "/^5(?!50)/": "... ... ...", "/^1(3|8)00/": ".... ... ...", "/^13/": ".. .. ..", "/^180/": "... ...." }, 0, []], ["Austria", "at", "43"], ["Azerbaijan", "az", "994", "(..) ... .. .."], ["Bahamas", "bs", "1242"], ["Bahrain", "bh", "973"], ["Bangladesh", "bd", "880"], ["Barbados", "bb", "1246"], ["Belarus", "by", "375", "(..) ... .. .."], ["Belgium", "be", "32", "... .. .. .."], ["Belize", "bz", "501"], ["Benin", "bj", "229"], ["Bhutan", "bt", "975"], ["Bolivia", "bo", "591"], ["Bosnia and Herzegovina", "ba", "387"], ["Botswana", "bw", "267"], ["Brazil", "br", "55", "(..) ........."], ["British Indian Ocean Territory", "io", "246"], ["Brunei", "bn", "673"], ["Bulgaria", "bg", "359"], ["Burkina Faso", "bf", "226"], ["Burundi", "bi", "257"], ["Cambodia", "kh", "855"], ["Cameroon", "cm", "237"], ["Canada", "ca", "1", "(...) ...-....", 1, ["204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]], ["Cape Verde", "cv", "238"], ["Caribbean Netherlands", "bq", "599", "", 1], ["Cayman Islands", "ky", "1", "... ... ....", 4, ["345"]], ["Central African Republic", "cf", "236"], ["Chad", "td", "235"], ["Chile", "cl", "56"], ["China", "cn", "86", "... .... ...."], ["Colombia", "co", "57", "... ... ...."], ["Comoros", "km", "269"], ["Congo", "cd", "243"], ["Congo", "cg", "242"], ["Costa Rica", "cr", "506", "....-...."], ["Côte d'Ivoire", "ci", "225", ".. .. .. .. .."], ["Croatia", "hr", "385"], ["Cuba", "cu", "53"], ["Curaçao", "cw", "599", "", 0], ["Cyprus", "cy", "357", ".. ......"], ["Czech Republic", "cz", "420", "... ... ..."], ["Denmark", "dk", "45", ".. .. .. .."], ["Djibouti", "dj", "253"], ["Dominica", "dm", "1767"], ["Dominican Republic", "do", "1", "(...) ...-....", 2, ["809", "829", "849"]], ["Ecuador", "ec", "593"], ["Egypt", "eg", "20"], ["El Salvador", "sv", "503", "....-...."], ["Equatorial Guinea", "gq", "240"], ["Eritrea", "er", "291"], ["Estonia", "ee", "372", ".... ......"], ["Ethiopia", "et", "251"], ["Fiji", "fj", "679"], ["Finland", "fi", "358", ".. ... .. .."], ["France", "fr", "33", ". .. .. .. .."], ["French Guiana", "gf", "594"], ["French Polynesia", "pf", "689"], ["Gabon", "ga", "241"], ["Gambia", "gm", "220"], ["Georgia", "ge", "995"], ["Germany", "de", "49", "... ........."], ["Ghana", "gh", "233"], ["Greece", "gr", "30"], ["Greenland", "gl", "299", ".. .. .."], ["Grenada", "gd", "1473"], ["Guadeloupe", "gp", "590", "", 0], ["Guam", "gu", "1671"], ["Guatemala", "gt", "502", "....-...."], ["Guinea", "gn", "224"], ["Guinea-Bissau", "gw", "245"], ["Guyana", "gy", "592"], ["Haiti", "ht", "509", "....-...."], ["Honduras", "hn", "504"], ["Hong Kong", "hk", "852", ".... ...."], ["Hungary", "hu", "36"], ["Iceland", "is", "354", "... ...."], ["India", "in", "91", ".....-....."], ["Indonesia", "id", "62"], ["Iran", "ir", "98", "... ... ...."], ["Iraq", "iq", "964"], ["Ireland", "ie", "353", ".. ......."], ["Israel", "il", "972", "... ... ...."], ["Italy", "it", "39", "... .......", 0], ["Jamaica", "jm", "1876"], ["Japan", "jp", "81", ".. .... ...."], ["Jordan", "jo", "962"], ["Kazakhstan", "kz", "7", "... ...-..-..", 0], ["Kenya", "ke", "254"], ["Kiribati", "ki", "686"], ["Kosovo", "xk", "383"], ["Kuwait", "kw", "965"], ["Kyrgyzstan", "kg", "996", "... ... ..."], ["Laos", "la", "856"], ["Latvia", "lv", "371", ".. ... ..."], ["Lebanon", "lb", "961"], ["Lesotho", "ls", "266"], ["Liberia", "lr", "231"], ["Libya", "ly", "218"], ["Liechtenstein", "li", "423"], ["Lithuania", "lt", "370"], ["Luxembourg", "lu", "352"], ["Macau", "mo", "853"], ["Macedonia", "mk", "389"], ["Madagascar", "mg", "261"], ["Malawi", "mw", "265"], ["Malaysia", "my", "60", "..-....-...."], ["Maldives", "mv", "960"], ["Mali", "ml", "223"], ["Malta", "mt", "356"], ["Marshall Islands", "mh", "692"], ["Martinique", "mq", "596"], ["Mauritania", "mr", "222"], ["Mauritius", "mu", "230"], ["Mexico", "mx", "52", "... ... ....", 0], ["Micronesia", "fm", "691"], ["Moldova", "md", "373", "(..) ..-..-.."], ["Monaco", "mc", "377"], ["Mongolia", "mn", "976"], ["Montenegro", "me", "382"], ["Morocco", "ma", "212"], ["Mozambique", "mz", "258"], ["Myanmar", "mm", "95"], ["Namibia", "na", "264"], ["Nauru", "nr", "674"], ["Nepal", "np", "977"], ["Netherlands", "nl", "31", { "/^06/": "(.). .........", "/^6/": ". .........", "/^0(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/": "(.).. ........", "/^(10|13|14|15|20|23|24|26|30|33|35|36|38|40|43|44|45|46|50|53|55|58|70|71|72|73|74|75|76|77|78|79|82|84|85|87|88|91)/": ".. ........", "/^0/": "(.)... .......", default: "... ......." }], ["New Caledonia", "nc", "687"], ["New Zealand", "nz", "64", "...-...-...."], ["Nicaragua", "ni", "505"], ["Niger", "ne", "227"], ["Nigeria", "ng", "234"], ["North Korea", "kp", "850"], ["Norway", "no", "47", "... .. ..."], ["Oman", "om", "968"], ["Pakistan", "pk", "92", "...-......."], ["Palau", "pw", "680"], ["Palestine", "ps", "970"], ["Panama", "pa", "507"], ["Papua New Guinea", "pg", "675"], ["Paraguay", "py", "595"], ["Peru", "pe", "51"], ["Philippines", "ph", "63", "... ... ...."], ["Poland", "pl", "48", "...-...-..."], ["Portugal", "pt", "351"], ["Puerto Rico", "pr", "1", "(...) ...-....", 3, ["787", "939"]], ["Qatar", "qa", "974"], ["Réunion", "re", "262"], ["Romania", "ro", "40"], ["Russia", "ru", "7", "(...) ...-..-..", 1], ["Rwanda", "rw", "250"], ["Saint Kitts and Nevis", "kn", "1869"], ["Saint Lucia", "lc", "1758"], ["Saint Vincent and the Grenadines", "vc", "1784"], ["Samoa", "ws", "685"], ["San Marino", "sm", "378"], ["São Tomé and Príncipe", "st", "239"], ["Saudi Arabia", "sa", "966"], ["Senegal", "sn", "221"], ["Serbia", "rs", "381"], ["Seychelles", "sc", "248"], ["Sierra Leone", "sl", "232"], ["Singapore", "sg", "65", "....-...."], ["Slovakia", "sk", "421"], ["Slovenia", "si", "386"], ["Solomon Islands", "sb", "677"], ["Somalia", "so", "252"], ["South Africa", "za", "27"], ["South Korea", "kr", "82", "... .... ...."], ["South Sudan", "ss", "211"], ["Spain", "es", "34", "... ... ..."], ["Sri Lanka", "lk", "94"], ["Sudan", "sd", "249"], ["Suriname", "sr", "597"], ["Swaziland", "sz", "268"], ["Sweden", "se", "46", "... ... ..."], ["Switzerland", "ch", "41", ".. ... .. .."], ["Syria", "sy", "963"], ["Taiwan", "tw", "886"], ["Tajikistan", "tj", "992"], ["Tanzania", "tz", "255"], ["Thailand", "th", "66"], ["Timor-Leste", "tl", "670"], ["Togo", "tg", "228"], ["Tonga", "to", "676"], ["Trinidad and Tobago", "tt", "1868"], ["Tunisia", "tn", "216"], ["Turkey", "tr", "90", "... ... .. .."], ["Turkmenistan", "tm", "993"], ["Tuvalu", "tv", "688"], ["Uganda", "ug", "256"], ["Ukraine", "ua", "380", "(..) ... .. .."], ["United Arab Emirates", "ae", "971"], ["United Kingdom", "gb", "44", ".... ......"], ["United States", "us", "1", "(...) ...-....", 0], ["Uruguay", "uy", "598"], ["Uzbekistan", "uz", "998", ".. ... .. .."], ["Vanuatu", "vu", "678"], ["Vatican City", "va", "39", ".. .... ....", 1], ["Venezuela", "ve", "58"], ["Vietnam", "vn", "84"], ["Yemen", "ye", "967"], ["Zambia", "zm", "260"], ["Zimbabwe", "zw", "263"]], re = "react-international-phone-", Q = (...t) => t.filter((e) => !!e).join(" ").trim(), ne = (...t) => Q(...t).split(" ").map((e) => `${re}${e}`).join(" "), A = ({ addPrefix: t, rawClassNames: e }) => Q(ne(...t), ...e), ie = ({ value: t, mask: e, maskSymbol: i, offset: l = 0, trimNonMaskCharsLeftover: a = !1 }) => {
|
3
|
+
if (t.length < l) return t;
|
4
|
+
let r = t.slice(0, l), f = t.slice(l), u = r, n = 0;
|
5
|
+
for (let s of e.split("")) {
|
6
|
+
if (n >= f.length) {
|
7
|
+
if (!a && s !== i) {
|
8
|
+
u += s;
|
9
|
+
continue;
|
10
|
+
}
|
11
|
+
break;
|
12
|
+
}
|
13
|
+
s === i ? (u += f[n], n += 1) : u += s;
|
14
|
+
}
|
15
|
+
return u;
|
16
|
+
}, G = (t) => t ? /^\d+$/.test(t) : !1, U = (t) => t.replace(/\D/g, ""), oe = (t, e) => {
|
17
|
+
let i = t.style.display;
|
18
|
+
i !== "block" && (t.style.display = "block");
|
19
|
+
let l = t.getBoundingClientRect(), a = e.getBoundingClientRect(), r = a.top - l.top, f = l.bottom - a.bottom;
|
20
|
+
r >= 0 && f >= 0 || (Math.abs(r) < Math.abs(f) ? t.scrollTop += r : t.scrollTop -= f), t.style.display = i;
|
21
|
+
}, le = () => typeof window > "u" ? !1 : window.navigator.userAgent.toLowerCase().includes("macintosh"), se = (t, e) => {
|
22
|
+
let i = e.disableDialCodeAndPrefix ? !1 : e.forceDialCode, l = e.disableDialCodeAndPrefix ? !1 : e.insertDialCodeOnEmpty, a = t, r = (s) => e.trimNonDigitsEnd ? s.trim() : s;
|
23
|
+
if (!a) return l && !a.length || i ? r(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`) : r(a);
|
24
|
+
if (a = U(a), a === e.dialCode && !e.disableDialCodeAndPrefix) return r(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`);
|
25
|
+
if (e.dialCode.startsWith(a) && !e.disableDialCodeAndPrefix) return r(i ? `${e.prefix}${e.dialCode}${e.charAfterDialCode}` : `${e.prefix}${a}`);
|
26
|
+
if (!a.startsWith(e.dialCode) && !e.disableDialCodeAndPrefix) {
|
27
|
+
if (i) return r(`${e.prefix}${e.dialCode}${e.charAfterDialCode}`);
|
28
|
+
if (a.length < e.dialCode.length) return r(`${e.prefix}${a}`);
|
29
|
+
}
|
30
|
+
let f = () => {
|
31
|
+
let s = e.dialCode.length, o = a.slice(0, s), m = a.slice(s);
|
32
|
+
return { phoneLeftSide: o, phoneRightSide: m };
|
33
|
+
}, { phoneLeftSide: u, phoneRightSide: n } = f();
|
34
|
+
return u = `${e.prefix}${u}${e.charAfterDialCode}`, n = ie({ value: n, mask: e.mask, maskSymbol: e.maskChar, trimNonMaskCharsLeftover: e.trimNonDigitsEnd || e.disableDialCodeAndPrefix && n.length === 0 }), e.disableDialCodeAndPrefix && (u = ""), r(`${u}${n}`);
|
35
|
+
}, ue = ({ phoneBeforeInput: t, phoneAfterInput: e, phoneAfterFormatted: i, cursorPositionAfterInput: l, leftOffset: a = 0, deletion: r }) => {
|
36
|
+
if (l < a) return a;
|
37
|
+
if (!t) return i.length;
|
38
|
+
let f = null;
|
39
|
+
for (let o = l - 1; o >= 0; o -= 1) if (G(e[o])) {
|
40
|
+
f = o;
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
if (f === null) {
|
44
|
+
for (let o = 0; o < e.length; o += 1) if (G(i[o])) return o;
|
45
|
+
return e.length;
|
46
|
+
}
|
47
|
+
let u = 0;
|
48
|
+
for (let o = 0; o < f; o += 1) G(e[o]) && (u += 1);
|
49
|
+
let n = 0, s = 0;
|
50
|
+
for (let o = 0; o < i.length && (n += 1, G(i[o]) && (s += 1), !(s >= u + 1)); o += 1) ;
|
51
|
+
if (r !== "backward") for (; !G(i[n]) && n < i.length; ) n += 1;
|
52
|
+
return n;
|
53
|
+
}, W = ({ phone: t, prefix: e }) => t ? `${e}${U(t)}` : "";
|
54
|
+
function H({ value: t, country: e, insertDialCodeOnEmpty: i, trimNonDigitsEnd: l, countries: a, prefix: r, charAfterDialCode: f, forceDialCode: u, disableDialCodeAndPrefix: n, defaultMask: s, countryGuessingEnabled: o, disableFormatting: m }) {
|
55
|
+
let d = t;
|
56
|
+
n && (d = d.startsWith(`${r}`) ? d : `${r}${e.dialCode}${d}`);
|
57
|
+
let p = o ? be({ phone: d, countries: a, currentCountryIso2: e == null ? void 0 : e.iso2 }) : void 0, w = (p == null ? void 0 : p.country) ?? e, C = se(d, { prefix: r, mask: he({ phone: d, country: w, defaultMask: s, disableFormatting: m }), maskChar: X, dialCode: w.dialCode, trimNonDigitsEnd: l, charAfterDialCode: f, forceDialCode: u, insertDialCodeOnEmpty: i, disableDialCodeAndPrefix: n }), g = o && !(p != null && p.fullDialCodeMatch) ? e : w;
|
58
|
+
return { phone: W({ phone: n ? `${g.dialCode}${C}` : C, prefix: r }), inputValue: C, country: g };
|
59
|
+
}
|
60
|
+
var de = (t) => {
|
61
|
+
if ((t == null ? void 0 : t.toLocaleLowerCase().includes("delete")) ?? !1) return t != null && t.toLocaleLowerCase().includes("forward") ? "forward" : "backward";
|
62
|
+
}, ce = (t, { country: e, insertDialCodeOnEmpty: i, phoneBeforeInput: l, prefix: a, charAfterDialCode: r, forceDialCode: f, disableDialCodeAndPrefix: u, countryGuessingEnabled: n, defaultMask: s, disableFormatting: o, countries: m }) => {
|
63
|
+
let d = t.nativeEvent, p = d.inputType, w = de(p), C = !!(p != null && p.startsWith("insertFrom")), g = p === "insertText", N = (d == null ? void 0 : d.data) || void 0, b = t.target.value, $ = t.target.selectionStart ?? 0;
|
64
|
+
if (p != null && p.includes("history")) return { inputValue: l, phone: W({ phone: l, prefix: a }), cursorPosition: l.length, country: e };
|
65
|
+
if (g && !G(N) && b !== a) return { inputValue: l, phone: W({ phone: u ? `${e.dialCode}${l}` : l, prefix: a }), cursorPosition: $ - ((N == null ? void 0 : N.length) ?? 0), country: e };
|
66
|
+
if (f && !b.startsWith(`${a}${e.dialCode}`) && !C) {
|
67
|
+
let y = b ? l : `${a}${e.dialCode}${r}`;
|
68
|
+
return { inputValue: y, phone: W({ phone: y, prefix: a }), cursorPosition: a.length + e.dialCode.length + r.length, country: e };
|
69
|
+
}
|
70
|
+
let { phone: z, inputValue: M, country: c } = H({ value: b, country: e, trimNonDigitsEnd: w === "backward", insertDialCodeOnEmpty: i, countryGuessingEnabled: n, countries: m, prefix: a, charAfterDialCode: r, forceDialCode: f, disableDialCodeAndPrefix: u, disableFormatting: o, defaultMask: s }), h = ue({ cursorPositionAfterInput: $, phoneBeforeInput: l, phoneAfterInput: b, phoneAfterFormatted: M, leftOffset: f ? a.length + e.dialCode.length + r.length : 0, deletion: w });
|
71
|
+
return { phone: z, inputValue: M, cursorPosition: h, country: c };
|
72
|
+
}, fe = (t, e) => {
|
73
|
+
let i = Object.keys(t), l = Object.keys(e);
|
74
|
+
if (i.length !== l.length) return !1;
|
75
|
+
for (let a of i) if (t[a] !== e[a]) return !1;
|
76
|
+
return !0;
|
77
|
+
}, pe = () => {
|
78
|
+
let t = j(), e = j(Date.now());
|
79
|
+
return { check: () => {
|
80
|
+
let i = Date.now(), l = t.current ? i - e.current : void 0;
|
81
|
+
return t.current = e.current, e.current = i, l;
|
82
|
+
} };
|
83
|
+
}, me = { size: 20, overrideLastItemDebounceMS: -1 };
|
84
|
+
function ye(t, e) {
|
85
|
+
let { size: i, overrideLastItemDebounceMS: l, onChange: a } = { ...me, ...e }, [r, f] = R(t), [u, n] = R([r]), [s, o] = R(0), m = pe();
|
86
|
+
return [r, (d, p) => {
|
87
|
+
if (typeof d == "object" && typeof r == "object" && fe(d, r) || d === r) return;
|
88
|
+
let w = l > 0, C = m.check(), g = w && C !== void 0 ? C > l : !0;
|
89
|
+
if ((p == null ? void 0 : p.overrideLastItem) !== void 0 ? p.overrideLastItem : !g) n((N) => [...N.slice(0, s), d]);
|
90
|
+
else {
|
91
|
+
let N = u.length >= i;
|
92
|
+
n((b) => [...b.slice(N ? 1 : 0, s + 1), d]), N || o((b) => b + 1);
|
93
|
+
}
|
94
|
+
f(d), a == null || a(d);
|
95
|
+
}, () => {
|
96
|
+
if (s <= 0) return { success: !1 };
|
97
|
+
let d = u[s - 1];
|
98
|
+
return f(d), o((p) => p - 1), a == null || a(d), { success: !0, value: d };
|
99
|
+
}, () => {
|
100
|
+
if (s + 1 >= u.length) return { success: !1 };
|
101
|
+
let d = u[s + 1];
|
102
|
+
return f(d), o((p) => p + 1), a == null || a(d), { success: !0, value: d };
|
103
|
+
}];
|
104
|
+
}
|
105
|
+
var X = ".", E = { defaultCountry: "us", value: "", prefix: "+", defaultMask: "............", charAfterDialCode: " ", historySaveDebounceMS: 200, disableCountryGuess: !1, disableDialCodePrefill: !1, forceDialCode: !1, disableDialCodeAndPrefix: !1, disableFormatting: !1, countries: K, preferredCountries: [] }, Ce = ({ defaultCountry: t = E.defaultCountry, value: e = E.value, countries: i = E.countries, prefix: l = E.prefix, defaultMask: a = E.defaultMask, charAfterDialCode: r = E.charAfterDialCode, historySaveDebounceMS: f = E.historySaveDebounceMS, disableCountryGuess: u = E.disableCountryGuess, disableDialCodePrefill: n = E.disableDialCodePrefill, forceDialCode: s = E.forceDialCode, disableDialCodeAndPrefix: o = E.disableDialCodeAndPrefix, disableFormatting: m = E.disableFormatting, onChange: d, inputRef: p }) => {
|
106
|
+
let w = { countries: i, prefix: l, charAfterDialCode: r, forceDialCode: o ? !1 : s, disableDialCodeAndPrefix: o, defaultMask: a, countryGuessingEnabled: !u, disableFormatting: m }, C = j(null), g = p || C, N = (v) => {
|
107
|
+
Promise.resolve().then(() => {
|
108
|
+
var k;
|
109
|
+
typeof window > "u" || g.current !== (document == null ? void 0 : document.activeElement) || ((k = g.current) == null || k.setSelectionRange(v, v));
|
110
|
+
});
|
111
|
+
}, [{ phone: b, inputValue: $, country: z }, M, c, h] = ye(() => {
|
112
|
+
let v = T({ value: t, field: "iso2", countries: i });
|
113
|
+
v || console.error(`[react-international-phone]: can not find a country with "${t}" iso2 code`);
|
114
|
+
let k = v || T({ value: "us", field: "iso2", countries: i }), { phone: P, inputValue: L, country: V } = H({ value: e, country: k, insertDialCodeOnEmpty: !n, ...w });
|
115
|
+
return N(L.length), { phone: P, inputValue: L, country: V.iso2 };
|
116
|
+
}, { overrideLastItemDebounceMS: f, onChange: ({ inputValue: v, phone: k, country: P }) => {
|
117
|
+
if (!d) return;
|
118
|
+
let L = y(P);
|
119
|
+
d({ phone: k, inputValue: v, country: L });
|
120
|
+
} }), y = q((v) => T({ value: v, field: "iso2", countries: i }), [i]), D = J(() => y(z), [z, y]);
|
121
|
+
O(() => {
|
122
|
+
let v = g.current;
|
123
|
+
if (!v) return;
|
124
|
+
let k = (P) => {
|
125
|
+
if (!P.key) return;
|
126
|
+
let L = P.ctrlKey, V = P.metaKey, ee = P.shiftKey;
|
127
|
+
if (P.key.toLowerCase() === "z") {
|
128
|
+
if (le()) {
|
129
|
+
if (!V) return;
|
130
|
+
} else if (!L) return;
|
131
|
+
ee ? h() : c();
|
132
|
+
}
|
133
|
+
};
|
134
|
+
return v.addEventListener("keydown", k), () => {
|
135
|
+
v.removeEventListener("keydown", k);
|
136
|
+
};
|
137
|
+
}, [g, c, h]);
|
138
|
+
let S = (v) => {
|
139
|
+
v.preventDefault();
|
140
|
+
let { phone: k, inputValue: P, country: L, cursorPosition: V } = ce(v, { country: D, phoneBeforeInput: $, insertDialCodeOnEmpty: !1, ...w });
|
141
|
+
return M({ inputValue: P, phone: k, country: L.iso2 }), N(V), e;
|
142
|
+
}, I = (v, k = { focusOnInput: !1 }) => {
|
143
|
+
let P = T({ value: v, field: "iso2", countries: i });
|
144
|
+
if (!P) {
|
145
|
+
console.error(`[react-international-phone]: can not find a country with "${v}" iso2 code`);
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
let L = o ? "" : `${l}${P.dialCode}${r}`;
|
149
|
+
M({ inputValue: L, phone: `${l}${P.dialCode}`, country: P.iso2 }), k.focusOnInput && Promise.resolve().then(() => {
|
150
|
+
var V;
|
151
|
+
(V = g.current) == null || V.focus();
|
152
|
+
});
|
153
|
+
}, [B, F] = R(!1);
|
154
|
+
return O(() => {
|
155
|
+
if (!B) {
|
156
|
+
F(!0), e !== b && (d == null || d({ inputValue: $, phone: b, country: D }));
|
157
|
+
return;
|
158
|
+
}
|
159
|
+
if (e === b) return;
|
160
|
+
let { phone: v, inputValue: k, country: P } = H({ value: e, country: D, insertDialCodeOnEmpty: !n, ...w });
|
161
|
+
M({ phone: v, inputValue: k, country: P.iso2 });
|
162
|
+
}, [e]), { phone: b, inputValue: $, country: D, setCountry: I, handlePhoneValueChange: S, inputRef: g };
|
163
|
+
}, he = ({ phone: t, country: e, defaultMask: i = "............", disableFormatting: l = !1 }) => {
|
164
|
+
let a = e.format, r = (u) => l ? u.replace(new RegExp(`[^${X}]`, "g"), "") : u;
|
165
|
+
if (!a) return r(i);
|
166
|
+
if (typeof a == "string") return r(a);
|
167
|
+
if (!a.default) return console.error(`[react-international-phone]: default mask for ${e.iso2} is not provided`), r(i);
|
168
|
+
let f = Object.keys(a).find((u) => {
|
169
|
+
if (u === "default") return !1;
|
170
|
+
if (!(u.charAt(0) === "/" && u.charAt(u.length - 1) === "/")) return console.error(`[react-international-phone]: format regex "${u}" for ${e.iso2} is not valid`), !1;
|
171
|
+
let n = new RegExp(u.substring(1, u.length - 1)), s = t.replace(e.dialCode, "");
|
172
|
+
return n.test(U(s));
|
173
|
+
});
|
174
|
+
return r(f ? a[f] : a.default);
|
175
|
+
}, _ = (t) => {
|
176
|
+
let [e, i, l, a, r, f] = t;
|
177
|
+
return { name: e, iso2: i, dialCode: l, format: a, priority: r, areaCodes: f };
|
178
|
+
}, ge = (t) => `Field "${t}" is not supported`, T = ({ field: t, value: e, countries: i = K }) => {
|
179
|
+
if (["priority"].includes(t)) throw new Error(ge(t));
|
180
|
+
let l = i.find((a) => {
|
181
|
+
let r = _(a);
|
182
|
+
return e === r[t];
|
183
|
+
});
|
184
|
+
if (l) return _(l);
|
185
|
+
}, be = ({ phone: t, countries: e = K, currentCountryIso2: i }) => {
|
186
|
+
var u;
|
187
|
+
let l = { country: void 0, fullDialCodeMatch: !1 };
|
188
|
+
if (!t) return l;
|
189
|
+
let a = U(t);
|
190
|
+
if (!a) return l;
|
191
|
+
let r = l, f = ({ country: n, fullDialCodeMatch: s }) => {
|
192
|
+
var d, p;
|
193
|
+
let o = n.dialCode === ((d = r.country) == null ? void 0 : d.dialCode), m = (n.priority ?? 0) < (((p = r.country) == null ? void 0 : p.priority) ?? 0);
|
194
|
+
(!o || m) && (r = { country: n, fullDialCodeMatch: s });
|
195
|
+
};
|
196
|
+
for (let n of e) {
|
197
|
+
let s = _(n), { dialCode: o, areaCodes: m } = s;
|
198
|
+
if (a.startsWith(o)) {
|
199
|
+
let d = r.country ? Number(o) >= Number(r.country.dialCode) : !0;
|
200
|
+
if (m) {
|
201
|
+
let p = a.substring(o.length);
|
202
|
+
for (let w of m) if (p.startsWith(w)) return { country: s, fullDialCodeMatch: !0 };
|
203
|
+
}
|
204
|
+
(d || o === a || !r.fullDialCodeMatch) && f({ country: s, fullDialCodeMatch: !0 });
|
205
|
+
}
|
206
|
+
r.fullDialCodeMatch || a.length < o.length && o.startsWith(a) && (!r.country || Number(o) <= Number(r.country.dialCode)) && f({ country: s, fullDialCodeMatch: !1 });
|
207
|
+
}
|
208
|
+
if (i) {
|
209
|
+
let n = T({ value: i, field: "iso2", countries: e });
|
210
|
+
if (!n) return r;
|
211
|
+
let s = n ? ((o) => {
|
212
|
+
if (!(o != null && o.areaCodes)) return !1;
|
213
|
+
let m = a.substring(o.dialCode.length);
|
214
|
+
return o.areaCodes.some((d) => d.startsWith(m));
|
215
|
+
})(n) : !1;
|
216
|
+
r && ((u = r.country) == null ? void 0 : u.dialCode) === n.dialCode && r.country !== n && r.fullDialCodeMatch && (!n.areaCodes || s) && (r = { country: n, fullDialCodeMatch: !0 });
|
217
|
+
}
|
218
|
+
return r;
|
219
|
+
}, ve = (t, e) => {
|
220
|
+
let i = parseInt(t, 16);
|
221
|
+
return Number(i + e).toString(16);
|
222
|
+
}, we = "abcdefghijklmnopqrstuvwxyz", De = "1f1e6", Z = we.split("").reduce((t, e, i) => ({ ...t, [e]: ve(De, i) }), {}), ke = (t) => [Z[t[0]], Z[t[1]]].join("-"), Y = ({ iso2: t, size: e, src: i, protocol: l = "https", disableLazyLoading: a, className: r, style: f, ...u }) => {
|
223
|
+
if (!t) return x.createElement("img", { className: A({ addPrefix: ["flag-emoji"], rawClassNames: [r] }), width: e, height: e, ...u });
|
224
|
+
let n = () => {
|
225
|
+
if (i) return i;
|
226
|
+
let s = ke(t);
|
227
|
+
return `${l}://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${s}.svg`;
|
228
|
+
};
|
229
|
+
return x.createElement("img", { className: A({ addPrefix: ["flag-emoji"], rawClassNames: [r] }), src: n(), width: e, height: e, draggable: !1, "data-country": t, loading: a ? void 0 : "lazy", style: { width: e, height: e, ...f }, alt: "", ...u });
|
230
|
+
}, xe = 1e3, Ne = ({ show: t, dialCodePrefix: e = "+", selectedCountry: i, countries: l = K, preferredCountries: a = [], flags: r, onSelect: f, onClose: u, ...n }) => {
|
231
|
+
let s = j(null), o = j(), m = J(() => {
|
232
|
+
if (!a || !a.length) return l;
|
233
|
+
let c = [], h = [...l];
|
234
|
+
for (let y of a) {
|
235
|
+
let D = h.findIndex((S) => _(S).iso2 === y);
|
236
|
+
if (D !== -1) {
|
237
|
+
let S = h.splice(D, 1)[0];
|
238
|
+
c.push(S);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
return c.concat(h);
|
242
|
+
}, [l, a]), d = j({ updatedAt: void 0, value: "" }), p = (c) => {
|
243
|
+
let h = d.current.updatedAt && (/* @__PURE__ */ new Date()).getTime() - d.current.updatedAt.getTime() > xe;
|
244
|
+
d.current = { value: h ? c : `${d.current.value}${c}`, updatedAt: /* @__PURE__ */ new Date() };
|
245
|
+
let y = m.findIndex((D) => _(D).name.toLowerCase().startsWith(d.current.value));
|
246
|
+
y !== -1 && g(y);
|
247
|
+
}, w = q((c) => m.findIndex((h) => _(h).iso2 === c), [m]), [C, g] = R(w(i)), N = () => {
|
248
|
+
o.current !== i && g(w(i));
|
249
|
+
}, b = q((c) => {
|
250
|
+
g(w(c.iso2)), f == null || f(c);
|
251
|
+
}, [f, w]), $ = (c) => {
|
252
|
+
let h = m.length - 1, y = (D) => c === "prev" ? D - 1 : c === "next" ? D + 1 : c === "last" ? h : 0;
|
253
|
+
g((D) => {
|
254
|
+
let S = y(D);
|
255
|
+
return S < 0 ? 0 : S > h ? h : S;
|
256
|
+
});
|
257
|
+
}, z = (c) => {
|
258
|
+
if (c.stopPropagation(), c.key === "Enter") {
|
259
|
+
c.preventDefault();
|
260
|
+
let h = _(m[C]);
|
261
|
+
b(h);
|
262
|
+
return;
|
263
|
+
}
|
264
|
+
if (c.key === "Escape") {
|
265
|
+
u == null || u();
|
266
|
+
return;
|
267
|
+
}
|
268
|
+
if (c.key === "ArrowUp") {
|
269
|
+
c.preventDefault(), $("prev");
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
if (c.key === "ArrowDown") {
|
273
|
+
c.preventDefault(), $("next");
|
274
|
+
return;
|
275
|
+
}
|
276
|
+
if (c.key === "PageUp") {
|
277
|
+
c.preventDefault(), $("first");
|
278
|
+
return;
|
279
|
+
}
|
280
|
+
if (c.key === "PageDown") {
|
281
|
+
c.preventDefault(), $("last");
|
282
|
+
return;
|
283
|
+
}
|
284
|
+
c.key === " " && c.preventDefault(), c.key.length === 1 && !c.altKey && !c.ctrlKey && !c.metaKey && p(c.key.toLocaleLowerCase());
|
285
|
+
}, M = q(() => {
|
286
|
+
if (!s.current || C === void 0) return;
|
287
|
+
let c = _(m[C]).iso2;
|
288
|
+
if (c === o.current) return;
|
289
|
+
let h = s.current.querySelector(`[data-country="${c}"]`);
|
290
|
+
h && (oe(s.current, h), o.current = c);
|
291
|
+
}, [C, m]);
|
292
|
+
return O(() => {
|
293
|
+
M();
|
294
|
+
}, [C, M]), O(() => {
|
295
|
+
s.current && (t ? s.current.focus() : N());
|
296
|
+
}, [t]), O(() => {
|
297
|
+
N();
|
298
|
+
}, [i]), x.createElement("ul", { ref: s, role: "listbox", className: A({ addPrefix: ["country-selector-dropdown"], rawClassNames: [n.className] }), style: { display: t ? "block" : "none", ...n.style }, onKeyDown: z, onBlur: u, tabIndex: -1, "aria-activedescendant": `react-international-phone__${_(m[C]).iso2}-option` }, m.map((c, h) => {
|
299
|
+
let y = _(c), D = y.iso2 === i, S = h === C, I = a.includes(y.iso2), B = h === a.length - 1, F = r == null ? void 0 : r.find((v) => v.iso2 === y.iso2);
|
300
|
+
return x.createElement(x.Fragment, { key: y.iso2 }, x.createElement("li", { "data-country": y.iso2, role: "option", "aria-selected": D, "aria-label": `${y.name} ${e}${y.dialCode}`, id: `react-international-phone__${y.iso2}-option`, className: A({ addPrefix: ["country-selector-dropdown__list-item", I && "country-selector-dropdown__list-item--preferred", D && "country-selector-dropdown__list-item--selected", S && "country-selector-dropdown__list-item--focused"], rawClassNames: [n.listItemClassName] }), onClick: () => b(y), style: n.listItemStyle, title: y.name }, x.createElement(Y, { iso2: y.iso2, src: F == null ? void 0 : F.src, className: A({ addPrefix: ["country-selector-dropdown__list-item-flag-emoji"], rawClassNames: [n.listItemFlagClassName] }), style: n.listItemFlagStyle }), x.createElement("span", { className: A({ addPrefix: ["country-selector-dropdown__list-item-country-name"], rawClassNames: [n.listItemCountryNameClassName] }), style: n.listItemCountryNameStyle }, y.name), x.createElement("span", { className: A({ addPrefix: ["country-selector-dropdown__list-item-dial-code"], rawClassNames: [n.listItemDialCodeClassName] }), style: n.listItemDialCodeStyle }, e, y.dialCode)), B ? x.createElement("hr", { className: A({ addPrefix: ["country-selector-dropdown__preferred-list-divider"], rawClassNames: [n.preferredListDividerClassName] }), style: n.preferredListDividerStyle }) : null);
|
301
|
+
}));
|
302
|
+
}, Pe = ({ selectedCountry: t, onSelect: e, disabled: i, hideDropdown: l, countries: a = K, preferredCountries: r = [], flags: f, renderButtonWrapper: u, ...n }) => {
|
303
|
+
let [s, o] = R(!1), m = J(() => {
|
304
|
+
if (t) return T({ value: t, field: "iso2", countries: a });
|
305
|
+
}, [a, t]), d = j(null), p = (C) => {
|
306
|
+
C.key && ["ArrowUp", "ArrowDown"].includes(C.key) && (C.preventDefault(), o(!0));
|
307
|
+
}, w = () => {
|
308
|
+
var N;
|
309
|
+
let C = { title: m == null ? void 0 : m.name, onClick: () => o((b) => !b), onMouseDown: (b) => b.preventDefault(), onKeyDown: p, disabled: l || i, role: "combobox", "aria-label": "Country selector", "aria-haspopup": "listbox", "aria-expanded": s }, g = x.createElement("div", { className: A({ addPrefix: ["country-selector-button__button-content"], rawClassNames: [n.buttonContentWrapperClassName] }), style: n.buttonContentWrapperStyle }, x.createElement(Y, { iso2: t, src: (N = f == null ? void 0 : f.find((b) => b.iso2 === t)) == null ? void 0 : N.src, className: A({ addPrefix: ["country-selector-button__flag-emoji", i && "country-selector-button__flag-emoji--disabled"], rawClassNames: [n.flagClassName] }), style: { visibility: t ? "visible" : "hidden", ...n.flagStyle } }), !l && x.createElement("div", { className: A({ addPrefix: ["country-selector-button__dropdown-arrow", i && "country-selector-button__dropdown-arrow--disabled", s && "country-selector-button__dropdown-arrow--active"], rawClassNames: [n.dropdownArrowClassName] }), style: n.dropdownArrowStyle }));
|
310
|
+
return u ? u({ children: g, rootProps: C }) : x.createElement("button", { ...C, type: "button", className: A({ addPrefix: ["country-selector-button", s && "country-selector-button--active", i && "country-selector-button--disabled", l && "country-selector-button--hide-dropdown"], rawClassNames: [n.buttonClassName] }), "data-country": t, style: n.buttonStyle }, g);
|
311
|
+
};
|
312
|
+
return x.createElement("div", { className: A({ addPrefix: ["country-selector"], rawClassNames: [n.className] }), style: n.style, ref: d }, w(), x.createElement(Ne, { show: s, countries: a, preferredCountries: r, flags: f, onSelect: (C) => {
|
313
|
+
o(!1), e == null || e(C);
|
314
|
+
}, selectedCountry: t, onClose: () => {
|
315
|
+
o(!1);
|
316
|
+
}, ...n.dropdownStyleProps }));
|
317
|
+
}, Se = ({ dialCode: t, prefix: e, disabled: i, style: l, className: a }) => x.createElement("div", { className: A({ addPrefix: ["dial-code-preview", i && "dial-code-preview--disabled"], rawClassNames: [a] }), style: l }, `${e}${t}`);
|
318
|
+
te(({ value: t, onChange: e, countries: i = K, preferredCountries: l = [], hideDropdown: a, showDisabledDialCodeAndPrefix: r, disableFocusAfterCountrySelect: f, flags: u, style: n, className: s, inputStyle: o, inputClassName: m, countrySelectorStyleProps: d, dialCodePreviewStyleProps: p, inputProps: w, placeholder: C, disabled: g, name: N, onFocus: b, onBlur: $, required: z, autoFocus: M, ...c }, h) => {
|
319
|
+
let { phone: y, inputValue: D, inputRef: S, country: I, setCountry: B, handlePhoneValueChange: F } = Ce({ value: t, countries: i, ...c, onChange: (k) => {
|
320
|
+
e == null || e(k.phone, { country: k.country, inputValue: k.inputValue });
|
321
|
+
} }), v = c.disableDialCodeAndPrefix && r && (I == null ? void 0 : I.dialCode);
|
322
|
+
return ae(h, () => S.current ? Object.assign(S.current, { setCountry: B, state: { phone: y, inputValue: D, country: I } }) : null, [S, B, y, D, I]), x.createElement("div", { ref: h, className: A({ addPrefix: ["input-container"], rawClassNames: [s] }), style: n }, x.createElement(Pe, { onSelect: (k) => B(k.iso2, { focusOnInput: !f }), flags: u, selectedCountry: I.iso2, countries: i, preferredCountries: l, disabled: g, hideDropdown: a, ...d }), v && x.createElement(Se, { dialCode: I.dialCode, prefix: c.prefix ?? "+", disabled: g, ...p }), x.createElement("input", { onChange: F, value: D, type: "tel", ref: S, className: A({ addPrefix: ["input", g && "input--disabled"], rawClassNames: [m] }), placeholder: C, disabled: g, style: o, name: N, onFocus: b, onBlur: $, autoFocus: M, required: z, ...w }));
|
323
|
+
});
|
324
|
+
export {
|
325
|
+
Pe as CountrySelector,
|
326
|
+
Ne as CountrySelectorDropdown,
|
327
|
+
Se as DialCodePreview,
|
328
|
+
Y as FlagImage,
|
329
|
+
K as defaultCountries,
|
330
|
+
he as getActiveFormattingMask,
|
331
|
+
T as getCountry,
|
332
|
+
be as guessCountryByPartialPhoneNumber,
|
333
|
+
_ as parseCountry,
|
334
|
+
Ce as usePhoneInput
|
335
|
+
};
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import * as d from "react";
|
2
|
+
import { styleSingleton as f } from "../../../../../react-style-singleton@2.2.3_@types_react@18.3.18_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js";
|
3
|
+
import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./constants.js";
|
4
|
+
import { getGapWidth as m } from "./utils.js";
|
5
|
+
var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
|
6
|
+
var r = n.left, i = n.top, s = n.right, c = n.gap;
|
7
|
+
return o === void 0 && (o = "margin"), `
|
8
|
+
.`.concat(p, ` {
|
9
|
+
overflow: hidden `).concat(t, `;
|
10
|
+
padding-right: `).concat(c, "px ").concat(t, `;
|
11
|
+
}
|
12
|
+
body[`).concat(e, `] {
|
13
|
+
overflow: hidden `).concat(t, `;
|
14
|
+
overscroll-behavior: contain;
|
15
|
+
`).concat([
|
16
|
+
a && "position: relative ".concat(t, ";"),
|
17
|
+
o === "margin" && `
|
18
|
+
padding-left: `.concat(r, `px;
|
19
|
+
padding-top: `).concat(i, `px;
|
20
|
+
padding-right: `).concat(s, `px;
|
21
|
+
margin-left:0;
|
22
|
+
margin-top:0;
|
23
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
24
|
+
`),
|
25
|
+
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
26
|
+
].filter(Boolean).join(""), `
|
27
|
+
}
|
28
|
+
|
29
|
+
.`).concat(g, ` {
|
30
|
+
right: `).concat(c, "px ").concat(t, `;
|
31
|
+
}
|
32
|
+
|
33
|
+
.`).concat(l, ` {
|
34
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
35
|
+
}
|
36
|
+
|
37
|
+
.`).concat(g, " .").concat(g, ` {
|
38
|
+
right: 0 `).concat(t, `;
|
39
|
+
}
|
40
|
+
|
41
|
+
.`).concat(l, " .").concat(l, ` {
|
42
|
+
margin-right: 0 `).concat(t, `;
|
43
|
+
}
|
44
|
+
|
45
|
+
body[`).concat(e, `] {
|
46
|
+
`).concat(v, ": ").concat(c, `px;
|
47
|
+
}
|
48
|
+
`);
|
49
|
+
}, u = function() {
|
50
|
+
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
51
|
+
return isFinite(n) ? n : 0;
|
52
|
+
}, x = function() {
|
53
|
+
d.useEffect(function() {
|
54
|
+
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
55
|
+
var n = u() - 1;
|
56
|
+
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
57
|
+
};
|
58
|
+
}, []);
|
59
|
+
}, C = function(n) {
|
60
|
+
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
61
|
+
x();
|
62
|
+
var i = d.useMemo(function() {
|
63
|
+
return m(r);
|
64
|
+
}, [r]);
|
65
|
+
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
66
|
+
};
|
67
|
+
export {
|
68
|
+
C as RemoveScrollBar,
|
69
|
+
e as lockAttribute,
|
70
|
+
x as useLockAttribute
|
71
|
+
};
|