@sheetxl/utils-mui 0.7.27 → 0.7.28-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.
Files changed (68) hide show
  1. package/browser/cjs/CMDyOaq_TZmhbR3R.cjs +1 -0
  2. package/browser/cjs/GeHQP4M_1ydWv9v4.cjs +3 -0
  3. package/browser/cjs/index.cjs +4 -7
  4. package/browser/esm/9fsNC-TCsC2eWrT7.mjs +2544 -0
  5. package/browser/esm/C1J1QewWhbiiqeRG.mjs +96 -0
  6. package/browser/esm/index.mjs +2688 -72
  7. package/licenses/dependencies.txt +60 -198
  8. package/node/esm/BIcd-KmTY3PjXAVL.mjs +97 -0
  9. package/node/esm/index.mjs +3354 -981
  10. package/package.json +12 -14
  11. package/resources/contents.json +18 -0
  12. package/resources/locales/contents.json +16 -0
  13. package/resources/locales/de/ui.msg.json +22 -0
  14. package/resources/locales/en/ui.msg.json +22 -0
  15. package/types/index.d.ts +2 -1068
  16. package/types/src/button/ButtonContent.d.ts +17 -0
  17. package/types/src/button/ExhibitIconButton.d.ts +31 -0
  18. package/types/src/button/ExhibitMenuHeader.d.ts +15 -0
  19. package/types/src/button/ExhibitMenuItem.d.ts +24 -0
  20. package/types/src/button/ExhibitOptionButton.d.ts +16 -0
  21. package/types/src/button/ExhibitPopupIconButton.d.ts +18 -0
  22. package/types/src/button/ExhibitPopupMenuItem.d.ts +8 -0
  23. package/types/src/button/ExhibitTooltip.d.ts +26 -0
  24. package/types/src/button/OverflowPalette.d.ts +29 -0
  25. package/types/src/button/SelectedIcon.d.ts +18 -0
  26. package/types/src/button/index.d.ts +11 -0
  27. package/types/src/command/CommandButton.d.ts +4 -0
  28. package/types/src/command/CommandGroup.d.ts +71 -0
  29. package/types/src/command/CommandPopupButton.d.ts +34 -0
  30. package/types/src/command/CommandToolbar.d.ts +51 -0
  31. package/types/src/command/CommandTooltip.d.ts +22 -0
  32. package/types/src/command/InputCommandButton.d.ts +20 -0
  33. package/types/src/command/ToggleGroupButton.d.ts +33 -0
  34. package/types/src/command/index.d.ts +8 -0
  35. package/types/src/command/useManagedRipple.d.ts +23 -0
  36. package/types/src/components/AnimatedLoadingPanel.d.ts +45 -0
  37. package/types/src/components/ChipStrip.d.ts +9 -0
  38. package/types/src/components/ContextMenu.d.ts +32 -0
  39. package/types/src/components/ExhibitDivider.d.ts +6 -0
  40. package/types/src/components/NestingPopupButton.d.ts +11 -0
  41. package/types/src/components/ScrollButtons.d.ts +7 -0
  42. package/types/src/components/SimpleTooltip.d.ts +15 -0
  43. package/types/src/components/StackTrace.d.ts +20 -0
  44. package/types/src/components/StackTraceErrorPanel.d.ts +28 -0
  45. package/types/src/components/index.d.ts +10 -0
  46. package/types/src/dialog/InputDialog.d.ts +8 -0
  47. package/types/src/dialog/InternalWindow.d.ts +142 -0
  48. package/types/src/dialog/OptionsDialog.d.ts +19 -0
  49. package/types/src/dialog/index.d.ts +10 -0
  50. package/types/src/dialog/useInputDialog.d.ts +6 -0
  51. package/types/src/dialog/useLazyWindow.d.ts +14 -0
  52. package/types/src/dialog/useOptionsDialog.d.ts +8 -0
  53. package/types/src/float/ExhibitFloatPanel.d.ts +22 -0
  54. package/types/src/float/ExhibitFloatProvider.d.ts +17 -0
  55. package/types/src/float/ExhibitPopup.d.ts +97 -0
  56. package/types/src/float/index.d.ts +4 -0
  57. package/types/src/index.d.ts +8 -0
  58. package/types/src/locales/index.d.ts +3 -0
  59. package/types/src/theme/ExhibitTheme.d.ts +71 -0
  60. package/types/src/theme/IconSupport.d.ts +11 -0
  61. package/types/src/theme/ScrollbarTheming.d.ts +12 -0
  62. package/types/src/theme/index.d.ts +4 -0
  63. package/browser/cjs/DaEKEZaG-FHdWrtX.cjs +0 -6
  64. package/browser/cjs/DfODF1nk9pC8WaMc.cjs +0 -11
  65. package/browser/esm/CvYgOZcfwT-xE3Sk.mjs +0 -2891
  66. package/browser/esm/i2MzZuUDebibOGmf.mjs +0 -44
  67. package/node/assets/style.css +0 -1
  68. package/node/esm/CaDPRPvErt0JK4E-.mjs +0 -45
