@lifi/widget 4.0.0-beta.12 → 4.0.0-beta.14

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 (110) hide show
  1. package/dist/esm/components/AmountInput/PriceFormHelperText.style.js +2 -2
  2. package/dist/esm/components/AmountInput/PriceFormHelperText.style.js.map +1 -1
  3. package/dist/esm/components/ButtonTertiary.js +6 -6
  4. package/dist/esm/components/ButtonTertiary.js.map +1 -1
  5. package/dist/esm/components/Card/Card.js +2 -2
  6. package/dist/esm/components/Card/Card.js.map +1 -1
  7. package/dist/esm/components/Card/CardIconButton.js +2 -2
  8. package/dist/esm/components/Card/CardIconButton.js.map +1 -1
  9. package/dist/esm/components/Card/CardLabel.js +2 -2
  10. package/dist/esm/components/Card/CardLabel.js.map +1 -1
  11. package/dist/esm/components/ContextMenu.style.js +1 -1
  12. package/dist/esm/components/ContextMenu.style.js.map +1 -1
  13. package/dist/esm/components/Header/ActivitiesButton.js +1 -0
  14. package/dist/esm/components/Header/ActivitiesButton.js.map +1 -1
  15. package/dist/esm/components/Header/ActivitiesButton.style.js +4 -4
  16. package/dist/esm/components/Header/ActivitiesButton.style.js.map +1 -1
  17. package/dist/esm/components/Header/Header.style.js +2 -2
  18. package/dist/esm/components/Header/Header.style.js.map +1 -1
  19. package/dist/esm/components/Header/SettingsButton.style.js +8 -8
  20. package/dist/esm/components/Header/SettingsButton.style.js.map +1 -1
  21. package/dist/esm/components/IconCircle/IconCircle.style.js +7 -7
  22. package/dist/esm/components/IconCircle/IconCircle.style.js.map +1 -1
  23. package/dist/esm/components/IconTypography.js +2 -2
  24. package/dist/esm/components/IconTypography.js.map +1 -1
  25. package/dist/esm/components/ListItemButton.js +1 -1
  26. package/dist/esm/components/ListItemButton.js.map +1 -1
  27. package/dist/esm/components/Messages/AlertMessage.style.js +4 -4
  28. package/dist/esm/components/Messages/AlertMessage.style.js.map +1 -1
  29. package/dist/esm/components/Messages/GasRefuelMessage.style.js +2 -2
  30. package/dist/esm/components/Messages/GasRefuelMessage.style.js.map +1 -1
  31. package/dist/esm/components/RouteCard/RouteTokens.js +1 -2
  32. package/dist/esm/components/RouteCard/RouteTokens.js.map +1 -1
  33. package/dist/esm/components/Step/CircularProgress.style.js +4 -4
  34. package/dist/esm/components/Step/CircularProgress.style.js.map +1 -1
  35. package/dist/esm/components/StepActions/StepActions.style.js +4 -4
  36. package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
  37. package/dist/esm/components/Switch.js +2 -2
  38. package/dist/esm/components/Switch.js.map +1 -1
  39. package/dist/esm/components/Tabs/NavigationTabs.js +2 -2
  40. package/dist/esm/components/Tabs/NavigationTabs.js.map +1 -1
  41. package/dist/esm/components/Tabs/Tabs.style.js +3 -3
  42. package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
  43. package/dist/esm/components/Token/Token.style.js +1 -1
  44. package/dist/esm/components/Token/Token.style.js.map +1 -1
  45. package/dist/esm/components/TokenList/TokenList.style.js +1 -1
  46. package/dist/esm/components/TokenList/TokenList.style.js.map +1 -1
  47. package/dist/esm/components/TransactionCard/ActiveTransactionCard.style.js +1 -1
  48. package/dist/esm/components/TransactionCard/ActiveTransactionCard.style.js.map +1 -1
  49. package/dist/esm/config/version.d.ts +1 -1
  50. package/dist/esm/config/version.js +1 -1
  51. package/dist/esm/config/version.js.map +1 -1
  52. package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js +2 -2
  53. package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
  54. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +5 -5
  55. package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
  56. package/dist/esm/pages/TransactionDetailsPage/ActionRow.style.js +2 -2
  57. package/dist/esm/pages/TransactionDetailsPage/ActionRow.style.js.map +1 -1
  58. package/dist/esm/pages/TransactionDetailsPage/ReceiptsCard.style.js +1 -1
  59. package/dist/esm/pages/TransactionDetailsPage/ReceiptsCard.style.js.map +1 -1
  60. package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js +7 -7
  61. package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js.map +1 -1
  62. package/dist/esm/stores/form/useFormRef.js +8 -0
  63. package/dist/esm/stores/form/useFormRef.js.map +1 -1
  64. package/dist/esm/stores/routes/createRouteExecutionStore.js +2 -2
  65. package/dist/esm/stores/routes/createRouteExecutionStore.js.map +1 -1
  66. package/dist/esm/stores/routes/utils.js +1 -1
  67. package/dist/esm/stores/routes/utils.js.map +1 -1
  68. package/dist/esm/themes/createTheme.js +15 -19
  69. package/dist/esm/themes/createTheme.js.map +1 -1
  70. package/dist/esm/themes/types.d.ts +0 -11
  71. package/dist/esm/themes/types.d.ts.map +1 -1
  72. package/dist/esm/themes/watermelonLight.js +1 -1
  73. package/dist/esm/themes/watermelonLight.js.map +1 -1
  74. package/package.json +5 -5
  75. package/src/components/AmountInput/PriceFormHelperText.style.tsx +2 -2
  76. package/src/components/ButtonTertiary.tsx +6 -6
  77. package/src/components/Card/Card.tsx +2 -2
  78. package/src/components/Card/CardIconButton.tsx +2 -2
  79. package/src/components/Card/CardLabel.tsx +2 -2
  80. package/src/components/ContextMenu.style.tsx +1 -1
  81. package/src/components/Header/ActivitiesButton.style.tsx +4 -4
  82. package/src/components/Header/ActivitiesButton.tsx +1 -0
  83. package/src/components/Header/Header.style.ts +2 -2
  84. package/src/components/Header/SettingsButton.style.tsx +8 -8
  85. package/src/components/IconCircle/IconCircle.style.tsx +7 -7
  86. package/src/components/IconTypography.ts +2 -2
  87. package/src/components/ListItemButton.tsx +1 -1
  88. package/src/components/Messages/AlertMessage.style.tsx +4 -4
  89. package/src/components/Messages/GasRefuelMessage.style.ts +2 -2
  90. package/src/components/RouteCard/RouteTokens.tsx +1 -2
  91. package/src/components/Step/CircularProgress.style.tsx +4 -4
  92. package/src/components/StepActions/StepActions.style.tsx +4 -4
  93. package/src/components/Switch.tsx +2 -2
  94. package/src/components/Tabs/NavigationTabs.tsx +2 -2
  95. package/src/components/Tabs/Tabs.style.tsx +3 -3
  96. package/src/components/Token/Token.style.tsx +1 -1
  97. package/src/components/TokenList/TokenList.style.tsx +1 -1
  98. package/src/components/TransactionCard/ActiveTransactionCard.style.tsx +1 -1
  99. package/src/config/version.ts +1 -1
  100. package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +2 -2
  101. package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +5 -5
  102. package/src/pages/TransactionDetailsPage/ActionRow.style.tsx +2 -2
  103. package/src/pages/TransactionDetailsPage/ReceiptsCard.style.tsx +1 -1
  104. package/src/pages/TransactionPage/StatusBottomSheet.style.tsx +7 -7
  105. package/src/stores/form/useFormRef.ts +20 -1
  106. package/src/stores/routes/createRouteExecutionStore.ts +4 -2
  107. package/src/stores/routes/utils.ts +1 -1
  108. package/src/themes/createTheme.ts +14 -18
  109. package/src/themes/types.ts +0 -12
  110. package/src/themes/watermelonLight.ts +1 -1
@@ -26,7 +26,7 @@ const getUpdatedAction = (currentRoute, updatedRoute) => {
26
26
  return actionDiff.path.slice(0, actionDiffIndex).reduce((obj, path) => obj[path], updatedRoute);
27
27
  };
28
28
  const getSourceTxHash = (route) => {
29
- const sourceAction = route?.steps[0].execution?.actions.filter((action) => !["RESET_ALLOWANCE", "SET_ALLOWANCE"].includes(action.type)).find((action) => action.txHash || action.taskId);
29
+ const sourceAction = route?.steps[0].execution?.actions?.filter((action) => !["RESET_ALLOWANCE", "SET_ALLOWANCE"].includes(action.type)).find((action) => action.txHash || action.taskId);
30
30
  return sourceAction?.txHash || sourceAction?.taskId;
31
31
  };
