@axzydev/axzy_ui_system 1.0.170 → 1.1.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/index.cjs CHANGED
@@ -1661,7 +1661,8 @@ var isVeryDarkColor = (hex) => {
1661
1661
  };
1662
1662
  function ITThemeProvider({
1663
1663
  children,
1664
- theme: theme2
1664
+ theme: theme2,
1665
+ showFab = true
1665
1666
  }) {
1666
1667
  const [palette2, setPaletteState] = (0, import_react6.useState)(() => {
1667
1668
  const basePalette = {
@@ -1670,6 +1671,9 @@ function ITThemeProvider({
1670
1671
  layout: { ...DEFAULT_PALETTE.layout, ...theme2?.layout },
1671
1672
  table: { ...DEFAULT_PALETTE.table, ...theme2?.table }
1672
1673
  };
1674
+ if (!showFab) {
1675
+ return basePalette;
1676
+ }
1673
1677
  try {
1674
1678
  const saved = localStorage.getItem(STORAGE_KEY);
1675
1679
  if (saved) {
@@ -1753,6 +1757,16 @@ function ITThemeProvider({
1753
1757
  applyDarkMode(darkModeMode === "dark");
1754
1758
  }
1755
1759
  }, [darkModeMode]);
1760
+ (0, import_react6.useEffect)(() => {
1761
+ if (!showFab) {
1762
+ setPaletteState({
1763
+ ...DEFAULT_PALETTE,
1764
+ ...theme2,
1765
+ layout: { ...DEFAULT_PALETTE.layout, ...theme2?.layout },
1766
+ table: { ...DEFAULT_PALETTE.table, ...theme2?.table }
1767
+ });
1768
+ }
1769
+ }, [theme2, showFab]);
1756
1770
  (0, import_react6.useEffect)(() => {
1757
1771
  const injectStyles = (obj, prefix = "") => {
1758
1772
  Object.entries(obj).forEach(([key, val]) => {
@@ -1773,7 +1787,9 @@ function ITThemeProvider({
1773
1787
  });
1774
1788
  };
1775
1789
  injectStyles(palette2);
1776
- localStorage.setItem(STORAGE_KEY, JSON.stringify(palette2));
1790
+ if (showFab) {
1791
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(palette2));
1792
+ }
1777
1793
  let styleTag = document.getElementById(
1778
1794
  "it-theme-dynamic-overrides"
1779
1795
  );
@@ -2947,7 +2963,7 @@ function ITThemeProvider({
2947
2963
  },
2948
2964
  children: [
2949
2965
  children,
2950
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2966
+ showFab && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2951
2967
  "button",
2952
2968
  {
2953
2969
  onClick: () => setIsOpen((prev) => !prev),
@@ -2966,7 +2982,7 @@ function ITThemeProvider({
2966
2982
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_md.MdPalette, { style: { width: "28px", height: "28px" } })
2967
2983
  }
2968
2984
  ),
2969
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2985
+ showFab && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2970
2986
  ITDialog,
2971
2987
  {
2972
2988
  isOpen,