@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,190 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn, inputSizeClasses } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
export interface SelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type SelectSize = 'sm' | 'base' | 'lg' | 'xl';
|
|
14
|
+
type SelectState = 'default' | 'success' | 'danger';
|
|
15
|
+
type VariantState = 'default' | 'success' | 'danger' | 'disabled';
|
|
16
|
+
|
|
17
|
+
const triggerVariants = cva('flex w-full items-center rounded-xl ring-1 ring-inset shadow-none', {
|
|
18
|
+
variants: {
|
|
19
|
+
state: {
|
|
20
|
+
default: 'bg-bg-secondary-medium ring-border-base-medium data-[state=open]:ring-border-brand focus:ring-border-brand',
|
|
21
|
+
success: 'bg-bg-success-soft ring-border-success-subtle data-[state=open]:ring-border-success focus:ring-border-success',
|
|
22
|
+
danger: 'bg-bg-danger-soft ring-border-danger-subtle data-[state=open]:ring-border-danger focus:ring-border-danger',
|
|
23
|
+
disabled: 'bg-bg-disabled ring-border-base-medium cursor-not-allowed opacity-60',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: { state: 'default' },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const textVariants = cva('text-sm leading-5', {
|
|
30
|
+
variants: {
|
|
31
|
+
state: {
|
|
32
|
+
default: 'text-text-heading data-placeholder:text-text-body-subtle [&>svg]:text-text-heading',
|
|
33
|
+
success: 'text-text-fg-success-strong data-placeholder:text-text-fg-success-strong [&>svg]:text-text-fg-success-strong',
|
|
34
|
+
danger: 'text-text-fg-danger-strong data-placeholder:text-text-fg-danger-strong [&>svg]:text-text-fg-danger-strong',
|
|
35
|
+
disabled: 'text-text-fg-disabled data-placeholder:text-text-fg-disabled [&>svg]:text-text-fg-disabled',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: { state: 'default' },
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// ── Props ─────────────────────────────────────────────────────────────────────
|
|
42
|
+
const props = withDefaults(
|
|
43
|
+
defineProps<{
|
|
44
|
+
// Core
|
|
45
|
+
options?: SelectOption[] | string[] | number[] | any[];
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
name?: string;
|
|
49
|
+
id?: HTMLAttributes['id'];
|
|
50
|
+
class?: HTMLAttributes['class'];
|
|
51
|
+
triggerClass?: HTMLAttributes['class'];
|
|
52
|
+
value?: string | number | null;
|
|
53
|
+
isHideDropdown?: boolean;
|
|
54
|
+
tooltip?: string;
|
|
55
|
+
|
|
56
|
+
// Validation
|
|
57
|
+
required?: boolean;
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
description?: string;
|
|
60
|
+
|
|
61
|
+
// Appearance
|
|
62
|
+
size?: SelectSize;
|
|
63
|
+
state?: SelectState;
|
|
64
|
+
labelClass?: string;
|
|
65
|
+
descriptionClass?: string;
|
|
66
|
+
errorClass?: string;
|
|
67
|
+
contentClass?: string;
|
|
68
|
+
itemClass?: string;
|
|
69
|
+
emptyStateClass?: string;
|
|
70
|
+
|
|
71
|
+
// Group
|
|
72
|
+
groupLabel?: string;
|
|
73
|
+
groupLabelClass?: string;
|
|
74
|
+
|
|
75
|
+
// Search
|
|
76
|
+
searchable?: boolean;
|
|
77
|
+
searchPlaceholder?: string;
|
|
78
|
+
emptyText?: string;
|
|
79
|
+
|
|
80
|
+
// Position
|
|
81
|
+
position?: 'item-aligned' | 'popper';
|
|
82
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
83
|
+
align?: 'start' | 'center' | 'end';
|
|
84
|
+
|
|
85
|
+
// Keys
|
|
86
|
+
valueKey?: string;
|
|
87
|
+
labelKey?: string;
|
|
88
|
+
}>(),
|
|
89
|
+
{
|
|
90
|
+
placeholder: 'Select an option',
|
|
91
|
+
size: 'base',
|
|
92
|
+
isHideDropdown: false,
|
|
93
|
+
searchPlaceholder: 'Search...',
|
|
94
|
+
emptyText: 'No options found',
|
|
95
|
+
position: 'popper',
|
|
96
|
+
side: 'bottom',
|
|
97
|
+
align: 'start',
|
|
98
|
+
valueKey: 'value',
|
|
99
|
+
labelKey: 'label',
|
|
100
|
+
options: () => [],
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
// ── Model & Field ─────────────────────────────────────────────────────────────
|
|
105
|
+
const fallbackId = useId();
|
|
106
|
+
const resolvedId = computed(() => props.id ?? `select-${fallbackId}`);
|
|
107
|
+
|
|
108
|
+
const modelValue = defineModel<any>('modelValue', { required: false });
|
|
109
|
+
|
|
110
|
+
const { errorMessage, handleChange } = useField(() => resolvedId.value || props.name || 'select', undefined, {
|
|
111
|
+
initialValue: modelValue.value,
|
|
112
|
+
syncVModel: true,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// ── State resolution ──────────────────────────────────────────────────────────
|
|
116
|
+
const variantState = computed<VariantState>(() => {
|
|
117
|
+
if (props.disabled) return 'disabled';
|
|
118
|
+
if (props.state && props.state !== 'default') return props.state;
|
|
119
|
+
return errorMessage.value ? 'danger' : 'default';
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const sz = computed(() => props.size ?? 'base');
|
|
123
|
+
|
|
124
|
+
const triggerCls = computed(() => cn(triggerVariants({ state: variantState.value }), inputSizeClasses[sz.value], errorMessage.value ? '' : props.triggerClass));
|
|
125
|
+
const valueCls = computed(() => textVariants({ state: variantState.value }));
|
|
126
|
+
|
|
127
|
+
// ── Options ───────────────────────────────────────────────────────────────────
|
|
128
|
+
const searchQuery = ref('');
|
|
129
|
+
|
|
130
|
+
const normalizedOptions = computed<SelectOption[]>(() => {
|
|
131
|
+
if (!props.options?.length) return [];
|
|
132
|
+
return props.options.map((o) => {
|
|
133
|
+
if (typeof o === 'string' || typeof o === 'number') return { label: String(o), value: o };
|
|
134
|
+
return o as SelectOption;
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const filteredOptions = computed<SelectOption[]>(() => {
|
|
139
|
+
if (!props.searchable || !searchQuery.value) return normalizedOptions.value;
|
|
140
|
+
const q = searchQuery.value.toLowerCase();
|
|
141
|
+
return normalizedOptions.value.filter((o) => getOptionLabel(o).toLowerCase().includes(q));
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const getOptionValue = (o: SelectOption): string | number => (props.valueKey && o[props.valueKey] !== undefined ? o[props.valueKey] : o.value);
|
|
145
|
+
|
|
146
|
+
const getOptionLabel = (o: SelectOption): string => (props.labelKey && o[props.labelKey] !== undefined ? String(o[props.labelKey]) : o.label);
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<template>
|
|
150
|
+
<div :class="props.class">
|
|
151
|
+
<!-- Label -->
|
|
152
|
+
<DynectFormLabel :label="label" :for="resolvedId" :required="required" :tooltip="tooltip" :class="labelClass" />
|
|
153
|
+
|
|
154
|
+
<!-- Select -->
|
|
155
|
+
<Select v-model="modelValue" :default-value="value" :disabled="disabled" :required="required" :name="resolvedId" @update:model-value="handleChange">
|
|
156
|
+
<SelectTrigger :id="resolvedId" :class="cn(triggerCls, valueCls, isHideDropdown && '[&>svg]:hidden', '[&>span]:truncate')" :aria-invalid="!!errorMessage" :aria-describedby="errorMessage ? `${resolvedId}-error` : description ? `${resolvedId}-description` : undefined">
|
|
157
|
+
<SelectValue :placeholder="placeholder" />
|
|
158
|
+
</SelectTrigger>
|
|
159
|
+
|
|
160
|
+
<SelectContent :class="contentClass" :position="position" :side="side" :align="align">
|
|
161
|
+
<!-- Search -->
|
|
162
|
+
<div v-if="searchable" class="relative border-b px-2">
|
|
163
|
+
<DynectInput :id="`${resolvedId}-search`" v-model="searchQuery" icon-class="pl-0 pr-0" input-class="bg-transparent" :placeholder="searchPlaceholder" class="h-10 bg-transparent ring-0" @keydown.stop @keydown.enter.prevent>
|
|
164
|
+
<template #leading>
|
|
165
|
+
<Icon name="lucide:search" />
|
|
166
|
+
</template>
|
|
167
|
+
</DynectInput>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<SelectGroup v-if="filteredOptions.length > 0">
|
|
171
|
+
<SelectLabel v-if="groupLabel" :class="groupLabelClass">{{ groupLabel }}</SelectLabel>
|
|
172
|
+
<SelectItem v-for="option in filteredOptions" :key="getOptionValue(option)" :value="getOptionValue(option)" :disabled="option.disabled" :class="itemClass">
|
|
173
|
+
<slot name="option" :option="option">{{ getOptionLabel(option) }}</slot>
|
|
174
|
+
</SelectItem>
|
|
175
|
+
</SelectGroup>
|
|
176
|
+
|
|
177
|
+
<!-- Empty -->
|
|
178
|
+
<div v-else :class="cn('text-text-body-subtle py-6 text-center text-sm', emptyStateClass)">
|
|
179
|
+
<slot name="empty">{{ emptyText }}</slot>
|
|
180
|
+
</div>
|
|
181
|
+
</SelectContent>
|
|
182
|
+
</Select>
|
|
183
|
+
|
|
184
|
+
<!-- Description -->
|
|
185
|
+
<DynectFormDescription v-if="!errorMessage" :id="`${resolvedId}-description`" :description="description" :class="descriptionClass" />
|
|
186
|
+
|
|
187
|
+
<!-- Error -->
|
|
188
|
+
<DynectFormError :id="`${resolvedId}-error`" :error="errorMessage" :class="errorClass" />
|
|
189
|
+
</div>
|
|
190
|
+
</template>
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn, inputSizeClasses } from '@/lib/utils';
|
|
5
|
+
import type { SelectOption } from './Select.vue';
|
|
6
|
+
|
|
7
|
+
type SelectSize = 'sm' | 'base' | 'lg' | 'xl';
|
|
8
|
+
type SelectState = 'default' | 'success' | 'danger';
|
|
9
|
+
type VariantState = 'default' | 'success' | 'danger' | 'disabled';
|
|
10
|
+
|
|
11
|
+
const triggerVariants = cva('flex w-full items-center rounded-xl ring-1 ring-inset shadow-none', {
|
|
12
|
+
variants: {
|
|
13
|
+
state: {
|
|
14
|
+
default: 'bg-bg-secondary-medium ring-border-base-medium data-[state=open]:ring-border-brand focus:ring-border-brand',
|
|
15
|
+
success: 'bg-bg-success-soft ring-border-success-subtle data-[state=open]:ring-border-success focus:ring-border-success',
|
|
16
|
+
danger: 'bg-bg-danger-soft ring-border-danger-subtle data-[state=open]:ring-border-danger focus:ring-border-danger',
|
|
17
|
+
disabled: 'bg-bg-disabled ring-border-base-medium cursor-not-allowed opacity-60',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: { state: 'default' },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// ── Props ─────────────────────────────────────────────────────────────────────
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<{
|
|
26
|
+
options?: SelectOption[] | string[] | number[] | any[];
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
id?: HTMLAttributes['id'];
|
|
31
|
+
class?: HTMLAttributes['class'];
|
|
32
|
+
triggerClass?: HTMLAttributes['class'];
|
|
33
|
+
tooltip?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
description?: string;
|
|
37
|
+
size?: SelectSize;
|
|
38
|
+
state?: SelectState;
|
|
39
|
+
labelClass?: string;
|
|
40
|
+
descriptionClass?: string;
|
|
41
|
+
errorClass?: string;
|
|
42
|
+
contentClass?: string;
|
|
43
|
+
itemClass?: string;
|
|
44
|
+
emptyStateClass?: string;
|
|
45
|
+
searchable?: boolean;
|
|
46
|
+
searchPlaceholder?: string;
|
|
47
|
+
emptyText?: string;
|
|
48
|
+
valueKey?: string;
|
|
49
|
+
labelKey?: string;
|
|
50
|
+
maxTags?: number;
|
|
51
|
+
maxVisibleTags?: number;
|
|
52
|
+
}>(),
|
|
53
|
+
{
|
|
54
|
+
placeholder: 'Select options',
|
|
55
|
+
size: 'base',
|
|
56
|
+
searchPlaceholder: 'Search...',
|
|
57
|
+
emptyText: 'No options found',
|
|
58
|
+
valueKey: 'value',
|
|
59
|
+
labelKey: 'label',
|
|
60
|
+
options: () => [],
|
|
61
|
+
searchable: false,
|
|
62
|
+
maxVisibleTags: 3,
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
// ── Model & Field ─────────────────────────────────────────────────────────────
|
|
67
|
+
const fallbackId = useId();
|
|
68
|
+
const resolvedId = computed(() => props.id ?? `select-multiple-${fallbackId}`);
|
|
69
|
+
|
|
70
|
+
const modelValue = defineModel<(string | number)[]>('modelValue', { required: false, default: () => [] });
|
|
71
|
+
|
|
72
|
+
const { errorMessage, handleChange } = useField(() => resolvedId.value || props.name || 'select-multiple', undefined, {
|
|
73
|
+
initialValue: modelValue.value,
|
|
74
|
+
syncVModel: true,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// ── State ─────────────────────────────────────────────────────────────────────
|
|
78
|
+
const isOpen = ref(false);
|
|
79
|
+
const searchQuery = ref('');
|
|
80
|
+
|
|
81
|
+
// ── Variant resolution ────────────────────────────────────────────────────────
|
|
82
|
+
const variantState = computed<VariantState>(() => {
|
|
83
|
+
if (props.disabled) return 'disabled';
|
|
84
|
+
if (props.state && props.state !== 'default') return props.state;
|
|
85
|
+
return errorMessage.value ? 'danger' : 'default';
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const triggerCls = computed(() => cn(triggerVariants({ state: variantState.value }), inputSizeClasses[props.size ?? 'base'], props.triggerClass));
|
|
89
|
+
|
|
90
|
+
// ── Options ───────────────────────────────────────────────────────────────────
|
|
91
|
+
const normalizedOptions = computed<SelectOption[]>(() => {
|
|
92
|
+
if (!props.options?.length) return [];
|
|
93
|
+
return props.options.map((o) => {
|
|
94
|
+
if (typeof o === 'string' || typeof o === 'number') return { label: String(o), value: o };
|
|
95
|
+
return o as SelectOption;
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const filteredOptions = computed<SelectOption[]>(() => {
|
|
100
|
+
if (!props.searchable || !searchQuery.value) return normalizedOptions.value;
|
|
101
|
+
const q = searchQuery.value.toLowerCase();
|
|
102
|
+
return normalizedOptions.value.filter((o) => getOptionLabel(o).toLowerCase().includes(q));
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const getOptionValue = (o: SelectOption): string | number => (props.valueKey && o[props.valueKey] !== undefined ? o[props.valueKey] : o.value);
|
|
106
|
+
const getOptionLabel = (o: SelectOption): string => (props.labelKey && o[props.labelKey] !== undefined ? String(o[props.labelKey]) : o.label);
|
|
107
|
+
|
|
108
|
+
// ── Selection helpers ─────────────────────────────────────────────────────────
|
|
109
|
+
const selected = computed(() => modelValue.value ?? []);
|
|
110
|
+
|
|
111
|
+
const isSelected = (o: SelectOption) => selected.value.includes(getOptionValue(o));
|
|
112
|
+
|
|
113
|
+
const selectedLabels = computed(() =>
|
|
114
|
+
selected.value.map((v) => {
|
|
115
|
+
const match = normalizedOptions.value.find((o) => getOptionValue(o) === v);
|
|
116
|
+
return { value: v, label: match ? getOptionLabel(match) : String(v) };
|
|
117
|
+
})
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const visibleLabels = computed(() => selectedLabels.value.slice(0, props.maxVisibleTags));
|
|
121
|
+
const overflowCount = computed(() => Math.max(0, selectedLabels.value.length - props.maxVisibleTags));
|
|
122
|
+
|
|
123
|
+
function toggle(o: SelectOption) {
|
|
124
|
+
if (props.disabled) return;
|
|
125
|
+
const val = getOptionValue(o);
|
|
126
|
+
let next: (string | number)[];
|
|
127
|
+
if (isSelected(o)) {
|
|
128
|
+
next = selected.value.filter((v) => v !== val);
|
|
129
|
+
} else if (props.maxTags && selected.value.length >= props.maxTags) {
|
|
130
|
+
next = selected.value;
|
|
131
|
+
} else {
|
|
132
|
+
next = [...selected.value, val];
|
|
133
|
+
}
|
|
134
|
+
modelValue.value = next;
|
|
135
|
+
handleChange(next);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function removeTag(val: string | number) {
|
|
139
|
+
if (props.disabled) return;
|
|
140
|
+
const next = selected.value.filter((v) => v !== val);
|
|
141
|
+
modelValue.value = next;
|
|
142
|
+
handleChange(next);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function clearAll(e: MouseEvent) {
|
|
146
|
+
e.stopPropagation();
|
|
147
|
+
if (props.disabled) return;
|
|
148
|
+
modelValue.value = [];
|
|
149
|
+
handleChange([]);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Close dropdown when clicking outside
|
|
153
|
+
function onOpenChange(open: boolean) {
|
|
154
|
+
isOpen.value = open;
|
|
155
|
+
if (!open) searchQuery.value = '';
|
|
156
|
+
}
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<template>
|
|
160
|
+
<div :class="props.class">
|
|
161
|
+
<!-- Label -->
|
|
162
|
+
<DynectFormLabel :label="label" :for="resolvedId" :required="required" :tooltip="tooltip" :class="labelClass" />
|
|
163
|
+
|
|
164
|
+
<!-- Trigger -->
|
|
165
|
+
<Popover :open="isOpen" @update:open="onOpenChange">
|
|
166
|
+
<PopoverTrigger as-child :disabled="disabled">
|
|
167
|
+
<button
|
|
168
|
+
:id="resolvedId"
|
|
169
|
+
type="button"
|
|
170
|
+
:disabled="disabled"
|
|
171
|
+
:aria-invalid="!!errorMessage"
|
|
172
|
+
:aria-describedby="errorMessage ? `${resolvedId}-error` : description ? `${resolvedId}-description` : undefined"
|
|
173
|
+
:data-state="isOpen ? 'open' : 'closed'"
|
|
174
|
+
:class="cn(triggerCls, 'min-h-10 flex-wrap gap-1.5 text-left')"
|
|
175
|
+
>
|
|
176
|
+
<!-- Selected tags -->
|
|
177
|
+
<template v-if="visibleLabels.length">
|
|
178
|
+
<DynectBadge v-for="tag in visibleLabels" :key="tag.value" variant="info" size="sm">
|
|
179
|
+
{{ tag.label }}
|
|
180
|
+
<button type="button" class="hover:text-text-brand-strong ml-0.5 shrink-0" @click.stop="removeTag(tag.value)">
|
|
181
|
+
<Icon name="lucide:x" class="size-3" />
|
|
182
|
+
</button>
|
|
183
|
+
</DynectBadge>
|
|
184
|
+
<TooltipProvider v-if="overflowCount > 0">
|
|
185
|
+
<Tooltip>
|
|
186
|
+
<TooltipTrigger as-child>
|
|
187
|
+
<DynectBadge variant="info" size="sm">+{{ overflowCount }} selections</DynectBadge>
|
|
188
|
+
</TooltipTrigger>
|
|
189
|
+
<TooltipContent>
|
|
190
|
+
<p v-for="tag in selectedLabels.slice(props.maxVisibleTags)" :key="tag.value">{{ tag.label }}</p>
|
|
191
|
+
</TooltipContent>
|
|
192
|
+
</Tooltip>
|
|
193
|
+
</TooltipProvider>
|
|
194
|
+
</template>
|
|
195
|
+
|
|
196
|
+
<!-- Placeholder -->
|
|
197
|
+
<span v-else class="text-text-body-subtle flex-1 truncate text-sm">{{ placeholder }}</span>
|
|
198
|
+
|
|
199
|
+
<!-- Right icons -->
|
|
200
|
+
<span class="ml-auto flex shrink-0 items-center gap-1 pl-1">
|
|
201
|
+
<button v-if="selected.length" type="button" class="text-text-body hover:text-text-heading" @click="clearAll">
|
|
202
|
+
<Icon name="lucide:x" class="size-3.5" />
|
|
203
|
+
</button>
|
|
204
|
+
<Icon v-else name="lucide:chevron-down" class="text-text-body size-4 transition-transform duration-200" :class="isOpen ? 'rotate-180' : ''" />
|
|
205
|
+
</span>
|
|
206
|
+
</button>
|
|
207
|
+
</PopoverTrigger>
|
|
208
|
+
|
|
209
|
+
<PopoverContent :class="cn('w-[--reka-popover-trigger-width] p-0', contentClass)" align="start" side="bottom" :side-offset="4">
|
|
210
|
+
<!-- Search -->
|
|
211
|
+
<div v-if="searchable" class="border-border-base-subtle border-b px-2">
|
|
212
|
+
<DynectInput :id="`${resolvedId}-search`" v-model="searchQuery" icon-class="pl-0 pr-0" input-class="bg-transparent" :placeholder="searchPlaceholder" class="h-10 bg-transparent ring-0" @keydown.stop @keydown.enter.prevent>
|
|
213
|
+
<template #leading>
|
|
214
|
+
<Icon name="lucide:search" />
|
|
215
|
+
</template>
|
|
216
|
+
</DynectInput>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<!-- Options list -->
|
|
220
|
+
<div class="max-h-60 overflow-y-auto p-1">
|
|
221
|
+
<template v-if="filteredOptions.length">
|
|
222
|
+
<button
|
|
223
|
+
v-for="option in filteredOptions"
|
|
224
|
+
:key="getOptionValue(option)"
|
|
225
|
+
type="button"
|
|
226
|
+
:disabled="option.disabled || (!isSelected(option) && !!maxTags && selected.length >= maxTags)"
|
|
227
|
+
:class="cn('hover:bg-bg-tertiary-medium flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50', itemClass)"
|
|
228
|
+
@click="toggle(option)"
|
|
229
|
+
>
|
|
230
|
+
<!-- Checkbox indicator -->
|
|
231
|
+
<span :class="cn('border-border-base-medium flex size-4 shrink-0 items-center justify-center rounded border', isSelected(option) && 'bg-bg-brand border-border-brand text-text-white')">
|
|
232
|
+
<Icon v-if="isSelected(option)" name="lucide:check" class="size-3" />
|
|
233
|
+
</span>
|
|
234
|
+
<span class="text-text-heading flex-1 truncate text-left">
|
|
235
|
+
<slot name="option" :option="option">{{ getOptionLabel(option) }}</slot>
|
|
236
|
+
</span>
|
|
237
|
+
</button>
|
|
238
|
+
</template>
|
|
239
|
+
|
|
240
|
+
<!-- Empty -->
|
|
241
|
+
<div v-else :class="cn('text-text-body-subtle py-6 text-center text-sm', emptyStateClass)">
|
|
242
|
+
<slot name="empty">{{ emptyText }}</slot>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<!-- Footer: selected count -->
|
|
247
|
+
<div v-if="selected.length" class="border-border-base-subtle border-t px-3 py-2">
|
|
248
|
+
<span class="text-text-body-subtle text-xs">{{ selected.length }} selected{{ maxTags ? ` / ${maxTags}` : '' }}</span>
|
|
249
|
+
</div>
|
|
250
|
+
</PopoverContent>
|
|
251
|
+
</Popover>
|
|
252
|
+
|
|
253
|
+
<!-- Description -->
|
|
254
|
+
<DynectFormDescription v-if="!errorMessage" :id="`${resolvedId}-description`" :description="description" :class="descriptionClass" />
|
|
255
|
+
|
|
256
|
+
<!-- Error -->
|
|
257
|
+
<DynectFormError :id="`${resolvedId}-error`" :error="errorMessage" :class="errorClass" />
|
|
258
|
+
</div>
|
|
259
|
+
</template>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
|
|
4
|
+
interface SheetProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
modal?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<SheetProps>(), {
|
|
16
|
+
open: false,
|
|
17
|
+
side: 'right',
|
|
18
|
+
size: 'md',
|
|
19
|
+
closable: true,
|
|
20
|
+
modal: true,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits<{
|
|
24
|
+
'update:open': [value: boolean];
|
|
25
|
+
}>();
|
|
26
|
+
|
|
27
|
+
const isOpen = computed({
|
|
28
|
+
get: () => props.open,
|
|
29
|
+
set: (value) => emit('update:open', value),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const SHEET_SIZE_CLASSES = {
|
|
33
|
+
sm: 'sm:max-w-sm',
|
|
34
|
+
md: 'sm:max-w-md',
|
|
35
|
+
lg: 'sm:max-w-lg',
|
|
36
|
+
xl: 'sm:max-w-xl',
|
|
37
|
+
'2xl': 'sm:max-w-2xl',
|
|
38
|
+
'3xl': 'sm:max-w-3xl',
|
|
39
|
+
'4xl': 'sm:max-w-4xl',
|
|
40
|
+
'5xl': 'sm:max-w-5xl',
|
|
41
|
+
'6xl': 'sm:max-w-6xl',
|
|
42
|
+
'7xl': 'sm:max-w-7xl',
|
|
43
|
+
full: 'sm:max-w-full sm:m-4',
|
|
44
|
+
} as const;
|
|
45
|
+
|
|
46
|
+
const sizeClasses = computed(() => SHEET_SIZE_CLASSES[props.size] ?? SHEET_SIZE_CLASSES.md);
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<Sheet v-model:open="isOpen" :modal="modal">
|
|
51
|
+
<SheetTrigger v-if="$slots.trigger" as-child>
|
|
52
|
+
<slot name="trigger" />
|
|
53
|
+
</SheetTrigger>
|
|
54
|
+
<SheetContent :side="side" :class="cn(sizeClasses, props.class)">
|
|
55
|
+
<SheetHeader v-if="title || description || $slots.header">
|
|
56
|
+
<slot name="header">
|
|
57
|
+
<SheetTitle v-if="title">
|
|
58
|
+
{{ title }}
|
|
59
|
+
<SheetClose v-if="closable" @click="isOpen = false">
|
|
60
|
+
<span class="sr-only">Close</span>
|
|
61
|
+
</SheetClose>
|
|
62
|
+
</SheetTitle>
|
|
63
|
+
<SheetTitle v-else class="sr-only">Dialog</SheetTitle>
|
|
64
|
+
<SheetDescription v-if="description">
|
|
65
|
+
{{ description }}
|
|
66
|
+
</SheetDescription>
|
|
67
|
+
<SheetDescription v-else class="sr-only">Dialog</SheetDescription>
|
|
68
|
+
</slot>
|
|
69
|
+
</SheetHeader>
|
|
70
|
+
|
|
71
|
+
<div class="flex-1 overflow-y-auto">
|
|
72
|
+
<slot />
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<SheetFooter v-if="$slots.footer">
|
|
76
|
+
<slot name="footer" />
|
|
77
|
+
</SheetFooter>
|
|
78
|
+
</SheetContent>
|
|
79
|
+
</Sheet>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex size-full flex-col gap-2">
|
|
3
|
+
<!-- Label -->
|
|
4
|
+
<DynectFormLabel :label="label" :for="resolvedId" :required="required" :tooltip="tooltip" :class="labelClass" />
|
|
5
|
+
|
|
6
|
+
<BaseSignature ref="signature" :sig-option="options" @after-update-stroke="save()" />
|
|
7
|
+
|
|
8
|
+
<div v-if="isShowButton" class="mt-2 flex flex-row gap-2">
|
|
9
|
+
<DynectButton size="xs" variant="outline" @click="clear">Clear</DynectButton>
|
|
10
|
+
<DynectButton size="xs" variant="outline" @click="undo">Undo</DynectButton>
|
|
11
|
+
<DynectButton size="xs" variant="outline" @click="downloadImage()">Save</DynectButton>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<!-- Description -->
|
|
15
|
+
<DynectFormDescription v-if="!errorMessage" :id="`${resolvedId}-description`" :description="description" :class="descriptionClass" />
|
|
16
|
+
|
|
17
|
+
<!-- Error Message -->
|
|
18
|
+
<DynectFormError :id="`${resolvedId}-error`" :error="errorMessage" :class="errorClass" />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
interface BaseSignatureInstance {
|
|
24
|
+
save: (format?: string) => string;
|
|
25
|
+
clear: () => void;
|
|
26
|
+
undo: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const props = withDefaults(
|
|
30
|
+
defineProps<{
|
|
31
|
+
formatImage?: string;
|
|
32
|
+
isShowButton?: boolean;
|
|
33
|
+
isDownload?: boolean;
|
|
34
|
+
id?: string;
|
|
35
|
+
label?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
tooltip?: string;
|
|
39
|
+
labelClass?: string;
|
|
40
|
+
descriptionClass?: string;
|
|
41
|
+
errorClass?: string;
|
|
42
|
+
}>(),
|
|
43
|
+
{
|
|
44
|
+
formatImage: 'image/png',
|
|
45
|
+
isShowButton: true,
|
|
46
|
+
isDownload: false,
|
|
47
|
+
required: false,
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const signature = ref<BaseSignatureInstance | null>(null);
|
|
52
|
+
|
|
53
|
+
const options = reactive({
|
|
54
|
+
penColor: 'rgb(0, 0, 0)',
|
|
55
|
+
backgroundColor: 'rgb(255, 255, 255)',
|
|
56
|
+
minWidth: 1,
|
|
57
|
+
maxWidth: 1,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const fallbackId = useId();
|
|
61
|
+
const resolvedId = computed(() => props.id ?? `signature-${fallbackId}`);
|
|
62
|
+
|
|
63
|
+
const model = defineModel<File | null>('modelValue', {
|
|
64
|
+
required: false,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const { errorMessage } = useField(() => resolvedId.value, undefined, {
|
|
68
|
+
initialValue: model.value,
|
|
69
|
+
syncVModel: true,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const getExtensionFromMimeType = (mimeType: string): string => mimeType.split('/')[1] ?? 'png';
|
|
73
|
+
|
|
74
|
+
const base64ToFile = (base64String: string, fileName: string): File | null => {
|
|
75
|
+
try {
|
|
76
|
+
if (!base64String || typeof base64String !== 'string') {
|
|
77
|
+
console.error('Invalid base64 string provided');
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const arr = base64String.split(',');
|
|
82
|
+
if (arr.length !== 2) {
|
|
83
|
+
console.error('Invalid base64 format. Expected data URI format.');
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const mime = arr[0]?.match(/:[^:;]+;/)?.[0]?.slice(1, -1) ?? 'image/png';
|
|
88
|
+
const base64Data = arr[1];
|
|
89
|
+
|
|
90
|
+
if (!base64Data) {
|
|
91
|
+
console.error('No base64 data found');
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const bstr = atob(base64Data);
|
|
96
|
+
let n = bstr.length;
|
|
97
|
+
const uint8Array = new Uint8Array(n);
|
|
98
|
+
while (n--) {
|
|
99
|
+
uint8Array[n] = bstr.codePointAt(n) ?? 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return new File([uint8Array], fileName, { type: mime });
|
|
103
|
+
} catch (error) {
|
|
104
|
+
console.error('Error converting base64 to file:', error);
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const save = (): void => {
|
|
110
|
+
if (!signature.value) return;
|
|
111
|
+
const format = props.formatImage ?? 'image/png';
|
|
112
|
+
const dataUrl = signature.value.save(format);
|
|
113
|
+
const file = base64ToFile(dataUrl, `signature.${getExtensionFromMimeType(format)}`);
|
|
114
|
+
if (file) model.value = file;
|
|
115
|
+
if (props.isDownload) downloadImage();
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const clear = (): void => {
|
|
119
|
+
signature.value?.clear();
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const undo = (): void => {
|
|
123
|
+
signature.value?.undo();
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const downloadImage = (): void => {
|
|
127
|
+
if (!signature.value) return;
|
|
128
|
+
const format = props.formatImage ?? 'image/png';
|
|
129
|
+
const dataUrl = signature.value.save(format);
|
|
130
|
+
const link = document.createElement('a');
|
|
131
|
+
link.href = dataUrl;
|
|
132
|
+
link.download = `signature.${getExtensionFromMimeType(format)}`;
|
|
133
|
+
link.click();
|
|
134
|
+
};
|
|
135
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const colorMode: any = useColorMode();
|
|
3
|
+
const isDark = computed(() => colorMode.value === 'dark');
|
|
4
|
+
const toggleTheme = () => {
|
|
5
|
+
colorMode.preference = isDark.value ? 'light' : 'dark';
|
|
6
|
+
};
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<DynectButton icon-only size="sm" color="ghost" class="relative [&_svg]:size-5" @click="toggleTheme">
|
|
11
|
+
<Icon v-if="isDark" name="lucide:sun" />
|
|
12
|
+
<Icon v-else name="lucide:moon" />
|
|
13
|
+
</DynectButton>
|
|
14
|
+
</template>
|