32
32
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../../src/stores/routes/utils.ts"],"sourcesContent":["import type { ExecutionAction, RouteExtended } from '@lifi/sdk'\nimport microdiff from 'microdiff'\n\nexport const isRouteDone = (route: RouteExtended): boolean => {\n return route.steps.every((step) => step.execution?.status === 'DONE')\n}\n\nexport const isRoutePartiallyDone = (route: RouteExtended): boolean => {\n return route.steps.some((step) =>\n step.execution?.actions?.some((action) => action.substatus === 'PARTIAL')\n )\n}\n\nexport const isRouteRefunded = (route: RouteExtended): boolean => {\n return route.steps.some((step) =>\n step.execution?.actions?.some((action) => action.substatus === 'REFUNDED')\n )\n}\n\nexport const isRouteFailed = (route: RouteExtended): boolean => {\n return route.steps.some((step) => step.execution?.status === 'FAILED')\n}\n\nexport const isRouteActive = (route?: RouteExtended): boolean => {\n if (!route) {\n return false\n }\n const isDone = isRouteDone(route)\n const isFailed = isRouteFailed(route)\n const alreadyStarted = route.steps.some((step) => step.execution)\n return !isDone && !isFailed && alreadyStarted\n}\n\nexport const getUpdatedAction = (\n currentRoute: RouteExtended,\n updatedRoute: RouteExtended\n): ExecutionAction | undefined => {\n const actionDiff = microdiff(currentRoute, updatedRoute).find((diff) =>\n diff.path.includes('actions')\n )\n if (!actionDiff) {\n return undefined\n }\n // Find action index in the diff array so we can slice the complete action object\n // e.g. ['steps', 0, 'execution', 'actions', 0, 'message']\n const actionDiffIndex = actionDiff.path.indexOf('actions') + 2\n const actionPathSlice = actionDiff.path.slice(0, actionDiffIndex)\n // Reduce updated route using the diff path to get updated process\n const action = actionPathSlice.reduce(\n (obj, path) => obj[path],\n updatedRoute as any\n ) as ExecutionAction\n return action\n}\n\nexport const getSourceTxHash = (route?: RouteExtended): string | undefined => {\n const sourceAction = route?.steps[0].execution?.actions\n .filter(\n (action) => !['RESET_ALLOWANCE', 'SET_ALLOWANCE'].includes(action.type)\n )\n .find((action) => action.txHash || action.taskId)\n return sourceAction?.txHash || sourceAction?.taskId\n}\n"],"mappings":";;AAGA,MAAa,eAAe,UAAkC;AAC5D,QAAO,MAAM,MAAM,OAAO,SAAS,KAAK,WAAW,WAAW,OAAO;;AAGvE,MAAa,wBAAwB,UAAkC;AACrE,QAAO,MAAM,MAAM,MAAM,SACvB,KAAK,WAAW,SAAS,MAAM,WAAW,OAAO,cAAc,UAAU,CAC1E;;AAGH,MAAa,mBAAmB,UAAkC;AAChE,QAAO,MAAM,MAAM,MAAM,SACvB,KAAK,WAAW,SAAS,MAAM,WAAW,OAAO,cAAc,WAAW,CAC3E;;AAGH,MAAa,iBAAiB,UAAkC;AAC9D,QAAO,MAAM,MAAM,MAAM,SAAS,KAAK,WAAW,WAAW,SAAS;;AAGxE,MAAa,iBAAiB,UAAmC;AAC/D,KAAI,CAAC,MACH,QAAO;CAET,MAAM,SAAS,YAAY,MAAM;CACjC,MAAM,WAAW,cAAc,MAAM;CACrC,MAAM,iBAAiB,MAAM,MAAM,MAAM,SAAS,KAAK,UAAU;AACjE,QAAO,CAAC,UAAU,CAAC,YAAY;;AAGjC,MAAa,oBACX,cACA,iBACgC;CAChC,MAAM,aAAa,UAAU,cAAc,aAAa,CAAC,MAAM,SAC7D,KAAK,KAAK,SAAS,UAAU,CAC9B;AACD,KAAI,CAAC,WACH;CAIF,MAAM,kBAAkB,WAAW,KAAK,QAAQ,UAAU,GAAG;AAO7D,QANwB,WAAW,KAAK,MAAM,GAAG,gBAAgB,CAElC,QAC5B,KAAK,SAAS,IAAI,OACnB,aACD;;AAIH,MAAa,mBAAmB,UAA8C;CAC5E,MAAM,eAAe,OAAO,MAAM,GAAG,WAAW,QAC7C,QACE,WAAW,CAAC,CAAC,mBAAmB,gBAAgB,CAAC,SAAS,OAAO,KAAK,CACxE,CACA,MAAM,WAAW,OAAO,UAAU,OAAO,OAAO;AACnD,QAAO,cAAc,UAAU,cAAc"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../src/stores/routes/utils.ts"],"sourcesContent":["import type { ExecutionAction, RouteExtended } from '@lifi/sdk'\nimport microdiff from 'microdiff'\n\nexport const isRouteDone = (route: RouteExtended): boolean => {\n return route.steps.every((step) => step.execution?.status === 'DONE')\n}\n\nexport const isRoutePartiallyDone = (route: RouteExtended): boolean => {\n return route.steps.some((step) =>\n step.execution?.actions?.some((action) => action.substatus === 'PARTIAL')\n )\n}\n\nexport const isRouteRefunded = (route: RouteExtended): boolean => {\n return route.steps.some((step) =>\n step.execution?.actions?.some((action) => action.substatus === 'REFUNDED')\n )\n}\n\nexport const isRouteFailed = (route: RouteExtended): boolean => {\n return route.steps.some((step) => step.execution?.status === 'FAILED')\n}\n\nexport const isRouteActive = (route?: RouteExtended): boolean => {\n if (!route) {\n return false\n }\n const isDone = isRouteDone(route)\n const isFailed = isRouteFailed(route)\n const alreadyStarted = route.steps.some((step) => step.execution)\n return !isDone && !isFailed && alreadyStarted\n}\n\nexport const getUpdatedAction = (\n currentRoute: RouteExtended,\n updatedRoute: RouteExtended\n): ExecutionAction | undefined => {\n const actionDiff = microdiff(currentRoute, updatedRoute).find((diff) =>\n diff.path.includes('actions')\n )\n if (!actionDiff) {\n return undefined\n }\n // Find action index in the diff array so we can slice the complete action object\n // e.g. ['steps', 0, 'execution', 'actions', 0, 'message']\n const actionDiffIndex = actionDiff.path.indexOf('actions') + 2\n const actionPathSlice = actionDiff.path.slice(0, actionDiffIndex)\n // Reduce updated route using the diff path to get updated process\n const action = actionPathSlice.reduce(\n (obj, path) => obj[path],\n updatedRoute as any\n ) as ExecutionAction\n return action\n}\n\nexport const getSourceTxHash = (route?: RouteExtended): string | undefined => {\n const sourceAction = route?.steps[0].execution?.actions\n ?.filter(\n (action) => !['RESET_ALLOWANCE', 'SET_ALLOWANCE'].includes(action.type)\n )\n .find((action) => action.txHash || action.taskId)\n return sourceAction?.txHash || sourceAction?.taskId\n}\n"],"mappings":";;AAGA,MAAa,eAAe,UAAkC;AAC5D,QAAO,MAAM,MAAM,OAAO,SAAS,KAAK,WAAW,WAAW,OAAO;;AAGvE,MAAa,wBAAwB,UAAkC;AACrE,QAAO,MAAM,MAAM,MAAM,SACvB,KAAK,WAAW,SAAS,MAAM,WAAW,OAAO,cAAc,UAAU,CAC1E;;AAGH,MAAa,mBAAmB,UAAkC;AAChE,QAAO,MAAM,MAAM,MAAM,SACvB,KAAK,WAAW,SAAS,MAAM,WAAW,OAAO,cAAc,WAAW,CAC3E;;AAGH,MAAa,iBAAiB,UAAkC;AAC9D,QAAO,MAAM,MAAM,MAAM,SAAS,KAAK,WAAW,WAAW,SAAS;;AAGxE,MAAa,iBAAiB,UAAmC;AAC/D,KAAI,CAAC,MACH,QAAO;CAET,MAAM,SAAS,YAAY,MAAM;CACjC,MAAM,WAAW,cAAc,MAAM;CACrC,MAAM,iBAAiB,MAAM,MAAM,MAAM,SAAS,KAAK,UAAU;AACjE,QAAO,CAAC,UAAU,CAAC,YAAY;;AAGjC,MAAa,oBACX,cACA,iBACgC;CAChC,MAAM,aAAa,UAAU,cAAc,aAAa,CAAC,MAAM,SAC7D,KAAK,KAAK,SAAS,UAAU,CAC9B;AACD,KAAI,CAAC,WACH;CAIF,MAAM,kBAAkB,WAAW,KAAK,QAAQ,UAAU,GAAG;AAO7D,QANwB,WAAW,KAAK,MAAM,GAAG,gBAAgB,CAElC,QAC5B,KAAK,SAAS,IAAI,OACnB,aACD;;AAIH,MAAa,mBAAmB,UAA8C;CAC5E,MAAM,eAAe,OAAO,MAAM,GAAG,WAAW,SAC5C,QACC,WAAW,CAAC,CAAC,mBAAmB,gBAAgB,CAAC,SAAS,OAAO,KAAK,CACxE,CACA,MAAM,WAAW,OAAO,UAAU,OAAO,OAAO;AACnD,QAAO,cAAc,UAAU,cAAc"}
@@ -79,7 +79,7 @@ const createTheme$1 = (widgetTheme = {}) => {
79
79
  ...widgetTheme.navigation
80
80
  },
81
81
  typography: {
82
- fontFamily: "Inter var, Inter, sans-serif",
82
+ fontFamily: "Inter, sans-serif",
83
83
  ...widgetTheme.typography
84
84
  },
85
85
  shape: {
@@ -96,11 +96,7 @@ const createTheme$1 = (widgetTheme = {}) => {
96
96
  components: {
97
97
  MuiScopedCssBaseline: { styleOverrides: { root: {
98
98
  fontFamily: "Inter, sans-serif",
99
- ...widgetTheme.typography,
100
- "@supports (font-variation-settings: normal)": {
101
- fontFamily: "Inter var, sans-serif",
102
- ...widgetTheme.typography
103
- }
99
+ ...widgetTheme.typography
104
100
  } } },
105
101
  MuiAppBar: { styleOverrides: { root: ({ ownerState }) => ({
106
102
  minHeight: 40,
@@ -134,8 +130,8 @@ const createTheme$1 = (widgetTheme = {}) => {
134
130
  } },
135
131
  ...!!ownerState.onClick && ownerState.variant === "elevation" && { "&:hover": {
136
132
  cursor: "pointer",
137
- filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08))`,
138
- ...theme.applyStyles("dark", { filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.backgroundChannel} / 0.08))` })
133
+ filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent))`,
134
+ ...theme.applyStyles("dark", { filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.background} 8%, transparent))` })
139
135
  } },
