@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.
Files changed (56) hide show
  1. package/README.md +12 -11
  2. package/accordion/index.mjs +48 -46
  3. package/card/index.mjs +90 -76
  4. package/card/src/BsCard.d.ts +1 -1
  5. package/card/src/BsCardBody.d.ts +1 -1
  6. package/card/src/BsCardFooter.d.ts +1 -1
  7. package/card/src/BsCardLink.d.ts +1 -1
  8. package/card/src/BsCardSubtitle.d.ts +2 -2
  9. package/card/src/BsCardText.d.ts +1 -1
  10. package/card/src/BsCardTitle.d.ts +1 -1
  11. package/carousel/index.mjs +26 -25
  12. package/checkbox/index.mjs +1 -1
  13. package/chunks/BsCheckbox-BZkPJ13E.mjs +66 -0
  14. package/chunks/{BsDatatable.generated-DCwT6fdk.mjs → BsDatatable.generated-DqNW60JA.mjs} +54 -52
  15. package/chunks/{BsDatetimePicker.generated-B4WBEiCo.mjs → BsDatetimePicker.generated-CxaiRt79.mjs} +32 -31
  16. package/chunks/BsRadio-Bw_MhAOq.mjs +57 -0
  17. package/datatable/index.mjs +1 -1
  18. package/datepicker/index.mjs +28 -27
  19. package/datetime-picker/index.mjs +1 -1
  20. package/dropdown-menu/index.mjs +43 -38
  21. package/file-manager/index.mjs +21 -20
  22. package/input-group/index.mjs +17 -15
  23. package/machine/index.mjs +48 -39
  24. package/machine/src/index.d.ts +1 -0
  25. package/machine/src/mark-links.d.ts +8 -0
  26. package/nav/index.mjs +85 -0
  27. package/nav/src/generated/BsNav.generated.d.ts +15 -0
  28. package/nav/src/generated/BsNavItem.generated.d.ts +6 -0
  29. package/nav/src/generated/index.d.ts +2 -0
  30. package/nav/src/generated/nav-item.view.generated.d.ts +14 -0
  31. package/nav/src/generated/nav.view.generated.d.ts +14 -0
  32. package/nav/src/index.d.ts +1 -0
  33. package/nav/src/nav-item.react.d.ts +4 -0
  34. package/navbar/index.mjs +87 -77
  35. package/navbar/src/navbar-item.react.d.ts +4 -0
  36. package/otp-input/index.mjs +24 -23
  37. package/package.json +10 -2
  38. package/pagination/index.mjs +37 -27
  39. package/phone-input/index.mjs +26 -25
  40. package/query-builder/index.mjs +30 -28
  41. package/radio/index.mjs +1 -1
  42. package/radio-group/index.mjs +1 -1
  43. package/scheduler/index.mjs +42 -41
  44. package/select/index.mjs +27 -26
  45. package/signature-pad/index.mjs +23 -22
  46. package/spinner/index.mjs +50 -0
  47. package/spinner/src/generated/BsSpinner.generated.d.ts +11 -0
  48. package/spinner/src/generated/index.d.ts +1 -0
  49. package/spinner/src/generated/spinner.view.generated.d.ts +15 -0
  50. package/spinner/src/index.d.ts +1 -0
  51. package/tab-control/index.mjs +56 -54
  52. package/timepicker/index.mjs +42 -41
  53. package/toggle-button/index.mjs +1 -1
  54. package/typeahead/index.mjs +90 -87
  55. package/chunks/BsCheckbox-BWU2Hrhf.mjs +0 -57
  56. 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
- ## Styling and encapsulation
9
+ ## Architecture and styling
10
10
 
11
- Most components keep a shadow root and take your content through native slots, so your stylesheets
12
- reach that content normally.
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
- ``BsDatatable`, `BsTreeview`, `BsTreeSelect` and `BsQueryBuilder`` mount DOM you author (row / node templates, cell renderers,
15
- editor factories) and therefore render in the **light DOM**, with their own CSS scoped at build time
16
- onto a `data-mps` attribute — the same device Angular uses for `_ngcontent`. Your styles and
17
- Bootstrap's utilities reach anything you render into them; in exchange, page CSS also reaches their
18
- internals, exactly as emulated encapsulation behaves elsewhere. `::part()` and `::slotted()` no
19
- longer address them.
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) for the full contract
22
- and the migration table.
23
+ See **Styling and encapsulation** in the [workspace README](../../README.md).
@@ -1,70 +1,72 @@
1
1
  import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
