@oneb/ui-vue 0.0.52 → 0.0.53
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/OneBrowserMenu-1495ff25.cjs +1 -0
- package/dist/OneBrowserMenu-79471e49.js +526 -0
- package/dist/button/OneButton.vue.d.ts +2 -0
- package/dist/button/SpinnerIcon.vue.d.ts +2 -0
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.js +1 -1
- package/dist/button/util.d.ts +2 -0
- package/dist/card/OneCard.vue.d.ts +2 -0
- package/dist/card/OneCardBody.vue.d.ts +2 -0
- package/dist/card/OneCardFooter.vue.d.ts +2 -0
- package/dist/card/OneCardHeader.vue.d.ts +2 -0
- package/dist/common/OneAvatar.vue.d.ts +2 -0
- package/dist/dropdown/OneBrowserMenu.vue.d.ts +2 -0
- package/dist/dropdown/OneBrowserMenuGrid.vue.d.ts +2 -0
- package/dist/dropdown/OneDropdown.vue.d.ts +2 -0
- package/dist/dropdown/OneDropdownDivider.vue.d.ts +2 -0
- package/dist/dropdown/OneDropdownItem.vue.d.ts +2 -0
- package/dist/dropdown/OneUserMenu.vue.d.ts +2 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.d.ts +1 -0
- package/dist/dropdown/index.js +110 -13
- package/dist/dropdown/menu.d.ts +15 -1
- package/dist/form/OneForm.vue.d.ts +2 -0
- package/dist/form/OneFormFeedback.vue.d.ts +2 -0
- package/dist/form/OneFormField.vue.d.ts +2 -0
- package/dist/form/OneFormInput.vue.d.ts +2 -0
- package/dist/form/OneFormLabel.vue.d.ts +2 -0
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.js +125 -125
- package/dist/{index-f136b5ea.js → index-72d69e4e.js} +51 -51
- package/dist/index-e804f148.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +18 -17
- package/dist/layout/IconOneb.vue.d.ts +2 -0
- package/dist/layout/OneMainLayout.vue.d.ts +2 -0
- package/dist/layout/OneSidebar.vue.d.ts +2 -0
- package/dist/layout/OneSidebarLink.vue.d.ts +2 -0
- package/dist/layout/index.cjs +5 -1
- package/dist/layout/index.js +455 -237
- package/dist/layout/layout.d.ts +71 -11
- package/dist/style.css +1 -1
- package/dist/tailwind.config.cjs +1 -1
- package/dist/tailwind.config.js +1 -1
- package/package.json +1 -1
- package/dist/OneBrowserMenu.vue_vue_type_script_setup_true_lang-2815cdad.cjs +0 -1
- package/dist/OneBrowserMenu.vue_vue_type_script_setup_true_lang-eac975c7.js +0 -438
- package/dist/index-3615f53c.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),f=require("./common/index.cjs"),w=require("./XMarkIcon-f94baa4c.cjs"),_=require("./index-e804f148.cjs"),b=require("./_plugin-vue_export-helper-f246444f.cjs"),E={title:{type:String},stick:{type:String,default:"right"}},V={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},N=["data-opened"],C={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},v=e.defineComponent({__name:"OneDropdown",props:E,emits:["open","close"],setup(i,{emit:s}){const l=e.ref(!1),a=e.ref(null),u=s,n=i,c=()=>{l.value=!l.value,l.value?u("open"):u("close")};e.provide("OneDropdown",{onToggle:c});const t=e.computed(()=>{const r=a.value!=null&&a.value.offsetLeft<270;return a.value!=null&&a.value.offsetTop+270>window.innerHeight?"up"+(r?"-right":"-left"):"down"+(r?"-right":"-left")}),o=e.computed(()=>{const r=["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 t.value.startsWith("up")?r.push("bottom-1 mb-10"):t.value.startsWith("down")&&r.push("top-1 mt-10"),n.stick==="right"?r.push("right-0"):n.stick==="left"&&r.push("left-0"),r});return(r,p)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:a,"data-opened":l.value},[e.renderSlot(r.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:c,isExpanded:l.value}))),l.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(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",o.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[r.title?(e.openBlock(),e.createElementBlock("div",C,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:c})))],2)):e.createCommentVNode("",!0)]),_:3})],8,N))}}),g=e.defineComponent({__name:"OneDropdownItem",props:V,emits:["click"],setup(i,{emit:s}){const l=s,a=i,u=e.inject("OneDropdown"),n=()=>{u!==void 0&&u.onToggle(),l("click")},c=e.computed(()=>{const t=[];return a.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):a.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):a.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):a.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,o)=>(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(n,["prevent"])},[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2))}});function B(i,s){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 S={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}},y={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}},A=["onClick"],$={class:"flex flex-col items-center pt-5 pb-2 h-full"},z={class:"flex flex-col px-10 py-1 mt-2 text-center"},D={class:"self-center text-base font-medium tracking-wide text-black"},O={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},L={class:"text-left w-full mt-5 px-3"},F=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1),j={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},M=e.defineComponent({__name:"OneUserMenu",props:S,setup(i){const s=i,l=e.computed(()=>{var n;return(n=s.menu)==null?void 0:n.map(c=>{let t={label:c.label};c.icon!=null&&(t={...t,icon:c.icon});const o=typeof c.click=="function"?c.click:()=>{};return{key:c.label,args:t,click:o}})}),a=()=>{typeof s.onAccount=="function"&&s.onAccount()},u=()=>{typeof s.onLogout=="function"&&s.onLogout()};return(n,c)=>(e.openBlock(),e.createBlock(v,{stick:"right"},{button:e.withCtx(({onToggle:t,isExpanded:o})=>{var r,p;return[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[o?"bg-secondary-25":""]])},[e.createVNode(f.OneAvatar,{text:((r=n.user)==null?void 0:r.name)||"",size:n.iconSize,src:(p=n.user)==null?void 0:p.photo_url,rounded:!0},null,8,["text","size","src"])],10,A)]}),menu:e.withCtx(()=>{var t,o,r,p,h;return[e.createElementVNode("div",$,[e.createVNode(f.OneAvatar,{text:((t=n.user)==null?void 0:t.name)||"",size:80,src:(o=n.user)==null?void 0:o.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",z,[e.createElementVNode("div",D,e.toDisplayString((r=n.user)==null?void 0:r.name),1),e.createElementVNode("div",O,e.toDisplayString((p=n.user)==null?void 0:p.email),1)]),typeof s.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a,class:"cursor-pointer justify-center px-8 py-3 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",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,m=>(e.openBlock(),e.createBlock(g,e.mergeProps({key:m.key},m.args,{onClick:m.click}),null,16,["onClick"]))),128)),e.createVNode(g,{icon:e.unref(B),label:n.logoutLabel,class:"rounded py-3",onClick:u},null,8,["icon","label"])]),F,e.createElementVNode("div",j,e.toDisplayString((h=n.app)==null?void 0:h.version),1)])]}),_:1}))}});function x(i,s){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"})])}function P(i,s){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:"M19.5 8.25l-7.5 7.5-7.5-7.5"})])}function I(i,s){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:"M4.5 15.75l7.5-7.5 7.5 7.5"})])}const q=i=>(e.pushScopeId("data-v-fe93eab5"),i=i(),e.popScopeId(),i),T=["data-opened"],H={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white z-10"},R={class:"flex justify-between items-center pt-3 mb-3"},W={class:"font-semibold text-xl px-3"},U={class:"grid"},X={class:"rounded-lg m-3 border"},G={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},J={class:"flex justify-between relative"},K={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},Q={clsss:"flex justify-end absolute right-0"},Y={key:0},Z={class:"text-xs font-semibold"},ee=q(()=>e.createElementVNode("hr",null,null,-1)),te={class:"px-3 py-2"},oe={class:"text-secondary-content text-left pb-1 text-xs uppercase"},ne={class:"overflow-auto max-h-full"},re={key:0,class:"space-y-2"},se=["onClick"],le={class:"pl-2"},ce={class:"text-sm mt-1 font-semibold"},ae={class:"text-xs mt-1"},ie={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},de=e.defineComponent({__name:"OneBrowserMenu",props:y,setup(i){const s=i,l=e.ref(!1),a=()=>{l.value=!l.value},u=e.ref(!1),n=e.computed(()=>u.value?I:P);e.ref(!1);const c=()=>{typeof s.onChange=="function"&&s.onChange()},t=o=>{typeof s.onApp=="function"&&s.onApp(o)};return(o,r)=>{var p,h,m,k;return e.openBlock(),e.createElementBlock("div",{"data-opened":l.value},[e.createElementVNode("button",{onClick:a,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",{"bg-secondary-10":l.value}])},[e.createVNode(e.unref(x),{class:"text-secondary-base w-8"})],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",R,[e.createElementVNode("div",W,e.toDisplayString((p=o.workspace)==null?void 0:p.label),1),e.createVNode(e.unref(w.render),{class:"w-6 cursor-pointer",onClick:a})]),e.createElementVNode("div",U,[e.createElementVNode("div",X,[e.createElementVNode("div",G,[e.createElementVNode("div",J,[e.createVNode(f.OneAvatar,{text:((h=o.workspace)==null?void 0:h.name)||"",src:(m=o.workspace)==null?void 0:m.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",K,[e.createTextVNode(e.toDisplayString((k=o.workspace)==null?void 0:k.name)+" ",1),e.createElementVNode("div",Q,[e.createVNode(_._sfc_main,{variant:"touch",icon:n.value,onClick:c},null,8,["icon"])])])]),u.value?(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.workspaces,d=>(e.openBlock(),e.createElementBlock("div",{key:d.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(f.OneAvatar,{text:d.name,src:d.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",Z,e.toDisplayString(d.name),1)]))),128))])):e.createCommentVNode("",!0),ee,e.createElementVNode("div",{onClick:c,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString(o.changeLabel),1)])]),e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString(o.appsTitle),1),e.createElementVNode("div",ne,[o.apps&&o.apps.length?(e.openBlock(),e.createElementBlock("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.apps,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,onClick:pe=>t(d),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(f.OneAvatar,{text:d.name,src:d.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",le,[e.createElementVNode("p",ce,e.toDisplayString(d.name),1),e.createElementVNode("p",ae,e.toDisplayString(d==null?void 0:d.inf),1)])],8,se))),128))])):e.createCommentVNode("",!0),o.apps&&o.apps.length?(e.openBlock(),e.createElementBlock("button",ie,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,T)}}});const ue=b._export_sfc(de,[["__scopeId","data-v-fe93eab5"]]);exports.OneBrowserMenu=ue;exports._sfc_main=v;exports._sfc_main$1=g;exports._sfc_main$2=M;exports.browserMenuProps=y;exports.render=x;
|
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { defineComponent as k, ref as _, provide as I, computed as b, openBlock as n, createElementBlock as s, renderSlot as j, normalizeProps as F, guardReactiveProps as B, createCommentVNode as v, createVNode as m, Transition as T, withCtx as A, normalizeClass as C, toDisplayString as p, inject as P, withModifiers as D, createBlock as $, resolveDynamicComponent as V, createElementVNode as e, Fragment as S, renderList as z, mergeProps as E, unref as O, createTextVNode as N, pushScopeId as q, popScopeId as H } from "vue";
|
|
2
|
+
import { OneAvatar as w } from "./common/index.js";
|
|
3
|
+
import { r as R } from "./XMarkIcon-51ef0691.js";
|
|
4
|
+
import { _ as W } from "./index-72d69e4e.js";
|
|
5
|
+
import { _ as U } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
+
const G = {
|
|
7
|
+
title: {
|
|
8
|
+
type: String
|
|
9
|
+
},
|
|
10
|
+
stick: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "right"
|
|
13
|
+
}
|
|
14
|
+
}, J = {
|
|
15
|
+
variant: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "primary"
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
type: [Function, Object]
|
|
24
|
+
}
|
|
25
|
+
}, K = ["data-opened"], Q = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "text-sm text-secondary-content px-3 py-2 text-left"
|
|
28
|
+
}, X = /* @__PURE__ */ k({
|
|
29
|
+
__name: "OneDropdown",
|
|
30
|
+
props: G,
|
|
31
|
+
emits: ["open", "close"],
|
|
32
|
+
setup(d, { emit: l }) {
|
|
33
|
+
const c = _(!1), u = _(null), f = l, r = d, a = () => {
|
|
34
|
+
c.value = !c.value, c.value ? f("open") : f("close");
|
|
35
|
+
};
|
|
36
|
+
I("OneDropdown", {
|
|
37
|
+
onToggle: a
|
|
38
|
+
});
|
|
39
|
+
const t = b(() => {
|
|
40
|
+
const i = u.value != null && u.value.offsetLeft < 270;
|
|
41
|
+
return u.value != null && u.value.offsetTop + 270 > window.innerHeight ? "up" + (i ? "-right" : "-left") : "down" + (i ? "-right" : "-left");
|
|
42
|
+
}), o = b(() => {
|
|
43
|
+
const i = [
|
|
44
|
+
"absolute z-10 w-fit rounded-md bg-white",
|
|
45
|
+
"py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
|
|
46
|
+
"overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
|
|
47
|
+
];
|
|
48
|
+
return t.value.startsWith("up") ? i.push("bottom-1 mb-10") : t.value.startsWith("down") && i.push("top-1 mt-10"), r.stick === "right" ? i.push("right-0") : r.stick === "left" && i.push("left-0"), i;
|
|
49
|
+
});
|
|
50
|
+
return (i, g) => (n(), s("div", {
|
|
51
|
+
class: "relative inline-block",
|
|
52
|
+
ref_key: "menuRef",
|
|
53
|
+
ref: u,
|
|
54
|
+
"data-opened": c.value
|
|
55
|
+
}, [
|
|
56
|
+
j(i.$slots, "button", F(B({ onToggle: a, isExpanded: c.value }))),
|
|
57
|
+
c.value ? (n(), s("div", {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "fixed top-0 left-0 w-screen h-screen z-10",
|
|
60
|
+
onClick: a
|
|
61
|
+
})) : v("", !0),
|
|
62
|
+
m(T, {
|
|
63
|
+
"enter-active-class": "transition ease-out duration-100",
|
|
64
|
+
"enter-from-class": "transform opacity-0 scale-95",
|
|
65
|
+
"enter-to-class": "transform opacity-100 scale-100",
|
|
66
|
+
"leave-active-class": "transition ease-in duration-75",
|
|
67
|
+
"leave-from-class": "transform opacity-100 scale-100",
|
|
68
|
+
"leave-to-class": "transform opacity-0 scale-95"
|
|
69
|
+
}, {
|
|
70
|
+
default: A(() => [
|
|
71
|
+
c.value ? (n(), s("div", {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: C(["menu", o.value]),
|
|
74
|
+
role: "menu",
|
|
75
|
+
"aria-orientation": "vertical",
|
|
76
|
+
tabindex: "-1"
|
|
77
|
+
}, [
|
|
78
|
+
i.title ? (n(), s("div", Q, p(i.title), 1)) : v("", !0),
|
|
79
|
+
j(i.$slots, "menu", F(B({ onToggle: a })))
|
|
80
|
+
], 2)) : v("", !0)
|
|
81
|
+
]),
|
|
82
|
+
_: 3
|
|
83
|
+
})
|
|
84
|
+
], 8, K));
|
|
85
|
+
}
|
|
86
|
+
}), M = /* @__PURE__ */ k({
|
|
87
|
+
__name: "OneDropdownItem",
|
|
88
|
+
props: J,
|
|
89
|
+
emits: ["click"],
|
|
90
|
+
setup(d, { emit: l }) {
|
|
91
|
+
const c = l, u = d, f = P("OneDropdown"), r = () => {
|
|
92
|
+
f !== void 0 && f.onToggle(), c("click");
|
|
93
|
+
}, a = b(() => {
|
|
94
|
+
const t = [];
|
|
95
|
+
return u.variant === "secondary" ? t.push("text-secondary-content hover:bg-secondary-body-hover") : u.variant === "danger" ? t.push("text-danger-content hover:bg-danger-10") : u.variant === "warning" ? t.push("text-warning-content hover:bg-warning-10") : u.variant === "info" ? t.push("text-info-content hover:bg-info-10") : t.push("hover:bg-secondary-body-hover"), t;
|
|
96
|
+
});
|
|
97
|
+
return (t, o) => (n(), s("button", {
|
|
98
|
+
class: C(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", a.value]),
|
|
99
|
+
onClick: D(r, ["prevent"])
|
|
100
|
+
}, [
|
|
101
|
+
t.icon ? (n(), $(V(t.icon), {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "w-4 h-4"
|
|
104
|
+
})) : v("", !0),
|
|
105
|
+
e("span", null, p(t.label), 1)
|
|
106
|
+
], 2));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
function Y(d, l) {
|
|
110
|
+
return n(), s("svg", {
|
|
111
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
112
|
+
fill: "none",
|
|
113
|
+
viewBox: "0 0 24 24",
|
|
114
|
+
"stroke-width": "1.8",
|
|
115
|
+
stroke: "currentColor",
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
}, [
|
|
118
|
+
e("path", {
|
|
119
|
+
"stroke-linecap": "round",
|
|
120
|
+
"stroke-linejoin": "round",
|
|
121
|
+
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"
|
|
122
|
+
})
|
|
123
|
+
]);
|
|
124
|
+
}
|
|
125
|
+
const Z = {
|
|
126
|
+
user: {
|
|
127
|
+
type: Object,
|
|
128
|
+
required: !0
|
|
129
|
+
},
|
|
130
|
+
menu: {
|
|
131
|
+
type: Array,
|
|
132
|
+
default: () => []
|
|
133
|
+
},
|
|
134
|
+
iconSize: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: "34"
|
|
137
|
+
},
|
|
138
|
+
app: {
|
|
139
|
+
type: Object
|
|
140
|
+
},
|
|
141
|
+
accountLabel: {
|
|
142
|
+
type: String,
|
|
143
|
+
default: "Account"
|
|
144
|
+
},
|
|
145
|
+
logoutLabel: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: "Logout"
|
|
148
|
+
},
|
|
149
|
+
versionLabel: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: ""
|
|
152
|
+
},
|
|
153
|
+
onAccount: {
|
|
154
|
+
type: Function
|
|
155
|
+
},
|
|
156
|
+
onLogout: {
|
|
157
|
+
type: Function
|
|
158
|
+
}
|
|
159
|
+
}, ee = {
|
|
160
|
+
workspace: {
|
|
161
|
+
type: Object,
|
|
162
|
+
required: !0
|
|
163
|
+
},
|
|
164
|
+
workspaces: {
|
|
165
|
+
type: Array
|
|
166
|
+
},
|
|
167
|
+
apps: {
|
|
168
|
+
type: Array,
|
|
169
|
+
required: !0
|
|
170
|
+
},
|
|
171
|
+
iconSize: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: "24"
|
|
174
|
+
},
|
|
175
|
+
appsTitle: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: "Ваші додатки"
|
|
178
|
+
},
|
|
179
|
+
changeLabel: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: "Керувати робочими просторами"
|
|
182
|
+
},
|
|
183
|
+
onChange: {
|
|
184
|
+
type: Function
|
|
185
|
+
},
|
|
186
|
+
onApp: {
|
|
187
|
+
type: Function
|
|
188
|
+
}
|
|
189
|
+
}, te = ["onClick"], oe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ne = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, se = { class: "self-center text-base font-medium tracking-wide text-black" }, re = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ie = { class: "text-left w-full mt-5 px-3" }, le = /* @__PURE__ */ e("div", {
|
|
190
|
+
class: "space-y-2 text-center",
|
|
191
|
+
style: { width: "240px" }
|
|
192
|
+
}, null, -1), ce = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, qe = /* @__PURE__ */ k({
|
|
193
|
+
__name: "OneUserMenu",
|
|
194
|
+
props: Z,
|
|
195
|
+
setup(d) {
|
|
196
|
+
const l = d, c = b(() => {
|
|
197
|
+
var r;
|
|
198
|
+
return (r = l.menu) == null ? void 0 : r.map((a) => {
|
|
199
|
+
let t = { label: a.label };
|
|
200
|
+
a.icon != null && (t = { ...t, icon: a.icon });
|
|
201
|
+
const o = typeof a.click == "function" ? a.click : () => {
|
|
202
|
+
};
|
|
203
|
+
return {
|
|
204
|
+
key: a.label,
|
|
205
|
+
args: t,
|
|
206
|
+
click: o
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}), u = () => {
|
|
210
|
+
typeof l.onAccount == "function" && l.onAccount();
|
|
211
|
+
}, f = () => {
|
|
212
|
+
typeof l.onLogout == "function" && l.onLogout();
|
|
213
|
+
};
|
|
214
|
+
return (r, a) => (n(), $(X, { stick: "right" }, {
|
|
215
|
+
button: A(({ onToggle: t, isExpanded: o }) => {
|
|
216
|
+
var i, g;
|
|
217
|
+
return [
|
|
218
|
+
e("button", {
|
|
219
|
+
onClick: t,
|
|
220
|
+
class: C(["p-1 rounded-full hover:bg-secondary-10", [o ? "bg-secondary-25" : ""]])
|
|
221
|
+
}, [
|
|
222
|
+
m(w, {
|
|
223
|
+
text: ((i = r.user) == null ? void 0 : i.name) || "",
|
|
224
|
+
size: r.iconSize,
|
|
225
|
+
src: (g = r.user) == null ? void 0 : g.photo_url,
|
|
226
|
+
rounded: !0
|
|
227
|
+
}, null, 8, ["text", "size", "src"])
|
|
228
|
+
], 10, te)
|
|
229
|
+
];
|
|
230
|
+
}),
|
|
231
|
+
menu: A(() => {
|
|
232
|
+
var t, o, i, g, x;
|
|
233
|
+
return [
|
|
234
|
+
e("div", oe, [
|
|
235
|
+
m(w, {
|
|
236
|
+
text: ((t = r.user) == null ? void 0 : t.name) || "",
|
|
237
|
+
size: 80,
|
|
238
|
+
src: (o = r.user) == null ? void 0 : o.photo_url,
|
|
239
|
+
rounded: !0,
|
|
240
|
+
class: "mx-auto"
|
|
241
|
+
}, null, 8, ["text", "src"]),
|
|
242
|
+
e("div", ne, [
|
|
243
|
+
e("div", se, p((i = r.user) == null ? void 0 : i.name), 1),
|
|
244
|
+
e("div", re, p((g = r.user) == null ? void 0 : g.email), 1)
|
|
245
|
+
]),
|
|
246
|
+
typeof l.onAccount == "function" ? (n(), s("a", {
|
|
247
|
+
key: 0,
|
|
248
|
+
onClick: u,
|
|
249
|
+
class: "cursor-pointer justify-center px-8 py-3 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"
|
|
250
|
+
}, p(r.accountLabel), 1)) : v("", !0),
|
|
251
|
+
e("div", ie, [
|
|
252
|
+
(n(!0), s(S, null, z(c.value, (y) => (n(), $(M, E({
|
|
253
|
+
key: y.key
|
|
254
|
+
}, y.args, {
|
|
255
|
+
onClick: y.click
|
|
256
|
+
}), null, 16, ["onClick"]))), 128)),
|
|
257
|
+
m(M, {
|
|
258
|
+
icon: O(Y),
|
|
259
|
+
label: r.logoutLabel,
|
|
260
|
+
class: "rounded py-3",
|
|
261
|
+
onClick: f
|
|
262
|
+
}, null, 8, ["icon", "label"])
|
|
263
|
+
]),
|
|
264
|
+
le,
|
|
265
|
+
e("div", ce, p((x = r.app) == null ? void 0 : x.version), 1)
|
|
266
|
+
])
|
|
267
|
+
];
|
|
268
|
+
}),
|
|
269
|
+
_: 1
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
function ae(d, l) {
|
|
274
|
+
return n(), s("svg", {
|
|
275
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
276
|
+
fill: "none",
|
|
277
|
+
viewBox: "0 0 24 24",
|
|
278
|
+
"stroke-width": "1.8",
|
|
279
|
+
stroke: "currentColor",
|
|
280
|
+
"aria-hidden": "true"
|
|
281
|
+
}, [
|
|
282
|
+
e("rect", {
|
|
283
|
+
width: "2.94",
|
|
284
|
+
height: "2.94",
|
|
285
|
+
x: "17.16",
|
|
286
|
+
y: "3.9",
|
|
287
|
+
fill: "currentColor",
|
|
288
|
+
"stroke-width": "1.8",
|
|
289
|
+
rx: "1.1"
|
|
290
|
+
}),
|
|
291
|
+
e("rect", {
|
|
292
|
+
width: "2.94",
|
|
293
|
+
height: "2.94",
|
|
294
|
+
x: "10.53",
|
|
295
|
+
y: "3.9",
|
|
296
|
+
fill: "currentColor",
|
|
297
|
+
"stroke-width": "1.8",
|
|
298
|
+
rx: "1.1"
|
|
299
|
+
}),
|
|
300
|
+
e("rect", {
|
|
301
|
+
width: "2.94",
|
|
302
|
+
height: "2.94",
|
|
303
|
+
x: "3.9",
|
|
304
|
+
y: "3.9",
|
|
305
|
+
fill: "currentColor",
|
|
306
|
+
"stroke-width": "1.8",
|
|
307
|
+
rx: "1.1"
|
|
308
|
+
}),
|
|
309
|
+
e("rect", {
|
|
310
|
+
width: "2.94",
|
|
311
|
+
height: "2.94",
|
|
312
|
+
x: "17.16",
|
|
313
|
+
y: "10.53",
|
|
314
|
+
fill: "currentColor",
|
|
315
|
+
"stroke-width": "1.8",
|
|
316
|
+
rx: "1.1"
|
|
317
|
+
}),
|
|
318
|
+
e("rect", {
|
|
319
|
+
width: "2.94",
|
|
320
|
+
height: "2.94",
|
|
321
|
+
x: "10.53",
|
|
322
|
+
y: "10.53",
|
|
323
|
+
fill: "currentColor",
|
|
324
|
+
"stroke-width": "1.8",
|
|
325
|
+
rx: "1.1"
|
|
326
|
+
}),
|
|
327
|
+
e("rect", {
|
|
328
|
+
width: "2.94",
|
|
329
|
+
height: "2.94",
|
|
330
|
+
x: "3.9",
|
|
331
|
+
y: "10.53",
|
|
332
|
+
fill: "currentColor",
|
|
333
|
+
"stroke-width": "1.8",
|
|
334
|
+
rx: "1.1"
|
|
335
|
+
}),
|
|
336
|
+
e("rect", {
|
|
337
|
+
width: "2.94",
|
|
338
|
+
height: "2.94",
|
|
339
|
+
x: "17.16",
|
|
340
|
+
y: "17.16",
|
|
341
|
+
fill: "currentColor",
|
|
342
|
+
"stroke-width": "1.8",
|
|
343
|
+
rx: "1.1"
|
|
344
|
+
}),
|
|
345
|
+
e("rect", {
|
|
346
|
+
width: "2.94",
|
|
347
|
+
height: "2.94",
|
|
348
|
+
x: "10.53",
|
|
349
|
+
y: "17.16",
|
|
350
|
+
fill: "currentColor",
|
|
351
|
+
"stroke-width": "1.8",
|
|
352
|
+
rx: "1.1"
|
|
353
|
+
}),
|
|
354
|
+
e("rect", {
|
|
355
|
+
width: "2.94",
|
|
356
|
+
height: "2.94",
|
|
357
|
+
x: "3.9",
|
|
358
|
+
y: "17.16",
|
|
359
|
+
fill: "currentColor",
|
|
360
|
+
"stroke-width": "1.8",
|
|
361
|
+
rx: "1.1"
|
|
362
|
+
})
|
|
363
|
+
]);
|
|
364
|
+
}
|
|
365
|
+
function ue(d, l) {
|
|
366
|
+
return n(), s("svg", {
|
|
367
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
368
|
+
fill: "none",
|
|
369
|
+
viewBox: "0 0 24 24",
|
|
370
|
+
"stroke-width": "1.8",
|
|
371
|
+
stroke: "currentColor",
|
|
372
|
+
"aria-hidden": "true"
|
|
373
|
+
}, [
|
|
374
|
+
e("path", {
|
|
375
|
+
"stroke-linecap": "round",
|
|
376
|
+
"stroke-linejoin": "round",
|
|
377
|
+
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
378
|
+
})
|
|
379
|
+
]);
|
|
380
|
+
}
|
|
381
|
+
function de(d, l) {
|
|
382
|
+
return n(), s("svg", {
|
|
383
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
384
|
+
fill: "none",
|
|
385
|
+
viewBox: "0 0 24 24",
|
|
386
|
+
"stroke-width": "1.8",
|
|
387
|
+
stroke: "currentColor",
|
|
388
|
+
"aria-hidden": "true"
|
|
389
|
+
}, [
|
|
390
|
+
e("path", {
|
|
391
|
+
"stroke-linecap": "round",
|
|
392
|
+
"stroke-linejoin": "round",
|
|
393
|
+
d: "M4.5 15.75l7.5-7.5 7.5 7.5"
|
|
394
|
+
})
|
|
395
|
+
]);
|
|
396
|
+
}
|
|
397
|
+
const pe = (d) => (q("data-v-fe93eab5"), d = d(), H(), d), he = ["data-opened"], fe = {
|
|
398
|
+
key: 1,
|
|
399
|
+
class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white z-10"
|
|
400
|
+
}, me = { class: "flex justify-between items-center pt-3 mb-3" }, ve = { class: "font-semibold text-xl px-3" }, ge = { class: "grid" }, ye = { class: "rounded-lg m-3 border" }, xe = {
|
|
401
|
+
class: "space-x-2 flex items-center px-3 py-2",
|
|
402
|
+
style: { width: "300px" }
|
|
403
|
+
}, _e = { class: "flex justify-between relative" }, we = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, be = { clsss: "flex justify-end absolute right-0" }, ke = { key: 0 }, Ce = { class: "text-xs font-semibold" }, Ae = /* @__PURE__ */ pe(() => /* @__PURE__ */ e("hr", null, null, -1)), $e = { class: "px-3 py-2" }, Se = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, ze = { class: "overflow-auto max-h-full" }, Oe = {
|
|
404
|
+
key: 0,
|
|
405
|
+
class: "space-y-2"
|
|
406
|
+
}, Le = ["onClick"], je = { class: "pl-2" }, Fe = { class: "text-sm mt-1 font-semibold" }, Be = { class: "text-xs mt-1" }, Me = {
|
|
407
|
+
key: 1,
|
|
408
|
+
class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
|
|
409
|
+
}, Ie = /* @__PURE__ */ k({
|
|
410
|
+
__name: "OneBrowserMenu",
|
|
411
|
+
props: ee,
|
|
412
|
+
setup(d) {
|
|
413
|
+
const l = d, c = _(!1), u = () => {
|
|
414
|
+
c.value = !c.value;
|
|
415
|
+
}, f = _(!1), r = b(() => f.value ? de : ue);
|
|
416
|
+
_(!1);
|
|
417
|
+
const a = () => {
|
|
418
|
+
typeof l.onChange == "function" && l.onChange();
|
|
419
|
+
}, t = (o) => {
|
|
420
|
+
typeof l.onApp == "function" && l.onApp(o);
|
|
421
|
+
};
|
|
422
|
+
return (o, i) => {
|
|
423
|
+
var g, x, y, L;
|
|
424
|
+
return n(), s("div", { "data-opened": c.value }, [
|
|
425
|
+
e("button", {
|
|
426
|
+
onClick: u,
|
|
427
|
+
class: C(["p-1 rounded-md hover:bg-secondary-10", { "bg-secondary-10": c.value }])
|
|
428
|
+
}, [
|
|
429
|
+
m(O(ae), { class: "text-secondary-base w-8" })
|
|
430
|
+
], 2),
|
|
431
|
+
c.value ? (n(), s("div", {
|
|
432
|
+
key: 0,
|
|
433
|
+
class: "fixed top-0 left-0 w-screen h-screen z-10",
|
|
434
|
+
onClick: u
|
|
435
|
+
})) : v("", !0),
|
|
436
|
+
c.value ? (n(), s("div", fe, [
|
|
437
|
+
e("div", me, [
|
|
438
|
+
e("div", ve, p((g = o.workspace) == null ? void 0 : g.label), 1),
|
|
439
|
+
m(O(R), {
|
|
440
|
+
class: "w-6 cursor-pointer",
|
|
441
|
+
onClick: u
|
|
442
|
+
})
|
|
443
|
+
]),
|
|
444
|
+
e("div", ge, [
|
|
445
|
+
e("div", ye, [
|
|
446
|
+
e("div", xe, [
|
|
447
|
+
e("div", _e, [
|
|
448
|
+
m(w, {
|
|
449
|
+
text: ((x = o.workspace) == null ? void 0 : x.name) || "",
|
|
450
|
+
src: (y = o.workspace) == null ? void 0 : y.photo_url,
|
|
451
|
+
size: 44,
|
|
452
|
+
rounded: !1,
|
|
453
|
+
class: "mx-auto"
|
|
454
|
+
}, null, 8, ["text", "src"])
|
|
455
|
+
]),
|
|
456
|
+
e("div", we, [
|
|
457
|
+
N(p((L = o.workspace) == null ? void 0 : L.name) + " ", 1),
|
|
458
|
+
e("div", be, [
|
|
459
|
+
m(W, {
|
|
460
|
+
variant: "touch",
|
|
461
|
+
icon: r.value,
|
|
462
|
+
onClick: a
|
|
463
|
+
}, null, 8, ["icon"])
|
|
464
|
+
])
|
|
465
|
+
])
|
|
466
|
+
]),
|
|
467
|
+
f.value ? (n(), s("div", ke, [
|
|
468
|
+
(n(!0), s(S, null, z(o.workspaces, (h) => (n(), s("div", {
|
|
469
|
+
key: h.name,
|
|
470
|
+
class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
|
|
471
|
+
}, [
|
|
472
|
+
m(w, {
|
|
473
|
+
text: h.name,
|
|
474
|
+
src: h.photo_url,
|
|
475
|
+
size: 30,
|
|
476
|
+
rounded: !1
|
|
477
|
+
}, null, 8, ["text", "src"]),
|
|
478
|
+
e("span", Ce, p(h.name), 1)
|
|
479
|
+
]))), 128))
|
|
480
|
+
])) : v("", !0),
|
|
481
|
+
Ae,
|
|
482
|
+
e("div", {
|
|
483
|
+
onClick: a,
|
|
484
|
+
class: "text-center py-2 cursor-pointer",
|
|
485
|
+
style: { "font-size": "10px" }
|
|
486
|
+
}, p(o.changeLabel), 1)
|
|
487
|
+
])
|
|
488
|
+
]),
|
|
489
|
+
e("div", $e, [
|
|
490
|
+
e("div", Se, p(o.appsTitle), 1),
|
|
491
|
+
e("div", ze, [
|
|
492
|
+
o.apps && o.apps.length ? (n(), s("div", Oe, [
|
|
493
|
+
(n(!0), s(S, null, z(o.apps, (h) => (n(), s("div", {
|
|
494
|
+
key: h.id,
|
|
495
|
+
onClick: (Te) => t(h),
|
|
496
|
+
class: "flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"
|
|
497
|
+
}, [
|
|
498
|
+
m(w, {
|
|
499
|
+
text: h.name,
|
|
500
|
+
src: h.photo_url,
|
|
501
|
+
size: 44,
|
|
502
|
+
rounded: !1
|
|
503
|
+
}, null, 8, ["text", "src"]),
|
|
504
|
+
e("div", je, [
|
|
505
|
+
e("p", Fe, p(h.name), 1),
|
|
506
|
+
e("p", Be, p(h == null ? void 0 : h.inf), 1)
|
|
507
|
+
])
|
|
508
|
+
], 8, Le))), 128))
|
|
509
|
+
])) : v("", !0),
|
|
510
|
+
o.apps && o.apps.length ? (n(), s("button", Me, p("Дивитися всі"))) : v("", !0)
|
|
511
|
+
])
|
|
512
|
+
])
|
|
513
|
+
])) : v("", !0)
|
|
514
|
+
], 8, he);
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
const He = /* @__PURE__ */ U(Ie, [["__scopeId", "data-v-fe93eab5"]]);
|
|
519
|
+
export {
|
|
520
|
+
He as O,
|
|
521
|
+
X as _,
|
|
522
|
+
M as a,
|
|
523
|
+
qe as b,
|
|
524
|
+
ee as c,
|
|
525
|
+
ae as r
|
|
526
|
+
};
|
package/dist/button/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-e804f148.cjs");require("vue");require("../_plugin-vue_export-helper-f246444f.cjs");exports.OneButton=e._sfc_main;
|
package/dist/button/index.js
CHANGED
package/dist/dropdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../OneBrowserMenu-1495ff25.cjs"),e=require("vue"),f=require("../_plugin-vue_export-helper-f246444f.cjs"),p=require("../common/index.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../index-e804f148.cjs");const g={},v={class:"border-t border-secondary-stroke my-1"};function k(a,o){return e.openBlock(),e.createElementBlock("div",v)}const x=f._export_sfc(g,[["render",k]]),b=["onClick"],V={class:"grid"},w={class:"font-semibold px-3"},E={class:"rounded-lg m-3 border"},N={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},B={class:"flex-shrink-0"},A={class:"w-full text-left"},C={class:"flex-shrink-0"},D=e.createElementVNode("hr",null,null,-1),O=e.createElementVNode("div",{class:"text-center py-2",style:{"font-size":"10px"}},"Керувати робочими просторами",-1),S={class:"px-3 py-2"},M={class:"text-secondary-content text-left pb-1 text-sm uppercase"},z={key:0,class:"space-y-2"},F=["onClick"],$={class:"pl-2"},q={class:"text-sm mt-1"},G={class:"text-xs mt-1"},u=3,L=e.defineComponent({__name:"OneBrowserMenuGrid",props:n.browserMenuProps,setup(a){const o=a,m=()=>{typeof o.onChange=="function"&&o.onChange()},r=e.ref(!1),_=e.computed(()=>o.apps?r.value?o.apps:o.apps.slice(0,u):[]),h=()=>{r.value=!r.value},y=t=>{typeof o.onApp=="function"&&o.onApp(t)};return(t,P)=>(e.openBlock(),e.createBlock(n._sfc_main,{stick:"right"},{button:e.withCtx(({onToggle:c,isExpanded:l})=>[e.createElementVNode("button",{onClick:c,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[l?"bg-secondary-25":""]])},[e.createVNode(e.unref(n.render),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${t.iconSize}px; height: ${t.iconSize}px`)},null,8,["style"])],10,b)]),menu:e.withCtx(()=>{var c,l,i,d;return[e.createElementVNode("div",V,[e.createElementVNode("div",w,e.toDisplayString((c=t.workspace)==null?void 0:c.label),1),e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",B,[e.createVNode(p.OneAvatar,{text:((l=t.workspace)==null?void 0:l.name)||"",src:(i=t.workspace)==null?void 0:i.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",A,e.toDisplayString((d=t.workspace)==null?void 0:d.name),1),e.createElementVNode("div",C,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:m},e.toDisplayString(t.changeLabel),1)])]),D,O])]),e.createElementVNode("div",S,[e.createElementVNode("div",M,e.toDisplayString(t.appsTitle),1),e.createElementVNode("div",null,[t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:T=>y(s),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(p.OneAvatar,{text:s.name,src:s.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",$,[e.createElementVNode("p",q,e.toDisplayString(s.name),1),e.createElementVNode("p",G,e.toDisplayString(s.inf),1)])],8,F))),128))])):e.createCommentVNode("",!0),t.apps&&t.apps.length>u?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:h,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},e.toDisplayString(r.value?"Приховати":"Дивитися всі"),1)):e.createCommentVNode("",!0)])])]}),_:1}))}});exports.OneBrowserMenu=n.OneBrowserMenu;exports.OneDropdown=n._sfc_main;exports.OneDropdownItem=n._sfc_main$1;exports.OneUserMenu=n._sfc_main$2;exports.OneBrowserMenuGrid=L;exports.OneDropdownDivider=x;
|
package/dist/dropdown/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export { default as OneDropdownItem } from './OneDropdownItem.vue';
|
|
|
3
3
|
export { default as OneDropdownDivider } from './OneDropdownDivider.vue';
|
|
4
4
|
export { default as OneUserMenu } from './OneUserMenu.vue';
|
|
5
5
|
export { default as OneBrowserMenu } from './OneBrowserMenu.vue';
|
|
6
|
+
export { default as OneBrowserMenuGrid } from './OneBrowserMenuGrid.vue';
|
|
6
7
|
export type { DropdownProps, DropdownItemProps } from './dropdown';
|
|
7
8
|
export type { UserMenuProps, BrowserMenuProps } from './menu';
|