@oneb/ui-vue 0.0.81 → 0.0.83

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.
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),f=require("./common/index.cjs"),N=require("./XMarkIcon-f94baa4c.cjs"),S=require("./index-668faddf.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),$={title:{type:String},stick:{type:String,default:"right"}},z={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},D=["data-opened"],O={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},w=e.defineComponent({__name:"OneDropdown",props:$,emits:["open","close"],setup(d,{emit:l}){const a=e.ref(!1),s=e.ref(null),c=l,n=d,r=()=>{a.value=!a.value,a.value?c("open"):c("close")};e.provide("OneDropdown",{onToggle:r});const o=e.computed(()=>{const t=s.value!=null&&s.value.getBoundingClientRect.x<270;return s.value!=null&&s.value.getBoundingClientRect().top+270>window.innerHeight?"up"+(t?"-right":"-left"):"down"+(t?"-right":"-left")}),u=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 o.value.startsWith("up")?t.push("bottom-1 mb-10"):o.value.startsWith("down")&&t.push("top-1 mt-10"),n.stick==="right"?t.push("right-0"):n.stick==="left"&&t.push("left-0"),t});return(t,p)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:s,"data-opened":a.value},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:r,isExpanded:a.value}))),a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:r})):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",u.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[t.title?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:r})))],2)):e.createCommentVNode("",!0)]),_:3})],8,D))}}),k=e.defineComponent({__name:"OneDropdownItem",props:z,emits:["click"],setup(d,{emit:l}){const a=l,s=d,c=e.inject("OneDropdown"),n=()=>{c!==void 0&&c.onToggle(),a("click")},r=e.computed(()=>{const o=[];return s.variant==="secondary"?o.push("text-secondary-content hover:bg-secondary-body-hover"):s.variant==="danger"?o.push("text-danger-content hover:bg-danger-10"):s.variant==="warning"?o.push("text-warning-content hover:bg-warning-10"):s.variant==="info"?o.push("text-info-content hover:bg-info-10"):o.push("hover:bg-secondary-body-hover"),o});return(o,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",r.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 L(d,l){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 F={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}},_={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}},j=["onClick"],M={class:"flex flex-col items-center pt-5 pb-2 h-full"},P={class:"flex flex-col px-10 py-1 mt-2 text-center"},q={class:"self-center text-base font-medium tracking-wide text-black"},R={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},I={class:"text-left w-full mt-5 px-3"},T={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},H=e.defineComponent({__name:"OneUserMenu",props:F,setup(d){const l=d,a=e.computed(()=>{var n;return(n=l.menu)==null?void 0:n.map(r=>{let o={label:r.label};r.icon!=null&&(o={...o,icon:r.icon});const u=typeof r.click=="function"?r.click:()=>{};return{key:r.label,args:o,click:u}})}),s=()=>{typeof l.onAccount=="function"&&l.onAccount()},c=()=>{typeof l.onLogout=="function"&&l.onLogout()};return(n,r)=>(e.openBlock(),e.createBlock(w,{stick:"right"},{button:e.withCtx(({onToggle:o,isExpanded:u})=>{var t,p;return[e.createElementVNode("button",{onClick:o,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[u?"bg-secondary-25":""]])},[e.createVNode(f.OneAvatar,{text:((t=n.user)==null?void 0:t.name)||"",size:n.iconSize,src:(p=n.user)==null?void 0:p.photo_url,rounded:!0},null,8,["text","size","src"])],10,j)]}),menu:e.withCtx(()=>{var o,u,t,p,h;return[e.createElementVNode("div",M,[e.createVNode(f.OneAvatar,{text:((o=n.user)==null?void 0:o.name)||"",size:80,src:(u=n.user)==null?void 0:u.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",P,[e.createElementVNode("div",q,e.toDisplayString((t=n.user)==null?void 0:t.name),1),e.createElementVNode("div",R,e.toDisplayString((p=n.user)==null?void 0:p.email),1)]),typeof l.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s,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",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,m=>(e.openBlock(),e.createBlock(k,e.mergeProps({key:m.key,ref_for:!0},m.args,{onClick:m.click}),null,16,["onClick"]))),128)),typeof n.onLogout=="function"?(e.openBlock(),e.createBlock(k,{key:0,icon:e.unref(L),label:n.logoutLabel,class:"rounded py-3",onClick:c},null,8,["icon","label"])):e.createCommentVNode("",!0)]),r[0]||(r[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",T,e.toDisplayString((h=n.app)==null?void 0:h.version),1)])]}),_:1}))}});function b(d,l){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 E(d,l){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 V(d,l){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"})])}function B(d,l){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:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}const W=["data-opened"],U={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},X={class:"flex justify-between items-center pt-3 mb-3"},G={class:"font-semibold text-xl px-3"},J={class:"grid"},K={class:"rounded-lg m-3 border"},Q={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},Y={class:"flex justify-between relative"},Z={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ee={key:0},te={class:"text-xs font-semibold"},oe={class:"px-3 py-2"},ne={class:"text-secondary-content text-left pb-1 text-xs uppercase"},re={class:"overflow-auto max-h-full"},le={key:0,class:"space-y-2"},se=["onClick"],ce={class:"flex"},ae={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ie={class:"pl-2"},de={class:"text-sm mt-1 font-semibold"},ue={class:"text9 mt-1"},pe={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},me=e.defineComponent({__name:"OneBrowserMenu",props:_,emits:["open","close"],setup(d,{emit:l}){const a=l,s=d,c=e.ref(!1),n=()=>{c.value=!c.value,c.value?a("open"):a("close")},r=e.ref(!1);e.computed(()=>r.value?V:E);const o=()=>{typeof s.onChange=="function"&&s.onChange()},u=t=>{typeof s.onApp=="function"&&s.onApp(t)};return(t,p)=>{var h,m,g,v,y,x;return e.openBlock(),e.createElementBlock("div",{"data-opened":c.value},[e.createElementVNode("button",{onClick:n,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":c.value}])},[e.createVNode(e.unref(b),{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",U,[e.createElementVNode("div",X,[e.createElementVNode("div",G,e.toDisplayString((h=t.workspace)==null?void 0:h.title),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:n})]),e.createElementVNode("div",J,[e.createElementVNode("div",K,[e.createElementVNode("div",Q,[e.createElementVNode("div",Y,[e.createVNode(f.OneAvatar,{text:((m=t.workspace)==null?void 0:m.name)||"",src:(g=t.workspace)==null?void 0:g.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",Z,e.toDisplayString((v=t.workspace)==null?void 0:v.name),1)]),r.value?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.workspaces,i=>(e.openBlock(),e.createElementBlock("div",{key:i.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(f.OneAvatar,{text:i.name,src:i.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",te,e.toDisplayString(i.name),1)]))),128))])):e.createCommentVNode("",!0),p[0]||(p[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((y=t.workspace)==null?void 0:y.changeLabel),1)])]),e.createElementVNode("div",oe,[e.createElementVNode("div",ne,e.toDisplayString((x=t.workspace)==null?void 0:x.appsLabel),1),e.createElementVNode("div",re,[t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.apps,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,onClick:C=>u(i),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",ce,[e.createElementVNode("div",ae,[e.createVNode(f.OneAvatar,{text:i.name,src:i.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ie,[e.createElementVNode("p",de,e.toDisplayString(i.name),1),e.createElementVNode("p",ue,e.toDisplayString(i==null?void 0:i.short),1)])]),e.createElementVNode("div",null,[e.createVNode(S._sfc_main,{variant:"touch",icon:e.unref(B),onClick:C=>u(i)},null,8,["icon","onClick"])])],8,se))),128))])):e.createCommentVNode("",!0),t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("button",pe,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,W)}}});const he=A._export_sfc(me,[["__scopeId","data-v-4936d4e4"]]);exports.OneBrowserMenu=he;exports._sfc_main=w;exports._sfc_main$1=k;exports._sfc_main$2=H;exports.browserMenuProps=_;exports.render=V;exports.render$1=E;exports.render$2=B;exports.render$3=b;
@@ -1,9 +1,9 @@
1
- import { defineComponent as $, ref as C, provide as R, computed as _, openBlock as o, createElementBlock as r, renderSlot as M, normalizeProps as I, guardReactiveProps as P, createCommentVNode as m, createVNode as v, Transition as T, withCtx as S, normalizeClass as A, toDisplayString as h, inject as V, withModifiers as q, createBlock as k, resolveDynamicComponent as H, createElementVNode as e, Fragment as z, renderList as j, mergeProps as N, unref as b, pushScopeId as W, popScopeId as U } from "vue";
1
+ import { defineComponent as $, ref as C, provide as T, computed as _, openBlock as o, createElementBlock as r, renderSlot as M, normalizeProps as P, guardReactiveProps as D, createCommentVNode as m, createVNode as v, Transition as V, withCtx as z, normalizeClass as A, toDisplayString as p, inject as I, withModifiers as q, createBlock as k, resolveDynamicComponent as H, createElementVNode as e, Fragment as S, renderList as j, mergeProps as N, unref as b } from "vue";
2
2
  import { OneAvatar as w } from "./common/index.js";
