@bagelink/vue 0.0.384 → 0.0.390
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/components/Badge.vue.d.ts +4 -4
- package/dist/components/Badge.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +5 -8
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +23 -13
- package/dist/index.mjs +23 -13
- package/dist/style.css +50 -46
- package/package.json +1 -1
- package/src/components/Badge.vue +31 -26
- package/src/components/form/inputs/RadioPillsInput.vue +48 -43
- package/src/styles/modal.css +5 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { MaterialIcons } from '..';
|
|
2
2
|
type Props = {
|
|
3
|
-
color?: 'green' | 'red' | 'blue' | 'light' | 'gray';
|
|
4
|
-
size?: string;
|
|
5
|
-
text: string;
|
|
6
|
-
icon?: MaterialIcons;
|
|
3
|
+
'color'?: 'green' | 'red' | 'blue' | 'light' | 'gray';
|
|
4
|
+
'size'?: string;
|
|
5
|
+
'text': string;
|
|
6
|
+
'icon'?: MaterialIcons;
|
|
7
7
|
'icon.end'?: MaterialIcons;
|
|
8
8
|
};
|
|
9
9
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/components/Badge.vue"],"names":[],"mappings":"AAOA;AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,KAAK,KAAK,GAAG;
|
|
1
|
+
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../src/components/Badge.vue"],"names":[],"mappings":"AAOA;AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,KAAK,KAAK,GAAG;IACZ,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC3B,CAAC;;AAmFF,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
optioId: string;
|
|
1
|
+
type Option = string | number | Record<string, any> | {
|
|
3
2
|
label: string;
|
|
4
|
-
value:
|
|
5
|
-
}
|
|
3
|
+
value: string | number;
|
|
4
|
+
};
|
|
6
5
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
-
options?:
|
|
8
|
-
stringOptions: string[];
|
|
6
|
+
options?: Option[] | undefined;
|
|
9
7
|
modelValue: any;
|
|
10
8
|
id?: string | undefined;
|
|
11
9
|
label?: string | undefined;
|
|
12
10
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
11
|
"update:modelValue": (...args: any[]) => void;
|
|
14
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
15
|
-
options?:
|
|
16
|
-
stringOptions: string[];
|
|
13
|
+
options?: Option[] | undefined;
|
|
17
14
|
modelValue: any;
|
|
18
15
|
id?: string | undefined;
|
|
19
16
|
label?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioPillsInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/RadioPillsInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioPillsInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/RadioPillsInput.vue"],"names":[],"mappings":"AAmBA;AAMA,KAAK,MAAM,GACR,MAAM,GACN,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;;;gBAqKhC,GAAG;;;;;;;gBAAH,GAAG;;;;;;AAPhB,wBAYG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -5963,7 +5963,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
5963
5963
|
};
|
|
5964
5964
|
}
|
|
5965
5965
|
});
|
|
5966
|
-
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
5966
|
+
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-561f7a72"]]);
|
|
5967
5967
|
const _hoisted_1$r = ["src"];
|
|
5968
5968
|
const _hoisted_2$n = ["src", "autoplay", "muted", "loop", "controls"];
|
|
5969
5969
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -18360,7 +18360,6 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
18360
18360
|
__name: "RadioPillsInput",
|
|
18361
18361
|
props: {
|
|
18362
18362
|
options: {},
|
|
18363
|
-
stringOptions: {},
|
|
18364
18363
|
modelValue: {},
|
|
18365
18364
|
id: {},
|
|
18366
18365
|
label: {}
|
|
@@ -18368,12 +18367,21 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
18368
18367
|
emits: ["update:modelValue"],
|
|
18369
18368
|
setup(__props, { emit: __emit }) {
|
|
18370
18369
|
const emits = __emit;
|
|
18370
|
+
const getLabel = (option2) => {
|
|
18371
|
+
if (typeof option2 === "string")
|
|
18372
|
+
return option2;
|
|
18373
|
+
if (typeof option2 === "number")
|
|
18374
|
+
return `${option2}`;
|
|
18375
|
+
return option2.label;
|
|
18376
|
+
};
|
|
18377
|
+
const getValue = (option2) => {
|
|
18378
|
+
if (typeof option2 === "string")
|
|
18379
|
+
return option2;
|
|
18380
|
+
if (typeof option2 === "number")
|
|
18381
|
+
return option2;
|
|
18382
|
+
return option2.value;
|
|
18383
|
+
};
|
|
18371
18384
|
const props2 = __props;
|
|
18372
|
-
const cumputedOptions = vue.computed(() => props2.options || props2.stringOptions.map((v2) => ({
|
|
18373
|
-
optioId: v2,
|
|
18374
|
-
label: v2,
|
|
18375
|
-
value: v2
|
|
18376
|
-
})));
|
|
18377
18385
|
let selectedValue = vue.ref("");
|
|
18378
18386
|
function handleSelect(e) {
|
|
18379
18387
|
var _a2;
|
|
@@ -18398,20 +18406,22 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
18398
18406
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
18399
18407
|
vue.createElementVNode("label", _hoisted_2$d, vue.toDisplayString(_ctx.label), 1),
|
|
18400
18408
|
vue.createElementVNode("div", _hoisted_3$a, [
|
|
18401
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
18409
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option2, index2) => {
|
|
18402
18410
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
18403
18411
|
class: "radio-pill",
|
|
18404
18412
|
key: index2
|
|
18405
18413
|
}, [
|
|
18406
18414
|
vue.createElementVNode("input", {
|
|
18407
18415
|
type: "radio",
|
|
18408
|
-
id:
|
|
18416
|
+
id: getValue(option2),
|
|
18409
18417
|
name: _ctx.id,
|
|
18410
|
-
value,
|
|
18411
|
-
checked: vue.unref(selectedValue) ===
|
|
18418
|
+
value: getValue(option2),
|
|
18419
|
+
checked: vue.unref(selectedValue) === getValue(option2),
|
|
18412
18420
|
onChange: handleSelect
|
|
18413
18421
|
}, null, 40, _hoisted_4$6),
|
|
18414
|
-
vue.createElementVNode("label", {
|
|
18422
|
+
vue.createElementVNode("label", {
|
|
18423
|
+
for: getValue(option2)
|
|
18424
|
+
}, vue.toDisplayString(getLabel(option2)), 9, _hoisted_5$5)
|
|
18415
18425
|
]);
|
|
18416
18426
|
}), 128))
|
|
18417
18427
|
])
|
|
@@ -18419,7 +18429,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
18419
18429
|
};
|
|
18420
18430
|
}
|
|
18421
18431
|
});
|
|
18422
|
-
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
18432
|
+
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ee7dd382"]]);
|
|
18423
18433
|
const _hoisted_1$f = { class: "bagel-input" };
|
|
18424
18434
|
const _hoisted_2$c = {
|
|
18425
18435
|
key: 0,
|
package/dist/index.mjs
CHANGED
|
@@ -5961,7 +5961,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
5961
5961
|
};
|
|
5962
5962
|
}
|
|
5963
5963
|
});
|
|
5964
|
-
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
5964
|
+
const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-561f7a72"]]);
|
|
5965
5965
|
const _hoisted_1$r = ["src"];
|
|
5966
5966
|
const _hoisted_2$n = ["src", "autoplay", "muted", "loop", "controls"];
|
|
5967
5967
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
@@ -18358,7 +18358,6 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
18358
18358
|
__name: "RadioPillsInput",
|
|
18359
18359
|
props: {
|
|
18360
18360
|
options: {},
|
|
18361
|
-
stringOptions: {},
|
|
18362
18361
|
modelValue: {},
|
|
18363
18362
|
id: {},
|
|
18364
18363
|
label: {}
|
|
@@ -18366,12 +18365,21 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
18366
18365
|
emits: ["update:modelValue"],
|
|
18367
18366
|
setup(__props, { emit: __emit }) {
|
|
18368
18367
|
const emits = __emit;
|
|
18368
|
+
const getLabel = (option2) => {
|
|
18369
|
+
if (typeof option2 === "string")
|
|
18370
|
+
return option2;
|
|
18371
|
+
if (typeof option2 === "number")
|
|
18372
|
+
return `${option2}`;
|
|
18373
|
+
return option2.label;
|
|
18374
|
+
};
|
|
18375
|
+
const getValue = (option2) => {
|
|
18376
|
+
if (typeof option2 === "string")
|
|
18377
|
+
return option2;
|
|
18378
|
+
if (typeof option2 === "number")
|
|
18379
|
+
return option2;
|
|
18380
|
+
return option2.value;
|
|
18381
|
+
};
|
|
18369
18382
|
const props2 = __props;
|
|
18370
|
-
const cumputedOptions = computed(() => props2.options || props2.stringOptions.map((v2) => ({
|
|
18371
|
-
optioId: v2,
|
|
18372
|
-
label: v2,
|
|
18373
|
-
value: v2
|
|
18374
|
-
})));
|
|
18375
18383
|
let selectedValue = ref("");
|
|
18376
18384
|
function handleSelect(e) {
|
|
18377
18385
|
var _a2;
|
|
@@ -18396,20 +18404,22 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
18396
18404
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
18397
18405
|
createElementVNode("label", _hoisted_2$d, toDisplayString(_ctx.label), 1),
|
|
18398
18406
|
createElementVNode("div", _hoisted_3$a, [
|
|
18399
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(
|
|
18407
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.options, (option2, index2) => {
|
|
18400
18408
|
return openBlock(), createElementBlock("div", {
|
|
18401
18409
|
class: "radio-pill",
|
|
18402
18410
|
key: index2
|
|
18403
18411
|
}, [
|
|
18404
18412
|
createElementVNode("input", {
|
|
18405
18413
|
type: "radio",
|
|
18406
|
-
id:
|
|
18414
|
+
id: getValue(option2),
|
|
18407
18415
|
name: _ctx.id,
|
|
18408
|
-
value,
|
|
18409
|
-
checked: unref(selectedValue) ===
|
|
18416
|
+
value: getValue(option2),
|
|
18417
|
+
checked: unref(selectedValue) === getValue(option2),
|
|
18410
18418
|
onChange: handleSelect
|
|
18411
18419
|
}, null, 40, _hoisted_4$6),
|
|
18412
|
-
createElementVNode("label", {
|
|
18420
|
+
createElementVNode("label", {
|
|
18421
|
+
for: getValue(option2)
|
|
18422
|
+
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$5)
|
|
18413
18423
|
]);
|
|
18414
18424
|
}), 128))
|
|
18415
18425
|
])
|
|
@@ -18417,7 +18427,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
18417
18427
|
};
|
|
18418
18428
|
}
|
|
18419
18429
|
});
|
|
18420
|
-
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
18430
|
+
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ee7dd382"]]);
|
|
18421
18431
|
const _hoisted_1$f = { class: "bagel-input" };
|
|
18422
18432
|
const _hoisted_2$c = {
|
|
18423
18433
|
key: 0,
|
package/dist/style.css
CHANGED
|
@@ -402,9 +402,9 @@ a[data-v-d09a83c5] {
|
|
|
402
402
|
.modal {
|
|
403
403
|
width: 96%;
|
|
404
404
|
max-width: 720px;
|
|
405
|
-
transform: scale(0.5);
|
|
406
|
-
opacity: 0;
|
|
407
|
-
transition: all ease-in-out 0.
|
|
405
|
+
/* transform: scale(0.5); */
|
|
406
|
+
/* opacity: 0; */
|
|
407
|
+
transition: all ease-in-out 0.18s;
|
|
408
408
|
margin-left: auto;
|
|
409
409
|
margin-right: auto;
|
|
410
410
|
height: fit-content;
|
|
@@ -432,7 +432,7 @@ a[data-v-d09a83c5] {
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
.is-side .modal {
|
|
435
|
-
inset-inline-end: -
|
|
435
|
+
inset-inline-end: -1720px;
|
|
436
436
|
transform: scale(1);
|
|
437
437
|
opacity: 1;
|
|
438
438
|
/* position: fixed; */
|
|
@@ -464,7 +464,7 @@ a[data-v-d09a83c5] {
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
.is-active.is-side .modal {
|
|
467
|
-
inset-inline-end:
|
|
467
|
+
inset-inline-end: 0px;
|
|
468
468
|
transform: translateX(0%);
|
|
469
469
|
}
|
|
470
470
|
|
|
@@ -838,45 +838,49 @@ display: block;
|
|
|
838
838
|
width: calc(100% - 5rem);
|
|
839
839
|
}
|
|
840
840
|
|
|
841
|
-
.inline[data-v-
|
|
842
|
-
|
|
841
|
+
.inline[data-v-561f7a72] {
|
|
842
|
+
display: inline;
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
.pill {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
846
|
+
border-radius: 10px;
|
|
847
|
+
padding: 4px 8px;
|
|
848
|
+
font-size: 10px;
|
|
849
|
+
background: var(--bgl-gray-light);
|
|
850
|
+
white-space: nowrap;
|
|
851
|
+
display: inline;
|
|
852
|
+
}
|
|
853
|
+
.pill.light {
|
|
854
|
+
background: var(--bgl-blue-light);
|
|
855
|
+
color: var(--bgl-black);
|
|
852
856
|
}
|
|
853
857
|
.pill.blue {
|
|
854
|
-
|
|
855
|
-
|
|
858
|
+
background: var(--bgl-primary);
|
|
859
|
+
color: var(--bgl-white);
|
|
856
860
|
}
|
|
857
861
|
.pill.red {
|
|
858
|
-
|
|
859
|
-
|
|
862
|
+
background-color: var(--bgl-red-tint);
|
|
863
|
+
color: var(--bgl-red);
|
|
860
864
|
}
|
|
861
865
|
.pill.green {
|
|
862
|
-
|
|
863
|
-
|
|
866
|
+
background-color: var(--bgl-green);
|
|
867
|
+
color: var(--bgl-white);
|
|
864
868
|
}
|
|
865
869
|
.pill.orange {
|
|
866
|
-
|
|
867
|
-
|
|
870
|
+
background-color: var(--bgl-yellow);
|
|
871
|
+
color: var(--bgl-black);
|
|
868
872
|
}
|
|
869
873
|
.pill.yellow {
|
|
870
|
-
|
|
874
|
+
background-color: var(--bgl-yellow);
|
|
871
875
|
}
|
|
872
876
|
.pill.Paid,
|
|
873
877
|
.pill.Active {
|
|
874
|
-
|
|
875
|
-
|
|
878
|
+
background-color: var(--bgl-green);
|
|
879
|
+
color: white;
|
|
876
880
|
}
|
|
877
881
|
.pill.Error {
|
|
878
|
-
|
|
879
|
-
|
|
882
|
+
background-color: var(--bgl-red-tint);
|
|
883
|
+
color: var(--bgl-red);
|
|
880
884
|
}
|
|
881
885
|
|
|
882
886
|
.bgl_vid iframe[data-v-bbfc4353],
|
|
@@ -1456,29 +1460,29 @@ display: block;
|
|
|
1456
1460
|
}
|
|
1457
1461
|
}
|
|
1458
1462
|
|
|
1459
|
-
.radio-pill label[data-v-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1463
|
+
.radio-pill label[data-v-ee7dd382] {
|
|
1464
|
+
color: var(--bgl-primary);
|
|
1465
|
+
white-space: nowrap;
|
|
1466
|
+
border-radius: calc(var(--btn-border-radius) * 2);
|
|
1467
|
+
outline: 1px solid var(--bgl-primary);
|
|
1468
|
+
padding-left: calc(var(--btn-padding) / 2);
|
|
1469
|
+
padding-right: calc(var(--btn-padding) / 2);
|
|
1470
|
+
padding-top: calc(var(--btn-padding) / 6);
|
|
1471
|
+
padding-bottom: calc(var(--btn-padding) / 6);
|
|
1472
|
+
cursor: pointer;
|
|
1473
|
+
transition: var(--bgl-transition);
|
|
1474
|
+
background: var(--bgl-white);
|
|
1475
|
+
user-select: none;
|
|
1472
1476
|
}
|
|
1473
|
-
.radio-pill label[data-v-
|
|
1474
|
-
|
|
1477
|
+
.radio-pill label[data-v-ee7dd382]:hover {
|
|
1478
|
+
filter: var(--bgl-hover-filter);
|
|
1475
1479
|
}
|
|
1476
|
-
.radio-pill input[data-v-
|
|
1477
|
-
|
|
1480
|
+
.radio-pill input[data-v-ee7dd382] {
|
|
1481
|
+
display: none;
|
|
1478
1482
|
}
|
|
1479
|
-
.radio-pill input:checked~label[data-v-
|
|
1480
|
-
|
|
1481
|
-
|
|
1483
|
+
.radio-pill input:checked ~ label[data-v-ee7dd382] {
|
|
1484
|
+
background: var(--bgl-primary);
|
|
1485
|
+
color: var(--bgl-white);
|
|
1482
1486
|
}
|
|
1483
1487
|
|
|
1484
1488
|
.bagel-input .fileUploadWrap[data-v-0dbacaa0] {
|
package/package.json
CHANGED
package/src/components/Badge.vue
CHANGED
|
@@ -11,63 +11,68 @@ import { Icon } from '@bagelink/vue';
|
|
|
11
11
|
import type { MaterialIcons } from '@bagelink/vue';
|
|
12
12
|
|
|
13
13
|
type Props = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
14
|
+
'color'?: 'green' | 'red' | 'blue' | 'light' | 'gray';
|
|
15
|
+
'size'?: string;
|
|
16
|
+
'text': string;
|
|
17
|
+
'icon'?: MaterialIcons;
|
|
18
|
+
'icon.end'?: MaterialIcons;
|
|
19
|
+
};
|
|
20
20
|
|
|
21
21
|
const props = defineProps<Props>();
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<style scoped>
|
|
25
25
|
.inline {
|
|
26
|
-
|
|
26
|
+
display: inline;
|
|
27
27
|
}
|
|
28
28
|
</style>
|
|
29
29
|
<style>
|
|
30
30
|
.pill {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
padding: 4px 8px;
|
|
33
|
+
font-size: 10px;
|
|
34
|
+
background: var(--bgl-gray-light);
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
display: inline;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pill.light {
|
|
40
|
+
background: var(--bgl-blue-light);
|
|
41
|
+
color: var(--bgl-black);
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
.pill.blue {
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
background: var(--bgl-primary);
|
|
46
|
+
color: var(--bgl-white);
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
.pill.red {
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
background-color: var(--bgl-red-tint);
|
|
51
|
+
color: var(--bgl-red);
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
.pill.green {
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
background-color: var(--bgl-green);
|
|
56
|
+
color: var(--bgl-white);
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
.pill.orange {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
background-color: var(--bgl-yellow);
|
|
61
|
+
color: var(--bgl-black);
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
.pill.yellow {
|
|
60
|
-
|
|
65
|
+
background-color: var(--bgl-yellow);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
.pill.Paid,
|
|
64
69
|
.pill.Active {
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
background-color: var(--bgl-green);
|
|
71
|
+
color: white;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
.pill.Error {
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
background-color: var(--bgl-red-tint);
|
|
76
|
+
color: var(--bgl-red);
|
|
72
77
|
}
|
|
73
78
|
</style>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bagel-input">
|
|
3
|
-
<label class="pb-025"
|
|
4
|
-
{{ label
|
|
3
|
+
<label class="pb-025">
|
|
4
|
+
{{ label }}
|
|
5
5
|
</label>
|
|
6
6
|
<div class="flex gap-05 flex-wrap">
|
|
7
|
-
<div class="radio-pill" v-for="(
|
|
7
|
+
<div class="radio-pill" v-for="(option, index) in options" :key="index">
|
|
8
8
|
<input
|
|
9
9
|
type="radio"
|
|
10
|
-
:id="
|
|
10
|
+
:id="getValue(option)"
|
|
11
11
|
:name="id"
|
|
12
|
-
:value="
|
|
13
|
-
:checked="selectedValue ===
|
|
14
|
-
@change="handleSelect"
|
|
15
|
-
>
|
|
16
|
-
<label :for="optioId">{{ label }}</label>
|
|
12
|
+
:value="getValue(option)"
|
|
13
|
+
:checked="selectedValue === getValue(option)"
|
|
14
|
+
@change="handleSelect" />
|
|
15
|
+
<label :for="getValue(option)">{{ getLabel(option) }}</label>
|
|
17
16
|
</div>
|
|
18
17
|
</div>
|
|
19
18
|
</div>
|
|
@@ -22,27 +21,33 @@
|
|
|
22
21
|
<script setup lang="ts">
|
|
23
22
|
import { onMounted, watch } from 'vue';
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
24
|
+
type Option =
|
|
25
|
+
| string
|
|
26
|
+
| number
|
|
27
|
+
| Record<string, any>
|
|
28
|
+
| { label: string; value: string | number };
|
|
29
|
+
|
|
30
30
|
const emits = defineEmits(['update:modelValue']);
|
|
31
31
|
|
|
32
|
+
const getLabel = (option: Option) => {
|
|
33
|
+
if (typeof option === 'string') return option;
|
|
34
|
+
if (typeof option === 'number') return `${option}`;
|
|
35
|
+
return option.label;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const getValue = (option: Option) => {
|
|
39
|
+
if (typeof option === 'string') return option;
|
|
40
|
+
if (typeof option === 'number') return option;
|
|
41
|
+
return option.value;
|
|
42
|
+
};
|
|
43
|
+
|
|
32
44
|
const props = defineProps<{
|
|
33
|
-
options?:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
label?: string,
|
|
45
|
+
options?: Option[];
|
|
46
|
+
modelValue: any;
|
|
47
|
+
id?: string;
|
|
48
|
+
label?: string;
|
|
38
49
|
}>();
|
|
39
50
|
|
|
40
|
-
const cumputedOptions = $computed(() => props.options || props.stringOptions.map((v) => ({
|
|
41
|
-
optioId: v,
|
|
42
|
-
label: v,
|
|
43
|
-
value: v,
|
|
44
|
-
})));
|
|
45
|
-
|
|
46
51
|
let selectedValue = $ref('');
|
|
47
52
|
|
|
48
53
|
function handleSelect(e: Event) {
|
|
@@ -56,7 +61,7 @@ watch(
|
|
|
56
61
|
if (newVal === oldVal || oldVal === undefined) return;
|
|
57
62
|
if (selectedValue !== newVal) selectedValue = newVal;
|
|
58
63
|
},
|
|
59
|
-
{ immediate: true }
|
|
64
|
+
{ immediate: true }
|
|
60
65
|
);
|
|
61
66
|
|
|
62
67
|
onMounted(() => {
|
|
@@ -66,30 +71,30 @@ onMounted(() => {
|
|
|
66
71
|
|
|
67
72
|
<style scoped>
|
|
68
73
|
.radio-pill label {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
color: var(--bgl-primary);
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
border-radius: calc(var(--btn-border-radius) * 2);
|
|
77
|
+
outline: 1px solid var(--bgl-primary);
|
|
78
|
+
padding-left: calc(var(--btn-padding) / 2);
|
|
79
|
+
padding-right: calc(var(--btn-padding) / 2);
|
|
80
|
+
padding-top: calc(var(--btn-padding) / 6);
|
|
81
|
+
padding-bottom: calc(var(--btn-padding) / 6);
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
transition: var(--bgl-transition);
|
|
84
|
+
background: var(--bgl-white);
|
|
85
|
+
user-select: none;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
.radio-pill label:hover {
|
|
84
|
-
|
|
89
|
+
filter: var(--bgl-hover-filter);
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
.radio-pill input {
|
|
88
|
-
|
|
93
|
+
display: none;
|
|
89
94
|
}
|
|
90
95
|
|
|
91
|
-
.radio-pill input:checked~label {
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
.radio-pill input:checked ~ label {
|
|
97
|
+
background: var(--bgl-primary);
|
|
98
|
+
color: var(--bgl-white);
|
|
94
99
|
}
|
|
95
100
|
</style>
|
package/src/styles/modal.css
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
.modal {
|
|
26
26
|
width: 96%;
|
|
27
27
|
max-width: 720px;
|
|
28
|
-
transform: scale(0.5);
|
|
29
|
-
opacity: 0;
|
|
30
|
-
transition: all ease-in-out 0.
|
|
28
|
+
/* transform: scale(0.5); */
|
|
29
|
+
/* opacity: 0; */
|
|
30
|
+
transition: all ease-in-out 0.18s;
|
|
31
31
|
margin-left: auto;
|
|
32
32
|
margin-right: auto;
|
|
33
33
|
height: fit-content;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.is-side .modal {
|
|
58
|
-
inset-inline-end: -
|
|
58
|
+
inset-inline-end: -1720px;
|
|
59
59
|
transform: scale(1);
|
|
60
60
|
opacity: 1;
|
|
61
61
|
/* position: fixed; */
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.is-active.is-side .modal {
|
|
90
|
-
inset-inline-end:
|
|
90
|
+
inset-inline-end: 0px;
|
|
91
91
|
transform: translateX(0%);
|
|
92
92
|
}
|
|
93
93
|
|