@mintplayer/vue-bootstrap 3.31.0 → 3.32.0
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/README.md +12 -11
- package/accordion/index.mjs +26 -24
- package/card/index.mjs +65 -29
- package/carousel/index.mjs +15 -14
- package/checkbox/index.mjs +1 -1
- package/checkbox/src/BsCheckbox.vue.d.ts +1 -1
- package/chunks/BsCheckbox-D7eBD_nx.mjs +109 -0
- package/chunks/{BsDatatable.generated-87kABKmn.mjs → BsDatatable.generated-Dy-c1OTA.mjs} +16 -14
- package/chunks/{BsDatetimePicker.generated-DB9itVGP.mjs → BsDatetimePicker.generated-C7_hr0cg.mjs} +11 -10
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/BsDatatable.generated.vue.d.ts +1 -1
- package/datepicker/index.mjs +11 -10
- package/datepicker/src/generated/BsDatepicker.generated.vue.d.ts +1 -1
- package/datetime-picker/index.mjs +1 -1
- package/datetime-picker/src/generated/BsDatetimePicker.generated.vue.d.ts +1 -1
- package/dropdown-menu/index.mjs +25 -18
- package/file-manager/index.mjs +10 -9
- package/input-group/index.mjs +12 -10
- package/machine/index.mjs +55 -44
- package/machine/src/index.d.ts +1 -0
- package/machine/src/mark-links.d.ts +10 -0
- package/nav/index.mjs +92 -0
- package/nav/src/generated/BsNav.generated.vue.d.ts +162 -0
- package/nav/src/generated/BsNavItem.generated.vue.d.ts +122 -0
- package/nav/src/generated/index.d.ts +2 -0
- package/nav/src/generated/nav-item.view.generated.vue.d.ts +27 -0
- package/nav/src/generated/nav.view.generated.vue.d.ts +27 -0
- package/nav/src/index.d.ts +1 -0
- package/nav/src/nav-item.vue.d.ts +2 -0
- package/navbar/index.mjs +81 -72
- package/navbar/src/navbar-item.vue.d.ts +2 -0
- package/otp-input/index.mjs +10 -9
- package/otp-input/src/generated/BsOtpInput.generated.vue.d.ts +1 -1
- package/package.json +10 -2
- package/pagination/index.mjs +27 -20
- package/phone-input/index.mjs +12 -11
- package/query-builder/index.mjs +12 -10
- package/radio/index.mjs +46 -33
- package/radio/src/BsRadio.vue.d.ts +1 -1
- package/ribbon/src/generated/BsRibbonCheckBox.generated.vue.d.ts +1 -1
- package/ribbon/src/generated/BsRibbonColorPicker.generated.vue.d.ts +1 -1
- package/scheduler/index.mjs +35 -34
- package/select/index.mjs +10 -9
- package/signature-pad/index.mjs +15 -14
- package/spinner/index.mjs +63 -0
- package/spinner/src/generated/BsSpinner.generated.vue.d.ts +60 -0
- package/spinner/src/generated/index.d.ts +1 -0
- package/spinner/src/generated/spinner.view.generated.vue.d.ts +9 -0
- package/spinner/src/index.d.ts +1 -0
- package/tab-control/index.mjs +29 -27
- package/timepicker/index.mjs +17 -16
- package/timepicker/src/generated/BsTimepicker.generated.vue.d.ts +1 -1
- package/toggle-button/index.mjs +1 -1
- package/tree-select/src/generated/BsTreeSelect.generated.vue.d.ts +1 -1
- package/typeahead/index.mjs +62 -59
- package/typeahead/src/BsTypeahead.vue.d.ts +1 -1
- package/chunks/BsCheckbox-C8H1KT2D.mjs +0 -96
package/timepicker/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useCore as e } from "../machine/index.mjs";
|
|
2
2
|
import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, mergeProps as s, openBlock as c, renderList as l, toDisplayString as u, unref as d, useTemplateRef as f } from "vue";
|
|
3
3
|
import { installLightStyles as p } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
-
import {
|
|
4
|
+
import { bootstrapForms as m } from "@mintplayer/ui-core/bootstrap/forms";
|
|
5
|
+
import { timeListCore as h, timepickerCore as g, timepickerScopedStyles as _ } from "@mintplayer/ui-core/timepicker";
|
|
5
6
|
//#endregion
|
|
6
7
|
//#region libs/mintplayer-vue-bootstrap/timepicker/src/generated/time-list.view.generated.vue
|
|
7
|
-
var
|
|
8
|
+
var v = /* @__PURE__ */ o({
|
|
8
9
|
__name: "time-list.view.generated",
|
|
9
10
|
props: { view: {} },
|
|
10
11
|
setup(e) {
|
|
@@ -16,7 +17,7 @@ var _ = /* @__PURE__ */ o({
|
|
|
16
17
|
key: e.key
|
|
17
18
|
}, { ref_for: !0 }, e.item), [a("button", s({ "data-mps": "timepicker" }, { ref_for: !0 }, e.option), u(e.text), 17)], 16))), 128))], 16)], 16));
|
|
18
19
|
}
|
|
19
|
-
}),
|
|
20
|
+
}), y = /* @__PURE__ */ o({
|
|
20
21
|
name: "BsTimeList",
|
|
21
22
|
__name: "BsTimeList.generated",
|
|
22
23
|
props: {
|
|
@@ -52,8 +53,8 @@ var _ = /* @__PURE__ */ o({
|
|
|
52
53
|
emits: ["selectedtimechange", "update:selectedTime"],
|
|
53
54
|
setup(t, { expose: r, emit: i }) {
|
|
54
55
|
let a = t, o = i;
|
|
55
|
-
p("timepicker",
|
|
56
|
-
let l = f("template"), u = e(
|
|
56
|
+
p(m.key, m.css, { order: m.order }), p("timepicker", _);
|
|
57
|
+
let l = f("template"), u = e(h, () => ({
|
|
57
58
|
selectedTime: a.selectedTime,
|
|
58
59
|
step: a.step,
|
|
59
60
|
minMinutes: a.minMinutes,
|
|
@@ -66,13 +67,13 @@ var _ = /* @__PURE__ */ o({
|
|
|
66
67
|
root: () => l.value?.$el,
|
|
67
68
|
emit: (e, t) => o(e.startsWith("update:") ? e : e.toLowerCase(), t),
|
|
68
69
|
models: ["selectedTime"]
|
|
69
|
-
}),
|
|
70
|
-
return r({ focusList: (...e) => u.call("focusList", e) }), (e, t) => (c(), n(
|
|
70
|
+
}), g = u.props;
|
|
71
|
+
return r({ focusList: (...e) => u.call("focusList", e) }), (e, t) => (c(), n(v, s({
|
|
71
72
|
ref_key: "template",
|
|
72
73
|
ref: l
|
|
73
|
-
}, d(
|
|
74
|
+
}, d(g)), null, 16));
|
|
74
75
|
}
|
|
75
|
-
}),
|
|
76
|
+
}), b = /* @__PURE__ */ o({
|
|
76
77
|
__name: "timepicker.view.generated",
|
|
77
78
|
props: { view: {} },
|
|
78
79
|
setup(e) {
|
|
@@ -101,7 +102,7 @@ var _ = /* @__PURE__ */ o({
|
|
|
101
102
|
}, { ref_for: !0 }, e.item), [a("button", s({ "data-mps": "timepicker" }, { ref_for: !0 }, e.option), u(e.text), 17)], 16))), 128))], 16)], 16)], 16)
|
|
102
103
|
], 16));
|
|
103
104
|
}
|
|
104
|
-
}),
|
|
105
|
+
}), x = /* @__PURE__ */ o({
|
|
105
106
|
name: "BsTimepicker",
|
|
106
107
|
__name: "BsTimepicker.generated",
|
|
107
108
|
props: {
|
|
@@ -169,8 +170,8 @@ var _ = /* @__PURE__ */ o({
|
|
|
169
170
|
],
|
|
170
171
|
setup(t, { expose: r, emit: i }) {
|
|
171
172
|
let a = t, o = i;
|
|
172
|
-
p("timepicker",
|
|
173
|
-
let l = f("template"), u = e(
|
|
173
|
+
p(m.key, m.css, { order: m.order }), p("timepicker", _);
|
|
174
|
+
let l = f("template"), u = e(g, () => ({
|
|
174
175
|
selectedTime: a.selectedTime,
|
|
175
176
|
step: a.step,
|
|
176
177
|
min: a.min,
|
|
@@ -190,15 +191,15 @@ var _ = /* @__PURE__ */ o({
|
|
|
190
191
|
root: () => l.value?.$el,
|
|
191
192
|
emit: (e, t) => o(e.startsWith("update:") ? e : e.toLowerCase(), t),
|
|
192
193
|
models: ["selectedTime"]
|
|
193
|
-
}),
|
|
194
|
+
}), h = u.props;
|
|
194
195
|
return r({
|
|
195
196
|
open: (...e) => u.call("open", e),
|
|
196
197
|
close: (...e) => u.call("close", e)
|
|
197
|
-
}), (e, t) => (c(), n(
|
|
198
|
+
}), (e, t) => (c(), n(b, s({
|
|
198
199
|
ref_key: "template",
|
|
199
200
|
ref: l
|
|
200
|
-
}, d(
|
|
201
|
+
}, d(h)), null, 16));
|
|
201
202
|
}
|
|
202
203
|
});
|
|
203
204
|
//#endregion
|
|
204
|
-
export {
|
|
205
|
+
export { y as BsTimeList, x as BsTimepicker };
|
|
@@ -130,9 +130,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
130
130
|
}>, {
|
|
131
131
|
name: string | null;
|
|
132
132
|
disabled: boolean;
|
|
133
|
+
invalid: boolean;
|
|
133
134
|
min: Date | null;
|
|
134
135
|
max: Date | null;
|
|
135
|
-
invalid: boolean;
|
|
136
136
|
locale: string | null;
|
|
137
137
|
labels: Partial<import('@mintplayer/ui-core/timepicker').TimepickerLabels> | null;
|
|
138
138
|
placeholder: string | null;
|
package/toggle-button/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../chunks/BsCheckbox-
|
|
1
|
+
import { t as e } from "../chunks/BsCheckbox-D7eBD_nx.mjs";
|
|
2
2
|
import { createBlock as t, defineComponent as n, openBlock as r, renderSlot as i, useModel as a, withCtx as o } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region libs/mintplayer-vue-bootstrap/toggle-button/src/BsToggleButton.vue
|
|
@@ -228,8 +228,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
228
228
|
placeholder: string;
|
|
229
229
|
inputLabel: string | null;
|
|
230
230
|
showClear: boolean;
|
|
231
|
-
provider: import('@mintplayer/ui-core/tree-select').TreeSelectProvider | null;
|
|
232
231
|
variant: import('@mintplayer/ui-core/tree-select').TreeSelectVariant;
|
|
232
|
+
provider: import('@mintplayer/ui-core/tree-select').TreeSelectProvider | null;
|
|
233
233
|
cascadeSelect: boolean;
|
|
234
234
|
panelScrollHeight: string;
|
|
235
235
|
searchDebounceMs: number;
|
package/typeahead/index.mjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { t as e } from "../chunks/useMachine-DLZ7g_H3.mjs";
|
|
2
2
|
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, onBeforeUnmount as u, onMounted as d, openBlock as f, renderList as p, renderSlot as m, shallowRef as h, toDisplayString as g, unref as _, useAttrs as v, useId as y, useModel as b, useTemplateRef as x, watch as S, withModifiers as C } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { installBootstrap as w } from "@mintplayer/ui-core/bootstrap";
|
|
4
|
+
import { installLightStyles as T } from "@mintplayer/ui-core/scoped-styles";
|
|
5
|
+
import { bootstrapForms as E } from "@mintplayer/ui-core/bootstrap/forms";
|
|
6
|
+
import { bootstrapDropdown as D } from "@mintplayer/ui-core/bootstrap/dropdown";
|
|
7
|
+
import { trackOpenSide as O } from "@mintplayer/ui-core/overlay";
|
|
8
|
+
import { TYPEAHEAD_SCOPE as k, TypeaheadMachine as A, connect as j, inMemoryTypeaheadProvider as M, typeaheadScopedStyles as N } from "@mintplayer/ui-core/typeahead";
|
|
6
9
|
//#region libs/mintplayer-vue-bootstrap/typeahead/src/BsTypeahead.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
10
|
+
var P = ["value"], F = ["onClick"], I = /* @__PURE__ */ s({
|
|
8
11
|
inheritAttrs: !1,
|
|
9
12
|
__name: "BsTypeahead",
|
|
10
13
|
props: /*@__PURE__*/ c({
|
|
@@ -38,94 +41,94 @@ var j = ["value"], M = ["onClick"], N = /* @__PURE__ */ s({
|
|
|
38
41
|
"loadError"
|
|
39
42
|
], ["update:modelValue"]),
|
|
40
43
|
setup(s, { emit: c }) {
|
|
41
|
-
let
|
|
42
|
-
id:
|
|
43
|
-
value:
|
|
44
|
+
let M = s, I = b(s, "modelValue"), L = c, R = `bs-typeahead-${y()}`, [z, B] = e(() => new A({
|
|
45
|
+
id: R,
|
|
46
|
+
value: I.value,
|
|
44
47
|
onChange: (e) => {
|
|
45
|
-
|
|
48
|
+
I.value = e;
|
|
46
49
|
},
|
|
47
|
-
onSelect: (e, t) =>
|
|
48
|
-
onSubmit: (e) =>
|
|
49
|
-
onOpen: () =>
|
|
50
|
-
onClose: () =>
|
|
51
|
-
onError: (e) =>
|
|
50
|
+
onSelect: (e, t) => L("select", e, t),
|
|
51
|
+
onSubmit: (e) => L("submit", e),
|
|
52
|
+
onOpen: () => L("open"),
|
|
53
|
+
onClose: () => L("close"),
|
|
54
|
+
onError: (e) => L("loadError", e)
|
|
52
55
|
}));
|
|
53
|
-
w(E,
|
|
54
|
-
|
|
55
|
-
}, { immediate: !0 }), S(() =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
w(E, D), T(k, N), S(() => M.provider, (e) => z.provider = e, { immediate: !0 }), S(() => M.debounceMs, (e) => z.debounceMs = e, { immediate: !0 }), S(() => M.minLength, (e) => z.minLength = e, { immediate: !0 }), S(() => [M.itemText, M.itemKey], ([e, t]) => {
|
|
57
|
+
z.itemText = e, z.itemKey = t;
|
|
58
|
+
}, { immediate: !0 }), S(() => M.disabled, (e) => z.setDisabled(e), { immediate: !0 }), S(() => M.errorText, (e) => z.setErrorText(e), { immediate: !0 }), S(() => [
|
|
59
|
+
M.inputLabel,
|
|
60
|
+
M.loadingLabel,
|
|
61
|
+
M.noResultsLabel,
|
|
62
|
+
M.resultsLabel
|
|
60
63
|
], ([e, t, n, r]) => {
|
|
61
64
|
let i = { input: e ?? null };
|
|
62
|
-
t !== void 0 && (i.loading = t), n !== void 0 && (i.noResults = n), r !== void 0 && (i.results = r),
|
|
63
|
-
}, { immediate: !0 }), S(
|
|
64
|
-
e !==
|
|
65
|
+
t !== void 0 && (i.loading = t), n !== void 0 && (i.noResults = n), r !== void 0 && (i.results = r), z.setLabels(i);
|
|
66
|
+
}, { immediate: !0 }), S(I, (e) => {
|
|
67
|
+
e !== z.snapshot.term && z.setValue(e);
|
|
65
68
|
});
|
|
66
|
-
let
|
|
69
|
+
let V = x("input"), H = x("listbox"), U = () => void 0, W = h(!1);
|
|
67
70
|
d(() => {
|
|
68
|
-
|
|
69
|
-
}), u(() =>
|
|
70
|
-
let
|
|
71
|
-
name:
|
|
72
|
-
hydrated:
|
|
73
|
-
})),
|
|
74
|
-
let { value: e, ...t } =
|
|
71
|
+
U = O(z, () => V.value, () => H.value), W.value = !0;
|
|
72
|
+
}), u(() => U());
|
|
73
|
+
let G = n(() => j(B.value, R, {
|
|
74
|
+
name: M.name,
|
|
75
|
+
hydrated: W.value
|
|
76
|
+
})), K = n(() => {
|
|
77
|
+
let { value: e, ...t } = G.value.input;
|
|
75
78
|
return t;
|
|
76
79
|
});
|
|
77
|
-
function
|
|
78
|
-
return
|
|
80
|
+
function q(e, t) {
|
|
81
|
+
return M.itemKey ? M.itemKey(e) : z.itemTextOf(e) || t;
|
|
79
82
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
83
|
+
function J(e) {
|
|
84
|
+
z.setTerm(e.target.value);
|
|
82
85
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
86
|
+
function Y(e) {
|
|
87
|
+
z.keydown(e.key, e) && e.preventDefault();
|
|
85
88
|
}
|
|
86
|
-
let
|
|
87
|
-
function
|
|
88
|
-
let { role: e, ...t } =
|
|
89
|
+
let X = v();
|
|
90
|
+
function Z() {
|
|
91
|
+
let { role: e, ...t } = X;
|
|
89
92
|
return t;
|
|
90
93
|
}
|
|
91
|
-
return (e, n) => (f(), i("div", l({ class: "mp-typeahead" },
|
|
94
|
+
return (e, n) => (f(), i("div", l({ class: "mp-typeahead" }, G.value.root), [
|
|
92
95
|
a("input", l({
|
|
93
96
|
ref: "input",
|
|
94
97
|
class: "form-control",
|
|
95
98
|
type: "text"
|
|
96
99
|
}, {
|
|
97
|
-
...
|
|
98
|
-
...
|
|
100
|
+
...K.value,
|
|
101
|
+
...Z()
|
|
99
102
|
}, {
|
|
100
103
|
role: "combobox",
|
|
101
|
-
value: _(
|
|
102
|
-
onInput:
|
|
103
|
-
onKeydown:
|
|
104
|
-
onBlur: n[0] ||= (e) => _(
|
|
105
|
-
}), null, 16,
|
|
104
|
+
value: _(B).term,
|
|
105
|
+
onInput: J,
|
|
106
|
+
onKeydown: Y,
|
|
107
|
+
onBlur: n[0] ||= (e) => _(z).blur()
|
|
108
|
+
}), null, 16, P),
|
|
106
109
|
a("ul", l({
|
|
107
110
|
ref: "listbox",
|
|
108
111
|
class: "dropdown-menu"
|
|
109
|
-
},
|
|
112
|
+
}, G.value.listbox), [G.value.status ? (f(), i("li", l({
|
|
110
113
|
key: 0,
|
|
111
114
|
class: "ta-status"
|
|
112
|
-
},
|
|
113
|
-
key:
|
|
115
|
+
}, G.value.status.attrs), g(G.value.status.text), 17)) : r("", !0), (f(!0), i(t, null, p(_(B).items, (t, r) => (f(), i("li", l({
|
|
116
|
+
key: q(t, r),
|
|
114
117
|
class: "dropdown-item"
|
|
115
|
-
}, { ref_for: !0 },
|
|
118
|
+
}, { ref_for: !0 }, G.value.option(r), {
|
|
116
119
|
onMousedown: n[1] ||= C(() => {}, ["prevent"]),
|
|
117
|
-
onClick: (e) => _(
|
|
120
|
+
onClick: (e) => _(z).pick(r)
|
|
118
121
|
}), [m(e.$slots, "item", {
|
|
119
122
|
item: t,
|
|
120
|
-
term: _(
|
|
121
|
-
}, () => [o(g(_(
|
|
122
|
-
a("span", l({ class: "visually-hidden" },
|
|
123
|
-
|
|
123
|
+
term: _(B).term
|
|
124
|
+
}, () => [o(g(_(z).itemTextOf(t)), 1)])], 16, F))), 128))], 16),
|
|
125
|
+
a("span", l({ class: "visually-hidden" }, G.value.live.attrs), g(G.value.live.text), 17),
|
|
126
|
+
G.value.error ? (f(), i("div", l({
|
|
124
127
|
key: 0,
|
|
125
128
|
class: "ta-error"
|
|
126
|
-
},
|
|
129
|
+
}, G.value.error.attrs), g(G.value.error.text), 17)) : r("", !0)
|
|
127
130
|
], 16));
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
133
|
//#endregion
|
|
131
|
-
export {
|
|
134
|
+
export { I as BsTypeahead, M as inMemoryTypeaheadProvider };
|
|
@@ -7,7 +7,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
7
7
|
readonly onSubmit?: ((value: string) => any) | undefined;
|
|
8
8
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
9
|
readonly onLoadError?: ((error: unknown) => any) | undefined;
|
|
10
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSubmit" | "onSelect" | "
|
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSubmit" | "onSelect" | "onClose" | "onUpdate:modelValue" | "onOpen" | "onLoadError"> & ({
|
|
11
11
|
modelValue?: string;
|
|
12
12
|
} & {
|
|
13
13
|
provider?: TypeaheadProvider<T> | null;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, normalizeClass as c, normalizeProps as l, openBlock as u, renderSlot as d, toDisplayString as f, useAttrs as p, useId as m, useModel as h, useTemplateRef as g, watchEffect as _ } from "vue";
|
|
2
|
-
import { checkboxClasses as v, connectCheckbox as y, effectiveIndeterminate as b } from "@mintplayer/ui-core/checkbox";
|
|
3
|
-
//#region libs/mintplayer-vue-bootstrap/checkbox/src/BsCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var x = ["checked"], S = ["for"], C = ["checked"], w = /* @__PURE__ */ a({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "BsCheckbox",
|
|
7
|
-
props: /*@__PURE__*/ o({
|
|
8
|
-
type: { default: "checkbox" },
|
|
9
|
-
color: { default: "primary" },
|
|
10
|
-
name: { default: null },
|
|
11
|
-
value: { default: null },
|
|
12
|
-
disabled: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: !1
|
|
15
|
-
},
|
|
16
|
-
required: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !1
|
|
19
|
-
},
|
|
20
|
-
invalid: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !1
|
|
23
|
-
},
|
|
24
|
-
errorText: { default: null }
|
|
25
|
-
}, {
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !1
|
|
29
|
-
},
|
|
30
|
-
modelModifiers: {},
|
|
31
|
-
indeterminate: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
},
|
|
35
|
-
indeterminateModifiers: {}
|
|
36
|
-
}),
|
|
37
|
-
emits: ["update:modelValue", "update:indeterminate"],
|
|
38
|
-
setup(a) {
|
|
39
|
-
let o = a, w = h(a, "modelValue"), T = h(a, "indeterminate"), E = `bs-checkbox-${m()}`, D = t(() => ({
|
|
40
|
-
type: o.type,
|
|
41
|
-
checked: w.value,
|
|
42
|
-
indeterminate: b({
|
|
43
|
-
type: o.type,
|
|
44
|
-
indeterminate: T.value
|
|
45
|
-
}),
|
|
46
|
-
disabled: o.disabled,
|
|
47
|
-
required: o.required,
|
|
48
|
-
invalid: o.invalid,
|
|
49
|
-
name: o.name,
|
|
50
|
-
value: o.value,
|
|
51
|
-
errorText: o.errorText
|
|
52
|
-
})), O = t(() => v(o.type, o.color, o.invalid)), k = p();
|
|
53
|
-
function A() {
|
|
54
|
-
let { "aria-describedby": e, role: t, ...n } = k, r = y(D.value, E, e ?? null);
|
|
55
|
-
return {
|
|
56
|
-
...r.input,
|
|
57
|
-
...n,
|
|
58
|
-
role: r.input.role ?? t ?? null
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
let j = t(() => y(D.value, E));
|
|
62
|
-
function M() {
|
|
63
|
-
return String(k.id ?? j.value.input.id);
|
|
64
|
-
}
|
|
65
|
-
let N = g("input");
|
|
66
|
-
_(() => {
|
|
67
|
-
N.value && (N.value.indeterminate = D.value.indeterminate);
|
|
68
|
-
}, { flush: "post" });
|
|
69
|
-
function P(e) {
|
|
70
|
-
w.value = e.target.checked, T.value = !1;
|
|
71
|
-
}
|
|
72
|
-
return (t, a) => (u(), r(e, null, [O.value.root === null ? (u(), r(e, { key: 0 }, [i("input", s({
|
|
73
|
-
ref: "input",
|
|
74
|
-
type: "checkbox",
|
|
75
|
-
class: O.value.input
|
|
76
|
-
}, A(), {
|
|
77
|
-
checked: w.value,
|
|
78
|
-
onChange: P
|
|
79
|
-
}), null, 16, x), i("label", {
|
|
80
|
-
class: c(O.value.label),
|
|
81
|
-
for: M()
|
|
82
|
-
}, [d(t.$slots, "default")], 10, S)], 64)) : (u(), r("label", {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: c(O.value.root)
|
|
85
|
-
}, [i("input", s({
|
|
86
|
-
ref: "input",
|
|
87
|
-
type: "checkbox",
|
|
88
|
-
class: O.value.input
|
|
89
|
-
}, A(), {
|
|
90
|
-
checked: w.value,
|
|
91
|
-
onChange: P
|
|
92
|
-
}), null, 16, C), i("span", { class: c(O.value.label) }, [d(t.$slots, "default")], 2)], 2)), j.value.feedback ? (u(), r("div", l(s({ key: 2 }, j.value.feedback.attrs)), f(j.value.feedback.text), 17)) : n("", !0)], 64));
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
//#endregion
|
|
96
|
-
export { w as t };
|