@oneb/ui-vue 0.1.7 → 0.1.9
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.d.ts +2 -0
- package/dist/index.js +145 -25
- package/dist/indicators/OneIndicators.vue.d.ts +2 -0
- package/dist/indicators/index.d.ts +2 -0
- package/dist/indicators/indicators.d.ts +28 -0
- package/dist/label/OneLabel.vue.d.ts +2 -0
- package/dist/label/index.d.ts +2 -0
- 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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-668faddf.cjs"),d=require("./card/index.cjs"),a=require("./form/index.cjs"),c=require("./OneBrowserMenu-3650ed5d.cjs"),p=require("./dropdown/index.cjs"),y=require("./common/index.cjs"),n=require("vue"),x=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const O={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=n.defineComponent({__name:"OneIndicators",props:{...O},setup(l){const e=l,o=n.computed(()=>{switch(e.color){case"green":return"#70BE33";case"blue":return"#4089E0";case"red":return"#FF0440";case"yellow":return"#FFBA08";default:return"#FFBA08"}}),u=n.computed(()=>{let t="",r="",s;return e.text?e.size==="sm"?(r="min-w-[12px]",s="textSm"):e.size==="md"?(r="min-w-[16px]",s="textMd"):e.size==="lg"&&(r="min-w-[20px]",s="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} ${s} ${r} h-${e.size==="sm"?3:e.size==="lg"?5:4}`}),m=n.computed(()=>{let t="",r="",s;return e.text?e.size==="sm"?(r="min-w-[44px]",s="textMd"):e.size==="md"?(r="min-w-[58px]",s="text10"):e.size==="lg"&&(r="min-w-[68px]",s="text-sm"):e.size==="sm"?t="min-w-[44px]":e.size==="lg"?t="min-w-[68px]":e.size==="md"&&(t="min-w-[58px]"),`${t} ${s} ${r} h-${e.size==="sm"?5:e.size==="lg"?7:6}`}),i=n.computed(()=>{const t=e.bargeVariant==="stand"?"1A":"",r=e.bargeVariant==="stand"?"1px solid":"none";return{backgroundColor:`${o.value}${t}`,border:r,borderColor:o.value}});return(t,r)=>e.variant==="indicators"?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["rounded-full border border-white flex items-center justify-center w-max",[u.value]]),style:n.normalizeStyle({backgroundColor:o.value})},[n.createElementVNode("p",{class:"px-1 font-semibold",style:n.normalizeStyle({color:(o.value!=="#FFBA08","white")})},n.toDisplayString(t.text),5)],6)):e.variant==="barge"?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["rounded px-2 py-1 text-center w-max",[m.value,{"rounded-full":t.bargeVariant==="round",rounded:t.bargeVariant!=="round"}]]),style:n.normalizeStyle([i.value])},[n.createElementVNode("p",{class:"font-medium",style:n.normalizeStyle({color:t.bargeVariant!=="stand"?"white":o.value})},n.toDisplayString(t.text),5)],6)):n.createCommentVNode("",!0)}});const w=x._export_sfc(b,[["__scopeId","data-v-6b353b46"]]),g=n.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(l){const e=l,o=n.ref(!1),u=n.computed(()=>{const t="inline-flex items-center cursor-pointer transition-opacity rounded-full",r=e.size==="mini"?"text-xs px-3 py-1":"text-sm px-4 py-2",s=e.filled?`${e.color}-filled`:`${e.color}-border`;return`${t} ${r} ${s} ${o.value?"opacity-80":"hover:opacity-90"}`}),m=()=>{o.value=!0},i=()=>{o.value=!1};return(t,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(u.value),onMousedown:m,onMouseup:i,onMouseleave:i},[n.createElementVNode("span",null,n.toDisplayString(l.text),1)],34))}});exports.OneButton=f._sfc_main;exports.OneCard=d.OneCard;exports.OneCardBody=d.OneCardBody;exports.OneCardFooter=d.OneCardFooter;exports.OneCardHeader=d.OneCardHeader;exports.OneForm=a.OneForm;exports.OneFormFeedback=a.OneFormFeedback;exports.OneFormField=a.OneFormField;exports.OneFormInput=a.OneFormInput;exports.OneFormLabel=a.OneFormLabel;exports.OneBrowserMenu=c.OneBrowserMenu;exports.OneDropdown=c._sfc_main;exports.OneDropdownItem=c._sfc_main$1;exports.OneUserMenu=c._sfc_main$2;exports.OneBrowserMenuGrid=p.OneBrowserMenuGrid;exports.OneDropdownDivider=p.OneDropdownDivider;exports.OneAvatar=y.OneAvatar;exports.OneIndicators=w;exports.OneLabel=g;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,28 +1,148 @@
|
|
|
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 "vue";
|
|
8
|
-
import "./_plugin-vue_export-helper-dad06003.js";
|
|
1
|
+
import { _ as B } from "./index-ab76dea6.js";
|
|
2
|
+
import { OneCard as M, OneCardBody as V, OneCardFooter as I, OneCardHeader as L } from "./card/index.js";
|
|
3
|
+
import { OneForm as D, OneFormFeedback as E, OneFormField as P, OneFormInput as N, OneFormLabel as W } from "./form/index.js";
|
|
4
|
+
import { O as G, _ as H, a as R, b as U } from "./OneBrowserMenu-8cf71483.js";
|
|
5
|
+
import { OneBrowserMenuGrid as J, OneDropdownDivider as K } from "./dropdown/index.js";
|
|
6
|
+
import { OneAvatar as T } from "./common/index.js";
|
|
7
|
+
import { defineComponent as b, computed as o, openBlock as u, createElementBlock as p, normalizeClass as m, normalizeStyle as i, createElementVNode as f, toDisplayString as x, createCommentVNode as y, ref as w } from "vue";
|
|
8
|
+
import { _ as g } from "./_plugin-vue_export-helper-dad06003.js";
|
|
9
9
|
import "./XMarkIcon-51ef0691.js";
|
|
10
|
+
const _ = {
|
|
11
|
+
color: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "red"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "sm"
|
|
18
|
+
},
|
|
19
|
+
text: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
variant: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "indicators"
|
|
26
|
+
},
|
|
27
|
+
bargeVariant: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "stand"
|
|
30
|
+
}
|
|
31
|
+
}, v = /* @__PURE__ */ b({
|
|
32
|
+
__name: "OneIndicators",
|
|
33
|
+
props: {
|
|
34
|
+
..._
|
|
35
|
+
},
|
|
36
|
+
setup(a) {
|
|
37
|
+
const e = a, n = o(() => {
|
|
38
|
+
switch (e.color) {
|
|
39
|
+
case "green":
|
|
40
|
+
return "#70BE33";
|
|
41
|
+
case "blue":
|
|
42
|
+
return "#4089E0";
|
|
43
|
+
case "red":
|
|
44
|
+
return "#FF0440";
|
|
45
|
+
case "yellow":
|
|
46
|
+
return "#FFBA08";
|
|
47
|
+
default:
|
|
48
|
+
return "#FFBA08";
|
|
49
|
+
}
|
|
50
|
+
}), d = o(() => {
|
|
51
|
+
let t = "", s = "", r;
|
|
52
|
+
return e.text ? e.size === "sm" ? (s = "min-w-[12px]", r = "textSm") : e.size === "md" ? (s = "min-w-[16px]", r = "textMd") : e.size === "lg" && (s = "min-w-[20px]", r = "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} ${r} ${s} h-${e.size === "sm" ? 3 : e.size === "lg" ? 5 : 4}`;
|
|
53
|
+
}), c = o(() => {
|
|
54
|
+
let t = "", s = "", r;
|
|
55
|
+
return e.text ? e.size === "sm" ? (s = "min-w-[44px]", r = "textMd") : e.size === "md" ? (s = "min-w-[58px]", r = "text10") : e.size === "lg" && (s = "min-w-[68px]", r = "text-sm") : e.size === "sm" ? t = "min-w-[44px]" : e.size === "lg" ? t = "min-w-[68px]" : e.size === "md" && (t = "min-w-[58px]"), `${t} ${r} ${s} h-${e.size === "sm" ? 5 : e.size === "lg" ? 7 : 6}`;
|
|
56
|
+
}), l = o(() => {
|
|
57
|
+
const t = e.bargeVariant === "stand" ? "1A" : "", s = e.bargeVariant === "stand" ? "1px solid" : "none";
|
|
58
|
+
return {
|
|
59
|
+
backgroundColor: `${n.value}${t}`,
|
|
60
|
+
border: s,
|
|
61
|
+
borderColor: n.value
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
return (t, s) => e.variant === "indicators" ? (u(), p("div", {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: m(["rounded-full border border-white flex items-center justify-center w-max", [d.value]]),
|
|
67
|
+
style: i({ backgroundColor: n.value })
|
|
68
|
+
}, [
|
|
69
|
+
f("p", {
|
|
70
|
+
class: "px-1 font-semibold",
|
|
71
|
+
style: i({ color: (n.value !== "#FFBA08", "white") })
|
|
72
|
+
}, x(t.text), 5)
|
|
73
|
+
], 6)) : e.variant === "barge" ? (u(), p("div", {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: m(["rounded px-2 py-1 text-center w-max", [c.value, { "rounded-full": t.bargeVariant === "round", rounded: t.bargeVariant !== "round" }]]),
|
|
76
|
+
style: i([l.value])
|
|
77
|
+
}, [
|
|
78
|
+
f("p", {
|
|
79
|
+
class: "font-medium",
|
|
80
|
+
style: i({ color: t.bargeVariant !== "stand" ? "white" : n.value })
|
|
81
|
+
}, x(t.text), 5)
|
|
82
|
+
], 6)) : y("", !0);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const h = /* @__PURE__ */ g(v, [["__scopeId", "data-v-6b353b46"]]), $ = /* @__PURE__ */ b({
|
|
86
|
+
__name: "OneLabel",
|
|
87
|
+
props: {
|
|
88
|
+
size: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "standard"
|
|
91
|
+
// 'mini' або 'standard'
|
|
92
|
+
},
|
|
93
|
+
color: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: "blue"
|
|
96
|
+
// кольори: red, yellow, green, blue
|
|
97
|
+
},
|
|
98
|
+
filled: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !0
|
|
101
|
+
// Чи буде "заливка" кольором
|
|
102
|
+
},
|
|
103
|
+
text: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "Label"
|
|
106
|
+
// Текст лейблу
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
setup(a) {
|
|
110
|
+
const e = a, n = w(!1), d = o(() => {
|
|
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", r = e.filled ? `${e.color}-filled` : `${e.color}-border`;
|
|
112
|
+
return `${t} ${s} ${r} ${n.value ? "opacity-80" : "hover:opacity-90"}`;
|
|
113
|
+
}), c = () => {
|
|
114
|
+
n.value = !0;
|
|
115
|
+
}, l = () => {
|
|
116
|
+
n.value = !1;
|
|
117
|
+
};
|
|
118
|
+
return (t, s) => (u(), p("div", {
|
|
119
|
+
class: m(d.value),
|
|
120
|
+
onMousedown: c,
|
|
121
|
+
onMouseup: l,
|
|
122
|
+
onMouseleave: l
|
|
123
|
+
}, [
|
|
124
|
+
f("span", null, x(a.text), 1)
|
|
125
|
+
], 34));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
10
128
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
129
|
+
T as OneAvatar,
|
|
130
|
+
G as OneBrowserMenu,
|
|
131
|
+
J as OneBrowserMenuGrid,
|
|
132
|
+
B as OneButton,
|
|
133
|
+
M as OneCard,
|
|
134
|
+
V as OneCardBody,
|
|
135
|
+
I as OneCardFooter,
|
|
136
|
+
L as OneCardHeader,
|
|
137
|
+
H as OneDropdown,
|
|
138
|
+
K as OneDropdownDivider,
|
|
139
|
+
R as OneDropdownItem,
|
|
140
|
+
D as OneForm,
|
|
141
|
+
E as OneFormFeedback,
|
|
142
|
+
P as OneFormField,
|
|
143
|
+
N as OneFormInput,
|
|
144
|
+
W as OneFormLabel,
|
|
145
|
+
h as OneIndicators,
|
|
146
|
+
$ as OneLabel,
|
|
147
|
+
U as OneUserMenu
|
|
28
148
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from "vue";
|
|
2
|
+
export type IndicatorsColorType = 'green' | 'blue' | 'red' | 'yellow';
|
|
3
|
+
export type IndicatorsSizeType = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type IndicatorsVariantType = 'indicators' | 'barge';
|
|
5
|
+
export type IndicatorsVariantBarge = 'stand' | 'full' | 'round';
|
|
6
|
+
export declare const indicatorsProps: {
|
|
7
|
+
color: {
|
|
8
|
+
type: PropType<IndicatorsColorType>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
12
|
+
type: PropType<IndicatorsSizeType>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
text: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
variant: {
|
|
20
|
+
type: PropType<IndicatorsVariantType>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
bargeVariant: {
|
|
24
|
+
type: PropType<IndicatorsVariantBarge>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type indicatorsProps = ExtractPropTypes<typeof indicatorsProps>;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.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}}
|
|
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}.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}}
|