@oneb/ui-vue 0.0.52 → 0.0.54
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-29074956.js +527 -0
- package/dist/OneBrowserMenu-8223b11f.cjs +1 -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
package/dist/layout/layout.d.ts
CHANGED
|
@@ -18,10 +18,47 @@ export type NewsType = {
|
|
|
18
18
|
openVideoText: string;
|
|
19
19
|
menuLabel?: string;
|
|
20
20
|
};
|
|
21
|
+
export type LinkType = {
|
|
22
|
+
url: string;
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
export type AppType = {
|
|
26
|
+
name: string;
|
|
27
|
+
workspace: string;
|
|
28
|
+
version?: string;
|
|
29
|
+
help: LinkType;
|
|
30
|
+
support: LinkType;
|
|
31
|
+
terms: LinkType;
|
|
32
|
+
offer: LinkType;
|
|
33
|
+
availableLang: Array<{
|
|
34
|
+
label: string;
|
|
35
|
+
code: string;
|
|
36
|
+
}>;
|
|
37
|
+
apps: Array<{
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
inf: string;
|
|
41
|
+
photo_url: string;
|
|
42
|
+
}>;
|
|
43
|
+
availablePlans: Array<{
|
|
44
|
+
name: string;
|
|
45
|
+
link?: string;
|
|
46
|
+
title?: string;
|
|
47
|
+
}>;
|
|
48
|
+
selectedPlan: {
|
|
49
|
+
name: string;
|
|
50
|
+
link?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
21
54
|
export type SupportType = {
|
|
22
55
|
url: string;
|
|
23
56
|
menuLabel?: string;
|
|
24
57
|
};
|
|
58
|
+
export type TermsType = {
|
|
59
|
+
url: string;
|
|
60
|
+
menuLabel?: string;
|
|
61
|
+
};
|
|
25
62
|
export type SidebarItemType = {
|
|
26
63
|
label: string;
|
|
27
64
|
route?: string | Record<string, any>;
|
|
@@ -30,6 +67,9 @@ export type SidebarItemType = {
|
|
|
30
67
|
exact?: boolean;
|
|
31
68
|
icon?: FunctionalComponent | Component;
|
|
32
69
|
};
|
|
70
|
+
export type SidebarLangItemType = {
|
|
71
|
+
label: any;
|
|
72
|
+
};
|
|
33
73
|
export declare const sidebarProps: {
|
|
34
74
|
items: {
|
|
35
75
|
required: boolean;
|
|
@@ -39,8 +79,8 @@ export declare const sidebarProps: {
|
|
|
39
79
|
type: BooleanConstructor;
|
|
40
80
|
default: boolean;
|
|
41
81
|
};
|
|
42
|
-
|
|
43
|
-
type: PropType<
|
|
82
|
+
app: {
|
|
83
|
+
type: PropType<AppType>;
|
|
44
84
|
};
|
|
45
85
|
news: {
|
|
46
86
|
type: PropType<NewsType>;
|
|
@@ -63,6 +103,9 @@ export declare const sidebarLinkProps: {
|
|
|
63
103
|
href: {
|
|
64
104
|
type: StringConstructor;
|
|
65
105
|
};
|
|
106
|
+
app: {
|
|
107
|
+
type: ObjectConstructor;
|
|
108
|
+
};
|
|
66
109
|
label: {
|
|
67
110
|
type: StringConstructor;
|
|
68
111
|
required: boolean;
|
|
@@ -92,13 +135,7 @@ export declare const mainLayoutProps: {
|
|
|
92
135
|
type: StringConstructor;
|
|
93
136
|
};
|
|
94
137
|
app: {
|
|
95
|
-
|
|
96
|
-
type: PropType<{
|
|
97
|
-
name: string;
|
|
98
|
-
workspace: string;
|
|
99
|
-
photo_url: string;
|
|
100
|
-
apps: Array<any>;
|
|
101
|
-
}>;
|
|
138
|
+
type: PropType<AppType>;
|
|
102
139
|
};
|
|
103
140
|
user: {
|
|
104
141
|
type: PropType<{
|
|
@@ -117,8 +154,31 @@ export declare const mainLayoutProps: {
|
|
|
117
154
|
version: string;
|
|
118
155
|
}>;
|
|
119
156
|
};
|
|
120
|
-
|
|
121
|
-
type: PropType<
|
|
157
|
+
apps: {
|
|
158
|
+
type: PropType<{
|
|
159
|
+
id: string;
|
|
160
|
+
name: string;
|
|
161
|
+
photo_url?: string;
|
|
162
|
+
open_url?: string;
|
|
163
|
+
}[]>;
|
|
164
|
+
};
|
|
165
|
+
workspaces: {
|
|
166
|
+
type: PropType<{
|
|
167
|
+
name: string;
|
|
168
|
+
photo_url?: string;
|
|
169
|
+
link: string;
|
|
170
|
+
}[]>;
|
|
171
|
+
};
|
|
172
|
+
workspace: {
|
|
173
|
+
type: PropType<{
|
|
174
|
+
name: string;
|
|
175
|
+
photo_url?: string;
|
|
176
|
+
}>;
|
|
177
|
+
};
|
|
178
|
+
yourApps: {
|
|
179
|
+
type: PropType<{
|
|
180
|
+
label: string;
|
|
181
|
+
}>;
|
|
122
182
|
};
|
|
123
183
|
news: {
|
|
124
184
|
type: PropType<NewsType>;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@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
|
+
.h-browser[data-v-10078238]{height:calc(100% - 75px)}.text8[data-v-57d3d3f4]{font-size:8px}.dropdown[data-v-57d3d3f4]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.text8[data-v-58ff58ea]{font-size:10px}@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/dist/tailwind.config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={"slate-500":"#5F6E79","white-bg":"#FFFFFF","gray-bg":"#FAFAFA","gray-light":"#979CA9","gray-700":"#525B66","gray-email":"#E2E7EF","gray-email-light":"rgba(226, 231, 239, 0.3)","gray-active":"#EAEFF8","slate-850":"#1D2632","rose-850":"#FF0440",input:"#E2E7EF",block:"#E3ECF2","black-700":"#333333","black-800":"#040404","blue-550":"#4089E0","red-700":"#FF0440","green-700":"#70BE33","orange-700":"#FFBA08","black-opacyti":"rgba(0, 0, 0, 0.2)",background:{backdrop:"rgba(0,0,0,0.1)",DEFAULT:"#
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={"slate-500":"#5F6E79","white-bg":"#FFFFFF","gray-bg":"#FAFAFA","gray-light":"#979CA9","gray-700":"#525B66","gray-email":"#E2E7EF","gray-email-light":"rgba(226, 231, 239, 0.3)","gray-active":"#EAEFF8","slate-850":"#1D2632","rose-850":"#FF0440",input:"#E2E7EF",block:"#E3ECF2","black-700":"#333333","black-800":"#040404","blue-550":"#4089E0","red-700":"#FF0440","green-700":"#70BE33","orange-700":"#FFBA08","black-opacyti":"rgba(0, 0, 0, 0.2)",background:{backdrop:"rgba(0,0,0,0.1)",DEFAULT:"#FAFAFA",second:"#F6F8FF",light:"#FBFDFF"},primary:{glow:"#BCD6F4",base:"#4089E0",active:"#256DC3",hover:"#5A9FF1",25:"rgba(64,137,224,0.25)","25-active":"rgba(64,137,224,0.3)","25-hover":"rgba(64,137,224,0.3)",10:"rgba(64,137,224,0.1)","10-active":"rgba(64,137,224,0.15)","10-hover":"rgba(64,137,224,0.15)",content:"#000000","content-active":"#000000","content-hover":"#000000",stroke:"#E2E7EF","stroke-active":"#E2E7EF","stroke-hover":"#E2E7EF",body:"#FFFFFF","body-active":"#EAEFF8","body-hover":"#EAEFF8"},secondary:{glow:"#8c97a6",base:"#525B66",active:"#444b54",hover:"#444b54",25:"rgba(82,91,102,0.25)","25-active":"rgba(82,91,102,0.3)","25-hover":"rgba(82,91,102,0.3)",10:"rgba(82,91,102,0.1)","10-active":"rgba(82,91,102,0.15)","10-hover":"rgba(82,91,102,0.15)",content:"#979CA9","content-active":"#979CA9","content-hover":"#979CA9",stroke:"#E3ECF2","stroke-active":"#E3ECF2","stroke-hover":"#E3ECF2",body:"#F6F8FF","body-active":"#FAFAFA","body-hover":"#FAFAFA"},light:{glow:"#eae5e5",base:"#ffffff",active:"#ffffff",hover:"#ffffff",25:"#ffffff","25-active":"#ffffff","25-hover":"#ffffff",10:"#ffffff","10-active":"#ffffff","10-hover":"#ffffff",content:"#a1a3a9","content-active":"#a1a3a9","content-hover":"#a1a3a9",stroke:"#ebeff1","stroke-active":"#ebeff1","stroke-hover":"#ebeff1",body:"#F5F5F5","body-active":"#FAFAFA","body-hover":"#FAFAFA"},success:{glow:"#b7f686",base:"#70BE33",active:"#62A52D",hover:"#7BD237",25:"rgba(112,190,51,0.25)","25-active":"rgba(112,190,51,0.3)","25-hover":"rgba(112,190,51,0.3)",10:"rgba(112,190,51,0.1)","10-active":"rgba(112,190,51,0.15)","10-hover":"rgba(112,190,51,0.15)",content:"#5da920","content-active":"#5da920","content-hover":"#5da920",stroke:"#81b955","stroke-active":"#81b955","stroke-hover":"#81b955",body:"#99be7b","body-active":"#99be7b","body-hover":"#99be7b"},info:{glow:"#BCD6F4",base:"#4089E0",active:"#256DC3",hover:"#5A9FF1",25:"rgba(64,137,224,0.25)","25-active":"rgba(64,137,224,0.3)","25-hover":"rgba(64,137,224,0.3)",10:"rgba(64,137,224,0.1)","10-active":"rgba(64,137,224,0.15)","10-hover":"rgba(64,137,224,0.15)",content:"#2167bb","content-active":"#2167bb","content-hover":"#2167bb",stroke:"#689ddc","stroke-active":"#689ddc","stroke-hover":"#689ddc",body:"#8dafd7","body-active":"#8dafd7","body-hover":"#8dafd7"},warning:{glow:"#f8e9c2",base:"#FFBA08",active:"#e5a502",hover:"#ffc11e",25:"rgba(255,186,8,0.25)","25-active":"rgba(255,186,8,0.3)","25-hover":"rgba(255,186,8,0.3)",10:"rgba(255,186,8,0.1)","10-active":"rgba(255,186,8,0.15)","10-hover":"rgba(255,186,8,0.15)",content:"#b78400","content-active":"#b78400","content-hover":"#b78400",stroke:"#f8c644","stroke-active":"#f8c644","stroke-hover":"#f8c644",body:"#f8d988","body-active":"#f8d988","body-hover":"#f8d988"},danger:{glow:"#fa9fb5",base:"#FF0440",active:"#DF073B",hover:"#FF3E6C",25:"rgba(255,4,64,0.25)","25-active":"rgba(255,4,64,0.3)","25-hover":"rgba(255,4,64,0.3)",10:"rgba(255,4,64,0.1)","10-active":"rgba(255,4,64,0.15)","10-hover":"rgba(255,4,64,0.15)",content:"#b7002d","content-active":"#b7002d","content-hover":"#b7002d",stroke:"#ff4e78","stroke-active":"#ff4e78","stroke-hover":"#ff4e78",body:"#ff90aa","body-active":"#ff90aa","body-hover":"#ff90aa"},tertiary:{glow:"#E7EFFC",base:"#E7EFFC",active:"#E7EFFC",hover:"#E7EFFC",25:"rgba(231,239,252,0.25)","25-active":"rgba(231,239,252,0.3)","25-hover":"rgba(231,239,252,0.3)",10:"rgba(231,239,252,0.1)","10-active":"rgba(231,239,252,0.15)","10-hover":"rgba(231,239,252,0.15)",content:"#E7EFFC","content-active":"#E7EFFC","content-hover":"#E7EFFC",stroke:"#E7EFFC","stroke-active":"#E7EFFC","stroke-hover":"#E7EFFC",body:"#E7EFFC","body-active":"#E7EFFC","body-hover":"#E7EFFC"}},a={"2xs":"10px","3xs":"8px"},o={sans:['"Montserrat"',"system-ui","sans-serif"]},t={center:!0,screens:{sm:"100%",md:"100%",lg:"920px",xl:"1116px","2xl":"1116px"}},r={container:t,extend:{fontSize:a,fontFamily:o,colors:e}};exports.colors=e;exports.container=t;exports.fontFamily=o;exports.fontSize=a;exports.theme=r;
|
package/dist/tailwind.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./common/index.cjs"),g={title:{type:String},stick:{type:String,default:"right"}},y={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},k=["data-opened"],x={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},f=e.defineComponent({__name:"OneDropdown",props:g,emits:["open","close"],setup(d,{emit:s}){const a=d,c=e.ref(!1),r=e.ref(null),n=()=>{c.value=!c.value,c.value?s("open"):s("close")};e.provide("OneDropdown",{onToggle:n});const t=e.computed(()=>{const o=r.value!=null&&r.value.offsetLeft<270;return r.value!=null&&r.value.offsetTop+270>window.innerHeight?"up"+(o?"-right":"-left"):"down"+(o?"-right":"-left")}),l=e.computed(()=>{const o=["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")?o.push("bottom-1 mb-10"):t.value.startsWith("down")&&o.push("top-1 mt-10"),a.stick==="right"?o.push("right-0"):a.stick==="left"&&o.push("left-0"),o});return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:r,"data-opened":c.value},[e.renderSlot(o.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:n,isExpanded:c.value}))),c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:n})):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(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",l.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[o.title?(e.openBlock(),e.createElementBlock("div",x,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:n})))],2)):e.createCommentVNode("",!0)]),_:3})],8,k))}}),v=["onClick"],m=e.defineComponent({__name:"OneDropdownItem",props:y,emits:["click"],setup(d,{emit:s}){const a=d,c=e.inject("OneDropdown"),r=()=>{c!==void 0&&c.onToggle(),s("click")},n=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,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",n.value]),onClick:e.withModifiers(r,["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)],10,v))}});function w(d,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 b={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},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},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},appsTitle:{type:String,default:"Apps"},changeLabel:{type:String,default:"Change"},onChange:{type:Function},onApp:{type:Function}},C=["onClick"],V={class:"flex flex-col items-center pt-5 pb-2 h-full"},E={class:"flex flex-col px-10 py-1 mt-2 text-center"},N={class:"self-center text-base font-medium tracking-wide text-black"},B={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},S=["onClick"],$={class:"text-left w-full mt-3 px-2.5",style:{width:"240px"}},z={key:1,class:"flex-shrink-0 mx-auto mt-3 leading-3 text-gray-400",style:{"font-size":"10px"}},A=e.defineComponent({__name:"OneUserMenu",props:b,setup(d){const s=d,a=e.computed(()=>{var n;return(n=s.menu)==null?void 0:n.map(t=>{let l={label:t.label};t.icon!=null&&(l={...l,icon:t.icon});const o=typeof t.click=="function"?t.click:()=>{};return{key:t.label,args:l,click:o}})}),c=()=>{typeof s.onAccount=="function"&&s.onAccount()},r=()=>{typeof s.onLogout=="function"&&s.onLogout()};return(n,t)=>(e.openBlock(),e.createBlock(f,{stick:"right"},{button:e.withCtx(({onToggle:l,isExpanded:o})=>{var i,u;return[e.createElementVNode("button",{onClick:l,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[o?"bg-secondary-25":""]])},[e.createVNode(p.OneAvatar,{text:((i=n.user)==null?void 0:i.name)||"",size:n.iconSize,src:(u=n.user)==null?void 0:u.photo_url,rounded:!0},null,8,["text","size","src"])],10,C)]}),menu:e.withCtx(()=>{var l,o,i,u;return[e.createElementVNode("div",V,[e.createVNode(p.OneAvatar,{text:((l=n.user)==null?void 0:l.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",E,[e.createElementVNode("div",N,e.toDisplayString((i=n.user)==null?void 0:i.name),1),e.createElementVNode("div",B,e.toDisplayString((u=n.user)==null?void 0:u.email),1)]),typeof s.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:e.withModifiers(c,["prevent"]),href:"#",class:"mt-3 justify-center px-5 py-1.5 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-white border-slate-200 rounded-[50px] hover:bg-neutral-50"},e.toDisplayString(n.accountLabel),9,S)):e.createCommentVNode("",!0),e.createElementVNode("div",$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,h=>(e.openBlock(),e.createBlock(m,e.mergeProps({key:h.key},h.args,{onClick:h.click,class:"rounded-md !text-secondary-base"}),null,16,["onClick"]))),128)),e.createVNode(m,{icon:e.unref(w),label:n.logoutLabel,class:"rounded-md !text-secondary-base",onClick:r},null,8,["icon","label"])]),n.versionLabel!==""?(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(n.versionLabel),1)):e.createCommentVNode("",!0)])]}),_:1}))}});function L(d,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"})])}const D=["onClick"],O={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},P={class:"flex-shrink-0"},j={class:"w-full text-left"},F={class:"flex-shrink-0"},M={class:"px-3 py-2 border-t border-secondary-stroke"},T={class:"text-secondary-content text-left pb-1 text-sm"},q={class:"grid grid-cols-3 gap-1"},R=["onClick"],H={class:"block bg-white mx-auto flex-shrink-0 border border-secondary-stroke p-1 rounded-lg"},I={class:"w-full overflow-hidden text-ellipsis whitespace-nowrap text-center text-sm mt-1"},W=e.defineComponent({__name:"OneBrowserMenu",props:_,setup(d){const s=d,a=()=>{typeof s.onChange=="function"&&s.onChange()},c=r=>{typeof s.onApp=="function"&&s.onApp(r)};return(r,n)=>(e.openBlock(),e.createBlock(f,{stick:"right"},{button:e.withCtx(({onToggle:t,isExpanded:l})=>[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[l?"bg-secondary-25":""]])},[e.createVNode(e.unref(L),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${r.iconSize}px; height: ${r.iconSize}px`)},null,8,["style"])],10,D)]),menu:e.withCtx(()=>{var t,l,o;return[e.createElementVNode("div",O,[e.createElementVNode("div",P,[e.createVNode(p.OneAvatar,{text:((t=r.workspace)==null?void 0:t.name)||"",src:(l=r.workspace)==null?void 0:l.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",j,e.toDisplayString((o=r.workspace)==null?void 0:o.name),1),e.createElementVNode("div",F,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:a},e.toDisplayString(r.changeLabel),1)])]),e.createElementVNode("div",M,[e.createElementVNode("div",T,e.toDisplayString(r.appsTitle),1),e.createElementVNode("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.apps,i=>(e.openBlock(),e.createElementBlock("button",{key:i.id,onClick:u=>c(i),class:"p-1.5 flex flex-col items-center justify-center rounded hover:bg-secondary-10",style:{width:"88px",height:"88px"}},[e.createElementVNode("span",H,[e.createVNode(p.OneAvatar,{text:i.name,src:i.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("span",I,e.toDisplayString(i.name),1)],8,R))),128))])])]}),_:1}))}});exports._sfc_main=f;exports._sfc_main$1=m;exports._sfc_main$2=A;exports._sfc_main$3=W;
|
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, ref as C, provide as D, computed as x, openBlock as l, createElementBlock as u, renderSlot as $, normalizeProps as S, guardReactiveProps as L, createCommentVNode as y, createVNode as f, Transition as F, withCtx as m, normalizeClass as b, toDisplayString as p, inject as M, withModifiers as A, createBlock as v, resolveDynamicComponent as T, createElementVNode as e, Fragment as O, renderList as j, mergeProps as V, unref as P, normalizeStyle as E } from "vue";
|
|
2
|
-
import { OneAvatar as w } from "./common/index.js";
|
|
3
|
-
const q = {
|
|
4
|
-
title: {
|
|
5
|
-
type: String
|
|
6
|
-
},
|
|
7
|
-
stick: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "right"
|
|
10
|
-
}
|
|
11
|
-
}, H = {
|
|
12
|
-
variant: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "primary"
|
|
15
|
-
},
|
|
16
|
-
label: {
|
|
17
|
-
type: String
|
|
18
|
-
},
|
|
19
|
-
icon: {
|
|
20
|
-
type: [Function, Object]
|
|
21
|
-
}
|
|
22
|
-
}, I = ["data-opened"], N = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "text-sm text-secondary-content px-3 py-2 text-left"
|
|
25
|
-
}, B = /* @__PURE__ */ k({
|
|
26
|
-
__name: "OneDropdown",
|
|
27
|
-
props: q,
|
|
28
|
-
emits: ["open", "close"],
|
|
29
|
-
setup(h, { emit: s }) {
|
|
30
|
-
const d = h, c = C(!1), r = C(null), n = () => {
|
|
31
|
-
c.value = !c.value, c.value ? s("open") : s("close");
|
|
32
|
-
};
|
|
33
|
-
D("OneDropdown", {
|
|
34
|
-
onToggle: n
|
|
35
|
-
});
|
|
36
|
-
const t = x(() => {
|
|
37
|
-
const o = r.value != null && r.value.offsetLeft < 270;
|
|
38
|
-
return r.value != null && r.value.offsetTop + 270 > window.innerHeight ? "up" + (o ? "-right" : "-left") : "down" + (o ? "-right" : "-left");
|
|
39
|
-
}), i = x(() => {
|
|
40
|
-
const o = [
|
|
41
|
-
"absolute z-10 w-fit rounded-md bg-white",
|
|
42
|
-
"py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
|
|
43
|
-
"overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
|
|
44
|
-
];
|
|
45
|
-
return t.value.startsWith("up") ? o.push("bottom-1 mb-10") : t.value.startsWith("down") && o.push("top-1 mt-10"), d.stick === "right" ? o.push("right-0") : d.stick === "left" && o.push("left-0"), o;
|
|
46
|
-
});
|
|
47
|
-
return (o, a) => (l(), u("div", {
|
|
48
|
-
class: "relative inline-block",
|
|
49
|
-
ref_key: "menuRef",
|
|
50
|
-
ref: r,
|
|
51
|
-
"data-opened": c.value
|
|
52
|
-
}, [
|
|
53
|
-
$(o.$slots, "button", S(L({ onToggle: n, isExpanded: c.value }))),
|
|
54
|
-
c.value ? (l(), u("div", {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: "fixed top-0 left-0 w-screen h-screen z-10",
|
|
57
|
-
onClick: n
|
|
58
|
-
})) : y("", !0),
|
|
59
|
-
f(F, {
|
|
60
|
-
"enter-active-class": "transition ease-out duration-100",
|
|
61
|
-
"enter-from-class": "transform opacity-0 scale-95",
|
|
62
|
-
"enter-to-class": "transform opacity-100 scale-100",
|
|
63
|
-
"leave-active-class": "transition ease-in duration-75",
|
|
64
|
-
"leave-from-class": "transform opacity-100 scale-100",
|
|
65
|
-
"leave-to-class": "transform opacity-0 scale-95"
|
|
66
|
-
}, {
|
|
67
|
-
default: m(() => [
|
|
68
|
-
c.value ? (l(), u("div", {
|
|
69
|
-
key: 0,
|
|
70
|
-
class: b(["menu", i.value]),
|
|
71
|
-
role: "menu",
|
|
72
|
-
"aria-orientation": "vertical",
|
|
73
|
-
tabindex: "-1"
|
|
74
|
-
}, [
|
|
75
|
-
o.title ? (l(), u("div", N, p(o.title), 1)) : y("", !0),
|
|
76
|
-
$(o.$slots, "menu", S(L({ onToggle: n })))
|
|
77
|
-
], 2)) : y("", !0)
|
|
78
|
-
]),
|
|
79
|
-
_: 3
|
|
80
|
-
})
|
|
81
|
-
], 8, I));
|
|
82
|
-
}
|
|
83
|
-
}), R = ["onClick"], z = /* @__PURE__ */ k({
|
|
84
|
-
__name: "OneDropdownItem",
|
|
85
|
-
props: H,
|
|
86
|
-
emits: ["click"],
|
|
87
|
-
setup(h, { emit: s }) {
|
|
88
|
-
const d = h, c = M("OneDropdown"), r = () => {
|
|
89
|
-
c !== void 0 && c.onToggle(), s("click");
|
|
90
|
-
}, n = x(() => {
|
|
91
|
-
const t = [];
|
|
92
|
-
return d.variant === "secondary" ? t.push("text-secondary-content hover:bg-secondary-body-hover") : d.variant === "danger" ? t.push("text-danger-content hover:bg-danger-10") : d.variant === "warning" ? t.push("text-warning-content hover:bg-warning-10") : d.variant === "info" ? t.push("text-info-content hover:bg-info-10") : t.push("hover:bg-secondary-body-hover"), t;
|
|
93
|
-
});
|
|
94
|
-
return (t, i) => (l(), u("button", {
|
|
95
|
-
class: b(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", n.value]),
|
|
96
|
-
onClick: A(r, ["prevent"])
|
|
97
|
-
}, [
|
|
98
|
-
t.icon ? (l(), v(T(t.icon), {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: "w-4 h-4"
|
|
101
|
-
})) : y("", !0),
|
|
102
|
-
e("span", null, p(t.label), 1)
|
|
103
|
-
], 10, R));
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
function W(h, s) {
|
|
107
|
-
return l(), u("svg", {
|
|
108
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
109
|
-
fill: "none",
|
|
110
|
-
viewBox: "0 0 24 24",
|
|
111
|
-
"stroke-width": "1.8",
|
|
112
|
-
stroke: "currentColor",
|
|
113
|
-
"aria-hidden": "true"
|
|
114
|
-
}, [
|
|
115
|
-
e("path", {
|
|
116
|
-
"stroke-linecap": "round",
|
|
117
|
-
"stroke-linejoin": "round",
|
|
118
|
-
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"
|
|
119
|
-
})
|
|
120
|
-
]);
|
|
121
|
-
}
|
|
122
|
-
const U = {
|
|
123
|
-
user: {
|
|
124
|
-
type: Object,
|
|
125
|
-
required: !0
|
|
126
|
-
},
|
|
127
|
-
menu: {
|
|
128
|
-
type: Array,
|
|
129
|
-
default: () => []
|
|
130
|
-
},
|
|
131
|
-
iconSize: {
|
|
132
|
-
type: String,
|
|
133
|
-
default: "34"
|
|
134
|
-
},
|
|
135
|
-
accountLabel: {
|
|
136
|
-
type: String,
|
|
137
|
-
default: "Account"
|
|
138
|
-
},
|
|
139
|
-
logoutLabel: {
|
|
140
|
-
type: String,
|
|
141
|
-
default: "Logout"
|
|
142
|
-
},
|
|
143
|
-
versionLabel: {
|
|
144
|
-
type: String,
|
|
145
|
-
default: ""
|
|
146
|
-
},
|
|
147
|
-
onAccount: {
|
|
148
|
-
type: Function
|
|
149
|
-
},
|
|
150
|
-
onLogout: {
|
|
151
|
-
type: Function
|
|
152
|
-
}
|
|
153
|
-
}, G = {
|
|
154
|
-
workspace: {
|
|
155
|
-
type: Object,
|
|
156
|
-
required: !0
|
|
157
|
-
},
|
|
158
|
-
apps: {
|
|
159
|
-
type: Array,
|
|
160
|
-
required: !0
|
|
161
|
-
},
|
|
162
|
-
iconSize: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: "24"
|
|
165
|
-
},
|
|
166
|
-
appsTitle: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: "Apps"
|
|
169
|
-
},
|
|
170
|
-
changeLabel: {
|
|
171
|
-
type: String,
|
|
172
|
-
default: "Change"
|
|
173
|
-
},
|
|
174
|
-
onChange: {
|
|
175
|
-
type: Function
|
|
176
|
-
},
|
|
177
|
-
onApp: {
|
|
178
|
-
type: Function
|
|
179
|
-
}
|
|
180
|
-
}, J = ["onClick"], K = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, Q = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, X = { class: "self-center text-base font-medium tracking-wide text-black" }, Y = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, Z = ["onClick"], ee = {
|
|
181
|
-
class: "text-left w-full mt-3 px-2.5",
|
|
182
|
-
style: { width: "240px" }
|
|
183
|
-
}, te = {
|
|
184
|
-
key: 1,
|
|
185
|
-
class: "flex-shrink-0 mx-auto mt-3 leading-3 text-gray-400",
|
|
186
|
-
style: { "font-size": "10px" }
|
|
187
|
-
}, ye = /* @__PURE__ */ k({
|
|
188
|
-
__name: "OneUserMenu",
|
|
189
|
-
props: U,
|
|
190
|
-
setup(h) {
|
|
191
|
-
const s = h, d = x(() => {
|
|
192
|
-
var n;
|
|
193
|
-
return (n = s.menu) == null ? void 0 : n.map((t) => {
|
|
194
|
-
let i = { label: t.label };
|
|
195
|
-
t.icon != null && (i = { ...i, icon: t.icon });
|
|
196
|
-
const o = typeof t.click == "function" ? t.click : () => {
|
|
197
|
-
};
|
|
198
|
-
return {
|
|
199
|
-
key: t.label,
|
|
200
|
-
args: i,
|
|
201
|
-
click: o
|
|
202
|
-
};
|
|
203
|
-
});
|
|
204
|
-
}), c = () => {
|
|
205
|
-
typeof s.onAccount == "function" && s.onAccount();
|
|
206
|
-
}, r = () => {
|
|
207
|
-
typeof s.onLogout == "function" && s.onLogout();
|
|
208
|
-
};
|
|
209
|
-
return (n, t) => (l(), v(B, { stick: "right" }, {
|
|
210
|
-
button: m(({ onToggle: i, isExpanded: o }) => {
|
|
211
|
-
var a, g;
|
|
212
|
-
return [
|
|
213
|
-
e("button", {
|
|
214
|
-
onClick: i,
|
|
215
|
-
class: b(["p-1 rounded-full hover:bg-secondary-10", [o ? "bg-secondary-25" : ""]])
|
|
216
|
-
}, [
|
|
217
|
-
f(w, {
|
|
218
|
-
text: ((a = n.user) == null ? void 0 : a.name) || "",
|
|
219
|
-
size: n.iconSize,
|
|
220
|
-
src: (g = n.user) == null ? void 0 : g.photo_url,
|
|
221
|
-
rounded: !0
|
|
222
|
-
}, null, 8, ["text", "size", "src"])
|
|
223
|
-
], 10, J)
|
|
224
|
-
];
|
|
225
|
-
}),
|
|
226
|
-
menu: m(() => {
|
|
227
|
-
var i, o, a, g;
|
|
228
|
-
return [
|
|
229
|
-
e("div", K, [
|
|
230
|
-
f(w, {
|
|
231
|
-
text: ((i = n.user) == null ? void 0 : i.name) || "",
|
|
232
|
-
size: 80,
|
|
233
|
-
src: (o = n.user) == null ? void 0 : o.photo_url,
|
|
234
|
-
rounded: !0,
|
|
235
|
-
class: "mx-auto"
|
|
236
|
-
}, null, 8, ["text", "src"]),
|
|
237
|
-
e("div", Q, [
|
|
238
|
-
e("div", X, p((a = n.user) == null ? void 0 : a.name), 1),
|
|
239
|
-
e("div", Y, p((g = n.user) == null ? void 0 : g.email), 1)
|
|
240
|
-
]),
|
|
241
|
-
typeof s.onAccount == "function" ? (l(), u("a", {
|
|
242
|
-
key: 0,
|
|
243
|
-
onClick: A(c, ["prevent"]),
|
|
244
|
-
href: "#",
|
|
245
|
-
class: "mt-3 justify-center px-5 py-1.5 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-white border-slate-200 rounded-[50px] hover:bg-neutral-50"
|
|
246
|
-
}, p(n.accountLabel), 9, Z)) : y("", !0),
|
|
247
|
-
e("div", ee, [
|
|
248
|
-
(l(!0), u(O, null, j(d.value, (_) => (l(), v(z, V({
|
|
249
|
-
key: _.key
|
|
250
|
-
}, _.args, {
|
|
251
|
-
onClick: _.click,
|
|
252
|
-
class: "rounded-md !text-secondary-base"
|
|
253
|
-
}), null, 16, ["onClick"]))), 128)),
|
|
254
|
-
f(z, {
|
|
255
|
-
icon: P(W),
|
|
256
|
-
label: n.logoutLabel,
|
|
257
|
-
class: "rounded-md !text-secondary-base",
|
|
258
|
-
onClick: r
|
|
259
|
-
}, null, 8, ["icon", "label"])
|
|
260
|
-
]),
|
|
261
|
-
n.versionLabel !== "" ? (l(), u("div", te, p(n.versionLabel), 1)) : y("", !0)
|
|
262
|
-
])
|
|
263
|
-
];
|
|
264
|
-
}),
|
|
265
|
-
_: 1
|
|
266
|
-
}));
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
function oe(h, s) {
|
|
270
|
-
return l(), u("svg", {
|
|
271
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
272
|
-
fill: "none",
|
|
273
|
-
viewBox: "0 0 24 24",
|
|
274
|
-
"stroke-width": "1.8",
|
|
275
|
-
stroke: "currentColor",
|
|
276
|
-
"aria-hidden": "true"
|
|
277
|
-
}, [
|
|
278
|
-
e("rect", {
|
|
279
|
-
width: "2.94",
|
|
280
|
-
height: "2.94",
|
|
281
|
-
x: "17.16",
|
|
282
|
-
y: "3.9",
|
|
283
|
-
fill: "currentColor",
|
|
284
|
-
"stroke-width": "1.8",
|
|
285
|
-
rx: "1.1"
|
|
286
|
-
}),
|
|
287
|
-
e("rect", {
|
|
288
|
-
width: "2.94",
|
|
289
|
-
height: "2.94",
|
|
290
|
-
x: "10.53",
|
|
291
|
-
y: "3.9",
|
|
292
|
-
fill: "currentColor",
|
|
293
|
-
"stroke-width": "1.8",
|
|
294
|
-
rx: "1.1"
|
|
295
|
-
}),
|
|
296
|
-
e("rect", {
|
|
297
|
-
width: "2.94",
|
|
298
|
-
height: "2.94",
|
|
299
|
-
x: "3.9",
|
|
300
|
-
y: "3.9",
|
|
301
|
-
fill: "currentColor",
|
|
302
|
-
"stroke-width": "1.8",
|
|
303
|
-
rx: "1.1"
|
|
304
|
-
}),
|
|
305
|
-
e("rect", {
|
|
306
|
-
width: "2.94",
|
|
307
|
-
height: "2.94",
|
|
308
|
-
x: "17.16",
|
|
309
|
-
y: "10.53",
|
|
310
|
-
fill: "currentColor",
|
|
311
|
-
"stroke-width": "1.8",
|
|
312
|
-
rx: "1.1"
|
|
313
|
-
}),
|
|
314
|
-
e("rect", {
|
|
315
|
-
width: "2.94",
|
|
316
|
-
height: "2.94",
|
|
317
|
-
x: "10.53",
|
|
318
|
-
y: "10.53",
|
|
319
|
-
fill: "currentColor",
|
|
320
|
-
"stroke-width": "1.8",
|
|
321
|
-
rx: "1.1"
|
|
322
|
-
}),
|
|
323
|
-
e("rect", {
|
|
324
|
-
width: "2.94",
|
|
325
|
-
height: "2.94",
|
|
326
|
-
x: "3.9",
|
|
327
|
-
y: "10.53",
|
|
328
|
-
fill: "currentColor",
|
|
329
|
-
"stroke-width": "1.8",
|
|
330
|
-
rx: "1.1"
|
|
331
|
-
}),
|
|
332
|
-
e("rect", {
|
|
333
|
-
width: "2.94",
|
|
334
|
-
height: "2.94",
|
|
335
|
-
x: "17.16",
|
|
336
|
-
y: "17.16",
|
|
337
|
-
fill: "currentColor",
|
|
338
|
-
"stroke-width": "1.8",
|
|
339
|
-
rx: "1.1"
|
|
340
|
-
}),
|
|
341
|
-
e("rect", {
|
|
342
|
-
width: "2.94",
|
|
343
|
-
height: "2.94",
|
|
344
|
-
x: "10.53",
|
|
345
|
-
y: "17.16",
|
|
346
|
-
fill: "currentColor",
|
|
347
|
-
"stroke-width": "1.8",
|
|
348
|
-
rx: "1.1"
|
|
349
|
-
}),
|
|
350
|
-
e("rect", {
|
|
351
|
-
width: "2.94",
|
|
352
|
-
height: "2.94",
|
|
353
|
-
x: "3.9",
|
|
354
|
-
y: "17.16",
|
|
355
|
-
fill: "currentColor",
|
|
356
|
-
"stroke-width": "1.8",
|
|
357
|
-
rx: "1.1"
|
|
358
|
-
})
|
|
359
|
-
]);
|
|
360
|
-
}
|
|
361
|
-
const ne = ["onClick"], re = {
|
|
362
|
-
class: "space-x-2 flex items-center px-3 py-2",
|
|
363
|
-
style: { width: "300px" }
|
|
364
|
-
}, se = { class: "flex-shrink-0" }, ie = { class: "w-full text-left" }, le = { class: "flex-shrink-0" }, ce = { class: "px-3 py-2 border-t border-secondary-stroke" }, ae = { class: "text-secondary-content text-left pb-1 text-sm" }, ue = { class: "grid grid-cols-3 gap-1" }, de = ["onClick"], pe = { class: "block bg-white mx-auto flex-shrink-0 border border-secondary-stroke p-1 rounded-lg" }, he = { class: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-center text-sm mt-1" }, me = /* @__PURE__ */ k({
|
|
365
|
-
__name: "OneBrowserMenu",
|
|
366
|
-
props: G,
|
|
367
|
-
setup(h) {
|
|
368
|
-
const s = h, d = () => {
|
|
369
|
-
typeof s.onChange == "function" && s.onChange();
|
|
370
|
-
}, c = (r) => {
|
|
371
|
-
typeof s.onApp == "function" && s.onApp(r);
|
|
372
|
-
};
|
|
373
|
-
return (r, n) => (l(), v(B, { stick: "right" }, {
|
|
374
|
-
button: m(({ onToggle: t, isExpanded: i }) => [
|
|
375
|
-
e("button", {
|
|
376
|
-
onClick: t,
|
|
377
|
-
class: b(["p-1 rounded-md hover:bg-secondary-10", [i ? "bg-secondary-25" : ""]])
|
|
378
|
-
}, [
|
|
379
|
-
f(P(oe), {
|
|
380
|
-
class: "text-secondary-base",
|
|
381
|
-
style: E(`width: ${r.iconSize}px; height: ${r.iconSize}px`)
|
|
382
|
-
}, null, 8, ["style"])
|
|
383
|
-
], 10, ne)
|
|
384
|
-
]),
|
|
385
|
-
menu: m(() => {
|
|
386
|
-
var t, i, o;
|
|
387
|
-
return [
|
|
388
|
-
e("div", re, [
|
|
389
|
-
e("div", se, [
|
|
390
|
-
f(w, {
|
|
391
|
-
text: ((t = r.workspace) == null ? void 0 : t.name) || "",
|
|
392
|
-
src: (i = r.workspace) == null ? void 0 : i.photo_url,
|
|
393
|
-
size: 44,
|
|
394
|
-
rounded: !1,
|
|
395
|
-
class: "mx-auto"
|
|
396
|
-
}, null, 8, ["text", "src"])
|
|
397
|
-
]),
|
|
398
|
-
e("div", ie, p((o = r.workspace) == null ? void 0 : o.name), 1),
|
|
399
|
-
e("div", le, [
|
|
400
|
-
e("button", {
|
|
401
|
-
class: "text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",
|
|
402
|
-
onClick: d
|
|
403
|
-
}, p(r.changeLabel), 1)
|
|
404
|
-
])
|
|
405
|
-
]),
|
|
406
|
-
e("div", ce, [
|
|
407
|
-
e("div", ae, p(r.appsTitle), 1),
|
|
408
|
-
e("div", ue, [
|
|
409
|
-
(l(!0), u(O, null, j(r.apps, (a) => (l(), u("button", {
|
|
410
|
-
key: a.id,
|
|
411
|
-
onClick: (g) => c(a),
|
|
412
|
-
class: "p-1.5 flex flex-col items-center justify-center rounded hover:bg-secondary-10",
|
|
413
|
-
style: { width: "88px", height: "88px" }
|
|
414
|
-
}, [
|
|
415
|
-
e("span", pe, [
|
|
416
|
-
f(w, {
|
|
417
|
-
text: a.name,
|
|
418
|
-
src: a.photo_url,
|
|
419
|
-
size: 44,
|
|
420
|
-
rounded: !1
|
|
421
|
-
}, null, 8, ["text", "src"])
|
|
422
|
-
]),
|
|
423
|
-
e("span", he, p(a.name), 1)
|
|
424
|
-
], 8, de))), 128))
|
|
425
|
-
])
|
|
426
|
-
])
|
|
427
|
-
];
|
|
428
|
-
}),
|
|
429
|
-
_: 1
|
|
430
|
-
}));
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
export {
|
|
434
|
-
B as _,
|
|
435
|
-
z as a,
|
|
436
|
-
ye as b,
|
|
437
|
-
me as c
|
|
438
|
-
};
|
package/dist/index-3615f53c.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),b=require("./_plugin-vue_export-helper-f246444f.cjs");const g={},h={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}},f=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),v=[f];function y(o,n){return e.openBlock(),e.createElementBlock("svg",h,v)}const i=b._export_sfc(g,[["render",y]]),k={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]}},w=["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"],C={sm:["px-2 py-1 text-sm"],md:["px-3 py-2"],lg:["px-4 py-3"]},_={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"]},x=(o="primary",n="md")=>{const s=[];return s.push(...w),s.push(..._[o]??[]),o!=="touch"&&s.push(...C[n]??[]),s},B=["disabled","title","type","onClick"],z=e.defineComponent({__name:"OneButton",props:k,emits:["click"],setup(o,{emit:n}){const s=o,c=()=>{n("click")},r=e.computed(()=>s.icon),a=e.computed(()=>s.iconAfter),u=e.computed(()=>{const t=x(s.variant,s.size);return s.variant==="touch"&&s.active&&t.push("bg-primary-body-active"),t}),d=e.computed(()=>s.disabled||s.isLoading),p=e.computed(()=>s.label&&s.label.length>0&&s.variant!=="touch"),m=e.computed(()=>{const t=["inline-block text-ellipsis overflow-hidden"];return r.value!=null&&t.push("ml-2"),a.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,L)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(u.value),disabled:d.value,title:t.label,type:t.isSubmit?"submit":"button",onClick:e.withModifiers(c,["stop"])},[r.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(i,{key:0,class:e.normalizeClass(l.value)},null,8,["class"])):r.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:1,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(m.value)},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0),a.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(i,{key:3,class:e.normalizeClass(l.value)},null,8,["class"])):a.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{key:4,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,B))}});exports.SpinnerIcon=i;exports._sfc_main=z;
|