@mintplayer/vue-bootstrap 3.8.0 → 3.9.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/accordion/index.mjs +66 -0
- package/accordion/src/BsAccordion.vue.d.ts +13 -0
- package/accordion/src/BsAccordionItem.vue.d.ts +23 -0
- package/accordion/src/index.d.ts +3 -0
- package/carousel/index.mjs +62 -0
- package/carousel/src/BsCarousel.vue.d.ts +55 -0
- package/carousel/src/index.d.ts +2 -0
- package/package.json +5 -2
- package/tree-select/src/BsTreeSelect.vue.d.ts +1 -1
- package/vue-bootstrap.css +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as u, computed as i, openBlock as m, createElementBlock as h, Fragment as g, createElementVNode as d, renderSlot as p, mergeProps as v, useSlots as B, cloneVNode as T, createVNode as y } from "vue";
|
|
2
|
+
import "@mintplayer/web-components/accordion";
|
|
3
|
+
const $ = ["slot"], x = ["slot", "is-active", "disabled"], I = /* @__PURE__ */ u({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "BsAccordionItem",
|
|
6
|
+
props: {
|
|
7
|
+
index: {},
|
|
8
|
+
isActive: { type: Boolean },
|
|
9
|
+
disabled: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(r) {
|
|
12
|
+
const s = r, a = i(() => s.index ?? 0), n = i(() => s.isActive ? "" : void 0), c = i(() => s.disabled ? "" : void 0);
|
|
13
|
+
return (o, l) => (m(), h(g, null, [
|
|
14
|
+
d("span", {
|
|
15
|
+
"accordion-header": "",
|
|
16
|
+
slot: `h${a.value}`
|
|
17
|
+
}, [
|
|
18
|
+
p(o.$slots, "header")
|
|
19
|
+
], 8, $),
|
|
20
|
+
d("mp-accordion-tab", v({
|
|
21
|
+
"accordion-tab": "",
|
|
22
|
+
slot: `c${a.value}`,
|
|
23
|
+
"is-active": n.value,
|
|
24
|
+
disabled: c.value
|
|
25
|
+
}, o.$attrs), [
|
|
26
|
+
p(o.$slots, "default")
|
|
27
|
+
], 16, x)
|
|
28
|
+
], 64));
|
|
29
|
+
}
|
|
30
|
+
}), N = ["multi", "highlight-active-tab"], E = /* @__PURE__ */ u({
|
|
31
|
+
inheritAttrs: !1,
|
|
32
|
+
__name: "BsAccordion",
|
|
33
|
+
props: {
|
|
34
|
+
multi: { type: Boolean },
|
|
35
|
+
highlightActiveTab: { type: Boolean }
|
|
36
|
+
},
|
|
37
|
+
emits: ["tabToggle"],
|
|
38
|
+
setup(r, { emit: s }) {
|
|
39
|
+
const a = r, n = s, c = B();
|
|
40
|
+
function o(t) {
|
|
41
|
+
return t.flatMap(
|
|
42
|
+
(e) => e.type === g && Array.isArray(e.children) ? o(e.children) : [e]
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
const l = i(() => {
|
|
46
|
+
let t = 0;
|
|
47
|
+
return o(c.default?.() ?? []).map(
|
|
48
|
+
(e) => e.type === I ? T(e, { index: t++ }) : e
|
|
49
|
+
);
|
|
50
|
+
}), A = () => l.value, b = i(() => a.multi ? "" : void 0), _ = i(() => a.highlightActiveTab ? "" : void 0);
|
|
51
|
+
function f(t) {
|
|
52
|
+
t.target === t.currentTarget && (t.stopPropagation(), n("tabToggle", t.detail));
|
|
53
|
+
}
|
|
54
|
+
return (t, e) => (m(), h("mp-accordion", v(t.$attrs, {
|
|
55
|
+
multi: b.value,
|
|
56
|
+
"highlight-active-tab": _.value,
|
|
57
|
+
onMpAccordionTabToggle: f
|
|
58
|
+
}), [
|
|
59
|
+
y(A)
|
|
60
|
+
], 16, N));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
E as BsAccordion,
|
|
65
|
+
I as BsAccordionItem
|
|
66
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AccordionTabToggleDetail } from '@mintplayer/web-components/accordion';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Allow several tabs to stay open at once (checkbox machine with JS off). */
|
|
4
|
+
multi?: boolean;
|
|
5
|
+
/** Paint the open header with the Bootstrap active background. */
|
|
6
|
+
highlightActiveTab?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
tabToggle: (detail: AccordionTabToggleDetail) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onTabToggle?: ((detail: AccordionTabToggleDetail) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
index?: number;
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
header?(_: {}): any;
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as c, useModel as p, ref as E, onMounted as h, onBeforeUnmount as y, openBlock as d, createElementBlock as u, mergeProps as g, renderSlot as v, createCommentVNode as L, mergeModels as m } from "vue";
|
|
2
|
+
import "@mintplayer/web-components/carousel";
|
|
3
|
+
const B = ["animation", "orientation", "indicators", "interval", "wrap", "keyboard-events", "paused", "aria-label"], b = {
|
|
4
|
+
key: 0,
|
|
5
|
+
slot: "play-pause"
|
|
6
|
+
}, w = /* @__PURE__ */ c({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "BsCarousel",
|
|
9
|
+
props: /* @__PURE__ */ m({
|
|
10
|
+
animation: { default: "slide" },
|
|
11
|
+
orientation: { default: "horizontal" },
|
|
12
|
+
indicators: { type: Boolean },
|
|
13
|
+
interval: {},
|
|
14
|
+
wrap: { type: Boolean, default: !0 },
|
|
15
|
+
keyboardEvents: { type: Boolean, default: !0 },
|
|
16
|
+
ariaLabel: {}
|
|
17
|
+
}, {
|
|
18
|
+
paused: { type: Boolean, default: !1 },
|
|
19
|
+
pausedModifiers: {}
|
|
20
|
+
}),
|
|
21
|
+
emits: /* @__PURE__ */ m(["slideChange", "animationStart", "animationEnd"], ["update:paused"]),
|
|
22
|
+
setup(e, { emit: f }) {
|
|
23
|
+
const i = p(e, "paused"), t = f, a = E(null);
|
|
24
|
+
function o(n) {
|
|
25
|
+
t("slideChange", n.detail);
|
|
26
|
+
}
|
|
27
|
+
function l(n) {
|
|
28
|
+
i.value = n.detail.paused;
|
|
29
|
+
}
|
|
30
|
+
function s() {
|
|
31
|
+
t("animationStart");
|
|
32
|
+
}
|
|
33
|
+
function r() {
|
|
34
|
+
t("animationEnd");
|
|
35
|
+
}
|
|
36
|
+
return h(() => {
|
|
37
|
+
a.value?.addEventListener("slide-change", o), a.value?.addEventListener("paused-change", l), a.value?.addEventListener("animation-start", s), a.value?.addEventListener("animation-end", r);
|
|
38
|
+
}), y(() => {
|
|
39
|
+
a.value?.removeEventListener("slide-change", o), a.value?.removeEventListener("paused-change", l), a.value?.removeEventListener("animation-start", s), a.value?.removeEventListener("animation-end", r);
|
|
40
|
+
}), (n, k) => (d(), u("mp-carousel", g({
|
|
41
|
+
ref_key: "el",
|
|
42
|
+
ref: a
|
|
43
|
+
}, n.$attrs, {
|
|
44
|
+
animation: e.animation,
|
|
45
|
+
orientation: e.orientation,
|
|
46
|
+
indicators: e.indicators ? "" : void 0,
|
|
47
|
+
interval: e.interval && e.interval > 0 ? e.interval : void 0,
|
|
48
|
+
wrap: e.wrap === !1 ? "false" : void 0,
|
|
49
|
+
"keyboard-events": e.keyboardEvents === !1 ? "false" : void 0,
|
|
50
|
+
paused: i.value ? "" : void 0,
|
|
51
|
+
"aria-label": e.ariaLabel
|
|
52
|
+
}), [
|
|
53
|
+
v(n.$slots, "default"),
|
|
54
|
+
n.$slots["play-pause"] ? (d(), u("span", b, [
|
|
55
|
+
v(n.$slots, "play-pause")
|
|
56
|
+
])) : L("", !0)
|
|
57
|
+
], 16, B));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
w as BsCarousel
|
|
62
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CarouselAnimation, CarouselOrientation, CarouselSlideChangeEventDetail } from '@mintplayer/web-components/carousel';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
animation?: CarouselAnimation;
|
|
4
|
+
orientation?: CarouselOrientation;
|
|
5
|
+
/** Show the indicator dots. */
|
|
6
|
+
indicators?: boolean;
|
|
7
|
+
/** Auto-advance interval in ms; omit for no autoplay. */
|
|
8
|
+
interval?: number;
|
|
9
|
+
/** Wrap around at the ends. */
|
|
10
|
+
wrap?: boolean;
|
|
11
|
+
/** Arrow/Home/End navigation on the focused viewport. */
|
|
12
|
+
keyboardEvents?: boolean;
|
|
13
|
+
/** Accessible label for the carousel region. */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = {
|
|
17
|
+
'paused'?: boolean;
|
|
18
|
+
} & __VLS_Props;
|
|
19
|
+
declare function __VLS_template(): {
|
|
20
|
+
attrs: Partial<{}>;
|
|
21
|
+
slots: {
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
'play-pause'?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {
|
|
26
|
+
el: unknown;
|
|
27
|
+
};
|
|
28
|
+
rootEl: any;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
31
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
slideChange: (detail: CarouselSlideChangeEventDetail) => any;
|
|
33
|
+
animationStart: () => any;
|
|
34
|
+
animationEnd: () => any;
|
|
35
|
+
"update:paused": (value: boolean) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
onSlideChange?: ((detail: CarouselSlideChangeEventDetail) => any) | undefined;
|
|
38
|
+
onAnimationStart?: (() => any) | undefined;
|
|
39
|
+
onAnimationEnd?: (() => any) | undefined;
|
|
40
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
orientation: CarouselOrientation;
|
|
43
|
+
wrap: boolean;
|
|
44
|
+
animation: CarouselAnimation;
|
|
45
|
+
keyboardEvents: boolean;
|
|
46
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
47
|
+
el: unknown;
|
|
48
|
+
}, any>;
|
|
49
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/vue-bootstrap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Vue 3.5 SFC adapters around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed Vue components with v-model support for input WCs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"email": "info@mintplayer.com"
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
|
-
"sideEffects": [
|
|
17
|
+
"sideEffects": [
|
|
18
|
+
"**/src/index.{ts,js,mjs}",
|
|
19
|
+
"**/Bs*.vue"
|
|
20
|
+
],
|
|
18
21
|
"main": "./index.mjs",
|
|
19
22
|
"types": "./src/index.d.ts",
|
|
20
23
|
"exports": {
|
|
@@ -19,9 +19,9 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
19
19
|
"onUpdate:modelValue"?: ((value: TreeNode | TreeNode[] | null) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
disabled: boolean;
|
|
22
|
+
mode: TreeSelectMode;
|
|
22
23
|
placeholder: string;
|
|
23
24
|
showClear: boolean;
|
|
24
|
-
mode: TreeSelectMode;
|
|
25
25
|
variant: TreeSelectVariant;
|
|
26
26
|
cascadeSelect: boolean;
|
|
27
27
|
panelScrollHeight: string;
|
package/vue-bootstrap.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}
|
|
1
|
+
.dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}
|