@mintplayer/react-bootstrap 19.22.0 → 19.24.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 (50) hide show
  1. package/accordion/index.mjs +38 -58
  2. package/calendar/index.mjs +9 -9
  3. package/card/index.mjs +102 -67
  4. package/card/src/BsCardBody.d.ts +2 -2
  5. package/card/src/BsCardFooter.d.ts +2 -2
  6. package/card/src/BsCardGroup.d.ts +4 -3
  7. package/card/src/BsCardHeader.d.ts +2 -2
  8. package/card/src/BsCardImg.d.ts +1 -1
  9. package/card/src/BsCardLink.d.ts +2 -2
  10. package/card/src/BsCardSubtitle.d.ts +2 -2
  11. package/card/src/BsCardText.d.ts +2 -2
  12. package/card/src/BsCardTitle.d.ts +2 -2
  13. package/carousel/index.mjs +27 -30
  14. package/charts/hierarchy/index.mjs +16 -16
  15. package/charts/sparkline/index.mjs +9 -9
  16. package/charts/trend/index.mjs +12 -12
  17. package/checkbox/index.mjs +10 -12
  18. package/code-snippet/index.mjs +12 -12
  19. package/datatable/index.mjs +35 -34
  20. package/datepicker/index.mjs +13 -13
  21. package/datetime-picker/index.mjs +13 -13
  22. package/dock/index.mjs +10 -12
  23. package/dropdown-menu/index.mjs +53 -46
  24. package/file-manager/index.mjs +17 -17
  25. package/index.mjs +0 -1
  26. package/input-group/index.mjs +11 -11
  27. package/multi-range/index.mjs +12 -12
  28. package/navbar/index.mjs +37 -48
  29. package/otp-input/index.mjs +12 -12
  30. package/package.json +2 -2
  31. package/pagination/index.mjs +11 -13
  32. package/phone-input/index.mjs +13 -13
  33. package/query-builder/index.mjs +18 -18
  34. package/radio/index.mjs +10 -12
  35. package/radio-group/index.mjs +11 -13
  36. package/react-bootstrap.css +2 -1
  37. package/ribbon/index.mjs +90 -129
  38. package/scheduler/index.mjs +21 -27
  39. package/select/index.mjs +9 -11
  40. package/shell/index.mjs +18 -23
  41. package/signature-pad/index.mjs +9 -11
  42. package/splitter/index.mjs +13 -13
  43. package/tab-control/index.mjs +15 -18
  44. package/theming/index.mjs +39 -46
  45. package/tile-manager/index.mjs +13 -13
  46. package/timeline/index.mjs +82 -97
  47. package/timepicker/index.mjs +14 -19
  48. package/toggle-button/index.mjs +11 -13
  49. package/tree-select/index.mjs +17 -19
  50. package/treeview/index.mjs +14 -14
