@burdenoff/microfe-brainyrich 2026.1101.2 → 2026.1101.3
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/brainyrich/BrainyRichRoot.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoot.js +22 -107
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.js +65 -46
- package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
- package/dist/brainyrich/components/mobile/MobilePage.d.ts +44 -0
- package/dist/brainyrich/components/mobile/MobilePage.d.ts.map +1 -0
- package/dist/brainyrich/components/mobile/MobilePage.js +45 -0
- package/dist/brainyrich/components/mobile/MobilePage.js.map +1 -0
- package/dist/brainyrich/components/mobile/MobileTabBar.d.ts +20 -0
- package/dist/brainyrich/components/mobile/MobileTabBar.d.ts.map +1 -0
- package/dist/brainyrich/components/mobile/MobileTabBar.js +139 -0
- package/dist/brainyrich/components/mobile/MobileTabBar.js.map +1 -0
- package/dist/brainyrich/components/mobile/index.d.ts +8 -0
- package/dist/brainyrich/components/mobile/index.d.ts.map +1 -0
- package/dist/brainyrich/components/mobile/index.js +2 -0
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +48 -12
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +120 -108
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/hooks/useIsMobileViewport.d.ts +14 -0
- package/dist/brainyrich/hooks/useIsMobileViewport.d.ts.map +1 -0
- package/dist/brainyrich/hooks/useIsMobileViewport.js +23 -0
- package/dist/brainyrich/hooks/useIsMobileViewport.js.map +1 -0
- package/dist/brainyrich/navItems.d.ts +36 -0
- package/dist/brainyrich/navItems.d.ts.map +1 -0
- package/dist/brainyrich/navItems.js +54 -0
- package/dist/brainyrich/navItems.js.map +1 -0
- package/dist/brainyrich/pages/AccountsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.js +411 -390
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js +220 -174
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js +560 -551
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/mobile/MobileAccountsView.d.ts +28 -0
- package/dist/brainyrich/pages/mobile/MobileAccountsView.d.ts.map +1 -0
- package/dist/brainyrich/pages/mobile/MobileAccountsView.js +139 -0
- package/dist/brainyrich/pages/mobile/MobileAccountsView.js.map +1 -0
- package/dist/brainyrich/pages/mobile/MobileDashboardView.d.ts +24 -0
- package/dist/brainyrich/pages/mobile/MobileDashboardView.d.ts.map +1 -0
- package/dist/brainyrich/pages/mobile/MobileDashboardView.js +245 -0
- package/dist/brainyrich/pages/mobile/MobileDashboardView.js.map +1 -0
- package/dist/brainyrich/pages/mobile/MobileGoalsView.d.ts +30 -0
- package/dist/brainyrich/pages/mobile/MobileGoalsView.d.ts.map +1 -0
- package/dist/brainyrich/pages/mobile/MobileGoalsView.js +180 -0
- package/dist/brainyrich/pages/mobile/MobileGoalsView.js.map +1 -0
- package/dist/brainyrich/pages/mobile/mobileShared.d.ts +24 -0
- package/dist/brainyrich/pages/mobile/mobileShared.d.ts.map +1 -0
- package/dist/brainyrich/pages/mobile/mobileShared.js +25 -0
- package/dist/brainyrich/pages/mobile/mobileShared.js.map +1 -0
- package/dist/brainyrich/utils/cn.js +10 -0
- package/dist/brainyrich/utils/cn.js.map +1 -0
- package/dist/brainyrich/utils/goalMetrics.d.ts +13 -0
- package/dist/brainyrich/utils/goalMetrics.d.ts.map +1 -0
- package/dist/brainyrich/utils/goalMetrics.js +20 -0
- package/dist/brainyrich/utils/goalMetrics.js.map +1 -0
- package/dist/test/brainyrichFixtures.d.ts +7 -0
- package/dist/test/brainyrichFixtures.d.ts.map +1 -0
- package/dist/test/viewport.d.ts +8 -0
- package/dist/test/viewport.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrainyRichRoot.d.ts","sourceRoot":"","sources":["../../src/brainyrich/BrainyRichRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BrainyRichRoot.d.ts","sourceRoot":"","sources":["../../src/brainyrich/BrainyRichRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAW,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK5D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA0ClD,CAAC"}
|
|
@@ -1,133 +1,48 @@
|
|
|
1
1
|
import { BrainyRichProvider as e } from "./providers/BrainyRichProvider.js";
|
|
2
2
|
import { tWithFallback as t } from "./utils/i18n.js";
|
|
3
|
-
import {
|
|
3
|
+
import { buildBrainyRichNavChildren as n } from "./navItems.js";
|
|
4
4
|
import { BrainyRichRoutes as r } from "./BrainyRichRoutes.js";
|
|
5
5
|
import { useCallback as i, useEffect as a } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { FeatureFlagProvider as
|
|
6
|
+
import { LayoutDashboard as o } from "lucide-react";
|
|
7
|
+
import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
9
|
+
import { FeatureFlagProvider as l } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
10
10
|
//#region src/brainyrich/BrainyRichRoot.tsx
|
|
11
|
-
var
|
|
12
|
-
let { registerNavItems:
|
|
11
|
+
var u = (u) => {
|
|
12
|
+
let { registerNavItems: d, registerFooterItems: f, basePath: p = "/" } = u, { t: m } = s(), h = i((e, n) => t(m, e, n), [m]);
|
|
13
13
|
return a(() => {
|
|
14
|
-
if (
|
|
14
|
+
if (d) return d({
|
|
15
15
|
id: "brainyrich",
|
|
16
|
-
label:
|
|
17
|
-
path:
|
|
18
|
-
icon: /* @__PURE__ */
|
|
16
|
+
label: h("brainyrich.nav.root", "BrainyRich"),
|
|
17
|
+
path: p,
|
|
18
|
+
icon: /* @__PURE__ */ c(o, { size: 20 }),
|
|
19
19
|
order: 80,
|
|
20
20
|
group: "products",
|
|
21
|
-
children:
|
|
22
|
-
{
|
|
23
|
-
id: "brainyrich-dashboard",
|
|
24
|
-
label: E("brainyrich.nav.dashboard", "Dashboard"),
|
|
25
|
-
path: w,
|
|
26
|
-
icon: /* @__PURE__ */ y(p, { size: 16 }),
|
|
27
|
-
order: 0
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "brainyrich-portfolios",
|
|
31
|
-
label: E("brainyrich.nav.portfolios", "Portfolios"),
|
|
32
|
-
path: n(w, "portfolios"),
|
|
33
|
-
icon: /* @__PURE__ */ y(c, { size: 16 }),
|
|
34
|
-
order: 10
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "brainyrich-investments",
|
|
38
|
-
label: E("brainyrich.nav.investments", "Investments"),
|
|
39
|
-
path: n(w, "investments"),
|
|
40
|
-
icon: /* @__PURE__ */ y(g, { size: 16 }),
|
|
41
|
-
order: 11
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "brainyrich-goals",
|
|
45
|
-
label: E("brainyrich.nav.goals", "Goals"),
|
|
46
|
-
path: n(w, "goals"),
|
|
47
|
-
icon: /* @__PURE__ */ y(h, { size: 16 }),
|
|
48
|
-
order: 12
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "brainyrich-accounts",
|
|
52
|
-
label: E("brainyrich.nav.accounts", "Accounts"),
|
|
53
|
-
path: n(w, "accounts"),
|
|
54
|
-
icon: /* @__PURE__ */ y(f, { size: 16 }),
|
|
55
|
-
order: 13
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: "brainyrich-analytics",
|
|
59
|
-
label: E("brainyrich.nav.analytics", "Analytics"),
|
|
60
|
-
path: n(w, "analytics"),
|
|
61
|
-
icon: /* @__PURE__ */ y(o, { size: 16 }),
|
|
62
|
-
order: 21
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "brainyrich-risk",
|
|
66
|
-
label: E("brainyrich.nav.risk", "Rebalancing"),
|
|
67
|
-
path: n(w, "risk"),
|
|
68
|
-
icon: /* @__PURE__ */ y(m, { size: 16 }),
|
|
69
|
-
order: 22
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: "brainyrich-tax",
|
|
73
|
-
label: E("brainyrich.nav.tax", "Tax"),
|
|
74
|
-
path: n(w, "tax"),
|
|
75
|
-
icon: /* @__PURE__ */ y(u, { size: 16 }),
|
|
76
|
-
order: 30
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: "brainyrich-family",
|
|
80
|
-
label: E("brainyrich.nav.family", "Households"),
|
|
81
|
-
path: n(w, "family"),
|
|
82
|
-
icon: /* @__PURE__ */ y(_, { size: 16 }),
|
|
83
|
-
order: 40
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "brainyrich-reports",
|
|
87
|
-
label: E("brainyrich.nav.reports", "Reports"),
|
|
88
|
-
path: n(w, "reports"),
|
|
89
|
-
icon: /* @__PURE__ */ y(d, { size: 16 }),
|
|
90
|
-
order: 42
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: "brainyrich-firm",
|
|
94
|
-
label: E("brainyrich.nav.firm", "Firm"),
|
|
95
|
-
path: n(w, "firm"),
|
|
96
|
-
icon: /* @__PURE__ */ y(l, { size: 16 }),
|
|
97
|
-
order: 45
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: "brainyrich-ai-assistant",
|
|
101
|
-
label: E("brainyrich.nav.aiAssistant", "Insights"),
|
|
102
|
-
path: n(w, "ai-assistant"),
|
|
103
|
-
icon: /* @__PURE__ */ y(s, { size: 16 }),
|
|
104
|
-
order: 50
|
|
105
|
-
}
|
|
106
|
-
]
|
|
21
|
+
children: n(p, h)
|
|
107
22
|
});
|
|
108
23
|
}, [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
24
|
+
d,
|
|
25
|
+
p,
|
|
26
|
+
h
|
|
112
27
|
]), a(() => {
|
|
113
|
-
if (
|
|
28
|
+
if (f) return f([{
|
|
114
29
|
id: "brainyrich-status",
|
|
115
|
-
label:
|
|
30
|
+
label: h("brainyrich.footer.ready", "BrainyRich Ready"),
|
|
116
31
|
type: "status",
|
|
117
32
|
section: "left",
|
|
118
33
|
order: 10
|
|
119
34
|
}]);
|
|
120
|
-
}, [
|
|
35
|
+
}, [f, h]), /* @__PURE__ */ c(l, {
|
|
121
36
|
workspaceId: null,
|
|
122
37
|
gateway: "global",
|
|
123
38
|
defaultEnabled: !0,
|
|
124
|
-
children: /* @__PURE__ */
|
|
125
|
-
...
|
|
126
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ c(e, {
|
|
40
|
+
...u,
|
|
41
|
+
children: /* @__PURE__ */ c(r, {})
|
|
127
42
|
})
|
|
128
43
|
});
|
|
129
44
|
};
|
|
130
45
|
//#endregion
|
|
131
|
-
export {
|
|
46
|
+
export { u as BrainyRichRoot };
|
|
132
47
|
|
|
133
48
|
//# sourceMappingURL=BrainyRichRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrainyRichRoot.js","names":[],"sources":["../../src/brainyrich/BrainyRichRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"BrainyRichRoot.js","names":[],"sources":["../../src/brainyrich/BrainyRichRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { LayoutDashboard } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { BrainyRichProvider } from './providers/BrainyRichProvider';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport type { NavItem, BrainyRichRootProps } from './types';\nimport { tWithFallback } from './utils/i18n';\nimport { BrainyRichRoutes } from './BrainyRichRoutes';\nimport { buildBrainyRichNavChildren } from './navItems';\n\nexport const BrainyRichRoot: FC<BrainyRichRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t } = useI18n();\n const translate = useCallback(\n (key: string, fallback: string) => tWithFallback(t, key, fallback),\n [t]\n );\n\n useEffect(() => {\n if (!registerNavItems) return;\n const navItem: NavItem = {\n id: 'brainyrich',\n label: translate('brainyrich.nav.root', 'BrainyRich'),\n path: basePath,\n icon: <LayoutDashboard size={20} />,\n order: 80,\n group: 'products',\n children: buildBrainyRichNavChildren(basePath, translate),\n };\n return registerNavItems(navItem);\n }, [registerNavItems, basePath, translate]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n return registerFooterItems([\n {\n id: 'brainyrich-status',\n label: translate('brainyrich.footer.ready', 'BrainyRich Ready'),\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, translate]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BrainyRichProvider {...props}>\n <BrainyRichRoutes />\n </BrainyRichProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AAWA,IAAa,KAA2C,MAAU;CAChE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,SAAM,EAAQ,GAChB,IAAY,GACf,GAAa,MAAqB,EAAc,GAAG,GAAK,CAAQ,GACjE,CAAC,CAAC,CACJ;CA6BA,OA3BA,QAAgB;EACT,OAUL,OAAO,EAAiB;GARtB,IAAI;GACJ,OAAO,EAAU,uBAAuB,YAAY;GACpD,MAAM;GACN,MAAM,kBAAC,GAAD,EAAiB,MAAM,GAAK,CAAA;GAClC,OAAO;GACP,OAAO;GACP,UAAU,EAA2B,GAAU,CAAS;EAElC,CAAO;CACjC,GAAG;EAAC;EAAkB;EAAU;CAAS,CAAC,GAE1C,QAAgB;EACT,OACL,OAAO,EAAoB,CACzB;GACE,IAAI;GACJ,OAAO,EAAU,2BAA2B,kBAAkB;GAC9D,MAAM;GACN,SAAS;GACT,OAAO;EACT,CACF,CAAC;CACH,GAAG,CAAC,GAAqB,CAAS,CAAC,GAGjC,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAoB,GAAI;aACtB,kBAAC,GAAD,CAAmB,CAAA;EACD,CAAA;CACD,CAAA;AAEzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrainyRichRoutes.d.ts","sourceRoot":"","sources":["../../src/brainyrich/BrainyRichRoutes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrainyRichRoutes.d.ts","sourceRoot":"","sources":["../../src/brainyrich/BrainyRichRoutes.tsx"],"names":[],"mappings":"AAsFA,wBAAgB,gBAAgB,4CAO/B"}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { useBrainyRich as e } from "./providers/BrainyRichProvider.js";
|
|
2
|
+
import { useIsMobileViewport as t } from "./hooks/useIsMobileViewport.js";
|
|
3
|
+
import { cn as n } from "./utils/cn.js";
|
|
4
|
+
import { MobileTabBar as r } from "./components/mobile/MobileTabBar.js";
|
|
5
|
+
import "./components/mobile/index.js";
|
|
6
|
+
import { DashboardPage as i } from "./pages/DashboardPage.js";
|
|
7
|
+
import { Suspense as a, lazy as o } from "react";
|
|
8
|
+
import { Loader2 as s } from "lucide-react";
|
|
9
|
+
import { Navigate as c, Route as l, Routes as u } from "react-router";
|
|
10
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { FeatureGate as m } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
12
|
+
import { isInstalledApp as h } from "@burdenoff/fe-libs/shared/native";
|
|
7
13
|
//#region src/brainyrich/BrainyRichRoutes.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */
|
|
14
|
+
var g = o(() => import("./pages/AiAssistantPage.js").then((e) => ({ default: e.AiAssistantPage }))), _ = o(() => import("./pages/AnalyticsPage.js").then((e) => ({ default: e.AnalyticsPage }))), v = o(() => import("./pages/AccountsPage.js").then((e) => ({ default: e.AccountsPage }))), y = o(() => import("./pages/FamilyPage.js").then((e) => ({ default: e.FamilyPage }))), b = o(() => import("./pages/FirmPage.js").then((e) => ({ default: e.FirmPage }))), x = o(() => import("./pages/AdminFirmPage.js").then((e) => ({ default: e.AdminFirmPage }))), S = o(() => import("./pages/GoalsPage.js").then((e) => ({ default: e.GoalsPage }))), C = o(() => import("./pages/InvestmentsPage.js").then((e) => ({ default: e.InvestmentsPage }))), w = o(() => import("./pages/PortfoliosPage.js").then((e) => ({ default: e.PortfoliosPage }))), T = o(() => import("./pages/ReportsPage.js").then((e) => ({ default: e.ReportsPage }))), E = o(() => import("./pages/RiskPage.js").then((e) => ({ default: e.RiskPage }))), D = o(() => import("./pages/TaxPage.js").then((e) => ({ default: e.TaxPage })));
|
|
15
|
+
function O() {
|
|
16
|
+
return /* @__PURE__ */ f("div", {
|
|
11
17
|
className: "flex min-h-[320px] items-center justify-center",
|
|
12
|
-
children: /* @__PURE__ */ s
|
|
18
|
+
children: /* @__PURE__ */ f(s, { className: "h-8 w-8 animate-spin text-primary" })
|
|
13
19
|
});
|
|
14
20
|
}
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
21
|
+
function k(e, t) {
|
|
22
|
+
return /* @__PURE__ */ f(m, {
|
|
17
23
|
flag: e,
|
|
18
|
-
fallback: /* @__PURE__ */
|
|
24
|
+
fallback: /* @__PURE__ */ f(c, {
|
|
19
25
|
to: "",
|
|
20
26
|
replace: !0
|
|
21
27
|
}),
|
|
@@ -23,65 +29,78 @@ function C(e, t) {
|
|
|
23
29
|
children: t
|
|
24
30
|
});
|
|
25
31
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
function A() {
|
|
33
|
+
let { basePath: i = "/" } = e();
|
|
34
|
+
if (!t()) return null;
|
|
35
|
+
let a = h();
|
|
36
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
37
|
+
"aria-hidden": "true",
|
|
38
|
+
"data-testid": "brainyrich-mobile-scroll-spacer",
|
|
39
|
+
className: n("md:hidden", a ? "h-[4.5rem]" : "h-[calc(4.5rem+var(--mobile-tabbar-height,4rem))]")
|
|
40
|
+
}), a ? null : /* @__PURE__ */ f(r, { basePath: i })] });
|
|
41
|
+
}
|
|
42
|
+
function j() {
|
|
43
|
+
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(M, {}), /* @__PURE__ */ f(A, {})] });
|
|
44
|
+
}
|
|
45
|
+
function M() {
|
|
46
|
+
return /* @__PURE__ */ f(a, {
|
|
47
|
+
fallback: /* @__PURE__ */ f(O, {}),
|
|
48
|
+
children: /* @__PURE__ */ p(u, { children: [
|
|
49
|
+
/* @__PURE__ */ f(l, {
|
|
31
50
|
index: !0,
|
|
32
|
-
element: /* @__PURE__ */
|
|
51
|
+
element: /* @__PURE__ */ f(i, {})
|
|
33
52
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ f(l, {
|
|
35
54
|
path: "ai-assistant",
|
|
36
|
-
element:
|
|
55
|
+
element: k("brainyrich.route.aiAssistant", /* @__PURE__ */ f(g, {}))
|
|
37
56
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ f(l, {
|
|
39
58
|
path: "analytics",
|
|
40
|
-
element:
|
|
59
|
+
element: k("brainyrich.route.analytics", /* @__PURE__ */ f(_, {}))
|
|
41
60
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ f(l, {
|
|
43
62
|
path: "accounts",
|
|
44
|
-
element:
|
|
63
|
+
element: k("brainyrich.route.accounts", /* @__PURE__ */ f(v, {}))
|
|
45
64
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ f(l, {
|
|
47
66
|
path: "family",
|
|
48
|
-
element:
|
|
67
|
+
element: k("brainyrich.route.family", /* @__PURE__ */ f(y, {}))
|
|
49
68
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ f(l, {
|
|
51
70
|
path: "firm",
|
|
52
|
-
element:
|
|
71
|
+
element: k("brainyrich.route.firm", /* @__PURE__ */ f(b, {}))
|
|
53
72
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ f(l, {
|
|
55
74
|
path: "admin/firm",
|
|
56
|
-
element:
|
|
75
|
+
element: k("brainyrich.route.admin.firm", /* @__PURE__ */ f(x, {}))
|
|
57
76
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ f(l, {
|
|
59
78
|
path: "goals",
|
|
60
|
-
element:
|
|
79
|
+
element: k("brainyrich.route.goals", /* @__PURE__ */ f(S, {}))
|
|
61
80
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ f(l, {
|
|
63
82
|
path: "investments",
|
|
64
|
-
element:
|
|
83
|
+
element: k("brainyrich.route.investments", /* @__PURE__ */ f(C, {}))
|
|
65
84
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ f(l, {
|
|
67
86
|
path: "portfolios",
|
|
68
|
-
element:
|
|
87
|
+
element: k("brainyrich.route.portfolios", /* @__PURE__ */ f(w, {}))
|
|
69
88
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ f(l, {
|
|
71
90
|
path: "reports",
|
|
72
|
-
element:
|
|
91
|
+
element: k("brainyrich.route.reports", /* @__PURE__ */ f(T, {}))
|
|
73
92
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ f(l, {
|
|
75
94
|
path: "risk",
|
|
76
|
-
element:
|
|
95
|
+
element: k("brainyrich.route.risk", /* @__PURE__ */ f(E, {}))
|
|
77
96
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ f(l, {
|
|
79
98
|
path: "tax",
|
|
80
|
-
element:
|
|
99
|
+
element: k("brainyrich.route.tax", /* @__PURE__ */ f(D, {}))
|
|
81
100
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ f(l, {
|
|
83
102
|
path: "*",
|
|
84
|
-
element: /* @__PURE__ */
|
|
103
|
+
element: /* @__PURE__ */ f(c, {
|
|
85
104
|
to: "",
|
|
86
105
|
replace: !0
|
|
87
106
|
})
|
|
@@ -90,6 +109,6 @@ function w() {
|
|
|
90
109
|
});
|
|
91
110
|
}
|
|
92
111
|
//#endregion
|
|
93
|
-
export {
|
|
112
|
+
export { j as BrainyRichRoutes };
|
|
94
113
|
|
|
95
114
|
//# sourceMappingURL=BrainyRichRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrainyRichRoutes.js","names":[],"sources":["../../src/brainyrich/BrainyRichRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, type ReactNode } from 'react';\nimport { Navigate, Route, Routes } from 'react-router';\nimport { Loader2 } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { DashboardPage as IndexPage } from './pages/DashboardPage';\n\nconst AiAssistantPage = lazy(() =>\n import('./pages/AiAssistantPage').then((m) => ({ default: m.AiAssistantPage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst AccountsPage = lazy(() =>\n import('./pages/AccountsPage').then((m) => ({ default: m.AccountsPage }))\n);\nconst FamilyPage = lazy(() =>\n import('./pages/FamilyPage').then((m) => ({ default: m.FamilyPage }))\n);\nconst FirmPage = lazy(() => import('./pages/FirmPage').then((m) => ({ default: m.FirmPage })));\nconst AdminFirmPage = lazy(() =>\n import('./pages/AdminFirmPage').then((m) => ({ default: m.AdminFirmPage }))\n);\nconst GoalsPage = lazy(() => import('./pages/GoalsPage').then((m) => ({ default: m.GoalsPage })));\nconst InvestmentsPage = lazy(() =>\n import('./pages/InvestmentsPage').then((m) => ({ default: m.InvestmentsPage }))\n);\nconst PortfoliosPage = lazy(() =>\n import('./pages/PortfoliosPage').then((m) => ({ default: m.PortfoliosPage }))\n);\nconst ReportsPage = lazy(() =>\n import('./pages/ReportsPage').then((m) => ({ default: m.ReportsPage }))\n);\nconst RiskPage = lazy(() => import('./pages/RiskPage').then((m) => ({ default: m.RiskPage })));\nconst TaxPage = lazy(() => import('./pages/TaxPage').then((m) => ({ default: m.TaxPage })));\n\nfunction PageLoader() {\n return (\n <div className=\"flex min-h-[320px] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n );\n}\n\nfunction gatedRoute(flag: string, element: ReactNode) {\n return (\n <FeatureGate flag={flag} fallback={<Navigate to=\"\" replace />} defaultValue>\n {element}\n </FeatureGate>\n );\n}\n\nexport function BrainyRichRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<IndexPage />} />\n <Route\n path=\"ai-assistant\"\n element={gatedRoute('brainyrich.route.aiAssistant', <AiAssistantPage />)}\n />\n <Route\n path=\"analytics\"\n element={gatedRoute('brainyrich.route.analytics', <AnalyticsPage />)}\n />\n <Route\n path=\"accounts\"\n element={gatedRoute('brainyrich.route.accounts', <AccountsPage />)}\n />\n <Route path=\"family\" element={gatedRoute('brainyrich.route.family', <FamilyPage />)} />\n <Route path=\"firm\" element={gatedRoute('brainyrich.route.firm', <FirmPage />)} />\n <Route\n path=\"admin/firm\"\n element={gatedRoute('brainyrich.route.admin.firm', <AdminFirmPage />)}\n />\n <Route path=\"goals\" element={gatedRoute('brainyrich.route.goals', <GoalsPage />)} />\n <Route\n path=\"investments\"\n element={gatedRoute('brainyrich.route.investments', <InvestmentsPage />)}\n />\n <Route\n path=\"portfolios\"\n element={gatedRoute('brainyrich.route.portfolios', <PortfoliosPage />)}\n />\n <Route path=\"reports\" element={gatedRoute('brainyrich.route.reports', <ReportsPage />)} />\n <Route path=\"risk\" element={gatedRoute('brainyrich.route.risk', <RiskPage />)} />\n <Route path=\"tax\" element={gatedRoute('brainyrich.route.tax', <TaxPage />)} />\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrainyRichRoutes.js","names":[],"sources":["../../src/brainyrich/BrainyRichRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, type ReactNode } from 'react';\nimport { Navigate, Route, Routes } from 'react-router';\nimport { Loader2 } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { isInstalledApp } from '@burdenoff/fe-libs/shared/native';\nimport { DashboardPage as IndexPage } from './pages/DashboardPage';\nimport { MobileTabBar } from './components/mobile';\nimport { useIsMobileViewport } from './hooks/useIsMobileViewport';\nimport { useBrainyRich } from './providers/BrainyRichProvider';\nimport { cn } from './utils/cn';\n\nconst AiAssistantPage = lazy(() =>\n import('./pages/AiAssistantPage').then((m) => ({ default: m.AiAssistantPage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst AccountsPage = lazy(() =>\n import('./pages/AccountsPage').then((m) => ({ default: m.AccountsPage }))\n);\nconst FamilyPage = lazy(() =>\n import('./pages/FamilyPage').then((m) => ({ default: m.FamilyPage }))\n);\nconst FirmPage = lazy(() => import('./pages/FirmPage').then((m) => ({ default: m.FirmPage })));\nconst AdminFirmPage = lazy(() =>\n import('./pages/AdminFirmPage').then((m) => ({ default: m.AdminFirmPage }))\n);\nconst GoalsPage = lazy(() => import('./pages/GoalsPage').then((m) => ({ default: m.GoalsPage })));\nconst InvestmentsPage = lazy(() =>\n import('./pages/InvestmentsPage').then((m) => ({ default: m.InvestmentsPage }))\n);\nconst PortfoliosPage = lazy(() =>\n import('./pages/PortfoliosPage').then((m) => ({ default: m.PortfoliosPage }))\n);\nconst ReportsPage = lazy(() =>\n import('./pages/ReportsPage').then((m) => ({ default: m.ReportsPage }))\n);\nconst RiskPage = lazy(() => import('./pages/RiskPage').then((m) => ({ default: m.RiskPage })));\nconst TaxPage = lazy(() => import('./pages/TaxPage').then((m) => ({ default: m.TaxPage })));\n\nfunction PageLoader() {\n return (\n <div className=\"flex min-h-[320px] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n );\n}\n\nfunction gatedRoute(flag: string, element: ReactNode) {\n return (\n <FeatureGate flag={flag} fallback={<Navigate to=\"\" replace />} defaultValue>\n {element}\n </FeatureGate>\n );\n}\n\n/**\n * Phone navigation chrome. Renders the bottom tab bar in the mobile browser\n * (installed apps get the host shell's native tab bar instead) and a scroll\n * spacer so the last card of any page can scroll clear of the floating action\n * button and the fixed bar.\n *\n * The host shell already pads its content by its own tab bar's height, so in\n * an installed app the spacer only clears the floating action button; in the\n * browser it also clears BrainyRich's bar via the height it publishes.\n */\nfunction MobileNavigation() {\n const { basePath = '/' } = useBrainyRich();\n const isMobile = useIsMobileViewport();\n if (!isMobile) return null;\n const installed = isInstalledApp();\n return (\n <>\n <div\n aria-hidden=\"true\"\n data-testid=\"brainyrich-mobile-scroll-spacer\"\n className={cn(\n 'md:hidden',\n installed ? 'h-[4.5rem]' : 'h-[calc(4.5rem+var(--mobile-tabbar-height,4rem))]'\n )}\n />\n {installed ? null : <MobileTabBar basePath={basePath} />}\n </>\n );\n}\n\nexport function BrainyRichRoutes() {\n return (\n <>\n <BrainyRichPageRoutes />\n <MobileNavigation />\n </>\n );\n}\n\nfunction BrainyRichPageRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<IndexPage />} />\n <Route\n path=\"ai-assistant\"\n element={gatedRoute('brainyrich.route.aiAssistant', <AiAssistantPage />)}\n />\n <Route\n path=\"analytics\"\n element={gatedRoute('brainyrich.route.analytics', <AnalyticsPage />)}\n />\n <Route\n path=\"accounts\"\n element={gatedRoute('brainyrich.route.accounts', <AccountsPage />)}\n />\n <Route path=\"family\" element={gatedRoute('brainyrich.route.family', <FamilyPage />)} />\n <Route path=\"firm\" element={gatedRoute('brainyrich.route.firm', <FirmPage />)} />\n <Route\n path=\"admin/firm\"\n element={gatedRoute('brainyrich.route.admin.firm', <AdminFirmPage />)}\n />\n <Route path=\"goals\" element={gatedRoute('brainyrich.route.goals', <GoalsPage />)} />\n <Route\n path=\"investments\"\n element={gatedRoute('brainyrich.route.investments', <InvestmentsPage />)}\n />\n <Route\n path=\"portfolios\"\n element={gatedRoute('brainyrich.route.portfolios', <PortfoliosPage />)}\n />\n <Route path=\"reports\" element={gatedRoute('brainyrich.route.reports', <ReportsPage />)} />\n <Route path=\"risk\" element={gatedRoute('brainyrich.route.risk', <RiskPage />)} />\n <Route path=\"tax\" element={gatedRoute('brainyrich.route.tax', <TaxPage />)} />\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface MobileAppBarProps {
|
|
3
|
+
title: string;
|
|
4
|
+
/** Optional one-line context under the title. */
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
/** Show the BrainyRich product mark before the title (dashboard only). */
|
|
7
|
+
brandMark?: boolean;
|
|
8
|
+
/** Trailing action, typically a single icon button. */
|
|
9
|
+
action?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Page-level top app bar for the phone layout: a large title with an optional
|
|
13
|
+
* product mark and one trailing action, per the BrainyRich mobile mocks. It
|
|
14
|
+
* sits under the host shell's global header (which still owns the menu,
|
|
15
|
+
* search, notifications and avatar), so it only carries page identity.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MobileAppBar: FC<MobileAppBarProps>;
|
|
18
|
+
export interface MobilePageProps extends MobileAppBarProps {
|
|
19
|
+
/** `data-tour` anchor, kept identical to the desktop page's. */
|
|
20
|
+
tourId: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
/** Floating action button rendered above the bottom tab bar. */
|
|
23
|
+
fab?: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Card-first phone page: app bar, a single column of full-width cards and an
|
|
28
|
+
* optional floating action button. Horizontal padding is left to the host
|
|
29
|
+
* shell's content gutter so cards use the full phone width.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MobilePage: FC<MobilePageProps>;
|
|
32
|
+
export interface MobileFabProps {
|
|
33
|
+
label: string;
|
|
34
|
+
icon: ReactNode;
|
|
35
|
+
onClick: () => void;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Extended floating action button for the page's primary create action. It is
|
|
40
|
+
* pinned 1rem above the bottom tab bar (and the device's home indicator) on
|
|
41
|
+
* the right, where a thumb reaches it.
|
|
42
|
+
*/
|
|
43
|
+
export declare const MobileFab: FC<MobileFabProps>;
|
|
44
|
+
//# sourceMappingURL=MobilePage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobilePage.d.ts","sourceRoot":"","sources":["../../../../src/brainyrich/components/mobile/MobilePage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoB9C,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,gEAAgE;IAChE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgB1C,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoBxC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/brainyrich/components/mobile/MobilePage.tsx
|
|
4
|
+
var r = ({ title: e, subtitle: r, brandMark: i, action: a }) => /* @__PURE__ */ n("header", {
|
|
5
|
+
className: "flex items-center justify-between gap-3",
|
|
6
|
+
children: [/* @__PURE__ */ n("div", {
|
|
7
|
+
className: "flex min-w-0 items-center gap-3",
|
|
8
|
+
children: [i ? /* @__PURE__ */ t("span", {
|
|
9
|
+
"aria-hidden": "true",
|
|
10
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-action-primary-bg)] text-sm font-bold text-[var(--color-action-primary-text)]",
|
|
11
|
+
children: "BR"
|
|
12
|
+
}) : null, /* @__PURE__ */ n("div", {
|
|
13
|
+
className: "min-w-0",
|
|
14
|
+
children: [/* @__PURE__ */ t("h1", {
|
|
15
|
+
className: "truncate text-2xl font-semibold tracking-tight text-text-primary",
|
|
16
|
+
children: e
|
|
17
|
+
}), r ? /* @__PURE__ */ t("p", {
|
|
18
|
+
className: "truncate text-xs text-text-secondary",
|
|
19
|
+
children: r
|
|
20
|
+
}) : null]
|
|
21
|
+
})]
|
|
22
|
+
}), a ? /* @__PURE__ */ t("div", {
|
|
23
|
+
className: "shrink-0",
|
|
24
|
+
children: a
|
|
25
|
+
}) : null]
|
|
26
|
+
}), i = ({ tourId: i, children: a, fab: o, className: s, ...c }) => /* @__PURE__ */ n("div", {
|
|
27
|
+
"data-tour": i,
|
|
28
|
+
"data-testid": `${i}-mobile`,
|
|
29
|
+
className: e("space-y-4 py-2", s),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ t(r, { ...c }),
|
|
32
|
+
a,
|
|
33
|
+
o
|
|
34
|
+
]
|
|
35
|
+
}), a = ({ label: t, icon: r, onClick: i, disabled: a }) => /* @__PURE__ */ n("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
onClick: i,
|
|
38
|
+
disabled: a,
|
|
39
|
+
className: e("fixed right-4 z-30 inline-flex h-12 items-center gap-2 rounded-full px-5 text-sm font-semibold md:hidden", "bottom-[calc(1rem+max(var(--mobile-tabbar-height,0px),env(safe-area-inset-bottom,0px)))]", "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]", "shadow-[var(--shadow-float,var(--shadow-elevation-3))]", "motion-safe:transition-transform active:scale-95 disabled:opacity-60", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-action-primary-border)] focus-visible:ring-offset-2"),
|
|
40
|
+
children: [r, t]
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { r as MobileAppBar, a as MobileFab, i as MobilePage };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=MobilePage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobilePage.js","names":[],"sources":["../../../../src/brainyrich/components/mobile/MobilePage.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport interface MobileAppBarProps {\n title: string;\n /** Optional one-line context under the title. */\n subtitle?: string;\n /** Show the BrainyRich product mark before the title (dashboard only). */\n brandMark?: boolean;\n /** Trailing action, typically a single icon button. */\n action?: ReactNode;\n}\n\n/**\n * Page-level top app bar for the phone layout: a large title with an optional\n * product mark and one trailing action, per the BrainyRich mobile mocks. It\n * sits under the host shell's global header (which still owns the menu,\n * search, notifications and avatar), so it only carries page identity.\n */\nexport const MobileAppBar: FC<MobileAppBarProps> = ({ title, subtitle, brandMark, action }) => (\n <header className=\"flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-3\">\n {brandMark ? (\n <span\n aria-hidden=\"true\"\n className=\"flex size-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-action-primary-bg)] text-sm font-bold text-[var(--color-action-primary-text)]\"\n >\n BR\n </span>\n ) : null}\n <div className=\"min-w-0\">\n <h1 className=\"truncate text-2xl font-semibold tracking-tight text-text-primary\">\n {title}\n </h1>\n {subtitle ? <p className=\"truncate text-xs text-text-secondary\">{subtitle}</p> : null}\n </div>\n </div>\n {action ? <div className=\"shrink-0\">{action}</div> : null}\n </header>\n);\n\nexport interface MobilePageProps extends MobileAppBarProps {\n /** `data-tour` anchor, kept identical to the desktop page's. */\n tourId: string;\n children: ReactNode;\n /** Floating action button rendered above the bottom tab bar. */\n fab?: ReactNode;\n className?: string;\n}\n\n/**\n * Card-first phone page: app bar, a single column of full-width cards and an\n * optional floating action button. Horizontal padding is left to the host\n * shell's content gutter so cards use the full phone width.\n */\nexport const MobilePage: FC<MobilePageProps> = ({\n tourId,\n children,\n fab,\n className,\n ...appBar\n}) => (\n <div\n data-tour={tourId}\n data-testid={`${tourId}-mobile`}\n className={cn('space-y-4 py-2', className)}\n >\n <MobileAppBar {...appBar} />\n {children}\n {fab}\n </div>\n);\n\nexport interface MobileFabProps {\n label: string;\n icon: ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n\n/**\n * Extended floating action button for the page's primary create action. It is\n * pinned 1rem above the bottom tab bar (and the device's home indicator) on\n * the right, where a thumb reaches it.\n */\nexport const MobileFab: FC<MobileFabProps> = ({ label, icon, onClick, disabled }) => (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className={cn(\n 'fixed right-4 z-30 inline-flex h-12 items-center gap-2 rounded-full px-5 text-sm font-semibold md:hidden',\n // Clears whichever bottom tab bar is showing (BrainyRich's own in the\n // browser, the host shell's in an installed app; both publish\n // --mobile-tabbar-height) and the device's home indicator.\n 'bottom-[calc(1rem+max(var(--mobile-tabbar-height,0px),env(safe-area-inset-bottom,0px)))]',\n 'bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]',\n 'shadow-[var(--shadow-float,var(--shadow-elevation-3))]',\n 'motion-safe:transition-transform active:scale-95 disabled:opacity-60',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-action-primary-border)] focus-visible:ring-offset-2'\n )}\n >\n {icon}\n {label}\n </button>\n);\n"],"mappings":";;;AAmBA,IAAa,KAAuC,EAAE,UAAO,aAAU,cAAW,gBAChF,kBAAC,UAAD;CAAQ,WAAU;WAAlB,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACG,IACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;aACX;EAEK,CAAA,IACJ,MACJ,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cACX;GACC,CAAA,GACH,IAAW,kBAAC,KAAD;IAAG,WAAU;cAAwC;GAAY,CAAA,IAAI,IAC9E;IACF;KACJ,IAAS,kBAAC,OAAD;EAAK,WAAU;YAAY;CAAY,CAAA,IAAI,IAC/C;IAiBG,KAAmC,EAC9C,WACA,aACA,QACA,cACA,GAAG,QAEH,kBAAC,OAAD;CACE,aAAW;CACX,eAAa,GAAG,EAAO;CACvB,WAAW,EAAG,kBAAkB,CAAS;WAH3C;EAKE,kBAAC,GAAD,EAAc,GAAI,EAAS,CAAA;EAC1B;EACA;CACE;IAeM,KAAiC,EAAE,UAAO,SAAM,YAAS,kBACpE,kBAAC,UAAD;CACE,MAAK;CACI;CACC;CACV,WAAW,EACT,4GAIA,4FACA,+EACA,0DACA,wEACA,qIACF;WAdF,CAgBG,GACA,CACK"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* CSS custom property shared with the fe-libs host chrome. Only one bar ever
|
|
4
|
+
* writes it: BrainyRich's bar renders solely outside installed apps, and the
|
|
5
|
+
* host shell's bar solely inside them, which cannot change mid-session.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TABBAR_HEIGHT_VAR = "--mobile-tabbar-height";
|
|
8
|
+
/**
|
|
9
|
+
* Whether `pathname` is inside the section rooted at `target`. The dashboard
|
|
10
|
+
* is the index route, so it only matches exactly; every other section also
|
|
11
|
+
* owns its nested routes (e.g. `admin/firm` is not under `firm`, but
|
|
12
|
+
* `goals/123` would be under `goals`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isSectionActive(pathname: string, target: string, exact: boolean): boolean;
|
|
15
|
+
export interface MobileTabBarProps {
|
|
16
|
+
/** Base path the MFE is mounted under (e.g. `/brainyrich`). */
|
|
17
|
+
basePath: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const MobileTabBar: FC<MobileTabBarProps>;
|
|
20
|
+
//# sourceMappingURL=MobileTabBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileTabBar.d.ts","sourceRoot":"","sources":["../../../../src/brainyrich/components/mobile/MobileTabBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAA8C,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAc5F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AA0C1D;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAKzF;AAKD,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA0H9C,CAAC"}
|