140
136
  ...typeof root === "object" && root,
141
137
  ...!!ownerState.onClick && !!rootHover && { "&:hover": {
@@ -160,8 +156,8 @@ const createTheme$1 = (widgetTheme = {}) => {
160
156
  style: ({ theme }) => ({
161
157
  border: "none",
162
158
  boxShadow: "none",
163
- filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04))`,
164
- ...theme.applyStyles("dark", { filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.backgroundChannel} / 0.04))` })
159
+ filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent))`,
160
+ ...theme.applyStyles("dark", { filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.background} 4%, transparent))` })
165
161
  })
166
162
  },
167
163
  {
@@ -190,7 +186,7 @@ const createTheme$1 = (widgetTheme = {}) => {
190
186
  fontSize: 16,
191
187
  fontWeight: 600,
192
188
  "&.Mui-disabled, &.Mui-disabled:hover": {
193
- color: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.56)`,
189
+ color: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 56%, transparent)`,
194
190
  cursor: "not-allowed",
195
191
  pointerEvents: "auto"
196
192
  },
@@ -205,13 +201,13 @@ const createTheme$1 = (widgetTheme = {}) => {
205
201
  ...getStyleOverrides("MuiButton", "root", widgetTheme, ownerState)
206
202
  }),
207
203
  text: ({ theme, ownerState }) => ({
208
- backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.08)`,
204
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 8%, transparent)`,
209
205
  color: theme.vars.palette.primary.main,
210
- "&:hover": { backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.12)` },
206
+ "&:hover": { backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 12%, transparent)` },
211
207
  ...theme.applyStyles("dark", {
212
- backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.42)`,
208
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 42%, transparent)`,
213
209
  color: theme.palette.getContrastText(alpha(theme.palette.primary.main, .08)),
214
- "&:hover": { backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.56)` }
210
+ "&:hover": { backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 56%, transparent)` }
215
211
  }),
216
212
  ...getStyleOverrides("MuiButton", "text", widgetTheme, ownerState)
217
213
  }),
