@oneb/ui-vue 0.1.14 → 0.1.16
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 +78 -77
- 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,o=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="",r;return t.text?t.size==="sm"?(s="min-w-[12px]",r="textSm"):t.size==="md"?(s="min-w-[16px]",r="textMd"):t.size==="lg"&&(s="min-w-[20px]",r="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} ${r} ${s} h-${t.size==="sm"?3:t.size==="lg"?5:4}`}),i=e.computed(()=>{let n="",s="",r;return t.text?t.size==="sm"?(s="min-w-[44px]",r="textMd"):t.size==="md"?(s="min-w-[58px]",r="text10"):t.size==="lg"&&(s="min-w-[68px]",r="text-sm"):t.size==="sm"?n="min-w-[44px]":t.size==="lg"?n="min-w-[68px]":t.size==="md"&&(n="min-w-[58px]"),`${n} ${r} ${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:`${o.value}${n}`,border:s,borderColor:o.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:o.value})},[e.createElementVNode("p",{class:"px-1 font-semibold",style:e.normalizeStyle({color:(o.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":o.value})},e.toDisplayString(n.text),5)],6)):e.createCommentVNode("",!0)}});const w=y._export_sfc(b,[["__scopeId","data-v-6b353b46"]]),h=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,o=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",r=t.filled?`${t.color}-filled`:`${t.color}-border`;return`${n} ${s} ${r} ${o.value?"opacity-80":"hover:opacity-90"}`}),i=()=>{o.value=!0},d=()=>{o.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:o,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},r=l=>{const a=l;a.style.height="0"},v=l=>{const a=l;a.style.height=`${l.scrollHeight}px`,a.style.transition="height 0.3s ease"},g=l=>{const a=l;a.style.height=`${l.scrollHeight}px`,e.nextTick(()=>{a.style.height="0",a.style.transition="height 0.3s ease"})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(o))},[e.createElementVNode("div",{onClick:s,class:e.normalizeClass(e.unref(u))},[e.renderSlot(l.$slots,"title",{isOpen:n.value},void 0,!0)],2),e.createVNode(e.Transition,{name:"accordion",onBeforeEnter:r,onEnter:v,onLeave:g},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:d,class:"overflow-hidden"},[e.renderSlot(l.$slots,"default",{},void 0,!0)],512),[[e.vShow,n.value]])]),_:3})],2))}});const F=y._export_sfc(z,[["__scopeId","data-v-c96fa4e0"]]);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=F;exports.OneIndicators=w;exports.OneLabel=h;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { OneCard as
|
|
3
|
-
import { OneForm as
|
|
4
|
-
import { O as
|
|
5
|
-
import { OneBrowserMenuGrid as
|
|
6
|
-
import { OneAvatar as
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import { _ as
|
|
1
|
+
import { _ as j } from "./index-ab76dea6.js";
|
|
2
|
+
import { OneCard as U, OneCardBody as q, OneCardFooter as J, OneCardHeader as K } from "./card/index.js";
|
|
3
|
+
import { OneForm as X, OneFormFeedback as Y, OneFormField as Z, OneFormInput as ee, OneFormLabel as te } from "./form/index.js";
|
|
4
|
+
import { O as ne, _ as oe, a as re, b as le } from "./OneBrowserMenu-8cf71483.js";
|
|
5
|
+
import { OneBrowserMenuGrid as ie, OneDropdownDivider as ce } from "./dropdown/index.js";
|
|
6
|
+
import { OneAvatar as ue } from "./common/index.js";
|
|
7
|
+
import { defineComponent as g, computed as u, openBlock as x, createElementBlock as v, normalizeClass as p, normalizeStyle as f, createElementVNode as m, toDisplayString as _, createCommentVNode as z, ref as y, toRefs as $, unref as h, renderSlot as b, createVNode as F, Transition as S, withCtx as k, withDirectives as B, vShow as E, nextTick as V } from "vue";
|
|
8
|
+
import { _ as w } from "./_plugin-vue_export-helper-dad06003.js";
|
|
9
9
|
import "./XMarkIcon-51ef0691.js";
|
|
10
|
-
const
|
|
10
|
+
const I = {
|
|
11
11
|
color: {
|
|
12
12
|
type: String,
|
|
13
13
|
default: "red"
|
|
@@ -28,13 +28,13 @@ const E = {
|
|
|
28
28
|
type: String,
|
|
29
29
|
default: "stand"
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, M = /* @__PURE__ */ g({
|
|
32
32
|
__name: "OneIndicators",
|
|
33
33
|
props: {
|
|
34
|
-
...
|
|
34
|
+
...I
|
|
35
35
|
},
|
|
36
36
|
setup(i) {
|
|
37
|
-
const e = i,
|
|
37
|
+
const e = i, o = u(() => {
|
|
38
38
|
switch (e.color) {
|
|
39
39
|
case "green":
|
|
40
40
|
return "#70BE33";
|
|
@@ -56,33 +56,33 @@ const E = {
|
|
|
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: `${o.value}${t}`,
|
|
60
60
|
border: s,
|
|
61
|
-
borderColor:
|
|
61
|
+
borderColor: o.value
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
-
return (t, s) => e.variant === "indicators" ? (
|
|
64
|
+
return (t, s) => e.variant === "indicators" ? (x(), v("div", {
|
|
65
65
|
key: 0,
|
|
66
|
-
class:
|
|
67
|
-
style:
|
|
66
|
+
class: p(["rounded-full border border-white flex items-center justify-center w-max", [d.value]]),
|
|
67
|
+
style: f({ backgroundColor: o.value })
|
|
68
68
|
}, [
|
|
69
|
-
|
|
69
|
+
m("p", {
|
|
70
70
|
class: "px-1 font-semibold",
|
|
71
|
-
style:
|
|
71
|
+
style: f({ color: (o.value !== "#FFBA08", "white") })
|
|
72
72
|
}, _(t.text), 5)
|
|
73
|
-
], 6)) : e.variant === "barge" ? (
|
|
73
|
+
], 6)) : e.variant === "barge" ? (x(), v("div", {
|
|
74
74
|
key: 1,
|
|
75
|
-
class:
|
|
76
|
-
style:
|
|
75
|
+
class: p(["rounded px-2 py-1 text-center w-max", [a.value, { "rounded-full": t.bargeVariant === "round", rounded: t.bargeVariant !== "round" }]]),
|
|
76
|
+
style: f([c.value])
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
m("p", {
|
|
79
79
|
class: "font-medium",
|
|
80
|
-
style:
|
|
80
|
+
style: f({ color: t.bargeVariant !== "stand" ? "white" : o.value })
|
|
81
81
|
}, _(t.text), 5)
|
|
82
|
-
], 6)) :
|
|
82
|
+
], 6)) : z("", !0);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
const
|
|
85
|
+
const N = /* @__PURE__ */ w(M, [["__scopeId", "data-v-6b353b46"]]), P = /* @__PURE__ */ g({
|
|
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, o = 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} ${o.value ? "opacity-80" : "hover:opacity-90"}`;
|
|
113
113
|
}), a = () => {
|
|
114
|
-
|
|
114
|
+
o.value = !0;
|
|
115
115
|
}, c = () => {
|
|
116
|
-
|
|
116
|
+
o.value = !1;
|
|
117
117
|
};
|
|
118
|
-
return (t, s) => (
|
|
119
|
-
class:
|
|
118
|
+
return (t, s) => (x(), v("div", {
|
|
119
|
+
class: p(d.value),
|
|
120
120
|
onMousedown: a,
|
|
121
121
|
onMouseup: c,
|
|
122
122
|
onMouseleave: c
|
|
123
123
|
}, [
|
|
124
|
-
|
|
124
|
+
m("span", null, _(i.text), 1)
|
|
125
125
|
], 34));
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
const
|
|
128
|
+
const L = /* @__PURE__ */ g({
|
|
129
129
|
__name: "OneCollapse",
|
|
130
130
|
props: {
|
|
131
131
|
blockClass: {},
|
|
@@ -133,70 +133,71 @@ const I = /* @__PURE__ */ v({
|
|
|
133
133
|
defaultOpen: { type: Boolean }
|
|
134
134
|
},
|
|
135
135
|
setup(i) {
|
|
136
|
-
const e = i, { blockClass:
|
|
136
|
+
const e = i, { blockClass: o, 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 = (r) => {
|
|
139
|
+
const l = r;
|
|
140
140
|
l.style.height = "0";
|
|
141
|
-
},
|
|
142
|
-
const l =
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
const l =
|
|
146
|
-
l.style.height = `${
|
|
141
|
+
}, C = (r) => {
|
|
142
|
+
const l = r;
|
|
143
|
+
l.style.height = `${r.scrollHeight}px`, l.style.transition = "height 0.3s ease";
|
|
144
|
+
}, O = (r) => {
|
|
145
|
+
const l = r;
|
|
146
|
+
l.style.height = `${r.scrollHeight}px`, V(() => {
|
|
147
147
|
l.style.height = "0", l.style.transition = "height 0.3s ease";
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
return (
|
|
151
|
-
class:
|
|
150
|
+
return (r, l) => (x(), v("div", {
|
|
151
|
+
class: p(h(o))
|
|
152
152
|
}, [
|
|
153
|
-
|
|
153
|
+
m("div", {
|
|
154
154
|
onClick: s,
|
|
155
|
-
class:
|
|
155
|
+
class: p(h(d))
|
|
156
156
|
}, [
|
|
157
|
-
b(
|
|
157
|
+
b(r.$slots, "title", { isOpen: t.value }, void 0, !0)
|
|
158
158
|
], 2),
|
|
159
|
-
F(
|
|
159
|
+
F(S, {
|
|
160
160
|
name: "accordion",
|
|
161
161
|
onBeforeEnter: n,
|
|
162
|
-
onEnter:
|
|
163
|
-
onLeave:
|
|
162
|
+
onEnter: C,
|
|
163
|
+
onLeave: O
|
|
164
164
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
|
|
167
|
-
key: 0,
|
|
165
|
+
default: k(() => [
|
|
166
|
+
B(m("div", {
|
|
168
167
|
ref_key: "content",
|
|
169
168
|
ref: c,
|
|
170
169
|
class: "overflow-hidden"
|
|
171
170
|
}, [
|
|
172
|
-
b(
|
|
173
|
-
], 512)
|
|
171
|
+
b(r.$slots, "default", {}, void 0, !0)
|
|
172
|
+
], 512), [
|
|
173
|
+
[E, t.value]
|
|
174
|
+
])
|
|
174
175
|
]),
|
|
175
176
|
_: 3
|
|
176
177
|
})
|
|
177
178
|
], 2));
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
|
-
const
|
|
181
|
+
const R = /* @__PURE__ */ w(L, [["__scopeId", "data-v-c96fa4e0"]]);
|
|
181
182
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
183
|
+
ue as OneAvatar,
|
|
184
|
+
ne as OneBrowserMenu,
|
|
185
|
+
ie as OneBrowserMenuGrid,
|
|
186
|
+
j as OneButton,
|
|
187
|
+
U as OneCard,
|
|
188
|
+
q as OneCardBody,
|
|
189
|
+
J as OneCardFooter,
|
|
190
|
+
K as OneCardHeader,
|
|
191
|
+
R as OneCollapse,
|
|
192
|
+
oe as OneDropdown,
|
|
193
|
+
ce as OneDropdownDivider,
|
|
194
|
+
re as OneDropdownItem,
|
|
195
|
+
X as OneForm,
|
|
196
|
+
Y as OneFormFeedback,
|
|
197
|
+
Z as OneFormField,
|
|
198
|
+
ee as OneFormInput,
|
|
199
|
+
te as OneFormLabel,
|
|
200
|
+
N as OneIndicators,
|
|
201
|
+
P as OneLabel,
|
|
202
|
+
le as OneUserMenu
|
|
202
203
|
};
|
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-c96fa4e0],.accordion-leave-active[data-v-c96fa4e0]{transition:height .3s ease}.accordion-enter[data-v-c96fa4e0],.accordion-leave-to[data-v-c96fa4e0]{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}}
|