- import * as t from "react";
3
- import { createContext as n, forwardRef as r, useContext as i, useEffect as a, useId as o, useImperativeHandle as s, useRef as c } from "react";
4
- import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
5
- import { ACCORDION_SCOPE as u, accordionKeydown as d, accordionScopedStyles as f, accordionSummaryClick as p, accordionToggled as m, connectAccordion as h, connectAccordionTab as g } from "@mintplayer/ui-core/accordion";
6
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
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 y = n({
10
+ var x = i({
9
11
  options: { id: "bs-accordion" },
10
12
  root: { current: null }
11
13
  });
12
- function b({ header: t, isActive: n, disabled: r, index: a = 0, className: o, children: s, ...c }) {
13
- let { options: l, root: u } = i(y), f = g(l, a, { disabled: r }), { class: m, ...h } = f.item;
14
- return /* @__PURE__ */ v("details", {
15
- ...e(h),
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(m), o].filter(Boolean).join(" "),
19
- children: [/* @__PURE__ */ _("summary", {
20
- ...e(f.summary),
21
- onClick: (e) => p(e.nativeEvent, !!r),
22
- onKeyDown: (e) => u.current && d(u.current, e.nativeEvent, a, !!r),
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__ */ _("div", {
25
- ...e(f.content),
26
+ }), /* @__PURE__ */ y("div", {
27
+ ...e(d.content),
26
28
  children: s
27
29
  })]
28
30
  });
29
31
  }
30
- var x = r(function({ multi: n, highlightActiveTab: r, onTabToggle: i, className: d, children: p, ...g }, v) {
31
- l(u, f);
32
- let x = {
33
- id: `bs-accordion-${o().replace(/[^a-zA-Z0-9_-]/g, "")}`,
34
- multi: n,
35
- highlightActiveTab: r
36
- }, S = c(null);
37
- s(v, () => S.current);
38
- let C = c({
39
- multi: !!n,
40
- onTabToggle: i
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
- C.current = {
43
- multi: !!n,
44
- onTabToggle: i
45
- }, a(() => {
46
- let e = S.current;
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 = m(e, t, C.current.multi);
50
- n && C.current.onTabToggle?.(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 w = 0, T = t.Children.map(p, (e) => t.isValidElement(e) && e.type === b ? t.cloneElement(e, { index: w++ }) : e), { class: E, ...D } = h(x);
55
- return /* @__PURE__ */ _("div", {
56
- ref: S,
57
- ...e(D),
58
- ...g,
59
- className: [String(E), d].filter(Boolean).join(" "),
60
- children: /* @__PURE__ */ _(y.Provider, {
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: x,
63
- root: S
64
+ options: C,
65
+ root: w
64
66
  },
65
- children: T
67
+ children: D
66
68
  })
67
69
  });
68
70
  });
69
71
  //#endregion
70
- export { x as BsAccordion, b as BsAccordionItem };
72
+ export { C as BsAccordion, S as BsAccordionItem };
package/card/index.mjs CHANGED
@@ -1,100 +1,114 @@
1
- import { forwardRef as e } from "react";
2
- import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { capColorClasses as i, cardColorClasses as a, cardImgClass as o } from "@mintplayer/ui-core/card";
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 s = (...e) => e.filter(Boolean).join(" "), c = e(({ className: e, color: t, outline: r = !1, ...i }, o) => /* @__PURE__ */ n("div", {
6
- ref: o,
7
- className: s("card", ...a(t, r), e),
8
- ...i
9
- }));
10
- c.displayName = "BsCard";
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 l = (...e) => e.filter(Boolean).join(" "), u = e(({ className: e, ...t }, r) => /* @__PURE__ */ n("div", {
14
- ref: r,
15
- className: l("card-body", e),
16
- ...t
17
- }));
18
- u.displayName = "BsCardBody";
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 d = (...e) => e.filter(Boolean).join(" "), f = e(({ className: e, color: t, ...r }, a) => /* @__PURE__ */ n("div", {
22
- ref: a,
23
- className: d("card-footer", ...i(t), e),
24
- ...r
25
- }));
26
- f.displayName = "BsCardFooter";
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 p = (...e) => e.filter(Boolean).join(" "), m = e(({ className: e, ...t }, r) => /* @__PURE__ */ n("div", {
30
- ref: r,
31
- className: p("card-group", e),
32
- ...t
33
- }));
34
- m.displayName = "BsCardGroup";
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 h = (...e) => e.filter(Boolean).join(" "), g = e(({ className: e, color: t, ...r }, a) => /* @__PURE__ */ n("div", {
38
- ref: a,
39
- className: h("card-header", ...i(t), e),
40
- ...r
41
- }));
42
- g.displayName = "BsCardHeader";
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 _ = (...e) => e.filter(Boolean).join(" "), v = e(({ className: e, position: i = "top", src: a, alt: s, children: c, ...l }, u) => {
46
- if (i === "overlay") return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("img", {
47
- ref: u,
48
- className: _("card-img", e),
49
- src: a,
50
- alt: s ?? "",
51
- ...l
52
- }), /* @__PURE__ */ n("div", {
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: c
63
+ children: u
55
64
  })] });
56
- let d = o(i);
57
- return /* @__PURE__ */ n("img", {
58
- ref: u,
59
- className: _(d, e),
60
- src: a,
61
- alt: s ?? "",
62
- ...l
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
- v.displayName = "BsCardImg";
75
+ b.displayName = "BsCardImg";
66
76
  //#endregion
67
77
  //#region libs/mintplayer-react-bootstrap/card/src/BsCardLink.tsx
68
- var y = (...e) => e.filter(Boolean).join(" "), b = e(({ className: e, href: t, ...r }, i) => /* @__PURE__ */ n("a", {
69
- ref: i,
70
- className: y("card-link", e),
71
- href: t,
72
- ...r
73
- }));
74
- b.displayName = "BsCardLink";
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 x = (...e) => e.filter(Boolean).join(" "), S = e(({ className: e, ...t }, r) => /* @__PURE__ */ n("div", {
78
- ref: r,
79
- className: x("card-subtitle", e),
80
- ...t
81
- }));
82
- S.displayName = "BsCardSubtitle";
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 C = (...e) => e.filter(Boolean).join(" "), w = e(({ className: e, ...t }, r) => /* @__PURE__ */ n("div", {
86
- ref: r,
87
- className: C("card-text", e),
88
- ...t
89
- }));
90
- w.displayName = "BsCardText";
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 T = (...e) => e.filter(Boolean).join(" "), E = e(({ className: e, ...t }, r) => /* @__PURE__ */ n("div", {
94
- ref: r,
95
- className: T("card-title", e),
96
- ...t
97
- }));
98
- E.displayName = "BsCardTitle";
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 { c as BsCard, u as BsCardBody, f as BsCardFooter, m as BsCardGroup, g as BsCardHeader, v as BsCardImg, b as BsCardLink, S as BsCardSubtitle, w as BsCardText, E as BsCardTitle };
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 };
@@ -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 page baseline styles it.
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 & {
@@ -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 page baseline styles it. Merges an incoming `className` and spreads remaining props.
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 page baseline styles it. Merges an incoming `className` and spreads remaining props.
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;
@@ -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 page baseline styles it. Merges an incoming `className` and spreads remaining props.
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 page
4
- * baseline styles it. Merges an incoming `className` and spreads remaining props.
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;
@@ -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 page baseline styles it. Merges an incoming `className` and spreads remaining props.
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 page baseline styles it. Merges an incoming `className` and spreads remaining props.
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;
@@ -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 _({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: c }) {
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 v(e) {
80
- return i.toArray(e).reduce((e, t) => s(t) ? t.type === a ? e + v(t.props.children) : e + 1 : e, 0);
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 y(e, { children: t }) {
83
+ function b(e, { children: t }) {
83
84
  return {
84
85
  ...e,
85
- slideCount: v(t)
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 b = 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: v, onSlideStart: b, onSlideEnd: x, className: S, children: C, ...w }, T) {
91
- u("carousel", g);
92
- let E = l(null);
93
- c(T, () => E.current);
94
- let D = n(m, y({
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: C }), {
105
+ }, { children: w }), {
105
106
  idPrefix: "bs-carousel",
106
- label: w["aria-label"],
107
- rootRef: E,
107
+ label: T["aria-label"],
108
+ rootRef: D,
108
109
  emit: (e, t) => {
109
- e === "slideChange" && h?.(t), e === "pausedChange" && v?.(t), e === "slideStart" && b?.(t), e === "slideEnd" && x?.(t);
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
- ...D.props,
114
- className: S,
115
- attrs: w,
116
- rootRef: E,
117
- children: C
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 x({ view: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
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 S = o(function({ className: e, children: t, ...r }, i) {
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(x, {
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 { b as BsCarousel, S as BsCarouselItem };
155
+ export { x as BsCarousel, C as BsCarouselItem };
@@ -1 +1 @@
1
- export { t as BsCheckbox } from "../chunks/BsCheckbox-BWU2Hrhf.mjs";
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 };