@@ -289,15 +285,15 @@ const createTheme$1 = (widgetTheme = {}) => {
289
285
  root: ({ theme, ownerState }) => {
290
286
  const rootStyleOverrides = getStyleOverrides("MuiTabs", "root", widgetTheme, ownerState);
291
287
  return {
292
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
293
- ...theme.applyStyles("dark", { backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)` }),
288
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
289
+ ...theme.applyStyles("dark", { backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent)` }),
294
290
  borderRadius: theme.vars.shape.borderRadius,
295
291
  ...rootStyleOverrides,
296
292
  [`.${tabsClasses.indicator}`]: {
297
293
  backgroundColor: theme.vars.palette.background.paper,
298
- ...theme.applyStyles("dark", { backgroundColor: `rgba(${theme.vars.palette.common.backgroundChannel} / 0.56)` }),
294
+ ...theme.applyStyles("dark", { backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.background} 56%, transparent)` }),
299
295
  borderRadius: theme.shape.borderRadius > 0 ? `calc(${theme.vars.shape.borderRadius} - 4px)` : theme.vars.shape.borderRadius,
300
- boxShadow: `0px 2px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
296
+ boxShadow: `0px 2px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
301
297
  ...rootStyleOverrides?.[`.${tabsClasses.indicator}`]
302
298
  }
303
299
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createTheme.js","names":["createTheme","createMuiTheme"],"sources":["../../../src/themes/createTheme.ts"],"sourcesContent":["import type {\n CSSObject,\n Shape,\n SimplePaletteColorOptions,\n Theme,\n} from '@mui/material'\nimport {\n alpha,\n buttonClasses,\n createTheme as createMuiTheme,\n css,\n darken,\n keyframes,\n lighten,\n tabsClasses,\n touchRippleClasses,\n} from '@mui/material'\nimport type { WidgetTheme } from '../types/widget.js'\nimport { palette, paletteDark, paletteLight } from './palettes.js'\nimport type {} from './types.js'\nimport { getStyleOverrides } from './utils.js'\n\nconst shape: Shape = {\n borderRadius: 12,\n borderRadiusSecondary: 12,\n borderRadiusTertiary: 24,\n}\n\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.05;\n }\n 100% {\n transform: scale(1);\n opacity: 0.1;\n }\n`\n\nexport const createTheme = (widgetTheme: WidgetTheme = {}): Theme => {\n const configuredPaletteLight =\n widgetTheme.colorSchemes?.light?.palette ?? widgetTheme.palette\n const configuredPaletteDark =\n widgetTheme.colorSchemes?.dark?.palette ?? widgetTheme.palette\n\n const primaryMainColorLight =\n (configuredPaletteLight?.primary as SimplePaletteColorOptions)?.main ??\n palette.primary.main\n const primaryMainColorDark =\n (configuredPaletteDark?.primary as SimplePaletteColorOptions)?.main ??\n palette.primary.main\n\n const primaryLightenColorLight = lighten(primaryMainColorLight, 0.84)\n const primaryDarkenColorLight = darken(primaryMainColorLight, 0.2)\n const primaryLightenColorDark =\n primaryMainColorLight === primaryMainColorDark\n ? primaryLightenColorLight\n : lighten(primaryMainColorDark, 0.84)\n const primaryDarkenColorDark =\n primaryMainColorLight === primaryMainColorDark\n ? primaryDarkenColorLight\n : darken(primaryMainColorDark, 0.2)\n\n const secondaryMainColorLight =\n (configuredPaletteLight?.secondary as SimplePaletteColorOptions)?.main ??\n palette.secondary.main\n const secondaryMainColorDark =\n (configuredPaletteDark?.secondary as SimplePaletteColorOptions)?.main ??\n palette.secondary.main\n\n const secondaryLightenColorLight = lighten(secondaryMainColorLight, 0.84)\n const secondaryDarkenColorLight = darken(secondaryMainColorLight, 0.2)\n const secondaryLightenColorDark =\n secondaryMainColorLight === secondaryMainColorDark\n ? secondaryLightenColorLight\n : lighten(secondaryMainColorDark, 0.84)\n const secondaryDarkenColorDark =\n secondaryMainColorLight === secondaryMainColorDark\n ? secondaryDarkenColorLight\n : darken(secondaryMainColorDark, 0.2)\n\n const theme = createMuiTheme({\n cssVariables: {\n cssVarPrefix: 'lifi',\n colorSchemeSelector: 'class',\n nativeColor: true,\n },\n colorSchemes: {\n light: {\n palette: {\n ...palette,\n ...paletteLight,\n ...(widgetTheme.colorSchemes?.light?.palette ?? widgetTheme.palette),\n primary: {\n main: primaryMainColorLight,\n light: primaryLightenColorLight,\n dark: primaryDarkenColorLight,\n },\n secondary: {\n main: secondaryMainColorLight,\n light: secondaryLightenColorLight,\n dark: secondaryDarkenColorLight,\n },\n },\n },\n dark: {\n palette: {\n ...palette,\n ...paletteDark,\n ...(widgetTheme.colorSchemes?.dark?.palette ?? widgetTheme.palette),\n primary: {\n main: primaryMainColorDark,\n light: primaryLightenColorDark,\n dark: primaryDarkenColorDark,\n },\n secondary: {\n main: secondaryMainColorDark,\n light: secondaryLightenColorDark,\n dark: secondaryDarkenColorDark,\n },\n },\n },\n },\n container: widgetTheme.container,\n routesContainer: widgetTheme.routesContainer,\n chainSidebarContainer: widgetTheme.chainSidebarContainer,\n header: widgetTheme.header,\n navigation: {\n edge: true,\n ...widgetTheme.navigation,\n },\n typography: {\n fontFamily: 'Inter var, Inter, sans-serif',\n ...widgetTheme.typography,\n },\n shape: {\n ...shape,\n ...widgetTheme.shape,\n },\n breakpoints: {\n values: {\n xs: 360,\n sm: 416,\n md: 900,\n lg: 1200,\n xl: 1536,\n },\n },\n components: {\n MuiScopedCssBaseline: {\n styleOverrides: {\n root: {\n fontFamily: 'Inter, sans-serif',\n ...widgetTheme.typography,\n '@supports (font-variation-settings: normal)': {\n fontFamily: 'Inter var, sans-serif',\n ...widgetTheme.typography,\n },\n },\n },\n },\n MuiAppBar: {\n styleOverrides: {\n root: ({ ownerState }) => ({\n minHeight: 40,\n padding: 0,\n ...getStyleOverrides('MuiAppBar', 'root', widgetTheme, ownerState),\n }),\n },\n },\n MuiCard: {\n defaultProps: {\n variant: 'outlined',\n ...widgetTheme.components?.MuiCard?.defaultProps,\n },\n styleOverrides: {\n root: ({ ownerState, theme }) => {\n const root = widgetTheme.components?.MuiCard?.styleOverrides\n ?.root as CSSObject\n const rootHover = root?.['&:hover']\n return {\n backgroundColor: theme.vars.palette.background.paper,\n backgroundImage: 'none',\n borderRadius: theme.vars.shape.borderRadius,\n overflow: 'hidden',\n position: 'relative',\n boxSizing: 'border-box',\n transition: theme.transitions.create(\n ['background-color', 'filter'],\n {\n duration: theme.transitions.duration.enteringScreen,\n easing: theme.transitions.easing.easeOut,\n }\n ),\n ...(!!ownerState.onClick && {\n '&:hover': {\n cursor: 'pointer',\n },\n }),\n ...(!!ownerState.onClick &&\n (ownerState.variant === 'outlined' ||\n ownerState.variant === 'filled') && {\n '&:hover': {\n cursor: 'pointer',\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.background.paper} 98%, black)`,\n ...theme.applyStyles('dark', {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.background.paper} 98%, white)`,\n }),\n },\n }),\n ...(!!ownerState.onClick &&\n ownerState.variant === 'elevation' && {\n '&:hover': {\n cursor: 'pointer',\n filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08))`,\n ...theme.applyStyles('dark', {\n filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.backgroundChannel} / 0.08))`,\n }),\n },\n }),\n ...(typeof root === 'object' && root),\n ...(!!ownerState.onClick &&\n !!rootHover && {\n '&:hover': {\n ...rootHover,\n ...theme.applyStyles('dark', {\n ...rootHover,\n }),\n },\n }),\n ...(!ownerState.onClick && {\n '&:hover': {},\n }),\n }\n },\n },\n variants: widgetTheme.components?.MuiCard?.variants ?? [\n {\n props: { variant: 'outlined' },\n style: ({ theme }) => ({\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: theme.vars.palette.grey[300],\n ...theme.applyStyles('dark', {\n borderColor: theme.vars.palette.grey[800],\n }),\n }),\n },\n {\n props: { variant: 'elevation' },\n style: ({ theme }) => ({\n border: 'none',\n boxShadow: 'none',\n filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04))`,\n ...theme.applyStyles('dark', {\n filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.backgroundChannel} / 0.04))`,\n }),\n }),\n },\n {\n props: { variant: 'filled' },\n style: {\n border: 'none',\n },\n },\n ],\n },\n MuiInputCard: {\n ...widgetTheme.components?.MuiInputCard,\n },\n MuiButtonBase: {\n styleOverrides: {\n // This `css()` function invokes keyframes. `styled-components` only supports keyframes\n // in string templates. Do not convert these styles in JS object as it will break.\n root: css`\n &\n .${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible} {\n opacity: 0.1;\n animation-name: ${enterKeyframe};\n }\n `,\n },\n },\n MuiButton: {\n defaultProps: {\n disableElevation: true,\n ...widgetTheme.components?.MuiButton?.defaultProps,\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n borderRadius: theme.vars.shape.borderRadiusSecondary,\n textTransform: 'none',\n fontSize: 16,\n fontWeight: 600,\n '&.Mui-disabled, &.Mui-disabled:hover': {\n color: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.56)`,\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n },\n [`&.${buttonClasses.loading}.Mui-disabled`]: {\n backgroundColor: theme.vars.palette.primary.main,\n color: theme.palette.getContrastText(theme.palette.primary.main),\n cursor: 'auto',\n pointerEvents: 'auto',\n },\n [`.${buttonClasses.loadingIndicator}`]: {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n [`&.${buttonClasses.root}.${buttonClasses.loading}`]: {\n color: 'transparent',\n },\n ...getStyleOverrides('MuiButton', 'root', widgetTheme, ownerState),\n }),\n text: ({ theme, ownerState }) => ({\n backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.08)`,\n color: theme.vars.palette.primary.main,\n '&:hover': {\n backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.12)`,\n },\n ...theme.applyStyles('dark', {\n backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.42)`,\n color: theme.palette.getContrastText(\n alpha(theme.palette.primary.main, 0.08)\n ),\n '&:hover': {\n backgroundColor: `rgba(${theme.vars.palette.primary.mainChannel} / 0.56)`,\n },\n }),\n ...getStyleOverrides('MuiButton', 'text', widgetTheme, ownerState),\n }),\n contained: ({ ownerState }) => ({\n '&:hover': {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n ...getStyleOverrides(\n 'MuiButton',\n 'contained',\n widgetTheme,\n ownerState\n ),\n }),\n sizeMedium: ({ ownerState }) => ({\n padding: '10px 14px',\n ...getStyleOverrides(\n 'MuiButton',\n 'sizeMedium',\n widgetTheme,\n ownerState\n ),\n }),\n },\n },\n MuiIconButton: {\n ...widgetTheme.components?.MuiIconButton,\n styleOverrides: {\n ...widgetTheme.components?.MuiIconButton?.styleOverrides,\n root: ({ ownerState }) => ({\n color: 'inherit',\n '&:hover': {\n color: 'inherit',\n },\n ...getStyleOverrides(\n 'MuiIconButton',\n 'root',\n widgetTheme,\n ownerState\n ),\n }),\n },\n },\n MuiAvatar: {\n styleOverrides: {\n root: {\n height: 40,\n width: 40,\n },\n img: {\n objectFit: 'contain',\n },\n },\n ...widgetTheme.components?.MuiAvatar,\n },\n MuiListItemText: {\n styleOverrides: {\n primary: ({ theme }) => ({\n fontWeight: 600,\n fontSize: '1.125rem',\n lineHeight: '1.2778',\n color: theme.vars.palette.text.primary,\n }),\n secondary: ({ theme }) => ({\n fontWeight: 500,\n fontSize: '0.75rem',\n color: theme.vars.palette.text.secondary,\n }),\n },\n },\n MuiTooltip: {\n defaultProps: {\n enterDelay: 400,\n disableInteractive: true,\n arrow: true,\n placement: 'top',\n },\n styleOverrides: {\n tooltip: ({ theme }) => ({\n backgroundColor: 'rgb(0 0 0 / 64%)',\n backdropFilter: 'blur(3px)',\n fontSize: '0.75rem',\n padding: theme.spacing(1, 1.5),\n }),\n arrow: {\n color: 'rgb(0 0 0 / 64%)',\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n paper: ({ theme }) => ({\n backgroundColor: theme.vars.palette.background.paper,\n backgroundImage: 'none',\n }),\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n backgroundImage: 'none',\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n MuiTabs: {\n ...widgetTheme.components?.MuiTabs,\n styleOverrides: {\n ...widgetTheme.components?.MuiTabs?.styleOverrides,\n root: ({ theme, ownerState }) => {\n const rootStyleOverrides = getStyleOverrides(\n 'MuiTabs',\n 'root',\n widgetTheme,\n ownerState\n )\n return {\n backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,\n ...theme.applyStyles('dark', {\n backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)`,\n }),\n borderRadius: theme.vars.shape.borderRadius,\n ...rootStyleOverrides,\n [`.${tabsClasses.indicator}`]: {\n backgroundColor: theme.vars.palette.background.paper,\n ...theme.applyStyles('dark', {\n backgroundColor: `rgba(${theme.vars.palette.common.backgroundChannel} / 0.56)`,\n }),\n borderRadius:\n theme.shape.borderRadius > 0\n ? `calc(${theme.vars.shape.borderRadius} - 4px)`\n : theme.vars.shape.borderRadius,\n boxShadow: `0px 2px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,\n ...rootStyleOverrides?.[`.${tabsClasses.indicator}`],\n },\n }\n },\n },\n },\n MuiNavigationTabs: {\n ...widgetTheme.components?.MuiNavigationTabs,\n },\n MuiNavigationTab: {\n ...widgetTheme.components?.MuiNavigationTab,\n },\n MuiCheckbox: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n ...widgetTheme.components?.MuiCheckbox,\n },\n },\n })\n\n return theme\n}\n"],"mappings":";;;;AAsBA,MAAM,QAAe;CACnB,cAAc;CACd,uBAAuB;CACvB,sBAAsB;CACvB;AAED,MAAM,gBAAgB,SAAS;;;;;;;;;;AAW/B,MAAaA,iBAAe,cAA2B,EAAE,KAAY;CACnE,MAAM,yBACJ,YAAY,cAAc,OAAO,WAAW,YAAY;CAC1D,MAAM,wBACJ,YAAY,cAAc,MAAM,WAAW,YAAY;CAEzD,MAAM,yBACH,wBAAwB,UAAuC,QAChE,QAAQ,QAAQ;CAClB,MAAM,wBACH,uBAAuB,UAAuC,QAC/D,QAAQ,QAAQ;CAElB,MAAM,2BAA2B,QAAQ,uBAAuB,IAAK;CACrE,MAAM,0BAA0B,OAAO,uBAAuB,GAAI;CAClE,MAAM,0BACJ,0BAA0B,uBACtB,2BACA,QAAQ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c,MAAM,KAAK,MAAM;OAC/B,GAAG;QACF,IAAI,YAAY,cAAc;QAC7B,iBAAiB,MAAM,KAAK,QAAQ,WAAW;QAC/C,GAAG,MAAM,YAAY,QAAQ,EAC3B,iBAAiB,QAAQ,MAAM,KAAK,QAAQ,OAAO,kBAAkB,WACtE,CAAC;QACF,cACE,MAAM,MAAM,eAAe,IACvB,QAAQ,MAAM,KAAK,MAAM,aAAa,WACtC,MAAM,KAAK,MAAM;QACvB,WAAW,oBAAoB,MAAM,KAAK,QAAQ,OAAO,oBAAoB;QAC7E,GAAG,qBAAqB,IAAI,YAAY;QACzC;OACF;;KAEJ;IACF;GACD,mBAAmB,EACjB,GAAG,YAAY,YAAY,mBAC5B;GACD,kBAAkB,EAChB,GAAG,YAAY,YAAY,kBAC5B;GACD,aAAa;IACX,gBAAgB,EACd,MAAM,EACJ,WAAW,EACT,iBAAiB,eAClB,EACF,EACF;IACD,GAAG,YAAY,YAAY;IAC5B;GACF;EACF,CAAC;AAEF,QAAO"}
1
+ {"version":3,"file":"createTheme.js","names":["createTheme","createMuiTheme"],"sources":["../../../src/themes/createTheme.ts"],"sourcesContent":["import type {\n CSSObject,\n Shape,\n SimplePaletteColorOptions,\n Theme,\n} from '@mui/material'\nimport {\n alpha,\n buttonClasses,\n createTheme as createMuiTheme,\n css,\n darken,\n keyframes,\n lighten,\n tabsClasses,\n touchRippleClasses,\n} from '@mui/material'\nimport type { WidgetTheme } from '../types/widget.js'\nimport { palette, paletteDark, paletteLight } from './palettes.js'\nimport type {} from './types.js'\nimport { getStyleOverrides } from './utils.js'\n\nconst shape: Shape = {\n borderRadius: 12,\n borderRadiusSecondary: 12,\n borderRadiusTertiary: 24,\n}\n\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.05;\n }\n 100% {\n transform: scale(1);\n opacity: 0.1;\n }\n`\n\nexport const createTheme = (widgetTheme: WidgetTheme = {}): Theme => {\n const configuredPaletteLight =\n widgetTheme.colorSchemes?.light?.palette ?? widgetTheme.palette\n const configuredPaletteDark =\n widgetTheme.colorSchemes?.dark?.palette ?? widgetTheme.palette\n\n const primaryMainColorLight =\n (configuredPaletteLight?.primary as SimplePaletteColorOptions)?.main ??\n palette.primary.main\n const primaryMainColorDark =\n (configuredPaletteDark?.primary as SimplePaletteColorOptions)?.main ??\n palette.primary.main\n\n const primaryLightenColorLight = lighten(primaryMainColorLight, 0.84)\n const primaryDarkenColorLight = darken(primaryMainColorLight, 0.2)\n const primaryLightenColorDark =\n primaryMainColorLight === primaryMainColorDark\n ? primaryLightenColorLight\n : lighten(primaryMainColorDark, 0.84)\n const primaryDarkenColorDark =\n primaryMainColorLight === primaryMainColorDark\n ? primaryDarkenColorLight\n : darken(primaryMainColorDark, 0.2)\n\n const secondaryMainColorLight =\n (configuredPaletteLight?.secondary as SimplePaletteColorOptions)?.main ??\n palette.secondary.main\n const secondaryMainColorDark =\n (configuredPaletteDark?.secondary as SimplePaletteColorOptions)?.main ??\n palette.secondary.main\n\n const secondaryLightenColorLight = lighten(secondaryMainColorLight, 0.84)\n const secondaryDarkenColorLight = darken(secondaryMainColorLight, 0.2)\n const secondaryLightenColorDark =\n secondaryMainColorLight === secondaryMainColorDark\n ? secondaryLightenColorLight\n : lighten(secondaryMainColorDark, 0.84)\n const secondaryDarkenColorDark =\n secondaryMainColorLight === secondaryMainColorDark\n ? secondaryDarkenColorLight\n : darken(secondaryMainColorDark, 0.2)\n\n const theme = createMuiTheme({\n cssVariables: {\n cssVarPrefix: 'lifi',\n colorSchemeSelector: 'class',\n nativeColor: true,\n },\n colorSchemes: {\n light: {\n palette: {\n ...palette,\n ...paletteLight,\n ...(widgetTheme.colorSchemes?.light?.palette ?? widgetTheme.palette),\n primary: {\n main: primaryMainColorLight,\n light: primaryLightenColorLight,\n dark: primaryDarkenColorLight,\n },\n secondary: {\n main: secondaryMainColorLight,\n light: secondaryLightenColorLight,\n dark: secondaryDarkenColorLight,\n },\n },\n },\n dark: {\n palette: {\n ...palette,\n ...paletteDark,\n ...(widgetTheme.colorSchemes?.dark?.palette ?? widgetTheme.palette),\n primary: {\n main: primaryMainColorDark,\n light: primaryLightenColorDark,\n dark: primaryDarkenColorDark,\n },\n secondary: {\n main: secondaryMainColorDark,\n light: secondaryLightenColorDark,\n dark: secondaryDarkenColorDark,\n },\n },\n },\n },\n container: widgetTheme.container,\n routesContainer: widgetTheme.routesContainer,\n chainSidebarContainer: widgetTheme.chainSidebarContainer,\n header: widgetTheme.header,\n navigation: {\n edge: true,\n ...widgetTheme.navigation,\n },\n typography: {\n fontFamily: 'Inter, sans-serif',\n ...widgetTheme.typography,\n },\n shape: {\n ...shape,\n ...widgetTheme.shape,\n },\n breakpoints: {\n values: {\n xs: 360,\n sm: 416,\n md: 900,\n lg: 1200,\n xl: 1536,\n },\n },\n components: {\n MuiScopedCssBaseline: {\n styleOverrides: {\n root: {\n fontFamily: 'Inter, sans-serif',\n ...widgetTheme.typography,\n },\n },\n },\n MuiAppBar: {\n styleOverrides: {\n root: ({ ownerState }) => ({\n minHeight: 40,\n padding: 0,\n ...getStyleOverrides('MuiAppBar', 'root', widgetTheme, ownerState),\n }),\n },\n },\n MuiCard: {\n defaultProps: {\n variant: 'outlined',\n ...widgetTheme.components?.MuiCard?.defaultProps,\n },\n styleOverrides: {\n root: ({ ownerState, theme }) => {\n const root = widgetTheme.components?.MuiCard?.styleOverrides\n ?.root as CSSObject\n const rootHover = root?.['&:hover']\n return {\n backgroundColor: theme.vars.palette.background.paper,\n backgroundImage: 'none',\n borderRadius: theme.vars.shape.borderRadius,\n overflow: 'hidden',\n position: 'relative',\n boxSizing: 'border-box',\n transition: theme.transitions.create(\n ['background-color', 'filter'],\n {\n duration: theme.transitions.duration.enteringScreen,\n easing: theme.transitions.easing.easeOut,\n }\n ),\n ...(!!ownerState.onClick && {\n '&:hover': {\n cursor: 'pointer',\n },\n }),\n ...(!!ownerState.onClick &&\n (ownerState.variant === 'outlined' ||\n ownerState.variant === 'filled') && {\n '&:hover': {\n cursor: 'pointer',\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.background.paper} 98%, black)`,\n ...theme.applyStyles('dark', {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.background.paper} 98%, white)`,\n }),\n },\n }),\n ...(!!ownerState.onClick &&\n ownerState.variant === 'elevation' && {\n '&:hover': {\n cursor: 'pointer',\n filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent))`,\n ...theme.applyStyles('dark', {\n filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.background} 8%, transparent))`,\n }),\n },\n }),\n ...(typeof root === 'object' && root),\n ...(!!ownerState.onClick &&\n !!rootHover && {\n '&:hover': {\n ...rootHover,\n ...theme.applyStyles('dark', {\n ...rootHover,\n }),\n },\n }),\n ...(!ownerState.onClick && {\n '&:hover': {},\n }),\n }\n },\n },\n variants: widgetTheme.components?.MuiCard?.variants ?? [\n {\n props: { variant: 'outlined' },\n style: ({ theme }) => ({\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: theme.vars.palette.grey[300],\n ...theme.applyStyles('dark', {\n borderColor: theme.vars.palette.grey[800],\n }),\n }),\n },\n {\n props: { variant: 'elevation' },\n style: ({ theme }) => ({\n border: 'none',\n boxShadow: 'none',\n filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent))`,\n ...theme.applyStyles('dark', {\n filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.background} 4%, transparent))`,\n }),\n }),\n },\n {\n props: { variant: 'filled' },\n style: {\n border: 'none',\n },\n },\n ],\n },\n MuiInputCard: {\n ...widgetTheme.components?.MuiInputCard,\n },\n MuiButtonBase: {\n styleOverrides: {\n // This `css()` function invokes keyframes. `styled-components` only supports keyframes\n // in string templates. Do not convert these styles in JS object as it will break.\n root: css`\n &\n .${touchRippleClasses.ripple}.${touchRippleClasses.rippleVisible} {\n opacity: 0.1;\n animation-name: ${enterKeyframe};\n }\n `,\n },\n },\n MuiButton: {\n defaultProps: {\n disableElevation: true,\n ...widgetTheme.components?.MuiButton?.defaultProps,\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n borderRadius: theme.vars.shape.borderRadiusSecondary,\n textTransform: 'none',\n fontSize: 16,\n fontWeight: 600,\n '&.Mui-disabled, &.Mui-disabled:hover': {\n color: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 56%, transparent)`,\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n },\n [`&.${buttonClasses.loading}.Mui-disabled`]: {\n backgroundColor: theme.vars.palette.primary.main,\n color: theme.palette.getContrastText(theme.palette.primary.main),\n cursor: 'auto',\n pointerEvents: 'auto',\n },\n [`.${buttonClasses.loadingIndicator}`]: {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n [`&.${buttonClasses.root}.${buttonClasses.loading}`]: {\n color: 'transparent',\n },\n ...getStyleOverrides('MuiButton', 'root', widgetTheme, ownerState),\n }),\n text: ({ theme, ownerState }) => ({\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 8%, transparent)`,\n color: theme.vars.palette.primary.main,\n '&:hover': {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 12%, transparent)`,\n },\n ...theme.applyStyles('dark', {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 42%, transparent)`,\n color: theme.palette.getContrastText(\n alpha(theme.palette.primary.main, 0.08)\n ),\n '&:hover': {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.main} 56%, transparent)`,\n },\n }),\n ...getStyleOverrides('MuiButton', 'text', widgetTheme, ownerState),\n }),\n contained: ({ ownerState }) => ({\n '&:hover': {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n ...getStyleOverrides(\n 'MuiButton',\n 'contained',\n widgetTheme,\n ownerState\n ),\n }),\n sizeMedium: ({ ownerState }) => ({\n padding: '10px 14px',\n ...getStyleOverrides(\n 'MuiButton',\n 'sizeMedium',\n widgetTheme,\n ownerState\n ),\n }),\n },\n },\n MuiIconButton: {\n ...widgetTheme.components?.MuiIconButton,\n styleOverrides: {\n ...widgetTheme.components?.MuiIconButton?.styleOverrides,\n root: ({ ownerState }) => ({\n color: 'inherit',\n '&:hover': {\n color: 'inherit',\n },\n ...getStyleOverrides(\n 'MuiIconButton',\n 'root',\n widgetTheme,\n ownerState\n ),\n }),\n },\n },\n MuiAvatar: {\n styleOverrides: {\n root: {\n height: 40,\n width: 40,\n },\n img: {\n objectFit: 'contain',\n },\n },\n ...widgetTheme.components?.MuiAvatar,\n },\n MuiListItemText: {\n styleOverrides: {\n primary: ({ theme }) => ({\n fontWeight: 600,\n fontSize: '1.125rem',\n lineHeight: '1.2778',\n color: theme.vars.palette.text.primary,\n }),\n secondary: ({ theme }) => ({\n fontWeight: 500,\n fontSize: '0.75rem',\n color: theme.vars.palette.text.secondary,\n }),\n },\n },\n MuiTooltip: {\n defaultProps: {\n enterDelay: 400,\n disableInteractive: true,\n arrow: true,\n placement: 'top',\n },\n styleOverrides: {\n tooltip: ({ theme }) => ({\n backgroundColor: 'rgb(0 0 0 / 64%)',\n backdropFilter: 'blur(3px)',\n fontSize: '0.75rem',\n padding: theme.spacing(1, 1.5),\n }),\n arrow: {\n color: 'rgb(0 0 0 / 64%)',\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n paper: ({ theme }) => ({\n backgroundColor: theme.vars.palette.background.paper,\n backgroundImage: 'none',\n }),\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n backgroundImage: 'none',\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n MuiTabs: {\n ...widgetTheme.components?.MuiTabs,\n styleOverrides: {\n ...widgetTheme.components?.MuiTabs?.styleOverrides,\n root: ({ theme, ownerState }) => {\n const rootStyleOverrides = getStyleOverrides(\n 'MuiTabs',\n 'root',\n widgetTheme,\n ownerState\n )\n return {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,\n ...theme.applyStyles('dark', {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent)`,\n }),\n borderRadius: theme.vars.shape.borderRadius,\n ...rootStyleOverrides,\n [`.${tabsClasses.indicator}`]: {\n backgroundColor: theme.vars.palette.background.paper,\n ...theme.applyStyles('dark', {\n backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.background} 56%, transparent)`,\n }),\n borderRadius:\n theme.shape.borderRadius > 0\n ? `calc(${theme.vars.shape.borderRadius} - 4px)`\n : theme.vars.shape.borderRadius,\n boxShadow: `0px 2px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,\n ...rootStyleOverrides?.[`.${tabsClasses.indicator}`],\n },\n }\n },\n },\n },\n MuiNavigationTabs: {\n ...widgetTheme.components?.MuiNavigationTabs,\n },\n MuiNavigationTab: {\n ...widgetTheme.components?.MuiNavigationTab,\n },\n MuiCheckbox: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n ...widgetTheme.components?.MuiCheckbox,\n },\n },\n })\n\n return theme\n}\n"],"mappings":";;;;AAsBA,MAAM,QAAe;CACnB,cAAc;CACd,uBAAuB;CACvB,sBAAsB;CACvB;AAED,MAAM,gBAAgB,SAAS;;;;;;;;;;AAW/B,MAAaA,iBAAe,cAA2B,EAAE,KAAY;CACnE,MAAM,yBACJ,YAAY,cAAc,OAAO,WAAW,YAAY;CAC1D,MAAM,wBACJ,YAAY,cAAc,MAAM,WAAW,YAAY;CAEzD,MAAM,yBACH,wBAAwB,UAAuC,QAChE,QAAQ,QAAQ;CAClB,MAAM,wBACH,uBAAuB,UAAuC,QAC/D,QAAQ,QAAQ;CAElB,MAAM,2BAA2B,QAAQ,uBAAuB,IAAK;CACrE,MAAM,0BAA0B,OAAO,uBAAuB,GAAI;CAClE,MAAM,0BACJ,0BAA0B,uBACtB,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QACF,IAAI,YAAY,cAAc;QAC7B,iBAAiB,MAAM,KAAK,QAAQ,WAAW;QAC/C,GAAG,MAAM,YAAY,QAAQ,EAC3B,iBAAiB,sBAAsB,MAAM,KAAK,QAAQ,OAAO,WAAW,qBAC7E,CAAC;QACF,cACE,MAAM,MAAM,eAAe,IACvB,QAAQ,MAAM,KAAK,MAAM,aAAa,WACtC,MAAM,KAAK,MAAM;QACvB,WAAW,kCAAkC,MAAM,KAAK,QAAQ,OAAO,aAAa;QACpF,GAAG,qBAAqB,IAAI,YAAY;QACzC;OACF;;KAEJ;IACF;GACD,mBAAmB,EACjB,GAAG,YAAY,YAAY,mBAC5B;GACD,kBAAkB,EAChB,GAAG,YAAY,YAAY,kBAC5B;GACD,aAAa;IACX,gBAAgB,EACd,MAAM,EACJ,WAAW,EACT,iBAAiB,eAClB,EACF,EACF;IACD,GAAG,YAAY,YAAY;IAC5B;GACF;EACF,CAAC;AAEF,QAAO"}
@@ -4,12 +4,6 @@ import { CardProps, ComponentsOverrides, ComponentsVariants, SimplePaletteColorO
4
4
 
5
5
  //#region src/themes/types.d.ts
6
6
  declare module "@mui/material/styles" {
7
- interface TypographyVariants {
8
- "@supports (font-variation-settings: normal)": React.CSSProperties;
9
- }
10
- interface TypographyVariantsOptions {
11
- "@supports (font-variation-settings: normal)"?: React.CSSProperties;
12
- }
13
7
  interface Shape {
14
8
  borderRadius: number;
15
9
  borderRadiusSecondary: number;
@@ -70,9 +64,4 @@ declare module "@mui/material/Paper" {
70
64
  filled: true;
71
65
  }
72
66
  }
73
- declare module "@mui/material/Typography" {
74
- interface TypographyPropsVariantOverrides {
75
- "@supports (font-variation-settings: normal)": true;
76
- }
77
- }
78
67
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/themes/types.ts"],"mappings":";;;;;;YAcY,kBAAA;IACR,6CAAA,EAA+C,KAAA,CAAM,aAAA;EAAA;EAAA,UAE7C,yBAAA;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LightTheme = {
34
34
  MuiCard: { defaultProps: { variant: "elevation" } },
35
35
  MuiNavigationTabs: { styleOverrides: { root: ({ theme }) => ({ [`.${tabsClasses.indicator}`]: {
36
36
  backgroundColor: "#ffffff",
37
- filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08))`,
37
+ filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent))`,
38
38
  borderRadius: "16px"
39
39
  } }) } }
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"watermelonLight.js","names":[],"sources":["../../../src/themes/watermelonLight.ts"],"sourcesContent":["import { tabsClasses } from '@mui/material'\nimport type { WidgetTheme } from '../types/widget.js'\n\nexport const watermelonLightTheme: WidgetTheme = {\n colorSchemes: {\n light: {\n palette: {\n primary: {\n main: '#f7557c',\n },\n secondary: {\n main: '#00A35A',\n },\n background: {\n default: '#ffeff3',\n paper: '#ffffff',\n },\n text: {\n primary: '#190006',\n secondary: '#766066',\n },\n grey: {\n 200: '#F0E5E8',\n 300: '#E5D7DA',\n 700: '#7A666B',\n 800: '#58373F',\n },\n playground: {\n main: '#f7557c',\n },\n },\n },\n },\n shape: {\n borderRadius: 16,\n borderRadiusSecondary: 16,\n borderRadiusTertiary: 24,\n },\n typography: {\n fontFamily: 'Inter, sans-serif',\n },\n container: {\n boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.12)',\n borderRadius: '16px',\n },\n components: {\n MuiCard: {\n defaultProps: { variant: 'elevation' },\n },\n MuiNavigationTabs: {\n styleOverrides: {\n root: ({ theme }) => ({\n [`.${tabsClasses.indicator}`]: {\n backgroundColor: '#ffffff',\n filter: `drop-shadow(0 1px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08))`,\n borderRadius: '16px',\n },\n }),\n },\n },\n // MuiIconButton: {\n // styleOverrides: {\n // root: ({ theme }) => ({\n // backgroundColor: alpha(theme.palette.common.white, 0.04),\n // color: 'inherit',\n // borderRadius: theme.vars.shape.borderRadiusSecondary,\n // '&:hover': {\n // backgroundColor: alpha(\n // theme.palette.mode === 'light'\n // ? theme.palette.common.black\n // : theme.palette.common.white,\n // 0.08,\n // ),\n // color: 'inherit',\n // },\n // }),\n // },\n // },\n },\n} as WidgetTheme\n"],"mappings":";;AAGA,MAAa,uBAAoC;CAC/C,cAAc,EACZ,OAAO,EACL,SAAS;EACP,SAAS,EACP,MAAM,WACP;EACD,WAAW,EACT,MAAM,WACP;EACD,YAAY;GACV,SAAS;GACT,OAAO;GACR;EACD,MAAM;GACJ,SAAS;GACT,WAAW;GACZ;EACD,MAAM;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACN;EACD,YAAY,EACV,MAAM,WACP;EACF,EACF,EACF;CACD,OAAO;EACL,cAAc;EACd,uBAAuB;EACvB,sBAAsB;EACvB;CACD,YAAY,EACV,YAAY,qBACb;CACD,WAAW;EACT,WAAW;EACX,cAAc;EACf;CACD,YAAY;EACV,SAAS,EACP,cAAc,EAAE,SAAS,aAAa,EACvC;EACD,mBAAmB,EACjB,gBAAgB,EACd,OAAO,EAAE,aAAa,GACnB,IAAI,YAAY,cAAc;GAC7B,iBAAiB;GACjB,QAAQ,8BAA8B,MAAM,KAAK,QAAQ,OAAO,oBAAoB;GACpF,cAAc;GACf,EACF,GACF,EACF;EAmBF;CACF"}
1
+ {"version":3,"file":"watermelonLight.js","names":[],"sources":["../../../src/themes/watermelonLight.ts"],"sourcesContent":["import { tabsClasses } from '@mui/material'\nimport type { WidgetTheme } from '../types/widget.js'\n\nexport const watermelonLightTheme: WidgetTheme = {\n colorSchemes: {\n light: {\n palette: {\n primary: {\n main: '#f7557c',\n },\n secondary: {\n main: '#00A35A',\n },\n background: {\n default: '#ffeff3',\n paper: '#ffffff',\n },\n text: {\n primary: '#190006',\n secondary: '#766066',\n },\n grey: {\n 200: '#F0E5E8',\n 300: '#E5D7DA',\n 700: '#7A666B',\n 800: '#58373F',\n },\n playground: {\n main: '#f7557c',\n },\n },\n },\n },\n shape: {\n borderRadius: 16,\n borderRadiusSecondary: 16,\n borderRadiusTertiary: 24,\n },\n typography: {\n fontFamily: 'Inter, sans-serif',\n },\n container: {\n boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.12)',\n borderRadius: '16px',\n },\n components: {\n MuiCard: {\n defaultProps: { variant: 'elevation' },\n },\n MuiNavigationTabs: {\n styleOverrides: {\n root: ({ theme }) => ({\n [`.${tabsClasses.indicator}`]: {\n backgroundColor: '#ffffff',\n filter: `drop-shadow(0 1px 4px color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent))`,\n borderRadius: '16px',\n },\n }),\n },\n },\n // MuiIconButton: {\n // styleOverrides: {\n // root: ({ theme }) => ({\n // backgroundColor: alpha(theme.palette.common.white, 0.04),\n // color: 'inherit',\n // borderRadius: theme.vars.shape.borderRadiusSecondary,\n // '&:hover': {\n // backgroundColor: alpha(\n // theme.palette.mode === 'light'\n // ? theme.palette.common.black\n // : theme.palette.common.white,\n // 0.08,\n // ),\n // color: 'inherit',\n // },\n // }),\n // },\n // },\n },\n} as WidgetTheme\n"],"mappings":";;AAGA,MAAa,uBAAoC;CAC/C,cAAc,EACZ,OAAO,EACL,SAAS;EACP,SAAS,EACP,MAAM,WACP;EACD,WAAW,EACT,MAAM,WACP;EACD,YAAY;GACV,SAAS;GACT,OAAO;GACR;EACD,MAAM;GACJ,SAAS;GACT,WAAW;GACZ;EACD,MAAM;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACN;EACD,YAAY,EACV,MAAM,WACP;EACF,EACF,EACF;CACD,OAAO;EACL,cAAc;EACd,uBAAuB;EACvB,sBAAsB;EACvB;CACD,YAAY,EACV,YAAY,qBACb;CACD,WAAW;EACT,WAAW;EACX,cAAc;EACf;CACD,YAAY;EACV,SAAS,EACP,cAAc,EAAE,SAAS,aAAa,EACvC;EACD,mBAAmB,EACjB,gBAAgB,EACd,OAAO,EAAE,aAAa,GACnB,IAAI,YAAY,cAAc;GAC7B,iBAAiB;GACjB,QAAQ,4CAA4C,MAAM,KAAK,QAAQ,OAAO,aAAa;GAC3F,cAAc;GACf,EACF,GACF,EACF;EAmBF;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/widget",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.14",
4
4
  "description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -35,9 +35,9 @@
35
35
  "@emotion/react": "^11.14.0",
36
36
  "@emotion/styled": "^11.14.1",
37
37
  "@lifi/sdk": "4.0.0-beta.5",
38
- "@mui/icons-material": "^7.3.9",
39
- "@mui/material": "^7.3.9",
40
- "@mui/system": "^7.3.9",
38
+ "@mui/icons-material": "^7.3.10",
39
+ "@mui/material": "^7.3.10",
40
+ "@mui/system": "^7.3.10",
41
41
  "@tanstack/react-router": "^1.168.10",
42
42
  "@tanstack/react-virtual": "^3.13.23",
43
43
  "i18next": "^26.0.4",
@@ -47,7 +47,7 @@
47
47
  "react-intersection-observer": "^10.0.3",
48
48
  "react-transition-group": "^4.4.5",
49
49
  "zustand": "^5.0.12",
50
- "@lifi/wallet-management": "4.0.0-beta.11",
50
+ "@lifi/wallet-management": "4.0.0-beta.12",
51
51
  "@lifi/widget-provider": "4.0.0-beta.11"
52
52
  },
53
53
  "peerDependencies": {
@@ -14,12 +14,12 @@ export const InputPriceButton: React.FC<React.ComponentProps<typeof Button>> =
14
14
  ...(onClick
15
15
  ? {
16
16
  '&:hover': {
17
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
17
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
18
18
  },
19
19
  ...theme.applyStyles('dark', {
20
20
  backgroundColor: 'transparent',
21
21
  '&:hover': {
22
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
22
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
23
23
  },
24
24
  }),
25
25
  }
@@ -6,21 +6,21 @@ export const ButtonTertiary: React.FC<React.ComponentProps<typeof Button>> =
6
6
  color: theme.vars.palette.text.primary,
7
7
  height: 40,
8
8
  fontSize: 14,
9
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
9
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
10
10
  '&:hover, &:active': {
11
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)`,
11
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent)`,
12
12
  },
13
13
  [`&.${buttonClasses.loading}:disabled`]: {
14
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
14
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
15
15
  },
16
16
  ...theme.applyStyles('dark', {
17
17
  color: theme.vars.palette.text.primary,
18
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
18
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
19
19
  '&:hover, &:active': {
20
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)`,
20
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent)`,
21
21
  },
22
22
  [`&.${buttonClasses.loading}:disabled`]: {
23
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
23
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
24
24
  },
25
25
  }),
26
26
  [`.${buttonClasses.loadingIndicator}`]: {
@@ -52,13 +52,13 @@ export const Card: React.FC<React.ComponentProps<typeof MuiCard> & CardProps> =
52
52
  style: {
53
53
  borderWidth: 1,
54
54
  borderStyle: 'solid',
55
- borderColor: `rgba(${theme.vars.palette.secondary.mainChannel} / 0.32)`,
55
+ borderColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 32%, transparent)`,
56
56
  backgroundColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 24%, white)`,
57
57
  '&:hover': {
58
58
  backgroundColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 28%, white)`,
59
59
  },
60
60
  ...theme.applyStyles('dark', {
61
- borderColor: `rgba(${theme.vars.palette.secondary.mainChannel} / 0.32)`,
61
+ borderColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 32%, transparent)`,
62
62
  backgroundColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 24%, black)`,
63
63
  '&:hover': {
64
64
  backgroundColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 28%, black)`,
@@ -11,9 +11,9 @@ export const CardIconButton: React.FC<
11
11
  >(({ theme }) => {
12
12
  return {
13
13
  padding: theme.spacing(0.5),
14
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
14
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
15
15
  '&:hover': {
16
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.08)`,
16
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 8%, transparent)`,
17
17
  },
18
18
  fontSize: '1rem',
19
19
  }
@@ -47,10 +47,10 @@ export const CardLabel: React.FC<
47
47
  {
48
48
  props: { variant: 'warning' },
49
49
  style: {
50
- backgroundColor: `rgba(${theme.vars.palette.warning.mainChannel} / 0.32)`,
50
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.warning.main} 32%, transparent)`,
51
51
  color: `color-mix(in srgb, ${theme.vars.palette.warning.main} 64%, black)`,
52
52
  ...theme.applyStyles('dark', {
53
- backgroundColor: `rgba(${theme.vars.palette.warning.mainChannel} / 0.16)`,
53
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.warning.main} 16%, transparent)`,
54
54
  color: theme.vars.palette.warning.main,
55
55
  }),
56
56
  },
