@mintplayer/react-bootstrap 19.30.0 → 19.31.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 +48 -46
- package/card/index.mjs +90 -76
- package/card/src/BsCard.d.ts +1 -1
- package/card/src/BsCardBody.d.ts +1 -1
- package/card/src/BsCardFooter.d.ts +1 -1
- package/card/src/BsCardLink.d.ts +1 -1
- package/card/src/BsCardSubtitle.d.ts +2 -2
- package/card/src/BsCardText.d.ts +1 -1
- package/card/src/BsCardTitle.d.ts +1 -1
- package/carousel/index.mjs +26 -25
- package/checkbox/index.mjs +1 -1
- package/chunks/BsCheckbox-BZkPJ13E.mjs +66 -0
- package/chunks/{BsDatatable.generated-DCwT6fdk.mjs → BsDatatable.generated-DqNW60JA.mjs} +54 -52
- package/chunks/{BsDatetimePicker.generated-B4WBEiCo.mjs → BsDatetimePicker.generated-CxaiRt79.mjs} +32 -31
- package/chunks/BsRadio-Bw_MhAOq.mjs +57 -0
- package/datatable/index.mjs +1 -1
- package/datepicker/index.mjs +28 -27
- package/datetime-picker/index.mjs +1 -1
- package/dropdown-menu/index.mjs +43 -38
- package/file-manager/index.mjs +21 -20
- package/input-group/index.mjs +17 -15
- package/machine/index.mjs +48 -39
- package/machine/src/index.d.ts +1 -0
- package/machine/src/mark-links.d.ts +8 -0
- package/nav/index.mjs +85 -0
- package/nav/src/generated/BsNav.generated.d.ts +15 -0
- package/nav/src/generated/BsNavItem.generated.d.ts +6 -0
- package/nav/src/generated/index.d.ts +2 -0
- package/nav/src/generated/nav-item.view.generated.d.ts +14 -0
- package/nav/src/generated/nav.view.generated.d.ts +14 -0
- package/nav/src/index.d.ts +1 -0
- package/nav/src/nav-item.react.d.ts +4 -0
- package/navbar/index.mjs +87 -77
- package/navbar/src/navbar-item.react.d.ts +4 -0
- package/otp-input/index.mjs +24 -23
- package/package.json +10 -2
- package/pagination/index.mjs +37 -27
- package/phone-input/index.mjs +26 -25
- package/query-builder/index.mjs +30 -28
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/scheduler/index.mjs +42 -41
- package/select/index.mjs +27 -26
- package/signature-pad/index.mjs +23 -22
- package/spinner/index.mjs +50 -0
- package/spinner/src/generated/BsSpinner.generated.d.ts +11 -0
- package/spinner/src/generated/index.d.ts +1 -0
- package/spinner/src/generated/spinner.view.generated.d.ts +15 -0
- package/spinner/src/index.d.ts +1 -0
- package/tab-control/index.mjs +56 -54
- package/timepicker/index.mjs +42 -41
- package/toggle-button/index.mjs +1 -1
- package/typeahead/index.mjs +90 -87
- package/chunks/BsCheckbox-BWU2Hrhf.mjs +0 -57
- package/chunks/BsRadio-D1C6Aqjv.mjs +0 -48
package/README.md
CHANGED
|
@@ -6,17 +6,18 @@ This library was generated with [Nx](https://nx.dev).
|
|
|
6
6
|
|
|
7
7
|
Run `nx test mintplayer-react-bootstrap` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Architecture and styling
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Each component here is the React front of a framework-neutral TypeScript core in
|
|
12
|
+
`@mintplayer/ui-core` (state, keyboard, ARIA, async lifecycles). It renders its own HTML from that
|
|
13
|
+
core. It does **not** wrap or render a web component, so server rendering emits real markup.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
- **Styles ship per component.** A component installs its own scoped sheet and the Bootstrap partial
|
|
16
|
+
its markup uses, once per page, when it first renders (written into `<head>` during SSR). Your
|
|
17
|
+
global stylesheet loads only the page-level Bootstrap baseline, never component partials. A component
|
|
18
|
+
and its styles can ship in the lazy chunk of the page that uses it.
|
|
19
|
+
- **Light DOM, emulated encapsulation.** No shadow root. The component's CSS is scoped at build time onto
|
|
20
|
+
a `data-mps` attribute, like Angular's `_ngcontent`. Your CSS and Bootstrap's utilities reach anything
|
|
21
|
+
you render into a component, page CSS also reaches its internals, and its own rules cannot leak out.
|
|
20
22
|
|
|
21
|
-
See **Styling and encapsulation** in the [workspace README](../../README.md)
|
|
22
|
-
and the migration table.
|
|
23
|
+
See **Styling and encapsulation** in the [workspace README](../../README.md).
|
package/accordion/index.mjs
CHANGED
|
@@ -1,70 +1,72 @@
|
|
|
1
1
|
import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
|
|
3
|
+
import { bootstrapAccordion as n } from "@mintplayer/ui-core/bootstrap/accordion";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { createContext as i, forwardRef as a, useContext as o, useEffect as s, useId as c, useImperativeHandle as l, useRef as u } from "react";
|
|
6
|
+
import { installLightStyles as d } from "@mintplayer/ui-core/scoped-styles";
|
|
7
|
+
import { ACCORDION_SCOPE as f, accordionKeydown as p, accordionScopedStyles as m, accordionSummaryClick as h, accordionToggled as g, connectAccordion as _, connectAccordionTab as v } from "@mintplayer/ui-core/accordion";
|
|
8
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
7
9
|
//#region libs/mintplayer-react-bootstrap/accordion/src/BsAccordion.tsx
|
|
8
|
-
var
|
|
10
|
+
var x = i({
|
|
9
11
|
options: { id: "bs-accordion" },
|
|
10
12
|
root: { current: null }
|
|
11
13
|
});
|
|
12
|
-
function
|
|
13
|
-
let { options: l, root: u } =
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
...e(
|
|
14
|
+
function S({ header: t, isActive: n, disabled: r, index: i = 0, className: a, children: s, ...c }) {
|
|
15
|
+
let { options: l, root: u } = o(x), d = v(l, i, { disabled: r }), { class: f, ...m } = d.item;
|
|
16
|
+
return /* @__PURE__ */ b("details", {
|
|
17
|
+
...e(m),
|
|
16
18
|
open: n,
|
|
17
19
|
...c,
|
|
18
|
-
className: [String(
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
-
...e(
|
|
21
|
-
onClick: (e) =>
|
|
22
|
-
onKeyDown: (e) => u.current &&
|
|
20
|
+
className: [String(f), a].filter(Boolean).join(" "),
|
|
21
|
+
children: [/* @__PURE__ */ y("summary", {
|
|
22
|
+
...e(d.summary),
|
|
23
|
+
onClick: (e) => h(e.nativeEvent, !!r),
|
|
24
|
+
onKeyDown: (e) => u.current && p(u.current, e.nativeEvent, i, !!r),
|
|
23
25
|
children: t
|
|
24
|
-
}), /* @__PURE__ */
|
|
25
|
-
...e(
|
|
26
|
+
}), /* @__PURE__ */ y("div", {
|
|
27
|
+
...e(d.content),
|
|
26
28
|
children: s
|
|
27
29
|
})]
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
id: `bs-accordion-${
|
|
34
|
-
multi:
|
|
35
|
-
highlightActiveTab:
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
multi: !!
|
|
40
|
-
onTabToggle:
|
|
32
|
+
var C = a(function({ multi: i, highlightActiveTab: a, onTabToggle: o, className: p, children: h, ...v }, b) {
|
|
33
|
+
t(n), d(f, m);
|
|
34
|
+
let C = {
|
|
35
|
+
id: `bs-accordion-${c().replace(/[^a-zA-Z0-9_-]/g, "")}`,
|
|
36
|
+
multi: i,
|
|
37
|
+
highlightActiveTab: a
|
|
38
|
+
}, w = u(null);
|
|
39
|
+
l(b, () => w.current);
|
|
40
|
+
let T = u({
|
|
41
|
+
multi: !!i,
|
|
42
|
+
onTabToggle: o
|
|
41
43
|
});
|
|
42
|
-
|
|
43
|
-
multi: !!
|
|
44
|
-
onTabToggle:
|
|
45
|
-
},
|
|
46
|
-
let e =
|
|
44
|
+
T.current = {
|
|
45
|
+
multi: !!i,
|
|
46
|
+
onTabToggle: o
|
|
47
|
+
}, s(() => {
|
|
48
|
+
let e = w.current;
|
|
47
49
|
if (!e) return;
|
|
48
50
|
let t = (t) => {
|
|
49
|
-
let n =
|
|
50
|
-
n &&
|
|
51
|
+
let n = g(e, t, T.current.multi);
|
|
52
|
+
n && T.current.onTabToggle?.(n);
|
|
51
53
|
};
|
|
52
54
|
return e.addEventListener("toggle", t, { capture: !0 }), () => e.removeEventListener("toggle", t, { capture: !0 });
|
|
53
55
|
}, []);
|
|
54
|
-
let
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
ref:
|
|
57
|
-
...e(
|
|
58
|
-
...
|
|
59
|
-
className: [String(
|
|
60
|
-
children: /* @__PURE__ */
|
|
56
|
+
let E = 0, D = r.Children.map(h, (e) => r.isValidElement(e) && e.type === S ? r.cloneElement(e, { index: E++ }) : e), { class: O, ...k } = _(C);
|
|
57
|
+
return /* @__PURE__ */ y("div", {
|
|
58
|
+
ref: w,
|
|
59
|
+
...e(k),
|
|
60
|
+
...v,
|
|
61
|
+
className: [String(O), p].filter(Boolean).join(" "),
|
|
62
|
+
children: /* @__PURE__ */ y(x.Provider, {
|
|
61
63
|
value: {
|
|
62
|
-
options:
|
|
63
|
-
root:
|
|
64
|
+
options: C,
|
|
65
|
+
root: w
|
|
64
66
|
},
|
|
65
|
-
children:
|
|
67
|
+
children: D
|
|
66
68
|
})
|
|
67
69
|
});
|
|
68
70
|
});
|
|
69
71
|
//#endregion
|
|
70
|
-
export {
|
|
72
|
+
export { C as BsAccordion, S as BsAccordionItem };
|
package/card/index.mjs
CHANGED
|
@@ -1,100 +1,114 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { installBootstrap as e } from "@mintplayer/ui-core/bootstrap";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { capColorClasses as a, cardColorClasses as o, cardImgClass as s } from "@mintplayer/ui-core/card";
|
|
5
|
+
import { bootstrapCard as c } from "@mintplayer/ui-core/bootstrap/card";
|
|
4
6
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCard.tsx
|
|
5
|
-
var
|
|
6
|
-
ref:
|
|
7
|
-
|
|
8
|
-
...i
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
var l = (...e) => e.filter(Boolean).join(" "), u = t(({ className: t, color: n, outline: i = !1, ...a }, s) => (e(c), /* @__PURE__ */ r("div", {
|
|
8
|
+
ref: s,
|
|
9
|
+
"data-mps": "card",
|
|
10
|
+
className: l("card", ...o(n, i), t),
|
|
11
|
+
...a
|
|
12
|
+
})));
|
|
13
|
+
u.displayName = "BsCard";
|
|
11
14
|
//#endregion
|
|
12
15
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardBody.tsx
|
|
13
|
-
var
|
|
14
|
-
ref:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
var d = (...e) => e.filter(Boolean).join(" "), f = t(({ className: t, ...n }, i) => (e(c), /* @__PURE__ */ r("div", {
|
|
17
|
+
ref: i,
|
|
18
|
+
"data-mps": "card",
|
|
19
|
+
className: d("card-body", t),
|
|
20
|
+
...n
|
|
21
|
+
})));
|
|
22
|
+
f.displayName = "BsCardBody";
|
|
19
23
|
//#endregion
|
|
20
24
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardFooter.tsx
|
|
21
|
-
var
|
|
22
|
-
ref:
|
|
23
|
-
|
|
24
|
-
...
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
var p = (...e) => e.filter(Boolean).join(" "), m = t(({ className: t, color: n, ...i }, o) => (e(c), /* @__PURE__ */ r("div", {
|
|
26
|
+
ref: o,
|
|
27
|
+
"data-mps": "card",
|
|
28
|
+
className: p("card-footer", ...a(n), t),
|
|
29
|
+
...i
|
|
30
|
+
})));
|
|
31
|
+
m.displayName = "BsCardFooter";
|
|
27
32
|
//#endregion
|
|
28
33
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardGroup.tsx
|
|
29
|
-
var
|
|
30
|
-
ref:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
var h = (...e) => e.filter(Boolean).join(" "), g = t(({ className: t, ...n }, i) => (e(c), /* @__PURE__ */ r("div", {
|
|
35
|
+
ref: i,
|
|
36
|
+
"data-mps": "card",
|
|
37
|
+
className: h("card-group", t),
|
|
38
|
+
...n
|
|
39
|
+
})));
|
|
40
|
+
g.displayName = "BsCardGroup";
|
|
35
41
|
//#endregion
|
|
36
42
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardHeader.tsx
|
|
37
|
-
var
|
|
38
|
-
ref:
|
|
39
|
-
|
|
40
|
-
...
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
var _ = (...e) => e.filter(Boolean).join(" "), v = t(({ className: t, color: n, ...i }, o) => (e(c), /* @__PURE__ */ r("div", {
|
|
44
|
+
ref: o,
|
|
45
|
+
"data-mps": "card",
|
|
46
|
+
className: _("card-header", ...a(n), t),
|
|
47
|
+
...i
|
|
48
|
+
})));
|
|
49
|
+
v.displayName = "BsCardHeader";
|
|
43
50
|
//#endregion
|
|
44
51
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardImg.tsx
|
|
45
|
-
var
|
|
46
|
-
if (
|
|
47
|
-
ref:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
var y = (...e) => e.filter(Boolean).join(" "), b = t(({ className: t, position: a = "top", src: o, alt: l, children: u, ...d }, f) => {
|
|
53
|
+
if (e(c), a === "overlay") return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("img", {
|
|
54
|
+
ref: f,
|
|
55
|
+
"data-mps": "card",
|
|
56
|
+
className: y("card-img", t),
|
|
57
|
+
src: o,
|
|
58
|
+
alt: l ?? "",
|
|
59
|
+
...d
|
|
60
|
+
}), /* @__PURE__ */ r("div", {
|
|
61
|
+
"data-mps": "card",
|
|
53
62
|
className: "card-img-overlay",
|
|
54
|
-
children:
|
|
63
|
+
children: u
|
|
55
64
|
})] });
|
|
56
|
-
let
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
ref:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let p = s(a);
|
|
66
|
+
return /* @__PURE__ */ r("img", {
|
|
67
|
+
ref: f,
|
|
68
|
+
"data-mps": "card",
|
|
69
|
+
className: y(p, t),
|
|
70
|
+
src: o,
|
|
71
|
+
alt: l ?? "",
|
|
72
|
+
...d
|
|
63
73
|
});
|
|
64
74
|
});
|
|
65
|
-
|
|
75
|
+
b.displayName = "BsCardImg";
|
|
66
76
|
//#endregion
|
|
67
77
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardLink.tsx
|
|
68
|
-
var
|
|
69
|
-
ref:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
var x = (...e) => e.filter(Boolean).join(" "), S = t(({ className: t, href: n, ...i }, a) => (e(c), /* @__PURE__ */ r("a", {
|
|
79
|
+
ref: a,
|
|
80
|
+
"data-mps": "card",
|
|
81
|
+
className: x("card-link", t),
|
|
82
|
+
href: n,
|
|
83
|
+
...i
|
|
84
|
+
})));
|
|
85
|
+
S.displayName = "BsCardLink";
|
|
75
86
|
//#endregion
|
|
76
87
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardSubtitle.tsx
|
|
77
|
-
var
|
|
78
|
-
ref:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
var C = (...e) => e.filter(Boolean).join(" "), w = t(({ className: t, ...n }, i) => (e(c), /* @__PURE__ */ r("div", {
|
|
89
|
+
ref: i,
|
|
90
|
+
"data-mps": "card",
|
|
91
|
+
className: C("card-subtitle", t),
|
|
92
|
+
...n
|
|
93
|
+
})));
|
|
94
|
+
w.displayName = "BsCardSubtitle";
|
|
83
95
|
//#endregion
|
|
84
96
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardText.tsx
|
|
85
|
-
var
|
|
86
|
-
ref:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
var T = (...e) => e.filter(Boolean).join(" "), E = t(({ className: t, ...n }, i) => (e(c), /* @__PURE__ */ r("div", {
|
|
98
|
+
ref: i,
|
|
99
|
+
"data-mps": "card",
|
|
100
|
+
className: T("card-text", t),
|
|
101
|
+
...n
|
|
102
|
+
})));
|
|
103
|
+
E.displayName = "BsCardText";
|
|
91
104
|
//#endregion
|
|
92
105
|
//#region libs/mintplayer-react-bootstrap/card/src/BsCardTitle.tsx
|
|
93
|
-
var
|
|
94
|
-
ref:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
var D = (...e) => e.filter(Boolean).join(" "), O = t(({ className: t, ...n }, i) => (e(c), /* @__PURE__ */ r("div", {
|
|
107
|
+
ref: i,
|
|
108
|
+
"data-mps": "card",
|
|
109
|
+
className: D("card-title", t),
|
|
110
|
+
...n
|
|
111
|
+
})));
|
|
112
|
+
O.displayName = "BsCardTitle";
|
|
99
113
|
//#endregion
|
|
100
|
-
export {
|
|
114
|
+
export { u as BsCard, f as BsCardBody, m as BsCardFooter, g as BsCardGroup, v as BsCardHeader, b as BsCardImg, S as BsCardLink, w as BsCardSubtitle, E as BsCardText, O as BsCardTitle };
|
package/card/src/BsCard.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface BsCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* The card root (PRD #437 wave A): a plain `div.card`, no custom element and
|
|
12
|
-
* no core, so SSR emits the finished card and the
|
|
12
|
+
* no core, so SSR emits the finished card and the card part (#452) styles it.
|
|
13
13
|
* Merges an incoming `className` and spreads remaining props.
|
|
14
14
|
*/
|
|
15
15
|
export declare const BsCard: React.ForwardRefExoticComponent<BsCardProps & {
|
package/card/src/BsCardBody.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-body` element. Renders a `div.card-body`; the
|
|
3
|
+
* Plain React `card-body` element. Renders a `div.card-body`; the card part (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
4
4
|
*/
|
|
5
5
|
export declare const BsCardBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
children?: React.ReactNode | undefined;
|
|
@@ -6,7 +6,7 @@ interface BsCardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
color?: CardColor;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Plain React `card-footer` element. Renders a `div.card-footer`; the
|
|
9
|
+
* Plain React `card-footer` element. Renders a `div.card-footer`; the card part (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
10
10
|
*/
|
|
11
11
|
export declare const BsCardFooter: React.ForwardRefExoticComponent<BsCardFooterProps & {
|
|
12
12
|
children?: React.ReactNode | undefined;
|
package/card/src/BsCardLink.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface BsCardLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
5
5
|
href?: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Plain React `card-link` element. Renders an `a.card-link`; the
|
|
8
|
+
* Plain React `card-link` element. Renders an `a.card-link`; the card part (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
9
9
|
*/
|
|
10
10
|
export declare const BsCardLink: React.ForwardRefExoticComponent<BsCardLinkProps & {
|
|
11
11
|
children?: React.ReactNode | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-subtitle` element. Renders a `div.card-subtitle`; the
|
|
4
|
-
*
|
|
3
|
+
* Plain React `card-subtitle` element. Renders a `div.card-subtitle`; the card part
|
|
4
|
+
* (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
5
5
|
*/
|
|
6
6
|
export declare const BsCardSubtitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
children?: React.ReactNode | undefined;
|
package/card/src/BsCardText.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-text` element. Renders a `div.card-text`; the
|
|
3
|
+
* Plain React `card-text` element. Renders a `div.card-text`; the card part (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
4
4
|
*/
|
|
5
5
|
export declare const BsCardText: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
children?: React.ReactNode | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Plain React `card-title` element. Renders a `div.card-title`; the
|
|
3
|
+
* Plain React `card-title` element. Renders a `div.card-title`; the card part (#452) styles it. Merges an incoming `className` and spreads remaining props.
|
|
4
4
|
*/
|
|
5
5
|
export declare const BsCardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
children?: React.ReactNode | undefined;
|
package/carousel/index.mjs
CHANGED
|
@@ -5,8 +5,9 @@ import { Children as i, Fragment as a, forwardRef as o, isValidElement as s, use
|
|
|
5
5
|
import { installLightStyles as u } from "@mintplayer/ui-core/scoped-styles";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
import { carouselCore as m, carouselItemCore as h, carouselScopedStyles as g } from "@mintplayer/ui-core/carousel";
|
|
8
|
+
import { bootstrapCarousel as _ } from "@mintplayer/ui-core/bootstrap/carousel";
|
|
8
9
|
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/carousel.view.generated.tsx
|
|
9
|
-
function
|
|
10
|
+
function v({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: c }) {
|
|
10
11
|
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ p("div", {
|
|
11
12
|
"data-mps": "carousel",
|
|
12
13
|
...e(n.root),
|
|
@@ -76,22 +77,22 @@ function _({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRe
|
|
|
76
77
|
}
|
|
77
78
|
//#endregion
|
|
78
79
|
//#region libs/mintplayer-react-bootstrap/carousel/src/carousel.react.ts
|
|
79
|
-
function
|
|
80
|
-
return i.toArray(e).reduce((e, t) => s(t) ? t.type === a ? e +
|
|
80
|
+
function y(e) {
|
|
81
|
+
return i.toArray(e).reduce((e, t) => s(t) ? t.type === a ? e + y(t.props.children) : e + 1 : e, 0);
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function b(e, { children: t }) {
|
|
83
84
|
return {
|
|
84
85
|
...e,
|
|
85
|
-
slideCount:
|
|
86
|
+
slideCount: y(t)
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/BsCarousel.generated.tsx
|
|
90
|
-
var
|
|
91
|
-
u("carousel", g);
|
|
92
|
-
let
|
|
93
|
-
c(
|
|
94
|
-
let
|
|
91
|
+
var x = o(function({ animation: e = "slide", orientation: t = "horizontal", indicators: r = !1, interval: i = null, wrap: a = !0, keyboardEvents: o = !0, paused: s = !1, inputLabel: d = null, labels: p = null, onSlideChange: h, onPausedChange: y, onSlideStart: x, onSlideEnd: S, className: C, children: w, ...T }, E) {
|
|
92
|
+
u(_.key, _.css, { order: _.order }), u("carousel", g);
|
|
93
|
+
let D = l(null);
|
|
94
|
+
c(E, () => D.current);
|
|
95
|
+
let O = n(m, b({
|
|
95
96
|
animation: e,
|
|
96
97
|
orientation: t,
|
|
97
98
|
indicators: r,
|
|
@@ -101,25 +102,25 @@ var b = o(function({ animation: e = "slide", orientation: t = "horizontal", indi
|
|
|
101
102
|
paused: s,
|
|
102
103
|
inputLabel: d,
|
|
103
104
|
labels: p
|
|
104
|
-
}, { children:
|
|
105
|
+
}, { children: w }), {
|
|
105
106
|
idPrefix: "bs-carousel",
|
|
106
|
-
label:
|
|
107
|
-
rootRef:
|
|
107
|
+
label: T["aria-label"],
|
|
108
|
+
rootRef: D,
|
|
108
109
|
emit: (e, t) => {
|
|
109
|
-
e === "slideChange" && h?.(t), e === "pausedChange" &&
|
|
110
|
+
e === "slideChange" && h?.(t), e === "pausedChange" && y?.(t), e === "slideStart" && x?.(t), e === "slideEnd" && S?.(t);
|
|
110
111
|
}
|
|
111
112
|
});
|
|
112
|
-
return /* @__PURE__ */ f(
|
|
113
|
-
...
|
|
114
|
-
className:
|
|
115
|
-
attrs:
|
|
116
|
-
rootRef:
|
|
117
|
-
children:
|
|
113
|
+
return /* @__PURE__ */ f(v, {
|
|
114
|
+
...O.props,
|
|
115
|
+
className: C,
|
|
116
|
+
attrs: T,
|
|
117
|
+
rootRef: D,
|
|
118
|
+
children: w
|
|
118
119
|
});
|
|
119
120
|
});
|
|
120
121
|
//#endregion
|
|
121
122
|
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/carousel-item.view.generated.tsx
|
|
122
|
-
function
|
|
123
|
+
function S({ view: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
123
124
|
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
124
125
|
"data-mps": "carousel",
|
|
125
126
|
...e(t.root),
|
|
@@ -132,8 +133,8 @@ function x({ view: t, slots: n = {}, children: r, className: i, attrs: a, rootRe
|
|
|
132
133
|
}
|
|
133
134
|
//#endregion
|
|
134
135
|
//#region libs/mintplayer-react-bootstrap/carousel/src/generated/BsCarouselItem.generated.tsx
|
|
135
|
-
var
|
|
136
|
-
u("carousel", g);
|
|
136
|
+
var C = o(function({ className: e, children: t, ...r }, i) {
|
|
137
|
+
u(_.key, _.css, { order: _.order }), u("carousel", g);
|
|
137
138
|
let a = l(null);
|
|
138
139
|
c(i, () => a.current);
|
|
139
140
|
let o = n(h, {}, {
|
|
@@ -142,7 +143,7 @@ var S = o(function({ className: e, children: t, ...r }, i) {
|
|
|
142
143
|
rootRef: a,
|
|
143
144
|
emit: () => void 0
|
|
144
145
|
});
|
|
145
|
-
return /* @__PURE__ */ f(
|
|
146
|
+
return /* @__PURE__ */ f(S, {
|
|
146
147
|
...o.props,
|
|
147
148
|
className: e,
|
|
148
149
|
attrs: r,
|
|
@@ -151,4 +152,4 @@ var S = o(function({ className: e, children: t, ...r }, i) {
|
|
|
151
152
|
});
|
|
152
153
|
});
|
|
153
154
|
//#endregion
|
|
154
|
-
export {
|
|
155
|
+
export { x as BsCarousel, C as BsCarouselItem };
|
package/checkbox/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as BsCheckbox } from "../chunks/BsCheckbox-
|
|
1
|
+
export { t as BsCheckbox } from "../chunks/BsCheckbox-BZkPJ13E.mjs";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { r as e } from "./react-props-C2O2_2V2.mjs";
|
|
2
|
+
import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
|
|
3
|
+
import { forwardRef as n, useEffect as r, useId as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
|
|
4
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import { checkboxClasses as d, connectCheckbox as f, effectiveIndeterminate as p } from "@mintplayer/ui-core/checkbox";
|
|
6
|
+
import { bootstrapForms as m } from "@mintplayer/ui-core/bootstrap/forms";
|
|
7
|
+
//#region libs/mintplayer-react-bootstrap/checkbox/src/BsCheckbox.tsx
|
|
8
|
+
var h = n(function(n, h) {
|
|
9
|
+
let { type: g = "checkbox", color: _ = "primary", checked: v, defaultChecked: y, indeterminate: b = !1, value: x, name: S, disabled: C, required: w, invalid: T = !1, errorText: E, onCheckedChange: D, onChange: O, className: k, children: A, id: j, "aria-describedby": M, ...N } = n, P = `bs-checkbox-${i().replace(/[^a-zA-Z0-9_-]/g, "")}`, [F, I] = s(!!y), L = v ?? F, R = {
|
|
10
|
+
type: g,
|
|
11
|
+
checked: L,
|
|
12
|
+
indeterminate: p({
|
|
13
|
+
type: g,
|
|
14
|
+
indeterminate: b
|
|
15
|
+
}),
|
|
16
|
+
disabled: !!C,
|
|
17
|
+
required: !!w,
|
|
18
|
+
invalid: T,
|
|
19
|
+
name: S ?? null,
|
|
20
|
+
value: x ?? null,
|
|
21
|
+
errorText: E ?? null
|
|
22
|
+
}, z = f(R, P, M);
|
|
23
|
+
t(m);
|
|
24
|
+
let B = d(g, _, T), V = j ?? String(z.input.id), H = o(null);
|
|
25
|
+
a(h, () => H.current), r(() => {
|
|
26
|
+
H.current && (H.current.indeterminate = R.indeterminate);
|
|
27
|
+
}, [R.indeterminate]);
|
|
28
|
+
let U = /* @__PURE__ */ l("input", {
|
|
29
|
+
ref: H,
|
|
30
|
+
"data-mps": "checkbox",
|
|
31
|
+
className: [B.input, k].filter(Boolean).join(" "),
|
|
32
|
+
...e(z.input),
|
|
33
|
+
...N,
|
|
34
|
+
role: z.input.role === null ? N.role : String(z.input.role),
|
|
35
|
+
id: V,
|
|
36
|
+
type: "checkbox",
|
|
37
|
+
checked: L,
|
|
38
|
+
onChange: (e) => {
|
|
39
|
+
O?.(e), v === void 0 && I(e.target.checked), D?.(e.target.checked);
|
|
40
|
+
}
|
|
41
|
+
}), W = z.feedback && /* @__PURE__ */ l("div", {
|
|
42
|
+
"data-mps": "checkbox",
|
|
43
|
+
...e(z.feedback.attrs),
|
|
44
|
+
children: z.feedback.text
|
|
45
|
+
});
|
|
46
|
+
return B.root === null ? /* @__PURE__ */ u(c, { children: [
|
|
47
|
+
U,
|
|
48
|
+
/* @__PURE__ */ l("label", {
|
|
49
|
+
"data-mps": "checkbox",
|
|
50
|
+
className: B.label,
|
|
51
|
+
htmlFor: V,
|
|
52
|
+
children: A
|
|
53
|
+
}),
|
|
54
|
+
W
|
|
55
|
+
] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("label", {
|
|
56
|
+
"data-mps": "checkbox",
|
|
57
|
+
className: B.root,
|
|
58
|
+
children: [U, /* @__PURE__ */ l("span", {
|
|
59
|
+
"data-mps": "checkbox",
|
|
60
|
+
className: B.label,
|
|
61
|
+
children: A
|
|
62
|
+
})]
|
|
63
|
+
}), W] });
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { h as t };
|