@mintplayer/vue-bootstrap 3.24.0 → 3.26.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.
Files changed (52) hide show
  1. package/accordion/index.mjs +54 -64
  2. package/calendar/index.mjs +27 -28
  3. package/card/index.mjs +104 -145
  4. package/carousel/index.mjs +74 -58
  5. package/charts/hierarchy/index.mjs +44 -43
  6. package/charts/sparkline/index.mjs +25 -24
  7. package/charts/trend/index.mjs +25 -24
  8. package/checkbox/index.mjs +27 -28
  9. package/chunks/useMachine-DLZ7g_H3.mjs +14 -0
  10. package/code-snippet/index.mjs +34 -32
  11. package/datatable/index.mjs +84 -70
  12. package/datepicker/index.mjs +27 -28
  13. package/datetime-picker/index.mjs +27 -28
  14. package/dock/index.mjs +27 -28
  15. package/dropdown-menu/index.mjs +63 -69
  16. package/dropdown-menu/src/BsDropdownItem.vue.d.ts +1 -1
  17. package/dropdown-menu/src/BsDropdownMenu.vue.d.ts +2 -6
  18. package/dropdown-menu/src/index.d.ts +1 -1
  19. package/file-manager/index.mjs +18 -19
  20. package/index.mjs +0 -1
  21. package/input-group/index.mjs +11 -12
  22. package/machine/index.mjs +1 -0
  23. package/machine/src/index.d.ts +1 -0
  24. package/machine/src/useMachine.d.ts +13 -0
  25. package/machine/src/useMachine.spec.d.ts +1 -0
  26. package/multi-range/index.mjs +27 -26
  27. package/navbar/index.mjs +77 -80
  28. package/otp-input/index.mjs +27 -26
  29. package/package.json +11 -2
  30. package/pagination/index.mjs +27 -26
  31. package/phone-input/index.mjs +35 -34
  32. package/query-builder/index.mjs +45 -41
  33. package/radio/index.mjs +27 -28
  34. package/radio-group/index.mjs +27 -28
  35. package/ribbon/index.mjs +28 -47
  36. package/scheduler/index.mjs +45 -42
  37. package/select/index.mjs +33 -34
  38. package/shell/index.mjs +37 -33
  39. package/signature-pad/index.mjs +26 -25
  40. package/splitter/index.mjs +12 -14
  41. package/tab-control/index.mjs +28 -31
  42. package/theming/index.mjs +37 -55
  43. package/tile-manager/index.mjs +18 -21
  44. package/timeline/index.mjs +151 -146
  45. package/timepicker/index.mjs +49 -53
  46. package/toggle-button/index.mjs +27 -28
  47. package/tree-select/index.mjs +105 -97
  48. package/treeview/index.mjs +56 -55
  49. package/typeahead/index.mjs +119 -0
  50. package/typeahead/src/BsTypeahead.vue.d.ts +46 -0
  51. package/typeahead/src/index.d.ts +3 -0
  52. package/vue-bootstrap.css +2 -1