@@ -8,6 +8,6 @@ export const ContextMenuButton: React.FC<
8
8
  top: theme.spacing(1.75),
9
9
  right: theme.spacing(2),
10
10
  '&:hover': {
11
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
11
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
12
12
  },
13
13
  }))
@@ -41,14 +41,14 @@ export const ActivitiesIconButton: React.FC<
41
41
  {
42
42
  props: { active: true },
43
43
  style: ({ theme }) => ({
44
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.08)`,
44
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 8%, transparent)`,
45
45
  '&:hover': {
46
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.12)`,
46
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 12%, transparent)`,
47
47
  },
48
48
  ...theme.applyStyles('dark', {
49
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.12)`,
49
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 12%, transparent)`,
50
50
  '&:hover': {
51
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.16)`,
51
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 16%, transparent)`,
52
52
  },
53
53
  }),
54
54
  }),
@@ -25,6 +25,7 @@ export const ActivitiesButton = (): JSX.Element => {
25
25
  active={indicator.active || indicator.failed}
26
26
  size="medium"
27
27
  onClick={() => navigate({ to: navigationRoutes.activities })}
28
+ disableRipple
28
29
  >
29
30
  <ErrorBadge
30
31
  invisible={!indicator.failed}
@@ -62,12 +62,12 @@ export const WalletButton: React.FC<
62
62
  borderRadius: `calc(${theme.vars.shape.borderRadius} * 2)`,
63
63
  backgroundColor: 'transparent',
64
64
  '&:hover': {
65
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
65
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
66
66
  },
67
67
  ...theme.applyStyles('dark', {
68
68
  backgroundColor: 'transparent',
69
69
  '&:hover': {
70
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
70
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
71
71
  },
72
72
  }),
73
73
  [`.${buttonClasses.endIcon} > *:nth-of-type(1)`]: {
@@ -32,27 +32,27 @@ export const SettingsIconButton: React.FC<
32
32
  switch (variant) {
33
33
  case 'info':
34
34
  return {
35
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.08)`,
35
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 8%, transparent)`,
36
36
  '&:hover': {
37
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.12)`,
37
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 12%, transparent)`,
38
38
  },
39
39
  ...theme.applyStyles('dark', {
40
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.12)`,
40
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 12%, transparent)`,
41
41
  '&:hover': {
42
- backgroundColor: `rgba(${theme.vars.palette.info.mainChannel} / 0.16)`,
42
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.info.main} 16%, transparent)`,
43
43
  },
44
44
  }),
45
45
  }
46
46
  case 'warning':
47
47
  return {
48
- backgroundColor: `rgba(${theme.vars.palette.warning.mainChannel} / 0.32)`,
48
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.warning.main} 32%, transparent)`,
49
49
  '&:hover': {
50
- backgroundColor: `color-mix(in srgb, rgba(${theme.vars.palette.warning.mainChannel} / 0.32) 80%, black)`,
50
+ backgroundColor: `color-mix(in srgb, color-mix(in srgb, ${theme.vars.palette.warning.main} 32%, transparent) 80%, black)`,
51
51
  },
52
52
  ...theme.applyStyles('dark', {
53
- backgroundColor: `rgba(${theme.vars.palette.warning.mainChannel} / 0.16)`,
53
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.warning.main} 16%, transparent)`,
54
54
  '&:hover': {
55
- backgroundColor: `color-mix(in srgb, rgba(${theme.vars.palette.warning.mainChannel} / 0.16) 80%, black)`,
55
+ backgroundColor: `color-mix(in srgb, color-mix(in srgb, ${theme.vars.palette.warning.main} 16%, transparent) 80%, black)`,
56
56
  },
57
57
  }),
58
58
  }
@@ -19,28 +19,28 @@ export const getStatusColor = (
19
19
  switch (status) {
20
20
  case 'success':
21
21
  return {
22
- color: theme.vars.palette.success.mainChannel,
22
+ color: theme.vars.palette.success.main,
23
23
  mixAmount: 12,
24
24
  lightDarken: 0,
25
25
  darkDarken: 0,
26
26
  }
27
27
  case 'error':
28
28
  return {
29
- color: theme.vars.palette.error.mainChannel,
29
+ color: theme.vars.palette.error.main,
30
30
  mixAmount: 12,
31
31
  lightDarken: 0,
32
32
  darkDarken: 0,
33
33
  }
34
34
  case 'warning':
35
35
  return {
36
- color: theme.vars.palette.warning.mainChannel,
36
+ color: theme.vars.palette.warning.main,
37
37
  mixAmount: 48,
38
38
  lightDarken: 0.32,
39
39
  darkDarken: 0,
40
40
  }
41
41
  case 'info':
42
42
  return {
43
- color: theme.vars.palette.info.mainChannel,
43
+ color: theme.vars.palette.info.main,
44
44
  mixAmount: 12,
45
45
  lightDarken: 0,
46
46
  darkDarken: 0,
@@ -61,7 +61,7 @@ export const IconCircleRoot: React.FC<
61
61
  ({ theme, colorConfig, circleSize }) => {
62
62
  const svgSize = Math.round(circleSize * iconSizeRatio)
63
63
  return {
64
- backgroundColor: `color-mix(in srgb, rgb(${colorConfig.color}) ${colorConfig.mixAmount}%, ${theme.vars.palette.background.paper})`,
64
+ backgroundColor: `color-mix(in srgb, ${colorConfig.color} ${colorConfig.mixAmount}%, ${theme.vars.palette.background.paper})`,
65
65
  borderRadius: '50%',
66
66
  width: circleSize,
67
67
  height: circleSize,
@@ -69,13 +69,13 @@ export const IconCircleRoot: React.FC<
69
69
  position: 'relative',
70
70
  placeItems: 'center',
71
71
  '& > svg': {
72
- color: `color-mix(in srgb, rgb(${colorConfig.color}) ${(1 - colorConfig.lightDarken) * 100}%, black)`,
72
+ color: `color-mix(in srgb, ${colorConfig.color} ${(1 - colorConfig.lightDarken) * 100}%, black)`,
73
73
  width: svgSize,
74
74
  height: svgSize,
75
75
  },
76
76
  ...theme.applyStyles('dark', {
77
77
  '& > svg': {
78
- color: `color-mix(in srgb, rgb(${colorConfig.color}) ${(1 - colorConfig.darkDarken) * 100}%, black)`,
78
+ color: `color-mix(in srgb, ${colorConfig.color} ${(1 - colorConfig.darkDarken) * 100}%, black)`,
79
79
  width: svgSize,
80
80
  height: svgSize,
81
81
  },
@@ -3,9 +3,9 @@ import type React from 'react'
3
3
 
4
4
  export const IconTypography: React.FC<React.ComponentProps<typeof Box>> =
5
5
  styled(Box)(({ theme }) => ({
6
- color: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.4)`,
6
+ color: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 40%, transparent)`,
7
7
  lineHeight: 0,
8
8
  ...theme.applyStyles('dark', {
9
- color: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.32)`,
9
+ color: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 32%, transparent)`,
10
10
  }),
11
11
  }))
@@ -13,7 +13,7 @@ export const ListItemButton: React.FC<
13
13
  paddingLeft: theme.spacing(1.5),
14
14
  height: 56,
15
15
  '&:hover': {
16
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
16
+ backgroundColor: `color-mix(in srgb, ${theme.vars.palette.common.onBackground} 4%, transparent)`,
17
17
  },
18
18
  [`&.${listItemButtonClasses.selected}`]: {
19
19
  backgroundColor: `color-mix(in srgb, ${theme.vars.palette.secondary.main} 24%, white)`,