bge-ui 1.2.7 → 1.2.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.js +37 -27
- package/dist/style.css +31 -14
- package/package.json +1 -1
- package/src/button/index.vue +15 -3
- package/src/checkbox/index.vue +35 -20
package/dist/index.js
CHANGED
|
@@ -22,7 +22,11 @@ const _sfc_main$1Y = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
"primary",
|
|
23
23
|
"secondary",
|
|
24
24
|
"white",
|
|
25
|
-
"
|
|
25
|
+
"black",
|
|
26
|
+
"violet",
|
|
27
|
+
"opacity",
|
|
28
|
+
"red",
|
|
29
|
+
"green"
|
|
26
30
|
],
|
|
27
31
|
type: String
|
|
28
32
|
},
|
|
@@ -1202,7 +1206,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
1202
1206
|
}
|
|
1203
1207
|
});
|
|
1204
1208
|
const _hoisted_1$1q = /* @__PURE__ */ createStaticVNode('<path d="M5 9.5C5 8.94772 4.55228 8.5 4 8.5C3.44772 8.5 3 8.94772 3 9.5C3 10.0523 3.44772 10.5 4 10.5C4.55228 10.5 5 10.0523 5 9.5Z" fill="currentColor"></path><path d="M19 9.5C19 8.94772 19.4477 8.5 20 8.5C20.5523 8.5 21 8.94772 21 9.5C21 10.0523 20.5523 10.5 20 10.5C19.4477 10.5 19 10.0523 19 9.5Z" fill="currentColor"></path><path d="M5 15C5 14.4477 4.55228 14 4 14C3.44772 14 3 14.4477 3 15C3 15.5523 3.44772 16 4 16C4.55228 16 5 15.5523 5 15Z" fill="currentColor"></path><path d="M19 15C19 14.4477 19.4477 14 20 14C20.5523 14 21 14.4477 21 15C21 15.5523 20.5523 16 20 16C19.4477 16 19 15.5523 19 15Z" fill="currentColor"></path><path d="M21 20C21 19.4477 20.5523 19 20 19H4C3.44772 19 3 19.4477 3 20C3 20.5523 3.44772 21 4 21H20C20.5523 21 21 20.5523 21 20Z" fill="currentColor"></path><path d="M5 4C5 3.44772 4.55228 3 4 3C3.44772 3 3 3.44772 3 4C3 4.55228 3.44772 5 4 5C4.55228 5 5 4.55228 5 4Z" fill="currentColor"></path><path d="M19 4C19 3.44772 19.4477 3 20 3C20.5523 3 21 3.44772 21 4C21 4.55228 20.5523 5 20 5C19.4477 5 19 4.55228 19 4Z" fill="currentColor"></path><path d="M10.5 4C10.5 3.44772 10.0523 3 9.5 3C8.94772 3 8.5 3.44772 8.5 4C8.5 4.55228 8.94772 5 9.5 5C10.0523 5 10.5 4.55228 10.5 4Z" fill="currentColor"></path><path d="M15.5 4C15.5 3.44772 15.0523 3 14.5 3C13.9477 3 13.5 3.44772 13.5 4C13.5 4.55228 13.9477 5 14.5 5C15.0523 5 15.5 4.55228 15.5 4Z" fill="currentColor"></path>', 9);
|
|
1205
|
-
const _hoisted_10$
|
|
1209
|
+
const _hoisted_10$2 = [
|
|
1206
1210
|
_hoisted_1$1q
|
|
1207
1211
|
];
|
|
1208
1212
|
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
@@ -1229,7 +1233,7 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
1229
1233
|
viewBox: "0 0 24 24",
|
|
1230
1234
|
fill: "none",
|
|
1231
1235
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1232
|
-
}, _hoisted_10$
|
|
1236
|
+
}, _hoisted_10$2, 4);
|
|
1233
1237
|
};
|
|
1234
1238
|
}
|
|
1235
1239
|
});
|
|
@@ -2751,7 +2755,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
2751
2755
|
}
|
|
2752
2756
|
});
|
|
2753
2757
|
const _hoisted_1$P = /* @__PURE__ */ createStaticVNode('<path d="M11 2C11 1.44772 11.4477 1 12 1C12.5523 1 13 1.44772 13 2V4C13 4.55228 12.5523 5 12 5C11.4477 5 11 4.55228 11 4V2Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M18 12C18 15.3137 15.3137 18 12 18C8.6863 18 6 15.3137 6 12C6 8.6863 8.6863 6 12 6C15.3137 6 18 8.6863 18 12ZM12 8C9.79087 8 8 9.79087 8 12C8 14.2091 9.79087 16 12 16C14.2091 16 16 14.2091 16 12C16 9.79087 14.2091 8 12 8Z" fill="currentColor"></path><path d="M12 23C12.5523 23 13 22.5523 13 22V20C13 19.4477 12.5523 19 12 19C11.4477 19 11 19.4477 11 20V22C11 22.5523 11.4477 23 12 23Z" fill="currentColor"></path><path d="M18.364 4.22183C18.7545 3.8313 19.3877 3.8313 19.7782 4.22183C20.1687 4.61235 20.1687 5.24551 19.7782 5.63604L18.364 7.05025C17.9734 7.44078 17.3403 7.44078 16.9497 7.05025C16.5592 6.65973 16.5592 6.02656 16.9497 5.63604L18.364 4.22183Z" fill="currentColor"></path><path d="M7.05025 18.364C7.44078 17.9734 7.44078 17.3403 7.05025 16.9497C6.65973 16.5592 6.02657 16.5592 5.63604 16.9497L4.22183 18.364C3.8313 18.7545 3.8313 19.3877 4.22183 19.7782C4.61235 20.1687 5.24552 20.1687 5.63604 19.7782L7.05025 18.364Z" fill="currentColor"></path><path d="M22 11C22.5523 11 23 11.4477 23 12C23 12.5523 22.5523 13 22 13H20C19.4477 13 19 12.5523 19 12C19 11.4477 19.4477 11 20 11H22Z" fill="currentColor"></path><path d="M3.99999 13C4.55228 13 4.99999 12.5523 4.99999 12C4.99999 11.4477 4.55228 11 3.99999 11H1.99999C1.44771 11 0.999992 11.4477 0.999992 12C0.999992 12.5523 1.44771 13 1.99999 13H3.99999Z" fill="currentColor"></path><path d="M19.7782 18.364C20.1687 18.7545 20.1687 19.3877 19.7782 19.7782C19.3876 20.1687 18.7545 20.1687 18.364 19.7782L16.9497 18.364C16.5592 17.9734 16.5592 17.3403 16.9497 16.9498C17.3403 16.5592 17.9734 16.5592 18.364 16.9498L19.7782 18.364Z" fill="currentColor"></path><path d="M5.63604 7.05025C6.02657 7.44077 6.65973 7.44077 7.05026 7.05025C7.44078 6.65973 7.44078 6.02656 7.05026 5.63604L5.63604 4.22182C5.24552 3.8313 4.61235 3.8313 4.22183 4.22182C3.8313 4.61235 3.8313 5.24551 4.22183 5.63604L5.63604 7.05025Z" fill="currentColor"></path>', 9);
|
|
2754
|
-
const _hoisted_10 = [
|
|
2758
|
+
const _hoisted_10$1 = [
|
|
2755
2759
|
_hoisted_1$P
|
|
2756
2760
|
];
|
|
2757
2761
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
@@ -2778,7 +2782,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
2778
2782
|
viewBox: "0 0 24 24",
|
|
2779
2783
|
fill: "none",
|
|
2780
2784
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2781
|
-
}, _hoisted_10, 4);
|
|
2785
|
+
}, _hoisted_10$1, 4);
|
|
2782
2786
|
};
|
|
2783
2787
|
}
|
|
2784
2788
|
});
|
|
@@ -4340,7 +4344,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4340
4344
|
}
|
|
4341
4345
|
});
|
|
4342
4346
|
const _hoisted_1$a = /* @__PURE__ */ createStaticVNode('<path d="M10.8333 5.00002C10.8333 4.53978 11.2064 4.16669 11.6667 4.16669H15C15.4602 4.16669 15.8333 4.53978 15.8333 5.00002C15.8333 5.46026 15.4602 5.83335 15 5.83335H11.6667C11.2064 5.83335 10.8333 5.46026 10.8333 5.00002Z" fill="currentColor" fill-opacity="0.48"></path><path d="M10.8333 8.33333C10.8333 7.8731 11.2064 7.5 11.6667 7.5H15C15.4602 7.5 15.8333 7.8731 15.8333 8.33333C15.8333 8.79357 15.4602 9.16667 15 9.16667H11.6667C11.2064 9.16667 10.8333 8.79357 10.8333 8.33333Z" fill="currentColor" fill-opacity="0.48"></path><path d="M10.8333 11.6666C10.8333 11.2064 11.2064 10.8333 11.6667 10.8333H15C15.4602 10.8333 15.8333 11.2064 15.8333 11.6666C15.8333 12.1269 15.4602 12.5 15 12.5H11.6667C11.2064 12.5 10.8333 12.1269 10.8333 11.6666Z" fill="currentColor" fill-opacity="0.48"></path><path d="M10.8333 15C10.8333 14.5398 11.2064 14.1667 11.6667 14.1667H15C15.4602 14.1667 15.8333 14.5398 15.8333 15C15.8333 15.4603 15.4602 15.8334 15 15.8334H11.6667C11.2064 15.8334 10.8333 15.4603 10.8333 15Z" fill="currentColor" fill-opacity="0.48"></path><path d="M4.16666 5.00002C4.16666 4.53978 4.61437 4.16669 5.16666 4.16669H8.16666C8.71894 4.16669 9.16666 4.53978 9.16666 5.00002V8.33335C9.16666 8.79359 8.71894 9.16669 8.16666 9.16669H5.16666C4.61437 9.16669 4.16666 8.79359 4.16666 8.33335V5.00002Z" class="bge-fill-bg-green"></path><path d="M4.16666 11.6666C4.16666 11.2064 4.61437 10.8333 5.16666 10.8333H8.16666C8.71894 10.8333 9.16666 11.2064 9.16666 11.6666V15C9.16666 15.4602 8.71894 15.8333 8.16666 15.8333H5.16666C4.61437 15.8333 4.16666 15.4602 4.16666 15V11.6666Z" class="bge-fill-bg-red"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M15.8333 2.91669H4.16666C3.4763 2.91669 2.91666 3.47633 2.91666 4.16669V15.8334C2.91666 16.5237 3.4763 17.0834 4.16666 17.0834H15.8333C16.5237 17.0834 17.0833 16.5237 17.0833 15.8334V4.16669C17.0833 3.47633 16.5237 2.91669 15.8333 2.91669ZM4.16666 1.66669C2.78594 1.66669 1.66666 2.78597 1.66666 4.16669V15.8334C1.66666 17.2141 2.78594 18.3334 4.16666 18.3334H15.8333C17.214 18.3334 18.3333 17.2141 18.3333 15.8334V4.16669C18.3333 2.78598 17.214 1.66669 15.8333 1.66669H4.16666Z" fill="currentColor" fill-opacity="0.32"></path>', 7);
|
|
4343
|
-
const _hoisted_8 = [
|
|
4347
|
+
const _hoisted_8$1 = [
|
|
4344
4348
|
_hoisted_1$a
|
|
4345
4349
|
];
|
|
4346
4350
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
@@ -4367,7 +4371,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4367
4371
|
viewBox: "0 0 20 20",
|
|
4368
4372
|
fill: "none",
|
|
4369
4373
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4370
|
-
}, _hoisted_8, 4);
|
|
4374
|
+
}, _hoisted_8$1, 4);
|
|
4371
4375
|
};
|
|
4372
4376
|
}
|
|
4373
4377
|
});
|
|
@@ -8749,32 +8753,43 @@ message._context = null;
|
|
|
8749
8753
|
const _hoisted_1$3 = { class: "bge-checkbox__input" };
|
|
8750
8754
|
const _hoisted_2$2 = ["id", "disabled"];
|
|
8751
8755
|
const _hoisted_3$2 = {
|
|
8756
|
+
key: 0,
|
|
8752
8757
|
class: "bge-checkbox__inner",
|
|
8753
8758
|
viewBox: "0 0 16 16",
|
|
8754
8759
|
fill: "none",
|
|
8755
8760
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8756
8761
|
};
|
|
8757
|
-
const _hoisted_4$2 = {
|
|
8758
|
-
key: 0,
|
|
8762
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("path", {
|
|
8759
8763
|
class: "border",
|
|
8760
8764
|
"fill-rule": "evenodd",
|
|
8761
8765
|
"clip-rule": "evenodd",
|
|
8762
|
-
d: "M13
|
|
8763
|
-
|
|
8766
|
+
d: "M13 4C13 3.44772 12.5523 3 12 3H4C3.44772 3 3 3.44772 3 4V12C3 12.5523 3.44772 13 4 13H12C12.5523 13 13 12.5523 13 12V4ZM4 2C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4C14 2.89543 13.1046 2 12 2H4Z"
|
|
8767
|
+
}, null, -1);
|
|
8768
|
+
const _hoisted_5$1 = [
|
|
8769
|
+
_hoisted_4$2
|
|
8770
|
+
];
|
|
8771
|
+
const _hoisted_6$1 = {
|
|
8772
|
+
key: 1,
|
|
8773
|
+
class: "bge-checkbox__inner",
|
|
8774
|
+
viewBox: "0 0 16 16",
|
|
8775
|
+
fill: "none",
|
|
8776
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8764
8777
|
};
|
|
8765
|
-
const
|
|
8778
|
+
const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("path", {
|
|
8766
8779
|
class: "bg",
|
|
8767
|
-
d: "M2
|
|
8768
|
-
fill: "#FFFF38"
|
|
8780
|
+
d: "M2 4C2 2.89543 2.89543 2 4 2H12C13.1046 2 14 2.89543 14 4V12C14 13.1046 13.1046 14 12 14H4C2.89543 14 2 13.1046 2 12V4Z"
|
|
8769
8781
|
}, null, -1);
|
|
8770
|
-
const
|
|
8782
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("path", {
|
|
8771
8783
|
class: "check",
|
|
8772
8784
|
"fill-rule": "evenodd",
|
|
8773
8785
|
"clip-rule": "evenodd",
|
|
8774
|
-
d: "M11.
|
|
8775
|
-
fill: "#0E1114"
|
|
8786
|
+
d: "M11.1337 5.66647C11.4147 5.9043 11.4498 6.32495 11.212 6.60602L7.83726 10.5943C7.67284 10.7886 7.38111 10.8105 7.18955 10.6429L4.86305 8.60719C4.58595 8.36473 4.55788 7.94356 4.80033 7.66647C5.04279 7.38938 5.46396 7.3613 5.74105 7.60375L7.3959 9.05174L10.1941 5.74476C10.4319 5.46369 10.8526 5.42864 11.1337 5.66647Z"
|
|
8776
8787
|
}, null, -1);
|
|
8777
|
-
const
|
|
8788
|
+
const _hoisted_9 = [
|
|
8789
|
+
_hoisted_7$1,
|
|
8790
|
+
_hoisted_8
|
|
8791
|
+
];
|
|
8792
|
+
const _hoisted_10 = ["for"];
|
|
8778
8793
|
const formItemContextKey$2 = "bge-form-item-context";
|
|
8779
8794
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
8780
8795
|
...{
|
|
@@ -8788,7 +8803,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8788
8803
|
},
|
|
8789
8804
|
size: {
|
|
8790
8805
|
type: String,
|
|
8791
|
-
default: "
|
|
8806
|
+
default: "default"
|
|
8792
8807
|
},
|
|
8793
8808
|
modelValue: {
|
|
8794
8809
|
type: [Array, String, Number, Boolean],
|
|
@@ -8871,7 +8886,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8871
8886
|
}
|
|
8872
8887
|
return (_ctx, _cache) => {
|
|
8873
8888
|
return openBlock(), createElementBlock("label", {
|
|
8874
|
-
class: normalizeClass(["bge-checkbox", { "bge-checkbox_large": __props.size === "large", "bge-checkbox_disabled": __props.disabled }])
|
|
8889
|
+
class: normalizeClass(["bge-checkbox", { "bge-checkbox_large": __props.size === "large", "bge-checkbox_mini": __props.size === "mini", "bge-checkbox_disabled": __props.disabled }])
|
|
8875
8890
|
}, [
|
|
8876
8891
|
createElementVNode("span", _hoisted_1$3, [
|
|
8877
8892
|
withDirectives(createElementVNode("input", {
|
|
@@ -8886,19 +8901,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8886
8901
|
}, null, 40, _hoisted_2$2), [
|
|
8887
8902
|
[vModelCheckbox, input.value]
|
|
8888
8903
|
]),
|
|
8889
|
-
(openBlock(), createElementBlock("svg", _hoisted_3$2,
|
|
8890
|
-
!input.value ? (openBlock(), createElementBlock("path", _hoisted_4$2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
8891
|
-
_hoisted_5$1,
|
|
8892
|
-
_hoisted_6$1
|
|
8893
|
-
], 64))
|
|
8894
|
-
]))
|
|
8904
|
+
!input.value ? (openBlock(), createElementBlock("svg", _hoisted_3$2, _hoisted_5$1)) : (openBlock(), createElementBlock("svg", _hoisted_6$1, _hoisted_9))
|
|
8895
8905
|
]),
|
|
8896
8906
|
createElementVNode("label", {
|
|
8897
8907
|
for: id.value,
|
|
8898
8908
|
class: normalizeClass(["bge-checkbox__label", { checked: input.value }])
|
|
8899
8909
|
}, [
|
|
8900
8910
|
renderSlot(_ctx.$slots, "default")
|
|
8901
|
-
], 10,
|
|
8911
|
+
], 10, _hoisted_10)
|
|
8902
8912
|
], 2);
|
|
8903
8913
|
};
|
|
8904
8914
|
}
|
package/dist/style.css
CHANGED
|
@@ -58,6 +58,13 @@
|
|
|
58
58
|
--btn-pressed: var(--btn-violet-hover);
|
|
59
59
|
--btn-disable: var(--btn-violet-disable);
|
|
60
60
|
}
|
|
61
|
+
.bge-button.bge-button--opacity {
|
|
62
|
+
--color: var(--persistent-white);
|
|
63
|
+
--btn: var(---bg-opacity);
|
|
64
|
+
--btn-hover: var(---bg-opacity-hover);
|
|
65
|
+
--btn-pressed: var(---bg-opacity-hover);
|
|
66
|
+
--btn-disable: var(---bg-opacity);
|
|
67
|
+
}
|
|
61
68
|
.bge-button.bge-button--red {
|
|
62
69
|
--color: var(--persistent-white);
|
|
63
70
|
--btn: var(--btn-red);
|
|
@@ -90,7 +97,7 @@
|
|
|
90
97
|
font-size: 12px;
|
|
91
98
|
font-weight: 500;
|
|
92
99
|
line-height: 20px;
|
|
93
|
-
padding: 4px
|
|
100
|
+
padding: 4px 12px;
|
|
94
101
|
}
|
|
95
102
|
.bge-button.bge-button--mini .loading-icon {
|
|
96
103
|
height: 16px;
|
|
@@ -111,7 +118,7 @@
|
|
|
111
118
|
background: var(--btn-disable);
|
|
112
119
|
}
|
|
113
120
|
.bge-button:disabled span {
|
|
114
|
-
|
|
121
|
+
color: var(--tc-quaternary);
|
|
115
122
|
}
|
|
116
123
|
.bge-button:disabled .loading-icon {
|
|
117
124
|
opacity: 0;
|
|
@@ -1273,18 +1280,28 @@ to {
|
|
|
1273
1280
|
}.bge-checkbox {
|
|
1274
1281
|
display: inline-flex;
|
|
1275
1282
|
justify-content: flex-start;
|
|
1276
|
-
align-items:
|
|
1283
|
+
align-items: center;
|
|
1277
1284
|
margin-right: 8px;
|
|
1278
1285
|
}
|
|
1279
1286
|
.bge-checkbox_large .bge-checkbox__label {
|
|
1280
|
-
font-size:
|
|
1287
|
+
font-size: 16px;
|
|
1281
1288
|
font-weight: 500;
|
|
1282
|
-
line-height:
|
|
1289
|
+
line-height: 28px;
|
|
1283
1290
|
}
|
|
1284
1291
|
.bge-checkbox_large .bge-checkbox__inner,
|
|
1285
1292
|
.bge-checkbox_large .bge-checkbox__original {
|
|
1286
|
-
width:
|
|
1287
|
-
height:
|
|
1293
|
+
width: 24px;
|
|
1294
|
+
height: 24px;
|
|
1295
|
+
}
|
|
1296
|
+
.bge-checkbox_mini .bge-checkbox__label {
|
|
1297
|
+
font-size: 12px;
|
|
1298
|
+
font-weight: 500;
|
|
1299
|
+
line-height: 20px;
|
|
1300
|
+
}
|
|
1301
|
+
.bge-checkbox_mini .bge-checkbox__inner,
|
|
1302
|
+
.bge-checkbox_mini .bge-checkbox__original {
|
|
1303
|
+
width: 16px;
|
|
1304
|
+
height: 16px;
|
|
1288
1305
|
}
|
|
1289
1306
|
.bge-checkbox_disabled {
|
|
1290
1307
|
--tc-secondary: var(--tc-quaternary);
|
|
@@ -1306,9 +1323,9 @@ to {
|
|
|
1306
1323
|
.bge-checkbox__label {
|
|
1307
1324
|
display: inline-block;
|
|
1308
1325
|
padding-left: 8px;
|
|
1309
|
-
font-size:
|
|
1326
|
+
font-size: 14px;
|
|
1310
1327
|
font-weight: 500;
|
|
1311
|
-
line-height:
|
|
1328
|
+
line-height: 24px;
|
|
1312
1329
|
color: var(--tc-secondary);
|
|
1313
1330
|
}
|
|
1314
1331
|
.bge-checkbox__label.checked {
|
|
@@ -1322,8 +1339,8 @@ to {
|
|
|
1322
1339
|
position: relative;
|
|
1323
1340
|
}
|
|
1324
1341
|
.bge-checkbox__original {
|
|
1325
|
-
width:
|
|
1326
|
-
height:
|
|
1342
|
+
width: 20px;
|
|
1343
|
+
height: 20px;
|
|
1327
1344
|
opacity: 0;
|
|
1328
1345
|
outline: none;
|
|
1329
1346
|
z-index: 0;
|
|
@@ -1332,10 +1349,10 @@ to {
|
|
|
1332
1349
|
display: inline-block;
|
|
1333
1350
|
position: absolute;
|
|
1334
1351
|
left: 0;
|
|
1335
|
-
top:
|
|
1352
|
+
top: 0;
|
|
1336
1353
|
box-sizing: border-box;
|
|
1337
|
-
width:
|
|
1338
|
-
height:
|
|
1354
|
+
width: 20px;
|
|
1355
|
+
height: 20px;
|
|
1339
1356
|
background-color: transparent;
|
|
1340
1357
|
z-index: 1;
|
|
1341
1358
|
transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), outline 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
package/package.json
CHANGED
package/src/button/index.vue
CHANGED
|
@@ -20,7 +20,11 @@ defineProps({
|
|
|
20
20
|
'primary',
|
|
21
21
|
'secondary',
|
|
22
22
|
'white',
|
|
23
|
-
'
|
|
23
|
+
'black',
|
|
24
|
+
'violet',
|
|
25
|
+
'opacity',
|
|
26
|
+
'red',
|
|
27
|
+
'green'
|
|
24
28
|
],
|
|
25
29
|
type: String,
|
|
26
30
|
},
|
|
@@ -89,6 +93,14 @@ defineProps({
|
|
|
89
93
|
--btn-disable: var(--btn-violet-disable);
|
|
90
94
|
}
|
|
91
95
|
|
|
96
|
+
&.bge-button--opacity {
|
|
97
|
+
--color: var(--persistent-white);
|
|
98
|
+
--btn: var(---bg-opacity);
|
|
99
|
+
--btn-hover: var(---bg-opacity-hover);
|
|
100
|
+
--btn-pressed: var(---bg-opacity-hover);
|
|
101
|
+
--btn-disable: var(---bg-opacity);
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
&.bge-button--red {
|
|
93
105
|
--color: var(--persistent-white);
|
|
94
106
|
--btn: var(--btn-red);
|
|
@@ -128,7 +140,7 @@ defineProps({
|
|
|
128
140
|
font-size: 12px;
|
|
129
141
|
font-weight: 500;
|
|
130
142
|
line-height: 20px;
|
|
131
|
-
padding: 4px
|
|
143
|
+
padding: 4px 12px;
|
|
132
144
|
|
|
133
145
|
.loading-icon {
|
|
134
146
|
height: 16px;
|
|
@@ -175,7 +187,7 @@ defineProps({
|
|
|
175
187
|
background: var(--btn-disable);
|
|
176
188
|
|
|
177
189
|
span {
|
|
178
|
-
|
|
190
|
+
color: var(--tc-quaternary);
|
|
179
191
|
}
|
|
180
192
|
.loading-icon {
|
|
181
193
|
opacity: 0;
|
package/src/checkbox/index.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<label class="bge-checkbox" :class="{'bge-checkbox_large': size === 'large', 'bge-checkbox_disabled': disabled}">
|
|
2
|
+
<label class="bge-checkbox" :class="{'bge-checkbox_large': size === 'large', 'bge-checkbox_mini': size === 'mini', 'bge-checkbox_disabled': disabled}">
|
|
3
3
|
<span class="bge-checkbox__input">
|
|
4
4
|
<input
|
|
5
5
|
:id="id"
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
@change="handleChange"
|
|
11
11
|
@click.stop
|
|
12
12
|
/>
|
|
13
|
-
<svg class="bge-checkbox__inner" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
14
|
-
<path class="border"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<svg v-if="!input" class="bge-checkbox__inner" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
14
|
+
<path class="border" fill-rule="evenodd" clip-rule="evenodd" d="M13 4C13 3.44772 12.5523 3 12 3H4C3.44772 3 3 3.44772 3 4V12C3 12.5523 3.44772 13 4 13H12C12.5523 13 13 12.5523 13 12V4ZM4 2C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4C14 2.89543 13.1046 2 12 2H4Z" />
|
|
15
|
+
</svg>
|
|
16
|
+
|
|
17
|
+
<svg v-else class="bge-checkbox__inner" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
+
<path class="bg" d="M2 4C2 2.89543 2.89543 2 4 2H12C13.1046 2 14 2.89543 14 4V12C14 13.1046 13.1046 14 12 14H4C2.89543 14 2 13.1046 2 12V4Z" />
|
|
19
|
+
<path class="check" fill-rule="evenodd" clip-rule="evenodd" d="M11.1337 5.66647C11.4147 5.9043 11.4498 6.32495 11.212 6.60602L7.83726 10.5943C7.67284 10.7886 7.38111 10.8105 7.18955 10.6429L4.86305 8.60719C4.58595 8.36473 4.55788 7.94356 4.80033 7.66647C5.04279 7.38938 5.46396 7.3613 5.74105 7.60375L7.3959 9.05174L10.1941 5.74476C10.4319 5.46369 10.8526 5.42864 11.1337 5.66647Z" />
|
|
19
20
|
</svg>
|
|
20
21
|
</span>
|
|
21
22
|
<label :for="id" class="bge-checkbox__label" :class="{checked: input}">
|
|
@@ -50,7 +51,7 @@ const props = defineProps({
|
|
|
50
51
|
},
|
|
51
52
|
size: {
|
|
52
53
|
type: String,
|
|
53
|
-
default: '
|
|
54
|
+
default: 'default'
|
|
54
55
|
},
|
|
55
56
|
modelValue: {
|
|
56
57
|
type: [Array, String, Number, Boolean],
|
|
@@ -129,21 +130,35 @@ function handleChange (e: Event) {
|
|
|
129
130
|
.bge-checkbox {
|
|
130
131
|
display: inline-flex;
|
|
131
132
|
justify-content: flex-start;
|
|
132
|
-
align-items:
|
|
133
|
+
align-items: center;
|
|
133
134
|
margin-right: 8px;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
.bge-checkbox_large {
|
|
137
138
|
.bge-checkbox__label {
|
|
138
|
-
font-size:
|
|
139
|
+
font-size: 16px;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
line-height: 28px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.bge-checkbox__inner,
|
|
145
|
+
.bge-checkbox__original {
|
|
146
|
+
width: 24px;
|
|
147
|
+
height: 24px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.bge-checkbox_mini {
|
|
152
|
+
.bge-checkbox__label {
|
|
153
|
+
font-size: 12px;
|
|
139
154
|
font-weight: 500;
|
|
140
|
-
line-height:
|
|
155
|
+
line-height: 20px;
|
|
141
156
|
}
|
|
142
157
|
|
|
143
158
|
.bge-checkbox__inner,
|
|
144
159
|
.bge-checkbox__original {
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
160
|
+
width: 16px;
|
|
161
|
+
height: 16px;
|
|
147
162
|
}
|
|
148
163
|
}
|
|
149
164
|
|
|
@@ -176,9 +191,9 @@ function handleChange (e: Event) {
|
|
|
176
191
|
.bge-checkbox__label {
|
|
177
192
|
display: inline-block;
|
|
178
193
|
padding-left: 8px;
|
|
179
|
-
font-size:
|
|
194
|
+
font-size: 14px;
|
|
180
195
|
font-weight: 500;
|
|
181
|
-
line-height:
|
|
196
|
+
line-height: 24px;
|
|
182
197
|
color: var(--tc-secondary);
|
|
183
198
|
|
|
184
199
|
&.checked {
|
|
@@ -195,8 +210,8 @@ function handleChange (e: Event) {
|
|
|
195
210
|
}
|
|
196
211
|
|
|
197
212
|
.bge-checkbox__original {
|
|
198
|
-
width:
|
|
199
|
-
height:
|
|
213
|
+
width: 20px;
|
|
214
|
+
height: 20px;
|
|
200
215
|
opacity: 0;
|
|
201
216
|
outline: none;
|
|
202
217
|
z-index: 0;
|
|
@@ -206,11 +221,11 @@ function handleChange (e: Event) {
|
|
|
206
221
|
display: inline-block;
|
|
207
222
|
position: absolute;
|
|
208
223
|
left: 0;
|
|
209
|
-
top:
|
|
224
|
+
top: 0;
|
|
210
225
|
|
|
211
226
|
box-sizing: border-box;
|
|
212
|
-
width:
|
|
213
|
-
height:
|
|
227
|
+
width: 20px;
|
|
228
|
+
height: 20px;
|
|
214
229
|
background-color: transparent;
|
|
215
230
|
z-index: 1;
|
|
216
231
|
transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46), background-color .25s cubic-bezier(.71,-.46,.29,1.46), outline .25s cubic-bezier(.71,-.46,.29,1.46);
|