@@ -1,98 +1,83 @@
1
- import { jsx as l, jsxs as y } from "react/jsx-runtime";
2
- import * as x from "react";
3
- import { createComponent as M } from "@lit/react";
4
- import { MpTimelineItem as F, MpTimeline as R, resolveSides as q } from "@mintplayer/web-components/timeline";
5
- const z = M({
6
- react: x,
7
- tagName: "mp-timeline-item",
8
- elementClass: F
9
- }), A = M({
10
- react: x,
11
- tagName: "mp-timeline",
12
- elementClass: R,
13
- events: {
14
- onItemClick: "item-click",
15
- onSelectionChange: "selection-change"
16
- }
17
- }), v = (c, n) => c.id ?? n;
18
- function J(c) {
19
- const {
20
- items: n,
21
- orientation: g = "vertical",
22
- align: C = "start",
23
- reverse: a = !1,
24
- selectable: I = "none",
25
- selection: f,
26
- onSelectionChange: S,
27
- onItemClick: u,
28
- renderMarker: r,
29
- renderTitle: d,
30
- renderTimestamp: m,
31
- renderOpposite: p,
32
- renderContent: h,
33
- className: b,
34
- children: B,
35
- // Everything else is the consumer's — role, id, tabIndex, data-*, aria-*.
36
- // Without this the wrapper silently swallowed them.
37
- ...N
38
- } = c, T = !!(r || d || m || p || h), k = !!n && !T, j = T && !!n, w = (e) => u?.(e.detail), D = (e) => {
39
- const t = e.detail;
40
- if (n && n.length) {
41
- const o = new Map(n.map((s, i) => [String(v(s, i)), s]));
42
- S?.(
43
- t.selected.map((s) => o.get(String(s.id ?? "")) ?? s)
44
- );
45
- } else
46
- S?.(t.selected);
47
- }, L = q(n?.length ?? 0, C, a);
48
- return /* @__PURE__ */ l(
49
- A,
50
- {
51
- orientation: g,
52
- align: C,
53
- reverse: a,
54
- selectable: I,
55
- className: b,
56
- onItemClick: w,
57
- onSelectionChange: D,
58
- ...N,
59
- ...k ? { items: n } : {},
60
- ...I !== "none" ? { selectedIds: f ? f.map((e, t) => v(e, t)) : [] } : {},
61
- children: j && n ? n.map((e, t) => {
62
- const o = n.length, s = a ? o - 1 - t : t, i = {
63
- index: t,
64
- visualIndex: s,
65
- isFirst: s === 0,
66
- isLast: s === o - 1,
67
- orientation: g,
68
- side: L[t] ?? "start"
69
- }, O = e.time instanceof Date ? e.time.toLocaleDateString() : e.time;
70
- return /* @__PURE__ */ y(
71
- z,
72
- {
73
- itemId: e.id,
74
- title: e.title,
75
- description: e.description,
76
- time: O ?? void 0,
77
- icon: e.icon,
78
- color: e.color,
79
- itemClass: e.cssClass,
80
- disabled: e.disabled,
81
- children: [
82
- r && /* @__PURE__ */ l("span", { slot: "marker", children: r(e, i) }),
83
- d && /* @__PURE__ */ l("span", { slot: "title", children: d(e, i) }),
84
- m && /* @__PURE__ */ l("span", { slot: "opposite", children: m(e, i) }),
85
- p && /* @__PURE__ */ l("span", { slot: "opposite", children: p(e, i) }),
86
- h && /* @__PURE__ */ l("div", { slot: "content", children: h(e, i) })
87
- ]
88
- },
89
- e.id ?? t
90
- );
91
- }) : k ? null : B
92
- }
93
- );
1
+ import * as e from "react";
2
+ import { createComponent as t } from "@lit/react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { MpTimeline as i, MpTimelineItem as a, resolveSides as o } from "@mintplayer/web-components/timeline";
5
+ //#region libs/mintplayer-react-bootstrap/timeline/src/BsTimelineItem.tsx
6
+ var s = t({
7
+ react: e,
8
+ tagName: "mp-timeline-item",
9
+ elementClass: a
10
+ }), c = t({
11
+ react: e,
12
+ tagName: "mp-timeline",
13
+ elementClass: i,
14
+ events: {
15
+ onItemClick: "item-click",
16
+ onSelectionChange: "selection-change"
17
+ }
18
+ }), l = (e, t) => e.id ?? t;
19
+ function u(e) {
20
+ let { items: t, orientation: i = "vertical", align: a = "start", reverse: u = !1, selectable: d = "none", selection: f, onSelectionChange: p, onItemClick: m, renderMarker: h, renderTitle: g, renderTimestamp: _, renderOpposite: v, renderContent: y, className: b, children: x, ...S } = e, C = !!(h || g || _ || v || y), w = !!t && !C, T = C && !!t, E = (e) => m?.(e.detail), D = (e) => {
21
+ let n = e.detail;
22
+ if (t && t.length) {
23
+ let e = new Map(t.map((e, t) => [String(l(e, t)), e]));
24
+ p?.(n.selected.map((t) => e.get(String(t.id ?? "")) ?? t));
25
+ } else p?.(n.selected);
26
+ }, O = o(t?.length ?? 0, a, u);
27
+ return /* @__PURE__ */ n(c, {
28
+ orientation: i,
29
+ align: a,
30
+ reverse: u,
31
+ selectable: d,
32
+ className: b,
33
+ onItemClick: E,
34
+ onSelectionChange: D,
35
+ ...S,
36
+ ...w ? { items: t } : {},
37
+ ...d === "none" ? {} : { selectedIds: f ? f.map((e, t) => l(e, t)) : [] },
38
+ children: T && t ? t.map((e, a) => {
39
+ let o = t.length, c = u ? o - 1 - a : a, l = {
40
+ index: a,
41
+ visualIndex: c,
42
+ isFirst: c === 0,
43
+ isLast: c === o - 1,
44
+ orientation: i,
45
+ side: O[a] ?? "start"
46
+ }, d = e.time instanceof Date ? e.time.toLocaleDateString() : e.time;
47
+ return /* @__PURE__ */ r(s, {
48
+ itemId: e.id,
49
+ title: e.title,
50
+ description: e.description,
51
+ time: d ?? void 0,
52
+ icon: e.icon,
53
+ color: e.color,
54
+ itemClass: e.cssClass,
55
+ disabled: e.disabled,
56
+ children: [
57
+ h && /* @__PURE__ */ n("span", {
58
+ slot: "marker",
59
+ children: h(e, l)
60
+ }),
61
+ g && /* @__PURE__ */ n("span", {
62
+ slot: "title",
63
+ children: g(e, l)
64
+ }),
65
+ _ && /* @__PURE__ */ n("span", {
66
+ slot: "opposite",
67
+ children: _(e, l)
68
+ }),
69
+ v && /* @__PURE__ */ n("span", {
70
+ slot: "opposite",
71
+ children: v(e, l)
72
+ }),
73
+ y && /* @__PURE__ */ n("div", {
74
+ slot: "content",
75
+ children: y(e, l)
76
+ })
77
+ ]
78
+ }, e.id ?? a);
79
+ }) : w ? null : x
80
+ });
94
81
  }
95
- export {
96
- J as BsTimeline,
97
- z as BsTimelineItem
98
- };
82
+ //#endregion
83
+ export { u as BsTimeline, s as BsTimelineItem };
@@ -1,22 +1,17 @@
1
1
  import * as e from "react";
2
2
  import { createComponent as t } from "@lit/react";
3
- import { MpTimepickerElement as m, MpTimeListElement as i } from "@mintplayer/web-components/timepicker";
4
- const a = t({
5
- react: e,
6
- tagName: "mp-timepicker",
7
- elementClass: m,
8
- events: {
9
- onSelectedTimeChange: "selected-time-change"
10
- }
11
- }), c = t({
12
- react: e,
13
- tagName: "mp-time-list",
14
- elementClass: i,
15
- events: {
16
- onSelectedTimeChange: "selected-time-change"
17
- }
3
+ import { MpTimeListElement as n, MpTimepickerElement as r } from "@mintplayer/web-components/timepicker";
4
+ //#region libs/mintplayer-react-bootstrap/timepicker/src/BsTimepicker.tsx
5
+ var i = t({
6
+ react: e,
7
+ tagName: "mp-timepicker",
8
+ elementClass: r,
9
+ events: { onSelectedTimeChange: "selected-time-change" }
10
+ }), a = t({
11
+ react: e,
12
+ tagName: "mp-time-list",
13
+ elementClass: n,
14
+ events: { onSelectedTimeChange: "selected-time-change" }
18
15
  });
19
- export {
20
- c as BsTimeList,
21
- a as BsTimepicker
22
- };
16
+ //#endregion
17
+ export { a as BsTimeList, i as BsTimepicker };
@@ -1,14 +1,12 @@
1
- import * as t from "react";
2
- import { createComponent as e } from "@lit/react";
3
- import { MpToggleButton as o } from "@mintplayer/web-components/toggle-button";
4
- const a = e({
5
- react: t,
6
- tagName: "mp-toggle-button",
7
- elementClass: o,
8
- events: {
9
- onChange: "change"
10
- }
1
+ import * as e from "react";
2
+ import { createComponent as t } from "@lit/react";
3
+ import { MpToggleButton as n } from "@mintplayer/web-components/toggle-button";
4
+ //#region libs/mintplayer-react-bootstrap/toggle-button/src/BsToggleButton.tsx
5
+ var r = t({
6
+ react: e,
7
+ tagName: "mp-toggle-button",
8
+ elementClass: n,
9
+ events: { onChange: "change" }
11
10
  });
12
- export {
13
- a as BsToggleButton
14
- };
11
+ //#endregion
12
+ export { r as BsToggleButton };
@@ -1,21 +1,19 @@
1
1
  import * as e from "react";
2
- import { createComponent as r } from "@lit/react";
3
- import { MpTreeSelect as o } from "@mintplayer/web-components/tree-select";
4
- import { InMemoryTreeSelectProvider as m } from "@mintplayer/web-components/tree-select";
5
- const n = r({
6
- react: e,
7
- tagName: "mp-tree-select",
8
- elementClass: o,
9
- events: {
10
- onValueChange: "value-change",
11
- onOpen: "open",
12
- onClose: "close",
13
- onClear: "clear",
14
- onSearch: "search",
15
- onLoadError: "load-error"
16
- }
2
+ import { createComponent as t } from "@lit/react";
3
+ import { InMemoryTreeSelectProvider as n, MpTreeSelect as r } from "@mintplayer/web-components/tree-select";
4
+ //#region libs/mintplayer-react-bootstrap/tree-select/src/BsTreeSelect.tsx
5
+ var i = t({
6
+ react: e,
7
+ tagName: "mp-tree-select",
8
+ elementClass: r,
9
+ events: {
10
+ onValueChange: "value-change",
11
+ onOpen: "open",
12
+ onClose: "close",
13
+ onClear: "clear",
14
+ onSearch: "search",
15
+ onLoadError: "load-error"
16
+ }
17
17
  });
18
- export {
19
- n as BsTreeSelect,
20
- m as InMemoryTreeSelectProvider
21
- };
18
+ //#endregion
19
+ export { i as BsTreeSelect, n as InMemoryTreeSelectProvider };
@@ -1,16 +1,16 @@
1
1
  import * as e from "react";
2
- import { createComponent as o } from "@lit/react";
3
- import { MpTreeview as r } from "@mintplayer/web-components/treeview";
4
- const a = o({
5
- react: e,
6
- tagName: "mp-treeview",
7
- elementClass: r,
8
- events: {
9
- onTreeNodeSelect: "tree-node-select",
10
- onTreeNodeExpand: "tree-node-expand",
11
- onTreeNodeCollapse: "tree-node-collapse"
12
- }
2
+ import { createComponent as t } from "@lit/react";
3
+ import { MpTreeview as n } from "@mintplayer/web-components/treeview";
4
+ //#region libs/mintplayer-react-bootstrap/treeview/src/BsTreeview.tsx
5
+ var r = t({
6
+ react: e,
7
+ tagName: "mp-treeview",
8
+ elementClass: n,
9
+ events: {
10
+ onTreeNodeSelect: "tree-node-select",
11
+ onTreeNodeExpand: "tree-node-expand",
12
+ onTreeNodeCollapse: "tree-node-collapse"
13
+ }
13
14
  });
14
- export {
15
- a as BsTreeview
16
- };
15
+ //#endregion
16
+ export { r as BsTreeview };