@sheetxl/utils-mui 0.8.0-beta.11 → 0.8.0-beta.13
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/browser/esm/{C-5x5uhaeRkhCSzY.mjs → DfXWkYz_cy1RzTD5.mjs} +2 -2
- package/browser/esm/index.mjs +276 -245
- package/browser/esm/{BfHjPJF6LKjMxxHM.mjs → kxao4ZpZkzvhrq_0.mjs} +630 -624
- package/node/esm/{nxST0XJIy9Y6DTRo.mjs → CBjPjFMDqYBne5cK.mjs} +1 -1
- package/node/esm/index.mjs +370 -332
- package/package.json +3 -3
- package/types/src/command/CommandGroup.d.ts +1 -1
- package/types/src/command/CommandPopupButton.d.ts +3 -3
- package/types/src/components/ContextMenu.d.ts +2 -2
- package/types/src/components/ScrollButtons.d.ts +3 -3
- package/types/src/float/ExhibitFloatPanel.d.ts +4 -4
- package/types/src/float/ExhibitFloatProvider.d.ts +1 -1
- package/types/src/float/ExhibitPopup.d.ts +15 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/utils-mui",
|
|
3
3
|
"description": "Utilities MUI - Utilities for MUI Components needed for all SheetXL components.",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.13",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"ui"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
47
|
-
"@sheetxl/utils-react": "^0.8.0-beta.
|
|
46
|
+
"@sheetxl/utils": "^0.8.0-beta.13",
|
|
47
|
+
"@sheetxl/utils-react": "^0.8.0-beta.13",
|
|
48
48
|
"clsx": "^2.1.1",
|
|
49
49
|
"detect-it": "^4.0.1",
|
|
50
50
|
"mui-modal-provider": "2.4.6",
|
|
@@ -37,7 +37,7 @@ export interface RenderMembersOptions {
|
|
|
37
37
|
* a `CommandButton`.
|
|
38
38
|
*/
|
|
39
39
|
export declare function renderMembers(members: (string | '-' | null | CommandButtonEntry)[] | null | undefined, opts?: RenderMembersOptions): React.ReactNode[];
|
|
40
|
-
export interface CommandGroupProps extends Omit<CommandPopupButtonProps, '
|
|
40
|
+
export interface CommandGroupProps extends Omit<CommandPopupButtonProps, 'renderPopupPanel'> {
|
|
41
41
|
/**
|
|
42
42
|
* Key of a {@link CommandButtonEntry} registered in the {@link ICommandButtonRegistry}. Also
|
|
43
43
|
* the resolution scope for the panel's members (`command.getLabel(groupKey)`).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CommandButtonType, Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { CommandButtonType, Command, RenderSlotFn } from '@sheetxl/utils-react';
|
|
3
3
|
import { ExhibitPopupIconButtonProps } from '../button';
|
|
4
4
|
import { ExhibitPopupPanelProps } from '../float';
|
|
5
5
|
export type CommandPopupButtonRefAttribute = {
|
|
@@ -9,12 +9,12 @@ export type CommandPopupButtonRefAttribute = {
|
|
|
9
9
|
* Attach a command to a popup.
|
|
10
10
|
* Note
|
|
11
11
|
*/
|
|
12
|
-
export interface CommandPopupButtonProps<STATE = any, CONTEXT = any> extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "
|
|
12
|
+
export interface CommandPopupButtonProps<STATE = any, CONTEXT = any> extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "renderPopupPanel"> {
|
|
13
13
|
quickCommand?: string;
|
|
14
14
|
icon?: React.ReactNode | ((command: Command.ResolvedCommand) => React.ReactNode) | string;
|
|
15
15
|
label?: React.ReactNode | ((command: Command.ResolvedCommand) => React.ReactNode);
|
|
16
16
|
disableHover?: boolean;
|
|
17
|
-
|
|
17
|
+
renderPopupPanel?: RenderSlotFn<ExhibitPopupPanelProps>;
|
|
18
18
|
/**
|
|
19
19
|
* Styling
|
|
20
20
|
* @defaultValue CommandButtonType.Toolbar
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Theme, SxProps } from '@mui/system';
|
|
3
|
-
import { FloatReference, FloatPopperProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { FloatReference, FloatPopperProps, RenderSlotFn } from '@sheetxl/utils-react';
|
|
4
4
|
import { ExhibitPopupPanelProps } from '../float';
|
|
5
5
|
export interface ContextMenuAttributes {
|
|
6
6
|
isContextMenu: () => true;
|
|
@@ -12,7 +12,7 @@ export interface ContextMenuProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
12
12
|
sx?: SxProps<Theme>;
|
|
13
13
|
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
14
|
parentFloat?: FloatReference;
|
|
15
|
-
|
|
15
|
+
renderPopupPanel?: RenderSlotFn<ExhibitPopupPanelProps>;
|
|
16
16
|
/**
|
|
17
17
|
* Passed to the underlying popup panel
|
|
18
18
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ScrollButtonProps } from '@sheetxl/utils-react';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const defaultRenderScrollButtonEdge: (props: ScrollButtonProps) => React.ReactNode;
|
|
4
4
|
export declare const createScrollButton: (props: ScrollButtonProps, icon: React.ReactElement, title: string, description: string) => React.JSX.Element;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const defaultRenderScrollButtonStart: (props: ScrollButtonProps) => React.ReactNode;
|
|
6
|
+
export declare const defaultRenderScrollButtonEnd: (props: ScrollButtonProps) => React.ReactNode;
|
|
7
7
|
//# sourceMappingURL=ScrollButtons.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
|
+
import { RenderSlotFn, FloatPopperProps, FloatPopperPosition, FloatPanelProps } from '@sheetxl/utils-react';
|
|
3
4
|
import { ExhibitPopupPanelProps } from './ExhibitPopup';
|
|
4
|
-
import { FloatPopperProps, FloatPopperPosition, FloatPanelProps } from '@sheetxl/utils-react';
|
|
5
5
|
/**
|
|
6
6
|
* The MUI floating surface: a {@link FloatPopper} (a positioned portal)
|
|
7
7
|
* wrapping a themed {@link Paper}. This is the surface installed by
|
|
@@ -10,12 +10,12 @@ import { FloatPopperProps, FloatPopperPosition, FloatPanelProps } from '@sheetxl
|
|
|
10
10
|
*
|
|
11
11
|
* Mirrors the neutral {@link FloatPanelProps}, swapping the HTML base for MUI's
|
|
12
12
|
* {@link BoxProps} and re-typing the surface-specific fields
|
|
13
|
-
* (`
|
|
13
|
+
* (`renderPopupPanel`/`propsPopper`/`anchor*`) against the MUI surface.
|
|
14
14
|
*/
|
|
15
|
-
export type ExhibitFloatPanelProps = Omit<FloatPanelProps, keyof React.HTMLAttributes<HTMLDivElement> | 'anchorEl' | 'anchorPosition' | '
|
|
15
|
+
export type ExhibitFloatPanelProps = Omit<FloatPanelProps, keyof React.HTMLAttributes<HTMLDivElement> | 'anchorEl' | 'anchorPosition' | 'renderPopupPanel' | 'propsPopper'> & BoxProps & {
|
|
16
16
|
anchorEl?: any;
|
|
17
17
|
anchorPosition?: FloatPopperPosition;
|
|
18
|
-
|
|
18
|
+
renderPopupPanel?: RenderSlotFn<ExhibitPopupPanelProps> | null;
|
|
19
19
|
propsPopper?: Partial<FloatPopperProps>;
|
|
20
20
|
};
|
|
21
21
|
export declare const ExhibitFloatPanel: React.NamedExoticComponent<Omit<ExhibitFloatPanelProps, "ref"> & React.RefAttributes<any>>;
|
|
@@ -13,5 +13,5 @@ import { FloatProviderProps } from '@sheetxl/utils-react';
|
|
|
13
13
|
* Mount once near a MUI app root so every float below renders on the MUI
|
|
14
14
|
* surface. Other {@link FloatProviderProps} (e.g. `isolate`) pass through.
|
|
15
15
|
*/
|
|
16
|
-
export declare const ExhibitFloatProvider: (props: Omit<FloatProviderProps, "renderFloatPanel" | "
|
|
16
|
+
export declare const ExhibitFloatProvider: (props: Omit<FloatProviderProps, "renderFloatPanel" | "renderPopupPanel">) => React.ReactElement;
|
|
17
17
|
//# sourceMappingURL=ExhibitFloatProvider.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps, TooltipProps, IconButtonProps } from '@mui/material';
|
|
3
|
-
import { FloatReference, FloatPopupPanelProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { FloatReference, FloatPopupPanelProps, RenderSlotFn } from '@sheetxl/utils-react';
|
|
4
4
|
import { ExhibitFloatPanelProps } from './ExhibitFloatPanel';
|
|
5
5
|
/**
|
|
6
6
|
* The {@link FloatPopupPanelProps} content fields on the MUI {@link BoxProps}
|
|
@@ -15,9 +15,17 @@ export interface ExhibitQuickButtonProps extends IconButtonProps {
|
|
|
15
15
|
*/
|
|
16
16
|
tooltip?: NonNullable<React.ReactNode>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Wrap the button in a custom tooltip.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
renderTooltip?: (props: ButtonTooltipRenderProps) => React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* What a button's `renderTooltip` is handed: the MUI {@link TooltipProps} to wrap `children` in, and
|
|
24
|
+
* whether the tip is suppressed.
|
|
25
|
+
*/
|
|
26
|
+
export interface ButtonTooltipRenderProps extends TooltipProps {
|
|
27
|
+
/** Show no tip: the button's popup is open. Not a prop of the button itself. */
|
|
28
|
+
disabled: boolean;
|
|
21
29
|
}
|
|
22
30
|
export declare const PopupAutoFocus: {
|
|
23
31
|
readonly Popup: "popup";
|
|
@@ -59,7 +67,7 @@ export interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
59
67
|
*/
|
|
60
68
|
selected?: boolean;
|
|
61
69
|
parentFloat?: FloatReference;
|
|
62
|
-
|
|
70
|
+
renderPopupPanel?: RenderSlotFn<ExhibitPopupPanelProps> | null;
|
|
63
71
|
onPopupOpen?: () => void;
|
|
64
72
|
onPopupClose?: () => void;
|
|
65
73
|
propsPopup?: Partial<ExhibitFloatPanelProps>;
|
|
@@ -68,9 +76,9 @@ export interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
68
76
|
*/
|
|
69
77
|
tooltip?: NonNullable<React.ReactNode>;
|
|
70
78
|
/**
|
|
71
|
-
*
|
|
79
|
+
* Wrap the button in a custom tooltip.
|
|
72
80
|
*/
|
|
73
|
-
|
|
81
|
+
renderTooltip?: (props: ButtonTooltipRenderProps) => React.ReactNode;
|
|
74
82
|
/**
|
|
75
83
|
* If this set then the popup becomes a split button.
|
|
76
84
|
*/
|
|
@@ -92,6 +100,6 @@ export interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
92
100
|
*/
|
|
93
101
|
ripple?: React.ReactNode;
|
|
94
102
|
}
|
|
95
|
-
export declare const
|
|
103
|
+
export declare const defaultRenderPopupPanel: (props: ExhibitPopupPanelProps) => React.ReactElement<any>;
|
|
96
104
|
export declare const createDownArrow: (isSplit: boolean, dense: boolean, rotate: boolean) => React.JSX.Element;
|
|
97
105
|
//# sourceMappingURL=ExhibitPopup.d.ts.map
|