@bagelink/vue 0.0.526 → 0.0.530
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/form/inputs/ToggleInput.vue.d.ts +17 -7
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +9 -4
- package/dist/index.mjs +9 -4
- package/dist/plugins/modal.d.ts.map +1 -1
- package/dist/style.css +11 -11
- package/package.json +1 -1
- package/src/components/form/inputs/ToggleInput.vue +10 -3
- package/src/plugins/modal.ts +1 -2
|
@@ -4,14 +4,18 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
4
4
|
type: import('vue').PropType<string>;
|
|
5
5
|
required: true;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
type: import('vue').PropType<
|
|
7
|
+
small: {
|
|
8
|
+
type: import('vue').PropType<boolean>;
|
|
9
9
|
};
|
|
10
10
|
title: {
|
|
11
11
|
type: import('vue').PropType<string>;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
id: {
|
|
14
|
+
type: import('vue').PropType<string>;
|
|
15
|
+
};
|
|
16
|
+
defaultValue: {
|
|
14
17
|
type: import('vue').PropType<boolean>;
|
|
18
|
+
default: boolean;
|
|
15
19
|
};
|
|
16
20
|
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
21
|
modelValue: import('vue').PropType<boolean>;
|
|
@@ -19,15 +23,21 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
19
23
|
type: import('vue').PropType<string>;
|
|
20
24
|
required: true;
|
|
21
25
|
};
|
|
22
|
-
|
|
23
|
-
type: import('vue').PropType<
|
|
26
|
+
small: {
|
|
27
|
+
type: import('vue').PropType<boolean>;
|
|
24
28
|
};
|
|
25
29
|
title: {
|
|
26
30
|
type: import('vue').PropType<string>;
|
|
27
31
|
};
|
|
28
|
-
|
|
32
|
+
id: {
|
|
33
|
+
type: import('vue').PropType<string>;
|
|
34
|
+
};
|
|
35
|
+
defaultValue: {
|
|
29
36
|
type: import('vue').PropType<boolean>;
|
|
37
|
+
default: boolean;
|
|
30
38
|
};
|
|
31
|
-
}>>, {
|
|
39
|
+
}>>, {
|
|
40
|
+
defaultValue: boolean;
|
|
41
|
+
}, {}>;
|
|
32
42
|
export default _default;
|
|
33
43
|
//# sourceMappingURL=ToggleInput.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/ToggleInput.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ToggleInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/ToggleInput.vue"],"names":[],"mappings":";gBAqBc,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;;;kBAwIwJ,IAAI;;;;;;;;;;;;;;;;gBAxI3L,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;;;kBAwIwJ,IAAI;;;;;;;;;;;;;;;;kBANzL,OAAO;;AAXvB,wBAeG"}
|
package/dist/index.cjs
CHANGED
|
@@ -28584,7 +28584,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
28584
28584
|
}
|
|
28585
28585
|
});
|
|
28586
28586
|
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-82316bcb"]]);
|
|
28587
|
-
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-
|
|
28587
|
+
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-50198c44"), n2 = n2(), vue.popScopeId(), n2);
|
|
28588
28588
|
const _hoisted_1$g = ["title"];
|
|
28589
28589
|
const _hoisted_2$c = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
|
|
28590
28590
|
const _hoisted_3$9 = [
|
|
@@ -28597,14 +28597,19 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
28597
28597
|
label: {},
|
|
28598
28598
|
id: {},
|
|
28599
28599
|
title: {},
|
|
28600
|
-
small: { type: Boolean }
|
|
28600
|
+
small: { type: Boolean },
|
|
28601
|
+
defaultValue: { type: Boolean, default: false }
|
|
28601
28602
|
}, {
|
|
28602
|
-
"modelValue": { type: Boolean
|
|
28603
|
+
"modelValue": { type: Boolean },
|
|
28603
28604
|
"modelModifiers": {}
|
|
28604
28605
|
}),
|
|
28605
28606
|
emits: ["update:modelValue"],
|
|
28606
28607
|
setup(__props) {
|
|
28608
|
+
const props2 = __props;
|
|
28607
28609
|
const checked = vue.useModel(__props, "modelValue");
|
|
28610
|
+
vue.onMounted(() => {
|
|
28611
|
+
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
28612
|
+
});
|
|
28608
28613
|
return (_ctx, _cache) => {
|
|
28609
28614
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
28610
28615
|
class: vue.normalizeClass(["bagel-input bgl-checkbox justify-content-center gap-1", { small: _ctx.small }]),
|
|
@@ -28627,7 +28632,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
28627
28632
|
};
|
|
28628
28633
|
}
|
|
28629
28634
|
});
|
|
28630
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
28635
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-50198c44"]]);
|
|
28631
28636
|
function OrderedMap(content) {
|
|
28632
28637
|
this.content = content;
|
|
28633
28638
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -28582,7 +28582,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
28582
28582
|
}
|
|
28583
28583
|
});
|
|
28584
28584
|
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-82316bcb"]]);
|
|
28585
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-
|
|
28585
|
+
const _withScopeId$1 = (n2) => (pushScopeId("data-v-50198c44"), n2 = n2(), popScopeId(), n2);
|
|
28586
28586
|
const _hoisted_1$g = ["title"];
|
|
28587
28587
|
const _hoisted_2$c = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
|
|
28588
28588
|
const _hoisted_3$9 = [
|
|
@@ -28595,14 +28595,19 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
28595
28595
|
label: {},
|
|
28596
28596
|
id: {},
|
|
28597
28597
|
title: {},
|
|
28598
|
-
small: { type: Boolean }
|
|
28598
|
+
small: { type: Boolean },
|
|
28599
|
+
defaultValue: { type: Boolean, default: false }
|
|
28599
28600
|
}, {
|
|
28600
|
-
"modelValue": { type: Boolean
|
|
28601
|
+
"modelValue": { type: Boolean },
|
|
28601
28602
|
"modelModifiers": {}
|
|
28602
28603
|
}),
|
|
28603
28604
|
emits: ["update:modelValue"],
|
|
28604
28605
|
setup(__props) {
|
|
28606
|
+
const props2 = __props;
|
|
28605
28607
|
const checked = useModel(__props, "modelValue");
|
|
28608
|
+
onMounted(() => {
|
|
28609
|
+
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
28610
|
+
});
|
|
28606
28611
|
return (_ctx, _cache) => {
|
|
28607
28612
|
return openBlock(), createElementBlock("div", {
|
|
28608
28613
|
class: normalizeClass(["bagel-input bgl-checkbox justify-content-center gap-1", { small: _ctx.small }]),
|
|
@@ -28625,7 +28630,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
28625
28630
|
};
|
|
28626
28631
|
}
|
|
28627
28632
|
});
|
|
28628
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
28633
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-50198c44"]]);
|
|
28629
28634
|
function OrderedMap(content) {
|
|
28630
28635
|
this.content = content;
|
|
28631
28636
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/plugins/modal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/plugins/modal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG/D,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAChC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,cAAc,CAAC,GAAG,cAAc,CAAA;IACvE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAA;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C,SAAS,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,CAAA;IAChC,YAAY,CAAC,EA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ED,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAmB,CAAA;AAElE,wBAAgB,QAAQ,IAAI,QAAQ,CAInC;AAED,eAAO,MAAM,WAAW,EAAE,MAmDzB,CAAA"}
|
package/dist/style.css
CHANGED
|
@@ -2343,27 +2343,27 @@ img.preview.single[data-v-82316bcb]{
|
|
|
2343
2343
|
color: var(--bgl-green);
|
|
2344
2344
|
}
|
|
2345
2345
|
|
|
2346
|
-
.bgl-checkbox[data-v-
|
|
2346
|
+
.bgl-checkbox[data-v-50198c44] {
|
|
2347
2347
|
position: relative;
|
|
2348
2348
|
transition: var(--bgl-transition);
|
|
2349
2349
|
}
|
|
2350
|
-
.bgl-checkbox input[type=checkbox][data-v-
|
|
2350
|
+
.bgl-checkbox input[type=checkbox][data-v-50198c44] {
|
|
2351
2351
|
display: none;
|
|
2352
2352
|
}
|
|
2353
|
-
.bgl-checkbox label[data-v-
|
|
2353
|
+
.bgl-checkbox label[data-v-50198c44] {
|
|
2354
2354
|
padding-inline-start: calc(var(--input-height) + 0.25rem);
|
|
2355
2355
|
transition: var(--bgl-transition);
|
|
2356
2356
|
cursor: pointer;
|
|
2357
2357
|
user-select: none;
|
|
2358
2358
|
line-height: var(--input-height);
|
|
2359
2359
|
}
|
|
2360
|
-
.bgl-checkbox[data-v-
|
|
2360
|
+
.bgl-checkbox[data-v-50198c44]:hover {
|
|
2361
2361
|
filter: brightness(90%);
|
|
2362
2362
|
}
|
|
2363
|
-
.bgl-checkbox[data-v-
|
|
2363
|
+
.bgl-checkbox[data-v-50198c44]:active {
|
|
2364
2364
|
filter: var(--bgl-active-filter);
|
|
2365
2365
|
}
|
|
2366
|
-
.switch[data-v-
|
|
2366
|
+
.switch[data-v-50198c44] {
|
|
2367
2367
|
position: absolute;
|
|
2368
2368
|
display: inline-block;
|
|
2369
2369
|
height: calc(var(--input-height) / 2);
|
|
@@ -2374,12 +2374,12 @@ img.preview.single[data-v-82316bcb]{
|
|
|
2374
2374
|
margin-top: 0.15rem;
|
|
2375
2375
|
pointer-events: none;
|
|
2376
2376
|
}
|
|
2377
|
-
.switch input[data-v-
|
|
2377
|
+
.switch input[data-v-50198c44] {
|
|
2378
2378
|
opacity: 0;
|
|
2379
2379
|
width: 0;
|
|
2380
2380
|
height: 0;
|
|
2381
2381
|
}
|
|
2382
|
-
.slider[data-v-
|
|
2382
|
+
.slider[data-v-50198c44] {
|
|
2383
2383
|
position: absolute;
|
|
2384
2384
|
cursor: pointer;
|
|
2385
2385
|
top: 0;
|
|
@@ -2393,7 +2393,7 @@ img.preview.single[data-v-82316bcb]{
|
|
|
2393
2393
|
box-shadow: inset 0 0 10px #00000020;
|
|
2394
2394
|
background: var(--input-bg);
|
|
2395
2395
|
}
|
|
2396
|
-
.slider[data-v-
|
|
2396
|
+
.slider[data-v-50198c44]:before {
|
|
2397
2397
|
position: absolute;
|
|
2398
2398
|
content: "";
|
|
2399
2399
|
height: calc(var(--input-height) / 2 - 2px);
|
|
@@ -2406,10 +2406,10 @@ img.preview.single[data-v-82316bcb]{
|
|
|
2406
2406
|
transition: 0.2s;
|
|
2407
2407
|
box-shadow:0 1px 5px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
|
|
2408
2408
|
}
|
|
2409
|
-
.checked .slider[data-v-
|
|
2409
|
+
.checked .slider[data-v-50198c44] {
|
|
2410
2410
|
background: var(--bgl-primary);
|
|
2411
2411
|
}
|
|
2412
|
-
.checked .slider[data-v-
|
|
2412
|
+
.checked .slider[data-v-50198c44]:before {
|
|
2413
2413
|
margin-inline-start:calc(var(--input-height) / 2 - 2px) ;
|
|
2414
2414
|
}
|
|
2415
2415
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
import { onMounted } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{
|
|
3
5
|
label: string
|
|
4
6
|
id?: string
|
|
5
7
|
title?: string
|
|
6
8
|
small?: boolean
|
|
7
|
-
|
|
9
|
+
defaultValue?: boolean
|
|
10
|
+
}>(), { defaultValue: false })
|
|
11
|
+
|
|
12
|
+
const checked = defineModel<boolean>('modelValue')
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
if (checked.value === undefined) checked.value = props.defaultValue
|
|
16
|
+
})
|
|
10
17
|
</script>
|
|
11
18
|
|
|
12
19
|
<template>
|
package/src/plugins/modal.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defineComponent, h, inject
|
|
2
|
-
} from 'vue'
|
|
1
|
+
import { defineComponent, h, inject } from 'vue'
|
|
3
2
|
import type { InjectionKey, Plugin } from 'vue'
|
|
4
3
|
import type { BglFormSchemaT, BtnOptions } from '@bagelink/vue'
|
|
5
4
|
import { Modal, ModalConfirm, ModalForm } from '@bagelink/vue'
|