bge-ui 1.2.7 → 1.2.8
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 +32 -26
- package/dist/style.css +22 -12
- package/package.json +1 -1
- package/src/checkbox/index.vue +35 -20
package/dist/index.js
CHANGED
|
@@ -1202,7 +1202,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
1204
|
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$
|
|
1205
|
+
const _hoisted_10$2 = [
|
|
1206
1206
|
_hoisted_1$1q
|
|
1207
1207
|
];
|
|
1208
1208
|
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
@@ -1229,7 +1229,7 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
1229
1229
|
viewBox: "0 0 24 24",
|
|
1230
1230
|
fill: "none",
|
|
1231
1231
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1232
|
-
}, _hoisted_10$
|
|
1232
|
+
}, _hoisted_10$2, 4);
|
|
1233
1233
|
};
|
|
1234
1234
|
}
|
|
1235
1235
|
});
|
|
@@ -2751,7 +2751,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
2751
2751
|
}
|
|
2752
2752
|
});
|
|
2753
2753
|
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 = [
|
|
2754
|
+
const _hoisted_10$1 = [
|
|
2755
2755
|
_hoisted_1$P
|
|
2756
2756
|
];
|
|
2757
2757
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
@@ -2778,7 +2778,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
2778
2778
|
viewBox: "0 0 24 24",
|
|
2779
2779
|
fill: "none",
|
|
2780
2780
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2781
|
-
}, _hoisted_10, 4);
|
|
2781
|
+
}, _hoisted_10$1, 4);
|
|
2782
2782
|
};
|
|
2783
2783
|
}
|
|
2784
2784
|
});
|
|
@@ -4340,7 +4340,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4340
4340
|
}
|
|
4341
4341
|
});
|
|
4342
4342
|
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 = [
|
|
4343
|
+
const _hoisted_8$1 = [
|
|
4344
4344
|
_hoisted_1$a
|
|
4345
4345
|
];
|
|
4346
4346
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
@@ -4367,7 +4367,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4367
4367
|
viewBox: "0 0 20 20",
|
|
4368
4368
|
fill: "none",
|
|
4369
4369
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4370
|
-
}, _hoisted_8, 4);
|
|
4370
|
+
}, _hoisted_8$1, 4);
|
|
4371
4371
|
};
|
|
4372
4372
|
}
|
|
4373
4373
|
});
|
|
@@ -8749,32 +8749,43 @@ message._context = null;
|
|
|
8749
8749
|
const _hoisted_1$3 = { class: "bge-checkbox__input" };
|
|
8750
8750
|
const _hoisted_2$2 = ["id", "disabled"];
|
|
8751
8751
|
const _hoisted_3$2 = {
|
|
8752
|
+
key: 0,
|
|
8752
8753
|
class: "bge-checkbox__inner",
|
|
8753
8754
|
viewBox: "0 0 16 16",
|
|
8754
8755
|
fill: "none",
|
|
8755
8756
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8756
8757
|
};
|
|
8757
|
-
const _hoisted_4$2 = {
|
|
8758
|
-
key: 0,
|
|
8758
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("path", {
|
|
8759
8759
|
class: "border",
|
|
8760
8760
|
"fill-rule": "evenodd",
|
|
8761
8761
|
"clip-rule": "evenodd",
|
|
8762
|
-
d: "M13
|
|
8763
|
-
|
|
8762
|
+
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"
|
|
8763
|
+
}, null, -1);
|
|
8764
|
+
const _hoisted_5$1 = [
|
|
8765
|
+
_hoisted_4$2
|
|
8766
|
+
];
|
|
8767
|
+
const _hoisted_6$1 = {
|
|
8768
|
+
key: 1,
|
|
8769
|
+
class: "bge-checkbox__inner",
|
|
8770
|
+
viewBox: "0 0 16 16",
|
|
8771
|
+
fill: "none",
|
|
8772
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8764
8773
|
};
|
|
8765
|
-
const
|
|
8774
|
+
const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("path", {
|
|
8766
8775
|
class: "bg",
|
|
8767
|
-
d: "M2
|
|
8768
|
-
fill: "#FFFF38"
|
|
8776
|
+
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
8777
|
}, null, -1);
|
|
8770
|
-
const
|
|
8778
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("path", {
|
|
8771
8779
|
class: "check",
|
|
8772
8780
|
"fill-rule": "evenodd",
|
|
8773
8781
|
"clip-rule": "evenodd",
|
|
8774
|
-
d: "M11.
|
|
8775
|
-
fill: "#0E1114"
|
|
8782
|
+
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
8783
|
}, null, -1);
|
|
8777
|
-
const
|
|
8784
|
+
const _hoisted_9 = [
|
|
8785
|
+
_hoisted_7$1,
|
|
8786
|
+
_hoisted_8
|
|
8787
|
+
];
|
|
8788
|
+
const _hoisted_10 = ["for"];
|
|
8778
8789
|
const formItemContextKey$2 = "bge-form-item-context";
|
|
8779
8790
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
8780
8791
|
...{
|
|
@@ -8788,7 +8799,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8788
8799
|
},
|
|
8789
8800
|
size: {
|
|
8790
8801
|
type: String,
|
|
8791
|
-
default: "
|
|
8802
|
+
default: "default"
|
|
8792
8803
|
},
|
|
8793
8804
|
modelValue: {
|
|
8794
8805
|
type: [Array, String, Number, Boolean],
|
|
@@ -8871,7 +8882,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8871
8882
|
}
|
|
8872
8883
|
return (_ctx, _cache) => {
|
|
8873
8884
|
return openBlock(), createElementBlock("label", {
|
|
8874
|
-
class: normalizeClass(["bge-checkbox", { "bge-checkbox_large": __props.size === "large", "bge-checkbox_disabled": __props.disabled }])
|
|
8885
|
+
class: normalizeClass(["bge-checkbox", { "bge-checkbox_large": __props.size === "large", "bge-checkbox_mini": __props.size === "mini", "bge-checkbox_disabled": __props.disabled }])
|
|
8875
8886
|
}, [
|
|
8876
8887
|
createElementVNode("span", _hoisted_1$3, [
|
|
8877
8888
|
withDirectives(createElementVNode("input", {
|
|
@@ -8886,19 +8897,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8886
8897
|
}, null, 40, _hoisted_2$2), [
|
|
8887
8898
|
[vModelCheckbox, input.value]
|
|
8888
8899
|
]),
|
|
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
|
-
]))
|
|
8900
|
+
!input.value ? (openBlock(), createElementBlock("svg", _hoisted_3$2, _hoisted_5$1)) : (openBlock(), createElementBlock("svg", _hoisted_6$1, _hoisted_9))
|
|
8895
8901
|
]),
|
|
8896
8902
|
createElementVNode("label", {
|
|
8897
8903
|
for: id.value,
|
|
8898
8904
|
class: normalizeClass(["bge-checkbox__label", { checked: input.value }])
|
|
8899
8905
|
}, [
|
|
8900
8906
|
renderSlot(_ctx.$slots, "default")
|
|
8901
|
-
], 10,
|
|
8907
|
+
], 10, _hoisted_10)
|
|
8902
8908
|
], 2);
|
|
8903
8909
|
};
|
|
8904
8910
|
}
|
package/dist/style.css
CHANGED
|
@@ -1273,18 +1273,28 @@ to {
|
|
|
1273
1273
|
}.bge-checkbox {
|
|
1274
1274
|
display: inline-flex;
|
|
1275
1275
|
justify-content: flex-start;
|
|
1276
|
-
align-items:
|
|
1276
|
+
align-items: center;
|
|
1277
1277
|
margin-right: 8px;
|
|
1278
1278
|
}
|
|
1279
1279
|
.bge-checkbox_large .bge-checkbox__label {
|
|
1280
|
-
font-size:
|
|
1280
|
+
font-size: 16px;
|
|
1281
1281
|
font-weight: 500;
|
|
1282
|
-
line-height:
|
|
1282
|
+
line-height: 28px;
|
|
1283
1283
|
}
|
|
1284
1284
|
.bge-checkbox_large .bge-checkbox__inner,
|
|
1285
1285
|
.bge-checkbox_large .bge-checkbox__original {
|
|
1286
|
-
width:
|
|
1287
|
-
height:
|
|
1286
|
+
width: 24px;
|
|
1287
|
+
height: 24px;
|
|
1288
|
+
}
|
|
1289
|
+
.bge-checkbox_mini .bge-checkbox__label {
|
|
1290
|
+
font-size: 12px;
|
|
1291
|
+
font-weight: 500;
|
|
1292
|
+
line-height: 20px;
|
|
1293
|
+
}
|
|
1294
|
+
.bge-checkbox_mini .bge-checkbox__inner,
|
|
1295
|
+
.bge-checkbox_mini .bge-checkbox__original {
|
|
1296
|
+
width: 16px;
|
|
1297
|
+
height: 16px;
|
|
1288
1298
|
}
|
|
1289
1299
|
.bge-checkbox_disabled {
|
|
1290
1300
|
--tc-secondary: var(--tc-quaternary);
|
|
@@ -1306,9 +1316,9 @@ to {
|
|
|
1306
1316
|
.bge-checkbox__label {
|
|
1307
1317
|
display: inline-block;
|
|
1308
1318
|
padding-left: 8px;
|
|
1309
|
-
font-size:
|
|
1319
|
+
font-size: 14px;
|
|
1310
1320
|
font-weight: 500;
|
|
1311
|
-
line-height:
|
|
1321
|
+
line-height: 24px;
|
|
1312
1322
|
color: var(--tc-secondary);
|
|
1313
1323
|
}
|
|
1314
1324
|
.bge-checkbox__label.checked {
|
|
@@ -1322,8 +1332,8 @@ to {
|
|
|
1322
1332
|
position: relative;
|
|
1323
1333
|
}
|
|
1324
1334
|
.bge-checkbox__original {
|
|
1325
|
-
width:
|
|
1326
|
-
height:
|
|
1335
|
+
width: 20px;
|
|
1336
|
+
height: 20px;
|
|
1327
1337
|
opacity: 0;
|
|
1328
1338
|
outline: none;
|
|
1329
1339
|
z-index: 0;
|
|
@@ -1332,10 +1342,10 @@ to {
|
|
|
1332
1342
|
display: inline-block;
|
|
1333
1343
|
position: absolute;
|
|
1334
1344
|
left: 0;
|
|
1335
|
-
top:
|
|
1345
|
+
top: 0;
|
|
1336
1346
|
box-sizing: border-box;
|
|
1337
|
-
width:
|
|
1338
|
-
height:
|
|
1347
|
+
width: 20px;
|
|
1348
|
+
height: 20px;
|
|
1339
1349
|
background-color: transparent;
|
|
1340
1350
|
z-index: 1;
|
|
1341
1351
|
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/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);
|