@fairmint/ui 0.3.31 → 0.3.33
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/_virtual/index3.cjs +5 -3
- package/dist/_virtual/index3.cjs.map +1 -1
- package/dist/_virtual/index3.js +5 -2
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.cjs +3 -5
- package/dist/_virtual/index4.cjs.map +1 -1
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/FairmintProvider/FairmintNotifications.cjs +23 -0
- package/dist/components/FairmintProvider/FairmintNotifications.cjs.map +1 -0
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts +16 -0
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts.map +1 -0
- package/dist/components/FairmintProvider/FairmintNotifications.js +23 -0
- package/dist/components/FairmintProvider/FairmintNotifications.js.map +1 -0
- package/dist/components/FairmintProvider/FairmintProvider.cjs +2 -2
- package/dist/components/FairmintProvider/FairmintProvider.cjs.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.js +2 -2
- package/dist/components/FairmintProvider/FairmintProvider.js.map +1 -1
- package/dist/components/generic/BottomSheet/BottomSheet.cjs +133 -0
- package/dist/components/generic/BottomSheet/BottomSheet.cjs.map +1 -0
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts +31 -0
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/dist/components/generic/BottomSheet/BottomSheet.js +133 -0
- package/dist/components/generic/BottomSheet/BottomSheet.js.map +1 -0
- package/dist/components/layout/AccountSheet/AccountSheet.cjs +123 -0
- package/dist/components/layout/AccountSheet/AccountSheet.cjs.map +1 -0
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts +46 -0
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts.map +1 -0
- package/dist/components/layout/AccountSheet/AccountSheet.js +123 -0
- package/dist/components/layout/AccountSheet/AccountSheet.js.map +1 -0
- package/dist/components/layout/MobileNav/MobileNav.cjs +267 -0
- package/dist/components/layout/MobileNav/MobileNav.cjs.map +1 -0
- package/dist/components/layout/MobileNav/MobileNav.d.ts +49 -0
- package/dist/components/layout/MobileNav/MobileNav.d.ts.map +1 -0
- package/dist/components/layout/MobileNav/MobileNav.js +267 -0
- package/dist/components/layout/MobileNav/MobileNav.js.map +1 -0
- package/dist/fairmint-ui.cjs +9 -0
- package/dist/fairmint-ui.cjs.map +1 -1
- package/dist/fairmint-ui.js +9 -0
- package/dist/fairmint-ui.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.cjs +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.js +1 -1
- package/dist/node_modules/@mantine/notifications/esm/notifications.store.js +1 -1
- package/dist/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const index = require("../../../theme/index.cjs");
|
|
5
|
+
const zIndex = require("../../../theme/zIndex.cjs");
|
|
6
|
+
const BottomSheet = require("../../generic/BottomSheet/BottomSheet.cjs");
|
|
7
|
+
const Avatar = require("../../primitives/Avatar/Avatar.cjs");
|
|
8
|
+
const layout = require("../../primitives/layout.cjs");
|
|
9
|
+
const colors = require("../../../theme/colors.cjs");
|
|
10
|
+
const Text = require("../../../node_modules/@mantine/core/esm/components/Text/Text.cjs");
|
|
11
|
+
const UnstyledButton = require("../../../node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.cjs");
|
|
12
|
+
const ACCOUNT_SHEET_ROW_MIN_HEIGHT = 48;
|
|
13
|
+
function resolvePaintColor(color) {
|
|
14
|
+
if (!color) return void 0;
|
|
15
|
+
if (color === colors.colors.error || color === "error" || color === "red") {
|
|
16
|
+
return index.fairmintVars.colorErrorText;
|
|
17
|
+
}
|
|
18
|
+
if (color === colors.colors.primary || color === "indigo" || color === "primary") {
|
|
19
|
+
return index.fairmintVars.colorBrandPrimary;
|
|
20
|
+
}
|
|
21
|
+
return color;
|
|
22
|
+
}
|
|
23
|
+
function AccountSheetRow({
|
|
24
|
+
item,
|
|
25
|
+
onItemClick
|
|
26
|
+
}) {
|
|
27
|
+
const paint = resolvePaintColor(item.color);
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29
|
+
UnstyledButton.UnstyledButton,
|
|
30
|
+
{
|
|
31
|
+
type: "button",
|
|
32
|
+
onClick: () => onItemClick(item.id),
|
|
33
|
+
style: {
|
|
34
|
+
display: "flex",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
gap: 12,
|
|
37
|
+
width: "100%",
|
|
38
|
+
minHeight: ACCOUNT_SHEET_ROW_MIN_HEIGHT,
|
|
39
|
+
paddingInline: 8,
|
|
40
|
+
paddingBlock: 12,
|
|
41
|
+
borderRadius: index.radii.md,
|
|
42
|
+
textAlign: "left",
|
|
43
|
+
cursor: "pointer",
|
|
44
|
+
color: paint ?? index.fairmintVars.colorTextPrimary
|
|
45
|
+
},
|
|
46
|
+
styles: {
|
|
47
|
+
root: {
|
|
48
|
+
"&:hover": {
|
|
49
|
+
backgroundColor: index.fairmintVars.colorBgHover
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
item.icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
layout.Box,
|
|
56
|
+
{
|
|
57
|
+
component: "span",
|
|
58
|
+
"aria-hidden": true,
|
|
59
|
+
style: {
|
|
60
|
+
display: "inline-flex",
|
|
61
|
+
color: paint ?? index.fairmintVars.colorIconSecondary,
|
|
62
|
+
flexShrink: 0
|
|
63
|
+
},
|
|
64
|
+
children: item.icon
|
|
65
|
+
}
|
|
66
|
+
) : null,
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text.Text, { size: "sm", fw: 500, style: { color: paint ?? void 0 }, children: item.label })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function AccountSheet({
|
|
73
|
+
opened,
|
|
74
|
+
onClose,
|
|
75
|
+
displayName,
|
|
76
|
+
email,
|
|
77
|
+
avatarName,
|
|
78
|
+
avatarColor = colors.colors.primary,
|
|
79
|
+
title = "Account",
|
|
80
|
+
items,
|
|
81
|
+
onItemClick,
|
|
82
|
+
zIndex: zIndex$1 = zIndex.overlayZIndexAboveLegacyShell + 10
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
+
BottomSheet.BottomSheet,
|
|
86
|
+
{
|
|
87
|
+
opened,
|
|
88
|
+
onClose,
|
|
89
|
+
title,
|
|
90
|
+
dismissLabel: "Dismiss account menu",
|
|
91
|
+
zIndex: zIndex$1,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
94
|
+
layout.Box,
|
|
95
|
+
{
|
|
96
|
+
style: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
gap: 12,
|
|
100
|
+
paddingInline: 8,
|
|
101
|
+
paddingBlock: 8
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar.Avatar, { name: avatarName ?? displayName, radius: "md", size: 40, color: avatarColor }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(layout.Stack, { gap: 0, style: { minWidth: 0, flex: 1 }, children: [
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text.Text, { size: "sm", fw: 600, truncate: true, children: displayName }),
|
|
107
|
+
email && email !== displayName ? /* @__PURE__ */ jsxRuntime.jsx(Text.Text, { size: "xs", c: "dimmed", truncate: true, children: email }) : null
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx(layout.Divider, { my: "xs", color: index.fairmintVars.colorBorderDefault }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx(layout.Stack, { gap: 4, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(layout.Box, { children: [
|
|
114
|
+
item.dividerBefore ? /* @__PURE__ */ jsxRuntime.jsx(layout.Divider, { my: "xs", color: index.fairmintVars.colorBorderDefault }) : null,
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccountSheetRow, { item, onItemClick })
|
|
116
|
+
] }, item.id)) })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
exports.ACCOUNT_SHEET_ROW_MIN_HEIGHT = ACCOUNT_SHEET_ROW_MIN_HEIGHT;
|
|
122
|
+
exports.AccountSheet = AccountSheet;
|
|
123
|
+
//# sourceMappingURL=AccountSheet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSheet.cjs","sources":["../../../../src/components/layout/AccountSheet/AccountSheet.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { colors, fairmintVars, radii } from \"../../../theme\";\nimport { overlayZIndexAboveLegacyShell } from \"../../../theme/zIndex\";\nimport { BottomSheet } from \"../../generic/BottomSheet/BottomSheet\";\nimport { Avatar } from \"../../primitives/Avatar/Avatar\";\nimport { Box, Divider, Stack, Text, UnstyledButton } from \"../../primitives/layout\";\n\n/** Minimum touch target height for mobile account actions (WCAG 2.5.5 / Apple HIG). */\nexport const ACCOUNT_SHEET_ROW_MIN_HEIGHT = 48;\n\nexport interface AccountSheetItem {\n /** Unique identifier for this action. */\n id: string;\n /** Display label. */\n label: string;\n /** Leading icon element (app-owned icon library). */\n icon?: ReactNode;\n /**\n * Item color. Accepts a CSS color or a Mantine semantic name (`colors.error` → `\"error\"`).\n * Destructive actions like Sign out should pass `colors.error`.\n */\n color?: string;\n /** Show a divider before this item. */\n dividerBefore?: boolean;\n}\n\nexport interface AccountSheetProps {\n /** Whether the bottom sheet is open. */\n opened: boolean;\n /** Close handler (backdrop, escape, or grip). */\n onClose: () => void;\n /** Primary identity line. */\n displayName: string;\n /** Optional secondary identity line (email). */\n email?: string;\n /** Name passed to Avatar (initials). Defaults to `displayName`. */\n avatarName?: string;\n /** Avatar color token. @default colors.primary */\n avatarColor?: string;\n /** Sheet title below the grip. @default \"Account\" */\n title?: string;\n /** Account actions. */\n items: AccountSheetItem[];\n /** Called when an action row is pressed. Receives the item `id`. */\n onItemClick: (id: string) => void;\n /** Overlay z-index. Defaults above legacy Studio/Investor shell chrome. */\n zIndex?: number;\n}\n\n/** Map Mantine semantic names (e.g. `colors.error`) to CSS paint tokens for inline styles. */\nfunction resolvePaintColor(color?: string): string | undefined {\n if (!color) return undefined;\n if (color === colors.error || color === \"error\" || color === \"red\") {\n return fairmintVars.colorErrorText;\n }\n if (color === colors.primary || color === \"indigo\" || color === \"primary\") {\n return fairmintVars.colorBrandPrimary;\n }\n return color;\n}\n\nfunction AccountSheetRow({\n item,\n onItemClick,\n}: {\n item: AccountSheetItem;\n onItemClick: (id: string) => void;\n}) {\n const paint = resolvePaintColor(item.color);\n\n return (\n <UnstyledButton\n type=\"button\"\n onClick={() => onItemClick(item.id)}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n width: \"100%\",\n minHeight: ACCOUNT_SHEET_ROW_MIN_HEIGHT,\n paddingInline: 8,\n paddingBlock: 12,\n borderRadius: radii.md,\n textAlign: \"left\",\n cursor: \"pointer\",\n color: paint ?? fairmintVars.colorTextPrimary,\n }}\n styles={{\n root: {\n \"&:hover\": {\n backgroundColor: fairmintVars.colorBgHover,\n },\n },\n }}\n >\n {item.icon ? (\n <Box\n component=\"span\"\n aria-hidden\n style={{\n display: \"inline-flex\",\n color: paint ?? fairmintVars.colorIconSecondary,\n flexShrink: 0,\n }}\n >\n {item.icon}\n </Box>\n ) : null}\n <Text size=\"sm\" fw={500} style={{ color: paint ?? undefined }}>\n {item.label}\n </Text>\n </UnstyledButton>\n );\n}\n\n/**\n * Touch-first account surface for mobile shells.\n * Composes `BottomSheet` with identity header + action rows.\n */\nexport function AccountSheet({\n opened,\n onClose,\n displayName,\n email,\n avatarName,\n avatarColor = colors.primary,\n title = \"Account\",\n items,\n onItemClick,\n zIndex = overlayZIndexAboveLegacyShell + 10,\n}: AccountSheetProps) {\n return (\n <BottomSheet\n opened={opened}\n onClose={onClose}\n title={title}\n dismissLabel=\"Dismiss account menu\"\n zIndex={zIndex}\n >\n <Box\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n paddingInline: 8,\n paddingBlock: 8,\n }}\n >\n <Avatar name={avatarName ?? displayName} radius=\"md\" size={40} color={avatarColor} />\n <Stack gap={0} style={{ minWidth: 0, flex: 1 }}>\n <Text size=\"sm\" fw={600} truncate>\n {displayName}\n </Text>\n {email && email !== displayName ? (\n <Text size=\"xs\" c=\"dimmed\" truncate>\n {email}\n </Text>\n ) : null}\n </Stack>\n </Box>\n\n <Divider my=\"xs\" color={fairmintVars.colorBorderDefault} />\n\n <Stack gap={4}>\n {items.map((item) => (\n <Box key={item.id}>\n {item.dividerBefore ? (\n <Divider my=\"xs\" color={fairmintVars.colorBorderDefault} />\n ) : null}\n <AccountSheetRow item={item} onItemClick={onItemClick} />\n </Box>\n ))}\n </Stack>\n </BottomSheet>\n );\n}\n"],"names":["colors","fairmintVars","jsxs","UnstyledButton","radii","jsx","Box","Text","zIndex","overlayZIndexAboveLegacyShell","BottomSheet","Avatar","Stack","Divider"],"mappings":";;;;;;;;;;;AAQO,MAAM,+BAA+B;AA0C5C,SAAS,kBAAkB,OAAoC;AAC7D,MAAI,CAAC,MAAO,Q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UAAA,KAAK,+CACHO,OAAAA,SAAA,EAAQ,IAAG,MAAK,OAAOZ,MAAAA,aAAa,oBAAoB,IACvD;AAAA,UACJI,2BAAAA,IAAC,iBAAA,EAAgB,MAAY,YAAA,CAA0B;AAAA,QAAA,KAJ/C,KAAK,EAKf,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Minimum touch target height for mobile account actions (WCAG 2.5.5 / Apple HIG). */
|
|
3
|
+
export declare const ACCOUNT_SHEET_ROW_MIN_HEIGHT = 48;
|
|
4
|
+
export interface AccountSheetItem {
|
|
5
|
+
/** Unique identifier for this action. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Display label. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Leading icon element (app-owned icon library). */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Item color. Accepts a CSS color or a Mantine semantic name (`colors.error` → `"error"`).
|
|
13
|
+
* Destructive actions like Sign out should pass `colors.error`.
|
|
14
|
+
*/
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Show a divider before this item. */
|
|
17
|
+
dividerBefore?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface AccountSheetProps {
|
|
20
|
+
/** Whether the bottom sheet is open. */
|
|
21
|
+
opened: boolean;
|
|
22
|
+
/** Close handler (backdrop, escape, or grip). */
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
/** Primary identity line. */
|
|
25
|
+
displayName: string;
|
|
26
|
+
/** Optional secondary identity line (email). */
|
|
27
|
+
email?: string;
|
|
28
|
+
/** Name passed to Avatar (initials). Defaults to `displayName`. */
|
|
29
|
+
avatarName?: string;
|
|
30
|
+
/** Avatar color token. @default colors.primary */
|
|
31
|
+
avatarColor?: string;
|
|
32
|
+
/** Sheet title below the grip. @default "Account" */
|
|
33
|
+
title?: string;
|
|
34
|
+
/** Account actions. */
|
|
35
|
+
items: AccountSheetItem[];
|
|
36
|
+
/** Called when an action row is pressed. Receives the item `id`. */
|
|
37
|
+
onItemClick: (id: string) => void;
|
|
38
|
+
/** Overlay z-index. Defaults above legacy Studio/Investor shell chrome. */
|
|
39
|
+
zIndex?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Touch-first account surface for mobile shells.
|
|
43
|
+
* Composes `BottomSheet` with identity header + action rows.
|
|
44
|
+
*/
|
|
45
|
+
export declare function AccountSheet({ opened, onClose, displayName, email, avatarName, avatarColor, title, items, onItemClick, zIndex, }: AccountSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=AccountSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSheet.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/AccountSheet/AccountSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,uFAAuF;AACvF,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,oEAAoE;IACpE,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EACL,UAAU,EACV,WAA4B,EAC5B,KAAiB,EACjB,KAAK,EACL,WAAW,EACX,MAA2C,GAC5C,EAAE,iBAAiB,2CA6CnB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fairmintVars, radii } from "../../../theme/index.js";
|
|
3
|
+
import { overlayZIndexAboveLegacyShell } from "../../../theme/zIndex.js";
|
|
4
|
+
import { BottomSheet } from "../../generic/BottomSheet/BottomSheet.js";
|
|
5
|
+
import { Avatar } from "../../primitives/Avatar/Avatar.js";
|
|
6
|
+
import { Box, Stack, Divider } from "../../primitives/layout.js";
|
|
7
|
+
import { colors } from "../../../theme/colors.js";
|
|
8
|
+
import { Text } from "../../../node_modules/@mantine/core/esm/components/Text/Text.js";
|
|
9
|
+
import { UnstyledButton } from "../../../node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.js";
|
|
10
|
+
const ACCOUNT_SHEET_ROW_MIN_HEIGHT = 48;
|
|
11
|
+
function resolvePaintColor(color) {
|
|
12
|
+
if (!color) return void 0;
|
|
13
|
+
if (color === colors.error || color === "error" || color === "red") {
|
|
14
|
+
return fairmintVars.colorErrorText;
|
|
15
|
+
}
|
|
16
|
+
if (color === colors.primary || color === "indigo" || color === "primary") {
|
|
17
|
+
return fairmintVars.colorBrandPrimary;
|
|
18
|
+
}
|
|
19
|
+
return color;
|
|
20
|
+
}
|
|
21
|
+
function AccountSheetRow({
|
|
22
|
+
item,
|
|
23
|
+
onItemClick
|
|
24
|
+
}) {
|
|
25
|
+
const paint = resolvePaintColor(item.color);
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
UnstyledButton,
|
|
28
|
+
{
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: () => onItemClick(item.id),
|
|
31
|
+
style: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
gap: 12,
|
|
35
|
+
width: "100%",
|
|
36
|
+
minHeight: ACCOUNT_SHEET_ROW_MIN_HEIGHT,
|
|
37
|
+
paddingInline: 8,
|
|
38
|
+
paddingBlock: 12,
|
|
39
|
+
borderRadius: radii.md,
|
|
40
|
+
textAlign: "left",
|
|
41
|
+
cursor: "pointer",
|
|
42
|
+
color: paint ?? fairmintVars.colorTextPrimary
|
|
43
|
+
},
|
|
44
|
+
styles: {
|
|
45
|
+
root: {
|
|
46
|
+
"&:hover": {
|
|
47
|
+
backgroundColor: fairmintVars.colorBgHover
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
item.icon ? /* @__PURE__ */ jsx(
|
|
53
|
+
Box,
|
|
54
|
+
{
|
|
55
|
+
component: "span",
|
|
56
|
+
"aria-hidden": true,
|
|
57
|
+
style: {
|
|
58
|
+
display: "inline-flex",
|
|
59
|
+
color: paint ?? fairmintVars.colorIconSecondary,
|
|
60
|
+
flexShrink: 0
|
|
61
|
+
},
|
|
62
|
+
children: item.icon
|
|
63
|
+
}
|
|
64
|
+
) : null,
|
|
65
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, style: { color: paint ?? void 0 }, children: item.label })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
function AccountSheet({
|
|
71
|
+
opened,
|
|
72
|
+
onClose,
|
|
73
|
+
displayName,
|
|
74
|
+
email,
|
|
75
|
+
avatarName,
|
|
76
|
+
avatarColor = colors.primary,
|
|
77
|
+
title = "Account",
|
|
78
|
+
items,
|
|
79
|
+
onItemClick,
|
|
80
|
+
zIndex = overlayZIndexAboveLegacyShell + 10
|
|
81
|
+
}) {
|
|
82
|
+
return /* @__PURE__ */ jsxs(
|
|
83
|
+
BottomSheet,
|
|
84
|
+
{
|
|
85
|
+
opened,
|
|
86
|
+
onClose,
|
|
87
|
+
title,
|
|
88
|
+
dismissLabel: "Dismiss account menu",
|
|
89
|
+
zIndex,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsxs(
|
|
92
|
+
Box,
|
|
93
|
+
{
|
|
94
|
+
style: {
|
|
95
|
+
display: "flex",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
gap: 12,
|
|
98
|
+
paddingInline: 8,
|
|
99
|
+
paddingBlock: 8
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx(Avatar, { name: avatarName ?? displayName, radius: "md", size: 40, color: avatarColor }),
|
|
103
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 0, style: { minWidth: 0, flex: 1 }, children: [
|
|
104
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, truncate: true, children: displayName }),
|
|
105
|
+
email && email !== displayName ? /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", truncate: true, children: email }) : null
|
|
106
|
+
] })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx(Divider, { my: "xs", color: fairmintVars.colorBorderDefault }),
|
|
111
|
+
/* @__PURE__ */ jsx(Stack, { gap: 4, children: items.map((item) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
112
|
+
item.dividerBefore ? /* @__PURE__ */ jsx(Divider, { my: "xs", color: fairmintVars.colorBorderDefault }) : null,
|
|
113
|
+
/* @__PURE__ */ jsx(AccountSheetRow, { item, onItemClick })
|
|
114
|
+
] }, item.id)) })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
ACCOUNT_SHEET_ROW_MIN_HEIGHT,
|
|
121
|
+
AccountSheet
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=AccountSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSheet.js","sources":["../../../../src/components/layout/AccountSheet/AccountSheet.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { colors, fairmintVars, radii } from \"../../../theme\";\nimport { overlayZIndexAboveLegacyShell } from \"../../../theme/zIndex\";\nimport { BottomSheet } from \"../../generic/BottomSheet/BottomSheet\";\nimport { Avatar } from \"../../primitives/Avatar/Avatar\";\nimport { Box, Divider, Stack, Text, UnstyledButton } from \"../../primitives/layout\";\n\n/** Minimum touch target height for mobile account actions (WCAG 2.5.5 / Apple HIG). */\nexport const ACCOUNT_SHEET_ROW_MIN_HEIGHT = 48;\n\nexport interface AccountSheetItem {\n /** Unique identifier for this action. */\n id: string;\n /** Display label. */\n label: string;\n /** Leading icon element (app-owned icon library). */\n icon?: ReactNode;\n /**\n * Item color. Accepts a CSS color or a Mantine semantic name (`colors.error` → `\"error\"`).\n * Destructive actions like Sign out should pass `colors.error`.\n */\n color?: string;\n /** Show a divider before this item. */\n dividerBefore?: boolean;\n}\n\nexport interface AccountSheetProps {\n /** Whether the bottom sheet is open. */\n opened: boolean;\n /** Close handler (backdrop, escape, or grip). */\n onClose: () => void;\n /** Primary identity line. */\n displayName: string;\n /** Optional secondary identity line (email). */\n email?: string;\n /** Name passed to Avatar (initials). Defaults to `displayName`. */\n avatarName?: string;\n /** Avatar color token. @default colors.primary */\n avatarColor?: string;\n /** Sheet title below the grip. @default \"Account\" */\n title?: string;\n /** Account actions. */\n items: AccountSheetItem[];\n /** Called when an action row is pressed. Receives the item `id`. */\n onItemClick: (id: string) => void;\n /** Overlay z-index. Defaults above legacy Studio/Investor shell chrome. */\n zIndex?: number;\n}\n\n/** Map Mantine semantic names (e.g. `colors.error`) to CSS paint tokens for inline styles. */\nfunction resolvePaintColor(color?: string): string | undefined {\n if (!color) return undefined;\n if (color === colors.error || color === \"error\" || color === \"red\") {\n return fairmintVars.colorErrorText;\n }\n if (color === colors.primary || color === \"indigo\" || color === \"primary\") {\n return fairmintVars.colorBrandPrimary;\n }\n return color;\n}\n\nfunction AccountSheetRow({\n item,\n onItemClick,\n}: {\n item: AccountSheetItem;\n onItemClick: (id: string) => void;\n}) {\n const paint = resolvePaintColor(item.color);\n\n return (\n <UnstyledButton\n type=\"button\"\n onClick={() => onItemClick(item.id)}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n width: \"100%\",\n minHeight: ACCOUNT_SHEET_ROW_MIN_HEIGHT,\n paddingInline: 8,\n paddingBlock: 12,\n borderRadius: radii.md,\n textAlign: \"left\",\n cursor: \"pointer\",\n color: paint ?? fairmintVars.colorTextPrimary,\n }}\n styles={{\n root: {\n \"&:hover\": {\n backgroundColor: fairmintVars.colorBgHover,\n },\n },\n }}\n >\n {item.icon ? (\n <Box\n component=\"span\"\n aria-hidden\n style={{\n display: \"inline-flex\",\n color: paint ?? fairmintVars.colorIconSecondary,\n flexShrink: 0,\n }}\n >\n {item.icon}\n </Box>\n ) : null}\n <Text size=\"sm\" fw={500} style={{ color: paint ?? undefined }}>\n {item.label}\n </Text>\n </UnstyledButton>\n );\n}\n\n/**\n * Touch-first account surface for mobile shells.\n * Composes `BottomSheet` with identity header + action rows.\n */\nexport function AccountSheet({\n opened,\n onClose,\n displayName,\n email,\n avatarName,\n avatarColor = colors.primary,\n title = \"Account\",\n items,\n onItemClick,\n zIndex = overlayZIndexAboveLegacyShell + 10,\n}: AccountSheetProps) {\n return (\n <BottomSheet\n opened={opened}\n onClose={onClose}\n title={title}\n dismissLabel=\"Dismiss account menu\"\n zIndex={zIndex}\n >\n <Box\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n paddingInline: 8,\n paddingBlock: 8,\n }}\n >\n <Avatar name={avatarName ?? displayName} radius=\"md\" size={40} color={avatarColor} />\n <Stack gap={0} style={{ minWidth: 0, flex: 1 }}>\n <Text size=\"sm\" fw={600} truncate>\n {displayName}\n </Text>\n {email && email !== displayName ? (\n <Text size=\"xs\" c=\"dimmed\" truncate>\n {email}\n </Text>\n ) : null}\n </Stack>\n </Box>\n\n <Divider my=\"xs\" color={fairmintVars.colorBorderDefault} />\n\n <Stack gap={4}>\n {items.map((item) => (\n <Box key={item.id}>\n {item.dividerBefore ? (\n <Divider my=\"xs\" color={fairmintVars.colorBorderDefault} />\n ) : null}\n <AccountSheetRow item={item} onItemClick={onItemClick} />\n </Box>\n ))}\n </Stack>\n </BottomSheet>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAQO,MAAM,+BAA+B;AA0C5C,SAAS,kBAAkB,OAAoC;AAC7D,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,OAAO,SAAS,UAAU,WAAW,UAAU,OAAO;AAClE,WAAO,aAAa;AAAA,EACtB;AACA,MAAI,UAAU,OAAO,WAAW,UAAU,YAAY,UAAU,WAAW;AACzE,WAAO,aAAa;AAAA,EACtB;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AACF,GAGG;AACD,QAAM,QAAQ,kBAAkB,KAAK,KAAK;AAE1C,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAS,MAAM,YAAY,KAAK,EAAE;AAAA,MAClC,OAAO;AAAA,QACL,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,OAAO;AAAA,QACP,WAAW;AAAA,QACX,eAAe;AAAA,QACf,cAAc;AAAA,QACd,cAAc,MAAM;AAAA,QACpB,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,OAAO,SAAS,aAAa;AAAA,M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A,YAAA,CACH;AAAA,gBACC,SAAS,UAAU,cAClB,oBAAC,MAAA,EAAK,MAAK,MAAK,GAAE,UAAS,UAAQ,MAChC,UAAA,MAAA,CACH,IACE;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,4BAGD,SAAA,EAAQ,IAAG,MAAK,OAAO,aAAa,oBAAoB;AAAA,QAEzD,oBAAC,SAAM,KAAK,GACT,gBAAM,IAAI,CAAC,SACV,qBAAC,KAAA,EACE,UAAA;AAAA,UAAA,KAAK,oCACH,SAAA,EAAQ,IAAG,MAAK,OAAO,aAAa,oBAAoB,IACvD;AAAA,UACJ,oBAAC,iBAAA,EAAgB,MAAY,YAAA,CAA0B;AAAA,QAAA,KAJ/C,KAAK,EAKf,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const index = require("../../../theme/index.cjs");
|
|
6
|
+
const zIndex = require("../../../theme/zIndex.cjs");
|
|
7
|
+
const ActionIcon = require("../../primitives/ActionIcon/ActionIcon.cjs");
|
|
8
|
+
const Drawer = require("../../primitives/Drawer/Drawer.cjs");
|
|
9
|
+
const layout = require("../../primitives/layout.cjs");
|
|
10
|
+
const SideNav = require("../SideNav/SideNav.cjs");
|
|
11
|
+
const Group = require("../../../node_modules/@mantine/core/esm/components/Group/Group.cjs");
|
|
12
|
+
const IconX = require("../../../node_modules/@tabler/icons-react/dist/esm/icons/IconX.cjs");
|
|
13
|
+
const UnstyledButton = require("../../../node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.cjs");
|
|
14
|
+
const Text = require("../../../node_modules/@mantine/core/esm/components/Text/Text.cjs");
|
|
15
|
+
const IconChevronDown = require("../../../node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.cjs");
|
|
16
|
+
const MOBILE_NAV_WIDTH = "100%";
|
|
17
|
+
const MOBILE_NAV_ROW_MIN_HEIGHT = 48;
|
|
18
|
+
function MobileNavRow({
|
|
19
|
+
item,
|
|
20
|
+
depth,
|
|
21
|
+
onItemClick
|
|
22
|
+
}) {
|
|
23
|
+
const hasChildren = Boolean(item.children?.length);
|
|
24
|
+
const labelText = SideNav.getSideNavItemLabelText(item);
|
|
25
|
+
const childActive = item.children?.some((child) => child.active) ?? false;
|
|
26
|
+
const [opened, setOpened] = React.useState(Boolean(item.open) || childActive);
|
|
27
|
+
const active = Boolean(item.active) && !hasChildren;
|
|
28
|
+
const paddingLeft = 12 + depth * 16;
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(layout.Box, { children: [
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
31
|
+
UnstyledButton.UnstyledButton,
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
disabled: item.disabled,
|
|
35
|
+
"aria-label": labelText,
|
|
36
|
+
"aria-current": active ? "page" : void 0,
|
|
37
|
+
"aria-expanded": hasChildren ? opened : void 0,
|
|
38
|
+
onClick: () => {
|
|
39
|
+
if (hasChildren) {
|
|
40
|
+
setOpened((value) => !value);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
onItemClick(item.id);
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
display: "flex",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
gap: 12,
|
|
49
|
+
width: "100%",
|
|
50
|
+
minHeight: MOBILE_NAV_ROW_MIN_HEIGHT,
|
|
51
|
+
paddingLeft,
|
|
52
|
+
paddingRight: 12,
|
|
53
|
+
borderRadius: index.radii.md,
|
|
54
|
+
textAlign: "left",
|
|
55
|
+
cursor: item.disabled ? "not-allowed" : "pointer",
|
|
56
|
+
opacity: item.disabled ? 0.5 : 1,
|
|
57
|
+
backgroundColor: active ? index.fairmintVars.colorSurfaceSelected : "transparent",
|
|
58
|
+
color: active ? index.fairmintVars.colorIconOnSurfaceSelected : index.fairmintVars.colorTextPrimary
|
|
59
|
+
},
|
|
60
|
+
styles: {
|
|
61
|
+
root: {
|
|
62
|
+
"&:hover:not(:disabled)": {
|
|
63
|
+
backgroundColor: active ? index.fairmintVars.colorSurfaceSelected : index.fairmintVars.colorBgHover
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
item.icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
+
layout.Box,
|
|
70
|
+
{
|
|
71
|
+
component: "span",
|
|
72
|
+
style: {
|
|
73
|
+
display: "inline-flex",
|
|
74
|
+
color: active ? index.fairmintVars.colorIconOnSurfaceSelected : index.fairmintVars.colorIconSecondary,
|
|
75
|
+
flexShrink: 0
|
|
76
|
+
},
|
|
77
|
+
children: item.icon
|
|
78
|
+
}
|
|
79
|
+
) : null,
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
Text.Text,
|
|
82
|
+
{
|
|
83
|
+
size: "md",
|
|
84
|
+
fw: active ? 600 : 500,
|
|
85
|
+
style: {
|
|
86
|
+
flex: 1,
|
|
87
|
+
minWidth: 0,
|
|
88
|
+
color: active ? index.fairmintVars.colorIconOnSurfaceSelected : void 0
|
|
89
|
+
},
|
|
90
|
+
truncate: true,
|
|
91
|
+
children: item.label
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
item.rightSection,
|
|
95
|
+
hasChildren ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
96
|
+
IconChevronDown.default,
|
|
97
|
+
{
|
|
98
|
+
size: 18,
|
|
99
|
+
stroke: 1.5,
|
|
100
|
+
"aria-hidden": true,
|
|
101
|
+
style: {
|
|
102
|
+
flexShrink: 0,
|
|
103
|
+
transform: opened ? "rotate(180deg)" : "rotate(0deg)",
|
|
104
|
+
transition: "transform 120ms ease",
|
|
105
|
+
color: index.fairmintVars.colorIconTertiary
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
) : null
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
hasChildren && opened ? /* @__PURE__ */ jsxRuntime.jsx(layout.Stack, { gap: 4, mt: 4, children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsx(MobileNavRow, { item: child, depth: depth + 1, onItemClick }, child.id)) }) : null
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
function MobileNav({
|
|
116
|
+
opened,
|
|
117
|
+
onClose,
|
|
118
|
+
items = [],
|
|
119
|
+
sections,
|
|
120
|
+
onItemClick,
|
|
121
|
+
header,
|
|
122
|
+
cta,
|
|
123
|
+
profile,
|
|
124
|
+
onProfileClick,
|
|
125
|
+
ariaLabel = "Main navigation",
|
|
126
|
+
zIndex: zIndex$1 = zIndex.overlayZIndexAboveLegacyShell
|
|
127
|
+
}) {
|
|
128
|
+
const resolvedSections = sections ?? [{ id: "main", items }];
|
|
129
|
+
const handleItemClick = (id) => {
|
|
130
|
+
onItemClick(id);
|
|
131
|
+
onClose();
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
134
|
+
Drawer.Drawer,
|
|
135
|
+
{
|
|
136
|
+
opened,
|
|
137
|
+
onClose,
|
|
138
|
+
position: "left",
|
|
139
|
+
size: MOBILE_NAV_WIDTH,
|
|
140
|
+
padding: 0,
|
|
141
|
+
withCloseButton: false,
|
|
142
|
+
zIndex: zIndex$1,
|
|
143
|
+
styles: {
|
|
144
|
+
content: {
|
|
145
|
+
display: "flex",
|
|
146
|
+
flexDirection: "column",
|
|
147
|
+
height: "100%"
|
|
148
|
+
},
|
|
149
|
+
body: {
|
|
150
|
+
display: "flex",
|
|
151
|
+
flexDirection: "column",
|
|
152
|
+
flex: 1,
|
|
153
|
+
height: "100%",
|
|
154
|
+
minHeight: 0,
|
|
155
|
+
overflow: "hidden",
|
|
156
|
+
padding: 0
|
|
157
|
+
},
|
|
158
|
+
header: {
|
|
159
|
+
display: "none"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
163
|
+
layout.Stack,
|
|
164
|
+
{
|
|
165
|
+
component: "nav",
|
|
166
|
+
gap: "md",
|
|
167
|
+
"aria-label": ariaLabel,
|
|
168
|
+
style: {
|
|
169
|
+
height: "100%",
|
|
170
|
+
padding: 16,
|
|
171
|
+
paddingBottom: "max(16px, env(safe-area-inset-bottom))",
|
|
172
|
+
boxSizing: "border-box"
|
|
173
|
+
},
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
176
|
+
Group.Group,
|
|
177
|
+
{
|
|
178
|
+
justify: "space-between",
|
|
179
|
+
wrap: "nowrap",
|
|
180
|
+
align: "center",
|
|
181
|
+
gap: "sm",
|
|
182
|
+
style: { flexShrink: 0 },
|
|
183
|
+
children: [
|
|
184
|
+
/* @__PURE__ */ jsxRuntime.jsx(layout.Box, { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center" }, children: header }),
|
|
185
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
186
|
+
ActionIcon.ActionIcon,
|
|
187
|
+
{
|
|
188
|
+
type: "button",
|
|
189
|
+
"aria-label": "Close navigation",
|
|
190
|
+
color: "gray",
|
|
191
|
+
variant: "subtle",
|
|
192
|
+
size: "lg",
|
|
193
|
+
onClick: onClose,
|
|
194
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconX.default, { size: 20, stroke: 1.5 })
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
/* @__PURE__ */ jsxRuntime.jsx(layout.Stack, { gap: 4, style: { flex: 1, minHeight: 0, overflow: "auto" }, children: resolvedSections.flatMap(
|
|
201
|
+
(section) => section.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
202
|
+
MobileNavRow,
|
|
203
|
+
{
|
|
204
|
+
item,
|
|
205
|
+
depth: 0,
|
|
206
|
+
onItemClick: handleItemClick
|
|
207
|
+
},
|
|
208
|
+
`${section.id}:${item.id}`
|
|
209
|
+
))
|
|
210
|
+
) }),
|
|
211
|
+
(cta || profile) && /* @__PURE__ */ jsxRuntime.jsxs(layout.Stack, { gap: "sm", style: { flexShrink: 0 }, children: [
|
|
212
|
+
cta ? /* @__PURE__ */ jsxRuntime.jsx(layout.Box, { style: { width: "100%" }, children: cta }) : null,
|
|
213
|
+
cta && profile ? /* @__PURE__ */ jsxRuntime.jsx(layout.Divider, { color: index.fairmintVars.colorBorderDefault }) : null,
|
|
214
|
+
profile ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
215
|
+
UnstyledButton.UnstyledButton,
|
|
216
|
+
{
|
|
217
|
+
type: "button",
|
|
218
|
+
"aria-label": "Account menu",
|
|
219
|
+
"aria-haspopup": "dialog",
|
|
220
|
+
onClick: onProfileClick,
|
|
221
|
+
style: {
|
|
222
|
+
display: "flex",
|
|
223
|
+
alignItems: "center",
|
|
224
|
+
gap: 12,
|
|
225
|
+
width: "100%",
|
|
226
|
+
minHeight: MOBILE_NAV_ROW_MIN_HEIGHT,
|
|
227
|
+
padding: 8,
|
|
228
|
+
borderRadius: index.radii.md,
|
|
229
|
+
textAlign: "left",
|
|
230
|
+
cursor: onProfileClick ? "pointer" : "default"
|
|
231
|
+
},
|
|
232
|
+
styles: {
|
|
233
|
+
root: {
|
|
234
|
+
"&:hover": {
|
|
235
|
+
backgroundColor: index.fairmintVars.colorBgHover
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
children: [
|
|
240
|
+
profile.avatar,
|
|
241
|
+
/* @__PURE__ */ jsxRuntime.jsxs(layout.Stack, { gap: 0, style: { minWidth: 0, flex: 1 }, children: [
|
|
242
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text.Text, { size: "sm", fw: 600, truncate: true, children: profile.displayName }),
|
|
243
|
+
profile.subline && profile.subline !== profile.displayName ? /* @__PURE__ */ jsxRuntime.jsx(Text.Text, { size: "xs", c: "dimmed", truncate: true, children: profile.subline }) : null
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
246
|
+
IconChevronDown.default,
|
|
247
|
+
{
|
|
248
|
+
size: 18,
|
|
249
|
+
stroke: 1.5,
|
|
250
|
+
"aria-hidden": true,
|
|
251
|
+
style: { color: index.fairmintVars.colorIconTertiary, flexShrink: 0 }
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
) : null
|
|
257
|
+
] })
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
exports.MOBILE_NAV_ROW_MIN_HEIGHT = MOBILE_NAV_ROW_MIN_HEIGHT;
|
|
265
|
+
exports.MOBILE_NAV_WIDTH = MOBILE_NAV_WIDTH;
|
|
266
|
+
exports.MobileNav = MobileNav;
|
|
267
|
+
//# sourceMappingURL=MobileNav.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileNav.cjs","sources":["../../../../src/components/layout/MobileNav/MobileNav.tsx"],"sourcesContent":["import { IconChevronDown, IconX } from \"@tabler/icons-react\";\nimport { type ReactNode, useState } from \"react\";\nimport { fairmintVars, radii } from \"../../../theme\";\nimport { overlayZIndexAboveLegacyShell } from \"../../../theme/zIndex\";\nimport { ActionIcon } from \"../../primitives/ActionIcon/ActionIcon\";\nimport { Drawer } from \"../../primitives/Drawer/Drawer\";\nimport { Box, Divider, Group, Stack, Text, UnstyledButton } from \"../../primitives/layout\";\nimport { getSideNavItemLabelText, type SideNavItem, type SideNavSection } from \"../SideNav/SideNav\";\n\n/** Full-bleed mobile nav sheet width — not the 260px desktop rail. */\nexport const MOBILE_NAV_WIDTH = \"100%\";\n\n/** Minimum touch target for destination / profile rows. */\nexport const MOBILE_NAV_ROW_MIN_HEIGHT = 48;\n\nexport interface MobileNavProfile {\n /** Primary line (user name). */\n displayName: string;\n /** Secondary line (company / email). */\n subline?: string;\n /** Avatar name for initials. Defaults to `displayName`. */\n avatarName?: string;\n /** Leading avatar node. When omitted, a text fallback is shown. */\n avatar?: ReactNode;\n}\n\nexport interface MobileNavProps {\n /** Whether the navigation sheet is open. */\n opened: boolean;\n /** Close handler (backdrop / escape). */\n onClose: () => void;\n /** Flat destination list when sections are not needed. */\n items?: SideNavItem[];\n /** Grouped destinations (section labels are not rendered — same as SideNav). */\n sections?: SideNavSection[];\n /** Leaf destination selected. Parents with children only expand/collapse. */\n onItemClick: (id: string) => void;\n /** Logo / brand chrome above destinations. */\n header?: ReactNode;\n /** Primary CTA above the profile (e.g. Start / Add investment). */\n cta?: ReactNode;\n /** Profile trigger shown at the bottom. Tapping calls `onProfileClick`. */\n profile?: MobileNavProfile;\n /** Called when the profile row is pressed (typically opens AccountSheet). */\n onProfileClick?: () => void;\n /** Accessible label for the navigation landmark. @default \"Main navigation\" */\n ariaLabel?: string;\n /** Overlay z-index. @default overlayZIndexAboveLegacyShell */\n zIndex?: number;\n}\n\nfunction MobileNavRow({\n item,\n depth,\n onItemClick,\n}: {\n item: SideNavItem;\n depth: number;\n onItemClick: (id: string) => void;\n}) {\n const hasChildren = Boolean(item.children?.length);\n const labelText = getSideNavItemLabelText(item);\n const childActive = item.children?.some((child) => child.active) ?? false;\n const [opened, setOpened] = useState(Boolean(item.open) || childActive);\n const active = Boolean(item.active) && !hasChildren;\n\n const paddingLeft = 12 + depth * 16;\n\n return (\n <Box>\n <UnstyledButton\n type=\"button\"\n disabled={item.disabled}\n aria-label={labelText}\n aria-current={active ? \"page\" : undefined}\n aria-expanded={hasChildren ? opened : undefined}\n onClick={() => {\n if (hasChildren) {\n setOpened((value) => !value);\n return;\n }\n onItemClick(item.id);\n }}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n width: \"100%\",\n minHeight: MOBILE_NAV_ROW_MIN_HEIGHT,\n paddingLeft,\n paddingRight: 12,\n borderRadius: radii.md,\n textAlign: \"left\",\n cursor: item.disabled ? \"not-allowed\" : \"pointer\",\n opacity: item.disabled ? 0.5 : 1,\n backgroundColor: active ? fairmintVars.colorSurfaceSelected : \"transparent\",\n color: active ? fairmintVars.colorIconOnSurfaceSelected : fairmintVars.colorTextPrimary,\n }}\n styles={{\n root: {\n \"&:hover:not(:disabled)\": {\n backgroundColor: active\n ? fairmintVars.colorSurfaceSelected\n : fairmintVars.colorBgHover,\n },\n },\n }}\n >\n {item.icon ? (\n <Box\n component=\"span\"\n style={{\n display: \"inline-flex\",\n color: active\n ? fairmintVars.colorIconOnSurfaceSelected\n : fairmintVars.colorIconSecondary,\n flexShrink: 0,\n }}\n >\n {item.icon}\n </Box>\n ) : null}\n <Text\n size=\"md\"\n fw={active ? 600 : 500}\n style={{\n flex: 1,\n minWidth: 0,\n color: active ? fairmintVars.colorIconOnSurfaceSelected : undefined,\n }}\n truncate\n >\n {item.label}\n </Text>\n {item.rightSection}\n {hasChildren ? (\n <IconChevronDown\n size={18}\n stroke={1.5}\n aria-hidden\n style={{\n flexShrink: 0,\n transform: opened ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: \"transform 120ms ease\",\n color: fairmintVars.colorIconTertiary,\n }}\n />\n ) : null}\n </UnstyledButton>\n\n {hasChildren && opened ? (\n <Stack gap={4} mt={4}>\n {item.children?.map((child) => (\n <MobileNavRow key={child.id} item={child} depth={depth + 1} onItemClick={onItemClick} />\n ))}\n </Stack>\n ) : null}\n </Box>\n );\n}\n\n/**\n * Mobile-optimized navigation sheet for product shells.\n *\n * Full-bleed left drawer with 48px touch rows, pinned CTA + profile, and an\n * always-visible close control (full-bleed leaves no backdrop to dismiss).\n * Pair `onProfileClick` with {@link AccountSheet} for Sign out.\n */\nexport function MobileNav({\n opened,\n onClose,\n items = [],\n sections,\n onItemClick,\n header,\n cta,\n profile,\n onProfileClick,\n ariaLabel = \"Main navigation\",\n zIndex = overlayZIndexAboveLegacyShell,\n}: MobileNavProps) {\n const resolvedSections = sections ?? [{ id: \"main\", items }];\n\n const handleItemClick = (id: string) => {\n onItemClick(id);\n onClose();\n };\n\n return (\n <Drawer\n opened={opened}\n onClose={onClose}\n position=\"left\"\n size={MOBILE_NAV_WIDTH}\n padding={0}\n withCloseButton={false}\n zIndex={zIndex}\n styles={{\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n },\n body: {\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n height: \"100%\",\n minHeight: 0,\n overflow: \"hidden\",\n padding: 0,\n },\n header: {\n display: \"none\",\n },\n }}\n >\n <Stack\n component=\"nav\"\n gap=\"md\"\n aria-label={ariaLabel}\n style={{\n height: \"100%\",\n padding: 16,\n paddingBottom: \"max(16px, env(safe-area-inset-bottom))\",\n boxSizing: \"border-box\",\n }}\n >\n <Group\n justify=\"space-between\"\n wrap=\"nowrap\"\n align=\"center\"\n gap=\"sm\"\n style={{ flexShrink: 0 }}\n >\n <Box style={{ flex: 1, minWidth: 0, display: \"flex\", alignItems: \"center\" }}>\n {header}\n </Box>\n <ActionIcon\n type=\"button\"\n aria-label=\"Close navigation\"\n color=\"gray\"\n variant=\"subtle\"\n size=\"lg\"\n onClick={onClose}\n >\n <IconX size={20} stroke={1.5} />\n </ActionIcon>\n </Group>\n\n <Stack gap={4} style={{ flex: 1, minHeight: 0, overflow: \"auto\" }}>\n {resolvedSections.flatMap((section) =>\n section.items.map((item) => (\n <MobileNavRow\n key={`${section.id}:${item.id}`}\n item={item}\n depth={0}\n onItemClick={handleItemClick}\n />\n )),\n )}\n </Stack>\n\n {(cta || profile) && (\n <Stack gap=\"sm\" style={{ flexShrink: 0 }}>\n {cta ? <Box style={{ width: \"100%\" }}>{cta}</Box> : null}\n {cta && profile ? <Divider color={fairmintVars.colorBorderDefault} /> : null}\n {profile ? (\n <UnstyledButton\n type=\"button\"\n aria-label=\"Account menu\"\n aria-haspopup=\"dialog\"\n onClick={onProfileClick}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n width: \"100%\",\n minHeight: MOBILE_NAV_ROW_MIN_HEIGHT,\n padding: 8,\n borderRadius: radii.md,\n textAlign: \"left\",\n cursor: onProfileClick ? \"pointer\" : \"default\",\n }}\n styles={{\n root: {\n \"&:hover\": {\n backgroundColor: fairmintVars.colorBgHover,\n },\n },\n }}\n >\n {profile.avatar}\n <Stack gap={0} style={{ minWidth: 0, flex: 1 }}>\n <Text size=\"sm\" fw={600} truncate>\n {profile.displayName}\n </Text>\n {profile.subline && profile.subline !== profile.displayName ? (\n <Text size=\"xs\" c=\"dimmed\" truncate>\n {profile.subline}\n </Text>\n ) : null}\n </Stack>\n <IconChevronDown\n size={18}\n stroke={1.5}\n aria-hidden\n style={{ color: fairmintVars.colorIconTertiary, flexShrink: 0 }}\n />\n </UnstyledButton>\n ) : null}\n </Stack>\n )}\n </Stack>\n </Drawer>\n );\n}\n"],"names":["getSideNavItemLabelText","useState","Box","jsxs","UnstyledButton","radii","fairmintVars","jsx","Text","IconChevronDown","Stack","zIndex","overlayZIndexAboveLegacyShell","Drawer","Group","ActionIcon","IconX","Divider"],"mappings":";;;;;;;;;;;;;;;AAUO,MAAM,mBAAmB;AAGzB,MAAM,4BAA4B;AAsCzC,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,cAAc,QAAQ,KAAK,UAAU,MAAM;AACjD,QAAM,YAAYA,QAAAA,wBAAwB,IAAI;AAC9C,QAAM,cAAc,KAAK,UAAU,KAAK,CAAC,UAAU,MAAM,MAAM,KAAK;AACpE,QAAM,CAAC,QAAQ,SAAS,IAAIC,MAAAA,SAAS,QAAQ,KAAK,IAAI,KAAK,WAAW;AACtE,QAAM,SAAS,QAAQ,KAAK,MAAM,KAAK,CAA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