@blockend/widget 1.0.31 → 1.0.32
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/AllRoutes-CPwuTwqd.js +2209 -0
- package/dist/Box-CIChapvH.js +55 -0
- package/dist/EstGas-CEFILtyf.js +12867 -0
- package/dist/Grow-DJZj9zjv.js +1656 -0
- package/dist/InputComp-DqF1JGIu.js +106 -0
- package/dist/LoadRoute-r3sHTYXM.js +126 -0
- package/dist/QuotesProgress-BXVLxZ8U.js +28 -0
- package/dist/SwapAsset-07WvVwl-.js +64 -0
- package/dist/Tooltip-CNAsCF8n.js +572 -0
- package/dist/TxnButton-D2TTkFYA.js +207 -0
- package/dist/WidgetForm.module-QHJ0-m5f.js +9 -0
- package/dist/{add-B8AfyNIx.js → add-t2GqC9VA.js} +3 -3
- package/dist/{all-wallets-BaLLU39i.js → all-wallets-DFyf0q31.js} +3 -3
- package/dist/{app-store-DNpoABj1.js → app-store-aAahwmBP.js} +3 -3
- package/dist/{apple-DzzHtaL4.js → apple-DeRgpwlc.js} +3 -3
- package/dist/{arrow-bottom-D2c13c51.js → arrow-bottom-DdEOkaAj.js} +3 -3
- package/dist/{arrow-bottom-circle-ls9OCLx1.js → arrow-bottom-circle-BWwREWcv.js} +3 -3
- package/dist/{arrow-left-BI3rQkNI.js → arrow-left-CulyLmoH.js} +3 -3
- package/dist/{arrow-right-rnMzhVod.js → arrow-right-Dwr7TISn.js} +3 -3
- package/dist/{arrow-top-CfA6PVMz.js → arrow-top-pL4rM_y8.js} +3 -3
- package/dist/{bank-CmpAmHgg.js → bank-CPuyK_08.js} +3 -3
- package/dist/basic-CVc9xEvb.js +5783 -0
- package/dist/{browser-mEcjgS1H.js → browser-Cbq2Zbp4.js} +3 -3
- package/dist/{card-DkgIWcMc.js → card-B_hUtPWK.js} +3 -3
- package/dist/ccip-BLVGcR4A.js +228 -0
- package/dist/{checkmark-B_A013n2.js → checkmark-WEqTsFAc.js} +3 -3
- package/dist/{checkmark-bold-DestuG2T.js → checkmark-bold-Du_ZvhqM.js} +3 -3
- package/dist/{chevron-bottom-Di3S86dj.js → chevron-bottom-C-s-lv4L.js} +3 -3
- package/dist/{chevron-left-A9Wj-3tj.js → chevron-left-C7NcRElx.js} +3 -3
- package/dist/{chevron-right-UFxJogOZ.js → chevron-right-CSzmAmdn.js} +3 -3
- package/dist/{chevron-top-BbZs3eaC.js → chevron-top-Dd99Wfel.js} +3 -3
- package/dist/{chrome-store-B4F6hJmy.js → chrome-store-C4p77Of0.js} +3 -3
- package/dist/{clock-BbAQ09uV.js → clock-Cib24qjH.js} +3 -3
- package/dist/clockIcon-C2W5xvyt.js +76 -0
- package/dist/{close-CY3oZP_D.js → close-BXjEkTvS.js} +3 -3
- package/dist/{coinPlaceholder-DpfsobZT.js → coinPlaceholder-BFNC7cQN.js} +3 -3
- package/dist/{compass-CHS7RZFk.js → compass-CXPX5Ycp.js} +3 -3
- package/dist/{copy-CEd4nGhs.js → copy-BEawMbmF.js} +3 -3
- package/dist/core-Bez9Ow7F.js +14967 -0
- package/dist/cursor-Cxq4Q9jk.js +7 -0
- package/dist/{cursor-transparent-Tm6k6Ws4.js → cursor-transparent-ZjJ0P2vr.js} +3 -3
- package/dist/{desktop-CrSyXZkL.js → desktop-BhZVovAp.js} +3 -3
- package/dist/{disconnect-BooT10E1.js → disconnect-AC-bffZO.js} +3 -3
- package/dist/{discord-B982Qaml.js → discord-dT97h-CC.js} +3 -3
- package/dist/down-DP56YSKp.js +606 -0
- package/dist/{etherscan-CFL0IcNl.js → etherscan-rYFRhRTM.js} +3 -3
- package/dist/ethertousd-CC_ezooz.js +6 -0
- package/dist/{exclamation-triangle-BBeGXYgt.js → exclamation-triangle-C-pCuC08.js} +3 -3
- package/dist/{extension-C5WqJw73.js → extension-BnqauLSn.js} +3 -3
- package/dist/{external-link-CcSxVDcd.js → external-link-M9D6e_F3.js} +3 -3
- package/dist/{facebook-DF0v9ED8.js → facebook-DHezcoD-.js} +3 -3
- package/dist/{farcaster-Boq7M4VK.js → farcaster-D0Ky-Imv.js} +3 -3
- package/dist/{filters-DfeymbPx.js → filters-B02NYLWq.js} +3 -3
- package/dist/getChainIds-CJd2TZYT.js +1888 -0
- package/dist/getCosmosAddress-DTZfw04G.js +9565 -0
- package/dist/{github-DQ8FV4bD.js → github-BzQkIMuE.js} +3 -3
- package/dist/{google-Dm8FDDZR.js → google-BpwCJ4Fs.js} +3 -3
- package/dist/hamburger-BzqwkUjE.js +3915 -0
- package/dist/{help-circle-CbgiAebR.js → help-circle-C0nOySHC.js} +3 -3
- package/dist/{id-CzqxUksI.js → id-DFP_kFd4.js} +3 -3
- package/dist/{image-CsCGTIN-.js → image-QiYOAGjM.js} +3 -3
- package/dist/index-CDq3vNnP.js +22 -0
- package/dist/index-CLzkn733.js +28223 -0
- package/dist/index-CjtwASJt.js +252 -0
- package/dist/index-CrC4B7xn.js +331 -0
- package/dist/index-D5hLIe-N.js +9 -0
- package/dist/index-DDk00SOL.js +159 -0
- package/dist/index-DTish3yr.js +1014 -0
- package/dist/index-DW3W7zaF.js +473 -0
- package/dist/index-DXdD3L9f.js +1460 -0
- package/dist/index-DaJ1272l.js +18613 -0
- package/dist/index-DxPp2gBS.js +992 -0
- package/dist/index-Dy_n2MPD.js +3010 -0
- package/dist/index-oc8HPfOF.js +13583 -0
- package/dist/index.es-Bsr7zP98.js +366 -0
- package/dist/index.es-C-j-Ghef.js +11678 -0
- package/dist/index.es.js +4 -4
- package/dist/{info-fKCfLW0k.js → info-BTLQJ-wd.js} +3 -3
- package/dist/{info-circle-Bt350Yzj.js → info-circle-Dla9169_.js} +3 -3
- package/dist/{lightbulb-BL9YBxiA.js → lightbulb-PN8DA_Wh.js} +3 -3
- package/dist/{mail-_g6CHQeQ.js → mail-BGYZut_4.js} +3 -3
- package/dist/{mobile-B-EQ4IcH.js → mobile-BM760ZzX.js} +3 -3
- package/dist/{more-C3rpOdUy.js → more-rHGnl2ck.js} +3 -3
- package/dist/{network-placeholder-D9Ak7Xj_.js → network-placeholder-CyQl-3_2.js} +3 -3
- package/dist/{nftPlaceholder-CIIm2V_o.js → nftPlaceholder-nuUJ8nKY.js} +3 -3
- package/dist/{off-DZjgI0eE.js → off-GYlwYDrT.js} +3 -3
- package/dist/{play-store-DvRnagoF.js → play-store-Ck01Ez1F.js} +3 -3
- package/dist/{plus-C2jN2huZ.js → plus-CQfXWgLw.js} +3 -3
- package/dist/{qr-code-B64HnZgi.js → qr-code-CyLVwLY7.js} +3 -3
- package/dist/{recycle-horizontal-CovcJGa_.js → recycle-horizontal-DvnWPcEQ.js} +3 -3
- package/dist/{refresh-J1Vw6QMA.js → refresh-BOxj8b2n.js} +3 -3
- package/dist/{reown-logo-BsXoZ3KT.js → reown-logo-D1iprOTg.js} +3 -3
- package/dist/{search-BC86wYXR.js → search-DrPaZPnc.js} +3 -3
- package/dist/secp256k1-DgmH1qVg.js +1251 -0
- package/dist/{send-BPA1bK5G.js → send-ybBREe4b.js} +3 -3
- package/dist/shareicon-D3Qj5j1T.js +262 -0
- package/dist/{sortDown-cDA6MpOw.js → sortDown-CjBaDQTU.js} +13 -13
- package/dist/{swapHorizontal-47_8ePle.js → swapHorizontal-BddjZdXK.js} +3 -3
- package/dist/{swapHorizontalBold-CJ7TzeQP.js → swapHorizontalBold-B6AWjPZ9.js} +3 -3
- package/dist/{swapHorizontalMedium-CTACgUR9.js → swapHorizontalMedium-CNacWoBn.js} +3 -3
- package/dist/{swapHorizontalRoundedBold-Ht3_LABp.js → swapHorizontalRoundedBold-B8VcPnqt.js} +3 -3
- package/dist/{swapVertical-DlS0V6DD.js → swapVertical-zY2BbSyQ.js} +3 -3
- package/dist/{telegram-UZ00kvIE.js → telegram-DS4l-8Oc.js} +3 -3
- package/dist/{three-dots-D9zVXr1j.js → three-dots-RctNqamK.js} +3 -3
- package/dist/truncate-D9t92mVX.js +7 -0
- package/dist/{twitch-CP6rpz4m.js → twitch-CJ0llIIH.js} +3 -3
- package/dist/{twitterIcon-Cm3I3FRU.js → twitterIcon-pgvN9-bP.js} +3 -3
- package/dist/unsupportedProp-BJVuEW_b.js +10 -0
- package/dist/useRegisterError-C_YLA1dw.js +9857 -0
- package/dist/validError-CDlJpg_f.js +6 -0
- package/dist/{verify-DuUE85WT.js → verify-BeZLo1Fq.js} +3 -3
- package/dist/{verify-filled-CfgydKPa.js → verify-filled-meyb7E16.js} +3 -3
- package/dist/w3m-modal-C-Jp9NVv.js +1471 -0
- package/dist/{wallet-BC2LSDlF.js → wallet-CFcOgSsz.js} +3 -3
- package/dist/{wallet-placeholder-DugEJ7xM.js → wallet-placeholder-CeUMILZq.js} +3 -3
- package/dist/{walletconnect-wayCaYfk.js → walletconnect-D6LB1PyC.js} +7 -9
- package/dist/{warning-circle-Cy9YuvwU.js → warning-circle-BRtzofvT.js} +3 -3
- package/dist/{x-jggPFiy-.js → x-DKQAOOh3.js} +3 -3
- package/package.json +1 -1
- package/dist/AllRoutes-Bdi5ZW8W.js +0 -2604
- package/dist/Box-e4gA-y_H.js +0 -60
- package/dist/EstGas-C5ihS0Mw.js +0 -17108
- package/dist/Grow-B4K-I-E-.js +0 -2212
- package/dist/InputComp-C_UUZxNU.js +0 -114
- package/dist/LoadRoute-CnDhVKdh.js +0 -142
- package/dist/QuotesProgress-DxgPgPJE.js +0 -29
- package/dist/SwapAsset-CmmuxeQF.js +0 -65
- package/dist/Tooltip-D8YjOOKU.js +0 -718
- package/dist/TxnButton-CF-TLZrD.js +0 -302
- package/dist/WidgetForm.module-DhUUlwZP.js +0 -13
- package/dist/basic-Cx2xxgd9.js +0 -7109
- package/dist/ccip-BKpquA5i.js +0 -250
- package/dist/clockIcon-jSNFFrLy.js +0 -76
- package/dist/core-C-gr9X18.js +0 -17217
- package/dist/cursor-BTtIlTHP.js +0 -7
- package/dist/down-DDk8OoJG.js +0 -809
- package/dist/ethertousd-BOknTgU4.js +0 -7
- package/dist/getChainIds-6iugk2h0.js +0 -2431
- package/dist/getCosmosAddress-BgD5iV6f.js +0 -13998
- package/dist/hamburger-BYe_G11E.js +0 -4562
- package/dist/index-BAmjBHYR.js +0 -1087
- package/dist/index-BxHeZ9IF.js +0 -543
- package/dist/index-C7cb2O7r.js +0 -16078
- package/dist/index-CF9p4S_X.js +0 -11
- package/dist/index-C_vo1L7p.js +0 -24384
- package/dist/index-Ch7w83dW.js +0 -4217
- package/dist/index-Crhenmgw.js +0 -188
- package/dist/index-Cz5Dosd2.js +0 -412
- package/dist/index-D5OnT-__.js +0 -35858
- package/dist/index-DArR1lwi.js +0 -1759
- package/dist/index-hEJSpZe-.js +0 -308
- package/dist/index-m2O0cbD8.js +0 -1883
- package/dist/index-sLx4Edw4.js +0 -22
- package/dist/index.es-DIbGJsfa.js +0 -475
- package/dist/index.es-t6sHlseh.js +0 -12916
- package/dist/secp256k1-BkBK0mD5.js +0 -1681
- package/dist/shareicon-C88Wx-AM.js +0 -314
- package/dist/truncate-DSxFWEga.js +0 -7
- package/dist/unsupportedProp-DkeDzLfM.js +0 -14
- package/dist/useRegisterError-W_UfecIN.js +0 -19288
- package/dist/validError-rariWQ7G.js +0 -14
- package/dist/w3m-modal-Bl-DPlah.js +0 -1721
@@ -0,0 +1,473 @@
|
|
1
|
+
import { g as G, p as P, r as U, _ as H, b as u, d, e as m, P as r } from "./index-CLzkn733.js";
|
2
|
+
import * as v from "react";
|
3
|
+
import { g as q, d as J, s as W, c as M, a as K, r as Q } from "./useRegisterError-C_YLA1dw.js";
|
4
|
+
import { jsx as V, jsxs as X } from "react/jsx-runtime";
|
5
|
+
import { B as Y } from "./getChainIds-CJd2TZYT.js";
|
6
|
+
function Z(o) {
|
7
|
+
return G("MuiButton", o);
|
8
|
+
}
|
9
|
+
const O = q("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), _ = /* @__PURE__ */ v.createContext({});
|
10
|
+
P.env.NODE_ENV !== "production" && (_.displayName = "ButtonGroupContext");
|
11
|
+
const L = /* @__PURE__ */ v.createContext(void 0);
|
12
|
+
P.env.NODE_ENV !== "production" && (L.displayName = "ButtonGroupButtonContext");
|
13
|
+
const w = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], oo = (o) => {
|
14
|
+
const {
|
15
|
+
color: n,
|
16
|
+
disableElevation: i,
|
17
|
+
fullWidth: s,
|
18
|
+
size: l,
|
19
|
+
variant: t,
|
20
|
+
classes: e
|
21
|
+
} = o, a = {
|
22
|
+
root: ["root", t, `${t}${d(n)}`, `size${d(l)}`, `${t}Size${d(l)}`, `color${d(n)}`, i && "disableElevation", s && "fullWidth"],
|
23
|
+
label: ["label"],
|
24
|
+
startIcon: ["icon", "startIcon", `iconSize${d(l)}`],
|
25
|
+
endIcon: ["icon", "endIcon", `iconSize${d(l)}`]
|
26
|
+
}, c = K(a, Z, e);
|
27
|
+
return u({}, e, c);
|
28
|
+
}, j = (o) => u({}, o.size === "small" && {
|
29
|
+
"& > *:nth-of-type(1)": {
|
30
|
+
fontSize: 18
|
31
|
+
}
|
32
|
+
}, o.size === "medium" && {
|
33
|
+
"& > *:nth-of-type(1)": {
|
34
|
+
fontSize: 20
|
35
|
+
}
|
36
|
+
}, o.size === "large" && {
|
37
|
+
"& > *:nth-of-type(1)": {
|
38
|
+
fontSize: 22
|
39
|
+
}
|
40
|
+
}), no = W(Y, {
|
41
|
+
shouldForwardProp: (o) => Q(o) || o === "classes",
|
42
|
+
name: "MuiButton",
|
43
|
+
slot: "Root",
|
44
|
+
overridesResolver: (o, n) => {
|
45
|
+
const {
|
46
|
+
ownerState: i
|
47
|
+
} = o;
|
48
|
+
return [n.root, n[i.variant], n[`${i.variant}${d(i.color)}`], n[`size${d(i.size)}`], n[`${i.variant}Size${d(i.size)}`], i.color === "inherit" && n.colorInherit, i.disableElevation && n.disableElevation, i.fullWidth && n.fullWidth];
|
49
|
+
}
|
50
|
+
})(({
|
51
|
+
theme: o,
|
52
|
+
ownerState: n
|
53
|
+
}) => {
|
54
|
+
var i, s;
|
55
|
+
const l = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], t = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
56
|
+
return u({}, o.typography.button, {
|
57
|
+
minWidth: 64,
|
58
|
+
padding: "6px 16px",
|
59
|
+
borderRadius: (o.vars || o).shape.borderRadius,
|
60
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
|
61
|
+
duration: o.transitions.duration.short
|
62
|
+
}),
|
63
|
+
"&:hover": u({
|
64
|
+
textDecoration: "none",
|
65
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : m.alpha(o.palette.text.primary, o.palette.action.hoverOpacity),
|
66
|
+
// Reset on touch devices, it doesn't add specificity
|
67
|
+
"@media (hover: none)": {
|
68
|
+
backgroundColor: "transparent"
|
69
|
+
}
|
70
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
71
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : m.alpha(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
72
|
+
// Reset on touch devices, it doesn't add specificity
|
73
|
+
"@media (hover: none)": {
|
74
|
+
backgroundColor: "transparent"
|
75
|
+
}
|
76
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
77
|
+
border: `1px solid ${(o.vars || o).palette[n.color].main}`,
|
78
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : m.alpha(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
79
|
+
// Reset on touch devices, it doesn't add specificity
|
80
|
+
"@media (hover: none)": {
|
81
|
+
backgroundColor: "transparent"
|
82
|
+
}
|
83
|
+
}, n.variant === "contained" && {
|
84
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedHoverBg : t,
|
85
|
+
boxShadow: (o.vars || o).shadows[4],
|
86
|
+
// Reset on touch devices, it doesn't add specificity
|
87
|
+
"@media (hover: none)": {
|
88
|
+
boxShadow: (o.vars || o).shadows[2],
|
89
|
+
backgroundColor: (o.vars || o).palette.grey[300]
|
90
|
+
}
|
91
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
92
|
+
backgroundColor: (o.vars || o).palette[n.color].dark,
|
93
|
+
// Reset on touch devices, it doesn't add specificity
|
94
|
+
"@media (hover: none)": {
|
95
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
96
|
+
}
|
97
|
+
}),
|
98
|
+
"&:active": u({}, n.variant === "contained" && {
|
99
|
+
boxShadow: (o.vars || o).shadows[8]
|
100
|
+
}),
|
101
|
+
[`&.${O.focusVisible}`]: u({}, n.variant === "contained" && {
|
102
|
+
boxShadow: (o.vars || o).shadows[6]
|
103
|
+
}),
|
104
|
+
[`&.${O.disabled}`]: u({
|
105
|
+
color: (o.vars || o).palette.action.disabled
|
106
|
+
}, n.variant === "outlined" && {
|
107
|
+
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
108
|
+
}, n.variant === "contained" && {
|
109
|
+
color: (o.vars || o).palette.action.disabled,
|
110
|
+
boxShadow: (o.vars || o).shadows[0],
|
111
|
+
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
112
|
+
})
|
113
|
+
}, n.variant === "text" && {
|
114
|
+
padding: "6px 8px"
|
115
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
116
|
+
color: (o.vars || o).palette[n.color].main
|
117
|
+
}, n.variant === "outlined" && {
|
118
|
+
padding: "5px 15px",
|
119
|
+
border: "1px solid currentColor"
|
120
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
121
|
+
color: (o.vars || o).palette[n.color].main,
|
122
|
+
border: o.vars ? `1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)` : `1px solid ${m.alpha(o.palette[n.color].main, 0.5)}`
|
123
|
+
}, n.variant === "contained" && {
|
124
|
+
color: o.vars ? (
|
125
|
+
// this is safe because grey does not change between default light/dark mode
|
126
|
+
o.vars.palette.text.primary
|
127
|
+
) : (i = (s = o.palette).getContrastText) == null ? void 0 : i.call(s, o.palette.grey[300]),
|
128
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedBg : l,
|
129
|
+
boxShadow: (o.vars || o).shadows[2]
|
130
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
131
|
+
color: (o.vars || o).palette[n.color].contrastText,
|
132
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
133
|
+
}, n.color === "inherit" && {
|
134
|
+
color: "inherit",
|
135
|
+
borderColor: "currentColor"
|
136
|
+
}, n.size === "small" && n.variant === "text" && {
|
137
|
+
padding: "4px 5px",
|
138
|
+
fontSize: o.typography.pxToRem(13)
|
139
|
+
}, n.size === "large" && n.variant === "text" && {
|
140
|
+
padding: "8px 11px",
|
141
|
+
fontSize: o.typography.pxToRem(15)
|
142
|
+
}, n.size === "small" && n.variant === "outlined" && {
|
143
|
+
padding: "3px 9px",
|
144
|
+
fontSize: o.typography.pxToRem(13)
|
145
|
+
}, n.size === "large" && n.variant === "outlined" && {
|
146
|
+
padding: "7px 21px",
|
147
|
+
fontSize: o.typography.pxToRem(15)
|
148
|
+
}, n.size === "small" && n.variant === "contained" && {
|
149
|
+
padding: "4px 10px",
|
150
|
+
fontSize: o.typography.pxToRem(13)
|
151
|
+
}, n.size === "large" && n.variant === "contained" && {
|
152
|
+
padding: "8px 22px",
|
153
|
+
fontSize: o.typography.pxToRem(15)
|
154
|
+
}, n.fullWidth && {
|
155
|
+
width: "100%"
|
156
|
+
});
|
157
|
+
}, ({
|
158
|
+
ownerState: o
|
159
|
+
}) => o.disableElevation && {
|
160
|
+
boxShadow: "none",
|
161
|
+
"&:hover": {
|
162
|
+
boxShadow: "none"
|
163
|
+
},
|
164
|
+
[`&.${O.focusVisible}`]: {
|
165
|
+
boxShadow: "none"
|
166
|
+
},
|
167
|
+
"&:active": {
|
168
|
+
boxShadow: "none"
|
169
|
+
},
|
170
|
+
[`&.${O.disabled}`]: {
|
171
|
+
boxShadow: "none"
|
172
|
+
}
|
173
|
+
}), ro = W("span", {
|
174
|
+
name: "MuiButton",
|
175
|
+
slot: "StartIcon",
|
176
|
+
overridesResolver: (o, n) => {
|
177
|
+
const {
|
178
|
+
ownerState: i
|
179
|
+
} = o;
|
180
|
+
return [n.startIcon, n[`iconSize${d(i.size)}`]];
|
181
|
+
}
|
182
|
+
})(({
|
183
|
+
ownerState: o
|
184
|
+
}) => u({
|
185
|
+
display: "inherit",
|
186
|
+
marginRight: 8,
|
187
|
+
marginLeft: -4
|
188
|
+
}, o.size === "small" && {
|
189
|
+
marginLeft: -2
|
190
|
+
}, j(o))), io = W("span", {
|
191
|
+
name: "MuiButton",
|
192
|
+
slot: "EndIcon",
|
193
|
+
overridesResolver: (o, n) => {
|
194
|
+
const {
|
195
|
+
ownerState: i
|
196
|
+
} = o;
|
197
|
+
return [n.endIcon, n[`iconSize${d(i.size)}`]];
|
198
|
+
}
|
199
|
+
})(({
|
200
|
+
ownerState: o
|
201
|
+
}) => u({
|
202
|
+
display: "inherit",
|
203
|
+
marginRight: -4,
|
204
|
+
marginLeft: 8
|
205
|
+
}, o.size === "small" && {
|
206
|
+
marginRight: -2
|
207
|
+
}, j(o))), ao = /* @__PURE__ */ v.forwardRef(function(n, i) {
|
208
|
+
const s = v.useContext(_), l = v.useContext(L), t = U(s, n), e = J({
|
209
|
+
props: t,
|
210
|
+
name: "MuiButton"
|
211
|
+
}), {
|
212
|
+
children: a,
|
213
|
+
color: c = "primary",
|
214
|
+
component: f = "button",
|
215
|
+
className: g,
|
216
|
+
disabled: x = !1,
|
217
|
+
disableElevation: T = !1,
|
218
|
+
disableFocusRipple: y = !1,
|
219
|
+
endIcon: z,
|
220
|
+
focusVisibleClassName: $,
|
221
|
+
fullWidth: C = !1,
|
222
|
+
size: B = "medium",
|
223
|
+
startIcon: p,
|
224
|
+
type: b,
|
225
|
+
variant: R = "text"
|
226
|
+
} = e, I = H(e, w), E = u({}, e, {
|
227
|
+
color: c,
|
228
|
+
component: f,
|
229
|
+
disabled: x,
|
230
|
+
disableElevation: T,
|
231
|
+
disableFocusRipple: y,
|
232
|
+
fullWidth: C,
|
233
|
+
size: B,
|
234
|
+
type: b,
|
235
|
+
variant: R
|
236
|
+
}), h = oo(E), A = p && /* @__PURE__ */ V(ro, {
|
237
|
+
className: h.startIcon,
|
238
|
+
ownerState: E,
|
239
|
+
children: p
|
240
|
+
}), D = z && /* @__PURE__ */ V(io, {
|
241
|
+
className: h.endIcon,
|
242
|
+
ownerState: E,
|
243
|
+
children: z
|
244
|
+
}), F = l || "";
|
245
|
+
return /* @__PURE__ */ X(no, u({
|
246
|
+
ownerState: E,
|
247
|
+
className: M(s.className, h.root, g, F),
|
248
|
+
component: f,
|
249
|
+
disabled: x,
|
250
|
+
focusRipple: !y,
|
251
|
+
focusVisibleClassName: M(h.focusVisible, $),
|
252
|
+
ref: i,
|
253
|
+
type: b
|
254
|
+
}, I, {
|
255
|
+
classes: h,
|
256
|
+
children: [A, a, D]
|
257
|
+
}));
|
258
|
+
});
|
259
|
+
P.env.NODE_ENV !== "production" && (ao.propTypes = {
|
260
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
261
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
262
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
263
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
264
|
+
/**
|
265
|
+
* The content of the component.
|
266
|
+
*/
|
267
|
+
children: r.node,
|
268
|
+
/**
|
269
|
+
* Override or extend the styles applied to the component.
|
270
|
+
*/
|
271
|
+
classes: r.object,
|
272
|
+
/**
|
273
|
+
* @ignore
|
274
|
+
*/
|
275
|
+
className: r.string,
|
276
|
+
/**
|
277
|
+
* The color of the component.
|
278
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
279
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
280
|
+
* @default 'primary'
|
281
|
+
*/
|
282
|
+
color: r.oneOfType([r.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), r.string]),
|
283
|
+
/**
|
284
|
+
* The component used for the root node.
|
285
|
+
* Either a string to use a HTML element or a component.
|
286
|
+
*/
|
287
|
+
component: r.elementType,
|
288
|
+
/**
|
289
|
+
* If `true`, the component is disabled.
|
290
|
+
* @default false
|
291
|
+
*/
|
292
|
+
disabled: r.bool,
|
293
|
+
/**
|
294
|
+
* If `true`, no elevation is used.
|
295
|
+
* @default false
|
296
|
+
*/
|
297
|
+
disableElevation: r.bool,
|
298
|
+
/**
|
299
|
+
* If `true`, the keyboard focus ripple is disabled.
|
300
|
+
* @default false
|
301
|
+
*/
|
302
|
+
disableFocusRipple: r.bool,
|
303
|
+
/**
|
304
|
+
* If `true`, the ripple effect is disabled.
|
305
|
+
*
|
306
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
307
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
308
|
+
* @default false
|
309
|
+
*/
|
310
|
+
disableRipple: r.bool,
|
311
|
+
/**
|
312
|
+
* Element placed after the children.
|
313
|
+
*/
|
314
|
+
endIcon: r.node,
|
315
|
+
/**
|
316
|
+
* @ignore
|
317
|
+
*/
|
318
|
+
focusVisibleClassName: r.string,
|
319
|
+
/**
|
320
|
+
* If `true`, the button will take up the full width of its container.
|
321
|
+
* @default false
|
322
|
+
*/
|
323
|
+
fullWidth: r.bool,
|
324
|
+
/**
|
325
|
+
* The URL to link to when the button is clicked.
|
326
|
+
* If defined, an `a` element will be used as the root node.
|
327
|
+
*/
|
328
|
+
href: r.string,
|
329
|
+
/**
|
330
|
+
* The size of the component.
|
331
|
+
* `small` is equivalent to the dense button styling.
|
332
|
+
* @default 'medium'
|
333
|
+
*/
|
334
|
+
size: r.oneOfType([r.oneOf(["small", "medium", "large"]), r.string]),
|
335
|
+
/**
|
336
|
+
* Element placed before the children.
|
337
|
+
*/
|
338
|
+
startIcon: r.node,
|
339
|
+
/**
|
340
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
341
|
+
*/
|
342
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
343
|
+
/**
|
344
|
+
* @ignore
|
345
|
+
*/
|
346
|
+
type: r.oneOfType([r.oneOf(["button", "reset", "submit"]), r.string]),
|
347
|
+
/**
|
348
|
+
* The variant to use.
|
349
|
+
* @default 'text'
|
350
|
+
*/
|
351
|
+
variant: r.oneOfType([r.oneOf(["contained", "outlined", "text"]), r.string])
|
352
|
+
});
|
353
|
+
var S = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new WeakMap(), k = 0, to = void 0;
|
354
|
+
function eo(o) {
|
355
|
+
return o ? (N.has(o) || (k += 1, N.set(o, k.toString())), N.get(o)) : "0";
|
356
|
+
}
|
357
|
+
function so(o) {
|
358
|
+
return Object.keys(o).sort().filter(
|
359
|
+
(n) => o[n] !== void 0
|
360
|
+
).map((n) => `${n}_${n === "root" ? eo(o.root) : o[n]}`).toString();
|
361
|
+
}
|
362
|
+
function lo(o) {
|
363
|
+
const n = so(o);
|
364
|
+
let i = S.get(n);
|
365
|
+
if (!i) {
|
366
|
+
const s = /* @__PURE__ */ new Map();
|
367
|
+
let l;
|
368
|
+
const t = new IntersectionObserver((e) => {
|
369
|
+
e.forEach((a) => {
|
370
|
+
var c;
|
371
|
+
const f = a.isIntersecting && l.some((g) => a.intersectionRatio >= g);
|
372
|
+
o.trackVisibility && typeof a.isVisible > "u" && (a.isVisible = f), (c = s.get(a.target)) == null || c.forEach((g) => {
|
373
|
+
g(f, a);
|
374
|
+
});
|
375
|
+
});
|
376
|
+
}, o);
|
377
|
+
l = t.thresholds || (Array.isArray(o.threshold) ? o.threshold : [o.threshold || 0]), i = {
|
378
|
+
id: n,
|
379
|
+
observer: t,
|
380
|
+
elements: s
|
381
|
+
}, S.set(n, i);
|
382
|
+
}
|
383
|
+
return i;
|
384
|
+
}
|
385
|
+
function co(o, n, i = {}, s = to) {
|
386
|
+
if (typeof window.IntersectionObserver > "u" && s !== void 0) {
|
387
|
+
const c = o.getBoundingClientRect();
|
388
|
+
return n(s, {
|
389
|
+
isIntersecting: s,
|
390
|
+
target: o,
|
391
|
+
intersectionRatio: typeof i.threshold == "number" ? i.threshold : 0,
|
392
|
+
time: 0,
|
393
|
+
boundingClientRect: c,
|
394
|
+
intersectionRect: c,
|
395
|
+
rootBounds: c
|
396
|
+
}), () => {
|
397
|
+
};
|
398
|
+
}
|
399
|
+
const { id: l, observer: t, elements: e } = lo(i), a = e.get(o) || [];
|
400
|
+
return e.has(o) || e.set(o, a), a.push(n), t.observe(o), function() {
|
401
|
+
a.splice(a.indexOf(n), 1), a.length === 0 && (e.delete(o), t.unobserve(o)), e.size === 0 && (t.disconnect(), S.delete(l));
|
402
|
+
};
|
403
|
+
}
|
404
|
+
function fo({
|
405
|
+
threshold: o,
|
406
|
+
delay: n,
|
407
|
+
trackVisibility: i,
|
408
|
+
rootMargin: s,
|
409
|
+
root: l,
|
410
|
+
triggerOnce: t,
|
411
|
+
skip: e,
|
412
|
+
initialInView: a,
|
413
|
+
fallbackInView: c,
|
414
|
+
onChange: f
|
415
|
+
} = {}) {
|
416
|
+
var g;
|
417
|
+
const [x, T] = v.useState(null), y = v.useRef(f), [z, $] = v.useState({
|
418
|
+
inView: !!a,
|
419
|
+
entry: void 0
|
420
|
+
});
|
421
|
+
y.current = f, v.useEffect(
|
422
|
+
() => {
|
423
|
+
if (e || !x) return;
|
424
|
+
let b;
|
425
|
+
return b = co(
|
426
|
+
x,
|
427
|
+
(R, I) => {
|
428
|
+
$({
|
429
|
+
inView: R,
|
430
|
+
entry: I
|
431
|
+
}), y.current && y.current(R, I), I.isIntersecting && t && b && (b(), b = void 0);
|
432
|
+
},
|
433
|
+
{
|
434
|
+
root: l,
|
435
|
+
rootMargin: s,
|
436
|
+
threshold: o,
|
437
|
+
// @ts-ignore
|
438
|
+
trackVisibility: i,
|
439
|
+
// @ts-ignore
|
440
|
+
delay: n
|
441
|
+
},
|
442
|
+
c
|
443
|
+
), () => {
|
444
|
+
b && b();
|
445
|
+
};
|
446
|
+
},
|
447
|
+
// We break the rule here, because we aren't including the actual `threshold` variable
|
448
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
449
|
+
[
|
450
|
+
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
451
|
+
Array.isArray(o) ? o.toString() : o,
|
452
|
+
x,
|
453
|
+
l,
|
454
|
+
s,
|
455
|
+
t,
|
456
|
+
e,
|
457
|
+
i,
|
458
|
+
c,
|
459
|
+
n
|
460
|
+
]
|
461
|
+
);
|
462
|
+
const C = (g = z.entry) == null ? void 0 : g.target, B = v.useRef(void 0);
|
463
|
+
!x && C && !t && !e && B.current !== C && (B.current = C, $({
|
464
|
+
inView: !!a,
|
465
|
+
entry: void 0
|
466
|
+
}));
|
467
|
+
const p = [T, z.inView, z.entry];
|
468
|
+
return p.ref = p[0], p.inView = p[1], p.entry = p[2], p;
|
469
|
+
}
|
470
|
+
export {
|
471
|
+
ao as B,
|
472
|
+
fo as u
|
473
|
+
};
|