@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,609 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------------
|
|
3
|
+
* Tabler sparkline.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 EventHandler from './bootstrap/dom/event-handler'
|
|
10
|
+
import { initAll } from './bootstrap/util/component-functions'
|
|
11
|
+
import type { ComponentConfig as BaseConfig, ElementSelector } from './bootstrap/types'
|
|
12
|
+
|
|
13
|
+
type SparklineType = 'line' | 'bar' | 'circle' | 'tristate'
|
|
14
|
+
type SparklineFill = 'none' | 'auto'
|
|
15
|
+
type SparklineSpot = 'none' | 'min' | 'max' | 'last'
|
|
16
|
+
type SparklineValuesInput = number[] | number | string
|
|
17
|
+
|
|
18
|
+
type ComponentConfig = {
|
|
19
|
+
type: SparklineType
|
|
20
|
+
values: number[]
|
|
21
|
+
width: number
|
|
22
|
+
height: number
|
|
23
|
+
min: number | null
|
|
24
|
+
max: number | null
|
|
25
|
+
fill: SparklineFill
|
|
26
|
+
spot: SparklineSpot
|
|
27
|
+
pad: number
|
|
28
|
+
barGap: number
|
|
29
|
+
barRadius: number
|
|
30
|
+
label: string | number | boolean | null
|
|
31
|
+
threshold: number | null
|
|
32
|
+
animation: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type ComponentConfigInput = Partial<Omit<ComponentConfig, 'values'>> & {
|
|
36
|
+
values?: SparklineValuesInput
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constants
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
const NAME = 'sparkline'
|
|
44
|
+
const DATA_KEY = `bs.${NAME}`
|
|
45
|
+
const EVENT_KEY = `.${DATA_KEY}`
|
|
46
|
+
|
|
47
|
+
const EVENT_RENDERED = `rendered${EVENT_KEY}`
|
|
48
|
+
const EVENT_UPDATED = `updated${EVENT_KEY}`
|
|
49
|
+
|
|
50
|
+
const CLASS_NAME_SVG = 'sparkline-svg'
|
|
51
|
+
const CLASS_NAME_LABEL = 'sparkline-label'
|
|
52
|
+
|
|
53
|
+
const SELECTOR_DATA_TOGGLE = `[data-bs-toggle="${NAME}"], [data-tblr-toggle="${NAME}"]`
|
|
54
|
+
|
|
55
|
+
// Custom properties are declared on `.sparkline` in scss/ui/_sparkline.scss and
|
|
56
|
+
// get the `--tblr-` prefix at build time.
|
|
57
|
+
const CSS_VAR_PREFIX = '--tblr-sparkline'
|
|
58
|
+
const SVG_NS = 'http://www.w3.org/2000/svg'
|
|
59
|
+
|
|
60
|
+
const Default: ComponentConfig = {
|
|
61
|
+
type: 'line',
|
|
62
|
+
values: [],
|
|
63
|
+
width: 80,
|
|
64
|
+
height: 24,
|
|
65
|
+
min: null,
|
|
66
|
+
max: null,
|
|
67
|
+
fill: 'none',
|
|
68
|
+
spot: 'none',
|
|
69
|
+
pad: 2,
|
|
70
|
+
barGap: 2,
|
|
71
|
+
barRadius: 2,
|
|
72
|
+
label: null,
|
|
73
|
+
threshold: null,
|
|
74
|
+
animation: 300,
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const DefaultType: Record<keyof ComponentConfig, string> = {
|
|
78
|
+
type: 'string',
|
|
79
|
+
values: 'array',
|
|
80
|
+
width: 'number',
|
|
81
|
+
height: 'number',
|
|
82
|
+
min: '(number|null)',
|
|
83
|
+
max: '(number|null)',
|
|
84
|
+
fill: 'string',
|
|
85
|
+
spot: 'string',
|
|
86
|
+
pad: 'number',
|
|
87
|
+
barGap: 'number',
|
|
88
|
+
barRadius: 'number',
|
|
89
|
+
label: '(string|number|boolean|null)',
|
|
90
|
+
threshold: '(number|null)',
|
|
91
|
+
animation: 'number',
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Helpers
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
const svgEl = <K extends keyof SVGElementTagNameMap>(tag: K): SVGElementTagNameMap[K] => document.createElementNS(SVG_NS, tag)
|
|
99
|
+
|
|
100
|
+
const setAttr = (el: Element, attrs: Record<string, string | number | null | undefined>): void => {
|
|
101
|
+
for (const [key, value] of Object.entries(attrs)) {
|
|
102
|
+
if (value !== null && value !== undefined) {
|
|
103
|
+
el.setAttribute(key, String(value))
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const cssVar = (name: string): string => `var(${CSS_VAR_PREFIX}-${name})`
|
|
109
|
+
|
|
110
|
+
const clampSpan = (min: number, max: number): number => {
|
|
111
|
+
const span = max - min
|
|
112
|
+
return span === 0 ? 1 : span
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Accepts "3,4,2" as well as a JSON array literal "[3,4,2]".
|
|
116
|
+
const parseNumberList = (input: unknown): number[] => {
|
|
117
|
+
const raw = String(input ?? '').trim()
|
|
118
|
+
if (!raw) {
|
|
119
|
+
return []
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (raw.startsWith('[')) {
|
|
123
|
+
try {
|
|
124
|
+
const arr = JSON.parse(raw)
|
|
125
|
+
return Array.isArray(arr) ? arr.map(Number).filter(Number.isFinite) : []
|
|
126
|
+
} catch {
|
|
127
|
+
return []
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return raw
|
|
132
|
+
.split(',')
|
|
133
|
+
.map((value) => Number(value.trim()))
|
|
134
|
+
.filter(Number.isFinite)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const toValues = (input: unknown): number[] => {
|
|
138
|
+
if (Array.isArray(input)) {
|
|
139
|
+
return input.map(Number).filter(Number.isFinite)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (typeof input === 'number') {
|
|
143
|
+
return Number.isFinite(input) ? [input] : []
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return parseNumberList(input)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// The value range a chart is drawn in: forced by `min` / `max`, otherwise the
|
|
150
|
+
// data itself, widened to include the threshold (and zero for bars) so those
|
|
151
|
+
// lines are always inside the chart.
|
|
152
|
+
const rangeOf = (values: number[], minForced: number | null, maxForced: number | null, ...include: number[]): { min: number; max: number; span: number } => {
|
|
153
|
+
const min = minForced ?? Math.min(...values, ...include)
|
|
154
|
+
const max = maxForced ?? Math.max(...values, ...include)
|
|
155
|
+
return { min, max, span: clampSpan(min, max) }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const NUMBER_RE = /-?\d*\.?\d+(?:e[-+]?\d+)?/g
|
|
159
|
+
|
|
160
|
+
// Interpolates the numbers inside two attribute values with the same shape:
|
|
161
|
+
// "0,20 40,10" → "0,10 40,20", or a path `d`. Falls back to the target when
|
|
162
|
+
// the shapes differ.
|
|
163
|
+
const lerpAttr = (from: string, to: string, t: number): string => {
|
|
164
|
+
const a = from.match(NUMBER_RE)
|
|
165
|
+
const b = to.match(NUMBER_RE)
|
|
166
|
+
if (!a || !b || a.length !== b.length || from.replace(NUMBER_RE, '#') !== to.replace(NUMBER_RE, '#')) {
|
|
167
|
+
return to
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
let i = 0
|
|
171
|
+
return to.replace(NUMBER_RE, () => {
|
|
172
|
+
const value = Number(a[i]) + (Number(b[i]) - Number(a[i])) * t
|
|
173
|
+
i++
|
|
174
|
+
return String(Math.round(value * 1000) / 1000)
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const easeOut = (t: number): number => 1 - (1 - t) ** 3
|
|
179
|
+
|
|
180
|
+
const findIndexByMode = (values: number[], mode: SparklineSpot): number => {
|
|
181
|
+
if (values.length === 0 || mode === 'none') {
|
|
182
|
+
return -1
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (mode === 'last') {
|
|
186
|
+
return values.length - 1
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
let idx = 0
|
|
190
|
+
for (let i = 1; i < values.length; i++) {
|
|
191
|
+
if (mode === 'min' ? values[i] < values[idx] : values[i] > values[idx]) {
|
|
192
|
+
idx = i
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return idx
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const getCssNumber = (element: Element, name: string, fallback: number): number => {
|
|
200
|
+
const raw = getComputedStyle(element).getPropertyValue(`${CSS_VAR_PREFIX}-${name}`).trim()
|
|
201
|
+
const value = Number.parseFloat(raw)
|
|
202
|
+
return Number.isFinite(value) ? value : fallback
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Class definition
|
|
207
|
+
*
|
|
208
|
+
* Tiny inline SVG chart (line, bar or circle) rendered from data attributes:
|
|
209
|
+
*
|
|
210
|
+
* <span class="sparkline" data-bs-toggle="sparkline" data-bs-type="line" data-bs-values="3,4,2,6,5,8,7"></span>
|
|
211
|
+
*
|
|
212
|
+
* Colours and stroke widths come from the `--tblr-sparkline-*` custom
|
|
213
|
+
* properties, so a text colour utility on the element themes the chart.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
class Sparkline extends BaseComponent {
|
|
217
|
+
declare _element: HTMLElement
|
|
218
|
+
declare _config: ComponentConfig
|
|
219
|
+
_userConfig: ComponentConfigInput = {}
|
|
220
|
+
_frame = 0
|
|
221
|
+
|
|
222
|
+
constructor(element: ElementSelector, config?: ComponentConfigInput) {
|
|
223
|
+
super(element, config)
|
|
224
|
+
|
|
225
|
+
if (!this._element) {
|
|
226
|
+
return
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Kept so that render() can re-read the data attributes on top of it.
|
|
230
|
+
this._userConfig = { ...config }
|
|
231
|
+
this.render()
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Getters
|
|
235
|
+
static get Default(): ComponentConfig {
|
|
236
|
+
return Default
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
static get DefaultType(): Record<keyof ComponentConfig, string> {
|
|
240
|
+
return DefaultType
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
static get NAME(): string {
|
|
244
|
+
return NAME
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Public
|
|
248
|
+
update(values: SparklineValuesInput): void {
|
|
249
|
+
const serialized = Array.isArray(values) ? values.join(',') : String(values)
|
|
250
|
+
const attribute = this._element.hasAttribute('data-tblr-values') ? 'data-tblr-values' : 'data-bs-values'
|
|
251
|
+
this._element.setAttribute(attribute, serialized)
|
|
252
|
+
|
|
253
|
+
// The attribute is now the source of truth for the values.
|
|
254
|
+
delete this._userConfig.values
|
|
255
|
+
this.render()
|
|
256
|
+
EventHandler.trigger(this._element, EVENT_UPDATED)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
render(): void {
|
|
260
|
+
this._config = this._getConfig(this._userConfig) as ComponentConfig
|
|
261
|
+
const previous = this._element.querySelector<SVGSVGElement>('svg')
|
|
262
|
+
this._element.querySelector(`.${CLASS_NAME_LABEL}`)?.remove()
|
|
263
|
+
|
|
264
|
+
if (this._config.values.length === 0) {
|
|
265
|
+
this._element.innerHTML = ''
|
|
266
|
+
return
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
let svg: SVGSVGElement
|
|
270
|
+
switch (this._config.type) {
|
|
271
|
+
case 'bar':
|
|
272
|
+
svg = this._renderBars()
|
|
273
|
+
break
|
|
274
|
+
case 'tristate':
|
|
275
|
+
svg = this._renderTristate()
|
|
276
|
+
break
|
|
277
|
+
case 'circle':
|
|
278
|
+
svg = this._renderCircle()
|
|
279
|
+
break
|
|
280
|
+
default:
|
|
281
|
+
svg = this._renderLine()
|
|
282
|
+
break
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// On an update with the same shape (type and number of values) the old
|
|
286
|
+
// SVG stays in place and its attributes are tweened to the new ones.
|
|
287
|
+
if (previous && this._canAnimate(previous, svg)) {
|
|
288
|
+
this._animate(previous, svg)
|
|
289
|
+
} else {
|
|
290
|
+
cancelAnimationFrame(this._frame)
|
|
291
|
+
previous?.remove()
|
|
292
|
+
this._element.append(svg)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// A text label centered over the chart, mainly for the circle type. Plain
|
|
296
|
+
// HTML rather than SVG text, so it keeps the page font and is not
|
|
297
|
+
// stretched with the viewBox.
|
|
298
|
+
const text = this._labelText()
|
|
299
|
+
if (text !== '') {
|
|
300
|
+
const label = document.createElement('span')
|
|
301
|
+
label.className = CLASS_NAME_LABEL
|
|
302
|
+
label.textContent = text
|
|
303
|
+
this._element.append(label)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
EventHandler.trigger(this._element, EVENT_RENDERED)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
dispose(): void {
|
|
310
|
+
cancelAnimationFrame(this._frame)
|
|
311
|
+
this._element.innerHTML = ''
|
|
312
|
+
super.dispose()
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Private
|
|
316
|
+
_configAfterMerge(config: BaseConfig): BaseConfig {
|
|
317
|
+
config.values = toValues(config.values)
|
|
318
|
+
return config
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// `auto` (or `true`) derives the label from the data: the share of `max`
|
|
322
|
+
// for a circle, the last value otherwise. Anything else is printed as is.
|
|
323
|
+
_labelText(): string {
|
|
324
|
+
const { label, values, type } = this._config
|
|
325
|
+
if (label === null || label === false || label === '') {
|
|
326
|
+
return ''
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (label !== 'auto' && label !== true) {
|
|
330
|
+
return String(label)
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (type === 'circle') {
|
|
334
|
+
return `${Math.round(this._circleRatio() * 100)}%`
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return String(values[values.length - 1])
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// A single value is a share of `max` (default 100); a second value may be
|
|
341
|
+
// passed as the maximum instead: data-bs-values="72,100".
|
|
342
|
+
_circleRatio(): number {
|
|
343
|
+
const cfg = this._config
|
|
344
|
+
const value = cfg.values[0] ?? 0
|
|
345
|
+
const max = cfg.max ?? (cfg.values.length > 1 ? cfg.values[1] : 100)
|
|
346
|
+
const min = cfg.min ?? 0
|
|
347
|
+
return Math.max(0, Math.min(1, (value - min) / clampSpan(min, max)))
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
_canAnimate(from: SVGSVGElement, to: SVGSVGElement): boolean {
|
|
351
|
+
if (this._config.animation <= 0 || window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
352
|
+
return false
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (from.getAttribute('viewBox') !== to.getAttribute('viewBox') || from.children.length !== to.children.length) {
|
|
356
|
+
return false
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return Array.from(from.children).every((child, i) => child.tagName === to.children[i].tagName)
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
_animate(from: SVGSVGElement, to: SVGSVGElement): void {
|
|
363
|
+
cancelAnimationFrame(this._frame)
|
|
364
|
+
|
|
365
|
+
const pairs = Array.from(to.children).map((target, i) => {
|
|
366
|
+
const source = from.children[i]
|
|
367
|
+
const tweens: [string, string, string][] = []
|
|
368
|
+
for (const { name, value } of Array.from(target.attributes)) {
|
|
369
|
+
const start = source.getAttribute(name)
|
|
370
|
+
if (start === null || start === value) {
|
|
371
|
+
source.setAttribute(name, value)
|
|
372
|
+
} else {
|
|
373
|
+
tweens.push([name, start, value])
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return { source, tweens }
|
|
378
|
+
})
|
|
379
|
+
|
|
380
|
+
const duration = this._config.animation
|
|
381
|
+
const started = performance.now()
|
|
382
|
+
const step = (now: number): void => {
|
|
383
|
+
const t = easeOut(Math.min(1, (now - started) / duration))
|
|
384
|
+
for (const { source, tweens } of pairs) {
|
|
385
|
+
for (const [name, start, end] of tweens) {
|
|
386
|
+
source.setAttribute(name, t >= 1 ? end : lerpAttr(start, end, t))
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (t < 1) {
|
|
391
|
+
this._frame = requestAnimationFrame(step)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
this._frame = requestAnimationFrame(step)
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// A 1px horizontal guide: solid for the zero line, dashed for the threshold.
|
|
399
|
+
_hairline(svg: SVGSVGElement, y: number, color: string, dashed = false): void {
|
|
400
|
+
const line = svgEl('line')
|
|
401
|
+
setAttr(line, {
|
|
402
|
+
'x1': 0,
|
|
403
|
+
'x2': this._config.width,
|
|
404
|
+
'y1': y,
|
|
405
|
+
'y2': y,
|
|
406
|
+
'stroke': cssVar(color),
|
|
407
|
+
'stroke-width': 1,
|
|
408
|
+
'stroke-dasharray': dashed ? '3 2' : null,
|
|
409
|
+
'vector-effect': 'non-scaling-stroke',
|
|
410
|
+
})
|
|
411
|
+
svg.append(line)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
_createSvg(): SVGSVGElement {
|
|
415
|
+
const { width, height } = this._config
|
|
416
|
+
const svg = svgEl('svg')
|
|
417
|
+
setAttr(svg, {
|
|
418
|
+
'viewBox': `0 0 ${width} ${height}`,
|
|
419
|
+
'preserveAspectRatio': 'none',
|
|
420
|
+
'width': width,
|
|
421
|
+
'height': height,
|
|
422
|
+
'class': CLASS_NAME_SVG,
|
|
423
|
+
'aria-hidden': 'true',
|
|
424
|
+
})
|
|
425
|
+
return svg
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
_renderLine(): SVGSVGElement {
|
|
429
|
+
const cfg = this._config
|
|
430
|
+
const svg = this._createSvg()
|
|
431
|
+
|
|
432
|
+
const { min, span } = rangeOf(cfg.values, cfg.min, cfg.max, ...(cfg.threshold === null ? [] : [cfg.threshold]))
|
|
433
|
+
const yOf = (value: number): number => cfg.pad + (1 - (value - min) / span) * (cfg.height - cfg.pad * 2)
|
|
434
|
+
const ys = cfg.values.map(yOf)
|
|
435
|
+
const step = ys.length > 1 ? cfg.width / (ys.length - 1) : cfg.width
|
|
436
|
+
|
|
437
|
+
if (cfg.threshold !== null) {
|
|
438
|
+
this._hairline(svg, yOf(cfg.threshold), 'threshold', true)
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (cfg.fill === 'auto') {
|
|
442
|
+
const area = svgEl('path')
|
|
443
|
+
setAttr(area, {
|
|
444
|
+
d: this._areaPath(ys, step, cfg.height),
|
|
445
|
+
fill: cssVar('fill'),
|
|
446
|
+
stroke: 'none',
|
|
447
|
+
})
|
|
448
|
+
svg.append(area)
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const line = svgEl('polyline')
|
|
452
|
+
setAttr(line, {
|
|
453
|
+
'points': ys.map((y, i) => `${i * step},${y}`).join(' '),
|
|
454
|
+
'fill': 'none',
|
|
455
|
+
'stroke': cssVar('stroke'),
|
|
456
|
+
'stroke-width': cssVar('stroke-width'),
|
|
457
|
+
'stroke-linecap': 'round',
|
|
458
|
+
'stroke-linejoin': 'round',
|
|
459
|
+
})
|
|
460
|
+
svg.append(line)
|
|
461
|
+
|
|
462
|
+
const spotIndex = findIndexByMode(cfg.values, cfg.spot)
|
|
463
|
+
if (spotIndex >= 0) {
|
|
464
|
+
const spot = svgEl('circle')
|
|
465
|
+
setAttr(spot, {
|
|
466
|
+
cx: spotIndex * step,
|
|
467
|
+
cy: ys[spotIndex],
|
|
468
|
+
r: getCssNumber(this._element, 'spot-size', 2),
|
|
469
|
+
fill: cssVar('spot'),
|
|
470
|
+
})
|
|
471
|
+
svg.append(spot)
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return svg
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
_areaPath(ys: number[], step: number, height: number): string {
|
|
478
|
+
const top = ys.map((y, i) => `${i === 0 ? 'M' : 'L'} ${i * step} ${y}`).join(' ')
|
|
479
|
+
const lastX = (ys.length - 1) * step
|
|
480
|
+
return `${top} L ${lastX} ${height} L 0 ${height} Z`
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
_renderBars(): SVGSVGElement {
|
|
484
|
+
const cfg = this._config
|
|
485
|
+
const svg = this._createSvg()
|
|
486
|
+
|
|
487
|
+
const { min, span } = rangeOf(cfg.values, cfg.min, cfg.max, 0, ...(cfg.threshold === null ? [] : [cfg.threshold]))
|
|
488
|
+
const yOf = (value: number): number => cfg.height - ((value - min) / span) * cfg.height
|
|
489
|
+
|
|
490
|
+
const count = cfg.values.length
|
|
491
|
+
const barWidth = (cfg.width - cfg.barGap * (count - 1)) / count
|
|
492
|
+
// Bars grow from the zero line: upwards for positive values, downwards
|
|
493
|
+
// (in the "negative" color) for negative ones. With no negative values the
|
|
494
|
+
// zero line is the bottom edge; otherwise it is drawn as a hairline.
|
|
495
|
+
const zeroY = yOf(0)
|
|
496
|
+
|
|
497
|
+
if (min < 0) {
|
|
498
|
+
this._hairline(svg, zeroY, 'zero')
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// With a threshold, the bars below it take the "negative" color instead.
|
|
502
|
+
if (cfg.threshold !== null) {
|
|
503
|
+
this._hairline(svg, yOf(cfg.threshold), 'threshold', true)
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// A bar spans from the zero line to its value, clipped to the chart when a
|
|
507
|
+
// forced `min` / `max` puts part of it (or the zero line) outside.
|
|
508
|
+
const clip = (y: number): number => Math.max(0, Math.min(cfg.height, y))
|
|
509
|
+
|
|
510
|
+
cfg.values.forEach((value, i) => {
|
|
511
|
+
const top = clip(yOf(Math.max(value, 0)))
|
|
512
|
+
const bottom = clip(yOf(Math.min(value, 0)))
|
|
513
|
+
const below = cfg.threshold === null ? value < 0 : value < cfg.threshold
|
|
514
|
+
const bar = svgEl('rect')
|
|
515
|
+
setAttr(bar, {
|
|
516
|
+
x: i * (barWidth + cfg.barGap),
|
|
517
|
+
y: top,
|
|
518
|
+
width: barWidth,
|
|
519
|
+
height: bottom - top,
|
|
520
|
+
rx: cfg.barRadius,
|
|
521
|
+
fill: cssVar(below ? 'negative' : 'stroke'),
|
|
522
|
+
})
|
|
523
|
+
svg.append(bar)
|
|
524
|
+
})
|
|
525
|
+
|
|
526
|
+
return svg
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Win/loss: every value is a full bar up (positive), down (negative) or a
|
|
530
|
+
// short tick on the zero line (zero), regardless of its size.
|
|
531
|
+
_renderTristate(): SVGSVGElement {
|
|
532
|
+
const cfg = this._config
|
|
533
|
+
const svg = this._createSvg()
|
|
534
|
+
|
|
535
|
+
const count = cfg.values.length
|
|
536
|
+
const barWidth = (cfg.width - cfg.barGap * (count - 1)) / count
|
|
537
|
+
const zeroY = cfg.height / 2
|
|
538
|
+
const tick = Math.min(2, zeroY)
|
|
539
|
+
|
|
540
|
+
this._hairline(svg, zeroY, 'zero')
|
|
541
|
+
|
|
542
|
+
cfg.values.forEach((value, i) => {
|
|
543
|
+
const bar = svgEl('rect')
|
|
544
|
+
const attrs = value > 0 ? { y: 0, height: zeroY, fill: 'stroke' } : value < 0 ? { y: zeroY, height: zeroY, fill: 'negative' } : { y: zeroY - tick / 2, height: tick, fill: 'track' }
|
|
545
|
+
setAttr(bar, {
|
|
546
|
+
x: i * (barWidth + cfg.barGap),
|
|
547
|
+
y: attrs.y,
|
|
548
|
+
width: barWidth,
|
|
549
|
+
height: attrs.height,
|
|
550
|
+
rx: cfg.barRadius,
|
|
551
|
+
fill: cssVar(attrs.fill),
|
|
552
|
+
})
|
|
553
|
+
svg.append(bar)
|
|
554
|
+
})
|
|
555
|
+
|
|
556
|
+
return svg
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
_renderCircle(): SVGSVGElement {
|
|
560
|
+
const cfg = this._config
|
|
561
|
+
const svg = this._createSvg()
|
|
562
|
+
|
|
563
|
+
const strokeWidth = getCssNumber(this._element, 'stroke-width', 3)
|
|
564
|
+
const radius = Math.max(0, Math.min(cfg.width, cfg.height) / 2 - strokeWidth / 2)
|
|
565
|
+
const cx = cfg.width / 2
|
|
566
|
+
const cy = cfg.height / 2
|
|
567
|
+
|
|
568
|
+
const ratio = this._circleRatio()
|
|
569
|
+
const circumference = 2 * Math.PI * radius
|
|
570
|
+
|
|
571
|
+
const track = svgEl('circle')
|
|
572
|
+
setAttr(track, {
|
|
573
|
+
'cx': cx,
|
|
574
|
+
'cy': cy,
|
|
575
|
+
'r': radius,
|
|
576
|
+
'fill': 'none',
|
|
577
|
+
'stroke': cssVar('track'),
|
|
578
|
+
'stroke-width': strokeWidth,
|
|
579
|
+
})
|
|
580
|
+
svg.append(track)
|
|
581
|
+
|
|
582
|
+
const ring = svgEl('circle')
|
|
583
|
+
setAttr(ring, {
|
|
584
|
+
'cx': cx,
|
|
585
|
+
'cy': cy,
|
|
586
|
+
'r': radius,
|
|
587
|
+
'fill': 'none',
|
|
588
|
+
'stroke': cssVar('stroke'),
|
|
589
|
+
'stroke-width': strokeWidth,
|
|
590
|
+
'stroke-linecap': 'round',
|
|
591
|
+
'stroke-dasharray': circumference,
|
|
592
|
+
'stroke-dashoffset': circumference * (1 - ratio),
|
|
593
|
+
'transform': `rotate(-90 ${cx} ${cy})`,
|
|
594
|
+
})
|
|
595
|
+
svg.append(ring)
|
|
596
|
+
|
|
597
|
+
return svg
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Data API implementation
|
|
603
|
+
*/
|
|
604
|
+
|
|
605
|
+
// js-docs-start sparkline-init
|
|
606
|
+
initAll(SELECTOR_DATA_TOGGLE, Sparkline)
|
|
607
|
+
// js-docs-end sparkline-init
|
|
608
|
+
|
|
609
|
+
export default Sparkline
|