@m4l/graphics 0.1.28 → 0.1.30

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.
Files changed (70) hide show
  1. package/contexts/HostThemeContext/index.9fe9854f.js +50 -0
  2. package/contexts/{index.2f4a4040.js → index.8c4de295.js} +1 -1
  3. package/hooks/index.64cf4fc4.js +34 -0
  4. package/hooks/index.d.ts +1 -1
  5. package/hooks/useHostTheme/index.d.ts +1 -1
  6. package/index.d.ts +1 -14
  7. package/index.js +38 -41
  8. package/package.json +2 -3
  9. package/utils/getColorPresets.d.ts +1 -1
  10. package/utils/index.22212127.js +113 -0
  11. package/utils/index.d.ts +3 -0
  12. package/{theme/palette.2baf72f5.js → vendor.158914a7.js} +20 -11
  13. package/contexts/HostThemeContext/index.a6a62c70.js +0 -50
  14. package/hooks/index.c13bc37e.js +0 -27
  15. package/hooks/useHostTheme/index.1c8e4ad7.js +0 -11
  16. package/m4l-graphics-0.1.28.tgz +0 -0
  17. package/theme/breakpoints.d.ts +0 -10
  18. package/theme/defaultThemeOptions.b2cdbe59.js +0 -36
  19. package/theme/defaultThemeOptions.d.ts +0 -2
  20. package/theme/overrides/Accordion.d.ts +0 -861
  21. package/theme/overrides/Autocomplete.d.ts +0 -26
  22. package/theme/overrides/Avatar.d.ts +0 -24
  23. package/theme/overrides/Backdrop.d.ts +0 -13
  24. package/theme/overrides/Badge.d.ts +0 -12
  25. package/theme/overrides/Breadcrumbs.d.ts +0 -11
  26. package/theme/overrides/Button.d.ts +0 -52
  27. package/theme/overrides/ButtonGroup.d.ts +0 -39
  28. package/theme/overrides/Card.d.ts +0 -36
  29. package/theme/overrides/Checkbox.d.ts +0 -18
  30. package/theme/overrides/ControlLabel.d.ts +0 -813
  31. package/theme/overrides/CssBaseline.d.ts +0 -42
  32. package/theme/overrides/DataGrid.d.ts +0 -1670
  33. package/theme/overrides/Dialog.d.ts +0 -55
  34. package/theme/overrides/Drawer.d.ts +0 -17
  35. package/theme/overrides/Fab.d.ts +0 -34
  36. package/theme/overrides/IconButton.d.ts +0 -23
  37. package/theme/overrides/Input.d.ts +0 -1661
  38. package/theme/overrides/InputLabel.d.ts +0 -14
  39. package/theme/overrides/Link.d.ts +0 -15
  40. package/theme/overrides/List.d.ts +0 -32
  41. package/theme/overrides/LoadingButton.d.ts +0 -811
  42. package/theme/overrides/Menu.d.ts +0 -15
  43. package/theme/overrides/Pagination.d.ts +0 -30
  44. package/theme/overrides/Paper.d.ts +0 -22
  45. package/theme/overrides/Popover.d.ts +0 -11
  46. package/theme/overrides/Progress.d.ts +0 -20
  47. package/theme/overrides/Radio.d.ts +0 -16
  48. package/theme/overrides/Skeleton.d.ts +0 -13
  49. package/theme/overrides/Slider.d.ts +0 -23
  50. package/theme/overrides/Stepper.d.ts +0 -10
  51. package/theme/overrides/SvgIcon.d.ts +0 -17
  52. package/theme/overrides/Switch.d.ts +0 -28
  53. package/theme/overrides/Table.d.ts +0 -3238
  54. package/theme/overrides/Tabs.d.ts +0 -845
  55. package/theme/overrides/Timeline.d.ts +0 -17
  56. package/theme/overrides/ToggleButton.d.ts +0 -43
  57. package/theme/overrides/Tooltip.d.ts +0 -13
  58. package/theme/overrides/Typography.d.ts +0 -13
  59. package/theme/overrides/index.d.ts +0 -2
  60. package/theme/overrides.7958c0ab.js +0 -1299
  61. package/theme/palette.d.ts +0 -323
  62. package/theme/shadows.bf8dc290.js +0 -61
  63. package/theme/shadows.d.ts +0 -67
  64. package/theme/stretch.d.ts +0 -9
  65. package/theme/typography.63fff3ec.js +0 -88
  66. package/theme/typography.d.ts +0 -132
  67. package/types/index.d.ts +0 -7
  68. package/utils/anchorEl.d.ts +0 -13
  69. package/utils/index.7ab4fc54.js +0 -159
  70. package/vendor.3b4b3674.js +0 -27
