@m4l/graphics 0.0.25 → 0.0.28

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.
@@ -6,9 +6,12 @@ import "../contexts/HostThemeContext/index.js";
6
6
  import "react-hook-form";
7
7
  function useIsMountedRef() {
8
8
  const isMounted = useRef(true);
9
- useEffect(() => () => {
10
- isMounted.current = false;
11
- }, []);
9
+ useEffect(
10
+ () => () => {
11
+ isMounted.current = false;
12
+ },
13
+ []
14
+ );
12
15
  return isMounted;
13
16
  }
14
17
  function useOffSetTop(top) {
@@ -2,13 +2,17 @@ var invariant = function(condition, format, a, b, c, d, e, f) {
2
2
  if (!condition) {
3
3
  var error;
4
4
  if (format === void 0) {
5
- error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
5
+ error = new Error(
6
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
7
+ );
6
8
  } else {
7
9
  var args = [a, b, c, d, e, f];
8
10
  var argIndex = 0;
9
- error = new Error(format.replace(/%s/g, function() {
10
- return args[argIndex++];
11
- }));
11
+ error = new Error(
12
+ format.replace(/%s/g, function() {
13
+ return args[argIndex++];
14
+ })
15
+ );
12
16
  error.name = "Invariant Violation";
13
17
  }
14
18
  error.framesToPop = 1;
@@ -22,7 +22,7 @@ function c(t2, e) {
22
22
  }, c(t2, e);
23
23
  }
24
24
  function u(t2, e) {
25
- if (t2 == null)
25
+ if (null == t2)
26
26
  return {};
27
27
  var r2, n, i = {}, o = Object.keys(t2);
28
28
  for (n = 0; n < o.length; n++)
@@ -53,7 +53,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
53
53
  };
54
54
  }, v = function(t2, e) {
55
55
  return e.filter(function(e2) {
56
- return e2[t2] !== void 0;
56
+ return void 0 !== e2[t2];
57
57
  }).map(function(e2) {
58
58
  return e2[t2];
59
59
  }).reduce(function(t3, e2) {
@@ -61,14 +61,14 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
61
61
  }, {});
62
62
  }, A = function(t2, e) {
63
63
  return e.filter(function(t3) {
64
- return t3[l.BASE] !== void 0;
64
+ return void 0 !== t3[l.BASE];
65
65
  }).map(function(t3) {
66
66
  return t3[l.BASE];
67
67
  }).reverse().reduce(function(e2, r2) {
68
68
  if (!e2.length)
69
69
  for (var n = Object.keys(r2), i = 0; i < n.length; i += 1) {
70
70
  var o = n[i].toLowerCase();
71
- if (t2.indexOf(o) !== -1 && r2[o])
71
+ if (-1 !== t2.indexOf(o) && r2[o])
72
72
  return e2.concat(r2);
73
73
  }
74
74
  return e2;
@@ -76,7 +76,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
76
76
  }, C = function(t2, e, r2) {
77
77
  var n = {};
78
78
  return r2.filter(function(e2) {
79
- return !!Array.isArray(e2[t2]) || (e2[t2] !== void 0 && console && typeof console.warn == "function" && console.warn("Helmet: " + t2 + ' should be of type "Array". Instead found type "' + typeof e2[t2] + '"'), false);
79
+ return !!Array.isArray(e2[t2]) || (void 0 !== e2[t2] && console && "function" == typeof console.warn && console.warn("Helmet: " + t2 + ' should be of type "Array". Instead found type "' + typeof e2[t2] + '"'), false);
80
80
  }).map(function(e2) {
81
81
  return e2[t2];
82
82
  }).reverse().reduce(function(t3, r3) {
@@ -84,7 +84,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
84
84
  r3.filter(function(t4) {
85
85
  for (var r4, o2 = Object.keys(t4), a2 = 0; a2 < o2.length; a2 += 1) {
86
86
  var s3 = o2[a2], c3 = s3.toLowerCase();
87
- e.indexOf(c3) === -1 || r4 === "rel" && t4[r4].toLowerCase() === "canonical" || c3 === "rel" && t4[c3].toLowerCase() === "stylesheet" || (r4 = c3), e.indexOf(s3) === -1 || s3 !== "innerHTML" && s3 !== "cssText" && s3 !== "itemprop" || (r4 = s3);
87
+ -1 === e.indexOf(c3) || "rel" === r4 && "canonical" === t4[r4].toLowerCase() || "rel" === c3 && "stylesheet" === t4[c3].toLowerCase() || (r4 = c3), -1 === e.indexOf(s3) || "innerHTML" !== s3 && "cssText" !== s3 && "itemprop" !== s3 || (r4 = s3);
88
88
  }
89
89
  if (!r4 || !t4[r4])
90
90
  return false;
@@ -121,14 +121,14 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
121
121
  var r2;
122
122
  return a({}, t2, ((r2 = {})[e] = void 0, r2));
123
123
  }, P = [l.NOSCRIPT, l.SCRIPT, l.STYLE], w = function(t2, e) {
124
- return e === void 0 && (e = true), e === false ? String(t2) : String(t2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
124
+ return void 0 === e && (e = true), false === e ? String(t2) : String(t2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
125
125
  }, x = function(t2) {
126
126
  return Object.keys(t2).reduce(function(e, r2) {
127
- var n = t2[r2] !== void 0 ? r2 + '="' + t2[r2] + '"' : "" + r2;
127
+ var n = void 0 !== t2[r2] ? r2 + '="' + t2[r2] + '"' : "" + r2;
128
128
  return e ? e + " " + n : n;
129
129
  }, "");
130
130
  }, L = function(t2, e) {
131
- return e === void 0 && (e = {}), Object.keys(t2).reduce(function(e2, r2) {
131
+ return void 0 === e && (e = {}), Object.keys(t2).reduce(function(e2, r2) {
132
132
  return e2[m[r2] || r2] = t2[r2], e2;
133
133
  }, e);
134
134
  }, j = function(e, r2) {
@@ -136,7 +136,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
136
136
  var i, o = ((i = { key: n })["data-rh"] = true, i);
137
137
  return Object.keys(r3).forEach(function(t2) {
138
138
  var e2 = m[t2] || t2;
139
- e2 === "innerHTML" || e2 === "cssText" ? o.dangerouslySetInnerHTML = { __html: r3.innerHTML || r3.cssText } : o[e2] = r3[t2];
139
+ "innerHTML" === e2 || "cssText" === e2 ? o.dangerouslySetInnerHTML = { __html: r3.innerHTML || r3.cssText } : o[e2] = r3[t2];
140
140
  }), t.createElement(e, o);
141
141
  });
142
142
  }, M = function(e, r2, n) {
@@ -165,18 +165,18 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
165
165
  return function(t2, e2, r3) {
166
166
  return e2.reduce(function(e3, n2) {
167
167
  var i = Object.keys(n2).filter(function(t3) {
168
- return !(t3 === "innerHTML" || t3 === "cssText");
168
+ return !("innerHTML" === t3 || "cssText" === t3);
169
169
  }).reduce(function(t3, e4) {
170
- var i2 = n2[e4] === void 0 ? e4 : e4 + '="' + w(n2[e4], r3) + '"';
170
+ var i2 = void 0 === n2[e4] ? e4 : e4 + '="' + w(n2[e4], r3) + '"';
171
171
  return t3 ? t3 + " " + i2 : i2;
172
- }, ""), o = n2.innerHTML || n2.cssText || "", a2 = P.indexOf(t2) === -1;
172
+ }, ""), o = n2.innerHTML || n2.cssText || "", a2 = -1 === P.indexOf(t2);
173
173
  return e3 + "<" + t2 + ' data-rh="true" ' + i + (a2 ? "/>" : ">" + o + "</" + t2 + ">");
174
174
  }, "");
175
175
  }(e, r2, n);
176
176
  } };
177
177
  }
178
178
  }, k = function(t2) {
179
- var e = t2.baseTag, r2 = t2.bodyAttributes, n = t2.encode, i = t2.htmlAttributes, o = t2.noscriptTags, a2 = t2.styleTags, s2 = t2.title, c2 = s2 === void 0 ? "" : s2, u2 = t2.titleAttributes, h2 = t2.linkTags, m2 = t2.metaTags, y2 = t2.scriptTags, T2 = { toComponent: function() {
179
+ var e = t2.baseTag, r2 = t2.bodyAttributes, n = t2.encode, i = t2.htmlAttributes, o = t2.noscriptTags, a2 = t2.styleTags, s2 = t2.title, c2 = void 0 === s2 ? "" : s2, u2 = t2.titleAttributes, h2 = t2.linkTags, m2 = t2.metaTags, y2 = t2.scriptTags, T2 = { toComponent: function() {
180
180
  }, toString: function() {
181
181
  return "";
182
182
  } };
@@ -194,7 +194,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
194
194
  return { priority: T2, base: M(l.BASE, e, n), bodyAttributes: M("bodyAttributes", r2, n), htmlAttributes: M("htmlAttributes", i, n), link: M(l.LINK, h2, n), meta: M(l.META, m2, n), noscript: M(l.NOSCRIPT, o, n), script: M(l.SCRIPT, y2, n), style: M(l.STYLE, a2, n), title: M(l.TITLE, { title: c2, titleAttributes: u2 }, n) };
195
195
  }, H = [], N = function(t2, e) {
196
196
  var r2 = this;
197
- e === void 0 && (e = typeof document != "undefined"), this.instances = [], this.value = { setHelmet: function(t3) {
197
+ void 0 === e && (e = "undefined" != typeof document), this.instances = [], this.value = { setHelmet: function(t3) {
198
198
  r2.context.helmet = t3;
199
199
  }, helmetInstances: { get: function() {
200
200
  return r2.canUseDOM ? H : r2.instances;
@@ -204,7 +204,7 @@ var l = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link",
204
204
  var e2 = (r2.canUseDOM ? H : r2.instances).indexOf(t3);
205
205
  (r2.canUseDOM ? H : r2.instances).splice(e2, 1);
206
206
  } } }, this.context = t2, this.canUseDOM = e, e || (t2.helmet = k({ baseTag: [], bodyAttributes: {}, encodeSpecialCharacters: true, htmlAttributes: {}, linkTags: [], metaTags: [], noscriptTags: [], scriptTags: [], styleTags: [], title: "", titleAttributes: {} }));
207
- }, R = t.createContext({}), D = r.shape({ setHelmet: r.func, helmetInstances: r.shape({ get: r.func, add: r.func, remove: r.func }) }), U = typeof document != "undefined", q = /* @__PURE__ */ function(e) {
207
+ }, R = t.createContext({}), D = r.shape({ setHelmet: r.func, helmetInstances: r.shape({ get: r.func, add: r.func, remove: r.func }) }), U = "undefined" != typeof document, q = /* @__PURE__ */ function(e) {
208
208
  function r2(t2) {
209
209
  var n;
210
210
  return (n = e.call(this, t2) || this).helmetData = new N(n.props.context, r2.canUseDOM), n;
@@ -219,7 +219,7 @@ var Y = function(t2, e) {
219
219
  return e && e.length && e.forEach(function(e2) {
220
220
  var n2 = document.createElement(t2);
221
221
  for (var i2 in e2)
222
- Object.prototype.hasOwnProperty.call(e2, i2) && (i2 === "innerHTML" ? n2.innerHTML = e2.innerHTML : i2 === "cssText" ? n2.styleSheet ? n2.styleSheet.cssText = e2.cssText : n2.appendChild(document.createTextNode(e2.cssText)) : n2.setAttribute(i2, e2[i2] === void 0 ? "" : e2[i2]));
222
+ Object.prototype.hasOwnProperty.call(e2, i2) && ("innerHTML" === i2 ? n2.innerHTML = e2.innerHTML : "cssText" === i2 ? n2.styleSheet ? n2.styleSheet.cssText = e2.cssText : n2.appendChild(document.createTextNode(e2.cssText)) : n2.setAttribute(i2, void 0 === e2[i2] ? "" : e2[i2]));
223
223
  n2.setAttribute("data-rh", "true"), o.some(function(t3, e3) {
224
224
  return r2 = e3, n2.isEqualNode(t3);
225
225
  }) ? o.splice(r2, 1) : a2.push(n2);
@@ -233,9 +233,9 @@ var Y = function(t2, e) {
233
233
  if (r2) {
234
234
  for (var n = r2.getAttribute("data-rh"), i = n ? n.split(",") : [], o = [].concat(i), a2 = Object.keys(e), s2 = 0; s2 < a2.length; s2 += 1) {
235
235
  var c2 = a2[s2], u2 = e[c2] || "";
236
- r2.getAttribute(c2) !== u2 && r2.setAttribute(c2, u2), i.indexOf(c2) === -1 && i.push(c2);
236
+ r2.getAttribute(c2) !== u2 && r2.setAttribute(c2, u2), -1 === i.indexOf(c2) && i.push(c2);
237
237
  var l2 = o.indexOf(c2);
238
- l2 !== -1 && o.splice(l2, 1);
238
+ -1 !== l2 && o.splice(l2, 1);
239
239
  }
240
240
  for (var p2 = o.length - 1; p2 >= 0; p2 -= 1)
241
241
  r2.removeAttribute(o[p2]);
@@ -244,7 +244,7 @@ var Y = function(t2, e) {
244
244
  }, K = function(t2, e) {
245
245
  var r2 = t2.baseTag, n = t2.htmlAttributes, i = t2.linkTags, o = t2.metaTags, a2 = t2.noscriptTags, s2 = t2.onChangeClientState, c2 = t2.scriptTags, u2 = t2.styleTags, p2 = t2.title, f2 = t2.titleAttributes;
246
246
  B(l.BODY, t2.bodyAttributes), B(l.HTML, n), function(t3, e2) {
247
- t3 !== void 0 && document.title !== t3 && (document.title = S(t3)), B(l.TITLE, e2);
247
+ void 0 !== t3 && document.title !== t3 && (document.title = S(t3)), B(l.TITLE, e2);
248
248
  }(p2, f2);
249
249
  var d2 = { baseTag: Y(l.BASE, r2), linkTags: Y(l.LINK, i), metaTags: Y(l.META, o), noscriptTags: Y(l.NOSCRIPT, a2), scriptTags: Y(l.SCRIPT, c2), styleTags: Y(l.STYLE, u2) }, h2 = {}, m2 = {};
250
250
  Object.keys(d2).forEach(function(t3) {
@@ -326,8 +326,8 @@ var F = ["children"], G = ["children"], W = /* @__PURE__ */ function(e) {
326
326
  }, o.warnOnInvalidChildren = function(t2, e2) {
327
327
  return browser(h.some(function(e3) {
328
328
  return t2.type === e3;
329
- }), typeof t2.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : "Only elements types " + h.join(", ") + " are allowed. Helmet does not support rendering <" + t2.type + "> elements. Refer to our API for more information."), browser(!e2 || typeof e2 == "string" || Array.isArray(e2) && !e2.some(function(t3) {
330
- return typeof t3 != "string";
329
+ }), "function" == typeof t2.type ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : "Only elements types " + h.join(", ") + " are allowed. Helmet does not support rendering <" + t2.type + "> elements. Refer to our API for more information."), browser(!e2 || "string" == typeof e2 || Array.isArray(e2) && !e2.some(function(t3) {
330
+ return "string" != typeof t3;
331
331
  }), "Helmet expects a string as a child of <" + t2.type + ">. Did you forget to wrap your children in braces? ( <" + t2.type + ">{``}</" + t2.type + "> ) Refer to our API for more information."), true;
332
332
  }, o.mapChildrenToProps = function(e2, r3) {
333
333
  var n = this, i = {};
@@ -336,7 +336,7 @@ var F = ["children"], G = ["children"], W = /* @__PURE__ */ function(e) {
336
336
  var e3 = t2.props, o2 = e3.children, a2 = u(e3, F), s2 = Object.keys(a2).reduce(function(t3, e4) {
337
337
  return t3[y[e4] || e4] = a2[e4], t3;
338
338
  }, {}), c2 = t2.type;
339
- switch (typeof c2 == "symbol" ? c2 = c2.toString() : n.warnOnInvalidChildren(t2, o2), c2) {
339
+ switch ("symbol" == typeof c2 ? c2 = c2.toString() : n.warnOnInvalidChildren(t2, o2), c2) {
340
340
  case l.FRAGMENT:
341
341
  r3 = n.mapChildrenToProps(o2, r3);
342
342
  break;
@@ -532,10 +532,16 @@ function Drawer(theme) {
532
532
  modal: {
533
533
  '&[role="presentation"]': {
534
534
  "& .MuiDrawer-paperAnchorLeft": {
535
- boxShadow: `8px 24px 24px 12px ${alpha(theme.palette.grey[900], isLight ? 0.16 : 0.48)}`
535
+ boxShadow: `8px 24px 24px 12px ${alpha(
536
+ theme.palette.grey[900],
537
+ isLight ? 0.16 : 0.48
538
+ )}`
536
539
  },
537
540
  "& .MuiDrawer-paperAnchorRight": {
538
- boxShadow: `-8px 24px 24px 12px ${alpha(theme.palette.grey[900], isLight ? 0.16 : 0.48)}`
541
+ boxShadow: `-8px 24px 24px 12px ${alpha(
542
+ theme.palette.grey[900],
543
+ isLight ? 0.16 : 0.48
544
+ )}`
539
545
  }
540
546
  }
541
547
  }
@@ -1004,7 +1010,10 @@ function Pagination(theme) {
1004
1010
  color: theme.palette.primary.main,
1005
1011
  backgroundColor: alpha$1(theme.palette.primary.main, 0.08),
1006
1012
  "&:hover, &.Mui-focusVisible": {
1007
- backgroundColor: `${alpha$1(theme.palette.primary.main, 0.24)} !important`
1013
+ backgroundColor: `${alpha$1(
1014
+ theme.palette.primary.main,
1015
+ 0.24
1016
+ )} !important`
1008
1017
  }
1009
1018
  }
1010
1019
  },
@@ -1243,6 +1252,46 @@ function LoadingButton(theme) {
1243
1252
  };
1244
1253
  }
1245
1254
  function fnComponentsOverrides(theme) {
1246
- return Object.assign(Fab(theme), Tabs(theme), Card(theme), Menu(theme), Link(theme), Input(theme), InputLabel(), Radio(theme), Badge(), List(theme), Table(theme), Paper(theme), Switch(theme), Button(theme), IconButton(theme), Dialog(theme), Avatar(theme), Slider(theme), Drawer(theme), Stepper(theme), Tooltip(theme), Popover(theme), SvgIcon(), Checkbox(theme), DataGrid(theme), Skeleton(theme), Timeline(theme), Backdrop(theme), Progress(theme), Accordion(theme), Typography(theme), Pagination(theme), ButtonGroup(theme), Breadcrumbs(theme), CssBaseline(), Autocomplete(theme), ControlLabel(theme), ToggleButton(theme), LoadingButton(theme));
1255
+ return Object.assign(
1256
+ Fab(theme),
1257
+ Tabs(theme),
1258
+ Card(theme),
1259
+ Menu(theme),
1260
+ Link(theme),
1261
+ Input(theme),
1262
+ InputLabel(),
1263
+ Radio(theme),
1264
+ Badge(),
1265
+ List(theme),
1266
+ Table(theme),
1267
+ Paper(theme),
1268
+ Switch(theme),
1269
+ Button(theme),
1270
+ IconButton(theme),
1271
+ Dialog(theme),
1272
+ Avatar(theme),
1273
+ Slider(theme),
1274
+ Drawer(theme),
1275
+ Stepper(theme),
1276
+ Tooltip(theme),
1277
+ Popover(theme),
1278
+ SvgIcon(),
1279
+ Checkbox(theme),
1280
+ DataGrid(theme),
1281
+ Skeleton(theme),
1282
+ Timeline(theme),
1283
+ Backdrop(theme),
1284
+ Progress(theme),
1285
+ Accordion(theme),
1286
+ Typography(theme),
1287
+ Pagination(theme),
1288
+ ButtonGroup(theme),
1289
+ Breadcrumbs(theme),
1290
+ CssBaseline(),
1291
+ Autocomplete(theme),
1292
+ ControlLabel(theme),
1293
+ ToggleButton(theme),
1294
+ LoadingButton(theme)
1295
+ );
1247
1296
  }
1248
1297
  export { fnComponentsOverrides as f };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/graphics",
3
3
  "private": false,
4
- "version": "0.0.25",
4
+ "version": "0.0.28",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {
@@ -15,19 +15,19 @@
15
15
  "format": "npm run prettier:fix && npm run lint:fix"
16
16
  },
17
17
  "dependencies": {
18
- "@m4l/core": "^0.0.33",
18
+ "@m4l/core": "^0.0.35",
19
19
  "@mui/material": "^5.8.6",
20
20
  "@mui/x-date-pickers": "^5.0.0-beta.3",
21
21
  "date-fns": "^2.29.1",
22
22
  "framer-motion": "^6.3.11",
23
- "react": ">=18",
24
23
  "react-dom": "^18.0.0",
25
24
  "react-dropzone": "^14.2.1",
26
25
  "react-helmet-async": "^1.3.0",
27
26
  "react-hook-form": "^7.31.3",
28
27
  "react-intersection-observer": "^9.2.2",
29
28
  "react-router-dom": "^6.3.0",
30
- "vite-tsconfig-paths": "^3.5.0"
29
+ "vite-tsconfig-paths": "^3.5.0",
30
+ "react": ">=18"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "date-fns": "^2.29.1",