@sheetxl/utils-mui 0.3.19 → 0.3.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/{D00MDFEA0j2VYoct.cjs → DNr7NajB-6D6L-KA.cjs} +6 -6
- package/browser/cjs/dBBHhhGLx_F_ZTcb.cjs +6 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/BGkEw_7sI_JQ5wHV.mjs +43 -0
- package/browser/esm/{D9uFu257zqcKAqgF.mjs → DeJU-p0PDQ7-eOgU.mjs} +59 -59
- package/browser/esm/index.mjs +2 -2
- package/licenses/dependencies.txt +2 -2
- package/node/esm/index.mjs +8 -8
- package/node/esm/{CEeZxRDcCCJ70vj5.mjs → kF3Od1Q3bNkbQzhG.mjs} +2 -2
- package/package.json +3 -3
- package/types/index.d.ts +55 -19
- package/browser/cjs/BFl5mWo43XFcmbhR.cjs +0 -6
- package/browser/esm/7Q5jZB1_JWkS9RVu.mjs +0 -43
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.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.
|
|
@@ -1862,8 +1862,8 @@ const nc = r((t2) => {
|
|
|
1862
1862
|
V2(false), H2?.(e5);
|
|
1863
1863
|
}, size: "small", TouchRippleProps: { center: false }, sx: L2, edge: "end", ...M2, children: [S2, d2] });
|
|
1864
1864
|
if (h2) if (h2.simple && h2.label && !h2.disabled) {
|
|
1865
|
-
const { label: t2, description: n3, maxWidth: o3, shortcut: r3, useModifierSymbols: l3, componentDisabled: i3, simple: c3, chips: a3,
|
|
1866
|
-
E2 = e(tc, { disableInteractive: true, title: t2 ?? "", ...
|
|
1865
|
+
const { label: t2, description: n3, maxWidth: o3, shortcut: r3, useModifierSymbols: l3, componentDisabled: i3, simple: c3, chips: a3, ref: s3, ...d3 } = h2;
|
|
1866
|
+
E2 = e(tc, { disableInteractive: true, title: t2 ?? "", ...d3, children: e(b, { sx: { display: "flex" }, children: E2 }) });
|
|
1867
1867
|
} else E2 = e(lc, { children: E2, ...h2 });
|
|
1868
1868
|
return E2;
|
|
1869
1869
|
})), sc = (e5) => e5.icon, hc = r(l((n2, o2) => {
|
|
@@ -1905,8 +1905,8 @@ const nc = r((t2) => {
|
|
|
1905
1905
|
const e5 = { "&.bordered": { borderWidth: "1px", borderRadius: "0px", borderTopStyle: "solid", borderBottomStyle: "solid", borderColor: (e6) => D2.outline.color(e6), "&.Mui-focusVisible": { border: (e6) => `1px solid ${D2.outline.focusColor(e6)} !important` }, "&:hover:not(.Mui-disabled, [disabled])": { borderColor: () => S2 ? "transparent" : void 0, backgroundColor: () => S2 ? "transparent" : void 0 }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { borderColor: (e6) => D2.outline.hoverColor(e6) }, "&.Mui-selected:not(.Mui-disabled, [disabled])": { borderColor: (e6) => D2.outline.hoverColor(e6) }, "&.left": { borderTopLeftRadius: (e6) => `${e6.shape.borderRadius}px`, borderBottomLeftRadius: (e6) => `${e6.shape.borderRadius}px`, borderLeftStyle: "solid" }, "&.hard-right": { borderRightStyle: "solid", borderRightWidth: "1px", borderRightColor: (e6) => D2.outline.color(e6) }, "&.right": { borderTopRightRadius: (e6) => `${e6.shape.borderRadius}px`, borderBottomRightRadius: (e6) => `${e6.shape.borderRadius}px`, borderRightStyle: "solid" }, "&.divider": { borderLeftWidth: "0px !important" } }, "& .MuiTouchRipple-child": { borderRadius: (e6) => `${e6.shape.borderRadius}px !important` } }, t2 = { "&.Mui-selected": { backgroundColor: (e6) => v(e6.palette.primary.main, e6.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e6) => v(e6.palette.primary.main, e6.palette.action.selectedOpacity + e6.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e6) => v(e6.palette.primary.main, e6.palette.action.selectedOpacity) } } } }, n2 = { maxHeight: "100%", "&.Mui-selected": { backgroundColor: (e6) => v(e6.palette.text.icon ?? e6.palette.action.active, e6.palette.action.selectedOpacity), "&:hover:not(.Mui-disabled)": { backgroundColor: (e6) => v(e6.palette.text.icon ?? e6.palette.action.active, e6.palette.action.selectedOpacity + e6.palette.action.hoverOpacity), "@media (hover: none)": { backgroundColor: (e6) => v(e6.palette.text.icon ?? e6.palette.action.active, e6.palette.action.selectedOpacity) } } }, "&:hover:not(.Mui-disabled, [disabled])": { color: (e6) => e6.palette.text.primary }, backgroundColor: () => S2 ? "transparent" : void 0, color: (e6) => e6.palette.text.icon, "&.Mui-disabled path.styled": { filter: "grayscale(65%)", opacity: ".8" }, padding: () => l2 ? "2px 3px" : "7px", marginRight: "0" }, o3 = at.mergeContentful(n2, e5), r3 = at.mergeContentful(o3, t2), i3 = at.mergeContentful(n2, e5);
|
|
1906
1906
|
return { quickButtonStyling: o3, openQuickButtonStyling: r3, compoundStyling: i3, openCompoundStyling: at.mergeContentful(i3, t2) };
|
|
1907
1907
|
}, [D2, S2]), K2 = Vn((t2) => {
|
|
1908
|
-
const { children: n2,
|
|
1909
|
-
return e(tc, {
|
|
1908
|
+
const { children: n2, ref: o3, ...r3 } = t2;
|
|
1909
|
+
return e(tc, { ref: o3, ...r3, disableInteractive: true, children: n2 });
|
|
1910
1910
|
}, []), Q2 = h2 || M2, J2 = Q2 && (H2?.tooltip || H2?.createTooltip), ee2 = (t2) => {
|
|
1911
1911
|
const { tooltip: n2, createTooltip: o3, sx: r3, ...l3 } = t2;
|
|
1912
1912
|
let i3 = e(z, { sx: { ...r3 }, component: "div", ...l3 });
|
|
@@ -1953,8 +1953,8 @@ const uc = {}, mc = r(l((o2, r2) => {
|
|
|
1953
1953
|
let e5;
|
|
1954
1954
|
return e5;
|
|
1955
1955
|
} } }), q2 = { "&.Mui-selected": { color: (e5) => e5.palette.text.primary, "& svg * ": { color: (e5) => e5.palette.text.primary } } }, U2 = i((t2) => {
|
|
1956
|
-
const { children: n2,
|
|
1957
|
-
return e(tc, {
|
|
1956
|
+
const { children: n2, ref: o3, ...r3 } = t2;
|
|
1957
|
+
return e(tc, { ref: o3, ...r3, disableInteractive: true, children: n2 });
|
|
1958
1958
|
}, []), X2 = s2 || x2, Y2 = (t2) => {
|
|
1959
1959
|
const { tooltip: n2, createTooltip: o3, ...r3 } = t2;
|
|
1960
1960
|
return e(hc, { icon: _2, className: f({ "Mui-hovered": A2 }), sx: { flex: "1 1 100%", ...q2 }, ...r3, children: a2 });
|
|
@@ -2155,7 +2155,7 @@ const yc = { x: 0, y: 0 }, xc = r(l((t2, n2) => {
|
|
|
2155
2155
|
t2?.onDone?.(), o2.hide();
|
|
2156
2156
|
} });
|
|
2157
2157
|
});
|
|
2158
|
-
}, wc = o.lazy(() => import("./
|
|
2158
|
+
}, wc = o.lazy(() => import("./kF3Od1Q3bNkbQzhG.mjs")), Lc = () => {
|
|
2159
2159
|
const { showModal: e5 } = ce();
|
|
2160
2160
|
return (t2) => {
|
|
2161
2161
|
const { defaultOption: n2 = t2.options?.[0], cancelOption: o2 = "Cancel", ...r2 } = t2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.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.
|
|
@@ -33,7 +33,7 @@ const m = ["Input"], g = o(n((o2, n2) => {
|
|
|
33
33
|
}, [D, h]);
|
|
34
34
|
return t(d, { options: P, onDone: O, onOption: (t2, o3) => {
|
|
35
35
|
o3 || $(t2);
|
|
36
|
-
}, onValidateOption: K, cancelOption: C, defaultOption: b, autoFocusSel: v, ...k, children: t(r, { 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) => {
|
|
36
|
+
}, onValidateOption: K, cancelOption: C, defaultOption: b, autoFocusSel: v, ref: n2, ...k, children: t(r, { 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) => {
|
|
37
37
|
V || t2.target?.select(), j(true);
|
|
38
38
|
}, type: F, label: T, helperText: H || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5), color: M ? void 0 : "error.main" } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { 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", p(5))}, ${i("#fff", p(5))})` } } }, value: D, onChange: E, onKeyDown: z, onContextMenu: (t2) => {
|
|
39
39
|
t2.stopPropagation();
|
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.3.
|
|
4
|
+
"version": "0.3.21",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@popperjs/core": "^2.11.8",
|
|
32
|
-
"@sheetxl/utils": "^0.3.
|
|
33
|
-
"@sheetxl/utils-react": "^0.3.
|
|
32
|
+
"@sheetxl/utils": "^0.3.21",
|
|
33
|
+
"@sheetxl/utils-react": "^0.3.21",
|
|
34
34
|
"clsx": "^2.1.1",
|
|
35
35
|
"detect-it": "^4.0.1",
|
|
36
36
|
"focus-trap-react": "^10.1.4",
|
package/types/index.d.ts
CHANGED
|
@@ -110,7 +110,9 @@ export declare const CheckIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
110
110
|
|
|
111
111
|
export declare const CheckSuccessIcon: (props: SvgIconProps) => JSX.Element;
|
|
112
112
|
|
|
113
|
-
export declare const ChipStrip: default_2.FC<ChipStripProps
|
|
113
|
+
export declare const ChipStrip: default_2.FC<ChipStripProps & {
|
|
114
|
+
ref?: any;
|
|
115
|
+
}>;
|
|
114
116
|
|
|
115
117
|
export declare interface ChipStripProps extends BoxProps {
|
|
116
118
|
chips: string | string[] | default_2.ReactNode | default_2.ReactNode[];
|
|
@@ -203,7 +205,9 @@ export declare type CommandButtonRefAttribute = {
|
|
|
203
205
|
ref?: default_2.Ref<HTMLDivElement>;
|
|
204
206
|
};
|
|
205
207
|
|
|
206
|
-
export declare const CommandPopupButton: default_2.FC<CommandPopupButtonProps
|
|
208
|
+
export declare const CommandPopupButton: default_2.FC<CommandPopupButtonProps & {
|
|
209
|
+
ref?: any;
|
|
210
|
+
}>;
|
|
207
211
|
|
|
208
212
|
/**
|
|
209
213
|
* Attach a command to a popup.
|
|
@@ -240,7 +244,7 @@ export declare type CommandPopupButtonRefAttribute = {
|
|
|
240
244
|
ref?: default_2.Ref<HTMLDivElement>;
|
|
241
245
|
};
|
|
242
246
|
|
|
243
|
-
export declare const CommandToolbar: default_2.
|
|
247
|
+
export declare const CommandToolbar: default_2.NamedExoticComponent<Omit<CommandToolbarProps, "ref"> & default_2.RefAttributes<ICommandToolbarElement>>;
|
|
244
248
|
|
|
245
249
|
export declare interface CommandToolbarAttributes {
|
|
246
250
|
}
|
|
@@ -267,7 +271,9 @@ export declare interface CommandToolbarRefAttribute {
|
|
|
267
271
|
ref?: default_2.Ref<HTMLDivElement>;
|
|
268
272
|
}
|
|
269
273
|
|
|
270
|
-
export declare const CommandTooltip: default_2.FC<CommandTooltipProps
|
|
274
|
+
export declare const CommandTooltip: default_2.FC<CommandTooltipProps & {
|
|
275
|
+
ref?: any;
|
|
276
|
+
}>;
|
|
271
277
|
|
|
272
278
|
export declare interface CommandTooltipProps extends Omit<TooltipProps, "title"> {
|
|
273
279
|
command: ICommand<any, any>;
|
|
@@ -413,7 +419,9 @@ export declare const ErrorAlertIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
413
419
|
* Simple panel to show error.
|
|
414
420
|
* Todo - allow for action flag
|
|
415
421
|
*/
|
|
416
|
-
export declare const ErrorPanel: default_2.FC<ErrorPanelProps
|
|
422
|
+
export declare const ErrorPanel: default_2.FC<ErrorPanelProps & {
|
|
423
|
+
ref?: any;
|
|
424
|
+
}>;
|
|
417
425
|
|
|
418
426
|
export declare interface ErrorPanelProps extends BoxProps {
|
|
419
427
|
icon?: default_2.ReactNode;
|
|
@@ -461,12 +469,16 @@ export declare interface ExhibitComponentsVariants extends ComponentsVariants {
|
|
|
461
469
|
}>;
|
|
462
470
|
}
|
|
463
471
|
|
|
464
|
-
export declare const ExhibitDivider: default_2.FC<ExhibitDividerProps
|
|
472
|
+
export declare const ExhibitDivider: default_2.FC<ExhibitDividerProps & {
|
|
473
|
+
ref?: any;
|
|
474
|
+
}>;
|
|
465
475
|
|
|
466
476
|
export declare interface ExhibitDividerProps extends DividerProps {
|
|
467
477
|
}
|
|
468
478
|
|
|
469
|
-
export declare const ExhibitFloatPanel: default_2.FC<ExhibitFloatPanelProps
|
|
479
|
+
export declare const ExhibitFloatPanel: default_2.FC<ExhibitFloatPanelProps & {
|
|
480
|
+
ref?: any;
|
|
481
|
+
}>;
|
|
470
482
|
|
|
471
483
|
/**
|
|
472
484
|
* TODO - review the usefulness of this class
|
|
@@ -497,7 +509,9 @@ export declare interface ExhibitFloatPanelProps extends BoxProps {
|
|
|
497
509
|
/**
|
|
498
510
|
* This is a simple styled icon button.
|
|
499
511
|
*/
|
|
500
|
-
export declare const ExhibitIconButton: default_2.FC<ExhibitIconButtonProps
|
|
512
|
+
export declare const ExhibitIconButton: default_2.FC<ExhibitIconButtonProps & {
|
|
513
|
+
ref?: any;
|
|
514
|
+
}>;
|
|
501
515
|
|
|
502
516
|
export declare interface ExhibitIconButtonProps extends IconButtonProps {
|
|
503
517
|
dense?: boolean;
|
|
@@ -522,7 +536,9 @@ export declare interface ExhibitIconButtonProps extends IconButtonProps {
|
|
|
522
536
|
parentFloat?: FloatReference;
|
|
523
537
|
}
|
|
524
538
|
|
|
525
|
-
export declare const ExhibitMenuHeader: default_2.FC<ExhibitMenuHeaderProps
|
|
539
|
+
export declare const ExhibitMenuHeader: default_2.FC<ExhibitMenuHeaderProps & {
|
|
540
|
+
ref?: any;
|
|
541
|
+
}>;
|
|
526
542
|
|
|
527
543
|
export declare interface ExhibitMenuHeaderProps extends TypographyProps {
|
|
528
544
|
/**
|
|
@@ -534,7 +550,9 @@ export declare interface ExhibitMenuHeaderProps extends TypographyProps {
|
|
|
534
550
|
variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
535
551
|
}
|
|
536
552
|
|
|
537
|
-
export declare const ExhibitMenuItem: default_2.FC<ExhibitMenuItemProps
|
|
553
|
+
export declare const ExhibitMenuItem: default_2.FC<ExhibitMenuItemProps & {
|
|
554
|
+
ref?: any;
|
|
555
|
+
}>;
|
|
538
556
|
|
|
539
557
|
export declare interface ExhibitMenuItemProps extends MenuItemProps {
|
|
540
558
|
icon?: default_2.ReactNode | (() => default_2.ReactNode);
|
|
@@ -554,7 +572,9 @@ export declare interface ExhibitMenuItemProps extends MenuItemProps {
|
|
|
554
572
|
chips?: string | string[] | default_2.ReactNode | default_2.ReactNode[];
|
|
555
573
|
}
|
|
556
574
|
|
|
557
|
-
export declare const ExhibitOptionButton: default_2.FC<ExhibitOptionButtonProps
|
|
575
|
+
export declare const ExhibitOptionButton: default_2.FC<ExhibitOptionButtonProps & {
|
|
576
|
+
ref?: any;
|
|
577
|
+
}>;
|
|
558
578
|
|
|
559
579
|
declare interface ExhibitOptionButtonProps extends ExhibitIconButtonProps {
|
|
560
580
|
onSelectToggle?: (value: boolean) => void;
|
|
@@ -565,7 +585,9 @@ declare interface ExhibitOptionButtonProps extends ExhibitIconButtonProps {
|
|
|
565
585
|
tabIndex?: number;
|
|
566
586
|
}
|
|
567
587
|
|
|
568
|
-
export declare const ExhibitPopper: default_2.FC<ExhibitPopperProps
|
|
588
|
+
export declare const ExhibitPopper: default_2.FC<ExhibitPopperProps & {
|
|
589
|
+
ref?: any;
|
|
590
|
+
}>;
|
|
569
591
|
|
|
570
592
|
export declare interface ExhibitPopperPosition {
|
|
571
593
|
top: number;
|
|
@@ -654,7 +676,9 @@ export declare interface ExhibitPopupButtonProps extends BoxProps {
|
|
|
654
676
|
touchRippleRef?: default_2.Ref<any>;
|
|
655
677
|
}
|
|
656
678
|
|
|
657
|
-
export declare const ExhibitPopupIconButton: default_2.FC<ExhibitPopupIconButtonProps
|
|
679
|
+
export declare const ExhibitPopupIconButton: default_2.FC<ExhibitPopupIconButtonProps & {
|
|
680
|
+
ref?: any;
|
|
681
|
+
}>;
|
|
658
682
|
|
|
659
683
|
export declare interface ExhibitPopupIconButtonProps extends ExhibitPopupButtonProps {
|
|
660
684
|
dense?: boolean;
|
|
@@ -663,7 +687,9 @@ export declare interface ExhibitPopupIconButtonProps extends ExhibitPopupButtonP
|
|
|
663
687
|
buttonProps?: BoxProps;
|
|
664
688
|
}
|
|
665
689
|
|
|
666
|
-
export declare const ExhibitPopupMenuItem: default_2.FC<ExhibitPopupMenuItemProps
|
|
690
|
+
export declare const ExhibitPopupMenuItem: default_2.FC<ExhibitPopupMenuItemProps & {
|
|
691
|
+
ref?: any;
|
|
692
|
+
}>;
|
|
667
693
|
|
|
668
694
|
export declare interface ExhibitPopupMenuItemProps extends ExhibitPopupButtonProps {
|
|
669
695
|
}
|
|
@@ -693,7 +719,9 @@ export declare interface ExhibitThemeOptions extends ThemeOptions {
|
|
|
693
719
|
components?: ExhibitComponents;
|
|
694
720
|
}
|
|
695
721
|
|
|
696
|
-
export declare const ExhibitTooltip: default_2.FC<ExhibitTooltipProps
|
|
722
|
+
export declare const ExhibitTooltip: default_2.FC<ExhibitTooltipProps & {
|
|
723
|
+
ref?: any;
|
|
724
|
+
}>;
|
|
697
725
|
|
|
698
726
|
export declare interface ExhibitTooltipProps extends Omit<TooltipProps, "title"> {
|
|
699
727
|
title?: string | default_2.ReactNode;
|
|
@@ -934,7 +962,9 @@ export declare interface LazyWindowOptions extends UseModalOptions {
|
|
|
934
962
|
disableAutoDestroy?: boolean;
|
|
935
963
|
}
|
|
936
964
|
|
|
937
|
-
export declare const LoadingPanel: default_2.FC<LoadingPanelProps
|
|
965
|
+
export declare const LoadingPanel: default_2.FC<LoadingPanelProps & {
|
|
966
|
+
ref?: any;
|
|
967
|
+
}>;
|
|
938
968
|
|
|
939
969
|
export declare interface LoadingPanelProps extends BoxProps {
|
|
940
970
|
icon?: default_2.ReactNode;
|
|
@@ -961,7 +991,9 @@ export declare const MergeVerticalIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
961
991
|
|
|
962
992
|
export { ModalProvider }
|
|
963
993
|
|
|
964
|
-
export declare const NestingPopupButton: default_2.FC<NestingPopupButtonProps
|
|
994
|
+
export declare const NestingPopupButton: default_2.FC<NestingPopupButtonProps & {
|
|
995
|
+
ref?: any;
|
|
996
|
+
}>;
|
|
965
997
|
|
|
966
998
|
export declare interface NestingPopupButtonProps extends ExhibitPopupButtonProps {
|
|
967
999
|
nestedChildren?: NestingPopupButtonProps[];
|
|
@@ -974,7 +1006,9 @@ export declare interface NestingPopupButtonProps extends ExhibitPopupButtonProps
|
|
|
974
1006
|
|
|
975
1007
|
export declare const NewPresetStylesIcon: (props: SvgIconProps) => JSX.Element;
|
|
976
1008
|
|
|
977
|
-
export declare const OptionsDialog: default_2.FC<OptionsDialogProps
|
|
1009
|
+
export declare const OptionsDialog: default_2.FC<OptionsDialogProps & {
|
|
1010
|
+
ref?: any;
|
|
1011
|
+
}>;
|
|
978
1012
|
|
|
979
1013
|
export declare interface OptionsDialogProps extends OptionsNotificationOptions, InternalWindowProps {
|
|
980
1014
|
}
|
|
@@ -1142,7 +1176,9 @@ export declare const ShowRowIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
1142
1176
|
/**
|
|
1143
1177
|
* Simple Popup that takes a list of commands for a popup
|
|
1144
1178
|
*/
|
|
1145
|
-
export declare const SimpleCommandPopupButton: default_2.FC<SimpleCommandPopupButtonProps
|
|
1179
|
+
export declare const SimpleCommandPopupButton: default_2.FC<SimpleCommandPopupButtonProps & {
|
|
1180
|
+
ref?: any;
|
|
1181
|
+
}>;
|
|
1146
1182
|
|
|
1147
1183
|
export declare interface SimpleCommandPopupButtonProps extends CommandPopupButtonProps {
|
|
1148
1184
|
/**
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.19
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("react"),t=require("./D00MDFEA0j2VYoct.cjs"),s=require("@mui/material"),T=require("@mui/system"),L=["Input"],N=n.memo(n.forwardRef((y,$)=>{const{initialValue:v="",onOption:w,onValidateOption:u,onInputOption:c,onValidateInputOption:p,onDone:d,inputProps:g,inputLabel:F,inputType:S,inputPlaceHolder:P,options:h=L,autoFocusSel:b=".autoFocus",cancelOption:m,defaultOption:f=h?.[0],...C}=y,[I,j]=n.useState(!1),[a,q]=n.useState(v),[k,D]=n.useState(""),[V,B]=n.useState(!0),i=t.T(async(e,o)=>{if(!p)return!0;const r=await p?.(e,o);D(r?.message??"");const O=r?.valid??!0;return B(O),O},[p]),x=t.T(async e=>{c?.(a,e)},[a,c,d,w,m,f]),M=t.T(async e=>{e.keyCode===t.eo.Enter&&await i?.(a,null)},[a,x]),A=t.T(e=>{q(e.target.value),i?.(e.target.value,null)},[u]),H=t.T(async e=>{let o=await i(a,e);try{o!==!1&&(o=await i(a,e))}catch{}return o??!0},[a,u]);return l.jsx(t.OptionsDialog,{options:h,onDone:d,onOption:(e,o)=>{o||x(e)},onValidateOption:H,cancelOption:m,defaultOption:f,autoFocusSel:b,...C,children:l.jsx(s.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:l.jsx(s.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:l.jsx(s.TextField,{onFocus:e=>{I||e.target?.select(),j(!0)},type:S,label:F,helperText:k||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:V?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:P,spellCheck:!1,autoComplete:"off",...g,className:t.clsx("autoFocus",g?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${T.alpha("#fff",t.getOverlayAlpha(5))}, ${T.alpha("#fff",t.getOverlayAlpha(5))})`}}},value:a,onChange:A,onKeyDown:M,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=N;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, forwardRef as z, useState as p } from "react";
|
|
3
|
-
import { T as t, e as E, O as K, c as R, g as O } from "./D9uFu257zqcKAqgF.mjs";
|
|
4
|
-
import { Box as W, FormControl as q, TextField as A } from "@mui/material";
|
|
5
|
-
import { alpha as y } from "@mui/system";
|
|
6
|
-
/**
|
|
7
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.3.19
|
|
8
|
-
*
|
|
9
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
-
*/
|
|
12
|
-
const G = ["Input"], _ = j(z((T, J) => {
|
|
13
|
-
const { initialValue: w = "", onOption: F, onValidateOption: l, onInputOption: c, onValidateInputOption: s, onDone: u, inputProps: d, inputLabel: C, inputType: I, inputPlaceHolder: P, options: m = G, autoFocusSel: v = ".autoFocus", cancelOption: g, defaultOption: f = m?.[0], ...b } = T, [k, V] = p(!1), [a, B] = p(w), [D, S] = p(""), [H, L] = p(!0), e = t(async (o, n) => {
|
|
14
|
-
if (!s) return !0;
|
|
15
|
-
const r = await s?.(o, n);
|
|
16
|
-
S(r?.message ?? "");
|
|
17
|
-
const x = r?.valid ?? !0;
|
|
18
|
-
return L(x), x;
|
|
19
|
-
}, [s]), h = t(async (o) => {
|
|
20
|
-
c?.(a, o);
|
|
21
|
-
}, [a, c, u, F, g, f]), M = t(async (o) => {
|
|
22
|
-
o.keyCode === E.Enter && await e?.(a, null);
|
|
23
|
-
}, [a, h]), N = t((o) => {
|
|
24
|
-
B(o.target.value), e?.(o.target.value, null);
|
|
25
|
-
}, [l]), $ = t(async (o) => {
|
|
26
|
-
let n = await e(a, o);
|
|
27
|
-
try {
|
|
28
|
-
n !== !1 && (n = await e(a, o));
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
return n ?? !0;
|
|
32
|
-
}, [a, l]);
|
|
33
|
-
return i(K, { options: m, onDone: u, onOption: (o, n) => {
|
|
34
|
-
n || h(o);
|
|
35
|
-
}, onValidateOption: $, cancelOption: g, defaultOption: f, autoFocusSel: v, ...b, children: i(W, { sx: { paddingTop: (o) => o.spacing(1), paddingBottom: (o) => o.spacing(0) }, children: i(q, { sx: { paddingTop: (o) => o.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(A, { onFocus: (o) => {
|
|
36
|
-
k || o.target?.select(), V(!0);
|
|
37
|
-
}, type: I, label: C, helperText: D || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (o) => o.spacing(0.5), color: H ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: P, spellCheck: !1, autoComplete: "off", ...d, className: R("autoFocus", d?.className), sx: { paddingTop: (o) => o.spacing(1.25), paddingBottom: (o) => o.spacing(0.75), backgroundImage: `linear-gradient(${y("#fff", O(5))}, ${y("#fff", O(5))})` } } }, value: a, onChange: N, onKeyDown: M, onContextMenu: (o) => {
|
|
38
|
-
o.stopPropagation();
|
|
39
|
-
} }) }) }) });
|
|
40
|
-
}));
|
|
41
|
-
export {
|
|
42
|
-
_ as default
|
|
43
|
-
};
|