@@ -1,159 +0,0 @@
1
- import { useTheme as k } from "@mui/material/styles";
2
- import { u as A } from "../hooks/useResponsive/index.fc5e1b4f.js";
3
- import { p as d } from "../theme/palette.2baf72f5.js";
4
- function C(e) {
5
- return Math.round(parseFloat(e) * 16);
6
- }
7
- function u(e) {
8
- return `${e / 16}rem`;
9
- }
10
- function W({ sm: e, md: t, lg: o }) {
11
- return {
12
- "@media (min-width:600px)": {
13
- fontSize: u(e)
14
- },
15
- "@media (min-width:900px)": {
16
- fontSize: u(t)
17
- },
18
- "@media (min-width:1200px)": {
19
- fontSize: u(o)
20
- }
21
- };
22
- }
23
- function E() {
24
- return [...k().breakpoints.keys].reverse().reduce((o, n) => {
25
- const r = A("up", n);
26
- return !o && r ? n : o;
27
- }, null) || "xs";
28
- }
29
- function v(e) {
30
- const t = k(), o = E(), n = t.breakpoints.up(o === "xl" ? "lg" : o), h = (e === "h1" || e === "h2" || e === "h3" || e === "h4" || e === "h5" || e === "h6") && t.typography[e][n] ? t.typography[e][n] : t.typography[e], f = C(h.fontSize), a = Number(t.typography[e].lineHeight) * f, { fontWeight: s, letterSpacing: i } = t.typography[e];
31
- return { fontSize: f, lineHeight: a, fontWeight: s, letterSpacing: i };
32
- }
33
- const l = [
34
- {
35
- name: "default",
36
- ...d.light.primary,
37
- LightSelected: "#EBF9F1",
38
- LightSelectedHover: "#D6F2E3",
39
- DarkSelected: "#142827",
40
- DarkSelectedHover: "#12342B"
41
- },
42
- {
43
- name: "purple",
44
- lighter: "#EBD6FD",
45
- light: "#B985F4",
46
- main: "#7635dc",
47
- dark: "#431A9E",
48
- darker: "#200A69",
49
- contrastText: "#fff"
50
- },
51
- {
52
- name: "cyan",
53
- lighter: "#D1FFFC",
54
- light: "#76F2FF",
55
- main: "#1CCAFF",
56
- dark: "#0E77B7",
57
- darker: "#053D7A",
58
- contrastText: d.light.grey[800]
59
- },
60
- {
61
- name: "blue",
62
- lighter: "#D1E9FC",
63
- light: "#76B0F1",
64
- main: "#2065D1",
65
- dark: "#103996",
66
- darker: "#061B64",
67
- contrastText: "#fff"
68
- },
69
- {
70
- name: "orange",
71
- lighter: "#FEF4D4",
72
- light: "#FED680",
73
- main: "#fda92d",
74
- dark: "#B66816",
75
- darker: "#793908",
76
- contrastText: d.light.grey[800]
77
- },
78
- {
79
- name: "red",
80
- lighter: "#FFE3D5",
81
- light: "#FFC1AC",
82
- main: "#FF3030",
83
- dark: "#B71833",
84
- darker: "#7A0930",
85
- contrastText: "#fff"
86
- }
87
- ], B = l[0], D = l[1], S = l[2], P = l[3], T = l[4], z = l[5];
88
- function I(e) {
89
- return {
90
- purple: D,
91
- cyan: S,
92
- blue: P,
93
- orange: T,
94
- red: z,
95
- default: B
96
- }[e];
97
- }
98
- const N = (e) => e && e[0].toUpperCase() + e.slice(1) || "";
99
- function b(e, t) {
100
- let o = 0;
101
- return typeof t == "number" ? o = t : t === "center" ? o = e.height / 2 : t === "bottom" && (o = e.height), o;
102
- }
103
- function x(e, t) {
104
- let o = 0;
105
- return typeof t == "number" ? o = t : t === "center" ? o = e.width / 2 : t === "right" && (o = e.width), o;
106
- }
107
- function w(e) {
108
- return typeof e == "function" ? e() : e;
109
- }
110
- const O = (e, t) => {
111
- const n = w(e).getBoundingClientRect();
112
- return {
113
- top: n.top + b(n, t.vertical),
114
- left: n.left + x(n, t.horizontal)
115
- };
116
- }, H = (e, t) => ({
117
- vertical: b(e, t.vertical),
118
- horizontal: x(e, t.horizontal)
119
- }), U = (e, t, o, n, r = 16) => {
120
- const h = O(e, o);
121
- console.log("anchoEl", h);
122
- const f = H(t, n);
123
- console.log("elemTransformOrigin", f);
124
- const a = document.getElementById("ContainerAreas")?.getBoundingClientRect() || {
125
- top: 0,
126
- left: 0
127
- };
128
- console.log("getAnchorOffset-container", a);
129
- let s = h.top - f.vertical, i = h.left - f.horizontal;
130
- const g = s + t.height, m = i + t.width, F = window, p = F.innerHeight - r, y = F.innerWidth - r;
131
- if (console.log("Final top,bottom,heightThreshold", s, g, p), s < r) {
132
- const c = s - r;
133
- s -= c;
134
- } else if (g > p) {
135
- const c = g - p;
136
- s -= c;
137
- }
138
- if (i < r) {
139
- const c = i - r;
140
- i -= c;
141
- } else if (m > y) {
142
- const c = m - y;
143
- i -= c;
144
- }
145
- return {
146
- top: Math.round(s) - a.top,
147
- left: Math.round(i) - a.left
148
- };
149
- };
150
- export {
151
- N as C,
152
- v as a,
153
- U as b,
154
- l as c,
155
- B as d,
156
- I as g,
157
- u as p,
158
- W as r
159
- };
@@ -1,27 +0,0 @@
1
- import "./components/ProgressBarStyle/index.fb6fd9ed.js";
2
- import "./contexts/FormatterContext/index.92336f4c.js";
3
- import "./contexts/LocalesContext/index.5b555637.js";
4
- import "./contexts/HostThemeContext/index.a6a62c70.js";
5
- import "./hooks/useFirstRender/index.1e9b02fb.js";
6
- import "./hooks/useFormatter/index.57ac8cca.js";
7
- import "./hooks/useHostTheme/index.1c8e4ad7.js";
8
- import "./hooks/index.c13bc37e.js";
9
- import "./hooks/useLocales/index.f676279e.js";
10
- import "./hooks/useResponsive/index.fc5e1b4f.js";
11
- import "./theme/defaultThemeOptions.b2cdbe59.js";
12
- import "./theme/shadows.bf8dc290.js";
13
- import "./theme/palette.2baf72f5.js";
14
- import "./utils/index.7ab4fc54.js";
15
- import "./theme/overrides.7958c0ab.js";
16
- const g = {
17
- values: {
18
- xs: 0,
19
- sm: 600,
20
- md: 900,
21
- lg: 1200,
22
- xl: 1536
23
- }
24
- };
25
- export {
26
- g as b
27
- };