@oneb/ui-vue 0.3.20 → 0.3.21
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-7f53fa30.cjs +1 -0
- package/dist/{OneHelpMenu-d7a39a69.js → OneHelpMenu-a9131cb1.js} +241 -220
- package/dist/dataTable/dataTable.d.ts +1 -1
- package/dist/dropdown/dropdown.d.ts +8 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +2 -2
- package/dist/icons/unsorted/SidebarLeftCollapseIcon.d.ts +3 -0
- package/dist/icons/unsorted/SidebarLeftCollapseIcon.js +23 -0
- package/dist/icons/unsorted/esm/SidebarLeftCollapseIcon.d.ts +3 -0
- package/dist/icons/unsorted/esm/SidebarLeftCollapseIcon.js +23 -0
- package/dist/icons/unsorted/esm/index.d.ts +2 -1
- package/dist/icons/unsorted/esm/index.js +2 -1
- package/dist/icons/unsorted/index.d.ts +2 -1
- package/dist/icons/unsorted/index.js +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +64 -63
- package/dist/layout/OneIsland.vue.d.ts +2 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +1010 -526
- package/dist/layout/layout.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/tooltip/index.cjs +47 -1
- package/dist/tooltip/index.js +97 -13
- package/package.json +1 -1
- package/dist/OneHelpMenu-66a2d4c2.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),b=require("./floating-ui.dom-2121a4fd.cjs"),P=require("@floating-ui/vue"),w=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),A=require("./XMarkIcon-f94baa4c.cjs"),F=require("./ChevronDownIcon-6889ac87.cjs"),E=require("./ChevronRightIcon-7a2f0c20.cjs"),q=require("./button/index.cjs"),L=require("./_plugin-vue_export-helper-f246444f.cjs"),D={title:{type:String},stick:{type:String,default:"right"},appendBody:{type:Boolean,default:!1},trigger:{type:String,default:"click"},offset:{type:Number,default:5}},T={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},H={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"}},I=["data-opened"],R={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},U={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},z=e.defineComponent({__name:"OneDropdown",props:D,emits:["open","close"],setup(k,{emit:p}){const a=e.ref(!1),m=e.ref(null),c=e.ref(null),n=e.ref(null),i=p,o=k,d=()=>{a.value=!a.value,a.value?i("open"):i("close")};let s=null;const f=()=>{o.trigger==="hover"&&(s&&(clearTimeout(s),s=null),a.value||(a.value=!0,i("open")))},v=()=>{o.trigger==="hover"&&(s=setTimeout(()=>{a.value&&(a.value=!1,i("close"))},100))};e.provide("OneDropdown",{onToggle:d});let h=null;function l(){!c.value||!n.value||b.computePosition(c.value,n.value,{placement:o.stick?o.stick:"bottom-start",strategy:"fixed",middleware:[b.offset(o.offset),P.flip(),b.shift({padding:8})]}).then(({x:t,y})=>{n.value&&Object.assign(n.value.style,{left:`${t}px`,top:`${y}px`,visibility:"visible"})})}e.watch(a,async t=>{o.appendBody&&(t?(await e.nextTick(),c.value&&n.value&&(n.value.style.visibility="hidden",l(),h=b.autoUpdate(c.value,n.value,l))):h&&(h(),h=null))}),e.onBeforeUnmount(()=>{h&&h()});const u=e.computed(()=>{var _;if(o.appendBody)return"";const t=(_=m.value)==null?void 0:_.getBoundingClientRect(),y=t?t.x<270:!1;return t&&t.top+270>window.innerHeight?"up"+(y?"-right":"-left"):"down"+(y?"-right":"-left")}),g=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 u.value.startsWith("up")?t.push("bottom-1 mb-10"):u.value.startsWith("down")&&t.push("top-1 mt-10"),o.stick==="right"?t.push("right-0"):o.stick==="left"&&t.push("left-0"),t}),x=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(t,y)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:m,"data-opened":a.value,onMouseenter:f,onMouseleave:v},[e.createElementVNode("div",{ref_key:"buttonRef",ref:c},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:d,isExpanded:a.value})))],512),o.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[a.value&&t.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:d})):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(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:n,class:e.normalizeClass(["menu",x.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",onMouseenter:f,onMouseleave:v},[t.title?(e.openBlock(),e.createElementBlock("div",R,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:d})))],34)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.value&&t.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:d})):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(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[t.title?(e.openBlock(),e.createElementBlock("div",U,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:d})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],40,I))}}),V=e.defineComponent({__name:"OneDropdownItem",props:T,emits:["click"],setup(k,{emit:p}){const a=p,m=k,c=e.inject("OneDropdown"),n=()=>{c!==void 0&&c.onToggle(),a("click")},i=e.computed(()=>{const o=[];return m.variant==="secondary"?o.push("text-secondary-content hover:bg-secondary-body-hover"):m.variant==="danger"?o.push("text-danger-content hover:bg-danger-10"):m.variant==="warning"?o.push("text-warning-content hover:bg-warning-10"):m.variant==="info"?o.push("text-info-content hover:bg-info-10"):o.push("hover:bg-secondary-body-hover"),o});return(o,d)=>(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(n,["prevent"])},[o.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(o.label),1)],2))}});function W(k,p){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 K={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}},M={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}},X={help:{type:Object,required:!0}},G=["onClick"],J={class:"flex flex-col items-center pt-5 pb-2 h-full"},Q={class:"flex flex-col px-10 py-1 mt-2 text-center"},Y={class:"self-center text-base font-medium tracking-wide text-black"},Z={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},ee={class:"text-left w-full mt-5 px-3"},te={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},oe=e.defineComponent({__name:"OneUserMenu",props:K,setup(k){const p=k,a=e.computed(()=>{var n;return(n=p.menu)==null?void 0:n.map(i=>{let o={label:i.label};i.icon!=null&&(o={...o,icon:i.icon});const d=typeof i.click=="function"?i.click:()=>{};return{key:i.label,args:o,click:d}})}),m=()=>{typeof p.onAccount=="function"&&p.onAccount()},c=()=>{typeof p.onLogout=="function"&&p.onLogout()};return(n,i)=>(e.openBlock(),e.createBlock(z,{stick:"right"},{button:e.withCtx(({onToggle:o,isExpanded:d})=>{var s,f;return[e.createElementVNode("button",{onClick:o,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[d?"bg-secondary-25":""]])},[e.createVNode(w._sfc_main,{text:((s=n.user)==null?void 0:s.name)||"",size:n.iconSize,src:(f=n.user)==null?void 0:f.photo_url,rounded:!0},null,8,["text","size","src"])],10,G)]}),menu:e.withCtx(()=>{var o,d,s,f,v;return[e.createElementVNode("div",J,[e.createVNode(w._sfc_main,{text:((o=n.user)==null?void 0:o.name)||"",size:80,src:(d=n.user)==null?void 0:d.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",Q,[e.createElementVNode("div",Y,e.toDisplayString((s=n.user)==null?void 0:s.name),1),e.createElementVNode("div",Z,e.toDisplayString((f=n.user)==null?void 0:f.email),1)]),typeof p.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:m,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(n.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,h=>(e.openBlock(),e.createBlock(V,e.mergeProps({key:h.key},{ref_for:!0},h.args,{onClick:h.click}),null,16,["onClick"]))),128)),typeof n.onLogout=="function"?(e.openBlock(),e.createBlock(V,{key:0,icon:e.unref(W),label:n.logoutLabel,class:"rounded py-3",onClick:c},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",te,e.toDisplayString((v=n.app)==null?void 0:v.version),1)])]}),_:1}))}});function j(k,p){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 ne=["data-opened"],le={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},re={class:"flex justify-between items-center pt-3 mb-3"},se={class:"font-semibold text-xl px-3"},ce={class:"grid"},ae={class:"rounded-lg m-3 border"},ie={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},de={class:"flex justify-between relative"},ue={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},pe={key:0},me={class:"text-xs font-semibold"},fe={class:"px-3 py-2"},he={class:"text-secondary-content text-left pb-1 text-xs uppercase"},ke={class:"overflow-auto max-h-full"},ve={key:0,class:"space-y-2"},ge=["onClick"],ye={class:"flex"},xe={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},_e={class:"pl-2"},we={class:"text-sm mt-1 font-semibold"},be={class:"text9 mt-1"},Be={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},Ee=e.defineComponent({__name:"OneBrowserMenu",props:M,emits:["open","close"],setup(k,{emit:p}){const a=p,m=k,c=e.ref(!1),n=()=>{c.value=!c.value,c.value?a("open"):a("close")},i=e.ref(!1);e.computed(()=>i.value?E.render:F.render);const o=()=>{typeof m.onChange=="function"&&m.onChange()},d=s=>{typeof m.onApp=="function"&&m.onApp(s)};return(s,f)=>{var v,h,l,u,g,x;return e.openBlock(),e.createElementBlock("div",{"data-opened":c.value},[e.createElementVNode("button",{onClick:n,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":c.value}])},[e.createVNode(e.unref(j),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:n})):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,e.toDisplayString((v=s.workspace)==null?void 0:v.title),1),e.createVNode(e.unref(A.render),{class:"w-6 cursor-pointer",onClick:n})]),e.createElementVNode("div",ce,[e.createElementVNode("div",ae,[e.createElementVNode("div",ie,[e.createElementVNode("div",de,[e.createVNode(w._sfc_main,{text:((h=s.workspace)==null?void 0:h.name)||"",src:(l=s.workspace)==null?void 0:l.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ue,e.toDisplayString((u=s.workspace)==null?void 0:u.name),1)]),i.value?(e.openBlock(),e.createElementBlock("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.workspaces,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(w._sfc_main,{text:t.name,src:t.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",me,e.toDisplayString(t.name),1)]))),128))])):e.createCommentVNode("",!0),f[0]||(f[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:o,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((g=s.workspace)==null?void 0:g.changeLabel),1)])]),e.createElementVNode("div",fe,[e.createElementVNode("div",he,e.toDisplayString((x=s.workspace)==null?void 0:x.appsLabel),1),e.createElementVNode("div",ke,[s.apps&&s.apps.length?(e.openBlock(),e.createElementBlock("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.apps,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,onClick:y=>d(t),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",ye,[e.createElementVNode("div",xe,[e.createVNode(w._sfc_main,{text:t.name,src:t.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",_e,[e.createElementVNode("p",we,e.toDisplayString(t.name),1),e.createElementVNode("p",be,e.toDisplayString(t==null?void 0:t.short),1)])]),e.createElementVNode("div",null,[e.createVNode(q.OneButton,{variant:"touch",icon:e.unref(E.render$1),onClick:y=>d(t)},null,8,["icon","onClick"])])],8,ge))),128))])):e.createCommentVNode("",!0),s.apps&&s.apps.length?(e.openBlock(),e.createElementBlock("button",Be,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,ne)}}});const Ve=L._export_sfc(Ee,[["__scopeId","data-v-9e75279e"]]);function Ne(k,p){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 Ce(k,p){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 O(k,p){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 Se=["data-opened"],$e={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ae={class:"flex justify-between items-center pt-3 mb-3"},Fe={class:"font-semibold text-xl px-3"},Le={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},De=["onClick"],ze={class:"uppercase text-[8px]"},Me={class:"overflow-y-auto grid rounded-xl"},je={class:"max-h-full bg-[#FAFAFA]"},Oe={key:0,class:"space-y-2"},Pe=["onClick"],qe={class:"flex"},Te={class:"pl-2"},He={class:"text-sm mt-1 font-semibold"},Ie={class:"text-[10px] mt-1 text-[#979CA9]"},Re={class:"mt-auto"},Ue={key:0},We=["onClick"],Ke={class:"flex items-center space-x-3"},Xe={class:"h-16"},Ge={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},Je={class:"flex justify-between"},Qe=["onClick"],Ye={key:0,class:"tooltip-text min-w-[70px]"},Ze={class:"flex justify-between mb-4"},et=["href"],tt={class:"flex flex-nowrap items-center w-max h-[24px]"},ot={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},nt={class:"py-[8px] pl-0 pr-[8px]"},lt=e.defineComponent({__name:"OneHelpMenu",props:X,emits:["open","close"],setup(k,{emit:p}){const a=p,m=k,c=e.ref(!1),n=()=>{c.value=!c.value,c.value?a("open"):a("close")},i=e.computed(()=>v.value?E.render:F.render),o=e.ref(3),d=e.computed(()=>{var u,g;const l=((g=(u=m.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;return o.value===l});e.computed(()=>{var u;return(((u=m.help)==null?void 0:u.helpList)||[]).slice(0,o.value)});const s=()=>{var u,g;const l=((g=(u=m.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;o.value=d.value?3:l},f=(l,u)=>{l&&u&&typeof u.openLink=="function"?u.openLink(u):l&&window.open(l,"_blank")},v=e.ref(!1),h=()=>{v.value=!v.value};return(l,u)=>{var g,x,t,y,_,N,C,S,$;return e.openBlock(),e.createElementBlock("div",{"data-opened":c.value},[e.createElementVNode("button",{onClick:n,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":c.value}])},[e.createVNode(e.unref(Ne),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),c.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:n})):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ae,[e.createElementVNode("div",Fe,e.toDisplayString((g=l.help)==null?void 0:g.label),1),e.createVNode(e.unref(A.render),{class:"w-6 cursor-pointer",onClick:n})]),(x=l.help)!=null&&x.helpButton?(e.openBlock(),e.createElementBlock("div",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((t=l.help)==null?void 0:t.helpButton,r=>(e.openBlock(),e.createElementBlock("button",{key:r.name,onClick:B=>f(r.link,r),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(r==null?void 0:r.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",ze,e.toDisplayString(r.name),1)],8,De))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.createElementVNode("div",je,[(y=l.help)!=null&&y.helpList&&l.help.helpList.length?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.helpList,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,onClick:B=>f(r.link,r),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",qe,[e.createElementVNode("div",Te,[e.createElementVNode("p",He,e.toDisplayString(r.name),1),e.createElementVNode("p",Ie,e.toDisplayString(r.category),1)])])],8,Pe))),128))])):e.createCommentVNode("",!0)])]),(_=l.help)!=null&&_.helpList&&l.help.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:s,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(d.value?l.help.buttNoMore:l.help.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[(N=l.help)!=null&&N.video?(e.openBlock(),e.createElementBlock("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.video,r=>(e.openBlock(),e.createElementBlock("button",{key:r.id,onClick:B=>f(r.link,r),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(Ce),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(r.name),1)],8,We))),128))])):e.createCommentVNode("",!0),(C=l.help)!=null&&C.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:h,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",Ke,[e.createVNode(e.unref(O),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.help.socialButt),1)]),e.createVNode(e.unref(i),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Xe,[v.value?(e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=l.help)==null?void 0:S.socialList,r=>(e.openBlock(),e.createElementBlock("button",{key:r.id,onClick:B=>f(r.link,r),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[r.name?(e.openBlock(),e.createElementBlock("div",Ye,e.toDisplayString(r.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r==null?void 0:r.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Qe))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($=l.help)==null?void 0:$.termsOffer,r=>(e.openBlock(),e.createElementBlock("a",{key:r.name,target:"_blank",href:r.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",tt,[e.createElementVNode("div",ot,[e.createElementVNode("span",nt,e.toDisplayString(r.name),1)])])],8,et))),128))])])])):e.createCommentVNode("",!0)],8,Se)}}});const rt=L._export_sfc(lt,[["__scopeId","data-v-f5d2b453"]]);exports.OneBrowserMenu=Ve;exports.OneHelpMenu=rt;exports._sfc_main=z;exports._sfc_main$1=V;exports._sfc_main$2=oe;exports.browserMenuProps=M;exports.dropdownProps=D;exports.dropdownSelectProps=H;exports.render=j;exports.render$1=O;
|