everest-npm-features 0.0.16 → 0.0.18
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/CheckCircle-BiltyzEJ.js +8 -0
- package/dist/PlayArrow-BYMBg9J8.js +8 -0
- package/dist/{Stack-CZu3N-Ba.js → Stack-euVJ1SJW.js} +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/assets/styles3.css +1 -0
- package/dist/{auth-PInt5Jrb.js → auth-RJ36qeYb.js} +1 -1
- package/dist/{bank-BDnnvwyk.js → bank-Dml7vXW5.js} +10 -10
- package/dist/components/RocketRamp/MinimalKyc/form.js +6 -6
- package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/form.js +5 -5
- package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
- package/dist/components/RocketRamp/Player/Dashboard/balance.js +1 -1
- package/dist/components/RocketRamp/Player/Dashboard/index.js +13 -15
- package/dist/components/RocketRamp/Player/Dashboard/transaction.js +1 -1
- package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Sell/form.js +5 -5
- package/dist/components/RocketRamp/Player/Sell/index.js +8 -8
- package/dist/components/RocketRamp/Player/SignIn/index.js +3 -3
- package/dist/components/RocketRamp/Player/SignIn/loginForm.js +3 -3
- package/dist/components/RocketRamp/Player/SignIn/otpForm.js +3 -3
- package/dist/components/RocketRamp/Player/SignUp/email.js +3 -3
- package/dist/components/RocketRamp/Player/SignUp/index.js +4 -4
- package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +3 -3
- package/dist/components/RocketRamp/Player/SignUp/summary.js +1 -1
- package/dist/components/RocketRamp/Player/SignUp/validateEmail.js +1 -1
- package/dist/components/RocketRamp/ResetPassword/index.js +3 -3
- package/dist/components/RocketRamp/Shared/Input/index.js +9 -9
- package/dist/components/RocketRamp/Store/Dashboard/balance.js +1 -1
- package/dist/components/RocketRamp/Store/Dashboard/stats.js +1 -1
- package/dist/components/RocketRamp/Store/Dashboard/transaction.js +1 -1
- package/dist/components/RocketRamp/Store/SignUp/index.js +4 -4
- package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +3 -3
- package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +3 -3
- package/dist/components/RocketRamp/Store/SignUp/summary.js +1 -1
- package/dist/components/RocketRamp/Store/SignUp/validateEmail.js +1 -1
- package/dist/components/RocketRamp/Transactions/index.js +8 -8
- package/dist/components/Shared/HistoryItem/index.js +40 -40
- package/dist/components/Shared/MinimalKyc/index.js +3 -3
- package/dist/components/Shared/tooltip.js +5 -2108
- package/dist/components/Wallet/Account/createIban.js +1 -1
- package/dist/components/Wallet/Account/iban.js +5 -5
- package/dist/components/Wallet/Account/index.js +17 -17
- package/dist/components/Wallet/Account/sendIban.js +16 -16
- package/dist/components/Wallet/Buy/confirmTransaction.d.ts +2 -2
- package/dist/components/Wallet/Buy/confirmTransaction.js +5 -4
- package/dist/components/Wallet/Buy/form.d.ts +2 -2
- package/dist/components/Wallet/Buy/form.js +9 -6
- package/dist/components/Wallet/Buy/index.d.ts +1 -1
- package/dist/components/Wallet/Buy/index.js +7 -7
- package/dist/components/Wallet/Deposit/index.d.ts +2 -0
- package/dist/components/Wallet/Deposit/index.js +110 -0
- package/dist/components/Wallet/EnterpriseKyc/edd.js +93 -81
- package/dist/components/Wallet/EnterpriseKyc/index.js +121 -108
- package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +93 -77
- package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +3 -3
- package/dist/components/Wallet/EnterpriseKyc/types.d.ts +1 -0
- package/dist/components/Wallet/EnterpriseKyc/verify.js +3 -3
- package/dist/components/Wallet/History/index.js +4 -4
- package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +33 -33
- package/dist/components/Wallet/Portfolio/index.js +171 -138
- package/dist/components/Wallet/Profile/documents.js +4 -4
- package/dist/components/Wallet/Profile/index.js +4 -4
- package/dist/components/Wallet/Receive/index.js +8 -8
- package/dist/components/Wallet/Sell/confirmTransaction.d.ts +3 -0
- package/dist/components/Wallet/Sell/confirmTransaction.js +18 -0
- package/dist/components/Wallet/Sell/form.d.ts +3 -0
- package/dist/components/Wallet/Sell/form.js +32 -0
- package/dist/components/Wallet/Sell/index.d.ts +6 -0
- package/dist/components/Wallet/Sell/index.js +22 -0
- package/dist/components/Wallet/Send/index.js +6 -6
- package/dist/components/Wallet/Shared/Auth/emailForm.js +1 -1
- package/dist/components/Wallet/Shared/Auth/otpForm.js +3 -3
- package/dist/components/Wallet/Shared/ConnectWallet/index.js +1 -1
- package/dist/components/Wallet/Shared/Container/index.js +1 -1
- package/dist/components/Wallet/Shared/Order/types.d.ts +51 -0
- package/dist/components/Wallet/Shared/TokenModal/index.d.ts +1 -1
- package/dist/components/Wallet/Shared/TokenModal/index.js +5 -5
- package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +4 -4
- package/dist/components/Wallet/Shared/addBank.js +7 -7
- package/dist/components/Wallet/Shared/connectPlaidBank.js +7 -7
- package/dist/components/Wallet/Shared/pin.js +1 -1
- package/dist/components/Wallet/SignIn/index.js +3 -3
- package/dist/components/Wallet/SignUp/index.js +3 -3
- package/dist/components/Wallet/Stake/gems/index.js +1 -1
- package/dist/components/Wallet/Stake/id/index.js +3 -3
- package/dist/components/Wallet/Stake/index.js +7 -7
- package/dist/components/Wallet/Swap/index.d.ts +3 -2
- package/dist/components/Wallet/Swap/index.js +327 -271
- package/dist/components/Wallet/SwapAndUniSwap/index.js +31 -35
- package/dist/components/Wallet/{Buy → SwapAndUniSwap}/types.d.ts +4 -13
- package/dist/components/Wallet/SwapAndUniSwap/types.js +1 -0
- package/dist/components/Wallet/Withdraw/bankSelect.d.ts +4 -0
- package/dist/components/Wallet/Withdraw/bankSelect.js +21 -0
- package/dist/components/Wallet/Withdraw/confirmTransaction.d.ts +3 -0
- package/dist/components/Wallet/Withdraw/confirmTransaction.js +19 -0
- package/dist/components/Wallet/Withdraw/form.d.ts +3 -0
- package/dist/components/Wallet/Withdraw/form.js +26 -0
- package/dist/components/Wallet/Withdraw/index.d.ts +7 -0
- package/dist/components/Wallet/Withdraw/index.js +22 -0
- package/dist/constants-QcvnheTz.js +5307 -0
- package/dist/cryptoAssets-DBfxll21.js +16 -0
- package/dist/{documents-b3tR38Qf.js → documents-Bd28UFLu.js} +3 -3
- package/dist/{fiatAssets-Di1Dvl51.js → fiatAssets-w5Lh-MSu.js} +1 -1
- package/dist/hoc/withThemeProvider.js +163 -164
- package/dist/hooks/useDialog/index.js +22 -22
- package/dist/hooks/useRrDialog/index.js +1 -1
- package/dist/{iban-D3Y3E3cN.js → iban-CKaN4sIM.js} +6 -6
- package/dist/index-BEdISdN-.js +709 -0
- package/dist/{index-BhJeqQtm.js → index-BNaxzTKI.js} +164 -163
- package/dist/index-BvftsxV1.js +677 -0
- package/dist/index-DSHZv8ZQ.js +569 -0
- package/dist/{index-D2XCPzg3.js → index-_KAhqkWc.js} +144 -143
- package/dist/{index-DQaPU81n.js → index-f15o1nhn.js} +3 -3
- package/dist/{kyc-8mSMgUlU.js → kyc-V7cIa71M.js} +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.js +47 -39
- package/dist/order-6L4LZOBs.js +41 -0
- package/dist/{react-redux-B4BZippc.js → react-redux-C7I9-1M6.js} +2 -2
- package/dist/{stake-Cf5t27F3.js → stake-r4KUlRcz.js} +1 -1
- package/dist/styles.module-BFHktEw2.js +30 -0
- package/dist/{styles.module-Ctfaq7f2.js → styles.module-DJk7Pf0F.js} +1 -1
- package/dist/tooltip-BVZ66d8C.js +2111 -0
- package/dist/util/constants.d.ts +1 -0
- package/dist/util/constants.js +84 -83
- package/dist/{wallet-Bghw0_Nm.js → wallet-D7MEPP5y.js} +1 -1
- package/package.json +2 -2
- package/dist/PlayArrow-Dent7shn.js +0 -21
- package/dist/assets/index12.css +0 -1
- package/dist/assets/index13.css +0 -1
- package/dist/constants-A8X7fywY.js +0 -3882
- package/dist/index-Bqxs_jIU.js +0 -709
- package/dist/order-DTnCUIx0.js +0 -34
- /package/dist/assets/{main.css → withThemeProvider.css} +0 -0
- /package/dist/components/Wallet/{Buy → Shared/Order}/types.js +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Q as a, T as s, W as e } from "./constants-QcvnheTz.js";
|
|
2
|
+
const T = (t) => ({
|
|
3
|
+
type: a,
|
|
4
|
+
payload: t
|
|
5
|
+
}), p = (t) => ({
|
|
6
|
+
type: s,
|
|
7
|
+
payload: t
|
|
8
|
+
}), A = (t) => ({
|
|
9
|
+
type: e,
|
|
10
|
+
payload: t
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
p as a,
|
|
14
|
+
A as b,
|
|
15
|
+
T as f
|
|
16
|
+
};
|
|
@@ -10,9 +10,9 @@ import { W as ae } from "./react-webcam-B3cXh1XT.js";
|
|
|
10
10
|
import { A as se } from "./ArrowBack-BT4ZQvY3.js";
|
|
11
11
|
import ce from "./components/Shared/transition.js";
|
|
12
12
|
import { getDocName as le } from "./util/functions.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { e as xe } from "./index-
|
|
13
|
+
import { a as de, u as me } from "./react-redux-C7I9-1M6.js";
|
|
14
|
+
import { a9 as he, aa as fe, ab as ue, ac as pe, ad as ge, ae as _e } from "./constants-QcvnheTz.js";
|
|
15
|
+
import { e as xe } from "./index-f15o1nhn.js";
|
|
16
16
|
import { DELETE_ICON as De } from "./util/constants.js";
|
|
17
17
|
import { useDialog as be } from "./hooks/useDialog/index.js";
|
|
18
18
|
import { B as Ce } from "./Backdrop-Cwqacwk8.js";
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { jsx as S, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as S, jsxs as je } from "react/jsx-runtime";
|
|
2
|
+
import { B as Ie, P as a, D as Le, S as Ae, e as Ke, T as x, c as ve, F as Re, s as We } from "../createTheme-CKy7OHWe.js";
|
|
3
3
|
import * as d from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as We } from "../useThemeWithoutDefault-DaojF4V7.js";
|
|
4
|
+
import { R as Fe } from "../index-BnKMvdnf.js";
|
|
5
|
+
import { u as He } from "../useThemeWithoutDefault-DaojF4V7.js";
|
|
7
6
|
import { e as be } from "../exactProp-C1Lmtwf_.js";
|
|
8
7
|
import { D as Ge } from "../DefaultPropsProvider-C9ddiClG.js";
|
|
9
8
|
import { G as Ue } from "../GlobalStyles-yJPIbrEZ.js";
|
|
10
|
-
const qe = (e) => {
|
|
11
|
-
const t =
|
|
12
|
-
class o extends
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
9
|
+
import '../assets/withThemeProvider.css';const qe = (e) => {
|
|
10
|
+
const t = Le(e);
|
|
11
|
+
class o extends Ae {
|
|
12
|
+
constructor(m) {
|
|
13
|
+
super(m), this.prepend = t.sheet.prepend;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
return t.sheet = new o({
|
|
@@ -28,17 +27,17 @@ typeof document == "object" && (Y = qe({
|
|
|
28
27
|
key: "css",
|
|
29
28
|
prepend: !0
|
|
30
29
|
}));
|
|
31
|
-
function
|
|
30
|
+
function Me(e) {
|
|
32
31
|
const {
|
|
33
32
|
injectFirst: t,
|
|
34
33
|
children: o
|
|
35
34
|
} = e;
|
|
36
|
-
return t && Y ? /* @__PURE__ */ S(
|
|
35
|
+
return t && Y ? /* @__PURE__ */ S(Ie, {
|
|
37
36
|
value: Y,
|
|
38
37
|
children: o
|
|
39
38
|
}) : o;
|
|
40
39
|
}
|
|
41
|
-
process.env.NODE_ENV !== "production" && (
|
|
40
|
+
process.env.NODE_ENV !== "production" && (Me.propTypes = {
|
|
42
41
|
/**
|
|
43
42
|
* Your component tree.
|
|
44
43
|
*/
|
|
@@ -50,10 +49,10 @@ process.env.NODE_ENV !== "production" && (B.propTypes = {
|
|
|
50
49
|
*/
|
|
51
50
|
injectFirst: a.bool
|
|
52
51
|
});
|
|
53
|
-
const
|
|
54
|
-
process.env.NODE_ENV !== "production" && (
|
|
55
|
-
function
|
|
56
|
-
const e = d.useContext(
|
|
52
|
+
const B = /* @__PURE__ */ d.createContext(null);
|
|
53
|
+
process.env.NODE_ENV !== "production" && (B.displayName = "ThemeContext");
|
|
54
|
+
function z() {
|
|
55
|
+
const e = d.useContext(B);
|
|
57
56
|
return process.env.NODE_ENV !== "production" && d.useDebugValue(e), e;
|
|
58
57
|
}
|
|
59
58
|
const Ye = typeof Symbol == "function" && Symbol.for, Be = Ye ? Symbol.for("mui.nested") : "__THEME_NESTED__";
|
|
@@ -72,17 +71,17 @@ function A(e) {
|
|
|
72
71
|
const {
|
|
73
72
|
children: t,
|
|
74
73
|
theme: o
|
|
75
|
-
} = e,
|
|
76
|
-
process.env.NODE_ENV !== "production" &&
|
|
74
|
+
} = e, s = z();
|
|
75
|
+
process.env.NODE_ENV !== "production" && s === null && typeof o == "function" && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
|
|
77
76
|
`));
|
|
78
|
-
const
|
|
79
|
-
const
|
|
77
|
+
const m = d.useMemo(() => {
|
|
78
|
+
const h = s === null ? {
|
|
80
79
|
...o
|
|
81
|
-
} : ze(
|
|
82
|
-
return
|
|
83
|
-
}, [o,
|
|
84
|
-
return /* @__PURE__ */ S(
|
|
85
|
-
value:
|
|
80
|
+
} : ze(s, o);
|
|
81
|
+
return h != null && (h[Be] = s !== null), h;
|
|
82
|
+
}, [o, s]);
|
|
83
|
+
return /* @__PURE__ */ S(B.Provider, {
|
|
84
|
+
value: m,
|
|
86
85
|
children: t
|
|
87
86
|
});
|
|
88
87
|
}
|
|
@@ -97,16 +96,16 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
97
96
|
theme: a.oneOfType([a.object, a.func]).isRequired
|
|
98
97
|
});
|
|
99
98
|
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (A.propTypes = be(A.propTypes));
|
|
100
|
-
const
|
|
101
|
-
function
|
|
99
|
+
const Ce = {};
|
|
100
|
+
function Ee(e, t, o, s = !1) {
|
|
102
101
|
return d.useMemo(() => {
|
|
103
|
-
const
|
|
102
|
+
const m = e && t[e] || t;
|
|
104
103
|
if (typeof o == "function") {
|
|
105
|
-
const
|
|
104
|
+
const h = o(m), r = e ? {
|
|
106
105
|
...t,
|
|
107
|
-
[e]:
|
|
108
|
-
} :
|
|
109
|
-
return
|
|
106
|
+
[e]: h
|
|
107
|
+
} : h;
|
|
108
|
+
return s ? () => r : r;
|
|
110
109
|
}
|
|
111
110
|
return e ? {
|
|
112
111
|
...t,
|
|
@@ -115,22 +114,22 @@ function Te(e, t, o, n = !1) {
|
|
|
115
114
|
...t,
|
|
116
115
|
...o
|
|
117
116
|
};
|
|
118
|
-
}, [e, t, o,
|
|
117
|
+
}, [e, t, o, s]);
|
|
119
118
|
}
|
|
120
119
|
function O(e) {
|
|
121
120
|
const {
|
|
122
121
|
children: t,
|
|
123
122
|
theme: o,
|
|
124
|
-
themeId:
|
|
125
|
-
} = e,
|
|
126
|
-
process.env.NODE_ENV !== "production" && (
|
|
123
|
+
themeId: s
|
|
124
|
+
} = e, m = He(Ce), h = z() || Ce;
|
|
125
|
+
process.env.NODE_ENV !== "production" && (m === null && typeof o == "function" || s && m && !m[s] && typeof o == "function") && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
|
|
127
126
|
`));
|
|
128
|
-
const r =
|
|
127
|
+
const r = Ee(s, m, o), E = Ee(s, h, o, !0), g = r.direction === "rtl";
|
|
129
128
|
return /* @__PURE__ */ S(A, {
|
|
130
129
|
theme: E,
|
|
131
|
-
children: /* @__PURE__ */ S(
|
|
130
|
+
children: /* @__PURE__ */ S(Ke.Provider, {
|
|
132
131
|
value: r,
|
|
133
|
-
children: /* @__PURE__ */ S(
|
|
132
|
+
children: /* @__PURE__ */ S(Fe, {
|
|
134
133
|
value: g,
|
|
135
134
|
children: /* @__PURE__ */ S(Ge, {
|
|
136
135
|
value: r == null ? void 0 : r.components,
|
|
@@ -159,19 +158,19 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
|
159
158
|
themeId: a.string
|
|
160
159
|
});
|
|
161
160
|
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (O.propTypes = be(O.propTypes));
|
|
162
|
-
const
|
|
161
|
+
const Q = "mode", J = "color-scheme", Qe = "data-color-scheme";
|
|
163
162
|
function Je(e) {
|
|
164
163
|
const {
|
|
165
164
|
defaultLightColorScheme: t = "light",
|
|
166
165
|
defaultDarkColorScheme: o = "dark",
|
|
167
|
-
modeStorageKey:
|
|
168
|
-
colorSchemeStorageKey:
|
|
169
|
-
attribute:
|
|
166
|
+
modeStorageKey: s = Q,
|
|
167
|
+
colorSchemeStorageKey: m = J,
|
|
168
|
+
attribute: h = Qe,
|
|
170
169
|
colorSchemeNode: r = "document.documentElement",
|
|
171
170
|
nonce: E
|
|
172
171
|
} = e || {};
|
|
173
|
-
let g = "", l =
|
|
174
|
-
if (
|
|
172
|
+
let g = "", l = h;
|
|
173
|
+
if (h === "class" && (l = ".%s"), h === "data" && (l = "[data-%s]"), l.startsWith(".")) {
|
|
175
174
|
const y = l.substring(1);
|
|
176
175
|
g += `${r}.classList.remove('${y}'.replace('%s', light), '${y}'.replace('%s', dark));
|
|
177
176
|
${r}.classList.add('${y}'.replace('%s', colorScheme));`;
|
|
@@ -191,9 +190,9 @@ function Je(e) {
|
|
|
191
190
|
__html: `(function() {
|
|
192
191
|
try {
|
|
193
192
|
let colorScheme = '';
|
|
194
|
-
const mode = localStorage.getItem('${
|
|
195
|
-
const dark = localStorage.getItem('${
|
|
196
|
-
const light = localStorage.getItem('${
|
|
193
|
+
const mode = localStorage.getItem('${s}') || 'system';
|
|
194
|
+
const dark = localStorage.getItem('${m}-dark') || '${o}';
|
|
195
|
+
const light = localStorage.getItem('${m}-light') || '${t}';
|
|
197
196
|
if (mode === 'system') {
|
|
198
197
|
// handle system mode
|
|
199
198
|
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
@@ -216,18 +215,18 @@ try {
|
|
|
216
215
|
}
|
|
217
216
|
}, "mui-color-scheme-init");
|
|
218
217
|
}
|
|
219
|
-
function
|
|
218
|
+
function Te(e) {
|
|
220
219
|
if (typeof window < "u" && typeof window.matchMedia == "function" && e === "system")
|
|
221
220
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
222
221
|
}
|
|
223
|
-
function
|
|
222
|
+
function Ne(e, t) {
|
|
224
223
|
if (e.mode === "light" || e.mode === "system" && e.systemMode === "light")
|
|
225
224
|
return t("light");
|
|
226
225
|
if (e.mode === "dark" || e.mode === "system" && e.systemMode === "dark")
|
|
227
226
|
return t("dark");
|
|
228
227
|
}
|
|
229
228
|
function Xe(e) {
|
|
230
|
-
return
|
|
229
|
+
return Ne(e, (t) => {
|
|
231
230
|
if (t === "light")
|
|
232
231
|
return e.lightColorScheme;
|
|
233
232
|
if (t === "dark")
|
|
@@ -248,16 +247,16 @@ function Ze(e) {
|
|
|
248
247
|
const {
|
|
249
248
|
defaultMode: t = "light",
|
|
250
249
|
defaultLightColorScheme: o,
|
|
251
|
-
defaultDarkColorScheme:
|
|
252
|
-
supportedColorSchemes:
|
|
253
|
-
modeStorageKey:
|
|
254
|
-
colorSchemeStorageKey: r =
|
|
250
|
+
defaultDarkColorScheme: s,
|
|
251
|
+
supportedColorSchemes: m = [],
|
|
252
|
+
modeStorageKey: h = Q,
|
|
253
|
+
colorSchemeStorageKey: r = J,
|
|
255
254
|
storageWindow: E = typeof window > "u" ? void 0 : window
|
|
256
|
-
} = e, g =
|
|
257
|
-
const
|
|
255
|
+
} = e, g = m.join(","), l = m.length > 1, [T, y] = d.useState(() => {
|
|
256
|
+
const n = q(h, t), c = q(`${r}-light`, o), i = q(`${r}-dark`, s);
|
|
258
257
|
return {
|
|
259
|
-
mode:
|
|
260
|
-
systemMode:
|
|
258
|
+
mode: n,
|
|
259
|
+
systemMode: Te(n),
|
|
261
260
|
lightColorScheme: c,
|
|
262
261
|
darkColorScheme: i
|
|
263
262
|
};
|
|
@@ -265,37 +264,37 @@ function Ze(e) {
|
|
|
265
264
|
d.useEffect(() => {
|
|
266
265
|
l && M(!0), $.current = !0;
|
|
267
266
|
}, [l]);
|
|
268
|
-
const
|
|
267
|
+
const X = Xe(T), N = d.useCallback((n) => {
|
|
269
268
|
y((c) => {
|
|
270
|
-
if (
|
|
269
|
+
if (n === c.mode)
|
|
271
270
|
return c;
|
|
272
|
-
const i =
|
|
271
|
+
const i = n ?? t;
|
|
273
272
|
try {
|
|
274
|
-
localStorage.setItem(
|
|
273
|
+
localStorage.setItem(h, i);
|
|
275
274
|
} catch {
|
|
276
275
|
}
|
|
277
276
|
return {
|
|
278
277
|
...c,
|
|
279
278
|
mode: i,
|
|
280
|
-
systemMode:
|
|
279
|
+
systemMode: Te(i)
|
|
281
280
|
};
|
|
282
281
|
});
|
|
283
|
-
}, [
|
|
284
|
-
|
|
282
|
+
}, [h, t]), _ = d.useCallback((n) => {
|
|
283
|
+
n ? typeof n == "string" ? n && !g.includes(n) ? console.error(`\`${n}\` does not exist in \`theme.colorSchemes\`.`) : y((c) => {
|
|
285
284
|
const i = {
|
|
286
285
|
...c
|
|
287
286
|
};
|
|
288
|
-
return
|
|
287
|
+
return Ne(c, (p) => {
|
|
289
288
|
try {
|
|
290
|
-
localStorage.setItem(`${r}-${p}`,
|
|
289
|
+
localStorage.setItem(`${r}-${p}`, n);
|
|
291
290
|
} catch {
|
|
292
291
|
}
|
|
293
|
-
p === "light" && (i.lightColorScheme =
|
|
292
|
+
p === "light" && (i.lightColorScheme = n), p === "dark" && (i.darkColorScheme = n);
|
|
294
293
|
}), i;
|
|
295
294
|
}) : y((c) => {
|
|
296
295
|
const i = {
|
|
297
296
|
...c
|
|
298
|
-
}, p =
|
|
297
|
+
}, p = n.light === null ? o : n.light, C = n.dark === null ? s : n.dark;
|
|
299
298
|
if (p)
|
|
300
299
|
if (!g.includes(p))
|
|
301
300
|
console.error(`\`${p}\` does not exist in \`theme.colorSchemes\`.`);
|
|
@@ -319,18 +318,18 @@ function Ze(e) {
|
|
|
319
318
|
return i;
|
|
320
319
|
}) : y((c) => {
|
|
321
320
|
try {
|
|
322
|
-
localStorage.setItem(`${r}-light`, o), localStorage.setItem(`${r}-dark`,
|
|
321
|
+
localStorage.setItem(`${r}-light`, o), localStorage.setItem(`${r}-dark`, s);
|
|
323
322
|
} catch {
|
|
324
323
|
}
|
|
325
324
|
return {
|
|
326
325
|
...c,
|
|
327
326
|
lightColorScheme: o,
|
|
328
|
-
darkColorScheme:
|
|
327
|
+
darkColorScheme: s
|
|
329
328
|
};
|
|
330
329
|
});
|
|
331
|
-
}, [g, r, o,
|
|
330
|
+
}, [g, r, o, s]), D = d.useCallback((n) => {
|
|
332
331
|
T.mode === "system" && y((c) => {
|
|
333
|
-
const i =
|
|
332
|
+
const i = n != null && n.matches ? "dark" : "light";
|
|
334
333
|
return c.systemMode === i ? c : {
|
|
335
334
|
...c,
|
|
336
335
|
systemMode: i
|
|
@@ -340,29 +339,29 @@ function Ze(e) {
|
|
|
340
339
|
return j.current = D, d.useEffect(() => {
|
|
341
340
|
if (typeof window.matchMedia != "function" || !l)
|
|
342
341
|
return;
|
|
343
|
-
const
|
|
344
|
-
return c.addListener(
|
|
345
|
-
c.removeListener(
|
|
342
|
+
const n = (...i) => j.current(...i), c = window.matchMedia("(prefers-color-scheme: dark)");
|
|
343
|
+
return c.addListener(n), n(c), () => {
|
|
344
|
+
c.removeListener(n);
|
|
346
345
|
};
|
|
347
346
|
}, [l]), d.useEffect(() => {
|
|
348
347
|
if (E && l) {
|
|
349
|
-
const
|
|
348
|
+
const n = (c) => {
|
|
350
349
|
const i = c.newValue;
|
|
351
350
|
typeof c.key == "string" && c.key.startsWith(r) && (!i || g.match(i)) && (c.key.endsWith("light") && _({
|
|
352
351
|
light: i
|
|
353
352
|
}), c.key.endsWith("dark") && _({
|
|
354
353
|
dark: i
|
|
355
|
-
})), c.key ===
|
|
354
|
+
})), c.key === h && (!i || ["light", "dark", "system"].includes(i)) && N(i || t);
|
|
356
355
|
};
|
|
357
|
-
return E.addEventListener("storage",
|
|
358
|
-
E.removeEventListener("storage",
|
|
356
|
+
return E.addEventListener("storage", n), () => {
|
|
357
|
+
E.removeEventListener("storage", n);
|
|
359
358
|
};
|
|
360
359
|
}
|
|
361
|
-
}, [_, N,
|
|
360
|
+
}, [_, N, h, r, g, t, E, l]), {
|
|
362
361
|
...T,
|
|
363
362
|
mode: $.current || !l ? T.mode : void 0,
|
|
364
363
|
systemMode: $.current || !l ? T.systemMode : void 0,
|
|
365
|
-
colorScheme: $.current || !l ?
|
|
364
|
+
colorScheme: $.current || !l ? X : void 0,
|
|
366
365
|
setMode: N,
|
|
367
366
|
setColorScheme: _
|
|
368
367
|
};
|
|
@@ -378,9 +377,9 @@ function tt(e) {
|
|
|
378
377
|
* It should also ideally have a vars object created using `prepareCssVars`.
|
|
379
378
|
*/
|
|
380
379
|
theme: o = {},
|
|
381
|
-
modeStorageKey:
|
|
382
|
-
colorSchemeStorageKey:
|
|
383
|
-
disableTransitionOnChange:
|
|
380
|
+
modeStorageKey: s = Q,
|
|
381
|
+
colorSchemeStorageKey: m = J,
|
|
382
|
+
disableTransitionOnChange: h = !1,
|
|
384
383
|
defaultColorScheme: r,
|
|
385
384
|
resolveTheme: E
|
|
386
385
|
} = e, g = {
|
|
@@ -398,114 +397,114 @@ function tt(e) {
|
|
|
398
397
|
process.env.NODE_ENV !== "production" && (l.displayName = "ColorSchemeContext");
|
|
399
398
|
const T = () => d.useContext(l) || g;
|
|
400
399
|
function y(N) {
|
|
401
|
-
var
|
|
400
|
+
var ue, fe, pe, Se, ge;
|
|
402
401
|
const {
|
|
403
402
|
children: _,
|
|
404
403
|
theme: D,
|
|
405
|
-
modeStorageKey: j =
|
|
406
|
-
colorSchemeStorageKey:
|
|
407
|
-
disableTransitionOnChange: c =
|
|
404
|
+
modeStorageKey: j = s,
|
|
405
|
+
colorSchemeStorageKey: n = m,
|
|
406
|
+
disableTransitionOnChange: c = h,
|
|
408
407
|
storageWindow: i = typeof window > "u" ? void 0 : window,
|
|
409
408
|
documentNode: p = typeof document > "u" ? void 0 : document,
|
|
410
409
|
colorSchemeNode: C = typeof document > "u" ? void 0 : document.documentElement,
|
|
411
410
|
disableNestedContext: K = !1,
|
|
412
|
-
disableStyleSheetGeneration:
|
|
413
|
-
} = N, R = d.useRef(!1),
|
|
411
|
+
disableStyleSheetGeneration: we = !1
|
|
412
|
+
} = N, R = d.useRef(!1), W = z(), F = d.useContext(l), H = !!F && !K, Z = d.useMemo(() => D || (typeof o == "function" ? o() : o), [D]), ee = Z[t], {
|
|
414
413
|
colorSchemes: w = {},
|
|
415
|
-
components:
|
|
416
|
-
cssVarPrefix:
|
|
414
|
+
components: $e = {},
|
|
415
|
+
cssVarPrefix: te,
|
|
417
416
|
...b
|
|
418
|
-
} =
|
|
419
|
-
mode:
|
|
420
|
-
setMode:
|
|
421
|
-
systemMode:
|
|
422
|
-
lightColorScheme:
|
|
423
|
-
darkColorScheme:
|
|
424
|
-
colorScheme:
|
|
425
|
-
setColorScheme:
|
|
417
|
+
} = ee || Z, oe = Object.keys(w).filter((u) => !!w[u]).join(","), P = d.useMemo(() => oe.split(","), [oe]), re = typeof r == "string" ? r : r.light, ne = typeof r == "string" ? r : r.dark, _e = w[re] && w[ne] ? "system" : ((fe = (ue = w[b.defaultColorScheme]) == null ? void 0 : ue.palette) == null ? void 0 : fe.mode) || ((pe = b.palette) == null ? void 0 : pe.mode), {
|
|
418
|
+
mode: De,
|
|
419
|
+
setMode: se,
|
|
420
|
+
systemMode: ce,
|
|
421
|
+
lightColorScheme: ie,
|
|
422
|
+
darkColorScheme: de,
|
|
423
|
+
colorScheme: Pe,
|
|
424
|
+
setColorScheme: le
|
|
426
425
|
} = Ze({
|
|
427
426
|
supportedColorSchemes: P,
|
|
428
|
-
defaultLightColorScheme:
|
|
429
|
-
defaultDarkColorScheme:
|
|
427
|
+
defaultLightColorScheme: re,
|
|
428
|
+
defaultDarkColorScheme: ne,
|
|
430
429
|
modeStorageKey: j,
|
|
431
|
-
colorSchemeStorageKey:
|
|
432
|
-
defaultMode:
|
|
430
|
+
colorSchemeStorageKey: n,
|
|
431
|
+
defaultMode: _e,
|
|
433
432
|
storageWindow: i
|
|
434
433
|
});
|
|
435
|
-
let G =
|
|
436
|
-
|
|
437
|
-
const
|
|
434
|
+
let G = De, k = Pe;
|
|
435
|
+
H && (G = F.mode, k = F.colorScheme);
|
|
436
|
+
const ae = k || b.defaultColorScheme, xe = ((Se = b.generateThemeVars) == null ? void 0 : Se.call(b)) || b.vars, v = {
|
|
438
437
|
...b,
|
|
439
|
-
components:
|
|
438
|
+
components: $e,
|
|
440
439
|
colorSchemes: w,
|
|
441
|
-
cssVarPrefix:
|
|
442
|
-
vars:
|
|
440
|
+
cssVarPrefix: te,
|
|
441
|
+
vars: xe
|
|
443
442
|
};
|
|
444
|
-
if (typeof v.generateSpacing == "function" && (v.spacing = v.generateSpacing()),
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
...v[
|
|
449
|
-
...
|
|
450
|
-
} : v[
|
|
443
|
+
if (typeof v.generateSpacing == "function" && (v.spacing = v.generateSpacing()), ae) {
|
|
444
|
+
const u = w[ae];
|
|
445
|
+
u && typeof u == "object" && Object.keys(u).forEach((f) => {
|
|
446
|
+
u[f] && typeof u[f] == "object" ? v[f] = {
|
|
447
|
+
...v[f],
|
|
448
|
+
...u[f]
|
|
449
|
+
} : v[f] = u[f];
|
|
451
450
|
});
|
|
452
451
|
}
|
|
453
452
|
const V = b.colorSchemeSelector;
|
|
454
453
|
d.useEffect(() => {
|
|
455
454
|
if (k && C && V && V !== "media") {
|
|
456
|
-
const
|
|
457
|
-
let
|
|
458
|
-
if (
|
|
459
|
-
C.classList.remove(...P.map((I) =>
|
|
455
|
+
const u = V;
|
|
456
|
+
let f = V;
|
|
457
|
+
if (u === "class" && (f = ".%s"), u === "data" && (f = "[data-%s]"), u != null && u.startsWith("data-") && !u.includes("%s") && (f = `[${u}="%s"]`), f.startsWith("."))
|
|
458
|
+
C.classList.remove(...P.map((I) => f.substring(1).replace("%s", I))), C.classList.add(f.substring(1).replace("%s", k));
|
|
460
459
|
else {
|
|
461
|
-
const I =
|
|
460
|
+
const I = f.replace("%s", k).match(/\[([^\]]+)\]/);
|
|
462
461
|
if (I) {
|
|
463
|
-
const [
|
|
464
|
-
U || P.forEach((
|
|
465
|
-
C.removeAttribute(
|
|
466
|
-
}), C.setAttribute(
|
|
462
|
+
const [ye, U] = I[1].split("=");
|
|
463
|
+
U || P.forEach((Oe) => {
|
|
464
|
+
C.removeAttribute(ye.replace(k, Oe));
|
|
465
|
+
}), C.setAttribute(ye, U ? U.replace(/"|'/g, "") : "");
|
|
467
466
|
} else
|
|
468
|
-
C.setAttribute(
|
|
467
|
+
C.setAttribute(f, k);
|
|
469
468
|
}
|
|
470
469
|
}
|
|
471
470
|
}, [k, V, C, P]), d.useEffect(() => {
|
|
472
|
-
let
|
|
471
|
+
let u;
|
|
473
472
|
if (c && R.current && p) {
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
p.head.removeChild(
|
|
473
|
+
const f = p.createElement("style");
|
|
474
|
+
f.appendChild(p.createTextNode(et)), p.head.appendChild(f), window.getComputedStyle(p.body), u = setTimeout(() => {
|
|
475
|
+
p.head.removeChild(f);
|
|
477
476
|
}, 1);
|
|
478
477
|
}
|
|
479
478
|
return () => {
|
|
480
|
-
clearTimeout(
|
|
479
|
+
clearTimeout(u);
|
|
481
480
|
};
|
|
482
481
|
}, [k, c, p]), d.useEffect(() => (R.current = !0, () => {
|
|
483
482
|
R.current = !1;
|
|
484
483
|
}), []);
|
|
485
|
-
const
|
|
484
|
+
const Ve = d.useMemo(() => ({
|
|
486
485
|
allColorSchemes: P,
|
|
487
486
|
colorScheme: k,
|
|
488
|
-
darkColorScheme:
|
|
489
|
-
lightColorScheme:
|
|
487
|
+
darkColorScheme: de,
|
|
488
|
+
lightColorScheme: ie,
|
|
490
489
|
mode: G,
|
|
491
|
-
setColorScheme:
|
|
492
|
-
setMode:
|
|
493
|
-
systemMode:
|
|
494
|
-
}), [P, k,
|
|
495
|
-
let
|
|
496
|
-
(
|
|
497
|
-
const
|
|
490
|
+
setColorScheme: le,
|
|
491
|
+
setMode: se,
|
|
492
|
+
systemMode: ce
|
|
493
|
+
}), [P, k, de, ie, G, le, se, ce]);
|
|
494
|
+
let me = !0;
|
|
495
|
+
(we || b.cssVariables === !1 || H && (W == null ? void 0 : W.cssVarPrefix) === te) && (me = !1);
|
|
496
|
+
const he = /* @__PURE__ */ je(d.Fragment, {
|
|
498
497
|
children: [/* @__PURE__ */ S(O, {
|
|
499
|
-
themeId:
|
|
498
|
+
themeId: ee ? t : void 0,
|
|
500
499
|
theme: E ? E(v) : v,
|
|
501
500
|
children: _
|
|
502
|
-
}),
|
|
503
|
-
styles: ((
|
|
501
|
+
}), me && /* @__PURE__ */ S(Ue, {
|
|
502
|
+
styles: ((ge = v.generateStyleSheets) == null ? void 0 : ge.call(v)) || []
|
|
504
503
|
})]
|
|
505
504
|
});
|
|
506
|
-
return
|
|
507
|
-
value:
|
|
508
|
-
children:
|
|
505
|
+
return H ? he : /* @__PURE__ */ S(l.Provider, {
|
|
506
|
+
value: Ve,
|
|
507
|
+
children: he
|
|
509
508
|
});
|
|
510
509
|
}
|
|
511
510
|
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
@@ -558,15 +557,15 @@ function tt(e) {
|
|
|
558
557
|
CssVarsProvider: y,
|
|
559
558
|
useColorScheme: T,
|
|
560
559
|
getInitColorSchemeScript: (N) => Je({
|
|
561
|
-
colorSchemeStorageKey:
|
|
560
|
+
colorSchemeStorageKey: m,
|
|
562
561
|
defaultLightColorScheme: M,
|
|
563
562
|
defaultDarkColorScheme: $,
|
|
564
|
-
modeStorageKey:
|
|
563
|
+
modeStorageKey: s,
|
|
565
564
|
...N
|
|
566
565
|
})
|
|
567
566
|
};
|
|
568
567
|
}
|
|
569
|
-
function
|
|
568
|
+
function ke({
|
|
570
569
|
theme: e,
|
|
571
570
|
...t
|
|
572
571
|
}) {
|
|
@@ -590,7 +589,7 @@ const L = {
|
|
|
590
589
|
} = tt({
|
|
591
590
|
themeId: x,
|
|
592
591
|
// @ts-ignore ignore module augmentation tests
|
|
593
|
-
theme: () =>
|
|
592
|
+
theme: () => ve({
|
|
594
593
|
cssVariables: !0
|
|
595
594
|
}),
|
|
596
595
|
colorSchemeStorageKey: L.colorSchemeStorageKey,
|
|
@@ -604,9 +603,9 @@ const L = {
|
|
|
604
603
|
...e,
|
|
605
604
|
typography: Re(e.palette, e.typography)
|
|
606
605
|
};
|
|
607
|
-
return t.unstable_sx = function(
|
|
608
|
-
return
|
|
609
|
-
sx:
|
|
606
|
+
return t.unstable_sx = function(s) {
|
|
607
|
+
return We({
|
|
608
|
+
sx: s,
|
|
610
609
|
theme: this
|
|
611
610
|
});
|
|
612
611
|
}, t;
|
|
@@ -616,21 +615,21 @@ function nt({
|
|
|
616
615
|
theme: e,
|
|
617
616
|
...t
|
|
618
617
|
}) {
|
|
619
|
-
return typeof e == "function" ? /* @__PURE__ */ S(
|
|
618
|
+
return typeof e == "function" ? /* @__PURE__ */ S(ke, {
|
|
620
619
|
theme: e,
|
|
621
620
|
...t
|
|
622
621
|
}) : "colorSchemes" in (x in e ? e[x] : e) ? /* @__PURE__ */ S(rt, {
|
|
623
622
|
theme: e,
|
|
624
623
|
...t
|
|
625
|
-
}) : /* @__PURE__ */ S(
|
|
624
|
+
}) : /* @__PURE__ */ S(ke, {
|
|
626
625
|
theme: e,
|
|
627
626
|
...t
|
|
628
627
|
});
|
|
629
628
|
}
|
|
630
|
-
const
|
|
629
|
+
const st = ve(), pt = (e) => ({
|
|
631
630
|
theme: o,
|
|
632
|
-
...
|
|
633
|
-
}) =>
|
|
631
|
+
...s
|
|
632
|
+
}) => /* @__PURE__ */ S(Me, { injectFirst: !0, children: /* @__PURE__ */ S(nt, { theme: o || st, children: /* @__PURE__ */ S(e, { ...s }) }) });
|
|
634
633
|
export {
|
|
635
|
-
|
|
634
|
+
pt as default
|
|
636
635
|
};
|