@mintplayer/react-bootstrap 19.4.0 → 19.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/react-bootstrap",
3
- "version": "19.4.0",
3
+ "version": "19.5.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,25 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import * as e from "react";
3
+ import { createComponent as l } from "@lit/react";
4
+ import { MpShell as m } from "@mintplayer/web-components/shell";
5
+ const s = l({
6
+ react: e,
7
+ tagName: "mp-shell",
8
+ elementClass: m,
9
+ events: {
10
+ onStatechange: "statechange"
11
+ }
12
+ }), h = e.forwardRef(function({ externalToggle: t, dismissOnNavigate: o, ...n }, r) {
13
+ return /* @__PURE__ */ a(
14
+ s,
15
+ {
16
+ ref: r,
17
+ ...t ? { "external-toggle": "" } : {},
18
+ ...o ? { "dismiss-on-navigate": "" } : {},
19
+ ...n
20
+ }
21
+ );
22
+ });
23
+ export {
24
+ h as BsShell
25
+ };
@@ -0,0 +1,35 @@
1
+ import { MpShell, ShellState, ShellStateChangeEventDetail } from '@mintplayer/web-components/shell';
2
+ import * as React from 'react';
3
+ /** Bootstrap breakpoint names accepted by `breakpoint`. */
4
+ export type ShellBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ export interface BsShellProps {
6
+ /** `auto` (default, responsive) | `show` (force open) | `hide` (force closed). */
7
+ state?: ShellState;
8
+ /** Breakpoint below which the sidebar starts collapsed. Default `md`. */
9
+ breakpoint?: ShellBreakpoint;
10
+ /** Expanded sidebar width (any CSS length), e.g. `"15rem"`. */
11
+ size?: string;
12
+ /** Hide the built-in hamburger and drive the toggle from a consumer-supplied control. */
13
+ externalToggle?: boolean;
14
+ /** Auto-close the overlay drawer when a sidebar link is clicked (narrow mode only). */
15
+ dismissOnNavigate?: boolean;
16
+ /** Fires when the sidebar toggle flips. */
17
+ onStatechange?: (event: CustomEvent<ShellStateChangeEventDetail>) => void;
18
+ className?: string;
19
+ children?: React.ReactNode;
20
+ }
21
+ /**
22
+ * React wrapper for `<mp-shell>` — the responsive sidebar layout shell.
23
+ * Side-effect-registers the WC on import.
24
+ *
25
+ * The layout is server-rendered as Declarative Shadow DOM (see
26
+ * `injectMpShellDsd` in `@mintplayer/web-components/shell/ssr`), so the sidebar
27
+ * and its hamburger toggle work with JavaScript disabled. Place the sidebar as
28
+ * a child with `slot="sidebar"`; any other children are the main content.
29
+ *
30
+ * <BsShell breakpoint="md">
31
+ * <nav slot="sidebar">…</nav>
32
+ * <main>…</main>
33
+ * </BsShell>
34
+ */
35
+ export declare const BsShell: React.ForwardRefExoticComponent<BsShellProps & React.RefAttributes<MpShell>>;
@@ -0,0 +1,3 @@
1
+ export { BsShell } from './BsShell';
2
+ export type { BsShellProps, ShellBreakpoint } from './BsShell';
3
+ export type { ShellState, ShellStateChangeEventDetail } from '@mintplayer/web-components/shell';