@pfm-platform/accounts-ui-mui 0.1.1 → 0.2.0

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/index.cjs CHANGED
@@ -7,6 +7,13 @@ var jsxRuntime = require('react/jsx-runtime');
7
7
  var react = require('react');
8
8
  var iconsMaterial = require('@mui/icons-material');
9
9
  var LineChart = require('@mui/x-charts/LineChart');
10
+ var AccountBalanceWalletIcon = require('@mui/icons-material/AccountBalanceWallet');
11
+ var AddIcon = require('@mui/icons-material/Add');
12
+
13
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
+
15
+ var AccountBalanceWalletIcon__default = /*#__PURE__*/_interopDefault(AccountBalanceWalletIcon);
16
+ var AddIcon__default = /*#__PURE__*/_interopDefault(AddIcon);
10
17
 
11
18
  // src/components/AccountList.tsx
12
19
  function AccountList({
@@ -699,6 +706,114 @@ function AccountBalanceChart({
699
706
  }
700
707
  );
701
708
  }
709
+ function AccountsEmptyState({
710
+ onAddAccount,
711
+ title = "No Accounts Yet",
712
+ message = "Get started by adding your first account to track your finances.",
713
+ minHeight = 400
714
+ }) {
715
+ return /* @__PURE__ */ jsxRuntime.jsxs(
716
+ material.Box,
717
+ {
718
+ "data-testid": "accounts-empty-state",
719
+ sx: {
720
+ minHeight,
721
+ height: "100%",
722
+ width: "100%",
723
+ display: "flex",
724
+ flexDirection: "column",
725
+ alignItems: "center",
726
+ justifyContent: "center",
727
+ gap: 3,
728
+ py: 6,
729
+ px: 2
730
+ },
731
+ children: [
732
+ /* @__PURE__ */ jsxRuntime.jsx(
733
+ AccountBalanceWalletIcon__default.default,
734
+ {
735
+ sx: {
736
+ fontSize: 80,
737
+ color: "primary.main",
738
+ opacity: 0.6
739
+ },
740
+ "aria-hidden": "true"
741
+ }
742
+ ),
743
+ /* @__PURE__ */ jsxRuntime.jsx(
744
+ material.Typography,
745
+ {
746
+ variant: "h5",
747
+ component: "h2",
748
+ color: "text.primary",
749
+ sx: { fontWeight: "medium" },
750
+ children: title
751
+ }
752
+ ),
753
+ /* @__PURE__ */ jsxRuntime.jsx(
754
+ material.Typography,
755
+ {
756
+ variant: "body1",
757
+ color: "text.secondary",
758
+ align: "center",
759
+ sx: { maxWidth: 480, px: 2 },
760
+ children: message
761
+ }
762
+ ),
763
+ /* @__PURE__ */ jsxRuntime.jsxs(
764
+ material.Box,
765
+ {
766
+ sx: {
767
+ display: "flex",
768
+ flexDirection: "column",
769
+ gap: 1,
770
+ mt: 1,
771
+ mb: 2
772
+ },
773
+ children: [
774
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "body2", color: "text.secondary", sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
775
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: { color: "success.main", fontWeight: "bold" }, children: "\u2713" }),
776
+ "Track checking, savings, and credit card accounts"
777
+ ] }),
778
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "body2", color: "text.secondary", sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
779
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: { color: "success.main", fontWeight: "bold" }, children: "\u2713" }),
780
+ "Monitor your net worth over time"
781
+ ] }),
782
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "body2", color: "text.secondary", sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
783
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { component: "span", sx: { color: "success.main", fontWeight: "bold" }, children: "\u2713" }),
784
+ "View account balances and transaction history"
785
+ ] })
786
+ ]
787
+ }
788
+ ),
789
+ onAddAccount && /* @__PURE__ */ jsxRuntime.jsx(
790
+ material.Button,
791
+ {
792
+ variant: "contained",
793
+ color: "primary",
794
+ size: "large",
795
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(AddIcon__default.default, {}),
796
+ onClick: onAddAccount,
797
+ "aria-label": "Add your first account",
798
+ sx: {
799
+ mt: 2,
800
+ px: 4,
801
+ py: 1.5,
802
+ fontSize: "1rem",
803
+ fontWeight: "medium",
804
+ textTransform: "none",
805
+ boxShadow: 2,
806
+ "&:hover": {
807
+ boxShadow: 4
808
+ }
809
+ },
810
+ children: "Add Your First Account"
811
+ }
812
+ )
813
+ ]
814
+ }
815
+ );
816
+ }
702
817
  function NetWorthSummary({
703
818
  userId,
704
819
  title = "Net Worth Summary",
@@ -2077,6 +2192,7 @@ exports.AccountDeleteButton = AccountDeleteButton;
2077
2192
  exports.AccountEditForm = AccountEditForm;
2078
2193
  exports.AccountList = AccountList;
2079
2194
  exports.AccountSummary = AccountSummary;
2195
+ exports.AccountsEmptyState = AccountsEmptyState;
2080
2196
  exports.NetWorthAccountDeleteButton = NetWorthAccountDeleteButton;
2081
2197
  exports.NetWorthAccountEnhancedForm = NetWorthAccountEnhancedForm;
2082
2198
  exports.NetWorthAccountForm = NetWorthAccountForm;