@oneb/ui-vue 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{OneHelpMenu-7eb95bc3.js → OneHelpMenu-82d727ab.js} +22 -18
- package/dist/OneHelpMenu-b8924dc6.cjs +1 -0
- package/dist/dropdown/dropdown.d.ts +5 -1
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +2 -2
- package/dist/index-663366e8.js +1879 -0
- package/dist/index-ed5c16e5.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +1 -1
- package/package.json +1 -1
- package/dist/OneHelpMenu-c0d3251c.cjs +0 -1
- package/dist/index-19ca74b1.cjs +0 -1
- package/dist/index-8a608e81.js +0 -1831
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as z, ref as F, provide as X, computed as S, openBlock as t, createElementBlock as o, renderSlot as N, normalizeProps as R, guardReactiveProps as W, createCommentVNode as u, createVNode as _, Transition as Y, withCtx as P, normalizeClass as M, toDisplayString as c, inject as Z, withModifiers as ee, createBlock as L, resolveDynamicComponent as I, createElementVNode as e, Fragment as $, renderList as A, mergeProps as te, unref as b } from "vue";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as j } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
3
3
|
import { r as U } from "./XMarkIcon-51ef0691.js";
|
|
4
4
|
import { r as G, a as J, b as oe } from "./ChevronRightIcon-8df1af46.js";
|
|
5
5
|
import { OneButton as ne } from "./button/index.js";
|
|
@@ -25,9 +25,13 @@ const se = {
|
|
|
25
25
|
}
|
|
26
26
|
}, Lt = {
|
|
27
27
|
modelValue: {
|
|
28
|
-
type: [Object,
|
|
28
|
+
type: [Object, Array],
|
|
29
29
|
default: null
|
|
30
30
|
},
|
|
31
|
+
multiple: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
31
35
|
items: {
|
|
32
36
|
type: Array,
|
|
33
37
|
default: () => []
|
|
@@ -249,7 +253,7 @@ const de = {
|
|
|
249
253
|
type: Object,
|
|
250
254
|
required: !0
|
|
251
255
|
}
|
|
252
|
-
}, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ve = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, me = { class: "self-center text-base font-medium tracking-wide text-black" }, xe = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ge = { class: "text-left w-full mt-5 px-3" }, ye = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" },
|
|
256
|
+
}, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ve = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, me = { class: "self-center text-base font-medium tracking-wide text-black" }, xe = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ge = { class: "text-left w-full mt-5 px-3" }, ye = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Bt = /* @__PURE__ */ z({
|
|
253
257
|
__name: "OneUserMenu",
|
|
254
258
|
props: de,
|
|
255
259
|
setup(y) {
|
|
@@ -279,7 +283,7 @@ const de = {
|
|
|
279
283
|
onClick: l,
|
|
280
284
|
class: M(["p-1 rounded-full hover:bg-secondary-10", [g ? "bg-secondary-25" : ""]])
|
|
281
285
|
}, [
|
|
282
|
-
_(
|
|
286
|
+
_(j, {
|
|
283
287
|
text: ((n = i.user) == null ? void 0 : n.name) || "",
|
|
284
288
|
size: i.iconSize,
|
|
285
289
|
src: (v = i.user) == null ? void 0 : v.photo_url,
|
|
@@ -292,7 +296,7 @@ const de = {
|
|
|
292
296
|
var l, g, n, v, w;
|
|
293
297
|
return [
|
|
294
298
|
e("div", fe, [
|
|
295
|
-
_(
|
|
299
|
+
_(j, {
|
|
296
300
|
text: ((l = i.user) == null ? void 0 : l.name) || "",
|
|
297
301
|
size: 80,
|
|
298
302
|
src: (g = i.user) == null ? void 0 : g.photo_url,
|
|
@@ -433,7 +437,7 @@ const we = ["data-opened"], ke = {
|
|
|
433
437
|
}, be = { class: "flex justify-between items-center pt-3 mb-3" }, Ce = { class: "font-semibold text-xl px-3" }, $e = { class: "grid" }, Ae = { class: "rounded-lg m-3 border" }, Se = {
|
|
434
438
|
class: "space-x-2 flex items-center px-3 py-2",
|
|
435
439
|
style: { width: "300px" }
|
|
436
|
-
}, Fe = { class: "flex justify-between relative" }, Le = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" },
|
|
440
|
+
}, Fe = { class: "flex justify-between relative" }, Le = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Be = { key: 0 }, je = { class: "text-xs font-semibold" }, ze = { class: "px-3 py-2" }, Me = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Oe = { class: "overflow-auto max-h-full" }, Ee = {
|
|
437
441
|
key: 0,
|
|
438
442
|
class: "space-y-2"
|
|
439
443
|
}, Pe = ["onClick"], Ie = { class: "flex" }, Ve = { 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" }, Te = { class: "text-sm mt-1 font-semibold" }, De = { class: "text9 mt-1" }, qe = {
|
|
@@ -454,7 +458,7 @@ const we = ["data-opened"], ke = {
|
|
|
454
458
|
typeof h.onApp == "function" && h.onApp(n);
|
|
455
459
|
};
|
|
456
460
|
return (n, v) => {
|
|
457
|
-
var w, C, r, m, k,
|
|
461
|
+
var w, C, r, m, k, B;
|
|
458
462
|
return t(), o("div", { "data-opened": a.value }, [
|
|
459
463
|
e("button", {
|
|
460
464
|
onClick: i,
|
|
@@ -479,7 +483,7 @@ const we = ["data-opened"], ke = {
|
|
|
479
483
|
e("div", Ae, [
|
|
480
484
|
e("div", Se, [
|
|
481
485
|
e("div", Fe, [
|
|
482
|
-
_(
|
|
486
|
+
_(j, {
|
|
483
487
|
text: ((C = n.workspace) == null ? void 0 : C.name) || "",
|
|
484
488
|
src: (r = n.workspace) == null ? void 0 : r.photo_url,
|
|
485
489
|
size: 44,
|
|
@@ -489,18 +493,18 @@ const we = ["data-opened"], ke = {
|
|
|
489
493
|
]),
|
|
490
494
|
e("div", Le, c((m = n.workspace) == null ? void 0 : m.name), 1)
|
|
491
495
|
]),
|
|
492
|
-
d.value ? (t(), o("div",
|
|
496
|
+
d.value ? (t(), o("div", Be, [
|
|
493
497
|
(t(!0), o($, null, A(n.workspaces, (x) => (t(), o("div", {
|
|
494
498
|
key: x.name,
|
|
495
499
|
class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
|
|
496
500
|
}, [
|
|
497
|
-
_(
|
|
501
|
+
_(j, {
|
|
498
502
|
text: x.name,
|
|
499
503
|
src: x.photo_url,
|
|
500
504
|
size: 30,
|
|
501
505
|
rounded: !1
|
|
502
506
|
}, null, 8, ["text", "src"]),
|
|
503
|
-
e("span",
|
|
507
|
+
e("span", je, c(x.name), 1)
|
|
504
508
|
]))), 128))
|
|
505
509
|
])) : u("", !0),
|
|
506
510
|
v[0] || (v[0] = e("hr", null, null, -1)),
|
|
@@ -512,7 +516,7 @@ const we = ["data-opened"], ke = {
|
|
|
512
516
|
])
|
|
513
517
|
]),
|
|
514
518
|
e("div", ze, [
|
|
515
|
-
e("div", Me, c((
|
|
519
|
+
e("div", Me, c((B = n.workspace) == null ? void 0 : B.appsLabel), 1),
|
|
516
520
|
e("div", Oe, [
|
|
517
521
|
n.apps && n.apps.length ? (t(), o("div", Ee, [
|
|
518
522
|
(t(!0), o($, null, A(n.apps, (x) => (t(), o("div", {
|
|
@@ -522,7 +526,7 @@ const we = ["data-opened"], ke = {
|
|
|
522
526
|
}, [
|
|
523
527
|
e("div", Ie, [
|
|
524
528
|
e("div", Ve, [
|
|
525
|
-
_(
|
|
529
|
+
_(j, {
|
|
526
530
|
text: x.name,
|
|
527
531
|
src: x.photo_url,
|
|
528
532
|
size: 44,
|
|
@@ -551,7 +555,7 @@ const we = ["data-opened"], ke = {
|
|
|
551
555
|
};
|
|
552
556
|
}
|
|
553
557
|
});
|
|
554
|
-
const
|
|
558
|
+
const jt = /* @__PURE__ */ Q(Ne, [["__scopeId", "data-v-2628df74"]]);
|
|
555
559
|
function Re(y, p) {
|
|
556
560
|
return t(), o("svg", {
|
|
557
561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -646,7 +650,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
646
650
|
w.value = !w.value;
|
|
647
651
|
};
|
|
648
652
|
return (r, m) => {
|
|
649
|
-
var k,
|
|
653
|
+
var k, B, x, O, V, H, T, D, q;
|
|
650
654
|
return t(), o("div", { "data-opened": a.value }, [
|
|
651
655
|
e("button", {
|
|
652
656
|
onClick: i,
|
|
@@ -667,7 +671,7 @@ const Ue = ["data-opened"], Ge = {
|
|
|
667
671
|
onClick: i
|
|
668
672
|
})
|
|
669
673
|
]),
|
|
670
|
-
(
|
|
674
|
+
(B = r.help) != null && B.helpButton ? (t(), o("div", Xe, [
|
|
671
675
|
(t(!0), o($, null, A((x = r.help) == null ? void 0 : x.helpButton, (s) => (t(), o("button", {
|
|
672
676
|
key: s.name,
|
|
673
677
|
onClick: (E) => v(s.link, s),
|
|
@@ -762,10 +766,10 @@ const Ue = ["data-opened"], Ge = {
|
|
|
762
766
|
});
|
|
763
767
|
const zt = /* @__PURE__ */ Q(kt, [["__scopeId", "data-v-071eaf70"]]);
|
|
764
768
|
export {
|
|
765
|
-
|
|
769
|
+
jt as O,
|
|
766
770
|
ae as _,
|
|
767
771
|
K as a,
|
|
768
|
-
|
|
772
|
+
Bt as b,
|
|
769
773
|
zt as c,
|
|
770
774
|
se as d,
|
|
771
775
|
ue as e,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),x=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),$=require("./XMarkIcon-f94baa4c.cjs"),_=require("./ChevronRightIcon-6aa413c4.cjs"),j=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),F={title:{type:String},stick:{type:String,default:"right"}},O={variant:{type:String,default:"primary"},label:{type:String},icon:{type:[Function,Object]}},P={modelValue:{type:[Object,Array],default:null},multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},title:{type:String},placeholder:{type:String,default:"Select"},searchPlaceholder:{type:String,default:"Search"},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"id"},stick:{type:String,default:"bottom-start"},allowEmpty:{type:Boolean,default:!1},emptyLabel:{type:String},createLabel:{type:String},searchable:{type:Boolean,default:!0},isLoading:{type:Boolean,default:!1},groupKey:{type:String},maxWidth:{type:String}},q=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},L=e.defineComponent({__name:"OneDropdown",props:F,emits:["open","close"],setup(f,{emit:a}){const d=e.ref(!1),i=e.ref(null),s=a,r=f,c=()=>{d.value=!d.value,d.value?s("open"):s("close")};e.provide("OneDropdown",{onToggle:c});const n=e.computed(()=>{var k;const t=(k=i.value)==null?void 0:k.getBoundingClientRect(),p=t?t.x<270:!1;return t&&t.top+270>window.innerHeight?"up"+(p?"-right":"-left"):"down"+(p?"-right":"-left")}),h=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 n.value.startsWith("up")?t.push("bottom-1 mb-10"):n.value.startsWith("down")&&t.push("top-1 mt-10"),r.stick==="right"?t.push("right-0"):r.stick==="left"&&t.push("left-0"),t});return(t,p)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"menuRef",ref:i,"data-opened":d.value},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:c,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:c})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",h.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[t.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:c})))],2)):e.createCommentVNode("",!0)]),_:3})],8,q))}}),B=e.defineComponent({__name:"OneDropdownItem",props:O,emits:["click"],setup(f,{emit:a}){const d=a,i=f,s=e.inject("OneDropdown"),r=()=>{s!==void 0&&s.onToggle(),d("click")},c=e.computed(()=>{const n=[];return i.variant==="secondary"?n.push("text-secondary-content hover:bg-secondary-body-hover"):i.variant==="danger"?n.push("text-danger-content hover:bg-danger-10"):i.variant==="warning"?n.push("text-warning-content hover:bg-warning-10"):i.variant==="info"?n.push("text-info-content hover:bg-info-10"):n.push("hover:bg-secondary-body-hover"),n});return(n,h)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",c.value]),onClick:e.withModifiers(r,["prevent"])},[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(n.label),1)],2))}});function H(f,a){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 T={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}},D={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}},R={help:{type:Object,required:!0}},W=["onClick"],K={class:"flex flex-col items-center pt-5 pb-2 h-full"},U={class:"flex flex-col px-10 py-1 mt-2 text-center"},X={class:"self-center text-base font-medium tracking-wide text-black"},G={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},J={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:T,setup(f){const a=f,d=e.computed(()=>{var r;return(r=a.menu)==null?void 0:r.map(c=>{let n={label:c.label};c.icon!=null&&(n={...n,icon:c.icon});const h=typeof c.click=="function"?c.click:()=>{};return{key:c.label,args:n,click:h}})}),i=()=>{typeof a.onAccount=="function"&&a.onAccount()},s=()=>{typeof a.onLogout=="function"&&a.onLogout()};return(r,c)=>(e.openBlock(),e.createBlock(L,{stick:"right"},{button:e.withCtx(({onToggle:n,isExpanded:h})=>{var t,p;return[e.createElementVNode("button",{onClick:n,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[h?"bg-secondary-25":""]])},[e.createVNode(x._sfc_main,{text:((t=r.user)==null?void 0:t.name)||"",size:r.iconSize,src:(p=r.user)==null?void 0:p.photo_url,rounded:!0},null,8,["text","size","src"])],10,W)]}),menu:e.withCtx(()=>{var n,h,t,p,k;return[e.createElementVNode("div",K,[e.createVNode(x._sfc_main,{text:((n=r.user)==null?void 0:n.name)||"",size:80,src:(h=r.user)==null?void 0:h.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",U,[e.createElementVNode("div",X,e.toDisplayString((t=r.user)==null?void 0:t.name),1),e.createElementVNode("div",G,e.toDisplayString((p=r.user)==null?void 0:p.email),1)]),typeof a.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i,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(r.accountLabel),1)):e.createCommentVNode("",!0),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,v=>(e.openBlock(),e.createBlock(B,e.mergeProps({key:v.key,ref_for:!0},v.args,{onClick:v.click}),null,16,["onClick"]))),128)),typeof r.onLogout=="function"?(e.openBlock(),e.createBlock(B,{key:0,icon:e.unref(H),label:r.logoutLabel,class:"rounded py-3",onClick:s},null,8,["icon","label"])):e.createCommentVNode("",!0)]),c[0]||(c[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((k=r.app)==null?void 0:k.version),1)])]}),_:1}))}});function z(f,a){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 Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},de={class:"px-3 py-2"},pe={class:"text-secondary-content text-left pb-1 text-xs uppercase"},ue={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ke={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ge={class:"pl-2"},ve={class:"text-sm mt-1 font-semibold"},ye={class:"text9 mt-1"},xe={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},_e=e.defineComponent({__name:"OneBrowserMenu",props:D,emits:["open","close"],setup(f,{emit:a}){const d=a,i=f,s=e.ref(!1),r=()=>{s.value=!s.value,s.value?d("open"):d("close")},c=e.ref(!1);e.computed(()=>c.value?_.render:_.render$1);const n=()=>{typeof i.onChange=="function"&&i.onChange()},h=t=>{typeof i.onApp=="function"&&i.onApp(t)};return(t,p)=>{var k,v,l,u,g,y;return e.openBlock(),e.createElementBlock("div",{"data-opened":s.value},[e.createElementVNode("button",{onClick:r,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":s.value}])},[e.createVNode(e.unref(z),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:r})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString((k=t.workspace)==null?void 0:k.title),1),e.createVNode(e.unref($.render),{class:"w-6 cursor-pointer",onClick:r})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(x._sfc_main,{text:((v=t.workspace)==null?void 0:v.name)||"",src:(l=t.workspace)==null?void 0:l.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((u=t.workspace)==null?void 0:u.name),1)]),c.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.workspaces,m=>(e.openBlock(),e.createElementBlock("div",{key:m.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(x._sfc_main,{text:m.name,src:m.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(m.name),1)]))),128))])):e.createCommentVNode("",!0),p[0]||(p[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:n,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString((g=t.workspace)==null?void 0:g.changeLabel),1)])]),e.createElementVNode("div",de,[e.createElementVNode("div",pe,e.toDisplayString((y=t.workspace)==null?void 0:y.appsLabel),1),e.createElementVNode("div",ue,[t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.apps,m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,onClick:w=>h(m),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ke,[e.createVNode(x._sfc_main,{text:m.name,src:m.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ge,[e.createElementVNode("p",ve,e.toDisplayString(m.name),1),e.createElementVNode("p",ye,e.toDisplayString(m==null?void 0:m.short),1)])]),e.createElementVNode("div",null,[e.createVNode(j.OneButton,{variant:"touch",icon:e.unref(_.render$2),onClick:w=>h(m)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),t.apps&&t.apps.length?(e.openBlock(),e.createElementBlock("button",xe,e.toDisplayString("Дивитися всі"))):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(_e,[["__scopeId","data-v-2628df74"]]);function be(f,a){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function Be(f,a){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function M(f,a){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}const Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},Se={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},$e=["onClick"],Ae={class:"uppercase text-[8px]"},Fe={class:"overflow-y-auto grid rounded-xl"},Le={class:"max-h-full bg-[#FAFAFA]"},De={key:0,class:"space-y-2"},ze=["onClick"],Me={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},Pe={class:"text-[10px] mt-1 text-[#979CA9]"},qe={class:"mt-auto"},Ie={key:0},He=["onClick"],Te={class:"flex items-center space-x-3"},Re={class:"h-16"},We={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},Ke={class:"flex justify-between"},Ue=["onClick"],Xe={key:0,class:"tooltip-text min-w-[70px]"},Ge={class:"flex justify-between mb-4"},Je=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(f,{emit:a}){const d=a,i=f,s=e.ref(!1),r=()=>{s.value=!s.value,s.value?d("open"):d("close")},c=e.computed(()=>k.value?_.render:_.render$1),n=e.ref(3),h=e.computed(()=>{var u,g;const l=((g=(u=i.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;return n.value===l});e.computed(()=>{var u;return(((u=i.help)==null?void 0:u.helpList)||[]).slice(0,n.value)});const t=()=>{var u,g;const l=((g=(u=i.help)==null?void 0:u.helpList)==null?void 0:g.length)||0;n.value=h.value?3:l},p=(l,u)=>{l&&u&&typeof u.openLink=="function"?u.openLink(u):l&&window.open(l,"_blank")},k=e.ref(!1),v=()=>{k.value=!k.value};return(l,u)=>{var g,y,m,w,E,V,N,C,S;return e.openBlock(),e.createElementBlock("div",{"data-opened":s.value},[e.createElementVNode("button",{onClick:r,class:e.normalizeClass(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10",{"bg-secondary-10":s.value}])},[e.createVNode(e.unref(be),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:r})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString((g=l.help)==null?void 0:g.label),1),e.createVNode(e.unref($.render),{class:"w-6 cursor-pointer",onClick:r})]),(y=l.help)!=null&&y.helpButton?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((m=l.help)==null?void 0:m.helpButton,o=>(e.openBlock(),e.createElementBlock("button",{key:o.name,onClick:b=>p(o.link,o),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o==null?void 0:o.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Ae,e.toDisplayString(o.name),1)],8,$e))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Fe,[e.createElementVNode("div",Le,[(w=l.help)!=null&&w.helpList&&l.help.helpList.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.helpList,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:b=>p(o.link,o),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",Me,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(o.name),1),e.createElementVNode("p",Pe,e.toDisplayString(o.category),1)])])],8,ze))),128))])):e.createCommentVNode("",!0)])]),(E=l.help)!=null&&E.helpList&&l.help.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:t,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(h.value?l.help.buttNoMore:l.help.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qe,[(V=l.help)!=null&&V.video?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.help.video,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,onClick:b=>p(o.link,o),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(Be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(o.name),1)],8,He))),128))])):e.createCommentVNode("",!0),(N=l.help)!=null&&N.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:v,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",Te,[e.createVNode(e.unref(M),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.help.socialButt),1)]),e.createVNode(e.unref(c),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=l.help)==null?void 0:C.socialList,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,onClick:b=>p(o.link,o),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[o.name?(e.openBlock(),e.createElementBlock("div",Xe,e.toDisplayString(o.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o==null?void 0:o.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Ue))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=l.help)==null?void 0:S.termsOffer,o=>(e.openBlock(),e.createElementBlock("a",{key:o.name,target:"_blank",href:o.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(o.name),1)])])],8,Je))),128))])])])):e.createCommentVNode("",!0)],8,Ee)}}});const tt=A._export_sfc(et,[["__scopeId","data-v-071eaf70"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=L;exports._sfc_main$1=B;exports._sfc_main$2=Y;exports.browserMenuProps=D;exports.dropdownProps=F;exports.dropdownSelectProps=P;exports.render=z;exports.render$1=M;
|
|
@@ -24,9 +24,13 @@ export declare const dropdownItemProps: {
|
|
|
24
24
|
export type DropdownItemProps = ExtractPropTypes<typeof dropdownItemProps>;
|
|
25
25
|
export declare const dropdownSelectProps: {
|
|
26
26
|
modelValue: {
|
|
27
|
-
type: PropType<Record<string, any
|
|
27
|
+
type: PropType<Record<string, any> | Record<string, any>[]>;
|
|
28
28
|
default: any;
|
|
29
29
|
};
|
|
30
|
+
multiple: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
30
34
|
items: {
|
|
31
35
|
type: PropType<Record<string, any>[]>;
|
|
32
36
|
default: () => any[];
|
package/dist/dropdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../OneHelpMenu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../OneHelpMenu-b8924dc6.cjs"),r=require("../index-ed5c16e5.cjs");require("vue");require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs");require("../XMarkIcon-f94baa4c.cjs");require("../ChevronRightIcon-6aa413c4.cjs");require("../button/index.cjs");require("../SpinnerIcon-89c60210.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");exports.OneBrowserMenu=e.OneBrowserMenu;exports.OneDropdown=e._sfc_main;exports.OneDropdownItem=e._sfc_main$1;exports.OneHelpMenu=e.OneHelpMenu;exports.OneUserMenu=e._sfc_main$2;exports.OneBrowserMenuGrid=r._sfc_main$1;exports.OneDropdownAuto=r._sfc_main;exports.OneDropdownDivider=r.OneDropdownDivider;exports.OneDropdownSelect=r._sfc_main$2;
|
package/dist/dropdown/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as m, _ as O, a as d, c as w, b as D } from "../OneHelpMenu-
|
|
2
|
-
import { b as M, _ as c, a as b, c as f } from "../index-
|
|
1
|
+
import { O as m, _ as O, a as d, c as w, b as D } from "../OneHelpMenu-82d727ab.js";
|
|
2
|
+
import { b as M, _ as c, a as b, c as f } from "../index-663366e8.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
5
5
|
import "../XMarkIcon-51ef0691.js";
|