@owp/core 2.5.3 → 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/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.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/OwpMrtTable/OwpMrtTable.js +250 -258
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpPageSkeleton/OwpPageSkeleton.js +4 -4
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js +166 -0
- package/dist/components/OwpSnackbarContent/OwpSnackbarContent.js.map +1 -0
- package/dist/components/OwpTable/OwpDataTable.js +321 -327
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +102 -58
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +158 -174
- 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/OwpTable/internal/treeGridTableStyle.js +77 -0
- package/dist/components/OwpTable/internal/treeGridTableStyle.js.map +1 -0
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +200 -253
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +183 -124
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +462 -0
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -0
- package/dist/configs/defaultConfig.js +67 -44
- package/dist/configs/defaultConfig.js.map +1 -1
- package/dist/constants/gridTheme.js +60 -10
- package/dist/constants/gridTheme.js.map +1 -1
- package/dist/constants/tableTheme.js +16 -0
- package/dist/constants/tableTheme.js.map +1 -0
- package/dist/constants/treeGrid.js +44 -26
- package/dist/constants/treeGrid.js.map +1 -1
- package/dist/constants.js +21 -20
- package/dist/contexts/OwpAppProvider.js.map +1 -1
- package/dist/contexts/OwpUiProvider.js +59 -38
- package/dist/contexts/OwpUiProvider.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/index.js +111 -110
- 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 +13 -10
- 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/OwpSnackbarContent/OwpSnackbarContent.d.ts +2 -0
- package/dist/types/components/OwpTable/OwpTable.d.ts +3 -1
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +49 -0
- package/dist/types/components/OwpTable/internal/treeGridTableStyle.d.ts +105 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +11 -2
- package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +20 -0
- package/dist/types/configs/defaultConfig.d.ts +22 -0
- package/dist/types/constants/gridTheme.d.ts +58 -0
- package/dist/types/constants/tableTheme.d.ts +18 -0
- package/dist/types/constants/treeGrid.d.ts +5 -0
- 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/dist/types/types/OwpGridThemeTypes.d.ts +34 -0
- package/dist/types/types/OwpSettingsTypes.d.ts +9 -0
- package/dist/types/types/OwpTableThemeTypes.d.ts +16 -0
- package/dist/types/types/index.d.ts +3 -2
- package/dist/types/utils/treeGridUtil.d.ts +1 -0
- package/dist/utils/exceljsBrowser.js +45 -48
- package/dist/utils/exceljsBrowser.js.map +1 -1
- package/dist/utils/treeGridUtil.js +66 -66
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/features/themePreview.d.ts +3 -0
- package/features/themePreview.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
var L = Object.defineProperty;
|
|
2
|
+
var h = (e, a) => L(e, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { jsxs as p, jsx as o } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { ButtonBase as R, Typography as b, Paper as $, TextField as A, MenuItem as F, FormControlLabel as V, Checkbox as H, Divider as Y } from "@mui/material";
|
|
5
|
+
import { useState as Z, useMemo as M } from "react";
|
|
6
|
+
import { ThemePreviewColorField as U } from "./ThemePreviewColorField.js";
|
|
7
|
+
import { getThemePreviewPresetOptionsByMode as q, THEME_PREVIEW_CUSTOM_PRESET_KEY as D, getThemePreviewPaletteValue as W, isThemePreviewCustomSection as J } from "../utils/themePreviewSettings.js";
|
|
8
|
+
import { themePreviewFieldGroupsBySection as Q, themePreviewSectionOptions as _ } from "../utils/themePreviewDefinitions.js";
|
|
9
|
+
import { deriveThemePreviewPaletteGroupValues as X } from "../utils/color.js";
|
|
10
|
+
function O(e) {
|
|
11
|
+
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (a) => a.toUpperCase());
|
|
12
|
+
}
|
|
13
|
+
h(O, "getThemePreviewFieldClusterLabel");
|
|
14
|
+
function ee(e) {
|
|
15
|
+
const a = e.find((u) => u.path.endsWith(".main")), m = e.find((u) => u.path.endsWith(".light")), s = e.find((u) => u.path.endsWith(".dark")), i = e.find((u) => u.path.endsWith(".contrastText"));
|
|
16
|
+
return !a || !m && !s && !i ? null : {
|
|
17
|
+
mainPath: a.path,
|
|
18
|
+
lightPath: m == null ? void 0 : m.path,
|
|
19
|
+
darkPath: s == null ? void 0 : s.path,
|
|
20
|
+
contrastTextPath: i == null ? void 0 : i.path
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
h(ee, "getThemePreviewAutoDerivedFieldPaths");
|
|
24
|
+
function re(e) {
|
|
25
|
+
const a = e.reduce(
|
|
26
|
+
(t, c) => {
|
|
27
|
+
const n = c.path.split(".")[0] ?? "";
|
|
28
|
+
return n && (t[n] || (t[n] = []), t[n].push(c)), t;
|
|
29
|
+
},
|
|
30
|
+
{}
|
|
31
|
+
), m = Object.fromEntries(
|
|
32
|
+
Object.entries(a).map(([t, c]) => [
|
|
33
|
+
t,
|
|
34
|
+
c.length
|
|
35
|
+
])
|
|
36
|
+
), s = new Set(
|
|
37
|
+
Object.entries(m).filter(([, t]) => t > 1).map(([t]) => t)
|
|
38
|
+
), i = e.some(
|
|
39
|
+
(t) => !s.has(t.path.split(".")[0] ?? "")
|
|
40
|
+
);
|
|
41
|
+
if (!(s.size > 1 || i))
|
|
42
|
+
return e.map((t) => ({
|
|
43
|
+
key: t.path,
|
|
44
|
+
fields: [t]
|
|
45
|
+
}));
|
|
46
|
+
const C = /* @__PURE__ */ new Set();
|
|
47
|
+
return e.reduce((t, c) => {
|
|
48
|
+
const n = c.path.split(".")[0] ?? "";
|
|
49
|
+
if (!s.has(n))
|
|
50
|
+
return t.push({
|
|
51
|
+
key: c.path,
|
|
52
|
+
fields: [c]
|
|
53
|
+
}), t;
|
|
54
|
+
if (C.has(n))
|
|
55
|
+
return t;
|
|
56
|
+
C.add(n);
|
|
57
|
+
const y = a[n] ?? [c];
|
|
58
|
+
return t.push({
|
|
59
|
+
key: n,
|
|
60
|
+
label: O(n),
|
|
61
|
+
fields: y,
|
|
62
|
+
autoDerivedFieldPaths: ee(y) ?? void 0
|
|
63
|
+
}), t;
|
|
64
|
+
}, []);
|
|
65
|
+
}
|
|
66
|
+
h(re, "getThemePreviewFieldClusters");
|
|
67
|
+
const te = Object.fromEntries(
|
|
68
|
+
_.map((e) => [e.key, e])
|
|
69
|
+
), x = {
|
|
70
|
+
active: {
|
|
71
|
+
backgroundColor: "#1ea3e6",
|
|
72
|
+
borderColor: "#1591cf",
|
|
73
|
+
descriptionColor: "rgba(255, 255, 255, 0.92)",
|
|
74
|
+
textColor: "#ffffff"
|
|
75
|
+
},
|
|
76
|
+
inactive: {
|
|
77
|
+
backgroundColor: "#ffffff",
|
|
78
|
+
borderColor: "#d8dee8",
|
|
79
|
+
descriptionColor: "#6b7280",
|
|
80
|
+
textColor: "#111827"
|
|
81
|
+
}
|
|
82
|
+
}, K = "#d8dee8", oe = "#d1d7e0", le = "#f8fafc", ne = "#ffffff", ae = "#111827";
|
|
83
|
+
function pe({
|
|
84
|
+
activeSection: e,
|
|
85
|
+
presetOptions: a,
|
|
86
|
+
selectedMode: m,
|
|
87
|
+
selectedPresetKey: s,
|
|
88
|
+
settings: i,
|
|
89
|
+
onSectionChange: u,
|
|
90
|
+
onPaletteValueChange: C,
|
|
91
|
+
onPaletteValuesChange: t,
|
|
92
|
+
onPresetKeyChange: c,
|
|
93
|
+
onPresetModeChange: n
|
|
94
|
+
}) {
|
|
95
|
+
const [y, z] = Z({}), w = !J(e), v = w ? e : null, I = M(
|
|
96
|
+
() => w && v ? q(a, v, m) : [],
|
|
97
|
+
[w, a, v, m]
|
|
98
|
+
), j = Q[e], G = M(
|
|
99
|
+
() => j.map((r) => ({
|
|
100
|
+
...r,
|
|
101
|
+
fieldClusters: re(r.fields)
|
|
102
|
+
})),
|
|
103
|
+
[j]
|
|
104
|
+
), N = te[e], S = /* @__PURE__ */ h((r, l, T) => {
|
|
105
|
+
const P = W(i, r, "common.white") || "#FFFFFF", d = W(i, r, "common.black") || "#111827", g = X(T, {
|
|
106
|
+
whiteTextColor: P,
|
|
107
|
+
blackTextColor: d
|
|
108
|
+
});
|
|
109
|
+
return g ? [
|
|
110
|
+
l.lightPath ? { path: l.lightPath, value: g.light } : null,
|
|
111
|
+
l.darkPath ? { path: l.darkPath, value: g.dark } : null,
|
|
112
|
+
l.contrastTextPath ? { path: l.contrastTextPath, value: g.contrastText } : null
|
|
113
|
+
].filter((f) => !!f) : [];
|
|
114
|
+
}, "getAutoDerivedUpdates");
|
|
115
|
+
return /* @__PURE__ */ p("div", { className: "flex h-full min-h-0 flex-col gap-16", children: [
|
|
116
|
+
/* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-12", children: _.map((r) => {
|
|
117
|
+
const l = r.key === e;
|
|
118
|
+
return /* @__PURE__ */ o(
|
|
119
|
+
R,
|
|
120
|
+
{
|
|
121
|
+
onClick: /* @__PURE__ */ h(() => u(r.key), "onClick"),
|
|
122
|
+
className: "w-full rounded-lg text-left",
|
|
123
|
+
sx: {
|
|
124
|
+
alignItems: "flex-start",
|
|
125
|
+
backgroundColor: l ? x.active.backgroundColor : x.inactive.backgroundColor,
|
|
126
|
+
border: `1px solid ${l ? x.active.borderColor : x.inactive.borderColor}`,
|
|
127
|
+
color: l ? x.active.textColor : x.inactive.textColor,
|
|
128
|
+
p: 2
|
|
129
|
+
},
|
|
130
|
+
children: /* @__PURE__ */ p("div", { className: "flex w-full flex-col gap-4", children: [
|
|
131
|
+
/* @__PURE__ */ o(b, { variant: "subtitle1", fontWeight: 600, children: r.label }),
|
|
132
|
+
r.description ? /* @__PURE__ */ o(
|
|
133
|
+
b,
|
|
134
|
+
{
|
|
135
|
+
variant: "body2",
|
|
136
|
+
sx: {
|
|
137
|
+
color: l ? x.active.descriptionColor : x.inactive.descriptionColor
|
|
138
|
+
},
|
|
139
|
+
children: r.description
|
|
140
|
+
}
|
|
141
|
+
) : null
|
|
142
|
+
] })
|
|
143
|
+
},
|
|
144
|
+
r.key
|
|
145
|
+
);
|
|
146
|
+
}) }),
|
|
147
|
+
/* @__PURE__ */ p(
|
|
148
|
+
$,
|
|
149
|
+
{
|
|
150
|
+
className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg",
|
|
151
|
+
sx: {
|
|
152
|
+
backgroundColor: ne,
|
|
153
|
+
border: `1px solid ${K}`,
|
|
154
|
+
boxShadow: "none"
|
|
155
|
+
},
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between px-20 py-16", children: /* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 flex-col gap-14", children: [
|
|
158
|
+
/* @__PURE__ */ o(b, { variant: "h6", sx: { color: ae }, children: N == null ? void 0 : N.label }),
|
|
159
|
+
w ? /* @__PURE__ */ p("div", { className: "grid gap-12 md:grid-cols-2", children: [
|
|
160
|
+
/* @__PURE__ */ p(
|
|
161
|
+
A,
|
|
162
|
+
{
|
|
163
|
+
select: !0,
|
|
164
|
+
label: "Mode",
|
|
165
|
+
value: m,
|
|
166
|
+
onChange: /* @__PURE__ */ h((r) => {
|
|
167
|
+
n(r.target.value);
|
|
168
|
+
}, "onChange"),
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ o(F, { value: "light", children: "light" }),
|
|
171
|
+
/* @__PURE__ */ o(F, { value: "dark", children: "dark" })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ p(
|
|
176
|
+
A,
|
|
177
|
+
{
|
|
178
|
+
select: !0,
|
|
179
|
+
label: "Preset",
|
|
180
|
+
value: s,
|
|
181
|
+
onChange: /* @__PURE__ */ h((r) => {
|
|
182
|
+
c(r.target.value);
|
|
183
|
+
}, "onChange"),
|
|
184
|
+
children: [
|
|
185
|
+
s === D ? /* @__PURE__ */ o(F, { value: D, children: "custom" }) : null,
|
|
186
|
+
I.map((r) => /* @__PURE__ */ o(F, { value: r.key, children: r.label }, r.key))
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] }) : null
|
|
191
|
+
] }) }),
|
|
192
|
+
/* @__PURE__ */ o(
|
|
193
|
+
Y,
|
|
194
|
+
{
|
|
195
|
+
sx: {
|
|
196
|
+
borderColor: K
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
/* @__PURE__ */ o("div", { className: "flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20", children: G.map((r) => /* @__PURE__ */ p("div", { className: "flex flex-col gap-12", children: [
|
|
201
|
+
r.label ? /* @__PURE__ */ o(b, { variant: "subtitle1", fontWeight: 700, children: r.label }) : null,
|
|
202
|
+
/* @__PURE__ */ o("div", { className: "grid gap-12", children: r.fieldClusters.map((l) => {
|
|
203
|
+
if (!l.label)
|
|
204
|
+
return l.fields.map((f) => /* @__PURE__ */ o(
|
|
205
|
+
U,
|
|
206
|
+
{
|
|
207
|
+
definition: f,
|
|
208
|
+
sectionKey: e,
|
|
209
|
+
settings: i,
|
|
210
|
+
onChange: C
|
|
211
|
+
},
|
|
212
|
+
f.path
|
|
213
|
+
));
|
|
214
|
+
const T = `${e}:${r.key}:${l.key}`, P = !!y[T], d = l.autoDerivedFieldPaths, g = !!(d && v);
|
|
215
|
+
return /* @__PURE__ */ p(
|
|
216
|
+
$,
|
|
217
|
+
{
|
|
218
|
+
variant: "outlined",
|
|
219
|
+
sx: {
|
|
220
|
+
backgroundColor: le,
|
|
221
|
+
borderColor: oe,
|
|
222
|
+
display: "flex",
|
|
223
|
+
flexDirection: "column",
|
|
224
|
+
gap: 1.5,
|
|
225
|
+
p: 1.5
|
|
226
|
+
},
|
|
227
|
+
children: [
|
|
228
|
+
/* @__PURE__ */ p("div", { className: "flex items-start justify-between gap-12", children: [
|
|
229
|
+
/* @__PURE__ */ o(b, { variant: "body2", fontWeight: 700, children: l.label }),
|
|
230
|
+
g ? /* @__PURE__ */ o(
|
|
231
|
+
V,
|
|
232
|
+
{
|
|
233
|
+
className: "m-0",
|
|
234
|
+
control: /* @__PURE__ */ o(
|
|
235
|
+
H,
|
|
236
|
+
{
|
|
237
|
+
size: "small",
|
|
238
|
+
checked: P,
|
|
239
|
+
onChange: /* @__PURE__ */ h((f) => {
|
|
240
|
+
const B = f.target.checked;
|
|
241
|
+
z((k) => ({
|
|
242
|
+
...k,
|
|
243
|
+
[T]: B
|
|
244
|
+
})), !B && (!v || !d || t(
|
|
245
|
+
S(
|
|
246
|
+
v,
|
|
247
|
+
d,
|
|
248
|
+
W(
|
|
249
|
+
i,
|
|
250
|
+
e,
|
|
251
|
+
d.mainPath
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
));
|
|
255
|
+
}, "onChange")
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
label: /* @__PURE__ */ o(b, { variant: "caption", color: "text.secondary", children: "Edit derived colors" })
|
|
259
|
+
}
|
|
260
|
+
) : null
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ o("div", { className: "grid gap-12", children: l.fields.map((f) => {
|
|
263
|
+
const B = d && v ? !P && f.path !== d.mainPath : !1;
|
|
264
|
+
return /* @__PURE__ */ o(
|
|
265
|
+
U,
|
|
266
|
+
{
|
|
267
|
+
disabled: B,
|
|
268
|
+
definition: f,
|
|
269
|
+
sectionKey: e,
|
|
270
|
+
settings: i,
|
|
271
|
+
onChange: /* @__PURE__ */ h((k, E) => {
|
|
272
|
+
if (!d || !v || P || k !== d.mainPath) {
|
|
273
|
+
C(k, E);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
t(
|
|
277
|
+
[
|
|
278
|
+
{ path: k, value: E },
|
|
279
|
+
...S(
|
|
280
|
+
v,
|
|
281
|
+
d,
|
|
282
|
+
E
|
|
283
|
+
)
|
|
284
|
+
]
|
|
285
|
+
);
|
|
286
|
+
}, "onChange")
|
|
287
|
+
},
|
|
288
|
+
f.path
|
|
289
|
+
);
|
|
290
|
+
}) })
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
l.key
|
|
294
|
+
);
|
|
295
|
+
}) })
|
|
296
|
+
] }, r.key)) })
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
)
|
|
300
|
+
] });
|
|
301
|
+
}
|
|
302
|
+
h(pe, "ThemePreviewControls");
|
|
303
|
+
export {
|
|
304
|
+
pe as ThemePreviewControls
|
|
305
|
+
};
|
|
306
|
+
//# sourceMappingURL=ThemePreviewControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemePreviewControls.js","sources":["../../../../src/features/themePreview/components/ThemePreviewControls.tsx"],"sourcesContent":["import {\n ButtonBase,\n Checkbox,\n Divider,\n FormControlLabel,\n MenuItem,\n Paper,\n TextField,\n Typography,\n} from '@mui/material';\nimport { useMemo, useState } from 'react';\nimport type {\n ThemePreviewFieldDefinition,\n ThemePreviewMode,\n ThemePreviewPresetOption,\n ThemePreviewPresetSectionKey,\n ThemePreviewSectionKey,\n ThemePreviewSectionOption,\n ThemePreviewSettings,\n} from '../types';\nimport {\n deriveThemePreviewPaletteGroupValues,\n getThemePreviewPaletteValue,\n getThemePreviewPresetOptionsByMode,\n isThemePreviewCustomSection,\n THEME_PREVIEW_CUSTOM_PRESET_KEY,\n themePreviewFieldGroupsBySection,\n themePreviewSectionOptions,\n} from '../utils';\nimport { ThemePreviewColorField } from './ThemePreviewColorField';\n\ntype ThemePreviewAutoDerivedFieldPaths = {\n contrastTextPath?: string;\n darkPath?: string;\n lightPath?: string;\n mainPath: string;\n};\n\ntype ThemePreviewFieldCluster = {\n autoDerivedFieldPaths?: ThemePreviewAutoDerivedFieldPaths;\n key: string;\n label?: string;\n fields: ThemePreviewFieldDefinition[];\n};\n\nfunction getThemePreviewFieldClusterLabel(prefix: string) {\n return prefix\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .replace(/^./, (value) => value.toUpperCase());\n}\n\nfunction getThemePreviewAutoDerivedFieldPaths(\n fields: ThemePreviewFieldDefinition[],\n): ThemePreviewAutoDerivedFieldPaths | null {\n const mainField = fields.find((field) => field.path.endsWith('.main'));\n const lightField = fields.find((field) => field.path.endsWith('.light'));\n const darkField = fields.find((field) => field.path.endsWith('.dark'));\n const contrastTextField = fields.find((field) => field.path.endsWith('.contrastText'));\n\n if (!mainField || (!lightField && !darkField && !contrastTextField)) {\n return null;\n }\n\n return {\n mainPath: mainField.path,\n lightPath: lightField?.path,\n darkPath: darkField?.path,\n contrastTextPath: contrastTextField?.path,\n };\n}\n\nfunction getThemePreviewFieldClusters(fields: ThemePreviewFieldDefinition[]) {\n const fieldGroupsByPrefix = fields.reduce<Record<string, ThemePreviewFieldDefinition[]>>(\n (acc, field) => {\n const prefix = field.path.split('.')[0] ?? '';\n\n if (!prefix) {\n return acc;\n }\n\n if (!acc[prefix]) {\n acc[prefix] = [];\n }\n\n acc[prefix].push(field);\n return acc;\n },\n {},\n );\n const prefixCounts = Object.fromEntries(\n Object.entries(fieldGroupsByPrefix).map(([prefix, groupedFields]) => [\n prefix,\n groupedFields.length,\n ]),\n );\n const repeatedPrefixes = new Set(\n Object.entries(prefixCounts)\n .filter(([, count]) => count > 1)\n .map(([prefix]) => prefix),\n );\n const hasStandaloneField = fields.some(\n (field) => !repeatedPrefixes.has(field.path.split('.')[0] ?? ''),\n );\n const shouldUsePrefixGrouping = repeatedPrefixes.size > 1 || hasStandaloneField;\n\n if (!shouldUsePrefixGrouping) {\n return fields.map<ThemePreviewFieldCluster>((field) => ({\n key: field.path,\n fields: [field],\n }));\n }\n\n const groupedPrefixes = new Set<string>();\n\n return fields.reduce<ThemePreviewFieldCluster[]>((acc, field) => {\n const prefix = field.path.split('.')[0] ?? '';\n\n if (!repeatedPrefixes.has(prefix)) {\n acc.push({\n key: field.path,\n fields: [field],\n });\n return acc;\n }\n\n if (groupedPrefixes.has(prefix)) {\n return acc;\n }\n\n groupedPrefixes.add(prefix);\n const clusterFields = fieldGroupsByPrefix[prefix] ?? [field];\n\n acc.push({\n key: prefix,\n label: getThemePreviewFieldClusterLabel(prefix),\n fields: clusterFields,\n autoDerivedFieldPaths: getThemePreviewAutoDerivedFieldPaths(clusterFields) ?? undefined,\n });\n\n return acc;\n }, []);\n}\n\nconst themePreviewSectionOptionByKey = Object.fromEntries(\n themePreviewSectionOptions.map((sectionOption) => [sectionOption.key, sectionOption]),\n) as Record<ThemePreviewSectionKey, ThemePreviewSectionOption>;\nconst themePreviewSelectorStyles = {\n active: {\n backgroundColor: '#1ea3e6',\n borderColor: '#1591cf',\n descriptionColor: 'rgba(255, 255, 255, 0.92)',\n textColor: '#ffffff',\n },\n inactive: {\n backgroundColor: '#ffffff',\n borderColor: '#d8dee8',\n descriptionColor: '#6b7280',\n textColor: '#111827',\n },\n} as const;\nconst themePreviewControlsPanelBorderColor = '#d8dee8';\nconst themePreviewControlsClusterBorderColor = '#d1d7e0';\nconst themePreviewControlsClusterBackgroundColor = '#f8fafc';\nconst themePreviewControlsPanelBackgroundColor = '#ffffff';\nconst themePreviewControlsTitleColor = '#111827';\n\ninterface ThemePreviewControlsProps {\n activeSection: ThemePreviewSectionKey;\n presetOptions: ThemePreviewPresetOption[];\n selectedMode: ThemePreviewMode;\n selectedPresetKey: string;\n settings: ThemePreviewSettings;\n onSectionChange: (sectionKey: ThemePreviewSectionKey) => void;\n onPaletteValueChange: (path: string, value: string) => void;\n onPaletteValuesChange: (updates: Array<{ path: string; value: string }>) => void;\n onPresetKeyChange: (presetKey: string) => void;\n onPresetModeChange: (mode: ThemePreviewMode) => void;\n}\n\nexport function ThemePreviewControls({\n activeSection,\n presetOptions,\n selectedMode,\n selectedPresetKey,\n settings,\n onSectionChange,\n onPaletteValueChange,\n onPaletteValuesChange,\n onPresetKeyChange,\n onPresetModeChange,\n}: ThemePreviewControlsProps) {\n const [editableDerivedFields, setEditableDerivedFields] = useState<Record<string, boolean>>({});\n const canSelectPreset = !isThemePreviewCustomSection(activeSection);\n const presetSectionKey = canSelectPreset ? (activeSection as ThemePreviewPresetSectionKey) : null;\n const presetOptionsByMode = useMemo(\n () =>\n canSelectPreset && presetSectionKey\n ? getThemePreviewPresetOptionsByMode(presetOptions, presetSectionKey, selectedMode)\n : [],\n [canSelectPreset, presetOptions, presetSectionKey, selectedMode],\n );\n const fieldGroups = themePreviewFieldGroupsBySection[activeSection];\n const fieldGroupsWithClusters = useMemo(\n () =>\n fieldGroups.map((fieldGroup) => ({\n ...fieldGroup,\n fieldClusters: getThemePreviewFieldClusters(fieldGroup.fields),\n })),\n [fieldGroups],\n );\n const activeSectionOption = themePreviewSectionOptionByKey[activeSection];\n\n const getAutoDerivedUpdates = (\n sectionKey: ThemePreviewPresetSectionKey,\n autoDerivedFieldPaths: ThemePreviewAutoDerivedFieldPaths,\n mainValue: string,\n ) => {\n const commonWhite =\n getThemePreviewPaletteValue(settings, sectionKey, 'common.white') || '#FFFFFF';\n const commonBlack =\n getThemePreviewPaletteValue(settings, sectionKey, 'common.black') || '#111827';\n const derivedValues = deriveThemePreviewPaletteGroupValues(mainValue, {\n whiteTextColor: commonWhite,\n blackTextColor: commonBlack,\n });\n\n if (!derivedValues) {\n return [];\n }\n\n return [\n autoDerivedFieldPaths.lightPath\n ? { path: autoDerivedFieldPaths.lightPath, value: derivedValues.light }\n : null,\n autoDerivedFieldPaths.darkPath\n ? { path: autoDerivedFieldPaths.darkPath, value: derivedValues.dark }\n : null,\n autoDerivedFieldPaths.contrastTextPath\n ? { path: autoDerivedFieldPaths.contrastTextPath, value: derivedValues.contrastText }\n : null,\n ].filter((item): item is { path: string; value: string } => Boolean(item));\n };\n\n return (\n <div className=\"flex h-full min-h-0 flex-col gap-16\">\n <div className=\"grid grid-cols-2 gap-12\">\n {themePreviewSectionOptions.map((sectionOption) => {\n const isActive = sectionOption.key === activeSection;\n\n return (\n <ButtonBase\n key={sectionOption.key}\n onClick={() => onSectionChange(sectionOption.key)}\n className=\"w-full rounded-lg text-left\"\n sx={{\n alignItems: 'flex-start',\n backgroundColor: isActive\n ? themePreviewSelectorStyles.active.backgroundColor\n : themePreviewSelectorStyles.inactive.backgroundColor,\n border: `1px solid ${\n isActive\n ? themePreviewSelectorStyles.active.borderColor\n : themePreviewSelectorStyles.inactive.borderColor\n }`,\n color: isActive\n ? themePreviewSelectorStyles.active.textColor\n : themePreviewSelectorStyles.inactive.textColor,\n p: 2,\n }}\n >\n <div className=\"flex w-full flex-col gap-4\">\n <Typography variant=\"subtitle1\" fontWeight={600}>\n {sectionOption.label}\n </Typography>\n {sectionOption.description ? (\n <Typography\n variant=\"body2\"\n sx={{\n color: isActive\n ? themePreviewSelectorStyles.active.descriptionColor\n : themePreviewSelectorStyles.inactive.descriptionColor,\n }}\n >\n {sectionOption.description}\n </Typography>\n ) : null}\n </div>\n </ButtonBase>\n );\n })}\n </div>\n\n <Paper\n className=\"flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg\"\n sx={{\n backgroundColor: themePreviewControlsPanelBackgroundColor,\n border: `1px solid ${themePreviewControlsPanelBorderColor}`,\n boxShadow: 'none',\n }}\n >\n <div className=\"flex items-center justify-between px-20 py-16\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-14\">\n <Typography variant=\"h6\" sx={{ color: themePreviewControlsTitleColor }}>\n {activeSectionOption?.label}\n </Typography>\n {canSelectPreset ? (\n <div className=\"grid gap-12 md:grid-cols-2\">\n <TextField\n select\n label=\"Mode\"\n value={selectedMode}\n onChange={(event) => {\n onPresetModeChange(event.target.value as ThemePreviewMode);\n }}\n >\n <MenuItem value=\"light\">light</MenuItem>\n <MenuItem value=\"dark\">dark</MenuItem>\n </TextField>\n\n <TextField\n select\n label=\"Preset\"\n value={selectedPresetKey}\n onChange={(event) => {\n onPresetKeyChange(event.target.value);\n }}\n >\n {selectedPresetKey === THEME_PREVIEW_CUSTOM_PRESET_KEY ? (\n <MenuItem value={THEME_PREVIEW_CUSTOM_PRESET_KEY}>custom</MenuItem>\n ) : null}\n {presetOptionsByMode.map((presetOption) => (\n <MenuItem key={presetOption.key} value={presetOption.key}>\n {presetOption.label}\n </MenuItem>\n ))}\n </TextField>\n </div>\n ) : null}\n </div>\n </div>\n\n <Divider\n sx={{\n borderColor: themePreviewControlsPanelBorderColor,\n }}\n />\n\n <div className=\"flex min-h-0 flex-1 flex-col gap-20 overflow-y-auto px-20 py-20\">\n {fieldGroupsWithClusters.map((fieldGroup) => (\n <div key={fieldGroup.key} className=\"flex flex-col gap-12\">\n {fieldGroup.label ? (\n <Typography variant=\"subtitle1\" fontWeight={700}>\n {fieldGroup.label}\n </Typography>\n ) : null}\n <div className=\"grid gap-12\">\n {fieldGroup.fieldClusters.map((fieldCluster) => {\n if (!fieldCluster.label) {\n return fieldCluster.fields.map((fieldDefinition) => (\n <ThemePreviewColorField\n key={fieldDefinition.path}\n definition={fieldDefinition}\n sectionKey={activeSection}\n settings={settings}\n onChange={onPaletteValueChange}\n />\n ));\n }\n\n const clusterStateKey = `${activeSection}:${fieldGroup.key}:${fieldCluster.key}`;\n const isEditableDerivedFieldCluster = Boolean(\n editableDerivedFields[clusterStateKey],\n );\n const autoDerivedFieldPaths = fieldCluster.autoDerivedFieldPaths;\n const canAutoDerive = Boolean(autoDerivedFieldPaths && presetSectionKey);\n\n return (\n <Paper\n key={fieldCluster.key}\n variant=\"outlined\"\n sx={{\n backgroundColor: themePreviewControlsClusterBackgroundColor,\n borderColor: themePreviewControlsClusterBorderColor,\n display: 'flex',\n flexDirection: 'column',\n gap: 1.5,\n p: 1.5,\n }}\n >\n <div className=\"flex items-start justify-between gap-12\">\n <Typography variant=\"body2\" fontWeight={700}>\n {fieldCluster.label}\n </Typography>\n {canAutoDerive ? (\n <FormControlLabel\n className=\"m-0\"\n control={\n <Checkbox\n size=\"small\"\n checked={isEditableDerivedFieldCluster}\n onChange={(event) => {\n const nextChecked = event.target.checked;\n\n setEditableDerivedFields((prevState) => ({\n ...prevState,\n [clusterStateKey]: nextChecked,\n }));\n\n if (nextChecked) {\n return;\n }\n\n if (!presetSectionKey || !autoDerivedFieldPaths) {\n return;\n }\n\n onPaletteValuesChange(\n getAutoDerivedUpdates(\n presetSectionKey,\n autoDerivedFieldPaths,\n getThemePreviewPaletteValue(\n settings,\n activeSection,\n autoDerivedFieldPaths.mainPath,\n ),\n ),\n );\n }}\n />\n }\n label={\n <Typography variant=\"caption\" color=\"text.secondary\">\n Edit derived colors\n </Typography>\n }\n />\n ) : null}\n </div>\n <div className=\"grid gap-12\">\n {fieldCluster.fields.map((fieldDefinition) => {\n const isDisabled = autoDerivedFieldPaths && presetSectionKey\n ? !isEditableDerivedFieldCluster &&\n fieldDefinition.path !== autoDerivedFieldPaths.mainPath\n : false;\n\n return (\n <ThemePreviewColorField\n key={fieldDefinition.path}\n disabled={isDisabled}\n definition={fieldDefinition}\n sectionKey={activeSection}\n settings={settings}\n onChange={(path, value) => {\n if (\n !autoDerivedFieldPaths ||\n !presetSectionKey ||\n isEditableDerivedFieldCluster ||\n path !== autoDerivedFieldPaths.mainPath\n ) {\n onPaletteValueChange(path, value);\n return;\n }\n\n onPaletteValuesChange(\n [\n { path, value },\n ...getAutoDerivedUpdates(\n presetSectionKey,\n autoDerivedFieldPaths,\n value,\n ),\n ],\n );\n }}\n />\n );\n })}\n </div>\n </Paper>\n );\n })}\n </div>\n </div>\n ))}\n </div>\n </Paper>\n </div>\n );\n}\n"],"names":["getThemePreviewFieldClusterLabel","prefix","value","__name","getThemePreviewAutoDerivedFieldPaths","fields","mainField","field","lightField","darkField","contrastTextField","getThemePreviewFieldClusters","fieldGroupsByPrefix","acc","prefixCounts","groupedFields","repeatedPrefixes","count","hasStandaloneField","groupedPrefixes","clusterFields","themePreviewSectionOptionByKey","themePreviewSectionOptions","sectionOption","themePreviewSelectorStyles","themePreviewControlsPanelBorderColor","themePreviewControlsClusterBorderColor","themePreviewControlsClusterBackgroundColor","themePreviewControlsPanelBackgroundColor","themePreviewControlsTitleColor","ThemePreviewControls","activeSection","presetOptions","selectedMode","selectedPresetKey","settings","onSectionChange","onPaletteValueChange","onPaletteValuesChange","onPresetKeyChange","onPresetModeChange","editableDerivedFields","setEditableDerivedFields","useState","canSelectPreset","isThemePreviewCustomSection","presetSectionKey","presetOptionsByMode","useMemo","getThemePreviewPresetOptionsByMode","fieldGroups","themePreviewFieldGroupsBySection","fieldGroupsWithClusters","fieldGroup","activeSectionOption","getAutoDerivedUpdates","sectionKey","autoDerivedFieldPaths","mainValue","commonWhite","getThemePreviewPaletteValue","commonBlack","derivedValues","deriveThemePreviewPaletteGroupValues","item","jsxs","jsx","isActive","ButtonBase","Typography","Paper","TextField","event","MenuItem","THEME_PREVIEW_CUSTOM_PRESET_KEY","presetOption","Divider","fieldCluster","fieldDefinition","ThemePreviewColorField","clusterStateKey","isEditableDerivedFieldCluster","canAutoDerive","FormControlLabel","Checkbox","nextChecked","prevState","isDisabled","path"],"mappings":";;;;;;;;;AA6CA,SAASA,EAAiCC,GAAgB;AACxD,SAAOA,EACJ,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,MAAM,CAACC,MAAUA,EAAM,YAAA,CAAa;AACjD;AAJSC,EAAAH,GAAA;AAMT,SAASI,GACPC,GAC0C;AAC1C,QAAMC,IAAYD,EAAO,KAAK,CAACE,MAAUA,EAAM,KAAK,SAAS,OAAO,CAAC,GAC/DC,IAAaH,EAAO,KAAK,CAACE,MAAUA,EAAM,KAAK,SAAS,QAAQ,CAAC,GACjEE,IAAYJ,EAAO,KAAK,CAACE,MAAUA,EAAM,KAAK,SAAS,OAAO,CAAC,GAC/DG,IAAoBL,EAAO,KAAK,CAACE,MAAUA,EAAM,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,0BAEJ,GArBU;AAAA,wBAqBV;AAAA,wBA1BK4E,EAAgB;AAAA,sBAAA;AAAA,oBA6B3B,CAAC,EAAA,CACH;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAnGKD,EAAa;AAAA,cAAA;AAAA,YAsGxB,CAAC,EAAA,CACH;AAAA,UAAA,KApIQxB,EAAW,GAqIrB,CACD,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;AArTgBlD,EAAA2B,IAAA;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as o } from "../../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
2
|
+
import n from "../../../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";
|
|
3
|
+
import r from "../../../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";
|
|
4
|
+
import i from "../../../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";
|
|
5
|
+
import t from "../../../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";
|
|
6
|
+
import e from "../../../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";
|
|
7
|
+
const u = {
|
|
8
|
+
default: /* @__PURE__ */ o(t, { sx: { fontSize: 20 } }),
|
|
9
|
+
success: /* @__PURE__ */ o(n, { sx: { fontSize: 20 } }),
|
|
10
|
+
info: /* @__PURE__ */ o(i, { sx: { fontSize: 20 } }),
|
|
11
|
+
warning: /* @__PURE__ */ o(e, { sx: { fontSize: 20 } }),
|
|
12
|
+
error: /* @__PURE__ */ o(r, { sx: { fontSize: 20 } })
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
u as snackbarPreviewIconByVariant
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=themePreviewCanvas.icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themePreviewCanvas.icons.js","sources":["../../../../src/features/themePreview/components/themePreviewCanvas.icons.tsx"],"sourcesContent":["import type { SnackbarVariantKey } from '@/features/themePreview/configs/snackbar';\nimport CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';\nimport ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\nimport NotificationsNoneOutlinedIcon from '@mui/icons-material/NotificationsNoneOutlined';\nimport WarningAmberRoundedIcon from '@mui/icons-material/WarningAmberRounded';\nimport type { ReactNode } from 'react';\n\nexport const snackbarPreviewIconByVariant: Record<SnackbarVariantKey, ReactNode> = {\n default: <NotificationsNoneOutlinedIcon sx={{ fontSize: 20 }} />,\n success: <CheckCircleOutlineIcon sx={{ fontSize: 20 }} />,\n info: <InfoOutlinedIcon sx={{ fontSize: 20 }} />,\n warning: <WarningAmberRoundedIcon sx={{ fontSize: 20 }} />,\n error: <ErrorOutlineIcon sx={{ fontSize: 20 }} />,\n};\n"],"names":["snackbarPreviewIconByVariant","jsx","NotificationsNoneOutlinedIcon","CheckCircleOutlineIcon","InfoOutlinedIcon","WarningAmberRoundedIcon","ErrorOutlineIcon"],"mappings":";;;;;;AAQO,MAAMA,IAAsE;AAAA,EACjF,SAAS,gBAAAC,EAACC,GAAA,EAA8B,IAAI,EAAE,UAAU,MAAM;AAAA,EAC9D,SAAS,gBAAAD,EAACE,GAAA,EAAuB,IAAI,EAAE,UAAU,MAAM;AAAA,EACvD,MAAM,gBAAAF,EAACG,GAAA,EAAiB,IAAI,EAAE,UAAU,MAAM;AAAA,EAC9C,SAAS,gBAAAH,EAACI,GAAA,EAAwB,IAAI,EAAE,UAAU,MAAM;AAAA,EACxD,OAAO,gBAAAJ,EAACK,GAAA,EAAiB,IAAI,EAAE,UAAU,KAAG,CAAG;AACjD;"}
|