@m4l/graphics 7.2.11 → 7.2.12
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/components/GlobalStyles/getInputAutofillGlobalStyles.d.ts +91 -0
- package/components/GlobalStyles/getInputAutofillGlobalStyles.d.ts.map +1 -0
- package/components/GlobalStyles/getInputAutofillGlobalStyles.js +77 -0
- package/components/GlobalStyles/getScrollbarHoverRevealGlobalStyles.d.ts +56 -0
- package/components/GlobalStyles/getScrollbarHoverRevealGlobalStyles.d.ts.map +1 -0
- package/components/GlobalStyles/getScrollbarHoverRevealGlobalStyles.js +44 -0
- package/components/GlobalStyles/index.d.ts +1 -1
- package/components/GlobalStyles/index.d.ts.map +1 -1
- package/components/GlobalStyles/index.js +25 -57
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/contexts/HostThemeContext/index.js +2 -2
- package/index.js +80 -76
- package/package.json +1 -1
- package/test/setup.d.ts +0 -1
- package/test/setup.d.ts.map +0 -1
- package/test/utils.d.ts +0 -9
- package/test/utils.d.ts.map +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ExtendedTheme } from './getDateRangePickerPopupGlobalStyles';
|
|
2
|
+
/**
|
|
3
|
+
* Data attribute for Storybook / Chromatic when real `:-webkit-autofill` cannot be triggered.
|
|
4
|
+
* Must stay in sync with the `:-webkit-autofill` rules in this file.
|
|
5
|
+
*/
|
|
6
|
+
export declare const M4L_CHROMATIC_AUTOFILL = "data-m4l-chromatic-autofill";
|
|
7
|
+
/**
|
|
8
|
+
* Keyframes used to force a repaint so WebKit reapplies `WebkitTextFillColor` after autofill.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getInputAutofillKeyframeStyles(theme: ExtendedTheme): {
|
|
11
|
+
'@keyframes m4lAutofillTextRepaint': {
|
|
12
|
+
'0%, 100%': {
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Nested selectors applied under `body` in `GlobalStyles` for native inputs/textareas:
|
|
19
|
+
* browser autofill overrides, optional Chromatic simulation, and consistent text selection.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getInputAutofillBodyNestedStyles(theme: ExtendedTheme): {
|
|
22
|
+
[x: string]: {
|
|
23
|
+
WebkitTextFillColor: string;
|
|
24
|
+
color: string;
|
|
25
|
+
caretColor: string;
|
|
26
|
+
} | {
|
|
27
|
+
filter: string;
|
|
28
|
+
boxShadow: string;
|
|
29
|
+
WebkitBoxShadow: string;
|
|
30
|
+
color: string;
|
|
31
|
+
caretColor: string;
|
|
32
|
+
transition: string;
|
|
33
|
+
WebkitTextFillColor?: undefined;
|
|
34
|
+
backgroundColor?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
WebkitTextFillColor: string;
|
|
37
|
+
color: string;
|
|
38
|
+
caretColor: string;
|
|
39
|
+
boxShadow: string;
|
|
40
|
+
WebkitBoxShadow: string;
|
|
41
|
+
transition: string;
|
|
42
|
+
filter?: undefined;
|
|
43
|
+
backgroundColor?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
color: string;
|
|
47
|
+
WebkitTextFillColor: string;
|
|
48
|
+
filter?: undefined;
|
|
49
|
+
boxShadow?: undefined;
|
|
50
|
+
WebkitBoxShadow?: undefined;
|
|
51
|
+
caretColor?: undefined;
|
|
52
|
+
transition?: undefined;
|
|
53
|
+
};
|
|
54
|
+
'& input:-moz-autofill, & input:-moz-autofill-preview, & textarea:-moz-autofill, & textarea:-moz-autofill-preview': {
|
|
55
|
+
filter: string;
|
|
56
|
+
boxShadow: string;
|
|
57
|
+
WebkitBoxShadow: string;
|
|
58
|
+
color: string;
|
|
59
|
+
caretColor: string;
|
|
60
|
+
transition: string;
|
|
61
|
+
};
|
|
62
|
+
'& input:autofill, & input:autofill:hover, & input:autofill:focus, & input:autofill:active, & textarea:autofill, & textarea:autofill:hover, & textarea:autofill:focus, & textarea:autofill:active': {
|
|
63
|
+
WebkitTextFillColor: string;
|
|
64
|
+
color: string;
|
|
65
|
+
caretColor: string;
|
|
66
|
+
boxShadow: string;
|
|
67
|
+
WebkitBoxShadow: string;
|
|
68
|
+
transition: string;
|
|
69
|
+
};
|
|
70
|
+
"& input[data-m4l-chromatic-autofill=\"true\"], & textarea[data-m4l-chromatic-autofill=\"true\"]": {
|
|
71
|
+
WebkitTextFillColor: string;
|
|
72
|
+
color: string;
|
|
73
|
+
caretColor: string;
|
|
74
|
+
WebkitBoxShadow: string;
|
|
75
|
+
boxShadow: string;
|
|
76
|
+
transition: string;
|
|
77
|
+
borderRadius: string;
|
|
78
|
+
animation: string;
|
|
79
|
+
};
|
|
80
|
+
"& input[data-m4l-chromatic-autofill=\"true\"]::first-line, & textarea[data-m4l-chromatic-autofill=\"true\"]::first-line": {
|
|
81
|
+
WebkitTextFillColor: string;
|
|
82
|
+
color: string;
|
|
83
|
+
caretColor: string;
|
|
84
|
+
};
|
|
85
|
+
'& input::selection, & textarea::selection': {
|
|
86
|
+
backgroundColor: string;
|
|
87
|
+
color: string;
|
|
88
|
+
WebkitTextFillColor: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=getInputAutofillGlobalStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInputAutofillGlobalStyles.d.ts","sourceRoot":"","sources":["../../../../../../packages/graphics/src/components/GlobalStyles/getInputAutofillGlobalStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AA0BpE;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,aAAa;;;;;;EAQlE;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DpE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const o = "data-m4l-chromatic-autofill", a = "background-color 5000s ease-in-out 0s", f = [
|
|
2
|
+
"& input:-webkit-autofill",
|
|
3
|
+
"& input:-webkit-autofill:hover",
|
|
4
|
+
"& input:-webkit-autofill:focus",
|
|
5
|
+
"& input:-webkit-autofill:active",
|
|
6
|
+
"& textarea:-webkit-autofill",
|
|
7
|
+
"& textarea:-webkit-autofill:hover",
|
|
8
|
+
"& textarea:-webkit-autofill:focus",
|
|
9
|
+
"& textarea:-webkit-autofill:active"
|
|
10
|
+
].join(", "), p = [
|
|
11
|
+
"& input:-webkit-autofill::first-line",
|
|
12
|
+
"& input:-webkit-autofill:hover::first-line",
|
|
13
|
+
"& input:-webkit-autofill:focus::first-line",
|
|
14
|
+
"& input:-webkit-autofill:active::first-line",
|
|
15
|
+
"& textarea:-webkit-autofill::first-line",
|
|
16
|
+
"& textarea:-webkit-autofill:hover::first-line",
|
|
17
|
+
"& textarea:-webkit-autofill:focus::first-line",
|
|
18
|
+
"& textarea:-webkit-autofill:active::first-line"
|
|
19
|
+
].join(", ");
|
|
20
|
+
function c(e) {
|
|
21
|
+
return {
|
|
22
|
+
"@keyframes m4lAutofillTextRepaint": {
|
|
23
|
+
"0%, 100%": {
|
|
24
|
+
color: e.vars.palette.text.primary
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function x(e) {
|
|
30
|
+
const t = e.vars.palette.text.primary, i = "#20202000", n = e.vars.size.borderRadius["r1-5"], l = {
|
|
31
|
+
WebkitTextFillColor: `${t} !important`,
|
|
32
|
+
color: `${t} !important`,
|
|
33
|
+
caretColor: t,
|
|
34
|
+
// Solid inset fill matches the app surface; `transparent` fails against Chrome's autofill paint.
|
|
35
|
+
WebkitBoxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
36
|
+
boxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
37
|
+
transition: a,
|
|
38
|
+
borderRadius: n,
|
|
39
|
+
animation: "m4lAutofillTextRepaint 0.0001s forwards"
|
|
40
|
+
}, u = `& input[${o}="true"], & textarea[${o}="true"]`, s = `& input[${o}="true"]::first-line, & textarea[${o}="true"]::first-line`, r = {
|
|
41
|
+
WebkitTextFillColor: `${t} !important`,
|
|
42
|
+
color: `${t} !important`,
|
|
43
|
+
caretColor: t
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
[f]: l,
|
|
47
|
+
[p]: r,
|
|
48
|
+
"& input:-moz-autofill, & input:-moz-autofill-preview, & textarea:-moz-autofill, & textarea:-moz-autofill-preview": {
|
|
49
|
+
filter: "none",
|
|
50
|
+
boxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
51
|
+
WebkitBoxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
52
|
+
color: `${t} !important`,
|
|
53
|
+
caretColor: t,
|
|
54
|
+
transition: a
|
|
55
|
+
},
|
|
56
|
+
"& input:autofill, & input:autofill:hover, & input:autofill:focus, & input:autofill:active, & textarea:autofill, & textarea:autofill:hover, & textarea:autofill:focus, & textarea:autofill:active": {
|
|
57
|
+
WebkitTextFillColor: `${t} !important`,
|
|
58
|
+
color: `${t} !important`,
|
|
59
|
+
caretColor: t,
|
|
60
|
+
boxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
61
|
+
WebkitBoxShadow: `0 0 0 1000px ${i} inset !important`,
|
|
62
|
+
transition: a
|
|
63
|
+
},
|
|
64
|
+
[u]: l,
|
|
65
|
+
[s]: r,
|
|
66
|
+
"& input::selection, & textarea::selection": {
|
|
67
|
+
backgroundColor: e.vars.palette.primary.selectedOpacity,
|
|
68
|
+
color: t,
|
|
69
|
+
WebkitTextFillColor: t
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
o as M4L_CHROMATIC_AUTOFILL,
|
|
75
|
+
x as getInputAutofillBodyNestedStyles,
|
|
76
|
+
c as getInputAutofillKeyframeStyles
|
|
77
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ExtendedTheme } from './getDateRangePickerPopupGlobalStyles';
|
|
2
|
+
/**
|
|
3
|
+
* Hybrid scrollbar styling for a **consistent gutter/thumb on Chromium/WebKit** (Chrome, Edge, Opera,
|
|
4
|
+
* Safari) via `::-webkit-scrollbar*` pseudo-elements, plus **Firefox-only** `scrollbar-color` /
|
|
5
|
+
* `scrollbar-width` inside `@supports (-moz-appearance: none)` so standard scrollbar properties never
|
|
6
|
+
* apply on Blink (mixing them with `::-webkit-scrollbar` breaks sizing).
|
|
7
|
+
*
|
|
8
|
+
* **Hide / reveal (WebKit):** The scrollbar gutter stays sized (`::-webkit-scrollbar` width/height).
|
|
9
|
+
* `--m4l-scrollbar-opacity` is `0` on `*` and `1` on `*:hover` / `*:focus-within`. The thumb uses
|
|
10
|
+
* `color-mix(in srgb, …)` with that variable so the thumb is fully transparent at `0` and uses the
|
|
11
|
+
* theme active color at `1`. This module does **not** add `@property`, `transition`, or
|
|
12
|
+
* `prefers-reduced-motion` rules; changes are effectively **instant** (a fade could be added by
|
|
13
|
+
* registering the custom property and transitioning it on `*`, but that is out of scope here).
|
|
14
|
+
*
|
|
15
|
+
* **Geometry (tokens):** `baseSpacings['sp1-5']` (thumb column), `sp0-5` (inset via transparent
|
|
16
|
+
* thumb border), `borderRadius['r1']`. Gutter = `calc(sp1-5 + sp0-5 + sp0-5)` on WebKit when
|
|
17
|
+
* visible. Firefox uses `scrollbar-width: none` by default and **`auto`** (platform default width)
|
|
18
|
+
* plus `scrollbar-color` when the container is hovered or has `:focus-within`; thumb radius is not
|
|
19
|
+
* controllable there.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getScrollbarHoverRevealGlobalStyles(theme: ExtendedTheme): {
|
|
22
|
+
'*': {
|
|
23
|
+
'--m4l-scrollbar-opacity': number;
|
|
24
|
+
};
|
|
25
|
+
'*:hover, *:focus-within': {
|
|
26
|
+
'--m4l-scrollbar-opacity': number;
|
|
27
|
+
};
|
|
28
|
+
'@supports (-moz-appearance: none)': {
|
|
29
|
+
'*': {
|
|
30
|
+
scrollbarWidth: string;
|
|
31
|
+
scrollbarColor: string;
|
|
32
|
+
};
|
|
33
|
+
'*:hover, *:focus-within': {
|
|
34
|
+
scrollbarWidth: string;
|
|
35
|
+
scrollbarColor: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
'*::-webkit-scrollbar': {
|
|
39
|
+
width: string;
|
|
40
|
+
height: string;
|
|
41
|
+
};
|
|
42
|
+
'*::-webkit-scrollbar-track': {
|
|
43
|
+
backgroundColor: string;
|
|
44
|
+
};
|
|
45
|
+
'*::-webkit-scrollbar-thumb': {
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
backgroundClip: string;
|
|
48
|
+
border: string;
|
|
49
|
+
borderRadius: string;
|
|
50
|
+
WebkitBorderRadius: string;
|
|
51
|
+
};
|
|
52
|
+
'*::-webkit-scrollbar-corner': {
|
|
53
|
+
backgroundColor: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=getScrollbarHoverRevealGlobalStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getScrollbarHoverRevealGlobalStyles.d.ts","sourceRoot":"","sources":["../../../../../../packages/graphics/src/components/GlobalStyles/getScrollbarHoverRevealGlobalStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDvE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function b(r) {
|
|
2
|
+
const a = `${r.vars.palette.default.active}`, o = "transparent", c = r.vars.size.baseSpacings["sp1-5"], t = r.vars.size.baseSpacings["sp0-5"], s = r.vars.size.borderRadius.r1, l = `calc(${c} + ${t} + ${t})`, i = `color-mix(in srgb, ${a} calc(var(--m4l-scrollbar-opacity, 0) * 100%), transparent)`;
|
|
3
|
+
return {
|
|
4
|
+
// Drive opacity from the scroll container; pseudos inherit the computed value via color-mix.
|
|
5
|
+
"*": {
|
|
6
|
+
"--m4l-scrollbar-opacity": 0
|
|
7
|
+
},
|
|
8
|
+
"*:hover, *:focus-within": {
|
|
9
|
+
"--m4l-scrollbar-opacity": 1
|
|
10
|
+
},
|
|
11
|
+
// Firefox — do not expose scrollbar-* on global `*` outside this block (avoids Chromium conflicts).
|
|
12
|
+
"@supports (-moz-appearance: none)": {
|
|
13
|
+
"*": {
|
|
14
|
+
scrollbarWidth: "none",
|
|
15
|
+
scrollbarColor: `${a} ${o}`
|
|
16
|
+
},
|
|
17
|
+
"*:hover, *:focus-within": {
|
|
18
|
+
scrollbarWidth: "auto",
|
|
19
|
+
scrollbarColor: `${a} ${o}`
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
// WebKit / Blink — fixed gutter; thumb alpha follows --m4l-scrollbar-opacity (see file doc).
|
|
23
|
+
"*::-webkit-scrollbar": {
|
|
24
|
+
width: `${l} !important`,
|
|
25
|
+
height: `${l} !important`
|
|
26
|
+
},
|
|
27
|
+
"*::-webkit-scrollbar-track": {
|
|
28
|
+
backgroundColor: o
|
|
29
|
+
},
|
|
30
|
+
"*::-webkit-scrollbar-thumb": {
|
|
31
|
+
backgroundColor: i,
|
|
32
|
+
backgroundClip: "padding-box",
|
|
33
|
+
border: `${t} solid transparent`,
|
|
34
|
+
borderRadius: s,
|
|
35
|
+
WebkitBorderRadius: s
|
|
36
|
+
},
|
|
37
|
+
"*::-webkit-scrollbar-corner": {
|
|
38
|
+
backgroundColor: o
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
b as getScrollbarHoverRevealGlobalStyles
|
|
44
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/graphics/src/components/GlobalStyles/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/graphics/src/components/GlobalStyles/index.tsx"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAgB,YAAY,qDAwF3B"}
|
|
@@ -1,75 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTheme as
|
|
1
|
+
import { jsx as t, Fragment as r } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useTheme as a } from "@mui/material/styles";
|
|
3
3
|
import { GlobalStyles as i } from "@mui/material";
|
|
4
|
-
import { globalRemSize as
|
|
4
|
+
import { globalRemSize as o } from "@m4l/styles";
|
|
5
5
|
import { getDateRangePickerPopupGlobalStyles as n } from "./getDateRangePickerPopupGlobalStyles.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { getScrollbarHoverRevealGlobalStyles as l } from "./getScrollbarHoverRevealGlobalStyles.js";
|
|
7
|
+
import { getInputAutofillBodyNestedStyles as p, getInputAutofillKeyframeStyles as s } from "./getInputAutofillGlobalStyles.js";
|
|
8
|
+
function x() {
|
|
9
|
+
const e = a();
|
|
10
|
+
return /* @__PURE__ */ t(r, { children: /* @__PURE__ */ t(
|
|
9
11
|
i,
|
|
10
12
|
{
|
|
11
13
|
styles: {
|
|
12
|
-
...n(
|
|
14
|
+
...n(e),
|
|
15
|
+
...l(e),
|
|
16
|
+
...s(e),
|
|
13
17
|
// box-sizing is not inherited; apply to all elements so layout matches previous CssBaseline-like behavior
|
|
14
18
|
"*, *::before, *::after": {
|
|
15
19
|
boxSizing: "border-box"
|
|
16
20
|
},
|
|
17
21
|
body: {
|
|
22
|
+
...p(e),
|
|
18
23
|
fontFamily: 'Inter, "Segoe UI", Roboto, "Helvetica Neue", sans-serif, Open Sans',
|
|
19
|
-
fontSize:
|
|
20
|
-
lineHeight:
|
|
21
|
-
color:
|
|
24
|
+
fontSize: e.typography.body1.fontSize,
|
|
25
|
+
lineHeight: e.typography.body1.lineHeight,
|
|
26
|
+
color: e.vars.palette.text.primary,
|
|
22
27
|
textRendering: "geometricPrecision",
|
|
23
28
|
width: "100%",
|
|
24
29
|
height: "100vh",
|
|
25
|
-
backgroundColor:
|
|
26
|
-
// Autofill: transparent background so it blends with wrapper (Chrome/Safari/Firefox)
|
|
27
|
-
"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus, & input:-webkit-autofill:active": {
|
|
28
|
-
WebkitTextFillColor: `${t.vars.palette.text.primary} !important`,
|
|
29
|
-
color: `${t.vars.palette.text.primary} !important`,
|
|
30
|
-
WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
|
|
31
|
-
boxShadow: "0 0 0 1000px transparent inset !important",
|
|
32
|
-
transition: "background-color 5000s ease-in-out 0s",
|
|
33
|
-
borderRadius: t.vars.size.borderRadius["r1-5"],
|
|
34
|
-
animation: "autofillTextRepaint 0.0001s forwards"
|
|
35
|
-
},
|
|
36
|
-
// Firefox: transparent so wrapper background shows through
|
|
37
|
-
"& input:-moz-autofill, & input:-moz-autofill-preview": {
|
|
38
|
-
filter: "none",
|
|
39
|
-
boxShadow: "0 0 0 1000px transparent inset !important",
|
|
40
|
-
WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
|
|
41
|
-
color: `${t.vars.palette.text.primary} !important`,
|
|
42
|
-
transition: "background-color 5000s ease-in-out 0s"
|
|
43
|
-
},
|
|
44
|
-
// Standard :autofill – transparent
|
|
45
|
-
"& input:autofill, & input:autofill:hover, & input:autofill:focus, & input:autofill:active": {
|
|
46
|
-
WebkitTextFillColor: `${t.vars.palette.text.primary} !important`,
|
|
47
|
-
color: `${t.vars.palette.text.primary} !important`,
|
|
48
|
-
boxShadow: "0 0 0 1000px transparent inset !important",
|
|
49
|
-
WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
|
|
50
|
-
transition: "background-color 5000s ease-in-out 0s"
|
|
51
|
-
},
|
|
30
|
+
backgroundColor: e.vars.palette.background.default,
|
|
52
31
|
".rs-drawer .rs-drawer-dialog": {
|
|
53
32
|
backgroundColor: "transparent!important"
|
|
54
33
|
},
|
|
55
34
|
".rs-picker-popup": {
|
|
56
|
-
zIndex:
|
|
35
|
+
zIndex: e.vars.zIndex.modal || 1300
|
|
57
36
|
},
|
|
58
37
|
"#rootIsolation": {
|
|
59
38
|
width: "100vw",
|
|
60
39
|
height: "100vh"
|
|
61
40
|
},
|
|
62
|
-
"*::-webkit-scrollbar": {
|
|
63
|
-
width: `${t.vars.size.baseSpacings.sp1}!important`,
|
|
64
|
-
height: `${t.vars.size.baseSpacings.sp1}!important`
|
|
65
|
-
},
|
|
66
|
-
"*::-webkit-scrollbar-track": {
|
|
67
|
-
backgroundColor: "transparent"
|
|
68
|
-
},
|
|
69
|
-
"*::-webkit-scrollbar-thumb": {
|
|
70
|
-
backgroundColor: `${t.vars.palette.default.focusOpacity}!important`,
|
|
71
|
-
borderRadius: `${t.vars.size.borderRadius["r0-5"]}!important`
|
|
72
|
-
},
|
|
73
41
|
"& #root": {
|
|
74
42
|
width: "100%",
|
|
75
43
|
height: "100%"
|
|
@@ -83,9 +51,9 @@ function d() {
|
|
|
83
51
|
height: 2,
|
|
84
52
|
width: "100%",
|
|
85
53
|
position: "fixed",
|
|
86
|
-
zIndex:
|
|
87
|
-
backgroundColor:
|
|
88
|
-
boxShadow: `0 0 2px ${
|
|
54
|
+
zIndex: e.zIndex.snackbar,
|
|
55
|
+
backgroundColor: e.vars.palette.primary.main,
|
|
56
|
+
boxShadow: `0 0 2px ${e.vars.palette.primary.main}`
|
|
89
57
|
},
|
|
90
58
|
"& .peg": {
|
|
91
59
|
right: 0,
|
|
@@ -95,13 +63,13 @@ function d() {
|
|
|
95
63
|
display: "block",
|
|
96
64
|
position: "absolute",
|
|
97
65
|
transform: "rotate(3deg) translate(0px, -4px)",
|
|
98
|
-
boxShadow: `0 0 10px ${
|
|
66
|
+
boxShadow: `0 0 10px ${e.vars.palette.primary.main}, 0 0 5px ${e.vars.palette.primary.main}`
|
|
99
67
|
}
|
|
100
68
|
},
|
|
101
69
|
"& html": {
|
|
102
|
-
fontSize:
|
|
103
|
-
[
|
|
104
|
-
fontSize:
|
|
70
|
+
fontSize: o.desktop,
|
|
71
|
+
[e.breakpoints.down("sm")]: {
|
|
72
|
+
fontSize: o.mobile
|
|
105
73
|
}
|
|
106
74
|
},
|
|
107
75
|
// Global styles for native tags html
|
|
@@ -117,5 +85,5 @@ function d() {
|
|
|
117
85
|
) });
|
|
118
86
|
}
|
|
119
87
|
export {
|
|
120
|
-
|
|
88
|
+
x as GlobalStyles
|
|
121
89
|
};
|
package/components/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/graphics/src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/graphics/src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,6CAA6C,CAAC"}
|
|
@@ -24,7 +24,7 @@ function F(c) {
|
|
|
24
24
|
return r.components = i(r), r;
|
|
25
25
|
}, [m]);
|
|
26
26
|
return /* @__PURE__ */ l(v, { theme: h, defaultMode: e.palette.mode, children: [
|
|
27
|
-
s ? /* @__PURE__ */ t(u, {})
|
|
27
|
+
s ? null : /* @__PURE__ */ t(u, {}),
|
|
28
28
|
/* @__PURE__ */ t(
|
|
29
29
|
T.Provider,
|
|
30
30
|
{
|
|
@@ -33,7 +33,7 @@ function F(c) {
|
|
|
33
33
|
fnComponentsOverrides: i
|
|
34
34
|
},
|
|
35
35
|
children: /* @__PURE__ */ l(C, { injectFirst: !0, children: [
|
|
36
|
-
s ? /* @__PURE__ */ t(f, { enableColorScheme: !0 })
|
|
36
|
+
s ? null : /* @__PURE__ */ t(f, { enableColorScheme: !0 }),
|
|
37
37
|
d
|
|
38
38
|
] })
|
|
39
39
|
}
|
package/index.js
CHANGED
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import { GlobalStyles as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
1
|
+
import { GlobalStyles as t } from "./components/GlobalStyles/index.js";
|
|
2
|
+
import { M4L_CHROMATIC_AUTOFILL as p, getInputAutofillBodyNestedStyles as m, getInputAutofillKeyframeStyles as n } from "./components/GlobalStyles/getInputAutofillGlobalStyles.js";
|
|
3
|
+
import { getLocaleFromNetwork as x } from "./contexts/LocalesContext/helper.js";
|
|
4
|
+
import { FormatterContext as i, FormatterProvider as a } from "./contexts/FormatterContext/index.js";
|
|
5
|
+
import { AppearanceComponentContext as u, AppearanceComponentProvider as S } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
6
|
+
import { createAppearanceComponentStore as T } from "./contexts/AppearanceComponentContext/AppearanceComponentStore.js";
|
|
7
|
+
import { useAppearanceComponentStore as A } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
8
|
+
import { LocalesContext as d, LocalesProvider as h } from "./contexts/LocalesContext/index.js";
|
|
9
|
+
import { ResponsiveContainerContext as y, ResponsiveContainerProvider as R } from "./contexts/ResponsiveContainerContext/index.js";
|
|
10
|
+
import { HostThemeContext as P, HostThemeProvider as F } from "./contexts/HostThemeContext/index.js";
|
|
11
|
+
import { DeviceTypeContext as b, DeviceTypeProvider as M } from "./contexts/DeviceTypeContext/index.js";
|
|
12
|
+
import { KEY_LOCAL_STORAGE_THEME_SETTINGS as E, defaultThemeSettings as O } from "./contexts/ThemeSettingsContext/constants.js";
|
|
13
|
+
import { ThemeSettingsContext as H, ThemeSettingsProvider as W } from "./contexts/ThemeSettingsContext/ThemeSettingsContext.js";
|
|
14
|
+
import { WithAppearanceContext as z } from "./decorators/WithAppearanceContext/WithAppearanceContext.js";
|
|
15
|
+
import { MFIsolationAppStorybook as G } from "./decorators/MFIsolationAppStorybook/MFIsolationAppStorybook.js";
|
|
16
|
+
import { MFAppStorybook as K } from "./decorators/MFIsolationAppStorybook/subcomponents/MFAppStorybook/MFAppStorybook.js";
|
|
17
|
+
import { WithStorybookThemeContext as B, createWithStorybookThemeContext as Y } from "./decorators/WithStorybookThemeContext/WithStorybookThemeContext.js";
|
|
18
|
+
import { useFirstRender as q } from "./hooks/useFirstRender/index.js";
|
|
19
|
+
import { useComponentSize as Q } from "./hooks/useComponentSize/useComponentSize.js";
|
|
20
|
+
import { useFormatter as X } from "./hooks/useFormatter/index.js";
|
|
21
|
+
import { useIsMountedRef as $ } from "./hooks/useIsMountedRef/index.js";
|
|
22
|
+
import { useLocales as oe } from "./hooks/useLocales/index.js";
|
|
23
|
+
import { useResponsiveContainerStore as re } from "./hooks/useResponsiveContainer/index.js";
|
|
24
|
+
import { useUserAgent as me } from "./hooks/useUserAgent/index.js";
|
|
25
|
+
import { useIsMobile as se } from "./hooks/useIsMobile/index.js";
|
|
26
|
+
import { useOffSetTop as fe } from "./hooks/useOffSetTop.js";
|
|
27
|
+
import { useHostTheme as ae } from "./hooks/useHostTheme/index.js";
|
|
28
|
+
import { useResizeObserver as ue } from "./hooks/useResizeObserver/index.js";
|
|
29
|
+
import { useResponsiveDesktop as le } from "./hooks/useResponsive/index.js";
|
|
30
|
+
import { useThemeSettingsStore as ce } from "./hooks/useThemSettingsStore/index.js";
|
|
31
|
+
import { usePaginate as ve } from "./hooks/usePaginate/index.js";
|
|
32
|
+
import { useRows as he } from "./hooks/useRows/index.js";
|
|
33
|
+
import { capitalize as ye } from "./utils/strings.js";
|
|
34
|
+
import { getAnchorElPositionWindow as Le } from "./utils/anchorEl.js";
|
|
35
|
+
import { getContrastTextColor as Fe } from "./utils/getContrastTextColor/getContrastTextColor.js";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
u as AppearanceComponentContext,
|
|
38
|
+
S as AppearanceComponentProvider,
|
|
38
39
|
b as DeviceTypeContext,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
H as
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
40
|
+
M as DeviceTypeProvider,
|
|
41
|
+
i as FormatterContext,
|
|
42
|
+
a as FormatterProvider,
|
|
43
|
+
t as GlobalStyles,
|
|
44
|
+
P as HostThemeContext,
|
|
45
|
+
F as HostThemeProvider,
|
|
46
|
+
E as KEY_LOCAL_STORAGE_THEME_SETTINGS,
|
|
47
|
+
d as LocalesContext,
|
|
48
|
+
h as LocalesProvider,
|
|
49
|
+
p as M4L_CHROMATIC_AUTOFILL,
|
|
50
|
+
K as MFAppStorybook,
|
|
51
|
+
G as MFIsolationAppStorybook,
|
|
52
|
+
y as ResponsiveContainerContext,
|
|
53
|
+
R as ResponsiveContainerProvider,
|
|
54
|
+
H as ThemeSettingsContext,
|
|
55
|
+
W as ThemeSettingsProvider,
|
|
56
|
+
z as WithAppearanceContext,
|
|
57
|
+
B as WithStorybookThemeContext,
|
|
58
|
+
ye as capitalize,
|
|
59
|
+
T as createAppearanceComponentStore,
|
|
60
|
+
Y as createWithStorybookThemeContext,
|
|
61
|
+
O as defaultThemeSettings,
|
|
62
|
+
Le as getAnchorElPositionWindow,
|
|
63
|
+
Fe as getContrastTextColor,
|
|
64
|
+
m as getInputAutofillBodyNestedStyles,
|
|
65
|
+
n as getInputAutofillKeyframeStyles,
|
|
66
|
+
x as getLocaleFromNetwork,
|
|
67
|
+
A as useAppearanceComponentStore,
|
|
68
|
+
Q as useComponentSize,
|
|
69
|
+
q as useFirstRender,
|
|
70
|
+
X as useFormatter,
|
|
71
|
+
ae as useHostTheme,
|
|
72
|
+
se as useIsMobile,
|
|
73
|
+
$ as useIsMountedRef,
|
|
74
|
+
oe as useLocales,
|
|
75
|
+
fe as useOffSetTop,
|
|
76
|
+
ve as usePaginate,
|
|
77
|
+
ue as useResizeObserver,
|
|
78
|
+
re as useResponsiveContainerStore,
|
|
79
|
+
le as useResponsiveDesktop,
|
|
80
|
+
he as useRows,
|
|
81
|
+
ce as useThemeSettingsStore,
|
|
82
|
+
me as useUserAgent
|
|
79
83
|
};
|
package/package.json
CHANGED
package/test/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=setup.d.ts.map
|
package/test/setup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../../packages/graphics/src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
package/test/utils.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { cleanup, screen, renderHook } from '@testing-library/react';
|
|
2
|
-
import { default as React, act } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* customRender
|
|
5
|
-
*/
|
|
6
|
-
declare const customRender: (ui: React.ReactElement, options?: {}) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
7
|
-
export { default as userEvent } from '@testing-library/user-event';
|
|
8
|
-
export { customRender as render, renderHook, screen, cleanup, act };
|
|
9
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/test/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/graphics/src/test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAgC,MAAM,wBAAwB,CAAC;AAClF,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAWnC;;GAEG;AACH,QAAA,MAAM,YAAY,GAAI,IAAI,KAAK,CAAC,YAAY,EAAE,YAAY,iIASzD,CAAC;AACF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC"}
|