@oneb/ui-vue 0.2.17 → 0.2.19
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-06a4d617.cjs +1 -0
- package/dist/{OneHelpMenu-82d727ab.js → OneHelpMenu-a2630b46.js} +38 -34
- package/dist/dropdown/dropdown.d.ts +4 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +2 -2
- package/dist/entityPicker/entityPicker.d.ts +1 -1
- package/dist/index-8c58d57a.cjs +1 -0
- package/dist/{index-663366e8.js → index-ed1282e6.js} +161 -154
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +1 -1
- package/package.json +1 -1
- package/dist/OneHelpMenu-b8924dc6.cjs +0 -1
- package/dist/index-ed5c16e5.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),x=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),$=require("./XMarkIcon-f94baa4c.cjs"),_=require("./ChevronRightIcon-6aa413c4.cjs"),j=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),F={title:{type:String},stick:{type:String,default:"right"}},O={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},P={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=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},L=e.defineComponent({__name:"OneDropdown",props:F,emits:["open","close"],setup(f,{emit:a}){const d=e.ref(!1),i=e.ref(null),s=a,r=f,c=()=>{d.value=!d.value,d.value?s("open"):s("close")};e.provide("OneDropdown",{onToggle:c});const n=e.computed(()=>{var k;const t=(k=i.value)==null?void 0:k.getBoundingClientRect(),p=t?t.x<270:!1;return t&&t.top+270>window.innerHeight?"up"+(p?"-right":"-left"):"down"+(p?"-right":"-left")}),h=e.computed(()=>{const t=["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 n.value.startsWith("up")?t.push("bottom-1 mb-10"):n.value.startsWith("down")&&t.push("top-1 mt-10"),r.stick==="right"?t.push("right-0"):r.stick==="left"&&t.push("left-0"),t});return(t,p)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:i,"data-opened":d.value},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:c,isExpanded:d.value}))),d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:c})):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(()=>[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",h.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[t.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:c})))],2)):e.createCommentVNode("",!0)]),_:3})],8,q))}}),B=e.defineComponent({__name:"OneDropdownItem",props:O,emits:["click"],setup(f,{emit:a}){const d=a,i=f,s=e.inject("OneDropdown"),r=()=>{s!==void 0&&s.onToggle(),d("click")},c=e.computed(()=>{const n=[];return i.variant==="secondary"?n.push("text-secondary-content hover:bg-secondary-body-hover"):i.variant==="danger"?n.push("text-danger-content hover:bg-danger-10"):i.variant==="warning"?n.push("text-warning-content hover:bg-warning-10"):i.variant==="info"?n.push("text-info-content hover:bg-info-10"):n.push("hover:bg-secondary-body-hover"),n});return(n,h)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",c.value]),onClick:e.withModifiers(r,["prevent"])},[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(n.label),1)],2))}});function H(f,a){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 T={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}},D={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}},R={help:{type:Object,required:!0}},W=["onClick"],K={class:"flex flex-col items-center pt-5 pb-2 h-full"},U={class:"flex flex-col px-10 py-1 mt-2 text-center"},X={class:"self-center text-base font-medium tracking-wide text-black"},G={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},J={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:T,setup(f){const a=f,d=e.computed(()=>{var r;return(r=a.menu)==null?void 0:r.map(c=>{let n={label:c.label};c.icon!=null&&(n={...n,icon:c.icon});const h=typeof c.click=="function"?c.click:()=>{};return{key:c.label,args:n,click:h}})}),i=()=>{typeof a.onAccount=="function"&&a.onAccount()},s=()=>{typeof a.onLogout=="function"&&a.onLogout()};return(r,c)=>(e.openBlock(),e.createBlock(L,{stick:"right"},{button:e.withCtx(({onToggle:n,isExpanded:h})=>{var t,p;return[e.createElementVNode("button",{onClick:n,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[h?"bg-secondary-25":""]])},[e.createVNode(x._sfc_main,{text:((t=r.user)==null?void 0:t.name)||"",size:r.iconSize,src:(p=r.user)==null?void 0:p.photo_url,rounded:!0},null,8,["text","size","src"])],10,W)]}),menu:e.withCtx(()=>{var n,h,t,p,k;return[e.createElementVNode("div",K,[e.createVNode(x._sfc_main,{text:((n=r.user)==null?void 0:n.name)||"",size:80,src:(h=r.user)==null?void 0:h.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",U,[e.createElementVNode("div",X,e.toDisplayString((t=r.user)==null?void 0:t.name),1),e.createElementVNode("div",G,e.toDisplayString((p=r.user)==null?void 0:p.email),1)]),typeof a.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i,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(r.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,v=>(e.openBlock(),e.createBlock(B,e.mergeProps({key:v.key,ref_for:!0},v.args,{onClick:v.click}),null,16,["onClick"]))),128)),typeof r.onLogout=="function"?(e.openBlock(),e.createBlock(B,{key:0,icon:e.unref(H),label:r.logoutLabel,class:"rounded py-3",onClick:s},null,8,["icon","label"])):e.createCommentVNode("",!0)]),c[0]||(c[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((k=r.app)==null?void 0:k.version),1)])]}),_:1}))}});function z(f,a){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 Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},de={class:"px-3 py-2"},pe={class:"text-secondary-content text-left pb-1 text-xs uppercase"},ue={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ke={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ge={class:"pl-2"},ve={class:"text-sm mt-1 font-semibold"},ye={class:"text9 mt-1"},xe={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},_e=e.defineComponent({__name:"OneBrowserMenu",props:D,emits:["open","close"],setup(f,{emit:a}){const d=a,i=f,s=e.ref(!1),r=()=>{s.value=!s.value,s.value?d("open"):d("close")},c=e.ref(!1);e.computed(()=>c.value?_.render:_.render$1);const n=()=>{typeof i.onChange=="function"&&i.onChange()},h=t=>{typeof i.onApp=="function"&&i.onApp(t)};return(t,p)=>{var k,v,l,u,g,y;return e.openBlock(),e.createElementBlock("div",{"data-opened":s.value},[e.createElementVNode("button",{onClick:r,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":s.value}])},[e.createVNode(e.unref(z),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:r})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString((k=t.workspace)==null?void 0:k.title),1),e.createVNode(e.unref($.render),{class:"w-6 cursor-pointer",onClick:r})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(x._sfc_main,{text:((v=t.workspace)==null?void 0:v.name)||"",src:(l=t.workspace)==null?void 0:l.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((u=t.workspace)==null?void 0:u.name),1)]),c.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.workspaces,m=>(e.openBlock(),e.createElementBlock("div",{key:m.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(x._sfc_main,{text:m.name,src:m.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(m.name),1)]))),128))])):e.createCommentVNode("",!0),p[0]||(p[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:n,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((g=t.workspace)==null?void 0:g.changeLabel),1)])]),e.createElementVNode("div",de,[e.createElementVNode("div",pe,e.toDisplayString((y=t.workspace)==null?void 0:y.appsLabel),1),e.createElementVNode("div",ue,[t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.apps,m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,onClick:w=>h(m),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ke,[e.createVNode(x._sfc_main,{text:m.name,src:m.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ge,[e.createElementVNode("p",ve,e.toDisplayString(m.name),1),e.createElementVNode("p",ye,e.toDisplayString(m==null?void 0:m.short),1)])]),e.createElementVNode("div",null,[e.createVNode(j.OneButton,{variant:"touch",icon:e.unref(_.render$2),onClick:w=>h(m)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("button",xe,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(_e,[["__scopeId","data-v-2628df74"]]);function be(f,a){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 Be(f,a){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 M(f,a){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 Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},Se={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},$e=["onClick"],Ae={class:"uppercase text-[8px]"},Fe={class:"overflow-y-auto grid rounded-xl"},Le={class:"max-h-full bg-[#FAFAFA]"},De={key:0,class:"space-y-2"},ze=["onClick"],Me={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},Pe={class:"text-[10px] mt-1 text-[#979CA9]"},qe={class:"mt-auto"},Ie={key:0},He=["onClick"],Te={class:"flex items-center space-x-3"},Re={class:"h-16"},We={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},Ke={class:"flex justify-between"},Ue=["onClick"],Xe={key:0,class:"tooltip-text min-w-[70px]"},Ge={class:"flex justify-between mb-4"},Je=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(f,{emit:a}){const d=a,i=f,s=e.ref(!1),r=()=>{s.value=!s.value,s.value?d("open"):d("close")},c=e.computed(()=>k.value?_.render:_.render$1),n=e.ref(3),h=e.computed(()=>{var u,g;const l=((g=(u=i.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;return n.value===l});e.computed(()=>{var u;return(((u=i.help)==null?void 0:u.helpList)||[]).slice(0,n.value)});const t=()=>{var u,g;const l=((g=(u=i.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;n.value=h.value?3:l},p=(l,u)=>{l&&u&&typeof u.openLink=="function"?u.openLink(u):l&&window.open(l,"_blank")},k=e.ref(!1),v=()=>{k.value=!k.value};return(l,u)=>{var g,y,m,w,E,V,N,C,S;return e.openBlock(),e.createElementBlock("div",{"data-opened":s.value},[e.createElementVNode("button",{onClick:r,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":s.value}])},[e.createVNode(e.unref(be),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),s.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:r})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString((g=l.help)==null?void 0:g.label),1),e.createVNode(e.unref($.render),{class:"w-6 cursor-pointer",onClick:r})]),(y=l.help)!=null&&y.helpButton?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((m=l.help)==null?void 0:m.helpButton,o=>(e.openBlock(),e.createElementBlock("button",{key:o.name,onClick:b=>p(o.link,o),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(o==null?void 0:o.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Ae,e.toDisplayString(o.name),1)],8,$e))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Fe,[e.createElementVNode("div",Le,[(w=l.help)!=null&&w.helpList&&l.help.helpList.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.helpList,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:b=>p(o.link,o),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",Me,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(o.name),1),e.createElementVNode("p",Pe,e.toDisplayString(o.category),1)])])],8,ze))),128))])):e.createCommentVNode("",!0)])]),(E=l.help)!=null&&E.helpList&&l.help.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:t,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(h.value?l.help.buttNoMore:l.help.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qe,[(V=l.help)!=null&&V.video?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.video,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,onClick:b=>p(o.link,o),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(Be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(o.name),1)],8,He))),128))])):e.createCommentVNode("",!0),(N=l.help)!=null&&N.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,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",Te,[e.createVNode(e.unref(M),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.help.socialButt),1)]),e.createVNode(e.unref(c),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=l.help)==null?void 0:C.socialList,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,onClick:b=>p(o.link,o),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[o.name?(e.openBlock(),e.createElementBlock("div",Xe,e.toDisplayString(o.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o==null?void 0:o.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Ue))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=l.help)==null?void 0:S.termsOffer,o=>(e.openBlock(),e.createElementBlock("a",{key:o.name,target:"_blank",href:o.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(o.name),1)])])],8,Je))),128))])])])):e.createCommentVNode("",!0)],8,Ee)}}});const tt=A._export_sfc(et,[["__scopeId","data-v-071eaf70"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=L;exports._sfc_main$1=B;exports._sfc_main$2=Y;exports.browserMenuProps=D;exports.dropdownProps=F;exports.dropdownSelectProps=P;exports.render=z;exports.render$1=M;
|
|
@@ -82,6 +82,10 @@ const se = {
|
|
|
82
82
|
},
|
|
83
83
|
maxWidth: {
|
|
84
84
|
type: String
|
|
85
|
+
},
|
|
86
|
+
view: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: "default"
|
|
85
89
|
}
|
|
86
90
|
}, re = ["data-opened"], ie = {
|
|
87
91
|
key: 0,
|
|
@@ -101,7 +105,7 @@ const se = {
|
|
|
101
105
|
var w;
|
|
102
106
|
const n = (w = h.value) == null ? void 0 : w.getBoundingClientRect(), v = n ? n.x < 270 : !1;
|
|
103
107
|
return n && n.top + 270 > window.innerHeight ? "up" + (v ? "-right" : "-left") : "down" + (v ? "-right" : "-left");
|
|
104
|
-
}),
|
|
108
|
+
}), x = S(() => {
|
|
105
109
|
const n = [
|
|
106
110
|
"absolute z-10 w-fit rounded-md bg-white",
|
|
107
111
|
"py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
|
|
@@ -132,7 +136,7 @@ const se = {
|
|
|
132
136
|
default: P(() => [
|
|
133
137
|
f.value ? (t(), o("div", {
|
|
134
138
|
key: 0,
|
|
135
|
-
class: M(["menu",
|
|
139
|
+
class: M(["menu", x.value]),
|
|
136
140
|
role: "menu",
|
|
137
141
|
"aria-orientation": "vertical",
|
|
138
142
|
tabindex: "-1"
|
|
@@ -156,7 +160,7 @@ const se = {
|
|
|
156
160
|
const l = [];
|
|
157
161
|
return h.variant === "secondary" ? l.push("text-secondary-content hover:bg-secondary-body-hover") : h.variant === "danger" ? l.push("text-danger-content hover:bg-danger-10") : h.variant === "warning" ? l.push("text-warning-content hover:bg-warning-10") : h.variant === "info" ? l.push("text-info-content hover:bg-info-10") : l.push("hover:bg-secondary-body-hover"), l;
|
|
158
162
|
});
|
|
159
|
-
return (l,
|
|
163
|
+
return (l, x) => (t(), o("button", {
|
|
160
164
|
class: M(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", d.value]),
|
|
161
165
|
onClick: ee(i, ["prevent"])
|
|
162
166
|
}, [
|
|
@@ -253,7 +257,7 @@ const de = {
|
|
|
253
257
|
type: Object,
|
|
254
258
|
required: !0
|
|
255
259
|
}
|
|
256
|
-
}, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ve = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, me = { class: "self-center text-base font-medium tracking-wide text-black" },
|
|
260
|
+
}, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ve = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, me = { class: "self-center text-base font-medium tracking-wide text-black" }, ge = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, xe = { class: "text-left w-full mt-5 px-3" }, ye = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Bt = /* @__PURE__ */ z({
|
|
257
261
|
__name: "OneUserMenu",
|
|
258
262
|
props: de,
|
|
259
263
|
setup(y) {
|
|
@@ -262,12 +266,12 @@ const de = {
|
|
|
262
266
|
return (i = p.menu) == null ? void 0 : i.map((d) => {
|
|
263
267
|
let l = { label: d.label };
|
|
264
268
|
d.icon != null && (l = { ...l, icon: d.icon });
|
|
265
|
-
const
|
|
269
|
+
const x = typeof d.click == "function" ? d.click : () => {
|
|
266
270
|
};
|
|
267
271
|
return {
|
|
268
272
|
key: d.label,
|
|
269
273
|
args: l,
|
|
270
|
-
click:
|
|
274
|
+
click: x
|
|
271
275
|
};
|
|
272
276
|
});
|
|
273
277
|
}), h = () => {
|
|
@@ -276,12 +280,12 @@ const de = {
|
|
|
276
280
|
typeof p.onLogout == "function" && p.onLogout();
|
|
277
281
|
};
|
|
278
282
|
return (i, d) => (t(), L(ae, { stick: "right" }, {
|
|
279
|
-
button: P(({ onToggle: l, isExpanded:
|
|
283
|
+
button: P(({ onToggle: l, isExpanded: x }) => {
|
|
280
284
|
var n, v;
|
|
281
285
|
return [
|
|
282
286
|
e("button", {
|
|
283
287
|
onClick: l,
|
|
284
|
-
class: M(["p-1 rounded-full hover:bg-secondary-10", [
|
|
288
|
+
class: M(["p-1 rounded-full hover:bg-secondary-10", [x ? "bg-secondary-25" : ""]])
|
|
285
289
|
}, [
|
|
286
290
|
_(j, {
|
|
287
291
|
text: ((n = i.user) == null ? void 0 : n.name) || "",
|
|
@@ -293,26 +297,26 @@ const de = {
|
|
|
293
297
|
];
|
|
294
298
|
}),
|
|
295
299
|
menu: P(() => {
|
|
296
|
-
var l,
|
|
300
|
+
var l, x, n, v, w;
|
|
297
301
|
return [
|
|
298
302
|
e("div", fe, [
|
|
299
303
|
_(j, {
|
|
300
304
|
text: ((l = i.user) == null ? void 0 : l.name) || "",
|
|
301
305
|
size: 80,
|
|
302
|
-
src: (
|
|
306
|
+
src: (x = i.user) == null ? void 0 : x.photo_url,
|
|
303
307
|
rounded: !0,
|
|
304
308
|
class: "mx-auto"
|
|
305
309
|
}, null, 8, ["text", "src"]),
|
|
306
310
|
e("div", ve, [
|
|
307
311
|
e("div", me, c((n = i.user) == null ? void 0 : n.name), 1),
|
|
308
|
-
e("div",
|
|
312
|
+
e("div", ge, c((v = i.user) == null ? void 0 : v.email), 1)
|
|
309
313
|
]),
|
|
310
314
|
typeof p.onAccount == "function" ? (t(), o("a", {
|
|
311
315
|
key: 0,
|
|
312
316
|
onClick: h,
|
|
313
317
|
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"
|
|
314
318
|
}, c(i.accountLabel), 1)) : u("", !0),
|
|
315
|
-
e("div",
|
|
319
|
+
e("div", xe, [
|
|
316
320
|
(t(!0), o($, null, A(f.value, (C) => (t(), L(K, te({
|
|
317
321
|
key: C.key,
|
|
318
322
|
ref_for: !0
|
|
@@ -454,7 +458,7 @@ const we = ["data-opened"], ke = {
|
|
|
454
458
|
S(() => d.value ? G : J);
|
|
455
459
|
const l = () => {
|
|
456
460
|
typeof h.onChange == "function" && h.onChange();
|
|
457
|
-
},
|
|
461
|
+
}, x = (n) => {
|
|
458
462
|
typeof h.onApp == "function" && h.onApp(n);
|
|
459
463
|
};
|
|
460
464
|
return (n, v) => {
|
|
@@ -494,17 +498,17 @@ const we = ["data-opened"], ke = {
|
|
|
494
498
|
e("div", Le, c((m = n.workspace) == null ? void 0 : m.name), 1)
|
|
495
499
|
]),
|
|
496
500
|
d.value ? (t(), o("div", Be, [
|
|
497
|
-
(t(!0), o($, null, A(n.workspaces, (
|
|
498
|
-
key:
|
|
501
|
+
(t(!0), o($, null, A(n.workspaces, (g) => (t(), o("div", {
|
|
502
|
+
key: g.name,
|
|
499
503
|
class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
|
|
500
504
|
}, [
|
|
501
505
|
_(j, {
|
|
502
|
-
text:
|
|
503
|
-
src:
|
|
506
|
+
text: g.name,
|
|
507
|
+
src: g.photo_url,
|
|
504
508
|
size: 30,
|
|
505
509
|
rounded: !1
|
|
506
510
|
}, null, 8, ["text", "src"]),
|
|
507
|
-
e("span", je, c(
|
|
511
|
+
e("span", je, c(g.name), 1)
|
|
508
512
|
]))), 128))
|
|
509
513
|
])) : u("", !0),
|
|
510
514
|
v[0] || (v[0] = e("hr", null, null, -1)),
|
|
@@ -519,30 +523,30 @@ const we = ["data-opened"], ke = {
|
|
|
519
523
|
e("div", Me, c((B = n.workspace) == null ? void 0 : B.appsLabel), 1),
|
|
520
524
|
e("div", Oe, [
|
|
521
525
|
n.apps && n.apps.length ? (t(), o("div", Ee, [
|
|
522
|
-
(t(!0), o($, null, A(n.apps, (
|
|
523
|
-
key:
|
|
524
|
-
onClick: (O) => g
|
|
526
|
+
(t(!0), o($, null, A(n.apps, (g) => (t(), o("div", {
|
|
527
|
+
key: g.id,
|
|
528
|
+
onClick: (O) => x(g),
|
|
525
529
|
class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
|
|
526
530
|
}, [
|
|
527
531
|
e("div", Ie, [
|
|
528
532
|
e("div", Ve, [
|
|
529
533
|
_(j, {
|
|
530
|
-
text:
|
|
531
|
-
src:
|
|
534
|
+
text: g.name,
|
|
535
|
+
src: g.photo_url,
|
|
532
536
|
size: 44,
|
|
533
537
|
rounded: !1
|
|
534
538
|
}, null, 8, ["text", "src"])
|
|
535
539
|
]),
|
|
536
540
|
e("div", He, [
|
|
537
|
-
e("p", Te, c(
|
|
538
|
-
e("p", De, c(
|
|
541
|
+
e("p", Te, c(g.name), 1),
|
|
542
|
+
e("p", De, c(g == null ? void 0 : g.short), 1)
|
|
539
543
|
])
|
|
540
544
|
]),
|
|
541
545
|
e("div", null, [
|
|
542
546
|
_(ne, {
|
|
543
547
|
variant: "touch",
|
|
544
548
|
icon: b(oe),
|
|
545
|
-
onClick: (O) => g
|
|
549
|
+
onClick: (O) => x(g)
|
|
546
550
|
}, null, 8, ["icon", "onClick"])
|
|
547
551
|
])
|
|
548
552
|
], 8, Pe))), 128))
|
|
@@ -624,14 +628,14 @@ const Ue = ["data-opened"], Ge = {
|
|
|
624
628
|
}, ft = { class: "flex justify-between" }, vt = ["onClick"], mt = {
|
|
625
629
|
key: 0,
|
|
626
630
|
class: "tooltip-text min-w-[70px]"
|
|
627
|
-
},
|
|
631
|
+
}, gt = { class: "flex justify-between mb-4" }, xt = ["href"], yt = { class: "flex flex-nowrap items-center w-max h-[24px]" }, _t = { class: "whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]" }, wt = { class: "py-[8px] pl-0 pr-[8px]" }, kt = /* @__PURE__ */ z({
|
|
628
632
|
__name: "OneHelpMenu",
|
|
629
633
|
props: pe,
|
|
630
634
|
emits: ["open", "close"],
|
|
631
635
|
setup(y, { emit: p }) {
|
|
632
636
|
const f = p, h = y, a = F(!1), i = () => {
|
|
633
637
|
a.value = !a.value, a.value ? f("open") : f("close");
|
|
634
|
-
}, d = S(() => w.value ? G : J), l = F(3),
|
|
638
|
+
}, d = S(() => w.value ? G : J), l = F(3), x = S(() => {
|
|
635
639
|
var m, k;
|
|
636
640
|
const r = ((k = (m = h.help) == null ? void 0 : m.helpList) == null ? void 0 : k.length) || 0;
|
|
637
641
|
return l.value === r;
|
|
@@ -643,14 +647,14 @@ const Ue = ["data-opened"], Ge = {
|
|
|
643
647
|
const n = () => {
|
|
644
648
|
var m, k;
|
|
645
649
|
const r = ((k = (m = h.help) == null ? void 0 : m.helpList) == null ? void 0 : k.length) || 0;
|
|
646
|
-
l.value =
|
|
650
|
+
l.value = x.value ? 3 : r;
|
|
647
651
|
}, v = (r, m) => {
|
|
648
652
|
r && m && typeof m.openLink == "function" ? m.openLink(m) : r && window.open(r, "_blank");
|
|
649
653
|
}, w = F(!1), C = () => {
|
|
650
654
|
w.value = !w.value;
|
|
651
655
|
};
|
|
652
656
|
return (r, m) => {
|
|
653
|
-
var k, B,
|
|
657
|
+
var k, B, g, O, V, H, T, D, q;
|
|
654
658
|
return t(), o("div", { "data-opened": a.value }, [
|
|
655
659
|
e("button", {
|
|
656
660
|
onClick: i,
|
|
@@ -672,7 +676,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
672
676
|
})
|
|
673
677
|
]),
|
|
674
678
|
(B = r.help) != null && B.helpButton ? (t(), o("div", Xe, [
|
|
675
|
-
(t(!0), o($, null, A((
|
|
679
|
+
(t(!0), o($, null, A((g = r.help) == null ? void 0 : g.helpButton, (s) => (t(), o("button", {
|
|
676
680
|
key: s.name,
|
|
677
681
|
onClick: (E) => v(s.link, s),
|
|
678
682
|
class: "grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"
|
|
@@ -705,7 +709,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
705
709
|
key: 1,
|
|
706
710
|
onClick: n,
|
|
707
711
|
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"
|
|
708
|
-
}, c(
|
|
712
|
+
}, c(x.value ? r.help.buttNoMore : r.help.buttMore), 1)) : u("", !0),
|
|
709
713
|
e("div", at, [
|
|
710
714
|
(H = r.help) != null && H.video ? (t(), o("div", ct, [
|
|
711
715
|
(t(!0), o($, null, A(r.help.video, (s) => (t(), o("button", {
|
|
@@ -744,7 +748,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
744
748
|
])
|
|
745
749
|
])) : u("", !0)
|
|
746
750
|
]),
|
|
747
|
-
e("div",
|
|
751
|
+
e("div", gt, [
|
|
748
752
|
(t(!0), o($, null, A((q = r.help) == null ? void 0 : q.termsOffer, (s) => (t(), o("a", {
|
|
749
753
|
key: s.name,
|
|
750
754
|
target: "_blank",
|
|
@@ -756,7 +760,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
756
760
|
e("span", wt, c(s.name), 1)
|
|
757
761
|
])
|
|
758
762
|
])
|
|
759
|
-
], 8,
|
|
763
|
+
], 8, xt))), 128))
|
|
760
764
|
])
|
|
761
765
|
])
|
|
762
766
|
])) : u("", !0)
|
package/dist/dropdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../OneHelpMenu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../OneHelpMenu-06a4d617.cjs"),r=require("../index-8c58d57a.cjs");require("vue");require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../ChevronRightIcon-6aa413c4.cjs");require("../button/index.cjs");require("../SpinnerIcon-89c60210.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");exports.OneBrowserMenu=e.OneBrowserMenu;exports.OneDropdown=e._sfc_main;exports.OneDropdownItem=e._sfc_main$1;exports.OneHelpMenu=e.OneHelpMenu;exports.OneUserMenu=e._sfc_main$2;exports.OneBrowserMenuGrid=r._sfc_main$1;exports.OneDropdownAuto=r._sfc_main;exports.OneDropdownDivider=r.OneDropdownDivider;exports.OneDropdownSelect=r._sfc_main$2;
|
package/dist/dropdown/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as m, _ as O, a as d, c as w, b as D } from "../OneHelpMenu-
|
|
2
|
-
import { b as M, _ as c, a as b, c as f } from "../index-
|
|
1
|
+
import { O as m, _ as O, a as d, c as w, b as D } from "../OneHelpMenu-a2630b46.js";
|
|
2
|
+
import { b as M, _ as c, a as b, c as f } from "../index-ed1282e6.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
5
5
|
import "../XMarkIcon-51ef0691.js";
|
|
@@ -156,7 +156,7 @@ export declare const entityPickerProps: {
|
|
|
156
156
|
default: boolean;
|
|
157
157
|
};
|
|
158
158
|
variant: {
|
|
159
|
-
type: PropType<"default" | "
|
|
159
|
+
type: PropType<"default" | "pill" | "compact" | "minimal">;
|
|
160
160
|
default: string;
|
|
161
161
|
validator: (v: string) => boolean;
|
|
162
162
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const J=require("./OneHelpMenu-06a4d617.cjs"),e=require("vue"),_e=require("./_plugin-vue_export-helper-f246444f.cjs"),we=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),oe=Math.min,j=Math.max,ne=Math.round,te=Math.floor,R=t=>({x:t,y:t}),qe={left:"right",right:"left",bottom:"top",top:"bottom"},Ye={start:"end",end:"start"};function ke(t,o,n){return j(t,oe(o,n))}function se(t,o){return typeof t=="function"?t(o):t}function W(t){return t.split("-")[0]}function ie(t){return t.split("-")[1]}function Oe(t){return t==="x"?"y":"x"}function Me(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes(W(t))?"y":"x"}function Re(t){return Oe(U(t))}function Xe(t,o,n){n===void 0&&(n=!1);const l=ie(t),r=Re(t),i=Me(r);let s=r==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[i]>o.floating[i]&&(s=le(s)),[s,le(s)]}function Ge(t){const o=le(t);return[me(t),o,me(o)]}function me(t){return t.replace(/start|end/g,o=>Ye[o])}function Je(t,o,n){const l=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?o?r:l:o?l:r;case"left":case"right":return o?i:s;default:return[]}}function Ze(t,o,n,l){const r=ie(t);let i=Je(W(t),n==="start",l);return r&&(i=i.map(s=>s+"-"+r),o&&(i=i.concat(i.map(me)))),i}function le(t){return t.replace(/left|right|bottom|top/g,o=>qe[o])}function Qe(t){return{top:0,right:0,bottom:0,left:0,...t}}function et(t){return typeof t!="number"?Qe(t):{top:t,right:t,bottom:t,left:t}}function re(t){const{x:o,y:n,width:l,height:r}=t;return{width:l,height:r,top:n,left:o,right:o+l,bottom:n+r,x:o,y:n}}function xe(t,o,n){let{reference:l,floating:r}=t;const i=U(o),s=Re(o),a=Me(s),u=W(o),d=i==="y",f=l.x+l.width/2-r.width/2,g=l.y+l.height/2-r.height/2,v=l[a]/2-r[a]/2;let h;switch(u){case"top":h={x:f,y:l.y-r.height};break;case"bottom":h={x:f,y:l.y+l.height};break;case"right":h={x:l.x+l.width,y:g};break;case"left":h={x:l.x-r.width,y:g};break;default:h={x:l.x,y:l.y}}switch(ie(o)){case"start":h[s]-=v*(n&&d?-1:1);break;case"end":h[s]+=v*(n&&d?-1:1);break}return h}const tt=async(t,o,n)=>{const{placement:l="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let d=await s.getElementRects({reference:t,floating:o,strategy:r}),{x:f,y:g}=xe(d,l,u),v=l,h={},m=0;for(let y=0;y<a.length;y++){const{name:x,fn:E}=a[y],{x:b,y:V,data:B,reset:S}=await E({x:f,y:g,initialPlacement:l,placement:v,strategy:r,middlewareData:h,rects:d,platform:s,elements:{reference:t,floating:o}});f=b??f,g=V??g,h={...h,[x]:{...h[x],...B}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:t,floating:o,strategy:r}):S.rects),{x:f,y:g}=xe(d,v,u)),y=-1)}return{x:f,y:g,placement:v,strategy:r,middlewareData:h}};async function Le(t,o){var n;o===void 0&&(o={});const{x:l,y:r,platform:i,rects:s,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:v=!1,padding:h=0}=se(o,t),m=et(h),x=a[v?g==="floating"?"reference":"floating":g],E=re(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:f,strategy:u})),b=g==="floating"?{x:l,y:r,width:s.floating.width,height:s.floating.height}:s.reference,V=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),B=await(i.isElement==null?void 0:i.isElement(V))?await(i.getScale==null?void 0:i.getScale(V))||{x:1,y:1}:{x:1,y:1},S=re(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:V,strategy:u}):b);return{top:(E.top-S.top+m.top)/B.y,bottom:(S.bottom-E.bottom+m.bottom)/B.y,left:(E.left-S.left+m.left)/B.x,right:(S.right-E.right+m.right)/B.x}}const ot=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,l;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:d}=o,{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=se(t,o);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=W(r),b=U(a),V=W(a)===a,B=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(V||!y?[le(a)]:Ge(a)),A=m!=="none";!v&&A&&S.push(...Ze(a,y,m,B));const D=[a,...S],K=await Le(o,x),F=[];let P=((l=i.flip)==null?void 0:l.overflows)||[];if(f&&F.push(K[E]),g){const T=Xe(r,s,B);F.push(K[T[0]],K[T[1]])}if(P=[...P,{placement:r,overflows:F}],!F.every(T=>T<=0)){var ee,X;const T=(((ee=i.flip)==null?void 0:ee.index)||0)+1,c=D[T];if(c)return{data:{index:T,overflows:P},reset:{placement:c}};let p=(X=P.filter(k=>k.overflows[0]<=0).sort((k,w)=>k.overflows[1]-w.overflows[1])[0])==null?void 0:X.placement;if(!p)switch(h){case"bestFit":{var G;const k=(G=P.filter(w=>{if(A){const C=U(w.placement);return C===b||C==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(C=>C>0).reduce((C,N)=>C+N,0)]).sort((w,C)=>w[1]-C[1])[0])==null?void 0:G[0];k&&(p=k);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}return{}}}};async function nt(t,o){const{placement:n,platform:l,elements:r}=t,i=await(l.isRTL==null?void 0:l.isRTL(r.floating)),s=W(n),a=ie(n),u=U(n)==="y",d=["left","top"].includes(s)?-1:1,f=i&&u?-1:1,g=se(o,t);let{mainAxis:v,crossAxis:h,alignmentAxis:m}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),u?{x:h*f,y:v*d}:{x:v*d,y:h*f}}const lt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,l;const{x:r,y:i,placement:s,middlewareData:a}=o,u=await nt(o,t);return s===((n=a.offset)==null?void 0:n.placement)&&(l=a.arrow)!=null&&l.alignmentOffset?{}:{x:r+u.x,y:i+u.y,data:{...u,placement:s}}}}},rt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:l,placement:r}=o,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:E,y:b}=x;return{x:E,y:b}}},...u}=se(t,o),d={x:n,y:l},f=await Le(o,u),g=U(W(r)),v=Oe(g);let h=d[v],m=d[g];if(i){const x=v==="y"?"top":"left",E=v==="y"?"bottom":"right",b=h+f[x],V=h-f[E];h=ke(b,h,V)}if(s){const x=g==="y"?"top":"left",E=g==="y"?"bottom":"right",b=m+f[x],V=m-f[E];m=ke(b,m,V)}const y=a.fn({...o,[v]:h,[g]:m});return{...y,data:{x:y.x-n,y:y.y-l,enabled:{[v]:i,[g]:s}}}}}};function ae(){return typeof window<"u"}function Y(t){return $e(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function $(t){var o;return(o=($e(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function $e(t){return ae()?t instanceof Node||t instanceof _(t).Node:!1}function O(t){return ae()?t instanceof Element||t instanceof _(t).Element:!1}function L(t){return ae()?t instanceof HTMLElement||t instanceof _(t).HTMLElement:!1}function be(t){return!ae()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _(t).ShadowRoot}function Q(t){const{overflow:o,overflowX:n,overflowY:l,display:r}=M(t);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!["inline","contents"].includes(r)}function st(t){return["table","td","th"].includes(Y(t))}function ce(t){return[":popover-open",":modal"].some(o=>{try{return t.matches(o)}catch{return!1}})}function ge(t){const o=he(),n=O(t)?M(t):t;return["transform","translate","scale","rotate","perspective"].some(l=>n[l]?n[l]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!o&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!o&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(l=>(n.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(n.contain||"").includes(l))}function it(t){let o=z(t);for(;L(o)&&!q(o);){if(ge(o))return o;if(ce(o))return null;o=z(o)}return null}function he(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function q(t){return["html","body","#document"].includes(Y(t))}function M(t){return _(t).getComputedStyle(t)}function ue(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(Y(t)==="html")return t;const o=t.assignedSlot||t.parentNode||be(t)&&t.host||$(t);return be(o)?o.host:o}function De(t){const o=z(t);return q(o)?t.ownerDocument?t.ownerDocument.body:t.body:L(o)&&Q(o)?o:De(o)}function Z(t,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const r=De(t),i=r===((l=t.ownerDocument)==null?void 0:l.body),s=_(r);if(i){const a=pe(s);return o.concat(s,s.visualViewport||[],Q(r)?r:[],a&&n?Z(a):[])}return o.concat(r,Z(r,[],n))}function pe(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Te(t){const o=M(t);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const r=L(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:l,a=ne(n)!==i||ne(l)!==s;return a&&(n=i,l=s),{width:n,height:l,$:a}}function ve(t){return O(t)?t:t.contextElement}function H(t){const o=ve(t);if(!L(o))return R(1);const n=o.getBoundingClientRect(),{width:l,height:r,$:i}=Te(o);let s=(i?ne(n.width):n.width)/l,a=(i?ne(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const at=R(0);function ze(t){const o=_(t);return!he()||!o.visualViewport?at:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ct(t,o,n){return o===void 0&&(o=!1),!n||o&&n!==_(t)?!1:o}function I(t,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=ve(t);let s=R(1);o&&(l?O(l)&&(s=H(l)):s=H(t));const a=ct(i,n,l)?ze(i):R(0);let u=(r.left+a.x)/s.x,d=(r.top+a.y)/s.y,f=r.width/s.x,g=r.height/s.y;if(i){const v=_(i),h=l&&O(l)?_(l):l;let m=v,y=pe(m);for(;y&&l&&h!==m;){const x=H(y),E=y.getBoundingClientRect(),b=M(y),V=E.left+(y.clientLeft+parseFloat(b.paddingLeft))*x.x,B=E.top+(y.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,d*=x.y,f*=x.x,g*=x.y,u+=V,d+=B,m=_(y),y=pe(m)}}return re({width:f,height:g,x:u,y:d})}function ye(t,o){const n=ue(t).scrollLeft;return o?o.left+n:I($(t)).left+n}function Fe(t,o,n){n===void 0&&(n=!1);const l=t.getBoundingClientRect(),r=l.left+o.scrollLeft-(n?0:ye(t,l)),i=l.top+o.scrollTop;return{x:r,y:i}}function ut(t){let{elements:o,rect:n,offsetParent:l,strategy:r}=t;const i=r==="fixed",s=$(l),a=o?ce(o.floating):!1;if(l===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},d=R(1);const f=R(0),g=L(l);if((g||!g&&!i)&&((Y(l)!=="body"||Q(s))&&(u=ue(l)),L(l))){const h=I(l);d=H(l),f.x=h.x+l.clientLeft,f.y=h.y+l.clientTop}const v=s&&!g&&!i?Fe(s,u,!0):R(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:n.y*d.y-u.scrollTop*d.y+f.y+v.y}}function dt(t){return Array.from(t.getClientRects())}function ft(t){const o=$(t),n=ue(t),l=t.ownerDocument.body,r=j(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),i=j(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let s=-n.scrollLeft+ye(t);const a=-n.scrollTop;return M(l).direction==="rtl"&&(s+=j(o.clientWidth,l.clientWidth)-r),{width:r,height:i,x:s,y:a}}function mt(t,o){const n=_(t),l=$(t),r=n.visualViewport;let i=l.clientWidth,s=l.clientHeight,a=0,u=0;if(r){i=r.width,s=r.height;const d=he();(!d||d&&o==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}return{width:i,height:s,x:a,y:u}}function pt(t,o){const n=I(t,!0,o==="fixed"),l=n.top+t.clientTop,r=n.left+t.clientLeft,i=L(t)?H(t):R(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,u=r*i.x,d=l*i.y;return{width:s,height:a,x:u,y:d}}function Ee(t,o,n){let l;if(o==="viewport")l=mt(t,n);else if(o==="document")l=ft($(t));else if(O(o))l=pt(o,n);else{const r=ze(t);l={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return re(l)}function Pe(t,o){const n=z(t);return n===o||!O(n)||q(n)?!1:M(n).position==="fixed"||Pe(n,o)}function gt(t,o){const n=o.get(t);if(n)return n;let l=Z(t,[],!1).filter(a=>O(a)&&Y(a)!=="body"),r=null;const i=M(t).position==="fixed";let s=i?z(t):t;for(;O(s)&&!q(s);){const a=M(s),u=ge(s);!u&&a.position==="fixed"&&(r=null),(i?!u&&!r:!u&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Q(s)&&!u&&Pe(t,s))?l=l.filter(f=>f!==s):r=a,s=z(s)}return o.set(t,l),l}function ht(t){let{element:o,boundary:n,rootBoundary:l,strategy:r}=t;const s=[...n==="clippingAncestors"?ce(o)?[]:gt(o,this._c):[].concat(n),l],a=s[0],u=s.reduce((d,f)=>{const g=Ee(o,f,r);return d.top=j(g.top,d.top),d.right=oe(g.right,d.right),d.bottom=oe(g.bottom,d.bottom),d.left=j(g.left,d.left),d},Ee(o,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function vt(t){const{width:o,height:n}=Te(t);return{width:o,height:n}}function yt(t,o,n){const l=L(o),r=$(o),i=n==="fixed",s=I(t,!0,i,o);let a={scrollLeft:0,scrollTop:0};const u=R(0);if(l||!l&&!i)if((Y(o)!=="body"||Q(r))&&(a=ue(o)),l){const v=I(o,!0,i,o);u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}else r&&(u.x=ye(r));const d=r&&!l&&!i?Fe(r,a):R(0),f=s.left+a.scrollLeft-u.x-d.x,g=s.top+a.scrollTop-u.y-d.y;return{x:f,y:g,width:s.width,height:s.height}}function fe(t){return M(t).position==="static"}function Ce(t,o){if(!L(t)||M(t).position==="fixed")return null;if(o)return o(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function je(t,o){const n=_(t);if(ce(t))return n;if(!L(t)){let r=z(t);for(;r&&!q(r);){if(O(r)&&!fe(r))return r;r=z(r)}return n}let l=Ce(t,o);for(;l&&st(l)&&fe(l);)l=Ce(l,o);return l&&q(l)&&fe(l)&&!ge(l)?n:l||it(t)||n}const wt=async function(t){const o=this.getOffsetParent||je,n=this.getDimensions,l=await n(t.floating);return{reference:yt(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function kt(t){return M(t).direction==="rtl"}const xt={convertOffsetParentRelativeRectToViewportRelativeRect:ut,getDocumentElement:$,getClippingRect:ht,getOffsetParent:je,getElementRects:wt,getClientRects:dt,getDimensions:vt,getScale:H,isElement:O,isRTL:kt};function We(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function bt(t,o){let n=null,l;const r=$(t);function i(){var a;clearTimeout(l),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const d=t.getBoundingClientRect(),{left:f,top:g,width:v,height:h}=d;if(a||o(),!v||!h)return;const m=te(g),y=te(r.clientWidth-(f+v)),x=te(r.clientHeight-(g+h)),E=te(f),V={rootMargin:-m+"px "+-y+"px "+-x+"px "+-E+"px",threshold:j(0,oe(1,u))||1};let B=!0;function S(A){const D=A[0].intersectionRatio;if(D!==u){if(!B)return s();D?s(!1,D):l=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!We(d,t.getBoundingClientRect())&&s(),B=!1}try{n=new IntersectionObserver(S,{...V,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,V)}n.observe(t)}return s(!0),i}function Et(t,o,n,l){l===void 0&&(l={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=l,d=ve(t),f=r||i?[...d?Z(d):[],...Z(o)]:[];f.forEach(E=>{r&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const g=d&&a?bt(d,n):null;let v=-1,h=null;s&&(h=new ResizeObserver(E=>{let[b]=E;b&&b.target===d&&h&&(h.unobserve(o),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var V;(V=h)==null||V.observe(o)})),n()}),d&&!u&&h.observe(d),h.observe(o));let m,y=u?I(t):null;u&&x();function x(){const E=I(t);y&&!We(y,E)&&n(),y=E,m=requestAnimationFrame(x)}return n(),()=>{var E;f.forEach(b=>{r&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),g==null||g(),(E=h)==null||E.disconnect(),h=null,u&&cancelAnimationFrame(m)}}const Be=lt,Ve=rt,Ne=ot,Se=(t,o,n)=>{const l=new Map,r={platform:xt,...n},i={...r.platform,_c:l};return tt(t,o,{...r,platform:i})},Ct=["data-opened"],Bt={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},Ie=e.defineComponent({__name:"OneDropdownAuto",props:J.dropdownProps,emits:["open","close"],setup(t,{emit:o}){const n=t,l=e.ref(!1),r=e.ref(null),i=e.ref(null);let s=null;e.watch(l,f=>{f&&i.value&&r.value?(Se(i.value,r.value,{placement:n.stick?n.stick:"bottom-start",strategy:"fixed",middleware:[Be(5),Ne(),Ve({padding:8})]}).then(({x:g,y:v})=>{Object.assign(r.value.style,{left:`${g}px`,top:`${v}px`})}),s=Et(i.value,r.value,()=>{Se(i.value,r.value,{placement:n.stick?n.stick:"bottom-start",strategy:"fixed",middleware:[Be(4),Ne(),Ve({padding:8})]}).then(({x:g,y:v})=>{Object.assign(r.value.style,{left:`${g}px`,top:`${v}px`})})})):s&&(s(),s=null)}),e.onBeforeUnmount(()=>{s&&s()});const a=o,u=()=>{l.value=!l.value,l.value?a("open"):a("close")};e.provide("OneDropdown",{onToggle:u});const d=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(f,g)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block","data-opened":l.value},[e.createElementVNode("div",{ref_key:"buttonRef",ref:i},[e.renderSlot(f.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:u,isExpanded:l.value})))],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.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.withDirectives(e.createElementVNode("div",{ref_key:"menuRef",ref:r,class:e.normalizeClass(["menu",d.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",style:{display:"none"}},[f.title?(e.openBlock(),e.createElementBlock("div",Bt,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:u})))],2),[[e.vShow,l.value]])]))],8,Ct))}}),Vt={},Nt={class:"border-t border-secondary-stroke my-1"};function St(t,o){return e.openBlock(),e.createElementBlock("div",Nt)}const At=_e._export_sfc(Vt,[["render",St]]),_t=["onClick"],Ot={class:"grid"},Mt={class:"font-semibold px-3"},Rt={class:"rounded-lg m-3 border"},Lt={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},$t={class:"flex-shrink-0"},Dt={class:"w-full text-left"},Tt={class:"flex-shrink-0"},zt={class:"px-3 py-2"},Ft={class:"text-secondary-content text-left pb-1 text-sm uppercase"},Pt={key:0,class:"space-y-2"},jt=["onClick"],Wt={class:"pl-2"},It={class:"text-sm mt-1"},Kt={class:"text-xs mt-1"},Ae=3,Ht=e.defineComponent({__name:"OneBrowserMenuGrid",props:J.browserMenuProps,setup(t){const o=t,n=()=>{typeof o.onChange=="function"&&o.onChange()},l=e.ref(!1),r=e.computed(()=>o.apps?l.value?o.apps:o.apps.slice(0,Ae):[]),i=()=>{l.value=!l.value},s=a=>{typeof o.onApp=="function"&&o.onApp(a)};return(a,u)=>(e.openBlock(),e.createBlock(J._sfc_main,{stick:"right"},{button:e.withCtx(({onToggle:d,isExpanded:f})=>[e.createElementVNode("button",{onClick:d,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[f?"bg-secondary-25":""]])},[e.createVNode(e.unref(J.render),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${a.iconSize}px; height: ${a.iconSize}px`)},null,8,["style"])],10,_t)]),menu:e.withCtx(()=>{var d,f,g,v;return[e.createElementVNode("div",Ot,[e.createElementVNode("div",Mt,e.toDisplayString((d=a.workspace)==null?void 0:d.title),1),e.createElementVNode("div",Rt,[e.createElementVNode("div",Lt,[e.createElementVNode("div",$t,[e.createVNode(we._sfc_main,{text:((f=a.workspace)==null?void 0:f.name)||"",src:(g=a.workspace)==null?void 0:g.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",Dt,e.toDisplayString((v=a.workspace)==null?void 0:v.name),1),e.createElementVNode("div",Tt,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:n},e.toDisplayString(a.changeLabel),1)])]),u[0]||(u[0]=e.createElementVNode("hr",null,null,-1))])]),e.createElementVNode("div",zt,[e.createElementVNode("div",Ft,e.toDisplayString(a.appsTitle),1),e.createElementVNode("div",null,[a.apps&&a.apps.length?(e.openBlock(),e.createElementBlock("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id,onClick:m=>s(h),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(we._sfc_main,{text:h.name,src:h.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",Wt,[e.createElementVNode("p",It,e.toDisplayString(h.name),1),e.createElementVNode("p",Kt,e.toDisplayString(h.short),1)])],8,jt))),128))])):e.createCommentVNode("",!0),a.apps&&a.apps.length>Ae?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:i,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},e.toDisplayString(l.value?"Приховати":"Дивитися всі"),1)):e.createCommentVNode("",!0)])])]}),_:1}))}}),Ke={useModal:{required:!0,type:Object},title:{required:!1,type:String},size:{type:String,default:"medium"},onClose:{type:Function},classModal:{type:Boolean,default:!1},titleCenter:{type:Boolean,default:!1},classTitle:{type:String,default:""},canClose:{type:Function,default:()=>!0},customWidth:{type:String,default:""}},Ut={"3xs":["max-w-xs"],xs:["max-w-sm"],sm:["max-w-md"],small:["max-w-lg"],md:["max-w-xl"],medium:["max-w-xl"],large:["max-w-2xl"],xl:["max-w-3xl"],"2xl":["max-w-4xl"],"3xl":["max-w-4xl"],"4xl":["max-w-5xl"],"5xl":["max-w-5xl"],"7xl":["max-w-7xl"]},qt=(t="medium")=>{const o=[];return o.push(...Ut[t]??[]),o},Yt={class:"relative bg-white rounded-lg shadow h-full"},Xt=e.defineComponent({__name:"OneModal",props:Ke,emits:["isOpen","closed"],setup(t,{expose:o,emit:n}){const l=t,r=n,i=e.computed(()=>{var y,x;const m=l.useModal;return((y=m==null?void 0:m.isOpened)==null?void 0:y.value)??((x=m==null?void 0:m.isOpen)==null?void 0:x.value)??!1}),s=e.computed(()=>qt(l.size)),a=e.computed(()=>l.customWidth?{width:l.customWidth}:{}),u=e.ref(null),d=e.ref(!1);function f(m){d.value=!1,u.value&&!u.value.contains(m.target)&&(d.value=!0)}function g(m){d.value&&u.value&&!u.value.contains(m.target)&&v()}const v=()=>{var y,x;if(l.canClose&&!l.canClose())return;const m=l.useModal;(y=m==null?void 0:m.close)==null||y.call(m),(x=l.onClose)==null||x.call(l),r("closed"),r("isOpen")};return o({open:()=>{var y;const m=l.useModal;(y=m==null?void 0:m.open)==null||y.call(m),r("isOpen")},close:v}),(m,y)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,tabindex:"-1",onMousedown:f,onMouseup:g,class:e.normalizeClass(["modal backdrop !m-0",{"modal-mobile":m.classModal}])},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full max-h-full",s.value,{"fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal":m.classModal}]),style:e.normalizeStyle(a.value),ref_key:"modalContent",ref:u},[e.createElementVNode("div",Yt,[m.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([m.titleCenter?"grid grid-cols-4":"flex items-start justify-between","p-3 border-b rounded-t",m.classTitle])},[e.createElementVNode("h3",{class:e.normalizeClass(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis",m.titleCenter?"col-span-2 text-center col-start-2":""])},e.toDisplayString(m.title),3),e.createElementVNode("button",{type:"button",class:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",onClick:v},y[0]||(y[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))],2)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"header",{},void 0,!0),e.renderSlot(m.$slots,"body",{},void 0,!0),e.renderSlot(m.$slots,"default",{},void 0,!0),e.renderSlot(m.$slots,"footer",{close:v},void 0,!0)])],6)],34)):e.createCommentVNode("",!0)}});const He=_e._export_sfc(Xt,[["__scopeId","data-v-3560b61e"]]);function Ue(t=!1){const o=e.ref(t),n=e.ref(void 0);let l=null;const r=()=>{l&&(clearTimeout(l),l=null),o.value=!1,n.value=void 0},i=u=>{n.value=u,o.value=!0},s=u=>{l&&clearTimeout(l),l=setTimeout(r,u*1e3)},a=u=>{u.key==="Escape"&&o.value&&r()};return e.onMounted(()=>{document.addEventListener("keydown",a)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",a),l&&clearTimeout(l)}),{isOpened:o,isOpen:o,data:n,open:i,close:r,closeWithDelay:s}}const Gt=["onClick"],Jt=["onKeydown"],Zt={key:0,class:"text-sm font-medium text-gray-700 px-3 pt-2.5 pb-1.5"},Qt={key:1,class:"px-3 py-2"},eo={class:"relative"},to=["placeholder"],oo={key:2,class:"border-b border-gray-100"},no=["onClick"],lo={key:3,class:"flex items-center justify-between px-3 py-1.5 border-b border-gray-100"},ro={key:4,class:"flex justify-center py-4"},so=["aria-selected","onClick"],io={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},ao={key:1,class:"w-4 h-4 shrink-0"},co=["aria-selected","onClick","onMouseenter"],uo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},fo={key:1,class:"w-4 h-4 shrink-0"},mo=["aria-selected","onClick","onMouseenter"],po={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},go={key:1,class:"w-4 h-4 shrink-0"},ho={key:3,class:"px-3 py-4 text-sm text-gray-500 text-center"},vo={class:"pb-6"},yo={key:0,class:"relative px-3 py-3"},wo={class:"relative"},ko=["placeholder"],xo={key:1,class:"px-3 py-2"},bo={key:2,class:"flex items-center justify-between px-3 py-2 border-b border-gray-100"},Eo={key:3,class:"flex justify-center py-8"},Co={key:4,class:"overflow-auto h-[60dvh] divide-y",role:"listbox"},Bo=["aria-selected"],Vo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},No={key:1,class:"w-5 h-5 shrink-0"},So=["aria-selected","onClick"],Ao={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},_o={key:1,class:"w-5 h-5 shrink-0"},Oo=["aria-selected","onClick"],Mo={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},Ro={key:1,class:"w-5 h-5 shrink-0"},Lo={key:3,class:"px-3 py-8 text-sm text-gray-500 text-center"},$o=e.defineComponent({__name:"OneDropdownSelect",props:J.dropdownSelectProps,emits:["update:modelValue","search","create"],setup(t,{emit:o}){const n=t,l=o,r=e.ref(!1);let i=null;e.onMounted(()=>{i=window.matchMedia("(max-width: 767px)"),r.value=i.matches;const c=p=>{r.value=p.matches};i.addEventListener("change",c),e.onUnmounted(()=>{i==null||i.removeEventListener("change",c)})});const s=Ue(),a=e.ref(null),u=()=>{d.value="",f.value=-1,s.open(),e.nextTick(()=>{var c;(c=a.value)==null||c.focus()})},d=e.ref(""),f=e.ref(-1),g=e.ref(null),v=e.ref(null),h=e.ref({}),m=(c,p)=>{c&&(h.value[p]=c)},y=e.computed(()=>n.allowEmpty?1:0),x=e.computed(()=>{if(!d.value.trim())return n.items;const c=d.value.toLowerCase();return n.items.filter(p=>String(p[n.labelKey]??"").toLowerCase().includes(c))}),E=e.computed(()=>{if(!n.groupKey)return[];const c=[],p=new Map;let k=y.value;for(const w of x.value){const C=String(w[n.groupKey]??"");let N=p.get(C);N||(N={label:C,entries:[]},p.set(C,N),c.push(N)),N.entries.push({item:w,flatIndex:k}),k++}return c}),b=e.computed(()=>n.multiple?(n.modelValue??[]).length>0:n.modelValue!==null&&n.modelValue!==void 0),V=e.computed(()=>{if(n.multiple){const c=n.modelValue??[];return c.length===0?n.placeholder:c.length===1?c[0][n.labelKey]??n.placeholder:`${c[0][n.labelKey]} +${c.length-1}`}return n.modelValue===null||n.modelValue===void 0?n.placeholder:n.modelValue[n.labelKey]??n.placeholder}),B=c=>n.modelValue?n.multiple?n.modelValue.some(k=>k[n.valueKey]===c[n.valueKey]):n.modelValue[n.valueKey]===c[n.valueKey]:!1,S=e.computed(()=>x.value.length+y.value),A=(c,p)=>{if(n.multiple){const k=(n.modelValue??[]).slice();if(c===null){l("update:modelValue",[]);return}const w=k.findIndex(C=>C[n.valueKey]===c[n.valueKey]);w>=0?k.splice(w,1):k.push(c),l("update:modelValue",k);return}l("update:modelValue",c),p()},D=()=>{l("update:modelValue",[...n.items])},K=()=>{l("update:modelValue",[])},F=c=>{l("create",d.value),c()},P=()=>{d.value="",f.value=-1,e.nextTick(()=>{var c;(c=g.value)==null||c.focus()})},ee=()=>{d.value="",f.value=-1},X=()=>{f.value=0,l("search",d.value)},G=()=>{e.nextTick(()=>{const c=h.value[f.value];c&&c.scrollIntoView({block:"nearest"})})},T=(c,p)=>{switch(c.key){case"ArrowDown":c.preventDefault(),f.value<S.value-1?f.value++:f.value=0,G();break;case"ArrowUp":c.preventDefault(),f.value>0?f.value--:f.value=S.value-1,G();break;case"Enter":if(c.preventDefault(),f.value>=0)if(n.allowEmpty&&f.value===0)A(null,p);else{const k=f.value-y.value,w=x.value[k];w&&A(w,p)}break;case"Escape":c.preventDefault(),p();break}};return e.watch(d,()=>{f.value=0}),(c,p)=>r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(c.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:u,isExpanded:e.unref(s).isOpened.value,selectedLabel:V.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[c.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]"]]),style:e.normalizeStyle(c.maxWidth?{maxWidth:c.maxWidth}:void 0),onClick:u},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",c.view==="pill"?"":b.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(V.value),3),p[13]||(p[13]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-gray-400 shrink-0"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})],-1))],6)]),e.unref(s).isOpened.value?(e.openBlock(),e.createBlock(e.unref(He),{key:0,useModal:e.unref(s),title:c.title||c.placeholder,size:"sm",classModal:!0,titleCenter:!0},{default:e.withCtx(()=>[e.createElementVNode("div",vo,[c.searchable?(e.openBlock(),e.createElementBlock("div",yo,[e.createElementVNode("div",wo,[p[14]||(p[14]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"mobileSearchInputRef",ref:a,"onUpdate:modelValue":p[2]||(p[2]=k=>d.value=k),type:"text",placeholder:c.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-2 pl-8 pr-3 text-sm outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",onInput:X},null,40,ko),[[e.vModelText,d.value]])])])):e.createCommentVNode("",!0),c.createLabel?(e.openBlock(),e.createElementBlock("div",xo,[e.createElementVNode("button",{class:"w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",onClick:p[3]||(p[3]=k=>F(()=>e.unref(s).close()))},[p[15]||(p[15]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(c.createLabel),1)])])):e.createCommentVNode("",!0),c.multiple?(e.openBlock(),e.createElementBlock("div",bo,[e.createElementVNode("button",{class:"text-sm text-blue-600 hover:text-blue-800 transition-colors",onClick:D},"Обрати все"),b.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-sm text-gray-500 hover:text-gray-700 transition-colors",onClick:K},"Очистити")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.isLoading?(e.openBlock(),e.createElementBlock("div",Eo,p[16]||(p[16]=[e.createElementVNode("div",{class:"animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full"},null,-1)]))):(e.openBlock(),e.createElementBlock("div",Co,[c.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors",b.value?"":"bg-gray-50 font-medium"]),role:"option","aria-selected":!b.value,onClick:p[4]||(p[4]=k=>A(null,()=>e.unref(s).close()))},[b.value?(e.openBlock(),e.createElementBlock("span",No)):(e.openBlock(),e.createElementBlock("svg",Vo,p[17]||(p[17]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))),e.createElementVNode("span",null,e.toDisplayString(c.emptyLabel??c.placeholder),1)],10,Bo)):e.createCommentVNode("",!0),c.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(E.value,(k,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k.label},[k.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-3 pt-3 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide",w>0?"border-t border-gray-100":""])},e.toDisplayString(k.label),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.entries,C=>(e.openBlock(),e.createElementBlock("button",{key:C.item[c.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",B(C.item)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":B(C.item),onClick:N=>A(C.item,()=>e.unref(s).close())},[B(C.item)?(e.openBlock(),e.createElementBlock("svg",Ao,p[18]||(p[18]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))):(e.openBlock(),e.createElementBlock("span",_o)),e.renderSlot(c.$slots,"item",e.mergeProps({ref_for:!0},{item:C.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(C.item[c.labelKey]),1)])],10,So))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(x.value,k=>(e.openBlock(),e.createElementBlock("button",{key:k[c.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",B(k)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":B(k),onClick:w=>A(k,()=>e.unref(s).close())},[B(k)?(e.openBlock(),e.createElementBlock("svg",Mo,p[19]||(p[19]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))):(e.openBlock(),e.createElementBlock("span",Ro)),e.renderSlot(c.$slots,"item",e.mergeProps({ref_for:!0},{item:k}),()=>[e.createElementVNode("span",null,e.toDisplayString(k[c.labelKey]),1)])],10,Oo))),128)),x.value.length===0&&!c.allowEmpty?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(c.$slots,"empty",{},()=>[p[20]||(p[20]=e.createTextVNode(" Nothing found "))])])):e.createCommentVNode("",!0)]))])]),_:3},8,["useModal","title"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(Ie,{key:0,stick:c.stick,onOpen:P,onClose:ee},{button:e.withCtx(({onToggle:k,isExpanded:w})=>[e.renderSlot(c.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:k,isExpanded:w,selectedLabel:V.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[c.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]",c.view==="default"&&w?"ring-1 ring-blue-500 border-blue-500":""]]),style:e.normalizeStyle(c.maxWidth?{maxWidth:c.maxWidth}:void 0),onClick:k},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",c.view==="pill"?"":b.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(V.value),3),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:e.normalizeClass(["w-4 h-4 text-gray-400 transition-transform shrink-0",w?"rotate-180":""])},p[5]||(p[5]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"},null,-1)]),2))],14,Gt)])]),menu:e.withCtx(({onToggle:k})=>[e.createElementVNode("div",{class:"min-w-[240px] w-full",onKeydown:w=>T(w,k)},[c.title?(e.openBlock(),e.createElementBlock("div",Zt,e.toDisplayString(c.title),1)):e.createCommentVNode("",!0),c.searchable?(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("div",eo,[p[6]||(p[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:g,"onUpdate:modelValue":p[0]||(p[0]=w=>d.value=w),type:"text",placeholder:c.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-1.5 pl-8 pr-3 text-sm outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",onInput:X},null,40,to),[[e.vModelText,d.value]])])])):e.createCommentVNode("",!0),c.createLabel?(e.openBlock(),e.createElementBlock("div",oo,[e.createElementVNode("button",{class:"flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",onClick:w=>F(k)},[p[7]||(p[7]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(c.createLabel),1)],8,no)])):e.createCommentVNode("",!0),c.multiple?(e.openBlock(),e.createElementBlock("div",lo,[e.createElementVNode("button",{class:"text-xs text-blue-600 hover:text-blue-800 transition-colors",onClick:D},"Обрати все"),b.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-xs text-gray-500 hover:text-gray-700 transition-colors",onClick:K},"Очистити")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.isLoading?(e.openBlock(),e.createElementBlock("div",ro,p[8]||(p[8]=[e.createElementVNode("svg",{class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)]))):(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"listRef",ref:v,class:"max-h-[300px] overflow-y-auto",role:"listbox"},[c.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,ref:w=>m(w,0),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors",[b.value?"hover:bg-gray-50":"bg-gray-100 font-medium",f.value===0?"bg-gray-50":""]]),role:"option","aria-selected":!b.value,onClick:w=>A(null,k),onMouseenter:p[1]||(p[1]=w=>f.value=0)},[b.value?(e.openBlock(),e.createElementBlock("span",ao)):(e.openBlock(),e.createElementBlock("svg",io,p[9]||(p[9]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))),e.createElementVNode("span",null,e.toDisplayString(c.emptyLabel??c.placeholder),1)],42,so)):e.createCommentVNode("",!0),c.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(E.value,(w,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:w.label},[w.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide",C>0?"border-t border-gray-100 mt-1":""])},e.toDisplayString(w.label),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.entries,N=>(e.openBlock(),e.createElementBlock("button",{key:N.item[c.valueKey],ref_for:!0,ref:de=>m(de,N.flatIndex),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[B(N.item)?"bg-gray-100 font-medium":"hover:bg-gray-50",f.value===N.flatIndex?"bg-gray-50":""]]),role:"option","aria-selected":B(N.item),onClick:de=>A(N.item,k),onMouseenter:de=>f.value=N.flatIndex},[B(N.item)?(e.openBlock(),e.createElementBlock("svg",uo,p[10]||(p[10]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))):(e.openBlock(),e.createElementBlock("span",fo)),e.renderSlot(c.$slots,"item",e.mergeProps({ref_for:!0},{item:N.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(N.item[c.labelKey]),1)])],42,co))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(x.value,(w,C)=>(e.openBlock(),e.createElementBlock("button",{key:w[c.valueKey],ref_for:!0,ref:N=>m(N,y.value+C),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[B(w)?"bg-gray-100 font-medium":"hover:bg-gray-50",f.value===y.value+C?"bg-gray-50":""]]),role:"option","aria-selected":B(w),onClick:N=>A(w,k),onMouseenter:N=>f.value=y.value+C},[B(w)?(e.openBlock(),e.createElementBlock("svg",po,p[11]||(p[11]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)]))):(e.openBlock(),e.createElementBlock("span",go)),e.renderSlot(c.$slots,"item",e.mergeProps({ref_for:!0},{item:w}),()=>[e.createElementVNode("span",null,e.toDisplayString(w[c.labelKey]),1)])],42,mo))),128)),x.value.length===0&&!c.allowEmpty?(e.openBlock(),e.createElementBlock("div",ho,[e.renderSlot(c.$slots,"empty",{},()=>[p[12]||(p[12]=e.createTextVNode(" Nothing found "))])])):e.createCommentVNode("",!0)],512))],40,Jt)]),_:3},8,["stick"]))}});exports.OneDropdownDivider=At;exports.OneModal=He;exports._sfc_main=Ie;exports._sfc_main$1=Ht;exports._sfc_main$2=$o;exports.modalProps=Ke;exports.useModal=Ue;
|