@tabler/core 1.5.1 → 1.6.0
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 +10 -1
- package/dist/css/tabler-flags.css +9 -1
- package/dist/css/tabler-flags.css.map +1 -1
- package/dist/css/tabler-flags.min.css +2 -2
- package/dist/css/tabler-flags.min.css.map +1 -1
- package/dist/css/tabler-flags.rtl.css +9 -1
- package/dist/css/tabler-flags.rtl.css.map +1 -1
- package/dist/css/tabler-flags.rtl.min.css +2 -2
- package/dist/css/tabler-flags.rtl.min.css.map +1 -1
- package/dist/css/tabler-marketing.css +78 -38
- package/dist/css/tabler-marketing.css.map +1 -1
- package/dist/css/tabler-marketing.min.css +2 -2
- package/dist/css/tabler-marketing.min.css.map +1 -1
- package/dist/css/tabler-marketing.rtl.css +78 -38
- package/dist/css/tabler-marketing.rtl.css.map +1 -1
- package/dist/css/tabler-marketing.rtl.min.css +2 -2
- package/dist/css/tabler-marketing.rtl.min.css.map +1 -1
- package/dist/css/tabler-payments.css +5 -1
- package/dist/css/tabler-payments.css.map +1 -1
- package/dist/css/tabler-payments.min.css +1 -1
- package/dist/css/tabler-payments.min.css.map +1 -1
- package/dist/css/tabler-payments.rtl.css +5 -1
- package/dist/css/tabler-payments.rtl.css.map +1 -1
- package/dist/css/tabler-payments.rtl.min.css +1 -1
- package/dist/css/tabler-payments.rtl.min.css.map +1 -1
- package/dist/css/tabler-props.css +207 -241
- package/dist/css/tabler-props.css.map +1 -1
- package/dist/css/tabler-props.min.css +2 -2
- package/dist/css/tabler-props.min.css.map +1 -1
- package/dist/css/tabler-props.rtl.css +207 -241
- package/dist/css/tabler-props.rtl.css.map +1 -1
- package/dist/css/tabler-props.rtl.min.css +2 -2
- package/dist/css/tabler-props.rtl.min.css.map +1 -1
- package/dist/css/tabler-socials.css +5 -1
- package/dist/css/tabler-socials.css.map +1 -1
- package/dist/css/tabler-socials.min.css +1 -1
- package/dist/css/tabler-socials.min.css.map +1 -1
- package/dist/css/tabler-socials.rtl.css +5 -1
- package/dist/css/tabler-socials.rtl.css.map +1 -1
- package/dist/css/tabler-socials.rtl.min.css +1 -1
- package/dist/css/tabler-socials.rtl.min.css.map +1 -1
- package/dist/css/tabler-themes.css +144 -94
- package/dist/css/tabler-themes.css.map +1 -1
- package/dist/css/tabler-themes.min.css +2 -2
- package/dist/css/tabler-themes.min.css.map +1 -1
- package/dist/css/tabler-themes.rtl.css +144 -94
- package/dist/css/tabler-themes.rtl.css.map +1 -1
- package/dist/css/tabler-themes.rtl.min.css +2 -2
- package/dist/css/tabler-themes.rtl.min.css.map +1 -1
- package/dist/css/tabler-vendors.css +203 -83
- package/dist/css/tabler-vendors.css.map +1 -1
- package/dist/css/tabler-vendors.min.css +2 -2
- package/dist/css/tabler-vendors.min.css.map +1 -1
- package/dist/css/tabler-vendors.rtl.css +203 -83
- package/dist/css/tabler-vendors.rtl.css.map +1 -1
- package/dist/css/tabler-vendors.rtl.min.css +2 -2
- package/dist/css/tabler-vendors.rtl.min.css.map +1 -1
- package/dist/css/tabler.css +4366 -5119
- package/dist/css/tabler.css.map +1 -1
- package/dist/css/tabler.min.css +2 -2
- package/dist/css/tabler.min.css.map +1 -1
- package/dist/css/tabler.rtl.css +4922 -5678
- package/dist/css/tabler.rtl.css.map +1 -1
- package/dist/css/tabler.rtl.min.css +2 -2
- package/dist/css/tabler.rtl.min.css.map +1 -1
- package/dist/img/flags/ad.svg +1 -1
- package/dist/img/flags/ae.svg +1 -1
- package/dist/img/flags/af.svg +1 -1
- package/dist/img/flags/afrun.svg +1 -1
- package/dist/img/flags/ag.svg +1 -1
- package/dist/img/flags/ai.svg +1 -1
- package/dist/img/flags/al.svg +1 -1
- package/dist/img/flags/am.svg +1 -1
- package/dist/img/flags/ao.svg +1 -1
- package/dist/img/flags/aq.svg +1 -1
- package/dist/img/flags/ar.svg +1 -1
- package/dist/img/flags/as.svg +1 -1
- package/dist/img/flags/at.svg +1 -1
- package/dist/img/flags/au.svg +1 -1
- package/dist/img/flags/aw.svg +1 -1
- package/dist/img/flags/ax.svg +1 -1
- package/dist/img/flags/az.svg +1 -1
- package/dist/img/flags/ba.svg +1 -1
- package/dist/img/flags/bb.svg +1 -1
- package/dist/img/flags/bd.svg +1 -1
- package/dist/img/flags/be.svg +1 -1
- package/dist/img/flags/bf.svg +1 -1
- package/dist/img/flags/bg.svg +1 -1
- package/dist/img/flags/bh.svg +1 -1
- package/dist/img/flags/bi.svg +1 -1
- package/dist/img/flags/bj.svg +1 -1
- package/dist/img/flags/bl.svg +1 -1
- package/dist/img/flags/bm.svg +1 -1
- package/dist/img/flags/bn.svg +1 -1
- package/dist/img/flags/bo.svg +1 -1
- package/dist/img/flags/bq-bo.svg +1 -1
- package/dist/img/flags/bq-sa.svg +1 -1
- package/dist/img/flags/bq-se.svg +1 -1
- package/dist/img/flags/br.svg +1 -1
- package/dist/img/flags/bs.svg +1 -1
- package/dist/img/flags/bt.svg +1 -1
- package/dist/img/flags/bv.svg +1 -1
- package/dist/img/flags/bw.svg +1 -1
- package/dist/img/flags/by.svg +1 -1
- package/dist/img/flags/bz.svg +1 -1
- package/dist/img/flags/ca.svg +1 -1
- package/dist/img/flags/cc.svg +1 -1
- package/dist/img/flags/cd.svg +1 -1
- package/dist/img/flags/cf.svg +1 -1
- package/dist/img/flags/cg.svg +1 -1
- package/dist/img/flags/ch.svg +1 -1
- package/dist/img/flags/ci.svg +1 -1
- package/dist/img/flags/ck.svg +1 -1
- package/dist/img/flags/cl.svg +1 -1
- package/dist/img/flags/cm.svg +1 -1
- package/dist/img/flags/cn.svg +1 -1
- package/dist/img/flags/co.svg +1 -1
- package/dist/img/flags/cr.svg +1 -1
- package/dist/img/flags/cu.svg +1 -1
- package/dist/img/flags/cv.svg +1 -1
- package/dist/img/flags/cw.svg +1 -1
- package/dist/img/flags/cx.svg +1 -1
- package/dist/img/flags/cy.svg +1 -1
- package/dist/img/flags/cz.svg +1 -1
- package/dist/img/flags/de.svg +1 -1
- package/dist/img/flags/dj.svg +1 -1
- package/dist/img/flags/dk.svg +1 -1
- package/dist/img/flags/dm.svg +1 -1
- package/dist/img/flags/do.svg +1 -1
- package/dist/img/flags/dz.svg +1 -1
- package/dist/img/flags/ec.svg +1 -1
- package/dist/img/flags/ee.svg +1 -1
- package/dist/img/flags/eg.svg +1 -1
- package/dist/img/flags/eh.svg +1 -1
- package/dist/img/flags/er.svg +1 -1
- package/dist/img/flags/es.svg +1 -1
- package/dist/img/flags/et.svg +1 -1
- package/dist/img/flags/eu.svg +1 -1
- package/dist/img/flags/fi.svg +1 -1
- package/dist/img/flags/fj.svg +1 -1
- package/dist/img/flags/fk.svg +1 -1
- package/dist/img/flags/fm.svg +1 -1
- package/dist/img/flags/fo.svg +1 -1
- package/dist/img/flags/fr.svg +1 -1
- package/dist/img/flags/ga.svg +1 -1
- package/dist/img/flags/gb-eng.svg +1 -1
- package/dist/img/flags/gb-nir.svg +1 -1
- package/dist/img/flags/gb-sct.svg +1 -1
- package/dist/img/flags/gb-wls.svg +1 -1
- package/dist/img/flags/gb.svg +1 -1
- package/dist/img/flags/gd.svg +1 -1
- package/dist/img/flags/ge.svg +1 -1
- package/dist/img/flags/gf.svg +1 -1
- package/dist/img/flags/gg.svg +1 -1
- package/dist/img/flags/gh.svg +1 -1
- package/dist/img/flags/gi.svg +1 -1
- package/dist/img/flags/gl.svg +1 -1
- package/dist/img/flags/gm.svg +1 -1
- package/dist/img/flags/gn.svg +1 -1
- package/dist/img/flags/gp.svg +1 -1
- package/dist/img/flags/gq.svg +1 -1
- package/dist/img/flags/gr.svg +1 -1
- package/dist/img/flags/gs.svg +1 -1
- package/dist/img/flags/gt.svg +1 -1
- package/dist/img/flags/gu.svg +1 -1
- package/dist/img/flags/gw.svg +1 -1
- package/dist/img/flags/gy.svg +1 -1
- package/dist/img/flags/hk.svg +1 -1
- package/dist/img/flags/hm.svg +1 -1
- package/dist/img/flags/hn.svg +1 -1
- package/dist/img/flags/hr.svg +1 -1
- package/dist/img/flags/ht.svg +1 -1
- package/dist/img/flags/hu.svg +1 -1
- package/dist/img/flags/id.svg +1 -1
- package/dist/img/flags/ie.svg +1 -1
- package/dist/img/flags/il.svg +1 -1
- package/dist/img/flags/im.svg +1 -1
- package/dist/img/flags/in.svg +1 -1
- package/dist/img/flags/io.svg +1 -1
- package/dist/img/flags/iq.svg +1 -1
- package/dist/img/flags/ir.svg +1 -1
- package/dist/img/flags/is.svg +1 -1
- package/dist/img/flags/it.svg +1 -1
- package/dist/img/flags/je.svg +1 -1
- package/dist/img/flags/jm.svg +1 -1
- package/dist/img/flags/jo.svg +1 -1
- package/dist/img/flags/jp.svg +1 -1
- package/dist/img/flags/ke.svg +1 -1
- package/dist/img/flags/kg.svg +1 -1
- package/dist/img/flags/kh.svg +1 -1
- package/dist/img/flags/ki.svg +1 -1
- package/dist/img/flags/km.svg +1 -1
- package/dist/img/flags/kn-sk.svg +1 -1
- package/dist/img/flags/kn.svg +1 -1
- package/dist/img/flags/kp.svg +1 -1
- package/dist/img/flags/kr.svg +1 -1
- package/dist/img/flags/kw.svg +1 -1
- package/dist/img/flags/ky.svg +1 -1
- package/dist/img/flags/kz.svg +1 -1
- package/dist/img/flags/la.svg +1 -1
- package/dist/img/flags/lb.svg +1 -1
- package/dist/img/flags/lc.svg +1 -1
- package/dist/img/flags/li.svg +1 -1
- package/dist/img/flags/lk.svg +1 -1
- package/dist/img/flags/lr.svg +1 -1
- package/dist/img/flags/ls.svg +1 -1
- package/dist/img/flags/lt.svg +1 -1
- package/dist/img/flags/lu.svg +1 -1
- package/dist/img/flags/lv.svg +1 -1
- package/dist/img/flags/ly.svg +1 -1
- package/dist/img/flags/ma.svg +1 -1
- package/dist/img/flags/mc.svg +1 -1
- package/dist/img/flags/md.svg +1 -1
- package/dist/img/flags/me.svg +1 -1
- package/dist/img/flags/mf.svg +1 -1
- package/dist/img/flags/mg.svg +1 -1
- package/dist/img/flags/mh.svg +1 -1
- package/dist/img/flags/mk.svg +1 -1
- package/dist/img/flags/ml.svg +1 -1
- package/dist/img/flags/mm.svg +1 -1
- package/dist/img/flags/mn.svg +1 -1
- package/dist/img/flags/mo.svg +1 -1
- package/dist/img/flags/mp.svg +1 -1
- package/dist/img/flags/mq.svg +1 -1
- package/dist/img/flags/mr.svg +1 -1
- package/dist/img/flags/ms.svg +1 -1
- package/dist/img/flags/mt.svg +1 -1
- package/dist/img/flags/mu.svg +1 -1
- package/dist/img/flags/mv.svg +1 -1
- package/dist/img/flags/mw.svg +1 -1
- package/dist/img/flags/mx.svg +1 -1
- package/dist/img/flags/my.svg +1 -1
- package/dist/img/flags/mz.svg +1 -1
- package/dist/img/flags/na.svg +1 -1
- package/dist/img/flags/nc.svg +1 -1
- package/dist/img/flags/ne.svg +1 -1
- package/dist/img/flags/nf.svg +1 -1
- package/dist/img/flags/ng.svg +1 -1
- package/dist/img/flags/ni.svg +1 -1
- package/dist/img/flags/nl.svg +1 -1
- package/dist/img/flags/no.svg +1 -1
- package/dist/img/flags/np.svg +1 -1
- package/dist/img/flags/nr.svg +1 -1
- package/dist/img/flags/nu.svg +1 -1
- package/dist/img/flags/nz.svg +1 -1
- package/dist/img/flags/om.svg +1 -1
- package/dist/img/flags/pa.svg +1 -1
- package/dist/img/flags/pe.svg +1 -1
- package/dist/img/flags/pf.svg +1 -1
- package/dist/img/flags/pg.svg +1 -1
- package/dist/img/flags/ph.svg +1 -1
- package/dist/img/flags/pk.svg +1 -1
- package/dist/img/flags/pl.svg +1 -1
- package/dist/img/flags/pm.svg +1 -1
- package/dist/img/flags/pn.svg +1 -1
- package/dist/img/flags/pr.svg +1 -1
- package/dist/img/flags/ps.svg +1 -1
- package/dist/img/flags/pt.svg +1 -1
- package/dist/img/flags/pw.svg +1 -1
- package/dist/img/flags/py.svg +1 -1
- package/dist/img/flags/qa.svg +1 -1
- package/dist/img/flags/rainbow.svg +1 -1
- package/dist/img/flags/re.svg +1 -1
- package/dist/img/flags/ro.svg +1 -1
- package/dist/img/flags/rs.svg +1 -1
- package/dist/img/flags/ru.svg +1 -1
- package/dist/img/flags/rw.svg +1 -1
- package/dist/img/flags/sa.svg +1 -1
- package/dist/img/flags/sb.svg +1 -1
- package/dist/img/flags/sc.svg +1 -1
- package/dist/img/flags/sd.svg +1 -1
- package/dist/img/flags/se.svg +1 -1
- package/dist/img/flags/sg.svg +1 -1
- package/dist/img/flags/sh.svg +1 -1
- package/dist/img/flags/si.svg +1 -1
- package/dist/img/flags/sj.svg +1 -1
- package/dist/img/flags/sk.svg +1 -1
- package/dist/img/flags/sl.svg +1 -1
- package/dist/img/flags/sm.svg +1 -1
- package/dist/img/flags/sn.svg +1 -1
- package/dist/img/flags/so.svg +1 -1
- package/dist/img/flags/sr.svg +1 -1
- package/dist/img/flags/ss.svg +1 -1
- package/dist/img/flags/st.svg +1 -1
- package/dist/img/flags/sv.svg +1 -1
- package/dist/img/flags/sx.svg +1 -1
- package/dist/img/flags/sy.svg +1 -1
- package/dist/img/flags/sz.svg +1 -1
- package/dist/img/flags/tc.svg +1 -1
- package/dist/img/flags/td.svg +1 -1
- package/dist/img/flags/tf.svg +1 -1
- package/dist/img/flags/tg.svg +1 -1
- package/dist/img/flags/th.svg +1 -1
- package/dist/img/flags/tj.svg +1 -1
- package/dist/img/flags/tk.svg +1 -1
- package/dist/img/flags/tl.svg +1 -1
- package/dist/img/flags/tm.svg +1 -1
- package/dist/img/flags/tn.svg +1 -1
- package/dist/img/flags/to.svg +1 -1
- package/dist/img/flags/tr.svg +1 -1
- package/dist/img/flags/tt.svg +1 -1
- package/dist/img/flags/tv.svg +1 -1
- package/dist/img/flags/tw.svg +1 -1
- package/dist/img/flags/tz.svg +1 -1
- package/dist/img/flags/ua.svg +1 -1
- package/dist/img/flags/ug.svg +1 -1
- package/dist/img/flags/um.svg +1 -1
- package/dist/img/flags/unasur.svg +1 -1
- package/dist/img/flags/us.svg +1 -1
- package/dist/img/flags/uy.svg +1 -1
- package/dist/img/flags/uz.svg +1 -1
- package/dist/img/flags/va.svg +1 -1
- package/dist/img/flags/vc.svg +1 -1
- package/dist/img/flags/ve.svg +1 -1
- package/dist/img/flags/vg.svg +1 -1
- package/dist/img/flags/vi.svg +1 -1
- package/dist/img/flags/vn.svg +1 -1
- package/dist/img/flags/vu.svg +1 -1
- package/dist/img/flags/wf.svg +1 -1
- package/dist/img/flags/ws.svg +1 -1
- package/dist/img/flags/ye.svg +1 -1
- package/dist/img/flags/yt.svg +1 -1
- package/dist/img/flags/za.svg +1 -1
- package/dist/img/flags/zm.svg +1 -1
- package/dist/img/flags/zw.svg +1 -1
- package/dist/img/payments/2c2p-dark.svg +1 -5
- package/dist/img/payments/2c2p.svg +1 -5
- package/dist/img/payments/2checkout-dark.svg +1 -4
- package/dist/img/payments/2checkout.svg +1 -4
- package/dist/img/payments/ach-transfer-dark.svg +1 -14
- package/dist/img/payments/ach-transfer.svg +1 -14
- package/dist/img/payments/adyen-dark.svg +1 -8
- package/dist/img/payments/adyen.svg +1 -8
- package/dist/img/payments/affirm-dark.svg +1 -9
- package/dist/img/payments/affirm.svg +1 -9
- package/dist/img/payments/afterpay-dark.svg +1 -13
- package/dist/img/payments/afterpay.svg +1 -13
- package/dist/img/payments/airtm-dark.svg +1 -4
- package/dist/img/payments/airtm.svg +1 -4
- package/dist/img/payments/airwallex-dark.svg +1 -11
- package/dist/img/payments/airwallex.svg +1 -11
- package/dist/img/payments/alipay-dark.svg +1 -12
- package/dist/img/payments/alipay-plus-dark.svg +1 -9
- package/dist/img/payments/alipay-plus.svg +1 -9
- package/dist/img/payments/alipay.svg +1 -12
- package/dist/img/payments/allegro-pay-dark.svg +1 -5
- package/dist/img/payments/allegro-pay.svg +1 -5
- package/dist/img/payments/amazon-dark.svg +1 -6
- package/dist/img/payments/amazon-pay-dark.svg +1 -7
- package/dist/img/payments/amazon-pay.svg +1 -7
- package/dist/img/payments/amazon.svg +1 -6
- package/dist/img/payments/americanexpress-dark.svg +1 -4
- package/dist/img/payments/americanexpress.svg +1 -4
- package/dist/img/payments/ant-group-dark.svg +1 -6
- package/dist/img/payments/ant-group.svg +1 -23
- package/dist/img/payments/applepay-dark.svg +1 -8
- package/dist/img/payments/applepay.svg +1 -8
- package/dist/img/payments/authorize-dark.svg +1 -17
- package/dist/img/payments/authorize.svg +1 -17
- package/dist/img/payments/autopay-dark.svg +1 -11
- package/dist/img/payments/autopay.svg +1 -11
- package/dist/img/payments/bancontact-dark.svg +1 -9
- package/dist/img/payments/bancontact.svg +1 -9
- package/dist/img/payments/bank-of-america-dark.svg +1 -10
- package/dist/img/payments/bank-of-america.svg +1 -10
- package/dist/img/payments/barclays-dark.svg +1 -11
- package/dist/img/payments/barclays.svg +1 -11
- package/dist/img/payments/bbva-dark.svg +1 -4
- package/dist/img/payments/bbva.svg +1 -4
- package/dist/img/payments/binance-dark.svg +1 -4
- package/dist/img/payments/binance-usd-dark.svg +1 -11
- package/dist/img/payments/binance-usd.svg +1 -11
- package/dist/img/payments/binance.svg +1 -4
- package/dist/img/payments/bitcoin-dark.svg +1 -13
- package/dist/img/payments/bitcoin.svg +1 -12
- package/dist/img/payments/bitpay-dark.svg +1 -4
- package/dist/img/payments/bitpay.svg +1 -4
- package/dist/img/payments/bkash-dark.svg +1 -16
- package/dist/img/payments/bkash.svg +1 -16
- package/dist/img/payments/blik-dark.svg +1 -5
- package/dist/img/payments/blik.svg +1 -12
- package/dist/img/payments/bnb-chain-dark.svg +1 -14
- package/dist/img/payments/bnb-chain.svg +1 -14
- package/dist/img/payments/bnp-paribas-dark.svg +1 -80
- package/dist/img/payments/bnp-paribas.svg +1 -80
- package/dist/img/payments/braintree-dark.svg +1 -6
- package/dist/img/payments/braintree.svg +1 -6
- package/dist/img/payments/brex-dark.svg +1 -4
- package/dist/img/payments/brex.svg +1 -4
- package/dist/img/payments/capital-one-dark.svg +1 -6
- package/dist/img/payments/capital-one.svg +1 -6
- package/dist/img/payments/cash-app-dark.svg +1 -8
- package/dist/img/payments/cash-app.svg +1 -8
- package/dist/img/payments/chase-dark.svg +1 -12
- package/dist/img/payments/chase.svg +1 -12
- package/dist/img/payments/checkout-com-dark.svg +1 -4
- package/dist/img/payments/checkout-com.svg +1 -4
- package/dist/img/payments/chime-dark.svg +1 -9
- package/dist/img/payments/chime.svg +1 -9
- package/dist/img/payments/china-construction-bank-dark.svg +1 -36
- package/dist/img/payments/china-construction-bank.svg +1 -36
- package/dist/img/payments/cirrus-dark.svg +1 -8
- package/dist/img/payments/cirrus.svg +1 -8
- package/dist/img/payments/citi-dark.svg +1 -8
- package/dist/img/payments/citi.svg +1 -8
- package/dist/img/payments/coinbase-dark.svg +1 -4
- package/dist/img/payments/coinbase.svg +1 -5
- package/dist/img/payments/coinkite-dark.svg +1 -6
- package/dist/img/payments/coinkite.svg +1 -6
- package/dist/img/payments/crypto-com-dark.svg +1 -8
- package/dist/img/payments/crypto-com.svg +1 -8
- package/dist/img/payments/deutsche-bank-dark.svg +1 -16
- package/dist/img/payments/deutsche-bank.svg +1 -16
- package/dist/img/payments/dinersclub-dark.svg +1 -7
- package/dist/img/payments/dinersclub.svg +1 -7
- package/dist/img/payments/directdebit-dark.svg +1 -4
- package/dist/img/payments/directdebit.svg +1 -4
- package/dist/img/payments/discover-dark.svg +1 -8
- package/dist/img/payments/discover.svg +1 -6
- package/dist/img/payments/dwolla-dark.svg +1 -5
- package/dist/img/payments/dwolla.svg +1 -5
- package/dist/img/payments/easypaisa-dark.svg +1 -14
- package/dist/img/payments/easypaisa.svg +1 -14
- package/dist/img/payments/ebay-dark.svg +1 -7
- package/dist/img/payments/ebay.svg +1 -7
- package/dist/img/payments/elo-dark.svg +1 -11
- package/dist/img/payments/elo.svg +1 -11
- package/dist/img/payments/epayco-dark.svg +1 -5
- package/dist/img/payments/epayco.svg +1 -5
- package/dist/img/payments/esewa-dark.svg +1 -11
- package/dist/img/payments/esewa.svg +1 -12
- package/dist/img/payments/ethereum-dark.svg +1 -13
- package/dist/img/payments/ethereum.svg +1 -18
- package/dist/img/payments/eway-dark.svg +1 -6
- package/dist/img/payments/eway.svg +1 -6
- package/dist/img/payments/fifth-third-bank-dark.svg +1 -7
- package/dist/img/payments/fifth-third-bank.svg +1 -7
- package/dist/img/payments/fiserv-dark.svg +1 -11
- package/dist/img/payments/fiserv.svg +1 -11
- package/dist/img/payments/flutterwave-dark.svg +1 -18
- package/dist/img/payments/flutterwave.svg +1 -18
- package/dist/img/payments/fonepay-dark.svg +1 -10
- package/dist/img/payments/fonepay.svg +1 -10
- package/dist/img/payments/gcash-dark.svg +1 -7
- package/dist/img/payments/gcash.svg +1 -7
- package/dist/img/payments/giropay-dark.svg +1 -13
- package/dist/img/payments/giropay.svg +1 -25
- package/dist/img/payments/goldman-sachs-dark.svg +1 -4
- package/dist/img/payments/goldman-sachs.svg +1 -4
- package/dist/img/payments/google-pay-dark.svg +1 -10
- package/dist/img/payments/google-pay.svg +1 -10
- package/dist/img/payments/googlewallet-dark.svg +1 -7
- package/dist/img/payments/googlewallet.svg +1 -7
- package/dist/img/payments/grabpay-dark.svg +1 -4
- package/dist/img/payments/grabpay.svg +1 -4
- package/dist/img/payments/hsbc-dark.svg +1 -12
- package/dist/img/payments/hsbc.svg +1 -12
- package/dist/img/payments/hubspot-dark.svg +1 -5
- package/dist/img/payments/hubspot.svg +1 -5
- package/dist/img/payments/huntington-bank-dark.svg +1 -5
- package/dist/img/payments/huntington-bank.svg +1 -5
- package/dist/img/payments/icbc-dark.svg +1 -8
- package/dist/img/payments/icbc.svg +1 -8
- package/dist/img/payments/ideal-dark.svg +1 -8
- package/dist/img/payments/ideal.svg +1 -7
- package/dist/img/payments/imepay-dark.svg +1 -11
- package/dist/img/payments/imepay.svg +1 -11
- package/dist/img/payments/imoje-dark.svg +1 -7
- package/dist/img/payments/imoje.svg +1 -8
- package/dist/img/payments/ing-dark.svg +1 -145
- package/dist/img/payments/ing.svg +1 -145
- package/dist/img/payments/ingenico-dark.svg +1 -4
- package/dist/img/payments/ingenico.svg +1 -4
- package/dist/img/payments/interac-dark.svg +1 -16
- package/dist/img/payments/interac.svg +1 -16
- package/dist/img/payments/jazzcash-dark.svg +1 -13
- package/dist/img/payments/jazzcash.svg +1 -13
- package/dist/img/payments/jcb-dark.svg +1 -8
- package/dist/img/payments/jcb.svg +1 -41
- package/dist/img/payments/khalti-dark.svg +1 -14
- package/dist/img/payments/khalti.svg +1 -14
- package/dist/img/payments/klarna-dark.svg +1 -11
- package/dist/img/payments/klarna.svg +1 -11
- package/dist/img/payments/kraken-dark.svg +1 -5
- package/dist/img/payments/kraken.svg +1 -5
- package/dist/img/payments/linepay-dark.svg +1 -10
- package/dist/img/payments/linepay.svg +1 -11
- package/dist/img/payments/litecoin-dark.svg +1 -14
- package/dist/img/payments/litecoin.svg +1 -14
- package/dist/img/payments/mada-dark.svg +1 -11
- package/dist/img/payments/mada.svg +1 -11
- package/dist/img/payments/maestro-dark.svg +1 -6
- package/dist/img/payments/maestro.svg +1 -6
- package/dist/img/payments/mastercard-dark.svg +1 -6
- package/dist/img/payments/mastercard.svg +1 -6
- package/dist/img/payments/mercado-pago-dark.svg +1 -9
- package/dist/img/payments/mercado-pago.svg +1 -9
- package/dist/img/payments/mercury-dark.svg +1 -4
- package/dist/img/payments/mercury.svg +1 -4
- package/dist/img/payments/meta-pay-dark.svg +1 -6
- package/dist/img/payments/meta-pay.svg +1 -16
- package/dist/img/payments/metamask-dark.svg +1 -40
- package/dist/img/payments/metamask.svg +1 -40
- package/dist/img/payments/mir-dark.svg +1 -4
- package/dist/img/payments/mir.svg +1 -11
- package/dist/img/payments/mitsubishi-ufj-dark.svg +1 -5
- package/dist/img/payments/mitsubishi-ufj.svg +1 -5
- package/dist/img/payments/mobilepay-dark.svg +1 -6
- package/dist/img/payments/mobilepay.svg +1 -6
- package/dist/img/payments/mollie-dark.svg +1 -4
- package/dist/img/payments/mollie.svg +1 -4
- package/dist/img/payments/monero-dark.svg +1 -5
- package/dist/img/payments/monero.svg +1 -5
- package/dist/img/payments/moneygram-dark.svg +1 -12
- package/dist/img/payments/moneygram.svg +1 -12
- package/dist/img/payments/mpesa-dark.svg +1 -5
- package/dist/img/payments/mpesa.svg +1 -5
- package/dist/img/payments/ncr-dark.svg +1 -9
- package/dist/img/payments/ncr.svg +1 -9
- package/dist/img/payments/neteller-dark.svg +1 -4
- package/dist/img/payments/neteller.svg +1 -4
- package/dist/img/payments/northone-dark.svg +1 -5
- package/dist/img/payments/northone.svg +1 -5
- package/dist/img/payments/nu-dark.svg +1 -5
- package/dist/img/payments/nu.svg +1 -5
- package/dist/img/payments/nuvei-dark.svg +1 -9
- package/dist/img/payments/nuvei.svg +1 -9
- package/dist/img/payments/opensea-dark.svg +1 -11
- package/dist/img/payments/opensea.svg +1 -11
- package/dist/img/payments/oxxo-dark.svg +1 -8
- package/dist/img/payments/oxxo.svg +1 -8
- package/dist/img/payments/paybox-dark.svg +1 -4
- package/dist/img/payments/paybox.svg +1 -4
- package/dist/img/payments/payconiq-dark.svg +1 -4
- package/dist/img/payments/payconiq.svg +1 -4
- package/dist/img/payments/payka-dark.svg +1 -18
- package/dist/img/payments/payka.svg +1 -12
- package/dist/img/payments/payline-dark.svg +1 -12
- package/dist/img/payments/payline.svg +1 -12
- package/dist/img/payments/paynow-dark.svg +1 -15
- package/dist/img/payments/paynow.svg +1 -15
- package/dist/img/payments/payone-dark.svg +1 -7
- package/dist/img/payments/payone.svg +1 -7
- package/dist/img/payments/payoneer-dark.svg +1 -4
- package/dist/img/payments/payoneer.svg +1 -4
- package/dist/img/payments/paypal-dark.svg +1 -8
- package/dist/img/payments/paypal.svg +1 -8
- package/dist/img/payments/paypay-dark.svg +1 -6
- package/dist/img/payments/paypay.svg +1 -6
- package/dist/img/payments/paypo-dark.svg +1 -11
- package/dist/img/payments/paypo.svg +1 -11
- package/dist/img/payments/paysafe-dark.svg +1 -6
- package/dist/img/payments/paysafe.svg +1 -6
- package/dist/img/payments/paysafecard-dark.svg +1 -4
- package/dist/img/payments/paysafecard.svg +1 -4
- package/dist/img/payments/paystack-dark.svg +1 -5
- package/dist/img/payments/paystack.svg +1 -5
- package/dist/img/payments/paytm-dark.svg +1 -8
- package/dist/img/payments/paytm.svg +1 -8
- package/dist/img/payments/payu-dark.svg +1 -4
- package/dist/img/payments/payu.svg +1 -4
- package/dist/img/payments/phonepe-dark.svg +1 -6
- package/dist/img/payments/phonepe.svg +1 -6
- package/dist/img/payments/pix-dark.svg +1 -6
- package/dist/img/payments/pix.svg +1 -6
- package/dist/img/payments/pnc-bank-dark.svg +1 -8
- package/dist/img/payments/pnc-bank.svg +1 -8
- package/dist/img/payments/poli-dark.svg +1 -8
- package/dist/img/payments/poli.svg +1 -8
- package/dist/img/payments/przelewy24-dark.svg +1 -18
- package/dist/img/payments/przelewy24.svg +1 -8
- package/dist/img/payments/rapyd-dark.svg +1 -8
- package/dist/img/payments/rapyd.svg +1 -8
- package/dist/img/payments/razorpay-dark.svg +1 -5
- package/dist/img/payments/razorpay.svg +1 -5
- package/dist/img/payments/revolut-pay-dark.svg +1 -8
- package/dist/img/payments/revolut-pay.svg +1 -8
- package/dist/img/payments/ripple-dark.svg +1 -5
- package/dist/img/payments/ripple.svg +1 -5
- package/dist/img/payments/rupay-dark.svg +1 -10
- package/dist/img/payments/rupay.svg +1 -10
- package/dist/img/payments/samsung-pay-dark.svg +1 -13
- package/dist/img/payments/samsung-pay.svg +1 -13
- package/dist/img/payments/santander-dark.svg +1 -4
- package/dist/img/payments/santander.svg +1 -4
- package/dist/img/payments/sepa-dark.svg +1 -5
- package/dist/img/payments/sepa.svg +1 -5
- package/dist/img/payments/shop-pay-dark.svg +1 -4
- package/dist/img/payments/shop-pay.svg +1 -4
- package/dist/img/payments/shopify-dark.svg +1 -6
- package/dist/img/payments/shopify.svg +1 -7
- package/dist/img/payments/skrill-dark.svg +1 -10
- package/dist/img/payments/skrill.svg +1 -10
- package/dist/img/payments/skycash-dark.svg +1 -10
- package/dist/img/payments/skycash.svg +1 -10
- package/dist/img/payments/sofort-dark.svg +1 -6
- package/dist/img/payments/sofort.svg +1 -6
- package/dist/img/payments/solana-dark.svg +1 -20
- package/dist/img/payments/solana.svg +1 -20
- package/dist/img/payments/spingo-dark.svg +1 -11
- package/dist/img/payments/spingo.svg +1 -11
- package/dist/img/payments/square-dark.svg +1 -4
- package/dist/img/payments/square.svg +1 -4
- package/dist/img/payments/stax-dark.svg +1 -5
- package/dist/img/payments/stax.svg +1 -5
- package/dist/img/payments/stcpay-dark.svg +1 -7
- package/dist/img/payments/stcpay.svg +1 -7
- package/dist/img/payments/stripe-dark.svg +1 -4
- package/dist/img/payments/stripe.svg +1 -4
- package/dist/img/payments/sumitomo-mitsui-dark.svg +1 -5
- package/dist/img/payments/sumitomo-mitsui.svg +1 -5
- package/dist/img/payments/swift-dark.svg +1 -4
- package/dist/img/payments/swift.svg +1 -4
- package/dist/img/payments/swish-dark.svg +1 -32
- package/dist/img/payments/swish.svg +1 -32
- package/dist/img/payments/synchrony-dark.svg +1 -5
- package/dist/img/payments/synchrony.svg +1 -5
- package/dist/img/payments/tether-dark.svg +1 -11
- package/dist/img/payments/tether.svg +1 -11
- package/dist/img/payments/tpay-dark.svg +1 -10
- package/dist/img/payments/tpay.svg +1 -4
- package/dist/img/payments/troy-dark.svg +1 -7
- package/dist/img/payments/troy.svg +1 -7
- package/dist/img/payments/true-usd-dark.svg +1 -5
- package/dist/img/payments/true-usd.svg +1 -7
- package/dist/img/payments/trustly-dark.svg +1 -11
- package/dist/img/payments/trustly.svg +1 -11
- package/dist/img/payments/twint-dark.svg +1 -29
- package/dist/img/payments/twint.svg +1 -29
- package/dist/img/payments/ubs-dark.svg +1 -5
- package/dist/img/payments/ubs.svg +1 -5
- package/dist/img/payments/unionpay-dark.svg +1 -6
- package/dist/img/payments/unionpay.svg +1 -7
- package/dist/img/payments/upi-dark.svg +1 -8
- package/dist/img/payments/upi.svg +1 -8
- package/dist/img/payments/us-bank-dark.svg +1 -13
- package/dist/img/payments/us-bank.svg +1 -13
- package/dist/img/payments/usdc-dark.svg +1 -4
- package/dist/img/payments/usdc.svg +1 -4
- package/dist/img/payments/venmo-dark.svg +1 -4
- package/dist/img/payments/venmo.svg +1 -4
- package/dist/img/payments/verifone-dark.svg +1 -5
- package/dist/img/payments/verifone.svg +1 -5
- package/dist/img/payments/vipps-dark.svg +1 -8
- package/dist/img/payments/vipps.svg +1 -8
- package/dist/img/payments/visa-dark.svg +1 -4
- package/dist/img/payments/visa.svg +1 -4
- package/dist/img/payments/we-chat-pay-dark.svg +1 -4
- package/dist/img/payments/we-chat-pay.svg +1 -4
- package/dist/img/payments/webmoney-dark.svg +1 -5
- package/dist/img/payments/webmoney.svg +1 -5
- package/dist/img/payments/wells-fargo-dark.svg +1 -4
- package/dist/img/payments/wells-fargo.svg +1 -4
- package/dist/img/payments/westernunion-dark.svg +1 -18
- package/dist/img/payments/westernunion.svg +1 -18
- package/dist/img/payments/wire-transfer-dark.svg +1 -32
- package/dist/img/payments/wire-transfer.svg +1 -32
- package/dist/img/payments/wise-dark.svg +1 -4
- package/dist/img/payments/wise.svg +1 -4
- package/dist/img/payments/worldpay-dark.svg +1 -4
- package/dist/img/payments/worldpay.svg +1 -5
- package/dist/img/payments/zelle-dark.svg +1 -9
- package/dist/img/payments/zelle.svg +1 -8
- package/dist/img/social/apple-gray.svg +1 -3
- package/dist/img/social/apple.svg +1 -3
- package/dist/img/social/discord-gray.svg +1 -3
- package/dist/img/social/discord.svg +1 -3
- package/dist/img/social/dribbble-gray.svg +1 -3
- package/dist/img/social/dribbble.svg +1 -4
- package/dist/img/social/facebook-gray.svg +1 -3
- package/dist/img/social/facebook.svg +1 -4
- package/dist/img/social/figma-gray.svg +1 -3
- package/dist/img/social/figma.svg +1 -7
- package/dist/img/social/github-gray.svg +1 -10
- package/dist/img/social/github.svg +1 -10
- package/dist/img/social/google-gray.svg +1 -3
- package/dist/img/social/google.svg +1 -6
- package/dist/img/social/instagram-gray.svg +1 -5
- package/dist/img/social/instagram.svg +1 -18
- package/dist/img/social/linkedin-gray.svg +1 -3
- package/dist/img/social/linkedin.svg +1 -3
- package/dist/img/social/medium-gray.svg +1 -5
- package/dist/img/social/medium.svg +1 -5
- package/dist/img/social/meta-gray.svg +1 -5
- package/dist/img/social/meta.svg +1 -17
- package/dist/img/social/metamask-gray.svg +1 -12
- package/dist/img/social/metamask.svg +1 -14
- package/dist/img/social/pinterest-gray.svg +1 -3
- package/dist/img/social/pinterest.svg +1 -4
- package/dist/img/social/reddit-gray.svg +1 -6
- package/dist/img/social/reddit.svg +1 -11
- package/dist/img/social/signal-gray.svg +1 -10
- package/dist/img/social/signal.svg +1 -10
- package/dist/img/social/skype-gray.svg +1 -3
- package/dist/img/social/skype.svg +1 -3
- package/dist/img/social/snapchat-gray.svg +1 -10
- package/dist/img/social/snapchat.svg +1 -11
- package/dist/img/social/spotify-gray.svg +1 -3
- package/dist/img/social/spotify.svg +1 -3
- package/dist/img/social/telegram-gray.svg +1 -3
- package/dist/img/social/telegram.svg +1 -10
- package/dist/img/social/tiktok-gray.svg +1 -3
- package/dist/img/social/tiktok.svg +1 -5
- package/dist/img/social/tumblr-gray.svg +1 -3
- package/dist/img/social/tumblr.svg +1 -3
- package/dist/img/social/twitch-gray.svg +1 -5
- package/dist/img/social/twitch.svg +1 -6
- package/dist/img/social/vk-gray.svg +1 -3
- package/dist/img/social/vk.svg +1 -4
- package/dist/img/social/x-gray.svg +1 -3
- package/dist/img/social/x.svg +1 -3
- package/dist/img/social/youtube-gray.svg +1 -3
- package/dist/img/social/youtube.svg +1 -11
- package/dist/js/tabler-theme.esm.js +6 -4
- package/dist/js/tabler-theme.esm.js.map +1 -1
- package/dist/js/tabler-theme.esm.min.js +2 -2
- package/dist/js/tabler-theme.esm.min.js.map +1 -1
- package/dist/js/tabler-theme.js +6 -4
- package/dist/js/tabler-theme.js.map +1 -1
- package/dist/js/tabler-theme.min.js +2 -2
- package/dist/js/tabler-theme.min.js.map +1 -1
- package/dist/js/tabler.esm.js +5999 -3586
- package/dist/js/tabler.esm.js.map +1 -1
- package/dist/js/tabler.esm.min.js +2 -2
- package/dist/js/tabler.esm.min.js.map +1 -1
- package/dist/js/tabler.js +6010 -3586
- package/dist/js/tabler.js.map +1 -1
- package/dist/js/tabler.min.js +2 -2
- package/dist/js/tabler.min.js.map +1 -1
- package/dist/libs/vanilla-calendar-pro/LICENSE +21 -0
- package/dist/libs/vanilla-calendar-pro/index.js +2 -0
- package/dist/types/src/autosize.d.ts +32 -1
- package/dist/types/src/bootstrap/alert.d.ts +2 -0
- package/dist/types/src/bootstrap/button.d.ts +3 -0
- package/dist/types/src/bootstrap/carousel.d.ts +16 -3
- package/dist/types/src/bootstrap/collapse.d.ts +13 -3
- package/dist/types/src/bootstrap/dom/event-handler.d.ts +7 -4
- package/dist/types/src/bootstrap/dropdown.d.ts +30 -7
- package/dist/types/src/bootstrap/modal.d.ts +12 -8
- package/dist/types/src/bootstrap/offcanvas.d.ts +12 -8
- package/dist/types/src/bootstrap/popover.d.ts +13 -9
- package/dist/types/src/bootstrap/scrollspy.d.ts +17 -3
- package/dist/types/src/bootstrap/tab.d.ts +2 -0
- package/dist/types/src/bootstrap/toast.d.ts +12 -3
- package/dist/types/src/bootstrap/tooltip.d.ts +57 -19
- package/dist/types/src/bootstrap/types.d.ts +25 -1
- package/dist/types/src/bootstrap/util/backdrop.d.ts +2 -2
- package/dist/types/src/bootstrap/util/component-functions.d.ts +22 -2
- package/dist/types/src/bootstrap/util/focustrap.d.ts +2 -2
- package/dist/types/src/bootstrap/util/index.d.ts +5 -1
- package/dist/types/src/bootstrap/util/swipe.d.ts +2 -2
- package/dist/types/src/bootstrap/util/template-factory.d.ts +2 -2
- package/dist/types/src/clipboard.d.ts +45 -0
- package/dist/types/src/confetti.d.ts +58 -0
- package/dist/types/src/countup.d.ts +64 -1
- package/dist/types/src/datepicker.d.ts +102 -0
- package/dist/types/src/deprecated.d.ts +11 -0
- package/dist/types/src/input-mask.d.ts +42 -1
- package/dist/types/src/otp-input.d.ts +71 -0
- package/dist/types/src/sortable.d.ts +41 -1
- package/dist/types/src/sparkline.d.ts +67 -0
- package/dist/types/src/strength.d.ts +52 -0
- package/dist/types/src/switch-icon.d.ts +31 -1
- package/dist/types/src/theme-config.d.ts +3 -1
- package/dist/types/tabler.d.ts +18 -1
- package/js/src/autosize.ts +136 -7
- package/js/src/bootstrap/alert.ts +20 -0
- package/js/src/bootstrap/base-component.ts +1 -1
- package/js/src/bootstrap/button.ts +16 -0
- package/js/src/bootstrap/carousel.ts +42 -7
- package/js/src/bootstrap/collapse.ts +38 -6
- package/js/src/bootstrap/dom/event-handler.ts +50 -16
- package/js/src/bootstrap/dropdown.ts +61 -22
- package/js/src/bootstrap/modal.ts +39 -14
- package/js/src/bootstrap/offcanvas.ts +36 -11
- package/js/src/bootstrap/popover.ts +35 -9
- package/js/src/bootstrap/scrollspy.ts +38 -7
- package/js/src/bootstrap/tab.ts +20 -1
- package/js/src/bootstrap/toast.ts +31 -5
- package/js/src/bootstrap/tooltip.ts +109 -53
- package/js/src/bootstrap/types.ts +30 -1
- package/js/src/bootstrap/util/backdrop.ts +1 -1
- package/js/src/bootstrap/util/component-functions.ts +74 -5
- package/js/src/bootstrap/util/focustrap.ts +2 -2
- package/js/src/bootstrap/util/index.ts +46 -2
- package/js/src/bootstrap/util/swipe.ts +3 -3
- package/js/src/bootstrap/util/template-factory.ts +2 -2
- package/js/src/clipboard.ts +197 -0
- package/js/src/confetti.ts +439 -0
- package/js/src/countup.ts +335 -29
- package/js/src/datepicker.ts +671 -0
- package/js/src/deprecated.ts +28 -0
- package/js/src/dropdown.ts +1 -1
- package/js/src/global.d.ts +12 -13
- package/js/src/input-mask.ts +128 -8
- package/js/src/otp-input.ts +432 -0
- package/js/src/sortable.ts +116 -15
- package/js/src/sparkline.ts +609 -0
- package/js/src/strength.ts +277 -0
- package/js/src/switch-icon.ts +165 -9
- package/js/src/theme-config.ts +3 -1
- package/js/tabler-theme.ts +2 -4
- package/js/tabler.ts +21 -2
- package/libs.json +45 -109
- package/package.json +40 -29
- package/scss/_config.scss +1 -0
- package/scss/_core.scss +6 -0
- package/scss/_deprecated-props.scss +40 -0
- package/scss/_deprecated.scss +153 -0
- package/scss/_extends.scss +6 -1
- package/scss/_maps.scss +10 -11
- package/scss/_mixins.scss +1 -0
- package/scss/_props.scss +40 -6
- package/scss/_settings.scss +3 -1
- package/scss/_utilities-marketing.scss +1 -2
- package/scss/_utilities.scss +62 -24
- package/scss/_variables-dark.scss +31 -42
- package/scss/_variables-deprecated.scss +60 -0
- package/scss/_variables.scss +252 -189
- package/scss/bootstrap/_buttons.scss +6 -33
- package/scss/bootstrap/_carousel.scss +6 -7
- package/scss/bootstrap/_list-group.scss +28 -14
- package/scss/bootstrap/_nav.scss +2 -2
- package/scss/bootstrap/_navbar.scss +6 -7
- package/scss/bootstrap/_offcanvas.scss +2 -0
- package/scss/bootstrap/_pagination.scss +7 -3
- package/scss/bootstrap/_reboot.scss +3 -3
- package/scss/bootstrap/_root.scss +10 -33
- package/scss/bootstrap/_tables.scss +7 -2
- package/scss/bootstrap/forms/_floating-labels.scss +1 -1
- package/scss/bootstrap/forms/_form-check.scss +54 -42
- package/scss/bootstrap/forms/_form-control.scss +4 -8
- package/scss/bootstrap/forms/_form-range.scss +4 -2
- package/scss/bootstrap/forms/_form-select.scss +4 -7
- package/scss/helpers/_index.scss +11 -4
- package/scss/layout/_accessibility.scss +2 -1
- package/scss/layout/_core.scss +0 -8
- package/scss/layout/_navbar.scss +129 -44
- package/scss/layout/_page.scss +15 -2
- package/scss/layout/_root.scss +4 -3
- package/scss/marketing/_hero.scss +0 -11
- package/scss/mixins/_deprecated.scss +110 -0
- package/scss/mixins/_functions.scss +67 -113
- package/scss/mixins/_mixins.scss +41 -8
- package/scss/mixins/bootstrap/_caret.scss +7 -6
- package/scss/mixins/bootstrap/_color-mode.scss +6 -0
- package/scss/mixins/bootstrap/_forms.scss +10 -11
- package/scss/mixins/bootstrap/_gradients.scss +1 -1
- package/scss/mixins/bootstrap/_table-variants.scss +4 -5
- package/scss/tabler-props.scss +5 -0
- package/scss/tabler-themes.scss +67 -66
- package/scss/tabler-vendors.scss +3 -1
- package/scss/tabler.scss +2 -0
- package/scss/ui/_accordion.scss +24 -31
- package/scss/ui/_alerts.scss +29 -8
- package/scss/ui/_avatars.scss +3 -1
- package/scss/ui/_badges.scss +2 -0
- package/scss/ui/_breadcrumbs.scss +2 -0
- package/scss/ui/_buttons.scss +83 -58
- package/scss/ui/_calendars.scss +4 -5
- package/scss/ui/_cards.scss +38 -33
- package/scss/ui/_carousel.scss +1 -1
- package/scss/ui/_chat.scss +2 -0
- package/scss/ui/_close.scss +5 -2
- package/scss/ui/_datagrid.scss +2 -0
- package/scss/ui/_datepicker.scss +425 -0
- package/scss/ui/_dropdowns.scss +5 -1
- package/scss/ui/_empty.scss +2 -0
- package/scss/ui/_forms.scss +33 -47
- package/scss/ui/_icons.scss +2 -0
- package/scss/ui/_legend.scss +145 -2
- package/scss/ui/_lists.scss +3 -3
- package/scss/ui/_markdown.scss +1 -0
- package/scss/ui/_modals.scss +20 -1
- package/scss/ui/_nav.scss +3 -3
- package/scss/ui/_offcanvas.scss +47 -0
- package/scss/ui/_patterns.scss +39 -18
- package/scss/ui/_progress.scss +5 -2
- package/scss/ui/_ribbons.scss +6 -2
- package/scss/ui/_segmented.scss +1 -1
- package/scss/ui/_signal.scss +57 -0
- package/scss/ui/_sortable.scss +73 -0
- package/scss/ui/_sparkline.scss +73 -0
- package/scss/ui/_stars.scss +2 -0
- package/scss/ui/_status.scss +2 -2
- package/scss/ui/_steps.scss +2 -0
- package/scss/ui/_switch-icon.scss +67 -11
- package/scss/ui/_tables.scss +3 -3
- package/scss/ui/_tags.scss +2 -0
- package/scss/ui/_timeline.scss +2 -0
- package/scss/ui/_tracking.scss +2 -0
- package/scss/ui/_type.scss +12 -4
- package/scss/ui/forms/_form-check.scss +10 -2
- package/scss/ui/forms/_form-colorinput.scss +4 -3
- package/scss/ui/forms/_form-custom.scss +0 -13
- package/scss/ui/forms/_form-imagecheck.scss +4 -3
- package/scss/ui/forms/_form-otp.scss +171 -0
- package/scss/ui/forms/_form-selectgroup.scss +7 -7
- package/scss/ui/forms/_strength.scss +63 -0
- package/scss/ui/forms/_validation.scss +5 -0
- package/scss/utils/_background.scss +2 -2
- package/scss/utils/_colors.scss +17 -14
- package/scss/vendor/_apexcharts.scss +10 -1
- package/scss/vendor/_coloris.scss +10 -3
- package/scss/vendor/_fslightbox.scss +2 -2
- package/scss/vendor/_jsvectormap.scss +1 -1
- package/scss/vendor/_nouislider.scss +2 -1
- package/scss/vendor/_tom-select.scss +84 -7
- package/dist/types/src/tabler.d.ts +0 -3
- package/js/src/tabler.ts +0 -17
- package/js/tests/helpers/fixture.ts +0 -33
- package/js/tests/unit/alert.spec.ts +0 -176
- package/js/tests/unit/base-component.spec.ts +0 -166
- package/js/tests/unit/button.spec.ts +0 -167
- package/js/tests/unit/carousel.spec.ts +0 -546
- package/js/tests/unit/collapse.spec.ts +0 -791
- package/js/tests/unit/dom/data.spec.ts +0 -180
- package/js/tests/unit/dom/event-handler.spec.ts +0 -460
- package/js/tests/unit/dom/manipulator.spec.ts +0 -201
- package/js/tests/unit/dom/selector-engine.spec.ts +0 -300
- package/js/tests/unit/dropdown.spec.ts +0 -1095
- package/js/tests/unit/modal.spec.ts +0 -629
- package/js/tests/unit/offcanvas.spec.ts +0 -434
- package/js/tests/unit/popover.spec.ts +0 -253
- package/js/tests/unit/scrollspy.spec.ts +0 -634
- package/js/tests/unit/sidebar.spec.ts +0 -118
- package/js/tests/unit/tab.spec.ts +0 -775
- package/js/tests/unit/tabler-theme.spec.ts +0 -100
- package/js/tests/unit/toast.spec.ts +0 -514
- package/js/tests/unit/tooltip.spec.ts +0 -679
- package/js/tests/unit/util/backdrop.spec.ts +0 -213
- package/js/tests/unit/util/component-functions.spec.ts +0 -88
- package/js/tests/unit/util/config.spec.ts +0 -150
- package/js/tests/unit/util/focustrap.spec.ts +0 -232
- package/js/tests/unit/util/index.spec.ts +0 -478
- package/js/tests/unit/util/sanitizer.spec.ts +0 -118
- package/js/tests/unit/util/scrollbar.spec.ts +0 -202
- package/js/tests/unit/util/swipe.spec.ts +0 -319
- package/js/tests/unit/util/template-factory.spec.ts +0 -233
- package/scss/tests/_add-subtract.test.scss +0 -48
- package/scss/tests/_border-radius.test.scss +0 -23
- package/scss/tests/_box-shadow.test.scss +0 -71
- package/scss/tests/_breakpoints.test.scss +0 -50
- package/scss/tests/_cards.test.scss +0 -31
- package/scss/tests/_caret.test.scss +0 -115
- package/scss/tests/_color-contrast.test.scss +0 -24
- package/scss/tests/_color-mode.test.scss +0 -28
- package/scss/tests/_color.test.scss +0 -44
- package/scss/tests/_colors-misc.test.scss +0 -80
- package/scss/tests/_css-var.test.scss +0 -37
- package/scss/tests/_divide.test.scss +0 -45
- package/scss/tests/_escape-svg.test.scss +0 -18
- package/scss/tests/_generate-utility.test.scss +0 -245
- package/scss/tests/_grid.test.scss +0 -153
- package/scss/tests/_maps.test.scss +0 -76
- package/scss/tests/_media-breakpoint.test.scss +0 -202
- package/scss/tests/_mixins-bootstrap.test.scss +0 -55
- package/scss/tests/_mixins.test.scss +0 -208
- package/scss/tests/_rfs.test.scss +0 -30
- package/scss/tests/_str-replace.test.scss +0 -34
- package/scss/tests/_transition.test.scss +0 -43
package/js/src/global.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { JQueryStaticLike } from './bootstrap/types'
|
|
2
|
+
|
|
3
|
+
// Plugins that are loaded separately, not bundled: IMask (https://imask.js.org),
|
|
4
|
+
// SortableJS (https://sortablejs.github.io/Sortable/) and Vanilla Calendar Pro
|
|
5
|
+
// (https://vanilla-calendar.pro). The instance types live in the component
|
|
6
|
+
// modules, so they are part of the published `dist/types`.
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
VanillaCalendarPro?: typeof import('vanilla-calendar-pro')
|
|
10
|
+
IMask?: new (element: HTMLElement, options: { mask: string; lazy?: boolean }) => import('./input-mask').IMaskInstance
|
|
11
|
+
Sortable?: new (element: HTMLElement, options?: Record<string, unknown>) => import('./sortable').SortableInstance
|
|
12
|
+
jQuery?: JQueryStaticLike
|
|
12
13
|
}
|
|
13
|
-
IMask?: new (element: HTMLElement, options: { mask: string; lazy?: boolean }) => any
|
|
14
|
-
Sortable?: new (element: HTMLElement, options?: any) => any
|
|
15
14
|
}
|
package/js/src/input-mask.ts
CHANGED
|
@@ -1,10 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------------
|
|
3
|
+
* Tabler input-mask.ts
|
|
4
|
+
* Licensed under MIT (https://github.com/tabler/tabler/blob/dev/LICENSE)
|
|
5
|
+
* --------------------------------------------------------------------------
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import BaseComponent from './bootstrap/base-component'
|
|
9
|
+
import { initAll } from './bootstrap/util/component-functions'
|
|
10
|
+
import type { ElementSelector } from './bootstrap/types'
|
|
11
|
+
|
|
12
|
+
// The part of an IMask instance the component uses
|
|
13
|
+
interface IMaskInstance {
|
|
14
|
+
value: string
|
|
15
|
+
unmaskedValue: string
|
|
16
|
+
updateValue(): void
|
|
17
|
+
updateOptions(options: Record<string, unknown>): void
|
|
18
|
+
destroy(): void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type ComponentConfig = {
|
|
22
|
+
mask: string
|
|
23
|
+
lazy: boolean
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type ComponentConfigInput = Partial<ComponentConfig> & Record<string, unknown>
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Constants
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const NAME = 'input-mask'
|
|
33
|
+
|
|
34
|
+
const ATTRIBUTE_MASK = 'data-mask'
|
|
35
|
+
const ATTRIBUTE_VISIBLE = 'data-mask-visible'
|
|
36
|
+
|
|
37
|
+
const SELECTOR_DATA_MASK = `[${ATTRIBUTE_MASK}]`
|
|
38
|
+
|
|
39
|
+
const Default: ComponentConfig = {
|
|
40
|
+
mask: '',
|
|
41
|
+
lazy: true,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const DefaultType: Record<keyof ComponentConfig, string> = {
|
|
45
|
+
mask: 'string',
|
|
46
|
+
lazy: 'boolean',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Class definition
|
|
51
|
+
*
|
|
52
|
+
* Wraps the IMask plugin (https://imask.js.org), loaded separately as
|
|
53
|
+
* `window.IMask`. Without the plugin the component is inert.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
class InputMask extends BaseComponent {
|
|
57
|
+
declare _element: HTMLInputElement
|
|
58
|
+
declare _config: ComponentConfig
|
|
59
|
+
_mask: IMaskInstance | null = null
|
|
60
|
+
|
|
61
|
+
constructor(element: ElementSelector, config?: ComponentConfigInput) {
|
|
62
|
+
super(element, config)
|
|
63
|
+
|
|
64
|
+
if (!this._element || !this._config.mask || !window.IMask) {
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
this._mask = new window.IMask(this._element, {
|
|
69
|
+
mask: this._config.mask,
|
|
70
|
+
lazy: this._config.lazy,
|
|
8
71
|
})
|
|
9
|
-
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Getters
|
|
75
|
+
static get Default(): ComponentConfig {
|
|
76
|
+
return Default
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static get DefaultType(): Record<keyof ComponentConfig, string> {
|
|
80
|
+
return DefaultType
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static get NAME(): string {
|
|
84
|
+
return NAME
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The IMask instance, for options the component does not expose. */
|
|
88
|
+
get mask(): IMaskInstance | null {
|
|
89
|
+
return this._mask
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Public
|
|
93
|
+
update(): void {
|
|
94
|
+
this._mask?.updateValue()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
dispose(): void {
|
|
98
|
+
this._mask?.destroy()
|
|
99
|
+
super.dispose()
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Private
|
|
103
|
+
_mergeConfigObj(config?: Record<string, unknown>, element?: HTMLElement): Record<string, unknown> {
|
|
104
|
+
// `data-mask` holds the pattern; `data-mask-visible="true"` shows it
|
|
105
|
+
// before typing, which is IMask's `lazy: false`.
|
|
106
|
+
const dataOptions: Record<string, unknown> = {}
|
|
107
|
+
const mask = element?.getAttribute(ATTRIBUTE_MASK)
|
|
108
|
+
|
|
109
|
+
if (mask) {
|
|
110
|
+
dataOptions.mask = mask
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (element?.hasAttribute(ATTRIBUTE_VISIBLE)) {
|
|
114
|
+
dataOptions.lazy = element.getAttribute(ATTRIBUTE_VISIBLE) !== 'true'
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return super._mergeConfigObj({ ...dataOptions, ...config }, element)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Data API implementation
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
// js-docs-start input-mask-init
|
|
126
|
+
initAll(SELECTOR_DATA_MASK, InputMask)
|
|
10
127
|
// js-docs-end input-mask-init
|
|
128
|
+
|
|
129
|
+
export default InputMask
|
|
130
|
+
export type { IMaskInstance }
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------------
|
|
3
|
+
* Bootstrap otp-input.ts
|
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
|
+
* --------------------------------------------------------------------------
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import BaseComponent from './bootstrap/base-component'
|
|
9
|
+
import EventHandler from './bootstrap/dom/event-handler'
|
|
10
|
+
import SelectorEngine from './bootstrap/dom/selector-engine'
|
|
11
|
+
import { initAll } from './bootstrap/util/component-functions'
|
|
12
|
+
import type { ElementSelector } from './bootstrap/types'
|
|
13
|
+
|
|
14
|
+
type OtpInputType = 'numeric' | 'alphanumeric' | 'alpha'
|
|
15
|
+
|
|
16
|
+
type ComponentConfig = {
|
|
17
|
+
groups: number[] | null
|
|
18
|
+
length: number | null
|
|
19
|
+
mask: boolean
|
|
20
|
+
separator: string
|
|
21
|
+
type: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type ComponentConfigInput = Partial<ComponentConfig> & Record<string, unknown>
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Constants
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const NAME = 'otpInput'
|
|
31
|
+
const DATA_KEY = `bs.${NAME}`
|
|
32
|
+
const EVENT_KEY = `.${DATA_KEY}`
|
|
33
|
+
|
|
34
|
+
const EVENT_INPUT = `input${EVENT_KEY}`
|
|
35
|
+
const EVENT_COMPLETE = `complete${EVENT_KEY}`
|
|
36
|
+
|
|
37
|
+
const CLASS_NAME_INPUT = 'otp-input'
|
|
38
|
+
const CLASS_NAME_RENDERED = 'otp-rendered'
|
|
39
|
+
const CLASS_NAME_SLOTS = 'otp-slots'
|
|
40
|
+
const CLASS_NAME_SLOT = 'otp-slot'
|
|
41
|
+
const CLASS_NAME_SLOT_FILLED = 'otp-slot-filled'
|
|
42
|
+
const CLASS_NAME_SLOT_ACTIVE = 'otp-slot-active'
|
|
43
|
+
const CLASS_NAME_SEPARATOR = 'otp-separator'
|
|
44
|
+
|
|
45
|
+
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="otp"], [data-tblr-toggle="otp"]'
|
|
46
|
+
const SELECTOR_INPUT = 'input'
|
|
47
|
+
|
|
48
|
+
// Keeps the active-slot highlight in sync with the caret as it moves without typing
|
|
49
|
+
const SYNC_EVENTS = ['blur', 'keyup', 'select']
|
|
50
|
+
|
|
51
|
+
const MASK_CHARACTER = '•'
|
|
52
|
+
|
|
53
|
+
// Per-type input mode, validation pattern, and a filter that strips disallowed characters
|
|
54
|
+
const TYPES: Record<OtpInputType, { inputmode: string; pattern: string; filter: RegExp }> = {
|
|
55
|
+
numeric: { inputmode: 'numeric', pattern: '[0-9]*', filter: /[^0-9]/g },
|
|
56
|
+
alphanumeric: { inputmode: 'text', pattern: '[A-Za-z0-9]*', filter: /[^A-Za-z0-9]/g },
|
|
57
|
+
alpha: { inputmode: 'text', pattern: '[A-Za-z]*', filter: /[^A-Za-z]/g },
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const Default: ComponentConfig = {
|
|
61
|
+
groups: null,
|
|
62
|
+
length: null,
|
|
63
|
+
mask: false,
|
|
64
|
+
separator: '·',
|
|
65
|
+
type: 'numeric',
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const DefaultType: Record<keyof ComponentConfig, string> = {
|
|
69
|
+
groups: '(array|null)',
|
|
70
|
+
length: '(number|null)',
|
|
71
|
+
mask: 'boolean',
|
|
72
|
+
separator: 'string',
|
|
73
|
+
type: 'string',
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Class definition
|
|
78
|
+
*
|
|
79
|
+
* A single real `<input>` inside `.otp` is turned into a transparent overlay
|
|
80
|
+
* once its value is rendered into one `.otp-slot` per character, so screen
|
|
81
|
+
* readers, password managers and SMS autofill still see one ordinary field.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
class OtpInput extends BaseComponent {
|
|
85
|
+
declare _element: HTMLElement
|
|
86
|
+
declare _config: ComponentConfig
|
|
87
|
+
_input!: HTMLInputElement
|
|
88
|
+
_type!: (typeof TYPES)[OtpInputType]
|
|
89
|
+
_length = 0
|
|
90
|
+
_slots: HTMLElement[] = []
|
|
91
|
+
_slotsContainer: HTMLElement | null = null
|
|
92
|
+
// Tracks a tap so focus (fired natively by the browser) can respect the
|
|
93
|
+
// clicked slot instead of jumping to the first empty one
|
|
94
|
+
_pointerActive = false
|
|
95
|
+
_pointerIndex = 0
|
|
96
|
+
|
|
97
|
+
_onInput = (): void => this._handleInput()
|
|
98
|
+
_onBeforeInput = (event: Event): void => this._handleBeforeInput(event as InputEvent)
|
|
99
|
+
_onFocus = (): void => this._handleFocus()
|
|
100
|
+
_onPointerDown = (event: Event): void => this._handlePointerDown(event as PointerEvent)
|
|
101
|
+
_onSync = (): void => this._render()
|
|
102
|
+
_onSelectionChange = (): void => {
|
|
103
|
+
if (document.activeElement === this._input) {
|
|
104
|
+
this._render()
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
constructor(element: ElementSelector, config?: ComponentConfigInput) {
|
|
109
|
+
super(element, config)
|
|
110
|
+
|
|
111
|
+
if (!this._element) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const input = SelectorEngine.findOne(SELECTOR_INPUT, this._element) as HTMLInputElement | null
|
|
116
|
+
if (!input) {
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this._input = input
|
|
121
|
+
this._type = TYPES[this._config.type as OtpInputType] ?? TYPES.numeric
|
|
122
|
+
this._length = this._resolveLength()
|
|
123
|
+
|
|
124
|
+
this._setupInput()
|
|
125
|
+
this._renderSlots()
|
|
126
|
+
this._addEventListeners()
|
|
127
|
+
this._render()
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Getters
|
|
131
|
+
static get Default(): ComponentConfig {
|
|
132
|
+
return Default
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static get DefaultType(): Record<keyof ComponentConfig, string> {
|
|
136
|
+
return DefaultType
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static get NAME(): string {
|
|
140
|
+
return NAME
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Public
|
|
144
|
+
getValue(): string {
|
|
145
|
+
return this._input.value
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
setValue(value: string | number): void {
|
|
149
|
+
this._input.value = this._sanitize(String(value))
|
|
150
|
+
this._render()
|
|
151
|
+
this._checkComplete()
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
clear(): void {
|
|
155
|
+
this._input.value = ''
|
|
156
|
+
this._render()
|
|
157
|
+
this._input.focus()
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
focus(): void {
|
|
161
|
+
this._input.focus()
|
|
162
|
+
this._selectSlot(this._firstEmptyIndex())
|
|
163
|
+
this._render()
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
dispose(): void {
|
|
167
|
+
if (!this._input) {
|
|
168
|
+
super.dispose()
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
this._input.removeEventListener('input', this._onInput)
|
|
173
|
+
this._input.removeEventListener('beforeinput', this._onBeforeInput)
|
|
174
|
+
this._input.removeEventListener('focus', this._onFocus)
|
|
175
|
+
this._input.removeEventListener('pointerdown', this._onPointerDown)
|
|
176
|
+
for (const type of SYNC_EVENTS) {
|
|
177
|
+
this._input.removeEventListener(type, this._onSync)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
document.removeEventListener('selectionchange', this._onSelectionChange)
|
|
181
|
+
|
|
182
|
+
this._slotsContainer?.remove()
|
|
183
|
+
this._element.classList.remove(CLASS_NAME_RENDERED)
|
|
184
|
+
super.dispose()
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Private
|
|
188
|
+
_resolveLength(): number {
|
|
189
|
+
if (this._config.length) {
|
|
190
|
+
return this._config.length
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const maxLength = Number.parseInt(this._input.getAttribute('maxlength') ?? '', 10)
|
|
194
|
+
return Number.isNaN(maxLength) || maxLength < 1 ? 6 : maxLength
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
_setupInput(): void {
|
|
198
|
+
const input = this._input
|
|
199
|
+
|
|
200
|
+
// A single text field backs the whole control so screen readers, password
|
|
201
|
+
// managers, and SMS autofill treat it like any other input.
|
|
202
|
+
if (input.type === 'number' || input.type === 'password') {
|
|
203
|
+
input.type = 'text'
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
input.classList.add(CLASS_NAME_INPUT)
|
|
207
|
+
input.setAttribute('maxlength', String(this._length))
|
|
208
|
+
input.setAttribute('inputmode', this._type.inputmode)
|
|
209
|
+
input.setAttribute('pattern', this._type.pattern)
|
|
210
|
+
|
|
211
|
+
if (!input.getAttribute('autocomplete')) {
|
|
212
|
+
input.setAttribute('autocomplete', 'one-time-code')
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (input.value) {
|
|
216
|
+
input.value = this._sanitize(input.value)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
_renderSlots(): void {
|
|
221
|
+
const container = document.createElement('div')
|
|
222
|
+
container.className = CLASS_NAME_SLOTS
|
|
223
|
+
container.setAttribute('aria-hidden', 'true')
|
|
224
|
+
|
|
225
|
+
const { groups, separator } = this._config
|
|
226
|
+
let groupIndex = 0
|
|
227
|
+
let inGroup = 0
|
|
228
|
+
|
|
229
|
+
for (let i = 0; i < this._length; i++) {
|
|
230
|
+
const slot = document.createElement('div')
|
|
231
|
+
slot.className = CLASS_NAME_SLOT
|
|
232
|
+
container.append(slot)
|
|
233
|
+
this._slots.push(slot)
|
|
234
|
+
|
|
235
|
+
if (groups && groups.length > 0) {
|
|
236
|
+
inGroup++
|
|
237
|
+
if (inGroup === groups[groupIndex] && i < this._length - 1) {
|
|
238
|
+
const separatorEl = document.createElement('div')
|
|
239
|
+
separatorEl.className = CLASS_NAME_SEPARATOR
|
|
240
|
+
separatorEl.textContent = separator
|
|
241
|
+
container.append(separatorEl)
|
|
242
|
+
groupIndex = Math.min(groupIndex + 1, groups.length - 1)
|
|
243
|
+
inGroup = 0
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
this._slotsContainer = container
|
|
249
|
+
this._element.append(container)
|
|
250
|
+
this._element.classList.add(CLASS_NAME_RENDERED)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
_addEventListeners(): void {
|
|
254
|
+
this._input.addEventListener('input', this._onInput)
|
|
255
|
+
this._input.addEventListener('beforeinput', this._onBeforeInput)
|
|
256
|
+
this._input.addEventListener('focus', this._onFocus)
|
|
257
|
+
this._input.addEventListener('pointerdown', this._onPointerDown)
|
|
258
|
+
document.addEventListener('selectionchange', this._onSelectionChange)
|
|
259
|
+
|
|
260
|
+
for (const type of SYNC_EVENTS) {
|
|
261
|
+
this._input.addEventListener(type, this._onSync)
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_handleFocus(): void {
|
|
266
|
+
if (this._pointerActive) {
|
|
267
|
+
// Wait for focus to settle before moving the caret, or iOS raises then
|
|
268
|
+
// immediately dismisses the on-screen keyboard.
|
|
269
|
+
this._pointerActive = false
|
|
270
|
+
this._selectSlot(this._pointerIndex)
|
|
271
|
+
this._render()
|
|
272
|
+
return
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
this._selectSlot(this._firstEmptyIndex())
|
|
276
|
+
this._render()
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Bulk path: paste, SMS autofill, or a programmatic change land here as a
|
|
280
|
+
// single multi-character `input` event. Single keystrokes are handled by
|
|
281
|
+
// `_handleBeforeInput` (overwrite semantics) and never reach this method.
|
|
282
|
+
_handleInput(): void {
|
|
283
|
+
const sanitized = this._sanitize(this._input.value)
|
|
284
|
+
if (sanitized !== this._input.value) {
|
|
285
|
+
this._input.value = sanitized
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (document.activeElement === this._input) {
|
|
289
|
+
this._selectSlot(this._firstEmptyIndex())
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
this._afterValueChange()
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Intercepts single-character typing and backspace so each slot is
|
|
296
|
+
// overwritten in place rather than inserting and shifting the value.
|
|
297
|
+
// Anything else (paste, autofill, IME) falls through to `_handleInput`.
|
|
298
|
+
_handleBeforeInput(event: InputEvent): void {
|
|
299
|
+
const { inputType, data } = event
|
|
300
|
+
|
|
301
|
+
if (inputType === 'insertText' && data && data.length === 1) {
|
|
302
|
+
event.preventDefault()
|
|
303
|
+
|
|
304
|
+
const char = this._sanitize(data)
|
|
305
|
+
if (!char) {
|
|
306
|
+
return
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const index = Math.min(this._input.selectionStart ?? 0, this._length - 1)
|
|
310
|
+
const chars = [...this._input.value]
|
|
311
|
+
chars[index] = char
|
|
312
|
+
this._input.value = chars.join('').slice(0, this._length)
|
|
313
|
+
|
|
314
|
+
this._selectSlot(index + 1)
|
|
315
|
+
this._afterValueChange()
|
|
316
|
+
return
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (inputType === 'deleteContentBackward') {
|
|
320
|
+
event.preventDefault()
|
|
321
|
+
|
|
322
|
+
const start = this._input.selectionStart ?? 0
|
|
323
|
+
const end = this._input.selectionEnd ?? start
|
|
324
|
+
const chars = [...this._input.value]
|
|
325
|
+
|
|
326
|
+
if (end > start) {
|
|
327
|
+
chars.splice(start, end - start)
|
|
328
|
+
this._input.value = chars.join('')
|
|
329
|
+
this._selectSlot(start)
|
|
330
|
+
} else if (start > 0) {
|
|
331
|
+
chars.splice(start - 1, 1)
|
|
332
|
+
this._input.value = chars.join('')
|
|
333
|
+
this._selectSlot(start - 1)
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
this._afterValueChange()
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
_handlePointerDown(event: PointerEvent): void {
|
|
341
|
+
const index = this._slotIndexFromPoint(event.clientX)
|
|
342
|
+
if (index === null) {
|
|
343
|
+
return
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const target = Math.min(index, this._firstEmptyIndex())
|
|
347
|
+
|
|
348
|
+
if (document.activeElement === this._input) {
|
|
349
|
+
// Already focused: safe to take over caret placement, it won't dismiss
|
|
350
|
+
// the on-screen keyboard.
|
|
351
|
+
event.preventDefault()
|
|
352
|
+
this._selectSlot(target)
|
|
353
|
+
this._render()
|
|
354
|
+
return
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Not yet focused: let the browser focus the input natively so a tap
|
|
358
|
+
// raises the on-screen keyboard; the caret is placed once focus settles.
|
|
359
|
+
this._pointerActive = true
|
|
360
|
+
this._pointerIndex = target
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Maps a viewport x-coordinate to the slot under it, clamped to the last slot.
|
|
364
|
+
_slotIndexFromPoint(x: number): number | null {
|
|
365
|
+
const rtl = getComputedStyle(this._element).direction === 'rtl'
|
|
366
|
+
|
|
367
|
+
for (const [index, slot] of this._slots.entries()) {
|
|
368
|
+
const rect = slot.getBoundingClientRect()
|
|
369
|
+
// RTL mirrors the visual slot order, so the boundary flips from the
|
|
370
|
+
// right edge (v6, LTR-only) to the left edge.
|
|
371
|
+
const reached = rtl ? x >= rect.left : x <= rect.right
|
|
372
|
+
|
|
373
|
+
if (reached || index === this._slots.length - 1) {
|
|
374
|
+
return index
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
return null
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
_afterValueChange(): void {
|
|
382
|
+
this._render()
|
|
383
|
+
EventHandler.trigger(this._element, EVENT_INPUT, { value: this._input.value })
|
|
384
|
+
this._checkComplete()
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
_firstEmptyIndex(): number {
|
|
388
|
+
return Math.min(this._input.value.length, this._length - 1)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Represents the active slot as a selection: a filled slot is selected so
|
|
392
|
+
// the next keystroke overwrites it; an empty slot gets a collapsed caret.
|
|
393
|
+
_selectSlot(index: number): void {
|
|
394
|
+
const clamped = Math.max(0, Math.min(index, this._length - 1))
|
|
395
|
+
const end = clamped < this._input.value.length ? clamped + 1 : clamped
|
|
396
|
+
this._input.setSelectionRange(clamped, end)
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
_sanitize(value: string): string {
|
|
400
|
+
return value.replace(this._type.filter, '').slice(0, this._length)
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
_render(): void {
|
|
404
|
+
const { value } = this._input
|
|
405
|
+
const isFocused = document.activeElement === this._input
|
|
406
|
+
const caret = Math.min(this._input.selectionStart ?? value.length, this._length - 1)
|
|
407
|
+
|
|
408
|
+
for (const [index, slot] of this._slots.entries()) {
|
|
409
|
+
const char = value[index] ?? ''
|
|
410
|
+
slot.textContent = char && this._config.mask ? MASK_CHARACTER : char
|
|
411
|
+
slot.classList.toggle(CLASS_NAME_SLOT_FILLED, Boolean(char))
|
|
412
|
+
slot.classList.toggle(CLASS_NAME_SLOT_ACTIVE, isFocused && index === caret)
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
_checkComplete(): void {
|
|
417
|
+
const { value } = this._input
|
|
418
|
+
if (value.length === this._length) {
|
|
419
|
+
EventHandler.trigger(this._element, EVENT_COMPLETE, { value })
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Data API implementation
|
|
426
|
+
*/
|
|
427
|
+
|
|
428
|
+
// js-docs-start otp-init
|
|
429
|
+
initAll(SELECTOR_DATA_TOGGLE, OtpInput)
|
|
430
|
+
// js-docs-end otp-init
|
|
431
|
+
|
|
432
|
+
export default OtpInput
|