@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/input-group/index.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { installBootstrap as e } from "@mintplayer/ui-core/bootstrap";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { installLightStyles as n } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { bootstrapForms as i } from "@mintplayer/ui-core/bootstrap/forms";
|
|
6
|
+
import { INPUT_GROUP_SCOPE as a, inputGroupClasses as o, inputGroupRole as s, inputGroupScopedStyles as c } from "@mintplayer/ui-core/input-group";
|
|
5
7
|
//#region libs/mintplayer-react-bootstrap/input-group/src/BsInputGroup.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
ref:
|
|
11
|
-
className:
|
|
12
|
-
"data-mps":
|
|
13
|
-
role:
|
|
14
|
-
...
|
|
8
|
+
var l = (...e) => e.filter(Boolean).join(" "), u = t(({ className: t, size: u = "md", role: d, ...f }, p) => {
|
|
9
|
+
e(i), n(a, c);
|
|
10
|
+
let m = f["aria-label"] != null || f["aria-labelledby"] != null;
|
|
11
|
+
return /* @__PURE__ */ r("div", {
|
|
12
|
+
ref: p,
|
|
13
|
+
className: l(...o(u), t),
|
|
14
|
+
"data-mps": a,
|
|
15
|
+
role: d ?? s(m) ?? void 0,
|
|
16
|
+
...f
|
|
15
17
|
});
|
|
16
18
|
});
|
|
17
|
-
|
|
19
|
+
u.displayName = "BsInputGroup";
|
|
18
20
|
//#endregion
|
|
19
|
-
export {
|
|
21
|
+
export { u as BsInputGroup };
|
package/machine/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { i as e, n as t, r as n, t as r } from "../chunks/react-props-C2O2_2V2.mjs";
|
|
2
2
|
import { n as i, t as a } from "../chunks/useMachine-CpK1VckL.mjs";
|
|
3
|
-
import { Children as o,
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { coreRuntime as
|
|
6
|
-
import { DEFAULT_PREFETCH_TIMEOUT as
|
|
3
|
+
import { Children as o, cloneElement as s, createContext as c, isValidElement as l, use as u, useContext as d, useEffect as f, useId as p, useRef as m, useState as h } from "react";
|
|
4
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
5
|
+
import { coreRuntime as _, sameContent as v } from "@mintplayer/ui-core/component";
|
|
6
|
+
import { DEFAULT_PREFETCH_TIMEOUT as y, readTransferState as b, runPrefetch as x } from "@mintplayer/ui-core/transfer-state";
|
|
7
7
|
//#region libs/mintplayer-react-bootstrap/machine/src/transfer-state.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let [i] =
|
|
11
|
-
store: e ??
|
|
8
|
+
var S = c(null);
|
|
9
|
+
function C({ store: e, server: t, prefetchTimeout: n, children: r }) {
|
|
10
|
+
let [i] = h(() => ({
|
|
11
|
+
store: e ?? b(),
|
|
12
12
|
server: t ?? typeof window > "u",
|
|
13
|
-
prefetchTimeout: n ??
|
|
13
|
+
prefetchTimeout: n ?? y,
|
|
14
14
|
pending: /* @__PURE__ */ new Map()
|
|
15
15
|
}));
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ g(S.Provider, {
|
|
17
17
|
value: i,
|
|
18
18
|
children: r
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region libs/mintplayer-react-bootstrap/machine/src/core.ts
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
let t =
|
|
26
|
-
return t || (t =
|
|
23
|
+
var w = /* @__PURE__ */ new WeakMap(), T = c(void 0);
|
|
24
|
+
function E(e) {
|
|
25
|
+
let t = w.get(e);
|
|
26
|
+
return t || (t = c(e.defaultValue), t.displayName = e.name, w.set(e, t)), t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
let r = `${n.idPrefix}-${
|
|
28
|
+
function D(e, t, n) {
|
|
29
|
+
let r = `${n.idPrefix}-${p().replace(/[^a-zA-Z0-9_-]/g, "")}`, i = d(e.consume ? E(e.consume) : T), [a, o] = h(!1), s = d(S), [c] = h(() => s && e.transferKey ? e.transferKey(t) : void 0), l;
|
|
30
30
|
if (s && c) {
|
|
31
|
-
if (!s.server)
|
|
31
|
+
if (!s.server) l = s.store.get(c);
|
|
32
32
|
else if (e.prefetch) {
|
|
33
33
|
let n = s.pending.get(c);
|
|
34
|
-
n || (n =
|
|
34
|
+
n || (n = x(e, t, { timeout: s.prefetchTimeout }).then((e) => (e && s.store.set(e.key, e.seed), e)), s.pending.set(c, n)), l = u(n)?.seed;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
let [
|
|
38
|
-
|
|
37
|
+
let [g, v] = h(() => e.state ? e.state(t, l) : {});
|
|
38
|
+
f(() => {
|
|
39
39
|
s && c && !s.server && s.store.remove(c);
|
|
40
40
|
}, [s, c]);
|
|
41
|
-
let y =
|
|
41
|
+
let y = m({
|
|
42
42
|
inputs: t,
|
|
43
|
-
state:
|
|
43
|
+
state: g,
|
|
44
44
|
emit: n.emit
|
|
45
45
|
});
|
|
46
46
|
y.current = {
|
|
47
47
|
inputs: t,
|
|
48
|
-
state:
|
|
48
|
+
state: g,
|
|
49
49
|
emit: n.emit
|
|
50
50
|
};
|
|
51
|
-
let [
|
|
51
|
+
let [b] = h(() => _(e, {
|
|
52
52
|
inputs: () => y.current.inputs,
|
|
53
53
|
state: () => y.current.state,
|
|
54
54
|
setState: (e) => {
|
|
@@ -56,39 +56,48 @@ function E(e, t, n) {
|
|
|
56
56
|
},
|
|
57
57
|
emit: (e, t) => y.current.emit(e, t)
|
|
58
58
|
})), C = n.rootRef;
|
|
59
|
-
|
|
60
|
-
let
|
|
59
|
+
f(() => (o(!0), C.current && b.attachTo(C.current), () => b.dispose()), [b, C]), f(() => b.inputs(t));
|
|
60
|
+
let w = {
|
|
61
61
|
inputs: t,
|
|
62
|
-
state:
|
|
62
|
+
state: g,
|
|
63
63
|
id: r,
|
|
64
64
|
hydrated: a,
|
|
65
65
|
context: i ?? e.consume?.defaultValue,
|
|
66
66
|
label: n.label ?? null,
|
|
67
|
-
api: () =>
|
|
67
|
+
api: () => b.api
|
|
68
68
|
};
|
|
69
69
|
return {
|
|
70
|
-
props: e.view(
|
|
71
|
-
provided: e.provide?.(
|
|
72
|
-
call: (e, t) =>
|
|
70
|
+
props: e.view(w),
|
|
71
|
+
provided: e.provide?.(w),
|
|
72
|
+
call: (e, t) => b.call(e, t)
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region libs/mintplayer-react-bootstrap/machine/src/content.ts
|
|
77
|
-
function
|
|
77
|
+
function O(e, t, n, r) {
|
|
78
78
|
o.forEach(e, (e) => {
|
|
79
|
-
if (!
|
|
79
|
+
if (!l(e)) return;
|
|
80
80
|
let { children: i, ref: a, ...o } = e.props;
|
|
81
81
|
e.type === t.type ? r.push({
|
|
82
82
|
inputs: o,
|
|
83
83
|
within: n
|
|
84
|
-
}) :
|
|
84
|
+
}) : O(i, t, t.within !== void 0 && e.type === t.within ? o : n, r);
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function k(e, t) {
|
|
88
88
|
let n = [];
|
|
89
|
-
|
|
90
|
-
let r =
|
|
91
|
-
return
|
|
89
|
+
O(e, t, null, n);
|
|
90
|
+
let r = m(n);
|
|
91
|
+
return v(r.current, n) || (r.current = n), r.current;
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
-
|
|
94
|
+
//#region libs/mintplayer-react-bootstrap/machine/src/mark-links.ts
|
|
95
|
+
var A = (e, t) => typeof e == "function" ? (...n) => [e(...n), t].filter(Boolean).join(" ") : [e, t].filter(Boolean).join(" ");
|
|
96
|
+
function j(e, t, n) {
|
|
97
|
+
return o.map(e, (e) => l(e) ? s(e, {
|
|
98
|
+
className: A(e.props.className, t),
|
|
99
|
+
"data-mps": n
|
|
100
|
+
}) : e);
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { S as MpSsr, C as MpTransferStateProvider, j as markLinks, E as reactCoreContext, r as reactFormProps, t as reactOptionProps, n as reactProps, e as reactStyle, k as useContent, D as useCore, a as useMachine, i as useSnapshot };
|
package/machine/src/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A component's consumer links (its direct child elements), marked with a
|
|
4
|
+
* Bootstrap class and the component's scope, so the scoped Bootstrap part
|
|
5
|
+
* (`.nav-link:where([data-mps])`) styles them. A router `Link`/`NavLink` passes
|
|
6
|
+
* both on to its `<a>`; a `className` function is kept and extended.
|
|
7
|
+
*/
|
|
8
|
+
export declare function markLinks(children: ReactNode, className: string, scope: string): ReactNode;
|
package/nav/index.mjs
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
|
|
2
|
+
import { markLinks as t, useCore as n } from "../machine/index.mjs";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
|
|
5
|
+
import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
|
|
6
|
+
import { Fragment as c, jsx as l } from "react/jsx-runtime";
|
|
7
|
+
import { NAV_LINK_CLASS as u, navCore as d, navItemCore as f, navScopedStyles as p } from "@mintplayer/ui-core/nav";
|
|
8
|
+
import { bootstrapNav as m } from "@mintplayer/ui-core/bootstrap/nav";
|
|
9
|
+
//#region libs/mintplayer-react-bootstrap/nav/src/generated/nav.view.generated.tsx
|
|
10
|
+
function h({ root: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
11
|
+
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("ul", {
|
|
12
|
+
"data-mps": "nav",
|
|
13
|
+
...e(t),
|
|
14
|
+
ref: o,
|
|
15
|
+
...a,
|
|
16
|
+
role: t.role ?? a?.role,
|
|
17
|
+
className: [t.class, i].filter(Boolean).join(" ") || void 0,
|
|
18
|
+
children: r ?? null
|
|
19
|
+
}) });
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region libs/mintplayer-react-bootstrap/nav/src/generated/BsNav.generated.tsx
|
|
23
|
+
var g = i(function({ variant: e = null, fill: t = !1, justified: r = !1, cardHeader: i = !1, className: c, children: u, ...f }, g) {
|
|
24
|
+
s(m.key, m.css, { order: m.order }), s("nav", p);
|
|
25
|
+
let _ = o(null);
|
|
26
|
+
a(g, () => _.current);
|
|
27
|
+
let v = n(d, {
|
|
28
|
+
variant: e,
|
|
29
|
+
fill: t,
|
|
30
|
+
justified: r,
|
|
31
|
+
cardHeader: i
|
|
32
|
+
}, {
|
|
33
|
+
idPrefix: "bs-nav",
|
|
34
|
+
label: f["aria-label"],
|
|
35
|
+
rootRef: _,
|
|
36
|
+
emit: () => void 0
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ l(h, {
|
|
39
|
+
...v.props,
|
|
40
|
+
className: c,
|
|
41
|
+
attrs: f,
|
|
42
|
+
rootRef: _,
|
|
43
|
+
children: u
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region libs/mintplayer-react-bootstrap/nav/src/generated/nav-item.view.generated.tsx
|
|
48
|
+
function _({ root: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
49
|
+
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ l("li", {
|
|
50
|
+
"data-mps": "nav",
|
|
51
|
+
...e(t),
|
|
52
|
+
ref: o,
|
|
53
|
+
...a,
|
|
54
|
+
role: t.role ?? a?.role,
|
|
55
|
+
className: [t.class, i].filter(Boolean).join(" ") || void 0,
|
|
56
|
+
children: r ?? null
|
|
57
|
+
}) });
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region libs/mintplayer-react-bootstrap/nav/src/nav-item.react.ts
|
|
61
|
+
function v({ children: e }) {
|
|
62
|
+
return t(e, u, "nav");
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region libs/mintplayer-react-bootstrap/nav/src/generated/BsNavItem.generated.tsx
|
|
66
|
+
var y = i(function({ className: e, children: t, ...i }, c) {
|
|
67
|
+
s(m.key, m.css, { order: m.order }), s("nav", p);
|
|
68
|
+
let u = o(null);
|
|
69
|
+
a(c, () => u.current);
|
|
70
|
+
let d = n(f, {}, {
|
|
71
|
+
idPrefix: "bs-nav-item",
|
|
72
|
+
label: i["aria-label"],
|
|
73
|
+
rootRef: u,
|
|
74
|
+
emit: () => void 0
|
|
75
|
+
});
|
|
76
|
+
return /* @__PURE__ */ l(_, {
|
|
77
|
+
...d.props,
|
|
78
|
+
className: e,
|
|
79
|
+
attrs: i,
|
|
80
|
+
rootRef: u,
|
|
81
|
+
children: r.createElement(v, null, t)
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { g as BsNav, y as BsNavItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NavInputs } from '@mintplayer/ui-core/nav';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BsNavProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['ul']>, 'variant' | 'fill' | 'justified' | 'cardHeader'> {
|
|
4
|
+
variant?: NavInputs['variant'];
|
|
5
|
+
fill?: NavInputs['fill'];
|
|
6
|
+
justified?: NavInputs['justified'];
|
|
7
|
+
cardHeader?: NavInputs['cardHeader'];
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Bootstrap's nav: a list of `bs-nav-item`s, plain or as tabs, pills or underline (#452).
|
|
12
|
+
*
|
|
13
|
+
* It ships the nav part, so a page that renders one needs no install of its own.
|
|
14
|
+
*/
|
|
15
|
+
export declare const BsNav: React.ForwardRefExoticComponent<BsNavProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface BsNavItemProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['li']>, never> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/** One nav entry around a consumer link, which becomes its `.nav-link`; `class="active"` marks the current one. */
|
|
6
|
+
export declare const BsNavItem: React.ForwardRefExoticComponent<BsNavItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavProps } from '@mintplayer/ui-core/nav';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type NavItemTemplateProps = {
|
|
4
|
+
root: NavProps['root'];
|
|
5
|
+
} & {
|
|
6
|
+
slots?: {};
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** Merged onto the root element after the bag. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** The consumer's remaining attributes, spread onto the root element. */
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
rootRef?: React.Ref<HTMLElementTagNameMap['li']>;
|
|
13
|
+
};
|
|
14
|
+
export declare function NavItemTemplate({ root, slots, children, className, attrs, rootRef }: NavItemTemplateProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavProps } from '@mintplayer/ui-core/nav';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type NavTemplateProps = {
|
|
4
|
+
root: NavProps['root'];
|
|
5
|
+
} & {
|
|
6
|
+
slots?: {};
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** Merged onto the root element after the bag. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** The consumer's remaining attributes, spread onto the root element. */
|
|
11
|
+
attrs?: Record<string, unknown>;
|
|
12
|
+
rootRef?: React.Ref<HTMLElementTagNameMap['ul']>;
|
|
13
|
+
};
|
|
14
|
+
export declare function NavTemplate({ root, slots, children, className, attrs, rootRef }: NavTemplateProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './generated';
|
package/navbar/index.mjs
CHANGED
|
@@ -1,50 +1,54 @@
|
|
|
1
1
|
import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { markLinks as n, reactCoreContext as r, useCore as i } from "../machine/index.mjs";
|
|
3
|
+
import * as a from "react";
|
|
4
|
+
import { forwardRef as o, useContext as s, useImperativeHandle as c, useRef as l } from "react";
|
|
5
|
+
import { installLightStyles as u } from "@mintplayer/ui-core/scoped-styles";
|
|
6
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { bootstrapDropdown as m } from "@mintplayer/ui-core/bootstrap/dropdown";
|
|
8
|
+
import { bootstrapNav as h } from "@mintplayer/ui-core/bootstrap/nav";
|
|
9
|
+
import { NAVBAR_NESTING as g, navbarCore as _, navbarDropdownCore as v, navbarItemCore as y, navbarNavCore as b, navbarScopedStyles as x } from "@mintplayer/ui-core/navbar";
|
|
10
|
+
import { bootstrapNavbar as S } from "@mintplayer/ui-core/bootstrap/navbar";
|
|
7
11
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/navbar.view.generated.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
12
|
+
function C({ view: n, brand: r, slots: i = {}, children: a, className: o, attrs: s, rootRef: c }) {
|
|
13
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ p("nav", {
|
|
10
14
|
"data-mps": "navbar",
|
|
11
15
|
...e(n.root),
|
|
12
|
-
ref:
|
|
16
|
+
ref: c,
|
|
13
17
|
...s,
|
|
14
18
|
role: n.root.role ?? s?.role,
|
|
15
19
|
className: [n.root.class, o].filter(Boolean).join(" ") || void 0,
|
|
16
20
|
children: [
|
|
17
|
-
i.brand ? /* @__PURE__ */
|
|
21
|
+
i.brand ? /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
18
22
|
"data-mps": "navbar",
|
|
19
23
|
...e(r),
|
|
20
24
|
children: i.brand === void 0 ? null : i.brand
|
|
21
25
|
}) }) : null,
|
|
22
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ f("input", {
|
|
23
27
|
"data-mps": "navbar",
|
|
24
28
|
...t(n.toggle)
|
|
25
29
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ f("label", {
|
|
27
31
|
"data-mps": "navbar",
|
|
28
32
|
...e(n.toggler),
|
|
29
|
-
children: i.toggler === void 0 ? /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
33
|
+
children: i.toggler === void 0 ? /* @__PURE__ */ p(d, { children: [
|
|
34
|
+
/* @__PURE__ */ f("span", {
|
|
31
35
|
"data-mps": "navbar",
|
|
32
36
|
...e(n.bar)
|
|
33
37
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ f("span", {
|
|
35
39
|
"data-mps": "navbar",
|
|
36
40
|
...e(n.bar)
|
|
37
41
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ f("span", {
|
|
39
43
|
"data-mps": "navbar",
|
|
40
44
|
...e(n.bar)
|
|
41
45
|
})
|
|
42
46
|
] }) : i.toggler
|
|
43
47
|
}),
|
|
44
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ f("div", {
|
|
45
49
|
"data-mps": "navbar",
|
|
46
50
|
...e(n.collapse),
|
|
47
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ f("div", {
|
|
48
52
|
"data-mps": "navbar",
|
|
49
53
|
...e(n.inner),
|
|
50
54
|
children: a ?? null
|
|
@@ -55,40 +59,40 @@ function _({ view: n, brand: r, slots: i = {}, children: a, className: o, attrs:
|
|
|
55
59
|
}
|
|
56
60
|
//#endregion
|
|
57
61
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/BsNavbar.generated.tsx
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
let b =
|
|
61
|
-
|
|
62
|
-
let
|
|
62
|
+
var w = o(function({ breakpoint: e = "md", color: t, expanded: n = !1, positioning: r, labels: a, onExpandedChange: o, brand: s, toggler: d, className: p, children: g, ...v }, y) {
|
|
63
|
+
u(m.key, m.css, { order: m.order }), u(h.key, h.css, { order: h.order }), u(S.key, S.css, { order: S.order }), u("navbar", x);
|
|
64
|
+
let b = l(null);
|
|
65
|
+
c(y, () => b.current);
|
|
66
|
+
let w = i(_, {
|
|
63
67
|
breakpoint: e,
|
|
64
68
|
color: t,
|
|
65
69
|
expanded: n,
|
|
66
|
-
positioning:
|
|
67
|
-
labels:
|
|
70
|
+
positioning: r,
|
|
71
|
+
labels: a
|
|
68
72
|
}, {
|
|
69
73
|
idPrefix: "bs-navbar",
|
|
70
74
|
label: v["aria-label"],
|
|
71
75
|
rootRef: b,
|
|
72
76
|
emit: (e, t) => {
|
|
73
|
-
e === "expandedChange" &&
|
|
77
|
+
e === "expandedChange" && o?.(t);
|
|
74
78
|
}
|
|
75
79
|
});
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
...
|
|
80
|
+
return /* @__PURE__ */ f(C, {
|
|
81
|
+
...w.props,
|
|
78
82
|
slots: {
|
|
79
|
-
brand:
|
|
80
|
-
toggler:
|
|
83
|
+
brand: s,
|
|
84
|
+
toggler: d
|
|
81
85
|
},
|
|
82
|
-
className:
|
|
86
|
+
className: p,
|
|
83
87
|
attrs: v,
|
|
84
88
|
rootRef: b,
|
|
85
|
-
children:
|
|
89
|
+
children: g
|
|
86
90
|
});
|
|
87
91
|
});
|
|
88
92
|
//#endregion
|
|
89
93
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/navbar-nav.view.generated.tsx
|
|
90
|
-
function
|
|
91
|
-
return /* @__PURE__ */
|
|
94
|
+
function T({ bag: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
95
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
92
96
|
"data-mps": "navbar",
|
|
93
97
|
...e(t),
|
|
94
98
|
ref: o,
|
|
@@ -100,28 +104,28 @@ function y({ bag: t, slots: n = {}, children: r, className: i, attrs: a, rootRef
|
|
|
100
104
|
}
|
|
101
105
|
//#endregion
|
|
102
106
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/BsNavbarNav.generated.tsx
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
let
|
|
106
|
-
a
|
|
107
|
-
let
|
|
107
|
+
var E = o(function({ align: e = "start", className: t, children: n, ...r }, a) {
|
|
108
|
+
u(m.key, m.css, { order: m.order }), u(h.key, h.css, { order: h.order }), u(S.key, S.css, { order: S.order }), u("navbar", x);
|
|
109
|
+
let o = l(null);
|
|
110
|
+
c(a, () => o.current);
|
|
111
|
+
let s = i(b, { align: e }, {
|
|
108
112
|
idPrefix: "bs-navbar-nav",
|
|
109
|
-
label:
|
|
110
|
-
rootRef:
|
|
113
|
+
label: r["aria-label"],
|
|
114
|
+
rootRef: o,
|
|
111
115
|
emit: () => void 0
|
|
112
116
|
});
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
...
|
|
117
|
+
return /* @__PURE__ */ f(T, {
|
|
118
|
+
...s.props,
|
|
115
119
|
className: t,
|
|
116
|
-
attrs:
|
|
117
|
-
rootRef:
|
|
120
|
+
attrs: r,
|
|
121
|
+
rootRef: o,
|
|
118
122
|
children: n
|
|
119
123
|
});
|
|
120
124
|
});
|
|
121
125
|
//#endregion
|
|
122
126
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/navbar-item.view.generated.tsx
|
|
123
|
-
function
|
|
124
|
-
return /* @__PURE__ */
|
|
127
|
+
function D({ bag: t, slots: n = {}, children: r, className: i, attrs: a, rootRef: o }) {
|
|
128
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ f("div", {
|
|
125
129
|
"data-mps": "navbar",
|
|
126
130
|
...e(t),
|
|
127
131
|
ref: o,
|
|
@@ -132,43 +136,49 @@ function x({ bag: t, slots: n = {}, children: r, className: i, attrs: a, rootRef
|
|
|
132
136
|
}) });
|
|
133
137
|
}
|
|
134
138
|
//#endregion
|
|
139
|
+
//#region libs/mintplayer-react-bootstrap/navbar/src/navbar-item.react.ts
|
|
140
|
+
function O({ children: e }) {
|
|
141
|
+
let { depth: t } = s(r(g));
|
|
142
|
+
return t >= 0 ? e : n(e, "nav-link", "navbar");
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
135
145
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/BsNavbarItem.generated.tsx
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
let d =
|
|
139
|
-
|
|
140
|
-
let
|
|
146
|
+
var k = o(function({ active: e = !1, disabled: t = !1, className: n, children: r, ...o }, s) {
|
|
147
|
+
u(m.key, m.css, { order: m.order }), u(h.key, h.css, { order: h.order }), u(S.key, S.css, { order: S.order }), u("navbar", x);
|
|
148
|
+
let d = l(null);
|
|
149
|
+
c(s, () => d.current);
|
|
150
|
+
let p = i(y, {
|
|
141
151
|
active: e,
|
|
142
152
|
disabled: t
|
|
143
153
|
}, {
|
|
144
154
|
idPrefix: "bs-navbar-item",
|
|
145
|
-
label:
|
|
155
|
+
label: o["aria-label"],
|
|
146
156
|
rootRef: d,
|
|
147
157
|
emit: () => void 0
|
|
148
158
|
});
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
...
|
|
159
|
+
return /* @__PURE__ */ f(D, {
|
|
160
|
+
...p.props,
|
|
151
161
|
className: n,
|
|
152
|
-
attrs:
|
|
162
|
+
attrs: o,
|
|
153
163
|
rootRef: d,
|
|
154
|
-
children:
|
|
164
|
+
children: a.createElement(O, null, r)
|
|
155
165
|
});
|
|
156
166
|
});
|
|
157
167
|
//#endregion
|
|
158
168
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/navbar-dropdown.view.generated.tsx
|
|
159
|
-
function
|
|
160
|
-
return /* @__PURE__ */
|
|
169
|
+
function A({ view: t, label: n, slots: r = {}, children: i, className: a, attrs: o, rootRef: s }) {
|
|
170
|
+
return /* @__PURE__ */ f(d, { children: /* @__PURE__ */ p("details", {
|
|
161
171
|
"data-mps": "navbar",
|
|
162
172
|
...e(t.details),
|
|
163
173
|
ref: s,
|
|
164
174
|
...o,
|
|
165
175
|
role: t.details.role ?? o?.role,
|
|
166
176
|
className: [t.details.class, a].filter(Boolean).join(" ") || void 0,
|
|
167
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ f("summary", {
|
|
168
178
|
"data-mps": "navbar",
|
|
169
179
|
...e(t.summary),
|
|
170
|
-
children: r.labelTemplate === void 0 ? /* @__PURE__ */
|
|
171
|
-
}), /* @__PURE__ */
|
|
180
|
+
children: r.labelTemplate === void 0 ? /* @__PURE__ */ f(d, { children: n }) : r.labelTemplate
|
|
181
|
+
}), /* @__PURE__ */ f("div", {
|
|
172
182
|
"data-mps": "navbar",
|
|
173
183
|
...e(t.panel),
|
|
174
184
|
children: i ?? null
|
|
@@ -177,30 +187,30 @@ function C({ view: t, label: n, slots: r = {}, children: i, className: a, attrs:
|
|
|
177
187
|
}
|
|
178
188
|
//#endregion
|
|
179
189
|
//#region libs/mintplayer-react-bootstrap/navbar/src/generated/BsNavbarDropdown.generated.tsx
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
let
|
|
183
|
-
|
|
184
|
-
let
|
|
190
|
+
var j = r(g), M = o(function({ label: e, active: t = !1, labelTemplate: n, className: r, children: a, ...o }, s) {
|
|
191
|
+
u(m.key, m.css, { order: m.order }), u(h.key, h.css, { order: h.order }), u(S.key, S.css, { order: S.order }), u("navbar", x);
|
|
192
|
+
let d = l(null);
|
|
193
|
+
c(s, () => d.current);
|
|
194
|
+
let p = i(v, {
|
|
185
195
|
label: e,
|
|
186
196
|
active: t
|
|
187
197
|
}, {
|
|
188
198
|
idPrefix: "bs-navbar-dropdown",
|
|
189
|
-
label:
|
|
190
|
-
rootRef:
|
|
199
|
+
label: o["aria-label"],
|
|
200
|
+
rootRef: d,
|
|
191
201
|
emit: () => void 0
|
|
192
202
|
});
|
|
193
|
-
return /* @__PURE__ */
|
|
194
|
-
value:
|
|
195
|
-
children: /* @__PURE__ */
|
|
196
|
-
...
|
|
203
|
+
return /* @__PURE__ */ f(j.Provider, {
|
|
204
|
+
value: p.provided,
|
|
205
|
+
children: /* @__PURE__ */ f(A, {
|
|
206
|
+
...p.props,
|
|
197
207
|
slots: { labelTemplate: n },
|
|
198
|
-
className:
|
|
199
|
-
attrs:
|
|
200
|
-
rootRef:
|
|
201
|
-
children:
|
|
208
|
+
className: r,
|
|
209
|
+
attrs: o,
|
|
210
|
+
rootRef: d,
|
|
211
|
+
children: a
|
|
202
212
|
})
|
|
203
213
|
});
|
|
204
214
|
});
|
|
205
215
|
//#endregion
|
|
206
|
-
export {
|
|
216
|
+
export { w as BsNavbar, M as BsNavbarDropdown, k as BsNavbarItem, E as BsNavbarNav };
|