@sheetxl/utils-mui 0.7.20 → 0.7.21
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/{CBMcqj89EmkYK4QZ.cjs → Ai0ovAjYzGfMAB7q.cjs} +2 -2
- package/browser/cjs/{Ds-zDMzIo58PsNJN.cjs → L-4HMtCOn7QHkDi2.cjs} +5 -5
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{DKlg3IQeFd2TyIin.mjs → BqMhjTIvQt09x92t.mjs} +280 -280
- package/browser/esm/{ZqVDSTfuXZ_0OkpP.mjs → CMpdAXnJ5EbLrOu2.mjs} +7 -7
- package/browser/esm/index.mjs +21 -21
- package/node/esm/index.mjs +284 -284
- package/node/esm/{CPdz45mNqmqcdw72.mjs → ojE1YgJ2zWQ8Q_AP.mjs} +6 -6
- package/package.json +3 -3
- package/types/index.d.ts +26 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.21
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -12,7 +12,7 @@ import { Box as p, FormControl as l, TextField as s } from "@mui/material";
|
|
|
12
12
|
import { useCallbackRef as c, KeyCodes as u } from "@sheetxl/utils-react";
|
|
13
13
|
import { OptionsDialog as m } from "./index.mjs";
|
|
14
14
|
const d = ["Input"], g = o(n((o2, n2) => {
|
|
15
|
-
const { initialValue: g2 = "", onOption: f, onValidateOption: h, onInput: x, onValidateInput: y, onDone: O,
|
|
15
|
+
const { initialValue: g2 = "", onOption: f, onValidateOption: h, onInput: x, onValidateInput: y, onDone: O, propsInput: w, inputLabel: T, inputType: F, inputPlaceHolder: I, options: v = d, autoFocusSel: C = ".autoFocus", cancelOption: b, defaultOption: k = v?.[0], ...V } = o2, [D, P] = a(false), [j, B] = a(g2), [H, L] = a(""), [M, N] = a(true), S = c(async (t2, o3) => {
|
|
16
16
|
if (!y) return true;
|
|
17
17
|
const n3 = await y?.(t2, o3);
|
|
18
18
|
L(n3?.message ?? "");
|
|
@@ -32,11 +32,11 @@ const d = ["Input"], g = o(n((o2, n2) => {
|
|
|
32
32
|
}
|
|
33
33
|
return o3 ?? true;
|
|
34
34
|
}, [j, h]);
|
|
35
|
-
return t(m, { options:
|
|
35
|
+
return t(m, { options: v, onDone: O, onOption: (t2, o3) => {
|
|
36
36
|
o3 || $(t2);
|
|
37
|
-
}, onValidateOption: K, cancelOption: b, defaultOption: k, autoFocusSel:
|
|
38
|
-
|
|
39
|
-
}, type: F, label: T, helperText: H || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5), color: M ? void 0 : "error.main" } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { placeholder:
|
|
37
|
+
}, onValidateOption: K, cancelOption: b, defaultOption: k, autoFocusSel: C, ref: n2, ...V, children: t(p, { sx: { paddingTop: (t2) => t2.spacing(1), paddingBottom: (t2) => t2.spacing(0) }, children: t(l, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(s, { onFocus: (t2) => {
|
|
38
|
+
D || t2.target?.select(), P(true);
|
|
39
|
+
}, type: F, label: T, helperText: H || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5), color: M ? void 0 : "error.main" } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { placeholder: I, spellCheck: false, autoComplete: "off", ...w, className: e("autoFocus", w?.className), sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: j, onChange: E, onKeyDown: z, onContextMenu: (t2) => {
|
|
40
40
|
t2.stopPropagation();
|
|
41
41
|
} }) }) }) });
|
|
42
42
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/utils-mui",
|
|
3
3
|
"description": "Utilities MUI - Utilities for MUI Components needed for all SheetXL components.",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.21",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@popperjs/core": "^2.11.8",
|
|
48
|
-
"@sheetxl/utils": "^0.7.
|
|
49
|
-
"@sheetxl/utils-react": "^0.7.
|
|
48
|
+
"@sheetxl/utils": "^0.7.21",
|
|
49
|
+
"@sheetxl/utils-react": "^0.7.21",
|
|
50
50
|
"clsx": "^2.1.1",
|
|
51
51
|
"detect-it": "^4.0.1",
|
|
52
52
|
"focus-trap-react": "^10.1.4",
|
package/types/index.d.ts
CHANGED
|
@@ -158,8 +158,8 @@ export declare interface CommandToolbarAttributes {
|
|
|
158
158
|
|
|
159
159
|
export declare interface CommandToolbarButtonProps {
|
|
160
160
|
commands: ICommands.IGroup;
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
propsCommandButton: CommandButtonOptions;
|
|
162
|
+
propsCommandPopup: CommandToolbarPopupButtonProps;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
export declare interface CommandToolbarPopupButtonProps extends CommandButtonOptions {
|
|
@@ -169,9 +169,9 @@ export declare interface CommandToolbarPopupButtonProps extends CommandButtonOpt
|
|
|
169
169
|
|
|
170
170
|
export declare interface CommandToolbarProps extends ToolbarProps {
|
|
171
171
|
commands: ICommands.IGroup;
|
|
172
|
-
|
|
172
|
+
propsCommandButton?: CommandButtonOptions;
|
|
173
173
|
parentFloat?: FloatReference;
|
|
174
|
-
|
|
174
|
+
renderToolbarPalette?: (props: CommandToolbarButtonProps) => default_2.ReactNode;
|
|
175
175
|
ref?: default_2.Ref<HTMLDivElement>;
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -197,7 +197,7 @@ export declare interface CommandTooltipProps extends Omit<TooltipProps, "title">
|
|
|
197
197
|
/**
|
|
198
198
|
* Wraps a component to give it a context menu.
|
|
199
199
|
*/
|
|
200
|
-
export declare const ContextMenu: default_2.
|
|
200
|
+
export declare const ContextMenu: default_2.NamedExoticComponent<Omit<ContextMenuProps, "ref"> & default_2.RefAttributes<ContextMenuElement>>;
|
|
201
201
|
|
|
202
202
|
export declare interface ContextMenuAttributes {
|
|
203
203
|
isContextMenu: () => true;
|
|
@@ -217,11 +217,12 @@ export declare interface ContextMenuProps extends default_2.HTMLAttributes<HTMLE
|
|
|
217
217
|
/**
|
|
218
218
|
* Passed to the underlying popup panel
|
|
219
219
|
*/
|
|
220
|
-
|
|
220
|
+
propsPopper?: Partial<ExhibitPopperProps>;
|
|
221
221
|
/**
|
|
222
222
|
* Use for float reference
|
|
223
223
|
*/
|
|
224
224
|
label?: string;
|
|
225
|
+
ref?: default_2.Ref<HTMLDivElement>;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
export declare const createDownArrow: (isSplit: boolean, dense: boolean, rotate: boolean) => JSX.Element;
|
|
@@ -238,12 +239,6 @@ export declare const createExhibitTheme: (isDark: boolean, customizations?: Exhi
|
|
|
238
239
|
|
|
239
240
|
export declare const createScrollButton: (props: ScrollButtonProps, icon: default_2.ReactElement, title: string, description: string) => JSX.Element;
|
|
240
241
|
|
|
241
|
-
export declare const createScrollEdgeButton: (props: ScrollButtonProps) => default_2.ReactElement<unknown, string | default_2.JSXElementConstructor<any>>;
|
|
242
|
-
|
|
243
|
-
export declare const createScrollEndButton: (props: ScrollButtonProps) => JSX.Element;
|
|
244
|
-
|
|
245
|
-
export declare const createScrollStartButton: (props: ScrollButtonProps) => JSX.Element;
|
|
246
|
-
|
|
247
242
|
export declare const createStrokeShadowFilter: (shadowRadius?: number) => (theme: Theme) => string;
|
|
248
243
|
|
|
249
244
|
export declare const defaultCreatePopupPanel: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
|
|
@@ -294,9 +289,7 @@ export declare const ExhibitDivider: default_2.NamedExoticComponent<Omit<Exhibit
|
|
|
294
289
|
export declare interface ExhibitDividerProps extends DividerProps {
|
|
295
290
|
}
|
|
296
291
|
|
|
297
|
-
export declare const ExhibitFloatPanel: default_2.
|
|
298
|
-
ref?: any;
|
|
299
|
-
}>;
|
|
292
|
+
export declare const ExhibitFloatPanel: default_2.NamedExoticComponent<Omit<ExhibitFloatPanelProps, "ref"> & default_2.RefAttributes<any>>;
|
|
300
293
|
|
|
301
294
|
/**
|
|
302
295
|
* TODO - review the usefulness of this class
|
|
@@ -313,12 +306,16 @@ export declare interface ExhibitFloatPanelProps extends BoxProps {
|
|
|
313
306
|
anchorPosition?: ExhibitPopperPosition;
|
|
314
307
|
label: string;
|
|
315
308
|
createPopupPanel?: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
|
|
316
|
-
|
|
309
|
+
propsPopper?: Partial<ExhibitPopperProps>;
|
|
317
310
|
onClosing?: () => void;
|
|
318
311
|
onClose?: () => void;
|
|
319
312
|
onMount?: (element: HTMLDivElement, instance: any) => void;
|
|
320
313
|
onOpening?: () => void;
|
|
321
314
|
onOpen?: () => void;
|
|
315
|
+
/**
|
|
316
|
+
* Reference to the underlying element
|
|
317
|
+
*/
|
|
318
|
+
ref?: default_2.Ref<any>;
|
|
322
319
|
}
|
|
323
320
|
|
|
324
321
|
/**
|
|
@@ -347,7 +344,7 @@ export declare interface ExhibitIconButtonProps extends IconButtonProps {
|
|
|
347
344
|
* Tooltip properties. If this is specified then the tooltips are used.
|
|
348
345
|
* Do not provide a child as this component will be the child.
|
|
349
346
|
*/
|
|
350
|
-
|
|
347
|
+
propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
|
|
351
348
|
parentFloat?: FloatReference;
|
|
352
349
|
}
|
|
353
350
|
|
|
@@ -382,7 +379,7 @@ export declare interface ExhibitMenuItemProps extends MenuItemProps {
|
|
|
382
379
|
* Tooltip properties. If this is specified then the tooltips are used.
|
|
383
380
|
* Do not provide a child as this component will be the child.
|
|
384
381
|
*/
|
|
385
|
-
|
|
382
|
+
propsTooltip?: Omit<ExhibitTooltipProps, 'children'>;
|
|
386
383
|
parentFloat?: FloatReference;
|
|
387
384
|
chips?: string | string[] | default_2.ReactNode | default_2.ReactNode[];
|
|
388
385
|
}
|
|
@@ -459,7 +456,7 @@ export declare interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
459
456
|
createPopupPanel?: (props: ExhibitPopupPanelProps) => default_2.ReactElement<any>;
|
|
460
457
|
onPopupOpen?: () => void;
|
|
461
458
|
onPopupClose?: () => void;
|
|
462
|
-
|
|
459
|
+
propsPopup?: Partial<ExhibitFloatPanelProps>;
|
|
463
460
|
/**
|
|
464
461
|
* Tooltip title. Zero-length titles string are never displayed.
|
|
465
462
|
*/
|
|
@@ -472,8 +469,8 @@ export declare interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
472
469
|
* If this set then the popup becomes a split button.
|
|
473
470
|
*/
|
|
474
471
|
onQuickClick?: (e: default_2.MouseEvent<Element>) => void;
|
|
475
|
-
|
|
476
|
-
|
|
472
|
+
propsQuickButton?: ExhibitQuickButtonProps;
|
|
473
|
+
renderQuickButton?: (props: ExhibitQuickButtonProps) => default_2.ReactNode;
|
|
477
474
|
disabled?: boolean;
|
|
478
475
|
/**
|
|
479
476
|
* If the icon button is a primary icon button.
|
|
@@ -484,7 +481,7 @@ export declare interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
484
481
|
/**
|
|
485
482
|
* Props applied to the `TouchRipple` element.
|
|
486
483
|
*/
|
|
487
|
-
|
|
484
|
+
propsTouchRipple?: Partial<any>;
|
|
488
485
|
/**
|
|
489
486
|
* A ref that points to the `TouchRipple` element.
|
|
490
487
|
*/
|
|
@@ -499,7 +496,7 @@ export declare interface ExhibitPopupIconButtonProps extends ExhibitPopupButtonP
|
|
|
499
496
|
dense?: boolean;
|
|
500
497
|
outlined?: boolean | OutlineBorder;
|
|
501
498
|
disableHover?: boolean;
|
|
502
|
-
|
|
499
|
+
propsButton?: BoxProps;
|
|
503
500
|
}
|
|
504
501
|
|
|
505
502
|
export declare const ExhibitPopupMenuItem: default_2.FC<ExhibitPopupMenuItemProps & {
|
|
@@ -600,7 +597,7 @@ export declare interface FloatStackOptions {
|
|
|
600
597
|
/**
|
|
601
598
|
* Passed to the underlying popup panel
|
|
602
599
|
*/
|
|
603
|
-
|
|
600
|
+
propsPopper?: Partial<ExhibitPopperProps>;
|
|
604
601
|
}
|
|
605
602
|
|
|
606
603
|
export declare function getScrollbarCssVariables(theme: Theme, options?: ScrollbarThemingOptions): {
|
|
@@ -762,9 +759,11 @@ export declare interface RelativePoint {
|
|
|
762
759
|
y?: number | string;
|
|
763
760
|
}
|
|
764
761
|
|
|
765
|
-
export declare
|
|
766
|
-
|
|
767
|
-
|
|
762
|
+
export declare const renderScrollButtonEdge: (props: ScrollButtonProps) => default_2.ReactElement<unknown, string | default_2.JSXElementConstructor<any>>;
|
|
763
|
+
|
|
764
|
+
export declare const renderScrollButtonEnd: (props: ScrollButtonProps) => JSX.Element;
|
|
765
|
+
|
|
766
|
+
export declare const renderScrollButtonStart: (props: ScrollButtonProps) => JSX.Element;
|
|
768
767
|
|
|
769
768
|
export declare function scrollbarTheming(theme: Theme, options?: ScrollbarThemingOptions): {
|
|
770
769
|
"& .scrollbar, & .vsb-track, & .vsb-thumb": {
|