@@ -1,147 +1,152 @@
1
- import { resolveSides as x } from "@mintplayer/web-components/timeline";
2
- import { MpTimeline as _, MpTimelineItem as ee } from "@mintplayer/web-components/timeline";
3
- import { defineComponent as L, useSlots as M, ref as w, computed as F, onMounted as A, onBeforeUnmount as D, watch as b, onUpdated as U, openBlock as a, createElementBlock as d, mergeProps as N, Fragment as O, renderList as P, renderSlot as m, createCommentVNode as u } from "vue";
4
- const V = ["orientation", "align", "reverse", "selectable"], j = ["item-id", "title", "description", "time", "icon", "color", "item-class", "disabled"], q = {
5
- key: 0,
6
- slot: "marker"
7
- }, z = {
8
- key: 1,
9
- slot: "title"
10
- }, G = {
11
- key: 2,
12
- slot: "opposite"
13
- }, H = {
14
- key: 3,
15
- slot: "opposite"
16
- }, J = {
17
- key: 4,
18
- slot: "content"
19
- }, W = /* @__PURE__ */ L({
20
- inheritAttrs: !1,
21
- __name: "BsTimeline",
22
- props: {
23
- items: {},
24
- orientation: { default: "vertical" },
25
- align: { default: "start" },
26
- reverse: { type: Boolean, default: !1 },
27
- selectable: { default: "none" },
28
- selection: {}
29
- },
30
- emits: ["item-click", "update:selection"],
31
- setup(s, { emit: p }) {
32
- const i = s, f = p, l = M(), S = () => !!(l.marker || l.title || l.timestamp || l.opposite || l.content), y = () => S() && !!i.items?.length, c = w(null), B = (t, o) => t.id ?? o, C = F(() => x(i.items?.length ?? 0, i.align, i.reverse)), v = (t, o) => {
33
- const e = i.items?.length ?? 0, n = i.reverse ? e - 1 - o : o;
34
- return {
35
- index: o,
36
- visualIndex: n,
37
- isFirst: n === 0,
38
- isLast: n === e - 1,
39
- orientation: i.orientation,
40
- side: C.value[o] ?? "start"
41
- };
42
- }, T = (t) => t.time instanceof Date ? t.time.toLocaleDateString() : t.time, I = (t) => f("item-click", t.detail), $ = (t) => {
43
- const o = t.detail, e = i.items;
44
- if (e && e.length) {
45
- const n = c.value?.selectedIds ?? o.selected.map((r, g) => r.id ?? g), E = new Map(e.map((r, g) => [B(r, g), r]));
46
- f(
47
- "update:selection",
48
- n.map((r) => E.get(r)).filter((r) => r !== void 0)
49
- );
50
- } else
51
- f("update:selection", o.selected);
52
- }, h = () => {
53
- c.value && (c.value.items = !y() && i.items ? i.items : []);
54
- }, k = () => {
55
- !c.value || i.selectable === "none" || (c.value.selectedIds = (i.selection ?? []).map((t, o) => B(t, o)));
56
- };
57
- return A(() => {
58
- c.value?.addEventListener("item-click", I), c.value?.addEventListener("selection-change", $), h(), k();
59
- }), D(() => {
60
- c.value?.removeEventListener("item-click", I), c.value?.removeEventListener("selection-change", $);
61
- }), b(() => i.items, h), U(h), b(() => i.selection, k, { deep: !0 }), b(() => i.selectable, k), (t, o) => (a(), d("mp-timeline", N({
62
- ref_key: "el",
63
- ref: c,
64
- orientation: s.orientation,
65
- align: s.align,
66
- reverse: s.reverse,
67
- selectable: s.selectable
68
- }, t.$attrs), [
69
- y() ? (a(!0), d(O, { key: 0 }, P(s.items ?? [], (e, n) => (a(), d("mp-timeline-item", {
70
- key: e.id ?? n,
71
- "item-id": e.id ?? void 0,
72
- title: e.title ?? void 0,
73
- description: e.description ?? void 0,
74
- time: T(e) ?? void 0,
75
- icon: e.icon ?? void 0,
76
- color: e.color ?? void 0,
77
- "item-class": e.cssClass ?? void 0,
78
- disabled: !!e.disabled
79
- }, [
80
- l.marker ? (a(), d("span", q, [
81
- m(t.$slots, "marker", {
82
- item: e,
83
- ctx: v(e, n)
84
- })
85
- ])) : u("", !0),
86
- l.title ? (a(), d("span", z, [
87
- m(t.$slots, "title", {
88
- item: e,
89
- ctx: v(e, n)
90
- })
91
- ])) : u("", !0),
92
- l.timestamp ? (a(), d("span", G, [
93
- m(t.$slots, "timestamp", {
94
- item: e,
95
- ctx: v(e, n)
96
- })
97
- ])) : u("", !0),
98
- l.opposite ? (a(), d("span", H, [
99
- m(t.$slots, "opposite", {
100
- item: e,
101
- ctx: v(e, n)
102
- })
103
- ])) : u("", !0),
104
- l.content ? (a(), d("div", J, [
105
- m(t.$slots, "content", {
106
- item: e,
107
- ctx: v(e, n)
108
- })
109
- ])) : u("", !0)
110
- ], 8, j))), 128)) : m(t.$slots, "default", {}, void 0, void 0, 1)
111
- ], 16, V));
112
- }
113
- }), K = ["item-id", "title", "description", "time", "icon", "color", "item-class", "disabled", "selected"], X = /* @__PURE__ */ L({
114
- __name: "BsTimelineItem",
115
- props: {
116
- itemId: {},
117
- title: {},
118
- description: {},
119
- time: {},
120
- icon: {},
121
- color: {},
122
- cssClass: {},
123
- disabled: { type: Boolean },
124
- selected: { type: Boolean }
125
- },
126
- setup(s) {
127
- return (p, i) => (a(), d("mp-timeline-item", {
128
- "item-id": s.itemId ?? void 0,
129
- title: s.title ?? void 0,
130
- description: s.description ?? void 0,
131
- time: s.time ?? void 0,
132
- icon: s.icon ?? void 0,
133
- color: s.color ?? void 0,
134
- "item-class": s.cssClass ?? void 0,
135
- disabled: !!s.disabled,
136
- selected: !!s.selected
137
- }, [
138
- m(p.$slots, "default")
139
- ], 8, K));
140
- }
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, mergeProps as a, onBeforeUnmount as o, onMounted as s, onUpdated as c, openBlock as l, ref as u, renderList as d, renderSlot as f, useSlots as p, watch as m } from "vue";
2
+ import { MpTimeline as h, MpTimelineItem as g, resolveSides as _ } from "@mintplayer/web-components/timeline";
3
+ //#region libs/mintplayer-vue-bootstrap/timeline/src/BsTimeline.vue?vue&type=script&setup=true&lang.ts
4
+ var v = [
5
+ "orientation",
6
+ "align",
7
+ "reverse",
8
+ "selectable"
9
+ ], y = [
10
+ "item-id",
11
+ "title",
12
+ "description",
13
+ "time",
14
+ "icon",
15
+ "color",
16
+ "item-class",
17
+ "disabled"
18
+ ], b = {
19
+ key: 0,
20
+ slot: "marker"
21
+ }, x = {
22
+ key: 1,
23
+ slot: "title"
24
+ }, S = {
25
+ key: 2,
26
+ slot: "opposite"
27
+ }, C = {
28
+ key: 3,
29
+ slot: "opposite"
30
+ }, w = {
31
+ key: 4,
32
+ slot: "content"
33
+ }, T = /* @__PURE__ */ i({
34
+ inheritAttrs: !1,
35
+ __name: "BsTimeline",
36
+ props: {
37
+ items: {},
38
+ orientation: { default: "vertical" },
39
+ align: { default: "start" },
40
+ reverse: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ selectable: { default: "none" },
45
+ selection: {}
46
+ },
47
+ emits: ["item-click", "update:selection"],
48
+ setup(i, { emit: h }) {
49
+ let g = i, T = h, E = p(), D = () => !!(E.marker || E.title || E.timestamp || E.opposite || E.content), O = () => D() && !!g.items?.length, k = u(null), A = (e, t) => e.id ?? t, j = t(() => _(g.items?.length ?? 0, g.align, g.reverse)), M = (e, t) => {
50
+ let n = g.items?.length ?? 0, r = g.reverse ? n - 1 - t : t;
51
+ return {
52
+ index: t,
53
+ visualIndex: r,
54
+ isFirst: r === 0,
55
+ isLast: r === n - 1,
56
+ orientation: g.orientation,
57
+ side: j.value[t] ?? "start"
58
+ };
59
+ }, N = (e) => e.time instanceof Date ? e.time.toLocaleDateString() : e.time, P = (e) => T("item-click", e.detail), F = (e) => {
60
+ let t = e.detail, n = g.items;
61
+ if (n && n.length) {
62
+ let e = k.value?.selectedIds ?? t.selected.map((e, t) => e.id ?? t), r = new Map(n.map((e, t) => [A(e, t), e]));
63
+ T("update:selection", e.map((e) => r.get(e)).filter((e) => e !== void 0));
64
+ } else T("update:selection", t.selected);
65
+ }, I = () => {
66
+ k.value && (k.value.items = !O() && g.items ? g.items : []);
67
+ }, L = () => {
68
+ k.value && g.selectable !== "none" && (k.value.selectedIds = (g.selection ?? []).map((e, t) => A(e, t)));
69
+ };
70
+ return s(() => {
71
+ k.value?.addEventListener("item-click", P), k.value?.addEventListener("selection-change", F), I(), L();
72
+ }), o(() => {
73
+ k.value?.removeEventListener("item-click", P), k.value?.removeEventListener("selection-change", F);
74
+ }), m(() => g.items, I), c(I), m(() => g.selection, L, { deep: !0 }), m(() => g.selectable, L), (t, o) => (l(), r("mp-timeline", a({
75
+ ref_key: "el",
76
+ ref: k,
77
+ orientation: i.orientation,
78
+ align: i.align,
79
+ reverse: i.reverse,
80
+ selectable: i.selectable
81
+ }, t.$attrs), [O() ? (l(!0), r(e, { key: 0 }, d(i.items ?? [], (e, i) => (l(), r("mp-timeline-item", {
82
+ key: e.id ?? i,
83
+ "item-id": e.id ?? void 0,
84
+ title: e.title ?? void 0,
85
+ description: e.description ?? void 0,
86
+ time: N(e) ?? void 0,
87
+ icon: e.icon ?? void 0,
88
+ color: e.color ?? void 0,
89
+ "item-class": e.cssClass ?? void 0,
90
+ disabled: !!e.disabled
91
+ }, [
92
+ E.marker ? (l(), r("span", b, [f(t.$slots, "marker", {
93
+ item: e,
94
+ ctx: M(e, i)
95
+ })])) : n("", !0),
96
+ E.title ? (l(), r("span", x, [f(t.$slots, "title", {
97
+ item: e,
98
+ ctx: M(e, i)
99
+ })])) : n("", !0),
100
+ E.timestamp ? (l(), r("span", S, [f(t.$slots, "timestamp", {
101
+ item: e,
102
+ ctx: M(e, i)
103
+ })])) : n("", !0),
104
+ E.opposite ? (l(), r("span", C, [f(t.$slots, "opposite", {
105
+ item: e,
106
+ ctx: M(e, i)
107
+ })])) : n("", !0),
108
+ E.content ? (l(), r("div", w, [f(t.$slots, "content", {
109
+ item: e,
110
+ ctx: M(e, i)
111
+ })])) : n("", !0)
112
+ ], 8, y))), 128)) : f(t.$slots, "default", {}, void 0, void 0, 1)], 16, v));
113
+ }
114
+ }), E = [
115
+ "item-id",
116
+ "title",
117
+ "description",
118
+ "time",
119
+ "icon",
120
+ "color",
121
+ "item-class",
122
+ "disabled",
123
+ "selected"
124
+ ], D = /* @__PURE__ */ i({
125
+ __name: "BsTimelineItem",
126
+ props: {
127
+ itemId: {},
128
+ title: {},
129
+ description: {},
130
+ time: {},
131
+ icon: {},
132
+ color: {},
133
+ cssClass: {},
134
+ disabled: { type: Boolean },
135
+ selected: { type: Boolean }
136
+ },
137
+ setup(e) {
138
+ return (t, n) => (l(), r("mp-timeline-item", {
139
+ "item-id": e.itemId ?? void 0,
140
+ title: e.title ?? void 0,
141
+ description: e.description ?? void 0,
142
+ time: e.time ?? void 0,
143
+ icon: e.icon ?? void 0,
144
+ color: e.color ?? void 0,
145
+ "item-class": e.cssClass ?? void 0,
146
+ disabled: !!e.disabled,
147
+ selected: !!e.selected
148
+ }, [f(t.$slots, "default")], 8, E));
149
+ }
141
150
  });
142
- export {
143
- W as BsTimeline,
144
- X as BsTimelineItem,
145
- _ as MpTimeline,
146
- ee as MpTimelineItem
147
- };
151
+ //#endregion
152
+ export { T as BsTimeline, D as BsTimelineItem, h as MpTimeline, g as MpTimelineItem };
@@ -1,55 +1,51 @@
1
- import { defineComponent as i, useModel as u, ref as r, onMounted as m, watch as c, openBlock as d, createElementBlock as f, mergeProps as p, renderSlot as T } from "vue";
1
+ import { createElementBlock as e, defineComponent as t, mergeProps as n, onMounted as r, openBlock as i, ref as a, renderSlot as o, useModel as s, watch as c } from "vue";
2
2
  import "@mintplayer/web-components/timepicker";
3
- const V = /* @__PURE__ */ i({
4
- inheritAttrs: !1,
5
- __name: "BsTimepicker",
6
- props: {
7
- modelValue: {},
8
- modelModifiers: {}
9
- },
10
- emits: ["update:modelValue"],
11
- setup(s) {
12
- const l = u(s, "modelValue"), t = r(null), o = (e) => {
13
- t.value && (t.value.selectedTime = e ?? null);
14
- };
15
- m(() => o(l.value)), c(l, o);
16
- function a(e) {
17
- const n = e.detail;
18
- l.value = n instanceof Date ? n : null;
19
- }
20
- return (e, n) => (d(), f("mp-timepicker", p({
21
- ref_key: "el",
22
- ref: t
23
- }, e.$attrs, { onSelectedTimeChange: a }), [
24
- T(e.$slots, "default")
25
- ], 16));
26
- }
27
- }), h = /* @__PURE__ */ i({
28
- inheritAttrs: !1,
29
- __name: "BsTimeList",
30
- props: {
31
- modelValue: {},
32
- modelModifiers: {}
33
- },
34
- emits: ["update:modelValue"],
35
- setup(s) {
36
- const l = u(s, "modelValue"), t = r(null), o = (e) => {
37
- t.value && (t.value.selectedTime = e ?? null);
38
- };
39
- m(() => o(l.value)), c(l, o);
40
- function a(e) {
41
- const n = e.detail;
42
- l.value = n instanceof Date ? n : null;
43
- }
44
- return (e, n) => (d(), f("mp-time-list", p({
45
- ref_key: "el",
46
- ref: t
47
- }, e.$attrs, { onSelectedTimeChange: a }), [
48
- T(e.$slots, "default")
49
- ], 16));
50
- }
3
+ //#endregion
4
+ //#region libs/mintplayer-vue-bootstrap/timepicker/src/BsTimepicker.vue
5
+ var l = /* @__PURE__ */ t({
6
+ inheritAttrs: !1,
7
+ __name: "BsTimepicker",
8
+ props: {
9
+ modelValue: {},
10
+ modelModifiers: {}
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(t) {
14
+ let l = s(t, "modelValue"), u = a(null), d = (e) => {
15
+ u.value && (u.value.selectedTime = e ?? null);
16
+ };
17
+ r(() => d(l.value)), c(l, d);
18
+ function f(e) {
19
+ let t = e.detail;
20
+ l.value = t instanceof Date ? t : null;
21
+ }
22
+ return (t, r) => (i(), e("mp-timepicker", n({
23
+ ref_key: "el",
24
+ ref: u
25
+ }, t.$attrs, { onSelectedTimeChange: f }), [o(t.$slots, "default")], 16));
26
+ }
27
+ }), u = /* @__PURE__ */ t({
28
+ inheritAttrs: !1,
29
+ __name: "BsTimeList",
30
+ props: {
31
+ modelValue: {},
32
+ modelModifiers: {}
33
+ },
34
+ emits: ["update:modelValue"],
35
+ setup(t) {
36
+ let l = s(t, "modelValue"), u = a(null), d = (e) => {
37
+ u.value && (u.value.selectedTime = e ?? null);
38
+ };
39
+ r(() => d(l.value)), c(l, d);
40
+ function f(e) {
41
+ let t = e.detail;
42
+ l.value = t instanceof Date ? t : null;
43
+ }
44
+ return (t, r) => (i(), e("mp-time-list", n({
45
+ ref_key: "el",
46
+ ref: u
47
+ }, t.$attrs, { onSelectedTimeChange: f }), [o(t.$slots, "default")], 16));
48
+ }
51
49
  });
52
- export {
53
- h as BsTimeList,
54
- V as BsTimepicker
55
- };
50
+ //#endregion
51
+ export { u as BsTimeList, l as BsTimepicker };
@@ -1,30 +1,29 @@
1
- import { defineComponent as s, useModel as u, ref as c, onMounted as d, watch as m, openBlock as i, createElementBlock as p, mergeProps as f, renderSlot as g } from "vue";
1
+ import { createElementBlock as e, defineComponent as t, mergeProps as n, onMounted as r, openBlock as i, ref as a, renderSlot as o, useModel as s, watch as c } from "vue";
2
2
  import "@mintplayer/web-components/toggle-button";
3
- const k = /* @__PURE__ */ s({
4
- inheritAttrs: !1,
5
- __name: "BsToggleButton",
6
- props: {
7
- modelValue: { type: Boolean },
8
- modelModifiers: {}
9
- },
10
- emits: ["update:modelValue"],
11
- setup(a) {
12
- const o = u(a, "modelValue"), t = c(null), l = (e) => {
13
- t.value && (t.value.checked = !!e);
14
- };
15
- d(() => l(o.value)), m(o, l);
16
- function r(e) {
17
- const n = e.detail;
18
- o.value = n.checked;
19
- }
20
- return (e, n) => (i(), p("mp-toggle-button", f({
21
- ref_key: "el",
22
- ref: t
23
- }, e.$attrs, { onChange: r }), [
24
- g(e.$slots, "default")
25
- ], 16));
26
- }
3
+ //#endregion
4
+ //#region libs/mintplayer-vue-bootstrap/toggle-button/src/BsToggleButton.vue
5
+ var l = /* @__PURE__ */ t({
6
+ inheritAttrs: !1,
7
+ __name: "BsToggleButton",
8
+ props: {
9
+ modelValue: { type: Boolean },
10
+ modelModifiers: {}
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(t) {
14
+ let l = s(t, "modelValue"), u = a(null), d = (e) => {
15
+ u.value && (u.value.checked = !!e);
16
+ };
17
+ r(() => d(l.value)), c(l, d);
18
+ function f(e) {
19
+ let t = e.detail;
20
+ l.value = t.checked;
21
+ }
22
+ return (t, r) => (i(), e("mp-toggle-button", n({
23
+ ref_key: "el",
24
+ ref: u
25
+ }, t.$attrs, { onChange: f }), [o(t.$slots, "default")], 16));
26
+ }
27
27
  });
28
- export {
29
- k as BsToggleButton
30
- };
28
+ //#endregion
29
+ export { l as BsToggleButton };