@oneb/ui-vue 0.2.26 → 0.2.28
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/{OneHelpMenu-2a7be7ea.cjs → OneHelpMenu-95ae3d5a.cjs} +1 -1
- package/dist/{OneHelpMenu-f9738224.js → OneHelpMenu-9a2f42f5.js} +6 -7
- package/dist/SpinnerIcon-01be39fe.cjs +1 -0
- package/dist/{SpinnerIcon-24e552a8.js → SpinnerIcon-516264ba.js} +2 -2
- package/dist/button/button.d.ts +2 -2
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.js +70 -58
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.js +1 -1
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +2 -2
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +3 -3
- package/dist/{index-a343cb86.cjs → index-09b67bb7.cjs} +1 -1
- package/dist/{index-1ff9bbce.js → index-4f1aeab2.js} +23 -23
- package/dist/index-5fa52675.cjs +1 -0
- package/dist/{index-74c989d4.js → index-8b4488cc.js} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +2253 -2207
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +364 -355
- package/dist/style.css +1 -1
- package/dist/tailwind.config.cjs +1 -1
- package/dist/tailwind.config.d.ts +2 -51
- package/dist/tailwind.config.js +13 -39
- package/dist/toast/index.d.ts +4 -1
- package/dist/toast/toast.d.ts +29 -0
- package/dist/toast/useOneToasts.d.ts +15 -0
- package/dist/toast/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/SpinnerIcon-89c60210.cjs +0 -1
- package/dist/index-70806d69.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),K=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),Ee=require("./XMarkIcon-f94baa4c.cjs"),X=require("./ChevronRightIcon-6aa413c4.cjs"),Ye=require("./button/index.cjs"),Be=require("./_plugin-vue_export-helper-f246444f.cjs"),Ce={title:{type:String},stick:{type:String,default:"right"},appendBody:{type:Boolean,default:!1}},Ge={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},Je={modelValue:{type:[Object,Array],default:null},multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},title:{type:String},placeholder:{type:String,default:"Select"},searchPlaceholder:{type:String,default:"Search"},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"id"},stick:{type:String,default:"bottom-start"},allowEmpty:{type:Boolean,default:!1},emptyLabel:{type:String},createLabel:{type:String},searchable:{type:Boolean,default:!0},isLoading:{type:Boolean,default:!1},groupKey:{type:String},maxWidth:{type:String},view:{type:String,default:"default"}},Q=Math.min,T=Math.max,Z=Math.round,J=Math.floor,V=t=>({x:t,y:t}),Qe={left:"right",right:"left",bottom:"top",top:"bottom"},Ze={start:"end",end:"start"};function ve(t,n,o){return T(t,Q(n,o))}function ne(t,n){return typeof t=="function"?t(n):t}function M(t){return t.split("-")[0]}function oe(t){return t.split("-")[1]}function Ve(t){return t==="x"?"y":"x"}function Ne(t){return t==="y"?"height":"width"}function H(t){return["top","bottom"].includes(M(t))?"y":"x"}function Ae(t){return Ve(H(t))}function et(t,n,o){o===void 0&&(o=!1);const r=oe(t),l=Ae(t),s=Ne(l);let i=l==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(i=ee(i)),[i,ee(i)]}function tt(t){const n=ee(t);return[ce(t),n,ce(n)]}function ce(t){return t.replace(/start|end/g,n=>Ze[n])}function nt(t,n,o){const r=["left","right"],l=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return o?n?l:r:n?r:l;case"left":case"right":return n?s:i;default:return[]}}function ot(t,n,o,r){const l=oe(t);let s=nt(M(t),o==="start",r);return l&&(s=s.map(i=>i+"-"+l),n&&(s=s.concat(s.map(ce)))),s}function ee(t){return t.replace(/left|right|bottom|top/g,n=>Qe[n])}function rt(t){return{top:0,right:0,bottom:0,left:0,...t}}function lt(t){return typeof t!="number"?rt(t):{top:t,right:t,bottom:t,left:t}}function te(t){const{x:n,y:o,width:r,height:l}=t;return{width:r,height:l,top:o,left:n,right:n+r,bottom:o+l,x:n,y:o}}function we(t,n,o){let{reference:r,floating:l}=t;const s=H(n),i=Ae(n),c=Ne(i),u=M(n),a=s==="y",m=r.x+r.width/2-l.width/2,p=r.y+r.height/2-l.height/2,g=r[c]/2-l[c]/2;let d;switch(u){case"top":d={x:m,y:r.y-l.height};break;case"bottom":d={x:m,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:p};break;case"left":d={x:r.x-l.width,y:p};break;default:d={x:r.x,y:r.y}}switch(oe(n)){case"start":d[i]-=g*(o&&a?-1:1);break;case"end":d[i]+=g*(o&&a?-1:1);break}return d}const st=async(t,n,o)=>{const{placement:r="bottom",strategy:l="absolute",middleware:s=[],platform:i}=o,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(n));let a=await i.getElementRects({reference:t,floating:n,strategy:l}),{x:m,y:p}=we(a,r,u),g=r,d={},f=0;for(let y=0;y<c.length;y++){const{name:x,fn:h}=c[y],{x:w,y:k,data:_,reset:b}=await h({x:m,y:p,initialPlacement:r,placement:g,strategy:l,middlewareData:d,rects:a,platform:i,elements:{reference:t,floating:n}});m=w??m,p=k??p,d={...d,[x]:{...d[x],..._}},b&&f<=50&&(f++,typeof b=="object"&&(b.placement&&(g=b.placement),b.rects&&(a=b.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:l}):b.rects),{x:m,y:p}=we(a,g,u)),y=-1)}return{x:m,y:p,placement:g,strategy:l,middlewareData:d}};async function Se(t,n){var o;n===void 0&&(n={});const{x:r,y:l,platform:s,rects:i,elements:c,strategy:u}=t,{boundary:a="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:d=0}=ne(n,t),f=lt(d),x=c[g?p==="floating"?"reference":"floating":p],h=te(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(x)))==null||o?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:m,strategy:u})),w=p==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),_=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},b=te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:k,strategy:u}):w);return{top:(h.top-b.top+f.top)/_.y,bottom:(b.bottom-h.bottom+f.bottom)/_.y,left:(h.left-b.left+f.left)/_.x,right:(b.right-h.right+f.right)/_.x}}const it=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var o,r;const{placement:l,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:a}=n,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:y=!0,...x}=ne(t,n);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const h=M(l),w=H(c),k=M(c)===c,_=await(u.isRTL==null?void 0:u.isRTL(a.floating)),b=g||(k||!y?[ee(c)]:tt(c)),L=f!=="none";!g&&L&&b.push(...ot(c,y,f,_));const S=[c,...b],v=await Se(n,x),O=[];let q=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&O.push(v[h]),p){const D=et(l,i,_);O.push(v[D[0]],v[D[1]])}if(q=[...q,{placement:l,overflows:O}],!O.every(D=>D<=0)){var he,ge;const D=(((he=s.flip)==null?void 0:he.index)||0)+1,xe=S[D];if(xe)return{data:{index:D,overflows:q},reset:{placement:xe}};let U=(ge=q.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:ge.placement;if(!U)switch(d){case"bestFit":{var ye;const z=(ye=q.filter(R=>{if(L){const $=H(R.placement);return $===w||$==="y"}return!0}).map(R=>[R.placement,R.overflows.filter($=>$>0).reduce(($,Xe)=>$+Xe,0)]).sort((R,$)=>R[1]-$[1])[0])==null?void 0:ye[0];z&&(U=z);break}case"initialPlacement":U=c;break}if(l!==U)return{reset:{placement:U}}}return{}}}};async function ct(t,n){const{placement:o,platform:r,elements:l}=t,s=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=M(o),c=oe(o),u=H(o)==="y",a=["left","top"].includes(i)?-1:1,m=s&&u?-1:1,p=ne(n,t);let{mainAxis:g,crossAxis:d,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof f=="number"&&(d=c==="end"?f*-1:f),u?{x:d*m,y:g*a}:{x:g*a,y:d*m}}const at=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var o,r;const{x:l,y:s,placement:i,middlewareData:c}=n,u=await ct(n,t);return i===((o=c.offset)==null?void 0:o.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:l+u.x,y:s+u.y,data:{...u,placement:i}}}}},ut=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:o,y:r,placement:l}=n,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:h,y:w}=x;return{x:h,y:w}}},...u}=ne(t,n),a={x:o,y:r},m=await Se(n,u),p=H(M(l)),g=Ve(p);let d=a[g],f=a[p];if(s){const x=g==="y"?"top":"left",h=g==="y"?"bottom":"right",w=d+m[x],k=d-m[h];d=ve(w,d,k)}if(i){const x=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=f+m[x],k=f-m[h];f=ve(w,f,k)}const y=c.fn({...n,[g]:d,[p]:f});return{...y,data:{x:y.x-o,y:y.y-r,enabled:{[g]:s,[p]:i}}}}}};function re(){return typeof window<"u"}function I(t){return Le(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function A(t){var n;return(n=(Le(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Le(t){return re()?t instanceof Node||t instanceof E(t).Node:!1}function B(t){return re()?t instanceof Element||t instanceof E(t).Element:!1}function N(t){return re()?t instanceof HTMLElement||t instanceof E(t).HTMLElement:!1}function ke(t){return!re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function G(t){const{overflow:n,overflowX:o,overflowY:r,display:l}=C(t);return/auto|scroll|overlay|hidden|clip/.test(n+r+o)&&!["inline","contents"].includes(l)}function dt(t){return["table","td","th"].includes(I(t))}function le(t){return[":popover-open",":modal"].some(n=>{try{return t.matches(n)}catch{return!1}})}function de(t){const n=fe(),o=B(t)?C(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function ft(t){let n=F(t);for(;N(n)&&!W(n);){if(de(n))return n;if(le(n))return null;n=F(n)}return null}function fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function W(t){return["html","body","#document"].includes(I(t))}function C(t){return E(t).getComputedStyle(t)}function se(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function F(t){if(I(t)==="html")return t;const n=t.assignedSlot||t.parentNode||ke(t)&&t.host||A(t);return ke(n)?n.host:n}function Oe(t){const n=F(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:N(n)&&G(n)?n:Oe(n)}function Y(t,n,o){var r;n===void 0&&(n=[]),o===void 0&&(o=!0);const l=Oe(t),s=l===((r=t.ownerDocument)==null?void 0:r.body),i=E(l);if(s){const c=ae(i);return n.concat(i,i.visualViewport||[],G(l)?l:[],c&&o?Y(c):[])}return n.concat(l,Y(l,[],o))}function ae(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Re(t){const n=C(t);let o=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const l=N(t),s=l?t.offsetWidth:o,i=l?t.offsetHeight:r,c=Z(o)!==s||Z(r)!==i;return c&&(o=s,r=i),{width:o,height:r,$:c}}function pe(t){return B(t)?t:t.contextElement}function j(t){const n=pe(t);if(!N(n))return V(1);const o=n.getBoundingClientRect(),{width:r,height:l,$:s}=Re(n);let i=(s?Z(o.width):o.width)/r,c=(s?Z(o.height):o.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const pt=V(0);function $e(t){const n=E(t);return!fe()||!n.visualViewport?pt:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function mt(t,n,o){return n===void 0&&(n=!1),!o||n&&o!==E(t)?!1:n}function P(t,n,o,r){n===void 0&&(n=!1),o===void 0&&(o=!1);const l=t.getBoundingClientRect(),s=pe(t);let i=V(1);n&&(r?B(r)&&(i=j(r)):i=j(t));const c=mt(s,o,r)?$e(s):V(0);let u=(l.left+c.x)/i.x,a=(l.top+c.y)/i.y,m=l.width/i.x,p=l.height/i.y;if(s){const g=E(s),d=r&&B(r)?E(r):r;let f=g,y=ae(f);for(;y&&r&&d!==f;){const x=j(y),h=y.getBoundingClientRect(),w=C(y),k=h.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,_=h.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;u*=x.x,a*=x.y,m*=x.x,p*=x.y,u+=k,a+=_,f=E(y),y=ae(f)}}return te({width:m,height:p,x:u,y:a})}function me(t,n){const o=se(t).scrollLeft;return n?n.left+o:P(A(t)).left+o}function Fe(t,n,o){o===void 0&&(o=!1);const r=t.getBoundingClientRect(),l=r.left+n.scrollLeft-(o?0:me(t,r)),s=r.top+n.scrollTop;return{x:l,y:s}}function ht(t){let{elements:n,rect:o,offsetParent:r,strategy:l}=t;const s=l==="fixed",i=A(r),c=n?le(n.floating):!1;if(r===i||c&&s)return o;let u={scrollLeft:0,scrollTop:0},a=V(1);const m=V(0),p=N(r);if((p||!p&&!s)&&((I(r)!=="body"||G(i))&&(u=se(r)),N(r))){const d=P(r);a=j(r),m.x=d.x+r.clientLeft,m.y=d.y+r.clientTop}const g=i&&!p&&!s?Fe(i,u,!0):V(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-u.scrollLeft*a.x+m.x+g.x,y:o.y*a.y-u.scrollTop*a.y+m.y+g.y}}function gt(t){return Array.from(t.getClientRects())}function yt(t){const n=A(t),o=se(t),r=t.ownerDocument.body,l=T(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),s=T(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let i=-o.scrollLeft+me(t);const c=-o.scrollTop;return C(r).direction==="rtl"&&(i+=T(n.clientWidth,r.clientWidth)-l),{width:l,height:s,x:i,y:c}}function xt(t,n){const o=E(t),r=A(t),l=o.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(l){s=l.width,i=l.height;const a=fe();(!a||a&&n==="fixed")&&(c=l.offsetLeft,u=l.offsetTop)}return{width:s,height:i,x:c,y:u}}function vt(t,n){const o=P(t,!0,n==="fixed"),r=o.top+t.clientTop,l=o.left+t.clientLeft,s=N(t)?j(t):V(1),i=t.clientWidth*s.x,c=t.clientHeight*s.y,u=l*s.x,a=r*s.y;return{width:i,height:c,x:u,y:a}}function be(t,n,o){let r;if(n==="viewport")r=xt(t,o);else if(n==="document")r=yt(A(t));else if(B(n))r=vt(n,o);else{const l=$e(t);r={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return te(r)}function De(t,n){const o=F(t);return o===n||!B(o)||W(o)?!1:C(o).position==="fixed"||De(o,n)}function wt(t,n){const o=n.get(t);if(o)return o;let r=Y(t,[],!1).filter(c=>B(c)&&I(c)!=="body"),l=null;const s=C(t).position==="fixed";let i=s?F(t):t;for(;B(i)&&!W(i);){const c=C(i),u=de(i);!u&&c.position==="fixed"&&(l=null),(s?!u&&!l:!u&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||G(i)&&!u&&De(t,i))?r=r.filter(m=>m!==i):l=c,i=F(i)}return n.set(t,r),r}function kt(t){let{element:n,boundary:o,rootBoundary:r,strategy:l}=t;const i=[...o==="clippingAncestors"?le(n)?[]:wt(n,this._c):[].concat(o),r],c=i[0],u=i.reduce((a,m)=>{const p=be(n,m,l);return a.top=T(p.top,a.top),a.right=Q(p.right,a.right),a.bottom=Q(p.bottom,a.bottom),a.left=T(p.left,a.left),a},be(n,c,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function bt(t){const{width:n,height:o}=Re(t);return{width:n,height:o}}function _t(t,n,o){const r=N(n),l=A(n),s=o==="fixed",i=P(t,!0,s,n);let c={scrollLeft:0,scrollTop:0};const u=V(0);if(r||!r&&!s)if((I(n)!=="body"||G(l))&&(c=se(n)),r){const g=P(n,!0,s,n);u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}else l&&(u.x=me(l));const a=l&&!r&&!s?Fe(l,c):V(0),m=i.left+c.scrollLeft-u.x-a.x,p=i.top+c.scrollTop-u.y-a.y;return{x:m,y:p,width:i.width,height:i.height}}function ie(t){return C(t).position==="static"}function _e(t,n){if(!N(t)||C(t).position==="fixed")return null;if(n)return n(t);let o=t.offsetParent;return A(t)===o&&(o=o.ownerDocument.body),o}function Te(t,n){const o=E(t);if(le(t))return o;if(!N(t)){let l=F(t);for(;l&&!W(l);){if(B(l)&&!ie(l))return l;l=F(l)}return o}let r=_e(t,n);for(;r&&dt(r)&&ie(r);)r=_e(r,n);return r&&W(r)&&ie(r)&&!de(r)?o:r||ft(t)||o}const Et=async function(t){const n=this.getOffsetParent||Te,o=this.getDimensions,r=await o(t.floating);return{reference:_t(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bt(t){return C(t).direction==="rtl"}const Ct={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:A,getClippingRect:kt,getOffsetParent:Te,getElementRects:Et,getClientRects:gt,getDimensions:bt,getScale:j,isElement:B,isRTL:Bt};function Me(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function Vt(t,n){let o=null,r;const l=A(t);function s(){var c;clearTimeout(r),(c=o)==null||c.disconnect(),o=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const a=t.getBoundingClientRect(),{left:m,top:p,width:g,height:d}=a;if(c||n(),!g||!d)return;const f=J(p),y=J(l.clientWidth-(m+g)),x=J(l.clientHeight-(p+d)),h=J(m),k={rootMargin:-f+"px "+-y+"px "+-x+"px "+-h+"px",threshold:T(0,Q(1,u))||1};let _=!0;function b(L){const S=L[0].intersectionRatio;if(S!==u){if(!_)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Me(a,t.getBoundingClientRect())&&i(),_=!1}try{o=new IntersectionObserver(b,{...k,root:l.ownerDocument})}catch{o=new IntersectionObserver(b,k)}o.observe(t)}return i(!0),s}function Pe(t,n,o,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,a=pe(t),m=l||s?[...a?Y(a):[],...Y(n)]:[];m.forEach(h=>{l&&h.addEventListener("scroll",o,{passive:!0}),s&&h.addEventListener("resize",o)});const p=a&&c?Vt(a,o):null;let g=-1,d=null;i&&(d=new ResizeObserver(h=>{let[w]=h;w&&w.target===a&&d&&(d.unobserve(n),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=d)==null||k.observe(n)})),o()}),a&&!u&&d.observe(a),d.observe(n));let f,y=u?P(t):null;u&&x();function x(){const h=P(t);y&&!Me(y,h)&&o(),y=h,f=requestAnimationFrame(x)}return o(),()=>{var h;m.forEach(w=>{l&&w.removeEventListener("scroll",o),s&&w.removeEventListener("resize",o)}),p==null||p(),(h=d)==null||h.disconnect(),d=null,u&&cancelAnimationFrame(f)}}const ze=at,je=ut,He=it,We=(t,n,o)=>{const r=new Map,l={platform:Ct,...o},s={...l.platform,_c:r};return st(t,n,{...l,platform:s})},Nt=["data-opened"],At={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},St={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},Ie=e.defineComponent({__name:"OneDropdown",props:Ce,emits:["open","close"],setup(t,{emit:n}){const o=e.ref(!1),r=e.ref(null),l=e.ref(null),s=e.ref(null),i=n,c=t,u=()=>{o.value=!o.value,o.value?i("open"):i("close")};e.provide("OneDropdown",{onToggle:u});let a=null;function m(){!l.value||!s.value||We(l.value,s.value,{placement:c.stick?c.stick:"bottom-start",strategy:"fixed",middleware:[ze(5),He(),je({padding:8})]}).then(({x:f,y})=>{s.value&&Object.assign(s.value.style,{left:`${f}px`,top:`${y}px`})})}e.watch(o,async f=>{c.appendBody&&(f?(await e.nextTick(),l.value&&s.value&&(m(),a=Pe(l.value,s.value,m))):a&&(a(),a=null))}),e.onBeforeUnmount(()=>{a&&a()});const p=e.computed(()=>{var x;if(c.appendBody)return"";const f=(x=r.value)==null?void 0:x.getBoundingClientRect(),y=f?f.x<270:!1;return f&&f.top+270>window.innerHeight?"up"+(y?"-right":"-left"):"down"+(y?"-right":"-left")}),g=e.computed(()=>{const f=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return p.value.startsWith("up")?f.push("bottom-1 mb-10"):p.value.startsWith("down")&&f.push("top-1 mt-10"),c.stick==="right"?f.push("right-0"):c.stick==="left"&&f.push("left-0"),f}),d=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(f,y)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:r,"data-opened":o.value},[e.createElementVNode("div",{ref_key:"buttonRef",ref:l},[e.renderSlot(f.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:u,isExpanded:o.value})))],512),c.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:u})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",d.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[f.title?(e.openBlock(),e.createElementBlock("div",At,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:u})))],2)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:u})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[f.title?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:u})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],8,Nt))}}),ue=e.defineComponent({__name:"OneDropdownItem",props:Ge,emits:["click"],setup(t,{emit:n}){const o=n,r=t,l=e.inject("OneDropdown"),s=()=>{l!==void 0&&l.onToggle(),o("click")},i=e.computed(()=>{const c=[];return r.variant==="secondary"?c.push("text-secondary-content hover:bg-secondary-body-hover"):r.variant==="danger"?c.push("text-danger-content hover:bg-danger-10"):r.variant==="warning"?c.push("text-warning-content hover:bg-warning-10"):r.variant==="info"?c.push("text-info-content hover:bg-info-10"):c.push("hover:bg-secondary-body-hover"),c});return(c,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",i.value]),onClick:e.withModifiers(s,["prevent"])},[c.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(c.label),1)],2))}});function Lt(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const Ot={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},accountLabel:{type:String,default:"Account"},logoutLabel:{type:String,default:"Logout"},versionLabel:{type:String,default:""},onAccount:{type:Function},onLogout:{type:Function}},qe={workspace:{type:Object,required:!0},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},appsTitle:{type:String,default:"Ваші додатки"},changeLabel:{type:String,default:"Керувати робочими просторами"},onChange:{type:Function},onApp:{type:Function}},Rt={help:{type:Object,required:!0}},$t=["onClick"],Ft={class:"flex flex-col items-center pt-5 pb-2 h-full"},Dt={class:"flex flex-col px-10 py-1 mt-2 text-center"},Tt={class:"self-center text-base font-medium tracking-wide text-black"},Mt={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},Pt={class:"text-left w-full mt-5 px-3"},zt={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},jt=e.defineComponent({__name:"OneUserMenu",props:Ot,setup(t){const n=t,o=e.computed(()=>{var s;return(s=n.menu)==null?void 0:s.map(i=>{let c={label:i.label};i.icon!=null&&(c={...c,icon:i.icon});const u=typeof i.click=="function"?i.click:()=>{};return{key:i.label,args:c,click:u}})}),r=()=>{typeof n.onAccount=="function"&&n.onAccount()},l=()=>{typeof n.onLogout=="function"&&n.onLogout()};return(s,i)=>(e.openBlock(),e.createBlock(Ie,{stick:"right"},{button:e.withCtx(({onToggle:c,isExpanded:u})=>{var a,m;return[e.createElementVNode("button",{onClick:c,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[u?"bg-secondary-25":""]])},[e.createVNode(K._sfc_main,{text:((a=s.user)==null?void 0:a.name)||"",size:s.iconSize,src:(m=s.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,$t)]}),menu:e.withCtx(()=>{var c,u,a,m,p;return[e.createElementVNode("div",Ft,[e.createVNode(K._sfc_main,{text:((c=s.user)==null?void 0:c.name)||"",size:80,src:(u=s.user)==null?void 0:u.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",Dt,[e.createElementVNode("div",Tt,e.toDisplayString((a=s.user)==null?void 0:a.name),1),e.createElementVNode("div",Mt,e.toDisplayString((m=s.user)==null?void 0:m.email),1)]),typeof n.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(s.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,g=>(e.openBlock(),e.createBlock(ue,e.mergeProps({key:g.key,ref_for:!0},g.args,{onClick:g.click}),null,16,["onClick"]))),128)),typeof s.onLogout=="function"?(e.openBlock(),e.createBlock(ue,{key:0,icon:e.unref(Lt),label:s.logoutLabel,class:"rounded py-3",onClick:l},null,8,["icon","label"])):e.createCommentVNode("",!0)]),i[0]||(i[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",zt,e.toDisplayString((p=s.app)==null?void 0:p.version),1)])]}),_:1}))}});function Ue(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Ht=["data-opened"],Wt={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},It={class:"flex justify-between items-center pt-3 mb-3"},qt={class:"font-semibold text-xl px-3"},Ut={class:"grid"},Kt={class:"rounded-lg m-3 border"},Xt={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},Yt={class:"flex justify-between relative"},Gt={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},Jt={key:0},Qt={class:"text-xs font-semibold"},Zt={class:"px-3 py-2"},en={class:"text-secondary-content text-left pb-1 text-xs uppercase"},tn={class:"overflow-auto max-h-full"},nn={key:0,class:"space-y-2"},on=["onClick"],rn={class:"flex"},ln={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},sn={class:"pl-2"},cn={class:"text-sm mt-1 font-semibold"},an={class:"text9 mt-1"},un={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},dn=e.defineComponent({__name:"OneBrowserMenu",props:qe,emits:["open","close"],setup(t,{emit:n}){const o=n,r=t,l=e.ref(!1),s=()=>{l.value=!l.value,l.value?o("open"):o("close")},i=e.ref(!1);e.computed(()=>i.value?X.render:X.render$1);const c=()=>{typeof r.onChange=="function"&&r.onChange()},u=a=>{typeof r.onApp=="function"&&r.onApp(a)};return(a,m)=>{var p,g,d,f,y,x;return e.openBlock(),e.createElementBlock("div",{"data-opened":l.value},[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":l.value}])},[e.createVNode(e.unref(Ue),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:s})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("div",It,[e.createElementVNode("div",qt,e.toDisplayString((p=a.workspace)==null?void 0:p.title),1),e.createVNode(e.unref(Ee.render),{class:"w-6 cursor-pointer",onClick:s})]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Xt,[e.createElementVNode("div",Yt,[e.createVNode(K._sfc_main,{text:((g=a.workspace)==null?void 0:g.name)||"",src:(d=a.workspace)==null?void 0:d.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",Gt,e.toDisplayString((f=a.workspace)==null?void 0:f.name),1)]),i.value?(e.openBlock(),e.createElementBlock("div",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.workspaces,h=>(e.openBlock(),e.createElementBlock("div",{key:h.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(K._sfc_main,{text:h.name,src:h.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",Qt,e.toDisplayString(h.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:c,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((y=a.workspace)==null?void 0:y.changeLabel),1)])]),e.createElementVNode("div",Zt,[e.createElementVNode("div",en,e.toDisplayString((x=a.workspace)==null?void 0:x.appsLabel),1),e.createElementVNode("div",tn,[a.apps&&a.apps.length?(e.openBlock(),e.createElementBlock("div",nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.apps,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id,onClick:w=>u(h),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",rn,[e.createElementVNode("div",ln,[e.createVNode(K._sfc_main,{text:h.name,src:h.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",sn,[e.createElementVNode("p",cn,e.toDisplayString(h.name),1),e.createElementVNode("p",an,e.toDisplayString(h==null?void 0:h.short),1)])]),e.createElementVNode("div",null,[e.createVNode(Ye.OneButton,{variant:"touch",icon:e.unref(X.render$2),onClick:w=>u(h)},null,8,["icon","onClick"])])],8,on))),128))])):e.createCommentVNode("",!0),a.apps&&a.apps.length?(e.openBlock(),e.createElementBlock("button",un,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Ht)}}});const fn=Be._export_sfc(dn,[["__scopeId","data-v-2628df74"]]);function pn(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function mn(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function Ke(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}const hn=["data-opened"],gn={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},yn={class:"flex justify-between items-center pt-3 mb-3"},xn={class:"font-semibold text-xl px-3"},vn={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},wn=["onClick"],kn={class:"uppercase text-[8px]"},bn={class:"overflow-y-auto grid rounded-xl"},_n={class:"max-h-full bg-[#FAFAFA]"},En={key:0,class:"space-y-2"},Bn=["onClick"],Cn={class:"flex"},Vn={class:"pl-2"},Nn={class:"text-sm mt-1 font-semibold"},An={class:"text-[10px] mt-1 text-[#979CA9]"},Sn={class:"mt-auto"},Ln={key:0},On=["onClick"],Rn={class:"flex items-center space-x-3"},$n={class:"h-16"},Fn={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},Dn={class:"flex justify-between"},Tn=["onClick"],Mn={key:0,class:"tooltip-text min-w-[70px]"},Pn={class:"flex justify-between mb-4"},zn=["href"],jn={class:"flex flex-nowrap items-center w-max h-[24px]"},Hn={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Wn={class:"py-[8px] pl-0 pr-[8px]"},In=e.defineComponent({__name:"OneHelpMenu",props:Rt,emits:["open","close"],setup(t,{emit:n}){const o=n,r=t,l=e.ref(!1),s=()=>{l.value=!l.value,l.value?o("open"):o("close")},i=e.computed(()=>p.value?X.render:X.render$1),c=e.ref(3),u=e.computed(()=>{var f,y;const d=((y=(f=r.help)==null?void 0:f.helpList)==null?void 0:y.length)||0;return c.value===d});e.computed(()=>{var f;return(((f=r.help)==null?void 0:f.helpList)||[]).slice(0,c.value)});const a=()=>{var f,y;const d=((y=(f=r.help)==null?void 0:f.helpList)==null?void 0:y.length)||0;c.value=u.value?3:d},m=(d,f)=>{d&&f&&typeof f.openLink=="function"?f.openLink(f):d&&window.open(d,"_blank")},p=e.ref(!1),g=()=>{p.value=!p.value};return(d,f)=>{var y,x,h,w,k,_,b,L,S;return e.openBlock(),e.createElementBlock("div",{"data-opened":l.value},[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":l.value}])},[e.createVNode(e.unref(pn),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:s})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",yn,[e.createElementVNode("div",xn,e.toDisplayString((y=d.help)==null?void 0:y.label),1),e.createVNode(e.unref(Ee.render),{class:"w-6 cursor-pointer",onClick:s})]),(x=d.help)!=null&&x.helpButton?(e.openBlock(),e.createElementBlock("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((h=d.help)==null?void 0:h.helpButton,v=>(e.openBlock(),e.createElementBlock("button",{key:v.name,onClick:O=>m(v.link,v),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v==null?void 0:v.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",kn,e.toDisplayString(v.name),1)],8,wn))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",bn,[e.createElementVNode("div",_n,[(w=d.help)!=null&&w.helpList&&d.help.helpList.length?(e.openBlock(),e.createElementBlock("div",En,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.help.helpList,v=>(e.openBlock(),e.createElementBlock("div",{key:v.id,onClick:O=>m(v.link,v),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",Cn,[e.createElementVNode("div",Vn,[e.createElementVNode("p",Nn,e.toDisplayString(v.name),1),e.createElementVNode("p",An,e.toDisplayString(v.category),1)])])],8,Bn))),128))])):e.createCommentVNode("",!0)])]),(k=d.help)!=null&&k.helpList&&d.help.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:a,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(u.value?d.help.buttNoMore:d.help.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Sn,[(_=d.help)!=null&&_.video?(e.openBlock(),e.createElementBlock("div",Ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.help.video,v=>(e.openBlock(),e.createElementBlock("button",{key:v.id,onClick:O=>m(v.link,v),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(mn),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(v.name),1)],8,On))),128))])):e.createCommentVNode("",!0),(b=d.help)!=null&&b.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",Rn,[e.createVNode(e.unref(Ke),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(d.help.socialButt),1)]),e.createVNode(e.unref(i),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[p.value?(e.openBlock(),e.createElementBlock("div",Fn,[e.createElementVNode("div",Dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((L=d.help)==null?void 0:L.socialList,v=>(e.openBlock(),e.createElementBlock("button",{key:v.id,onClick:O=>m(v.link,v),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[v.name?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(v.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v==null?void 0:v.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Tn))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=d.help)==null?void 0:S.termsOffer,v=>(e.openBlock(),e.createElementBlock("a",{key:v.name,target:"_blank",href:v.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",jn,[e.createElementVNode("div",Hn,[e.createElementVNode("span",Wn,e.toDisplayString(v.name),1)])])],8,zn))),128))])])])):e.createCommentVNode("",!0)],8,hn)}}});const qn=Be._export_sfc(In,[["__scopeId","data-v-071eaf70"]]);exports.OneBrowserMenu=fn;exports.OneHelpMenu=qn;exports._sfc_main=Ie;exports._sfc_main$1=ue;exports._sfc_main$2=jt;exports.autoUpdate=Pe;exports.browserMenuProps=qe;exports.computePosition=We;exports.dropdownProps=Ce;exports.dropdownSelectProps=Je;exports.flip=He;exports.offset=ze;exports.render=Ue;exports.render$1=Ke;exports.shift=je;
|
|
1
|
+
"use strict";const e=require("vue"),K=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),Ee=require("./XMarkIcon-f94baa4c.cjs"),X=require("./ChevronRightIcon-6aa413c4.cjs"),Ye=require("./button/index.cjs"),Be=require("./_plugin-vue_export-helper-f246444f.cjs"),Ce={title:{type:String},stick:{type:String,default:"right"},appendBody:{type:Boolean,default:!1}},Ge={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},Je={modelValue:{type:[Object,Array],default:null},multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},title:{type:String},placeholder:{type:String,default:"Select"},searchPlaceholder:{type:String,default:"Search"},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"id"},stick:{type:String,default:"bottom-start"},allowEmpty:{type:Boolean,default:!1},emptyLabel:{type:String},createLabel:{type:String},searchable:{type:Boolean,default:!0},isLoading:{type:Boolean,default:!1},groupKey:{type:String},maxWidth:{type:String},view:{type:String,default:"default"}},Q=Math.min,T=Math.max,Z=Math.round,J=Math.floor,V=t=>({x:t,y:t}),Qe={left:"right",right:"left",bottom:"top",top:"bottom"},Ze={start:"end",end:"start"};function ve(t,n,o){return T(t,Q(n,o))}function ne(t,n){return typeof t=="function"?t(n):t}function M(t){return t.split("-")[0]}function oe(t){return t.split("-")[1]}function Ve(t){return t==="x"?"y":"x"}function Ne(t){return t==="y"?"height":"width"}function H(t){return["top","bottom"].includes(M(t))?"y":"x"}function Ae(t){return Ve(H(t))}function et(t,n,o){o===void 0&&(o=!1);const r=oe(t),l=Ae(t),s=Ne(l);let i=l==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(i=ee(i)),[i,ee(i)]}function tt(t){const n=ee(t);return[ce(t),n,ce(n)]}function ce(t){return t.replace(/start|end/g,n=>Ze[n])}function nt(t,n,o){const r=["left","right"],l=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return o?n?l:r:n?r:l;case"left":case"right":return n?s:i;default:return[]}}function ot(t,n,o,r){const l=oe(t);let s=nt(M(t),o==="start",r);return l&&(s=s.map(i=>i+"-"+l),n&&(s=s.concat(s.map(ce)))),s}function ee(t){return t.replace(/left|right|bottom|top/g,n=>Qe[n])}function rt(t){return{top:0,right:0,bottom:0,left:0,...t}}function lt(t){return typeof t!="number"?rt(t):{top:t,right:t,bottom:t,left:t}}function te(t){const{x:n,y:o,width:r,height:l}=t;return{width:r,height:l,top:o,left:n,right:n+r,bottom:o+l,x:n,y:o}}function we(t,n,o){let{reference:r,floating:l}=t;const s=H(n),i=Ae(n),c=Ne(i),u=M(n),a=s==="y",m=r.x+r.width/2-l.width/2,p=r.y+r.height/2-l.height/2,g=r[c]/2-l[c]/2;let d;switch(u){case"top":d={x:m,y:r.y-l.height};break;case"bottom":d={x:m,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:p};break;case"left":d={x:r.x-l.width,y:p};break;default:d={x:r.x,y:r.y}}switch(oe(n)){case"start":d[i]-=g*(o&&a?-1:1);break;case"end":d[i]+=g*(o&&a?-1:1);break}return d}const st=async(t,n,o)=>{const{placement:r="bottom",strategy:l="absolute",middleware:s=[],platform:i}=o,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(n));let a=await i.getElementRects({reference:t,floating:n,strategy:l}),{x:m,y:p}=we(a,r,u),g=r,d={},f=0;for(let y=0;y<c.length;y++){const{name:x,fn:h}=c[y],{x:w,y:k,data:_,reset:b}=await h({x:m,y:p,initialPlacement:r,placement:g,strategy:l,middlewareData:d,rects:a,platform:i,elements:{reference:t,floating:n}});m=w??m,p=k??p,d={...d,[x]:{...d[x],..._}},b&&f<=50&&(f++,typeof b=="object"&&(b.placement&&(g=b.placement),b.rects&&(a=b.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:l}):b.rects),{x:m,y:p}=we(a,g,u)),y=-1)}return{x:m,y:p,placement:g,strategy:l,middlewareData:d}};async function Se(t,n){var o;n===void 0&&(n={});const{x:r,y:l,platform:s,rects:i,elements:c,strategy:u}=t,{boundary:a="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:d=0}=ne(n,t),f=lt(d),x=c[g?p==="floating"?"reference":"floating":p],h=te(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(x)))==null||o?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:m,strategy:u})),w=p==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),_=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},b=te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:k,strategy:u}):w);return{top:(h.top-b.top+f.top)/_.y,bottom:(b.bottom-h.bottom+f.bottom)/_.y,left:(h.left-b.left+f.left)/_.x,right:(b.right-h.right+f.right)/_.x}}const it=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var o,r;const{placement:l,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:a}=n,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:y=!0,...x}=ne(t,n);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const h=M(l),w=H(c),k=M(c)===c,_=await(u.isRTL==null?void 0:u.isRTL(a.floating)),b=g||(k||!y?[ee(c)]:tt(c)),L=f!=="none";!g&&L&&b.push(...ot(c,y,f,_));const S=[c,...b],v=await Se(n,x),O=[];let q=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&O.push(v[h]),p){const D=et(l,i,_);O.push(v[D[0]],v[D[1]])}if(q=[...q,{placement:l,overflows:O}],!O.every(D=>D<=0)){var he,ge;const D=(((he=s.flip)==null?void 0:he.index)||0)+1,xe=S[D];if(xe)return{data:{index:D,overflows:q},reset:{placement:xe}};let U=(ge=q.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:ge.placement;if(!U)switch(d){case"bestFit":{var ye;const z=(ye=q.filter(R=>{if(L){const $=H(R.placement);return $===w||$==="y"}return!0}).map(R=>[R.placement,R.overflows.filter($=>$>0).reduce(($,Xe)=>$+Xe,0)]).sort((R,$)=>R[1]-$[1])[0])==null?void 0:ye[0];z&&(U=z);break}case"initialPlacement":U=c;break}if(l!==U)return{reset:{placement:U}}}return{}}}};async function ct(t,n){const{placement:o,platform:r,elements:l}=t,s=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=M(o),c=oe(o),u=H(o)==="y",a=["left","top"].includes(i)?-1:1,m=s&&u?-1:1,p=ne(n,t);let{mainAxis:g,crossAxis:d,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof f=="number"&&(d=c==="end"?f*-1:f),u?{x:d*m,y:g*a}:{x:g*a,y:d*m}}const at=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var o,r;const{x:l,y:s,placement:i,middlewareData:c}=n,u=await ct(n,t);return i===((o=c.offset)==null?void 0:o.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:l+u.x,y:s+u.y,data:{...u,placement:i}}}}},ut=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:o,y:r,placement:l}=n,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:h,y:w}=x;return{x:h,y:w}}},...u}=ne(t,n),a={x:o,y:r},m=await Se(n,u),p=H(M(l)),g=Ve(p);let d=a[g],f=a[p];if(s){const x=g==="y"?"top":"left",h=g==="y"?"bottom":"right",w=d+m[x],k=d-m[h];d=ve(w,d,k)}if(i){const x=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=f+m[x],k=f-m[h];f=ve(w,f,k)}const y=c.fn({...n,[g]:d,[p]:f});return{...y,data:{x:y.x-o,y:y.y-r,enabled:{[g]:s,[p]:i}}}}}};function re(){return typeof window<"u"}function I(t){return Le(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function A(t){var n;return(n=(Le(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Le(t){return re()?t instanceof Node||t instanceof E(t).Node:!1}function B(t){return re()?t instanceof Element||t instanceof E(t).Element:!1}function N(t){return re()?t instanceof HTMLElement||t instanceof E(t).HTMLElement:!1}function ke(t){return!re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function G(t){const{overflow:n,overflowX:o,overflowY:r,display:l}=C(t);return/auto|scroll|overlay|hidden|clip/.test(n+r+o)&&!["inline","contents"].includes(l)}function dt(t){return["table","td","th"].includes(I(t))}function le(t){return[":popover-open",":modal"].some(n=>{try{return t.matches(n)}catch{return!1}})}function de(t){const n=fe(),o=B(t)?C(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function ft(t){let n=F(t);for(;N(n)&&!W(n);){if(de(n))return n;if(le(n))return null;n=F(n)}return null}function fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function W(t){return["html","body","#document"].includes(I(t))}function C(t){return E(t).getComputedStyle(t)}function se(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function F(t){if(I(t)==="html")return t;const n=t.assignedSlot||t.parentNode||ke(t)&&t.host||A(t);return ke(n)?n.host:n}function Oe(t){const n=F(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:N(n)&&G(n)?n:Oe(n)}function Y(t,n,o){var r;n===void 0&&(n=[]),o===void 0&&(o=!0);const l=Oe(t),s=l===((r=t.ownerDocument)==null?void 0:r.body),i=E(l);if(s){const c=ae(i);return n.concat(i,i.visualViewport||[],G(l)?l:[],c&&o?Y(c):[])}return n.concat(l,Y(l,[],o))}function ae(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Re(t){const n=C(t);let o=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const l=N(t),s=l?t.offsetWidth:o,i=l?t.offsetHeight:r,c=Z(o)!==s||Z(r)!==i;return c&&(o=s,r=i),{width:o,height:r,$:c}}function pe(t){return B(t)?t:t.contextElement}function j(t){const n=pe(t);if(!N(n))return V(1);const o=n.getBoundingClientRect(),{width:r,height:l,$:s}=Re(n);let i=(s?Z(o.width):o.width)/r,c=(s?Z(o.height):o.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const pt=V(0);function $e(t){const n=E(t);return!fe()||!n.visualViewport?pt:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function mt(t,n,o){return n===void 0&&(n=!1),!o||n&&o!==E(t)?!1:n}function P(t,n,o,r){n===void 0&&(n=!1),o===void 0&&(o=!1);const l=t.getBoundingClientRect(),s=pe(t);let i=V(1);n&&(r?B(r)&&(i=j(r)):i=j(t));const c=mt(s,o,r)?$e(s):V(0);let u=(l.left+c.x)/i.x,a=(l.top+c.y)/i.y,m=l.width/i.x,p=l.height/i.y;if(s){const g=E(s),d=r&&B(r)?E(r):r;let f=g,y=ae(f);for(;y&&r&&d!==f;){const x=j(y),h=y.getBoundingClientRect(),w=C(y),k=h.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,_=h.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;u*=x.x,a*=x.y,m*=x.x,p*=x.y,u+=k,a+=_,f=E(y),y=ae(f)}}return te({width:m,height:p,x:u,y:a})}function me(t,n){const o=se(t).scrollLeft;return n?n.left+o:P(A(t)).left+o}function Fe(t,n,o){o===void 0&&(o=!1);const r=t.getBoundingClientRect(),l=r.left+n.scrollLeft-(o?0:me(t,r)),s=r.top+n.scrollTop;return{x:l,y:s}}function ht(t){let{elements:n,rect:o,offsetParent:r,strategy:l}=t;const s=l==="fixed",i=A(r),c=n?le(n.floating):!1;if(r===i||c&&s)return o;let u={scrollLeft:0,scrollTop:0},a=V(1);const m=V(0),p=N(r);if((p||!p&&!s)&&((I(r)!=="body"||G(i))&&(u=se(r)),N(r))){const d=P(r);a=j(r),m.x=d.x+r.clientLeft,m.y=d.y+r.clientTop}const g=i&&!p&&!s?Fe(i,u,!0):V(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-u.scrollLeft*a.x+m.x+g.x,y:o.y*a.y-u.scrollTop*a.y+m.y+g.y}}function gt(t){return Array.from(t.getClientRects())}function yt(t){const n=A(t),o=se(t),r=t.ownerDocument.body,l=T(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),s=T(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let i=-o.scrollLeft+me(t);const c=-o.scrollTop;return C(r).direction==="rtl"&&(i+=T(n.clientWidth,r.clientWidth)-l),{width:l,height:s,x:i,y:c}}function xt(t,n){const o=E(t),r=A(t),l=o.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(l){s=l.width,i=l.height;const a=fe();(!a||a&&n==="fixed")&&(c=l.offsetLeft,u=l.offsetTop)}return{width:s,height:i,x:c,y:u}}function vt(t,n){const o=P(t,!0,n==="fixed"),r=o.top+t.clientTop,l=o.left+t.clientLeft,s=N(t)?j(t):V(1),i=t.clientWidth*s.x,c=t.clientHeight*s.y,u=l*s.x,a=r*s.y;return{width:i,height:c,x:u,y:a}}function be(t,n,o){let r;if(n==="viewport")r=xt(t,o);else if(n==="document")r=yt(A(t));else if(B(n))r=vt(n,o);else{const l=$e(t);r={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return te(r)}function De(t,n){const o=F(t);return o===n||!B(o)||W(o)?!1:C(o).position==="fixed"||De(o,n)}function wt(t,n){const o=n.get(t);if(o)return o;let r=Y(t,[],!1).filter(c=>B(c)&&I(c)!=="body"),l=null;const s=C(t).position==="fixed";let i=s?F(t):t;for(;B(i)&&!W(i);){const c=C(i),u=de(i);!u&&c.position==="fixed"&&(l=null),(s?!u&&!l:!u&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||G(i)&&!u&&De(t,i))?r=r.filter(m=>m!==i):l=c,i=F(i)}return n.set(t,r),r}function kt(t){let{element:n,boundary:o,rootBoundary:r,strategy:l}=t;const i=[...o==="clippingAncestors"?le(n)?[]:wt(n,this._c):[].concat(o),r],c=i[0],u=i.reduce((a,m)=>{const p=be(n,m,l);return a.top=T(p.top,a.top),a.right=Q(p.right,a.right),a.bottom=Q(p.bottom,a.bottom),a.left=T(p.left,a.left),a},be(n,c,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function bt(t){const{width:n,height:o}=Re(t);return{width:n,height:o}}function _t(t,n,o){const r=N(n),l=A(n),s=o==="fixed",i=P(t,!0,s,n);let c={scrollLeft:0,scrollTop:0};const u=V(0);if(r||!r&&!s)if((I(n)!=="body"||G(l))&&(c=se(n)),r){const g=P(n,!0,s,n);u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}else l&&(u.x=me(l));const a=l&&!r&&!s?Fe(l,c):V(0),m=i.left+c.scrollLeft-u.x-a.x,p=i.top+c.scrollTop-u.y-a.y;return{x:m,y:p,width:i.width,height:i.height}}function ie(t){return C(t).position==="static"}function _e(t,n){if(!N(t)||C(t).position==="fixed")return null;if(n)return n(t);let o=t.offsetParent;return A(t)===o&&(o=o.ownerDocument.body),o}function Te(t,n){const o=E(t);if(le(t))return o;if(!N(t)){let l=F(t);for(;l&&!W(l);){if(B(l)&&!ie(l))return l;l=F(l)}return o}let r=_e(t,n);for(;r&&dt(r)&&ie(r);)r=_e(r,n);return r&&W(r)&&ie(r)&&!de(r)?o:r||ft(t)||o}const Et=async function(t){const n=this.getOffsetParent||Te,o=this.getDimensions,r=await o(t.floating);return{reference:_t(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bt(t){return C(t).direction==="rtl"}const Ct={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:A,getClippingRect:kt,getOffsetParent:Te,getElementRects:Et,getClientRects:gt,getDimensions:bt,getScale:j,isElement:B,isRTL:Bt};function Me(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function Vt(t,n){let o=null,r;const l=A(t);function s(){var c;clearTimeout(r),(c=o)==null||c.disconnect(),o=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const a=t.getBoundingClientRect(),{left:m,top:p,width:g,height:d}=a;if(c||n(),!g||!d)return;const f=J(p),y=J(l.clientWidth-(m+g)),x=J(l.clientHeight-(p+d)),h=J(m),k={rootMargin:-f+"px "+-y+"px "+-x+"px "+-h+"px",threshold:T(0,Q(1,u))||1};let _=!0;function b(L){const S=L[0].intersectionRatio;if(S!==u){if(!_)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Me(a,t.getBoundingClientRect())&&i(),_=!1}try{o=new IntersectionObserver(b,{...k,root:l.ownerDocument})}catch{o=new IntersectionObserver(b,k)}o.observe(t)}return i(!0),s}function Pe(t,n,o,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,a=pe(t),m=l||s?[...a?Y(a):[],...Y(n)]:[];m.forEach(h=>{l&&h.addEventListener("scroll",o,{passive:!0}),s&&h.addEventListener("resize",o)});const p=a&&c?Vt(a,o):null;let g=-1,d=null;i&&(d=new ResizeObserver(h=>{let[w]=h;w&&w.target===a&&d&&(d.unobserve(n),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=d)==null||k.observe(n)})),o()}),a&&!u&&d.observe(a),d.observe(n));let f,y=u?P(t):null;u&&x();function x(){const h=P(t);y&&!Me(y,h)&&o(),y=h,f=requestAnimationFrame(x)}return o(),()=>{var h;m.forEach(w=>{l&&w.removeEventListener("scroll",o),s&&w.removeEventListener("resize",o)}),p==null||p(),(h=d)==null||h.disconnect(),d=null,u&&cancelAnimationFrame(f)}}const ze=at,je=ut,He=it,We=(t,n,o)=>{const r=new Map,l={platform:Ct,...o},s={...l.platform,_c:r};return st(t,n,{...l,platform:s})},Nt=["data-opened"],At={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},St={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},Ie=e.defineComponent({__name:"OneDropdown",props:Ce,emits:["open","close"],setup(t,{emit:n}){const o=e.ref(!1),r=e.ref(null),l=e.ref(null),s=e.ref(null),i=n,c=t,u=()=>{o.value=!o.value,o.value?i("open"):i("close")};e.provide("OneDropdown",{onToggle:u});let a=null;function m(){!l.value||!s.value||We(l.value,s.value,{placement:c.stick?c.stick:"bottom-start",strategy:"fixed",middleware:[ze(5),He(),je({padding:8})]}).then(({x:f,y})=>{s.value&&Object.assign(s.value.style,{left:`${f}px`,top:`${y}px`})})}e.watch(o,async f=>{c.appendBody&&(f?(await e.nextTick(),l.value&&s.value&&(m(),a=Pe(l.value,s.value,m))):a&&(a(),a=null))}),e.onBeforeUnmount(()=>{a&&a()});const p=e.computed(()=>{var x;if(c.appendBody)return"";const f=(x=r.value)==null?void 0:x.getBoundingClientRect(),y=f?f.x<270:!1;return f&&f.top+270>window.innerHeight?"up"+(y?"-right":"-left"):"down"+(y?"-right":"-left")}),g=e.computed(()=>{const f=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return p.value.startsWith("up")?f.push("bottom-1 mb-10"):p.value.startsWith("down")&&f.push("top-1 mt-10"),c.stick==="right"?f.push("right-0"):c.stick==="left"&&f.push("left-0"),f}),d=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(f,y)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:r,"data-opened":o.value},[e.createElementVNode("div",{ref_key:"buttonRef",ref:l},[e.renderSlot(f.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:u,isExpanded:o.value})))],512),c.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:u})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",d.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[f.title?(e.openBlock(),e.createElementBlock("div",At,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:u})))],2)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:u})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[f.title?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:u})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],8,Nt))}}),ue=e.defineComponent({__name:"OneDropdownItem",props:Ge,emits:["click"],setup(t,{emit:n}){const o=n,r=t,l=e.inject("OneDropdown"),s=()=>{l!==void 0&&l.onToggle(),o("click")},i=e.computed(()=>{const c=[];return r.variant==="secondary"?c.push("text-secondary-content hover:bg-secondary-body-hover"):r.variant==="danger"?c.push("text-danger-content hover:bg-danger-10"):r.variant==="warning"?c.push("text-warning-content hover:bg-warning-10"):r.variant==="info"?c.push("text-info-content hover:bg-info-10"):c.push("hover:bg-secondary-body-hover"),c});return(c,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",i.value]),onClick:e.withModifiers(s,["prevent"])},[c.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(c.label),1)],2))}});function Lt(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const Ot={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},accountLabel:{type:String,default:"Account"},logoutLabel:{type:String,default:"Logout"},versionLabel:{type:String,default:""},onAccount:{type:Function},onLogout:{type:Function}},qe={workspace:{type:Object,required:!0},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},appsTitle:{type:String,default:"Ваші додатки"},changeLabel:{type:String,default:"Керувати робочими просторами"},onChange:{type:Function},onApp:{type:Function}},Rt={help:{type:Object,required:!0}},$t=["onClick"],Ft={class:"flex flex-col items-center pt-5 pb-2 h-full"},Dt={class:"flex flex-col px-10 py-1 mt-2 text-center"},Tt={class:"self-center text-base font-medium tracking-wide text-black"},Mt={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},Pt={class:"text-left w-full mt-5 px-3"},zt={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},jt=e.defineComponent({__name:"OneUserMenu",props:Ot,setup(t){const n=t,o=e.computed(()=>{var s;return(s=n.menu)==null?void 0:s.map(i=>{let c={label:i.label};i.icon!=null&&(c={...c,icon:i.icon});const u=typeof i.click=="function"?i.click:()=>{};return{key:i.label,args:c,click:u}})}),r=()=>{typeof n.onAccount=="function"&&n.onAccount()},l=()=>{typeof n.onLogout=="function"&&n.onLogout()};return(s,i)=>(e.openBlock(),e.createBlock(Ie,{stick:"right"},{button:e.withCtx(({onToggle:c,isExpanded:u})=>{var a,m;return[e.createElementVNode("button",{onClick:c,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[u?"bg-secondary-25":""]])},[e.createVNode(K._sfc_main,{text:((a=s.user)==null?void 0:a.name)||"",size:s.iconSize,src:(m=s.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,$t)]}),menu:e.withCtx(()=>{var c,u,a,m,p;return[e.createElementVNode("div",Ft,[e.createVNode(K._sfc_main,{text:((c=s.user)==null?void 0:c.name)||"",size:80,src:(u=s.user)==null?void 0:u.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",Dt,[e.createElementVNode("div",Tt,e.toDisplayString((a=s.user)==null?void 0:a.name),1),e.createElementVNode("div",Mt,e.toDisplayString((m=s.user)==null?void 0:m.email),1)]),typeof n.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:r,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(s.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,g=>(e.openBlock(),e.createBlock(ue,e.mergeProps({key:g.key},{ref_for:!0},g.args,{onClick:g.click}),null,16,["onClick"]))),128)),typeof s.onLogout=="function"?(e.openBlock(),e.createBlock(ue,{key:0,icon:e.unref(Lt),label:s.logoutLabel,class:"rounded py-3",onClick:l},null,8,["icon","label"])):e.createCommentVNode("",!0)]),i[0]||(i[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",zt,e.toDisplayString((p=s.app)==null?void 0:p.version),1)])]}),_:1}))}});function Ue(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Ht=["data-opened"],Wt={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},It={class:"flex justify-between items-center pt-3 mb-3"},qt={class:"font-semibold text-xl px-3"},Ut={class:"grid"},Kt={class:"rounded-lg m-3 border"},Xt={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},Yt={class:"flex justify-between relative"},Gt={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},Jt={key:0},Qt={class:"text-xs font-semibold"},Zt={class:"px-3 py-2"},en={class:"text-secondary-content text-left pb-1 text-xs uppercase"},tn={class:"overflow-auto max-h-full"},nn={key:0,class:"space-y-2"},on=["onClick"],rn={class:"flex"},ln={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},sn={class:"pl-2"},cn={class:"text-sm mt-1 font-semibold"},an={class:"text9 mt-1"},un={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},dn=e.defineComponent({__name:"OneBrowserMenu",props:qe,emits:["open","close"],setup(t,{emit:n}){const o=n,r=t,l=e.ref(!1),s=()=>{l.value=!l.value,l.value?o("open"):o("close")},i=e.ref(!1);e.computed(()=>i.value?X.render:X.render$1);const c=()=>{typeof r.onChange=="function"&&r.onChange()},u=a=>{typeof r.onApp=="function"&&r.onApp(a)};return(a,m)=>{var p,g,d,f,y,x;return e.openBlock(),e.createElementBlock("div",{"data-opened":l.value},[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":l.value}])},[e.createVNode(e.unref(Ue),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:s})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("div",It,[e.createElementVNode("div",qt,e.toDisplayString((p=a.workspace)==null?void 0:p.title),1),e.createVNode(e.unref(Ee.render),{class:"w-6 cursor-pointer",onClick:s})]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Xt,[e.createElementVNode("div",Yt,[e.createVNode(K._sfc_main,{text:((g=a.workspace)==null?void 0:g.name)||"",src:(d=a.workspace)==null?void 0:d.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",Gt,e.toDisplayString((f=a.workspace)==null?void 0:f.name),1)]),i.value?(e.openBlock(),e.createElementBlock("div",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.workspaces,h=>(e.openBlock(),e.createElementBlock("div",{key:h.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(K._sfc_main,{text:h.name,src:h.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",Qt,e.toDisplayString(h.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:c,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((y=a.workspace)==null?void 0:y.changeLabel),1)])]),e.createElementVNode("div",Zt,[e.createElementVNode("div",en,e.toDisplayString((x=a.workspace)==null?void 0:x.appsLabel),1),e.createElementVNode("div",tn,[a.apps&&a.apps.length?(e.openBlock(),e.createElementBlock("div",nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.apps,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id,onClick:w=>u(h),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",rn,[e.createElementVNode("div",ln,[e.createVNode(K._sfc_main,{text:h.name,src:h.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",sn,[e.createElementVNode("p",cn,e.toDisplayString(h.name),1),e.createElementVNode("p",an,e.toDisplayString(h==null?void 0:h.short),1)])]),e.createElementVNode("div",null,[e.createVNode(Ye.OneButton,{variant:"touch",icon:e.unref(X.render$2),onClick:w=>u(h)},null,8,["icon","onClick"])])],8,on))),128))])):e.createCommentVNode("",!0),a.apps&&a.apps.length?(e.openBlock(),e.createElementBlock("button",un,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Ht)}}});const fn=Be._export_sfc(dn,[["__scopeId","data-v-9e75279e"]]);function pn(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function mn(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function Ke(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}const hn=["data-opened"],gn={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},yn={class:"flex justify-between items-center pt-3 mb-3"},xn={class:"font-semibold text-xl px-3"},vn={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},wn=["onClick"],kn={class:"uppercase text-[8px]"},bn={class:"overflow-y-auto grid rounded-xl"},_n={class:"max-h-full bg-[#FAFAFA]"},En={key:0,class:"space-y-2"},Bn=["onClick"],Cn={class:"flex"},Vn={class:"pl-2"},Nn={class:"text-sm mt-1 font-semibold"},An={class:"text-[10px] mt-1 text-[#979CA9]"},Sn={class:"mt-auto"},Ln={key:0},On=["onClick"],Rn={class:"flex items-center space-x-3"},$n={class:"h-16"},Fn={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},Dn={class:"flex justify-between"},Tn=["onClick"],Mn={key:0,class:"tooltip-text min-w-[70px]"},Pn={class:"flex justify-between mb-4"},zn=["href"],jn={class:"flex flex-nowrap items-center w-max h-[24px]"},Hn={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Wn={class:"py-[8px] pl-0 pr-[8px]"},In=e.defineComponent({__name:"OneHelpMenu",props:Rt,emits:["open","close"],setup(t,{emit:n}){const o=n,r=t,l=e.ref(!1),s=()=>{l.value=!l.value,l.value?o("open"):o("close")},i=e.computed(()=>p.value?X.render:X.render$1),c=e.ref(3),u=e.computed(()=>{var f,y;const d=((y=(f=r.help)==null?void 0:f.helpList)==null?void 0:y.length)||0;return c.value===d});e.computed(()=>{var f;return(((f=r.help)==null?void 0:f.helpList)||[]).slice(0,c.value)});const a=()=>{var f,y;const d=((y=(f=r.help)==null?void 0:f.helpList)==null?void 0:y.length)||0;c.value=u.value?3:d},m=(d,f)=>{d&&f&&typeof f.openLink=="function"?f.openLink(f):d&&window.open(d,"_blank")},p=e.ref(!1),g=()=>{p.value=!p.value};return(d,f)=>{var y,x,h,w,k,_,b,L,S;return e.openBlock(),e.createElementBlock("div",{"data-opened":l.value},[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":l.value}])},[e.createVNode(e.unref(pn),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:s})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",yn,[e.createElementVNode("div",xn,e.toDisplayString((y=d.help)==null?void 0:y.label),1),e.createVNode(e.unref(Ee.render),{class:"w-6 cursor-pointer",onClick:s})]),(x=d.help)!=null&&x.helpButton?(e.openBlock(),e.createElementBlock("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((h=d.help)==null?void 0:h.helpButton,v=>(e.openBlock(),e.createElementBlock("button",{key:v.name,onClick:O=>m(v.link,v),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v==null?void 0:v.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",kn,e.toDisplayString(v.name),1)],8,wn))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",bn,[e.createElementVNode("div",_n,[(w=d.help)!=null&&w.helpList&&d.help.helpList.length?(e.openBlock(),e.createElementBlock("div",En,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.help.helpList,v=>(e.openBlock(),e.createElementBlock("div",{key:v.id,onClick:O=>m(v.link,v),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",Cn,[e.createElementVNode("div",Vn,[e.createElementVNode("p",Nn,e.toDisplayString(v.name),1),e.createElementVNode("p",An,e.toDisplayString(v.category),1)])])],8,Bn))),128))])):e.createCommentVNode("",!0)])]),(k=d.help)!=null&&k.helpList&&d.help.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:a,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(u.value?d.help.buttNoMore:d.help.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Sn,[(_=d.help)!=null&&_.video?(e.openBlock(),e.createElementBlock("div",Ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.help.video,v=>(e.openBlock(),e.createElementBlock("button",{key:v.id,onClick:O=>m(v.link,v),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(mn),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(v.name),1)],8,On))),128))])):e.createCommentVNode("",!0),(b=d.help)!=null&&b.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",Rn,[e.createVNode(e.unref(Ke),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(d.help.socialButt),1)]),e.createVNode(e.unref(i),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[p.value?(e.openBlock(),e.createElementBlock("div",Fn,[e.createElementVNode("div",Dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((L=d.help)==null?void 0:L.socialList,v=>(e.openBlock(),e.createElementBlock("button",{key:v.id,onClick:O=>m(v.link,v),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[v.name?(e.openBlock(),e.createElementBlock("div",Mn,e.toDisplayString(v.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v==null?void 0:v.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Tn))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=d.help)==null?void 0:S.termsOffer,v=>(e.openBlock(),e.createElementBlock("a",{key:v.name,target:"_blank",href:v.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",jn,[e.createElementVNode("div",Hn,[e.createElementVNode("span",Wn,e.toDisplayString(v.name),1)])])],8,zn))),128))])])])):e.createCommentVNode("",!0)],8,hn)}}});const qn=Be._export_sfc(In,[["__scopeId","data-v-f5d2b453"]]);exports.OneBrowserMenu=fn;exports.OneHelpMenu=qn;exports._sfc_main=Ie;exports._sfc_main$1=ue;exports._sfc_main$2=jt;exports.autoUpdate=Pe;exports.browserMenuProps=qe;exports.computePosition=We;exports.dropdownProps=Ce;exports.dropdownSelectProps=Je;exports.flip=He;exports.offset=ze;exports.render=Ue;exports.render$1=Ke;exports.shift=je;
|
|
@@ -1322,9 +1322,8 @@ const on = {
|
|
|
1322
1322
|
}, _(i.accountLabel), 1)) : A("", !0),
|
|
1323
1323
|
d("div", dn, [
|
|
1324
1324
|
(m(!0), y(P, null, I(n.value, (x) => (m(), K(Ne, dt({
|
|
1325
|
-
key: x.key
|
|
1326
|
-
|
|
1327
|
-
}, x.args, {
|
|
1325
|
+
key: x.key
|
|
1326
|
+
}, { ref_for: !0 }, x.args, {
|
|
1328
1327
|
onClick: x.click
|
|
1329
1328
|
}), null, 16, ["onClick"]))), 128)),
|
|
1330
1329
|
typeof i.onLogout == "function" ? (m(), K(Ne, {
|
|
@@ -1470,7 +1469,7 @@ const mn = ["data-opened"], gn = {
|
|
|
1470
1469
|
return m(), y("div", { "data-opened": s.value }, [
|
|
1471
1470
|
d("button", {
|
|
1472
1471
|
onClick: i,
|
|
1473
|
-
class: Z(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": s.value }])
|
|
1472
|
+
class: Z(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": s.value }])
|
|
1474
1473
|
}, [
|
|
1475
1474
|
$(D(hn), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
|
|
1476
1475
|
], 2),
|
|
@@ -1563,7 +1562,7 @@ const mn = ["data-opened"], gn = {
|
|
|
1563
1562
|
};
|
|
1564
1563
|
}
|
|
1565
1564
|
});
|
|
1566
|
-
const Lo = /* @__PURE__ */ qe(Dn, [["__scopeId", "data-v-
|
|
1565
|
+
const Lo = /* @__PURE__ */ qe(Dn, [["__scopeId", "data-v-9e75279e"]]);
|
|
1567
1566
|
function zn(e, t) {
|
|
1568
1567
|
return m(), y("svg", {
|
|
1569
1568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1662,7 +1661,7 @@ const Nn = ["data-opened"], Wn = {
|
|
|
1662
1661
|
return m(), y("div", { "data-opened": s.value }, [
|
|
1663
1662
|
d("button", {
|
|
1664
1663
|
onClick: i,
|
|
1665
|
-
class: Z(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": s.value }])
|
|
1664
|
+
class: Z(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": s.value }])
|
|
1666
1665
|
}, [
|
|
1667
1666
|
$(D(zn), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
|
|
1668
1667
|
], 2),
|
|
@@ -1772,7 +1771,7 @@ const Nn = ["data-opened"], Wn = {
|
|
|
1772
1771
|
};
|
|
1773
1772
|
}
|
|
1774
1773
|
});
|
|
1775
|
-
const Oo = /* @__PURE__ */ qe(xo, [["__scopeId", "data-v-
|
|
1774
|
+
const Oo = /* @__PURE__ */ qe(xo, [["__scopeId", "data-v-f5d2b453"]]);
|
|
1776
1775
|
export {
|
|
1777
1776
|
Lo as O,
|
|
1778
1777
|
tn as _,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./_plugin-vue_export-helper-f246444f.cjs");const o={},i={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 r(c,n){return e.openBlock(),e.createElementBlock("svg",i,[...n[0]||(n[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 s=t._export_sfc(o,[["render",r]]);exports.SpinnerIcon=s;
|
|
@@ -7,7 +7,7 @@ const i = {}, r = {
|
|
|
7
7
|
style: { animation: "one-sp-ico-rot 2.7s linear infinite" }
|
|
8
8
|
};
|
|
9
9
|
function c(l, e) {
|
|
10
|
-
return n(), o("svg", r, e[0] || (e[0] = [
|
|
10
|
+
return n(), o("svg", r, [...e[0] || (e[0] = [
|
|
11
11
|
t("circle", {
|
|
12
12
|
style: { "stroke-linecap": "round", animation: "one-sp-ico-dash 1.7s ease-in-out infinite" },
|
|
13
13
|
class: "opacity-75",
|
|
@@ -18,7 +18,7 @@ function c(l, e) {
|
|
|
18
18
|
stroke: "currentColor",
|
|
19
19
|
"stroke-width": "2"
|
|
20
20
|
}, null, -1)
|
|
21
|
-
]));
|
|
21
|
+
])]);
|
|
22
22
|
}
|
|
23
23
|
const p = /* @__PURE__ */ s(i, [["render", c]]);
|
|
24
24
|
export {
|
package/dist/button/button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes, FunctionalComponent, Component } from 'vue';
|
|
2
|
-
export type ButtonVariantType = 'primary' | 'secondary' | 'warning' | 'danger' | 'info' | 'touch' | 'link' | 'none' | 'mini';
|
|
3
|
-
export type ButtonSizeType = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type ButtonVariantType = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'tertiary' | 'touch' | 'link' | 'none' | 'mini' | 'edit' | 'send';
|
|
3
|
+
export type ButtonSizeType = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
4
|
export type ButtonIconType = FunctionalComponent | Component | string;
|
|
5
5
|
export declare const buttonProps: {
|
|
6
6
|
variant: {
|
package/dist/button/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("../SpinnerIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("../SpinnerIcon-01be39fe.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const m={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},labelClass:{type:String,default:""},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object,String]}},y=["relative inline-flex","border","items-center justify-center","font-semibold whitespace-nowrap","disabled:opacity-30 disabled:cursor-default","focus:outline-none focus:ring-2","transition-colors duration-200"],v={xs:["h-6 px-2.5 text-xs"],sm:["px-2 py-1 text-sm"],md:["h-[40px] px-4 text-sm"],lg:["h-[52px] px-5 text-base"]},h={primary:["rounded-10 border-transparent bg-primary-base disabled:bg-[#979CA9] text-sm text-white hover:bg-primary-hover active:bg-primary-active focus:ring-primary-glow"],secondary:["rounded-10 border-primary-stroke bg-white text-secondary-base text-sm hover:bg-light-body-active active:bg-light-body focus:ring-primary-glow"],info:["rounded-10 border-transparent bg-info-base disabled:bg-[#979CA9] text-white text-sm hover:bg-info-hover active:bg-info-active focus:ring-info-glow"],success:["rounded-10 border-transparent bg-success-base disabled:bg-[#979CA9] text-white text-sm hover:bg-success-hover active:bg-success-active focus:ring-success-glow"],warning:["rounded-10 border-transparent bg-warning-base disabled:bg-[#979CA9] text-white text-sm hover:bg-warning-hover active:bg-warning-active focus:ring-warning-glow"],danger:["rounded-10 border-transparent bg-danger-base disabled:bg-[#979CA9] text-white text-sm hover:bg-danger-hover active:bg-danger-active focus:ring-danger-glow"],tertiary:["rounded-10 border-transparent bg-secondary-body text-primary-base text-sm hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],touch:["rounded-full border-transparent text-secondary-base hover:bg-light-body-active active:bg-light-body p-2 text-sm focus:ring-primary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-secondary-base"],mini:["rounded-full border-transparent bg-[#FAFAFA] h-8 px-2 gap-2 text-xs hover:text-success-base focus:ring-primary-glow"],edit:["rounded-md border-transparent bg-tertiary-base text-primary-base text-2xs h-6 px-1.5 hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],send:["rounded-full border-transparent bg-primary-base text-white hover:bg-primary-hover active:bg-primary-active p-[9px] focus:ring-primary-glow"]},f=(a="primary",l="md")=>{const r=[];return r.push(...y),r.push(...h[a]??[]),a!=="touch"&&a!=="mini"&&a!=="edit"&&a!=="send"&&r.push(...v[l]??[]),l==="xs"?r.map(t=>t.replace("rounded-10","rounded-md").replace("font-semibold","font-medium")):r},x=["disabled","title","type"],C=e.defineComponent({__name:"OneButton",props:m,emits:["click"],setup(a,{emit:l}){const r=l,t=a,d=()=>{r("click")},n=e.computed(()=>t.icon),i=e.computed(()=>t.iconAfter),u=e.computed(()=>{const s=f(t.variant,t.size);return t.variant==="edit"?s.push("gap-1.5"):s.push("gap-[10px]"),t.variant==="touch"&&t.active&&s.push("bg-primary-body-active"),s}),p=e.computed(()=>t.disabled||t.isLoading),b=e.computed(()=>t.label&&t.label.length>0&&t.variant!=="touch"&&t.variant!=="send"),g=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return t.labelClass!=null&&s.push(t.labelClass),s}),o=e.computed(()=>{const s=[];return t.variant==="edit"?s.push("w-3.5 h-3.5"):t.variant==="send"?s.push("w-5 h-5"):t.size==="xs"?s.push("w-3.5 h-3.5"):t.size==="sm"?s.push("w-3 h-3"):t.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof t.iconClass=="string"?s.push(t.iconClass):t.iconClass instanceof Array&&s.push(...t.iconClass),s});return(s,w)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(u.value),disabled:p.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(d,["stop"])},[n.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(c.SpinnerIcon,{key:0,class:e.normalizeClass(o.value)},null,8,["class"])):typeof n.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(o.value)},e.toDisplayString(n.value),3)):n.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{key:2,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(g.value)},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])],2)):e.createCommentVNode("",!0),i.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(c.SpinnerIcon,{key:4,class:e.normalizeClass(o.value)},null,8,["class"])):typeof i.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(o.value)},e.toDisplayString(i.value),3)):i.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:6,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,x))}});exports.OneButton=C;
|
package/dist/button/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
2
|
-
import { S as
|
|
1
|
+
import { defineComponent as C, computed as o, openBlock as s, createElementBlock as u, normalizeClass as a, withModifiers as k, createBlock as p, toDisplayString as b, resolveDynamicComponent as m, createCommentVNode as g, renderSlot as B, createTextVNode as A } from "vue";
|
|
2
|
+
import { S as v } from "../SpinnerIcon-516264ba.js";
|
|
3
3
|
import "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
-
const
|
|
4
|
+
const S = {
|
|
5
5
|
variant: {
|
|
6
6
|
type: String,
|
|
7
7
|
default: "primary"
|
|
@@ -41,101 +41,113 @@ const L = {
|
|
|
41
41
|
iconAfter: {
|
|
42
42
|
type: [Function, Object, String]
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, L = [
|
|
45
45
|
"relative inline-flex",
|
|
46
46
|
"border",
|
|
47
47
|
"items-center justify-center",
|
|
48
|
-
"font-
|
|
49
|
-
"disabled:opacity-
|
|
48
|
+
"font-semibold whitespace-nowrap",
|
|
49
|
+
"disabled:opacity-30 disabled:cursor-default",
|
|
50
50
|
"focus:outline-none focus:ring-2",
|
|
51
51
|
"transition-colors duration-200"
|
|
52
52
|
], z = {
|
|
53
|
+
xs: ["h-6 px-2.5 text-xs"],
|
|
53
54
|
sm: ["px-2 py-1 text-sm"],
|
|
54
|
-
md: ["px-
|
|
55
|
-
lg: ["px-
|
|
55
|
+
md: ["h-[40px] px-4 text-sm"],
|
|
56
|
+
lg: ["h-[52px] px-5 text-base"]
|
|
56
57
|
}, F = {
|
|
57
58
|
primary: [
|
|
58
|
-
"rounded-
|
|
59
|
+
"rounded-10 border-transparent bg-primary-base disabled:bg-[#979CA9] text-sm text-white hover:bg-primary-hover active:bg-primary-active focus:ring-primary-glow"
|
|
59
60
|
],
|
|
60
61
|
secondary: [
|
|
61
|
-
"rounded-
|
|
62
|
+
"rounded-10 border-primary-stroke bg-white text-secondary-base text-sm hover:bg-light-body-active active:bg-light-body focus:ring-primary-glow"
|
|
62
63
|
],
|
|
63
64
|
info: [
|
|
64
|
-
"rounded-
|
|
65
|
+
"rounded-10 border-transparent bg-info-base disabled:bg-[#979CA9] text-white text-sm hover:bg-info-hover active:bg-info-active focus:ring-info-glow"
|
|
65
66
|
],
|
|
66
67
|
success: [
|
|
67
|
-
"rounded-
|
|
68
|
+
"rounded-10 border-transparent bg-success-base disabled:bg-[#979CA9] text-white text-sm hover:bg-success-hover active:bg-success-active focus:ring-success-glow"
|
|
68
69
|
],
|
|
69
70
|
warning: [
|
|
70
|
-
"rounded-
|
|
71
|
+
"rounded-10 border-transparent bg-warning-base disabled:bg-[#979CA9] text-white text-sm hover:bg-warning-hover active:bg-warning-active focus:ring-warning-glow"
|
|
71
72
|
],
|
|
72
73
|
danger: [
|
|
73
|
-
"rounded-
|
|
74
|
+
"rounded-10 border-transparent bg-danger-base disabled:bg-[#979CA9] text-white text-sm hover:bg-danger-hover active:bg-danger-active focus:ring-danger-glow"
|
|
74
75
|
],
|
|
75
|
-
|
|
76
|
-
"rounded-
|
|
76
|
+
tertiary: [
|
|
77
|
+
"rounded-10 border-transparent bg-secondary-body text-primary-base text-sm hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"
|
|
77
78
|
],
|
|
78
|
-
|
|
79
|
-
"rounded-
|
|
79
|
+
touch: [
|
|
80
|
+
"rounded-full border-transparent text-secondary-base hover:bg-light-body-active active:bg-light-body p-2 text-sm focus:ring-primary-glow"
|
|
80
81
|
],
|
|
81
|
-
|
|
82
|
+
link: ["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],
|
|
83
|
+
none: ["rounded-md border-transparent text-secondary-base"],
|
|
82
84
|
mini: [
|
|
83
|
-
"rounded-full
|
|
85
|
+
"rounded-full border-transparent bg-[#FAFAFA] h-8 px-2 gap-2 text-xs hover:text-success-base focus:ring-primary-glow"
|
|
86
|
+
],
|
|
87
|
+
edit: [
|
|
88
|
+
"rounded-md border-transparent bg-tertiary-base text-primary-base text-2xs h-6 px-1.5 hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"
|
|
89
|
+
],
|
|
90
|
+
send: [
|
|
91
|
+
"rounded-full border-transparent bg-primary-base text-white hover:bg-primary-hover active:bg-primary-active p-[9px] focus:ring-primary-glow"
|
|
84
92
|
]
|
|
85
|
-
}, I = (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
93
|
+
}, I = (r = "primary", d = "md") => {
|
|
94
|
+
const n = [];
|
|
95
|
+
return n.push(...L), n.push(...F[r] ?? []), r !== "touch" && r !== "mini" && r !== "edit" && r !== "send" && n.push(...z[d] ?? []), d === "xs" ? n.map(
|
|
96
|
+
(e) => e.replace("rounded-10", "rounded-md").replace("font-semibold", "font-medium")
|
|
97
|
+
) : n;
|
|
88
98
|
}, O = ["disabled", "title", "type"], _ = /* @__PURE__ */ C({
|
|
89
99
|
__name: "OneButton",
|
|
90
|
-
props:
|
|
100
|
+
props: S,
|
|
91
101
|
emits: ["click"],
|
|
92
|
-
setup(
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
return
|
|
98
|
-
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
setup(r, { emit: d }) {
|
|
103
|
+
const n = d, e = r, y = () => {
|
|
104
|
+
n("click");
|
|
105
|
+
}, l = o(() => e.icon), c = o(() => e.iconAfter), h = o(() => {
|
|
106
|
+
const t = I(e.variant, e.size);
|
|
107
|
+
return e.variant === "edit" ? t.push("gap-1.5") : t.push("gap-[10px]"), e.variant === "touch" && e.active && t.push("bg-primary-body-active"), t;
|
|
108
|
+
}), f = o(() => e.disabled || e.isLoading), x = o(
|
|
109
|
+
() => e.label && e.label.length > 0 && e.variant !== "touch" && e.variant !== "send"
|
|
110
|
+
), w = o(() => {
|
|
111
|
+
const t = ["inline-block text-ellipsis overflow-hidden"];
|
|
112
|
+
return e.labelClass != null && t.push(e.labelClass), t;
|
|
113
|
+
}), i = o(() => {
|
|
114
|
+
const t = [];
|
|
115
|
+
return e.variant === "edit" ? t.push("w-3.5 h-3.5") : e.variant === "send" ? t.push("w-5 h-5") : e.size === "xs" ? t.push("w-3.5 h-3.5") : e.size === "sm" ? t.push("w-3 h-3") : e.size === "lg" ? t.push("w-5 h-5") : t.push("w-4 h-4"), typeof e.iconClass == "string" ? t.push(e.iconClass) : e.iconClass instanceof Array && t.push(...e.iconClass), t;
|
|
104
116
|
});
|
|
105
|
-
return (
|
|
106
|
-
class:
|
|
107
|
-
disabled:
|
|
108
|
-
title:
|
|
109
|
-
type:
|
|
110
|
-
onClick: k(
|
|
117
|
+
return (t, j) => (s(), u("button", {
|
|
118
|
+
class: a(h.value),
|
|
119
|
+
disabled: f.value,
|
|
120
|
+
title: t.label,
|
|
121
|
+
type: t.isSubmit ? "submit" : "button",
|
|
122
|
+
onClick: k(y, ["stop"])
|
|
111
123
|
}, [
|
|
112
|
-
|
|
124
|
+
l.value != null && t.isLoading ? (s(), p(v, {
|
|
113
125
|
key: 0,
|
|
114
|
-
class:
|
|
115
|
-
}, null, 8, ["class"])) : typeof
|
|
126
|
+
class: a(i.value)
|
|
127
|
+
}, null, 8, ["class"])) : typeof l.value == "string" ? (s(), u("span", {
|
|
116
128
|
key: 1,
|
|
117
|
-
class:
|
|
118
|
-
}, b(
|
|
129
|
+
class: a(i.value)
|
|
130
|
+
}, b(l.value), 3)) : l.value != null ? (s(), p(m(l.value), {
|
|
119
131
|
key: 2,
|
|
120
|
-
class:
|
|
132
|
+
class: a(i.value)
|
|
121
133
|
}, null, 8, ["class"])) : g("", !0),
|
|
122
|
-
|
|
134
|
+
x.value ? (s(), u("span", {
|
|
123
135
|
key: 3,
|
|
124
|
-
class:
|
|
136
|
+
class: a(w.value)
|
|
125
137
|
}, [
|
|
126
|
-
B(
|
|
127
|
-
|
|
138
|
+
B(t.$slots, "default", {}, () => [
|
|
139
|
+
A(b(t.label), 1)
|
|
128
140
|
])
|
|
129
141
|
], 2)) : g("", !0),
|
|
130
|
-
|
|
142
|
+
c.value != null && t.isLoading ? (s(), p(v, {
|
|
131
143
|
key: 4,
|
|
132
|
-
class:
|
|
133
|
-
}, null, 8, ["class"])) : typeof
|
|
144
|
+
class: a(i.value)
|
|
145
|
+
}, null, 8, ["class"])) : typeof c.value == "string" ? (s(), u("span", {
|
|
134
146
|
key: 5,
|
|
135
|
-
class:
|
|
136
|
-
}, b(
|
|
147
|
+
class: a(i.value)
|
|
148
|
+
}, b(c.value), 3)) : c.value != null ? (s(), p(m(c.value), {
|
|
137
149
|
key: 6,
|
|
138
|
-
class:
|
|
150
|
+
class: a(i.value)
|
|
139
151
|
}, null, 8, ["class"])) : g("", !0)
|
|
140
152
|
], 10, O));
|
|
141
153
|
}
|