@tabler/core 1.5.0 → 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 +208 -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 +208 -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 +5346 -6083
- 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 +5343 -6083
- 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 +41 -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 +280 -206
- 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 +139 -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 +50 -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 +9 -4
- 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 +6 -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
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------------
|
|
3
|
+
* Tabler datepicker.ts
|
|
4
|
+
* Licensed under MIT (https://github.com/tabler/tabler/blob/dev/LICENSE)
|
|
5
|
+
* --------------------------------------------------------------------------
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { Calendar, DateAny, DateMode, DatesArr, MonthsCount, Options, PositionToInput, Range, WeekDayID } from 'vanilla-calendar-pro'
|
|
9
|
+
import BaseComponent from './bootstrap/base-component'
|
|
10
|
+
import EventHandler from './bootstrap/dom/event-handler'
|
|
11
|
+
import SelectorEngine from './bootstrap/dom/selector-engine'
|
|
12
|
+
import { initAll } from './bootstrap/util/component-functions'
|
|
13
|
+
import { isDisabled } from './bootstrap/util/index'
|
|
14
|
+
import type { ElementSelector } from './bootstrap/types'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Constants
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const NAME = 'datepicker'
|
|
21
|
+
const DATA_KEY = `bs.${NAME}`
|
|
22
|
+
const EVENT_KEY = `.${DATA_KEY}`
|
|
23
|
+
const DATA_API_KEY = '.data-api'
|
|
24
|
+
|
|
25
|
+
const EVENT_CHANGE = `change${EVENT_KEY}`
|
|
26
|
+
const EVENT_SHOW = `show${EVENT_KEY}`
|
|
27
|
+
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
|
28
|
+
const EVENT_HIDE = `hide${EVENT_KEY}`
|
|
29
|
+
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
|
30
|
+
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
|
|
31
|
+
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
|
32
|
+
const EVENT_FOCUSIN_DATA_API = `focusin${EVENT_KEY}${DATA_API_KEY}`
|
|
33
|
+
|
|
34
|
+
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="datepicker"], [data-tblr-toggle="datepicker"]'
|
|
35
|
+
const SELECTOR_DISPLAY = '[data-bs-datepicker-display], [data-tblr-datepicker-display]'
|
|
36
|
+
const SELECTOR_INPUT_WRAPPER = '.input-icon, .input-group'
|
|
37
|
+
const SELECTOR_BOUND_INPUT = 'input[type="hidden"], input[name]'
|
|
38
|
+
|
|
39
|
+
const HIDE_DELAY = 100 // ms delay before hiding after selection
|
|
40
|
+
|
|
41
|
+
const DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/
|
|
42
|
+
|
|
43
|
+
// The date, weekday, month-count and placement options are handed straight to
|
|
44
|
+
// Vanilla Calendar Pro, so they use its own literal unions rather than the wider
|
|
45
|
+
// `string` / `number`. That keeps a bad value a compile error here instead of a
|
|
46
|
+
// silent no-op inside the calendar.
|
|
47
|
+
type ComponentConfig = {
|
|
48
|
+
/** 'light', 'dark' or 'auto' for the popup only; null inherits from the nearest `[data-bs-theme]` */
|
|
49
|
+
datepickerTheme: string | null
|
|
50
|
+
dateMin: DateAny | null
|
|
51
|
+
dateMax: DateAny | null
|
|
52
|
+
/** `Intl.DateTimeFormat` options, or a function(date, locale) returning the text shown in the field */
|
|
53
|
+
dateFormat: Intl.DateTimeFormatOptions | ((date: Date, locale: string | undefined) => string) | null
|
|
54
|
+
/** element that shows the formatted date; a button uses itself or its `[data-bs-datepicker-display]` child */
|
|
55
|
+
displayElement: string | HTMLElement | boolean | null
|
|
56
|
+
displayMonthsCount: MonthsCount
|
|
57
|
+
/** 0 = Sunday, 1 = Monday */
|
|
58
|
+
firstWeekday: WeekDayID
|
|
59
|
+
/** render the calendar in place instead of a popup */
|
|
60
|
+
inline: boolean
|
|
61
|
+
locale: string
|
|
62
|
+
/** element the popup is aligned with; defaults to the `.input-icon` / `.input-group` wrapper or the element */
|
|
63
|
+
positionElement: string | HTMLElement | null
|
|
64
|
+
/** preselected dates as `YYYY-MM-DD` */
|
|
65
|
+
selectedDates: string[]
|
|
66
|
+
selectionMode: DateMode
|
|
67
|
+
placement: PositionToInput
|
|
68
|
+
/** pass-through for any Vanilla Calendar Pro option */
|
|
69
|
+
vcpOptions: Options
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type ComponentConfigInput = Partial<ComponentConfig> & Record<string, unknown>
|
|
73
|
+
|
|
74
|
+
type ChangeEventArgs = { dates: string[]; event: MouseEvent }
|
|
75
|
+
|
|
76
|
+
const Default: ComponentConfig = {
|
|
77
|
+
datepickerTheme: null,
|
|
78
|
+
dateMin: null,
|
|
79
|
+
dateMax: null,
|
|
80
|
+
dateFormat: null,
|
|
81
|
+
displayElement: null,
|
|
82
|
+
displayMonthsCount: 1,
|
|
83
|
+
firstWeekday: 1,
|
|
84
|
+
inline: false,
|
|
85
|
+
locale: 'default',
|
|
86
|
+
positionElement: null,
|
|
87
|
+
selectedDates: [],
|
|
88
|
+
selectionMode: 'single',
|
|
89
|
+
placement: 'left',
|
|
90
|
+
vcpOptions: {},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const DefaultType: Record<keyof ComponentConfig, string> = {
|
|
94
|
+
datepickerTheme: '(null|string)',
|
|
95
|
+
dateMin: '(null|string|number|object)',
|
|
96
|
+
dateMax: '(null|string|number|object)',
|
|
97
|
+
dateFormat: '(null|object|function)',
|
|
98
|
+
displayElement: '(null|string|element|boolean)',
|
|
99
|
+
displayMonthsCount: 'number',
|
|
100
|
+
firstWeekday: 'number',
|
|
101
|
+
inline: 'boolean',
|
|
102
|
+
locale: 'string',
|
|
103
|
+
positionElement: '(null|string|element)',
|
|
104
|
+
selectedDates: 'array',
|
|
105
|
+
selectionMode: 'string',
|
|
106
|
+
placement: 'string',
|
|
107
|
+
vcpOptions: 'object',
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Delegated Data API handlers run in the capture phase, before the plugin's
|
|
111
|
+
// own click listener, which opens the popup from a `setTimeout`. Two nested
|
|
112
|
+
// timeouts are the first point that is after it for certain.
|
|
113
|
+
const afterPluginTimers = (callback: () => void): void => {
|
|
114
|
+
setTimeout(() => setTimeout(callback))
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Class definition
|
|
119
|
+
*
|
|
120
|
+
* Wraps Vanilla Calendar Pro (https://vanilla-calendar.pro), loaded separately
|
|
121
|
+
* as `window.VanillaCalendarPro`. Without the plugin the component is inert.
|
|
122
|
+
* Same options, methods and events as Bootstrap 6's Datepicker, so markup
|
|
123
|
+
* written for one works with the other.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
class Datepicker extends BaseComponent {
|
|
127
|
+
declare _element: HTMLElement & { value: string }
|
|
128
|
+
declare _config: ComponentConfig
|
|
129
|
+
_calendar: Calendar | null = null
|
|
130
|
+
_isShown = false
|
|
131
|
+
// The plugin opens and closes the popup on its own too (its click and focus
|
|
132
|
+
// listeners, Escape, a click outside), so `onShow` and `onHide` are what
|
|
133
|
+
// tracks the state and fires the events; these flags tell them who asked.
|
|
134
|
+
_isShowing = false
|
|
135
|
+
_isHiding = false
|
|
136
|
+
_isSilent = false
|
|
137
|
+
_skipPluginShow = false
|
|
138
|
+
_resolveShown: (() => void) | null = null
|
|
139
|
+
_isInput = false
|
|
140
|
+
_isInline = false
|
|
141
|
+
_boundInput: HTMLInputElement | null = null
|
|
142
|
+
_positionElement: HTMLElement | null = null
|
|
143
|
+
_displayElement: HTMLElement | false | null = null
|
|
144
|
+
_themeObserver: MutationObserver | null = null
|
|
145
|
+
_onFocusIn: ((event: Event) => void) | null = null
|
|
146
|
+
// The plugin builds a popup lazily, so its context has no selection until
|
|
147
|
+
// the first show; this mirror answers `getSelectedDates()` before that.
|
|
148
|
+
_selectedDates: string[] = []
|
|
149
|
+
|
|
150
|
+
constructor(element: ElementSelector, config?: ComponentConfigInput) {
|
|
151
|
+
super(element, config)
|
|
152
|
+
|
|
153
|
+
if (!this._element || !window.VanillaCalendarPro) {
|
|
154
|
+
return
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
this._initCalendar()
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Getters
|
|
161
|
+
static get Default(): ComponentConfig {
|
|
162
|
+
return Default
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
static get DefaultType(): Record<keyof ComponentConfig, string> {
|
|
166
|
+
return DefaultType
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
static get NAME(): string {
|
|
170
|
+
return NAME
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** The Vanilla Calendar Pro instance, for options the component does not expose. */
|
|
174
|
+
get calendar(): Calendar | null {
|
|
175
|
+
return this._calendar
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Public
|
|
179
|
+
toggle(): Promise<void> {
|
|
180
|
+
if (this._config.inline) {
|
|
181
|
+
return Promise.resolve() // Inline calendars are always visible
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return this._isShown ? this.hide() : this.show()
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async show(): Promise<void> {
|
|
188
|
+
if (this._config.inline) {
|
|
189
|
+
return // Inline calendars are always visible
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// The first `calendar.show()` clicks the element to build the popup, and
|
|
193
|
+
// that click comes back here through the Data API; `_isShowing` stops it.
|
|
194
|
+
if (!this._calendar || isDisabled(this._element) || this._isShown || this._isShowing) {
|
|
195
|
+
return
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)
|
|
199
|
+
if (showEvent?.defaultPrevented) {
|
|
200
|
+
return
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
this._isShowing = true
|
|
204
|
+
this._skipPluginShow = false
|
|
205
|
+
this._calendar.show()
|
|
206
|
+
|
|
207
|
+
// The first show builds the popup and opens it a tick later
|
|
208
|
+
if (!this._isShown) {
|
|
209
|
+
await new Promise<void>((resolve) => {
|
|
210
|
+
this._resolveShown = resolve
|
|
211
|
+
afterPluginTimers(resolve)
|
|
212
|
+
})
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this._resolveShown = null
|
|
216
|
+
this._isShowing = false
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
async hide(): Promise<void> {
|
|
220
|
+
if (this._config.inline) {
|
|
221
|
+
return // Inline calendars are always visible
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (!this._calendar || !this._isShown) {
|
|
225
|
+
return
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
|
|
229
|
+
if (hideEvent?.defaultPrevented) {
|
|
230
|
+
return
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// On a click on a button trigger the plugin's own listener runs next and
|
|
234
|
+
// queues a `show()`; without this the popup would open again right away.
|
|
235
|
+
this._skipPluginShow = true
|
|
236
|
+
afterPluginTimers(() => {
|
|
237
|
+
this._skipPluginShow = false
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
this._isHiding = true
|
|
241
|
+
this._calendar.hide()
|
|
242
|
+
this._isHiding = false
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
dispose(): void {
|
|
246
|
+
this._themeObserver?.disconnect()
|
|
247
|
+
|
|
248
|
+
if (this._onFocusIn) {
|
|
249
|
+
EventHandler.off(document, EVENT_FOCUSIN, this._onFocusIn)
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
this._calendar?.destroy()
|
|
253
|
+
|
|
254
|
+
super.dispose()
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
getSelectedDates(): string[] {
|
|
258
|
+
const dates = this._calendar?.context?.selectedDates
|
|
259
|
+
return dates && dates.length > 0 ? [...dates] : [...this._selectedDates]
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
setSelectedDates(dates: DatesArr): void {
|
|
263
|
+
this._selectedDates = dates.map(String)
|
|
264
|
+
this._calendar?.set({ selectedDates: dates })
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Private
|
|
268
|
+
_initCalendar(): void {
|
|
269
|
+
this._isInput = this._element.tagName === 'INPUT'
|
|
270
|
+
this._isInline = this._config.inline
|
|
271
|
+
|
|
272
|
+
// For inline mode, look for a hidden input child to bind to
|
|
273
|
+
if (this._isInline && !this._isInput) {
|
|
274
|
+
this._boundInput = SelectorEngine.findOne(SELECTOR_BOUND_INPUT, this._element) as HTMLInputElement | null
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
this._positionElement = this._resolvePositionElement()
|
|
278
|
+
this._displayElement = this._resolveDisplayElement()
|
|
279
|
+
this._selectedDates = [...this._config.selectedDates]
|
|
280
|
+
|
|
281
|
+
// The calendar always attaches to the element itself. The plugin closes on
|
|
282
|
+
// any click whose target is not exactly its input, so handing it a wrapper
|
|
283
|
+
// makes a click on the field inside close and reopen the popup. The popup
|
|
284
|
+
// is aligned with the position element after each show instead.
|
|
285
|
+
this._calendar = new window.VanillaCalendarPro!.Calendar(this._element, this._buildCalendarOptions())
|
|
286
|
+
this._calendar.init()
|
|
287
|
+
|
|
288
|
+
// An inline calendar renders into the element and drops its children, so
|
|
289
|
+
// the bound input moves right after it to stay in the form.
|
|
290
|
+
if (this._boundInput && !this._boundInput.isConnected) {
|
|
291
|
+
this._element.after(this._boundInput)
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Watch for theme changes on ancestor elements (for live theme switching)
|
|
295
|
+
this._setupThemeObserver()
|
|
296
|
+
|
|
297
|
+
this._setupDismissOnFocus()
|
|
298
|
+
|
|
299
|
+
// Set initial value if input has a value
|
|
300
|
+
if (this._isInput && this._element.value) {
|
|
301
|
+
this._parseInputValue()
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Populate input/display with preselected dates
|
|
305
|
+
this._updateDisplayWithSelectedDates()
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
_updateDisplayWithSelectedDates(): void {
|
|
309
|
+
const { selectedDates } = this._config
|
|
310
|
+
if (!selectedDates || selectedDates.length === 0) {
|
|
311
|
+
return
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
this._writeSelection(selectedDates)
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
_writeSelection(selectedDates: string[]): void {
|
|
318
|
+
const formattedDate = this._formatDateForInput(selectedDates)
|
|
319
|
+
|
|
320
|
+
if (this._isInput) {
|
|
321
|
+
this._element.value = formattedDate
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (this._boundInput) {
|
|
325
|
+
this._boundInput.value = selectedDates.join(',')
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (this._displayElement) {
|
|
329
|
+
this._displayElement.textContent = formattedDate
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
_resolvePositionElement(): HTMLElement {
|
|
334
|
+
let { positionElement } = this._config
|
|
335
|
+
|
|
336
|
+
if (typeof positionElement === 'string') {
|
|
337
|
+
positionElement = SelectorEngine.findOne(positionElement)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Use the input's wrapper when it sits in an icon or group wrapper
|
|
341
|
+
if (!positionElement && this._isInput && !this._isInline) {
|
|
342
|
+
positionElement = this._element.closest<HTMLElement>(SELECTOR_INPUT_WRAPPER)
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return positionElement || this._element
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
_resolveDisplayElement(): HTMLElement | false | null {
|
|
349
|
+
const { displayElement } = this._config
|
|
350
|
+
|
|
351
|
+
if (typeof displayElement === 'string') {
|
|
352
|
+
return SelectorEngine.findOne(displayElement)
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// For buttons/non-inputs (not inline), look for a display child
|
|
356
|
+
if (displayElement === true || (displayElement === null && !this._isInput && !this._isInline)) {
|
|
357
|
+
return SelectorEngine.findOne(SELECTOR_DISPLAY, this._element) || this._element
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return displayElement
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// The plugin positions the popup against the element; a wrapper such as
|
|
364
|
+
// `.input-icon` or `.input-group` wants the popup aligned with its own edges.
|
|
365
|
+
_alignToPositionElement(): void {
|
|
366
|
+
const mainElement = this._calendar?.context?.mainElement
|
|
367
|
+
if (!mainElement || this._isInline || !this._positionElement || this._positionElement === this._element) {
|
|
368
|
+
return
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const anchor = this._positionElement.getBoundingClientRect()
|
|
372
|
+
const popup = mainElement.getBoundingClientRect()
|
|
373
|
+
let { placement } = this._config
|
|
374
|
+
|
|
375
|
+
if (placement === 'auto') {
|
|
376
|
+
placement = anchor.left + popup.width > document.documentElement.clientWidth ? 'right' : 'left'
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const left = placement === 'right' ? anchor.right - popup.width : placement === 'center' ? anchor.left + (anchor.width - popup.width) / 2 : anchor.left
|
|
380
|
+
|
|
381
|
+
mainElement.style.left = `${left + window.scrollX}px`
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
_getThemeAncestor(): Element | null {
|
|
385
|
+
return this._element.closest('[data-bs-theme]')
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
_getEffectiveTheme(): string | null {
|
|
389
|
+
// Priority: explicit datepickerTheme config > inherited from ancestor > none
|
|
390
|
+
const { datepickerTheme } = this._config
|
|
391
|
+
if (datepickerTheme) {
|
|
392
|
+
return datepickerTheme
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return this._getThemeAncestor()?.getAttribute('data-bs-theme') || null
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
_syncThemeAttribute(element: HTMLElement | undefined): void {
|
|
399
|
+
if (!element) {
|
|
400
|
+
return
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const theme = this._getEffectiveTheme()
|
|
404
|
+
|
|
405
|
+
if (theme) {
|
|
406
|
+
// Copy the theme to the popup: the plugin appends it to <body>, which
|
|
407
|
+
// breaks inheritance from a themed container.
|
|
408
|
+
element.setAttribute('data-bs-theme', theme)
|
|
409
|
+
} else {
|
|
410
|
+
element.removeAttribute('data-bs-theme')
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
_setupThemeObserver(): void {
|
|
415
|
+
const ancestor = this._getThemeAncestor()
|
|
416
|
+
if (!ancestor || this._config.datepickerTheme) {
|
|
417
|
+
// No ancestor to watch, or explicit datepickerTheme overrides
|
|
418
|
+
return
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
this._themeObserver = new MutationObserver(() => {
|
|
422
|
+
this._syncThemeAttribute(this._calendar?.context?.mainElement)
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
this._themeObserver.observe(ancestor, {
|
|
426
|
+
attributes: true,
|
|
427
|
+
attributeFilter: ['data-bs-theme'],
|
|
428
|
+
})
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// The plugin ignores focus and mounts the popup on <body>, so close it
|
|
432
|
+
// ourselves when focus leaves both the element and the calendar.
|
|
433
|
+
_setupDismissOnFocus(): void {
|
|
434
|
+
if (this._isInline) {
|
|
435
|
+
return
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
this._onFocusIn = (event: Event): void => {
|
|
439
|
+
if (!this._isShown) {
|
|
440
|
+
return
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
const { target } = event
|
|
444
|
+
const mainElement = this._calendar?.context?.mainElement
|
|
445
|
+
|
|
446
|
+
if (target instanceof Node && (this._element.contains(target) || mainElement?.contains(target))) {
|
|
447
|
+
return
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
this.hide()
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
EventHandler.on(document, EVENT_FOCUSIN, this._onFocusIn)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
_silently(callback: () => void): void {
|
|
457
|
+
this._isSilent = true
|
|
458
|
+
callback()
|
|
459
|
+
this._isSilent = false
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
_handlePluginShow(): void {
|
|
463
|
+
const calendar = this._calendar
|
|
464
|
+
if (!calendar) {
|
|
465
|
+
return
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (!this._isSilent && !this._isShown) {
|
|
469
|
+
// Opened by the plugin itself: right after `hide()` on a trigger click it
|
|
470
|
+
// must stay closed, otherwise it gets the same cancelable `show` event.
|
|
471
|
+
const prevented = this._skipPluginShow || (!this._isShowing && EventHandler.trigger(this._element, EVENT_SHOW)?.defaultPrevented)
|
|
472
|
+
|
|
473
|
+
if (prevented) {
|
|
474
|
+
this._silently(() => calendar.hide())
|
|
475
|
+
return
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
const wasShown = this._isShown
|
|
480
|
+
this._isShown = true
|
|
481
|
+
this._syncThemeAttribute(calendar.context.mainElement)
|
|
482
|
+
this._alignToPositionElement()
|
|
483
|
+
|
|
484
|
+
if (!wasShown) {
|
|
485
|
+
EventHandler.trigger(this._element, EVENT_SHOWN)
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
this._resolveShown?.()
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
_handlePluginHide(): void {
|
|
492
|
+
const calendar = this._calendar
|
|
493
|
+
if (!calendar || this._isSilent || !this._isShown) {
|
|
494
|
+
return
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// Closed by the plugin itself (Escape, a click outside): `hide` is still
|
|
498
|
+
// cancelable, the popup opens again before the browser paints.
|
|
499
|
+
if (!this._isHiding && EventHandler.trigger(this._element, EVENT_HIDE)?.defaultPrevented) {
|
|
500
|
+
this._silently(() => calendar.show())
|
|
501
|
+
return
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
this._isShown = false
|
|
505
|
+
EventHandler.trigger(this._element, EVENT_HIDDEN)
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
_buildCalendarOptions(): Options {
|
|
509
|
+
// The plugin uses 'system' for auto-detection, Bootstrap and Tabler use 'auto'
|
|
510
|
+
const theme = this._getEffectiveTheme()
|
|
511
|
+
const vcpTheme = !theme || theme === 'auto' ? 'system' : theme
|
|
512
|
+
|
|
513
|
+
const calendarOptions: Options = {
|
|
514
|
+
...this._config.vcpOptions,
|
|
515
|
+
inputMode: !this._isInline,
|
|
516
|
+
positionToInput: this._config.placement,
|
|
517
|
+
firstWeekday: this._config.firstWeekday,
|
|
518
|
+
locale: this._config.locale,
|
|
519
|
+
selectionDatesMode: this._config.selectionMode,
|
|
520
|
+
selectedDates: this._config.selectedDates,
|
|
521
|
+
displayMonthsCount: this._config.displayMonthsCount,
|
|
522
|
+
type: this._config.displayMonthsCount > 1 ? 'multiple' : 'default',
|
|
523
|
+
selectedTheme: vcpTheme,
|
|
524
|
+
themeAttrDetect: '[data-bs-theme]',
|
|
525
|
+
onClickDate: (self, event) => this._handleDateClick(self, event),
|
|
526
|
+
onInit: (self) => {
|
|
527
|
+
this._syncThemeAttribute(self.context.mainElement)
|
|
528
|
+
},
|
|
529
|
+
onShow: () => this._handlePluginShow(),
|
|
530
|
+
onHide: () => this._handlePluginHide(),
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// Navigate to the month of the first selected date
|
|
534
|
+
const [firstSelected] = this._config.selectedDates
|
|
535
|
+
if (firstSelected) {
|
|
536
|
+
const firstDate = this._parseDate(firstSelected)
|
|
537
|
+
// `getMonth()` is always 0-11, which TypeScript cannot narrow on its own
|
|
538
|
+
calendarOptions.selectedMonth = firstDate.getMonth() as Range<12>
|
|
539
|
+
calendarOptions.selectedYear = firstDate.getFullYear()
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
if (this._config.dateMin) {
|
|
543
|
+
calendarOptions.dateMin = this._config.dateMin
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
if (this._config.dateMax) {
|
|
547
|
+
calendarOptions.dateMax = this._config.dateMax
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
return calendarOptions
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
_handleDateClick(self: Calendar, event: MouseEvent): void {
|
|
554
|
+
const selectedDates = [...self.context.selectedDates]
|
|
555
|
+
this._selectedDates = selectedDates
|
|
556
|
+
|
|
557
|
+
if (selectedDates.length > 0) {
|
|
558
|
+
this._writeSelection(selectedDates)
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
const args: ChangeEventArgs = { dates: selectedDates, event }
|
|
562
|
+
EventHandler.trigger(this._element, EVENT_CHANGE, args)
|
|
563
|
+
|
|
564
|
+
this._maybeHideAfterSelection(selectedDates)
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
_maybeHideAfterSelection(selectedDates: string[]): void {
|
|
568
|
+
if (this._isInline) {
|
|
569
|
+
return
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
const shouldHide = (this._config.selectionMode === 'single' && selectedDates.length > 0) || (this._config.selectionMode === 'multiple-ranged' && selectedDates.length >= 2)
|
|
573
|
+
|
|
574
|
+
if (shouldHide) {
|
|
575
|
+
setTimeout(() => this.hide(), HIDE_DELAY)
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
_parseDate(dateStr: string): Date {
|
|
580
|
+
const [year = 0, month = 1, day = 1] = dateStr.split('-').map(Number)
|
|
581
|
+
return new Date(year, month - 1, day)
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
_formatDate(dateStr: string): string {
|
|
585
|
+
const date = this._parseDate(dateStr)
|
|
586
|
+
const locale = this._config.locale === 'default' ? undefined : this._config.locale
|
|
587
|
+
const { dateFormat } = this._config
|
|
588
|
+
|
|
589
|
+
// Custom function formatter
|
|
590
|
+
if (typeof dateFormat === 'function') {
|
|
591
|
+
return dateFormat(date, locale)
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// Intl.DateTimeFormat options object
|
|
595
|
+
if (dateFormat && typeof dateFormat === 'object') {
|
|
596
|
+
return new Intl.DateTimeFormat(locale, dateFormat).format(date)
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
// Default: locale-aware formatting
|
|
600
|
+
return date.toLocaleDateString(locale)
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
_formatDateForInput(dates: string[]): string {
|
|
604
|
+
if (dates.length === 0) {
|
|
605
|
+
return ''
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
if (dates.length === 1) {
|
|
609
|
+
return this._formatDate(dates[0]!)
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// For date ranges, use en-dash; for multiple dates, use comma
|
|
613
|
+
const separator = this._config.selectionMode === 'multiple-ranged' ? ' – ' : ', '
|
|
614
|
+
return dates.map((date) => this._formatDate(date)).join(separator)
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
_parseInputValue(): void {
|
|
618
|
+
const value = this._element.value.trim()
|
|
619
|
+
if (!value) {
|
|
620
|
+
return
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// `YYYY-MM-DD` is read as a local date: `new Date('2020-06-20')` would be
|
|
624
|
+
// UTC midnight and land on the previous day west of Greenwich.
|
|
625
|
+
const date = DATE_PATTERN.test(value) ? this._parseDate(value) : new Date(value)
|
|
626
|
+
if (Number.isNaN(date.getTime())) {
|
|
627
|
+
return
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const year = date.getFullYear()
|
|
631
|
+
const month = String(date.getMonth() + 1).padStart(2, '0')
|
|
632
|
+
const day = String(date.getDate()).padStart(2, '0')
|
|
633
|
+
this._selectedDates = [`${year}-${month}-${day}`]
|
|
634
|
+
this._calendar?.set({ selectedDates: this._selectedDates })
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Data API implementation
|
|
640
|
+
*/
|
|
641
|
+
|
|
642
|
+
// js-docs-start datepicker-init
|
|
643
|
+
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (this: HTMLElement, event: Event) {
|
|
644
|
+
// Inputs open on focus, and inline calendars are always visible
|
|
645
|
+
if (this.tagName === 'INPUT' || this.dataset.bsInline === 'true' || this.dataset.tblrInline === 'true') {
|
|
646
|
+
return
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
event.preventDefault()
|
|
650
|
+
;(Datepicker.getOrCreateInstance(this) as Datepicker).toggle()
|
|
651
|
+
})
|
|
652
|
+
|
|
653
|
+
EventHandler.on(document, EVENT_FOCUSIN_DATA_API, SELECTOR_DATA_TOGGLE, function (this: HTMLElement) {
|
|
654
|
+
if (this.tagName !== 'INPUT') {
|
|
655
|
+
return
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
;(Datepicker.getOrCreateInstance(this) as Datepicker).show()
|
|
659
|
+
})
|
|
660
|
+
|
|
661
|
+
// Render on load what cannot wait for a focus or a click: inline calendars,
|
|
662
|
+
// and fields with preselected dates or a value, so they show it right away.
|
|
663
|
+
initAll(SELECTOR_DATA_TOGGLE, Datepicker, (element) => {
|
|
664
|
+
const { dataset } = element
|
|
665
|
+
|
|
666
|
+
return dataset.bsInline === 'true' || dataset.tblrInline === 'true' || 'bsSelectedDates' in dataset || 'tblrSelectedDates' in dataset || Boolean((element as HTMLInputElement).value)
|
|
667
|
+
})
|
|
668
|
+
// js-docs-end datepicker-init
|
|
669
|
+
|
|
670
|
+
export default Datepicker
|
|
671
|
+
export type { ComponentConfig as DatepickerConfig, ChangeEventArgs as DatepickerChangeEventArgs }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers kept only so that projects written for an older 1.x release keep
|
|
3
|
+
* working. They are exported as the `tabler` namespace: `tabler.tabler.getColor()`
|
|
4
|
+
* from the bundle, `import { tabler } from '@tabler/core'` from the module.
|
|
5
|
+
*
|
|
6
|
+
* Removed in 2.0, together with this file. Read the custom property yourself,
|
|
7
|
+
* and mix the opacity in with `color-mix()`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const prefix: string = 'tblr-'
|
|
11
|
+
|
|
12
|
+
export const hexToRgba = (hex: string, opacity: number): string | null => {
|
|
13
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
|
|
14
|
+
|
|
15
|
+
return result ? `rgba(${parseInt(result[1]!, 16)}, ${parseInt(result[2]!, 16)}, ${parseInt(result[3]!, 16)}, ${opacity})` : null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const getColor = (color: string, opacity: number = 1): string | null => {
|
|
19
|
+
const c = getComputedStyle(document.body).getPropertyValue(`--${prefix}${color}`).trim()
|
|
20
|
+
|
|
21
|
+
if (opacity === 1) {
|
|
22
|
+
return c
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// The palette is written in `oklch()` since 1.6, which `hexToRgba()` cannot
|
|
26
|
+
// read, so anything that is not a hex colour gets its opacity from the browser.
|
|
27
|
+
return hexToRgba(c, opacity) ?? (c ? `color-mix(in srgb, ${c} ${opacity * 100}%, transparent)` : null)
|
|
28
|
+
}
|
package/js/src/dropdown.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Dropdown } from './bootstrap'
|
|
|
4
4
|
const dropdownTriggerList: HTMLElement[] = [].slice.call(document.querySelectorAll<HTMLElement>('[data-bs-toggle="dropdown"]'))
|
|
5
5
|
dropdownTriggerList.map(function (dropdownTriggerEl: HTMLElement) {
|
|
6
6
|
const options = {
|
|
7
|
-
boundary: dropdownTriggerEl.getAttribute('data-bs-boundary') === 'viewport' ? document.documentElement : 'clippingParents',
|
|
7
|
+
boundary: dropdownTriggerEl.getAttribute('data-bs-boundary') === 'viewport' ? document.documentElement : ('clippingParents' as const),
|
|
8
8
|
}
|
|
9
9
|
return new Dropdown(dropdownTriggerEl, options)
|
|
10
10
|
})
|