@visin/frontend-core 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/components/AppLayout/AppLayout.js +43 -44
- package/dist/components/AppLayout/AppLayout.js.map +1 -1
- package/dist/components/ColorMode/ColorModeSetting.d.ts +39 -0
- package/dist/components/ColorMode/ColorModeSetting.d.ts.map +1 -0
- package/dist/components/ColorMode/ColorModeSetting.js +52 -0
- package/dist/components/ColorMode/ColorModeSetting.js.map +1 -0
- package/dist/components/ColorMode/VisinThemeProvider.d.ts +16 -0
- package/dist/components/ColorMode/VisinThemeProvider.d.ts.map +1 -0
- package/dist/components/ColorMode/VisinThemeProvider.js +19 -0
- package/dist/components/ColorMode/VisinThemeProvider.js.map +1 -0
- package/dist/components/ColorMode/index.d.ts +7 -0
- package/dist/components/ColorMode/index.d.ts.map +1 -0
- package/dist/components/ColorMode/index.js +4 -0
- package/dist/components/ColorMode/index.js.map +1 -0
- package/dist/components/ColorMode/useChartColors.d.ts +15 -0
- package/dist/components/ColorMode/useChartColors.d.ts.map +1 -0
- package/dist/components/ColorMode/useChartColors.js +16 -0
- package/dist/components/ColorMode/useChartColors.js.map +1 -0
- package/dist/components/Page/EmptyState.js +2 -2
- package/dist/components/Page/EmptyState.js.map +1 -1
- package/dist/components/Page/ListRow.d.ts.map +1 -1
- package/dist/components/Page/ListRow.js +3 -2
- package/dist/components/Page/ListRow.js.map +1 -1
- package/dist/components/Page/PageHeader.d.ts.map +1 -1
- package/dist/components/Page/PageHeader.js +4 -2
- package/dist/components/Page/PageHeader.js.map +1 -1
- package/dist/components/Page/Panel.d.ts +4 -2
- package/dist/components/Page/Panel.d.ts.map +1 -1
- package/dist/components/Page/Panel.js +13 -3
- package/dist/components/Page/Panel.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/theme/chart.d.ts +19 -0
- package/dist/theme/chart.d.ts.map +1 -0
- package/dist/theme/chart.js +19 -0
- package/dist/theme/chart.js.map +1 -0
- package/dist/theme/createVisinTheme.d.ts +45 -0
- package/dist/theme/createVisinTheme.d.ts.map +1 -0
- package/dist/theme/createVisinTheme.js +261 -0
- package/dist/theme/createVisinTheme.js.map +1 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +5 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/livePalette.d.ts +11 -0
- package/dist/theme/livePalette.d.ts.map +1 -0
- package/dist/theme/livePalette.js +10 -0
- package/dist/theme/livePalette.js.map +1 -0
- package/dist/theme/tokens.d.ts +224 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +205 -0
- package/dist/theme/tokens.js.map +1 -0
- package/package.json +1 -1
- package/dist/theme.d.ts +0 -27
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -121
- package/dist/theme.js.map +0 -1
|
@@ -9,8 +9,10 @@ export interface PanelProps {
|
|
|
9
9
|
'aria-labelledby'?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The surface lists, tables and forms sit on:
|
|
13
|
-
* corners
|
|
12
|
+
* The surface lists, tables and forms sit on: paper, a hairline border, 16px
|
|
13
|
+
* corners and a shadow soft enough that a stack of them does not read as
|
|
14
|
+
* clutter on a phone. Solid, not glass: blur behind rows of numbers costs
|
|
15
|
+
* legibility.
|
|
14
16
|
*/
|
|
15
17
|
export declare function Panel({ children, sx, component, ...aria }: PanelProps): import("react").JSX.Element;
|
|
16
18
|
//# sourceMappingURL=Panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG9D,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAiB,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,+BAoB7E"}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
|
+
import { raisedShadow } from '../../theme';
|
|
3
4
|
/**
|
|
4
|
-
* The surface lists, tables and forms sit on:
|
|
5
|
-
* corners
|
|
5
|
+
* The surface lists, tables and forms sit on: paper, a hairline border, 16px
|
|
6
|
+
* corners and a shadow soft enough that a stack of them does not read as
|
|
7
|
+
* clutter on a phone. Solid, not glass: blur behind rows of numbers costs
|
|
8
|
+
* legibility.
|
|
6
9
|
*/
|
|
7
10
|
export function Panel({ children, sx, component = 'div', ...aria }) {
|
|
8
11
|
return (_jsx(Box, { component: component, ...aria, sx: [
|
|
9
|
-
{
|
|
12
|
+
{
|
|
13
|
+
bgcolor: 'background.paper',
|
|
14
|
+
border: '1px solid',
|
|
15
|
+
borderColor: 'divider',
|
|
16
|
+
borderRadius: '16px',
|
|
17
|
+
boxShadow: raisedShadow,
|
|
18
|
+
overflow: 'hidden'
|
|
19
|
+
},
|
|
10
20
|
...(Array.isArray(sx) ? sx : [sx])
|
|
11
21
|
], children: children }));
|
|
12
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAA4B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAA4B,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,IAAI,EAAc;IAC5E,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,SAAS,KAChB,IAAI,EACR,EAAE,EAAE;YACF;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,SAAS;gBACtB,YAAY,EAAE,MAAM;gBACpB,SAAS,EAAE,YAAY;gBACvB,QAAQ,EAAE,QAAQ;aACnB;YACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACnC,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ export { AppLayout } from './components/AppLayout';
|
|
|
8
8
|
export type { AppLayoutProps, AppLayoutNavGroup, AppLayoutNavItem, AppLayoutInternalNavItem, AppLayoutExternalNavItem, AppLayoutUser } from './components/AppLayout';
|
|
9
9
|
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
10
10
|
export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps } from './components/Page';
|
|
11
|
-
export { createVisinTheme, VISIN_COLORS } from './theme';
|
|
11
|
+
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
12
|
+
export type { ColorSchemeName } from './theme';
|
|
13
|
+
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
|
14
|
+
export type { VisinThemeProviderProps, ColorMode, ColorModeSettingProps, ChartColors } from './components/ColorMode';
|
|
12
15
|
export { createVisinNavigation } from './navigation';
|
|
13
16
|
export type { VisinApp, VisinAppUrls, VisinNavigation } from './navigation';
|
|
14
17
|
export { createProtectedRoute } from './components/ProtectedRoute';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,U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AAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,8 @@ export { Loader } from './components/Loader';
|
|
|
4
4
|
export { ErrorPage } from './components/ErrorPage';
|
|
5
5
|
export { AppLayout } from './components/AppLayout';
|
|
6
6
|
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
7
|
-
export { createVisinTheme, VISIN_COLORS } from './theme';
|
|
7
|
+
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
8
|
+
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
|
8
9
|
export { createVisinNavigation } from './navigation';
|
|
9
10
|
export { createProtectedRoute } from './components/ProtectedRoute';
|
|
10
11
|
export { createLoginRedirect } from './components/LoginRedirect';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AASnD,OAAO,EACL,UAAU,EACV,KAAK,EAC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CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Series colours for charts: eight hues in a fixed order, stepped separately
|
|
3
|
+
* for each scheme.
|
|
4
|
+
*
|
|
5
|
+
* The order is what keeps neighbouring series apart under colour-vision
|
|
6
|
+
* deficiency, so assign slots in order, never shuffle them, and give an entity
|
|
7
|
+
* the same slot wherever it appears (training is slot 1, validation slot 2).
|
|
8
|
+
* Validated against Visin's paper surfaces (#ffffff, #121826): every adjacent
|
|
9
|
+
* pair clears ΔE 8 under CVD simulation and 15 in normal vision. In light,
|
|
10
|
+
* slots 3–5 sit under 3:1 on white, so a chart using them keeps its legend.
|
|
11
|
+
*
|
|
12
|
+
* Real values rather than CSS variables: the chart library writes them into
|
|
13
|
+
* SVG attributes and blends them itself, and can do neither with `var()`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const chartSeries: {
|
|
16
|
+
readonly light: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
|
|
17
|
+
readonly dark: readonly ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#008300", "#9085e9", "#e66767"];
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/theme/chart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Series colours for charts: eight hues in a fixed order, stepped separately
|
|
3
|
+
* for each scheme.
|
|
4
|
+
*
|
|
5
|
+
* The order is what keeps neighbouring series apart under colour-vision
|
|
6
|
+
* deficiency, so assign slots in order, never shuffle them, and give an entity
|
|
7
|
+
* the same slot wherever it appears (training is slot 1, validation slot 2).
|
|
8
|
+
* Validated against Visin's paper surfaces (#ffffff, #121826): every adjacent
|
|
9
|
+
* pair clears ΔE 8 under CVD simulation and 15 in normal vision. In light,
|
|
10
|
+
* slots 3–5 sit under 3:1 on white, so a chart using them keeps its legend.
|
|
11
|
+
*
|
|
12
|
+
* Real values rather than CSS variables: the chart library writes them into
|
|
13
|
+
* SVG attributes and blends them itself, and can do neither with `var()`.
|
|
14
|
+
*/
|
|
15
|
+
export const chartSeries = {
|
|
16
|
+
light: ['#2a78d6', '#eb6834', '#1baf7a', '#eda100', '#e87ba4', '#008300', '#4a3aa7', '#e34948'],
|
|
17
|
+
dark: ['#3987e5', '#d95926', '#199e70', '#c98500', '#d55181', '#008300', '#9085e9', '#e66767']
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/theme/chart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;IAC/F,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;CACtF,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type Theme, type ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
declare module '@mui/material/styles' {
|
|
3
|
+
interface CssThemeVariables {
|
|
4
|
+
enabled: true;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/** The attribute on <html> that says which scheme is showing: `light` or `dark`. */
|
|
8
|
+
export declare const COLOR_SCHEME_ATTRIBUTE = "data-color-scheme";
|
|
9
|
+
/**
|
|
10
|
+
* Where the person's choice (`system`, `light` or `dark`) is kept. Named rather
|
|
11
|
+
* than MUI's default, so the pre-paint script in each index.html reads the same key.
|
|
12
|
+
*/
|
|
13
|
+
export declare const COLOR_MODE_STORAGE_KEY = "visin-mode";
|
|
14
|
+
export declare const COLOR_SCHEME_STORAGE_KEY = "visin-color-scheme";
|
|
15
|
+
/**
|
|
16
|
+
* The colours named outside a React tree: `theme-color` in each index.html,
|
|
17
|
+
* the manifest, the offline page.
|
|
18
|
+
*/
|
|
19
|
+
export declare const VISIN_COLORS: {
|
|
20
|
+
/** Primary: buttons, links, the selected state. */
|
|
21
|
+
readonly brand: "#2563eb";
|
|
22
|
+
readonly themeColor: "#f6f7fb";
|
|
23
|
+
readonly themeColorDark: "#0b0f17";
|
|
24
|
+
readonly background: "#f6f7fb";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The one theme every Visin front renders with — shell, vision, label, account
|
|
28
|
+
* and sign-in — so crossing apps inside the shell never changes the typeface,
|
|
29
|
+
* the blue, the scheme or the shape of a button.
|
|
30
|
+
*
|
|
31
|
+
* Colours are CSS variables switched by an attribute on <html>. That is what
|
|
32
|
+
* makes one switch reach every front: the remotes are federated into the
|
|
33
|
+
* shell's page, so they all read the same attribute. It also means
|
|
34
|
+
* `theme.palette` holds the *light* values in both schemes; code that needs a
|
|
35
|
+
* colour in JS reads `theme.vars.palette` (or `useActivePalette` for a real
|
|
36
|
+
* value, e.g. a chart series).
|
|
37
|
+
*
|
|
38
|
+
* `shape.borderRadius` stays MUI's 4px unit on purpose: pages across the apps
|
|
39
|
+
* set radii as theme multiples (`borderRadius: 2`), and a larger unit turned
|
|
40
|
+
* those into pills. Components get their rounder corners here instead.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createVisinTheme(overrides?: ThemeOptions): Theme;
|
|
43
|
+
/** Built once at module scope: a theme rebuilt per render remounts every style. */
|
|
44
|
+
export declare const visinTheme: Theme;
|
|
45
|
+
//# sourceMappingURL=createVisinTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVisinTheme.d.ts","sourceRoot":"","sources":["../../src/theme/createVisinTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMlF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,iBAAiB;QACzB,OAAO,EAAE,IAAI,CAAC;KACf;CACF;AAeD,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,mDAAmD;;;;;CAK3C,CAAC;AA8BX;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,GAAE,YAAiB,GAAG,KAAK,CA2LpE;AAED,mFAAmF;AACnF,eAAO,MAAM,UAAU,OAAqB,CAAC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { createTheme } from '@mui/material/styles';
|
|
2
|
+
import { brand, glass, ink, raisedShadow, schemeCssVars, schemes, surface } from './tokens';
|
|
3
|
+
/** Below `md` — the compact (phone) layout, as `useCompactLayout` reads it. */
|
|
4
|
+
const PHONE = '@media (max-width:899.95px)';
|
|
5
|
+
/**
|
|
6
|
+
* Below `sm` — a phone held upright, where a thumb does the pointing. 44px is
|
|
7
|
+
* the WCAG 2.2 target size and both platforms' minimum; MUI's 36px button is a
|
|
8
|
+
* miss often enough to feel broken.
|
|
9
|
+
*/
|
|
10
|
+
const HANDHELD = '@media (max-width:599.95px)';
|
|
11
|
+
const TOUCH_TARGET = 44;
|
|
12
|
+
const FONT_STACK = '"Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
|
|
13
|
+
/** The attribute on <html> that says which scheme is showing: `light` or `dark`. */
|
|
14
|
+
export const COLOR_SCHEME_ATTRIBUTE = 'data-color-scheme';
|
|
15
|
+
/**
|
|
16
|
+
* Where the person's choice (`system`, `light` or `dark`) is kept. Named rather
|
|
17
|
+
* than MUI's default, so the pre-paint script in each index.html reads the same key.
|
|
18
|
+
*/
|
|
19
|
+
export const COLOR_MODE_STORAGE_KEY = 'visin-mode';
|
|
20
|
+
export const COLOR_SCHEME_STORAGE_KEY = 'visin-color-scheme';
|
|
21
|
+
/**
|
|
22
|
+
* The colours named outside a React tree: `theme-color` in each index.html,
|
|
23
|
+
* the manifest, the offline page.
|
|
24
|
+
*/
|
|
25
|
+
export const VISIN_COLORS = {
|
|
26
|
+
/** Primary: buttons, links, the selected state. */
|
|
27
|
+
brand: brand.light,
|
|
28
|
+
themeColor: schemes.light.themeColor,
|
|
29
|
+
themeColorDark: schemes.dark.themeColor,
|
|
30
|
+
background: schemes.light.surface.default
|
|
31
|
+
};
|
|
32
|
+
const lightPalette = {
|
|
33
|
+
primary: { main: brand.light, light: '#60a5fa', dark: '#1d4ed8', contrastText: '#ffffff' },
|
|
34
|
+
secondary: { main: '#64748b' },
|
|
35
|
+
success: { main: '#15803d' },
|
|
36
|
+
warning: { main: '#b45309' },
|
|
37
|
+
error: { main: '#dc2626' },
|
|
38
|
+
info: { main: '#0369a1' },
|
|
39
|
+
background: { default: schemes.light.surface.default, paper: schemes.light.surface.paper },
|
|
40
|
+
text: { primary: schemes.light.ink.strong, secondary: schemes.light.ink.body, disabled: schemes.light.ink.faint },
|
|
41
|
+
divider: schemes.light.surface.divider
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Walked *up* for dark: the light scheme's blue is 3.1:1 on the dark paper, so
|
|
45
|
+
* anything readable gets a lighter one, with dark text on it as a button fill.
|
|
46
|
+
*/
|
|
47
|
+
const darkPalette = {
|
|
48
|
+
primary: { main: brand.dark, light: '#93c5fd', dark: '#3b82f6', contrastText: '#0b1220' },
|
|
49
|
+
secondary: { main: '#94a3b8' },
|
|
50
|
+
success: { main: '#4ade80' },
|
|
51
|
+
warning: { main: '#fbbf24' },
|
|
52
|
+
error: { main: '#f87171' },
|
|
53
|
+
info: { main: '#38bdf8' },
|
|
54
|
+
background: { default: schemes.dark.surface.default, paper: schemes.dark.surface.paper },
|
|
55
|
+
text: { primary: schemes.dark.ink.strong, secondary: schemes.dark.ink.body, disabled: schemes.dark.ink.faint },
|
|
56
|
+
divider: schemes.dark.surface.divider
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The one theme every Visin front renders with — shell, vision, label, account
|
|
60
|
+
* and sign-in — so crossing apps inside the shell never changes the typeface,
|
|
61
|
+
* the blue, the scheme or the shape of a button.
|
|
62
|
+
*
|
|
63
|
+
* Colours are CSS variables switched by an attribute on <html>. That is what
|
|
64
|
+
* makes one switch reach every front: the remotes are federated into the
|
|
65
|
+
* shell's page, so they all read the same attribute. It also means
|
|
66
|
+
* `theme.palette` holds the *light* values in both schemes; code that needs a
|
|
67
|
+
* colour in JS reads `theme.vars.palette` (or `useActivePalette` for a real
|
|
68
|
+
* value, e.g. a chart series).
|
|
69
|
+
*
|
|
70
|
+
* `shape.borderRadius` stays MUI's 4px unit on purpose: pages across the apps
|
|
71
|
+
* set radii as theme multiples (`borderRadius: 2`), and a larger unit turned
|
|
72
|
+
* those into pills. Components get their rounder corners here instead.
|
|
73
|
+
*/
|
|
74
|
+
export function createVisinTheme(overrides = {}) {
|
|
75
|
+
return createTheme({
|
|
76
|
+
cssVariables: { colorSchemeSelector: COLOR_SCHEME_ATTRIBUTE },
|
|
77
|
+
colorSchemes: { light: { palette: lightPalette }, dark: { palette: darkPalette } },
|
|
78
|
+
typography: {
|
|
79
|
+
fontFamily: FONT_STACK,
|
|
80
|
+
h1: { fontWeight: 700, letterSpacing: '-0.02em' },
|
|
81
|
+
h2: { fontWeight: 700, letterSpacing: '-0.02em' },
|
|
82
|
+
h3: { fontWeight: 700, letterSpacing: '-0.02em' },
|
|
83
|
+
// Page titles: MUI's 2.125rem h4 filled a phone's width with two words.
|
|
84
|
+
h4: { fontWeight: 700, letterSpacing: '-0.02em', fontSize: '1.75rem', [PHONE]: { fontSize: '1.375rem' } },
|
|
85
|
+
h5: { fontWeight: 600, [PHONE]: { fontSize: '1.2rem' } },
|
|
86
|
+
h6: { fontWeight: 600 },
|
|
87
|
+
subtitle1: { fontWeight: 600 },
|
|
88
|
+
subtitle2: { fontWeight: 600 },
|
|
89
|
+
button: { textTransform: 'none', fontWeight: 600 }
|
|
90
|
+
},
|
|
91
|
+
shape: { borderRadius: 4 },
|
|
92
|
+
components: {
|
|
93
|
+
MuiCssBaseline: {
|
|
94
|
+
styleOverrides: {
|
|
95
|
+
// The tokens pages use (`ink.muted`, `surface.sunken`, `glass`…) are
|
|
96
|
+
// variables; these are their values in each scheme. The attribute
|
|
97
|
+
// also works on an element, not only <html>, so a region can pin
|
|
98
|
+
// itself to one scheme.
|
|
99
|
+
[`:root, [${COLOR_SCHEME_ATTRIBUTE}="light"]`]: schemeCssVars('light'),
|
|
100
|
+
[`:root[${COLOR_SCHEME_ATTRIBUTE}="dark"], [${COLOR_SCHEME_ATTRIBUTE}="dark"]`]: schemeCssVars('dark'),
|
|
101
|
+
body: { WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale' },
|
|
102
|
+
'*::-webkit-scrollbar': { width: 10, height: 10 },
|
|
103
|
+
'*::-webkit-scrollbar-track': { background: 'transparent' },
|
|
104
|
+
'*::-webkit-scrollbar-thumb': {
|
|
105
|
+
background: 'rgba(100,116,139,0.28)',
|
|
106
|
+
borderRadius: 999,
|
|
107
|
+
border: '2px solid transparent',
|
|
108
|
+
backgroundClip: 'padding-box'
|
|
109
|
+
},
|
|
110
|
+
'*::-webkit-scrollbar-thumb:hover': { background: 'rgba(100,116,139,0.5)', backgroundClip: 'padding-box' }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
// AppLayout's content column already has the page gutters; a Container's
|
|
114
|
+
// own added a second pair, which a phone paid for in width.
|
|
115
|
+
MuiContainer: {
|
|
116
|
+
defaultProps: { disableGutters: true }
|
|
117
|
+
},
|
|
118
|
+
MuiButton: {
|
|
119
|
+
defaultProps: { disableElevation: true },
|
|
120
|
+
styleOverrides: {
|
|
121
|
+
root: ({ theme }) => ({
|
|
122
|
+
borderRadius: 10,
|
|
123
|
+
[HANDHELD]: { minHeight: TOUCH_TARGET },
|
|
124
|
+
variants: [
|
|
125
|
+
{
|
|
126
|
+
// A little light from above and a glow in its own colour: a
|
|
127
|
+
// flat fill read as a sticker on the frosted chrome.
|
|
128
|
+
props: { variant: 'contained', color: 'primary' },
|
|
129
|
+
style: {
|
|
130
|
+
backgroundImage: 'linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0))',
|
|
131
|
+
boxShadow: `0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px -10px ${theme.alpha(theme.vars.palette.primary.main, 0.7)}`,
|
|
132
|
+
'&:hover': {
|
|
133
|
+
boxShadow: `0 1px 0 rgba(255,255,255,0.18) inset, 0 10px 24px -10px ${theme.alpha(theme.vars.palette.primary.main, 0.85)}`
|
|
134
|
+
},
|
|
135
|
+
'&.Mui-disabled': { backgroundImage: 'none', boxShadow: 'none' }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}),
|
|
140
|
+
sizeSmall: { [HANDHELD]: { minHeight: 36 } }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
MuiIconButton: {
|
|
144
|
+
styleOverrides: {
|
|
145
|
+
root: {
|
|
146
|
+
[HANDHELD]: {
|
|
147
|
+
minWidth: TOUCH_TARGET,
|
|
148
|
+
minHeight: TOUCH_TARGET,
|
|
149
|
+
// Inside a text field the field is the target, and 44px would
|
|
150
|
+
// stretch a small one taller than its neighbours.
|
|
151
|
+
'.MuiInputAdornment-root &': { minWidth: 0, minHeight: 0 }
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
sizeSmall: { [HANDHELD]: { minWidth: 36, minHeight: 36 } }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
MuiMenuItem: {
|
|
158
|
+
styleOverrides: { root: { [HANDHELD]: { minHeight: TOUCH_TARGET } } }
|
|
159
|
+
},
|
|
160
|
+
MuiListItemButton: {
|
|
161
|
+
styleOverrides: { root: { [HANDHELD]: { minHeight: TOUCH_TARGET } } }
|
|
162
|
+
},
|
|
163
|
+
MuiFab: {
|
|
164
|
+
styleOverrides: { root: { textTransform: 'none', fontWeight: 600 } }
|
|
165
|
+
},
|
|
166
|
+
MuiPaper: {
|
|
167
|
+
styleOverrides: {
|
|
168
|
+
// MUI lightens dark paper by elevation with a white overlay, which
|
|
169
|
+
// turns a menu grey against its own panel. The surfaces are chosen.
|
|
170
|
+
root: { backgroundImage: 'none' },
|
|
171
|
+
rounded: { borderRadius: 12 },
|
|
172
|
+
outlined: { borderColor: surface.divider }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
MuiCard: {
|
|
176
|
+
defaultProps: { variant: 'outlined' },
|
|
177
|
+
styleOverrides: {
|
|
178
|
+
root: { borderRadius: 16, boxShadow: raisedShadow }
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
MuiPopover: {
|
|
182
|
+
styleOverrides: { paper: { ...glass, borderRadius: 12 } }
|
|
183
|
+
},
|
|
184
|
+
MuiMenu: {
|
|
185
|
+
styleOverrides: { paper: { borderRadius: 12 } }
|
|
186
|
+
},
|
|
187
|
+
MuiAutocomplete: {
|
|
188
|
+
styleOverrides: { paper: { ...glass, borderRadius: 12 } }
|
|
189
|
+
},
|
|
190
|
+
MuiDialog: {
|
|
191
|
+
styleOverrides: {
|
|
192
|
+
// Solid: a form over a blur is harder to read than it is pretty.
|
|
193
|
+
paper: {
|
|
194
|
+
borderRadius: 16,
|
|
195
|
+
border: `1px solid ${surface.divider}`,
|
|
196
|
+
boxShadow: '0 30px 80px -30px rgba(0,0,0,0.45)',
|
|
197
|
+
// Near full screen on a phone: a desktop's margins squeeze a form
|
|
198
|
+
// into the middle for nothing.
|
|
199
|
+
[HANDHELD]: {
|
|
200
|
+
margin: 12,
|
|
201
|
+
width: 'calc(100% - 24px)',
|
|
202
|
+
maxWidth: 'calc(100% - 24px)',
|
|
203
|
+
maxHeight: 'calc(100% - 24px)'
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
MuiBackdrop: {
|
|
209
|
+
styleOverrides: {
|
|
210
|
+
root: {
|
|
211
|
+
variants: [
|
|
212
|
+
{
|
|
213
|
+
props: { invisible: false },
|
|
214
|
+
style: { backgroundColor: 'rgba(8,12,20,0.45)', backdropFilter: 'blur(3px)' }
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
MuiOutlinedInput: {
|
|
221
|
+
styleOverrides: { root: { borderRadius: 10, backgroundColor: surface.paper } }
|
|
222
|
+
},
|
|
223
|
+
MuiAlert: {
|
|
224
|
+
styleOverrides: { root: { borderRadius: 10 } }
|
|
225
|
+
},
|
|
226
|
+
MuiChip: {
|
|
227
|
+
styleOverrides: { root: { fontWeight: 500 } }
|
|
228
|
+
},
|
|
229
|
+
// A tab strip wider than the phone it is on is the commonest cause of a
|
|
230
|
+
// page that slides sideways. A page that wants fixed tabs says so.
|
|
231
|
+
MuiTabs: {
|
|
232
|
+
defaultProps: { variant: 'scrollable', scrollButtons: 'auto', allowScrollButtonsMobile: true }
|
|
233
|
+
},
|
|
234
|
+
MuiTab: {
|
|
235
|
+
styleOverrides: { root: { textTransform: 'none', fontWeight: 600, [HANDHELD]: { minWidth: 'auto', paddingInline: 12 } } }
|
|
236
|
+
},
|
|
237
|
+
MuiTableCell: {
|
|
238
|
+
styleOverrides: {
|
|
239
|
+
root: { borderColor: surface.divider },
|
|
240
|
+
head: {
|
|
241
|
+
backgroundColor: surface.sunken,
|
|
242
|
+
color: ink.body,
|
|
243
|
+
fontSize: '0.75rem',
|
|
244
|
+
fontWeight: 600,
|
|
245
|
+
letterSpacing: '0.04em',
|
|
246
|
+
textTransform: 'uppercase'
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
MuiTooltip: {
|
|
251
|
+
styleOverrides: { tooltip: { fontSize: '0.75rem', borderRadius: 8, padding: '6px 10px' } }
|
|
252
|
+
},
|
|
253
|
+
MuiLinearProgress: {
|
|
254
|
+
styleOverrides: { root: { borderRadius: 999 }, bar: { borderRadius: 999 } }
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}, overrides);
|
|
258
|
+
}
|
|
259
|
+
/** Built once at module scope: a theme rebuilt per render remounts every style. */
|
|
260
|
+
export const visinTheme = createVisinTheme();
|
|
261
|
+
//# sourceMappingURL=createVisinTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVisinTheme.js","sourceRoot":"","sources":["../../src/theme/createVisinTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAW5F,+EAA+E;AAC/E,MAAM,KAAK,GAAG,6BAA6B,CAAC;AAE5C;;;;GAIG;AACH,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,UAAU,GAAG,4FAA4F,CAAC;AAEhH,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAA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AG,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE;aAC1H;YACD,YAAY,EAAE;gBACZ,cAAc,EAAE;oBACd,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE;oBACtC,IAAI,EAAE;wBACJ,eAAe,EAAE,OAAO,CAAC,MAAM;wBAC/B,KAAK,EAAE,GAAG,CAAC,IAAI;wBACf,QAAQ,EAAE,SAAS;wBACnB,UAAU,EAAE,GAAG;wBACf,aAAa,EAAE,QAAQ;wBACvB,aAAa,EAAE,WAAW;qBAC3B;iBACF;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE;aAC3F;YACD,iBAAiB,EAAE;gBACjB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE;aAC5E;SACF;KACF,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { brand, schemes, schemeCssVars, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint } from './tokens';
|
|
2
|
+
export type { ColorSchemeName } from './tokens';
|
|
3
|
+
export { livePalette } from './livePalette';
|
|
4
|
+
export { chartSeries } from './chart';
|
|
5
|
+
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY } from './createVisinTheme';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,EACH,OAAO,EACP,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { brand, schemes, schemeCssVars, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint } from './tokens';
|
|
2
|
+
export { livePalette } from './livePalette';
|
|
3
|
+
export { chartSeries } from './chart';
|
|
4
|
+
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY } from './createVisinTheme';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,GAAG,EACH,OAAO,EACP,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Theme } from '@mui/material/styles';
|
|
2
|
+
/**
|
|
3
|
+
* The palette as values that follow light and dark: CSS variables under the
|
|
4
|
+
* Visin theme, plain colours under a theme without them (a test's default).
|
|
5
|
+
*
|
|
6
|
+
* `theme.palette` holds the light values in both schemes. Anything built from
|
|
7
|
+
* this must mix colours in CSS — `tint`, `theme.alpha` — not with MUI's
|
|
8
|
+
* `alpha()`, which cannot parse a variable.
|
|
9
|
+
*/
|
|
10
|
+
export declare const livePalette: (theme: Theme) => Omit<import("@mui/material").Palette & import("@mui/material").CssVarsPalette, "mode" | "colorScheme" | "contrastThreshold" | "tonalOffset" | "getContrastText" | "augmentColor">;
|
|
11
|
+
//# sourceMappingURL=livePalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livePalette.d.ts","sourceRoot":"","sources":["../../src/theme/livePalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,sLAAkC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The palette as values that follow light and dark: CSS variables under the
|
|
3
|
+
* Visin theme, plain colours under a theme without them (a test's default).
|
|
4
|
+
*
|
|
5
|
+
* `theme.palette` holds the light values in both schemes. Anything built from
|
|
6
|
+
* this must mix colours in CSS — `tint`, `theme.alpha` — not with MUI's
|
|
7
|
+
* `alpha()`, which cannot parse a variable.
|
|
8
|
+
*/
|
|
9
|
+
export const livePalette = (theme) => (theme.vars ?? theme).palette;
|
|
10
|
+
//# sourceMappingURL=livePalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livePalette.js","sourceRoot":"","sources":["../../src/theme/livePalette.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC"}
|