@sheetxl/utils-mui 0.7.27 → 0.7.28-beta.1
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/cjs/CMDyOaq_TZmhbR3R.cjs +1 -0
- package/browser/cjs/GeHQP4M_1ydWv9v4.cjs +3 -0
- package/browser/cjs/index.cjs +4 -7
- package/browser/esm/CS_JzxfpVf9TlNsZ.mjs +96 -0
- package/browser/esm/DTtDTwN0K4atO3Er.mjs +2544 -0
- package/browser/esm/index.mjs +2688 -72
- package/licenses/dependencies.txt +60 -198
- package/node/esm/CbmHouxoPCCNwqGT.mjs +97 -0
- package/node/esm/index.mjs +3354 -981
- package/package.json +12 -14
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +16 -0
- package/resources/locales/de/ui.msg.json +22 -0
- package/resources/locales/en/ui.msg.json +22 -0
- package/types/index.d.ts +2 -1068
- package/types/src/button/ButtonContent.d.ts +17 -0
- package/types/src/button/ExhibitIconButton.d.ts +31 -0
- package/types/src/button/ExhibitMenuHeader.d.ts +15 -0
- package/types/src/button/ExhibitMenuItem.d.ts +24 -0
- package/types/src/button/ExhibitOptionButton.d.ts +16 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts +18 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts +8 -0
- package/types/src/button/ExhibitTooltip.d.ts +26 -0
- package/types/src/button/OverflowPalette.d.ts +29 -0
- package/types/src/button/SelectedIcon.d.ts +18 -0
- package/types/src/button/index.d.ts +11 -0
- package/types/src/command/CommandButton.d.ts +4 -0
- package/types/src/command/CommandGroup.d.ts +71 -0
- package/types/src/command/CommandPopupButton.d.ts +34 -0
- package/types/src/command/CommandToolbar.d.ts +51 -0
- package/types/src/command/CommandTooltip.d.ts +22 -0
- package/types/src/command/InputCommandButton.d.ts +20 -0
- package/types/src/command/ToggleGroupButton.d.ts +33 -0
- package/types/src/command/index.d.ts +8 -0
- package/types/src/command/useManagedRipple.d.ts +23 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts +45 -0
- package/types/src/components/ChipStrip.d.ts +9 -0
- package/types/src/components/ContextMenu.d.ts +32 -0
- package/types/src/components/ExhibitDivider.d.ts +6 -0
- package/types/src/components/NestingPopupButton.d.ts +11 -0
- package/types/src/components/ScrollButtons.d.ts +7 -0
- package/types/src/components/SimpleTooltip.d.ts +15 -0
- package/types/src/components/StackTrace.d.ts +20 -0
- package/types/src/components/StackTraceErrorPanel.d.ts +28 -0
- package/types/src/components/index.d.ts +10 -0
- package/types/src/dialog/InputDialog.d.ts +8 -0
- package/types/src/dialog/InternalWindow.d.ts +142 -0
- package/types/src/dialog/OptionsDialog.d.ts +19 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/dialog/useInputDialog.d.ts +6 -0
- package/types/src/dialog/useLazyWindow.d.ts +14 -0
- package/types/src/dialog/useOptionsDialog.d.ts +8 -0
- package/types/src/float/ExhibitFloatPanel.d.ts +22 -0
- package/types/src/float/ExhibitFloatProvider.d.ts +17 -0
- package/types/src/float/ExhibitPopup.d.ts +97 -0
- package/types/src/float/index.d.ts +4 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/locales/index.d.ts +3 -0
- package/types/src/theme/ExhibitTheme.d.ts +71 -0
- package/types/src/theme/IconSupport.d.ts +11 -0
- package/types/src/theme/ScrollbarTheming.d.ts +12 -0
- package/types/src/theme/index.d.ts +4 -0
- package/browser/cjs/DaEKEZaG-FHdWrtX.cjs +0 -6
- package/browser/cjs/DfODF1nk9pC8WaMc.cjs +0 -11
- package/browser/esm/CvYgOZcfwT-xE3Sk.mjs +0 -2891
- package/browser/esm/i2MzZuUDebibOGmf.mjs +0 -44
- package/node/assets/style.css +0 -1
- package/node/esm/CaDPRPvErt0JK4E-.mjs +0 -45
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* `sx` for a button's inline text label — the theme font at `subtitle2` size, single line, no
|
|
5
|
+
* uppercasing. A bare MUI icon button leaves text children unstyled (browser serif, default size),
|
|
6
|
+
* so any button that renders a label as content applies this. Mirrors `LabelIcon`'s text styling and
|
|
7
|
+
* is the single source of truth for `ExhibitPopupIconButton` and `CommandButton` (leaf).
|
|
8
|
+
*/
|
|
9
|
+
export declare const buttonLabelSx: SxProps<Theme>;
|
|
10
|
+
/**
|
|
11
|
+
* Compose a button's visible content from a `glyph` (icon / split-toggle checkmark) and an optional
|
|
12
|
+
* text `label`. The label renders only when non-empty and is wrapped in a themed `Typography` (see
|
|
13
|
+
* {@link buttonLabelSx}). With both present they sit side-by-side; otherwise whichever exists is
|
|
14
|
+
* returned (or `undefined` when neither does — the caller/downstream supplies any blank spacer).
|
|
15
|
+
*/
|
|
16
|
+
export declare function composeButtonContent(glyph: React.ReactNode, label: React.ReactNode): React.ReactNode;
|
|
17
|
+
//# sourceMappingURL=ButtonContent.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconButtonProps } from '@mui/material';
|
|
3
|
+
import { ExhibitTooltipProps } from './ExhibitTooltip';
|
|
4
|
+
export interface ExhibitIconButtonProps extends IconButtonProps {
|
|
5
|
+
dense?: boolean;
|
|
6
|
+
outlined?: boolean;
|
|
7
|
+
icon?: React.ReactNode | (() => React.ReactNode);
|
|
8
|
+
disableHover?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* If the icon button is a primary icon button.
|
|
11
|
+
* This may change the color of the text and icon.
|
|
12
|
+
* @defaultValue false
|
|
13
|
+
*/
|
|
14
|
+
primary?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* If set to a `boolean` the button will act like a toggle.
|
|
17
|
+
*/
|
|
18
|
+
selected?: boolean | null;
|
|
19
|
+
/**
|
|
20
|
+
* Tooltip properties. If this is specified then the tooltips are used.
|
|
21
|
+
* Do not provide a child as this component will be the child.
|
|
22
|
+
*/
|
|
23
|
+
propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* This is a simple styled icon button.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ExhibitIconButton: React.FC<ExhibitIconButtonProps & {
|
|
29
|
+
ref?: any;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=ExhibitIconButton.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material';
|
|
3
|
+
export interface ExhibitMenuHeaderProps extends TypographyProps {
|
|
4
|
+
/**
|
|
5
|
+
* If the icon button is a secondary text button.
|
|
6
|
+
* Changes the color of the text and icon.
|
|
7
|
+
* @defaultValue false
|
|
8
|
+
*/
|
|
9
|
+
primary?: boolean;
|
|
10
|
+
variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
11
|
+
}
|
|
12
|
+
export declare const ExhibitMenuHeader: React.FC<ExhibitMenuHeaderProps & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=ExhibitMenuHeader.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ListItemButtonProps } from '@mui/material';
|
|
3
|
+
import { ExhibitIconButtonProps } from './ExhibitIconButton';
|
|
4
|
+
import { ExhibitTooltipProps } from './ExhibitTooltip';
|
|
5
|
+
export interface ExhibitMenuItemProps extends ListItemButtonProps {
|
|
6
|
+
icon?: React.ReactNode | (() => React.ReactNode);
|
|
7
|
+
renderIcon?: (props: ExhibitIconButtonProps) => React.ReactElement;
|
|
8
|
+
/**
|
|
9
|
+
* If the icon button is a secondary text button.
|
|
10
|
+
* Change the color of the text and icon.
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
primary?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Tooltip properties. If this is specified then the tooltips are used.
|
|
16
|
+
* Do not provide a child as this component will be the child.
|
|
17
|
+
*/
|
|
18
|
+
propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
|
|
19
|
+
chips?: string | string[] | React.ReactNode | React.ReactNode[];
|
|
20
|
+
}
|
|
21
|
+
export declare const ExhibitMenuItem: React.FC<ExhibitMenuItemProps & {
|
|
22
|
+
ref?: any;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=ExhibitMenuItem.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IKeyStroke } from '@sheetxl/utils-react';
|
|
3
|
+
import { ExhibitIconButtonProps } from '.';
|
|
4
|
+
interface ExhibitOptionButtonProps extends ExhibitIconButtonProps {
|
|
5
|
+
onSelectToggle?: (value: boolean) => void;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
label: NonNullable<React.ReactNode>;
|
|
8
|
+
shortcut?: IKeyStroke;
|
|
9
|
+
preventFocus?: boolean;
|
|
10
|
+
tabIndex?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const ExhibitOptionButton: React.FC<ExhibitOptionButtonProps & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ExhibitOptionButton.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme, BoxProps } from '@mui/material';
|
|
3
|
+
import { ExhibitPopupButtonProps } from '../float';
|
|
4
|
+
export interface OutlineBorder {
|
|
5
|
+
color?: string | ((theme: Theme) => string);
|
|
6
|
+
hoverColor?: string | ((theme: Theme) => string);
|
|
7
|
+
focusColor?: string | ((theme: Theme) => string);
|
|
8
|
+
}
|
|
9
|
+
export interface ExhibitPopupIconButtonProps extends ExhibitPopupButtonProps {
|
|
10
|
+
dense?: boolean;
|
|
11
|
+
outlined?: boolean | OutlineBorder;
|
|
12
|
+
disableHover?: boolean;
|
|
13
|
+
propsButton?: BoxProps;
|
|
14
|
+
}
|
|
15
|
+
export declare const ExhibitPopupIconButton: React.FC<ExhibitPopupIconButtonProps & {
|
|
16
|
+
ref?: any;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=ExhibitPopupIconButton.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ExhibitPopupButtonProps } from '../float';
|
|
3
|
+
export interface ExhibitPopupMenuItemProps extends ExhibitPopupButtonProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const ExhibitPopupMenuItem: React.FC<ExhibitPopupMenuItemProps & {
|
|
6
|
+
ref?: any;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=ExhibitPopupMenuItem.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
|
+
import { IKeyStroke, TranslateFn } from '@sheetxl/utils-react';
|
|
4
|
+
export interface ExhibitTooltipProps extends Omit<TooltipProps, "title"> {
|
|
5
|
+
title?: string | React.ReactNode;
|
|
6
|
+
/** Prevent tooltip from show */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: NonNullable<React.ReactNode>;
|
|
9
|
+
description?: NonNullable<React.ReactNode>;
|
|
10
|
+
/**
|
|
11
|
+
* If true returns a very simple text tooltip.
|
|
12
|
+
* @remarks
|
|
13
|
+
* All Exhibit tooltip props are ignored.
|
|
14
|
+
*/
|
|
15
|
+
simple?: boolean;
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
shortcut?: IKeyStroke;
|
|
18
|
+
useModifierSymbols?: boolean;
|
|
19
|
+
componentDisabled?: boolean;
|
|
20
|
+
chips?: string | string[] | React.ReactNode | React.ReactNode[];
|
|
21
|
+
}
|
|
22
|
+
export declare const toShortcutElements: (keyStroke: IKeyStroke | IKeyStroke[], t: TranslateFn, modifierSymbol?: boolean, key?: string | null) => React.ReactElement | null;
|
|
23
|
+
export declare const ExhibitTooltip: React.FC<ExhibitTooltipProps & {
|
|
24
|
+
ref?: any;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=ExhibitTooltip.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '@mui/material';
|
|
4
|
+
export interface OverflowPaletteAttributes {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Type returned via ref property
|
|
8
|
+
*/
|
|
9
|
+
export interface IOverflowPaletteElement extends HTMLDivElement, OverflowPaletteAttributes {
|
|
10
|
+
}
|
|
11
|
+
export interface OverflowPaletteProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/**
|
|
13
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
14
|
+
*/
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
/**
|
|
17
|
+
* Reference to the underlying element
|
|
18
|
+
*/
|
|
19
|
+
ref?: React.Ref<IOverflowPaletteElement>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Add children in a row layout but overflow into a popup with a 'more' button.
|
|
23
|
+
*
|
|
24
|
+
* TODO
|
|
25
|
+
* - Excel converts toolbar buttons to menu items. We could do this with the commands but would not be a 'general' solution and should
|
|
26
|
+
* be backed into CommandBar. (I sorta like the toolbar buttons better but will revisit.)
|
|
27
|
+
*/
|
|
28
|
+
export declare const OverflowPalette: React.NamedExoticComponent<Omit<OverflowPaletteProps, "ref"> & React.RefAttributes<IOverflowPaletteElement>>;
|
|
29
|
+
//# sourceMappingURL=OverflowPalette.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '@mui/material';
|
|
4
|
+
export interface SelectedIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
/**
|
|
6
|
+
* If this is set to false then will just render as a regular icon.
|
|
7
|
+
* @defaultValue true
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
13
|
+
*/
|
|
14
|
+
sx?: SxProps<Theme>;
|
|
15
|
+
outlined?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const SelectedIcon: React.NamedExoticComponent<SelectedIconProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
//# sourceMappingURL=SelectedIcon.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './ButtonContent';
|
|
2
|
+
export * from './ExhibitIconButton';
|
|
3
|
+
export * from './ExhibitMenuItem';
|
|
4
|
+
export * from './ExhibitMenuHeader';
|
|
5
|
+
export * from './ExhibitPopupIconButton';
|
|
6
|
+
export * from './ExhibitPopupMenuItem';
|
|
7
|
+
export * from './ExhibitOptionButton';
|
|
8
|
+
export * from './ExhibitTooltip';
|
|
9
|
+
export * from './SelectedIcon';
|
|
10
|
+
export * from './OverflowPalette';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandButtonRefAttribute, CommandButtonProps } from '@sheetxl/utils-react';
|
|
3
|
+
export declare const CommandButton: React.NamedExoticComponent<Omit<CommandButtonProps<any, any, void> & CommandButtonRefAttribute, "ref"> & React.RefAttributes<any>>;
|
|
4
|
+
//# sourceMappingURL=CommandButton.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandButtonType, ICommandButtonRegistry, CommandButtonEntry, CommandButtonProps } from '@sheetxl/utils-react';
|
|
3
|
+
import { CommandPopupButtonProps } from './CommandPopupButton';
|
|
4
|
+
/**
|
|
5
|
+
* Per-surface knobs for {@link renderMembers}. A surface (popup or toolbar) walks the same member
|
|
6
|
+
* list; these decide the leaf `variant`, divider orientation, and which props reach leaf buttons
|
|
7
|
+
* (`propsCommandButton`) vs nested groups (`propsCommandPopup`).
|
|
8
|
+
*/
|
|
9
|
+
export interface RenderMembersOptions {
|
|
10
|
+
/** Button variant applied to leaf buttons and nested groups (e.g. `Menuitem` for popups). */
|
|
11
|
+
variant?: CommandButtonType;
|
|
12
|
+
/** Orientation for `'-'`/`null` divider members. @defaultValue `'vertical'` */
|
|
13
|
+
dividerOrientation?: 'horizontal' | 'vertical';
|
|
14
|
+
/** Resolution scope (the registered group key) for member label/icon getters + command scope. */
|
|
15
|
+
groupKey?: string;
|
|
16
|
+
/** Default command state for members that do not carry their own `state`. */
|
|
17
|
+
commandState?: any;
|
|
18
|
+
/** Props applied to leaf command buttons ({@link CommandButton}). */
|
|
19
|
+
propsCommandButton?: Partial<CommandButtonProps> & React.Attributes;
|
|
20
|
+
/** Props applied to nested groups ({@link CommandGroup}). */
|
|
21
|
+
propsCommandPopup?: Partial<CommandButtonProps> & React.Attributes;
|
|
22
|
+
/**
|
|
23
|
+
* Registry used to resolve **bare-string** members registry-first (a registered item vs a plain
|
|
24
|
+
* command). Omit and bare strings are always treated as commands.
|
|
25
|
+
*/
|
|
26
|
+
registry?: ICommandButtonRegistry;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Walks a member list ({@link CommandButtonEntry.members}) into React nodes - the shared surface
|
|
30
|
+
* primitive. Both the popup surface ({@link CommandGroup}) and the toolbar surface (`CommandToolbar`)
|
|
31
|
+
* render through this; they differ only in {@link RenderMembersOptions}.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Each member is a **key** (resolved registry-first - a registered entry, else a plain command), a
|
|
35
|
+
* **divider** (`'-'` / `null`, leading / trailing / adjacent ones collapse), or an **inline entry**.
|
|
36
|
+
* An entry with its own `render` drives the control; else `members` ⇒ a nested `CommandGroup`, otherwise
|
|
37
|
+
* a `CommandButton`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderMembers(members: (string | '-' | null | CommandButtonEntry)[] | null | undefined, opts?: RenderMembersOptions): React.ReactNode[];
|
|
40
|
+
export interface CommandGroupProps extends Omit<CommandPopupButtonProps, 'createPopupPanel'> {
|
|
41
|
+
/**
|
|
42
|
+
* Key of a {@link CommandButtonEntry} registered in the {@link ICommandButtonRegistry}. Also
|
|
43
|
+
* the resolution scope for the panel's members (`command.getLabel(groupKey)`).
|
|
44
|
+
*
|
|
45
|
+
* @remarks Provide either `groupKey` (registered) or `members` (inline), not both.
|
|
46
|
+
*/
|
|
47
|
+
groupKey?: string;
|
|
48
|
+
/**
|
|
49
|
+
* An inline, anonymous member list - the un-registered alternative to `groupKey` (replaces
|
|
50
|
+
* `SimpleCommandPopupButton`'s `popupCommandKeys`).
|
|
51
|
+
*/
|
|
52
|
+
members?: (string | '-' | null | CommandButtonEntry)[];
|
|
53
|
+
/**
|
|
54
|
+
* Registry to resolve the group / renderers from.
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue the registry from {@link useCommandButtonRegistry} (context or shared singleton).
|
|
57
|
+
*/
|
|
58
|
+
registry?: ICommandButtonRegistry;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Renders a command group - a list of members (commands, dividers, nested groups) - as a popup /
|
|
62
|
+
* split button / menu. Members come from a registered group (`groupKey`) or inline (`members`).
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* The popup panel is built by recursion: a nested member (`{ group }` or an inline `{ members }`)
|
|
66
|
+
* renders through `CommandGroup` again. Menu-item labels/state resolve against the group key. The
|
|
67
|
+
* quick button is disabled when every member is disabled. On execute the panel closes its own float
|
|
68
|
+
* automatically (via `useCommands`/`useFloat`) — no per-button wiring.
|
|
69
|
+
*/
|
|
70
|
+
export declare const CommandGroup: React.NamedExoticComponent<Omit<CommandGroupProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
71
|
+
//# sourceMappingURL=CommandGroup.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandButtonType, Command } from '@sheetxl/utils-react';
|
|
3
|
+
import { ExhibitPopupIconButtonProps } from '../button';
|
|
4
|
+
import { ExhibitPopupPanelProps } from '../float';
|
|
5
|
+
export type CommandPopupButtonRefAttribute = {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Attach a command to a popup.
|
|
10
|
+
* Note
|
|
11
|
+
*/
|
|
12
|
+
export interface CommandPopupButtonProps<STATE = any, CONTEXT = any> extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "createPopupPanel"> {
|
|
13
|
+
quickCommand?: string;
|
|
14
|
+
icon?: React.ReactNode | ((command: Command.ResolvedCommand) => React.ReactNode) | string;
|
|
15
|
+
label?: React.ReactNode | ((command: Command.ResolvedCommand) => React.ReactNode);
|
|
16
|
+
disableHover?: boolean;
|
|
17
|
+
createPopupPanel?: (props: ExhibitPopupPanelProps) => React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Styling
|
|
20
|
+
* @defaultValue CommandButtonType.Toolbar
|
|
21
|
+
*/
|
|
22
|
+
variant?: CommandButtonType;
|
|
23
|
+
/**
|
|
24
|
+
* Optional state for this specific command button.
|
|
25
|
+
* @defaultValue to undefined
|
|
26
|
+
*/
|
|
27
|
+
commandState?: STATE;
|
|
28
|
+
/** The panel/group this renders in — selects `groupLabels` variants (see `CommandButtonOptions.groupKey`). */
|
|
29
|
+
groupKey?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const CommandPopupButton: React.FC<CommandPopupButtonProps & {
|
|
32
|
+
ref?: any;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=CommandPopupButton.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps, ToolbarProps } from '@mui/material';
|
|
3
|
+
import { CommandButtonOptions, FloatReference, CommandButtonEntry, ICommandButtonRegistry } from '@sheetxl/utils-react';
|
|
4
|
+
export interface CommandToolbarPopupButtonProps extends CommandButtonOptions {
|
|
5
|
+
}
|
|
6
|
+
export interface CommandToolbarButtonProps {
|
|
7
|
+
propsCommandButton: CommandButtonOptions;
|
|
8
|
+
propsCommandPopup: CommandToolbarPopupButtonProps;
|
|
9
|
+
}
|
|
10
|
+
export interface CommandToolbarProps extends ToolbarProps {
|
|
11
|
+
propsCommandButton?: CommandButtonOptions;
|
|
12
|
+
parentFloat?: FloatReference;
|
|
13
|
+
/**
|
|
14
|
+
* Key of a {@link CommandButtonEntry} registered in the {@link ICommandButtonRegistry}. The
|
|
15
|
+
* toolbar becomes a **surface** over that panel: its `members` render (via `renderMembers`) inside
|
|
16
|
+
* an {@link OverflowPalette}. Provide `groupKey` (registered), `members` (inline), or
|
|
17
|
+
* `renderToolbarPalette` (fully custom) - `renderToolbarPalette` wins when supplied.
|
|
18
|
+
*/
|
|
19
|
+
groupKey?: string;
|
|
20
|
+
/**
|
|
21
|
+
* An inline, anonymous member list - the un-registered alternative to `groupKey`.
|
|
22
|
+
*/
|
|
23
|
+
members?: (string | '-' | null | CommandButtonEntry)[];
|
|
24
|
+
/**
|
|
25
|
+
* Registry to resolve `groupKey` from.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue the registry from {@link useCommandButtonRegistry} (context or shared singleton).
|
|
28
|
+
*/
|
|
29
|
+
registry?: ICommandButtonRegistry;
|
|
30
|
+
/**
|
|
31
|
+
* Fully custom palette renderer (the escape hatch / back-compat). When provided it takes precedence
|
|
32
|
+
* over `groupKey` / `members`.
|
|
33
|
+
*/
|
|
34
|
+
renderToolbarPalette?: (props: CommandToolbarButtonProps) => React.ReactNode;
|
|
35
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
36
|
+
}
|
|
37
|
+
export interface CommandToolbarAttributes {
|
|
38
|
+
}
|
|
39
|
+
export interface ICommandToolbarElement extends HTMLDivElement, CommandToolbarAttributes {
|
|
40
|
+
}
|
|
41
|
+
export interface LabelIconProps extends BoxProps {
|
|
42
|
+
/** The panel/group this renders in — selects `groupLabels` variants (see `CommandButtonOptions.groupKey`). */
|
|
43
|
+
groupKey?: string;
|
|
44
|
+
commandKey?: string;
|
|
45
|
+
label?: React.ReactElement<any> | string;
|
|
46
|
+
/** `undefined` = default it (command icon, else the check glyph); `null` = exclude it (no icon). */
|
|
47
|
+
icon?: React.ReactElement<any> | null;
|
|
48
|
+
}
|
|
49
|
+
export declare const LabelIcon: (props: LabelIconProps) => React.JSX.Element;
|
|
50
|
+
export declare const CommandToolbar: React.NamedExoticComponent<Omit<CommandToolbarProps, "ref"> & React.RefAttributes<ICommandToolbarElement>>;
|
|
51
|
+
//# sourceMappingURL=CommandToolbar.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
|
+
import { IKeyStroke, ResolvedCommand } from '@sheetxl/utils-react';
|
|
4
|
+
export interface CommandTooltipProps extends Omit<TooltipProps, "title"> {
|
|
5
|
+
commandKey?: string;
|
|
6
|
+
command?: ResolvedCommand;
|
|
7
|
+
/**
|
|
8
|
+
* The shortcut to display.
|
|
9
|
+
* @remarks
|
|
10
|
+
* This is display only and doesn't actually track the shortcut.
|
|
11
|
+
* Override the display for the shortcut on the command (if available).
|
|
12
|
+
*/
|
|
13
|
+
shortcut?: IKeyStroke | IKeyStroke[];
|
|
14
|
+
/**
|
|
15
|
+
* Prevent tooltip from showing
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const CommandTooltip: React.FC<CommandTooltipProps & {
|
|
20
|
+
ref?: any;
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=CommandTooltip.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputBaseComponentProps } from '@mui/material';
|
|
3
|
+
import { CommandButtonProps } from '@sheetxl/utils-react';
|
|
4
|
+
export interface InputCommandButtonProps<STATE = any, CONTEXT = any> extends CommandButtonProps<STATE, CONTEXT> {
|
|
5
|
+
label?: React.ReactNode | string | (() => React.ReactNode | string);
|
|
6
|
+
inputProps?: InputBaseComponentProps;
|
|
7
|
+
/**
|
|
8
|
+
* Pass a ref to the `input` element.
|
|
9
|
+
*/
|
|
10
|
+
inputRef?: React.Ref<any>;
|
|
11
|
+
parseInput?: (value: string) => any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Binds an input control to a command.
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* Currently only supports numbers.
|
|
18
|
+
*/
|
|
19
|
+
export declare const InputCommandButton: React.FC<InputCommandButtonProps>;
|
|
20
|
+
//# sourceMappingURL=InputCommandButton.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandGroupProps } from './CommandGroup';
|
|
3
|
+
/**
|
|
4
|
+
* How the currently-active toggle is projected onto a {@link ToggleGroupButton}'s head.
|
|
5
|
+
* - `'quick'` - the active toggle becomes the split button's quick command (click re-applies it).
|
|
6
|
+
* - `'icon'` - the active toggle's icon becomes the button icon; the head only opens the popup.
|
|
7
|
+
*/
|
|
8
|
+
export type ToggleProjection = 'quick' | 'icon';
|
|
9
|
+
export interface ToggleGroupButtonProps extends CommandGroupProps {
|
|
10
|
+
/**
|
|
11
|
+
* How the active toggle projects onto the button head.
|
|
12
|
+
* @defaultValue `'quick'`
|
|
13
|
+
*/
|
|
14
|
+
projectAs?: ToggleProjection;
|
|
15
|
+
/**
|
|
16
|
+
* Fallback icon for `'icon'` projection when no member toggle is active.
|
|
17
|
+
*/
|
|
18
|
+
defaultIcon?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A {@link CommandGroup} over a set of mutually-exclusive **toggle** commands whose head reflects
|
|
22
|
+
* whichever toggle is currently active (e.g. the underline and text-overflow button groups): the
|
|
23
|
+
* toggle members come from a registered group (`groupKey`) or an inline `members` list, and
|
|
24
|
+
* `projectAs` picks how the active toggle surfaces on the head.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* All popup / disabled behavior is inherited from `CommandGroup` (the popup panel, `allDisabled`
|
|
28
|
+
* gating, float close). This component only computes the active toggle and hands `CommandGroup` the
|
|
29
|
+
* projected `quickCommand` / `icon`. It renders `<CommandGroup>` *directly* (not via the group's
|
|
30
|
+
* `render` escape hatch), so wiring this component as a group's `render` does not recurse.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ToggleGroupButton: React.NamedExoticComponent<Omit<ToggleGroupButtonProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
33
|
+
//# sourceMappingURL=ToggleGroupButton.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './CommandButton';
|
|
2
|
+
export * from './InputCommandButton';
|
|
3
|
+
export * from './CommandPopupButton';
|
|
4
|
+
export * from './CommandTooltip';
|
|
5
|
+
export * from './CommandToolbar';
|
|
6
|
+
export * from './CommandGroup';
|
|
7
|
+
export * from './ToggleGroupButton';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ManagedRipple {
|
|
3
|
+
/**
|
|
4
|
+
* An always-mounted ripple surface. Render it as a child of the (position: relative) button and
|
|
5
|
+
* set `disableRipple` on that button so MUI's own ripple doesn't double up.
|
|
6
|
+
*/
|
|
7
|
+
ripple: React.ReactNode;
|
|
8
|
+
/** Fire a one-shot ripple. Safe to call from any command dispatch path (click, keystroke, remote). */
|
|
9
|
+
trigger: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A self-managed ripple, decoupled from MUI ButtonBase's *lazy* ripple.
|
|
13
|
+
*
|
|
14
|
+
* MUI (v6+) mounts a button's `TouchRipple` lazily: `touchRippleRef.current` stays `null` until the
|
|
15
|
+
* user first pointer-/focus-interacts with THAT button. That defeats a programmatic ripple fired for
|
|
16
|
+
* *remote* command execution — a toolbar button flashing when its keyboard shortcut runs while the
|
|
17
|
+
* grid is focused — because the ref is null and `start()` no-ops. We instead render our OWN
|
|
18
|
+
* always-mounted `TouchRipple`, so {@link ManagedRipple.trigger} works regardless of prior interaction.
|
|
19
|
+
* The command button disables MUI's built-in ripple and lets this one handle every dispatch path
|
|
20
|
+
* (which is what `useCommands` already routes through `onExecute`).
|
|
21
|
+
*/
|
|
22
|
+
export declare function useManagedRipple(): ManagedRipple;
|
|
23
|
+
//# sourceMappingURL=useManagedRipple.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
import { LoadingPanelProps } from '@sheetxl/utils-react';
|
|
4
|
+
export interface AnimatedIconProps extends BoxProps {
|
|
5
|
+
speed?: number;
|
|
6
|
+
size?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* These super animated icons are from https://codepen.io/nikhil8krishnan. MIT attribution. Thank you Nikhil Krishnan
|
|
10
|
+
*
|
|
11
|
+
* Note - Currently svg animations do not animate if the main thread is blocked.
|
|
12
|
+
* https://codepen.io/mtf2000/pen/oNPwzap
|
|
13
|
+
*/
|
|
14
|
+
export declare const AnimatedClockIcon: React.FC<AnimatedIconProps>;
|
|
15
|
+
export declare const AnimatedCircleIcon: React.FC<AnimatedIconProps>;
|
|
16
|
+
export declare const AnimatedFadingEllipsisIcon: React.FC<AnimatedIconProps>;
|
|
17
|
+
export declare const AnimatedBouncingEllipsisIcon: React.FC<AnimatedIconProps>;
|
|
18
|
+
export declare const AnimatedOrbitIcon: React.FC<AnimatedIconProps>;
|
|
19
|
+
export interface AnimatedTraversingEllipsisIconProps extends BoxProps {
|
|
20
|
+
speed?: number;
|
|
21
|
+
size?: number;
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* This is the only AnimatedIcon that works with a blocking ui.
|
|
27
|
+
* Note - currently this has a hardcoded bounds of 61x13
|
|
28
|
+
*/
|
|
29
|
+
export declare const AnimatedTraversingEllipsisIcon: React.FC<AnimatedTraversingEllipsisIconProps>;
|
|
30
|
+
export interface AnimatedLoadingPanelProps extends LoadingPanelProps, Omit<BoxProps, 'label' | 'color' | 'ref' | 'children'> {
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
label?: string | React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Determinate progress as a fraction in `[0, 1]`. When a number, a determinate progress bar and
|
|
35
|
+
* percentage are shown in place of the animated `icon`; when `null`/`undefined` the indeterminate
|
|
36
|
+
* `icon` is shown.
|
|
37
|
+
*/
|
|
38
|
+
progress?: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Wrap the icon and label in a paper panel.
|
|
41
|
+
*/
|
|
42
|
+
panel?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare const AnimatedLoadingPanel: React.NamedExoticComponent<Omit<AnimatedLoadingPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
//# sourceMappingURL=AnimatedLoadingPanel.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
export interface ChipStripProps extends BoxProps {
|
|
4
|
+
chips: string | string[] | React.ReactNode | React.ReactNode[];
|
|
5
|
+
}
|
|
6
|
+
export declare const ChipStrip: React.FC<ChipStripProps & {
|
|
7
|
+
ref?: any;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=ChipStrip.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme, SxProps } from '@mui/system';
|
|
3
|
+
import { FloatReference, FloatPopperProps } from '@sheetxl/utils-react';
|
|
4
|
+
import { ExhibitPopupPanelProps } from '../float';
|
|
5
|
+
export interface ContextMenuAttributes {
|
|
6
|
+
isContextMenu: () => true;
|
|
7
|
+
}
|
|
8
|
+
export interface ContextMenuProps extends React.HTMLAttributes<HTMLElement> {
|
|
9
|
+
/**
|
|
10
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
11
|
+
*/
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
13
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
|
+
parentFloat?: FloatReference;
|
|
15
|
+
createPopupPanel?: (props: ExhibitPopupPanelProps) => React.ReactElement<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Passed to the underlying popup panel
|
|
18
|
+
*/
|
|
19
|
+
propsPopper?: Partial<FloatPopperProps>;
|
|
20
|
+
/**
|
|
21
|
+
* Use for float reference
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
25
|
+
}
|
|
26
|
+
export interface ContextMenuElement extends HTMLDivElement, ContextMenuAttributes {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Wraps a component to give it a context menu.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ContextMenu: React.NamedExoticComponent<Omit<ContextMenuProps, "ref"> & React.RefAttributes<ContextMenuElement>>;
|
|
32
|
+
//# sourceMappingURL=ContextMenu.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DividerProps } from '@mui/material';
|
|
3
|
+
export interface ExhibitDividerProps extends DividerProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const ExhibitDivider: React.NamedExoticComponent<Omit<ExhibitDividerProps, "ref"> & React.RefAttributes<HTMLHRElement>>;
|
|
6
|
+
//# sourceMappingURL=ExhibitDivider.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PopupButtonType, ExhibitPopupButtonProps } from '../float';
|
|
2
|
+
export interface NestingPopupButtonProps extends ExhibitPopupButtonProps {
|
|
3
|
+
nestedChildren?: NestingPopupButtonProps[];
|
|
4
|
+
/**
|
|
5
|
+
* Rendering styles
|
|
6
|
+
* @defaultValue to Toolbar
|
|
7
|
+
*/
|
|
8
|
+
variant?: PopupButtonType;
|
|
9
|
+
}
|
|
10
|
+
export declare const NestingPopupButton: import('react').NamedExoticComponent<Omit<NestingPopupButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
11
|
+
//# sourceMappingURL=NestingPopupButton.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ScrollButtonProps } from '@sheetxl/utils-react';
|
|
3
|
+
export declare const renderScrollButtonEdge: (props: ScrollButtonProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
4
|
+
export declare const createScrollButton: (props: ScrollButtonProps, icon: React.ReactElement, title: string, description: string) => React.JSX.Element;
|
|
5
|
+
export declare const renderScrollButtonStart: (props: ScrollButtonProps) => React.JSX.Element;
|
|
6
|
+
export declare const renderScrollButtonEnd: (props: ScrollButtonProps) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ScrollButtons.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TooltipProps } from '@mui/material';
|
|
2
|
+
/**
|
|
3
|
+
* SimpleTooltip wraps that use the useFullscreenPortal hook
|
|
4
|
+
* to wrap MUI Tooltip and set the Popper container to support
|
|
5
|
+
* fullscreen/portal scenarios. Behaves exactly like Tooltip.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The shared portal container is used ONLY in fullscreen, where the tooltip has to be mounted under
|
|
9
|
+
* the fullscreen element to be visible at all. Outside it, the tooltip stays on MUI's own default
|
|
10
|
+
* (`document.body`): the shared container carries a `z-index`, which makes it a stacking context
|
|
11
|
+
* that caps everything inside it — and a tooltip's whole point is that it out-stacks the menu or
|
|
12
|
+
* dialog it is describing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SimpleTooltip: import('react').ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
15
|
+
//# sourceMappingURL=SimpleTooltip.d.ts.map
|