@lumiapassport/ui-kit 1.4.15 → 1.4.16

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.
@@ -14,7 +14,7 @@
14
14
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
15
15
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
16
16
 
17
- <title>Lumia Passport Secure Wallet - iframe version 1.4.15</title>
17
+ <title>Lumia Passport Secure Wallet - iframe version 1.4.16</title>
18
18
 
19
19
  <!-- Styles will be injected by build process -->
20
20
  <style>
@@ -3600,7 +3600,7 @@ var BackupManager = class {
3600
3600
  };
3601
3601
 
3602
3602
  // src/iframe/main.ts
3603
- var IFRAME_VERSION = "1.4.15";
3603
+ var IFRAME_VERSION = "1.4.16";
3604
3604
  var IframeWallet = class {
3605
3605
  constructor() {
3606
3606
  console.log("=".repeat(60));
package/dist/index.cjs CHANGED
@@ -3093,6 +3093,31 @@ function useTheme(configTheme, customColors) {
3093
3093
  } else {
3094
3094
  root.style.removeProperty("--lumia-border");
3095
3095
  }
3096
+ if (currentCustomColors?.buttonBackground) {
3097
+ root.style.setProperty("--lumia-button-bg", currentCustomColors.buttonBackground);
3098
+ } else {
3099
+ root.style.removeProperty("--lumia-button-bg");
3100
+ }
3101
+ if (currentCustomColors?.buttonBackgroundEnd) {
3102
+ root.style.setProperty("--lumia-button-bg-end", currentCustomColors.buttonBackgroundEnd);
3103
+ } else {
3104
+ root.style.removeProperty("--lumia-button-bg-end");
3105
+ }
3106
+ if (currentCustomColors?.buttonText) {
3107
+ root.style.setProperty("--lumia-button-text", currentCustomColors.buttonText);
3108
+ } else {
3109
+ root.style.removeProperty("--lumia-button-text");
3110
+ }
3111
+ if (currentCustomColors?.buttonBackgroundHover) {
3112
+ root.style.setProperty("--lumia-button-bg-hover", currentCustomColors.buttonBackgroundHover);
3113
+ } else {
3114
+ root.style.removeProperty("--lumia-button-bg-hover");
3115
+ }
3116
+ if (currentCustomColors?.buttonBackgroundHoverEnd) {
3117
+ root.style.setProperty("--lumia-button-bg-hover-end", currentCustomColors.buttonBackgroundHoverEnd);
3118
+ } else {
3119
+ root.style.removeProperty("--lumia-button-bg-hover-end");
3120
+ }
3096
3121
  }, [currentCustomColors]);
3097
3122
  const themeClasses = (0, import_react3.useMemo)(
3098
3123
  () => {
@@ -5812,7 +5837,7 @@ var LumiaRainbowKitProvider = ({ children }) => {
5812
5837
  const rainbowConfig2 = import_react4.default.useMemo(() => {
5813
5838
  return createRainbowConfig(config.wallet?.walletConnectProjectId);
5814
5839
  }, [config.wallet?.walletConnectProjectId]);
5815
- const customTheme = isDark ? {
5840
+ const customTheme = import_react4.default.useMemo(() => isDark ? {
5816
5841
  ...(0, import_rainbowkit2.darkTheme)(),
5817
5842
  colors: {
5818
5843
  ...(0, import_rainbowkit2.darkTheme)().colors,
@@ -5828,7 +5853,7 @@ var LumiaRainbowKitProvider = ({ children }) => {
5828
5853
  },
5829
5854
  shadows: rainbowTheme.lightMode.shadows,
5830
5855
  radii: rainbowTheme.lightMode.radii
5831
- };
5856
+ }, [isDark]);
5832
5857
  const isWalletEnabled = config.wallet?.enabled ?? false;
5833
5858
  if (!isWalletEnabled) {
5834
5859
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
@@ -8490,7 +8515,7 @@ function useLumiaPassportLinkedProfiles() {
8490
8515
  // package.json
8491
8516
  var package_default = {
8492
8517
  name: "@lumiapassport/ui-kit",
8493
- version: "1.4.15",
8518
+ version: "1.4.16",
8494
8519
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
8495
8520
  type: "module",
8496
8521
  main: "./dist/index.cjs",
@@ -8931,21 +8956,23 @@ var ConnectWalletButton = ({
8931
8956
  paddingRight: "3rem",
8932
8957
  fontSize: "1.25rem",
8933
8958
  fontWeight: "600",
8934
- color: "white",
8959
+ color: config.ui.colors?.[isDark ? "dark" : "light"]?.buttonText || "white",
8935
8960
  borderRadius: "1rem",
8936
- background: "linear-gradient(to right, #9333ea, #2563eb)",
8961
+ background: config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackground && config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackgroundEnd ? `linear-gradient(to right, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackground}, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackgroundEnd})` : "linear-gradient(to right, #9333ea, #2563eb)",
8937
8962
  boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
8938
8963
  transition: "all 0.2s",
8939
8964
  border: "none",
8940
8965
  cursor: "pointer"
8941
8966
  },
8942
8967
  onMouseEnter: (e) => {
8943
- e.currentTarget.style.background = "linear-gradient(to right, #7e22ce, #1d4ed8)";
8968
+ const hoverBg = config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackgroundHover && config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackgroundHoverEnd ? `linear-gradient(to right, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackgroundHover}, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackgroundHoverEnd})` : "linear-gradient(to right, #7e22ce, #1d4ed8)";
8969
+ e.currentTarget.style.background = hoverBg;
8944
8970
  e.currentTarget.style.transform = "scale(1.05)";
8945
8971
  e.currentTarget.style.boxShadow = "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)";
8946
8972
  },
8947
8973
  onMouseLeave: (e) => {
8948
- e.currentTarget.style.background = "linear-gradient(to right, #9333ea, #2563eb)";
8974
+ const normalBg = config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackground && config.ui.colors?.[isDark ? "dark" : "light"]?.buttonBackgroundEnd ? `linear-gradient(to right, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackground}, ${config.ui.colors[isDark ? "dark" : "light"]?.buttonBackgroundEnd})` : "linear-gradient(to right, #9333ea, #2563eb)";
8975
+ e.currentTarget.style.background = normalBg;
8949
8976
  e.currentTarget.style.transform = "scale(1)";
8950
8977
  e.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)";
8951
8978
  },