@owp/core 2.5.4 → 2.5.5
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/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/_virtual/index16.js +4 -4
- package/dist/_virtual/index17.js +4 -4
- package/dist/_virtual/index18.js +4 -4
- package/dist/_virtual/index19.js +4 -4
- package/dist/_virtual/index5.js +2 -2
- package/dist/components/OwpPageSkeleton/OwpPageSkeleton.js +4 -4
- package/dist/components/OwpTable/OwpDataTable.js +293 -327
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +102 -117
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/defaultTableStyle.js +50 -0
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -0
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +47 -45
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +179 -161
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/contexts/OwpAppProvider.js.map +1 -1
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +492 -0
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +678 -0
- package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js +301 -0
- package/dist/features/themePreview/components/ThemePreviewColorField.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewControls.js +306 -0
- package/dist/features/themePreview/components/ThemePreviewControls.js.map +1 -0
- package/dist/features/themePreview/components/themePreviewCanvas.icons.js +17 -0
- package/dist/features/themePreview/components/themePreviewCanvas.icons.js.map +1 -0
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js +296 -0
- package/dist/features/themePreview/components/themePreviewCanvas.shared.js.map +1 -0
- package/dist/features/themePreview/configs/grid.js +45 -0
- package/dist/features/themePreview/configs/grid.js.map +1 -0
- package/dist/features/themePreview/configs/presets.js +1106 -0
- package/dist/features/themePreview/configs/presets.js.map +1 -0
- package/dist/features/themePreview/configs/previewStorage.js +93 -0
- package/dist/features/themePreview/configs/previewStorage.js.map +1 -0
- package/dist/features/themePreview/configs/settings.js +148 -0
- package/dist/features/themePreview/configs/settings.js.map +1 -0
- package/dist/features/themePreview/configs/snackbar.js +39 -0
- package/dist/features/themePreview/configs/snackbar.js.map +1 -0
- package/dist/features/themePreview/configs/surface.js +10 -0
- package/dist/features/themePreview/configs/surface.js.map +1 -0
- package/dist/features/themePreview/configs/table.js +30 -0
- package/dist/features/themePreview/configs/table.js.map +1 -0
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js +43 -0
- package/dist/features/themePreview/defs/ThemePreviewGridDef.xml.js.map +1 -0
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js +43 -0
- package/dist/features/themePreview/defs/ThemePreviewReadonlyGridDef.xml.js.map +1 -0
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js +429 -0
- package/dist/features/themePreview/dialogs/ThemePreviewDialog.js.map +1 -0
- package/dist/features/themePreview/hooks/useThemePreview.js +235 -0
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -0
- package/dist/features/themePreview/utils/color.js +79 -0
- package/dist/features/themePreview/utils/color.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js +526 -0
- package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewExport.js +111 -0
- package/dist/features/themePreview/utils/themePreviewExport.js.map +1 -0
- package/dist/features/themePreview/utils/themePreviewSettings.js +211 -0
- package/dist/features/themePreview/utils/themePreviewSettings.js.map +1 -0
- package/dist/features/themePreview.js +75 -0
- package/dist/features/themePreview.js.map +1 -0
- package/dist/layout/components/logo/Logo.js +49 -45
- package/dist/layout/components/logo/Logo.js.map +1 -1
- package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
- package/dist/layout/components/toggles/ThemePreviewToggle.js +51 -0
- package/dist/layout/components/toggles/ThemePreviewToggle.js.map +1 -0
- package/dist/layout/components/toolbar/ToolbarLayout.js +8 -6
- package/dist/layout/components/toolbar/ToolbarLayout.js.map +1 -1
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/CheckCircleOutline.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/CheckCircleOutline.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DownloadOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ErrorOutline.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ErrorOutline.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/InfoOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/InfoOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardArrowUpRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardArrowUpRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MenuRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MenuRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/NotificationsNoneOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/NotificationsNoneOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PaletteOutlined.js +25 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PaletteOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/RestoreOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SaveOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SpaceDashboardOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SpaceDashboardOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UploadFileOutlined.js.map +1 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/WarningAmberRounded.js +9 -0
- package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/WarningAmberRounded.js.map +1 -0
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +49 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
- package/dist/types/contexts/OwpAppProvider.d.ts +2 -0
- package/dist/types/features/themePreview/components/ThemePreviewCanvas.d.ts +8 -0
- package/dist/types/features/themePreview/components/ThemePreviewCanvasSections.d.ts +82 -0
- package/dist/types/features/themePreview/components/ThemePreviewColorField.d.ts +10 -0
- package/dist/types/features/themePreview/components/ThemePreviewControls.d.ts +18 -0
- package/dist/types/features/themePreview/components/index.d.ts +3 -0
- package/dist/types/features/themePreview/components/themePreviewCanvas.icons.d.ts +3 -0
- package/dist/types/features/themePreview/components/themePreviewCanvas.shared.d.ts +121 -0
- package/dist/types/features/themePreview/configs/grid.d.ts +41 -0
- package/dist/types/features/themePreview/configs/index.d.ts +7 -0
- package/dist/types/features/themePreview/configs/presets.d.ts +1153 -0
- package/dist/types/features/themePreview/configs/previewStorage.d.ts +34 -0
- package/dist/types/features/themePreview/configs/settings.d.ts +271 -0
- package/dist/types/features/themePreview/configs/snackbar.d.ts +43 -0
- package/dist/types/features/themePreview/configs/surface.d.ts +6 -0
- package/dist/types/features/themePreview/configs/table.d.ts +47 -0
- package/dist/types/features/themePreview/dialogs/ThemePreviewDialog.d.ts +3 -0
- package/dist/types/features/themePreview/dialogs/index.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/index.d.ts +1 -0
- package/dist/types/features/themePreview/hooks/useThemePreview.d.ts +60 -0
- package/dist/types/features/themePreview/index.d.ts +6 -0
- package/dist/types/features/themePreview/types/index.d.ts +1 -0
- package/dist/types/features/themePreview/types/themePreview.d.ts +44 -0
- package/dist/types/features/themePreview/utils/color.d.ts +14 -0
- package/dist/types/features/themePreview/utils/index.d.ts +4 -0
- package/dist/types/features/themePreview/utils/themePreviewDefinitions.d.ts +10 -0
- package/dist/types/features/themePreview/utils/themePreviewExport.d.ts +1091 -0
- package/dist/types/features/themePreview/utils/themePreviewSettings.d.ts +54 -0
- package/dist/types/layout/components/toggles/ThemePreviewToggle.d.ts +5 -0
- package/features/themePreview.d.ts +3 -0
- package/features/themePreview.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SnackbarProviderTheme, SnackbarTheme } from '@/features/themePreview/configs/snackbar';
|
|
2
|
+
import type { OwpSettingsConfigType } from '@/types';
|
|
3
|
+
import type { PartialDeep } from 'type-fest';
|
|
4
|
+
type ThemePreviewAppliedSettings = {
|
|
5
|
+
theme?: OwpSettingsConfigType['theme'];
|
|
6
|
+
snackbar?: SnackbarTheme;
|
|
7
|
+
};
|
|
8
|
+
type ThemePreviewTemporaryMode = 'light' | 'dark';
|
|
9
|
+
type ThemePreviewTemporaryPresetSectionKey = 'main' | 'navbar' | 'toolbar';
|
|
10
|
+
type ThemePreviewTemporarySectionKey = ThemePreviewTemporaryPresetSectionKey | 'grid' | 'table' | 'snackbar';
|
|
11
|
+
export type ThemePreviewTemporarySettings = Omit<OwpSettingsConfigType, 'snackbar'> & {
|
|
12
|
+
snackbar?: SnackbarTheme;
|
|
13
|
+
snackbarProviderProps?: SnackbarProviderTheme;
|
|
14
|
+
};
|
|
15
|
+
export type ThemePreviewTemporarySelectionState = {
|
|
16
|
+
activeSection: ThemePreviewTemporarySectionKey;
|
|
17
|
+
selectedModes: Record<ThemePreviewTemporaryPresetSectionKey, ThemePreviewTemporaryMode>;
|
|
18
|
+
selectedPresetKeys: Record<ThemePreviewTemporaryPresetSectionKey, string>;
|
|
19
|
+
};
|
|
20
|
+
export type ThemePreviewTemporaryState = {
|
|
21
|
+
draftSettings: ThemePreviewTemporarySettings;
|
|
22
|
+
savedAt: string;
|
|
23
|
+
saveType: 'auto' | 'manual';
|
|
24
|
+
selectionState: ThemePreviewTemporarySelectionState;
|
|
25
|
+
version: 1;
|
|
26
|
+
};
|
|
27
|
+
export declare function getThemePreviewAppliedSettings(): ThemePreviewAppliedSettings;
|
|
28
|
+
export declare function persistThemePreviewAppliedSettings(settings: ThemePreviewAppliedSettings): void;
|
|
29
|
+
export declare function clearThemePreviewAppliedSettings(): void;
|
|
30
|
+
export declare function getThemePreviewTemporaryState(): ThemePreviewTemporaryState;
|
|
31
|
+
export declare function persistThemePreviewTemporaryState(temporaryState: ThemePreviewTemporaryState): void;
|
|
32
|
+
export declare function clearThemePreviewTemporaryState(): void;
|
|
33
|
+
export declare function getResolvedThemePreviewSettingsConfig<TSettingsConfig extends PartialDeep<OwpSettingsConfigType>>(settingsConfig: TSettingsConfig): TSettingsConfig;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
export declare const defaultSettingsConfig: {
|
|
2
|
+
customScrollbars: true;
|
|
3
|
+
direction: "ltr";
|
|
4
|
+
snackbar: {
|
|
5
|
+
default: {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
success: {
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
color: string;
|
|
12
|
+
};
|
|
13
|
+
info: {
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
warning: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
error: {
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
color: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
theme: {
|
|
27
|
+
main: {
|
|
28
|
+
grid: {
|
|
29
|
+
header: {
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
color: string;
|
|
32
|
+
fontSize: string;
|
|
33
|
+
fontWeight: string;
|
|
34
|
+
height: number;
|
|
35
|
+
};
|
|
36
|
+
body: {
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
color: string;
|
|
39
|
+
fillBackgroundColor: string;
|
|
40
|
+
};
|
|
41
|
+
row: {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
solidBackgroundColor: string;
|
|
44
|
+
};
|
|
45
|
+
cell: {
|
|
46
|
+
fontSize: string;
|
|
47
|
+
};
|
|
48
|
+
state: {
|
|
49
|
+
hoverRowBackgroundColor: string;
|
|
50
|
+
hoverRowBorderColor: string;
|
|
51
|
+
selectedCellBackgroundColor: string;
|
|
52
|
+
selectedRowBackgroundColor: string;
|
|
53
|
+
focusedRowBackgroundColor: string;
|
|
54
|
+
focusedRowBorderColor: string;
|
|
55
|
+
hoverCellBackgroundColor: string;
|
|
56
|
+
hoverCellBorderColor: string;
|
|
57
|
+
focusedCellBackgroundColor: string;
|
|
58
|
+
focusedCellBorderColor: string;
|
|
59
|
+
editingCellBorderColor: string;
|
|
60
|
+
focusedCellRectBackgroundColor: string;
|
|
61
|
+
};
|
|
62
|
+
editable: {
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
};
|
|
65
|
+
changed: {
|
|
66
|
+
backgroundColor: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
table: {
|
|
70
|
+
borderRadius: string;
|
|
71
|
+
header: {
|
|
72
|
+
backgroundColor: string;
|
|
73
|
+
color: string;
|
|
74
|
+
fontSize: string;
|
|
75
|
+
};
|
|
76
|
+
cell: {
|
|
77
|
+
fontSize: string;
|
|
78
|
+
};
|
|
79
|
+
row: {
|
|
80
|
+
backgroundColor: string;
|
|
81
|
+
hoverBackgroundColor: string;
|
|
82
|
+
selectedBackgroundColor: string;
|
|
83
|
+
};
|
|
84
|
+
field: {
|
|
85
|
+
header: {
|
|
86
|
+
fontSize: string;
|
|
87
|
+
fontWeight: number;
|
|
88
|
+
};
|
|
89
|
+
cell: {
|
|
90
|
+
backgroundColor: string;
|
|
91
|
+
fontSize: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
palette: {
|
|
96
|
+
mode: "light";
|
|
97
|
+
text: {
|
|
98
|
+
primary: string;
|
|
99
|
+
secondary: string;
|
|
100
|
+
disabled: string;
|
|
101
|
+
};
|
|
102
|
+
common: {
|
|
103
|
+
black: string;
|
|
104
|
+
white: string;
|
|
105
|
+
};
|
|
106
|
+
background: {
|
|
107
|
+
paper: string;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
primary: {
|
|
111
|
+
light: string;
|
|
112
|
+
main: string;
|
|
113
|
+
dark: string;
|
|
114
|
+
contrastText: string;
|
|
115
|
+
};
|
|
116
|
+
secondary: {
|
|
117
|
+
light: string;
|
|
118
|
+
main: string;
|
|
119
|
+
dark: string;
|
|
120
|
+
contrastText: string;
|
|
121
|
+
};
|
|
122
|
+
success: {
|
|
123
|
+
main: string;
|
|
124
|
+
};
|
|
125
|
+
info: {
|
|
126
|
+
main: string;
|
|
127
|
+
contrastText: string;
|
|
128
|
+
};
|
|
129
|
+
warning: {
|
|
130
|
+
main: string;
|
|
131
|
+
contrastText: string;
|
|
132
|
+
};
|
|
133
|
+
error: {
|
|
134
|
+
main: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
navbar: {
|
|
139
|
+
palette: {
|
|
140
|
+
mode: "light";
|
|
141
|
+
divider: string;
|
|
142
|
+
text: {
|
|
143
|
+
primary: string;
|
|
144
|
+
secondary: string;
|
|
145
|
+
disabled: string;
|
|
146
|
+
};
|
|
147
|
+
common: {
|
|
148
|
+
black: string;
|
|
149
|
+
white: string;
|
|
150
|
+
};
|
|
151
|
+
background: {
|
|
152
|
+
paper: string;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
primary: {
|
|
156
|
+
readonly light: "#4f585c";
|
|
157
|
+
readonly main: "#232a2d";
|
|
158
|
+
readonly dark: "#111618";
|
|
159
|
+
readonly contrastText: "#FFFFFF";
|
|
160
|
+
};
|
|
161
|
+
secondary: {
|
|
162
|
+
main: string;
|
|
163
|
+
contrastText: string;
|
|
164
|
+
};
|
|
165
|
+
success: {
|
|
166
|
+
main: string;
|
|
167
|
+
};
|
|
168
|
+
info: {
|
|
169
|
+
main: string;
|
|
170
|
+
contrastText: string;
|
|
171
|
+
};
|
|
172
|
+
warning: {
|
|
173
|
+
main: string;
|
|
174
|
+
contrastText: string;
|
|
175
|
+
};
|
|
176
|
+
error: {
|
|
177
|
+
main: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
toolbar: {
|
|
182
|
+
palette: {
|
|
183
|
+
mode: "dark";
|
|
184
|
+
divider: "#FFFFFF";
|
|
185
|
+
text: {
|
|
186
|
+
primary: string;
|
|
187
|
+
secondary: string;
|
|
188
|
+
disabled: string;
|
|
189
|
+
};
|
|
190
|
+
common: {
|
|
191
|
+
black: string;
|
|
192
|
+
white: string;
|
|
193
|
+
};
|
|
194
|
+
background: {
|
|
195
|
+
paper: "#111618";
|
|
196
|
+
default: "#232a2d";
|
|
197
|
+
};
|
|
198
|
+
primary: {
|
|
199
|
+
light: string;
|
|
200
|
+
main: string;
|
|
201
|
+
dark: string;
|
|
202
|
+
contrastText: string;
|
|
203
|
+
};
|
|
204
|
+
secondary: {
|
|
205
|
+
dark: "#FFFFFF";
|
|
206
|
+
light: string;
|
|
207
|
+
main: string;
|
|
208
|
+
contrastText: string;
|
|
209
|
+
};
|
|
210
|
+
success: {
|
|
211
|
+
main: string;
|
|
212
|
+
};
|
|
213
|
+
info: {
|
|
214
|
+
main: string;
|
|
215
|
+
contrastText: string;
|
|
216
|
+
};
|
|
217
|
+
warning: {
|
|
218
|
+
main: string;
|
|
219
|
+
contrastText: string;
|
|
220
|
+
};
|
|
221
|
+
error: {
|
|
222
|
+
main: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
footer: {
|
|
227
|
+
palette: {
|
|
228
|
+
mode: "light";
|
|
229
|
+
text: {
|
|
230
|
+
primary: string;
|
|
231
|
+
secondary: string;
|
|
232
|
+
disabled: string;
|
|
233
|
+
};
|
|
234
|
+
common: {
|
|
235
|
+
black: string;
|
|
236
|
+
white: string;
|
|
237
|
+
};
|
|
238
|
+
background: {
|
|
239
|
+
paper: string;
|
|
240
|
+
default: string;
|
|
241
|
+
};
|
|
242
|
+
primary: {
|
|
243
|
+
light: string;
|
|
244
|
+
main: string;
|
|
245
|
+
dark: string;
|
|
246
|
+
contrastText: string;
|
|
247
|
+
};
|
|
248
|
+
secondary: {
|
|
249
|
+
light: string;
|
|
250
|
+
main: string;
|
|
251
|
+
dark: string;
|
|
252
|
+
contrastText: string;
|
|
253
|
+
};
|
|
254
|
+
success: {
|
|
255
|
+
main: string;
|
|
256
|
+
};
|
|
257
|
+
info: {
|
|
258
|
+
main: string;
|
|
259
|
+
contrastText: string;
|
|
260
|
+
};
|
|
261
|
+
warning: {
|
|
262
|
+
main: string;
|
|
263
|
+
contrastText: string;
|
|
264
|
+
};
|
|
265
|
+
error: {
|
|
266
|
+
main: string;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SnackbarProviderProps } from 'notistack';
|
|
2
|
+
export declare const snackbarVariantKeys: readonly ["default", "success", "info", "warning", "error"];
|
|
3
|
+
export type SnackbarVariantKey = (typeof snackbarVariantKeys)[number];
|
|
4
|
+
export type SnackbarVariantTheme = {
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
export type SnackbarTheme = Record<SnackbarVariantKey, SnackbarVariantTheme>;
|
|
9
|
+
export type SnackbarProviderTheme = Omit<SnackbarProviderProps, 'children'>;
|
|
10
|
+
export declare const defaultSnackbarTheme: {
|
|
11
|
+
default: {
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
success: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
19
|
+
info: {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
};
|
|
23
|
+
warning: {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
error: {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const defaultSnackbarProviderProps: {
|
|
33
|
+
maxSnack: number;
|
|
34
|
+
autoHideDuration: number;
|
|
35
|
+
anchorOrigin: {
|
|
36
|
+
vertical: "top";
|
|
37
|
+
horizontal: "center";
|
|
38
|
+
};
|
|
39
|
+
style: {
|
|
40
|
+
fontSize: string;
|
|
41
|
+
lineHeight: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { OwpTableThemeConfigType } from '@/types';
|
|
2
|
+
type OwpTableHeaderConfigType = NonNullable<OwpTableThemeConfigType['header']>;
|
|
3
|
+
type OwpTableCellConfigType = NonNullable<OwpTableThemeConfigType['cell']>;
|
|
4
|
+
export type ThemePreviewTableCellConfigType = OwpTableCellConfigType & {
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ThemePreviewTableVariantConfigType = {
|
|
8
|
+
header?: OwpTableHeaderConfigType;
|
|
9
|
+
cell?: ThemePreviewTableCellConfigType;
|
|
10
|
+
};
|
|
11
|
+
export type ThemePreviewTableRowConfigType = {
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
hoverBackgroundColor?: string;
|
|
14
|
+
selectedBackgroundColor?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ThemePreviewTableConfigType = ThemePreviewTableVariantConfigType & {
|
|
17
|
+
borderRadius?: number | string;
|
|
18
|
+
field?: ThemePreviewTableVariantConfigType;
|
|
19
|
+
row?: ThemePreviewTableRowConfigType;
|
|
20
|
+
};
|
|
21
|
+
export declare const defaultTableTheme: {
|
|
22
|
+
borderRadius: string;
|
|
23
|
+
header: {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
color: string;
|
|
26
|
+
fontSize: string;
|
|
27
|
+
};
|
|
28
|
+
cell: {
|
|
29
|
+
fontSize: string;
|
|
30
|
+
};
|
|
31
|
+
row: {
|
|
32
|
+
backgroundColor: string;
|
|
33
|
+
hoverBackgroundColor: string;
|
|
34
|
+
selectedBackgroundColor: string;
|
|
35
|
+
};
|
|
36
|
+
field: {
|
|
37
|
+
header: {
|
|
38
|
+
fontSize: string;
|
|
39
|
+
fontWeight: number;
|
|
40
|
+
};
|
|
41
|
+
cell: {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
fontSize: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemePreviewDialog } from './ThemePreviewDialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useThemePreview } from './useThemePreview';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type ThemePreviewTemporaryState } from '@/features/themePreview/configs/previewStorage';
|
|
2
|
+
import type { OwpSettingsConfigType } from '@/types';
|
|
3
|
+
import type { PartialDeep } from 'type-fest';
|
|
4
|
+
import type { ThemePreviewMode, ThemePreviewPresetKeyBySection, ThemePreviewPresetThemes, ThemePreviewSectionKey, ThemePreviewSettings } from '../types';
|
|
5
|
+
interface UseThemePreviewOptions {
|
|
6
|
+
initialSection?: ThemePreviewSectionKey;
|
|
7
|
+
initialPresetKeys: ThemePreviewPresetKeyBySection;
|
|
8
|
+
presetThemes: ThemePreviewPresetThemes;
|
|
9
|
+
resetTheme: PartialDeep<OwpSettingsConfigType['theme']>;
|
|
10
|
+
}
|
|
11
|
+
export declare function useThemePreview({ initialSection, initialPresetKeys: _initialPresetKeys, presetThemes, resetTheme, }: UseThemePreviewOptions): {
|
|
12
|
+
activeSection: ThemePreviewSectionKey;
|
|
13
|
+
canApplyToMain: boolean;
|
|
14
|
+
draftSettings: ThemePreviewSettings;
|
|
15
|
+
hasTemporaryChanges: boolean;
|
|
16
|
+
hasTemporarySnapshot: boolean;
|
|
17
|
+
presetOptions: {
|
|
18
|
+
key: string;
|
|
19
|
+
label: string;
|
|
20
|
+
mode: ThemePreviewMode;
|
|
21
|
+
sections: import("..").ThemePreviewPaletteSectionKey[];
|
|
22
|
+
}[];
|
|
23
|
+
selectedModes: Record<import("..").ThemePreviewPaletteSectionKey, ThemePreviewMode>;
|
|
24
|
+
selectedPresetKeys: ThemePreviewPresetKeyBySection;
|
|
25
|
+
setActiveSection: import("react").Dispatch<import("react").SetStateAction<ThemePreviewSectionKey>>;
|
|
26
|
+
handlePaletteValueChange: (path: string, value: string) => void;
|
|
27
|
+
handlePaletteValuesChange: (updates: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}>) => void;
|
|
31
|
+
handleApplyToMain: () => void;
|
|
32
|
+
handleLoadSettings: (theme: OwpSettingsConfigType["theme"], snackbarTheme?: {
|
|
33
|
+
default: {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
success: {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
info: {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
color: string;
|
|
44
|
+
};
|
|
45
|
+
warning: {
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
color: string;
|
|
48
|
+
};
|
|
49
|
+
error: {
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
}) => void;
|
|
54
|
+
handlePresetKeyChange: (presetKey: string) => void;
|
|
55
|
+
handlePresetModeChange: (mode: ThemePreviewMode) => void;
|
|
56
|
+
handleReset: () => void;
|
|
57
|
+
handleTemporaryLoad: () => boolean;
|
|
58
|
+
handleTemporarySave: (saveType?: ThemePreviewTemporaryState["saveType"]) => void;
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ThemePreviewCustomSectionKey, ThemePreviewDialogPayload, ThemePreviewFieldDefinition, ThemePreviewFieldGroup, ThemePreviewMode, ThemePreviewPaletteSectionKey, ThemePreviewPresetKeyBySection, ThemePreviewPresetOption, ThemePreviewPresetSectionKey, ThemePreviewPresetThemes, ThemePreviewSectionKey, ThemePreviewSectionOption, ThemePreviewSettings, } from './themePreview';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SnackbarProviderTheme, SnackbarTheme } from '@/features/themePreview/configs/snackbar';
|
|
2
|
+
import type { OwpSettingsConfigType, OwpThemesType } from '@/types';
|
|
3
|
+
export type ThemePreviewPaletteSectionKey = Exclude<keyof OwpSettingsConfigType['theme'], 'footer'>;
|
|
4
|
+
export type ThemePreviewPresetSectionKey = ThemePreviewPaletteSectionKey;
|
|
5
|
+
export type ThemePreviewCustomSectionKey = 'grid' | 'table' | 'snackbar';
|
|
6
|
+
export type ThemePreviewSectionKey = ThemePreviewPaletteSectionKey | ThemePreviewCustomSectionKey;
|
|
7
|
+
export type ThemePreviewMode = 'light' | 'dark';
|
|
8
|
+
export type ThemePreviewSettings = Omit<OwpSettingsConfigType, 'snackbar'> & {
|
|
9
|
+
snackbar: SnackbarTheme;
|
|
10
|
+
snackbarProviderProps: SnackbarProviderTheme;
|
|
11
|
+
};
|
|
12
|
+
export interface ThemePreviewDialogPayload {
|
|
13
|
+
initialSection?: ThemePreviewSectionKey;
|
|
14
|
+
}
|
|
15
|
+
export interface ThemePreviewSectionOption {
|
|
16
|
+
key: ThemePreviewSectionKey;
|
|
17
|
+
label: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ThemePreviewFieldDefinition {
|
|
21
|
+
path: string;
|
|
22
|
+
label: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
allowAlpha?: boolean;
|
|
25
|
+
showColorPicker?: boolean;
|
|
26
|
+
valueFormat?: 'px-number' | 'rem-number';
|
|
27
|
+
options?: Array<{
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export interface ThemePreviewFieldGroup {
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
fields: ThemePreviewFieldDefinition[];
|
|
36
|
+
}
|
|
37
|
+
export interface ThemePreviewPresetOption {
|
|
38
|
+
key: string;
|
|
39
|
+
label: string;
|
|
40
|
+
mode: ThemePreviewMode;
|
|
41
|
+
sections?: ThemePreviewPresetSectionKey[];
|
|
42
|
+
}
|
|
43
|
+
export type ThemePreviewPresetThemes = Partial<Record<string, OwpThemesType[string]>>;
|
|
44
|
+
export type ThemePreviewPresetKeyBySection = Record<ThemePreviewPresetSectionKey, string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function toColorPickerValue(value?: string, fallback?: string): string;
|
|
2
|
+
export declare function applyColorPickerValue(previousValue: string | undefined, nextPickerValue: string): string;
|
|
3
|
+
export declare function getColorAlphaValue(value?: string): string;
|
|
4
|
+
export declare function canDeriveThemePreviewColor(value?: string): boolean;
|
|
5
|
+
type ThemePreviewDerivedColorOptions = {
|
|
6
|
+
blackTextColor?: string;
|
|
7
|
+
whiteTextColor?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function deriveThemePreviewPaletteGroupValues(mainColor: string, options?: ThemePreviewDerivedColorOptions): {
|
|
10
|
+
light: string;
|
|
11
|
+
dark: string;
|
|
12
|
+
contrastText: string;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { applyColorPickerValue, canDeriveThemePreviewColor, deriveThemePreviewPaletteGroupValues, getColorAlphaValue, toColorPickerValue, } from './color';
|
|
2
|
+
export { createThemePreviewExportData } from './themePreviewExport';
|
|
3
|
+
export { themePreviewFieldGroupsBySection, themePreviewSectionOptions } from './themePreviewDefinitions';
|
|
4
|
+
export { isThemePreviewCustomSection, THEME_PREVIEW_CUSTOM_PRESET_KEY, applyThemePreviewPreset, cloneThemePreviewSettings, getThemePreviewDraftSettings, getThemePreviewPaletteValue, getThemePreviewPresetOptions, getThemePreviewPresetOptionsByMode, getThemePreviewResetSettings, resetThemePreviewSessionState, getThemePreviewSectionMode, getThemePreviewSelectionState, setThemePreviewPaletteValues, setThemePreviewPaletteValue, setThemePreviewDraftSettings, setThemePreviewSelectionState, } from './themePreviewSettings';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ThemePreviewFieldGroup, ThemePreviewSectionOption } from '../types';
|
|
2
|
+
export declare const themePreviewSectionOptions: ThemePreviewSectionOption[];
|
|
3
|
+
export declare const themePreviewFieldGroupsBySection: {
|
|
4
|
+
main: ThemePreviewFieldGroup[];
|
|
5
|
+
navbar: ThemePreviewFieldGroup[];
|
|
6
|
+
toolbar: ThemePreviewFieldGroup[];
|
|
7
|
+
grid: ThemePreviewFieldGroup[];
|
|
8
|
+
table: ThemePreviewFieldGroup[];
|
|
9
|
+
snackbar: ThemePreviewFieldGroup[];
|
|
10
|
+
};
|