@oneb/ui-vue 0.1.69 → 0.2.3
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/dist/OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js +79 -0
- package/dist/OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs +1 -0
- package/dist/OneHelpMenu-05780713.cjs +1 -0
- package/dist/{OneHelpMenu-9c4bb5a6.js → OneHelpMenu-37653a53.js} +14 -14
- package/dist/common/OneMarkdown.vue.d.ts +2 -0
- package/dist/common/index.cjs +16 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +3121 -72
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +34 -34
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -33
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +209 -203
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/dist/OneHelpMenu-cf061c6f.cjs +0 -1
package/dist/dropdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../OneHelpMenu-cf061c6f.cjs"),c=require("vue"),Pt=require("../_plugin-vue_export-helper-f246444f.cjs"),wt=require("../common/index.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../index-9f8735d9.cjs");const st=Math.min,P=Math.max,K=Math.round,G=Math.floor,C=t=>({x:t,y:t}),Mt={left:"right",right:"left",bottom:"top",top:"bottom"},$t={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function zt(t){return t==="x"?"y":"x"}function Ct(t){return t==="y"?"height":"width"}function j(t){return["top","bottom"].includes($(t))?"y":"x"}function Rt(t){return zt(j(t))}function Wt(t,e,o){o===void 0&&(o=!1);const n=Z(t),i=Rt(t),r=Ct(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=J(s)),[s,J(s)]}function Ht(t){const e=J(t);return[rt(t),e,rt(e)]}function rt(t){return t.replace(/start|end/g,e=>$t[e])}function qt(t,e,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?r:s;default:return[]}}function It(t,e,o,n){const i=Z(t);let r=qt($(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(rt)))),r}function J(t){return t.replace(/left|right|bottom|top/g,e=>Mt[e])}function jt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ut(t){return typeof t!="number"?jt(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function yt(t,e,o){let{reference:n,floating:i}=t;const r=j(e),s=Rt(e),l=Ct(s),a=$(e),f=r==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-i.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Z(e)){case"start":p[s]-=m*(o&&f?-1:1);break;case"end":p[s]+=m*(o&&f?-1:1);break}return p}const Yt=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,l=r.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=yt(f,n,a),m=n,p={},h=0;for(let w=0;w<l.length;w++){const{name:y,fn:g}=l[w],{x:v,y:b,data:k,reset:x}=await g({x:u,y:d,initialPlacement:n,placement:m,strategy:i,middlewareData:p,rects:f,platform:s,elements:{reference:t,floating:e}});u=v??u,d=b??d,p={...p,[y]:{...p[y],...k}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:d}=yt(f,m,a)),w=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:p}};async function Xt(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=ct(e,t),h=Ut(p),y=l[m?d==="floating"?"reference":"floating":d],g=Q(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(y)))==null||o?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:a})),v=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),k=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},x=Q(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:a}):v);return{top:(g.top-x.top+h.top)/k.y,bottom:(x.bottom-g.bottom+h.bottom)/k.y,left:(g.left-x.left+h.left)/k.x,right:(x.right-g.right+h.right)/k.x}}const Gt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:f}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...y}=ct(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const g=$(i),v=j(l),b=$(l)===l,k=await(a.isRTL==null?void 0:a.isRTL(f.floating)),x=m||(b||!w?[J(l)]:Ht(l)),H=h!=="none";!m&&H&&x.push(...It(l,w,h,k));const B=[l,...x],ot=await Xt(e,y),X=[];let q=((n=r.flip)==null?void 0:n.overflows)||[];if(u&&X.push(ot[g]),d){const V=Wt(i,s,k);X.push(ot[V[0]],ot[V[1]])}if(q=[...q,{placement:i,overflows:X}],!X.every(V=>V<=0)){var pt,mt;const V=(((pt=r.flip)==null?void 0:pt.index)||0)+1,gt=B[V];if(gt)return{data:{index:V,overflows:q},reset:{placement:gt}};let I=(mt=q.filter(F=>F.overflows[0]<=0).sort((F,S)=>F.overflows[1]-S.overflows[1])[0])==null?void 0:mt.placement;if(!I)switch(p){case"bestFit":{var ht;const F=(ht=q.filter(S=>{if(H){const L=j(S.placement);return L===v||L==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(L=>L>0).reduce((L,Ft)=>L+Ft,0)]).sort((S,L)=>S[1]-L[1])[0])==null?void 0:ht[0];F&&(I=F);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function Kt(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=$(o),l=Z(o),a=j(o)==="y",f=["left","top"].includes(s)?-1:1,u=r&&a?-1:1,d=ct(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*u,y:m*f}:{x:m*f,y:p*u}}const Jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:s,middlewareData:l}=e,a=await Kt(e,t);return s===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}};function tt(){return typeof window<"u"}function W(t){return _t(t)?(t.nodeName||"").toLowerCase():"#document"}function A(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _(t){var e;return(e=(_t(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function _t(t){return tt()?t instanceof Node||t instanceof A(t).Node:!1}function E(t){return tt()?t instanceof Element||t instanceof A(t).Element:!1}function R(t){return tt()?t instanceof HTMLElement||t instanceof A(t).HTMLElement:!1}function xt(t){return!tt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof A(t).ShadowRoot}function Y(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=O(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function Qt(t){return["table","td","th"].includes(W(t))}function et(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function at(t){const e=ft(),o=E(t)?O(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function Zt(t){let e=T(t);for(;R(e)&&!z(e);){if(at(e))return e;if(et(e))return null;e=T(e)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function z(t){return["html","body","#document"].includes(W(t))}function O(t){return A(t).getComputedStyle(t)}function nt(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function T(t){if(W(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xt(t)&&t.host||_(t);return xt(e)?e.host:e}function Dt(t){const e=T(t);return z(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&Y(e)?e:Dt(e)}function U(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Dt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=A(i);if(r){const l=lt(s);return e.concat(s,s.visualViewport||[],Y(i)?i:[],l&&o?U(l):[])}return e.concat(i,U(i,[],o))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function St(t){const e=O(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=R(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=K(o)!==r||K(n)!==s;return l&&(o=r,n=s),{width:o,height:n,$:l}}function ut(t){return E(t)?t:t.contextElement}function M(t){const e=ut(t);if(!R(e))return C(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=St(e);let s=(r?K(o.width):o.width)/n,l=(r?K(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const te=C(0);function Lt(t){const e=A(t);return!ft()||!e.visualViewport?te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ee(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==A(t)?!1:e}function N(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=ut(t);let s=C(1);e&&(n?E(n)&&(s=M(n)):s=M(t));const l=ee(r,o,n)?Lt(r):C(0);let a=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(r){const m=A(r),p=n&&E(n)?A(n):n;let h=m,w=lt(h);for(;w&&n&&p!==h;){const y=M(w),g=w.getBoundingClientRect(),v=O(w),b=g.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,k=g.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;a*=y.x,f*=y.y,u*=y.x,d*=y.y,a+=b,f+=k,h=A(w),w=lt(h)}}return Q({width:u,height:d,x:a,y:f})}function dt(t,e){const o=nt(t).scrollLeft;return e?e.left+o:N(_(t)).left+o}function Tt(t,e,o){o===void 0&&(o=!1);const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-(o?0:dt(t,n)),r=n.top+e.scrollTop;return{x:i,y:r}}function ne(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=_(n),l=e?et(e.floating):!1;if(n===s||l&&r)return o;let a={scrollLeft:0,scrollTop:0},f=C(1);const u=C(0),d=R(n);if((d||!d&&!r)&&((W(n)!=="body"||Y(s))&&(a=nt(n)),R(n))){const p=N(n);f=M(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const m=s&&!d&&!r?Tt(s,a,!0):C(0);return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-a.scrollLeft*f.x+u.x+m.x,y:o.y*f.y-a.scrollTop*f.y+u.y+m.y}}function oe(t){return Array.from(t.getClientRects())}function ie(t){const e=_(t),o=nt(t),n=t.ownerDocument.body,i=P(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=P(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+dt(t);const l=-o.scrollTop;return O(n).direction==="rtl"&&(s+=P(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:l}}function se(t,e){const o=A(t),n=_(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;const f=ft();(!f||f&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l,y:a}}function re(t,e){const o=N(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=R(t)?M(t):C(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,a=i*r.x,f=n*r.y;return{width:s,height:l,x:a,y:f}}function vt(t,e,o){let n;if(e==="viewport")n=se(t,o);else if(e==="document")n=ie(_(t));else if(E(e))n=re(e,o);else{const i=Lt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function Vt(t,e){const o=T(t);return o===e||!E(o)||z(o)?!1:O(o).position==="fixed"||Vt(o,e)}function le(t,e){const o=e.get(t);if(o)return o;let n=U(t,[],!1).filter(l=>E(l)&&W(l)!=="body"),i=null;const r=O(t).position==="fixed";let s=r?T(t):t;for(;E(s)&&!z(s);){const l=O(s),a=at(s);!a&&l.position==="fixed"&&(i=null),(r?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Y(s)&&!a&&Vt(t,s))?n=n.filter(u=>u!==s):i=l,s=T(s)}return e.set(t,n),n}function ce(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?et(e)?[]:le(e,this._c):[].concat(o),n],l=s[0],a=s.reduce((f,u)=>{const d=vt(e,u,i);return f.top=P(d.top,f.top),f.right=st(d.right,f.right),f.bottom=st(d.bottom,f.bottom),f.left=P(d.left,f.left),f},vt(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function ae(t){const{width:e,height:o}=St(t);return{width:e,height:o}}function fe(t,e,o){const n=R(e),i=_(e),r=o==="fixed",s=N(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=C(0);if(n||!n&&!r)if((W(e)!=="body"||Y(i))&&(l=nt(e)),n){const m=N(e,!0,r,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else i&&(a.x=dt(i));const f=i&&!n&&!r?Tt(i,l):C(0),u=s.left+l.scrollLeft-a.x-f.x,d=s.top+l.scrollTop-a.y-f.y;return{x:u,y:d,width:s.width,height:s.height}}function it(t){return O(t).position==="static"}function bt(t,e){if(!R(t)||O(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return _(t)===o&&(o=o.ownerDocument.body),o}function Nt(t,e){const o=A(t);if(et(t))return o;if(!R(t)){let i=T(t);for(;i&&!z(i);){if(E(i)&&!it(i))return i;i=T(i)}return o}let n=bt(t,e);for(;n&&Qt(n)&&it(n);)n=bt(n,e);return n&&z(n)&&it(n)&&!at(n)?o:n||Zt(t)||o}const ue=async function(t){const e=this.getOffsetParent||Nt,o=this.getDimensions,n=await o(t.floating);return{reference:fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function de(t){return O(t).direction==="rtl"}const pe={convertOffsetParentRelativeRectToViewportRelativeRect:ne,getDocumentElement:_,getClippingRect:ce,getOffsetParent:Nt,getElementRects:ue,getClientRects:oe,getDimensions:ae,getScale:M,isElement:E,isRTL:de};function Bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function me(t,e){let o=null,n;const i=_(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),r();const f=t.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=f;if(l||e(),!m||!p)return;const h=G(d),w=G(i.clientWidth-(u+m)),y=G(i.clientHeight-(d+p)),g=G(u),b={rootMargin:-h+"px "+-w+"px "+-y+"px "+-g+"px",threshold:P(0,st(1,a))||1};let k=!0;function x(H){const B=H[0].intersectionRatio;if(B!==a){if(!k)return s();B?s(!1,B):n=setTimeout(()=>{s(!1,1e-7)},1e3)}B===1&&!Bt(f,t.getBoundingClientRect())&&s(),k=!1}try{o=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{o=new IntersectionObserver(x,b)}o.observe(t)}return s(!0),r}function he(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,f=ut(t),u=i||r?[...f?U(f):[],...U(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const d=f&&l?me(f,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===f&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),o()}),f&&!a&&p.observe(f),p.observe(e));let h,w=a?N(t):null;a&&y();function y(){const g=N(t);w&&!Bt(w,g)&&o(),w=g,h=requestAnimationFrame(y)}return o(),()=>{var g;u.forEach(v=>{i&&v.removeEventListener("scroll",o),r&&v.removeEventListener("resize",o)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const kt=Jt,At=Gt,Et=(t,e,o)=>{const n=new Map,i={platform:pe,...o},r={...i.platform,_c:n};return Yt(t,e,{...i,platform:r})},ge=["data-opened"],we={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},ye=c.defineComponent({__name:"OneDropdownAuto",props:D.dropdownProps,emits:["open","close"],setup(t,{emit:e}){const o=t,n=c.ref(!1),i=c.ref(null),r=c.ref(null);let s=null;c.watch(n,u=>{u&&r.value&&i.value?(Et(r.value,i.value,{placement:o.stick?o.stick:"bottom-start",middleware:[kt(5),At()]}).then(({x:d,y:m})=>{Object.assign(i.value.style,{left:`${d}px`,top:`${m}px`})}),s=he(r.value,i.value,()=>{Et(r.value,i.value,{placement:o.stick?o.stick:"bottom-start",middleware:[kt(4),At()]}).then(({x:d,y:m})=>{Object.assign(i.value.style,{left:`${d}px`,top:`${m}px`})})})):s&&(s(),s=null)}),c.onBeforeUnmount(()=>{s&&s()});const l=e,a=()=>{n.value=!n.value,n.value?l("open"):l("close")};c.provide("OneDropdown",{onToggle:a});const f=c.computed(()=>["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(u,d)=>(c.openBlock(),c.createElementBlock("div",{class:"relative inline-block","data-opened":n.value},[c.createElementVNode("div",{ref_key:"buttonRef",ref:r},[c.renderSlot(u.$slots,"button",c.normalizeProps(c.guardReactiveProps({onToggle:a,isExpanded:n.value})))],512),n.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("div",{ref_key:"menuRef",ref:i,class:c.normalizeClass(["menu",f.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",style:{display:"none"}},[u.title?(c.openBlock(),c.createElementBlock("div",we,c.toDisplayString(u.title),1)):c.createCommentVNode("",!0),c.renderSlot(u.$slots,"menu",c.normalizeProps(c.guardReactiveProps({onToggle:a})))],2),[[c.vShow,n.value]])],8,ge))}}),xe={},ve={class:"border-t border-secondary-stroke my-1"};function be(t,e){return c.openBlock(),c.createElementBlock("div",ve)}const ke=Pt._export_sfc(xe,[["render",be]]),Ae=["onClick"],Ee={class:"grid"},Oe={class:"font-semibold px-3"},Ce={class:"rounded-lg m-3 border"},Re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},_e={class:"flex-shrink-0"},De={class:"w-full text-left"},Se={class:"flex-shrink-0"},Le={class:"px-3 py-2"},Te={class:"text-secondary-content text-left pb-1 text-sm uppercase"},Ve={key:0,class:"space-y-2"},Ne=["onClick"],Be={class:"pl-2"},Fe={class:"text-sm mt-1"},Pe={class:"text-xs mt-1"},Ot=3,Me=c.defineComponent({__name:"OneBrowserMenuGrid",props:D.browserMenuProps,setup(t){const e=t,o=()=>{typeof e.onChange=="function"&&e.onChange()},n=c.ref(!1),i=c.computed(()=>e.apps?n.value?e.apps:e.apps.slice(0,Ot):[]),r=()=>{n.value=!n.value},s=l=>{typeof e.onApp=="function"&&e.onApp(l)};return(l,a)=>(c.openBlock(),c.createBlock(D._sfc_main$1,{stick:"right"},{button:c.withCtx(({onToggle:f,isExpanded:u})=>[c.createElementVNode("button",{onClick:f,class:c.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[u?"bg-secondary-25":""]])},[c.createVNode(c.unref(D.render$4),{class:"text-secondary-base",style:c.normalizeStyle(`width: ${l.iconSize}px; height: ${l.iconSize}px`)},null,8,["style"])],10,Ae)]),menu:c.withCtx(()=>{var f,u,d,m;return[c.createElementVNode("div",Ee,[c.createElementVNode("div",Oe,c.toDisplayString((f=l.workspace)==null?void 0:f.title),1),c.createElementVNode("div",Ce,[c.createElementVNode("div",Re,[c.createElementVNode("div",_e,[c.createVNode(wt.OneAvatar,{text:((u=l.workspace)==null?void 0:u.name)||"",src:(d=l.workspace)==null?void 0:d.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),c.createElementVNode("div",De,c.toDisplayString((m=l.workspace)==null?void 0:m.name),1),c.createElementVNode("div",Se,[c.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:o},c.toDisplayString(l.changeLabel),1)])]),a[0]||(a[0]=c.createElementVNode("hr",null,null,-1))])]),c.createElementVNode("div",Le,[c.createElementVNode("div",Te,c.toDisplayString(l.appsTitle),1),c.createElementVNode("div",null,[l.apps&&l.apps.length?(c.openBlock(),c.createElementBlock("div",Ve,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,p=>(c.openBlock(),c.createElementBlock("div",{key:p.id,onClick:h=>s(p),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[c.createVNode(wt.OneAvatar,{text:p.name,src:p.photo_url,size:44,rounded:!1},null,8,["text","src"]),c.createElementVNode("div",Be,[c.createElementVNode("p",Fe,c.toDisplayString(p.name),1),c.createElementVNode("p",Pe,c.toDisplayString(p.short),1)])],8,Ne))),128))])):c.createCommentVNode("",!0),l.apps&&l.apps.length>Ot?(c.openBlock(),c.createElementBlock("button",{key:1,onClick:r,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},c.toDisplayString(n.value?"Приховати":"Дивитися всі"),1)):c.createCommentVNode("",!0)])])]}),_:1}))}});exports.OneBrowserMenu=D.OneBrowserMenu;exports.OneDropdown=D._sfc_main$1;exports.OneDropdownItem=D._sfc_main$2;exports.OneHelpMenu=D.OneHelpMenu;exports.OneUserMenu=D._sfc_main;exports.OneBrowserMenuGrid=Me;exports.OneDropdownAuto=ye;exports.OneDropdownDivider=ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../OneHelpMenu-05780713.cjs"),c=require("vue"),Pt=require("../_plugin-vue_export-helper-f246444f.cjs"),wt=require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../index-9f8735d9.cjs");const st=Math.min,P=Math.max,K=Math.round,G=Math.floor,O=t=>({x:t,y:t}),Mt={left:"right",right:"left",bottom:"top",top:"bottom"},$t={start:"end",end:"start"};function ct(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function Z(t){return t.split("-")[1]}function zt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}function j(t){return["top","bottom"].includes($(t))?"y":"x"}function Ct(t){return zt(j(t))}function Wt(t,e,o){o===void 0&&(o=!1);const n=Z(t),i=Ct(t),r=Ot(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=J(s)),[s,J(s)]}function Ht(t){const e=J(t);return[rt(t),e,rt(e)]}function rt(t){return t.replace(/start|end/g,e=>$t[e])}function qt(t,e,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?r:s;default:return[]}}function It(t,e,o,n){const i=Z(t);let r=qt($(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(rt)))),r}function J(t){return t.replace(/left|right|bottom|top/g,e=>Mt[e])}function jt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ut(t){return typeof t!="number"?jt(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function yt(t,e,o){let{reference:n,floating:i}=t;const r=j(e),s=Ct(e),l=Ot(s),a=$(e),f=r==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-i.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Z(e)){case"start":p[s]-=m*(o&&f?-1:1);break;case"end":p[s]+=m*(o&&f?-1:1);break}return p}const Yt=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,l=r.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=yt(f,n,a),m=n,p={},h=0;for(let w=0;w<l.length;w++){const{name:y,fn:g}=l[w],{x:v,y:b,data:_,reset:x}=await g({x:u,y:d,initialPlacement:n,placement:m,strategy:i,middlewareData:p,rects:f,platform:s,elements:{reference:t,floating:e}});u=v??u,d=b??d,p={...p,[y]:{...p[y],..._}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:d}=yt(f,m,a)),w=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:p}};async function Xt(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=ct(e,t),h=Ut(p),y=l[m?d==="floating"?"reference":"floating":d],g=Q(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(y)))==null||o?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:a})),v=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),_=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},x=Q(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:a}):v);return{top:(g.top-x.top+h.top)/_.y,bottom:(x.bottom-g.bottom+h.bottom)/_.y,left:(g.left-x.left+h.left)/_.x,right:(x.right-g.right+h.right)/_.x}}const Gt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:f}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...y}=ct(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const g=$(i),v=j(l),b=$(l)===l,_=await(a.isRTL==null?void 0:a.isRTL(f.floating)),x=m||(b||!w?[J(l)]:Ht(l)),H=h!=="none";!m&&H&&x.push(...It(l,w,h,_));const B=[l,...x],ot=await Xt(e,y),X=[];let q=((n=r.flip)==null?void 0:n.overflows)||[];if(u&&X.push(ot[g]),d){const V=Wt(i,s,_);X.push(ot[V[0]],ot[V[1]])}if(q=[...q,{placement:i,overflows:X}],!X.every(V=>V<=0)){var pt,mt;const V=(((pt=r.flip)==null?void 0:pt.index)||0)+1,gt=B[V];if(gt)return{data:{index:V,overflows:q},reset:{placement:gt}};let I=(mt=q.filter(F=>F.overflows[0]<=0).sort((F,S)=>F.overflows[1]-S.overflows[1])[0])==null?void 0:mt.placement;if(!I)switch(p){case"bestFit":{var ht;const F=(ht=q.filter(S=>{if(H){const L=j(S.placement);return L===v||L==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(L=>L>0).reduce((L,Ft)=>L+Ft,0)]).sort((S,L)=>S[1]-L[1])[0])==null?void 0:ht[0];F&&(I=F);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function Kt(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=$(o),l=Z(o),a=j(o)==="y",f=["left","top"].includes(s)?-1:1,u=r&&a?-1:1,d=ct(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*u,y:m*f}:{x:m*f,y:p*u}}const Jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:s,middlewareData:l}=e,a=await Kt(e,t);return s===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}};function tt(){return typeof window<"u"}function W(t){return Rt(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function R(t){var e;return(e=(Rt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Rt(t){return tt()?t instanceof Node||t instanceof k(t).Node:!1}function E(t){return tt()?t instanceof Element||t instanceof k(t).Element:!1}function C(t){return tt()?t instanceof HTMLElement||t instanceof k(t).HTMLElement:!1}function xt(t){return!tt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof k(t).ShadowRoot}function Y(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=A(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function Qt(t){return["table","td","th"].includes(W(t))}function et(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function at(t){const e=ft(),o=E(t)?A(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function Zt(t){let e=T(t);for(;C(e)&&!z(e);){if(at(e))return e;if(et(e))return null;e=T(e)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function z(t){return["html","body","#document"].includes(W(t))}function A(t){return k(t).getComputedStyle(t)}function nt(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function T(t){if(W(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xt(t)&&t.host||R(t);return xt(e)?e.host:e}function Dt(t){const e=T(t);return z(e)?t.ownerDocument?t.ownerDocument.body:t.body:C(e)&&Y(e)?e:Dt(e)}function U(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Dt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=k(i);if(r){const l=lt(s);return e.concat(s,s.visualViewport||[],Y(i)?i:[],l&&o?U(l):[])}return e.concat(i,U(i,[],o))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function St(t){const e=A(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=C(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=K(o)!==r||K(n)!==s;return l&&(o=r,n=s),{width:o,height:n,$:l}}function ut(t){return E(t)?t:t.contextElement}function M(t){const e=ut(t);if(!C(e))return O(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=St(e);let s=(r?K(o.width):o.width)/n,l=(r?K(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const te=O(0);function Lt(t){const e=k(t);return!ft()||!e.visualViewport?te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ee(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==k(t)?!1:e}function N(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=ut(t);let s=O(1);e&&(n?E(n)&&(s=M(n)):s=M(t));const l=ee(r,o,n)?Lt(r):O(0);let a=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(r){const m=k(r),p=n&&E(n)?k(n):n;let h=m,w=lt(h);for(;w&&n&&p!==h;){const y=M(w),g=w.getBoundingClientRect(),v=A(w),b=g.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,_=g.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;a*=y.x,f*=y.y,u*=y.x,d*=y.y,a+=b,f+=_,h=k(w),w=lt(h)}}return Q({width:u,height:d,x:a,y:f})}function dt(t,e){const o=nt(t).scrollLeft;return e?e.left+o:N(R(t)).left+o}function Tt(t,e,o){o===void 0&&(o=!1);const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-(o?0:dt(t,n)),r=n.top+e.scrollTop;return{x:i,y:r}}function ne(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=R(n),l=e?et(e.floating):!1;if(n===s||l&&r)return o;let a={scrollLeft:0,scrollTop:0},f=O(1);const u=O(0),d=C(n);if((d||!d&&!r)&&((W(n)!=="body"||Y(s))&&(a=nt(n)),C(n))){const p=N(n);f=M(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const m=s&&!d&&!r?Tt(s,a,!0):O(0);return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-a.scrollLeft*f.x+u.x+m.x,y:o.y*f.y-a.scrollTop*f.y+u.y+m.y}}function oe(t){return Array.from(t.getClientRects())}function ie(t){const e=R(t),o=nt(t),n=t.ownerDocument.body,i=P(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=P(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+dt(t);const l=-o.scrollTop;return A(n).direction==="rtl"&&(s+=P(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:l}}function se(t,e){const o=k(t),n=R(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;const f=ft();(!f||f&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l,y:a}}function re(t,e){const o=N(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=C(t)?M(t):O(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,a=i*r.x,f=n*r.y;return{width:s,height:l,x:a,y:f}}function vt(t,e,o){let n;if(e==="viewport")n=se(t,o);else if(e==="document")n=ie(R(t));else if(E(e))n=re(e,o);else{const i=Lt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function Vt(t,e){const o=T(t);return o===e||!E(o)||z(o)?!1:A(o).position==="fixed"||Vt(o,e)}function le(t,e){const o=e.get(t);if(o)return o;let n=U(t,[],!1).filter(l=>E(l)&&W(l)!=="body"),i=null;const r=A(t).position==="fixed";let s=r?T(t):t;for(;E(s)&&!z(s);){const l=A(s),a=at(s);!a&&l.position==="fixed"&&(i=null),(r?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Y(s)&&!a&&Vt(t,s))?n=n.filter(u=>u!==s):i=l,s=T(s)}return e.set(t,n),n}function ce(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?et(e)?[]:le(e,this._c):[].concat(o),n],l=s[0],a=s.reduce((f,u)=>{const d=vt(e,u,i);return f.top=P(d.top,f.top),f.right=st(d.right,f.right),f.bottom=st(d.bottom,f.bottom),f.left=P(d.left,f.left),f},vt(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function ae(t){const{width:e,height:o}=St(t);return{width:e,height:o}}function fe(t,e,o){const n=C(e),i=R(e),r=o==="fixed",s=N(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=O(0);if(n||!n&&!r)if((W(e)!=="body"||Y(i))&&(l=nt(e)),n){const m=N(e,!0,r,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else i&&(a.x=dt(i));const f=i&&!n&&!r?Tt(i,l):O(0),u=s.left+l.scrollLeft-a.x-f.x,d=s.top+l.scrollTop-a.y-f.y;return{x:u,y:d,width:s.width,height:s.height}}function it(t){return A(t).position==="static"}function bt(t,e){if(!C(t)||A(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return R(t)===o&&(o=o.ownerDocument.body),o}function Nt(t,e){const o=k(t);if(et(t))return o;if(!C(t)){let i=T(t);for(;i&&!z(i);){if(E(i)&&!it(i))return i;i=T(i)}return o}let n=bt(t,e);for(;n&&Qt(n)&&it(n);)n=bt(n,e);return n&&z(n)&&it(n)&&!at(n)?o:n||Zt(t)||o}const ue=async function(t){const e=this.getOffsetParent||Nt,o=this.getDimensions,n=await o(t.floating);return{reference:fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function de(t){return A(t).direction==="rtl"}const pe={convertOffsetParentRelativeRectToViewportRelativeRect:ne,getDocumentElement:R,getClippingRect:ce,getOffsetParent:Nt,getElementRects:ue,getClientRects:oe,getDimensions:ae,getScale:M,isElement:E,isRTL:de};function Bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function me(t,e){let o=null,n;const i=R(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),r();const f=t.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=f;if(l||e(),!m||!p)return;const h=G(d),w=G(i.clientWidth-(u+m)),y=G(i.clientHeight-(d+p)),g=G(u),b={rootMargin:-h+"px "+-w+"px "+-y+"px "+-g+"px",threshold:P(0,st(1,a))||1};let _=!0;function x(H){const B=H[0].intersectionRatio;if(B!==a){if(!_)return s();B?s(!1,B):n=setTimeout(()=>{s(!1,1e-7)},1e3)}B===1&&!Bt(f,t.getBoundingClientRect())&&s(),_=!1}try{o=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{o=new IntersectionObserver(x,b)}o.observe(t)}return s(!0),r}function he(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,f=ut(t),u=i||r?[...f?U(f):[],...U(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const d=f&&l?me(f,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===f&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),o()}),f&&!a&&p.observe(f),p.observe(e));let h,w=a?N(t):null;a&&y();function y(){const g=N(t);w&&!Bt(w,g)&&o(),w=g,h=requestAnimationFrame(y)}return o(),()=>{var g;u.forEach(v=>{i&&v.removeEventListener("scroll",o),r&&v.removeEventListener("resize",o)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const _t=Jt,kt=Gt,Et=(t,e,o)=>{const n=new Map,i={platform:pe,...o},r={...i.platform,_c:n};return Yt(t,e,{...i,platform:r})},ge=["data-opened"],we={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},ye=c.defineComponent({__name:"OneDropdownAuto",props:D.dropdownProps,emits:["open","close"],setup(t,{emit:e}){const o=t,n=c.ref(!1),i=c.ref(null),r=c.ref(null);let s=null;c.watch(n,u=>{u&&r.value&&i.value?(Et(r.value,i.value,{placement:o.stick?o.stick:"bottom-start",middleware:[_t(5),kt()]}).then(({x:d,y:m})=>{Object.assign(i.value.style,{left:`${d}px`,top:`${m}px`})}),s=he(r.value,i.value,()=>{Et(r.value,i.value,{placement:o.stick?o.stick:"bottom-start",middleware:[_t(4),kt()]}).then(({x:d,y:m})=>{Object.assign(i.value.style,{left:`${d}px`,top:`${m}px`})})})):s&&(s(),s=null)}),c.onBeforeUnmount(()=>{s&&s()});const l=e,a=()=>{n.value=!n.value,n.value?l("open"):l("close")};c.provide("OneDropdown",{onToggle:a});const f=c.computed(()=>["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(u,d)=>(c.openBlock(),c.createElementBlock("div",{class:"relative inline-block","data-opened":n.value},[c.createElementVNode("div",{ref_key:"buttonRef",ref:r},[c.renderSlot(u.$slots,"button",c.normalizeProps(c.guardReactiveProps({onToggle:a,isExpanded:n.value})))],512),n.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):c.createCommentVNode("",!0),c.withDirectives(c.createElementVNode("div",{ref_key:"menuRef",ref:i,class:c.normalizeClass(["menu",f.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",style:{display:"none"}},[u.title?(c.openBlock(),c.createElementBlock("div",we,c.toDisplayString(u.title),1)):c.createCommentVNode("",!0),c.renderSlot(u.$slots,"menu",c.normalizeProps(c.guardReactiveProps({onToggle:a})))],2),[[c.vShow,n.value]])],8,ge))}}),xe={},ve={class:"border-t border-secondary-stroke my-1"};function be(t,e){return c.openBlock(),c.createElementBlock("div",ve)}const _e=Pt._export_sfc(xe,[["render",be]]),ke=["onClick"],Ee={class:"grid"},Ae={class:"font-semibold px-3"},Oe={class:"rounded-lg m-3 border"},Ce={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},Re={class:"flex-shrink-0"},De={class:"w-full text-left"},Se={class:"flex-shrink-0"},Le={class:"px-3 py-2"},Te={class:"text-secondary-content text-left pb-1 text-sm uppercase"},Ve={key:0,class:"space-y-2"},Ne=["onClick"],Be={class:"pl-2"},Fe={class:"text-sm mt-1"},Pe={class:"text-xs mt-1"},At=3,Me=c.defineComponent({__name:"OneBrowserMenuGrid",props:D.browserMenuProps,setup(t){const e=t,o=()=>{typeof e.onChange=="function"&&e.onChange()},n=c.ref(!1),i=c.computed(()=>e.apps?n.value?e.apps:e.apps.slice(0,At):[]),r=()=>{n.value=!n.value},s=l=>{typeof e.onApp=="function"&&e.onApp(l)};return(l,a)=>(c.openBlock(),c.createBlock(D._sfc_main$1,{stick:"right"},{button:c.withCtx(({onToggle:f,isExpanded:u})=>[c.createElementVNode("button",{onClick:f,class:c.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[u?"bg-secondary-25":""]])},[c.createVNode(c.unref(D.render$4),{class:"text-secondary-base",style:c.normalizeStyle(`width: ${l.iconSize}px; height: ${l.iconSize}px`)},null,8,["style"])],10,ke)]),menu:c.withCtx(()=>{var f,u,d,m;return[c.createElementVNode("div",Ee,[c.createElementVNode("div",Ae,c.toDisplayString((f=l.workspace)==null?void 0:f.title),1),c.createElementVNode("div",Oe,[c.createElementVNode("div",Ce,[c.createElementVNode("div",Re,[c.createVNode(wt._sfc_main,{text:((u=l.workspace)==null?void 0:u.name)||"",src:(d=l.workspace)==null?void 0:d.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),c.createElementVNode("div",De,c.toDisplayString((m=l.workspace)==null?void 0:m.name),1),c.createElementVNode("div",Se,[c.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:o},c.toDisplayString(l.changeLabel),1)])]),a[0]||(a[0]=c.createElementVNode("hr",null,null,-1))])]),c.createElementVNode("div",Le,[c.createElementVNode("div",Te,c.toDisplayString(l.appsTitle),1),c.createElementVNode("div",null,[l.apps&&l.apps.length?(c.openBlock(),c.createElementBlock("div",Ve,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.value,p=>(c.openBlock(),c.createElementBlock("div",{key:p.id,onClick:h=>s(p),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[c.createVNode(wt._sfc_main,{text:p.name,src:p.photo_url,size:44,rounded:!1},null,8,["text","src"]),c.createElementVNode("div",Be,[c.createElementVNode("p",Fe,c.toDisplayString(p.name),1),c.createElementVNode("p",Pe,c.toDisplayString(p.short),1)])],8,Ne))),128))])):c.createCommentVNode("",!0),l.apps&&l.apps.length>At?(c.openBlock(),c.createElementBlock("button",{key:1,onClick:r,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},c.toDisplayString(n.value?"Приховати":"Дивитися всі"),1)):c.createCommentVNode("",!0)])])]}),_:1}))}});exports.OneBrowserMenu=D.OneBrowserMenu;exports.OneDropdown=D._sfc_main$1;exports.OneDropdownItem=D._sfc_main$2;exports.OneHelpMenu=D.OneHelpMenu;exports.OneUserMenu=D._sfc_main;exports.OneBrowserMenuGrid=Me;exports.OneDropdownAuto=ye;exports.OneDropdownDivider=_e;
|
package/dist/dropdown/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as Gt, h as Kt, e as Jt, i as Qt } from "../OneHelpMenu-
|
|
2
|
-
import { d as vn, f as bn, O as An, _ as Rn } from "../OneHelpMenu-
|
|
3
|
-
import { defineComponent as Bt, ref as Q, watch as Zt, onBeforeUnmount as te, provide as ee, computed as $t, openBlock as L, createElementBlock as F, createElementVNode as y, renderSlot as At, normalizeProps as Rt, guardReactiveProps as Ot, createCommentVNode as Z, withDirectives as ne, normalizeClass as Mt, toDisplayString as S, vShow as oe, createBlock as ie, withCtx as
|
|
1
|
+
import { g as Gt, h as Kt, e as Jt, i as Qt } from "../OneHelpMenu-37653a53.js";
|
|
2
|
+
import { d as vn, f as bn, O as An, _ as Rn } from "../OneHelpMenu-37653a53.js";
|
|
3
|
+
import { defineComponent as Bt, ref as Q, watch as Zt, onBeforeUnmount as te, provide as ee, computed as $t, openBlock as L, createElementBlock as F, createElementVNode as y, renderSlot as At, normalizeProps as Rt, guardReactiveProps as Ot, createCommentVNode as Z, withDirectives as ne, normalizeClass as Mt, toDisplayString as S, vShow as oe, createBlock as ie, withCtx as _t, createVNode as ct, unref as se, normalizeStyle as re, Fragment as le, renderList as ce } from "vue";
|
|
4
4
|
import { _ as ae } from "../_plugin-vue_export-helper-dad06003.js";
|
|
5
|
-
import {
|
|
5
|
+
import { _ as Ct } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
6
6
|
import "../XMarkIcon-51ef0691.js";
|
|
7
7
|
import "../index-f8afb6b6.js";
|
|
8
|
-
const ft = Math.min, V = Math.max, tt = Math.round, J = Math.floor,
|
|
8
|
+
const ft = Math.min, V = Math.max, tt = Math.round, J = Math.floor, C = (t) => ({
|
|
9
9
|
x: t,
|
|
10
10
|
y: t
|
|
11
11
|
}), fe = {
|
|
@@ -423,7 +423,7 @@ function G(t) {
|
|
|
423
423
|
overflowX: o,
|
|
424
424
|
overflowY: n,
|
|
425
425
|
display: i
|
|
426
|
-
} =
|
|
426
|
+
} = _(t);
|
|
427
427
|
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(i);
|
|
428
428
|
}
|
|
429
429
|
function Oe(t) {
|
|
@@ -439,10 +439,10 @@ function st(t) {
|
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
441
|
function mt(t) {
|
|
442
|
-
const e = ht(), o = O(t) ?
|
|
442
|
+
const e = ht(), o = O(t) ? _(t) : t;
|
|
443
443
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function _e(t) {
|
|
446
446
|
let e = P(t);
|
|
447
447
|
for (; k(e) && !H(e); ) {
|
|
448
448
|
if (mt(e))
|
|
@@ -459,7 +459,7 @@ function ht() {
|
|
|
459
459
|
function H(t) {
|
|
460
460
|
return ["html", "body", "#document"].includes(I(t));
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function _(t) {
|
|
463
463
|
return R(t).getComputedStyle(t);
|
|
464
464
|
}
|
|
465
465
|
function rt(t) {
|
|
@@ -501,7 +501,7 @@ function dt(t) {
|
|
|
501
501
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
502
502
|
}
|
|
503
503
|
function Ht(t) {
|
|
504
|
-
const e =
|
|
504
|
+
const e = _(t);
|
|
505
505
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
506
506
|
const i = k(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, l = tt(o) !== r || tt(n) !== s;
|
|
507
507
|
return l && (o = r, n = s), {
|
|
@@ -516,7 +516,7 @@ function gt(t) {
|
|
|
516
516
|
function z(t) {
|
|
517
517
|
const e = gt(t);
|
|
518
518
|
if (!k(e))
|
|
519
|
-
return
|
|
519
|
+
return C(1);
|
|
520
520
|
const o = e.getBoundingClientRect(), {
|
|
521
521
|
width: n,
|
|
522
522
|
height: i,
|
|
@@ -528,10 +528,10 @@ function z(t) {
|
|
|
528
528
|
y: l
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
const
|
|
531
|
+
const Ce = /* @__PURE__ */ C(0);
|
|
532
532
|
function It(t) {
|
|
533
533
|
const e = R(t);
|
|
534
|
-
return !ht() || !e.visualViewport ?
|
|
534
|
+
return !ht() || !e.visualViewport ? Ce : {
|
|
535
535
|
x: e.visualViewport.offsetLeft,
|
|
536
536
|
y: e.visualViewport.offsetTop
|
|
537
537
|
};
|
|
@@ -542,15 +542,15 @@ function ke(t, e, o) {
|
|
|
542
542
|
function $(t, e, o, n) {
|
|
543
543
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
544
544
|
const i = t.getBoundingClientRect(), r = gt(t);
|
|
545
|
-
let s =
|
|
545
|
+
let s = C(1);
|
|
546
546
|
e && (n ? O(n) && (s = z(n)) : s = z(t));
|
|
547
|
-
const l = ke(r, o, n) ? It(r) :
|
|
547
|
+
const l = ke(r, o, n) ? It(r) : C(0);
|
|
548
548
|
let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, f = i.width / s.x, u = i.height / s.y;
|
|
549
549
|
if (r) {
|
|
550
550
|
const p = R(r), d = n && O(n) ? R(n) : n;
|
|
551
551
|
let m = p, g = dt(m);
|
|
552
552
|
for (; g && n && d !== m; ) {
|
|
553
|
-
const w = z(g), h = g.getBoundingClientRect(), v =
|
|
553
|
+
const w = z(g), h = g.getBoundingClientRect(), v = _(g), b = h.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, A = h.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
554
554
|
c *= w.x, a *= w.y, f *= w.x, u *= w.y, c += b, a += A, m = R(g), g = dt(m);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -589,13 +589,13 @@ function Ee(t) {
|
|
|
589
589
|
let c = {
|
|
590
590
|
scrollLeft: 0,
|
|
591
591
|
scrollTop: 0
|
|
592
|
-
}, a =
|
|
593
|
-
const f =
|
|
592
|
+
}, a = C(1);
|
|
593
|
+
const f = C(0), u = k(n);
|
|
594
594
|
if ((u || !u && !r) && ((I(n) !== "body" || G(s)) && (c = rt(n)), k(n))) {
|
|
595
595
|
const d = $(n);
|
|
596
596
|
a = z(n), f.x = d.x + n.clientLeft, f.y = d.y + n.clientTop;
|
|
597
597
|
}
|
|
598
|
-
const p = s && !u && !r ? jt(s, c, !0) :
|
|
598
|
+
const p = s && !u && !r ? jt(s, c, !0) : C(0);
|
|
599
599
|
return {
|
|
600
600
|
width: o.width * a.x,
|
|
601
601
|
height: o.height * a.y,
|
|
@@ -610,7 +610,7 @@ function Te(t) {
|
|
|
610
610
|
const e = E(t), o = rt(t), n = t.ownerDocument.body, i = V(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = V(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
611
611
|
let s = -o.scrollLeft + wt(t);
|
|
612
612
|
const l = -o.scrollTop;
|
|
613
|
-
return
|
|
613
|
+
return _(n).direction === "rtl" && (s += V(e.clientWidth, n.clientWidth) - i), {
|
|
614
614
|
width: i,
|
|
615
615
|
height: r,
|
|
616
616
|
x: s,
|
|
@@ -633,7 +633,7 @@ function De(t, e) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
function Se(t, e) {
|
|
636
|
-
const o = $(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = k(t) ? z(t) :
|
|
636
|
+
const o = $(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = k(t) ? z(t) : C(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = i * r.x, a = n * r.y;
|
|
637
637
|
return {
|
|
638
638
|
width: s,
|
|
639
639
|
height: l,
|
|
@@ -662,17 +662,17 @@ function Lt(t, e, o) {
|
|
|
662
662
|
}
|
|
663
663
|
function Ut(t, e) {
|
|
664
664
|
const o = P(t);
|
|
665
|
-
return o === e || !O(o) || H(o) ? !1 :
|
|
665
|
+
return o === e || !O(o) || H(o) ? !1 : _(o).position === "fixed" || Ut(o, e);
|
|
666
666
|
}
|
|
667
667
|
function Fe(t, e) {
|
|
668
668
|
const o = e.get(t);
|
|
669
669
|
if (o)
|
|
670
670
|
return o;
|
|
671
671
|
let n = X(t, [], !1).filter((l) => O(l) && I(l) !== "body"), i = null;
|
|
672
|
-
const r =
|
|
672
|
+
const r = _(t).position === "fixed";
|
|
673
673
|
let s = r ? P(t) : t;
|
|
674
674
|
for (; O(s) && !H(s); ) {
|
|
675
|
-
const l =
|
|
675
|
+
const l = _(s), c = mt(s);
|
|
676
676
|
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || G(s) && !c && Ut(t, s)) ? n = n.filter((f) => f !== s) : i = l, s = P(s);
|
|
677
677
|
}
|
|
678
678
|
return e.set(t, n), n;
|
|
@@ -711,14 +711,14 @@ function $e(t, e, o) {
|
|
|
711
711
|
scrollLeft: 0,
|
|
712
712
|
scrollTop: 0
|
|
713
713
|
};
|
|
714
|
-
const c =
|
|
714
|
+
const c = C(0);
|
|
715
715
|
if (n || !n && !r)
|
|
716
716
|
if ((I(e) !== "body" || G(i)) && (l = rt(e)), n) {
|
|
717
717
|
const p = $(e, !0, r, e);
|
|
718
718
|
c.x = p.x + e.clientLeft, c.y = p.y + e.clientTop;
|
|
719
719
|
} else
|
|
720
720
|
i && (c.x = wt(i));
|
|
721
|
-
const a = i && !n && !r ? jt(i, l) :
|
|
721
|
+
const a = i && !n && !r ? jt(i, l) : C(0), f = s.left + l.scrollLeft - c.x - a.x, u = s.top + l.scrollTop - c.y - a.y;
|
|
722
722
|
return {
|
|
723
723
|
x: f,
|
|
724
724
|
y: u,
|
|
@@ -727,10 +727,10 @@ function $e(t, e, o) {
|
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
729
|
function at(t) {
|
|
730
|
-
return
|
|
730
|
+
return _(t).position === "static";
|
|
731
731
|
}
|
|
732
732
|
function Tt(t, e) {
|
|
733
|
-
if (!k(t) ||
|
|
733
|
+
if (!k(t) || _(t).position === "fixed")
|
|
734
734
|
return null;
|
|
735
735
|
if (e)
|
|
736
736
|
return e(t);
|
|
@@ -753,7 +753,7 @@ function Yt(t, e) {
|
|
|
753
753
|
let n = Tt(t, e);
|
|
754
754
|
for (; n && Oe(n) && at(n); )
|
|
755
755
|
n = Tt(n, e);
|
|
756
|
-
return n && H(n) && at(n) && !mt(n) ? o : n ||
|
|
756
|
+
return n && H(n) && at(n) && !mt(n) ? o : n || _e(t) || o;
|
|
757
757
|
}
|
|
758
758
|
const Me = async function(t) {
|
|
759
759
|
const e = this.getOffsetParent || Yt, o = this.getDimensions, n = await o(t.floating);
|
|
@@ -768,7 +768,7 @@ const Me = async function(t) {
|
|
|
768
768
|
};
|
|
769
769
|
};
|
|
770
770
|
function Ne(t) {
|
|
771
|
-
return
|
|
771
|
+
return _(t).direction === "rtl";
|
|
772
772
|
}
|
|
773
773
|
const Ve = {
|
|
774
774
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ee,
|
|
@@ -978,7 +978,7 @@ const gn = /* @__PURE__ */ ae(je, [["render", Ye]]), qe = ["onClick"], Xe = { cl
|
|
|
978
978
|
typeof e.onApp == "function" && e.onApp(l);
|
|
979
979
|
};
|
|
980
980
|
return (l, c) => (L(), ie(Jt, { stick: "right" }, {
|
|
981
|
-
button:
|
|
981
|
+
button: _t(({ onToggle: a, isExpanded: f }) => [
|
|
982
982
|
y("button", {
|
|
983
983
|
onClick: a,
|
|
984
984
|
class: Mt(["p-1 rounded-md hover:bg-secondary-10", [f ? "bg-secondary-25" : ""]])
|
|
@@ -989,7 +989,7 @@ const gn = /* @__PURE__ */ ae(je, [["render", Ye]]), qe = ["onClick"], Xe = { cl
|
|
|
989
989
|
}, null, 8, ["style"])
|
|
990
990
|
], 10, qe)
|
|
991
991
|
]),
|
|
992
|
-
menu:
|
|
992
|
+
menu: _t(() => {
|
|
993
993
|
var a, f, u, p;
|
|
994
994
|
return [
|
|
995
995
|
y("div", Xe, [
|
|
@@ -997,7 +997,7 @@ const gn = /* @__PURE__ */ ae(je, [["render", Ye]]), qe = ["onClick"], Xe = { cl
|
|
|
997
997
|
y("div", Ke, [
|
|
998
998
|
y("div", Je, [
|
|
999
999
|
y("div", Qe, [
|
|
1000
|
-
ct(
|
|
1000
|
+
ct(Ct, {
|
|
1001
1001
|
text: ((f = l.workspace) == null ? void 0 : f.name) || "",
|
|
1002
1002
|
src: (u = l.workspace) == null ? void 0 : u.photo_url,
|
|
1003
1003
|
size: 44,
|
|
@@ -1025,7 +1025,7 @@ const gn = /* @__PURE__ */ ae(je, [["render", Ye]]), qe = ["onClick"], Xe = { cl
|
|
|
1025
1025
|
onClick: (m) => s(d),
|
|
1026
1026
|
class: "flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"
|
|
1027
1027
|
}, [
|
|
1028
|
-
ct(
|
|
1028
|
+
ct(Ct, {
|
|
1029
1029
|
text: d.name,
|
|
1030
1030
|
src: d.photo_url,
|
|
1031
1031
|
size: 44,
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-9f8735d9.cjs"),f=require("./card/index.cjs"),p=require("./form/index.cjs"),m=require("./OneHelpMenu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-9f8735d9.cjs"),f=require("./card/index.cjs"),p=require("./form/index.cjs"),m=require("./OneHelpMenu-05780713.cjs"),x=require("./dropdown/index.cjs"),h=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),w=require("./common/index.cjs"),e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const O={color:{type:String,default:"red"},size:{type:String,default:"sm"},text:{type:String,default:""},variant:{type:String,default:"indicators"},bargeVariant:{type:String,default:"stand"}},C={class:"px-1 font-semibold",style:{color:"white"}},b=e.defineComponent({__name:"OneIndicators",props:{...O},setup(u){const t=u,l=e.computed(()=>{switch(t.color){case"green":return"#22c55e";case"blue":return"#3b82f6";case"red":return"#ef4444";case"yellow":return"#eab308";default:return"#E3ECF2"}}),d=e.computed(()=>{let s="",r="",a;return t.text?t.size==="sm"?(r="min-w-[12px]",a="textSm"):t.size==="md"?(r="min-w-[16px]",a="textMd"):t.size==="lg"&&(r="min-w-[20px]",a="textLg"):t.size==="sm"?s="w-3 min-w-[12px]":t.size==="lg"?s="w-5 min-w-[20px]":t.size==="md"&&(s="w-4 min-w-[16px]"),`${s} ${a} ${r} h-${t.size==="sm"?3:t.size==="lg"?5:4}`}),o=e.computed(()=>{let s="",r="",a;return t.text?t.size==="sm"?(r="min-w-[44px]",a="textMd"):t.size==="md"?(r="min-w-[58px]",a="text10"):t.size==="lg"&&(r="min-w-[68px]",a="text-sm"):t.size==="sm"?s="min-w-[44px]":t.size==="lg"?s="min-w-[68px]":t.size==="md"&&(s="min-w-[58px]"),`${s} ${a} ${r} h-${t.size==="sm"?5:t.size==="lg"?7:6}`}),i=e.computed(()=>{const s=t.bargeVariant==="stand"?"1A":"",r=t.bargeVariant==="stand"?"1px solid":"none";return{backgroundColor:`${l.value}${s}`,border:r,borderColor:l.value}});return(s,r)=>t.variant==="indicators"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rounded-full border border-white flex items-center justify-center w-max",[d.value]]),style:e.normalizeStyle({backgroundColor:l.value})},[e.createElementVNode("p",C,e.toDisplayString(s.text),1)],6)):t.variant==="barge"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded px-2 py-1 text-center w-max",[o.value,{"rounded-full":s.bargeVariant==="round",rounded:s.bargeVariant!=="round"}]]),style:e.normalizeStyle([i.value])},[e.createElementVNode("p",{class:"font-medium",style:e.normalizeStyle({color:s.bargeVariant!=="stand"?"white":l.value})},e.toDisplayString(s.text),5)],6)):e.createCommentVNode("",!0)}});const k=y._export_sfc(b,[["__scopeId","data-v-3d58c944"]]),z=e.defineComponent({__name:"OneLabel",props:{size:{type:String,default:"standard"},color:{type:String,default:"blue"},filled:{type:Boolean,default:!0},text:{type:String,default:"Label"}},setup(u){const t=u,l=e.ref(!1),d=e.computed(()=>{const s="inline-flex items-center cursor-pointer transition-opacity rounded-full",r=t.size==="mini"?"text-xs px-3 py-1":"text-sm px-4 py-2",a=t.filled?`${t.color}-filled`:`${t.color}-border`;return`${s} ${r} ${a} ${l.value?"opacity-80":"hover:opacity-90"}`}),o=()=>{l.value=!0},i=()=>{l.value=!1};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),onMousedown:o,onMouseup:i,onMouseleave:i},[e.createElementVNode("span",null,e.toDisplayString(u.text),1)],34))}});const B=e.defineComponent({__name:"OneCollapse",props:{blockClass:{},titleClass:{},defaultOpen:{type:Boolean}},setup(u){const t=u,{blockClass:l,titleClass:d,defaultOpen:o}=e.toRefs(t),i=e.ref(null),s=e.ref((o==null?void 0:o.value)??!1),r=()=>{s.value=!s.value},a=c=>{const n=c;n.style.height="0"},_=c=>{const n=c;n.style.height=`${c.scrollHeight}px`,n.style.transition="height 0.3s ease"},v=c=>{const n=c;n.style.height=`${c.scrollHeight}px`,e.nextTick(()=>{n.style.height="0",n.style.transition="height 0.3s ease"})};return(c,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l))},[e.createElementVNode("div",{onClick:r,class:e.normalizeClass(e.unref(d))},[e.renderSlot(c.$slots,"title",{isOpen:s.value},void 0,!0)],2),e.createVNode(e.Transition,{name:"accordion",onBeforeEnter:a,onEnter:_,onLeave:v},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:i},[e.renderSlot(c.$slots,"default",{},void 0,!0)],512),[[e.vShow,s.value]])]),_:3})],2))}});const S=y._export_sfc(B,[["__scopeId","data-v-1c2c0817"]]);const E={},V={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}};function $(u,t){return e.openBlock(),e.createElementBlock("svg",V,t[0]||(t[0]=[e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1)]))}const F=y._export_sfc(E,[["render",$]]),D={color:{type:String,default:"green"},size:{type:String,default:"md"},modelValue:{type:Boolean,default:!1},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},iconOn:{type:[Function,Object]},iconOff:{type:[Function,Object]},iconClass:{type:[String,Array]}},I=["disabled","checked"],M=e.defineComponent({__name:"OneSwitch",props:D,emits:["update:modelValue"],setup(u,{emit:t}){const l=u,d=t,o=e.ref(l.modelValue),i=e.computed(()=>l.disabled),s=()=>{o.value=!o.value,d("update:modelValue",o.value)};e.watch(()=>l.modelValue,n=>{o.value=n});const r=e.computed(()=>l.size==="sm"?"w-max min-w-[40px] h-[20px]":l.size==="lg"?"w-max min-w-[60px] h-[31px]":l.size==="md"?"w-max min-w-[50px] h-[24px]":"w-max"),a=e.computed(()=>{if(o.value)switch(l.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#E2E7EF"}),_=e.computed(()=>l.iconOn),v=e.computed(()=>l.iconOff),c=e.computed(()=>{const n=[];return typeof l.iconClass=="string"?n.push(l.iconClass):l.iconClass instanceof Array&&n.push(...l.iconClass),n});return(n,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{type:"checkbox",disabled:n.disabled,checked:o.value,class:"hidden w-96",onClick:s},null,8,I),e.createElementVNode("div",{onClick:s,class:e.normalizeClass(["relative rounded-full cursor-pointer flex items-center",[r.value,n.isLoading?"loading":"",i.value?"disabled opacity-50 pointer-events-none":""]]),style:e.normalizeStyle({backgroundColor:i.value?"#ccc":a.value})},[e.createElementVNode("div",{class:e.normalizeClass(["bg-white absolute rounded-full",[n.size==="sm"?"w-[16px] h-[16px]":"",n.size==="md"?"w-[20px] h-[20px]":"",n.size==="lg"?"w-[27px] h-[27px]":"",o.value?"right-[2px] top-[2px]":"left-[2px] top-[2px]"]])},[e.createElementVNode("div",{class:e.normalizeClass(["circle",r.value])},[n.isLoading?(e.openBlock(),e.createBlock(F,{key:0,class:"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):o.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.value),{key:1,class:e.normalizeClass([c.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"]),style:e.normalizeStyle({color:o.value?a.value:""})},null,8,["class","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:2,class:e.normalizeClass([c.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"])},null,8,["class"]))],2)],2),o.value&&n.textOn?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["switch-text text-white",[n.size==="sm"?"text-xs pr-6 pl-2":"",n.size==="md"?"text-sm pr-6 pl-2":"",n.size==="lg"?"text-base pr-8 pl-2":""]])},e.toDisplayString(n.textOn),3)):!o.value&&n.textOff?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["switch-text w-max",[n.size==="sm"?"text-xs pl-6 pr-2":"",n.size==="md"?"text-sm pl-7 pr-2":"",n.size==="lg"?"text-base pl-8 pr-2":""]])},e.toDisplayString(n.textOff),3)):e.createCommentVNode("",!0)],6)],64))}});const N=y._export_sfc(M,[["__scopeId","data-v-d0ecef0b"]]),q={buttons:{type:Array,default:[]},modelValue:{required:!1,type:[String,Number,Array,Boolean,Object,null]}},L={class:"flex text-xs space-x-0.5 bg-gray-100 p-0.5 rounded-md"},A=["onClick"],H=e.defineComponent({__name:"OneButtonGroup",props:q,emits:["update:modelValue"],setup(u,{emit:t}){const l=t;return(d,o)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.buttons,i=>(e.openBlock(),e.createElementBlock("button",{key:i.key,class:e.normalizeClass([{"bg-white":i.key==d.modelValue,"text-blue-600":i.key==d.modelValue},"h-[32px] w-full transition-all px-3 rounded-md hover:text-blue-600"]),onClick:s=>l("update:modelValue",i.key)},e.toDisplayString(i.label),11,A))),128))]))}});exports.OneButton=g._sfc_main;exports.OneCard=f.OneCard;exports.OneCardBody=f.OneCardBody;exports.OneCardFooter=f.OneCardFooter;exports.OneCardHeader=f.OneCardHeader;exports.OneForm=p.OneForm;exports.OneFormFeedback=p.OneFormFeedback;exports.OneFormField=p.OneFormField;exports.OneFormInput=p.OneFormInput;exports.OneFormLabel=p.OneFormLabel;exports.OneBrowserMenu=m.OneBrowserMenu;exports.OneDropdown=m._sfc_main$1;exports.OneDropdownItem=m._sfc_main$2;exports.OneHelpMenu=m.OneHelpMenu;exports.OneUserMenu=m._sfc_main;exports.OneBrowserMenuGrid=x.OneBrowserMenuGrid;exports.OneDropdownAuto=x.OneDropdownAuto;exports.OneDropdownDivider=x.OneDropdownDivider;exports.OneAvatar=h._sfc_main;exports.OneMarkdown=w.OneMarkdown;exports.OneButtonGroup=H;exports.OneCollapse=S;exports.OneIndicators=k;exports.OneLabel=z;exports.OneSwitch=N;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { _ as ce } from "./index-f8afb6b6.js";
|
|
2
|
-
import { OneCard as
|
|
2
|
+
import { OneCard as ue, OneCardBody as pe, OneCardFooter as me, OneCardHeader as fe } from "./card/index.js";
|
|
3
3
|
import { OneForm as ye, OneFormFeedback as ve, OneFormField as he, OneFormInput as ge, OneFormLabel as _e } from "./form/index.js";
|
|
4
|
-
import { d as be, e as Oe, f as Ce, O as
|
|
4
|
+
import { d as be, e as Oe, f as Ce, O as ke, _ as ze } from "./OneHelpMenu-37653a53.js";
|
|
5
5
|
import { OneBrowserMenuGrid as Se, OneDropdownAuto as Ve, OneDropdownDivider as Be } from "./dropdown/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { _ as Ee } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
7
|
+
import { OneMarkdown as Le } from "./common/index.js";
|
|
8
|
+
import { defineComponent as h, computed as p, openBlock as i, createElementBlock as m, normalizeClass as d, normalizeStyle as v, createElementVNode as x, toDisplayString as y, createCommentVNode as $, ref as g, toRefs as V, unref as C, renderSlot as k, createVNode as B, Transition as I, withCtx as E, withDirectives as F, vShow as L, nextTick as M, watch as D, Fragment as S, createBlock as O, resolveDynamicComponent as z, renderList as A } from "vue";
|
|
8
9
|
import { _ } from "./_plugin-vue_export-helper-dad06003.js";
|
|
9
10
|
import "./XMarkIcon-51ef0691.js";
|
|
10
11
|
const j = {
|
|
@@ -50,7 +51,7 @@ const j = {
|
|
|
50
51
|
default:
|
|
51
52
|
return "#E3ECF2";
|
|
52
53
|
}
|
|
53
|
-
}),
|
|
54
|
+
}), u = p(() => {
|
|
54
55
|
let s = "", o = "", a;
|
|
55
56
|
return e.text ? e.size === "sm" ? (o = "min-w-[12px]", a = "textSm") : e.size === "md" ? (o = "min-w-[16px]", a = "textMd") : e.size === "lg" && (o = "min-w-[20px]", a = "textLg") : e.size === "sm" ? s = "w-3 min-w-[12px]" : e.size === "lg" ? s = "w-5 min-w-[20px]" : e.size === "md" && (s = "w-4 min-w-[16px]"), `${s} ${a} ${o} h-${e.size === "sm" ? 3 : e.size === "lg" ? 5 : 4}`;
|
|
56
57
|
}), l = p(() => {
|
|
@@ -66,13 +67,13 @@ const j = {
|
|
|
66
67
|
});
|
|
67
68
|
return (s, o) => e.variant === "indicators" ? (i(), m("div", {
|
|
68
69
|
key: 0,
|
|
69
|
-
class:
|
|
70
|
+
class: d(["rounded-full border border-white flex items-center justify-center w-max", [u.value]]),
|
|
70
71
|
style: v({ backgroundColor: n.value })
|
|
71
72
|
}, [
|
|
72
73
|
x("p", G, y(s.text), 1)
|
|
73
74
|
], 6)) : e.variant === "barge" ? (i(), m("div", {
|
|
74
75
|
key: 1,
|
|
75
|
-
class:
|
|
76
|
+
class: d(["rounded px-2 py-1 text-center w-max", [l.value, { "rounded-full": s.bargeVariant === "round", rounded: s.bargeVariant !== "round" }]]),
|
|
76
77
|
style: v([r.value])
|
|
77
78
|
}, [
|
|
78
79
|
x("p", {
|
|
@@ -107,7 +108,7 @@ const se = /* @__PURE__ */ _(H, [["__scopeId", "data-v-3d58c944"]]), ne = /* @__
|
|
|
107
108
|
}
|
|
108
109
|
},
|
|
109
110
|
setup(f) {
|
|
110
|
-
const e = f, n = g(!1),
|
|
111
|
+
const e = f, n = g(!1), u = p(() => {
|
|
111
112
|
const s = "inline-flex items-center cursor-pointer transition-opacity rounded-full", o = e.size === "mini" ? "text-xs px-3 py-1" : "text-sm px-4 py-2", a = e.filled ? `${e.color}-filled` : `${e.color}-border`;
|
|
112
113
|
return `${s} ${o} ${a} ${n.value ? "opacity-80" : "hover:opacity-90"}`;
|
|
113
114
|
}), l = () => {
|
|
@@ -116,7 +117,7 @@ const se = /* @__PURE__ */ _(H, [["__scopeId", "data-v-3d58c944"]]), ne = /* @__
|
|
|
116
117
|
n.value = !1;
|
|
117
118
|
};
|
|
118
119
|
return (s, o) => (i(), m("div", {
|
|
119
|
-
class: u
|
|
120
|
+
class: d(u.value),
|
|
120
121
|
onMousedown: l,
|
|
121
122
|
onMouseup: r,
|
|
122
123
|
onMouseleave: r
|
|
@@ -133,7 +134,7 @@ const N = /* @__PURE__ */ h({
|
|
|
133
134
|
defaultOpen: { type: Boolean }
|
|
134
135
|
},
|
|
135
136
|
setup(f) {
|
|
136
|
-
const e = f, { blockClass: n, titleClass:
|
|
137
|
+
const e = f, { blockClass: n, titleClass: u, defaultOpen: l } = V(e), r = g(null), s = g((l == null ? void 0 : l.value) ?? !1), o = () => {
|
|
137
138
|
s.value = !s.value;
|
|
138
139
|
}, a = (c) => {
|
|
139
140
|
const t = c;
|
|
@@ -148,13 +149,13 @@ const N = /* @__PURE__ */ h({
|
|
|
148
149
|
});
|
|
149
150
|
};
|
|
150
151
|
return (c, t) => (i(), m("div", {
|
|
151
|
-
class:
|
|
152
|
+
class: d(C(n))
|
|
152
153
|
}, [
|
|
153
154
|
x("div", {
|
|
154
155
|
onClick: o,
|
|
155
|
-
class:
|
|
156
|
+
class: d(C(u))
|
|
156
157
|
}, [
|
|
157
|
-
|
|
158
|
+
k(c.$slots, "title", { isOpen: s.value }, void 0, !0)
|
|
158
159
|
], 2),
|
|
159
160
|
B(I, {
|
|
160
161
|
name: "accordion",
|
|
@@ -167,7 +168,7 @@ const N = /* @__PURE__ */ h({
|
|
|
167
168
|
ref_key: "content",
|
|
168
169
|
ref: r
|
|
169
170
|
}, [
|
|
170
|
-
|
|
171
|
+
k(c.$slots, "default", {}, void 0, !0)
|
|
171
172
|
], 512), [
|
|
172
173
|
[L, s.value]
|
|
173
174
|
])
|
|
@@ -243,8 +244,8 @@ const T = /* @__PURE__ */ _(P, [["render", R]]), W = {
|
|
|
243
244
|
props: W,
|
|
244
245
|
emits: ["update:modelValue"],
|
|
245
246
|
setup(f, { emit: e }) {
|
|
246
|
-
const n = f,
|
|
247
|
-
l.value = !l.value,
|
|
247
|
+
const n = f, u = e, l = g(n.modelValue), r = p(() => n.disabled), s = () => {
|
|
248
|
+
l.value = !l.value, u("update:modelValue", l.value);
|
|
248
249
|
};
|
|
249
250
|
D(() => n.modelValue, (t) => {
|
|
250
251
|
l.value = t;
|
|
@@ -279,7 +280,7 @@ const T = /* @__PURE__ */ _(P, [["render", R]]), W = {
|
|
|
279
280
|
}, null, 8, U),
|
|
280
281
|
x("div", {
|
|
281
282
|
onClick: s,
|
|
282
|
-
class:
|
|
283
|
+
class: d(["relative rounded-full cursor-pointer flex items-center", [
|
|
283
284
|
o.value,
|
|
284
285
|
t.isLoading ? "loading" : "",
|
|
285
286
|
r.value ? "disabled opacity-50 pointer-events-none" : ""
|
|
@@ -287,7 +288,7 @@ const T = /* @__PURE__ */ _(P, [["render", R]]), W = {
|
|
|
287
288
|
style: v({ backgroundColor: r.value ? "#ccc" : a.value })
|
|
288
289
|
}, [
|
|
289
290
|
x("div", {
|
|
290
|
-
class:
|
|
291
|
+
class: d(["bg-white absolute rounded-full", [
|
|
291
292
|
t.size === "sm" ? "w-[16px] h-[16px]" : "",
|
|
292
293
|
t.size === "md" ? "w-[20px] h-[20px]" : "",
|
|
293
294
|
t.size === "lg" ? "w-[27px] h-[27px]" : "",
|
|
@@ -295,31 +296,31 @@ const T = /* @__PURE__ */ _(P, [["render", R]]), W = {
|
|
|
295
296
|
]])
|
|
296
297
|
}, [
|
|
297
298
|
x("div", {
|
|
298
|
-
class:
|
|
299
|
+
class: d(["circle", o.value])
|
|
299
300
|
}, [
|
|
300
301
|
t.isLoading ? (i(), O(T, {
|
|
301
302
|
key: 0,
|
|
302
303
|
class: "absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"
|
|
303
|
-
})) : l.value ? (i(), O(
|
|
304
|
+
})) : l.value ? (i(), O(z(w.value), {
|
|
304
305
|
key: 1,
|
|
305
|
-
class:
|
|
306
|
+
class: d([c.value, "absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"]),
|
|
306
307
|
style: v({ color: l.value ? a.value : "" })
|
|
307
|
-
}, null, 8, ["class", "style"])) : (i(), O(
|
|
308
|
+
}, null, 8, ["class", "style"])) : (i(), O(z(b.value), {
|
|
308
309
|
key: 2,
|
|
309
|
-
class:
|
|
310
|
+
class: d([c.value, "absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"])
|
|
310
311
|
}, null, 8, ["class"]))
|
|
311
312
|
], 2)
|
|
312
313
|
], 2),
|
|
313
314
|
l.value && t.textOn ? (i(), m("div", {
|
|
314
315
|
key: 0,
|
|
315
|
-
class:
|
|
316
|
+
class: d(["switch-text text-white", [
|
|
316
317
|
t.size === "sm" ? "text-xs pr-6 pl-2" : "",
|
|
317
318
|
t.size === "md" ? "text-sm pr-6 pl-2" : "",
|
|
318
319
|
t.size === "lg" ? "text-base pr-8 pl-2" : ""
|
|
319
320
|
]])
|
|
320
321
|
}, y(t.textOn), 3)) : !l.value && t.textOff ? (i(), m("div", {
|
|
321
322
|
key: 1,
|
|
322
|
-
class:
|
|
323
|
+
class: d(["switch-text w-max", [
|
|
323
324
|
t.size === "sm" ? "text-xs pl-6 pr-2" : "",
|
|
324
325
|
t.size === "md" ? "text-sm pl-7 pr-2" : "",
|
|
325
326
|
t.size === "lg" ? "text-base pl-8 pr-2" : ""
|
|
@@ -344,12 +345,12 @@ const oe = /* @__PURE__ */ _(J, [["__scopeId", "data-v-d0ecef0b"]]), K = {
|
|
|
344
345
|
emits: ["update:modelValue"],
|
|
345
346
|
setup(f, { emit: e }) {
|
|
346
347
|
const n = e;
|
|
347
|
-
return (
|
|
348
|
-
(i(!0), m(S, null, A(
|
|
348
|
+
return (u, l) => (i(), m("div", Q, [
|
|
349
|
+
(i(!0), m(S, null, A(u.buttons, (r) => (i(), m("button", {
|
|
349
350
|
key: r.key,
|
|
350
|
-
class:
|
|
351
|
-
"bg-white": r.key ==
|
|
352
|
-
"text-blue-600": r.key ==
|
|
351
|
+
class: d([{
|
|
352
|
+
"bg-white": r.key == u.modelValue,
|
|
353
|
+
"text-blue-600": r.key == u.modelValue
|
|
353
354
|
}, "h-[32px] w-full transition-all px-3 rounded-md hover:text-blue-600"]),
|
|
354
355
|
onClick: (s) => n("update:modelValue", r.key)
|
|
355
356
|
}, y(r.label), 11, X))), 128))
|
|
@@ -362,7 +363,7 @@ export {
|
|
|
362
363
|
Se as OneBrowserMenuGrid,
|
|
363
364
|
ce as OneButton,
|
|
364
365
|
ae as OneButtonGroup,
|
|
365
|
-
|
|
366
|
+
ue as OneCard,
|
|
366
367
|
pe as OneCardBody,
|
|
367
368
|
me as OneCardFooter,
|
|
368
369
|
fe as OneCardHeader,
|
|
@@ -376,9 +377,10 @@ export {
|
|
|
376
377
|
he as OneFormField,
|
|
377
378
|
ge as OneFormInput,
|
|
378
379
|
_e as OneFormLabel,
|
|
379
|
-
|
|
380
|
+
ke as OneHelpMenu,
|
|
380
381
|
se as OneIndicators,
|
|
381
382
|
ne as OneLabel,
|
|
383
|
+
Le as OneMarkdown,
|
|
382
384
|
oe as OneSwitch,
|
|
383
|
-
|
|
385
|
+
ze as OneUserMenu
|
|
384
386
|
};
|