@fairmint/ui 0.2.13 → 0.2.15
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/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/generic/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts +21 -0
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts.map +1 -0
- package/dist/components/generic/ListRow/ListRow.d.ts.map +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/layout/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/specific/WalletList/WalletList.d.ts +35 -5
- package/dist/components/specific/WalletList/WalletList.d.ts.map +1 -1
- package/dist/fairmint-ui.cjs +567 -182
- package/dist/fairmint-ui.cjs.map +1 -1
- package/dist/fairmint-ui.js +567 -182
- package/dist/fairmint-ui.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/theme/index.d.ts +205 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +19 -0
- package/dist/utils/wallets.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/fairmint-ui.js
CHANGED
|
@@ -26802,110 +26802,6 @@ const AVATAR_PALETTE = [
|
|
|
26802
26802
|
colors.accent2,
|
|
26803
26803
|
colors.accent3
|
|
26804
26804
|
];
|
|
26805
|
-
const ActionIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(ActionIcon$1, { color: colors.primary, variant: "subtle", ...props, ref }));
|
|
26806
|
-
ActionIcon.displayName = "ActionIcon";
|
|
26807
|
-
function Alert(props) {
|
|
26808
|
-
return /* @__PURE__ */ jsx(Alert$1, { ...props });
|
|
26809
|
-
}
|
|
26810
|
-
const Avatar = forwardRef((props, ref) => /* @__PURE__ */ jsx(Avatar$1, { radius: "md", color: colors.primary, ...props, ref }));
|
|
26811
|
-
Avatar.displayName = "Avatar";
|
|
26812
|
-
const Badge = forwardRef((props, ref) => /* @__PURE__ */ jsx(Badge$1, { variant: "light", ...props, ref }));
|
|
26813
|
-
Badge.displayName = "Badge";
|
|
26814
|
-
const Button = forwardRef((props, ref) => /* @__PURE__ */ jsx(Button$1, { color: colors.primary, ...props, ref }));
|
|
26815
|
-
Button.displayName = "Button";
|
|
26816
|
-
const Card = forwardRef((props, ref) => /* @__PURE__ */ jsx(Card$1, { padding: "lg", radius: "xl", withBorder: true, ...props, ref }));
|
|
26817
|
-
Card.displayName = "Card";
|
|
26818
|
-
const Checkbox = forwardRef((props, ref) => /* @__PURE__ */ jsx(Checkbox$1, { color: colors.primary, ...props, ref }));
|
|
26819
|
-
Checkbox.displayName = "Checkbox";
|
|
26820
|
-
function Drawer(props) {
|
|
26821
|
-
return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
|
|
26822
|
-
}
|
|
26823
|
-
function Loader(props) {
|
|
26824
|
-
return /* @__PURE__ */ jsx(Loader$1, { ...props });
|
|
26825
|
-
}
|
|
26826
|
-
function MenuBase(props) {
|
|
26827
|
-
return /* @__PURE__ */ jsx(Menu$1, { shadow: "md", ...props });
|
|
26828
|
-
}
|
|
26829
|
-
const Menu = Object.assign(MenuBase, {
|
|
26830
|
-
Target: Menu$1.Target,
|
|
26831
|
-
Dropdown: Menu$1.Dropdown,
|
|
26832
|
-
Item: Menu$1.Item,
|
|
26833
|
-
Label: Menu$1.Label,
|
|
26834
|
-
Divider: Menu$1.Divider
|
|
26835
|
-
});
|
|
26836
|
-
function Modal(props) {
|
|
26837
|
-
return /* @__PURE__ */ jsx(Modal$1, { centered: true, radius: "lg", ...props });
|
|
26838
|
-
}
|
|
26839
|
-
const PasswordInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(PasswordInput$1, { size: "md", ...props, ref }));
|
|
26840
|
-
PasswordInput.displayName = "PasswordInput";
|
|
26841
|
-
const Select = forwardRef((props, ref) => /* @__PURE__ */ jsx(Select$1, { size: "md", ...props, ref }));
|
|
26842
|
-
Select.displayName = "Select";
|
|
26843
|
-
function Skeleton(props) {
|
|
26844
|
-
return /* @__PURE__ */ jsx(Skeleton$1, { ...props });
|
|
26845
|
-
}
|
|
26846
|
-
const Switch = forwardRef((props, ref) => /* @__PURE__ */ jsx(Switch$1, { color: colors.primary, ...props, ref }));
|
|
26847
|
-
Switch.displayName = "Switch";
|
|
26848
|
-
function TableBase(props) {
|
|
26849
|
-
return /* @__PURE__ */ jsx(Table$1, { ...props });
|
|
26850
|
-
}
|
|
26851
|
-
const Table = Object.assign(TableBase, {
|
|
26852
|
-
Thead: Table$1.Thead,
|
|
26853
|
-
Tbody: Table$1.Tbody,
|
|
26854
|
-
Tr: Table$1.Tr,
|
|
26855
|
-
Th: Table$1.Th,
|
|
26856
|
-
Td: Table$1.Td,
|
|
26857
|
-
Tfoot: Table$1.Tfoot,
|
|
26858
|
-
Caption: Table$1.Caption
|
|
26859
|
-
});
|
|
26860
|
-
function TabsBase(props) {
|
|
26861
|
-
return /* @__PURE__ */ jsx(Tabs$1, { color: colors.primary, ...props });
|
|
26862
|
-
}
|
|
26863
|
-
const Tabs = Object.assign(TabsBase, {
|
|
26864
|
-
List: Tabs$1.List,
|
|
26865
|
-
Tab: Tabs$1.Tab,
|
|
26866
|
-
Panel: Tabs$1.Panel
|
|
26867
|
-
});
|
|
26868
|
-
const TextInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(TextInput$1, { size: "md", ...props, ref }));
|
|
26869
|
-
TextInput.displayName = "TextInput";
|
|
26870
|
-
function Tooltip(props) {
|
|
26871
|
-
return /* @__PURE__ */ jsx(Tooltip$1, { fz: "xs", ...props });
|
|
26872
|
-
}
|
|
26873
|
-
function ErrorFallback({
|
|
26874
|
-
title = "Something went wrong",
|
|
26875
|
-
description = "We've been notified and are working on a fix.",
|
|
26876
|
-
onAction,
|
|
26877
|
-
actionLabel = "Reload Page",
|
|
26878
|
-
error: error2
|
|
26879
|
-
}) {
|
|
26880
|
-
if (error2 !== void 0) {
|
|
26881
|
-
console.error("[ErrorFallback]", error2);
|
|
26882
|
-
}
|
|
26883
|
-
const handleAction = onAction ?? (() => window.location.reload());
|
|
26884
|
-
return /* @__PURE__ */ jsx(Container, { size: "sm", py: "xl", children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", children: [
|
|
26885
|
-
/* @__PURE__ */ jsx(Title, { order: 2, children: title }),
|
|
26886
|
-
/* @__PURE__ */ jsx(Text, { c: "dimmed", children: description }),
|
|
26887
|
-
/* @__PURE__ */ jsx(Button, { onClick: handleAction, children: actionLabel })
|
|
26888
|
-
] }) });
|
|
26889
|
-
}
|
|
26890
|
-
function FairmintLogo({
|
|
26891
|
-
src = "https://imagedelivery.net/Lm6ChJXR4cIKKycsNMvGjA/0367be38-c9d8-4206-aaae-eba5ff830600/public",
|
|
26892
|
-
width = 140,
|
|
26893
|
-
height = 30,
|
|
26894
|
-
className,
|
|
26895
|
-
alt = "Fairmint"
|
|
26896
|
-
}) {
|
|
26897
|
-
return /* @__PURE__ */ jsx(
|
|
26898
|
-
"img",
|
|
26899
|
-
{
|
|
26900
|
-
src,
|
|
26901
|
-
alt,
|
|
26902
|
-
width,
|
|
26903
|
-
height,
|
|
26904
|
-
className,
|
|
26905
|
-
style: { objectFit: "contain" }
|
|
26906
|
-
}
|
|
26907
|
-
);
|
|
26908
|
-
}
|
|
26909
26805
|
const radii = {
|
|
26910
26806
|
xs: "0.25rem",
|
|
26911
26807
|
sm: "0.375rem",
|
|
@@ -27009,12 +26905,16 @@ const info = [
|
|
|
27009
26905
|
"#155B75",
|
|
27010
26906
|
"#164C63"
|
|
27011
26907
|
];
|
|
26908
|
+
const typography = {
|
|
26909
|
+
fontFamily: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',
|
|
26910
|
+
headingFontFamily: '"Plus Jakarta Sans", sans-serif'
|
|
26911
|
+
};
|
|
27012
26912
|
const theme = createTheme({
|
|
27013
26913
|
primaryColor: "indigo",
|
|
27014
26914
|
colors: { indigo, gray: neutral, fairmintBlue, fairmintPurple, success, warning, error, info },
|
|
27015
|
-
fontFamily:
|
|
26915
|
+
fontFamily: typography.fontFamily,
|
|
27016
26916
|
headings: {
|
|
27017
|
-
fontFamily:
|
|
26917
|
+
fontFamily: typography.headingFontFamily,
|
|
27018
26918
|
fontWeight: "700"
|
|
27019
26919
|
},
|
|
27020
26920
|
radius: radii,
|
|
@@ -27064,6 +26964,49 @@ const theme = createTheme({
|
|
|
27064
26964
|
}
|
|
27065
26965
|
}
|
|
27066
26966
|
});
|
|
26967
|
+
const fairmintCssVariables = () => ({
|
|
26968
|
+
variables: {
|
|
26969
|
+
"--fairmint-font-headings": typography.headingFontFamily,
|
|
26970
|
+
"--fairmint-font-body": typography.fontFamily
|
|
26971
|
+
},
|
|
26972
|
+
light: {
|
|
26973
|
+
/** Large decorative background text on error/empty pages. */
|
|
26974
|
+
"--fairmint-watermark-color": neutral[1],
|
|
26975
|
+
/** Supporting / muted text (subtitles, secondary labels). Replaces c="dimmed" and neutral.5 */
|
|
26976
|
+
"--fairmint-color-text-secondary": neutral[5],
|
|
26977
|
+
/** Faint metadata text (timestamps, tertiary labels). Replaces neutral.4 */
|
|
26978
|
+
"--fairmint-color-text-tertiary": neutral[4],
|
|
26979
|
+
/** Background tint for selected / active rows. Replaces primary.0 */
|
|
26980
|
+
"--fairmint-color-surface-selected": indigo[0]
|
|
26981
|
+
},
|
|
26982
|
+
dark: {
|
|
26983
|
+
"--fairmint-watermark-color": neutral[7],
|
|
26984
|
+
"--fairmint-color-text-secondary": neutral[4],
|
|
26985
|
+
"--fairmint-color-text-tertiary": neutral[5],
|
|
26986
|
+
"--fairmint-color-surface-selected": indigo[9]
|
|
26987
|
+
}
|
|
26988
|
+
});
|
|
26989
|
+
const fairmintVars = {
|
|
26990
|
+
/** Secondary / muted text — subtitles, supporting labels. Adapts to color scheme. */
|
|
26991
|
+
colorTextSecondary: `var(--fairmint-color-text-secondary, ${neutral[5]})`,
|
|
26992
|
+
/** Tertiary / faint text — timestamps, metadata. Adapts to color scheme. */
|
|
26993
|
+
colorTextTertiary: `var(--fairmint-color-text-tertiary, ${neutral[4]})`,
|
|
26994
|
+
/** Background tint for selected / active rows. Adapts to color scheme. */
|
|
26995
|
+
colorSurfaceSelected: `var(--fairmint-color-surface-selected, ${indigo[0]})`,
|
|
26996
|
+
/** Large decorative watermark on error/empty pages. Adapts to color scheme. */
|
|
26997
|
+
watermarkColor: `var(--fairmint-watermark-color, ${neutral[1]})`,
|
|
26998
|
+
/** Heading font family (Plus Jakarta Sans). */
|
|
26999
|
+
fontHeadings: `var(--fairmint-font-headings, ${typography.headingFontFamily})`,
|
|
27000
|
+
/** Body font family (Inter). */
|
|
27001
|
+
fontBody: `var(--fairmint-font-body, ${typography.fontFamily})`
|
|
27002
|
+
};
|
|
27003
|
+
function createFairmintMantineProviderProps(colorScheme = "light") {
|
|
27004
|
+
return {
|
|
27005
|
+
theme,
|
|
27006
|
+
cssVariablesResolver: fairmintCssVariables,
|
|
27007
|
+
defaultColorScheme: colorScheme
|
|
27008
|
+
};
|
|
27009
|
+
}
|
|
27067
27010
|
const brandColors = {
|
|
27068
27011
|
blue: "#0A4EFB",
|
|
27069
27012
|
purple: "#9E03FF",
|
|
@@ -27088,15 +27031,127 @@ const semanticColors = {
|
|
|
27088
27031
|
error: "#F04438",
|
|
27089
27032
|
info: "#06AED4"
|
|
27090
27033
|
};
|
|
27034
|
+
const ActionIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(ActionIcon$1, { color: colors.primary, variant: "subtle", ...props, ref }));
|
|
27035
|
+
ActionIcon.displayName = "ActionIcon";
|
|
27036
|
+
function Alert(props) {
|
|
27037
|
+
return /* @__PURE__ */ jsx(Alert$1, { ...props });
|
|
27038
|
+
}
|
|
27039
|
+
const Avatar = forwardRef((props, ref) => /* @__PURE__ */ jsx(Avatar$1, { radius: "md", color: colors.primary, ...props, ref }));
|
|
27040
|
+
Avatar.displayName = "Avatar";
|
|
27041
|
+
const Badge = forwardRef((props, ref) => /* @__PURE__ */ jsx(Badge$1, { variant: "light", ...props, ref }));
|
|
27042
|
+
Badge.displayName = "Badge";
|
|
27043
|
+
const Button = forwardRef((props, ref) => /* @__PURE__ */ jsx(Button$1, { color: colors.primary, ...props, ref }));
|
|
27044
|
+
Button.displayName = "Button";
|
|
27045
|
+
const Card = forwardRef((props, ref) => /* @__PURE__ */ jsx(Card$1, { padding: "lg", radius: "xl", withBorder: true, ...props, ref }));
|
|
27046
|
+
Card.displayName = "Card";
|
|
27047
|
+
const Checkbox = forwardRef((props, ref) => /* @__PURE__ */ jsx(Checkbox$1, { color: colors.primary, ...props, ref }));
|
|
27048
|
+
Checkbox.displayName = "Checkbox";
|
|
27049
|
+
function Drawer(props) {
|
|
27050
|
+
return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
|
|
27051
|
+
}
|
|
27052
|
+
function Loader(props) {
|
|
27053
|
+
return /* @__PURE__ */ jsx(Loader$1, { ...props });
|
|
27054
|
+
}
|
|
27055
|
+
function MenuBase(props) {
|
|
27056
|
+
return /* @__PURE__ */ jsx(Menu$1, { shadow: "md", ...props });
|
|
27057
|
+
}
|
|
27058
|
+
const Menu = Object.assign(MenuBase, {
|
|
27059
|
+
Target: Menu$1.Target,
|
|
27060
|
+
Dropdown: Menu$1.Dropdown,
|
|
27061
|
+
Item: Menu$1.Item,
|
|
27062
|
+
Label: Menu$1.Label,
|
|
27063
|
+
Divider: Menu$1.Divider
|
|
27064
|
+
});
|
|
27065
|
+
function Modal(props) {
|
|
27066
|
+
return /* @__PURE__ */ jsx(Modal$1, { centered: true, radius: "lg", ...props });
|
|
27067
|
+
}
|
|
27068
|
+
const PasswordInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(PasswordInput$1, { size: "md", ...props, ref }));
|
|
27069
|
+
PasswordInput.displayName = "PasswordInput";
|
|
27070
|
+
const Select = forwardRef((props, ref) => /* @__PURE__ */ jsx(Select$1, { size: "md", ...props, ref }));
|
|
27071
|
+
Select.displayName = "Select";
|
|
27072
|
+
function Skeleton(props) {
|
|
27073
|
+
return /* @__PURE__ */ jsx(Skeleton$1, { ...props });
|
|
27074
|
+
}
|
|
27075
|
+
const Switch = forwardRef((props, ref) => /* @__PURE__ */ jsx(Switch$1, { color: colors.primary, ...props, ref }));
|
|
27076
|
+
Switch.displayName = "Switch";
|
|
27077
|
+
function TableBase(props) {
|
|
27078
|
+
return /* @__PURE__ */ jsx(Table$1, { ...props });
|
|
27079
|
+
}
|
|
27080
|
+
const Table = Object.assign(TableBase, {
|
|
27081
|
+
Thead: Table$1.Thead,
|
|
27082
|
+
Tbody: Table$1.Tbody,
|
|
27083
|
+
Tr: Table$1.Tr,
|
|
27084
|
+
Th: Table$1.Th,
|
|
27085
|
+
Td: Table$1.Td,
|
|
27086
|
+
Tfoot: Table$1.Tfoot,
|
|
27087
|
+
Caption: Table$1.Caption
|
|
27088
|
+
});
|
|
27089
|
+
function TabsBase(props) {
|
|
27090
|
+
return /* @__PURE__ */ jsx(Tabs$1, { color: colors.primary, ...props });
|
|
27091
|
+
}
|
|
27092
|
+
const Tabs = Object.assign(TabsBase, {
|
|
27093
|
+
List: Tabs$1.List,
|
|
27094
|
+
Tab: Tabs$1.Tab,
|
|
27095
|
+
Panel: Tabs$1.Panel
|
|
27096
|
+
});
|
|
27097
|
+
const TextInput = forwardRef((props, ref) => /* @__PURE__ */ jsx(TextInput$1, { size: "md", ...props, ref }));
|
|
27098
|
+
TextInput.displayName = "TextInput";
|
|
27099
|
+
function Tooltip(props) {
|
|
27100
|
+
return /* @__PURE__ */ jsx(Tooltip$1, { fz: "xs", ...props });
|
|
27101
|
+
}
|
|
27102
|
+
function ErrorFallback({
|
|
27103
|
+
title = "Something went wrong",
|
|
27104
|
+
description = "We've been notified and are working on a fix.",
|
|
27105
|
+
onAction,
|
|
27106
|
+
actionLabel = "Reload Page",
|
|
27107
|
+
error: error2
|
|
27108
|
+
}) {
|
|
27109
|
+
if (error2 !== void 0) {
|
|
27110
|
+
console.error("[ErrorFallback]", error2);
|
|
27111
|
+
}
|
|
27112
|
+
const handleAction = onAction ?? (() => window.location.reload());
|
|
27113
|
+
return /* @__PURE__ */ jsx(Container, { size: "sm", py: "xl", children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", children: [
|
|
27114
|
+
/* @__PURE__ */ jsx(Title, { order: 2, children: title }),
|
|
27115
|
+
/* @__PURE__ */ jsx(Text, { c: fairmintVars.colorTextSecondary, children: description }),
|
|
27116
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleAction, children: actionLabel })
|
|
27117
|
+
] }) });
|
|
27118
|
+
}
|
|
27119
|
+
function FairmintLogo({
|
|
27120
|
+
src = "https://imagedelivery.net/Lm6ChJXR4cIKKycsNMvGjA/0367be38-c9d8-4206-aaae-eba5ff830600/public",
|
|
27121
|
+
width = 140,
|
|
27122
|
+
height = 30,
|
|
27123
|
+
className,
|
|
27124
|
+
alt = "Fairmint"
|
|
27125
|
+
}) {
|
|
27126
|
+
return /* @__PURE__ */ jsx(
|
|
27127
|
+
"img",
|
|
27128
|
+
{
|
|
27129
|
+
src,
|
|
27130
|
+
alt,
|
|
27131
|
+
width,
|
|
27132
|
+
height,
|
|
27133
|
+
className,
|
|
27134
|
+
style: { objectFit: "contain" }
|
|
27135
|
+
}
|
|
27136
|
+
);
|
|
27137
|
+
}
|
|
27091
27138
|
function FairmintProvider({
|
|
27092
27139
|
children,
|
|
27093
27140
|
colorScheme = "light",
|
|
27094
27141
|
notificationPosition = "top-right"
|
|
27095
27142
|
}) {
|
|
27096
|
-
return /* @__PURE__ */ jsxs(
|
|
27097
|
-
|
|
27098
|
-
|
|
27099
|
-
|
|
27143
|
+
return /* @__PURE__ */ jsxs(
|
|
27144
|
+
MantineProvider,
|
|
27145
|
+
{
|
|
27146
|
+
theme,
|
|
27147
|
+
defaultColorScheme: colorScheme,
|
|
27148
|
+
cssVariablesResolver: fairmintCssVariables,
|
|
27149
|
+
children: [
|
|
27150
|
+
/* @__PURE__ */ jsx(Notifications, { position: notificationPosition }),
|
|
27151
|
+
children
|
|
27152
|
+
]
|
|
27153
|
+
}
|
|
27154
|
+
);
|
|
27100
27155
|
}
|
|
27101
27156
|
const emailSchema = stringType().email("Please enter a valid email address");
|
|
27102
27157
|
function EmailField({ error: error2, ...rest }) {
|
|
@@ -28211,7 +28266,7 @@ function FormField({
|
|
|
28211
28266
|
}
|
|
28212
28267
|
),
|
|
28213
28268
|
children && inputProps.error && /* @__PURE__ */ jsx(Text, { size: "xs", c: "error", role: "alert", children: inputProps.error }),
|
|
28214
|
-
children && description && !inputProps.error && /* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
28269
|
+
children && description && !inputProps.error && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, children: description })
|
|
28215
28270
|
] });
|
|
28216
28271
|
}
|
|
28217
28272
|
const passwordSchema = stringType().min(8, "Password must be at least 8 characters");
|
|
@@ -28501,9 +28556,9 @@ function EmptyState({
|
|
|
28501
28556
|
actionColor = colors.primary
|
|
28502
28557
|
}) {
|
|
28503
28558
|
return /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", py: "xl", role: "status", children: [
|
|
28504
|
-
icon && /* @__PURE__ */ jsx(Box, { c:
|
|
28559
|
+
icon && /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextSecondary, fz: "2.5rem", children: icon }),
|
|
28505
28560
|
/* @__PURE__ */ jsx(Title, { order: 4, ta: "center", children: title }),
|
|
28506
|
-
description && /* @__PURE__ */ jsx(Text, { c:
|
|
28561
|
+
description && /* @__PURE__ */ jsx(Text, { c: fairmintVars.colorTextSecondary, size: "sm", ta: "center", maw: 360, children: description }),
|
|
28507
28562
|
actionLabel && onAction && /* @__PURE__ */ jsx(Button, { variant: "light", color: actionColor, onClick: onAction, children: actionLabel })
|
|
28508
28563
|
] });
|
|
28509
28564
|
}
|
|
@@ -28691,6 +28746,102 @@ function EditableSection({
|
|
|
28691
28746
|
] }) : readView
|
|
28692
28747
|
] });
|
|
28693
28748
|
}
|
|
28749
|
+
const ERROR_CONFIGS = {
|
|
28750
|
+
400: {
|
|
28751
|
+
title: "Bad request",
|
|
28752
|
+
description: "Your request could not be understood. Please check your input and try again.",
|
|
28753
|
+
actionLabel: "Go back"
|
|
28754
|
+
},
|
|
28755
|
+
401: {
|
|
28756
|
+
title: "Authentication required",
|
|
28757
|
+
description: "You need to sign in to access this page. If you believe this is a mistake, please contact support.",
|
|
28758
|
+
actionLabel: "Go back"
|
|
28759
|
+
},
|
|
28760
|
+
403: {
|
|
28761
|
+
title: "Access denied",
|
|
28762
|
+
description: "You don't have permission to access this page. Contact support if you believe this is a mistake.",
|
|
28763
|
+
actionLabel: "Go back"
|
|
28764
|
+
},
|
|
28765
|
+
404: {
|
|
28766
|
+
title: "Nothing to see here",
|
|
28767
|
+
description: "The page you are trying to open does not exist. You may have mistyped the address, or the page has been moved to another URL.",
|
|
28768
|
+
actionLabel: "Go back"
|
|
28769
|
+
},
|
|
28770
|
+
429: {
|
|
28771
|
+
title: "Too many requests",
|
|
28772
|
+
description: "You have made too many requests in a short period. Please wait a moment before trying again.",
|
|
28773
|
+
actionLabel: "Try again"
|
|
28774
|
+
},
|
|
28775
|
+
500: {
|
|
28776
|
+
title: "Something went wrong",
|
|
28777
|
+
description: "An unexpected error occurred on our end. We have been notified and are working on a fix.",
|
|
28778
|
+
actionLabel: "Reload page"
|
|
28779
|
+
},
|
|
28780
|
+
503: {
|
|
28781
|
+
title: "Service unavailable",
|
|
28782
|
+
description: "We are temporarily unavailable for scheduled maintenance. Please check back shortly.",
|
|
28783
|
+
actionLabel: "Try again"
|
|
28784
|
+
}
|
|
28785
|
+
};
|
|
28786
|
+
function defaultAction(errorCode) {
|
|
28787
|
+
if (errorCode >= 500 || errorCode === 429) return () => window.location.reload();
|
|
28788
|
+
return () => {
|
|
28789
|
+
if (window.history.length > 1) window.history.back();
|
|
28790
|
+
else window.location.assign(window.location.origin);
|
|
28791
|
+
};
|
|
28792
|
+
}
|
|
28793
|
+
function ErrorPage({
|
|
28794
|
+
errorCode = 404,
|
|
28795
|
+
title,
|
|
28796
|
+
description,
|
|
28797
|
+
onAction,
|
|
28798
|
+
actionLabel
|
|
28799
|
+
}) {
|
|
28800
|
+
const config2 = ERROR_CONFIGS[errorCode] ?? ERROR_CONFIGS[500];
|
|
28801
|
+
const resolvedTitle = title ?? config2.title;
|
|
28802
|
+
const resolvedDescription = description ?? config2.description;
|
|
28803
|
+
const resolvedActionLabel = actionLabel ?? config2.actionLabel;
|
|
28804
|
+
const handleAction = onAction ?? defaultAction(errorCode);
|
|
28805
|
+
return /* @__PURE__ */ jsxs(
|
|
28806
|
+
Flex,
|
|
28807
|
+
{
|
|
28808
|
+
pos: "relative",
|
|
28809
|
+
align: "center",
|
|
28810
|
+
justify: "center",
|
|
28811
|
+
style: { minHeight: "100dvh", overflow: "hidden" },
|
|
28812
|
+
children: [
|
|
28813
|
+
/* @__PURE__ */ jsx(
|
|
28814
|
+
Box,
|
|
28815
|
+
{
|
|
28816
|
+
pos: "absolute",
|
|
28817
|
+
"aria-hidden": true,
|
|
28818
|
+
fw: 900,
|
|
28819
|
+
lh: 1,
|
|
28820
|
+
w: "100%",
|
|
28821
|
+
ta: "center",
|
|
28822
|
+
c: fairmintVars.watermarkColor,
|
|
28823
|
+
ff: fairmintVars.fontHeadings,
|
|
28824
|
+
style: {
|
|
28825
|
+
fontSize: "clamp(200px, 30vw, 380px)",
|
|
28826
|
+
userSelect: "none",
|
|
28827
|
+
letterSpacing: "-0.04em",
|
|
28828
|
+
top: "50%",
|
|
28829
|
+
left: "50%",
|
|
28830
|
+
transform: "translate(-50%, -50%)",
|
|
28831
|
+
pointerEvents: "none"
|
|
28832
|
+
},
|
|
28833
|
+
children: errorCode
|
|
28834
|
+
}
|
|
28835
|
+
),
|
|
28836
|
+
/* @__PURE__ */ jsx(Container, { size: "sm", pos: "relative", style: { zIndex: 1 }, children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "lg", children: [
|
|
28837
|
+
/* @__PURE__ */ jsx(Title, { order: 2, ta: "center", children: resolvedTitle }),
|
|
28838
|
+
/* @__PURE__ */ jsx(Text, { c: fairmintVars.colorTextSecondary, ta: "center", maw: 500, size: "lg", children: resolvedDescription }),
|
|
28839
|
+
/* @__PURE__ */ jsx(Button, { color: colors.primary, onClick: handleAction, children: resolvedActionLabel })
|
|
28840
|
+
] }) })
|
|
28841
|
+
]
|
|
28842
|
+
}
|
|
28843
|
+
);
|
|
28844
|
+
}
|
|
28694
28845
|
const DefaultChevronIcon = () => /* @__PURE__ */ jsx(
|
|
28695
28846
|
"svg",
|
|
28696
28847
|
{
|
|
@@ -28729,14 +28880,22 @@ function ListRow({
|
|
|
28729
28880
|
/* @__PURE__ */ jsx(Avatar, { src: avatarSrc, alt: title, radius: "md", size: 40, color: avatarColor, children: avatarFallback ?? title.charAt(0).toUpperCase() }),
|
|
28730
28881
|
/* @__PURE__ */ jsxs(Box, { flex: 1, miw: 0, children: [
|
|
28731
28882
|
/* @__PURE__ */ jsx(Text, { fw: 500, size: "sm", truncate: true, children: title }),
|
|
28732
|
-
subtitle && /* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
28883
|
+
subtitle && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, lh: 1.3, children: subtitle })
|
|
28733
28884
|
] }),
|
|
28734
28885
|
/* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
|
|
28735
28886
|
rightSection ?? (value !== void 0 && /* @__PURE__ */ jsxs(Stack, { gap: 2, align: "flex-end", children: [
|
|
28736
28887
|
/* @__PURE__ */ jsx(Text, { fw: 500, size: "sm", style: { whiteSpace: "nowrap" }, children: value }),
|
|
28737
|
-
valueSubtitle && /* @__PURE__ */ jsx(
|
|
28888
|
+
valueSubtitle && /* @__PURE__ */ jsx(
|
|
28889
|
+
Text,
|
|
28890
|
+
{
|
|
28891
|
+
size: "xs",
|
|
28892
|
+
c: fairmintVars.colorTextSecondary,
|
|
28893
|
+
style: { whiteSpace: "nowrap" },
|
|
28894
|
+
children: valueSubtitle
|
|
28895
|
+
}
|
|
28896
|
+
)
|
|
28738
28897
|
] })),
|
|
28739
|
-
displayChevron && (chevronIcon ?? /* @__PURE__ */ jsx(Box, { c:
|
|
28898
|
+
displayChevron && (chevronIcon ?? /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextTertiary, style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx(DefaultChevronIcon, {}) }))
|
|
28740
28899
|
] })
|
|
28741
28900
|
] });
|
|
28742
28901
|
const animationStyle = animate ? {
|
|
@@ -28748,7 +28907,7 @@ function ListRow({
|
|
|
28748
28907
|
return /* @__PURE__ */ jsx(
|
|
28749
28908
|
Box,
|
|
28750
28909
|
{
|
|
28751
|
-
bg: isSelected ?
|
|
28910
|
+
bg: isSelected ? fairmintVars.colorSurfaceSelected : void 0,
|
|
28752
28911
|
py: "sm",
|
|
28753
28912
|
px: "md",
|
|
28754
28913
|
style: animationStyle,
|
|
@@ -28759,7 +28918,7 @@ function ListRow({
|
|
|
28759
28918
|
return /* @__PURE__ */ jsx(
|
|
28760
28919
|
UnstyledButton,
|
|
28761
28920
|
{
|
|
28762
|
-
bg: isSelected ?
|
|
28921
|
+
bg: isSelected ? fairmintVars.colorSurfaceSelected : void 0,
|
|
28763
28922
|
onClick,
|
|
28764
28923
|
w: "100%",
|
|
28765
28924
|
py: "sm",
|
|
@@ -30029,9 +30188,9 @@ function PhotoCropModal({
|
|
|
30029
30188
|
)
|
|
30030
30189
|
}
|
|
30031
30190
|
),
|
|
30032
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
30191
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, ta: "center", children: "Drag to reposition · Scroll or pinch to zoom" }),
|
|
30033
30192
|
/* @__PURE__ */ jsxs(Group, { justify: "flex-end", gap: "xs", children: [
|
|
30034
|
-
/* @__PURE__ */ jsx(Button, { variant: "subtle", color:
|
|
30193
|
+
/* @__PURE__ */ jsx(Button, { variant: "subtle", color: colors.neutral, onClick: onClose, disabled: isConfirming, children: "Cancel" }),
|
|
30035
30194
|
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, loading: isConfirming, disabled: !croppedAreaPixels, children: "Apply" })
|
|
30036
30195
|
] })
|
|
30037
30196
|
] }) });
|
|
@@ -30130,7 +30289,7 @@ function StatCard({
|
|
|
30130
30289
|
}
|
|
30131
30290
|
),
|
|
30132
30291
|
/* @__PURE__ */ jsx(Text, { fw: 700, size: "xl", lh: 1, children: value }),
|
|
30133
|
-
trend && /* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
30292
|
+
trend && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, children: trend })
|
|
30134
30293
|
] }),
|
|
30135
30294
|
icon && /* @__PURE__ */ jsx(Box, { c: `${color}.5`, fz: "1.5rem", children: icon })
|
|
30136
30295
|
] }) });
|
|
@@ -30225,7 +30384,7 @@ function PageHeader({ title, subtitle, action }) {
|
|
|
30225
30384
|
return /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", mb: "lg", children: [
|
|
30226
30385
|
/* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
30227
30386
|
/* @__PURE__ */ jsx(Title, { order: 2, children: title }),
|
|
30228
|
-
subtitle && /* @__PURE__ */ jsx(Text, { c:
|
|
30387
|
+
subtitle && /* @__PURE__ */ jsx(Text, { c: fairmintVars.colorTextSecondary, size: "sm", children: subtitle })
|
|
30229
30388
|
] }),
|
|
30230
30389
|
action
|
|
30231
30390
|
] });
|
|
@@ -30521,46 +30680,92 @@ function InvestorProfileCard({
|
|
|
30521
30680
|
}
|
|
30522
30681
|
) }) : /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", onClick: onEditName, "aria-label": "Edit name", children: editNameIcon ?? /* @__PURE__ */ jsx(DefaultPencilIcon, {}) }))
|
|
30523
30682
|
] }),
|
|
30524
|
-
email && /* @__PURE__ */ jsx(Text, { size: "sm", c:
|
|
30525
|
-
memberSinceText && /* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
30526
|
-
subtitle && /* @__PURE__ */ jsx(Text, { size: "xs", c:
|
|
30683
|
+
email && /* @__PURE__ */ jsx(Text, { size: "sm", c: fairmintVars.colorTextSecondary, children: email }),
|
|
30684
|
+
memberSinceText && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextTertiary, children: memberSinceText }),
|
|
30685
|
+
subtitle && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, children: subtitle })
|
|
30527
30686
|
] })
|
|
30528
30687
|
] }),
|
|
30529
30688
|
children
|
|
30530
30689
|
] });
|
|
30531
30690
|
}
|
|
30532
|
-
const
|
|
30691
|
+
const SYSTEM_TYPES = /* @__PURE__ */ new Set(["fairmint", "privy"]);
|
|
30692
|
+
const TYPE_LABELS = {
|
|
30533
30693
|
fairmint: "Fairmint Wallet",
|
|
30534
30694
|
privy: "Fairmint Wallet",
|
|
30535
30695
|
manual: "Manual"
|
|
30536
30696
|
};
|
|
30537
|
-
function
|
|
30538
|
-
|
|
30539
|
-
|
|
30697
|
+
function normalizeWalletType(type) {
|
|
30698
|
+
return String(type ?? "").trim().toLowerCase();
|
|
30699
|
+
}
|
|
30700
|
+
function getWalletLabel(type, custom2) {
|
|
30701
|
+
const key = normalizeWalletType(type);
|
|
30702
|
+
const rawType = typeof type === "string" ? type : String(type ?? "");
|
|
30703
|
+
if (custom2?.[key]) return custom2[key];
|
|
30704
|
+
if (custom2?.[rawType]) return custom2[rawType];
|
|
30705
|
+
return TYPE_LABELS[key] ?? rawType;
|
|
30706
|
+
}
|
|
30707
|
+
function getWalletDisplayName(wallet, customLabels) {
|
|
30708
|
+
const label = wallet.label?.trim();
|
|
30709
|
+
if (label) return label;
|
|
30710
|
+
return getWalletLabel(wallet.type, customLabels);
|
|
30711
|
+
}
|
|
30712
|
+
function isSystemWalletType(type) {
|
|
30713
|
+
return SYSTEM_TYPES.has(normalizeWalletType(type));
|
|
30714
|
+
}
|
|
30715
|
+
function isRemovableWalletType(type) {
|
|
30716
|
+
return !isSystemWalletType(type);
|
|
30717
|
+
}
|
|
30718
|
+
function walletKey(w) {
|
|
30719
|
+
return `${normalizeWalletType(w.type)}:${w.address.toLowerCase()}`;
|
|
30540
30720
|
}
|
|
30541
30721
|
function WalletList({
|
|
30542
30722
|
wallets,
|
|
30543
30723
|
onAdd,
|
|
30544
30724
|
onRemove,
|
|
30725
|
+
onSetDefault,
|
|
30726
|
+
onLabel,
|
|
30727
|
+
onConnect,
|
|
30728
|
+
getExplorerUrl,
|
|
30545
30729
|
readOnly = false,
|
|
30546
30730
|
addLoading = false,
|
|
30547
30731
|
removeLoading = false,
|
|
30732
|
+
setDefaultLoading = false,
|
|
30733
|
+
setDefaultAddress,
|
|
30734
|
+
labelLoading = false,
|
|
30735
|
+
labelAddress,
|
|
30736
|
+
connectLoading = false,
|
|
30548
30737
|
emptyIcon,
|
|
30549
30738
|
copyIcon,
|
|
30550
30739
|
copiedIcon,
|
|
30551
30740
|
removeIcon,
|
|
30552
30741
|
addIcon,
|
|
30742
|
+
defaultIcon,
|
|
30743
|
+
renameIcon,
|
|
30744
|
+
explorerIcon,
|
|
30745
|
+
connectIcon,
|
|
30553
30746
|
typeLabels,
|
|
30554
|
-
removableTypes
|
|
30747
|
+
removableTypes,
|
|
30748
|
+
children
|
|
30555
30749
|
}) {
|
|
30750
|
+
const normalizeWalletAddress = useCallback(
|
|
30751
|
+
(address) => address?.trim().toLowerCase() ?? "",
|
|
30752
|
+
[]
|
|
30753
|
+
);
|
|
30556
30754
|
const [newAddress, setNewAddress] = useState("");
|
|
30557
30755
|
const [addressError, setAddressError] = useState(null);
|
|
30558
30756
|
const [showAddForm, setShowAddForm] = useState(false);
|
|
30559
30757
|
const [walletToRemove, setWalletToRemove] = useState(null);
|
|
30560
30758
|
const [copiedAddress, setCopiedAddress] = useState(null);
|
|
30759
|
+
const [renamingAddress, setRenamingAddress] = useState(null);
|
|
30760
|
+
const [renameValue, setRenameValue] = useState("");
|
|
30761
|
+
const [labelError, setLabelError] = useState(null);
|
|
30762
|
+
const [setDefaultError, setSetDefaultError] = useState(null);
|
|
30561
30763
|
const copyTimeoutRef = useRef(void 0);
|
|
30562
30764
|
useEffect(() => () => clearTimeout(copyTimeoutRef.current), []);
|
|
30563
|
-
|
|
30765
|
+
useEffect(() => {
|
|
30766
|
+
if (readOnly) setRenamingAddress(null);
|
|
30767
|
+
}, [readOnly]);
|
|
30768
|
+
const copyAddress = useCallback(async (address) => {
|
|
30564
30769
|
try {
|
|
30565
30770
|
await navigator.clipboard.writeText(address);
|
|
30566
30771
|
clearTimeout(copyTimeoutRef.current);
|
|
@@ -30568,9 +30773,27 @@ function WalletList({
|
|
|
30568
30773
|
copyTimeoutRef.current = setTimeout(() => setCopiedAddress(null), 2e3);
|
|
30569
30774
|
} catch {
|
|
30570
30775
|
}
|
|
30571
|
-
};
|
|
30776
|
+
}, []);
|
|
30572
30777
|
const canAdd = !readOnly && !!onAdd;
|
|
30573
30778
|
const canRemove = !readOnly && !!onRemove;
|
|
30779
|
+
const canSetDefault = !readOnly && !!onSetDefault;
|
|
30780
|
+
const canLabel = !readOnly && !!onLabel;
|
|
30781
|
+
const canConnect = !readOnly && !!onConnect;
|
|
30782
|
+
const getSafeExplorerUrl = useCallback(
|
|
30783
|
+
(address) => {
|
|
30784
|
+
if (!getExplorerUrl) return null;
|
|
30785
|
+
try {
|
|
30786
|
+
const url = getExplorerUrl(address);
|
|
30787
|
+
if (!url) return null;
|
|
30788
|
+
const parsed = new URL(url);
|
|
30789
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return null;
|
|
30790
|
+
return parsed.toString();
|
|
30791
|
+
} catch {
|
|
30792
|
+
return null;
|
|
30793
|
+
}
|
|
30794
|
+
},
|
|
30795
|
+
[getExplorerUrl]
|
|
30796
|
+
);
|
|
30574
30797
|
const handleAdd = async () => {
|
|
30575
30798
|
const trimmed = newAddress.trim();
|
|
30576
30799
|
const error2 = validateEthereumAddress(trimmed);
|
|
@@ -30598,8 +30821,191 @@ function WalletList({
|
|
|
30598
30821
|
setRemoveError("Failed to remove wallet. Please try again.");
|
|
30599
30822
|
}
|
|
30600
30823
|
};
|
|
30601
|
-
|
|
30602
|
-
|
|
30824
|
+
const handleSetDefault = async (address) => {
|
|
30825
|
+
setSetDefaultError(null);
|
|
30826
|
+
try {
|
|
30827
|
+
await onSetDefault?.(address);
|
|
30828
|
+
} catch {
|
|
30829
|
+
setSetDefaultError("Failed to set default wallet. Please try again.");
|
|
30830
|
+
}
|
|
30831
|
+
};
|
|
30832
|
+
const handleLabelSave = async (address) => {
|
|
30833
|
+
setLabelError(null);
|
|
30834
|
+
try {
|
|
30835
|
+
await onLabel?.(address, renameValue.trim() || null);
|
|
30836
|
+
setRenamingAddress((current) => current === address ? null : current);
|
|
30837
|
+
} catch {
|
|
30838
|
+
setLabelError("Failed to update label. Please try again.");
|
|
30839
|
+
}
|
|
30840
|
+
};
|
|
30841
|
+
const hasWallets = wallets.length > 0;
|
|
30842
|
+
if (!hasWallets && !showAddForm && !canConnect) {
|
|
30843
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
30844
|
+
/* @__PURE__ */ jsx(
|
|
30845
|
+
EmptyState,
|
|
30846
|
+
{
|
|
30847
|
+
icon: emptyIcon,
|
|
30848
|
+
title: "No wallets connected",
|
|
30849
|
+
description: "Add a wallet address to receive equity on-chain.",
|
|
30850
|
+
actionLabel: canAdd ? "Add Wallet" : void 0,
|
|
30851
|
+
onAction: canAdd ? () => setShowAddForm(true) : void 0
|
|
30852
|
+
}
|
|
30853
|
+
),
|
|
30854
|
+
children
|
|
30855
|
+
] });
|
|
30856
|
+
}
|
|
30857
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
30858
|
+
wallets.map((w) => {
|
|
30859
|
+
const normalizedWalletAddress = normalizeWalletAddress(w.address);
|
|
30860
|
+
const setDefaultActionLoading = setDefaultLoading && (!setDefaultAddress || normalizeWalletAddress(setDefaultAddress) === normalizedWalletAddress);
|
|
30861
|
+
const labelActionLoading = labelLoading && (!labelAddress || normalizeWalletAddress(labelAddress) === normalizedWalletAddress);
|
|
30862
|
+
const explorerUrl = getSafeExplorerUrl(w.address);
|
|
30863
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 0, children: [
|
|
30864
|
+
/* @__PURE__ */ jsxs(
|
|
30865
|
+
Group,
|
|
30866
|
+
{
|
|
30867
|
+
justify: "space-between",
|
|
30868
|
+
p: "xs",
|
|
30869
|
+
style: {
|
|
30870
|
+
borderRadius: radii.sm,
|
|
30871
|
+
border: `1px solid ${neutralColors[200]}`
|
|
30872
|
+
},
|
|
30873
|
+
children: [
|
|
30874
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
30875
|
+
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: getWalletLabel(w.type, typeLabels) }),
|
|
30876
|
+
w.label && /* @__PURE__ */ jsx(Text, { size: "xs", c: fairmintVars.colorTextSecondary, children: w.label }),
|
|
30877
|
+
w.defaultRecipient && /* @__PURE__ */ jsx(Badge, { size: "xs", color: colors.success, variant: "light", children: "Default" }),
|
|
30878
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", children: truncateAddress(w.address) })
|
|
30879
|
+
] }),
|
|
30880
|
+
/* @__PURE__ */ jsxs(Group, { gap: 4, children: [
|
|
30881
|
+
copyIcon && /* @__PURE__ */ jsx(Tooltip, { label: copiedAddress === w.address ? "Copied!" : "Copy address", children: /* @__PURE__ */ jsx(
|
|
30882
|
+
ActionIcon,
|
|
30883
|
+
{
|
|
30884
|
+
variant: "subtle",
|
|
30885
|
+
size: "sm",
|
|
30886
|
+
onClick: () => copyAddress(w.address),
|
|
30887
|
+
"aria-label": "Copy wallet address",
|
|
30888
|
+
children: copiedAddress === w.address ? copiedIcon ?? copyIcon : copyIcon
|
|
30889
|
+
}
|
|
30890
|
+
) }),
|
|
30891
|
+
canSetDefault && defaultIcon && !w.defaultRecipient && /* @__PURE__ */ jsx(Tooltip, { label: "Set as default recipient", children: /* @__PURE__ */ jsx(
|
|
30892
|
+
ActionIcon,
|
|
30893
|
+
{
|
|
30894
|
+
variant: "subtle",
|
|
30895
|
+
size: "sm",
|
|
30896
|
+
onClick: () => handleSetDefault(w.address),
|
|
30897
|
+
loading: setDefaultActionLoading,
|
|
30898
|
+
disabled: setDefaultActionLoading,
|
|
30899
|
+
"aria-label": "Set as default wallet",
|
|
30900
|
+
children: defaultIcon
|
|
30901
|
+
}
|
|
30902
|
+
) }),
|
|
30903
|
+
canLabel && renameIcon && /* @__PURE__ */ jsx(
|
|
30904
|
+
Tooltip,
|
|
30905
|
+
{
|
|
30906
|
+
label: renamingAddress === w.address ? "Cancel rename" : "Rename wallet",
|
|
30907
|
+
children: /* @__PURE__ */ jsx(
|
|
30908
|
+
ActionIcon,
|
|
30909
|
+
{
|
|
30910
|
+
variant: "subtle",
|
|
30911
|
+
size: "sm",
|
|
30912
|
+
onClick: () => {
|
|
30913
|
+
setLabelError(null);
|
|
30914
|
+
if (renamingAddress === w.address) {
|
|
30915
|
+
setRenamingAddress(null);
|
|
30916
|
+
} else {
|
|
30917
|
+
setRenamingAddress(w.address);
|
|
30918
|
+
setRenameValue(w.label ?? "");
|
|
30919
|
+
}
|
|
30920
|
+
},
|
|
30921
|
+
"aria-label": "Rename wallet",
|
|
30922
|
+
children: renameIcon
|
|
30923
|
+
}
|
|
30924
|
+
)
|
|
30925
|
+
}
|
|
30926
|
+
),
|
|
30927
|
+
explorerUrl && explorerIcon && /* @__PURE__ */ jsx(Tooltip, { label: "View on block explorer", children: /* @__PURE__ */ jsx(
|
|
30928
|
+
Anchor,
|
|
30929
|
+
{
|
|
30930
|
+
href: explorerUrl,
|
|
30931
|
+
target: "_blank",
|
|
30932
|
+
rel: "noopener noreferrer",
|
|
30933
|
+
"aria-label": "View on block explorer",
|
|
30934
|
+
c: colors.primary,
|
|
30935
|
+
style: {
|
|
30936
|
+
display: "inline-flex",
|
|
30937
|
+
alignItems: "center",
|
|
30938
|
+
justifyContent: "center",
|
|
30939
|
+
width: "1.625rem",
|
|
30940
|
+
height: "1.625rem",
|
|
30941
|
+
borderRadius: radii.sm
|
|
30942
|
+
},
|
|
30943
|
+
children: explorerIcon
|
|
30944
|
+
}
|
|
30945
|
+
) }),
|
|
30946
|
+
canRemove && removeIcon && (removableTypes ? removableTypes.some(
|
|
30947
|
+
(t) => normalizeWalletType(t) === normalizeWalletType(w.type)
|
|
30948
|
+
) : isRemovableWalletType(w.type)) && /* @__PURE__ */ jsx(Tooltip, { label: "Remove wallet", children: /* @__PURE__ */ jsx(
|
|
30949
|
+
ActionIcon,
|
|
30950
|
+
{
|
|
30951
|
+
variant: "subtle",
|
|
30952
|
+
size: "sm",
|
|
30953
|
+
color: colors.error,
|
|
30954
|
+
onClick: () => setWalletToRemove(w.address),
|
|
30955
|
+
disabled: removeLoading,
|
|
30956
|
+
"aria-label": "Remove wallet",
|
|
30957
|
+
children: removeIcon
|
|
30958
|
+
}
|
|
30959
|
+
) })
|
|
30960
|
+
] })
|
|
30961
|
+
]
|
|
30962
|
+
}
|
|
30963
|
+
),
|
|
30964
|
+
renamingAddress === w.address && /* @__PURE__ */ jsxs(Group, { gap: "xs", mt: "xs", align: "flex-start", children: [
|
|
30965
|
+
/* @__PURE__ */ jsx(
|
|
30966
|
+
TextInput,
|
|
30967
|
+
{
|
|
30968
|
+
value: renameValue,
|
|
30969
|
+
onChange: (e) => {
|
|
30970
|
+
setRenameValue(e.currentTarget.value);
|
|
30971
|
+
setLabelError(null);
|
|
30972
|
+
},
|
|
30973
|
+
placeholder: getWalletLabel(w.type, typeLabels),
|
|
30974
|
+
size: "xs",
|
|
30975
|
+
style: { flex: 1 },
|
|
30976
|
+
"aria-label": "Wallet label",
|
|
30977
|
+
maxLength: 50,
|
|
30978
|
+
error: labelError
|
|
30979
|
+
}
|
|
30980
|
+
),
|
|
30981
|
+
/* @__PURE__ */ jsx(
|
|
30982
|
+
Button,
|
|
30983
|
+
{
|
|
30984
|
+
size: "xs",
|
|
30985
|
+
loading: labelActionLoading,
|
|
30986
|
+
disabled: labelActionLoading,
|
|
30987
|
+
onClick: () => handleLabelSave(w.address),
|
|
30988
|
+
children: "Save"
|
|
30989
|
+
}
|
|
30990
|
+
),
|
|
30991
|
+
/* @__PURE__ */ jsx(
|
|
30992
|
+
Button,
|
|
30993
|
+
{
|
|
30994
|
+
size: "xs",
|
|
30995
|
+
variant: "subtle",
|
|
30996
|
+
color: colors.neutral,
|
|
30997
|
+
onClick: () => {
|
|
30998
|
+
setRenamingAddress(null);
|
|
30999
|
+
setLabelError(null);
|
|
31000
|
+
},
|
|
31001
|
+
children: "Cancel"
|
|
31002
|
+
}
|
|
31003
|
+
)
|
|
31004
|
+
] })
|
|
31005
|
+
] }, walletKey(w));
|
|
31006
|
+
}),
|
|
31007
|
+
setDefaultError && /* @__PURE__ */ jsx(Text, { size: "sm", c: colors.error, children: setDefaultError }),
|
|
31008
|
+
!hasWallets && !showAddForm && /* @__PURE__ */ jsx(
|
|
30603
31009
|
EmptyState,
|
|
30604
31010
|
{
|
|
30605
31011
|
icon: emptyIcon,
|
|
@@ -30608,52 +31014,19 @@ function WalletList({
|
|
|
30608
31014
|
actionLabel: canAdd ? "Add Wallet" : void 0,
|
|
30609
31015
|
onAction: canAdd ? () => setShowAddForm(true) : void 0
|
|
30610
31016
|
}
|
|
30611
|
-
)
|
|
30612
|
-
|
|
30613
|
-
|
|
30614
|
-
wallets.map((w) => /* @__PURE__ */ jsxs(
|
|
30615
|
-
Group,
|
|
31017
|
+
),
|
|
31018
|
+
canConnect && /* @__PURE__ */ jsx(
|
|
31019
|
+
Button,
|
|
30616
31020
|
{
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30620
|
-
|
|
30621
|
-
|
|
30622
|
-
|
|
30623
|
-
children:
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
w.label && /* @__PURE__ */ jsx(Text, { size: "xs", c: `${colors.neutral}.5`, children: w.label }),
|
|
30627
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", children: truncateAddress(w.address) })
|
|
30628
|
-
] }),
|
|
30629
|
-
/* @__PURE__ */ jsxs(Group, { gap: 4, children: [
|
|
30630
|
-
copyIcon && /* @__PURE__ */ jsx(Tooltip, { label: copiedAddress === w.address ? "Copied!" : "Copy address", children: /* @__PURE__ */ jsx(
|
|
30631
|
-
ActionIcon,
|
|
30632
|
-
{
|
|
30633
|
-
variant: "subtle",
|
|
30634
|
-
size: "sm",
|
|
30635
|
-
onClick: () => copyAddress(w.address),
|
|
30636
|
-
"aria-label": "Copy wallet address",
|
|
30637
|
-
children: copiedAddress === w.address ? copiedIcon ?? copyIcon : copyIcon
|
|
30638
|
-
}
|
|
30639
|
-
) }),
|
|
30640
|
-
canRemove && removeIcon && removableTypes.includes(w.type) && /* @__PURE__ */ jsx(Tooltip, { label: "Remove wallet", children: /* @__PURE__ */ jsx(
|
|
30641
|
-
ActionIcon,
|
|
30642
|
-
{
|
|
30643
|
-
variant: "subtle",
|
|
30644
|
-
size: "sm",
|
|
30645
|
-
color: colors.error,
|
|
30646
|
-
onClick: () => setWalletToRemove(w.address),
|
|
30647
|
-
disabled: removeLoading,
|
|
30648
|
-
"aria-label": "Remove wallet",
|
|
30649
|
-
children: removeIcon
|
|
30650
|
-
}
|
|
30651
|
-
) })
|
|
30652
|
-
] })
|
|
30653
|
-
]
|
|
30654
|
-
},
|
|
30655
|
-
w.address
|
|
30656
|
-
)),
|
|
31021
|
+
variant: "light",
|
|
31022
|
+
size: "xs",
|
|
31023
|
+
leftSection: connectIcon,
|
|
31024
|
+
onClick: onConnect,
|
|
31025
|
+
loading: connectLoading,
|
|
31026
|
+
mt: "xs",
|
|
31027
|
+
children: "Connect Wallet"
|
|
31028
|
+
}
|
|
31029
|
+
),
|
|
30657
31030
|
canAdd && (showAddForm ? /* @__PURE__ */ jsxs(Group, { gap: "xs", mt: "xs", children: [
|
|
30658
31031
|
/* @__PURE__ */ jsx(
|
|
30659
31032
|
TextInput,
|
|
@@ -30684,7 +31057,7 @@ function WalletList({
|
|
|
30684
31057
|
children: "Cancel"
|
|
30685
31058
|
}
|
|
30686
31059
|
)
|
|
30687
|
-
] }) : /* @__PURE__ */ jsx(
|
|
31060
|
+
] }) : hasWallets ? /* @__PURE__ */ jsx(
|
|
30688
31061
|
Button,
|
|
30689
31062
|
{
|
|
30690
31063
|
variant: "light",
|
|
@@ -30694,14 +31067,15 @@ function WalletList({
|
|
|
30694
31067
|
mt: "xs",
|
|
30695
31068
|
children: "Add Wallet"
|
|
30696
31069
|
}
|
|
30697
|
-
)),
|
|
31070
|
+
) : null),
|
|
31071
|
+
children,
|
|
30698
31072
|
/* @__PURE__ */ jsx(
|
|
30699
31073
|
ConfirmDialog,
|
|
30700
31074
|
{
|
|
30701
31075
|
title: "Remove Wallet",
|
|
30702
31076
|
message: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
30703
31077
|
/* @__PURE__ */ jsx(Text, { size: "sm", children: "Are you sure you want to remove this wallet address? This action cannot be undone." }),
|
|
30704
|
-
walletToRemove && /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c:
|
|
31078
|
+
walletToRemove && /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: fairmintVars.colorTextSecondary, children: walletToRemove }),
|
|
30705
31079
|
removeError && /* @__PURE__ */ jsx(Text, { size: "sm", c: colors.error, children: removeError })
|
|
30706
31080
|
] }),
|
|
30707
31081
|
opened: walletToRemove !== null,
|
|
@@ -30780,6 +31154,7 @@ export {
|
|
|
30780
31154
|
EmptyState,
|
|
30781
31155
|
EquityGrantCard,
|
|
30782
31156
|
ErrorFallback,
|
|
31157
|
+
ErrorPage,
|
|
30783
31158
|
EthereumAddressField,
|
|
30784
31159
|
FairmintLogo,
|
|
30785
31160
|
FairmintProvider,
|
|
@@ -30838,9 +31213,12 @@ export {
|
|
|
30838
31213
|
ZipField,
|
|
30839
31214
|
brandColors,
|
|
30840
31215
|
colors,
|
|
31216
|
+
createFairmintMantineProviderProps,
|
|
30841
31217
|
createZipSchema,
|
|
30842
31218
|
emailSchema,
|
|
30843
31219
|
ethereumAddressSchema,
|
|
31220
|
+
fairmintCssVariables,
|
|
31221
|
+
fairmintVars,
|
|
30844
31222
|
formatCurrency,
|
|
30845
31223
|
formatCurrencyPrecise,
|
|
30846
31224
|
formatDate,
|
|
@@ -30850,9 +31228,14 @@ export {
|
|
|
30850
31228
|
formatPhoneDisplay,
|
|
30851
31229
|
formatPreciseWithCurrency,
|
|
30852
31230
|
getAvatarColor,
|
|
31231
|
+
getWalletDisplayName,
|
|
31232
|
+
getWalletLabel,
|
|
30853
31233
|
isEthereumAddress,
|
|
31234
|
+
isRemovableWalletType,
|
|
31235
|
+
isSystemWalletType,
|
|
30854
31236
|
neutralColors,
|
|
30855
31237
|
normalizePhone,
|
|
31238
|
+
normalizeWalletType,
|
|
30856
31239
|
notify,
|
|
30857
31240
|
passwordSchema,
|
|
30858
31241
|
phoneSchema,
|
|
@@ -30860,6 +31243,7 @@ export {
|
|
|
30860
31243
|
semanticColors,
|
|
30861
31244
|
theme,
|
|
30862
31245
|
truncateAddress,
|
|
31246
|
+
typography,
|
|
30863
31247
|
useClickOutside,
|
|
30864
31248
|
useClipboard,
|
|
30865
31249
|
useDebouncedCallback,
|
|
@@ -30874,6 +31258,7 @@ export {
|
|
|
30874
31258
|
useScrollIntoView,
|
|
30875
31259
|
useViewportSize,
|
|
30876
31260
|
validateEthereumAddress,
|
|
31261
|
+
walletKey,
|
|
30877
31262
|
z,
|
|
30878
31263
|
zipSchema
|
|
30879
31264
|
};
|