@m4l/graphics 0.1.3 → 0.1.5

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.
@@ -37,7 +37,6 @@ function HostThemeProvider(props) {
37
37
  }
38
38
  return () => {
39
39
  if (isMicroFrontEnd) {
40
- console.log("****** REMOVE LISTENER host_theme_change");
41
40
  events_remove_listener("host_theme_change", onUpdateOverrides);
42
41
  }
43
42
  };
@@ -7,7 +7,7 @@ export declare type LangType = {
7
7
  icon: string;
8
8
  };
9
9
  export declare type LocalesContextProps = {
10
- currentLang: any;
10
+ currentLang: LangType;
11
11
  onChangeLang: (newlang: string) => void;
12
12
  allLang: Array<LangType>;
13
13
  };
@@ -33,10 +33,11 @@ function LocalesProvider({
33
33
  }], []);
34
34
  const [currentLang, setCurrentLang] = useState(LANGS.find((_lang) => _lang.value === langStorage) || LANGS[0]);
35
35
  const onChangeLang = (newlang) => {
36
+ console.log("onChangeLang", newlang);
36
37
  setLangStorage(newlang);
37
38
  setCurrentLang(LANGS.find((_lang) => _lang.value === newlang) || LANGS[0]);
38
- console.log("new lagn", newlang, currentLang);
39
39
  };
40
+ console.log("Render LocalesProvider", langStorage);
40
41
  return /* @__PURE__ */ jsx(LocalesContext.Provider, {
41
42
  value: {
42
43
  currentLang,
package/index.d.ts CHANGED
@@ -10,5 +10,6 @@ export { shadows, customShadows } from './theme/shadows';
10
10
  export { palette, type ColorSchema } from './theme/palette';
11
11
  export { getColorPresets, colorPresets, defaultPreset } from './utils/getColorPresets';
12
12
  export { getFontValue as GetFontValue } from './utils/getFontValue';
13
+ export * from './utils/strings';
13
14
  export { default as fnComponentsOverrides } from './theme/overrides';
14
15
  export type { HostThemeType } from './types';
package/index.js CHANGED
@@ -8,7 +8,7 @@ export { u as useHostTheme } from "./hooks/useHostTheme/index.js";
8
8
  export { d as defaultThemeOptions } from "./theme/defaultThemeOptions.js";
9
9
  export { c as customShadows, s as shadows } from "./theme/shadows.js";
10
10
  export { p as palette } from "./theme/palette.js";
11
- export { a as GetFontValue, c as colorPresets, d as defaultPreset, g as getColorPresets } from "./utils/index.js";
11
+ export { C as Capitalize, a as GetFontValue, c as colorPresets, d as defaultPreset, g as getColorPresets } from "./utils/index.js";
12
12
  export { f as fnComponentsOverrides } from "./theme/overrides.js";
13
13
  import "@mui/material/styles";
14
14
  import "@mui/material";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/graphics",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
6
  "dependencies": {
package/utils/index.js CHANGED
@@ -110,4 +110,5 @@ function getColorPresets(presetsKey) {
110
110
  default: defaultPreset
111
111
  }[presetsKey];
112
112
  }
113
- export { getFontValue as a, colorPresets as c, defaultPreset as d, getColorPresets as g, pxToRem as p, responsiveFontSizes as r };
113
+ const Capitalize = (s) => s && s[0].toUpperCase() + s.slice(1) || "";
114
+ export { Capitalize as C, getFontValue as a, colorPresets as c, defaultPreset as d, getColorPresets as g, pxToRem as p, responsiveFontSizes as r };
@@ -0,0 +1 @@
1
+ export declare const Capitalize: (s: string) => string;