@oneb/ui-vue 0.0.71 → 0.0.73

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.
@@ -55,7 +55,7 @@ export type AppType = {
55
55
  }>;
56
56
  selectedPlan: {
57
57
  name: string;
58
- link?: string;
58
+ url: string;
59
59
  title?: string;
60
60
  };
61
61
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .text9[data-v-0cf9ecee]{font-size:9px}.h-browser[data-v-0cf9ecee]{height:calc(100% - 75px)}.dropdown[data-v-e4c2f255]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.module-border-wrap[data-v-0682b932]{border-radius:14px;position:relative;background:linear-gradient(to right,#e1a508,#e04040);padding:1px}@keyframes one-sp-ico-rot{to{transform:rotate(360deg)}}@keyframes one-sp-ico-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
1
+ .text9[data-v-4936d4e4]{font-size:9px}.h-browser[data-v-4936d4e4]{height:calc(100% - 75px)}.dropdown[data-v-7d2c4502]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.tooltip[data-v-7d2c4502]{position:relative}.tooltip-text[data-v-7d2c4502]{visibility:hidden;background-color:#000;color:#fff;text-align:center;padding:5px;border-radius:6px;position:absolute;z-index:1;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip:hover .tooltip-text[data-v-7d2c4502]{visibility:visible;opacity:1}.module-border-wrap[data-v-ed4027f5]{border-radius:14px;position:relative;background:linear-gradient(to right,#e1a508,#e04040);padding:1px}@keyframes one-sp-ico-rot{to{transform:rotate(360deg)}}@keyframes one-sp-ico-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneb/ui-vue",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),h=require("./common/index.cjs"),B=require("./XMarkIcon-f94baa4c.cjs"),_=require("./index-e804f148.cjs"),S=require("./_plugin-vue_export-helper-f246444f.cjs"),A={title:{type:String},stick:{type:String,default:"right"}},$={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},z=["data-opened"],D={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},b=e.defineComponent({__name:"OneDropdown",props:A,emits:["open","close"],setup(a,{emit:s}){const d=e.ref(!1),c=e.ref(null),i=s,o=a,l=()=>{d.value=!d.value,d.value?i("open"):i("close")};e.provide("OneDropdown",{onToggle:l});const t=e.computed(()=>{const n=c.value!=null&&c.value.offsetLeft<270;return c.value!=null&&c.value.offsetTop+270>window.innerHeight?"up"+(n?"-right":"-left"):"down"+(n?"-right":"-left")}),p=e.computed(()=>{const n=["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")?n.push("bottom-1 mb-10"):t.value.startsWith("down")&&n.push("top-1 mt-10"),o.stick==="right"?n.push("right-0"):o.stick==="left"&&n.push("left-0"),n});return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:c,"data-opened":d.value},[e.renderSlot(n.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:l,isExpanded:d.value}))),d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:l})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",p.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[n.title?(e.openBlock(),e.createElementBlock("div",D,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:l})))],2)):e.createCommentVNode("",!0)]),_:3})],8,z))}}),k=e.defineComponent({__name:"OneDropdownItem",props:$,emits:["click"],setup(a,{emit:s}){const d=s,c=a,i=e.inject("OneDropdown"),o=()=>{i!==void 0&&i.onToggle(),d("click")},l=e.computed(()=>{const t=[];return c.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):c.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):c.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):c.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",l.value]),onClick:e.withModifiers(o,["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 O(a,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 L={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}},E={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"],F={class:"flex flex-col items-center pt-5 pb-2 h-full"},M={class:"flex flex-col px-10 py-1 mt-2 text-center"},P={class:"self-center text-base font-medium tracking-wide text-black"},I={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},q={class:"text-left w-full mt-5 px-3"},T=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1),H={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},R=e.defineComponent({__name:"OneUserMenu",props:L,setup(a){const s=a,d=e.computed(()=>{var o;return(o=s.menu)==null?void 0:o.map(l=>{let t={label:l.label};l.icon!=null&&(t={...t,icon:l.icon});const p=typeof l.click=="function"?l.click:()=>{};return{key:l.label,args:t,click:p}})}),c=()=>{typeof s.onAccount=="function"&&s.onAccount()},i=()=>{typeof s.onLogout=="function"&&s.onLogout()};return(o,l)=>(e.openBlock(),e.createBlock(b,{stick:"right"},{button:e.withCtx(({onToggle:t,isExpanded:p})=>{var n,r;return[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[p?"bg-secondary-25":""]])},[e.createVNode(h.OneAvatar,{text:((n=o.user)==null?void 0:n.name)||"",size:o.iconSize,src:(r=o.user)==null?void 0:r.photo_url,rounded:!0},null,8,["text","size","src"])],10,j)]}),menu:e.withCtx(()=>{var t,p,n,r,f;return[e.createElementVNode("div",F,[e.createVNode(h.OneAvatar,{text:((t=o.user)==null?void 0:t.name)||"",size:80,src:(p=o.user)==null?void 0:p.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",M,[e.createElementVNode("div",P,e.toDisplayString((n=o.user)==null?void 0:n.name),1),e.createElementVNode("div",I,e.toDisplayString((r=o.user)==null?void 0:r.email),1)]),typeof s.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:c,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(o.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(k,e.mergeProps({key:m.key},m.args,{onClick:m.click}),null,16,["onClick"]))),128)),e.createVNode(k,{icon:e.unref(O),label:o.logoutLabel,class:"rounded py-3",onClick:i},null,8,["icon","label"])]),T,e.createElementVNode("div",H,e.toDisplayString((f=o.app)==null?void 0:f.version),1)])]}),_:1}))}});function V(a,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 W(a,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 U(a,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"})])}function N(a,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:"M8.25 4.5l7.5 7.5-7.5 7.5"})])}const X=a=>(e.pushScopeId("data-v-0cf9ecee"),a=a(),e.popScopeId(),a),G=["data-opened"],J={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},K={class:"flex justify-between items-center pt-3 mb-3"},Q={class:"font-semibold text-xl px-3"},Y={class:"grid"},Z={class:"rounded-lg m-3 border"},ee={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},te={class:"flex justify-between relative"},oe={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ne={clsss:"flex justify-end absolute right-0"},re={key:0},se={class:"text-xs font-semibold"},ce=X(()=>e.createElementVNode("hr",null,null,-1)),le={class:"px-3 py-2"},ae={class:"text-secondary-content text-left pb-1 text-xs uppercase"},ie={class:"overflow-auto max-h-full"},de={key:0,class:"space-y-2"},ue=["onClick"],pe={class:"flex"},me={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},he={class:"pl-2"},fe={class:"text-sm mt-1 font-semibold"},ke={class:"text9 mt-1"},ge={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},ve=e.defineComponent({__name:"OneBrowserMenu",props:E,emits:["open","close"],setup(a,{emit:s}){const d=s,c=a,i=e.ref(!1),o=()=>{i.value=!i.value,i.value?d("open"):d("close")},l=e.ref(!1),t=e.computed(()=>l.value?U:W),p=()=>{typeof c.onChange=="function"&&c.onChange()},n=r=>{typeof c.onApp=="function"&&c.onApp(r)};return(r,f)=>{var m,g,v,y,w,x;return e.openBlock(),e.createElementBlock("div",{"data-opened":i.value},[e.createElementVNode("button",{onClick:o,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",{"bg-secondary-10":i.value}])},[e.createVNode(e.unref(V),{class:"text-secondary-base w-6 h-6"})],2),i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:o})):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("div",Q,e.toDisplayString((m=r.workspace)==null?void 0:m.title),1),e.createVNode(e.unref(B.render),{class:"w-6 cursor-pointer",onClick:o})]),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createVNode(h.OneAvatar,{text:((g=r.workspace)==null?void 0:g.name)||"",src:(v=r.workspace)==null?void 0:v.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",oe,[e.createTextVNode(e.toDisplayString((y=r.workspace)==null?void 0:y.name)+" ",1),e.createElementVNode("div",ne,[e.createVNode(_._sfc_main,{variant:"touch",icon:t.value,onClick:p},null,8,["icon"])])])]),l.value?(e.openBlock(),e.createElementBlock("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.workspaces,u=>(e.openBlock(),e.createElementBlock("div",{key:u.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(h.OneAvatar,{text:u.name,src:u.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",se,e.toDisplayString(u.name),1)]))),128))])):e.createCommentVNode("",!0),ce,e.createElementVNode("div",{onClick:p,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((w=r.workspace)==null?void 0:w.changeLabel),1)])]),e.createElementVNode("div",le,[e.createElementVNode("div",ae,e.toDisplayString((x=r.workspace)==null?void 0:x.appsLabel),1),e.createElementVNode("div",ie,[r.apps&&r.apps.length?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.apps,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,onClick:C=>n(u),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",pe,[e.createElementVNode("div",me,[e.createVNode(h.OneAvatar,{text:u.name,src:u.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",he,[e.createElementVNode("p",fe,e.toDisplayString(u.name),1),e.createElementVNode("p",ke,e.toDisplayString(u==null?void 0:u.short),1)])]),e.createElementVNode("div",null,[e.createVNode(_._sfc_main,{variant:"touch",icon:e.unref(N),onClick:C=>n(u)},null,8,["icon","onClick"])])],8,ue))),128))])):e.createCommentVNode("",!0),r.apps&&r.apps.length?(e.openBlock(),e.createElementBlock("button",ge,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,G)}}});const ye=S._export_sfc(ve,[["__scopeId","data-v-0cf9ecee"]]);exports.OneBrowserMenu=ye;exports._sfc_main=b;exports._sfc_main$1=k;exports._sfc_main$2=R;exports.browserMenuProps=E;exports.render=N;exports.render$1=V;
@@ -1,553 +0,0 @@
1
- import { defineComponent as b, ref as k, provide as N, computed as w, openBlock as t, createElementBlock as r, renderSlot as I, normalizeProps as P, guardReactiveProps as T, createCommentVNode as g, createVNode as m, Transition as q, withCtx as A, normalizeClass as C, toDisplayString as f, inject as H, withModifiers as R, createBlock as S, resolveDynamicComponent as W, createElementVNode as e, Fragment as j, renderList as z, mergeProps as U, unref as _, createTextVNode as G, pushScopeId as J, popScopeId as K } from "vue";
2
- import { OneAvatar as y } from "./common/index.js";
3
- import { r as Q } from "./XMarkIcon-51ef0691.js";
4
- import { _ as D } from "./index-72d69e4e.js";
5
- import { _ as X } from "./_plugin-vue_export-helper-dad06003.js";
6
- const Y = {
7
- title: {
8
- type: String
9
- },
10
- stick: {
11
- type: String,
12
- default: "right"
13
- }
14
- }, Z = {
15
- variant: {
16
- type: String,
17
- default: "primary"
18
- },
19
- label: {
20
- type: String
21
- },
22
- icon: {
23
- type: [Function, Object]
24
- }
25
- }, ee = ["data-opened"], te = {
26
- key: 0,
27
- class: "text-sm text-secondary-content px-3 py-2 text-left"
28
- }, oe = /* @__PURE__ */ b({
29
- __name: "OneDropdown",
30
- props: Y,
31
- emits: ["open", "close"],
32
- setup(u, { emit: l }) {
33
- const p = k(!1), c = k(null), d = l, n = u, a = () => {
34
- p.value = !p.value, p.value ? d("open") : d("close");
35
- };
36
- N("OneDropdown", {
37
- onToggle: a
38
- });
39
- const o = w(() => {
40
- const s = c.value != null && c.value.offsetLeft < 270;
41
- return c.value != null && c.value.offsetTop + 270 > window.innerHeight ? "up" + (s ? "-right" : "-left") : "down" + (s ? "-right" : "-left");
42
- }), v = w(() => {
43
- const s = [
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 o.value.startsWith("up") ? s.push("bottom-1 mb-10") : o.value.startsWith("down") && s.push("top-1 mt-10"), n.stick === "right" ? s.push("right-0") : n.stick === "left" && s.push("left-0"), s;
49
- });
50
- return (s, i) => (t(), r("div", {
51
- class: "relative inline-block",
52
- ref_key: "menuRef",
53
- ref: c,
54
- "data-opened": p.value
55
- }, [
56
- I(s.$slots, "button", P(T({ onToggle: a, isExpanded: p.value }))),
57
- p.value ? (t(), r("div", {
58
- key: 0,
59
- class: "fixed top-0 left-0 w-screen h-screen z-10",
60
- onClick: a
61
- })) : g("", !0),
62
- m(q, {
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
- p.value ? (t(), r("div", {
72
- key: 0,
73
- class: C(["menu", v.value]),
74
- role: "menu",
75
- "aria-orientation": "vertical",
76
- tabindex: "-1"
77
- }, [
78
- s.title ? (t(), r("div", te, f(s.title), 1)) : g("", !0),
79
- I(s.$slots, "menu", P(T({ onToggle: a })))
80
- ], 2)) : g("", !0)
81
- ]),
82
- _: 3
83
- })
84
- ], 8, ee));
85
- }
86
- }), V = /* @__PURE__ */ b({
87
- __name: "OneDropdownItem",
88
- props: Z,
89
- emits: ["click"],
90
- setup(u, { emit: l }) {
91
- const p = l, c = u, d = H("OneDropdown"), n = () => {
92
- d !== void 0 && d.onToggle(), p("click");
93
- }, a = w(() => {
94
- const o = [];
95
- return c.variant === "secondary" ? o.push("text-secondary-content hover:bg-secondary-body-hover") : c.variant === "danger" ? o.push("text-danger-content hover:bg-danger-10") : c.variant === "warning" ? o.push("text-warning-content hover:bg-warning-10") : c.variant === "info" ? o.push("text-info-content hover:bg-info-10") : o.push("hover:bg-secondary-body-hover"), o;
96
- });
97
- return (o, v) => (t(), r("button", {
98
- class: C(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", a.value]),
99
- onClick: R(n, ["prevent"])
100
- }, [
101
- o.icon ? (t(), S(W(o.icon), {
102
- key: 0,
103
- class: "w-4 h-4"
104
- })) : g("", !0),
105
- e("span", null, f(o.label), 1)
106
- ], 2));
107
- }
108
- });
109
- function ne(u, l) {
110
- return t(), r("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 se = {
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
- }, re = {
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
- }, ie = ["onClick"], le = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ce = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, ae = { class: "self-center text-base font-medium tracking-wide text-black" }, ue = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, de = { class: "text-left w-full mt-5 px-3" }, pe = /* @__PURE__ */ e("div", {
190
- class: "space-y-2 text-center",
191
- style: { width: "240px" }
192
- }, null, -1), he = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Ke = /* @__PURE__ */ b({
193
- __name: "OneUserMenu",
194
- props: se,
195
- setup(u) {
196
- const l = u, p = w(() => {
197
- var n;
198
- return (n = l.menu) == null ? void 0 : n.map((a) => {
199
- let o = { label: a.label };
200
- a.icon != null && (o = { ...o, icon: a.icon });
201
- const v = typeof a.click == "function" ? a.click : () => {
202
- };
203
- return {
204
- key: a.label,
205
- args: o,
206
- click: v
207
- };
208
- });
209
- }), c = () => {
210
- typeof l.onAccount == "function" && l.onAccount();
211
- }, d = () => {
212
- typeof l.onLogout == "function" && l.onLogout();
213
- };
214
- return (n, a) => (t(), S(oe, { stick: "right" }, {
215
- button: A(({ onToggle: o, isExpanded: v }) => {
216
- var s, i;
217
- return [
218
- e("button", {
219
- onClick: o,
220
- class: C(["p-1 rounded-full hover:bg-secondary-10", [v ? "bg-secondary-25" : ""]])
221
- }, [
222
- m(y, {
223
- text: ((s = n.user) == null ? void 0 : s.name) || "",
224
- size: n.iconSize,
225
- src: (i = n.user) == null ? void 0 : i.photo_url,
226
- rounded: !0
227
- }, null, 8, ["text", "size", "src"])
228
- ], 10, ie)
229
- ];
230
- }),
231
- menu: A(() => {
232
- var o, v, s, i, $;
233
- return [
234
- e("div", le, [
235
- m(y, {
236
- text: ((o = n.user) == null ? void 0 : o.name) || "",
237
- size: 80,
238
- src: (v = n.user) == null ? void 0 : v.photo_url,
239
- rounded: !0,
240
- class: "mx-auto"
241
- }, null, 8, ["text", "src"]),
242
- e("div", ce, [
243
- e("div", ae, f((s = n.user) == null ? void 0 : s.name), 1),
244
- e("div", ue, f((i = n.user) == null ? void 0 : i.email), 1)
245
- ]),
246
- typeof l.onAccount == "function" ? (t(), r("a", {
247
- key: 0,
248
- onClick: c,
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
- }, f(n.accountLabel), 1)) : g("", !0),
251
- e("div", de, [
252
- (t(!0), r(j, null, z(p.value, (x) => (t(), S(V, U({
253
- key: x.key
254
- }, x.args, {
255
- onClick: x.click
256
- }), null, 16, ["onClick"]))), 128)),
257
- m(V, {
258
- icon: _(ne),
259
- label: n.logoutLabel,
260
- class: "rounded py-3",
261
- onClick: d
262
- }, null, 8, ["icon", "label"])
263
- ]),
264
- pe,
265
- e("div", he, f(($ = n.app) == null ? void 0 : $.version), 1)
266
- ])
267
- ];
268
- }),
269
- _: 1
270
- }));
271
- }
272
- });
273
- function fe(u, l) {
274
- return t(), r("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 ve(u, l) {
366
- return t(), r("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 me(u, l) {
382
- return t(), r("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
- function ge(u, l) {
398
- return t(), r("svg", {
399
- xmlns: "http://www.w3.org/2000/svg",
400
- fill: "none",
401
- viewBox: "0 0 24 24",
402
- "stroke-width": "1.8",
403
- stroke: "currentColor",
404
- "aria-hidden": "true"
405
- }, [
406
- e("path", {
407
- "stroke-linecap": "round",
408
- "stroke-linejoin": "round",
409
- d: "M8.25 4.5l7.5 7.5-7.5 7.5"
410
- })
411
- ]);
412
- }
413
- const xe = (u) => (J("data-v-0cf9ecee"), u = u(), K(), u), ye = ["data-opened"], we = {
414
- key: 1,
415
- class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"
416
- }, _e = { class: "flex justify-between items-center pt-3 mb-3" }, ke = { class: "font-semibold text-xl px-3" }, be = { class: "grid" }, Ce = { class: "rounded-lg m-3 border" }, $e = {
417
- class: "space-x-2 flex items-center px-3 py-2",
418
- style: { width: "300px" }
419
- }, Ae = { class: "flex justify-between relative" }, Se = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, je = { clsss: "flex justify-end absolute right-0" }, ze = { key: 0 }, Le = { class: "text-xs font-semibold" }, Oe = /* @__PURE__ */ xe(() => /* @__PURE__ */ e("hr", null, null, -1)), Fe = { class: "px-3 py-2" }, Be = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Me = { class: "overflow-auto max-h-full" }, Ie = {
420
- key: 0,
421
- class: "space-y-2"
422
- }, Pe = ["onClick"], Te = { class: "flex" }, De = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, Ve = { class: "pl-2" }, Ee = { class: "text-sm mt-1 font-semibold" }, Ne = { class: "text9 mt-1" }, qe = {
423
- key: 1,
424
- class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
425
- }, He = /* @__PURE__ */ b({
426
- __name: "OneBrowserMenu",
427
- props: re,
428
- emits: ["open", "close"],
429
- setup(u, { emit: l }) {
430
- const p = l, c = u, d = k(!1), n = () => {
431
- d.value = !d.value, d.value ? p("open") : p("close");
432
- }, a = k(!1), o = w(() => a.value ? me : ve), v = () => {
433
- typeof c.onChange == "function" && c.onChange();
434
- }, s = (i) => {
435
- typeof c.onApp == "function" && c.onApp(i);
436
- };
437
- return (i, $) => {
438
- var x, L, O, F, B, M;
439
- return t(), r("div", { "data-opened": d.value }, [
440
- e("button", {
441
- onClick: n,
442
- class: C(["p-1 rounded-md hover:bg-secondary-10", { "bg-secondary-10": d.value }])
443
- }, [
444
- m(_(fe), { class: "text-secondary-base w-6 h-6" })
445
- ], 2),
446
- d.value ? (t(), r("div", {
447
- key: 0,
448
- class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",
449
- onClick: n
450
- })) : g("", !0),
451
- d.value ? (t(), r("div", we, [
452
- e("div", _e, [
453
- e("div", ke, f((x = i.workspace) == null ? void 0 : x.title), 1),
454
- m(_(Q), {
455
- class: "w-6 cursor-pointer",
456
- onClick: n
457
- })
458
- ]),
459
- e("div", be, [
460
- e("div", Ce, [
461
- e("div", $e, [
462
- e("div", Ae, [
463
- m(y, {
464
- text: ((L = i.workspace) == null ? void 0 : L.name) || "",
465
- src: (O = i.workspace) == null ? void 0 : O.photo_url,
466
- size: 44,
467
- rounded: !1,
468
- class: "mx-auto"
469
- }, null, 8, ["text", "src"])
470
- ]),
471
- e("div", Se, [
472
- G(f((F = i.workspace) == null ? void 0 : F.name) + " ", 1),
473
- e("div", je, [
474
- m(D, {
475
- variant: "touch",
476
- icon: o.value,
477
- onClick: v
478
- }, null, 8, ["icon"])
479
- ])
480
- ])
481
- ]),
482
- a.value ? (t(), r("div", ze, [
483
- (t(!0), r(j, null, z(i.workspaces, (h) => (t(), r("div", {
484
- key: h.name,
485
- class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
486
- }, [
487
- m(y, {
488
- text: h.name,
489
- src: h.photo_url,
490
- size: 30,
491
- rounded: !1
492
- }, null, 8, ["text", "src"]),
493
- e("span", Le, f(h.name), 1)
494
- ]))), 128))
495
- ])) : g("", !0),
496
- Oe,
497
- e("div", {
498
- onClick: v,
499
- class: "text-center py-2 cursor-pointer",
500
- style: { "font-size": "10px" }
501
- }, f((B = i.workspace) == null ? void 0 : B.changeLabel), 1)
502
- ])
503
- ]),
504
- e("div", Fe, [
505
- e("div", Be, f((M = i.workspace) == null ? void 0 : M.appsLabel), 1),
506
- e("div", Me, [
507
- i.apps && i.apps.length ? (t(), r("div", Ie, [
508
- (t(!0), r(j, null, z(i.apps, (h) => (t(), r("div", {
509
- key: h.id,
510
- onClick: (E) => s(h),
511
- class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
512
- }, [
513
- e("div", Te, [
514
- e("div", De, [
515
- m(y, {
516
- text: h.name,
517
- src: h.photo_url,
518
- size: 44,
519
- rounded: !1
520
- }, null, 8, ["text", "src"])
521
- ]),
522
- e("div", Ve, [
523
- e("p", Ee, f(h.name), 1),
524
- e("p", Ne, f(h == null ? void 0 : h.short), 1)
525
- ])
526
- ]),
527
- e("div", null, [
528
- m(D, {
529
- variant: "touch",
530
- icon: _(ge),
531
- onClick: (E) => s(h)
532
- }, null, 8, ["icon", "onClick"])
533
- ])
534
- ], 8, Pe))), 128))
535
- ])) : g("", !0),
536
- i.apps && i.apps.length ? (t(), r("button", qe, f("Дивитися всі"))) : g("", !0)
537
- ])
538
- ])
539
- ])) : g("", !0)
540
- ], 8, ye);
541
- };
542
- }
543
- });
544
- const Qe = /* @__PURE__ */ X(He, [["__scopeId", "data-v-0cf9ecee"]]);
545
- export {
546
- Qe as O,
547
- oe as _,
548
- V as a,
549
- Ke as b,
550
- re as c,
551
- fe as d,
552
- ge as r
553
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),g=require("./_plugin-vue_export-helper-f246444f.cjs");const h={},f={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}},v=e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1),y=[v];function k(n,r){return e.openBlock(),e.createElementBlock("svg",f,y)}const c=g._export_sfc(h,[["render",k]]),w={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object]}},_=["relative inline-flex","border","items-center justify-center","font-medium whitespace-nowrap","disabled:opacity-50 disabled:cursor-default","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-colors duration-200"],x={sm:["px-2 py-1 text-sm"],md:["px-3 py-2"],lg:["px-4 py-3"]},C={primary:["rounded-md border-transparent bg-primary-base disabled:bg-primary-hover text-sm text-white hover:bg-primary-hover focus:ring-primary-glow"],secondary:["rounded-md border-primary-stroke bg-primary-body disabled:bg-primary-body-hover text-black text-sm hover:bg-primary-body-hover focus:ring-tertiary-glow"],info:["rounded-md border-transparent bg-info-base disabled:bg-info-hover text-white text-sm hover:bg-info-hover focus:ring-info-glow"],success:["rounded-md border-transparent bg-success-base disabled:bg-success-hover text-white text-sm hover:bg-success-hover focus:ring-success-glow"],warning:["rounded-md border-transparent bg-warning-base disabled:bg-warning-hover text-white text-sm hover:bg-warning-hover focus:ring-warning-glow"],danger:["rounded-md border-transparent bg-danger-base disabled:bg-danger-hover text-white text-sm hover:bg-danger-hover focus:ring-danger-glow"],touch:["rounded-full border-transparent text-black hover:bg-primary-body-hover hover:shadow p-3 text-sm focus:ring-tertiary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-gray-500"]},B=(n="primary",r="md")=>{const o=[];return o.push(..._),o.push(...C[n]??[]),n!=="touch"&&o.push(...x[r]??[]),o},z=["disabled","title","type"],L=e.defineComponent({__name:"OneButton",props:w,emits:["click"],setup(n,{emit:r}){const o=r,s=n,u=()=>{o("click")},a=e.computed(()=>s.icon),i=e.computed(()=>s.iconAfter),d=e.computed(()=>{const t=B(s.variant,s.size);return s.variant==="touch"&&s.active&&t.push("bg-primary-body-active"),t}),p=e.computed(()=>s.disabled||s.isLoading),m=e.computed(()=>s.label&&s.label.length>0&&s.variant!=="touch"),b=e.computed(()=>{const t=["inline-block text-ellipsis overflow-hidden"];return a.value!=null&&t.push("ml-2"),i.value!=null&&t.push("mr-2"),t}),l=e.computed(()=>{const t=[];return s.size==="sm"?t.push("w-3 h-3"):s.size==="lg"?t.push("w-5 h-5"):t.push("w-4 h-4"),typeof s.iconClass=="string"?t.push(s.iconClass):s.iconClass instanceof Array&&t.push(...s.iconClass),t});return(t,S)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(d.value),disabled:p.value,title:t.label,type:t.isSubmit?"submit":"button",onClick:e.withModifiers(u,["stop"])},[a.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(c,{key:0,class:e.normalizeClass(l.value)},null,8,["class"])):a.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{key:1,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(b.value)},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0),i.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(c,{key:3,class:e.normalizeClass(l.value)},null,8,["class"])):i.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:4,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,z))}});exports.SpinnerIcon=c;exports._sfc_main=L;