@sheetxl/utils-mui 0.7.21 → 0.7.23-beta.2
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/CNIMtMKGuDo4psnZ.mjs +96 -0
- package/browser/esm/D0mXROj4on9piZY1.mjs +2544 -0
- package/browser/esm/index.mjs +2688 -72
- package/licenses/dependencies.txt +60 -198
- package/node/esm/C2bOUbQGN6BujoBn.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 -1069
- package/types/src/button/ButtonContent.d.ts +17 -0
- package/types/src/button/ButtonContent.d.ts.map +1 -0
- package/types/src/button/ExhibitIconButton.d.ts +31 -0
- package/types/src/button/ExhibitIconButton.d.ts.map +1 -0
- package/types/src/button/ExhibitMenuHeader.d.ts +15 -0
- package/types/src/button/ExhibitMenuHeader.d.ts.map +1 -0
- package/types/src/button/ExhibitMenuItem.d.ts +24 -0
- package/types/src/button/ExhibitMenuItem.d.ts.map +1 -0
- package/types/src/button/ExhibitOptionButton.d.ts +16 -0
- package/types/src/button/ExhibitOptionButton.d.ts.map +1 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts +18 -0
- package/types/src/button/ExhibitPopupIconButton.d.ts.map +1 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts +8 -0
- package/types/src/button/ExhibitPopupMenuItem.d.ts.map +1 -0
- package/types/src/button/ExhibitTooltip.d.ts +26 -0
- package/types/src/button/ExhibitTooltip.d.ts.map +1 -0
- package/types/src/button/OverflowPalette.d.ts +29 -0
- package/types/src/button/OverflowPalette.d.ts.map +1 -0
- package/types/src/button/SelectedIcon.d.ts +18 -0
- package/types/src/button/SelectedIcon.d.ts.map +1 -0
- package/types/src/button/index.d.ts +11 -0
- package/types/src/button/index.d.ts.map +1 -0
- package/types/src/command/CommandButton.d.ts +4 -0
- package/types/src/command/CommandButton.d.ts.map +1 -0
- package/types/src/command/CommandGroup.d.ts +71 -0
- package/types/src/command/CommandGroup.d.ts.map +1 -0
- package/types/src/command/CommandPopupButton.d.ts +34 -0
- package/types/src/command/CommandPopupButton.d.ts.map +1 -0
- package/types/src/command/CommandToolbar.d.ts +51 -0
- package/types/src/command/CommandToolbar.d.ts.map +1 -0
- package/types/src/command/CommandTooltip.d.ts +22 -0
- package/types/src/command/CommandTooltip.d.ts.map +1 -0
- package/types/src/command/InputCommandButton.d.ts +20 -0
- package/types/src/command/InputCommandButton.d.ts.map +1 -0
- package/types/src/command/ToggleGroupButton.d.ts +33 -0
- package/types/src/command/ToggleGroupButton.d.ts.map +1 -0
- package/types/src/command/index.d.ts +8 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/command/useManagedRipple.d.ts +23 -0
- package/types/src/command/useManagedRipple.d.ts.map +1 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts +45 -0
- package/types/src/components/AnimatedLoadingPanel.d.ts.map +1 -0
- package/types/src/components/ChipStrip.d.ts +9 -0
- package/types/src/components/ChipStrip.d.ts.map +1 -0
- package/types/src/components/ContextMenu.d.ts +32 -0
- package/types/src/components/ContextMenu.d.ts.map +1 -0
- package/types/src/components/ExhibitDivider.d.ts +6 -0
- package/types/src/components/ExhibitDivider.d.ts.map +1 -0
- package/types/src/components/NestingPopupButton.d.ts +11 -0
- package/types/src/components/NestingPopupButton.d.ts.map +1 -0
- package/types/src/components/ScrollButtons.d.ts +7 -0
- package/types/src/components/ScrollButtons.d.ts.map +1 -0
- package/types/src/components/SimpleTooltip.d.ts +15 -0
- package/types/src/components/SimpleTooltip.d.ts.map +1 -0
- package/types/src/components/StackTrace.d.ts +20 -0
- package/types/src/components/StackTrace.d.ts.map +1 -0
- package/types/src/components/StackTraceErrorPanel.d.ts +28 -0
- package/types/src/components/StackTraceErrorPanel.d.ts.map +1 -0
- package/types/src/components/index.d.ts +10 -0
- package/types/src/components/index.d.ts.map +1 -0
- package/types/src/dialog/InputDialog.d.ts +8 -0
- package/types/src/dialog/InputDialog.d.ts.map +1 -0
- package/types/src/dialog/InternalWindow.d.ts +142 -0
- package/types/src/dialog/InternalWindow.d.ts.map +1 -0
- package/types/src/dialog/OptionsDialog.d.ts +19 -0
- package/types/src/dialog/OptionsDialog.d.ts.map +1 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/dialog/index.d.ts.map +1 -0
- package/types/src/dialog/useInputDialog.d.ts +6 -0
- package/types/src/dialog/useInputDialog.d.ts.map +1 -0
- package/types/src/dialog/useLazyWindow.d.ts +14 -0
- package/types/src/dialog/useLazyWindow.d.ts.map +1 -0
- package/types/src/dialog/useOptionsDialog.d.ts +8 -0
- package/types/src/dialog/useOptionsDialog.d.ts.map +1 -0
- package/types/src/float/ExhibitFloatPanel.d.ts +22 -0
- package/types/src/float/ExhibitFloatPanel.d.ts.map +1 -0
- package/types/src/float/ExhibitFloatProvider.d.ts +17 -0
- package/types/src/float/ExhibitFloatProvider.d.ts.map +1 -0
- package/types/src/float/ExhibitPopup.d.ts +97 -0
- package/types/src/float/ExhibitPopup.d.ts.map +1 -0
- package/types/src/float/index.d.ts +4 -0
- package/types/src/float/index.d.ts.map +1 -0
- package/types/src/index.d.ts +8 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/locales/index.d.ts +3 -0
- package/types/src/locales/index.d.ts.map +1 -0
- package/types/src/theme/ExhibitTheme.d.ts +71 -0
- package/types/src/theme/ExhibitTheme.d.ts.map +1 -0
- package/types/src/theme/IconSupport.d.ts +11 -0
- package/types/src/theme/IconSupport.d.ts.map +1 -0
- package/types/src/theme/ScrollbarTheming.d.ts +12 -0
- package/types/src/theme/ScrollbarTheming.d.ts.map +1 -0
- package/types/src/theme/index.d.ts +4 -0
- package/types/src/theme/index.d.ts.map +1 -0
- package/browser/cjs/Ai0ovAjYzGfMAB7q.cjs +0 -6
- package/browser/cjs/L-4HMtCOn7QHkDi2.cjs +0 -11
- package/browser/esm/BqMhjTIvQt09x92t.mjs +0 -2891
- package/browser/esm/CMpdAXnJ5EbLrOu2.mjs +0 -44
- package/node/assets/style.css +0 -1
- package/node/esm/ojE1YgJ2zWQ8Q_AP.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 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonContent.d.ts","sourceRoot":"","sources":["../../../../src/button/ButtonContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAmB,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,KAAK,CAOxC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,KAAK,EAAE,KAAK,CAAC,SAAS,GACrB,KAAK,CAAC,SAAS,CASjB"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitIconButton.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAOjE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAM5E,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;MAIE;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CA+K5E,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitMenuHeader.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitMenuHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D;;;;MAIE;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;CAC5H;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAgC5E,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIzE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5E,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;IAEjD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,YAAY,CAAC;IAEnE;;;;MAIE;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAErD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;CACjE;AAMD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CA6IxE,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitOptionButton.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitOptionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAC8B,KAAK,sBAAsB,EAC/D,MAAM,GAAG,CAAC;AAEX,UAAU,wBAAyB,SAAQ,sBAAsB;IAC/D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAiChF,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitPopupIconButton.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitPopupIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAWnD,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,GAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,QAAQ,CAAA;CACvB;AAGD,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAyctF,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitPopupMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitPopupMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EACsD,KAAK,uBAAuB,EACxF,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;CAKzE;AAKD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAwUlF,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ExhibitTooltip.d.ts","sourceRoot":"","sources":["../../../../src/button/ExhibitTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAA2C,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIlH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;IACtE,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAEjC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;CACjE;AAoED,eAAO,MAAM,kBAAkB,GAAI,WAAW,UAAU,GAAG,UAAU,EAAE,EAAE,GAAG,WAAW,EAAE,iBAAgB,OAAa,EAAE,MAAK,MAAM,GAAG,IAAS,KAAG,KAAK,CAAC,YAAY,GAAG,IAkEtK,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAgHtE,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowPalette.d.ts","sourceRoot":"","sources":["../../../../src/button/OverflowPalette.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAe3C,MAAM,WAAW,yBAAyB;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,cAAc,EAAE,yBAAyB;CAAG;AAE7F,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAChF;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,8GAoTzB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"SelectedIcon.d.ts","sourceRoot":"","sources":["../../../../src/button/SelectedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAS3C,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,qFA6CtB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"CommandButton.d.ts","sourceRoot":"","sources":["../../../../src/command/CommandButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,KAAK,yBAAyB,EAAe,KAAK,kBAAkB,EACrE,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,aAAa,oIA+IvB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"CommandGroup.d.ts","sourceRoot":"","sources":["../../../../src/command/CommandGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAC9E,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAC/C,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;IACpE,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;IACnE;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,kBAAkB,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EACxE,IAAI,GAAE,oBAAyB,GAC9B,KAAK,CAAC,SAAS,EAAE,CAsGnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;IAC1F;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAEvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,+FAkGtB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/command/CommandPopupButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,iBAAiB,EAA4C,KAAK,OAAO,EAC1E,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACyD,KAAK,2BAA2B,EAC/F,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKvD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CAAC,KAAK,GAAC,GAAG,EAAE,OAAO,GAAC,GAAG,CAAE,SAAQ,IAAI,CAAC,2BAA2B,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,kBAAkB,CAAE;IAE1J,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IAE1F,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAElF,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEtE;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IAErB,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAgI9E,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"CommandToolbar.d.ts","sourceRoot":"","sources":["../../../../src/command/CommandToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAG3D,OAAO,EAGL,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAC9C,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EACrD,MAAM,sBAAsB,CAAC;AAM9B,MAAM,WAAW,8BAA+B,SAAQ,oBAAoB;CAC3E;AAED,MAAM,WAAW,yBAAyB;IACxC,kBAAkB,EAAE,oBAAoB,CAAC;IAEzC,iBAAiB,EAAE,8BAA8B,CAAC;CACnD;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IAEvD,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAE1C,WAAW,CAAC,EAAE,cAAc,CAAC;IAE7B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,kBAAkB,CAAC,EAAE,CAAC;IAEvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IAE7E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;CACxC;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,EAAE,wBAAwB;CAAG;AAE3F,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACzC,oGAAoG;IACpG,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACvC;AAGD,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,sBA8D9C,CAAA;AAED,eAAO,MAAM,cAAc,4GAgMxB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"CommandTooltip.d.ts","sourceRoot":"","sources":["../../../../src/command/CommandTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI1F,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAmCtE,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"InputCommandButton.d.ts","sourceRoot":"","sources":["../../../../src/command/InputCommandButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,uBAAuB,EAAc,MAAM,eAAe,CAAC;AAIzE,OAAO,EAEqB,KAAK,kBAAkB,EAClD,MAAM,sBAAsB,CAAC;AAS9B,MAAM,WAAW,uBAAuB,CAAC,KAAK,GAAC,GAAG,EAAE,OAAO,GAAC,GAAG,CAAE,SAAQ,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC;IAEzG,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;IAEpE,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACnC;;OAEG;IACL,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE1B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;CACrC;AAED;;;;;GAKG;AAIH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqQ9D,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleGroupButton.d.ts","sourceRoot":"","sources":["../../../../src/command/ToggleGroupButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,oGA+D3B,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAErC,cAAc,sBAAsB,CAAC;AAErC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"useManagedRipple.d.ts","sourceRoot":"","sources":["../../../../src/command/useManagedRipple.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sGAAsG;IACtG,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAahD"}
|