@oneb/ui-vue 0.1.13 → 0.1.14
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/index.cjs +1 -1
- package/dist/index.js +46 -46
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index-668faddf.cjs"),m=require("./card/index.cjs"),p=require("./form/index.cjs"),f=require("./OneBrowserMenu-3650ed5d.cjs"),_=require("./dropdown/index.cjs"),x=require("./common/index.cjs"),e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const C={color:{type:String,default:"red"},size:{type:String,default:"sm"},text:{type:String,default:""},variant:{type:String,default:"indicators"},bargeVariant:{type:String,default:"stand"}},b=e.defineComponent({__name:"OneIndicators",props:{...C},setup(c){const t=c,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index-668faddf.cjs"),m=require("./card/index.cjs"),p=require("./form/index.cjs"),f=require("./OneBrowserMenu-3650ed5d.cjs"),_=require("./dropdown/index.cjs"),x=require("./common/index.cjs"),e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const C={color:{type:String,default:"red"},size:{type:String,default:"sm"},text:{type:String,default:""},variant:{type:String,default:"indicators"},bargeVariant:{type:String,default:"stand"}},b=e.defineComponent({__name:"OneIndicators",props:{...C},setup(c){const t=c,l=e.computed(()=>{switch(t.color){case"green":return"#70BE33";case"blue":return"#4089E0";case"red":return"#FF0440";case"yellow":return"#FFBA08";default:return"#FFBA08"}}),u=e.computed(()=>{let n="",s="",o;return t.text?t.size==="sm"?(s="min-w-[12px]",o="textSm"):t.size==="md"?(s="min-w-[16px]",o="textMd"):t.size==="lg"&&(s="min-w-[20px]",o="textLg"):t.size==="sm"?n="w-3 min-w-[12px]":t.size==="lg"?n="w-5 min-w-[20px]":t.size==="md"&&(n="w-4 min-w-[16px]"),`${n} ${o} ${s} h-${t.size==="sm"?3:t.size==="lg"?5:4}`}),i=e.computed(()=>{let n="",s="",o;return t.text?t.size==="sm"?(s="min-w-[44px]",o="textMd"):t.size==="md"?(s="min-w-[58px]",o="text10"):t.size==="lg"&&(s="min-w-[68px]",o="text-sm"):t.size==="sm"?n="min-w-[44px]":t.size==="lg"?n="min-w-[68px]":t.size==="md"&&(n="min-w-[58px]"),`${n} ${o} ${s} h-${t.size==="sm"?5:t.size==="lg"?7:6}`}),d=e.computed(()=>{const n=t.bargeVariant==="stand"?"1A":"",s=t.bargeVariant==="stand"?"1px solid":"none";return{backgroundColor:`${l.value}${n}`,border:s,borderColor:l.value}});return(n,s)=>t.variant==="indicators"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rounded-full border border-white flex items-center justify-center w-max",[u.value]]),style:e.normalizeStyle({backgroundColor:l.value})},[e.createElementVNode("p",{class:"px-1 font-semibold",style:e.normalizeStyle({color:(l.value!=="#FFBA08","white")})},e.toDisplayString(n.text),5)],6)):t.variant==="barge"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded px-2 py-1 text-center w-max",[i.value,{"rounded-full":n.bargeVariant==="round",rounded:n.bargeVariant!=="round"}]]),style:e.normalizeStyle([d.value])},[e.createElementVNode("p",{class:"font-medium",style:e.normalizeStyle({color:n.bargeVariant!=="stand"?"white":l.value})},e.toDisplayString(n.text),5)],6)):e.createCommentVNode("",!0)}});const h=y._export_sfc(b,[["__scopeId","data-v-6b353b46"]]),w=e.defineComponent({__name:"OneLabel",props:{size:{type:String,default:"standard"},color:{type:String,default:"blue"},filled:{type:Boolean,default:!0},text:{type:String,default:"Label"}},setup(c){const t=c,l=e.ref(!1),u=e.computed(()=>{const n="inline-flex items-center cursor-pointer transition-opacity rounded-full",s=t.size==="mini"?"text-xs px-3 py-1":"text-sm px-4 py-2",o=t.filled?`${t.color}-filled`:`${t.color}-border`;return`${n} ${s} ${o} ${l.value?"opacity-80":"hover:opacity-90"}`}),i=()=>{l.value=!0},d=()=>{l.value=!1};return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onMousedown:i,onMouseup:d,onMouseleave:d},[e.createElementVNode("span",null,e.toDisplayString(c.text),1)],34))}});const z=e.defineComponent({__name:"OneCollapse",props:{blockClass:{},titleClass:{},defaultOpen:{type:Boolean}},setup(c){const t=c,{blockClass:l,titleClass:u,defaultOpen:i}=e.toRefs(t),d=e.ref(null),n=e.ref((i==null?void 0:i.value)??!1),s=()=>{n.value=!n.value},o=r=>{const a=r;a.style.height="0"},g=r=>{const a=r;console.log(r.clientHeight),console.log(r.scrollHeight),a.style.height=`${r.scrollHeight}px`,a.style.transition="height 0.3s ease"},v=r=>{const a=r;a.style.height=`${r.scrollHeight}px`,e.nextTick(()=>{a.style.height="0",a.style.transition="height 0.3s ease"})};return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l))},[e.createElementVNode("div",{onClick:s,class:e.normalizeClass(e.unref(u))},[e.renderSlot(r.$slots,"title",{isOpen:n.value},void 0,!0)],2),e.createVNode(e.Transition,{name:"accordion",onBeforeEnter:o,onEnter:g,onLeave:v},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:d,class:"overflow-hidden"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],512)):e.createCommentVNode("",!0)]),_:3})],2))}});const B=y._export_sfc(z,[["__scopeId","data-v-dc42c471"]]);exports.OneButton=O._sfc_main;exports.OneCard=m.OneCard;exports.OneCardBody=m.OneCardBody;exports.OneCardFooter=m.OneCardFooter;exports.OneCardHeader=m.OneCardHeader;exports.OneForm=p.OneForm;exports.OneFormFeedback=p.OneFormFeedback;exports.OneFormField=p.OneFormField;exports.OneFormInput=p.OneFormInput;exports.OneFormLabel=p.OneFormLabel;exports.OneBrowserMenu=f.OneBrowserMenu;exports.OneDropdown=f._sfc_main;exports.OneDropdownItem=f._sfc_main$1;exports.OneUserMenu=f._sfc_main$2;exports.OneBrowserMenuGrid=_.OneBrowserMenuGrid;exports.OneDropdownDivider=_.OneDropdownDivider;exports.OneAvatar=x.OneAvatar;exports.OneCollapse=B;exports.OneIndicators=h;exports.OneLabel=w;
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { OneCard as j, OneCardBody as G, OneCardFooter as U, OneCardHeader as q
|
|
|
3
3
|
import { OneForm as K, OneFormFeedback as Q, OneFormField as X, OneFormInput as Y, OneFormLabel as Z } from "./form/index.js";
|
|
4
4
|
import { O as te, _ as se, a as ne, b as oe } from "./OneBrowserMenu-8cf71483.js";
|
|
5
5
|
import { OneBrowserMenuGrid as le, OneDropdownDivider as ae } from "./dropdown/index.js";
|
|
6
|
-
import { OneAvatar as
|
|
7
|
-
import { defineComponent as
|
|
6
|
+
import { OneAvatar as ce } from "./common/index.js";
|
|
7
|
+
import { defineComponent as v, computed as u, openBlock as p, createElementBlock as m, normalizeClass as f, normalizeStyle as x, createElementVNode as g, toDisplayString as _, createCommentVNode as w, ref as y, toRefs as $, unref as h, renderSlot as b, createVNode as F, Transition as k, withCtx as S, nextTick as B } from "vue";
|
|
8
8
|
import { _ as C } from "./_plugin-vue_export-helper-dad06003.js";
|
|
9
9
|
import "./XMarkIcon-51ef0691.js";
|
|
10
10
|
const E = {
|
|
@@ -28,13 +28,13 @@ const E = {
|
|
|
28
28
|
type: String,
|
|
29
29
|
default: "stand"
|
|
30
30
|
}
|
|
31
|
-
}, V = /* @__PURE__ */
|
|
31
|
+
}, V = /* @__PURE__ */ v({
|
|
32
32
|
__name: "OneIndicators",
|
|
33
33
|
props: {
|
|
34
34
|
...E
|
|
35
35
|
},
|
|
36
36
|
setup(i) {
|
|
37
|
-
const e = i,
|
|
37
|
+
const e = i, r = u(() => {
|
|
38
38
|
switch (e.color) {
|
|
39
39
|
case "green":
|
|
40
40
|
return "#70BE33";
|
|
@@ -47,42 +47,42 @@ const E = {
|
|
|
47
47
|
default:
|
|
48
48
|
return "#FFBA08";
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), d = u(() => {
|
|
51
51
|
let t = "", s = "", n;
|
|
52
52
|
return e.text ? e.size === "sm" ? (s = "min-w-[12px]", n = "textSm") : e.size === "md" ? (s = "min-w-[16px]", n = "textMd") : e.size === "lg" && (s = "min-w-[20px]", n = "textLg") : e.size === "sm" ? t = "w-3 min-w-[12px]" : e.size === "lg" ? t = "w-5 min-w-[20px]" : e.size === "md" && (t = "w-4 min-w-[16px]"), `${t} ${n} ${s} h-${e.size === "sm" ? 3 : e.size === "lg" ? 5 : 4}`;
|
|
53
53
|
}), a = u(() => {
|
|
54
54
|
let t = "", s = "", n;
|
|
55
55
|
return e.text ? e.size === "sm" ? (s = "min-w-[44px]", n = "textMd") : e.size === "md" ? (s = "min-w-[58px]", n = "text10") : e.size === "lg" && (s = "min-w-[68px]", n = "text-sm") : e.size === "sm" ? t = "min-w-[44px]" : e.size === "lg" ? t = "min-w-[68px]" : e.size === "md" && (t = "min-w-[58px]"), `${t} ${n} ${s} h-${e.size === "sm" ? 5 : e.size === "lg" ? 7 : 6}`;
|
|
56
|
-
}),
|
|
56
|
+
}), c = u(() => {
|
|
57
57
|
const t = e.bargeVariant === "stand" ? "1A" : "", s = e.bargeVariant === "stand" ? "1px solid" : "none";
|
|
58
58
|
return {
|
|
59
|
-
backgroundColor: `${
|
|
59
|
+
backgroundColor: `${r.value}${t}`,
|
|
60
60
|
border: s,
|
|
61
|
-
borderColor:
|
|
61
|
+
borderColor: r.value
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
64
|
return (t, s) => e.variant === "indicators" ? (p(), m("div", {
|
|
65
65
|
key: 0,
|
|
66
|
-
class: f(["rounded-full border border-white flex items-center justify-center w-max", [
|
|
67
|
-
style: x({ backgroundColor:
|
|
66
|
+
class: f(["rounded-full border border-white flex items-center justify-center w-max", [d.value]]),
|
|
67
|
+
style: x({ backgroundColor: r.value })
|
|
68
68
|
}, [
|
|
69
|
-
|
|
69
|
+
g("p", {
|
|
70
70
|
class: "px-1 font-semibold",
|
|
71
|
-
style: x({ color: (
|
|
72
|
-
},
|
|
71
|
+
style: x({ color: (r.value !== "#FFBA08", "white") })
|
|
72
|
+
}, _(t.text), 5)
|
|
73
73
|
], 6)) : e.variant === "barge" ? (p(), m("div", {
|
|
74
74
|
key: 1,
|
|
75
75
|
class: f(["rounded px-2 py-1 text-center w-max", [a.value, { "rounded-full": t.bargeVariant === "round", rounded: t.bargeVariant !== "round" }]]),
|
|
76
|
-
style: x([
|
|
76
|
+
style: x([c.value])
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
g("p", {
|
|
79
79
|
class: "font-medium",
|
|
80
|
-
style: x({ color: t.bargeVariant !== "stand" ? "white" :
|
|
81
|
-
},
|
|
80
|
+
style: x({ color: t.bargeVariant !== "stand" ? "white" : r.value })
|
|
81
|
+
}, _(t.text), 5)
|
|
82
82
|
], 6)) : w("", !0);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
const D = /* @__PURE__ */ C(V, [["__scopeId", "data-v-6b353b46"]]), H = /* @__PURE__ */
|
|
85
|
+
const D = /* @__PURE__ */ C(V, [["__scopeId", "data-v-6b353b46"]]), H = /* @__PURE__ */ v({
|
|
86
86
|
__name: "OneLabel",
|
|
87
87
|
props: {
|
|
88
88
|
size: {
|
|
@@ -107,25 +107,25 @@ const D = /* @__PURE__ */ C(V, [["__scopeId", "data-v-6b353b46"]]), H = /* @__PU
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
setup(i) {
|
|
110
|
-
const e = i,
|
|
110
|
+
const e = i, r = y(!1), d = u(() => {
|
|
111
111
|
const t = "inline-flex items-center cursor-pointer transition-opacity rounded-full", s = e.size === "mini" ? "text-xs px-3 py-1" : "text-sm px-4 py-2", n = e.filled ? `${e.color}-filled` : `${e.color}-border`;
|
|
112
|
-
return `${t} ${s} ${n} ${
|
|
112
|
+
return `${t} ${s} ${n} ${r.value ? "opacity-80" : "hover:opacity-90"}`;
|
|
113
113
|
}), a = () => {
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
114
|
+
r.value = !0;
|
|
115
|
+
}, c = () => {
|
|
116
|
+
r.value = !1;
|
|
117
117
|
};
|
|
118
118
|
return (t, s) => (p(), m("div", {
|
|
119
|
-
class: f(
|
|
119
|
+
class: f(d.value),
|
|
120
120
|
onMousedown: a,
|
|
121
|
-
onMouseup:
|
|
122
|
-
onMouseleave:
|
|
121
|
+
onMouseup: c,
|
|
122
|
+
onMouseleave: c
|
|
123
123
|
}, [
|
|
124
|
-
|
|
124
|
+
g("span", null, _(i.text), 1)
|
|
125
125
|
], 34));
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
const I = /* @__PURE__ */
|
|
128
|
+
const I = /* @__PURE__ */ v({
|
|
129
129
|
__name: "OneCollapse",
|
|
130
130
|
props: {
|
|
131
131
|
blockClass: {},
|
|
@@ -133,28 +133,28 @@ const I = /* @__PURE__ */ g({
|
|
|
133
133
|
defaultOpen: { type: Boolean }
|
|
134
134
|
},
|
|
135
135
|
setup(i) {
|
|
136
|
-
const e = i, { blockClass:
|
|
136
|
+
const e = i, { blockClass: r, titleClass: d, defaultOpen: a } = $(e), c = y(null), t = y((a == null ? void 0 : a.value) ?? !1), s = () => {
|
|
137
137
|
t.value = !t.value;
|
|
138
|
-
}, n = (
|
|
139
|
-
const l =
|
|
138
|
+
}, n = (o) => {
|
|
139
|
+
const l = o;
|
|
140
140
|
l.style.height = "0";
|
|
141
|
-
}, O = (
|
|
142
|
-
const l =
|
|
143
|
-
l.style.height = `${
|
|
144
|
-
}, z = (
|
|
145
|
-
const l =
|
|
146
|
-
l.style.height = `${
|
|
141
|
+
}, O = (o) => {
|
|
142
|
+
const l = o;
|
|
143
|
+
console.log(o.clientHeight), console.log(o.scrollHeight), l.style.height = `${o.scrollHeight}px`, l.style.transition = "height 0.3s ease";
|
|
144
|
+
}, z = (o) => {
|
|
145
|
+
const l = o;
|
|
146
|
+
l.style.height = `${o.scrollHeight}px`, B(() => {
|
|
147
147
|
l.style.height = "0", l.style.transition = "height 0.3s ease";
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
return (
|
|
151
|
-
class: f(
|
|
150
|
+
return (o, l) => (p(), m("div", {
|
|
151
|
+
class: f(h(r))
|
|
152
152
|
}, [
|
|
153
|
-
|
|
153
|
+
g("div", {
|
|
154
154
|
onClick: s,
|
|
155
|
-
class: f(
|
|
155
|
+
class: f(h(d))
|
|
156
156
|
}, [
|
|
157
|
-
|
|
157
|
+
b(o.$slots, "title", { isOpen: t.value }, void 0, !0)
|
|
158
158
|
], 2),
|
|
159
159
|
F(k, {
|
|
160
160
|
name: "accordion",
|
|
@@ -166,10 +166,10 @@ const I = /* @__PURE__ */ g({
|
|
|
166
166
|
t.value ? (p(), m("div", {
|
|
167
167
|
key: 0,
|
|
168
168
|
ref_key: "content",
|
|
169
|
-
ref:
|
|
169
|
+
ref: c,
|
|
170
170
|
class: "overflow-hidden"
|
|
171
171
|
}, [
|
|
172
|
-
|
|
172
|
+
b(o.$slots, "default", {}, void 0, !0)
|
|
173
173
|
], 512)) : w("", !0)
|
|
174
174
|
]),
|
|
175
175
|
_: 3
|
|
@@ -177,9 +177,9 @@ const I = /* @__PURE__ */ g({
|
|
|
177
177
|
], 2));
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
-
const N = /* @__PURE__ */ C(I, [["__scopeId", "data-v-
|
|
180
|
+
const N = /* @__PURE__ */ C(I, [["__scopeId", "data-v-dc42c471"]]);
|
|
181
181
|
export {
|
|
182
|
-
|
|
182
|
+
ce as OneAvatar,
|
|
183
183
|
te as OneBrowserMenu,
|
|
184
184
|
le as OneBrowserMenuGrid,
|
|
185
185
|
T as OneButton,
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.textSm[data-v-6b353b46]{font-size:6px}.textMd[data-v-6b353b46]{font-size:8px}.textLg[data-v-6b353b46]{font-size:9px}.text10[data-v-6b353b46]{font-size:10px}.text-sm[data-v-6b353b46]{font-size:12px}.text-md[data-v-6b353b46]{font-size:14px}.text-lg[data-v-6b353b46]{font-size:16px}.blue-filled{background-color:#007bff;color:#fff}.blue-border{border:2px solid #007bff;color:#007bff}.red-filled{background-color:#dc3545;color:#fff}.red-border{border:2px solid #dc3545;color:#dc3545}.green-filled{background-color:#28a745;color:#fff}.green-border{border:2px solid #28a745;color:#28a745}.yellow-filled{background-color:#fbbc04;color:#fff}.yellow-border{border:2px solid #fbbc04;color:#fbbc04}.accordion-enter-active[data-v-
|
|
1
|
+
.textSm[data-v-6b353b46]{font-size:6px}.textMd[data-v-6b353b46]{font-size:8px}.textLg[data-v-6b353b46]{font-size:9px}.text10[data-v-6b353b46]{font-size:10px}.text-sm[data-v-6b353b46]{font-size:12px}.text-md[data-v-6b353b46]{font-size:14px}.text-lg[data-v-6b353b46]{font-size:16px}.blue-filled{background-color:#007bff;color:#fff}.blue-border{border:2px solid #007bff;color:#007bff}.red-filled{background-color:#dc3545;color:#fff}.red-border{border:2px solid #dc3545;color:#dc3545}.green-filled{background-color:#28a745;color:#fff}.green-border{border:2px solid #28a745;color:#28a745}.yellow-filled{background-color:#fbbc04;color:#fff}.yellow-border{border:2px solid #fbbc04;color:#fbbc04}.accordion-enter-active[data-v-dc42c471],.accordion-leave-active[data-v-dc42c471]{transition:height .3s ease}.accordion-enter[data-v-dc42c471],.accordion-leave-to[data-v-dc42c471]{height:0;overflow:hidden}.text9[data-v-4936d4e4]{font-size:9px}.h-browser[data-v-4936d4e4]{height:calc(100% - 75px)}.sidebar[data-v-bded4814]{background:rgba(245,247,251,.8);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.dropdown[data-v-bded4814]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.tooltip[data-v-bded4814]{position:relative}.tooltip-text[data-v-bded4814]{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-bded4814]{visibility:visible;opacity:1}.cont[data-v-bded4814]{flex-direction:column;height:100vh;height:100dvh;justify-content:space-between}.overflow-y-auto[data-v-bded4814]::-webkit-scrollbar{width:2px}.overflow-y-auto[data-v-bded4814]::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:10px}.overflow-y-auto[data-v-bded4814]::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px}.overflow-y-auto[data-v-bded4814]::-webkit-scrollbar-thumb:hover{background-color:#555}.border-gradient[data-v-bded4814]{position:relative;background:linear-gradient(to right,#E1A508,#E04040);border-radius:9px}.scroll-body[data-v-8ffc89cc]{height:100dvh}.module-border-wrap[data-v-8ffc89cc]{border-radius:14px;position:relative;background:linear-gradient(to right,#e1a508,#e04040);padding:1px}.overflow-y-auto[data-v-8ffc89cc]::-webkit-scrollbar{width:3px}.overflow-y-auto[data-v-8ffc89cc]::-webkit-scrollbar-track{background-color:#979ca9;border-radius:0}.overflow-y-auto[data-v-8ffc89cc]::-webkit-scrollbar-thumb{background-color:#888;border-radius:2px}.overflow-y-auto[data-v-8ffc89cc]::-webkit-scrollbar-thumb:hover{background-color:#555}@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}}
|