@leonardaustin/ui 0.18.0 → 0.19.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/dist/components/ui/DetailPanel.d.ts +33 -20
- package/dist/components/ui/DetailPanel.d.ts.map +1 -1
- package/dist/components/ui/SideSheet.d.ts.map +1 -1
- package/dist/index.js +1624 -1519
- package/dist/lib/panelResize.d.ts +3 -0
- package/dist/lib/panelResize.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
interface DetailPanelProps {
|
|
3
|
-
/**
|
|
4
|
-
* Whether the panel is open. It stays mounted, and its width animates
|
|
5
|
-
* between 0 and the current width; its content renders only while open.
|
|
6
|
-
*/
|
|
2
|
+
export interface DetailPanelProps {
|
|
3
|
+
/** Content renders only while open. Closing animates the width to zero. */
|
|
7
4
|
open: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Called when the user asks to close: the close button, or Escape when this
|
|
10
|
-
* is the top-most overlay. The panel doesn't close itself; set `open` to
|
|
11
|
-
* `false` here.
|
|
12
|
-
*/
|
|
5
|
+
/** Close request from the button or Escape. Consumers may intercept it. */
|
|
13
6
|
onClose: () => void;
|
|
14
|
-
/**
|
|
15
|
-
title:
|
|
16
|
-
/** The panel body, which scrolls when taller than the panel. */
|
|
7
|
+
/** Visible heading and accessible name for the non-modal region. */
|
|
8
|
+
title: ReactNode;
|
|
17
9
|
children: ReactNode;
|
|
18
|
-
/** Additional utility classes for the panel root, for example to set its height. */
|
|
19
10
|
className?: string;
|
|
20
|
-
/**
|
|
11
|
+
/** Additional header controls, before the close button. */
|
|
12
|
+
headerActions?: ReactNode;
|
|
13
|
+
/** Stick below --detail-panel-top (default 0px), with a viewport-height body. */
|
|
14
|
+
sticky?: boolean;
|
|
15
|
+
/** Allow pointer and keyboard resizing. Default true. */
|
|
21
16
|
resizable?: boolean;
|
|
22
|
-
/**
|
|
17
|
+
/** Pixel sizing is used when no fraction props are supplied. Defaults to 360. */
|
|
23
18
|
defaultWidth?: number;
|
|
24
|
-
/**
|
|
19
|
+
/** Default 260px. */
|
|
25
20
|
minWidth?: number;
|
|
26
|
-
/**
|
|
21
|
+
/** Default 700px. */
|
|
27
22
|
maxWidth?: number;
|
|
23
|
+
/** Controlled share of the parent's content width (0–1). */
|
|
24
|
+
fraction?: number;
|
|
25
|
+
/** Initial/reset fraction. Default 0.5 in fraction mode. */
|
|
26
|
+
defaultFraction?: number;
|
|
27
|
+
/** Default 0.3 in fraction mode. */
|
|
28
|
+
minFraction?: number;
|
|
29
|
+
/** Default 0.7 in fraction mode. */
|
|
30
|
+
maxFraction?: number;
|
|
31
|
+
/** Resize request; persistence belongs to the consumer. */
|
|
32
|
+
onFractionChange?: (fraction: number) => void;
|
|
33
|
+
/** Show a 3rem rail while preserving mounted body content. Default false. */
|
|
34
|
+
collapsed?: boolean;
|
|
35
|
+
/** Supplying this renders collapse/expand controls. */
|
|
36
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
37
|
+
railIndicator?: ReactNode;
|
|
38
|
+
/** Position over the right side of a positioned parent, without a backdrop. */
|
|
39
|
+
overlay?: boolean;
|
|
40
|
+
/** Focus the heading on opening. Default true. Closing never restores focus. */
|
|
41
|
+
autoFocus?: boolean;
|
|
28
42
|
}
|
|
29
|
-
export declare function DetailPanel({ open, onClose, title, children, className, resizable, defaultWidth, minWidth, maxWidth, }: DetailPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export {};
|
|
43
|
+
export declare function DetailPanel({ open, onClose, title, children, className, headerActions, sticky, resizable, defaultWidth, minWidth, maxWidth, fraction, defaultFraction, minFraction, maxFraction, onFractionChange, collapsed, onCollapsedChange, railIndicator, overlay, autoFocus, }: DetailPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
31
44
|
//# sourceMappingURL=DetailPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,IAAI,EAAE,OAAO,CAAC;IACd,2EAA2E;IAC3E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oEAAoE;IACpE,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,MAAc,EACd,SAAgB,EAChB,YAAkB,EAClB,QAAc,EACd,QAAc,EACd,QAAQ,EACR,eAAe,EACf,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,OAAe,EACf,SAAgB,GACjB,EAAE,gBAAgB,2CAuSlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ui/SideSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SideSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ui/SideSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAoBf,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;IACpB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAc,EACd,cAA4B,EAC5B,SAAiB,EACjB,SAAS,EACT,gBAAgB,GACjB,EAAE,cAAc,sCAwFhB"}
|