@flux-ui/dashboard 3.0.0-next.5 → 3.0.0-next.7
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../internals/dist/index.js","../src/data/index.ts","../src/component/FluxDashboard.vue","../src/composable/useDashboardInjection.ts","../src/component/FluxDashboardContent.vue","../src/component/FluxDashboardTopBar.vue","../src/component/FluxDashboardHeader.vue","../src/component/FluxDashboardMenu.vue","../src/component/FluxDashboardNavigation.vue"],"sourcesContent":["import{computed as E,ref as _,unref as b}from\"vue\";function N(e,t){let o=_(!1),n=_(e),s=E(()=>{let c=[],m=b(n).month,h=b(n).startOf(\"month\");do c.push(h),h=h.plus({day:1});while(h.month===m);let y=c[0],T=c[c.length-1];for(let x=1;x<y.weekday;++x)c.unshift(y.minus({day:x}));for(let x=T.weekday+1;x<=7;++x)c.push(T.plus({day:x-T.weekday}));while(c.length/7<6){let x=c[c.length-1];for(let S=1;S<=7;++S)c.push(x.plus({day:S}))}return c}),r=E(()=>b(s).slice(0,7).map((c)=>c.toLocaleString({weekday:t?.weekDayLength??\"short\"}))),i=E(()=>b(n).plus({month:1})),a=E(()=>b(n).minus({month:1})),f=E(()=>b(n).toLocaleString({month:t?.monthLength??\"long\"})),l=E(()=>b(n).year.toString());function u(c){o.value=n.value>c,n.value=c}function v(){u(b(n).plus({month:1}))}function L(){u(b(n).minus({month:1}))}return{isTransitioningToPast:o,viewDate:n,viewDateNext:i,viewDatePrevious:a,viewMonth:f,viewYear:l,dates:s,days:r,setViewDate:u,nextMonth:v,previousMonth:L}}import{computed as me,unref as xe}from\"vue\";function U(e,t){return{months:me(()=>{let n=[],s=xe(e),r=s.startOf(\"year\");while(r.month<=12&&r.year===s.year)n.push({date:r,label:r.toLocaleString({month:t})}),r=r.plus({months:1});return n})}}import{computed as be,ref as he,unref as P,watch as ye}from\"vue\";function K(e,t=10){let o=he(0),n=be(()=>{let i=P(e).year,a=[],f=i-i%t+P(o)*t;for(let l=0;l<t;++l)a.push(f+l);return a});function s(){++o.value}function r(){--o.value}return ye(e,()=>o.value=0),{years:n,next:s,previous:r}}import{onMounted as De,onUnmounted as Ae,ref as Se,unref as Y,watchEffect as Ie}from\"vue\";import{Fragment as Te}from\"vue\";function z(e){let t=[];for(let o of e){if(o.type===Te&&Array.isArray(o.children)){t.push(...o.children);continue}t.push(o)}return t}import{isHtmlElement as ve}from\"@basmilius/utils\";var Ee=[\"a:not([disabled])\",\"button:not([disabled])\",\"input[type=checkbox]:not([disabled])\",\"input[type=radio]:not([disabled])\",\"input[type=text]:not([disabled])\",'[tabindex]:not([disabled]):not([tabindex=\"-1\"])'].join(\",\");function d(e){return Array.from(e.querySelectorAll(Ee)).filter(ve).filter((t)=>t.offsetWidth>0||t.offsetHeight>0||t===document.activeElement)}function M(e,t,o){let n=d(e),s=n.indexOf(t);if(s===-1)return null;let r=Le(n);ge(r,s,o);let i=we(s,o,r,n);if(!i){if(o===\"up\"||o===\"left\")i=n[s-1];if(o===\"down\"||o===\"right\")i=n[s+1]}return i}function ge(e,t,o){let n=e[t];e.forEach((s)=>{let r=s.center;switch(o){case\"up\":r={x:r.x,y:s.top+s.height};break;case\"down\":r={x:r.x,y:s.top};break;case\"left\":r={x:s.left+s.width,y:r.y};break;case\"right\":r={x:s.left,y:r.y};break}s.distance=Math.sqrt(Math.pow(n.center.x-r.x,2)+Math.pow(n.center.y-r.y,2))})}function we(e,t,o,n){let s=o[e],r=[];switch(t){case\"up\":r=o.map((a,f)=>f===e||a.top+a.height>s.top?Number.MAX_SAFE_INTEGER:a.distance);break;case\"down\":r=o.map((a,f)=>f===e||a.top<s.top+s.height?Number.MAX_SAFE_INTEGER:a.distance);break;case\"left\":r=o.map((a,f)=>f===e||a.left+a.width>s.left?Number.MAX_SAFE_INTEGER:a.distance);break;case\"right\":r=o.map((a,f)=>f===e||a.left<s.left+s.width?Number.MAX_SAFE_INTEGER:a.distance);break}let i=r.indexOf(Math.min(...r));if(r[i]!==Number.MAX_SAFE_INTEGER)return n[i];return null}function Le(e){return e.map((t)=>t.getBoundingClientRect()).map((t)=>({height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom,center:{x:t.left+t.width/2,y:t.top+t.height/2},distance:0}))}function B(e){let t=\"UnknownComponent\";if(e.type&&e.type.__name)t=e.type.__name;return t}import{camelCase as Me}from\"lodash-es\";function V(e){return Object.fromEntries(Object.entries(e.props??{}).map(([t,o])=>[Me(t),o]))}function q(e,t){if(!e.exposed||!(t in e.exposed))throw new Error(`'${t}' was not exposed by the component.`);return e.exposed[t]}import{isHtmlElement as Re}from\"@basmilius/utils\";function R(e,t,o=void 0){let n=d(e),s=o||document.activeElement;if(!s||!Re(s))return n[0]||void 0;let r=n.indexOf(s);return n[r+t]||void 0}function F(e){return Array.from(e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])')).filter((t)=>!t.hasAttribute(\"disabled\")||t.getAttribute(\"disabled\")!==\"true\").filter((t)=>!t.hasAttribute(\"aria-disabled\")||t.getAttribute(\"aria-disabled\")!==\"true\")}import{isHtmlElement as Fe}from\"@basmilius/utils\";import{unref as ke}from\"vue\";function p(e){let t=ke(e);if(Fe(t))return t;return t?.$el}function W(...e){console.warn(\"[Flux]\",...e)}function g(e,t,o=!1){let n=He(e),s=t.compareDocumentPosition(e),r;if(s&&Node.DOCUMENT_POSITION_PRECEDING||o)r=n.firstChild();else r=n.lastChild();(r!==null?r:e).focus()}function He(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:(t)=>t.tabIndex>=0&&!t.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}class G{get active(){return this.current?.isEnabled??!1}get current(){return this.#e[this.#e.length-1]??null}#t=[];#e=[];add(e,t,o=!0){let n={id:e,setEnabled:t,isEnabled:!0};if(this.current&&this.toggle(this.current,!1),this.#e.push(n),o)this.toggle(n,!0),this.emit()}remove(e){let t=this.#e.find((s)=>s.id===e);t&&this.toggle(t,!1);let n=this.current?.id===e;this.#e=this.#e.filter((s)=>s.id!==e),n&&this.current&&this.toggle(this.current,!0),this.emit()}emit(){this.#t.forEach((e)=>e(this.active,this.#e))}subscribe(e){return this.#t.push(e),e(this.active,this.#e),()=>this.#t=this.#t.filter((t)=>t!==e)}toggle(e,t){e.setEnabled(t),e.isEnabled=t}}var w=new G;var X=!globalThis.document;function j(e,t,o){let n=Se([]);De(()=>{document.addEventListener(\"pointerdown\",s)}),Ae(()=>{document.removeEventListener(\"pointerdown\",s)});function s(r){if(!Y(t))return;!Y(n).some((a)=>a.contains(r.target))&&o(r)}Ie(()=>{let r=[];(Array.isArray(e)?e:[e]).forEach((i)=>{let a=p(i);a&&r.push(a)}),n.value=r})}import{computed as Oe,getCurrentInstance as Ce}from\"vue\";function Z(){let e=Ce();return Oe(()=>e?.uid??(e?.proxy)._uid??0)}import{customRef as _e,isRef as $,ref as Ne,watch as Ue}from\"vue\";function J(e,t,o=!1){let n=Ne($(e)?e.value:e),s=_e((r,i)=>({get(){return r(),n.value},set:Pe((a)=>{n.value=a,i()},t,o)}));if($(e))Ue(e,(r)=>s.value=r);return s}function Pe(e,t,o=!1){let n;return(...s)=>{if(o&&!n)e(...s);clearTimeout(n),n=setTimeout(()=>requestAnimationFrame(()=>e(...s)),t)}}import{watch as Ke}from\"vue\";function k(e,t,o,n={passive:!0}){Ke(e,(s,r,i)=>{if(!s)return;s.addEventListener(t,o,n),i(()=>s.removeEventListener(t,o))},{immediate:!0})}import{onMounted as ze,onUnmounted as Be,ref as Ve,unref as qe}from\"vue\";function Q(e,t){let o=Ve();ze(()=>{s()}),Be(()=>{clearTimeout(o.value)});function n(){o.value=setTimeout(()=>requestAnimationFrame(s),qe(e))}function s(){n(),t()}}import{ref as We,watch as Ge}from\"vue\";function ee(e,t={}){let o=We(t.initial??!1);return Ge(e,(n,s,r)=>{let i=p(e);if(!i)return;let a=new IntersectionObserver((f)=>o.value=f[0]?.isIntersecting??!1,t);a.observe(i),r(()=>a.disconnect())},{immediate:!0}),o}import{onScopeDispose as Xe,watch as Ye}from\"vue\";function H(e,t,o){o??={attributes:!0};let n,s=Ye(()=>p(e),(a)=>{if(r(),!a)return;n=new MutationObserver(t),n.observe(a,o)},{immediate:!0});function r(){if(!n)return;n.disconnect(),n=void 0}function i(){r(),s()}Xe(i)}import{DateTime as te}from\"luxon\";import{ref as je,watch as Ze}from\"vue\";function oe(e,t){let o=`flux/${e}`,n=je(s()??t);function s(){if(o in localStorage){let r=JSON.parse(localStorage.getItem(o));if(Array.isArray(r)&&r[0]===\"DateTime\")r=te.fromISO(r[1]);return r}return null}return Ze(n,(r)=>{let i=r;if(te.isDateTime(r))i=[\"DateTime\",r.toISO({includeOffset:!0,extendedZone:!0})];localStorage.setItem(o,JSON.stringify(i))}),n}import{ref as I,unref as $e}from\"vue\";function ne(e){let t=I(0),o=I(0);if(!e)e=I(document);return k(e,\"scroll\",()=>{let n=$e(e);if(n instanceof Document)n=n.scrollingElement;t.value=n?.scrollLeft??0,o.value=n?.scrollTop??0}),{x:t,y:o}}import{ref as ie,watch as ce}from\"vue\";import{onMounted as Je,onUnmounted as Qe,ref as re,unref as se}from\"vue\";var et=0;function D(e=!1){let t=re(`focus-trap-${++et}`),o=re(!1);return Je(()=>w.add(se(t),(n)=>o.value=n,e)),Qe(()=>w.remove(se(t))),o}import{onUnmounted as tt,ref as ot,unref as ae}from\"vue\";function A(e){let t=ot(document.activeElement);tt(()=>{if(ae(e))return;requestAnimationFrame(()=>ae(t)?.focus())})}function le(e,t={}){if(X)return;let{disable:o=ie(!1),disableReturn:n=ie(!1),attachTo:s=null}=t,r=D(!o);A(n),ce(e,(i,a,f)=>{let l=p(e),u=s||document;if(r.value&&l&&document.activeElement&&!l.contains(document.activeElement)&&!l.querySelector(\"[autofocus]\"))g(l,document.activeElement,!0);function v(c){if(!r.value||!l)return;let m=c.target||document.body;if(l.contains(m))return;c.preventDefault(),c.stopImmediatePropagation(),g(l,m)}function L(c){if(!r.value||!l)return;if(!c.relatedTarget||c.relatedTarget===document.body)c.preventDefault(),l.focus();let m=c.target||document.body;if(l.contains(m))return;g(l,m)}if(u.addEventListener(\"focusin\",v,{capture:!0}),u.addEventListener(\"focusout\",L,{capture:!0}),l){let c=d(l),m=c.findIndex((T)=>T.classList.contains(\"is-active\")),h=c.findIndex((T)=>!T.hasAttribute(\"aria-disabled\")),y=c[0];if(m>-1)y=c[m];if(h>-1)y=c[h];if(y)y.focus()}f(()=>{u.removeEventListener(\"focusin\",v),u.removeEventListener(\"focusout\",L)})},{immediate:!0}),ce(()=>o,()=>{let i=p(e);if(r.value=!o,o||!i)return;let a=d(i);if(a.includes(document.activeElement))return;a[0]?.focus()},{immediate:!0})}import{onMounted as nt,onUnmounted as rt,ref as st}from\"vue\";function fe(e){let t=st(null);nt(()=>t.value=w.subscribe(e)),rt(()=>t.value?.())}import{watch as at}from\"vue\";function pe(e,{cycle:t=!0,direction:o=\"bidirectional\"}={}){H(e,()=>s(n(),!1));function n(){let i=p(e),a=d(i),f=a.findIndex((u)=>u.classList.contains(\"is-active\")),l=a.findIndex((u)=>!u.hasAttribute(\"aria-disabled\"));if(f>-1)return f;if(l>-1)return l;return 0}function s(i,a=!0){let f=p(e),l=d(f);l.forEach((u,v)=>u.tabIndex=v===i?0:-1),a&&l[i]?.focus()}function r(i){let a=p(e),f=d(a);if([\"Enter\",\" \"].includes(i.key))return;switch(o){case\"bidirectional\":it(i,a,f,s);break;case\"horizontal\":case\"vertical\":ct(i,a,t,o,f,s);break}}at(e,(i,a,f)=>{let l=p(e);if(!l)return;l.addEventListener(\"keydown\",r),s(n(),!1),f(()=>l.removeEventListener(\"keydown\",r))},{immediate:!0})}function it(e,t,o,n){let s;switch(e.key){case\"ArrowUp\":s=\"up\";break;case\"ArrowDown\":s=\"down\";break;case\"ArrowLeft\":s=\"left\";break;case\"ArrowRight\":s=\"right\";break;default:return}let r=M(t,document.activeElement,s);if(r)n(o.indexOf(r));e.preventDefault()}function ct(e,t,o,n,s,r){let i;if(e.key===(n===\"horizontal\"?\"ArrowLeft\":\"ArrowUp\"))i=-1;else if(e.key===(n===\"horizontal\"?\"ArrowRight\":\"ArrowDown\"))i=1;else return;let a=R(t,i);if(a)r(s.indexOf(a));else if(o)r(i===1?0:s.length-1);e.preventDefault()}var nn=\"#f8fafc\",rn=\"#f1f5f9\",sn=\"#e2e8f0\",an=\"#cbd5e1\",cn=\"#94a3b8\",ln=\"#64748b\",fn=\"#475569\",pn=\"#334155\",un=\"#1e293b\",dn=\"#0f172a\",mn=\"#020617\",xn=\"#f9fafb\",bn=\"#f3f4f6\",hn=\"#e5e7eb\",yn=\"#d1d5db\",Tn=\"#9ca3af\",vn=\"#6b7280\",En=\"#4b5563\",gn=\"#374151\",wn=\"#1f2937\",Ln=\"#111827\",Mn=\"#030712\",Rn=\"#fafafa\",Fn=\"#f4f4f5\",kn=\"#e4e4e7\",Hn=\"#d4d4d8\",Dn=\"#a1a1aa\",An=\"#71717a\",Sn=\"#52525b\",In=\"#3f3f46\",On=\"#27272a\",Cn=\"#18181b\",_n=\"#09090b\",Nn=\"#fafafa\",Un=\"#f5f5f5\",Pn=\"#e5e5e5\",Kn=\"#d4d4d4\",zn=\"#a3a3a3\",Bn=\"#737373\",Vn=\"#525252\",qn=\"#404040\",Wn=\"#262626\",Gn=\"#171717\",Xn=\"#0a0a0a\",Yn=\"#fafaf9\",jn=\"#f5f5f4\",Zn=\"#e7e5e4\",$n=\"#d6d3d1\",Jn=\"#a8a29e\",Qn=\"#78716c\",er=\"#57534e\",tr=\"#44403c\",or=\"#292524\",nr=\"#1c1917\",rr=\"#0c0a09\",sr=\"#fef2f2\",ar=\"#fee2e2\",ir=\"#fecaca\",cr=\"#fca5a5\",lr=\"#f87171\",fr=\"#ef4444\",pr=\"#dc2626\",ur=\"#b91c1c\",dr=\"#991b1b\",mr=\"#7f1d1d\",xr=\"#450a0a\",br=\"#fff7ed\",hr=\"#ffedd5\",yr=\"#fed7aa\",Tr=\"#fdba74\",vr=\"#fb923c\",Er=\"#f97316\",gr=\"#ea580c\",wr=\"#c2410c\",Lr=\"#9a3412\",Mr=\"#7c2d12\",Rr=\"#431407\",Fr=\"#fffbeb\",kr=\"#fef3c7\",Hr=\"#fde68a\",Dr=\"#fcd34d\",Ar=\"#fbbf24\",Sr=\"#f59e0b\",Ir=\"#d97706\",Or=\"#b45309\",Cr=\"#92400e\",_r=\"#78350f\",Nr=\"#451a03\",Ur=\"#fefce8\",Pr=\"#fef9c3\",Kr=\"#fef08a\",zr=\"#fde047\",Br=\"#facc15\",Vr=\"#eab308\",qr=\"#ca8a04\",Wr=\"#a16207\",Gr=\"#854d0e\",Xr=\"#713f12\",Yr=\"#422006\",jr=\"#f7fee7\",Zr=\"#ecfccb\",$r=\"#d9f99d\",Jr=\"#bef264\",Qr=\"#a3e635\",es=\"#84cc16\",ts=\"#65a30d\",os=\"#4d7c0f\",ns=\"#3f6212\",rs=\"#365314\",ss=\"#1a2e05\",as=\"#f0fdf4\",is=\"#dcfce7\",cs=\"#bbf7d0\",ls=\"#86efac\",fs=\"#4ade80\",ps=\"#22c55e\",us=\"#16a34a\",ds=\"#15803d\",ms=\"#166534\",xs=\"#14532d\",bs=\"#052e16\",hs=\"#ecfdf5\",ys=\"#d1fae5\",Ts=\"#a7f3d0\",vs=\"#6ee7b7\",Es=\"#34d399\",gs=\"#10b981\",ws=\"#059669\",Ls=\"#047857\",Ms=\"#065f46\",Rs=\"#064e3b\",Fs=\"#022c22\",ks=\"#f0fdfa\",Hs=\"#ccfbf1\",Ds=\"#99f6e4\",As=\"#5eead4\",Ss=\"#2dd4bf\",Is=\"#14b8a6\",Os=\"#0d9488\",Cs=\"#0f766e\",_s=\"#115e59\",Ns=\"#134e4a\",Us=\"#042f2e\",Ps=\"#ecfeff\",Ks=\"#cffafe\",zs=\"#a5f3fc\",Bs=\"#67e8f9\",Vs=\"#22d3ee\",qs=\"#06b6d4\",Ws=\"#0891b2\",Gs=\"#0e7490\",Xs=\"#155e75\",Ys=\"#164e63\",js=\"#083344\",Zs=\"#f0f9ff\",$s=\"#e0f2fe\",Js=\"#bae6fd\",Qs=\"#7dd3fc\",ea=\"#38bdf8\",ta=\"#0ea5e9\",oa=\"#0284c7\",na=\"#0369a1\",ra=\"#075985\",sa=\"#0c4a6e\",aa=\"#082f49\",ia=\"#eff6ff\",ca=\"#dbeafe\",la=\"#bfdbfe\",fa=\"#93c5fd\",pa=\"#60a5fa\",ua=\"#3b82f6\",da=\"#2563eb\",ma=\"#1d4ed8\",xa=\"#1e40af\",ba=\"#1e3a8a\",ha=\"#172554\",ya=\"#eef2ff\",Ta=\"#e0e7ff\",va=\"#c7d2fe\",Ea=\"#a5b4fc\",ga=\"#818cf8\",wa=\"#6366f1\",La=\"#4f46e5\",Ma=\"#4338ca\",Ra=\"#3730a3\",Fa=\"#312e81\",ka=\"#1e1b4b\",Ha=\"#f5f3ff\",Da=\"#ede9fe\",Aa=\"#ddd6fe\",Sa=\"#c4b5fd\",Ia=\"#a78bfa\",Oa=\"#8b5cf6\",Ca=\"#7c3aed\",_a=\"#6d28d9\",Na=\"#5b21b6\",Ua=\"#4c1d95\",Pa=\"#2e1065\",Ka=\"#faf5ff\",za=\"#f3e8ff\",Ba=\"#e9d5ff\",Va=\"#d8b4fe\",qa=\"#c084fc\",Wa=\"#a855f7\",Ga=\"#9333ea\",Xa=\"#7e22ce\",Ya=\"#6b21a8\",ja=\"#581c87\",Za=\"#3b0764\",$a=\"#fdf4ff\",Ja=\"#fae8ff\",Qa=\"#f5d0fe\",ei=\"#f0abfc\",ti=\"#e879f9\",oi=\"#d946ef\",ni=\"#c026d3\",ri=\"#a21caf\",si=\"#86198f\",ai=\"#701a75\",ii=\"#4a044e\",ci=\"#fdf2f8\",li=\"#fce7f3\",fi=\"#fbcfe8\",pi=\"#f9a8d4\",ui=\"#f472b6\",di=\"#ec4899\",mi=\"#db2777\",xi=\"#be185d\",bi=\"#9d174d\",hi=\"#831843\",yi=\"#500724\",Ti=\"#fff1f2\",vi=\"#ffe4e6\",Ei=\"#fecdd3\",gi=\"#fda4af\",wi=\"#fb7185\",Li=\"#f43f5e\",Mi=\"#e11d48\",Ri=\"#be123c\",Fi=\"#9f1239\",ki=\"#881337\",Hi=\"#4c0519\";class ue{#t;#e;constructor(e){this.#e=[],this.#t=e,this.onKeyDown=this.onKeyDown.bind(this)}focusElement(e,t=!0){if(!this.#e[e])return;for(let o=0;o<this.#e.length;++o)this.#e[o].tabIndex=o===e?0:-1;if(t)this.#e[e]?.focus()}register(){this.#e=F(this.#t),this.#t.addEventListener(\"keydown\",this.onKeyDown),this.focusElement(0,!1)}unregister(){this.#t.removeEventListener(\"keydown\",this.onKeyDown)}onKeyDown(e){let t=this.#t.querySelector('[tabindex=\"0\"]'),o=this.#e.findIndex((n)=>n===t)??0;switch(e.key){case\"ArrowUp\":case\"ArrowLeft\":this.focusElement(o-1);break;case\"ArrowDown\":case\"ArrowRight\":this.focusElement(o+1);break;default:return}e.preventDefault(),e.stopPropagation()}}var lt={beforeUnmount(e){O.get(e)?.unregister(),O.delete(e)},mounted(e){let t=new ue(e);t.register(),O.set(e,t)}},O=new WeakMap;class de{#t;#e;constructor(e){this.#t=e,this.#e=new MutationObserver(this.onMutation.bind(this))}register(){this.#e.observe(this.#t,{childList:!0,subtree:!0}),requestAnimationFrame(this.onMutation.bind(this))}unregister(){this.#e.disconnect()}onMutation(){let{height:e}=getComputedStyle(this.#t);this.#t.style.height=\"auto\";let{height:t}=getComputedStyle(this.#t);if(this.#t.style.height=e,t===e)return;getComputedStyle(this.#t),requestAnimationFrame(()=>requestAnimationFrame(()=>this.#t.style.height=t))}}var ft={beforeUnmount(e){C.get(e)?.unregister(),C.delete(e)},mounted(e){let t=new de(e);t.register(),C.set(e,t)}},C=new WeakMap;export{_n as zinc950,Cn as zinc900,On as zinc800,In as zinc700,Sn as zinc600,An as zinc500,Rn as zinc50,Dn as zinc400,Hn as zinc300,kn as zinc200,Fn as zinc100,Yr as yellow950,Xr as yellow900,Gr as yellow800,Wr as yellow700,qr as yellow600,Vr as yellow500,Ur as yellow50,Br as yellow400,zr as yellow300,Kr as yellow200,Pr as yellow100,g as wrapFocus,W as warn,Pa as violet950,Ua as violet900,Na as violet800,_a as violet700,Ca as violet600,Oa as violet500,Ha as violet50,Ia as violet400,Sa as violet300,Aa as violet200,Da as violet100,ft as vHeightTransition,lt as vFocusTrap,ne as useScrollPosition,oe as useRemembered,H as useMutationObserver,Q as useInterval,ee as useInView,pe as useFocusZone,fe as useFocusTrapSubscription,A as useFocusTrapReturn,D as useFocusTrapLock,le as useFocusTrap,k as useEventListener,J as useDebouncedRef,Z as useComponentId,j as useClickOutside,K as useCalendarYearSwitcher,U as useCalendarMonthSwitcher,N as useCalendar,p as unrefTemplateElement,Us as teal950,Ns as teal900,_s as teal800,Cs as teal700,Os as teal600,Is as teal500,ks as teal50,Ss as teal400,As as teal300,Ds as teal200,Hs as teal100,rr as stone950,nr as stone900,or as stone800,tr as stone700,er as stone600,Qn as stone500,Yn as stone50,Jn as stone400,$n as stone300,Zn as stone200,jn as stone100,mn as slate950,dn as slate900,un as slate800,pn as slate700,fn as slate600,ln as slate500,nn as slate50,cn as slate400,an as slate300,sn as slate200,rn as slate100,aa as sky950,sa as sky900,ra as sky800,na as sky700,oa as sky600,ta as sky500,Zs as sky50,ea as sky400,Qs as sky300,Js as sky200,$s as sky100,Hi as rose950,ki as rose900,Fi as rose800,Ri as rose700,Mi as rose600,Li as rose500,Ti as rose50,wi as rose400,gi as rose300,Ei as rose200,vi as rose100,xr as red950,mr as red900,dr as red800,ur as red700,pr as red600,fr as red500,sr as red50,lr as red400,cr as red300,ir as red200,ar as red100,Za as purple950,ja as purple900,Ya as purple800,Xa as purple700,Ga as purple600,Wa as purple500,Ka as purple50,qa as purple400,Va as purple300,Ba as purple200,za as purple100,yi as pink950,hi as pink900,bi as pink800,xi as pink700,mi as pink600,di as pink500,ci as pink50,ui as pink400,pi as pink300,fi as pink200,li as pink100,Rr as orange950,Mr as orange900,Lr as orange800,wr as orange700,gr as orange600,Er as orange500,br as orange50,vr as orange400,Tr as orange300,yr as orange200,hr as orange100,Xn as neutral950,Gn as neutral900,Wn as neutral800,qn as neutral700,Vn as neutral600,Bn as neutral500,Nn as neutral50,zn as neutral400,Kn as neutral300,Pn as neutral200,Un as neutral100,ss as lime950,rs as lime900,ns as lime800,os as lime700,ts as lime600,es as lime500,jr as lime50,Qr as lime400,Jr as lime300,$r as lime200,Zr as lime100,X as isSSR,ka as indigo950,Fa as indigo900,Ra as indigo800,Ma as indigo700,La as indigo600,wa as indigo500,ya as indigo50,ga as indigo400,Ea as indigo300,va as indigo200,Ta as indigo100,bs as green950,xs as green900,ms as green800,ds as green700,us as green600,ps as green500,as as green50,fs as green400,ls as green300,cs as green200,is as green100,Mn as gray950,Ln as gray900,wn as gray800,gn as gray700,En as gray600,vn as gray500,xn as gray50,Tn as gray400,yn as gray300,hn as gray200,bn as gray100,F as getKeyboardFocusableElements,d as getFocusableElements,R as getFocusableElement,q as getExposedRef,V as getComponentProps,B as getComponentName,M as getBidirectionalFocusElement,ii as fuchsia950,ai as fuchsia900,si as fuchsia800,ri as fuchsia700,ni as fuchsia600,oi as fuchsia500,$a as fuchsia50,ti as fuchsia400,ei as fuchsia300,Qa as fuchsia200,Ja as fuchsia100,z as flattenVNodeTree,Fs as emerald950,Rs as emerald900,Ms as emerald800,Ls as emerald700,ws as emerald600,gs as emerald500,hs as emerald50,Es as emerald400,vs as emerald300,Ts as emerald200,ys as emerald100,js as cyan950,Ys as cyan900,Xs as cyan800,Gs as cyan700,Ws as cyan600,qs as cyan500,Ps as cyan50,Vs as cyan400,Bs as cyan300,zs as cyan200,Ks as cyan100,ha as blue950,ba as blue900,xa as blue800,ma as blue700,da as blue600,ua as blue500,ia as blue50,pa as blue400,fa as blue300,la as blue200,ca as blue100,Nr as amber950,_r as amber900,Cr as amber800,Or as amber700,Ir as amber600,Sr as amber500,Fr as amber50,Ar as amber400,Dr as amber300,Hr as amber200,kr as amber100,w as FOCUS_TRAP_LOCKS};\n\n//# debugId=87BCF3546FF8C71064756E2164756E21\n//# sourceMappingURL=index.js.map\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection> = Symbol();\n\nexport type FluxDashboardInjection = {\n readonly isMenuCollapsed: Ref<boolean>;\n readonly isNavigationCollapsed: Ref<boolean>;\n};\n","<template>\n <div :class=\"[$style.dashboard, isResizing && $style.isResizing]\">\n <slot name=\"navigation\"/>\n <slot name=\"menu\"/>\n\n <div :class=\"$style.dashboardMount\">\n <slot name=\"header\"/>\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { provide, ref, VNode, watch } from 'vue';\n import { FluxDashboardInjectionKey } from '$fluxDashboard/data';\n import $style from '$fluxDashboard/css/component/Dashboard.module.scss';\n\n defineSlots<{\n default(): VNode;\n header?(): VNode;\n navigation?(): VNode;\n menu?(): VNode;\n side?(): VNode;\n }>();\n\n const isMenuCollapsed = useRemembered('dashboard-menu-collapsed', true);\n const isNavigationCollapsed = useRemembered('dashboard-navigation-collapsed', true);\n const isResizing = ref(false);\n\n provide(FluxDashboardInjectionKey, {\n isMenuCollapsed,\n isNavigationCollapsed\n });\n\n watch(isNavigationCollapsed, (_, __, onCleanup) => {\n let timeout: NodeJS.Timeout;\n\n function onResize(): void {\n clearTimeout(timeout);\n isResizing.value = true;\n timeout = setTimeout(() => isResizing.value = false, 10);\n }\n\n window.addEventListener('resize', onResize, {passive: true});\n\n onCleanup(() => window.removeEventListener('resize', onResize));\n }, {immediate: true});\n</script>\n","import { inject } from 'vue';\nimport { FluxDashboardInjection, FluxDashboardInjectionKey } from '$fluxDashboard/data';\n\nexport default function (): FluxDashboardInjection {\n const injection = inject(FluxDashboardInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useDashboardInjection() was used outside a FluxDashboard component.');\n }\n\n return injection;\n}\n","<template>\n <main :class=\"[$style.dashboardContent, !isMenuCollapsed && $style.dashboardContentCollapsed]\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardContent.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <header :class=\"[$style.dashboardTopBar, !isMenuCollapsed && $style.dashboardTopBarCollapsed]\">\n <slot/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <FluxDashboardTopBar :class=\"y > 0 ? $style.dashboardHeaderScrolled : $style.dashboardHeader\">\n <slot name=\"start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1 v-if=\"title\">\n {{ title }}\n </h1>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </FluxDashboardTopBar>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const {y} = useScrollPosition();\n</script>\n","<template>\n <aside :class=\"[$style.dashboardMenu, isMenuCollapsed && $style.dashboardMenuCollapsed]\">\n <FluxDashboardTopBar>\n <slot name=\"top-bar-start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1>{{ title }}</h1>\n\n <FluxSpacer/>\n\n <slot name=\"top-bar-end\"/>\n </FluxDashboardTopBar>\n\n <div :class=\"$style.dashboardMenuBody\">\n <slot/>\n </div>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardPane.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title: string;\n }>();\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <nav\n v-bind=\"$attrs\"\n :class=\"isNavigationCollapsed ? $style.dashboardNavigationCollapsed : $style.dashboardNavigation\">\n <header :class=\"$style.dashboardNavigationHeader\">\n <FluxMenuItem\n icon-leading=\"bars\"\n @click=\"isNavigationCollapsed = !isNavigationCollapsed\"/>\n\n <router-link\n v-if=\"slots.logo\"\n :class=\"$style.dashboardNavigationLogo\"\n :to=\"logoLocation || '/'\">\n <slot\n name=\"logo\"\n v-bind=\"{isNavigationCollapsed}\"/>\n </router-link>\n\n <FluxMenuItem\n icon-leading=\"ellipsis-h\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\"/>\n </header>\n\n <div\n v-for=\"index of 2\"\n :key=\"index\"\n :class=\"$style.dashboardNavigationRoundingFix\"/>\n\n <main :class=\"$style.dashboardNavigationNav\">\n <slot/>\n </main>\n </nav>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import type { FluxTo } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardNavigation.module.scss';\n\n defineOptions({\n inheritAttrs: false\n });\n\n defineProps<{\n logoLocation?: FluxTo\n }>();\n\n const slots = defineSlots<{\n default(): any;\n logo?(): any;\n }>();\n\n const {\n isMenuCollapsed,\n isNavigationCollapsed\n } = useDashboardInjection();\n</script>\n"],"names":["k","e","t","n","Ke","s","r","i","oe","je","te","Ze","ne","I","$e","FluxDashboardInjectionKey","isMenuCollapsed","useRemembered","isNavigationCollapsed","isResizing","ref","provide","watch","_","__","onCleanup","timeout","onResize","useDashboardInjection","injection","inject","y","useScrollPosition","slots","_useSlots"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/dashboard",
|
|
3
3
|
"description": "Contains components to create dashboards with Flux UI.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
|
-
"default": "./dist/
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
37
|
},
|
|
38
|
-
"./style.css": "./dist/
|
|
38
|
+
"./style.css": "./dist/index.css"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|
|
@@ -46,23 +46,23 @@
|
|
|
46
46
|
"src",
|
|
47
47
|
"tsconfig.json"
|
|
48
48
|
],
|
|
49
|
-
"main": "./dist/
|
|
50
|
-
"module": "./dist/
|
|
49
|
+
"main": "./dist/index.js",
|
|
50
|
+
"module": "./dist/index.js",
|
|
51
51
|
"types": "./dist/index.d.ts",
|
|
52
52
|
"typings": "./dist/index.d.ts",
|
|
53
53
|
"sideEffects": false,
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@flux-ui/components": "3.0.0-next.
|
|
56
|
-
"@flux-ui/internals": "3.0.0-next.
|
|
55
|
+
"@flux-ui/components": "3.0.0-next.7",
|
|
56
|
+
"@flux-ui/internals": "3.0.0-next.7",
|
|
57
57
|
"vue": "^3.5.13"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@basmilius/vite-
|
|
61
|
-
"@types/node": "^22.
|
|
60
|
+
"@basmilius/vite-preset": "^2.1.0",
|
|
61
|
+
"@types/node": "^22.15.3",
|
|
62
62
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
63
63
|
"sass-embedded": "^1.87.0",
|
|
64
64
|
"typescript": "^5.8.3",
|
|
65
|
-
"vite": "^6.3.
|
|
65
|
+
"vite": "^6.3.3",
|
|
66
66
|
"vue-tsc": "^2.2.10"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flux-dashboard.js","sources":["../../internals/dist/flux-internals.js","../src/data/index.ts","../src/component/FluxDashboard.vue","../src/composable/useDashboardInjection.ts","../src/component/FluxDashboardContent.vue","../src/component/FluxDashboardTopBar.vue","../src/component/FluxDashboardHeader.vue","../src/component/FluxDashboardMenu.vue","../src/component/FluxDashboardNavigation.vue"],"sourcesContent":["import{computed as E,ref as _,unref as b}from\"vue\";function N(e,t){let o=_(!1),n=_(e),s=E(()=>{let c=[],m=b(n).month,h=b(n).startOf(\"month\");do c.push(h),h=h.plus({day:1});while(h.month===m);let y=c[0],T=c[c.length-1];for(let x=1;x<y.weekday;++x)c.unshift(y.minus({day:x}));for(let x=T.weekday+1;x<=7;++x)c.push(T.plus({day:x-T.weekday}));while(c.length/7<6){let x=c[c.length-1];for(let S=1;S<=7;++S)c.push(x.plus({day:S}))}return c}),r=E(()=>b(s).slice(0,7).map((c)=>c.toLocaleString({weekday:t?.weekDayLength??\"short\"}))),i=E(()=>b(n).plus({month:1})),a=E(()=>b(n).minus({month:1})),f=E(()=>b(n).toLocaleString({month:t?.monthLength??\"long\"})),l=E(()=>b(n).year.toString());function u(c){o.value=n.value>c,n.value=c}function v(){u(b(n).plus({month:1}))}function L(){u(b(n).minus({month:1}))}return{isTransitioningToPast:o,viewDate:n,viewDateNext:i,viewDatePrevious:a,viewMonth:f,viewYear:l,dates:s,days:r,setViewDate:u,nextMonth:v,previousMonth:L}}import{computed as me,unref as xe}from\"vue\";function U(e,t){return{months:me(()=>{let n=[],s=xe(e),r=s.startOf(\"year\");while(r.month<=12&&r.year===s.year)n.push({date:r,label:r.toLocaleString({month:t})}),r=r.plus({months:1});return n})}}import{computed as be,ref as he,unref as P,watch as ye}from\"vue\";function K(e,t=10){let o=he(0),n=be(()=>{let i=P(e).year,a=[],f=i-i%t+P(o)*t;for(let l=0;l<t;++l)a.push(f+l);return a});function s(){++o.value}function r(){--o.value}return ye(e,()=>o.value=0),{years:n,next:s,previous:r}}import{onMounted as De,onUnmounted as Ae,ref as Se,unref as Y,watchEffect as Ie}from\"vue\";import{Fragment as Te}from\"vue\";function z(e){let t=[];for(let o of e){if(o.type===Te&&Array.isArray(o.children)){t.push(...o.children);continue}t.push(o)}return t}import{isHtmlElement as ve}from\"@basmilius/utils\";var Ee=[\"a:not([disabled])\",\"button:not([disabled])\",\"input[type=checkbox]:not([disabled])\",\"input[type=radio]:not([disabled])\",\"input[type=text]:not([disabled])\",'[tabindex]:not([disabled]):not([tabindex=\"-1\"])'].join(\",\");function d(e){return Array.from(e.querySelectorAll(Ee)).filter(ve).filter((t)=>t.offsetWidth>0||t.offsetHeight>0||t===document.activeElement)}function M(e,t,o){let n=d(e),s=n.indexOf(t);if(s===-1)return null;let r=Le(n);ge(r,s,o);let i=we(s,o,r,n);if(!i){if(o===\"up\"||o===\"left\")i=n[s-1];if(o===\"down\"||o===\"right\")i=n[s+1]}return i}function ge(e,t,o){let n=e[t];e.forEach((s)=>{let r=s.center;switch(o){case\"up\":r={x:r.x,y:s.top+s.height};break;case\"down\":r={x:r.x,y:s.top};break;case\"left\":r={x:s.left+s.width,y:r.y};break;case\"right\":r={x:s.left,y:r.y};break}s.distance=Math.sqrt(Math.pow(n.center.x-r.x,2)+Math.pow(n.center.y-r.y,2))})}function we(e,t,o,n){let s=o[e],r=[];switch(t){case\"up\":r=o.map((a,f)=>f===e||a.top+a.height>s.top?Number.MAX_SAFE_INTEGER:a.distance);break;case\"down\":r=o.map((a,f)=>f===e||a.top<s.top+s.height?Number.MAX_SAFE_INTEGER:a.distance);break;case\"left\":r=o.map((a,f)=>f===e||a.left+a.width>s.left?Number.MAX_SAFE_INTEGER:a.distance);break;case\"right\":r=o.map((a,f)=>f===e||a.left<s.left+s.width?Number.MAX_SAFE_INTEGER:a.distance);break}let i=r.indexOf(Math.min(...r));if(r[i]!==Number.MAX_SAFE_INTEGER)return n[i];return null}function Le(e){return e.map((t)=>t.getBoundingClientRect()).map((t)=>({height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom,center:{x:t.left+t.width/2,y:t.top+t.height/2},distance:0}))}function B(e){let t=\"UnknownComponent\";if(e.type&&e.type.__name)t=e.type.__name;return t}import{camelCase as Me}from\"lodash-es\";function V(e){return Object.fromEntries(Object.entries(e.props??{}).map(([t,o])=>[Me(t),o]))}function q(e,t){if(!e.exposed||!(t in e.exposed))throw new Error(`'${t}' was not exposed by the component.`);return e.exposed[t]}import{isHtmlElement as Re}from\"@basmilius/utils\";function R(e,t,o=void 0){let n=d(e),s=o||document.activeElement;if(!s||!Re(s))return n[0]||void 0;let r=n.indexOf(s);return n[r+t]||void 0}function F(e){return Array.from(e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])')).filter((t)=>!t.hasAttribute(\"disabled\")||t.getAttribute(\"disabled\")!==\"true\").filter((t)=>!t.hasAttribute(\"aria-disabled\")||t.getAttribute(\"aria-disabled\")!==\"true\")}import{isHtmlElement as Fe}from\"@basmilius/utils\";import{unref as ke}from\"vue\";function p(e){let t=ke(e);if(Fe(t))return t;return t?.$el}function W(...e){console.warn(\"[Flux]\",...e)}function g(e,t,o=!1){let n=He(e),s=t.compareDocumentPosition(e),r;if(s&&Node.DOCUMENT_POSITION_PRECEDING||o)r=n.firstChild();else r=n.lastChild();(r!==null?r:e).focus()}function He(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:(t)=>t.tabIndex>=0&&!t.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}class G{get active(){return this.current?.isEnabled??!1}get current(){return this.#e[this.#e.length-1]??null}#t=[];#e=[];add(e,t,o=!0){let n={id:e,setEnabled:t,isEnabled:!0};if(this.current&&this.toggle(this.current,!1),this.#e.push(n),o)this.toggle(n,!0),this.emit()}remove(e){let t=this.#e.find((s)=>s.id===e);t&&this.toggle(t,!1);let n=this.current?.id===e;this.#e=this.#e.filter((s)=>s.id!==e),n&&this.current&&this.toggle(this.current,!0),this.emit()}emit(){this.#t.forEach((e)=>e(this.active,this.#e))}subscribe(e){return this.#t.push(e),e(this.active,this.#e),()=>this.#t=this.#t.filter((t)=>t!==e)}toggle(e,t){e.setEnabled(t),e.isEnabled=t}}var w=new G;var X=!globalThis.document;function j(e,t,o){let n=Se([]);De(()=>{document.addEventListener(\"pointerdown\",s)}),Ae(()=>{document.removeEventListener(\"pointerdown\",s)});function s(r){if(!Y(t))return;!Y(n).some((a)=>a.contains(r.target))&&o(r)}Ie(()=>{let r=[];(Array.isArray(e)?e:[e]).forEach((i)=>{let a=p(i);a&&r.push(a)}),n.value=r})}import{computed as Oe,getCurrentInstance as Ce}from\"vue\";function Z(){let e=Ce();return Oe(()=>e?.uid??(e?.proxy)._uid??0)}import{customRef as _e,isRef as $,ref as Ne,watch as Ue}from\"vue\";function J(e,t,o=!1){let n=Ne($(e)?e.value:e),s=_e((r,i)=>({get(){return r(),n.value},set:Pe((a)=>{n.value=a,i()},t,o)}));if($(e))Ue(e,(r)=>s.value=r);return s}function Pe(e,t,o=!1){let n;return(...s)=>{if(o&&!n)e(...s);clearTimeout(n),n=setTimeout(()=>requestAnimationFrame(()=>e(...s)),t)}}import{watch as Ke}from\"vue\";function k(e,t,o,n={passive:!0}){Ke(e,(s,r,i)=>{if(!s)return;s.addEventListener(t,o,n),i(()=>s.removeEventListener(t,o))},{immediate:!0})}import{onMounted as ze,onUnmounted as Be,ref as Ve,unref as qe}from\"vue\";function Q(e,t){let o=Ve();ze(()=>{s()}),Be(()=>{clearTimeout(o.value)});function n(){o.value=setTimeout(()=>requestAnimationFrame(s),qe(e))}function s(){n(),t()}}import{ref as We,watch as Ge}from\"vue\";function ee(e,t={}){let o=We(t.initial??!1);return Ge(e,(n,s,r)=>{let i=p(e);if(!i)return;let a=new IntersectionObserver((f)=>o.value=f[0]?.isIntersecting??!1,t);a.observe(i),r(()=>a.disconnect())},{immediate:!0}),o}import{onScopeDispose as Xe,watch as Ye}from\"vue\";function H(e,t,o){o??={attributes:!0};let n,s=Ye(()=>p(e),(a)=>{if(r(),!a)return;n=new MutationObserver(t),n.observe(a,o)},{immediate:!0});function r(){if(!n)return;n.disconnect(),n=void 0}function i(){r(),s()}Xe(i)}import{DateTime as te}from\"luxon\";import{ref as je,watch as Ze}from\"vue\";function oe(e,t){let o=`flux/${e}`,n=je(s()??t);function s(){if(o in localStorage){let r=JSON.parse(localStorage.getItem(o));if(Array.isArray(r)&&r[0]===\"DateTime\")r=te.fromISO(r[1]);return r}return null}return Ze(n,(r)=>{let i=r;if(te.isDateTime(r))i=[\"DateTime\",r.toISO({includeOffset:!0,extendedZone:!0})];localStorage.setItem(o,JSON.stringify(i))}),n}import{ref as I,unref as $e}from\"vue\";function ne(e){let t=I(0),o=I(0);if(!e)e=I(document);return k(e,\"scroll\",()=>{let n=$e(e);if(n instanceof Document)n=n.scrollingElement;t.value=n?.scrollLeft??0,o.value=n?.scrollTop??0}),{x:t,y:o}}import{ref as ie,watch as ce}from\"vue\";import{onMounted as Je,onUnmounted as Qe,ref as re,unref as se}from\"vue\";var et=0;function D(e=!1){let t=re(`focus-trap-${++et}`),o=re(!1);return Je(()=>w.add(se(t),(n)=>o.value=n,e)),Qe(()=>w.remove(se(t))),o}import{onUnmounted as tt,ref as ot,unref as ae}from\"vue\";function A(e){let t=ot(document.activeElement);tt(()=>{if(ae(e))return;requestAnimationFrame(()=>ae(t)?.focus())})}function le(e,t={}){if(X)return;let{disable:o=ie(!1),disableReturn:n=ie(!1),attachTo:s=null}=t,r=D(!o);A(n),ce(e,(i,a,f)=>{let l=p(e),u=s||document;if(r.value&&l&&document.activeElement&&!l.contains(document.activeElement)&&!l.querySelector(\"[autofocus]\"))g(l,document.activeElement,!0);function v(c){if(!r.value||!l)return;let m=c.target||document.body;if(l.contains(m))return;c.preventDefault(),c.stopImmediatePropagation(),g(l,m)}function L(c){if(!r.value||!l)return;if(!c.relatedTarget||c.relatedTarget===document.body)c.preventDefault(),l.focus();let m=c.target||document.body;if(l.contains(m))return;g(l,m)}if(u.addEventListener(\"focusin\",v,{capture:!0}),u.addEventListener(\"focusout\",L,{capture:!0}),l){let c=d(l),m=c.findIndex((T)=>T.classList.contains(\"is-active\")),h=c.findIndex((T)=>!T.hasAttribute(\"aria-disabled\")),y=c[0];if(m>-1)y=c[m];if(h>-1)y=c[h];if(y)y.focus()}f(()=>{u.removeEventListener(\"focusin\",v),u.removeEventListener(\"focusout\",L)})},{immediate:!0}),ce(()=>o,()=>{let i=p(e);if(r.value=!o,o||!i)return;let a=d(i);if(a.includes(document.activeElement))return;a[0]?.focus()},{immediate:!0})}import{onMounted as nt,onUnmounted as rt,ref as st}from\"vue\";function fe(e){let t=st(null);nt(()=>t.value=w.subscribe(e)),rt(()=>t.value?.())}import{watch as at}from\"vue\";function pe(e,{cycle:t=!0,direction:o=\"bidirectional\"}={}){H(e,()=>s(n(),!1));function n(){let i=p(e),a=d(i),f=a.findIndex((u)=>u.classList.contains(\"is-active\")),l=a.findIndex((u)=>!u.hasAttribute(\"aria-disabled\"));if(f>-1)return f;if(l>-1)return l;return 0}function s(i,a=!0){let f=p(e),l=d(f);l.forEach((u,v)=>u.tabIndex=v===i?0:-1),a&&l[i]?.focus()}function r(i){let a=p(e),f=d(a);if([\"Enter\",\" \"].includes(i.key))return;switch(o){case\"bidirectional\":it(i,a,f,s);break;case\"horizontal\":case\"vertical\":ct(i,a,t,o,f,s);break}}at(e,(i,a,f)=>{let l=p(e);if(!l)return;l.addEventListener(\"keydown\",r),s(n(),!1),f(()=>l.removeEventListener(\"keydown\",r))},{immediate:!0})}function it(e,t,o,n){let s;switch(e.key){case\"ArrowUp\":s=\"up\";break;case\"ArrowDown\":s=\"down\";break;case\"ArrowLeft\":s=\"left\";break;case\"ArrowRight\":s=\"right\";break;default:return}let r=M(t,document.activeElement,s);if(r)n(o.indexOf(r));e.preventDefault()}function ct(e,t,o,n,s,r){let i;if(e.key===(n===\"horizontal\"?\"ArrowLeft\":\"ArrowUp\"))i=-1;else if(e.key===(n===\"horizontal\"?\"ArrowRight\":\"ArrowDown\"))i=1;else return;let a=R(t,i);if(a)r(s.indexOf(a));else if(o)r(i===1?0:s.length-1);e.preventDefault()}var nn=\"#f8fafc\",rn=\"#f1f5f9\",sn=\"#e2e8f0\",an=\"#cbd5e1\",cn=\"#94a3b8\",ln=\"#64748b\",fn=\"#475569\",pn=\"#334155\",un=\"#1e293b\",dn=\"#0f172a\",mn=\"#020617\",xn=\"#f9fafb\",bn=\"#f3f4f6\",hn=\"#e5e7eb\",yn=\"#d1d5db\",Tn=\"#9ca3af\",vn=\"#6b7280\",En=\"#4b5563\",gn=\"#374151\",wn=\"#1f2937\",Ln=\"#111827\",Mn=\"#030712\",Rn=\"#fafafa\",Fn=\"#f4f4f5\",kn=\"#e4e4e7\",Hn=\"#d4d4d8\",Dn=\"#a1a1aa\",An=\"#71717a\",Sn=\"#52525b\",In=\"#3f3f46\",On=\"#27272a\",Cn=\"#18181b\",_n=\"#09090b\",Nn=\"#fafafa\",Un=\"#f5f5f5\",Pn=\"#e5e5e5\",Kn=\"#d4d4d4\",zn=\"#a3a3a3\",Bn=\"#737373\",Vn=\"#525252\",qn=\"#404040\",Wn=\"#262626\",Gn=\"#171717\",Xn=\"#0a0a0a\",Yn=\"#fafaf9\",jn=\"#f5f5f4\",Zn=\"#e7e5e4\",$n=\"#d6d3d1\",Jn=\"#a8a29e\",Qn=\"#78716c\",er=\"#57534e\",tr=\"#44403c\",or=\"#292524\",nr=\"#1c1917\",rr=\"#0c0a09\",sr=\"#fef2f2\",ar=\"#fee2e2\",ir=\"#fecaca\",cr=\"#fca5a5\",lr=\"#f87171\",fr=\"#ef4444\",pr=\"#dc2626\",ur=\"#b91c1c\",dr=\"#991b1b\",mr=\"#7f1d1d\",xr=\"#450a0a\",br=\"#fff7ed\",hr=\"#ffedd5\",yr=\"#fed7aa\",Tr=\"#fdba74\",vr=\"#fb923c\",Er=\"#f97316\",gr=\"#ea580c\",wr=\"#c2410c\",Lr=\"#9a3412\",Mr=\"#7c2d12\",Rr=\"#431407\",Fr=\"#fffbeb\",kr=\"#fef3c7\",Hr=\"#fde68a\",Dr=\"#fcd34d\",Ar=\"#fbbf24\",Sr=\"#f59e0b\",Ir=\"#d97706\",Or=\"#b45309\",Cr=\"#92400e\",_r=\"#78350f\",Nr=\"#451a03\",Ur=\"#fefce8\",Pr=\"#fef9c3\",Kr=\"#fef08a\",zr=\"#fde047\",Br=\"#facc15\",Vr=\"#eab308\",qr=\"#ca8a04\",Wr=\"#a16207\",Gr=\"#854d0e\",Xr=\"#713f12\",Yr=\"#422006\",jr=\"#f7fee7\",Zr=\"#ecfccb\",$r=\"#d9f99d\",Jr=\"#bef264\",Qr=\"#a3e635\",es=\"#84cc16\",ts=\"#65a30d\",os=\"#4d7c0f\",ns=\"#3f6212\",rs=\"#365314\",ss=\"#1a2e05\",as=\"#f0fdf4\",is=\"#dcfce7\",cs=\"#bbf7d0\",ls=\"#86efac\",fs=\"#4ade80\",ps=\"#22c55e\",us=\"#16a34a\",ds=\"#15803d\",ms=\"#166534\",xs=\"#14532d\",bs=\"#052e16\",hs=\"#ecfdf5\",ys=\"#d1fae5\",Ts=\"#a7f3d0\",vs=\"#6ee7b7\",Es=\"#34d399\",gs=\"#10b981\",ws=\"#059669\",Ls=\"#047857\",Ms=\"#065f46\",Rs=\"#064e3b\",Fs=\"#022c22\",ks=\"#f0fdfa\",Hs=\"#ccfbf1\",Ds=\"#99f6e4\",As=\"#5eead4\",Ss=\"#2dd4bf\",Is=\"#14b8a6\",Os=\"#0d9488\",Cs=\"#0f766e\",_s=\"#115e59\",Ns=\"#134e4a\",Us=\"#042f2e\",Ps=\"#ecfeff\",Ks=\"#cffafe\",zs=\"#a5f3fc\",Bs=\"#67e8f9\",Vs=\"#22d3ee\",qs=\"#06b6d4\",Ws=\"#0891b2\",Gs=\"#0e7490\",Xs=\"#155e75\",Ys=\"#164e63\",js=\"#083344\",Zs=\"#f0f9ff\",$s=\"#e0f2fe\",Js=\"#bae6fd\",Qs=\"#7dd3fc\",ea=\"#38bdf8\",ta=\"#0ea5e9\",oa=\"#0284c7\",na=\"#0369a1\",ra=\"#075985\",sa=\"#0c4a6e\",aa=\"#082f49\",ia=\"#eff6ff\",ca=\"#dbeafe\",la=\"#bfdbfe\",fa=\"#93c5fd\",pa=\"#60a5fa\",ua=\"#3b82f6\",da=\"#2563eb\",ma=\"#1d4ed8\",xa=\"#1e40af\",ba=\"#1e3a8a\",ha=\"#172554\",ya=\"#eef2ff\",Ta=\"#e0e7ff\",va=\"#c7d2fe\",Ea=\"#a5b4fc\",ga=\"#818cf8\",wa=\"#6366f1\",La=\"#4f46e5\",Ma=\"#4338ca\",Ra=\"#3730a3\",Fa=\"#312e81\",ka=\"#1e1b4b\",Ha=\"#f5f3ff\",Da=\"#ede9fe\",Aa=\"#ddd6fe\",Sa=\"#c4b5fd\",Ia=\"#a78bfa\",Oa=\"#8b5cf6\",Ca=\"#7c3aed\",_a=\"#6d28d9\",Na=\"#5b21b6\",Ua=\"#4c1d95\",Pa=\"#2e1065\",Ka=\"#faf5ff\",za=\"#f3e8ff\",Ba=\"#e9d5ff\",Va=\"#d8b4fe\",qa=\"#c084fc\",Wa=\"#a855f7\",Ga=\"#9333ea\",Xa=\"#7e22ce\",Ya=\"#6b21a8\",ja=\"#581c87\",Za=\"#3b0764\",$a=\"#fdf4ff\",Ja=\"#fae8ff\",Qa=\"#f5d0fe\",ei=\"#f0abfc\",ti=\"#e879f9\",oi=\"#d946ef\",ni=\"#c026d3\",ri=\"#a21caf\",si=\"#86198f\",ai=\"#701a75\",ii=\"#4a044e\",ci=\"#fdf2f8\",li=\"#fce7f3\",fi=\"#fbcfe8\",pi=\"#f9a8d4\",ui=\"#f472b6\",di=\"#ec4899\",mi=\"#db2777\",xi=\"#be185d\",bi=\"#9d174d\",hi=\"#831843\",yi=\"#500724\",Ti=\"#fff1f2\",vi=\"#ffe4e6\",Ei=\"#fecdd3\",gi=\"#fda4af\",wi=\"#fb7185\",Li=\"#f43f5e\",Mi=\"#e11d48\",Ri=\"#be123c\",Fi=\"#9f1239\",ki=\"#881337\",Hi=\"#4c0519\";class ue{#t;#e;constructor(e){this.#e=[],this.#t=e,this.onKeyDown=this.onKeyDown.bind(this)}focusElement(e,t=!0){if(!this.#e[e])return;for(let o=0;o<this.#e.length;++o)this.#e[o].tabIndex=o===e?0:-1;if(t)this.#e[e]?.focus()}register(){this.#e=F(this.#t),this.#t.addEventListener(\"keydown\",this.onKeyDown),this.focusElement(0,!1)}unregister(){this.#t.removeEventListener(\"keydown\",this.onKeyDown)}onKeyDown(e){let t=this.#t.querySelector('[tabindex=\"0\"]'),o=this.#e.findIndex((n)=>n===t)??0;switch(e.key){case\"ArrowUp\":case\"ArrowLeft\":this.focusElement(o-1);break;case\"ArrowDown\":case\"ArrowRight\":this.focusElement(o+1);break;default:return}e.preventDefault(),e.stopPropagation()}}var lt={beforeUnmount(e){O.get(e)?.unregister(),O.delete(e)},mounted(e){let t=new ue(e);t.register(),O.set(e,t)}},O=new WeakMap;class de{#t;#e;constructor(e){this.#t=e,this.#e=new MutationObserver(this.onMutation.bind(this))}register(){this.#e.observe(this.#t,{childList:!0,subtree:!0}),requestAnimationFrame(this.onMutation.bind(this))}unregister(){this.#e.disconnect()}onMutation(){let{height:e}=getComputedStyle(this.#t);this.#t.style.height=\"auto\";let{height:t}=getComputedStyle(this.#t);if(this.#t.style.height=e,t===e)return;getComputedStyle(this.#t),requestAnimationFrame(()=>requestAnimationFrame(()=>this.#t.style.height=t))}}var ft={beforeUnmount(e){C.get(e)?.unregister(),C.delete(e)},mounted(e){let t=new de(e);t.register(),C.set(e,t)}},C=new WeakMap;export{_n as zinc950,Cn as zinc900,On as zinc800,In as zinc700,Sn as zinc600,An as zinc500,Rn as zinc50,Dn as zinc400,Hn as zinc300,kn as zinc200,Fn as zinc100,Yr as yellow950,Xr as yellow900,Gr as yellow800,Wr as yellow700,qr as yellow600,Vr as yellow500,Ur as yellow50,Br as yellow400,zr as yellow300,Kr as yellow200,Pr as yellow100,g as wrapFocus,W as warn,Pa as violet950,Ua as violet900,Na as violet800,_a as violet700,Ca as violet600,Oa as violet500,Ha as violet50,Ia as violet400,Sa as violet300,Aa as violet200,Da as violet100,ft as vHeightTransition,lt as vFocusTrap,ne as useScrollPosition,oe as useRemembered,H as useMutationObserver,Q as useInterval,ee as useInView,pe as useFocusZone,fe as useFocusTrapSubscription,A as useFocusTrapReturn,D as useFocusTrapLock,le as useFocusTrap,k as useEventListener,J as useDebouncedRef,Z as useComponentId,j as useClickOutside,K as useCalendarYearSwitcher,U as useCalendarMonthSwitcher,N as useCalendar,p as unrefTemplateElement,Us as teal950,Ns as teal900,_s as teal800,Cs as teal700,Os as teal600,Is as teal500,ks as teal50,Ss as teal400,As as teal300,Ds as teal200,Hs as teal100,rr as stone950,nr as stone900,or as stone800,tr as stone700,er as stone600,Qn as stone500,Yn as stone50,Jn as stone400,$n as stone300,Zn as stone200,jn as stone100,mn as slate950,dn as slate900,un as slate800,pn as slate700,fn as slate600,ln as slate500,nn as slate50,cn as slate400,an as slate300,sn as slate200,rn as slate100,aa as sky950,sa as sky900,ra as sky800,na as sky700,oa as sky600,ta as sky500,Zs as sky50,ea as sky400,Qs as sky300,Js as sky200,$s as sky100,Hi as rose950,ki as rose900,Fi as rose800,Ri as rose700,Mi as rose600,Li as rose500,Ti as rose50,wi as rose400,gi as rose300,Ei as rose200,vi as rose100,xr as red950,mr as red900,dr as red800,ur as red700,pr as red600,fr as red500,sr as red50,lr as red400,cr as red300,ir as red200,ar as red100,Za as purple950,ja as purple900,Ya as purple800,Xa as purple700,Ga as purple600,Wa as purple500,Ka as purple50,qa as purple400,Va as purple300,Ba as purple200,za as purple100,yi as pink950,hi as pink900,bi as pink800,xi as pink700,mi as pink600,di as pink500,ci as pink50,ui as pink400,pi as pink300,fi as pink200,li as pink100,Rr as orange950,Mr as orange900,Lr as orange800,wr as orange700,gr as orange600,Er as orange500,br as orange50,vr as orange400,Tr as orange300,yr as orange200,hr as orange100,Xn as neutral950,Gn as neutral900,Wn as neutral800,qn as neutral700,Vn as neutral600,Bn as neutral500,Nn as neutral50,zn as neutral400,Kn as neutral300,Pn as neutral200,Un as neutral100,ss as lime950,rs as lime900,ns as lime800,os as lime700,ts as lime600,es as lime500,jr as lime50,Qr as lime400,Jr as lime300,$r as lime200,Zr as lime100,X as isSSR,ka as indigo950,Fa as indigo900,Ra as indigo800,Ma as indigo700,La as indigo600,wa as indigo500,ya as indigo50,ga as indigo400,Ea as indigo300,va as indigo200,Ta as indigo100,bs as green950,xs as green900,ms as green800,ds as green700,us as green600,ps as green500,as as green50,fs as green400,ls as green300,cs as green200,is as green100,Mn as gray950,Ln as gray900,wn as gray800,gn as gray700,En as gray600,vn as gray500,xn as gray50,Tn as gray400,yn as gray300,hn as gray200,bn as gray100,F as getKeyboardFocusableElements,d as getFocusableElements,R as getFocusableElement,q as getExposedRef,V as getComponentProps,B as getComponentName,M as getBidirectionalFocusElement,ii as fuchsia950,ai as fuchsia900,si as fuchsia800,ri as fuchsia700,ni as fuchsia600,oi as fuchsia500,$a as fuchsia50,ti as fuchsia400,ei as fuchsia300,Qa as fuchsia200,Ja as fuchsia100,z as flattenVNodeTree,Fs as emerald950,Rs as emerald900,Ms as emerald800,Ls as emerald700,ws as emerald600,gs as emerald500,hs as emerald50,Es as emerald400,vs as emerald300,Ts as emerald200,ys as emerald100,js as cyan950,Ys as cyan900,Xs as cyan800,Gs as cyan700,Ws as cyan600,qs as cyan500,Ps as cyan50,Vs as cyan400,Bs as cyan300,zs as cyan200,Ks as cyan100,ha as blue950,ba as blue900,xa as blue800,ma as blue700,da as blue600,ua as blue500,ia as blue50,pa as blue400,fa as blue300,la as blue200,ca as blue100,Nr as amber950,_r as amber900,Cr as amber800,Or as amber700,Ir as amber600,Sr as amber500,Fr as amber50,Ar as amber400,Dr as amber300,Hr as amber200,kr as amber100,w as FOCUS_TRAP_LOCKS};\n\n//# debugId=07CE9B4444A7CBFE64756E2164756E21\n//# sourceMappingURL=flux-internals.js.map\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection> = Symbol();\n\nexport type FluxDashboardInjection = {\n readonly isMenuCollapsed: Ref<boolean>;\n readonly isNavigationCollapsed: Ref<boolean>;\n};\n","<template>\n <div :class=\"[$style.dashboard, isResizing && $style.isResizing]\">\n <slot name=\"navigation\"/>\n <slot name=\"menu\"/>\n\n <div :class=\"$style.dashboardMount\">\n <slot name=\"header\"/>\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { provide, ref, VNode, watch } from 'vue';\n import { FluxDashboardInjectionKey } from '$fluxDashboard/data';\n import $style from '$fluxDashboard/css/component/Dashboard.module.scss';\n\n defineSlots<{\n default(): VNode;\n header?(): VNode;\n navigation?(): VNode;\n menu?(): VNode;\n side?(): VNode;\n }>();\n\n const isMenuCollapsed = useRemembered('dashboard-menu-collapsed', true);\n const isNavigationCollapsed = useRemembered('dashboard-navigation-collapsed', true);\n const isResizing = ref(false);\n\n provide(FluxDashboardInjectionKey, {\n isMenuCollapsed,\n isNavigationCollapsed\n });\n\n watch(isNavigationCollapsed, (_, __, onCleanup) => {\n let timeout: NodeJS.Timeout;\n\n function onResize(): void {\n clearTimeout(timeout);\n isResizing.value = true;\n timeout = setTimeout(() => isResizing.value = false, 10);\n }\n\n window.addEventListener('resize', onResize, {passive: true});\n\n onCleanup(() => window.removeEventListener('resize', onResize));\n }, {immediate: true});\n</script>\n","import { inject } from 'vue';\nimport { FluxDashboardInjection, FluxDashboardInjectionKey } from '$fluxDashboard/data';\n\nexport default function (): FluxDashboardInjection {\n const injection = inject(FluxDashboardInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useDashboardInjection() was used outside a FluxDashboard component.');\n }\n\n return injection;\n}\n","<template>\n <main :class=\"[$style.dashboardContent, !isMenuCollapsed && $style.dashboardContentCollapsed]\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardContent.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <header :class=\"[$style.dashboardTopBar, !isMenuCollapsed && $style.dashboardTopBarCollapsed]\">\n <slot/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <FluxDashboardTopBar :class=\"y > 0 ? $style.dashboardHeaderScrolled : $style.dashboardHeader\">\n <slot name=\"start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1 v-if=\"title\">\n {{ title }}\n </h1>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </FluxDashboardTopBar>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const {y} = useScrollPosition();\n</script>\n","<template>\n <aside :class=\"[$style.dashboardMenu, isMenuCollapsed && $style.dashboardMenuCollapsed]\">\n <FluxDashboardTopBar>\n <slot name=\"top-bar-start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1>{{ title }}</h1>\n\n <FluxSpacer/>\n\n <slot name=\"top-bar-end\"/>\n </FluxDashboardTopBar>\n\n <div :class=\"$style.dashboardMenuBody\">\n <slot/>\n </div>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardPane.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title: string;\n }>();\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <nav\n v-bind=\"$attrs\"\n :class=\"isNavigationCollapsed ? $style.dashboardNavigationCollapsed : $style.dashboardNavigation\">\n <header :class=\"$style.dashboardNavigationHeader\">\n <FluxMenuItem\n icon-leading=\"bars\"\n @click=\"isNavigationCollapsed = !isNavigationCollapsed\"/>\n\n <router-link\n v-if=\"slots.logo\"\n :class=\"$style.dashboardNavigationLogo\"\n :to=\"logoLocation || '/'\">\n <slot\n name=\"logo\"\n v-bind=\"{isNavigationCollapsed}\"/>\n </router-link>\n\n <FluxMenuItem\n icon-leading=\"ellipsis-h\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\"/>\n </header>\n\n <div\n v-for=\"index of 2\"\n :key=\"index\"\n :class=\"$style.dashboardNavigationRoundingFix\"/>\n\n <main :class=\"$style.dashboardNavigationNav\">\n <slot/>\n </main>\n </nav>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import type { FluxTo } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardNavigation.module.scss';\n\n defineOptions({\n inheritAttrs: false\n });\n\n defineProps<{\n logoLocation?: FluxTo\n }>();\n\n const slots = defineSlots<{\n default(): any;\n logo?(): any;\n }>();\n\n const {\n isMenuCollapsed,\n isNavigationCollapsed\n } = useDashboardInjection();\n</script>\n"],"names":["k","e","t","n","Ke","s","r","i","oe","je","te","Ze","ne","I","$e","FluxDashboardInjectionKey","isMenuCollapsed","useRemembered","isNavigationCollapsed","isResizing","ref","provide","watch","_","__","onCleanup","timeout","onResize","useDashboardInjection","injection","inject","y","useScrollPosition","slots","_useSlots"],"mappings":"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"}
|
|
File without changes
|