@mintplayer/react-bootstrap 19.8.0 → 19.10.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 +14 -11
- package/accordion/src/BsAccordion.d.ts +3 -3
- package/card/index.mjs +15 -15
- package/carousel/index.mjs +12 -13
- package/carousel/src/BsCarousel.d.ts +1 -3
- package/dropdown-menu/index.mjs +13 -14
- package/dropdown-menu/src/BsDropdownMenu.d.ts +1 -3
- package/navbar/index.mjs +15 -16
- package/navbar/src/BsNavbar.d.ts +1 -3
- package/navbar/src/BsNavbarBrand.d.ts +1 -1
- package/navbar/src/BsNavbarDropdown.d.ts +1 -1
- package/navbar/src/BsNavbarItem.d.ts +1 -1
- package/package.json +1 -1
- package/radio-group/index.mjs +14 -0
- package/radio-group/src/BsRadioGroup.d.ts +13 -0
- package/radio-group/src/index.d.ts +1 -0
- package/scheduler/index.mjs +3 -0
- package/scheduler/src/BsScheduler.d.ts +1 -0
- package/shell/src/BsShell.d.ts +1 -1
- package/signature-pad/index.mjs +14 -0
- package/signature-pad/src/BsSignaturePad.d.ts +11 -0
- package/signature-pad/src/index.d.ts +2 -0
- package/timeline/index.mjs +25 -21
- package/timeline/src/BsTimeline.d.ts +1 -1
package/accordion/index.mjs
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as l, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { createComponent as
|
|
3
|
+
import { createComponent as s } from "@lit/react";
|
|
4
4
|
import { MpAccordion as g, MpAccordionTab as f } from "@mintplayer/web-components/accordion";
|
|
5
|
-
const u =
|
|
5
|
+
const u = s({
|
|
6
6
|
react: o,
|
|
7
7
|
tagName: "mp-accordion",
|
|
8
8
|
elementClass: g,
|
|
9
9
|
events: {
|
|
10
10
|
onTabToggle: "mp-accordion-tab-toggle"
|
|
11
11
|
}
|
|
12
|
-
}), A =
|
|
12
|
+
}), A = s({
|
|
13
13
|
react: o,
|
|
14
14
|
tagName: "mp-accordion-tab",
|
|
15
15
|
elementClass: f
|
|
16
16
|
});
|
|
17
17
|
function h({
|
|
18
|
-
header:
|
|
18
|
+
header: m,
|
|
19
19
|
isActive: n,
|
|
20
20
|
disabled: r,
|
|
21
21
|
index: e = 0,
|
|
22
|
-
children: c
|
|
22
|
+
children: c,
|
|
23
|
+
// Forwarded to the tab, which is the element that owns the panel content.
|
|
24
|
+
...a
|
|
23
25
|
}) {
|
|
24
26
|
return /* @__PURE__ */ l(b, { children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ i("span", { "accordion-header": "", slot: `h${e}`, children: m }),
|
|
28
|
+
/* @__PURE__ */ i(
|
|
27
29
|
A,
|
|
28
30
|
{
|
|
29
31
|
"accordion-tab": "",
|
|
30
32
|
slot: `c${e}`,
|
|
31
33
|
...n ? { "is-active": "" } : {},
|
|
32
34
|
...r ? { disabled: "" } : {},
|
|
35
|
+
...a,
|
|
33
36
|
children: c
|
|
34
37
|
}
|
|
35
38
|
)
|
|
36
39
|
] });
|
|
37
40
|
}
|
|
38
|
-
const T = o.forwardRef(function({ multi: n, highlightActiveTab: r, children: e, ...c },
|
|
41
|
+
const T = o.forwardRef(function({ multi: n, highlightActiveTab: r, children: e, ...c }, a) {
|
|
39
42
|
let d = 0;
|
|
40
43
|
const p = o.Children.map(
|
|
41
44
|
e,
|
|
42
45
|
(t) => o.isValidElement(t) && t.type === h ? o.cloneElement(t, { index: d++ }) : t
|
|
43
46
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ i(
|
|
45
48
|
u,
|
|
46
49
|
{
|
|
47
|
-
ref:
|
|
50
|
+
ref: a,
|
|
48
51
|
...n ? { multi: !0 } : {},
|
|
49
52
|
...r ? { "highlight-active-tab": !0 } : {},
|
|
50
53
|
...c,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpAccordion, AccordionTabToggleDetail } from '@mintplayer/web-components/accordion';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsAccordionProps {
|
|
3
|
+
export interface BsAccordionProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Allow several tabs to stay open at once (checkbox machine with JS off). */
|
|
5
5
|
multi?: boolean;
|
|
6
6
|
/** Paint the open header with the Bootstrap active background. */
|
|
@@ -11,7 +11,7 @@ export interface BsAccordionProps {
|
|
|
11
11
|
/** `BsAccordionItem`s; anything else renders as plain accordion content. */
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export interface BsAccordionItemProps {
|
|
14
|
+
export interface BsAccordionItemProps extends React.HTMLAttributes<HTMLElement> {
|
|
15
15
|
/** Header content — any node, not just a string. */
|
|
16
16
|
header?: React.ReactNode;
|
|
17
17
|
isActive?: boolean;
|
|
@@ -29,7 +29,7 @@ export interface BsAccordionItemProps {
|
|
|
29
29
|
* so the header cannot live inside the tab element — a React fragment lets
|
|
30
30
|
* one component contribute both.
|
|
31
31
|
*/
|
|
32
|
-
export declare function BsAccordionItem({ header, isActive, disabled, index, children, }: BsAccordionItemProps): React.JSX.Element;
|
|
32
|
+
export declare function BsAccordionItem({ header, isActive, disabled, index, children, ...rest }: BsAccordionItemProps): React.JSX.Element;
|
|
33
33
|
/**
|
|
34
34
|
* React wrapper for `<mp-accordion>`.
|
|
35
35
|
*
|
package/card/index.mjs
CHANGED
|
@@ -2,55 +2,55 @@ import * as B from "react";
|
|
|
2
2
|
import { forwardRef as r, useRef as p, useEffect as f } from "react";
|
|
3
3
|
import { createComponent as C } from "@lit/react";
|
|
4
4
|
import { MpCardElement as N, applyHeaderNavStyle as u } from "@mintplayer/web-components/card";
|
|
5
|
-
import { jsx as
|
|
5
|
+
import { jsx as t, jsxs as x, Fragment as y } from "react/jsx-runtime";
|
|
6
6
|
const D = C({
|
|
7
7
|
react: B,
|
|
8
8
|
tagName: "mp-card",
|
|
9
9
|
elementClass: N
|
|
10
10
|
}), g = (...a) => a.filter(Boolean).join(" "), j = r(
|
|
11
|
-
({ className: a, ...e }, s) => /* @__PURE__ */
|
|
11
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ t("div", { ref: s, className: g("card-body", a), ...e })
|
|
12
12
|
);
|
|
13
13
|
j.displayName = "BsCardBody";
|
|
14
14
|
const v = (...a) => a.filter(Boolean).join(" "), $ = r(
|
|
15
|
-
({ className: a, color: e, ...s },
|
|
15
|
+
({ className: a, color: e, ...s }, o) => /* @__PURE__ */ t("div", { ref: o, className: v("card-footer", e && `text-bg-${e}`, a), ...s })
|
|
16
16
|
);
|
|
17
17
|
$.displayName = "BsCardFooter";
|
|
18
18
|
const b = (...a) => a.filter(Boolean).join(" "), R = r(
|
|
19
|
-
({ className: a, ...e }, s) => /* @__PURE__ */
|
|
19
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ t("div", { ref: s, className: b("card-group", a), ...e })
|
|
20
20
|
);
|
|
21
21
|
R.displayName = "BsCardGroup";
|
|
22
22
|
const T = (...a) => a.filter(Boolean).join(" "), k = r(
|
|
23
|
-
({ className: a, color: e, navStyle: s, children:
|
|
23
|
+
({ className: a, color: e, navStyle: s, children: o, ...n }, i) => {
|
|
24
24
|
const c = p(null);
|
|
25
25
|
return f(() => {
|
|
26
26
|
c.current && u(c.current, s ?? null);
|
|
27
|
-
}, [s,
|
|
27
|
+
}, [s, o]), /* @__PURE__ */ t("div", { ref: (d) => {
|
|
28
28
|
c.current = d, typeof i == "function" ? i(d) : i && (i.current = d);
|
|
29
|
-
}, className: T("card-header", e && `text-bg-${e}`, a), ...n, children:
|
|
29
|
+
}, className: T("card-header", e && `text-bg-${e}`, a), ...n, children: o });
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
k.displayName = "BsCardHeader";
|
|
33
33
|
const l = (...a) => a.filter(Boolean).join(" "), F = r(
|
|
34
|
-
({ className: a, position: e = "top", src: s, alt:
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
] }) : /* @__PURE__ */
|
|
34
|
+
({ className: a, position: e = "top", src: s, alt: o, children: n, ...i }, c) => e === "overlay" ? /* @__PURE__ */ x(y, { children: [
|
|
35
|
+
/* @__PURE__ */ t("img", { ref: c, className: l("card-img", a), src: s, alt: o ?? "", ...i }),
|
|
36
|
+
/* @__PURE__ */ t("div", { className: "card-img-overlay", children: n })
|
|
37
|
+
] }) : /* @__PURE__ */ t("img", { ref: c, className: l(e === "bottom" ? "card-img-bottom" : "card-img-top", a), src: s, alt: o ?? "", ...i })
|
|
38
38
|
);
|
|
39
39
|
F.displayName = "BsCardImg";
|
|
40
40
|
const H = (...a) => a.filter(Boolean).join(" "), E = r(
|
|
41
|
-
({ className: a, href: e, ...s },
|
|
41
|
+
({ className: a, href: e, ...s }, o) => /* @__PURE__ */ t("a", { ref: o, className: H("card-link", a), href: e, ...s })
|
|
42
42
|
);
|
|
43
43
|
E.displayName = "BsCardLink";
|
|
44
44
|
const G = (...a) => a.filter(Boolean).join(" "), I = r(
|
|
45
|
-
({ className: a, ...e }, s) => /* @__PURE__ */
|
|
45
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ t("div", { ref: s, className: G("card-subtitle", a), ...e })
|
|
46
46
|
);
|
|
47
47
|
I.displayName = "BsCardSubtitle";
|
|
48
48
|
const L = (...a) => a.filter(Boolean).join(" "), S = r(
|
|
49
|
-
({ className: a, ...e }, s) => /* @__PURE__ */
|
|
49
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ t("div", { ref: s, className: L("card-text", a), ...e })
|
|
50
50
|
);
|
|
51
51
|
S.displayName = "BsCardText";
|
|
52
52
|
const h = (...a) => a.filter(Boolean).join(" "), w = r(
|
|
53
|
-
({ className: a, ...e }, s) => /* @__PURE__ */
|
|
53
|
+
({ className: a, ...e }, s) => /* @__PURE__ */ t("div", { ref: s, className: h("card-title", a), ...e })
|
|
54
54
|
);
|
|
55
55
|
w.displayName = "BsCardTitle";
|
|
56
56
|
export {
|
package/carousel/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
3
|
import { createComponent as p } from "@lit/react";
|
|
4
4
|
import { MpCarousel as u } from "@mintplayer/web-components/carousel";
|
|
5
5
|
const f = p({
|
|
6
|
-
react:
|
|
6
|
+
react: a,
|
|
7
7
|
tagName: "mp-carousel",
|
|
8
8
|
elementClass: u,
|
|
9
9
|
events: {
|
|
@@ -12,21 +12,20 @@ const f = p({
|
|
|
12
12
|
onAnimationStart: "animation-start",
|
|
13
13
|
onAnimationEnd: "animation-end"
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
}), g = a.forwardRef(function({ indicators: o, interval: e, wrap: n, keyboardEvents: t, paused: r, ...s }, m) {
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
17
|
f,
|
|
18
18
|
{
|
|
19
|
-
ref:
|
|
20
|
-
...
|
|
21
|
-
...n ? { indicators: !0 } : {},
|
|
19
|
+
ref: m,
|
|
20
|
+
...o ? { indicators: !0 } : {},
|
|
22
21
|
...e && e > 0 ? { interval: e } : {},
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
...
|
|
26
|
-
...
|
|
22
|
+
...n === !1 ? { wrap: "false" } : {},
|
|
23
|
+
...t === !1 ? { "keyboard-events": "false" } : {},
|
|
24
|
+
...r ? { paused: !0 } : {},
|
|
25
|
+
...s
|
|
27
26
|
}
|
|
28
27
|
);
|
|
29
28
|
});
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
g as BsCarousel
|
|
32
31
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpCarousel, CarouselAnimation, CarouselOrientation, CarouselPausedChangeEventDetail, CarouselSlideChangeEventDetail } from '@mintplayer/web-components/carousel';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsCarouselProps {
|
|
3
|
+
export interface BsCarouselProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onAnimationStart' | 'onAnimationEnd'> {
|
|
4
4
|
/** Slide transition: `slide` (default), `fade`, or `none`. */
|
|
5
5
|
animation?: CarouselAnimation;
|
|
6
6
|
orientation?: CarouselOrientation;
|
|
@@ -14,8 +14,6 @@ export interface BsCarouselProps {
|
|
|
14
14
|
keyboardEvents?: boolean;
|
|
15
15
|
/** Whether autoplay is paused (controlled via onPausedChange). */
|
|
16
16
|
paused?: boolean;
|
|
17
|
-
/** Accessible label for the carousel region. Maps to `aria-label`. */
|
|
18
|
-
ariaLabel?: string;
|
|
19
17
|
onSlideChange?: (event: CustomEvent<CarouselSlideChangeEventDetail>) => void;
|
|
20
18
|
onPausedChange?: (event: CustomEvent<CarouselPausedChangeEventDetail>) => void;
|
|
21
19
|
onAnimationStart?: (event: CustomEvent<void>) => void;
|
package/dropdown-menu/index.mjs
CHANGED
|
@@ -9,34 +9,33 @@ const m = f({
|
|
|
9
9
|
events: {
|
|
10
10
|
onSelect: "select"
|
|
11
11
|
}
|
|
12
|
-
}), v = n.forwardRef(function({ maxHeight:
|
|
12
|
+
}), v = n.forwardRef(function({ maxHeight: e, ...o }, r) {
|
|
13
13
|
return /* @__PURE__ */ a(
|
|
14
14
|
m,
|
|
15
15
|
{
|
|
16
|
-
ref:
|
|
17
|
-
...
|
|
18
|
-
...
|
|
19
|
-
...r
|
|
16
|
+
ref: r,
|
|
17
|
+
...e != null ? { "max-height": e } : {},
|
|
18
|
+
...o
|
|
20
19
|
}
|
|
21
20
|
);
|
|
22
21
|
}), R = n.forwardRef(
|
|
23
|
-
function({ active:
|
|
22
|
+
function({ active: e, disabled: o, value: r, className: t, children: i, ...c }, l) {
|
|
24
23
|
const s = n.useRef(null);
|
|
25
24
|
n.useImperativeHandle(l, () => s.current), n.useEffect(() => {
|
|
26
25
|
s.current && (s.current.value = r);
|
|
27
26
|
}, [r]);
|
|
28
|
-
const p = ["dropdown-item",
|
|
29
|
-
return /* @__PURE__ */ a("li", { ref: s, className: p, "aria-disabled":
|
|
27
|
+
const p = ["dropdown-item", e ? "active" : "", o ? "disabled" : "", t ?? ""].filter(Boolean).join(" ");
|
|
28
|
+
return /* @__PURE__ */ a("li", { ref: s, className: p, "aria-disabled": o ? !0 : void 0, ...c, children: i });
|
|
30
29
|
}
|
|
31
30
|
), M = n.forwardRef(
|
|
32
|
-
function({ className:
|
|
33
|
-
const t = ["dropdown-divider",
|
|
34
|
-
return /* @__PURE__ */ a("li", { ref: r, role: "separator", className: t, ...
|
|
31
|
+
function({ className: e, ...o }, r) {
|
|
32
|
+
const t = ["dropdown-divider", e ?? ""].filter(Boolean).join(" ");
|
|
33
|
+
return /* @__PURE__ */ a("li", { ref: r, role: "separator", className: t, ...o });
|
|
35
34
|
}
|
|
36
35
|
), j = n.forwardRef(
|
|
37
|
-
function({ className:
|
|
38
|
-
const i = ["dropdown-header",
|
|
39
|
-
return /* @__PURE__ */ a("li", { ref: t, className: i, ...r, children:
|
|
36
|
+
function({ className: e, children: o, ...r }, t) {
|
|
37
|
+
const i = ["dropdown-header", e ?? ""].filter(Boolean).join(" ");
|
|
38
|
+
return /* @__PURE__ */ a("li", { ref: t, className: i, ...r, children: o });
|
|
40
39
|
}
|
|
41
40
|
);
|
|
42
41
|
export {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { MpDropdownMenu, DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsDropdownMenuProps {
|
|
3
|
+
export interface BsDropdownMenuProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
4
4
|
/** `menu` (default, roving-tabindex keyboard nav) | `listbox`. */
|
|
5
5
|
mode?: DropdownMode;
|
|
6
6
|
/** px cap on the menu height; scrolls beyond. Maps to the `max-height` attribute. */
|
|
7
7
|
maxHeight?: number;
|
|
8
|
-
/** id of an external label, set as `aria-labelledby` on the list. Maps to `label-id`. */
|
|
9
|
-
labelId?: string;
|
|
10
8
|
/** Fires when an enabled item is activated; `detail.value` carries the item's value. */
|
|
11
9
|
onSelect?: (event: CustomEvent<DropdownSelectEventDetail>) => void;
|
|
12
10
|
className?: string;
|
package/navbar/index.mjs
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { createComponent as
|
|
3
|
+
import { createComponent as e } from "@lit/react";
|
|
4
4
|
import { MpNavbar as s, MpNavbarItem as b, MpNavbarBrand as v, MpNavbarDropdown as d } from "@mintplayer/web-components/navbar";
|
|
5
|
-
const c =
|
|
5
|
+
const c = e({
|
|
6
6
|
react: a,
|
|
7
7
|
tagName: "mp-navbar",
|
|
8
8
|
elementClass: s,
|
|
9
9
|
events: {
|
|
10
10
|
onExpandedChange: "expandedchange"
|
|
11
11
|
}
|
|
12
|
-
}), B = a.forwardRef(function({
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
}), B = a.forwardRef(function({ expanded: r, ...n }, t) {
|
|
13
|
+
return /* @__PURE__ */ o(
|
|
14
14
|
c,
|
|
15
15
|
{
|
|
16
|
-
ref:
|
|
17
|
-
...
|
|
18
|
-
...n
|
|
19
|
-
...t
|
|
16
|
+
ref: t,
|
|
17
|
+
...r ? { expanded: "" } : {},
|
|
18
|
+
...n
|
|
20
19
|
}
|
|
21
20
|
);
|
|
22
|
-
}), N =
|
|
21
|
+
}), N = e({
|
|
23
22
|
react: a,
|
|
24
23
|
tagName: "mp-navbar-item",
|
|
25
24
|
elementClass: b
|
|
26
|
-
}), C = a.forwardRef(function({ active:
|
|
27
|
-
return /* @__PURE__ */
|
|
25
|
+
}), C = a.forwardRef(function({ active: r, disabled: n, ...t }, p) {
|
|
26
|
+
return /* @__PURE__ */ o(
|
|
28
27
|
N,
|
|
29
28
|
{
|
|
30
|
-
ref:
|
|
31
|
-
...
|
|
29
|
+
ref: p,
|
|
30
|
+
...r ? { active: "" } : {},
|
|
32
31
|
...n ? { disabled: "" } : {},
|
|
33
32
|
...t
|
|
34
33
|
}
|
|
35
34
|
);
|
|
36
|
-
}), g =
|
|
35
|
+
}), g = e({
|
|
37
36
|
react: a,
|
|
38
37
|
tagName: "mp-navbar-brand",
|
|
39
38
|
elementClass: v
|
|
40
|
-
}), M =
|
|
39
|
+
}), M = e({
|
|
41
40
|
react: a,
|
|
42
41
|
tagName: "mp-navbar-dropdown",
|
|
43
42
|
elementClass: d
|
package/navbar/src/BsNavbar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpNavbar, NavbarBreakpoint, NavbarExpandedChangeEventDetail } from '@mintplayer/web-components/navbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsNavbarProps {
|
|
3
|
+
export interface BsNavbarProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Bootstrap breakpoint name (`xs`…`xxl`, default `md`); at/above it the nav is inline. */
|
|
5
5
|
breakpoint?: NavbarBreakpoint;
|
|
6
6
|
/** Background: a theme color (`primary`…`dark`) or adaptive `body` / `body-secondary` / `body-tertiary`. */
|
|
@@ -9,8 +9,6 @@ export interface BsNavbarProps {
|
|
|
9
9
|
expanded?: boolean;
|
|
10
10
|
/** `fixed` pins the bar to the top of the viewport, full width; omit for in-flow. */
|
|
11
11
|
positioning?: 'fixed';
|
|
12
|
-
/** Landmark label for the `<nav>` (default `Main navigation`). Maps to `aria-label`. */
|
|
13
|
-
ariaLabel?: string;
|
|
14
12
|
/** Fires when the collapse toggles; `detail.expanded` carries the new state. */
|
|
15
13
|
onExpandedChange?: (event: CustomEvent<NavbarExpandedChangeEventDetail>) => void;
|
|
16
14
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpNavbarBrand } from '@mintplayer/web-components/navbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsNavbarBrandProps {
|
|
3
|
+
export interface BsNavbarBrandProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Always `"brand"` to project into the navbar's brand slot. */
|
|
5
5
|
slot?: string;
|
|
6
6
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpNavbarDropdown } from '@mintplayer/web-components/navbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsNavbarDropdownProps {
|
|
3
|
+
export interface BsNavbarDropdownProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Set when nesting the dropdown into a parent slot (e.g. `"end"`). */
|
|
5
5
|
slot?: string;
|
|
6
6
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MpNavbarItem } from '@mintplayer/web-components/navbar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export interface BsNavbarItemProps {
|
|
3
|
+
export interface BsNavbarItemProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Current page (`.active` appearance). Reflected boolean attribute. */
|
|
5
5
|
active?: boolean;
|
|
6
6
|
/** Non-interactive. Reflected boolean attribute. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/react-bootstrap",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.10.0",
|
|
4
4
|
"description": "React 19 wrappers around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed React components via @lit/react's createComponent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { createComponent as r } from "@lit/react";
|
|
3
|
+
import { MpRadioGroup as e } from "@mintplayer/web-components/radio-group";
|
|
4
|
+
const t = r({
|
|
5
|
+
react: o,
|
|
6
|
+
tagName: "mp-radio-group",
|
|
7
|
+
elementClass: e,
|
|
8
|
+
events: {
|
|
9
|
+
onGroupChange: "group-change"
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
t as BsRadioGroup
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
2
|
+
import { MpRadioGroup, RadioGroupChangeEventDetail } from '@mintplayer/web-components/radio-group';
|
|
3
|
+
/**
|
|
4
|
+
* React wrapper for `<mp-radio-group>`. Put `<BsRadio>` children inside it
|
|
5
|
+
* and the WC supplies what shadow roots keep the platform from providing:
|
|
6
|
+
* one-of-N exclusivity, `role="radiogroup"`, the roving tab stop and arrow
|
|
7
|
+
* move-and-select. `onGroupChange` fires for every selection — including
|
|
8
|
+
* keyboard-driven ones, which produce NO per-radio `change` event (the WC
|
|
9
|
+
* checks radios programmatically). `value` is a settable property.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BsRadioGroup: import('@lit/react').ReactWebComponent<MpRadioGroup, {
|
|
12
|
+
onGroupChange: EventName<CustomEvent<RadioGroupChangeEventDetail>>;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BsRadioGroup';
|
package/scheduler/index.mjs
CHANGED
|
@@ -12,6 +12,9 @@ const a = t({
|
|
|
12
12
|
onEventUpdate: "event-update",
|
|
13
13
|
onEventDelete: "event-delete",
|
|
14
14
|
onDateClick: "date-click",
|
|
15
|
+
// Fires for view switches AND internal date navigation (prev/next/today)
|
|
16
|
+
// — `date` carries the newly displayed date, so a controlled `date` prop
|
|
17
|
+
// stays in sync by updating state from this callback.
|
|
15
18
|
onViewChange: "view-change",
|
|
16
19
|
onSelectionChange: "selection-change"
|
|
17
20
|
}
|
package/shell/src/BsShell.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MpShell, ShellState, ShellStateChangeEventDetail } from '@mintplayer/we
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/** Bootstrap breakpoint names accepted by `breakpoint`. */
|
|
4
4
|
export type ShellBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
-
export interface BsShellProps {
|
|
5
|
+
export interface BsShellProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
6
|
/** `auto` (default, responsive) | `show` (force open) | `hide` (force closed). */
|
|
7
7
|
state?: ShellState;
|
|
8
8
|
/** Breakpoint below which the sidebar starts collapsed. Default `md`. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { createComponent as t } from "@lit/react";
|
|
3
|
+
import { MpSignaturePadElement as a } from "@mintplayer/web-components/signature-pad";
|
|
4
|
+
const m = t({
|
|
5
|
+
react: e,
|
|
6
|
+
tagName: "mp-signature-pad",
|
|
7
|
+
elementClass: a,
|
|
8
|
+
events: {
|
|
9
|
+
onSignatureChange: "signature-change"
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
m as BsSignaturePad
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
2
|
+
import { MpSignaturePadElement, Signature } from '@mintplayer/web-components/signature-pad';
|
|
3
|
+
/**
|
|
4
|
+
* React wrapper for `<mp-signature-pad>`. Side-effect-registers the WC via
|
|
5
|
+
* the import above. The `signature` model object is assigned as a property
|
|
6
|
+
* by `@lit/react`; `signature-change` fires on every mutation (stroke point,
|
|
7
|
+
* typed character, undo, clear).
|
|
8
|
+
*/
|
|
9
|
+
export declare const BsSignaturePad: import('@lit/react').ReactWebComponent<MpSignaturePadElement, {
|
|
10
|
+
onSignatureChange: EventName<CustomEvent<Signature>>;
|
|
11
|
+
}>;
|
package/timeline/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { jsx as l, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import { createComponent as M } from "@lit/react";
|
|
4
|
-
import { MpTimelineItem as
|
|
5
|
-
const
|
|
4
|
+
import { MpTimelineItem as F, MpTimeline as R, resolveSides as q } from "@mintplayer/web-components/timeline";
|
|
5
|
+
const z = M({
|
|
6
6
|
react: x,
|
|
7
7
|
tagName: "mp-timeline-item",
|
|
8
|
-
elementClass:
|
|
9
|
-
}),
|
|
8
|
+
elementClass: F
|
|
9
|
+
}), A = M({
|
|
10
10
|
react: x,
|
|
11
11
|
tagName: "mp-timeline",
|
|
12
|
-
elementClass:
|
|
12
|
+
elementClass: R,
|
|
13
13
|
events: {
|
|
14
14
|
onItemClick: "item-click",
|
|
15
15
|
onSelectionChange: "selection-change"
|
|
16
16
|
}
|
|
17
17
|
}), v = (c, n) => c.id ?? n;
|
|
18
|
-
function
|
|
18
|
+
function J(c) {
|
|
19
19
|
const {
|
|
20
20
|
items: n,
|
|
21
21
|
orientation: g = "vertical",
|
|
@@ -31,8 +31,11 @@ function H(c) {
|
|
|
31
31
|
renderOpposite: p,
|
|
32
32
|
renderContent: h,
|
|
33
33
|
className: b,
|
|
34
|
-
children: B
|
|
35
|
-
|
|
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) => {
|
|
36
39
|
const t = e.detail;
|
|
37
40
|
if (n && n.length) {
|
|
38
41
|
const o = new Map(n.map((s, i) => [String(v(s, i)), s]));
|
|
@@ -41,35 +44,36 @@ function H(c) {
|
|
|
41
44
|
);
|
|
42
45
|
} else
|
|
43
46
|
S?.(t.selected);
|
|
44
|
-
},
|
|
47
|
+
}, L = q(n?.length ?? 0, C, a);
|
|
45
48
|
return /* @__PURE__ */ l(
|
|
46
|
-
|
|
49
|
+
A,
|
|
47
50
|
{
|
|
48
51
|
orientation: g,
|
|
49
52
|
align: C,
|
|
50
53
|
reverse: a,
|
|
51
54
|
selectable: I,
|
|
52
55
|
className: b,
|
|
53
|
-
onItemClick:
|
|
54
|
-
onSelectionChange:
|
|
56
|
+
onItemClick: w,
|
|
57
|
+
onSelectionChange: D,
|
|
58
|
+
...N,
|
|
55
59
|
...k ? { items: n } : {},
|
|
56
60
|
...I !== "none" ? { selectedIds: f ? f.map((e, t) => v(e, t)) : [] } : {},
|
|
57
|
-
children:
|
|
61
|
+
children: j && n ? n.map((e, t) => {
|
|
58
62
|
const o = n.length, s = a ? o - 1 - t : t, i = {
|
|
59
63
|
index: t,
|
|
60
64
|
visualIndex: s,
|
|
61
65
|
isFirst: s === 0,
|
|
62
66
|
isLast: s === o - 1,
|
|
63
67
|
orientation: g,
|
|
64
|
-
side:
|
|
65
|
-
},
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
|
|
68
|
+
side: L[t] ?? "start"
|
|
69
|
+
}, O = e.time instanceof Date ? e.time.toLocaleDateString() : e.time;
|
|
70
|
+
return /* @__PURE__ */ y(
|
|
71
|
+
z,
|
|
68
72
|
{
|
|
69
73
|
itemId: e.id,
|
|
70
74
|
title: e.title,
|
|
71
75
|
description: e.description,
|
|
72
|
-
time:
|
|
76
|
+
time: O ?? void 0,
|
|
73
77
|
icon: e.icon,
|
|
74
78
|
color: e.color,
|
|
75
79
|
itemClass: e.cssClass,
|
|
@@ -89,6 +93,6 @@ function H(c) {
|
|
|
89
93
|
);
|
|
90
94
|
}
|
|
91
95
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
J as BsTimeline,
|
|
97
|
+
z as BsTimelineItem
|
|
94
98
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TimelineAlign, TimelineItem, TimelineItemClickDetail, TimelineItemContext, TimelineOrientation, TimelineSelectable } from '@mintplayer/web-components/timeline-core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type RenderProp = (item: TimelineItem, ctx: TimelineItemContext) => React.ReactNode;
|
|
4
|
-
export interface BsTimelineProps {
|
|
4
|
+
export interface BsTimelineProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
5
|
items?: TimelineItem[];
|
|
6
6
|
orientation?: TimelineOrientation;
|
|
7
7
|
align?: TimelineAlign;
|