3
- import { r as G } from "./XMarkIcon-51ef0691.js";
4
- import { _ as J } from "./index-3f2d6084.js";
5
- import { _ as K } from "./_plugin-vue_export-helper-dad06003.js";
6
- const Q = {
3
+ import { r as W } from "./XMarkIcon-51ef0691.js";
4
+ import { _ as U } from "./index-ab76dea6.js";
5
+ import { _ as G } from "./_plugin-vue_export-helper-dad06003.js";
6
+ const J = {
7
7
  title: {
8
8
  type: String
9
9
  },
@@ -11,7 +11,7 @@ const Q = {
11
11
  type: String,
12
12
  default: "right"
13
13
  }
14
- }, X = {
14
+ }, K = {
15
15
  variant: {
16
16
  type: String,
17
17
  default: "primary"
@@ -22,23 +22,23 @@ const Q = {
22
22
  icon: {
23
23
  type: [Function, Object]
24
24
  }
25
- }, Y = ["data-opened"], Z = {
25
+ }, Q = ["data-opened"], X = {
26
26
  key: 0,
27
27
  class: "text-sm text-secondary-content px-3 py-2 text-left"
28
- }, ee = /* @__PURE__ */ $({
28
+ }, Y = /* @__PURE__ */ $({
29
29
  __name: "OneDropdown",
30
- props: Q,
30
+ props: J,
31
31
  emits: ["open", "close"],
32
- setup(a, { emit: i }) {
33
- const d = C(!1), l = C(null), u = i, s = a, c = () => {
34
- d.value = !d.value, d.value ? u("open") : u("close");
32
+ setup(h, { emit: l }) {
33
+ const u = C(!1), c = C(null), a = l, s = h, i = () => {
34
+ u.value = !u.value, u.value ? a("open") : a("close");
35
35
  };
36
- R("OneDropdown", {
37
- onToggle: c
36
+ T("OneDropdown", {
37
+ onToggle: i
38
38
  });
39
39
  const n = _(() => {
40
- const t = l.value != null && l.value.getBoundingClientRect.x < 270;
41
- return l.value != null && l.value.getBoundingClientRect().top + 270 > window.innerHeight ? "up" + (t ? "-right" : "-left") : "down" + (t ? "-right" : "-left");
40
+ const t = c.value != null && c.value.getBoundingClientRect.x < 270;
41
+ return c.value != null && c.value.getBoundingClientRect().top + 270 > window.innerHeight ? "up" + (t ? "-right" : "-left") : "down" + (t ? "-right" : "-left");
42
42
  }), f = _(() => {
43
43
  const t = [
44
44
  "absolute z-10 w-fit rounded-md bg-white",
@@ -50,16 +50,16 @@ const Q = {
50
50
  return (t, g) => (o(), r("div", {
51
51
  class: "relative inline-block",
52
52
  ref_key: "menuRef",
53
- ref: l,
54
- "data-opened": d.value
53
+ ref: c,
54
+ "data-opened": u.value
55
55
  }, [
56
- M(t.$slots, "button", I(P({ onToggle: c, isExpanded: d.value }))),
57
- d.value ? (o(), r("div", {
56
+ M(t.$slots, "button", P(D({ onToggle: i, isExpanded: u.value }))),
57
+ u.value ? (o(), r("div", {
58
58
  key: 0,
59
59
  class: "fixed top-0 left-0 w-screen h-screen z-10",
60
- onClick: c
60
+ onClick: i
61
61
  })) : m("", !0),
62
- v(T, {
62
+ v(V, {
63
63
  "enter-active-class": "transition ease-out duration-100",
64
64
  "enter-from-class": "transform opacity-0 scale-95",
65
65
  "enter-to-class": "transform opacity-100 scale-100",
@@ -67,46 +67,46 @@ const Q = {
67
67
  "leave-from-class": "transform opacity-100 scale-100",
68
68
  "leave-to-class": "transform opacity-0 scale-95"
69
69
  }, {
70
- default: S(() => [
71
- d.value ? (o(), r("div", {
70
+ default: z(() => [
71
+ u.value ? (o(), r("div", {
72
72
  key: 0,
73
73
  class: A(["menu", f.value]),
74
74
  role: "menu",
75
75
  "aria-orientation": "vertical",
76
76
  tabindex: "-1"
77
77
  }, [
78
- t.title ? (o(), r("div", Z, h(t.title), 1)) : m("", !0),
79
- M(t.$slots, "menu", I(P({ onToggle: c })))
78
+ t.title ? (o(), r("div", X, p(t.title), 1)) : m("", !0),
79
+ M(t.$slots, "menu", P(D({ onToggle: i })))
80
80
  ], 2)) : m("", !0)
81
81
  ]),
82
82
  _: 3
83
83
  })
84
- ], 8, Y));
84
+ ], 8, Q));
85
85
  }
86
- }), D = /* @__PURE__ */ $({
86
+ }), E = /* @__PURE__ */ $({
87
87
  __name: "OneDropdownItem",
88
- props: X,
88
+ props: K,
89
89
  emits: ["click"],
90
- setup(a, { emit: i }) {
91
- const d = i, l = a, u = V("OneDropdown"), s = () => {
92
- u !== void 0 && u.onToggle(), d("click");
93
- }, c = _(() => {
90
+ setup(h, { emit: l }) {
91
+ const u = l, c = h, a = I("OneDropdown"), s = () => {
92
+ a !== void 0 && a.onToggle(), u("click");
93
+ }, i = _(() => {
94
94
  const n = [];
95
- return l.variant === "secondary" ? n.push("text-secondary-content hover:bg-secondary-body-hover") : l.variant === "danger" ? n.push("text-danger-content hover:bg-danger-10") : l.variant === "warning" ? n.push("text-warning-content hover:bg-warning-10") : l.variant === "info" ? n.push("text-info-content hover:bg-info-10") : n.push("hover:bg-secondary-body-hover"), n;
95
+ return c.variant === "secondary" ? n.push("text-secondary-content hover:bg-secondary-body-hover") : c.variant === "danger" ? n.push("text-danger-content hover:bg-danger-10") : c.variant === "warning" ? n.push("text-warning-content hover:bg-warning-10") : c.variant === "info" ? n.push("text-info-content hover:bg-info-10") : n.push("hover:bg-secondary-body-hover"), n;
96
96
  });
97
97
  return (n, f) => (o(), r("button", {
98
- class: A(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", c.value]),
98
+ class: A(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", i.value]),
99
99
  onClick: q(s, ["prevent"])
100
100
  }, [
101
101
  n.icon ? (o(), k(H(n.icon), {
102
102
  key: 0,
103
103
  class: "w-4 h-4"
104
104
  })) : m("", !0),
105
- e("span", null, h(n.label), 1)
105
+ e("span", null, p(n.label), 1)
106
106
  ], 2));
107
107
  }
108
108
  });
109
- function te(a, i) {
109
+ function Z(h, l) {
110
110
  return o(), r("svg", {
111
111
  xmlns: "http://www.w3.org/2000/svg",
112
112
  fill: "none",
@@ -122,7 +122,7 @@ function te(a, i) {
122
122
  })
123
123
  ]);
124
124
  }
125
- const oe = {
125
+ const ee = {
126
126
  user: {
127
127
  type: Object,
128
128
  required: !0
@@ -156,7 +156,7 @@ const oe = {
156
156
  onLogout: {
157
157
  type: Function
158
158
  }
159
- }, ne = {
159
+ }, te = {
160
160
  workspace: {
161
161
  type: Object,
162
162
  required: !0
@@ -186,33 +186,30 @@ const oe = {
186
186
  onApp: {
187
187
  type: Function
188
188
  }
189
- }, se = ["onClick"], re = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ie = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, le = { class: "self-center text-base font-medium tracking-wide text-black" }, ce = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ae = { class: "text-left w-full mt-5 px-3" }, ue = /* @__PURE__ */ e("div", {
190
- class: "space-y-2 text-center",
191
- style: { width: "240px" }
192
- }, null, -1), de = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Ue = /* @__PURE__ */ $({
189
+ }, oe = ["onClick"], ne = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, se = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, re = { class: "self-center text-base font-medium tracking-wide text-black" }, ie = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, le = { class: "text-left w-full mt-5 px-3" }, ce = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Ie = /* @__PURE__ */ $({
193
190
  __name: "OneUserMenu",
194
- props: oe,
195
- setup(a) {
196
- const i = a, d = _(() => {
191
+ props: ee,
192
+ setup(h) {
193
+ const l = h, u = _(() => {
197
194
  var s;
198
- return (s = i.menu) == null ? void 0 : s.map((c) => {
199
- let n = { label: c.label };
200
- c.icon != null && (n = { ...n, icon: c.icon });
201
- const f = typeof c.click == "function" ? c.click : () => {
195
+ return (s = l.menu) == null ? void 0 : s.map((i) => {
196
+ let n = { label: i.label };
197
+ i.icon != null && (n = { ...n, icon: i.icon });
198
+ const f = typeof i.click == "function" ? i.click : () => {
202
199
  };
203
200
  return {
204
- key: c.label,
201
+ key: i.label,
205
202
  args: n,
206
203
  click: f
207
204
  };
208
205
  });
209
- }), l = () => {
210
- typeof i.onAccount == "function" && i.onAccount();
211
- }, u = () => {
212
- typeof i.onLogout == "function" && i.onLogout();
206
+ }), c = () => {
207
+ typeof l.onAccount == "function" && l.onAccount();
208
+ }, a = () => {
209
+ typeof l.onLogout == "function" && l.onLogout();
213
210
  };
214
- return (s, c) => (o(), k(ee, { stick: "right" }, {
215
- button: S(({ onToggle: n, isExpanded: f }) => {
211
+ return (s, i) => (o(), k(Y, { stick: "right" }, {
212
+ button: z(({ onToggle: n, isExpanded: f }) => {
216
213
  var t, g;
217
214
  return [
218
215
  e("button", {
@@ -225,13 +222,13 @@ const oe = {
225
222
  src: (g = s.user) == null ? void 0 : g.photo_url,
226
223
  rounded: !0
227
224
  }, null, 8, ["text", "size", "src"])
228
- ], 10, se)
225
+ ], 10, oe)
229
226
  ];
230
227
  }),
231
- menu: S(() => {
228
+ menu: z(() => {
232
229
  var n, f, t, g, y;
233
230
  return [
234
- e("div", re, [
231
+ e("div", ne, [
235
232
  v(w, {
236
233
  text: ((n = s.user) == null ? void 0 : n.name) || "",
237
234
  size: 80,
@@ -239,32 +236,35 @@ const oe = {
239
236
  rounded: !0,
240
237
  class: "mx-auto"
241
238
  }, null, 8, ["text", "src"]),
242
- e("div", ie, [
243
- e("div", le, h((t = s.user) == null ? void 0 : t.name), 1),
244
- e("div", ce, h((g = s.user) == null ? void 0 : g.email), 1)
239
+ e("div", se, [
240
+ e("div", re, p((t = s.user) == null ? void 0 : t.name), 1),
241
+ e("div", ie, p((g = s.user) == null ? void 0 : g.email), 1)
245
242
  ]),
246
- typeof i.onAccount == "function" ? (o(), r("a", {
243
+ typeof l.onAccount == "function" ? (o(), r("a", {
247
244
  key: 0,
248
- onClick: l,
245
+ onClick: c,
249
246
  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"
250
- }, h(s.accountLabel), 1)) : m("", !0),
251
- e("div", ae, [
252
- (o(!0), r(z, null, j(d.value, (x) => (o(), k(D, N({
247
+ }, p(s.accountLabel), 1)) : m("", !0),
248
+ e("div", le, [
249
+ (o(!0), r(S, null, j(u.value, (x) => (o(), k(E, N({
253
250
  key: x.key,
254
251
  ref_for: !0
255
252
  }, x.args, {
256
253
  onClick: x.click
257
254
  }), null, 16, ["onClick"]))), 128)),
258
- typeof s.onLogout == "function" ? (o(), k(D, {
255
+ typeof s.onLogout == "function" ? (o(), k(E, {
259
256
  key: 0,
260
- icon: b(te),
257
+ icon: b(Z),
261
258
  label: s.logoutLabel,
262
259
  class: "rounded py-3",
263
- onClick: u
260
+ onClick: a
264
261
  }, null, 8, ["icon", "label"])) : m("", !0)
265
262
  ]),
266
- ue,
267
- e("div", de, h((y = s.app) == null ? void 0 : y.version), 1)
263
+ i[0] || (i[0] = e("div", {
264
+ class: "space-y-2 text-center",
265
+ style: { width: "240px" }
266
+ }, null, -1)),
267
+ e("div", ce, p((y = s.app) == null ? void 0 : y.version), 1)
268
268
  ])
269
269
  ];
270
270
  }),
@@ -272,7 +272,7 @@ const oe = {
272
272
  }));
273
273
  }
274
274
  });
275
- function pe(a, i) {
275
+ function ae(h, l) {
276
276
  return o(), r("svg", {
277
277
  xmlns: "http://www.w3.org/2000/svg",
278
278
  fill: "none",
@@ -364,7 +364,7 @@ function pe(a, i) {
364
364
  })
365
365
  ]);
366
366
  }
367
- function he(a, i) {
367
+ function ue(h, l) {
368
368
  return o(), r("svg", {
369
369
  xmlns: "http://www.w3.org/2000/svg",
370
370
  fill: "none",
@@ -380,7 +380,7 @@ function he(a, i) {
380
380
  })
381
381
  ]);
382
382
  }
383
- function fe(a, i) {
383
+ function de(h, l) {
384
384
  return o(), r("svg", {
385
385
  xmlns: "http://www.w3.org/2000/svg",
386
386
  fill: "none",
@@ -396,7 +396,7 @@ function fe(a, i) {
396
396
  })
397
397
  ]);
398
398
  }
399
- function me(a, i) {
399
+ function pe(h, l) {
400
400
  return o(), r("svg", {
401
401
  xmlns: "http://www.w3.org/2000/svg",
402
402
  fill: "none",
@@ -412,58 +412,58 @@ function me(a, i) {
412
412
  })
413
413
  ]);
414
414
  }
415
- const ve = (a) => (W("data-v-4936d4e4"), a = a(), U(), a), ge = ["data-opened"], xe = {
415
+ const he = ["data-opened"], fe = {
416
416
  key: 1,
417
417
  class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"
418
- }, ye = { class: "flex justify-between items-center pt-3 mb-3" }, we = { class: "font-semibold text-xl px-3" }, _e = { class: "grid" }, ke = { class: "rounded-lg m-3 border" }, be = {
418
+ }, me = { class: "flex justify-between items-center pt-3 mb-3" }, ge = { class: "font-semibold text-xl px-3" }, ve = { class: "grid" }, xe = { class: "rounded-lg m-3 border" }, ye = {
419
419
  class: "space-x-2 flex items-center px-3 py-2",
420
420
  style: { width: "300px" }
421
- }, Ce = { class: "flex justify-between relative" }, $e = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Ae = { key: 0 }, Se = { class: "text-xs font-semibold" }, ze = /* @__PURE__ */ ve(() => /* @__PURE__ */ e("hr", null, null, -1)), je = { class: "px-3 py-2" }, Le = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Oe = { class: "overflow-auto max-h-full" }, Fe = {
421
+ }, we = { class: "flex justify-between relative" }, _e = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, ke = { key: 0 }, be = { class: "text-xs font-semibold" }, Ce = { class: "px-3 py-2" }, $e = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Ae = { class: "overflow-auto max-h-full" }, ze = {
422
422
  key: 0,
423
423
  class: "space-y-2"
424
- }, Be = ["onClick"], Me = { class: "flex" }, Ie = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, Pe = { class: "pl-2" }, De = { class: "text-sm mt-1 font-semibold" }, Ee = { class: "text9 mt-1" }, Re = {
424
+ }, Se = ["onClick"], je = { class: "flex" }, Le = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, Oe = { class: "pl-2" }, Fe = { class: "text-sm mt-1 font-semibold" }, Be = { class: "text9 mt-1" }, Me = {
425
425
  key: 1,
426
426
  class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
427
- }, Te = /* @__PURE__ */ $({
427
+ }, Pe = /* @__PURE__ */ $({
428
428
  __name: "OneBrowserMenu",
429
- props: ne,
429
+ props: te,
430
430
  emits: ["open", "close"],
431
- setup(a, { emit: i }) {
432
- const d = i, l = a, u = C(!1), s = () => {
433
- u.value = !u.value, u.value ? d("open") : d("close");
434
- }, c = C(!1);
435
- _(() => c.value ? fe : he);
431
+ setup(h, { emit: l }) {
432
+ const u = l, c = h, a = C(!1), s = () => {
433
+ a.value = !a.value, a.value ? u("open") : u("close");
434
+ }, i = C(!1);
435
+ _(() => i.value ? de : ue);
436
436
  const n = () => {
437
- typeof l.onChange == "function" && l.onChange();
437
+ typeof c.onChange == "function" && c.onChange();
438
438
  }, f = (t) => {
439
- typeof l.onApp == "function" && l.onApp(t);
439
+ typeof c.onApp == "function" && c.onApp(t);
440
440
  };
441
441
  return (t, g) => {
442
442
  var y, x, L, O, F, B;
443
- return o(), r("div", { "data-opened": u.value }, [
443
+ return o(), r("div", { "data-opened": a.value }, [
444
444
  e("button", {
445
445
  onClick: s,
446
- class: A(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": u.value }])
446
+ class: A(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": a.value }])
447
447
  }, [
448
- v(b(pe), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
448
+ v(b(ae), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
449
449
  ], 2),
450
- u.value ? (o(), r("div", {
450
+ a.value ? (o(), r("div", {
451
451
  key: 0,
452
452
  class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",
453
453
  onClick: s
454
454
  })) : m("", !0),
455
- u.value ? (o(), r("div", xe, [
456
- e("div", ye, [
457
- e("div", we, h((y = t.workspace) == null ? void 0 : y.title), 1),
458
- v(b(G), {
455
+ a.value ? (o(), r("div", fe, [
456
+ e("div", me, [
457
+ e("div", ge, p((y = t.workspace) == null ? void 0 : y.title), 1),
458
+ v(b(W), {
459
459
  class: "w-6 cursor-pointer",
460
460
  onClick: s
461
461
  })
462
462
  ]),
463
- e("div", _e, [
464
- e("div", ke, [
465
- e("div", be, [
466
- e("div", Ce, [
463
+ e("div", ve, [
464
+ e("div", xe, [
465
+ e("div", ye, [
466
+ e("div", we, [
467
467
  v(w, {
468
468
  text: ((x = t.workspace) == null ? void 0 : x.name) || "",
469
469
  src: (L = t.workspace) == null ? void 0 : L.photo_url,
@@ -472,77 +472,79 @@ const ve = (a) => (W("data-v-4936d4e4"), a = a(), U(), a), ge = ["data-opened"],
472
472
  class: "mx-auto"
473
473
  }, null, 8, ["text", "src"])
474
474
  ]),
475
- e("div", $e, h((O = t.workspace) == null ? void 0 : O.name), 1)
475
+ e("div", _e, p((O = t.workspace) == null ? void 0 : O.name), 1)
476
476
  ]),
477
- c.value ? (o(), r("div", Ae, [
478
- (o(!0), r(z, null, j(t.workspaces, (p) => (o(), r("div", {
479
- key: p.name,
477
+ i.value ? (o(), r("div", ke, [
478
+ (o(!0), r(S, null, j(t.workspaces, (d) => (o(), r("div", {
479
+ key: d.name,
480
480
  class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
481
481
  }, [
482
482
  v(w, {
483
- text: p.name,
484
- src: p.photo_url,
483
+ text: d.name,
484
+ src: d.photo_url,
485
485
  size: 30,
486
486
  rounded: !1
487
487
  }, null, 8, ["text", "src"]),
488
- e("span", Se, h(p.name), 1)
488
+ e("span", be, p(d.name), 1)
489
489
  ]))), 128))
490
490
  ])) : m("", !0),
491
- ze,
491
+ g[0] || (g[0] = e("hr", null, null, -1)),
492
492
  e("div", {
493
493
  onClick: n,
494
494
  class: "text-center py-2 cursor-pointer",
495
495
  style: { "font-size": "10px" }
496
- }, h((F = t.workspace) == null ? void 0 : F.changeLabel), 1)
496
+ }, p((F = t.workspace) == null ? void 0 : F.changeLabel), 1)
497
497
  ])
498
498
  ]),
499
- e("div", je, [
500
- e("div", Le, h((B = t.workspace) == null ? void 0 : B.appsLabel), 1),
501
- e("div", Oe, [
502
- t.apps && t.apps.length ? (o(), r("div", Fe, [
503
- (o(!0), r(z, null, j(t.apps, (p) => (o(), r("div", {
504
- key: p.id,
505
- onClick: (E) => f(p),
499
+ e("div", Ce, [
500
+ e("div", $e, p((B = t.workspace) == null ? void 0 : B.appsLabel), 1),
501
+ e("div", Ae, [
502
+ t.apps && t.apps.length ? (o(), r("div", ze, [
503
+ (o(!0), r(S, null, j(t.apps, (d) => (o(), r("div", {
504
+ key: d.id,
505
+ onClick: (R) => f(d),
506
506
  class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
507
507
  }, [
508
- e("div", Me, [
509
- e("div", Ie, [
508
+ e("div", je, [
509
+ e("div", Le, [
510
510
  v(w, {
511
- text: p.name,
512
- src: p.photo_url,
511
+ text: d.name,
512
+ src: d.photo_url,
513
513
  size: 44,
514
514
  rounded: !1
515
515
  }, null, 8, ["text", "src"])
516
516
  ]),
517
- e("div", Pe, [
518
- e("p", De, h(p.name), 1),
519
- e("p", Ee, h(p == null ? void 0 : p.short), 1)
517
+ e("div", Oe, [
518
+ e("p", Fe, p(d.name), 1),
519
+ e("p", Be, p(d == null ? void 0 : d.short), 1)
520
520
  ])
521
521
  ]),
522
522
  e("div", null, [
523
- v(J, {
523
+ v(U, {
524
524
  variant: "touch",
525
- icon: b(me),
526
- onClick: (E) => f(p)
525
+ icon: b(pe),
526
+ onClick: (R) => f(d)
527
527
  }, null, 8, ["icon", "onClick"])
528
528
  ])
529
- ], 8, Be))), 128))
529
+ ], 8, Se))), 128))
530
530
  ])) : m("", !0),
531
- t.apps && t.apps.length ? (o(), r("button", Re, h("Дивитися всі"))) : m("", !0)
531
+ t.apps && t.apps.length ? (o(), r("button", Me, p("Дивитися всі"))) : m("", !0)
532
532
  ])
533
533
  ])
534
534
  ])) : m("", !0)
535
- ], 8, ge);
535
+ ], 8, he);
536
536
  };
537
537
  }
538
538
  });
539
- const Ge = /* @__PURE__ */ K(Te, [["__scopeId", "data-v-4936d4e4"]]);
539
+ const qe = /* @__PURE__ */ G(Pe, [["__scopeId", "data-v-4936d4e4"]]);
540
540
  export {
541
- Ge as O,
542
- ee as _,
543
- D as a,
544
- Ue as b,
545
- ne as c,
541
+ qe as O,
542
+ Y as _,
543
+ E as a,
544
+ Ie as b,
545
+ ue as c,
546
546
  pe as d,
547
- me as r
547
+ te as e,
548
+ ae as f,
549
+ de as r
548
550
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-176aeb3b.cjs");require("vue");require("../_plugin-vue_export-helper-f246444f.cjs");exports.OneButton=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-668faddf.cjs");require("vue");require("../_plugin-vue_export-helper-f246444f.cjs");exports.OneButton=e._sfc_main;
@@ -1,4 +1,4 @@
1
- import { _ as p } from "../index-3f2d6084.js";
1
+ import { _ as p } from "../index-ab76dea6.js";
2
2
  import "vue";
3
3
  import "../_plugin-vue_export-helper-dad06003.js";
4
4
  export {
@@ -0,0 +1 @@
1
+ export declare const useElementWidth: (el: Ref<HTMLElement>) => any;
@@ -0,0 +1,5 @@
1
+ import type { Ref } from 'vue';
2
+ type MaybeRef<T> = T | Ref<T>;
3
+ type MaybeArray<T> = T | T[];
4
+ export declare const useResizeObserver: <T extends HTMLElement>(elementsList: any, cb: ResizeObserverCallback) => ResizeObserver;
5
+ export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../OneBrowserMenu-8b60a8d7.cjs"),e=require("vue"),f=require("../_plugin-vue_export-helper-f246444f.cjs"),p=require("../common/index.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../index-176aeb3b.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"},$={key:0,class:"space-y-2"},z=["onClick"],F={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$1),{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.title),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",$,[(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",F,[e.createElementVNode("p",q,e.toDisplayString(s.name),1),e.createElementVNode("p",G,e.toDisplayString(s.short),1)])],8,z))),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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../OneBrowserMenu-3650ed5d.cjs"),e=require("vue"),g=require("../_plugin-vue_export-helper-f246444f.cjs"),u=require("../common/index.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../index-668faddf.cjs");const v={},k={class:"border-t border-secondary-stroke my-1"};function x(i,o){return e.openBlock(),e.createElementBlock("div",k)}const b=g._export_sfc(v,[["render",x]]),V=["onClick"],w={class:"grid"},E={class:"font-semibold px-3"},N={class:"rounded-lg m-3 border"},B={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},A={class:"flex-shrink-0"},C={class:"w-full text-left"},D={class:"flex-shrink-0"},O={class:"px-3 py-2"},S={class:"text-secondary-content text-left pb-1 text-sm uppercase"},M={key:0,class:"space-y-2"},$=["onClick"],z={class:"pl-2"},F={class:"text-sm mt-1"},q={class:"text-xs mt-1"},m=3,G=e.defineComponent({__name:"OneBrowserMenuGrid",props:n.browserMenuProps,setup(i){const o=i,_=()=>{typeof o.onChange=="function"&&o.onChange()},r=e.ref(!1),h=e.computed(()=>o.apps?r.value?o.apps:o.apps.slice(0,m):[]),y=()=>{r.value=!r.value},f=t=>{typeof o.onApp=="function"&&o.onApp(t)};return(t,l)=>(e.openBlock(),e.createBlock(n._sfc_main,{stick:"right"},{button:e.withCtx(({onToggle:c,isExpanded:a})=>[e.createElementVNode("button",{onClick:c,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[a?"bg-secondary-25":""]])},[e.createVNode(e.unref(n.render$3),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${t.iconSize}px; height: ${t.iconSize}px`)},null,8,["style"])],10,V)]),menu:e.withCtx(()=>{var c,a,d,p;return[e.createElementVNode("div",w,[e.createElementVNode("div",E,e.toDisplayString((c=t.workspace)==null?void 0:c.title),1),e.createElementVNode("div",N,[e.createElementVNode("div",B,[e.createElementVNode("div",A,[e.createVNode(u.OneAvatar,{text:((a=t.workspace)==null?void 0:a.name)||"",src:(d=t.workspace)==null?void 0:d.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",C,e.toDisplayString((p=t.workspace)==null?void 0:p.name),1),e.createElementVNode("div",D,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:_},e.toDisplayString(t.changeLabel),1)])]),l[0]||(l[0]=e.createElementVNode("hr",null,null,-1)),l[1]||(l[1]=e.createElementVNode("div",{class:"text-center py-2",style:{"font-size":"10px"}},"Керувати робочими просторами",-1))])]),e.createElementVNode("div",O,[e.createElementVNode("div",S,e.toDisplayString(t.appsTitle),1),e.createElementVNode("div",null,[t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:L=>f(s),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(u.OneAvatar,{text:s.name,src:s.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",z,[e.createElementVNode("p",F,e.toDisplayString(s.name),1),e.createElementVNode("p",q,e.toDisplayString(s.short),1)])],8,$))),128))])):e.createCommentVNode("",!0),t.apps&&t.apps.length>m?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,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=G;exports.OneDropdownDivider=b;