package/types/index.d.ts CHANGED
@@ -1,1068 +1,2 @@
1
- import { Backdrop } from '@mui/material';
2
- import { BoxProps } from '@mui/material';
3
- import { CommandButtonOptions } from '@sheetxl/utils-react';
4
- import { CommandButtonProps } from '@sheetxl/utils-react';
5
- import { CommandButtonRefAttribute } from '@sheetxl/utils-react';
6
- import { CommandButtonType } from '@sheetxl/utils-react';
7
- import { Components } from '@mui/material/styles';
8
- import { ComponentsOverrides } from '@mui/material/styles';
9
- import { ComponentsProps } from '@mui/material/styles';
10
- import { ComponentsPropsList } from '@mui/material/styles';
11
- import { ComponentsVariants } from '@mui/material/styles';
12
- import { default as default_2 } from 'react';
13
- import { DialogProps } from '@mui/material';
14
- import { DialogSlots } from '@mui/material';
15
- import { DividerProps } from '@mui/material';
16
- import { DraggableEventHandler } from 'react-draggable';
17
- import { DynamicIconProps } from '@sheetxl/utils-react';
18
- import { ErrorPanelProps } from '@sheetxl/utils-react';
19
- import { ICommand } from '@sheetxl/utils-react';
20
- import { ICommands } from '@sheetxl/utils-react';
21
- import { IconButtonProps } from '@mui/material';
22
- import { IKeyStroke } from '@sheetxl/utils-react';
23
- import { Instance } from '@popperjs/core';
24
- import { Interpolation } from '@mui/material/styles';
25
- import { JSX } from 'react/jsx-runtime';
26
- import { LoadingPanelProps } from '@sheetxl/utils-react';
27
- import { MenuItemProps } from '@mui/material';
28
- import { ModalProps } from '@mui/material';
29
- import { default as ModalProvider } from 'mui-modal-provider';
30
- import { PaperProps } from '@mui/material';
31
- import { Point } from '@sheetxl/utils';
32
- import { PopperProps } from '@mui/material';
33
- import { ScrollButtonProps } from '@sheetxl/utils-react';
34
- import { ShowInputOptions } from '@sheetxl/utils-react';
35
- import { ShowOptionsOptions } from '@sheetxl/utils-react';
36
- import { ShowWindowOptions } from '@sheetxl/utils-react';
37
- import { Size } from '@sheetxl/utils';
38
- import { SxProps } from '@mui/system';
39
- import { Theme } from '@mui/material/styles';
40
- import { Theme as Theme_2 } from '@mui/system';
41
- import { ThemeOptions } from '@mui/material/styles';
42
- import { ToolbarProps } from '@mui/material';
43
- import { TooltipProps } from '@mui/material';
44
- import { TransitionProps } from '@mui/material/transitions';
45
- import { TypographyProps } from '@mui/material';
46
-
47
- export declare const AnimatedBouncingEllipsisIcon: default_2.FC<AnimatedIconProps>;
48
-
49
- export declare const AnimatedCircleIcon: default_2.FC<AnimatedIconProps>;
50
-
51
- /**
52
- * These super animated icons are from https://codepen.io/nikhil8krishnan. MIT attribution. Thank you Nikhil Krishnan
53
- *
54
- * Note - Currently svg animations do not animate if the main thread is blocked.
55
- * https://codepen.io/mtf2000/pen/oNPwzap
56
- */
57
- export declare const AnimatedClockIcon: default_2.FC<AnimatedIconProps>;
58
-
59
- export declare const AnimatedFadingEllipsisIcon: default_2.FC<AnimatedIconProps>;
60
-
61
- export declare interface AnimatedIconProps extends BoxProps {
62
- speed?: number;
63
- size?: number;
64
- }
65
-
66
- export declare const AnimatedLoadingPanel: default_2.NamedExoticComponent<Omit<AnimatedLoadingPanelProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
67
-
68
- export declare interface AnimatedLoadingPanelProps extends LoadingPanelProps, Omit<BoxProps, 'label' | 'color' | 'ref'> {
69
- icon?: default_2.ReactNode;
70
- label?: string | default_2.ReactNode;
71
- /**
72
- * Wrap the icon and label in a paper panel.
73
- */
74
- panel?: boolean;
75
- }
76
-
77
- export declare const AnimatedOrbitIcon: default_2.FC<AnimatedIconProps>;
78
-
79
- /**
80
- * This is the only AnimatedIcon that works with a blocking ui.
81
- * Note - currently this has a hardcoded bounds of 61x13
82
- */
83
- export declare const AnimatedTraversingEllipsisIcon: default_2.FC<AnimatedTraversingEllipsisIconProps>;
84
-
85
- export declare interface AnimatedTraversingEllipsisIconProps extends BoxProps {
86
- speed?: number;
87
- size?: number;
88
- width?: number;
89
- height?: number;
90
- }
91
-
92
- export declare const ArrowDownIcon: (props: DynamicIconProps) => JSX.Element;
93
-
94
- export declare const ArrowRightIcon: (props: DynamicIconProps) => JSX.Element;
95
-
96
- export declare const ChipStrip: default_2.FC<ChipStripProps & {
97
- ref?: any;
98
- }>;
99
-
100
- export declare interface ChipStripProps extends BoxProps {
101
- chips: string | string[] | default_2.ReactNode | default_2.ReactNode[];
102
- }
103
-
104
- export declare const ClosingReason: {
105
- readonly ByPopup: "popupDone";
106
- readonly Cancel: "popupCancel";
107
- readonly ClickAway: "clickAway";
108
- };
109
-
110
- export declare type ClosingReason = typeof ClosingReason[keyof typeof ClosingReason];
111
-
112
- export declare const CommandButton: default_2.NamedExoticComponent<Omit<CommandButtonProps<any, any> & CommandButtonRefAttribute, "ref"> & default_2.RefAttributes<any>>;
113
-
114
- export declare const CommandPopupButton: default_2.FC<CommandPopupButtonProps & {
115
- ref?: any;
116
- }>;
117
-
118
- /**
119
- * Attach a command to a popup.
120
- * Note
121
- */
122
- export declare interface CommandPopupButtonProps<STATE = any, CONTEXT = any> extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "createPopupPanel"> {
123
- quickCommand?: string;
124
- commands: ICommands.IGroup;
125
- icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode) | string;
126
- label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
127
- /**
128
- * Allow for listeners against a specific buttons execute rather than the command.
129
- * Useful when knowing the specific button that executed a command is required.
130
- * (For example when closing menus or restoring focus)
131
- */
132
- commandHook?: ICommand.Hook<any, any>;
133
- disableHover?: boolean;
134
- createPopupPanel?: (props: ExhibitPopupPanelProps, commands: ICommands.IGroup) => default_2.ReactNode;
135
- /**
136
- * Styling
137
- * @defaultValue CommandButtonType.Toolbar
138
- */
139
- variant?: CommandButtonType;
140
- /**
141
- * Optional state for this specific command button.
142
- * @defaultValue to undefined
143
- */
144
- commandState?: STATE;
145
- context?: CONTEXT;
146
- scope?: string;
147
- }
148
-
149
- export declare type CommandPopupButtonRefAttribute = {
150
- ref?: default_2.Ref<HTMLDivElement>;
151
- };
152
-
153
- export declare const CommandToolbar: default_2.NamedExoticComponent<Omit<CommandToolbarProps, "ref"> & default_2.RefAttributes<ICommandToolbarElement>>;
154
-
155
- export declare interface CommandToolbarAttributes {
156
- }
157
-
158
- export declare interface CommandToolbarButtonProps {
159
- commands: ICommands.IGroup;
160
- propsCommandButton: CommandButtonOptions;
161
- propsCommandPopup: CommandToolbarPopupButtonProps;
162
- }
163
-
164
- export declare interface CommandToolbarPopupButtonProps extends CommandButtonOptions {
165
- parentFloat: FloatReference;
166
- commands: ICommands.IGroup;
167
- }
168
-
169
- export declare interface CommandToolbarProps extends ToolbarProps {
170
- commands: ICommands.IGroup;
171
- propsCommandButton?: CommandButtonOptions;
172
- parentFloat?: FloatReference;
173
- renderToolbarPalette?: (props: CommandToolbarButtonProps) => default_2.ReactNode;
174
- ref?: default_2.Ref<HTMLDivElement>;
175
- }
176
-
177
- export declare const CommandTooltip: default_2.FC<CommandTooltipProps & {
178
- ref?: any;
179
- }>;
180
-
181
- export declare interface CommandTooltipProps extends Omit<TooltipProps, "title"> {
182
- command: ICommand<any, any>;
183
- /**
184
- * The shortcut to display.
185
- * @remarks
186
- * This is display only and doesn't actually track the shortcut.
187
- * Override the display for the shortcut on the command (if available).
188
- */
189
- shortcut?: IKeyStroke | IKeyStroke[];
190
- /**
191
- * Prevent tooltip from showing
192
- */
193
- disabled?: boolean;
194
- }
195
-
196
- /**
197
- * Wraps a component to give it a context menu.
198
- */
199
- export declare const ContextMenu: default_2.NamedExoticComponent<Omit<ContextMenuProps, "ref"> & default_2.RefAttributes<ContextMenuElement>>;
200
-
201
- export declare interface ContextMenuAttributes {
202
- isContextMenu: () => true;
203
- }
204
-
205
- export declare interface ContextMenuElement extends HTMLDivElement, ContextMenuAttributes {
206
- }
207
-
208
- export declare interface ContextMenuProps extends default_2.HTMLAttributes<HTMLElement> {
209
- /**
210
- * MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
211
- */
212
- sx?: SxProps<Theme_2>;
213
- children: default_2.ReactElement<any, string | default_2.JSXElementConstructor<any>>;
214
- parentFloat?: FloatReference;
215
- createPopupPanel?: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
216
- /**
217
- * Passed to the underlying popup panel
218
- */
219
- propsPopper?: Partial<ExhibitPopperProps>;
220
- /**
221
- * Use for float reference
222
- */
223
- label?: string;
224
- ref?: default_2.Ref<HTMLDivElement>;
225
- }
226
-
227
- export declare const createDownArrow: (isSplit: boolean, dense: boolean, rotate: boolean) => JSX.Element;
228
-
229
- /**
230
- *
231
- * This creates a Theme that has Exhibit Widget extensions.
232
- * It is based on the MUI createTheme() function.
233
- *
234
- * @see
235
- * https://mui.com/customization/how-to-customize/#state-classes
236
- */
237
- export declare const createExhibitTheme: (isDark: boolean, customizations?: ExhibitThemeOptions) => Theme;
238
-
239
- export declare const createScrollButton: (props: ScrollButtonProps, icon: default_2.ReactElement, title: string, description: string) => JSX.Element;
240
-
241
- export declare const createStrokeShadowFilter: (shadowRadius?: number) => (theme: Theme) => string;
242
-
243
- export declare const defaultCreatePopupPanel: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
244
-
245
- export declare interface DraggablePaperProps extends PaperProps {
246
- onDragStop?: DraggableEventHandler;
247
- PaperComponent?: default_2.JSXElementConstructor<PaperProps>;
248
- titleSize?: Size;
249
- rootSize?: Size;
250
- handleSel?: string;
251
- rootSel?: string;
252
- defaultPosition?: Point;
253
- }
254
-
255
- export declare const elevateColor: (color: string, coefficient?: number, mode?: "light" | "dark") => string;
256
-
257
- export declare interface ExhibitComponentProps extends ComponentsProps {
258
- SmartInputField: SmartInputFieldProps;
259
- }
260
-
261
- export declare interface ExhibitComponentPropsList extends ComponentsPropsList {
262
- SmartInputField?: SmartInputFieldProps;
263
- }
264
-
265
- export declare interface ExhibitComponents extends Components<Omit<Theme, 'components'>> {
266
- SmartInputField?: {
267
- defaultProps?: ExhibitComponentProps['SmartInputField'];
268
- styleOverrides?: ExhibitComponentsOverrides<Theme>['SmartInputField'];
269
- variants?: ExhibitComponentsVariants['SmartInputField'];
270
- };
271
- }
272
-
273
- export declare interface ExhibitComponentsOverrides<Theme = unknown> extends ComponentsOverrides<Theme> {
274
- SmartInputField?: any;
275
- }
276
-
277
- export declare interface ExhibitComponentsVariants extends ComponentsVariants {
278
- SmartInputField?: Array<{
279
- props: Partial<ExhibitComponentPropsList['SmartInputField']>;
280
- style: Interpolation<{
281
- theme: Theme;
282
- }>;
283
- }>;
284
- }
285
-
286
- export declare const ExhibitDivider: default_2.NamedExoticComponent<Omit<ExhibitDividerProps, "ref"> & default_2.RefAttributes<HTMLHRElement>>;
287
-
288
- export declare interface ExhibitDividerProps extends DividerProps {
289
- }
290
-
291
- export declare const ExhibitFloatPanel: default_2.NamedExoticComponent<Omit<ExhibitFloatPanelProps, "ref"> & default_2.RefAttributes<any>>;
292
-
293
- /**
294
- * TODO - review the usefulness of this class
295
- * Wraps a popper and a theme paper
296
- *
297
- * Features.
298
- * Callback to popupPanel closing
299
- *
300
- */
301
- export declare interface ExhibitFloatPanelProps extends BoxProps {
302
- open: boolean;
303
- floatReference?: FloatReference;
304
- anchorEl?: any;
305
- anchorPosition?: ExhibitPopperPosition;
306
- label: string;
307
- createPopupPanel?: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
308
- propsPopper?: Partial<ExhibitPopperProps>;
309
- onClosing?: () => void;
310
- onClose?: () => void;
311
- onMount?: (element: HTMLDivElement, instance: any) => void;
312
- onOpening?: () => void;
313
- onOpen?: () => void;
314
- /**
315
- * Reference to the underlying element
316
- */
317
- ref?: default_2.Ref<any>;
318
- }
319
-
320
- /**
321
- * This is a simple styled icon button.
322
- */
323
- export declare const ExhibitIconButton: default_2.FC<ExhibitIconButtonProps & {
324
- ref?: any;
325
- }>;
326
-
327
- export declare interface ExhibitIconButtonProps extends IconButtonProps {
328
- dense?: boolean;
329
- outlined?: boolean;
330
- icon?: default_2.ReactNode | (() => default_2.ReactNode);
331
- disableHover?: boolean;
332
- /**
333
- * If the icon button is a primary icon button.
334
- * This may change the color of the text and icon.
335
- * @defaultValue false
336
- */
337
- primary?: boolean;
338
- /**
339
- * If set to a `boolean` the button will act like a toggle.
340
- */
341
- selected?: boolean | null;
342
- /**
343
- * Tooltip properties. If this is specified then the tooltips are used.
344
- * Do not provide a child as this component will be the child.
345
- */
346
- propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
347
- parentFloat?: FloatReference;
348
- }
349
-
350
- export declare const ExhibitMenuHeader: default_2.FC<ExhibitMenuHeaderProps & {
351
- ref?: any;
352
- }>;
353
-
354
- export declare interface ExhibitMenuHeaderProps extends TypographyProps {
355
- /**
356
- * If the icon button is a secondary text button.
357
- * Changes the color of the text and icon.
358
- * @defaultValue false
359
- */
360
- primary?: boolean;
361
- variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
362
- }
363
-
364
- export declare const ExhibitMenuItem: default_2.FC<ExhibitMenuItemProps & {
365
- ref?: any;
366
- }>;
367
-
368
- export declare interface ExhibitMenuItemProps extends MenuItemProps {
369
- icon?: default_2.ReactNode | (() => default_2.ReactNode);
370
- renderIcon?: (props: ExhibitIconButtonProps) => default_2.ReactElement;
371
- /**
372
- * If the icon button is a secondary text button.
373
- * Change the color of the text and icon.
374
- * @defaultValue false
375
- */
376
- primary?: boolean;
377
- /**
378
- * Tooltip properties. If this is specified then the tooltips are used.
379
- * Do not provide a child as this component will be the child.
380
- */
381
- propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
382
- parentFloat?: FloatReference;
383
- chips?: string | string[] | default_2.ReactNode | default_2.ReactNode[];
384
- }
385
-
386
- export declare const ExhibitOptionButton: default_2.FC<ExhibitOptionButtonProps & {
387
- ref?: any;
388
- }>;
389
-
390
- declare interface ExhibitOptionButtonProps extends ExhibitIconButtonProps {
391
- onSelectToggle?: (value: boolean) => void;
392
- selected?: boolean;
393
- label: NonNullable<default_2.ReactNode>;
394
- shortcut?: IKeyStroke;
395
- preventFocus?: boolean;
396
- tabIndex?: number;
397
- }
398
-
399
- export declare const ExhibitPopper: default_2.FC<ExhibitPopperProps & {
400
- ref?: any;
401
- }>;
402
-
403
- export declare interface ExhibitPopperPosition {
404
- top: number;
405
- left: number;
406
- }
407
-
408
- /**
409
- * Wraps the Popper with standardized behavior.
410
- * A popper has 3 lifecycle states: mounted, visible, open.
411
- *
412
- *
413
- *
414
- * 1. Animation
415
- * 2. Resizing (see popper-max-size-modifier)
416
- * // TODO - fix arrow option
417
- *
418
- * // TODO - replace with useFloat and remove 'passthrough' dependency on mui
419
- */
420
- export declare interface ExhibitPopperProps extends PopperProps {
421
- onClosing?: () => void;
422
- onClose?: () => void;
423
- onMount?: (element: HTMLDivElement, instance: Instance) => void;
424
- onOpening?: () => void;
425
- onOpen?: () => void;
426
- /**
427
- * If panel can resize on overflow. Otherwise will try to fit
428
- */
429
- resizeOnOverflow?: boolean;
430
- /**
431
- * major minor offset
432
- * @defaultValue 0, 2
433
- */
434
- offsets?: number[];
435
- anchorPosition?: ExhibitPopperPosition;
436
- label?: string;
437
- }
438
-
439
- export declare interface ExhibitPopperRef {
440
- instance: () => Instance;
441
- element: () => HTMLElement;
442
- }
443
-
444
- /**
445
- * TODO - allow popper and popup customizations similar to @mui/tooltip
446
- */
447
- export declare interface ExhibitPopupButtonProps extends BoxProps {
448
- icon?: default_2.ReactNode | (() => default_2.ReactNode);
449
- label?: default_2.ReactNode;
450
- /**
451
- * Render as selected,
452
- */
453
- selected?: boolean;
454
- parentFloat?: FloatReference;
455
- createPopupPanel?: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
456
- onPopupOpen?: () => void;
457
- onPopupClose?: () => void;
458
- propsPopup?: Partial<ExhibitFloatPanelProps>;
459
- /**
460
- * Tooltip title. Zero-length titles string are never displayed.
461
- */
462
- tooltip?: NonNullable<default_2.ReactNode>;
463
- /**
464
- * Allows for custom tooltip creation
465
- */
466
- createTooltip?: (props: TooltipProps, disabled: boolean) => default_2.JSX.Element;
467
- /**
468
- * If this set then the popup becomes a split button.
469
- */
470
- onQuickClick?: (e: default_2.MouseEvent<Element>) => void;
471
- propsQuickButton?: ExhibitQuickButtonProps;
472
- renderQuickButton?: (props: ExhibitQuickButtonProps) => default_2.ReactNode;
473
- disabled?: boolean;
474
- /**
475
- * If the icon button is a primary icon button.
476
- * This may change the color of the text and icon.
477
- * @defaultValue false
478
- */
479
- primary?: boolean;
480
- /**
481
- * Props applied to the `TouchRipple` element.
482
- */
483
- propsTouchRipple?: Partial<any>;
484
- /**
485
- * A ref that points to the `TouchRipple` element.
486
- */
487
- touchRippleRef?: default_2.Ref<any>;
488
- }
489
-
490
- export declare const ExhibitPopupIconButton: default_2.FC<ExhibitPopupIconButtonProps & {
491
- ref?: any;
492
- }>;
493
-
494
- export declare interface ExhibitPopupIconButtonProps extends ExhibitPopupButtonProps {
495
- dense?: boolean;
496
- outlined?: boolean | OutlineBorder;
497
- disableHover?: boolean;
498
- propsButton?: BoxProps;
499
- }
500
-
501
- export declare const ExhibitPopupMenuItem: default_2.FC<ExhibitPopupMenuItemProps & {
502
- ref?: any;
503
- }>;
504
-
505
- export declare interface ExhibitPopupMenuItemProps extends ExhibitPopupButtonProps {
506
- }
507
-
508
- export declare interface ExhibitPopupPanelProps extends BoxProps {
509
- popupContainer: HTMLElement;
510
- floatReference?: FloatReference;
511
- /**
512
- * When the popup panel initiates a close
513
- */
514
- closeFloat?: () => void;
515
- closeFloatAll?: () => void;
516
- }
517
-
518
- export declare interface ExhibitQuickButtonProps extends IconButtonProps {
519
- /**
520
- * Tooltip title. Zero-length titles string are never displayed.
521
- */
522
- tooltip?: NonNullable<default_2.ReactNode>;
523
- /**
524
- * Allows for custom tooltip creation
525
- */
526
- createTooltip?: (props: TooltipProps, disabled: boolean) => default_2.JSX.Element;
527
- }
528
-
529
- export declare interface ExhibitThemeOptions extends ThemeOptions {
530
- components?: ExhibitComponents;
531
- }
532
-
533
- export declare const ExhibitTooltip: default_2.FC<ExhibitTooltipProps & {
534
- ref?: any;
535
- }>;
536
-
537
- export declare interface ExhibitTooltipProps extends Omit<TooltipProps, "title"> {
538
- title?: string | default_2.ReactNode;
539
- /** Prevent tooltip from show */
540
- disabled?: boolean;
541
- label?: NonNullable<default_2.ReactNode>;
542
- description?: NonNullable<default_2.ReactNode>;
543
- /**
544
- * If true returns a very simple text tooltip.
545
- * @remarks
546
- * All Exhibit tooltip props are ignored.
547
- */
548
- simple?: boolean;
549
- maxWidth?: number;
550
- shortcut?: IKeyStroke;
551
- useModifierSymbols?: boolean;
552
- componentDisabled?: boolean;
553
- chips?: string | string[] | default_2.ReactNode | default_2.ReactNode[];
554
- }
555
-
556
- export declare interface FloatReference {
557
- key: FloatReferenceKey;
558
- isRoot: boolean;
559
- parent: FloatReference;
560
- open(delay?: number): void;
561
- close: (delay?: number) => Promise<void>;
562
- closeChild: (delay?: number) => Promise<void>;
563
- onChildVisible: () => void;
564
- onChildHidden: () => void;
565
- closeAll: () => Promise<void>;
566
- floatElement: () => HTMLElement;
567
- anchorElement: () => HTMLElement | any;
568
- }
569
-
570
- export declare interface FloatReferenceKey {
571
- label: string;
572
- }
573
-
574
- export declare interface FloatStack {
575
- /**
576
- * Float component to be injected
577
- */
578
- component: default_2.ReactNode;
579
- reference: FloatReference;
580
- }
581
-
582
- export declare interface FloatStackOptions {
583
- anchor?: default_2.ReactElement | any;
584
- label?: string;
585
- /**
586
- * If nesting float stacks are being used pass this from parent
587
- */
588
- parentFloat?: FloatReference;
589
- onOpen?: () => void;
590
- onClose?: () => void;
591
- /**
592
- * If this returns `null` then will create a registered movable stacking.
593
- * This is done for toolbars and other permanent visible components that are integrated into the movable stack.
594
- */
595
- createPopupPanel?: (props: ExhibitPopupPanelProps) => any;
596
- /**
597
- * Passed to the underlying popup panel
598
- */
599
- propsPopper?: Partial<ExhibitPopperProps>;
600
- }
601
-
602
- export declare function getScrollbarCssVariables(theme: Theme, options?: ScrollbarThemingOptions): {
603
- '--scrollbar-track-color': string;
604
- '--scrollbar-thumb-color': string;
605
- '--scrollbar-button-color': string;
606
- '--scrollbar-active-color': string;
607
- '--scrollbar-corner-color': string;
608
- '--scrollbar-border-color': string;
609
- '--scrollbar-width': string;
610
- '--scrollbar-height': string;
611
- '--scrollbar-border-radius': string;
612
- '--scrollbar-border-width': string;
613
- '--scrollbar-min-thumb-size': string;
614
- };
615
-
616
- export declare const hexToRGB: (hex: string, alpha?: number) => string;
617
-
618
- export declare interface ICommandToolbarElement extends HTMLDivElement, CommandToolbarAttributes {
619
- }
620
-
621
- /**
622
- * Type returned via ref property
623
- */
624
- export declare interface IInternalWindowElement extends InternalWindowAttributes, HTMLElement {
625
- }
626
-
627
- /**
628
- * Binds an input control to a command.
629
- * @remarks
630
- *
631
- * Currently only supports numbers.
632
- */
633
- export declare const InputCommandButton: default_2.FC<InputCommandButtonProps>;
634
-
635
- export declare interface InputCommandButtonProps<STATE = any, CONTEXT = any> extends CommandButtonProps<STATE, CONTEXT> {
636
- label?: default_2.ReactNode | string | (() => default_2.ReactNode | string);
637
- }
638
-
639
- export declare interface InputDialogProps<T = any, C = any> extends ShowInputOptions<T, C>, Omit<OptionsDialogProps<T, C>, 'initialValue' | 'style' | 'onInput' | 'autoFocus' | 'onKeyDown'> {
640
- }
641
-
642
- export declare const InternalWindow: default_2.NamedExoticComponent<Omit<InternalWindowProps<any, any>, "ref"> & default_2.RefAttributes<IInternalWindowElement>>;
643
-
644
- export declare interface InternalWindowAttributes {
645
- focus: (options?: FocusOptions) => void;
646
- }
647
-
648
- export declare interface InternalWindowProps<T = any, R = any> extends Omit<DialogProps, 'open'> {
649
- open?: ModalProps['open'];
650
- /**
651
- * The dialog title
652
- */
653
- title?: string;
654
- /**
655
- * Query selector for the element to focus on show.
656
- *
657
- * @remarks
658
- * It would be better to honor autoFocus attribute but React is 'hiding' it
659
- */
660
- autoFocusSel?: string;
661
- onCancel?: () => void;
662
- onDone?: (results?: any) => void;
663
- onShow?: () => void;
664
- onShown?: (internalWindow: IInternalWindowElement) => void;
665
- onHide?: () => void;
666
- /**
667
- * If true show a backdrop.
668
- *
669
- * @remarks
670
- * Our movable menu achieves modality without a background by listens to global clicks (and focus)
671
- * @defaultValue false
672
- */
673
- isModal?: boolean;
674
- /**
675
- * A default position for the window. The default is center at %50, %50.
676
- */
677
- initialPosition?: RelativePoint;
678
- /**
679
- * The components used for each slot inside.
680
- * @default {}
681
- */
682
- slots?: DialogSlots & {
683
- transition?: default_2.ComponentType<TransitionProps>;
684
- paper?: default_2.ComponentType<PaperProps>;
685
- };
686
- /**
687
- * The extra props for the slot components.
688
- * You can override the existing props or add new ones.
689
- * @default {}
690
- */
691
- slotProps?: {
692
- backdrop?: default_2.ComponentProps<typeof Backdrop>;
693
- paper?: PaperProps;
694
- transition?: TransitionProps;
695
- };
696
- }
697
-
698
- export declare const LabelIcon: (props: LabelIconProps) => JSX.Element;
699
-
700
- export declare interface LabelIconProps extends BoxProps {
701
- scope?: string;
702
- command?: ICommand<any, any>;
703
- label?: default_2.ReactElement<any> | string;
704
- icon?: default_2.ReactElement<any>;
705
- }
706
-
707
- export { ModalProvider }
708
-
709
- export declare const NestingPopupButton: default_2.NamedExoticComponent<Omit<NestingPopupButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
710
-
711
- export declare interface NestingPopupButtonProps extends ExhibitPopupButtonProps {
712
- nestedChildren?: NestingPopupButtonProps[];
713
- /**
714
- * Rendering styles
715
- * @defaultValue to Toolbar
716
- */
717
- variant?: PopupButtonType;
718
- }
719
-
720
- export declare const OptionsDialog: default_2.NamedExoticComponent<Omit<OptionsDialogProps<any, any>, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
721
-
722
- export declare interface OptionsDialogProps<T = any, C = any> extends ShowOptionsOptions<T, C>, Omit<InternalWindowProps<T, C>, 'style' | 'onInput' | 'autoFocus' | 'onKeyDown'> {
723
- }
724
-
725
- export declare interface OutlineBorder {
726
- color?: string | ((theme: Theme) => string);
727
- hoverColor?: string | ((theme: Theme) => string);
728
- focusColor?: string | ((theme: Theme) => string);
729
- }
730
-
731
- export declare const overlayAlpha: (elevation: number) => string;
732
-
733
- export declare const PopupAutoFocus: {
734
- readonly Popup: "popup";
735
- readonly Anchor: "anchor";
736
- };
737
-
738
- export declare type PopupAutoFocus = typeof PopupAutoFocus[keyof typeof PopupAutoFocus];
739
-
740
- export declare const PopupButtonType: {
741
- /**
742
- * Suitable for toolbars. Click to open, click to close, generally disabled as icon
743
- */
744
- readonly Toolbar: "toolbar";
745
- /**
746
- * Suitable for menus. HoverIn to open, hover leave to close, generally disabled as icon and text
747
- */
748
- readonly Menuitem: "menuitem";
749
- };
750
-
751
- export declare type PopupButtonType = typeof PopupButtonType[keyof typeof PopupButtonType];
752
-
753
- /**
754
- * If the x or y is a string it is assumed to be a percentage of available space before.
755
- */
756
- export declare interface RelativePoint {
757
- x?: number | string;
758
- y?: number | string;
759
- }
760
-
761
- export declare const renderScrollButtonEdge: (props: ScrollButtonProps) => default_2.ReactElement<unknown, string | default_2.JSXElementConstructor<any>>;
762
-
763
- export declare const renderScrollButtonEnd: (props: ScrollButtonProps) => JSX.Element;
764
-
765
- export declare const renderScrollButtonStart: (props: ScrollButtonProps) => JSX.Element;
766
-
767
- export declare function scrollbarTheming(theme: Theme, options?: ScrollbarThemingOptions): {
768
- "& .scrollbar, & .vsb-track, & .vsb-thumb": {
769
- '--scrollbar-track-color': string;
770
- '--scrollbar-thumb-color': string;
771
- '--scrollbar-button-color': string;
772
- '--scrollbar-active-color': string;
773
- '--scrollbar-corner-color': string;
774
- '--scrollbar-border-color': string;
775
- '--scrollbar-width': string;
776
- '--scrollbar-height': string;
777
- '--scrollbar-border-radius': string;
778
- '--scrollbar-border-width': string;
779
- '--scrollbar-min-thumb-size': string;
780
- };
781
- "&::-webkit-scrollbar, & *::-webkit-scrollbar": {
782
- backgroundColor: string;
783
- width: string;
784
- height: string;
785
- };
786
- "&::-webkit-scrollbar-button": {
787
- display: string;
788
- };
789
- "& .scrollbar-button": {
790
- fill: string;
791
- backgroundColor: string;
792
- transition: string;
793
- width: string;
794
- height: string;
795
- };
796
- "& .scrollbar-button:hover:not([disabled])": {
797
- fill: string;
798
- };
799
- "& .scrollbar-button:disabled": {
800
- opacity: number;
801
- };
802
- "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {};
803
- "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {};
804
- "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
805
- borderRadius: string;
806
- backgroundColor: string;
807
- minHeight: string;
808
- minWidth: string;
809
- border: string;
810
- };
811
- "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": {
812
- backgroundColor: string;
813
- border: true;
814
- };
815
- "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": {
816
- backgroundColor: string;
817
- border: true;
818
- };
819
- "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
820
- backgroundColor: string;
821
- border: true;
822
- };
823
- "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
824
- backgroundColor: string;
825
- };
826
- '--scrollbar-track-color': string;
827
- '--scrollbar-thumb-color': string;
828
- '--scrollbar-button-color': string;
829
- '--scrollbar-active-color': string;
830
- '--scrollbar-corner-color': string;
831
- '--scrollbar-border-color': string;
832
- '--scrollbar-width': string;
833
- '--scrollbar-height': string;
834
- '--scrollbar-border-radius': string;
835
- '--scrollbar-border-width': string;
836
- '--scrollbar-min-thumb-size': string;
837
- };
838
-
839
- export declare interface ScrollbarThemingOptions {
840
- track?: string;
841
- thumb?: string;
842
- button?: string;
843
- active?: string;
844
- corner?: string;
845
- outline?: boolean;
846
- }
847
-
848
- export declare const SelectedIcon: default_2.NamedExoticComponent<SelectedIconProps & default_2.RefAttributes<HTMLDivElement>>;
849
-
850
- export declare interface SelectedIconProps extends default_2.HTMLAttributes<HTMLElement> {
851
- /**
852
- * If this is set to false then will just render as a regular icon.
853
- * @defaultValue true
854
- *
855
- */
856
- selected?: boolean;
857
- /**
858
- * MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
859
- */
860
- sx?: SxProps<Theme>;
861
- outlined?: boolean;
862
- }
863
-
864
- /**
865
- * Simple Popup that takes a list of commands for a popup
866
- */
867
- export declare const SimpleCommandPopupButton: default_2.NamedExoticComponent<Omit<SimpleCommandPopupButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
868
-
869
- export declare interface SimpleCommandPopupButtonProps extends CommandPopupButtonProps {
870
- /**
871
- * A list of command keys to show in the popup
872
- */
873
- popupCommandKeys: string[];
874
- /**
875
- * Scope for the popup
876
- *
877
- * @defaultValue The 'quickCommandKey'.
878
- */
879
- popupScope?: string;
880
- renderCommandButton?: (props: CommandButtonProps & default_2.Attributes) => default_2.ReactNode;
881
- }
882
-
883
- /**
884
- * SimpleTooltip wraps that use the useFullscreenPortal hook
885
- * to wrap MUI Tooltip and set the Popper container to support
886
- * fullscreen/portal scenarios. Behaves exactly like Tooltip.
887
- */
888
- export declare const SimpleTooltip: default_2.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
889
-
890
- export declare interface SmartInputFieldProps {
891
- automatic?: any;
892
- }
893
-
894
- declare type Source = 'prop' | 'class' | 'media';
895
-
896
- /** Basic StackTrace component */
897
- export declare const StackTrace: default_2.FC<StackTraceProps>;
898
-
899
- /**
900
- * Error Panel with a StackTrace.
901
- * Todo - allow for action flag
902
- */
903
- export declare const StackTraceErrorPanel: default_2.NamedExoticComponent<Omit<StackTraceErrorPanelProps, "ref"> & default_2.RefAttributes<HTMLDivElement>>;
904
-
905
- export declare interface StackTraceErrorPanelProps extends ErrorPanelProps, Omit<BoxProps, 'color' | 'ref'> {
906
- /**
907
- * Whether to hide the stack trace.
908
- *
909
- * @defaultValue false
910
- */
911
- hideStackTrace?: boolean;
912
- /**
913
- * Whether the stack trace should be expanded by default
914
- *
915
- * @defaultValue false
916
- */
917
- stackTraceExpanded?: boolean;
918
- fullscreen?: boolean;
919
- /**
920
- * Optional icon to show
921
- */
922
- icon?: default_2.ReactNode;
923
- }
924
-
925
- export declare interface StackTraceProps {
926
- /**
927
- * The error object containing the stack trace.
928
- */
929
- error: Error;
930
- /**
931
- * Maximum number of stack trace lines to show.
932
- *
933
- * If not provided, all lines will be shown.
934
- */
935
- maxLines?: number;
936
- /**
937
- * Whether to show line numbers
938
- */
939
- hideLineNumbers?: boolean;
940
- }
941
-
942
- /**
943
- * Useful for contrasting colors
944
- * @param theme - The theme
945
- */
946
- export declare const strokeShadowFilter: (theme: Theme) => string;
947
-
948
- export declare const ThemedIcon: any;
949
-
950
- export declare interface ThemedIconProps extends BoxProps {
951
- size?: 'small' | 'medium' | 'large';
952
- activeColor?: string;
953
- }
954
-
955
- export declare const ThemeMode: {
956
- readonly Light: "light";
957
- readonly Dark: "dark";
958
- };
959
-
960
- export declare type ThemeMode = typeof ThemeMode[keyof typeof ThemeMode];
961
-
962
- export declare interface ThemeModeOptions {
963
- /**
964
- * The user doesn't want to use the default.
965
- *
966
- * @defaultValue the system default
967
- */
968
- mode?: ThemeMode;
969
- /**
970
- * Customizations to the theme.
971
- *
972
- * @defaultValue `Theme`
973
- */
974
- theme?: ThemeOptions;
975
- /**
976
- * Customizations to the light theme.
977
- *
978
- * @defaultValue Theme values.
979
- */
980
- light?: ThemeOptions;
981
- /**
982
- * Customizations to the dark theme.
983
- *
984
- * @defaultValue Theme values
985
- */
986
- dark?: ThemeOptions;
987
- /**
988
- * By default the the standalone workbook grid will be the same theme as the workbook.
989
- * If forceGridLight is `true` then the grid will always use the light mode.
990
- *
991
- * When `true` the grid will behave consistent with current Excel (2023).
992
- *
993
- * @remarks
994
- * When the grid has a dark theme it will attempt to use DocTheme dark colors
995
- * but will 'force' non dark-themed colors to be light via an inversion algo.
996
- *
997
- * @defaultValue false
998
- */
999
- enableDarkGrid?: boolean;
1000
- /**
1001
- * By default the the standalone workbook images will invert images if the grid
1002
- * is in dark mode.
1003
- *
1004
- * @defaultValue false
1005
- */
1006
- enableDarkImages?: boolean;
1007
- /**
1008
- * When theming also apply the MUI CssBaseline.
1009
- *
1010
- * @defaultValue false
1011
- */
1012
- cssBaseline?: boolean;
1013
- /**
1014
- * Called if the current mode changes for the AppTheme.
1015
- *
1016
- * @remarks
1017
- * * This is only used if the themeOptions are not provided.
1018
- * * If `null` is sent then the theme should inherit.
1019
- */
1020
- onModeChange?: (mode: ThemeMode | null) => void;
1021
- onEnabledDarkGridChange?: (allow: boolean) => void;
1022
- onEnabledDarkImagesChange?: (allow: boolean) => void;
1023
- }
1024
-
1025
- export declare const toShortcutElements: (keyStroke: IKeyStroke | IKeyStroke[], modifierSymbol?: boolean, key?: string) => default_2.ReactElement;
1026
-
1027
- /**
1028
- * useFloatStack
1029
- *
1030
- * Keeps a list of stacked movable components. This acts like within but outside of the containment
1031
- * hierarchy.
1032
- *
1033
- * TODO - abstract out clickAway perhaps with a useFloatStack context
1034
- * TODO - abstract out ExhibitFloatPanel factory into the same provider
1035
- *
1036
- */
1037
- export declare const useFloatStack: (props?: FloatStackOptions) => FloatStack;
1038
-
1039
- export declare const useInputDialog: (propsDefault?: InputDialogProps) => (props: InputDialogProps) => Promise<{
1040
- input: string;
1041
- option: string;
1042
- }>;
1043
-
1044
- /**
1045
- * Creates a single instance given the type and import function
1046
- *
1047
- * @remarks
1048
- * This relays on the onHide prop working
1049
- */
1050
- export declare function useLazyWindow<P extends InternalWindowProps>(propsDefault?: P): (type: string, importFunc: () => Promise<{
1051
- default: any;
1052
- }>, options: ShowWindowOptions, props?: P) => Promise<HTMLElement>;
1053
-
1054
- export declare const useOptionsDialog: (propsDefault?: OptionsDialogProps) => (options: OptionsDialogProps) => Promise<string>;
1055
-
1056
- export declare function useResolvedThemeMode(options?: UseThemeOptions): {
1057
- themeMode: ThemeMode;
1058
- source: Source;
1059
- };
1060
-
1061
- declare interface UseThemeOptions {
1062
- mode?: ThemeMode;
1063
- }
1064
-
1065
-
1066
- export * from "mui-modal-provider";
1067
-
1068
- export { }
1
+ export * from './src/index'
2
+ export {}