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