@dynect/base 0.1.0 → 0.2.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/package.json +1 -1
- package/src/runtime/assets/svg/app/asset.svg +8 -0
- package/src/runtime/assets/svg/app/crm.svg +8 -0
- package/src/runtime/assets/svg/app/dark/asset.svg +6 -0
- package/src/runtime/assets/svg/app/dark/crm.svg +6 -0
- package/src/runtime/assets/svg/app/dark/erp.svg +5 -0
- package/src/runtime/assets/svg/app/dark/hrms.svg +8 -0
- package/src/runtime/assets/svg/app/dark/investment.svg +10 -0
- package/src/runtime/assets/svg/app/dark/pos.svg +5 -0
- package/src/runtime/assets/svg/app/dark/project.svg +8 -0
- package/src/runtime/assets/svg/app/dark/retail.svg +9 -0
- package/src/runtime/assets/svg/app/erp.svg +5 -0
- package/src/runtime/assets/svg/app/hrms.svg +10 -0
- package/src/runtime/assets/svg/app/investment.svg +12 -0
- package/src/runtime/assets/svg/app/outline/asset.svg +5 -0
- package/src/runtime/assets/svg/app/outline/crm.svg +6 -0
- package/src/runtime/assets/svg/app/outline/erp.svg +5 -0
- package/src/runtime/assets/svg/app/outline/hrms.svg +7 -0
- package/src/runtime/assets/svg/app/outline/investment.svg +9 -0
- package/src/runtime/assets/svg/app/outline/pos.svg +5 -0
- package/src/runtime/assets/svg/app/outline/project.svg +8 -0
- package/src/runtime/assets/svg/app/outline/retail.svg +9 -0
- package/src/runtime/assets/svg/app/pos.svg +7 -0
- package/src/runtime/assets/svg/app/project.svg +10 -0
- package/src/runtime/assets/svg/app/retail.svg +11 -0
- package/src/runtime/assets/svg/flags/ad.svg +150 -0
- package/src/runtime/assets/svg/flags/ae.svg +6 -0
- package/src/runtime/assets/svg/flags/af.svg +81 -0
- package/src/runtime/assets/svg/flags/ag.svg +14 -0
- package/src/runtime/assets/svg/flags/ai.svg +29 -0
- package/src/runtime/assets/svg/flags/al.svg +5 -0
- package/src/runtime/assets/svg/flags/am.svg +5 -0
- package/src/runtime/assets/svg/flags/ao.svg +13 -0
- package/src/runtime/assets/svg/flags/aq.svg +5 -0
- package/src/runtime/assets/svg/flags/ar.svg +32 -0
- package/src/runtime/assets/svg/flags/arab.svg +109 -0
- package/src/runtime/assets/svg/flags/as.svg +72 -0
- package/src/runtime/assets/svg/flags/asean.svg +13 -0
- package/src/runtime/assets/svg/flags/at.svg +4 -0
- package/src/runtime/assets/svg/flags/au.svg +8 -0
- package/src/runtime/assets/svg/flags/aw.svg +186 -0
- package/src/runtime/assets/svg/flags/ax.svg +18 -0
- package/src/runtime/assets/svg/flags/az.svg +8 -0
- package/src/runtime/assets/svg/flags/ba.svg +12 -0
- package/src/runtime/assets/svg/flags/bb.svg +6 -0
- package/src/runtime/assets/svg/flags/bd.svg +4 -0
- package/src/runtime/assets/svg/flags/be.svg +7 -0
- package/src/runtime/assets/svg/flags/bf.svg +7 -0
- package/src/runtime/assets/svg/flags/bg.svg +5 -0
- package/src/runtime/assets/svg/flags/bh.svg +4 -0
- package/src/runtime/assets/svg/flags/bi.svg +15 -0
- package/src/runtime/assets/svg/flags/bj.svg +14 -0
- package/src/runtime/assets/svg/flags/bl.svg +5 -0
- package/src/runtime/assets/svg/flags/bm.svg +97 -0
- package/src/runtime/assets/svg/flags/bn.svg +36 -0
- package/src/runtime/assets/svg/flags/bo.svg +673 -0
- package/src/runtime/assets/svg/flags/bq.svg +5 -0
- package/src/runtime/assets/svg/flags/br.svg +45 -0
- package/src/runtime/assets/svg/flags/bs.svg +13 -0
- package/src/runtime/assets/svg/flags/bt.svg +89 -0
- package/src/runtime/assets/svg/flags/bv.svg +13 -0
- package/src/runtime/assets/svg/flags/bw.svg +7 -0
- package/src/runtime/assets/svg/flags/by.svg +18 -0
- package/src/runtime/assets/svg/flags/bz.svg +145 -0
- package/src/runtime/assets/svg/flags/ca.svg +4 -0
- package/src/runtime/assets/svg/flags/cc.svg +19 -0
- package/src/runtime/assets/svg/flags/cd.svg +5 -0
- package/src/runtime/assets/svg/flags/cefta.svg +13 -0
- package/src/runtime/assets/svg/flags/cf.svg +15 -0
- package/src/runtime/assets/svg/flags/cg.svg +12 -0
- package/src/runtime/assets/svg/flags/ch.svg +9 -0
- package/src/runtime/assets/svg/flags/ci.svg +7 -0
- package/src/runtime/assets/svg/flags/ck.svg +9 -0
- package/src/runtime/assets/svg/flags/cl.svg +13 -0
- package/src/runtime/assets/svg/flags/cm.svg +15 -0
- package/src/runtime/assets/svg/flags/cn.svg +11 -0
- package/src/runtime/assets/svg/flags/co.svg +7 -0
- package/src/runtime/assets/svg/flags/cp.svg +7 -0
- package/src/runtime/assets/svg/flags/cr.svg +7 -0
- package/src/runtime/assets/svg/flags/cu.svg +13 -0
- package/src/runtime/assets/svg/flags/cv.svg +13 -0
- package/src/runtime/assets/svg/flags/cw.svg +14 -0
- package/src/runtime/assets/svg/flags/cx.svg +15 -0
- package/src/runtime/assets/svg/flags/cy.svg +6 -0
- package/src/runtime/assets/svg/flags/cz.svg +5 -0
- package/src/runtime/assets/svg/flags/de.svg +5 -0
- package/src/runtime/assets/svg/flags/dg.svg +130 -0
- package/src/runtime/assets/svg/flags/dj.svg +13 -0
- package/src/runtime/assets/svg/flags/dk.svg +5 -0
- package/src/runtime/assets/svg/flags/dm.svg +152 -0
- package/src/runtime/assets/svg/flags/do.svg +121 -0
- package/src/runtime/assets/svg/flags/dz.svg +5 -0
- package/src/runtime/assets/svg/flags/eac.svg +48 -0
- package/src/runtime/assets/svg/flags/ec.svg +138 -0
- package/src/runtime/assets/svg/flags/ee.svg +5 -0
- package/src/runtime/assets/svg/flags/eg.svg +38 -0
- package/src/runtime/assets/svg/flags/eh.svg +16 -0
- package/src/runtime/assets/svg/flags/er.svg +8 -0
- package/src/runtime/assets/svg/flags/es-ct.svg +4 -0
- package/src/runtime/assets/svg/flags/es-ga.svg +187 -0
- package/src/runtime/assets/svg/flags/es-pv.svg +5 -0
- package/src/runtime/assets/svg/flags/es.svg +544 -0
- package/src/runtime/assets/svg/flags/et.svg +14 -0
- package/src/runtime/assets/svg/flags/eu.svg +28 -0
- package/src/runtime/assets/svg/flags/fi.svg +5 -0
- package/src/runtime/assets/svg/flags/fj.svg +120 -0
- package/src/runtime/assets/svg/flags/fk.svg +90 -0
- package/src/runtime/assets/svg/flags/fm.svg +11 -0
- package/src/runtime/assets/svg/flags/fo.svg +12 -0
- package/src/runtime/assets/svg/flags/fr.svg +5 -0
- package/src/runtime/assets/svg/flags/ga.svg +7 -0
- package/src/runtime/assets/svg/flags/gb-eng.svg +5 -0
- package/src/runtime/assets/svg/flags/gb-nir.svg +132 -0
- package/src/runtime/assets/svg/flags/gb-sct.svg +4 -0
- package/src/runtime/assets/svg/flags/gb-wls.svg +9 -0
- package/src/runtime/assets/svg/flags/gb.svg +7 -0
- package/src/runtime/assets/svg/flags/gd.svg +27 -0
- package/src/runtime/assets/svg/flags/ge.svg +6 -0
- package/src/runtime/assets/svg/flags/gf.svg +5 -0
- package/src/runtime/assets/svg/flags/gg.svg +9 -0
- package/src/runtime/assets/svg/flags/gh.svg +6 -0
- package/src/runtime/assets/svg/flags/gi.svg +32 -0
- package/src/runtime/assets/svg/flags/gl.svg +4 -0
- package/src/runtime/assets/svg/flags/gm.svg +14 -0
- package/src/runtime/assets/svg/flags/gn.svg +7 -0
- package/src/runtime/assets/svg/flags/gp.svg +5 -0
- package/src/runtime/assets/svg/flags/gq.svg +23 -0
- package/src/runtime/assets/svg/flags/gr.svg +16 -0
- package/src/runtime/assets/svg/flags/gs.svg +133 -0
- package/src/runtime/assets/svg/flags/gt.svg +204 -0
- package/src/runtime/assets/svg/flags/gu.svg +19 -0
- package/src/runtime/assets/svg/flags/gw.svg +13 -0
- package/src/runtime/assets/svg/flags/gy.svg +9 -0
- package/src/runtime/assets/svg/flags/hk.svg +8 -0
- package/src/runtime/assets/svg/flags/hm.svg +8 -0
- package/src/runtime/assets/svg/flags/hn.svg +18 -0
- package/src/runtime/assets/svg/flags/hr.svg +58 -0
- package/src/runtime/assets/svg/flags/ht.svg +116 -0
- package/src/runtime/assets/svg/flags/hu.svg +7 -0
- package/src/runtime/assets/svg/flags/ic.svg +7 -0
- package/src/runtime/assets/svg/flags/id.svg +4 -0
- package/src/runtime/assets/svg/flags/ie.svg +7 -0
- package/src/runtime/assets/svg/flags/il.svg +14 -0
- package/src/runtime/assets/svg/flags/im.svg +36 -0
- package/src/runtime/assets/svg/flags/in.svg +25 -0
- package/src/runtime/assets/svg/flags/io.svg +130 -0
- package/src/runtime/assets/svg/flags/iq.svg +10 -0
- package/src/runtime/assets/svg/flags/ir.svg +219 -0
- package/src/runtime/assets/svg/flags/is.svg +12 -0
- package/src/runtime/assets/svg/flags/it.svg +7 -0
- package/src/runtime/assets/svg/flags/je.svg +62 -0
- package/src/runtime/assets/svg/flags/jm.svg +8 -0
- package/src/runtime/assets/svg/flags/jo.svg +16 -0
- package/src/runtime/assets/svg/flags/jp.svg +11 -0
- package/src/runtime/assets/svg/flags/ke.svg +23 -0
- package/src/runtime/assets/svg/flags/kg.svg +4 -0
- package/src/runtime/assets/svg/flags/kh.svg +61 -0
- package/src/runtime/assets/svg/flags/ki.svg +36 -0
- package/src/runtime/assets/svg/flags/km.svg +16 -0
- package/src/runtime/assets/svg/flags/kn.svg +14 -0
- package/src/runtime/assets/svg/flags/kp.svg +15 -0
- package/src/runtime/assets/svg/flags/kr.svg +24 -0
- package/src/runtime/assets/svg/flags/kw.svg +13 -0
- package/src/runtime/assets/svg/flags/ky.svg +103 -0
- package/src/runtime/assets/svg/flags/kz.svg +36 -0
- package/src/runtime/assets/svg/flags/la.svg +12 -0
- package/src/runtime/assets/svg/flags/lb.svg +15 -0
- package/src/runtime/assets/svg/flags/lc.svg +8 -0
- package/src/runtime/assets/svg/flags/li.svg +43 -0
- package/src/runtime/assets/svg/flags/lk.svg +22 -0
- package/src/runtime/assets/svg/flags/lr.svg +14 -0
- package/src/runtime/assets/svg/flags/ls.svg +8 -0
- package/src/runtime/assets/svg/flags/lt.svg +7 -0
- package/src/runtime/assets/svg/flags/lu.svg +5 -0
- package/src/runtime/assets/svg/flags/lv.svg +6 -0
- package/src/runtime/assets/svg/flags/ly.svg +13 -0
- package/src/runtime/assets/svg/flags/ma.svg +4 -0
- package/src/runtime/assets/svg/flags/mc.svg +6 -0
- package/src/runtime/assets/svg/flags/md.svg +70 -0
- package/src/runtime/assets/svg/flags/me.svg +116 -0
- package/src/runtime/assets/svg/flags/mf.svg +5 -0
- package/src/runtime/assets/svg/flags/mg.svg +7 -0
- package/src/runtime/assets/svg/flags/mh.svg +7 -0
- package/src/runtime/assets/svg/flags/mk.svg +5 -0
- package/src/runtime/assets/svg/flags/ml.svg +7 -0
- package/src/runtime/assets/svg/flags/mm.svg +12 -0
- package/src/runtime/assets/svg/flags/mn.svg +14 -0
- package/src/runtime/assets/svg/flags/mo.svg +9 -0
- package/src/runtime/assets/svg/flags/mp.svg +86 -0
- package/src/runtime/assets/svg/flags/mq.svg +5 -0
- package/src/runtime/assets/svg/flags/mr.svg +6 -0
- package/src/runtime/assets/svg/flags/ms.svg +29 -0
- package/src/runtime/assets/svg/flags/mt.svg +58 -0
- package/src/runtime/assets/svg/flags/mu.svg +8 -0
- package/src/runtime/assets/svg/flags/mv.svg +6 -0
- package/src/runtime/assets/svg/flags/mw.svg +10 -0
- package/src/runtime/assets/svg/flags/mx.svg +382 -0
- package/src/runtime/assets/svg/flags/my.svg +26 -0
- package/src/runtime/assets/svg/flags/mz.svg +21 -0
- package/src/runtime/assets/svg/flags/na.svg +16 -0
- package/src/runtime/assets/svg/flags/nc.svg +13 -0
- package/src/runtime/assets/svg/flags/ne.svg +6 -0
- package/src/runtime/assets/svg/flags/nf.svg +9 -0
- package/src/runtime/assets/svg/flags/ng.svg +6 -0
- package/src/runtime/assets/svg/flags/ni.svg +129 -0
- package/src/runtime/assets/svg/flags/nl.svg +5 -0
- package/src/runtime/assets/svg/flags/no.svg +7 -0
- package/src/runtime/assets/svg/flags/np.svg +13 -0
- package/src/runtime/assets/svg/flags/nr.svg +12 -0
- package/src/runtime/assets/svg/flags/nu.svg +10 -0
- package/src/runtime/assets/svg/flags/nz.svg +36 -0
- package/src/runtime/assets/svg/flags/om.svg +115 -0
- package/src/runtime/assets/svg/flags/pa.svg +14 -0
- package/src/runtime/assets/svg/flags/pc.svg +33 -0
- package/src/runtime/assets/svg/flags/pe.svg +4 -0
- package/src/runtime/assets/svg/flags/pf.svg +19 -0
- package/src/runtime/assets/svg/flags/pg.svg +9 -0
- package/src/runtime/assets/svg/flags/ph.svg +6 -0
- package/src/runtime/assets/svg/flags/pk.svg +15 -0
- package/src/runtime/assets/svg/flags/pl.svg +6 -0
- package/src/runtime/assets/svg/flags/pm.svg +5 -0
- package/src/runtime/assets/svg/flags/pn.svg +53 -0
- package/src/runtime/assets/svg/flags/pr.svg +13 -0
- package/src/runtime/assets/svg/flags/ps.svg +15 -0
- package/src/runtime/assets/svg/flags/pt.svg +57 -0
- package/src/runtime/assets/svg/flags/pw.svg +11 -0
- package/src/runtime/assets/svg/flags/py.svg +157 -0
- package/src/runtime/assets/svg/flags/qa.svg +4 -0
- package/src/runtime/assets/svg/flags/re.svg +5 -0
- package/src/runtime/assets/svg/flags/ro.svg +7 -0
- package/src/runtime/assets/svg/flags/rs.svg +292 -0
- package/src/runtime/assets/svg/flags/ru.svg +5 -0
- package/src/runtime/assets/svg/flags/rw.svg +13 -0
- package/src/runtime/assets/svg/flags/sa.svg +25 -0
- package/src/runtime/assets/svg/flags/sb.svg +13 -0
- package/src/runtime/assets/svg/flags/sc.svg +7 -0
- package/src/runtime/assets/svg/flags/sd.svg +13 -0
- package/src/runtime/assets/svg/flags/se.svg +4 -0
- package/src/runtime/assets/svg/flags/sg.svg +13 -0
- package/src/runtime/assets/svg/flags/sh-ac.svg +689 -0
- package/src/runtime/assets/svg/flags/sh-hl.svg +164 -0
- package/src/runtime/assets/svg/flags/sh-ta.svg +76 -0
- package/src/runtime/assets/svg/flags/sh.svg +7 -0
- package/src/runtime/assets/svg/flags/si.svg +18 -0
- package/src/runtime/assets/svg/flags/sj.svg +7 -0
- package/src/runtime/assets/svg/flags/sk.svg +9 -0
- package/src/runtime/assets/svg/flags/sl.svg +7 -0
- package/src/runtime/assets/svg/flags/sm.svg +75 -0
- package/src/runtime/assets/svg/flags/sn.svg +8 -0
- package/src/runtime/assets/svg/flags/so.svg +11 -0
- package/src/runtime/assets/svg/flags/sr.svg +6 -0
- package/src/runtime/assets/svg/flags/ss.svg +8 -0
- package/src/runtime/assets/svg/flags/st.svg +16 -0
- package/src/runtime/assets/svg/flags/state/ft.svg +5503 -0
- package/src/runtime/assets/svg/flags/state/johor.svg +59 -0
- package/src/runtime/assets/svg/flags/state/kedah.svg +246 -0
- package/src/runtime/assets/svg/flags/state/kelantan.svg +84 -0
- package/src/runtime/assets/svg/flags/state/kuala_lumpur.svg +9 -0
- package/src/runtime/assets/svg/flags/state/labuan.svg +10 -0
- package/src/runtime/assets/svg/flags/state/melaka.svg +56 -0
- package/src/runtime/assets/svg/flags/state/negeri_sembilan.svg +5 -0
- package/src/runtime/assets/svg/flags/state/pahang.svg +5 -0
- package/src/runtime/assets/svg/flags/state/penang.svg +514 -0
- package/src/runtime/assets/svg/flags/state/perak.svg +5 -0
- package/src/runtime/assets/svg/flags/state/perlis.svg +5 -0
- package/src/runtime/assets/svg/flags/state/putrajaya.svg +2631 -0
- package/src/runtime/assets/svg/flags/state/sabah.svg +8 -0
- package/src/runtime/assets/svg/flags/state/sarawak.svg +18 -0
- package/src/runtime/assets/svg/flags/state/selangor.svg +20 -0
- package/src/runtime/assets/svg/flags/state/terengganu.svg +6 -0
- package/src/runtime/assets/svg/flags/sv.svg +593 -0
- package/src/runtime/assets/svg/flags/sx.svg +56 -0
- package/src/runtime/assets/svg/flags/sy.svg +6 -0
- package/src/runtime/assets/svg/flags/sz.svg +34 -0
- package/src/runtime/assets/svg/flags/tc.svg +50 -0
- package/src/runtime/assets/svg/flags/td.svg +7 -0
- package/src/runtime/assets/svg/flags/tf.svg +15 -0
- package/src/runtime/assets/svg/flags/tg.svg +14 -0
- package/src/runtime/assets/svg/flags/th.svg +7 -0
- package/src/runtime/assets/svg/flags/tj.svg +22 -0
- package/src/runtime/assets/svg/flags/tk.svg +5 -0
- package/src/runtime/assets/svg/flags/tl.svg +13 -0
- package/src/runtime/assets/svg/flags/tm.svg +204 -0
- package/src/runtime/assets/svg/flags/tn.svg +4 -0
- package/src/runtime/assets/svg/flags/to.svg +10 -0
- package/src/runtime/assets/svg/flags/tr.svg +8 -0
- package/src/runtime/assets/svg/flags/tt.svg +5 -0
- package/src/runtime/assets/svg/flags/tv.svg +9 -0
- package/src/runtime/assets/svg/flags/tw.svg +34 -0
- package/src/runtime/assets/svg/flags/tz.svg +13 -0
- package/src/runtime/assets/svg/flags/ua.svg +6 -0
- package/src/runtime/assets/svg/flags/ug.svg +30 -0
- package/src/runtime/assets/svg/flags/um.svg +9 -0
- package/src/runtime/assets/svg/flags/un.svg +16 -0
- package/src/runtime/assets/svg/flags/us.svg +9 -0
- package/src/runtime/assets/svg/flags/uy.svg +28 -0
- package/src/runtime/assets/svg/flags/uz.svg +30 -0
- package/src/runtime/assets/svg/flags/va.svg +190 -0
- package/src/runtime/assets/svg/flags/vc.svg +8 -0
- package/src/runtime/assets/svg/flags/ve.svg +26 -0
- package/src/runtime/assets/svg/flags/vg.svg +59 -0
- package/src/runtime/assets/svg/flags/vi.svg +28 -0
- package/src/runtime/assets/svg/flags/vn.svg +11 -0
- package/src/runtime/assets/svg/flags/vu.svg +21 -0
- package/src/runtime/assets/svg/flags/wf.svg +5 -0
- package/src/runtime/assets/svg/flags/ws.svg +7 -0
- package/src/runtime/assets/svg/flags/xk.svg +5 -0
- package/src/runtime/assets/svg/flags/xx.svg +4 -0
- package/src/runtime/assets/svg/flags/ye.svg +7 -0
- package/src/runtime/assets/svg/flags/yt.svg +5 -0
- package/src/runtime/assets/svg/flags/za.svg +17 -0
- package/src/runtime/assets/svg/flags/zm.svg +27 -0
- package/src/runtime/assets/svg/flags/zw.svg +21 -0
- package/src/runtime/assets/svg/icon/activity.svg +4 -0
- package/src/runtime/assets/svg/icon/arrow-left.svg +3 -0
- package/src/runtime/assets/svg/icon/arrow-right.svg +3 -0
- package/src/runtime/assets/svg/icon/building-07.svg +4 -0
- package/src/runtime/assets/svg/icon/car-01.svg +4 -0
- package/src/runtime/assets/svg/icon/cash.svg +3 -0
- package/src/runtime/assets/svg/icon/clipboard-check.svg +3 -0
- package/src/runtime/assets/svg/icon/cog.svg +3 -0
- package/src/runtime/assets/svg/icon/colapse-sidebar.svg +3 -0
- package/src/runtime/assets/svg/icon/file-chart-bar.svg +3 -0
- package/src/runtime/assets/svg/icon/frame.svg +3 -0
- package/src/runtime/assets/svg/icon/gift-09.svg +7 -0
- package/src/runtime/assets/svg/icon/grid.svg +227 -0
- package/src/runtime/assets/svg/icon/layers.svg +3 -0
- package/src/runtime/assets/svg/icon/medical-cross.svg +3 -0
- package/src/runtime/assets/svg/icon/minimise-sidebar.svg +3 -0
- package/src/runtime/assets/svg/icon/rocket.svg +3 -0
- package/src/runtime/assets/svg/icon/speedometer-04.svg +5 -0
- package/src/runtime/assets/svg/icon/user-headset.svg +3 -0
- package/src/runtime/assets/svg/icon/users-group.svg +3 -0
- package/src/runtime/assets/svg/icon/users.svg +3 -0
- package/src/runtime/assets/svg/images/document-folders.svg +86 -0
- package/src/runtime/assets/svg/images/error-404.svg +56 -0
- package/src/runtime/assets/svg/images/error-500.svg +243 -0
- package/src/runtime/assets/svg/images/login-right-content.svg +272 -0
- package/src/runtime/assets/svg/images/man-question-mark.svg +130 -0
- package/src/runtime/assets/svg/logo/logomark.svg +4 -0
- package/src/runtime/assets/svg/logo/logotext.svg +10 -0
- package/src/runtime/components/base/event-calendar/AgendaView.vue +92 -0
- package/src/runtime/components/base/event-calendar/ColorManager.vue +149 -0
- package/src/runtime/components/base/event-calendar/DayEventsOverflowPopup.vue +41 -0
- package/src/runtime/components/base/event-calendar/DayView.vue +254 -0
- package/src/runtime/components/base/event-calendar/DragDropVisualFeedback.vue +97 -0
- package/src/runtime/components/base/event-calendar/EventCalendar.md +203 -0
- package/src/runtime/components/base/event-calendar/EventCalendar.vue +414 -0
- package/src/runtime/components/base/event-calendar/EventModal.vue +573 -0
- package/src/runtime/components/base/event-calendar/EventResizeHandle.vue +284 -0
- package/src/runtime/components/base/event-calendar/ExternalCalendarSettings.vue +138 -0
- package/src/runtime/components/base/event-calendar/LocationDisplay.vue +62 -0
- package/src/runtime/components/base/event-calendar/MonthView.vue +272 -0
- package/src/runtime/components/base/event-calendar/WeekView.vue +329 -0
- package/src/runtime/components/base/event-calendar/composables/useAdvancedValidation.ts +557 -0
- package/src/runtime/components/base/event-calendar/composables/useCalendarUtils.ts +70 -0
- package/src/runtime/components/base/event-calendar/composables/useColorManager.ts +244 -0
- package/src/runtime/components/base/event-calendar/composables/useCompatibility.ts +318 -0
- package/src/runtime/components/base/event-calendar/composables/useDragAndDrop.ts +481 -0
- package/src/runtime/components/base/event-calendar/composables/useEventFiltering.ts +116 -0
- package/src/runtime/components/base/event-calendar/composables/useEventStatus.ts +108 -0
- package/src/runtime/components/base/event-calendar/composables/useEventStore.ts +325 -0
- package/src/runtime/components/base/event-calendar/composables/useExternalCalendar.ts +340 -0
- package/src/runtime/components/base/event-calendar/composables/useKeyboardNavigation.ts +95 -0
- package/src/runtime/components/base/event-calendar/composables/useMonitoring.ts +433 -0
- package/src/runtime/components/base/event-calendar/composables/useMultiDayLayout.ts +131 -0
- package/src/runtime/components/base/event-calendar/composables/usePerformanceCache.ts +134 -0
- package/src/runtime/components/base/event-calendar/composables/useRecurringEvents.ts +291 -0
- package/src/runtime/components/base/event-calendar/composables/useResilientErrorHandling.ts +480 -0
- package/src/runtime/components/base/event-calendar/composables/useSecurity.ts +425 -0
- package/src/runtime/components/base/event-calendar/composables/useTimezone.ts +256 -0
- package/src/runtime/components/base/event-calendar/constants.ts +18 -0
- package/src/runtime/components/base/event-calendar/eventModal.schema.ts +32 -0
- package/src/runtime/components/base/event-calendar/types.ts +96 -0
- package/src/runtime/components/base/org-chart/index.vue +359 -0
- package/src/runtime/components/base/org-chart/main.ts +2372 -0
- package/src/runtime/components/base/org-chart/svg-icons.ts +58 -0
- package/src/runtime/components/base/org-chart/types.ts +492 -0
- package/src/runtime/components/base/signature/index.vue +218 -0
- package/src/runtime/components/base/toast/Toast.vue +396 -0
- package/src/runtime/components/base/toast/Toaster.vue +1241 -0
- package/src/runtime/components/base/toast/assets/CloseIcon.vue +3 -0
- package/src/runtime/components/base/toast/assets/ErrorIcon.vue +7 -0
- package/src/runtime/components/base/toast/assets/IconWrapper.vue +13 -0
- package/src/runtime/components/base/toast/assets/InfoIcon.vue +7 -0
- package/src/runtime/components/base/toast/assets/Loader.vue +18 -0
- package/src/runtime/components/base/toast/assets/SuccessIcon.vue +7 -0
- package/src/runtime/components/base/toast/assets/WarningIcon.vue +7 -0
- package/src/runtime/components/base/toast/constant.ts +30 -0
- package/src/runtime/components/base/toast/hooks.ts +114 -0
- package/src/runtime/components/base/toast/state.ts +317 -0
- package/src/runtime/components/base/toast/types.ts +201 -0
- package/src/runtime/components/chart/Bar.vue +175 -0
- package/src/runtime/components/chart/Line.vue +149 -0
- package/src/runtime/components/chart/Pie.vue +115 -0
- package/src/runtime/components/chart/Radar.vue +167 -0
- package/src/runtime/components/dynect/Accordion.vue +152 -0
- package/src/runtime/components/dynect/Alert.vue +194 -0
- package/src/runtime/components/dynect/Autocomplete.vue +404 -0
- package/src/runtime/components/dynect/Avatar.vue +132 -0
- package/src/runtime/components/dynect/AvatarGroup.vue +56 -0
- package/src/runtime/components/dynect/AvatarLabel.vue +82 -0
- package/src/runtime/components/dynect/Badge.vue +101 -0
- package/src/runtime/components/dynect/Button.vue +36 -0
- package/src/runtime/components/dynect/Checkbox.vue +80 -0
- package/src/runtime/components/dynect/DatePicker.vue +180 -0
- package/src/runtime/components/dynect/DateRange.vue +217 -0
- package/src/runtime/components/dynect/Dropzone.vue +355 -0
- package/src/runtime/components/dynect/EventCalendar.vue +66 -0
- package/src/runtime/components/dynect/Filters.vue +162 -0
- package/src/runtime/components/dynect/FormDescription.vue +20 -0
- package/src/runtime/components/dynect/FormError.vue +20 -0
- package/src/runtime/components/dynect/FormField.vue +45 -0
- package/src/runtime/components/dynect/FormLabel.vue +40 -0
- package/src/runtime/components/dynect/Gantt.vue +231 -0
- package/src/runtime/components/dynect/Input.vue +234 -0
- package/src/runtime/components/dynect/Kanban.vue +128 -0
- package/src/runtime/components/dynect/Modal.vue +118 -0
- package/src/runtime/components/dynect/OtpInput.vue +148 -0
- package/src/runtime/components/dynect/Pagination.vue +57 -0
- package/src/runtime/components/dynect/PermissionGuard.vue +50 -0
- package/src/runtime/components/dynect/Progress.vue +102 -0
- package/src/runtime/components/dynect/Radio.vue +90 -0
- package/src/runtime/components/dynect/Select.vue +190 -0
- package/src/runtime/components/dynect/SelectMultiple.vue +259 -0
- package/src/runtime/components/dynect/Sheet.vue +80 -0
- package/src/runtime/components/dynect/Signature.vue +135 -0
- package/src/runtime/components/dynect/SwitchColor.vue +14 -0
- package/src/runtime/components/dynect/SwitchLanguage.vue +39 -0
- package/src/runtime/components/dynect/Table.vue +488 -0
- package/src/runtime/components/dynect/TagsInput.vue +388 -0
- package/src/runtime/components/dynect/Telephone.vue +651 -0
- package/src/runtime/components/dynect/TextEditor.vue +94 -0
- package/src/runtime/components/dynect/Textarea.vue +108 -0
- package/src/runtime/components/dynect/TimePicker.vue +275 -0
- package/src/runtime/components/dynect/Timeline.vue +301 -0
- package/src/runtime/components/dynect/Toggle.vue +100 -0
- package/src/runtime/components/ui/accordion/Accordion.vue +15 -0
- package/src/runtime/components/ui/accordion/AccordionContent.vue +19 -0
- package/src/runtime/components/ui/accordion/AccordionItem.vue +19 -0
- package/src/runtime/components/ui/accordion/AccordionTrigger.vue +32 -0
- package/src/runtime/components/ui/accordion/index.ts +4 -0
- package/src/runtime/components/ui/alert/Alert.vue +17 -0
- package/src/runtime/components/ui/alert/AlertDescription.vue +14 -0
- package/src/runtime/components/ui/alert/AlertTitle.vue +14 -0
- package/src/runtime/components/ui/alert/index.ts +20 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialog.vue +15 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogAction.vue +18 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogCancel.vue +18 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogContent.vue +36 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogDescription.vue +17 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogFooter.vue +14 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogHeader.vue +14 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogTitle.vue +17 -0
- package/src/runtime/components/ui/alert-dialog/AlertDialogTrigger.vue +12 -0
- package/src/runtime/components/ui/alert-dialog/index.ts +9 -0
- package/src/runtime/components/ui/aspect-ratio/AspectRatio.vue +12 -0
- package/src/runtime/components/ui/aspect-ratio/index.ts +1 -0
- package/src/runtime/components/ui/avatar/Avatar.vue +15 -0
- package/src/runtime/components/ui/avatar/AvatarFallback.vue +17 -0
- package/src/runtime/components/ui/avatar/AvatarImage.vue +12 -0
- package/src/runtime/components/ui/avatar/index.ts +3 -0
- package/src/runtime/components/ui/badge/Badge.vue +24 -0
- package/src/runtime/components/ui/badge/index.ts +22 -0
- package/src/runtime/components/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +18 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbLink.vue +16 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbList.vue +14 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbPage.vue +14 -0
- package/src/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +17 -0
- package/src/runtime/components/ui/breadcrumb/index.ts +7 -0
- package/src/runtime/components/ui/button/Button.vue +38 -0
- package/src/runtime/components/ui/button/index.ts +51 -0
- package/src/runtime/components/ui/button-group/ButtonGroup.vue +17 -0
- package/src/runtime/components/ui/button-group/ButtonGroupSeparator.vue +16 -0
- package/src/runtime/components/ui/button-group/ButtonGroupText.vue +22 -0
- package/src/runtime/components/ui/button-group/index.ts +23 -0
- package/src/runtime/components/ui/calendar/Calendar.vue +163 -0
- package/src/runtime/components/ui/calendar/CalendarCell.vue +19 -0
- package/src/runtime/components/ui/calendar/CalendarCellTrigger.vue +47 -0
- package/src/runtime/components/ui/calendar/CalendarGrid.vue +19 -0
- package/src/runtime/components/ui/calendar/CalendarGridBody.vue +12 -0
- package/src/runtime/components/ui/calendar/CalendarGridHead.vue +13 -0
- package/src/runtime/components/ui/calendar/CalendarGridRow.vue +19 -0
- package/src/runtime/components/ui/calendar/CalendarHeadCell.vue +19 -0
- package/src/runtime/components/ui/calendar/CalendarHeader.vue +19 -0
- package/src/runtime/components/ui/calendar/CalendarHeading.vue +25 -0
- package/src/runtime/components/ui/calendar/CalendarNextButton.vue +22 -0
- package/src/runtime/components/ui/calendar/CalendarPrevButton.vue +22 -0
- package/src/runtime/components/ui/calendar/index.ts +14 -0
- package/src/runtime/components/ui/card/Card.vue +14 -0
- package/src/runtime/components/ui/card/CardAction.vue +14 -0
- package/src/runtime/components/ui/card/CardContent.vue +14 -0
- package/src/runtime/components/ui/card/CardDescription.vue +14 -0
- package/src/runtime/components/ui/card/CardFooter.vue +14 -0
- package/src/runtime/components/ui/card/CardHeader.vue +14 -0
- package/src/runtime/components/ui/card/CardTitle.vue +14 -0
- package/src/runtime/components/ui/card/index.ts +7 -0
- package/src/runtime/components/ui/carousel/Carousel.vue +46 -0
- package/src/runtime/components/ui/carousel/CarouselContent.vue +21 -0
- package/src/runtime/components/ui/carousel/CarouselItem.vue +15 -0
- package/src/runtime/components/ui/carousel/CarouselNext.vue +32 -0
- package/src/runtime/components/ui/carousel/CarouselPrevious.vue +32 -0
- package/src/runtime/components/ui/carousel/index.ts +8 -0
- package/src/runtime/components/ui/carousel/interface.ts +22 -0
- package/src/runtime/components/ui/carousel/useCarousel.ts +51 -0
- package/src/runtime/components/ui/chart/ChartContainer.vue +61 -0
- package/src/runtime/components/ui/chart/ChartLegendContent.vue +52 -0
- package/src/runtime/components/ui/chart/ChartStyle.vue +37 -0
- package/src/runtime/components/ui/chart/ChartTooltipContent.vue +92 -0
- package/src/runtime/components/ui/chart/index.ts +26 -0
- package/src/runtime/components/ui/chart/utils.ts +45 -0
- package/src/runtime/components/ui/checkbox/Checkbox.vue +34 -0
- package/src/runtime/components/ui/checkbox/index.ts +1 -0
- package/src/runtime/components/ui/collapsible/Collapsible.vue +15 -0
- package/src/runtime/components/ui/collapsible/CollapsibleContent.vue +12 -0
- package/src/runtime/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
- package/src/runtime/components/ui/collapsible/index.ts +3 -0
- package/src/runtime/components/ui/combobox/Combobox.vue +15 -0
- package/src/runtime/components/ui/combobox/ComboboxAnchor.vue +19 -0
- package/src/runtime/components/ui/combobox/ComboboxEmpty.vue +17 -0
- package/src/runtime/components/ui/combobox/ComboboxGroup.vue +25 -0
- package/src/runtime/components/ui/combobox/ComboboxInput.vue +33 -0
- package/src/runtime/components/ui/combobox/ComboboxItem.vue +29 -0
- package/src/runtime/components/ui/combobox/ComboboxItemIndicator.vue +19 -0
- package/src/runtime/components/ui/combobox/ComboboxList.vue +38 -0
- package/src/runtime/components/ui/combobox/ComboboxSeparator.vue +17 -0
- package/src/runtime/components/ui/combobox/ComboboxTrigger.vue +19 -0
- package/src/runtime/components/ui/combobox/ComboboxViewport.vue +19 -0
- package/src/runtime/components/ui/combobox/index.ts +12 -0
- package/src/runtime/components/ui/command/Command.vue +85 -0
- package/src/runtime/components/ui/command/CommandDialog.vue +36 -0
- package/src/runtime/components/ui/command/CommandEmpty.vue +22 -0
- package/src/runtime/components/ui/command/CommandGroup.vue +40 -0
- package/src/runtime/components/ui/command/CommandInput.vue +38 -0
- package/src/runtime/components/ui/command/CommandItem.vue +80 -0
- package/src/runtime/components/ui/command/CommandList.vue +21 -0
- package/src/runtime/components/ui/command/CommandSeparator.vue +17 -0
- package/src/runtime/components/ui/command/CommandShortcut.vue +14 -0
- package/src/runtime/components/ui/command/index.ts +25 -0
- package/src/runtime/components/ui/context-menu/ContextMenu.vue +15 -0
- package/src/runtime/components/ui/context-menu/ContextMenuCheckboxItem.vue +37 -0
- package/src/runtime/components/ui/context-menu/ContextMenuContent.vue +35 -0
- package/src/runtime/components/ui/context-menu/ContextMenuGroup.vue +12 -0
- package/src/runtime/components/ui/context-menu/ContextMenuItem.vue +42 -0
- package/src/runtime/components/ui/context-menu/ContextMenuLabel.vue +17 -0
- package/src/runtime/components/ui/context-menu/ContextMenuPortal.vue +12 -0
- package/src/runtime/components/ui/context-menu/ContextMenuRadioGroup.vue +15 -0
- package/src/runtime/components/ui/context-menu/ContextMenuRadioItem.vue +37 -0
- package/src/runtime/components/ui/context-menu/ContextMenuSeparator.vue +15 -0
- package/src/runtime/components/ui/context-menu/ContextMenuShortcut.vue +14 -0
- package/src/runtime/components/ui/context-menu/ContextMenuSub.vue +15 -0
- package/src/runtime/components/ui/context-menu/ContextMenuSubContent.vue +29 -0
- package/src/runtime/components/ui/context-menu/ContextMenuSubTrigger.vue +31 -0
- package/src/runtime/components/ui/context-menu/ContextMenuTrigger.vue +14 -0
- package/src/runtime/components/ui/context-menu/index.ts +14 -0
- package/src/runtime/components/ui/dialog/Dialog.vue +15 -0
- package/src/runtime/components/ui/dialog/DialogClose.vue +12 -0
- package/src/runtime/components/ui/dialog/DialogContent.vue +49 -0
- package/src/runtime/components/ui/dialog/DialogDescription.vue +19 -0
- package/src/runtime/components/ui/dialog/DialogFooter.vue +25 -0
- package/src/runtime/components/ui/dialog/DialogHeader.vue +14 -0
- package/src/runtime/components/ui/dialog/DialogOverlay.vue +17 -0
- package/src/runtime/components/ui/dialog/DialogScrollContent.vue +46 -0
- package/src/runtime/components/ui/dialog/DialogTitle.vue +19 -0
- package/src/runtime/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/runtime/components/ui/dialog/index.ts +10 -0
- package/src/runtime/components/ui/drawer/Drawer.vue +19 -0
- package/src/runtime/components/ui/drawer/DrawerClose.vue +12 -0
- package/src/runtime/components/ui/drawer/DrawerContent.vue +40 -0
- package/src/runtime/components/ui/drawer/DrawerDescription.vue +17 -0
- package/src/runtime/components/ui/drawer/DrawerFooter.vue +14 -0
- package/src/runtime/components/ui/drawer/DrawerHeader.vue +14 -0
- package/src/runtime/components/ui/drawer/DrawerOverlay.vue +15 -0
- package/src/runtime/components/ui/drawer/DrawerTitle.vue +17 -0
- package/src/runtime/components/ui/drawer/DrawerTrigger.vue +12 -0
- package/src/runtime/components/ui/drawer/index.ts +9 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenu.vue +15 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +37 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +37 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +41 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue +18 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +15 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +38 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuSeparator.vue +19 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuSub.vue +15 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +29 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +30 -0
- package/src/runtime/components/ui/dropdown-menu/DropdownMenuTrigger.vue +14 -0
- package/src/runtime/components/ui/dropdown-menu/index.ts +16 -0
- package/src/runtime/components/ui/empty/Empty.vue +14 -0
- package/src/runtime/components/ui/empty/EmptyContent.vue +14 -0
- package/src/runtime/components/ui/empty/EmptyDescription.vue +14 -0
- package/src/runtime/components/ui/empty/EmptyHeader.vue +14 -0
- package/src/runtime/components/ui/empty/EmptyMedia.vue +17 -0
- package/src/runtime/components/ui/empty/EmptyTitle.vue +14 -0
- package/src/runtime/components/ui/empty/index.ts +23 -0
- package/src/runtime/components/ui/field/Field.vue +17 -0
- package/src/runtime/components/ui/field/FieldContent.vue +14 -0
- package/src/runtime/components/ui/field/FieldDescription.vue +17 -0
- package/src/runtime/components/ui/field/FieldError.vue +45 -0
- package/src/runtime/components/ui/field/FieldGroup.vue +14 -0
- package/src/runtime/components/ui/field/FieldLabel.vue +31 -0
- package/src/runtime/components/ui/field/FieldLegend.vue +15 -0
- package/src/runtime/components/ui/field/FieldSeparator.vue +18 -0
- package/src/runtime/components/ui/field/FieldSet.vue +14 -0
- package/src/runtime/components/ui/field/FieldTitle.vue +14 -0
- package/src/runtime/components/ui/field/index.ts +32 -0
- package/src/runtime/components/ui/form/FormControl.vue +12 -0
- package/src/runtime/components/ui/form/FormDescription.vue +17 -0
- package/src/runtime/components/ui/form/FormItem.vue +20 -0
- package/src/runtime/components/ui/form/FormLabel.vue +17 -0
- package/src/runtime/components/ui/form/FormMessage.vue +17 -0
- package/src/runtime/components/ui/form/index.ts +7 -0
- package/src/runtime/components/ui/form/injectionKeys.ts +3 -0
- package/src/runtime/components/ui/form/useFormField.ts +29 -0
- package/src/runtime/components/ui/gantt/Gantt.vue +108 -0
- package/src/runtime/components/ui/gantt/GanttCreateMarkerTrigger.vue +44 -0
- package/src/runtime/components/ui/gantt/GanttFeatureItem.vue +303 -0
- package/src/runtime/components/ui/gantt/GanttFeatureList.vue +16 -0
- package/src/runtime/components/ui/gantt/GanttFeatureListGroup.vue +20 -0
- package/src/runtime/components/ui/gantt/GanttHeader.vue +197 -0
- package/src/runtime/components/ui/gantt/GanttMarker.vue +133 -0
- package/src/runtime/components/ui/gantt/GanttSidebar.vue +65 -0
- package/src/runtime/components/ui/gantt/GanttSidebarGroup.vue +25 -0
- package/src/runtime/components/ui/gantt/GanttSidebarItem.vue +32 -0
- package/src/runtime/components/ui/gantt/GanttTimeline.vue +179 -0
- package/src/runtime/components/ui/gantt/GanttToday.vue +52 -0
- package/src/runtime/components/ui/gantt/GanttZoomControls.vue +49 -0
- package/src/runtime/components/ui/gantt/README.md +356 -0
- package/src/runtime/components/ui/gantt/index.ts +18 -0
- package/src/runtime/components/ui/gantt/meta.json +96 -0
- package/src/runtime/components/ui/hover-card/HoverCard.vue +15 -0
- package/src/runtime/components/ui/hover-card/HoverCardContent.vue +36 -0
- package/src/runtime/components/ui/hover-card/HoverCardTrigger.vue +12 -0
- package/src/runtime/components/ui/hover-card/index.ts +3 -0
- package/src/runtime/components/ui/inline-editable-input/InlineEditableInput.vue +126 -0
- package/src/runtime/components/ui/inline-editable-input/index.ts +1 -0
- package/src/runtime/components/ui/input/Input.vue +35 -0
- package/src/runtime/components/ui/input/index.ts +1 -0
- package/src/runtime/components/ui/input-group/InputGroup.vue +37 -0
- package/src/runtime/components/ui/input-group/InputGroupAddon.vue +33 -0
- package/src/runtime/components/ui/input-group/InputGroupButton.vue +25 -0
- package/src/runtime/components/ui/input-group/InputGroupInput.vue +13 -0
- package/src/runtime/components/ui/input-group/InputGroupText.vue +14 -0
- package/src/runtime/components/ui/input-group/InputGroupTextarea.vue +13 -0
- package/src/runtime/components/ui/input-group/index.ts +41 -0
- package/src/runtime/components/ui/input-otp/InputOTP.vue +22 -0
- package/src/runtime/components/ui/input-otp/InputOTPGroup.vue +18 -0
- package/src/runtime/components/ui/input-otp/InputOTPSeparator.vue +17 -0
- package/src/runtime/components/ui/input-otp/InputOTPSlot.vue +37 -0
- package/src/runtime/components/ui/input-otp/index.ts +4 -0
- package/src/runtime/components/ui/item/Item.vue +27 -0
- package/src/runtime/components/ui/item/ItemActions.vue +14 -0
- package/src/runtime/components/ui/item/ItemContent.vue +14 -0
- package/src/runtime/components/ui/item/ItemDescription.vue +14 -0
- package/src/runtime/components/ui/item/ItemFooter.vue +14 -0
- package/src/runtime/components/ui/item/ItemGroup.vue +14 -0
- package/src/runtime/components/ui/item/ItemHeader.vue +14 -0
- package/src/runtime/components/ui/item/ItemMedia.vue +17 -0
- package/src/runtime/components/ui/item/ItemSeparator.vue +12 -0
- package/src/runtime/components/ui/item/ItemTitle.vue +14 -0
- package/src/runtime/components/ui/item/index.ts +47 -0
- package/src/runtime/components/ui/kanban/Kanban.vue +42 -0
- package/src/runtime/components/ui/kanban/KanbanBoard.vue +75 -0
- package/src/runtime/components/ui/kanban/KanbanCard.vue +59 -0
- package/src/runtime/components/ui/kanban/KanbanCards.vue +27 -0
- package/src/runtime/components/ui/kanban/KanbanHeader.vue +15 -0
- package/src/runtime/components/ui/kanban/README.md +184 -0
- package/src/runtime/components/ui/kanban/index.ts +8 -0
- package/src/runtime/components/ui/kbd/Kbd.vue +23 -0
- package/src/runtime/components/ui/kbd/KbdGroup.vue +14 -0
- package/src/runtime/components/ui/kbd/index.ts +2 -0
- package/src/runtime/components/ui/label/Label.vue +30 -0
- package/src/runtime/components/ui/label/index.ts +1 -0
- package/src/runtime/components/ui/menubar/Menubar.vue +20 -0
- package/src/runtime/components/ui/menubar/MenubarCheckboxItem.vue +37 -0
- package/src/runtime/components/ui/menubar/MenubarContent.vue +38 -0
- package/src/runtime/components/ui/menubar/MenubarGroup.vue +12 -0
- package/src/runtime/components/ui/menubar/MenubarItem.vue +37 -0
- package/src/runtime/components/ui/menubar/MenubarLabel.vue +16 -0
- package/src/runtime/components/ui/menubar/MenubarMenu.vue +12 -0
- package/src/runtime/components/ui/menubar/MenubarRadioGroup.vue +15 -0
- package/src/runtime/components/ui/menubar/MenubarRadioItem.vue +37 -0
- package/src/runtime/components/ui/menubar/MenubarSeparator.vue +17 -0
- package/src/runtime/components/ui/menubar/MenubarShortcut.vue +14 -0
- package/src/runtime/components/ui/menubar/MenubarSub.vue +20 -0
- package/src/runtime/components/ui/menubar/MenubarSubContent.vue +35 -0
- package/src/runtime/components/ui/menubar/MenubarSubTrigger.vue +25 -0
- package/src/runtime/components/ui/menubar/MenubarTrigger.vue +19 -0
- package/src/runtime/components/ui/menubar/index.ts +15 -0
- package/src/runtime/components/ui/native-select/NativeSelect.vue +45 -0
- package/src/runtime/components/ui/native-select/NativeSelectOptGroup.vue +15 -0
- package/src/runtime/components/ui/native-select/NativeSelectOption.vue +15 -0
- package/src/runtime/components/ui/native-select/index.ts +3 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenu.vue +31 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuContent.vue +30 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuIndicator.vue +23 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuItem.vue +17 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +28 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuList.vue +19 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuTrigger.vue +22 -0
- package/src/runtime/components/ui/navigation-menu/NavigationMenuViewport.vue +28 -0
- package/src/runtime/components/ui/navigation-menu/index.ts +14 -0
- package/src/runtime/components/ui/number-field/NumberField.vue +20 -0
- package/src/runtime/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/src/runtime/components/ui/number-field/NumberFieldDecrement.vue +22 -0
- package/src/runtime/components/ui/number-field/NumberFieldIncrement.vue +22 -0
- package/src/runtime/components/ui/number-field/NumberFieldInput.vue +16 -0
- package/src/runtime/components/ui/number-field/index.ts +5 -0
- package/src/runtime/components/ui/pagination/Pagination.vue +23 -0
- package/src/runtime/components/ui/pagination/PaginationContent.vue +17 -0
- package/src/runtime/components/ui/pagination/PaginationEllipsis.vue +21 -0
- package/src/runtime/components/ui/pagination/PaginationFirst.vue +34 -0
- package/src/runtime/components/ui/pagination/PaginationItem.vue +44 -0
- package/src/runtime/components/ui/pagination/PaginationLast.vue +33 -0
- package/src/runtime/components/ui/pagination/PaginationNext.vue +33 -0
- package/src/runtime/components/ui/pagination/PaginationPrevious.vue +33 -0
- package/src/runtime/components/ui/pagination/index.ts +8 -0
- package/src/runtime/components/ui/pin-input/PinInput.vue +22 -0
- package/src/runtime/components/ui/pin-input/PinInputGroup.vue +17 -0
- package/src/runtime/components/ui/pin-input/PinInputSeparator.vue +16 -0
- package/src/runtime/components/ui/pin-input/PinInputSlot.vue +26 -0
- package/src/runtime/components/ui/pin-input/index.ts +4 -0
- package/src/runtime/components/ui/popover/Popover.vue +15 -0
- package/src/runtime/components/ui/popover/PopoverAnchor.vue +12 -0
- package/src/runtime/components/ui/popover/PopoverContent.vue +38 -0
- package/src/runtime/components/ui/popover/PopoverTrigger.vue +12 -0
- package/src/runtime/components/ui/popover/index.ts +4 -0
- package/src/runtime/components/ui/progress/Progress.vue +19 -0
- package/src/runtime/components/ui/progress/index.ts +1 -0
- package/src/runtime/components/ui/radio-group/RadioGroup.vue +20 -0
- package/src/runtime/components/ui/radio-group/RadioGroupItem.vue +33 -0
- package/src/runtime/components/ui/radio-group/index.ts +2 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendar.vue +61 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarCell.vue +32 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +46 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarGrid.vue +19 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarGridBody.vue +12 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarGridHead.vue +12 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarGridRow.vue +19 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarHeadCell.vue +19 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarHeader.vue +19 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarHeading.vue +25 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +22 -0
- package/src/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +22 -0
- package/src/runtime/components/ui/range-calendar/index.ts +12 -0
- package/src/runtime/components/ui/resizable/ResizableHandle.vue +35 -0
- package/src/runtime/components/ui/resizable/ResizablePanel.vue +16 -0
- package/src/runtime/components/ui/resizable/ResizablePanelGroup.vue +20 -0
- package/src/runtime/components/ui/resizable/index.ts +3 -0
- package/src/runtime/components/ui/scroll-area/ScrollArea.vue +22 -0
- package/src/runtime/components/ui/scroll-area/ScrollBar.vue +19 -0
- package/src/runtime/components/ui/scroll-area/index.ts +2 -0
- package/src/runtime/components/ui/select/Select.vue +15 -0
- package/src/runtime/components/ui/select/SelectContent.vue +43 -0
- package/src/runtime/components/ui/select/SelectGroup.vue +12 -0
- package/src/runtime/components/ui/select/SelectItem.vue +39 -0
- package/src/runtime/components/ui/select/SelectItemText.vue +12 -0
- package/src/runtime/components/ui/select/SelectLabel.vue +14 -0
- package/src/runtime/components/ui/select/SelectScrollDownButton.vue +22 -0
- package/src/runtime/components/ui/select/SelectScrollUpButton.vue +22 -0
- package/src/runtime/components/ui/select/SelectSeparator.vue +15 -0
- package/src/runtime/components/ui/select/SelectTrigger.vue +32 -0
- package/src/runtime/components/ui/select/SelectValue.vue +12 -0
- package/src/runtime/components/ui/select/index.ts +11 -0
- package/src/runtime/components/ui/separator/Separator.vue +18 -0
- package/src/runtime/components/ui/separator/index.ts +1 -0
- package/src/runtime/components/ui/sheet/Sheet.vue +15 -0
- package/src/runtime/components/ui/sheet/SheetClose.vue +12 -0
- package/src/runtime/components/ui/sheet/SheetContent.vue +54 -0
- package/src/runtime/components/ui/sheet/SheetDescription.vue +17 -0
- package/src/runtime/components/ui/sheet/SheetFooter.vue +12 -0
- package/src/runtime/components/ui/sheet/SheetHeader.vue +12 -0
- package/src/runtime/components/ui/sheet/SheetOverlay.vue +17 -0
- package/src/runtime/components/ui/sheet/SheetTitle.vue +17 -0
- package/src/runtime/components/ui/sheet/SheetTrigger.vue +12 -0
- package/src/runtime/components/ui/sheet/index.ts +8 -0
- package/src/runtime/components/ui/sidebar/Sidebar.vue +78 -0
- package/src/runtime/components/ui/sidebar/SidebarContent.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarFooter.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarGroup.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarGroupAction.vue +31 -0
- package/src/runtime/components/ui/sidebar/SidebarGroupContent.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarGroupLabel.vue +30 -0
- package/src/runtime/components/ui/sidebar/SidebarHeader.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarInput.vue +15 -0
- package/src/runtime/components/ui/sidebar/SidebarInset.vue +24 -0
- package/src/runtime/components/ui/sidebar/SidebarMenu.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuAction.vue +41 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuBadge.vue +28 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuButtonChild.vue +27 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuItem.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuSkeleton.vue +23 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuSub.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuSubButton.vue +43 -0
- package/src/runtime/components/ui/sidebar/SidebarMenuSubItem.vue +14 -0
- package/src/runtime/components/ui/sidebar/SidebarProvider.vue +89 -0
- package/src/runtime/components/ui/sidebar/SidebarRail.vue +35 -0
- package/src/runtime/components/ui/sidebar/SidebarSeparator.vue +15 -0
- package/src/runtime/components/ui/sidebar/SidebarTrigger.vue +19 -0
- package/src/runtime/components/ui/sidebar/index.ts +59 -0
- package/src/runtime/components/ui/sidebar/utils.ts +19 -0
- package/src/runtime/components/ui/skeleton/Skeleton.vue +14 -0
- package/src/runtime/components/ui/skeleton/index.ts +1 -0
- package/src/runtime/components/ui/slider/Slider.vue +34 -0
- package/src/runtime/components/ui/slider/index.ts +1 -0
- package/src/runtime/components/ui/spinner/Spinner.vue +13 -0
- package/src/runtime/components/ui/spinner/index.ts +1 -0
- package/src/runtime/components/ui/stepper/Stepper.vue +20 -0
- package/src/runtime/components/ui/stepper/StepperDescription.vue +19 -0
- package/src/runtime/components/ui/stepper/StepperIndicator.vue +34 -0
- package/src/runtime/components/ui/stepper/StepperItem.vue +19 -0
- package/src/runtime/components/ui/stepper/StepperSeparator.vue +29 -0
- package/src/runtime/components/ui/stepper/StepperTitle.vue +19 -0
- package/src/runtime/components/ui/stepper/StepperTrigger.vue +19 -0
- package/src/runtime/components/ui/stepper/index.ts +7 -0
- package/src/runtime/components/ui/switch/Switch.vue +36 -0
- package/src/runtime/components/ui/switch/index.ts +1 -0
- package/src/runtime/components/ui/table/Table.vue +16 -0
- package/src/runtime/components/ui/table/TableBody.vue +14 -0
- package/src/runtime/components/ui/table/TableCaption.vue +14 -0
- package/src/runtime/components/ui/table/TableCell.vue +14 -0
- package/src/runtime/components/ui/table/TableEmpty.vue +29 -0
- package/src/runtime/components/ui/table/TableFooter.vue +14 -0
- package/src/runtime/components/ui/table/TableHead.vue +14 -0
- package/src/runtime/components/ui/table/TableHeader.vue +14 -0
- package/src/runtime/components/ui/table/TableRow.vue +14 -0
- package/src/runtime/components/ui/table/index.ts +9 -0
- package/src/runtime/components/ui/table/utils.ts +8 -0
- package/src/runtime/components/ui/tabs/Tabs.vue +23 -0
- package/src/runtime/components/ui/tabs/TabsContent.vue +17 -0
- package/src/runtime/components/ui/tabs/TabsList.vue +17 -0
- package/src/runtime/components/ui/tabs/TabsTrigger.vue +28 -0
- package/src/runtime/components/ui/tabs/index.ts +4 -0
- package/src/runtime/components/ui/tags-input/TagsInput.vue +20 -0
- package/src/runtime/components/ui/tags-input/TagsInputInput.vue +17 -0
- package/src/runtime/components/ui/tags-input/TagsInputItem.vue +20 -0
- package/src/runtime/components/ui/tags-input/TagsInputItemDelete.vue +22 -0
- package/src/runtime/components/ui/tags-input/TagsInputItemText.vue +19 -0
- package/src/runtime/components/ui/tags-input/index.ts +5 -0
- package/src/runtime/components/ui/textarea/Textarea.vue +31 -0
- package/src/runtime/components/ui/textarea/index.ts +1 -0
- package/src/runtime/components/ui/tiptap/TiptapContent.vue +154 -0
- package/src/runtime/components/ui/tiptap/TiptapEditor.vue +37 -0
- package/src/runtime/components/ui/tiptap/TiptapIcon.vue +141 -0
- package/src/runtime/components/ui/tiptap/TiptapKeyboardShortcuts.vue +25 -0
- package/src/runtime/components/ui/tiptap/TiptapMobileToolbar.vue +148 -0
- package/src/runtime/components/ui/tiptap/TiptapProvider.vue +407 -0
- package/src/runtime/components/ui/tiptap/TiptapSlotPanel.vue +112 -0
- package/src/runtime/components/ui/tiptap/TiptapStatusBar.vue +83 -0
- package/src/runtime/components/ui/tiptap/TiptapTableToolbar.vue +176 -0
- package/src/runtime/components/ui/tiptap/TiptapToolbar.vue +223 -0
- package/src/runtime/components/ui/tiptap/TiptapTreeItem.vue +210 -0
- package/src/runtime/components/ui/tiptap/TiptapTreeStructure.vue +133 -0
- package/src/runtime/components/ui/tiptap/index.ts +49 -0
- package/src/runtime/components/ui/tiptap/tiptapTreeUtils.ts +137 -0
- package/src/runtime/components/ui/toggle/Toggle.vue +35 -0
- package/src/runtime/components/ui/toggle/index.ts +27 -0
- package/src/runtime/components/ui/toggle-group/ToggleGroup.vue +54 -0
- package/src/runtime/components/ui/toggle-group/ToggleGroupItem.vue +51 -0
- package/src/runtime/components/ui/toggle-group/index.ts +2 -0
- package/src/runtime/components/ui/tooltip/Tooltip.vue +15 -0
- package/src/runtime/components/ui/tooltip/TooltipContent.vue +39 -0
- package/src/runtime/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/src/runtime/components/ui/tooltip/TooltipTrigger.vue +12 -0
- package/src/runtime/components/ui/tooltip/index.ts +4 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="{ width: w, height: h }" @touchmove.prevent>
|
|
3
|
+
<canvas :id="state.uid" class="size-full" :class="{ 'cursor-not-allowed': disabled }" :data-uid="state.uid" :aria-disabled="disabled ? 'true' : undefined" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import SignaturePad from 'signature_pad';
|
|
9
|
+
|
|
10
|
+
interface SigOption {
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
penColor?: string;
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
maxWidth?: number;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface WaterMarkData {
|
|
19
|
+
text?: string;
|
|
20
|
+
x?: number;
|
|
21
|
+
y?: number;
|
|
22
|
+
sx?: number;
|
|
23
|
+
sy?: number;
|
|
24
|
+
font?: string;
|
|
25
|
+
fillStyle?: string;
|
|
26
|
+
strokeStyle?: string;
|
|
27
|
+
style?: 'all' | 'stroke' | 'fill';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(
|
|
31
|
+
defineProps<{
|
|
32
|
+
sigOption?: SigOption;
|
|
33
|
+
w?: string;
|
|
34
|
+
h?: string;
|
|
35
|
+
clearOnResize?: boolean;
|
|
36
|
+
waterMark?: WaterMarkData;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
defaultUrl?: string;
|
|
39
|
+
}>(),
|
|
40
|
+
{
|
|
41
|
+
sigOption: () => ({
|
|
42
|
+
backgroundColor: 'rgb(255,255,255)',
|
|
43
|
+
penColor: 'rgb(0, 0, 0)',
|
|
44
|
+
minWidth: 2.5,
|
|
45
|
+
maxWidth: 2.5,
|
|
46
|
+
}),
|
|
47
|
+
w: '100%',
|
|
48
|
+
h: '100%',
|
|
49
|
+
clearOnResize: false,
|
|
50
|
+
waterMark: () => ({}),
|
|
51
|
+
disabled: false,
|
|
52
|
+
defaultUrl: '',
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const emit = defineEmits<{
|
|
57
|
+
'after-update-stroke': [];
|
|
58
|
+
}>();
|
|
59
|
+
|
|
60
|
+
interface SignatureState {
|
|
61
|
+
sig: SignaturePad | null;
|
|
62
|
+
option: SigOption;
|
|
63
|
+
uid: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const fallbackId = useId();
|
|
67
|
+
|
|
68
|
+
const state = reactive<SignatureState>({
|
|
69
|
+
sig: null,
|
|
70
|
+
option: {
|
|
71
|
+
backgroundColor: 'rgb(255,255,255)',
|
|
72
|
+
penColor: 'rgb(0, 0, 0)',
|
|
73
|
+
minWidth: 2.5,
|
|
74
|
+
maxWidth: 2.5,
|
|
75
|
+
},
|
|
76
|
+
uid: `canvas-${fallbackId}`,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
for (const key of Object.keys(props.sigOption)) {
|
|
80
|
+
state.option[key] = props.sigOption[key];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
watch(
|
|
84
|
+
() => props.disabled,
|
|
85
|
+
(val) => {
|
|
86
|
+
if (!state.sig) return;
|
|
87
|
+
if (val) {
|
|
88
|
+
state.sig.off();
|
|
89
|
+
} else {
|
|
90
|
+
state.sig.on();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
watch(
|
|
96
|
+
() => props.sigOption.penColor,
|
|
97
|
+
(color) => {
|
|
98
|
+
if (!color || !state.sig) return;
|
|
99
|
+
state.option.penColor = color;
|
|
100
|
+
const sig = state.sig as SignaturePad & { penColor: string };
|
|
101
|
+
if (sig.penColor === color) return;
|
|
102
|
+
sig.penColor = color;
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
watch(
|
|
107
|
+
() => [props.sigOption.minWidth, props.sigOption.maxWidth] as const,
|
|
108
|
+
([minWidth, maxWidth]) => {
|
|
109
|
+
if (typeof minWidth !== 'number' || typeof maxWidth !== 'number' || !state.sig) return;
|
|
110
|
+
state.option.minWidth = minWidth;
|
|
111
|
+
state.option.maxWidth = maxWidth;
|
|
112
|
+
const penWidthChanged = state.sig.minWidth !== minWidth || state.sig.maxWidth !== maxWidth;
|
|
113
|
+
if (!penWidthChanged) return;
|
|
114
|
+
const strokes = state.sig.toData();
|
|
115
|
+
state.sig.minWidth = minWidth;
|
|
116
|
+
state.sig.maxWidth = maxWidth;
|
|
117
|
+
if (strokes.length) state.sig.fromData(strokes);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
watch(
|
|
122
|
+
() => props.sigOption.backgroundColor,
|
|
123
|
+
(color) => {
|
|
124
|
+
if (!color || !state.sig) return;
|
|
125
|
+
state.option.backgroundColor = color;
|
|
126
|
+
const sig = state.sig as SignaturePad & { backgroundColor: string };
|
|
127
|
+
if (sig.backgroundColor === color) return;
|
|
128
|
+
const existingData = state.sig.toData();
|
|
129
|
+
const hadSignature = !state.sig.isEmpty();
|
|
130
|
+
sig.backgroundColor = color;
|
|
131
|
+
state.sig.clear();
|
|
132
|
+
if (hadSignature && existingData.length) state.sig.fromData(existingData);
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const getCanvas = (): HTMLCanvasElement | null => document.getElementById(state.uid) as HTMLCanvasElement | null;
|
|
137
|
+
|
|
138
|
+
const clear = (): void => state.sig?.clear();
|
|
139
|
+
|
|
140
|
+
const save = (format?: string): string => (format ? state.sig!.toDataURL(format) : state.sig!.toDataURL());
|
|
141
|
+
|
|
142
|
+
const fromDataURL = (url: string): void => {
|
|
143
|
+
state.sig?.fromDataURL(url);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const isEmpty = (): boolean => state.sig?.isEmpty() ?? true;
|
|
147
|
+
|
|
148
|
+
const undo = (): void => {
|
|
149
|
+
if (!state.sig) return;
|
|
150
|
+
const data = state.sig.toData();
|
|
151
|
+
if (data?.length) {
|
|
152
|
+
data.pop();
|
|
153
|
+
state.sig.fromData(data);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const addWaterMark = (data: WaterMarkData): void => {
|
|
158
|
+
if (Object.prototype.toString.call(data) !== '[object Object]') {
|
|
159
|
+
throw new Error(`Expected Object, got ${typeof data}.`);
|
|
160
|
+
}
|
|
161
|
+
const canvas = getCanvas();
|
|
162
|
+
if (!canvas) return;
|
|
163
|
+
const ctx = canvas.getContext('2d');
|
|
164
|
+
if (!ctx) return;
|
|
165
|
+
|
|
166
|
+
ctx.font = data.font ?? '20px sans-serif';
|
|
167
|
+
ctx.fillStyle = data.fillStyle ?? '#333';
|
|
168
|
+
ctx.strokeStyle = data.strokeStyle ?? '#333';
|
|
169
|
+
|
|
170
|
+
const tx = data.text ?? '';
|
|
171
|
+
const x = data.x ?? 20;
|
|
172
|
+
const y = data.y ?? 20;
|
|
173
|
+
const sx = data.sx ?? 40;
|
|
174
|
+
const sy = data.sy ?? 40;
|
|
175
|
+
|
|
176
|
+
if (data.style === 'all') {
|
|
177
|
+
ctx.fillText(tx, x, y);
|
|
178
|
+
ctx.strokeText(tx, sx, sy);
|
|
179
|
+
} else if (data.style === 'stroke') {
|
|
180
|
+
ctx.strokeText(tx, sx, sy);
|
|
181
|
+
} else {
|
|
182
|
+
ctx.fillText(tx, x, y);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const draw = (): void => {
|
|
187
|
+
const canvas = getCanvas();
|
|
188
|
+
if (!canvas) return;
|
|
189
|
+
|
|
190
|
+
state.sig = new SignaturePad(canvas, state.option);
|
|
191
|
+
state.sig.addEventListener('afterUpdateStroke', () => emit('after-update-stroke'));
|
|
192
|
+
|
|
193
|
+
const resizeCanvas = (c: HTMLCanvasElement): void => {
|
|
194
|
+
const url = isEmpty() ? undefined : save();
|
|
195
|
+
const ratio = Math.max(window.devicePixelRatio || 1, 1);
|
|
196
|
+
const pxRe = /px/;
|
|
197
|
+
c.width = pxRe.test(props.w) ? Number(props.w.replace('px', '')) * ratio : c.offsetWidth * ratio;
|
|
198
|
+
c.height = pxRe.test(props.h) ? Number(props.h.replace('px', '')) * ratio : c.offsetHeight * ratio;
|
|
199
|
+
c.getContext('2d')?.scale(ratio, ratio);
|
|
200
|
+
clear();
|
|
201
|
+
if (!props.clearOnResize && url !== undefined) fromDataURL(url);
|
|
202
|
+
if (Object.keys(props.waterMark).length) addWaterMark(props.waterMark);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
window.addEventListener('resize', () => resizeCanvas(canvas));
|
|
206
|
+
resizeCanvas(canvas);
|
|
207
|
+
if (props.defaultUrl) fromDataURL(props.defaultUrl);
|
|
208
|
+
if (props.disabled) {
|
|
209
|
+
state.sig.off();
|
|
210
|
+
} else {
|
|
211
|
+
state.sig.on();
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
onMounted(() => draw());
|
|
216
|
+
|
|
217
|
+
defineExpose({ save, clear, isEmpty, undo, addWaterMark, fromDataURL });
|
|
218
|
+
</script>
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="toastRef"
|
|
4
|
+
:class="
|
|
5
|
+
cn(
|
|
6
|
+
props.class,
|
|
7
|
+
toastClass,
|
|
8
|
+
classes?.toast,
|
|
9
|
+
toast.classes?.toast,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
classes?.[toastType],
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
toast?.classes?.[toastType]
|
|
14
|
+
)
|
|
15
|
+
"
|
|
16
|
+
data-sonner-toast=""
|
|
17
|
+
:data-rich-colors="toast.richColors ?? defaultRichColors"
|
|
18
|
+
:data-styled="!Boolean(toast.component || toast?.unstyled || unstyled)"
|
|
19
|
+
:data-mounted="mounted"
|
|
20
|
+
:data-promise="Boolean(toast.promise)"
|
|
21
|
+
:data-swiped="swiped"
|
|
22
|
+
:data-removed="removed"
|
|
23
|
+
:data-visible="isVisible"
|
|
24
|
+
:data-y-position="y"
|
|
25
|
+
:data-x-position="x"
|
|
26
|
+
:data-index="index"
|
|
27
|
+
:data-front="isFront"
|
|
28
|
+
:data-swiping="swiping"
|
|
29
|
+
:data-dismissible="dismissible"
|
|
30
|
+
:data-type="toastType"
|
|
31
|
+
:data-invert="toast.invert || invert"
|
|
32
|
+
:data-swipe-out="swipeOut"
|
|
33
|
+
:data-swipe-direction="swipeOutDirection"
|
|
34
|
+
:data-expanded="Boolean(expanded || (expandByDefault && mounted))"
|
|
35
|
+
:data-testid="toast.testId"
|
|
36
|
+
:data-close-button="closeButton"
|
|
37
|
+
:style="{
|
|
38
|
+
'--index': index,
|
|
39
|
+
'--toasts-before': index,
|
|
40
|
+
'--z-index': toasts.length - index,
|
|
41
|
+
'--offset': `${removed ? offsetBeforeRemove : offset}px`,
|
|
42
|
+
'--initial-height': expandByDefault ? 'auto' : `${initialHeight}px`,
|
|
43
|
+
...style,
|
|
44
|
+
...props.toast.style,
|
|
45
|
+
}"
|
|
46
|
+
@dragend="handleDragEnd"
|
|
47
|
+
@pointerdown="onPointerDown"
|
|
48
|
+
@pointerup="onPointerUp"
|
|
49
|
+
@pointermove="onPointerMove"
|
|
50
|
+
>
|
|
51
|
+
<template v-if="toast.component">
|
|
52
|
+
<component :is="toast.component" v-bind="toast.componentProps" :on-close-toast="handleCloseToast" :is-paused="$props.expanded || $props.interacting || isDocumentHidden" />
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template v-else>
|
|
56
|
+
<!-- Icon -->
|
|
57
|
+
<template v-if="toastType !== 'default' || toast.icon || toast.promise">
|
|
58
|
+
<div data-icon="" :class="cn(classes?.icon, toast?.classes?.icon)">
|
|
59
|
+
<component :is="toast.icon" v-if="toast.icon" />
|
|
60
|
+
<template v-else>
|
|
61
|
+
<slot v-if="toastType === 'loading'" name="loading-icon" />
|
|
62
|
+
<slot v-else-if="toastType === 'success'" name="success-icon" />
|
|
63
|
+
<slot v-else-if="toastType === 'error'" name="error-icon" />
|
|
64
|
+
<slot v-else-if="toastType === 'warning'" name="warning-icon" />
|
|
65
|
+
<slot v-else-if="toastType === 'info'" name="info-icon" />
|
|
66
|
+
</template>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<!-- Content: Title + Description -->
|
|
71
|
+
<div data-content="" :class="cn(classes?.content, toast?.classes?.content)">
|
|
72
|
+
<div data-title="" :class="cn(classes?.title, toast.classes?.title)">
|
|
73
|
+
<template v-if="isStringOfTitle">
|
|
74
|
+
<component :is="toast.title" v-bind="toast.componentProps" />
|
|
75
|
+
</template>
|
|
76
|
+
<template v-else>
|
|
77
|
+
{{ toast.title }}
|
|
78
|
+
</template>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<template v-if="toast.description">
|
|
82
|
+
<div data-description="" :class="cn(descriptionClass, toastDescriptionClass, classes?.description, toast.classes?.description)">
|
|
83
|
+
<template v-if="isStringOfDescription">
|
|
84
|
+
<component :is="toast.description" v-bind="toast.componentProps" />
|
|
85
|
+
</template>
|
|
86
|
+
<template v-else>
|
|
87
|
+
{{ toast.description }}
|
|
88
|
+
</template>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<!-- Cancel Button -->
|
|
94
|
+
<template v-if="toast.cancel">
|
|
95
|
+
<button
|
|
96
|
+
:style="toast.cancelButtonStyle || cancelButtonStyle"
|
|
97
|
+
:class="cn(classes?.cancelButton, toast.classes?.cancelButton)"
|
|
98
|
+
data-button
|
|
99
|
+
data-cancel
|
|
100
|
+
@click="
|
|
101
|
+
(event) => {
|
|
102
|
+
if (!isAction(toast.cancel!)) return;
|
|
103
|
+
if (!dismissible) return;
|
|
104
|
+
toast.cancel.onClick?.(event);
|
|
105
|
+
deleteToast();
|
|
106
|
+
}
|
|
107
|
+
"
|
|
108
|
+
>
|
|
109
|
+
{{ isAction(toast.cancel) ? toast.cancel?.label : toast.cancel }}
|
|
110
|
+
</button>
|
|
111
|
+
</template>
|
|
112
|
+
|
|
113
|
+
<!-- Action Button -->
|
|
114
|
+
<template v-if="toast.action">
|
|
115
|
+
<button
|
|
116
|
+
:style="toast.actionButtonStyle || actionButtonStyle"
|
|
117
|
+
:class="cn(classes?.actionButton, toast.classes?.actionButton)"
|
|
118
|
+
data-button
|
|
119
|
+
data-action
|
|
120
|
+
@click="
|
|
121
|
+
(event) => {
|
|
122
|
+
if (!isAction(toast.action!)) return;
|
|
123
|
+
toast.action.onClick?.(event);
|
|
124
|
+
if (event.defaultPrevented) return;
|
|
125
|
+
deleteToast();
|
|
126
|
+
}
|
|
127
|
+
"
|
|
128
|
+
>
|
|
129
|
+
{{ isAction(toast.action) ? toast.action?.label : toast.action }}
|
|
130
|
+
</button>
|
|
131
|
+
</template>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<!-- Close Button -->
|
|
135
|
+
<template v-if="closeButton && !toast.component && toastType !== 'loading'">
|
|
136
|
+
<DynectButton :color="colorClose" size="xs" :icon-only="true" :aria-label="closeButtonAriaLabel || 'Close toast'" :data-disabled="disabled" data-close-button="true" :class="cn(classes?.closeButton, toast?.classes?.closeButton)" @click="handleCloseToast">
|
|
137
|
+
<template v-if="icons?.close">
|
|
138
|
+
<Icon name="lucide:x" />
|
|
139
|
+
</template>
|
|
140
|
+
<template v-else>
|
|
141
|
+
<slot name="close-icon" />
|
|
142
|
+
</template>
|
|
143
|
+
</DynectButton>
|
|
144
|
+
</template>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<script lang="ts" setup>
|
|
149
|
+
import { cn } from '@/lib/utils';
|
|
150
|
+
import { type HeightT, type ToastProps, type ToastT, isAction } from './types';
|
|
151
|
+
import { useIsDocumentHidden, getDefaultSwipeDirections } from './hooks';
|
|
152
|
+
import { SWIPE_THRESHOLD, TIME_BEFORE_UNMOUNT, TOAST_LIFETIME } from './constant';
|
|
153
|
+
|
|
154
|
+
// ── Props & Emits ──────────────────────────────────────────────────────────────
|
|
155
|
+
const props = defineProps<ToastProps>();
|
|
156
|
+
|
|
157
|
+
const emit = defineEmits<{
|
|
158
|
+
(e: 'update:heights', heights: HeightT[]): void;
|
|
159
|
+
(e: 'update:height', height: HeightT): void;
|
|
160
|
+
(e: 'removeToast', toast: ToastT): void;
|
|
161
|
+
}>();
|
|
162
|
+
|
|
163
|
+
// ── Composables ────────────────────────────────────────────────────────────────
|
|
164
|
+
const { isDocumentHidden } = useIsDocumentHidden();
|
|
165
|
+
|
|
166
|
+
// ── State ──────────────────────────────────────────────────────────────────────
|
|
167
|
+
const toastRef = ref<HTMLLIElement | null>(null);
|
|
168
|
+
const mounted = ref(false);
|
|
169
|
+
const removed = ref(false);
|
|
170
|
+
const swiping = ref(false);
|
|
171
|
+
const swipeOut = ref(false);
|
|
172
|
+
const swiped = ref(false);
|
|
173
|
+
const swipeDirection = ref<'x' | 'y' | null>(null);
|
|
174
|
+
const swipeOutDirection = ref<'left' | 'right' | 'up' | 'down' | null>(null);
|
|
175
|
+
const initialHeight = ref(0);
|
|
176
|
+
const offsetBeforeRemove = ref(0);
|
|
177
|
+
const dragStartTime = ref<Date | null>(null);
|
|
178
|
+
const pointerStartRef = ref<{ x: number; y: number } | null>(null);
|
|
179
|
+
const closeTimerStartTimeRef = ref(0);
|
|
180
|
+
const lastCloseTimerStartTimeRef = ref(0);
|
|
181
|
+
const remainingTime = ref(props.toast.duration || props.duration || TOAST_LIFETIME);
|
|
182
|
+
|
|
183
|
+
// ── Computed ───────────────────────────────────────────────────────────────────
|
|
184
|
+
const coords = computed(() => props.position.split('-'));
|
|
185
|
+
const y = computed(() => coords.value[0]);
|
|
186
|
+
const x = computed(() => coords.value[1]);
|
|
187
|
+
|
|
188
|
+
const isFront = computed(() => props.index === 0);
|
|
189
|
+
const isVisible = computed(() => props.index + 1 <= props.visibleToasts);
|
|
190
|
+
const toastType = computed(() => props.toast.type);
|
|
191
|
+
const toastClass = computed(() => props.toast.class || '');
|
|
192
|
+
const toastDescriptionClass = computed(() => props.descriptionClass || '');
|
|
193
|
+
const dismissible = computed(() => props.toast.dismissible !== false);
|
|
194
|
+
const disabled = computed(() => toastType.value === 'loading');
|
|
195
|
+
const closeButton = computed(() => props.toast.closeButton ?? props.closeButton);
|
|
196
|
+
const duration = computed(() => props.toast.duration || props.duration || TOAST_LIFETIME);
|
|
197
|
+
const isStringOfTitle = computed(() => typeof props.toast.title !== 'string');
|
|
198
|
+
const isStringOfDescription = computed(() => typeof props.toast.description !== 'string');
|
|
199
|
+
|
|
200
|
+
const heightIndex = computed(() => {
|
|
201
|
+
const currentPosition = props.toast.position || props.position;
|
|
202
|
+
const samePositionHeights = props.heights.filter((h) => h.position === currentPosition);
|
|
203
|
+
return Math.max(
|
|
204
|
+
samePositionHeights.findIndex((h) => h.toastId === props.toast.id),
|
|
205
|
+
0
|
|
206
|
+
);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const toastsHeightBefore = computed(() => {
|
|
210
|
+
const currentPosition = props.toast.position || props.position;
|
|
211
|
+
const samePositionHeights = props.heights.filter((h) => h.position === currentPosition);
|
|
212
|
+
return samePositionHeights.reduce((prev, curr, i) => (i >= heightIndex.value ? prev : prev + curr.height), 0);
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const offset = computed(() => heightIndex.value * props.gap! + toastsHeightBefore.value || 0);
|
|
216
|
+
|
|
217
|
+
const colorCloseMap: Record<string, 'ghost' | 'success' | 'info' | 'warning' | 'danger'> = {
|
|
218
|
+
success: 'success',
|
|
219
|
+
info: 'info',
|
|
220
|
+
warning: 'warning',
|
|
221
|
+
error: 'danger',
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const colorClose = computed(() => colorCloseMap[toastType.value ?? ''] ?? 'ghost');
|
|
225
|
+
|
|
226
|
+
// ── Functions ──────────────────────────────────────────────────────────────────
|
|
227
|
+
function deleteToast() {
|
|
228
|
+
removed.value = true;
|
|
229
|
+
offsetBeforeRemove.value = offset.value;
|
|
230
|
+
setTimeout(() => emit('removeToast', props.toast), TIME_BEFORE_UNMOUNT);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function handleCloseToast() {
|
|
234
|
+
if (disabled.value || !dismissible.value) return;
|
|
235
|
+
deleteToast();
|
|
236
|
+
props.toast.onDismiss?.(props.toast);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function handleDragEnd() {
|
|
240
|
+
swiping.value = false;
|
|
241
|
+
swipeDirection.value = null;
|
|
242
|
+
pointerStartRef.value = null;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function getDampening(delta: number): number {
|
|
246
|
+
return 1 / (1.5 + Math.abs(delta) / 20);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function calculateSwipeAmount(delta: number, direction: 'x' | 'y', swipeDirections: string[]): number {
|
|
250
|
+
const validDirections = direction === 'y' ? ['top', 'bottom'] : ['left', 'right'];
|
|
251
|
+
if (!validDirections.some((dir) => swipeDirections.includes(dir))) return 0;
|
|
252
|
+
|
|
253
|
+
const isPositiveDirection = direction === 'y' ? (swipeDirections.includes('top') && delta < 0) || (swipeDirections.includes('bottom') && delta > 0) : (swipeDirections.includes('left') && delta < 0) || (swipeDirections.includes('right') && delta > 0);
|
|
254
|
+
|
|
255
|
+
if (isPositiveDirection) return delta;
|
|
256
|
+
|
|
257
|
+
const dampenedDelta = delta * getDampening(delta);
|
|
258
|
+
return Math.abs(dampenedDelta) < Math.abs(delta) ? dampenedDelta : delta;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function onPointerDown(event: PointerEvent) {
|
|
262
|
+
if (event.button === 2 || disabled.value || !dismissible.value) return;
|
|
263
|
+
dragStartTime.value = new Date();
|
|
264
|
+
offsetBeforeRemove.value = offset.value;
|
|
265
|
+
(event.target as HTMLElement).setPointerCapture(event.pointerId);
|
|
266
|
+
if ((event.target as HTMLElement).tagName === 'BUTTON') return;
|
|
267
|
+
swiping.value = true;
|
|
268
|
+
pointerStartRef.value = { x: event.clientX, y: event.clientY };
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function onPointerUp() {
|
|
272
|
+
if (swipeOut.value || !dismissible.value) return;
|
|
273
|
+
pointerStartRef.value = null;
|
|
274
|
+
|
|
275
|
+
const swipeAmountX = Number(toastRef.value?.style.getPropertyValue('--swipe-amount-x').replace('px', '') || 0);
|
|
276
|
+
const swipeAmountY = Number(toastRef.value?.style.getPropertyValue('--swipe-amount-y').replace('px', '') || 0);
|
|
277
|
+
const timeTaken = Date.now() - (dragStartTime.value?.getTime() || 0);
|
|
278
|
+
const swipeAmount = swipeDirection.value === 'x' ? swipeAmountX : swipeAmountY;
|
|
279
|
+
const velocity = Math.abs(swipeAmount) / timeTaken;
|
|
280
|
+
|
|
281
|
+
if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {
|
|
282
|
+
offsetBeforeRemove.value = offset.value;
|
|
283
|
+
props.toast.onDismiss?.(props.toast);
|
|
284
|
+
const horizontalDirection = swipeAmountX > 0 ? 'right' : 'left';
|
|
285
|
+
const verticalDirection = swipeAmountY > 0 ? 'down' : 'up';
|
|
286
|
+
swipeOutDirection.value = swipeDirection.value === 'x' ? horizontalDirection : verticalDirection;
|
|
287
|
+
deleteToast();
|
|
288
|
+
swipeOut.value = true;
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
toastRef.value?.style.setProperty('--swipe-amount-x', '0px');
|
|
293
|
+
toastRef.value?.style.setProperty('--swipe-amount-y', '0px');
|
|
294
|
+
swiped.value = false;
|
|
295
|
+
swiping.value = false;
|
|
296
|
+
swipeDirection.value = null;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function onPointerMove(event: PointerEvent) {
|
|
300
|
+
if (!pointerStartRef.value || !dismissible.value) return;
|
|
301
|
+
|
|
302
|
+
const selectionLength = typeof globalThis !== 'undefined' && globalThis?.getSelection ? (globalThis.getSelection()?.toString()?.length ?? 0) : 0;
|
|
303
|
+
if (selectionLength > 0) return;
|
|
304
|
+
|
|
305
|
+
const yDelta = event.clientY - pointerStartRef.value.y;
|
|
306
|
+
const xDelta = event.clientX - pointerStartRef.value.x;
|
|
307
|
+
const swipeDirections = props.swipeDirections ?? getDefaultSwipeDirections(props.position);
|
|
308
|
+
|
|
309
|
+
if (!swipeDirection.value && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {
|
|
310
|
+
swipeDirection.value = Math.abs(xDelta) > Math.abs(yDelta) ? 'x' : 'y';
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const swipeAmount = {
|
|
314
|
+
x: swipeDirection.value === 'x' ? calculateSwipeAmount(xDelta, 'x', swipeDirections) : 0,
|
|
315
|
+
y: swipeDirection.value === 'y' ? calculateSwipeAmount(yDelta, 'y', swipeDirections) : 0,
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) swiped.value = true;
|
|
319
|
+
|
|
320
|
+
toastRef.value?.style.setProperty('--swipe-amount-x', `${swipeAmount.x}px`);
|
|
321
|
+
toastRef.value?.style.setProperty('--swipe-amount-y', `${swipeAmount.y}px`);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// ── Watchers ───────────────────────────────────────────────────────────────────
|
|
325
|
+
watchEffect(async () => {
|
|
326
|
+
if (!mounted.value || !toastRef.value) return;
|
|
327
|
+
await nextTick();
|
|
328
|
+
|
|
329
|
+
const toastNode = toastRef.value;
|
|
330
|
+
const originalHeight = toastNode.style.height;
|
|
331
|
+
toastNode.style.height = 'auto';
|
|
332
|
+
const newHeight = toastNode.getBoundingClientRect().height;
|
|
333
|
+
toastNode.style.height = originalHeight;
|
|
334
|
+
initialHeight.value = newHeight;
|
|
335
|
+
|
|
336
|
+
emit('update:height', {
|
|
337
|
+
toastId: props.toast.id,
|
|
338
|
+
height: newHeight,
|
|
339
|
+
position: props.toast.position || props.position,
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
watchEffect((onInvalidate) => {
|
|
344
|
+
if ((props.toast.promise && toastType.value === 'loading') || props.toast.duration === Infinity || props.toast.type === 'loading') return;
|
|
345
|
+
|
|
346
|
+
let timeoutId: ReturnType<typeof setTimeout>;
|
|
347
|
+
|
|
348
|
+
const pauseTimer = () => {
|
|
349
|
+
if (lastCloseTimerStartTimeRef.value < closeTimerStartTimeRef.value) {
|
|
350
|
+
remainingTime.value -= Date.now() - closeTimerStartTimeRef.value;
|
|
351
|
+
}
|
|
352
|
+
lastCloseTimerStartTimeRef.value = Date.now();
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const startTimer = () => {
|
|
356
|
+
if (remainingTime.value === Infinity) return;
|
|
357
|
+
closeTimerStartTimeRef.value = Date.now();
|
|
358
|
+
timeoutId = setTimeout(() => {
|
|
359
|
+
props.toast.onAutoClose?.(props.toast);
|
|
360
|
+
deleteToast();
|
|
361
|
+
}, remainingTime.value);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
if (props.expanded || props.interacting || isDocumentHidden.value) {
|
|
365
|
+
pauseTimer();
|
|
366
|
+
} else {
|
|
367
|
+
startTimer();
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
onInvalidate(() => clearTimeout(timeoutId));
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
watch(
|
|
374
|
+
() => props.toast.delete,
|
|
375
|
+
(value) => {
|
|
376
|
+
if (value) {
|
|
377
|
+
deleteToast();
|
|
378
|
+
props.toast.onDismiss?.(props.toast);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
// ── Lifecycle ──────────────────────────────────────────────────────────────────
|
|
384
|
+
onMounted(() => {
|
|
385
|
+
mounted.value = true;
|
|
386
|
+
remainingTime.value = duration.value;
|
|
387
|
+
if (!toastRef.value) return;
|
|
388
|
+
const height = toastRef.value.getBoundingClientRect().height;
|
|
389
|
+
initialHeight.value = height;
|
|
390
|
+
emit('update:heights', [{ toastId: props.toast.id, height, position: props.toast.position! }, ...props.heights]);
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
onBeforeUnmount(() => {
|
|
394
|
+
if (toastRef.value) emit('removeToast', props.toast);
|
|
395
|
+
});
|
|
396
|
+
</script>
|