@sheetxl/utils-mui 0.4.22 → 0.5.0
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/BmX6HhKlxti-bN8i.cjs +16 -0
- package/browser/cjs/{CPcLPSJKlzdPeHVa.cjs → Ci5jZPE3jqDTv-K9.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{DS5DyNsNFVQmF_hV.mjs → B-Nkwhgl7KowQl04.mjs} +1379 -1343
- package/browser/esm/{BHt6iN98tWkAO84v.mjs → BFjRDODY842piXRJ.mjs} +2 -2
- package/browser/esm/index.mjs +63 -61
- package/node/esm/{C4cIGlmvNsquEDAB.mjs → B6qy-q9CskCdhro7.mjs} +1 -1
- package/node/esm/index.mjs +496 -460
- package/package.json +3 -3
- package/types/index.d.ts +84 -3
- package/browser/cjs/DdW3DuKeBC9SPVlY.cjs +0 -16
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.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@popperjs/core": "^2.11.8",
|
|
35
|
-
"@sheetxl/utils": "^0.
|
|
36
|
-
"@sheetxl/utils-react": "^0.
|
|
35
|
+
"@sheetxl/utils": "^0.5.0",
|
|
36
|
+
"@sheetxl/utils-react": "^0.5.0",
|
|
37
37
|
"clsx": "^2.1.1",
|
|
38
38
|
"detect-it": "^4.0.1",
|
|
39
39
|
"focus-trap-react": "^10.1.4",
|
package/types/index.d.ts
CHANGED
|
@@ -1206,6 +1206,8 @@ export declare const SortDecreaseIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
1206
1206
|
|
|
1207
1207
|
export declare const SortIncreaseIcon: (props: SvgIconProps) => JSX.Element;
|
|
1208
1208
|
|
|
1209
|
+
declare type Source = 'prop' | 'class' | 'media';
|
|
1210
|
+
|
|
1209
1211
|
export declare const StackTrace: default_2.FC<StackTraceProps>;
|
|
1210
1212
|
|
|
1211
1213
|
export declare interface StackTraceProps {
|
|
@@ -1308,6 +1310,76 @@ export declare interface ThemedIconProps extends BoxProps {
|
|
|
1308
1310
|
|
|
1309
1311
|
export declare const themeIcon: (element: default_2.ReactElement<any>) => JSX.Element;
|
|
1310
1312
|
|
|
1313
|
+
export declare const ThemeMode: {
|
|
1314
|
+
readonly Light: "light";
|
|
1315
|
+
readonly Dark: "dark";
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
export declare type ThemeMode = typeof ThemeMode[keyof typeof ThemeMode];
|
|
1319
|
+
|
|
1320
|
+
export declare interface ThemeModeOptions {
|
|
1321
|
+
/**
|
|
1322
|
+
* The user doesn't want to use the default.
|
|
1323
|
+
*
|
|
1324
|
+
* @defaultValue the system default
|
|
1325
|
+
*/
|
|
1326
|
+
mode?: ThemeMode;
|
|
1327
|
+
/**
|
|
1328
|
+
* Customizations to the theme.
|
|
1329
|
+
*
|
|
1330
|
+
* @defaultValue `Theme`
|
|
1331
|
+
*/
|
|
1332
|
+
theme?: ThemeOptions;
|
|
1333
|
+
/**
|
|
1334
|
+
* Customizations to the light theme.
|
|
1335
|
+
*
|
|
1336
|
+
* @defaultValue Theme values.
|
|
1337
|
+
*/
|
|
1338
|
+
light?: ThemeOptions;
|
|
1339
|
+
/**
|
|
1340
|
+
* Customizations to the dark theme.
|
|
1341
|
+
*
|
|
1342
|
+
* @defaultValue Theme values
|
|
1343
|
+
*/
|
|
1344
|
+
dark?: ThemeOptions;
|
|
1345
|
+
/**
|
|
1346
|
+
* By default the the standalone workbook grid will be the same theme as the workbook.
|
|
1347
|
+
* If forceGridLight is `true` then the grid will always use the light mode.
|
|
1348
|
+
*
|
|
1349
|
+
* When `true` the grid will behave consistent with current Excel (2023).
|
|
1350
|
+
*
|
|
1351
|
+
* @remarks
|
|
1352
|
+
* When the grid has a dark theme it will attempt to use DocTheme dark colors
|
|
1353
|
+
* but will 'force' non dark-themed colors to be light via an inversion algo.
|
|
1354
|
+
*
|
|
1355
|
+
* @defaultValue false
|
|
1356
|
+
*/
|
|
1357
|
+
enableDarkGrid?: boolean;
|
|
1358
|
+
/**
|
|
1359
|
+
* By default the the standalone workbook images will invert images if the grid
|
|
1360
|
+
* is in dark mode.
|
|
1361
|
+
*
|
|
1362
|
+
* @defaultValue false
|
|
1363
|
+
*/
|
|
1364
|
+
enableDarkImages?: boolean;
|
|
1365
|
+
/**
|
|
1366
|
+
* When theming also apply the MUI CssBaseline.
|
|
1367
|
+
*
|
|
1368
|
+
* @defaultValue false
|
|
1369
|
+
*/
|
|
1370
|
+
cssBaseline?: boolean;
|
|
1371
|
+
/**
|
|
1372
|
+
* Called if the current mode changes for the AppTheme.
|
|
1373
|
+
*
|
|
1374
|
+
* @remarks
|
|
1375
|
+
* * This is only used if the themeOptions are not provided.
|
|
1376
|
+
* * If `null` is sent then the theme should inherit.
|
|
1377
|
+
*/
|
|
1378
|
+
onModeChange?: (mode: ThemeMode | null) => void;
|
|
1379
|
+
onEnabledDarkGridChange?: (allow: boolean) => void;
|
|
1380
|
+
onEnabledDarkImagesChange?: (allow: boolean) => void;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1311
1383
|
export declare const TicketIcon: (props: SvgIconProps) => JSX.Element;
|
|
1312
1384
|
|
|
1313
1385
|
export declare const toShortcutElements: (keyStroke: IKeyStroke | IKeyStroke[], modifierSymbol?: boolean, key?: string) => default_2.ReactElement;
|
|
@@ -1326,7 +1398,7 @@ export declare const UndoIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
1326
1398
|
*/
|
|
1327
1399
|
export declare const useFloatStack: (props?: FloatStackOptions) => FloatStack;
|
|
1328
1400
|
|
|
1329
|
-
export declare const useInputDialog: () => (props: InputDialogProps) => Promise<{
|
|
1401
|
+
export declare const useInputDialog: (propsDefault?: InputDialogProps) => (props: InputDialogProps) => Promise<{
|
|
1330
1402
|
input: string;
|
|
1331
1403
|
option: string;
|
|
1332
1404
|
}>;
|
|
@@ -1336,11 +1408,20 @@ export declare const useInputDialog: () => (props: InputDialogProps) => Promise<
|
|
|
1336
1408
|
* @remarks
|
|
1337
1409
|
* This relays on the onHide prop working
|
|
1338
1410
|
*/
|
|
1339
|
-
export declare function useLazyWindow<P extends InternalWindowProps>(): (type: string, importFunc: () => Promise<{
|
|
1411
|
+
export declare function useLazyWindow<P extends InternalWindowProps>(propsDefault?: LazyWindowOptions): (type: string, importFunc: () => Promise<{
|
|
1340
1412
|
default: any;
|
|
1341
1413
|
}>, props?: P, options?: LazyWindowOptions) => Promise<HTMLElement>;
|
|
1342
1414
|
|
|
1343
|
-
export declare const useOptionsDialog: () => (options: OptionsDialogProps) => Promise<string>;
|
|
1415
|
+
export declare const useOptionsDialog: (propsDefault?: OptionsDialogProps) => (options: OptionsDialogProps) => Promise<string>;
|
|
1416
|
+
|
|
1417
|
+
export declare function useResolvedThemeMode(options?: UseThemeOptions): {
|
|
1418
|
+
themeMode: ThemeMode;
|
|
1419
|
+
source: Source;
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
declare interface UseThemeOptions {
|
|
1423
|
+
mode?: ThemeMode;
|
|
1424
|
+
}
|
|
1344
1425
|
|
|
1345
1426
|
export declare const VisibilityOffIcon: (props: SvgIconProps) => JSX.Element;
|
|
1346
1427
|
|