@mx-cartographer/experiences 9.4.8 → 9.4.10-alpha.al0
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/CHANGELOG.md +12 -0
- package/dist/common/index.es.js +19 -17
- package/dist/common/utils/Theme.d.ts +65 -1
- package/dist/common/utils/Theme.es.js +99 -35
- package/dist/common/utils/Theme.es.js.map +1 -1
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/core/types/AppData.d.ts +14 -0
- package/dist/core/types/Client.d.ts +7 -0
- package/dist/core/types/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [9.4.10] - 09-01-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - `background_color`/`paper_color` are treated as light-mode colors under `mode: browser`, preventing white-on-white text in dark mode (MEW-3445)
|
|
4
|
+
|
|
5
|
+
## [9.4.9] - 09-01-2026
|
|
6
|
+
|
|
7
|
+
- **ADDED** - New theming properties on `ClientStyleProfile` and `StyleConfig`, and a `getClientCustomizations` util mapping them to MXUI `Customizations` (MEW-3445)
|
|
8
|
+
- **CHANGED** - `secondary_color` now seeds MUI `secondary` and `neutral_color` seeds `grey`/`neutral` (previously `neutral_color` -> `secondary`) (MEW-3445)
|
|
9
|
+
- **ADDED** - `getClientComponentOverrides` util for the overrides MXUI `Customizations` can't express (button/card radius, tab and calendar tints) (MEW-3445)
|
|
10
|
+
- **DEPRECATED** - `getClientPaletteOptions` and `getClientTheme` in favor of `getClientCustomizations` + `getClientComponentOverrides`; both inherit the `secondary_color`/`neutral_color` seed correction above (MEW-3445)
|
|
11
|
+
- **FIXED** - `MiniWidgetContentCoverage` test failed in the last days of a month; its fixture date is now clamped to the end of the current month (MEW-3445)
|
|
12
|
+
|
|
1
13
|
## [9.4.8] - 08-27-2026
|
|
2
14
|
|
|
3
15
|
- **ADDED** - insights-v2 Action Block drilldowns: shared `ActionBlockLayer` owns a single drawer, content-only blocks register in `mappings/blocks.ts` keyed by the beat CTA's `block` (WEC-1705)
|
package/dist/common/index.es.js
CHANGED
|
@@ -3,10 +3,10 @@ import m, { CalendarSelectionTypes as i } from "./components/calendar/Calendar.e
|
|
|
3
3
|
import a from "./components/charts/StatusBar.es.js";
|
|
4
4
|
import p from "./components/charts/Donut.es.js";
|
|
5
5
|
import u from "./hooks/useAccountDisplayName.es.js";
|
|
6
|
-
import { useCombineEvents as
|
|
6
|
+
import { useCombineEvents as C, useCombinePageviews as S } from "./hooks/useCombineEvents.es.js";
|
|
7
7
|
import { GlobalDataContext as c, GlobalDataProvider as T } from "./context/GlobalDataProvider.es.js";
|
|
8
8
|
import { WidgetContainerContext as E, WidgetContainerProvider as D } from "./context/WidgetContainerProvider.es.js";
|
|
9
|
-
import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as
|
|
9
|
+
import { useAccountStore as _, useAppConfig as N, useBudgetsStore as y, useCashflowStore as A, useCategoryStore as P, useDebtStore as b, useError as O, useEvent as G, useFinstrongStore as W, useGlobalCopyStore as L, useGlobalStore as R, useGlobalUiStore as U, useGoalStore as v, useHelpStore as B, useHoldingStore as h, useInsightsV2Store as w, useLoad as x, useMerchantStore as M, useNetWorthStore as Y, useNotificationStore as H, usePageView as F, useRecurringTransactionsStore as z, useSettingsStore as V, useTransactionStore as k, useTrendsStore as q, useUserStore as K, useWidgetContainerProvider as Z } from "./context/hooks.es.js";
|
|
10
10
|
import { useInsightsEnabled as J } from "./hooks/useInsightsEnabled.es.js";
|
|
11
11
|
import { useScreenSize as X } from "./hooks/useScreenSize.es.js";
|
|
12
12
|
import oo from "./hooks/usePrevious.es.js";
|
|
@@ -16,7 +16,7 @@ import no from "./components/dialog/Dialog.es.js";
|
|
|
16
16
|
import so from "./components/drawer/Drawer.es.js";
|
|
17
17
|
import fo from "./components/daterangeselector/DateRangeSelector.es.js";
|
|
18
18
|
import { ANALYTICS_EVENTS as lo } from "./constants/Analytics.es.js";
|
|
19
|
-
import { CONNECTIONS_WIDGET_ID as
|
|
19
|
+
import { CONNECTIONS_WIDGET_ID as So, CONNECT_WIDGET_ID as go, MemberConnectionStatus as co } from "./constants/Connect.es.js";
|
|
20
20
|
import { formatCurrency as Eo, formatOrdinal as Do, formatPercentage as Io, generateEqualIntervals as _o, getCurrencyCodes as No, getPluralRules as yo } from "../core/utils/NumberFormatting.es.js";
|
|
21
21
|
import { GlobalStore as Po } from "../core/stores/GlobalStore.es.js";
|
|
22
22
|
import { INCOME_ACCOUNT_TYPES as Oo, PAYMENT_ACCOUNT_TYPES as Go, SPENDING_ACCOUNT_TYPES as Wo } from "./constants/Account.es.js";
|
|
@@ -25,7 +25,7 @@ import { LOADING_STATUS as vo } from "./constants/SpendingPlan.es.js";
|
|
|
25
25
|
import { DEFAULT_DONUT_SIZE as ho, DEFAULT_STROKE_WIDTH as wo } from "./constants/Donut.es.js";
|
|
26
26
|
import { Sizes as Mo, TOUCH_TARGET as Yo } from "./constants/Sizes.es.js";
|
|
27
27
|
import Fo from "./components/donuts/MultiSegmentDonut.es.js";
|
|
28
|
-
import
|
|
28
|
+
import Vo from "./components/donuts/SingleSegmentDonut.es.js";
|
|
29
29
|
import qo from "./components/ErrorBoundary.es.js";
|
|
30
30
|
import Zo from "./components/Error.es.js";
|
|
31
31
|
import Jo from "./components/MicroWidgetContainer.es.js";
|
|
@@ -37,7 +37,7 @@ import nr from "./components/ConnectDrawer.es.js";
|
|
|
37
37
|
import sr from "./components/CurrencyDialog.es.js";
|
|
38
38
|
import fr from "./components/CurrencyInput.es.js";
|
|
39
39
|
import lr from "./components/ResponsiveButton.es.js";
|
|
40
|
-
import
|
|
40
|
+
import Sr from "./components/SearchBox.es.js";
|
|
41
41
|
import cr from "./components/SelectionBox.es.js";
|
|
42
42
|
import dr from "./components/TabContentContainer.es.js";
|
|
43
43
|
import Dr from "./components/IconBacking.es.js";
|
|
@@ -52,11 +52,11 @@ import { ListItemWrapper as hr } from "./components/ListItemWrapper.es.js";
|
|
|
52
52
|
import { Select as xr } from "./components/Select.es.js";
|
|
53
53
|
import { ToggleButtonListItem as Yr } from "./components/listitems/ToggleButtonListItem.es.js";
|
|
54
54
|
import { ToggleListItem as Fr } from "./components/listitems/ToggleListItem.es.js";
|
|
55
|
-
import { analyticsSession as
|
|
56
|
-
import {
|
|
55
|
+
import { analyticsSession as Vr } from "./utils/Analytics.es.js";
|
|
56
|
+
import { getClientComponentOverrides as qr, getClientCustomizations as Kr, getClientPaletteOptions as Zr, getClientTheme as jr } from "./utils/Theme.es.js";
|
|
57
57
|
export {
|
|
58
58
|
lo as ANALYTICS_EVENTS,
|
|
59
|
-
|
|
59
|
+
So as CONNECTIONS_WIDGET_ID,
|
|
60
60
|
go as CONNECT_WIDGET_ID,
|
|
61
61
|
m as Calendar,
|
|
62
62
|
i as CalendarSelectionTypes,
|
|
@@ -95,10 +95,10 @@ export {
|
|
|
95
95
|
Ro as RECURRENCE_COPY,
|
|
96
96
|
lr as ResponsiveButton,
|
|
97
97
|
Wo as SPENDING_ACCOUNT_TYPES,
|
|
98
|
-
|
|
98
|
+
Sr as SearchBox,
|
|
99
99
|
xr as Select,
|
|
100
100
|
cr as SelectionBox,
|
|
101
|
-
|
|
101
|
+
Vo as SingleSegmentDonut,
|
|
102
102
|
Mo as Sizes,
|
|
103
103
|
a as StatusBar,
|
|
104
104
|
Yo as TOUCH_TARGET,
|
|
@@ -108,15 +108,17 @@ export {
|
|
|
108
108
|
mr as WidgetContainer,
|
|
109
109
|
E as WidgetContainerContext,
|
|
110
110
|
D as WidgetContainerProvider,
|
|
111
|
-
|
|
111
|
+
Vr as analyticsSession,
|
|
112
112
|
r as buildDynamicCopy,
|
|
113
113
|
t as buildPluralCopy,
|
|
114
114
|
Eo as formatCurrency,
|
|
115
115
|
Do as formatOrdinal,
|
|
116
116
|
Io as formatPercentage,
|
|
117
117
|
_o as generateEqualIntervals,
|
|
118
|
-
qr as
|
|
119
|
-
Kr as
|
|
118
|
+
qr as getClientComponentOverrides,
|
|
119
|
+
Kr as getClientCustomizations,
|
|
120
|
+
Zr as getClientPaletteOptions,
|
|
121
|
+
jr as getClientTheme,
|
|
120
122
|
No as getCurrencyCodes,
|
|
121
123
|
yo as getPluralRules,
|
|
122
124
|
u as useAccountDisplayName,
|
|
@@ -125,8 +127,8 @@ export {
|
|
|
125
127
|
y as useBudgetsStore,
|
|
126
128
|
A as useCashflowStore,
|
|
127
129
|
P as useCategoryStore,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
C as useCombineEvents,
|
|
131
|
+
S as useCombinePageviews,
|
|
130
132
|
b as useDebtStore,
|
|
131
133
|
O as useError,
|
|
132
134
|
G as useEvent,
|
|
@@ -145,9 +147,9 @@ export {
|
|
|
145
147
|
H as useNotificationStore,
|
|
146
148
|
F as usePageView,
|
|
147
149
|
oo as usePrevious,
|
|
148
|
-
|
|
150
|
+
z as useRecurringTransactionsStore,
|
|
149
151
|
X as useScreenSize,
|
|
150
|
-
|
|
152
|
+
V as useSettingsStore,
|
|
151
153
|
k as useTransactionStore,
|
|
152
154
|
q as useTrendsStore,
|
|
153
155
|
K as useUserStore,
|
|
@@ -1,7 +1,71 @@
|
|
|
1
1
|
import { PaletteColor, PaletteMode, Theme } from '@mui/material';
|
|
2
|
+
import { Customizations } from '@mxenabled/mxui';
|
|
2
3
|
import { ClientStyleProfile } from '../../core';
|
|
3
|
-
import { ClientConfig } from '../../core/types/AppData';
|
|
4
|
+
import { ClientConfig, StyleConfig } from '../../core/types/AppData';
|
|
5
|
+
export declare const getClientCustomizations: (clientStyleProfile: ClientStyleProfile, mode: PaletteMode, styleConfig?: StyleConfig, requestedMode?: ClientStyleProfile["mode"]) => Customizations;
|
|
6
|
+
export declare const getClientComponentOverrides: (theme: Theme, clientStyleProfile: ClientStyleProfile, clientConfig?: ClientConfig) => {
|
|
7
|
+
components: {
|
|
8
|
+
MuiCard?: {
|
|
9
|
+
styleOverrides: {
|
|
10
|
+
root: {
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | undefined;
|
|
15
|
+
MuiPaper?: {
|
|
16
|
+
styleOverrides: {
|
|
17
|
+
rounded: {
|
|
18
|
+
borderRadius: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | undefined;
|
|
22
|
+
MuiButton?: {
|
|
23
|
+
styleOverrides: {
|
|
24
|
+
root: {
|
|
25
|
+
borderRadius: string;
|
|
26
|
+
textTransform: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
} | undefined;
|
|
30
|
+
MuiIconButton?: {
|
|
31
|
+
styleOverrides: {
|
|
32
|
+
root: {
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
minWidth: number;
|
|
35
|
+
minHeight: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
MuiToggleButton?: {
|
|
40
|
+
styleOverrides: {
|
|
41
|
+
root: {
|
|
42
|
+
borderRadius: string;
|
|
43
|
+
textTransform: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
} | undefined;
|
|
47
|
+
MuiTabs: {
|
|
48
|
+
styleOverrides: {
|
|
49
|
+
indicator: {
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
MuiPickersCalendarHeader: {
|
|
55
|
+
styleOverrides: {
|
|
56
|
+
switchViewButton: {
|
|
57
|
+
color: string | undefined;
|
|
58
|
+
'&:hover': {
|
|
59
|
+
backgroundColor: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/** @deprecated Use `getClientCustomizations` and pass the result to `createMXTheme` */
|
|
4
67
|
export declare const getClientPaletteOptions: (clientStyleProfile: ClientStyleProfile, mode: PaletteMode) => Record<string, string>;
|
|
68
|
+
/** @deprecated Build the theme with `getClientCustomizations` + `createMXTheme` and merge `getClientComponentOverrides` on top */
|
|
5
69
|
export declare const getClientTheme: (theme: Theme, clientStyleProfile: ClientStyleProfile, clientConfig?: ClientConfig) => {
|
|
6
70
|
typography: {
|
|
7
71
|
[k: string]: string | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { alpha as
|
|
2
|
-
var
|
|
1
|
+
import { alpha as h, darken as y, lighten as b } from "@mui/material";
|
|
2
|
+
var x = [
|
|
3
3
|
"fontFamily",
|
|
4
4
|
"h1",
|
|
5
5
|
"h2",
|
|
@@ -11,86 +11,150 @@ var h = [
|
|
|
11
11
|
"subtitle1",
|
|
12
12
|
"subtitle2",
|
|
13
13
|
"tiny"
|
|
14
|
-
],
|
|
14
|
+
], v = [
|
|
15
15
|
{
|
|
16
16
|
key: "primary",
|
|
17
|
+
override: "primary_color",
|
|
17
18
|
light: "primary_color",
|
|
18
19
|
dark: "primary_color_dark"
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
key: "secondary",
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
override: "secondary_color",
|
|
24
|
+
light: "secondary_color",
|
|
25
|
+
dark: "secondary_color_dark"
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
28
|
key: "error",
|
|
29
|
+
override: "error_color",
|
|
27
30
|
light: "error_color",
|
|
28
31
|
dark: "error_color_dark"
|
|
29
32
|
},
|
|
30
33
|
{
|
|
31
34
|
key: "warning",
|
|
35
|
+
override: "warning_color",
|
|
32
36
|
light: "warning_color",
|
|
33
37
|
dark: "warning_color_dark"
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
key: "info",
|
|
41
|
+
override: "info_color",
|
|
37
42
|
light: "info_color",
|
|
38
43
|
dark: "info_color_dark"
|
|
39
44
|
},
|
|
40
45
|
{
|
|
41
46
|
key: "success",
|
|
47
|
+
override: "success_color",
|
|
42
48
|
light: "success_color",
|
|
43
49
|
dark: "success_color_dark"
|
|
44
50
|
}
|
|
45
|
-
],
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
], O = [...v, {
|
|
52
|
+
key: "grey",
|
|
53
|
+
override: "neutral_color",
|
|
54
|
+
light: "neutral_color",
|
|
55
|
+
dark: "neutral_color_dark"
|
|
56
|
+
}], T = (r, t, a, i) => {
|
|
57
|
+
const d = t === "dark", s = i ?? r?.mode ?? t, e = {};
|
|
58
|
+
for (const { key: k, override: R, light: C, dark: f } of O) {
|
|
59
|
+
const g = a?.[R] ?? r?.[d ? f : C];
|
|
60
|
+
g && (e[k] = g);
|
|
61
|
+
}
|
|
62
|
+
const p = d && s !== "browser", _ = (k) => p ? { dark: k } : { light: k }, n = a?.background_color ?? r?.background_color, c = a?.paper_color ?? r?.paper_color;
|
|
63
|
+
(n || c) && (e.background = {
|
|
64
|
+
...n && { default: _(n) },
|
|
65
|
+
...c && { paper: _(c) }
|
|
66
|
+
});
|
|
67
|
+
const o = a?.font_name || r?.body_font_name || r?.system_font, u = a?.header_font_name || r?.header_font_name, l = a?.use_glass ?? r?.use_glass, m = a?.corner_radius ?? r?.card_corner_radius;
|
|
68
|
+
return {
|
|
69
|
+
...Object.keys(e).length > 0 && { paletteOptions: e },
|
|
70
|
+
...(o || u) && { typographyOptions: {
|
|
71
|
+
...o && { fontFamily: o },
|
|
72
|
+
...u && { headerFontFamily: u }
|
|
73
|
+
} },
|
|
74
|
+
...l !== void 0 && { styleOptions: { useGlass: l } },
|
|
75
|
+
...m !== void 0 && { shapeOptions: { borderRadius: m } }
|
|
76
|
+
};
|
|
77
|
+
}, $ = (r, t, a) => {
|
|
78
|
+
const i = a?.master?.style, d = {
|
|
79
|
+
MuiTabs: { styleOverrides: { indicator: { backgroundColor: r.palette.primary.light } } },
|
|
80
|
+
MuiPickersCalendarHeader: { styleOverrides: { switchViewButton: {
|
|
81
|
+
color: r.palette.primary.lighter,
|
|
82
|
+
"&:hover": { backgroundColor: h(r.palette.primary.light, 0.1) }
|
|
83
|
+
} } }
|
|
84
|
+
}, s = t?.button_corner_radius, e = i?.corner_radius ?? t?.card_corner_radius;
|
|
85
|
+
return { components: {
|
|
86
|
+
...d,
|
|
87
|
+
...s !== void 0 && {
|
|
88
|
+
MuiButton: { styleOverrides: { root: {
|
|
89
|
+
borderRadius: `${s}px`,
|
|
90
|
+
textTransform: "none"
|
|
91
|
+
} } },
|
|
92
|
+
MuiIconButton: { styleOverrides: { root: {
|
|
93
|
+
borderRadius: `${s}px`,
|
|
94
|
+
minWidth: s,
|
|
95
|
+
minHeight: s
|
|
96
|
+
} } },
|
|
97
|
+
MuiToggleButton: { styleOverrides: { root: {
|
|
98
|
+
borderRadius: `${s}px`,
|
|
99
|
+
textTransform: "none"
|
|
100
|
+
} } }
|
|
101
|
+
},
|
|
102
|
+
...e !== void 0 && {
|
|
103
|
+
MuiCard: { styleOverrides: { root: { borderRadius: `${e}px` } } },
|
|
104
|
+
MuiPaper: { styleOverrides: { rounded: { borderRadius: `${e}px` } } }
|
|
105
|
+
}
|
|
106
|
+
} };
|
|
107
|
+
}, w = (r, t) => {
|
|
108
|
+
const a = t === "dark", i = {};
|
|
109
|
+
for (const { key: d, light: s, dark: e } of O) {
|
|
110
|
+
const p = r?.[a ? e : s];
|
|
111
|
+
p && (i[d] = p);
|
|
50
112
|
}
|
|
51
113
|
return i;
|
|
52
|
-
},
|
|
53
|
-
const i =
|
|
54
|
-
lighter:
|
|
55
|
-
light:
|
|
56
|
-
main:
|
|
57
|
-
dark: y(
|
|
58
|
-
darker: y(
|
|
59
|
-
} : u,
|
|
60
|
-
MuiTabs: { styleOverrides: { indicator: { backgroundColor:
|
|
114
|
+
}, F = (r, t, a) => {
|
|
115
|
+
const i = r.palette.mode === "dark", d = (a?.master?.style?.font_name || t?.body_font_name || t?.system_font) ?? r.typography.fontFamily, s = (o, u) => o ? {
|
|
116
|
+
lighter: b(o, 0.5),
|
|
117
|
+
light: b(o, 0.25),
|
|
118
|
+
main: o,
|
|
119
|
+
dark: y(o, 0.25),
|
|
120
|
+
darker: y(o, 0.5)
|
|
121
|
+
} : u, e = Object.fromEntries(v.map(({ key: o, light: u, dark: l }) => [o, s(t?.[i ? l : u], r.palette[o])])), p = Object.fromEntries(x.map((o) => [o, o === "fontFamily" ? d : { fontFamily: d }])), _ = {
|
|
122
|
+
MuiTabs: { styleOverrides: { indicator: { backgroundColor: e.primary.light } } },
|
|
61
123
|
MuiPickersCalendarHeader: { styleOverrides: { switchViewButton: {
|
|
62
|
-
color:
|
|
63
|
-
"&:hover": { backgroundColor:
|
|
124
|
+
color: e.primary.lighter,
|
|
125
|
+
"&:hover": { backgroundColor: h(e.primary.light, 0.1) }
|
|
64
126
|
} } }
|
|
65
|
-
},
|
|
127
|
+
}, n = t?.button_corner_radius, c = t?.card_corner_radius;
|
|
66
128
|
return {
|
|
67
|
-
typography:
|
|
68
|
-
palette:
|
|
129
|
+
typography: p,
|
|
130
|
+
palette: e,
|
|
69
131
|
components: {
|
|
70
|
-
...
|
|
71
|
-
...
|
|
132
|
+
..._,
|
|
133
|
+
...n && {
|
|
72
134
|
MuiButton: { styleOverrides: { root: {
|
|
73
|
-
borderRadius: `${
|
|
135
|
+
borderRadius: `${n}px`,
|
|
74
136
|
textTransform: "none"
|
|
75
137
|
} } },
|
|
76
138
|
MuiIconButton: { styleOverrides: { root: {
|
|
77
|
-
borderRadius: `${
|
|
78
|
-
minWidth:
|
|
79
|
-
minHeight:
|
|
139
|
+
borderRadius: `${n}px`,
|
|
140
|
+
minWidth: n,
|
|
141
|
+
minHeight: n
|
|
80
142
|
} } },
|
|
81
143
|
MuiToggleButton: { styleOverrides: { root: {
|
|
82
|
-
borderRadius: `${
|
|
144
|
+
borderRadius: `${n}px`,
|
|
83
145
|
textTransform: "none"
|
|
84
146
|
} } }
|
|
85
147
|
},
|
|
86
|
-
...
|
|
87
|
-
...
|
|
148
|
+
...c && { MuiCard: { styleOverrides: { root: { borderRadius: `${c}px` } } } },
|
|
149
|
+
...c && { MuiPaper: { styleOverrides: { rounded: { borderRadius: `${c}px` } } } }
|
|
88
150
|
}
|
|
89
151
|
};
|
|
90
152
|
};
|
|
91
153
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
154
|
+
$ as getClientComponentOverrides,
|
|
155
|
+
T as getClientCustomizations,
|
|
156
|
+
w as getClientPaletteOptions,
|
|
157
|
+
F as getClientTheme
|
|
94
158
|
};
|
|
95
159
|
|
|
96
160
|
//# sourceMappingURL=Theme.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.es.js","names":[],"sources":["../../../src/common/utils/Theme.ts"],"sourcesContent":["import { alpha, darken, lighten, PaletteColor, PaletteMode, Theme } from '@mui/material'\n\nimport type { ClientStyleProfile } from '../../core'\nimport { ClientConfig } from '../../core/types/AppData'\n\nconst TYPOGRAPHY_VARIANTS = [\n 'fontFamily',\n 'h1',\n 'h2',\n 'h3',\n 'body1',\n 'body2',\n 'button',\n 'caption',\n 'subtitle1',\n 'subtitle2',\n 'tiny',\n] as const\n\nconst PALETTE_CONFIG = [\n { key: 'primary', light: 'primary_color', dark: 'primary_color_dark' },\n { key: 'secondary', light: 'neutral_color', dark: 'neutral_color_dark' },\n { key: 'error', light: 'error_color', dark: 'error_color_dark' },\n { key: 'warning', light: 'warning_color', dark: 'warning_color_dark' },\n { key: 'info', light: 'info_color', dark: 'info_color_dark' },\n { key: 'success', light: 'success_color', dark: 'success_color_dark' },\n] as const\n\nexport const getClientPaletteOptions = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n): Record<string, string> => {\n const isDark = mode === 'dark'\n const options: Record<string, string> = {}\n\n for (const { key, light, dark } of PALETTE_CONFIG) {\n const color = clientStyleProfile?.[isDark ? dark : light] as string | undefined\n if (color) options[key] = color\n }\n\n return options\n}\n\nexport const getClientTheme = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const isDark = theme.palette.mode === 'dark'\n const font =\n (clientConfig?.master?.style?.font_name || clientStyleProfile?.system_font) ??\n theme.typography.fontFamily\n\n const generatePalette = (color: string | undefined, defaultColor: PaletteColor) =>\n color\n ? {\n lighter: lighten(color, 0.5),\n light: lighten(color, 0.25),\n main: color,\n dark: darken(color, 0.25),\n darker: darken(color, 0.5),\n }\n : defaultColor\n\n const palette = Object.fromEntries(\n PALETTE_CONFIG.map(({ key, light, dark }) => [\n key,\n generatePalette(\n clientStyleProfile?.[isDark ? dark : light] as string | undefined,\n theme.palette[key],\n ),\n ]),\n )\n\n const typography = Object.fromEntries(\n TYPOGRAPHY_VARIANTS.map((variant) => [\n variant,\n variant === 'fontFamily' ? font : { fontFamily: font },\n ]),\n )\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n }),\n ...(cardRadius && {\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { typography, palette, components }\n}\n"],"mappings":";AAKA,IAAM,IAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEM,IAAiB;AAAA,EACrB;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACrE;AAAA,IAAE,KAAK;AAAA,IAAa,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACvE;AAAA,IAAE,KAAK;AAAA,IAAS,OAAO;AAAA,IAAe,MAAM;AAAA,EAAmB;AAAA,EAC/D;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EACrE;AAAA,IAAE,KAAK;AAAA,IAAQ,OAAO;AAAA,IAAc,MAAM;AAAA,EAAkB;AAAA,EAC5D;AAAA,IAAE,KAAK;AAAA,IAAW,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AACvE,GAEa,IAAA,CACX,GACA,MAC2B;AAC3B,QAAM,IAAS,MAAS,QAClB,IAAkC,CAAC;AAEzC,aAAW,EAAE,KAAA,GAAK,OAAA,GAAO,MAAA,EAAA,KAAU,GAAgB;AACjD,UAAM,IAAQ,IAAqB,IAAS,IAAO,CAAA;AACnD,IAAI,MAAO,EAAQ,CAAA,IAAO;AAAA,EAC5B;AAEA,SAAO;AACT,GAEa,IAAA,CACX,GACA,GACA,MACG;AACH,QAAM,IAAS,EAAM,QAAQ,SAAS,QAChC,KACH,GAAc,QAAQ,OAAO,aAAa,GAAoB,gBAC/D,EAAM,WAAW,YAEb,IAAA,CAAmB,GAA2B,MAClD,IACI;AAAA,IACE,SAAS,EAAQ,GAAO,GAAG;AAAA,IAC3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AAAA,MACA,GAAI,KAAc,EAChB,SAAS,EACP,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,CAAA,KAAe,EAAE,EAC9D,EACF;AAAA,MACA,GAAI,KAAc,EAChB,UAAU,EACR,gBAAgB,EACd,SAAS,EAAE,cAAc,GAAG,CAAA,KAAe,EAC7C,EACF,EACF;AAAA,IAG4B;AAAA,EAAW;AAC3C"}
|
|
1
|
+
{"version":3,"file":"Theme.es.js","names":[],"sources":["../../../src/common/utils/Theme.ts"],"sourcesContent":["import { alpha, darken, lighten, PaletteColor, PaletteMode, Theme } from '@mui/material'\nimport type { Customizations } from '@mxenabled/mxui'\n\nimport type { ClientStyleProfile } from '../../core'\nimport { ClientConfig, StyleConfig } from '../../core/types/AppData'\n\ntype PaletteOptions = NonNullable<Customizations['paletteOptions']>\ntype ModeColorOptions = Partial<NonNullable<NonNullable<PaletteOptions['background']>['default']>>\n\nconst TYPOGRAPHY_VARIANTS = [\n 'fontFamily',\n 'h1',\n 'h2',\n 'h3',\n 'body1',\n 'body2',\n 'button',\n 'caption',\n 'subtitle1',\n 'subtitle2',\n 'tiny',\n] as const\n\nconst PALETTE_CONFIG = [\n { key: 'primary', override: 'primary_color', light: 'primary_color', dark: 'primary_color_dark' },\n {\n key: 'secondary',\n override: 'secondary_color',\n light: 'secondary_color',\n dark: 'secondary_color_dark',\n },\n { key: 'error', override: 'error_color', light: 'error_color', dark: 'error_color_dark' },\n { key: 'warning', override: 'warning_color', light: 'warning_color', dark: 'warning_color_dark' },\n { key: 'info', override: 'info_color', light: 'info_color', dark: 'info_color_dark' },\n { key: 'success', override: 'success_color', light: 'success_color', dark: 'success_color_dark' },\n] as const\n\nconst SEED_CONFIG = [\n ...PALETTE_CONFIG,\n { key: 'grey', override: 'neutral_color', light: 'neutral_color', dark: 'neutral_color_dark' },\n] as const\n\nexport const getClientCustomizations = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n styleConfig?: StyleConfig,\n requestedMode?: ClientStyleProfile['mode'],\n): Customizations => {\n const isDark = mode === 'dark'\n const requested = requestedMode ?? clientStyleProfile?.mode ?? mode\n\n const paletteOptions: PaletteOptions = {}\n for (const { key, override, light, dark } of SEED_CONFIG) {\n const color = styleConfig?.[override] ?? clientStyleProfile?.[isDark ? dark : light]\n if (color) paletteOptions[key] = color\n }\n\n const useDarkSlot = isDark && requested !== 'browser'\n const asModeColor = (color: string): ModeColorOptions =>\n useDarkSlot ? { dark: color } : { light: color }\n const backgroundColor = styleConfig?.background_color ?? clientStyleProfile?.background_color\n const paperColor = styleConfig?.paper_color ?? clientStyleProfile?.paper_color\n if (backgroundColor || paperColor) {\n paletteOptions.background = {\n ...(backgroundColor && { default: asModeColor(backgroundColor) }),\n ...(paperColor && { paper: asModeColor(paperColor) }),\n } as PaletteOptions['background']\n }\n\n const fontFamily =\n styleConfig?.font_name || clientStyleProfile?.body_font_name || clientStyleProfile?.system_font\n const headerFontFamily = styleConfig?.header_font_name || clientStyleProfile?.header_font_name\n\n const useGlass = styleConfig?.use_glass ?? clientStyleProfile?.use_glass\n const borderRadius = styleConfig?.corner_radius ?? clientStyleProfile?.card_corner_radius\n\n return {\n ...(Object.keys(paletteOptions).length > 0 && { paletteOptions }),\n ...((fontFamily || headerFontFamily) && {\n typographyOptions: {\n ...(fontFamily && { fontFamily }),\n ...(headerFontFamily && { headerFontFamily }),\n },\n }),\n ...(useGlass !== undefined && { styleOptions: { useGlass } }),\n ...(borderRadius !== undefined && { shapeOptions: { borderRadius } }),\n }\n}\n\nexport const getClientComponentOverrides = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const styleConfig = clientConfig?.master?.style\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: theme.palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: theme.palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = styleConfig?.corner_radius ?? clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius !== undefined && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius !== undefined && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { components }\n}\n\n/** @deprecated Use `getClientCustomizations` and pass the result to `createMXTheme` */\nexport const getClientPaletteOptions = (\n clientStyleProfile: ClientStyleProfile,\n mode: PaletteMode,\n): Record<string, string> => {\n const isDark = mode === 'dark'\n const options: Record<string, string> = {}\n\n for (const { key, light, dark } of SEED_CONFIG) {\n const color = clientStyleProfile?.[isDark ? dark : light] as string | undefined\n if (color) options[key] = color\n }\n\n return options\n}\n\n/** @deprecated Build the theme with `getClientCustomizations` + `createMXTheme` and merge `getClientComponentOverrides` on top */\nexport const getClientTheme = (\n theme: Theme,\n clientStyleProfile: ClientStyleProfile,\n clientConfig?: ClientConfig,\n) => {\n const isDark = theme.palette.mode === 'dark'\n const font =\n (clientConfig?.master?.style?.font_name ||\n clientStyleProfile?.body_font_name ||\n clientStyleProfile?.system_font) ??\n theme.typography.fontFamily\n\n const generatePalette = (color: string | undefined, defaultColor: PaletteColor) =>\n color\n ? {\n lighter: lighten(color, 0.5),\n light: lighten(color, 0.25),\n main: color,\n dark: darken(color, 0.25),\n darker: darken(color, 0.5),\n }\n : defaultColor\n\n const palette = Object.fromEntries(\n PALETTE_CONFIG.map(({ key, light, dark }) => [\n key,\n generatePalette(\n clientStyleProfile?.[isDark ? dark : light] as string | undefined,\n theme.palette[key],\n ),\n ]),\n )\n\n const typography = Object.fromEntries(\n TYPOGRAPHY_VARIANTS.map((variant) => [\n variant,\n variant === 'fontFamily' ? font : { fontFamily: font },\n ]),\n )\n\n const baseComponents = {\n MuiTabs: {\n styleOverrides: {\n indicator: { backgroundColor: palette.primary.light },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: palette.primary.lighter,\n '&:hover': { backgroundColor: alpha(palette.primary.light, 0.1) },\n },\n },\n },\n }\n\n const buttonRadius = clientStyleProfile?.button_corner_radius\n const cardRadius = clientStyleProfile?.card_corner_radius\n\n const components = {\n ...baseComponents,\n ...(buttonRadius && {\n MuiButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: `${buttonRadius}px`,\n minWidth: buttonRadius,\n minHeight: buttonRadius,\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: { borderRadius: `${buttonRadius}px`, textTransform: 'none' },\n },\n },\n }),\n ...(cardRadius && {\n MuiCard: {\n styleOverrides: { root: { borderRadius: `${cardRadius}px` } },\n },\n }),\n ...(cardRadius && {\n MuiPaper: {\n styleOverrides: {\n rounded: { borderRadius: `${cardRadius}px` },\n },\n },\n }),\n }\n\n return { typography, palette, components }\n}\n"],"mappings":";AASA,IAAM,IAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEM,IAAiB;AAAA,EACrB;AAAA,IAAE,KAAK;AAAA,IAAW,UAAU;AAAA,IAAiB,OAAO;AAAA,IAAiB,MAAM;AAAA,EAAqB;AAAA,EAChG;AAAA,IACE,KAAK;AAAA,IACL,UAAU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ACnC,GACA,MAAY,eAAe,IAAO,EAAE,YAAY,EAAK,CACvD,CAAC,CACH,GAEM,IAAiB;AAAA,IACrB,SAAS,EACP,gBAAgB,EACd,WAAW,EAAE,iBAAiB,EAAQ,QAAQ,MAAM,EACtD,EACF;AAAA,IACA,0BAA0B,EACxB,gBAAgB,EACd,kBAAkB;AAAA,MAChB,OAAO,EAAQ,QAAQ;AAAA,MACvB,WAAW,EAAE,iBAAiB,EAAM,EAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,IAClE,EACF,EACF;AAAA,EACF,GAEM,IAAe,GAAoB,sBACnC,IAAa,GAAoB;AAuCvC,SAAO;AAAA,IAAE,YAAA;AAAA,IAAY,SAAA;AAAA,IAAS,YAAA;AAAA,MApC5B,GAAG;AAAA,MACH,GAAI,KAAgB;AAAA,QAClB,WAAW,EACT,gBAAgB,EACd,MAAM;AAAA,UAAE,cAAc,GAAG,CAAA;AAAA,UAAkB,eAAe;AAAA,QAAO,EACnE,EACF;AAAA,QACA,eAAe,EACb,gBAAgB,EACd,MAAM;AAAA,UACJ,cAAc,GAAG,CAAA;AAAA,UACjB,UAAU;AAAA,UACV,WAAW;AAAA,QACb,EACF,EACF;AAAA,QACA,iBAAiB,EACf,gBAAgB,EACd,MAAM;AAAA,UAAE,cAAc,GAAG,CAAA;AAAA,UAAkB,eAAe;AAAA,QAAO,EACnE,EACF;AAAA,MACF;AAAA,MACA,GAAI,KAAc,EAChB,SAAS,EACP,gBAAgB,EAAE,MAAM,EAAE,cAAc,GAAG,CAAA,KAAe,EAAE,EAC9D,EACF;AAAA,MACA,GAAI,KAAc,EAChB,UAAU,EACR,gBAAgB,EACd,SAAS,EAAE,cAAc,GAAG,CAAA,KAAe,EAC7C,EACF,EACF;AAAA,IAG4B;AAAA,EAAW;AAC3C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { analyticsSession } from './Analytics';
|
|
2
|
-
export { getClientPaletteOptions, getClientTheme } from './Theme';
|
|
2
|
+
export { getClientComponentOverrides, getClientCustomizations, getClientPaletteOptions, getClientTheme, } from './Theme';
|
|
@@ -48,7 +48,21 @@ export interface MasterConfig {
|
|
|
48
48
|
ui_message_webview_url_scheme?: string;
|
|
49
49
|
}
|
|
50
50
|
export interface StyleConfig {
|
|
51
|
+
background_color?: string;
|
|
52
|
+
paper_color?: string;
|
|
53
|
+
primary_color?: string;
|
|
54
|
+
secondary_color?: string;
|
|
55
|
+
success_color?: string;
|
|
56
|
+
error_color?: string;
|
|
57
|
+
warning_color?: string;
|
|
58
|
+
info_color?: string;
|
|
59
|
+
neutral_color?: string;
|
|
60
|
+
corner_radius?: number;
|
|
51
61
|
font_name?: string;
|
|
62
|
+
header_font_name?: string;
|
|
63
|
+
use_body_font_url?: boolean;
|
|
64
|
+
use_header_font_url?: boolean;
|
|
65
|
+
use_glass?: boolean;
|
|
52
66
|
}
|
|
53
67
|
export interface DeepLinkParams {
|
|
54
68
|
account_guids?: string[];
|
|
@@ -115,4 +115,11 @@ export interface ClientStyleProfile {
|
|
|
115
115
|
system_font?: string;
|
|
116
116
|
card_corner_radius?: number;
|
|
117
117
|
button_corner_radius?: number;
|
|
118
|
+
background_color?: string;
|
|
119
|
+
paper_color?: string;
|
|
120
|
+
body_font_name?: string;
|
|
121
|
+
body_font_url?: string;
|
|
122
|
+
header_font_name?: string;
|
|
123
|
+
header_font_url?: string;
|
|
124
|
+
use_glass?: boolean;
|
|
118
125
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { Account, DetailedAccount, Member, MonthlyAccountBalance } from './Account';
|
|
2
2
|
export { AccountIcon, AccountIconVariants, AccountSubType, AccountType, AccountTypeName, ConnectionStatus, ConnectionStatusEnums, ErrorStatuses, MfaStatuses, NonConnectedStatuses, ProcessingStatuses, PropertyType, PropertyTypeName, StatusName, } from './Account';
|
|
3
3
|
export type { AnalyticsEvent, AnalyticsPageview, BasicAnalyticsEvent, BasicAnalyticsPageview, AnalyticsSession, AnalyticEventFunction, AnalyticPageviewFunction, AnalyticsSessionInstance, } from './Analytics';
|
|
4
|
-
export type { AppConfig, AppData, Banner, ClientConfig, Config, Options } from './AppData';
|
|
4
|
+
export type { AppConfig, AppData, Banner, ClientConfig, Config, Options, StyleConfig, } from './AppData';
|
|
5
5
|
export type { Beat, DataSeries } from './Beat';
|
|
6
6
|
export { UserVerification } from './Beat';
|
|
7
7
|
export type { Budget, BudgetColors, DetailedBudget, MerchantBudget } from './Budget';
|