@mx-cartographer/experiences 9.4.70 → 9.5.0-alpha.al0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -0
  3. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.es.js +2 -2
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.es.js.map +1 -1
  5. package/dist/core/types/Insights.d.ts +8 -0
  6. package/dist/debts/components/DebtsTable.es.js +2 -2
  7. package/dist/debts/components/DebtsTable.es.js.map +1 -1
  8. package/dist/finstrong/components/ManageDOB.es.js +1 -1
  9. package/dist/finstrong/components/ManageDOB.es.js.map +1 -1
  10. package/dist/finstrong/components/onboarding/OnboardingBirthday.es.js +1 -1
  11. package/dist/finstrong/components/onboarding/OnboardingBirthday.es.js.map +1 -1
  12. package/dist/goals/components/actions/BirthdayAction.es.js +1 -1
  13. package/dist/goals/components/actions/BirthdayAction.es.js.map +1 -1
  14. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.d.ts +16 -0
  15. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js +24 -0
  16. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.es.js.map +1 -0
  17. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/index.d.ts +1 -0
  18. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.d.ts +28 -0
  19. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js +63 -0
  20. package/dist/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.es.js.map +1 -0
  21. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
  22. package/dist/insights-v2/components/AccountHeroCard.d.ts +7 -1
  23. package/dist/insights-v2/components/AccountHeroCard.es.js +6 -7
  24. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  25. package/dist/insights-v2/components/DirectDepositCard.d.ts +48 -0
  26. package/dist/insights-v2/components/DirectDepositCard.es.js +37 -0
  27. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -0
  28. package/dist/insights-v2/components/TransferLogoCard.d.ts +5 -0
  29. package/dist/insights-v2/components/TransferLogoCard.es.js +37 -55
  30. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  31. package/dist/insights-v2/components/shared/ConfettiOverlay.d.ts +1 -0
  32. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js +27 -0
  33. package/dist/insights-v2/components/shared/ConfettiOverlay.es.js.map +1 -0
  34. package/dist/insights-v2/index.d.ts +1 -0
  35. package/dist/insights-v2/index.es.js +70 -66
  36. package/dist/insights-v2/mappings/blocks.es.js +34 -32
  37. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  38. package/dist/investments/components/HoldingTable.es.js +1 -1
  39. package/dist/investments/components/HoldingTable.es.js.map +1 -1
  40. package/dist/recurringtransactions/components/PaymentSchedule.es.js +1 -1
  41. package/dist/recurringtransactions/components/PaymentSchedule.es.js.map +1 -1
  42. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceCalendar.es.js +1 -1
  43. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceCalendar.es.js.map +1 -1
  44. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.d.ts +1 -1
  45. package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js.map +1 -1
  46. package/dist/settings/components/notifications/AccountProfileListItem.es.js +10 -10
  47. package/dist/settings/components/notifications/AccountProfileListItem.es.js.map +1 -1
  48. package/dist/settings/components/profile/ProfileTab.es.js +22 -22
  49. package/dist/settings/components/profile/ProfileTab.es.js.map +1 -1
  50. package/dist/transactions/components/shared/TransactionTable.es.js +2 -2
  51. package/dist/transactions/components/shared/TransactionTable.es.js.map +1 -1
  52. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +1 -1
  53. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js.map +1 -1
  54. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +2 -9
  55. package/dist/trends/components/trendstable/AccessibleSortIcon.es.js +19 -20
  56. package/dist/trends/components/trendstable/AccessibleSortIcon.es.js.map +1 -1
  57. package/dist/trends/components/trendstable/TrendsTable.es.js +2 -2
  58. package/dist/trends/components/trendstable/TrendsTable.es.js.map +1 -1
  59. package/package.json +17 -6
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [9.5.0] - 10-09-2026
2
+
3
+ - **CHANGED** - Date pickers and data grids now use MUI X v8, the same version as mxui, which fixes the empty From and To fields in the small-screen date range picker MEW-4216
4
+ - **CHANGED** - MUI X is now a peer dependency, so the app provides the one copy that experiences and mxui share MEW-4216
5
+
6
+ ## [9.4.71] - 10-09-2026
7
+
8
+ - **CHANGED** - `DirectDepositVariant` (`DirectDepositBlock/layout.ts`) is now a single `directDepositVariant` const object used both as the runtime value and as the source for the derived `DirectDepositVariant` type, so a variant name only needs to change in one place; `getLayoutConfig`'s keys are computed properties off that object instead of retyped literals (WEC-1875)
9
+ - **FIXED** - `DirectDepositBlockBeats.ts` fixture typed its `insights_payload` per-JSON-literal, which broke `primary_cta` access for the `DirectDepositComplete` variant (no CTA on that beat) with a `TS2339` typecheck error; `insights_payload` is now cast to the real `InsightsPayload` type (matching `TransactionBlockBeats.ts`'s pattern), which already models `primary_cta` as optional (WEC-1875)
10
+ - **CHANGED** - `DirectDepositBlockPayload.json` fixture's `instance_slot.variant` values switched to snake_case (WEC-1875)
11
+ - **CHANGED** - Extracted `ConfettiOverlay` (`src/insights-v2/components/shared/ConfettiOverlay.tsx`) as a shared component, used by both `DirectDepositCard` and `TransferLogoCard` instead of each defining its own (WEC-1875)
12
+
1
13
  ## [9.4.70] - 10-09-2026
2
14
 
3
15
  - **ADDED** - `PrimaryCTA` / `SecondaryCTA` accept a backend-described `metadata` object (`event`, `action`, `payload`); on press the CTA runner posts that message to the host after the step's handler and effects succeed, so per-insight post messages no longer need frontend code (WEC-1852)
package/README.md CHANGED
@@ -53,6 +53,8 @@ Install the library using yarn:
53
53
  yarn add @mx-cartographer/experiences
54
54
  ```
55
55
 
56
+ Your app must also install the MUI X packages at the versions listed under `peerDependencies` in `package.json`. experiences, mxui, and your app then share one copy. The data grid packages are needed only for widgets that show a table.
57
+
56
58
  The QA storybook containing the latest Experience changes is [accessible here](https://experiences.kube.qa.internal.mx/?path=/docs/experiences-introduction--docs).
57
59
 
58
60
  ## Usage
@@ -11,7 +11,7 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
11
11
  import { alpha as E } from "@mui/material/styles";
12
12
  import V from "@mui/material/TextField";
13
13
  import d from "@mui/material/MenuItem";
14
- import { AdapterDateFns as k } from "@mui/x-date-pickers/AdapterDateFnsV3";
14
+ import { AdapterDateFns as k } from "@mui/x-date-pickers/AdapterDateFns";
15
15
  import { DateCalendar as T } from "@mui/x-date-pickers/DateCalendar";
16
16
  import _ from "@mui/material/FormControl";
17
17
  import B from "@mui/material/InputLabel";
@@ -63,7 +63,7 @@ var $ = ({ field: e, isOpen: h, onClose: b }) => {
63
63
  maxDate: w(/* @__PURE__ */ new Date(), 1),
64
64
  minDate: /* @__PURE__ */ new Date(),
65
65
  onChange: (t) => {
66
- a[e.name] && Number(a[e.name]) <= 31 ? o(t.getDate()) : o(t);
66
+ t && (a[e.name] && Number(a[e.name]) <= 31 ? o(t.getDate()) : o(t));
67
67
  },
68
68
  sx: {
69
69
  "& .MuiPickersDay-today": { color: "primary.lighter" },
@@ -1 +1 @@
1
- {"version":3,"file":"AccountDetailEdit.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { addMonths } from 'date-fns/addMonths'\nimport { alpha } from '@mui/material/styles'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport { LocalizationProvider } from '@mui/x-date-pickers-pro'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport TextField from '@mui/material/TextField'\n\nimport { CurrencyInput, Dialog, useAccountStore, useGlobalCopyStore } from '../../../../common'\nimport { type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { FieldType } from '../../../constants/Accounts'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ninterface AccountDetailEditProps {\n field: AccountField\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailEdit: React.FC<AccountDetailEditProps> = ({ field, isOpen, onClose }) => {\n const { updateAccount } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const [editedValue, setEditedValue] = React.useState<any>(account[field.name])\n const [errorMessage, setErrorMessage] = React.useState('')\n const [hasValidCurrencyInput, setHasValidCurrencyInput] = React.useState(true)\n\n const handleClose = () => {\n setEditedValue('')\n setErrorMessage('')\n onClose()\n }\n\n const getEditableField = () => {\n switch (field.type) {\n case FieldType.Select: {\n return (\n <FormControl fullWidth={true}>\n <InputLabel id={`${field.label}-select-label`}>{field.label}</InputLabel>\n <Select\n displayEmpty={true}\n id={`${field.label}-select`}\n label={field.label}\n labelId={`${field.label}-select-label`}\n onChange={(e) => setEditedValue(e.target.value)}\n slotProps={{\n input: {\n sx: {\n backgroundColor: 'background.paper',\n },\n },\n }}\n value={editedValue}\n >\n {!editedValue && (\n <MenuItem disabled={true} value=\"\">\n {field.placeholder}\n </MenuItem>\n )}\n {field.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n }\n\n case FieldType.Currency: {\n return (\n <CurrencyInput\n amount={(editedValue as string | number) || ''}\n ariaLabel={field.placeholder}\n fullWidth={true}\n label={field.label}\n placeholder={field.placeholder}\n setAmount={setEditedValue}\n setHasValidInput={setHasValidCurrencyInput}\n />\n )\n }\n\n case FieldType.Date: {\n return (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={addMonths(new Date(), 1)}\n minDate={new Date()}\n onChange={(date: Date) => {\n if (account[field.name] && Number(account[field.name]) <= 31) {\n // gets and sets the day of the month to editedValue\n setEditedValue(date.getDate())\n } else {\n // the day of the month was already passed, so we set it directly to state\n setEditedValue(date)\n }\n }}\n sx={{\n '& .MuiPickersDay-today': {\n color: 'primary.lighter',\n },\n '& .MuiPickersArrowSwitcher-button': {\n color: 'primary.lighter',\n '&:hover': {\n backgroundColor: (theme) => alpha(theme.palette.primary.light, 0.1),\n },\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n )\n }\n\n default: {\n return (\n <TextField\n defaultValue={account[field.name]}\n error={!!errorMessage}\n fullWidth={true}\n helperText={errorMessage}\n onChange={updateField}\n placeholder={field.placeholder}\n slotProps={{\n htmlInput: {\n 'aria-label': field.placeholder,\n },\n }}\n />\n )\n }\n }\n }\n\n const saveField = () => {\n // prevents any unnecessary api calls\n if (account[field.name] !== editedValue) {\n updateAccount({\n ...account,\n [field.name]: editedValue,\n })\n }\n handleClose()\n }\n\n const updateField = (e: React.ChangeEvent<HTMLInputElement>) => {\n setEditedValue(e.target.value)\n\n if (field.validation) {\n setErrorMessage(field.validation(e.target.value))\n }\n }\n\n return (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_aria,\n title: buildDynamicCopy(accountsCopy.edit_field, field.label) as string,\n }}\n disablePrimaryButton={!!errorMessage || !hasValidCurrencyInput}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={saveField}\n primaryText={accountsCopy.save}\n sx={{\n '& .MuiButton-root:focus-visible, & .MuiButton-root:focus': {\n outline: '2px solid',\n outlineColor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c,EAAM,YACtB,EACF;AAAA,QACD,CAAA;AAAA,IAGP;AAAA,EACF,GAEM,IAAA,MAAkB;AAEtB,IAAI,EAAQ,EAAM,IAAA,MAAU,KAC1B,EAAc;AAAA,MACZ,GAAG;AAAA,MACF,CAAA,EAAM,IAAA,GAAO;AAAA,IAChB,CAAC,GAEH,EAAY;AAAA,EACd,GAEM,IAAA,CAAe,MAA2C;AAC9D,IAAA,EAAe,EAAE,OAAO,KAAK,GAEzB,EAAM,cACR,EAAgB,EAAM,WAAW,EAAE,OAAO,KAAK,CAAC;AAAA,EAEpD;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM;AAAA,MACJ,YAAY,EAAa;AAAA,MACzB,OAAO,EAAiB,EAAa,YAAY,EAAM,KAAK;AAAA,IAC9D;AAAA,IACA,sBAAsB,CAAC,CAAC,KAAgB,CAAC;AAAA,IACjC,QAAA;AAAA,IACR,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,aAAa,EAAa;AAAA,IAC1B,IAAI,EACF,4DAA4D;AAAA,MAC1D,SAAS;AAAA,MACT,cAAc;AAAA,MACd,eAAe;AAAA,IACjB,EACF;AAAA,IAEC,UAAA,EAAiB;AAAA,EACZ,CAAA;AAEZ,GAEA,KAAe,EAAS,CAAiB"}
1
+ {"version":3,"file":"AccountDetailEdit.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { addMonths } from 'date-fns/addMonths'\nimport { alpha } from '@mui/material/styles'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport { LocalizationProvider } from '@mui/x-date-pickers-pro'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport TextField from '@mui/material/TextField'\n\nimport { CurrencyInput, Dialog, useAccountStore, useGlobalCopyStore } from '../../../../common'\nimport { type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { FieldType } from '../../../constants/Accounts'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ninterface AccountDetailEditProps {\n field: AccountField\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailEdit: React.FC<AccountDetailEditProps> = ({ field, isOpen, onClose }) => {\n const { updateAccount } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const [editedValue, setEditedValue] = React.useState<any>(account[field.name])\n const [errorMessage, setErrorMessage] = React.useState('')\n const [hasValidCurrencyInput, setHasValidCurrencyInput] = React.useState(true)\n\n const handleClose = () => {\n setEditedValue('')\n setErrorMessage('')\n onClose()\n }\n\n const getEditableField = () => {\n switch (field.type) {\n case FieldType.Select: {\n return (\n <FormControl fullWidth={true}>\n <InputLabel id={`${field.label}-select-label`}>{field.label}</InputLabel>\n <Select\n displayEmpty={true}\n id={`${field.label}-select`}\n label={field.label}\n labelId={`${field.label}-select-label`}\n onChange={(e) => setEditedValue(e.target.value)}\n slotProps={{\n input: {\n sx: {\n backgroundColor: 'background.paper',\n },\n },\n }}\n value={editedValue}\n >\n {!editedValue && (\n <MenuItem disabled={true} value=\"\">\n {field.placeholder}\n </MenuItem>\n )}\n {field.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n }\n\n case FieldType.Currency: {\n return (\n <CurrencyInput\n amount={(editedValue as string | number) || ''}\n ariaLabel={field.placeholder}\n fullWidth={true}\n label={field.label}\n placeholder={field.placeholder}\n setAmount={setEditedValue}\n setHasValidInput={setHasValidCurrencyInput}\n />\n )\n }\n\n case FieldType.Date: {\n return (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={addMonths(new Date(), 1)}\n minDate={new Date()}\n onChange={(date: Date | null) => {\n if (!date) return\n if (account[field.name] && Number(account[field.name]) <= 31) {\n // gets and sets the day of the month to editedValue\n setEditedValue(date.getDate())\n } else {\n // the day of the month was already passed, so we set it directly to state\n setEditedValue(date)\n }\n }}\n sx={{\n '& .MuiPickersDay-today': {\n color: 'primary.lighter',\n },\n '& .MuiPickersArrowSwitcher-button': {\n color: 'primary.lighter',\n '&:hover': {\n backgroundColor: (theme) => alpha(theme.palette.primary.light, 0.1),\n },\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n )\n }\n\n default: {\n return (\n <TextField\n defaultValue={account[field.name]}\n error={!!errorMessage}\n fullWidth={true}\n helperText={errorMessage}\n onChange={updateField}\n placeholder={field.placeholder}\n slotProps={{\n htmlInput: {\n 'aria-label': field.placeholder,\n },\n }}\n />\n )\n }\n }\n }\n\n const saveField = () => {\n // prevents any unnecessary api calls\n if (account[field.name] !== editedValue) {\n updateAccount({\n ...account,\n [field.name]: editedValue,\n })\n }\n handleClose()\n }\n\n const updateField = (e: React.ChangeEvent<HTMLInputElement>) => {\n setEditedValue(e.target.value)\n\n if (field.validation) {\n setErrorMessage(field.validation(e.target.value))\n }\n }\n\n return (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_aria,\n title: buildDynamicCopy(accountsCopy.edit_field, field.label) as string,\n }}\n disablePrimaryButton={!!errorMessage || !hasValidCurrencyInput}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={saveField}\n primaryText={accountsCopy.save}\n sx={{\n '& .MuiButton-root:focus-visible, & .MuiButton-root:focus': {\n outline: '2px solid',\n outlineColor: 'primary.main',\n outlineOffset: '2px',\n },\n }}\n >\n {getEditableField()}\n </Dialog>\n )\n}\n\nexport default observer(AccountDetailEdit)\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,IAAM,IAAA,CAAuD,EAAE,OAAA,GAAO,QAAA,GAAQ,SAAA,EAAA,MAAc;AAC1F,QAAM,E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EAAY;AAAA,EACd,GAEM,IAAA,CAAe,MAA2C;AAC9D,IAAA,EAAe,EAAE,OAAO,KAAK,GAEzB,EAAM,cACR,EAAgB,EAAM,WAAW,EAAE,OAAO,KAAK,CAAC;AAAA,EAEpD;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM;AAAA,MACJ,YAAY,EAAa;AAAA,MACzB,OAAO,EAAiB,EAAa,YAAY,EAAM,KAAK;AAAA,IAC9D;AAAA,IACA,sBAAsB,CAAC,CAAC,KAAgB,CAAC;AAAA,IACjC,QAAA;AAAA,IACR,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,aAAa,EAAa;AAAA,IAC1B,IAAI,EACF,4DAA4D;AAAA,MAC1D,SAAS;AAAA,MACT,cAAc;AAAA,MACd,eAAe;AAAA,IACjB,EACF;AAAA,IAEC,UAAA,EAAiB;AAAA,EACZ,CAAA;AAEZ,GAEA,KAAe,EAAS,CAAiB"}
@@ -253,4 +253,12 @@ export interface InstanceSlot {
253
253
  * from `InsightsPayload.instance_slot_data` instead and leave this absent.
254
254
  */
255
255
  data_series?: InstanceSlotRow[];
256
+ /** Primary line on the hero card, e.g. "Epic Bank Checking, *1234". */
257
+ account_name?: string;
258
+ /** Secondary line beneath the name, e.g. "Checking Account" / "Credit Card". */
259
+ account_type?: string;
260
+ /** Status pill label, e.g. "Direct Deposit Not Set Up" / "Interest Rate: 19.99% APR". */
261
+ status_text?: string;
262
+ institution_guid?: string;
263
+ institution_name?: string;
256
264
  }
@@ -163,10 +163,10 @@ var oe = ({ sx: _ = {}, debts: d, hoveredDebtGuid: C, onHoverRow: m, onClickRow:
163
163
  },
164
164
  rows: f,
165
165
  slotProps: {
166
- baseIconButton: {
166
+ baseIconButton: { material: {
167
167
  color: "secondary",
168
168
  sx: { ml: 8 }
169
- },
169
+ } },
170
170
  row: {
171
171
  onMouseEnter: T,
172
172
  onMouseLeave: () => !r && m?.(""),
@@ -1 +1 @@
1
- {"version":3,"file":"DebtsTable.es.js","names":[],"sources":["../../../src/debts/components/DebtsTable.tsx"],"sourcesContent":["import React from 'react'\nimport { Stack, useTheme } from '@mui/material'\nimport { DataGridPro, GridColDef, GridSortModel } from '@mui/x-data-grid-pro'\nimport Box from '@mui/material/Box'\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport { ANALYTICS_EVENTS, useEvent, useGlobalCopyStore, useScreenSize } from '../../common'\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\n\nimport { DebtChartData } from '../../core/utils/DebtUtils'\nimport { getPriorityValue, priorityComparator } from '../utils/DebtsTable'\nimport { HeaderCell } from '../../trends/components/trendstable/HeaderCell'\nimport { PriorityCell } from './debtstable/PriorityCell'\nimport { AccountCell } from './debtstable/AccountCell'\nimport { formatCurrency } from '../../core/utils/NumberFormatting'\n\ninterface DebtsTableProps {\n sx?: any\n debts: DebtChartData[]\n hoveredDebtGuid: string\n onHoverRow: (debtGuid: string) => void\n onClickRow: () => void\n}\n\nexport const DebtsTable: React.FC<DebtsTableProps> = ({\n sx = {},\n debts,\n hoveredDebtGuid,\n onHoverRow,\n onClickRow,\n}) => {\n const theme = useTheme()\n const { onEvent } = useEvent()\n const { isMobile } = useScreenSize()\n const { debts: copy, common: commonCopy } = useGlobalCopyStore()\n\n const [sortModel, setSortModel] = React.useState<GridSortModel>([\n { field: 'priority', sort: 'asc' },\n ])\n\n const desktopColumns: GridColDef[] = [\n {\n field: 'priority',\n headerName: copy.table_column_priority,\n renderHeader: HeaderCell,\n renderCell: PriorityCell,\n sortComparator: priorityComparator,\n sortable: true,\n hideSortIcons: true,\n type: 'custom',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 67 : 72,\n flex: isMobile ? 0.2 : 0.4,\n },\n {\n field: 'account',\n headerName: copy.table_column_account,\n renderHeader: HeaderCell,\n renderCell: AccountCell,\n sortable: false,\n type: 'custom',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 180 : 225,\n flex: 1,\n },\n {\n field: 'balance',\n headerName: copy.table_column_balance,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {formatCurrency(params.value, '0,0')}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 70 : 122,\n flex: isMobile ? 0.4 : 0.6,\n },\n {\n field: 'interest_rate',\n headerName: copy.details_interest_rate,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {typeof params.value === 'number' ? `${Number(params.value).toFixed(2)}%` : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n {\n field: 'projected_payoff_date',\n headerName: copy.table_column_payoff_date,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {params.value ? formatDate(params.value, DATE_FORMATS_INTL.MONTH_SHORT_YEAR) : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n {\n field: 'monthly_payment',\n headerName: copy.table_column_amount_due,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {typeof params.value === 'number' ? formatCurrency(params.value, '0,0') : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n ]\n\n const mobileColumns: GridColDef[] = [\n ...desktopColumns.slice(0, 3),\n {\n field: 'chevron',\n headerClassName: 'chevron-header',\n headerName: '',\n renderCell: () => (\n <Stack aria-label={commonCopy.see_details} role=\"button\">\n <Icon name=\"chevron_right\" />\n </Stack>\n ),\n sortable: false,\n hideSortIcons: true,\n type: 'custom',\n align: 'right',\n headerAlign: 'right',\n width: 20,\n },\n ]\n\n const rows = React.useMemo(() => {\n return debts.map((debt, idx) => ({\n ...debt,\n id: idx,\n priority: getPriorityValue(debt),\n }))\n }, [debts])\n\n const handleRowHover = (\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,\n ) => {\n const target = event.target as HTMLElement\n const rowEl = target.closest('[data-id]')\n const debtIdx = rowEl?.getAttribute('data-id')\n const hoveredDebt = debts[Number(debtIdx)]\n onHoverRow?.(hoveredDebt?.guid ?? '')\n }\n\n const onMouseEnterRow = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n // Only use hover on non-mobile devices\n if (!isMobile) {\n handleRowHover(event)\n }\n }\n\n const onRowInteraction = (\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,\n ) => {\n // For mobile devices, use touch/click to highlight row\n if (isMobile) {\n handleRowHover(event)\n }\n }\n\n const getRowIdByGuid = (guid: string) => {\n return rows.find((r) => r.guid === guid)?.id\n }\n\n return (\n <Box\n sx={{\n height: 'auto',\n width: '100%',\n mt: '15px',\n overflowX: 'auto',\n overflowY: 'visible',\n boxShadow: 'none',\n ...sx,\n }}\n >\n <DataGridPro\n columns={isMobile ? mobileColumns : desktopColumns}\n disableColumnFilter={true}\n disableColumnMenu={true}\n hideFooter={true}\n initialState={{ sorting: { sortModel } }}\n onRowClick={(params) => {\n onClickRow()\n onEvent(ANALYTICS_EVENTS.DEBTS_CLICK_TABLE_ROW, { account_guid: params.row.guid })\n }}\n onSortModelChange={(newModel) => {\n setSortModel(newModel)\n onEvent(ANALYTICS_EVENTS.DEBTS_CLICK_TABLE_SORT)\n }}\n rows={rows}\n slotProps={{\n baseIconButton: { color: 'secondary', sx: { ml: 8 } },\n row: {\n onMouseEnter: onMouseEnterRow,\n onMouseLeave: () => !isMobile && onHoverRow?.(''),\n onTouchStart: onRowInteraction,\n onClick: isMobile ? onRowInteraction : undefined,\n },\n }}\n sortModel={sortModel}\n sortingOrder={['asc', 'desc']}\n sx={{\n '& .chevron-header': { display: 'none' },\n [`& .MuiDataGrid-row[data-id=\"${getRowIdByGuid(hoveredDebtGuid)}\"]`]: {\n backgroundColor: theme.palette.mode === 'light' ? '#f8f9fb' : '#1f2329',\n filter: 'brightness(98%)',\n },\n }}\n />\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,IAAa,KAAA,CAAyC,EACpD,IAAA,IAAK,CAAC,GACN,OAAA,GACA,iBAAA,GACA,YAAA,GACA,YAAA,EAAA,MACI;AACJ,QAAM,IAAQ,EAAS,GACjB,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,UAAA,EAAA,IAAa,EAAc,GAC7B,EAAE,OAAO,GAAM,QAAQ,EAAA,IAAe,EAAmB,GAEzD,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAwB,CAC9D;AAAA,IAAE,OAAO;AAAA,IAAY,MAAM;AAAA,EAAM,CACnC,CAAC,GAEK,IAA+B;AAAA,IACnC;AAAA,MACE,OAAO;AAAA,MACP,YAAY,EAAK;AAAA,MACjB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,eAAe;AAAA,MACf,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,UAAU,IAAW,KAAK;AAAA,MAC1B,MAAM,IAAW,MAAM;AAAA,IACzB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,YAAY,EAAK;AAAA,MACjB,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,UAAU,IAAW,MAAM;AAAA,MAC3B,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,YAAY,EAAK;AAAA,MACjB,cAAc;AAAA,MACd,YAAA,CAAa,MACX,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAO,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QAAQ;AAAA,MACR,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,GAAG;AAAA,IACL;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,IAAW,IAAgB;AAAA,MACpC,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,cAAc,EAAE,SAAS,EAAE,WAAA,EAAU,EAAE;AAAA,MACvC,YAAA,CAAa,MAAW;AACtB,QAAA,EAAW,GACX,EAAQ,EAAiB,uBAAuB,EAAE,cAAc,EAAO,IAAI,KAAK,CAAC;AAAA,MACnF;AAAA,MACA,mBAAA,CAAoB,MAAa;AAC/B,QAAA,EAAa,CAAQ,GACrB,EAAQ,EAAiB,sBAAsB;AAAA,MACjD;AAAA,MACM,MAAA;AAAA,MACN,WAAW;AAAA,QACT,gBAAgB;AAAA,UAAE,OAAO;AAAA,UAAa,IAAI,EAAE,IAAI,EAAE;AAAA,QAAE;AAAA,QACpD,KAAK;AAAA,UACH,cAAc;AAAA,UACd,cAAA,MAAoB,CAAC,KAAY,IAAa,EAAE;AAAA,UAChD,cAAc;AAAA,UACd,SAAS,IAAW,IAAmB;AAAA,QACzC;AAAA,MACF;AAAA,MACW,WAAA;AAAA,MACX,cAAc,CAAC,OAAO,MAAM;AAAA,MAC5B,IAAI;AAAA,QACF,qBAAqB,EAAE,SAAS,OAAO;AAAA,QACtC,CAAA,+BAA+B,EAAe,CAAe,CAAA,IAAE,GAAM;AAAA,UACpE,iBAAiB,EAAM,QAAQ,SAAS,UAAU,YAAY;AAAA,UAC9D,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,IACD,CAAA;AAAA,EACE,CAAA;AAET"}
1
+ {"version":3,"file":"DebtsTable.es.js","names":[],"sources":["../../../src/debts/components/DebtsTable.tsx"],"sourcesContent":["import React from 'react'\nimport { Stack, useTheme } from '@mui/material'\nimport { DataGridPro, GridColDef, GridSortModel } from '@mui/x-data-grid-pro'\nimport Box from '@mui/material/Box'\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport { ANALYTICS_EVENTS, useEvent, useGlobalCopyStore, useScreenSize } from '../../common'\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\n\nimport { DebtChartData } from '../../core/utils/DebtUtils'\nimport { getPriorityValue, priorityComparator } from '../utils/DebtsTable'\nimport { HeaderCell } from '../../trends/components/trendstable/HeaderCell'\nimport { PriorityCell } from './debtstable/PriorityCell'\nimport { AccountCell } from './debtstable/AccountCell'\nimport { formatCurrency } from '../../core/utils/NumberFormatting'\n\ninterface DebtsTableProps {\n sx?: any\n debts: DebtChartData[]\n hoveredDebtGuid: string\n onHoverRow: (debtGuid: string) => void\n onClickRow: () => void\n}\n\nexport const DebtsTable: React.FC<DebtsTableProps> = ({\n sx = {},\n debts,\n hoveredDebtGuid,\n onHoverRow,\n onClickRow,\n}) => {\n const theme = useTheme()\n const { onEvent } = useEvent()\n const { isMobile } = useScreenSize()\n const { debts: copy, common: commonCopy } = useGlobalCopyStore()\n\n const [sortModel, setSortModel] = React.useState<GridSortModel>([\n { field: 'priority', sort: 'asc' },\n ])\n\n const desktopColumns: GridColDef[] = [\n {\n field: 'priority',\n headerName: copy.table_column_priority,\n renderHeader: HeaderCell,\n renderCell: PriorityCell,\n sortComparator: priorityComparator,\n sortable: true,\n hideSortIcons: true,\n type: 'custom',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 67 : 72,\n flex: isMobile ? 0.2 : 0.4,\n },\n {\n field: 'account',\n headerName: copy.table_column_account,\n renderHeader: HeaderCell,\n renderCell: AccountCell,\n sortable: false,\n type: 'custom',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 180 : 225,\n flex: 1,\n },\n {\n field: 'balance',\n headerName: copy.table_column_balance,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {formatCurrency(params.value, '0,0')}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: isMobile ? 70 : 122,\n flex: isMobile ? 0.4 : 0.6,\n },\n {\n field: 'interest_rate',\n headerName: copy.details_interest_rate,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {typeof params.value === 'number' ? `${Number(params.value).toFixed(2)}%` : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n {\n field: 'projected_payoff_date',\n headerName: copy.table_column_payoff_date,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {params.value ? formatDate(params.value, DATE_FORMATS_INTL.MONTH_SHORT_YEAR) : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n {\n field: 'monthly_payment',\n headerName: copy.table_column_amount_due,\n renderHeader: HeaderCell,\n renderCell: (params) => (\n <Text color={theme.palette.text.primary} variant=\"body2\">\n {typeof params.value === 'number' ? formatCurrency(params.value, '0,0') : '---'}\n </Text>\n ),\n sortable: true,\n hideSortIcons: isMobile,\n type: 'number',\n align: 'left',\n headerAlign: 'left',\n minWidth: 122,\n flex: 0.6,\n },\n ]\n\n const mobileColumns: GridColDef[] = [\n ...desktopColumns.slice(0, 3),\n {\n field: 'chevron',\n headerClassName: 'chevron-header',\n headerName: '',\n renderCell: () => (\n <Stack aria-label={commonCopy.see_details} role=\"button\">\n <Icon name=\"chevron_right\" />\n </Stack>\n ),\n sortable: false,\n hideSortIcons: true,\n type: 'custom',\n align: 'right',\n headerAlign: 'right',\n width: 20,\n },\n ]\n\n const rows = React.useMemo(() => {\n return debts.map((debt, idx) => ({\n ...debt,\n id: idx,\n priority: getPriorityValue(debt),\n }))\n }, [debts])\n\n const handleRowHover = (\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,\n ) => {\n const target = event.target as HTMLElement\n const rowEl = target.closest('[data-id]')\n const debtIdx = rowEl?.getAttribute('data-id')\n const hoveredDebt = debts[Number(debtIdx)]\n onHoverRow?.(hoveredDebt?.guid ?? '')\n }\n\n const onMouseEnterRow = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n // Only use hover on non-mobile devices\n if (!isMobile) {\n handleRowHover(event)\n }\n }\n\n const onRowInteraction = (\n event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>,\n ) => {\n // For mobile devices, use touch/click to highlight row\n if (isMobile) {\n handleRowHover(event)\n }\n }\n\n const getRowIdByGuid = (guid: string) => {\n return rows.find((r) => r.guid === guid)?.id\n }\n\n return (\n <Box\n sx={{\n height: 'auto',\n width: '100%',\n mt: '15px',\n overflowX: 'auto',\n overflowY: 'visible',\n boxShadow: 'none',\n ...sx,\n }}\n >\n <DataGridPro\n columns={isMobile ? mobileColumns : desktopColumns}\n disableColumnFilter={true}\n disableColumnMenu={true}\n hideFooter={true}\n initialState={{ sorting: { sortModel } }}\n onRowClick={(params) => {\n onClickRow()\n onEvent(ANALYTICS_EVENTS.DEBTS_CLICK_TABLE_ROW, { account_guid: params.row.guid })\n }}\n onSortModelChange={(newModel) => {\n setSortModel(newModel)\n onEvent(ANALYTICS_EVENTS.DEBTS_CLICK_TABLE_SORT)\n }}\n rows={rows}\n slotProps={{\n baseIconButton: { material: { color: 'secondary', sx: { ml: 8 } } },\n row: {\n onMouseEnter: onMouseEnterRow,\n onMouseLeave: () => !isMobile && onHoverRow?.(''),\n onTouchStart: onRowInteraction,\n onClick: isMobile ? onRowInteraction : undefined,\n },\n }}\n sortModel={sortModel}\n sortingOrder={['asc', 'desc']}\n sx={{\n '& .chevron-header': { display: 'none' },\n [`& .MuiDataGrid-row[data-id=\"${getRowIdByGuid(hoveredDebtGuid)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G;AAAA,IACL;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,IAAW,IAAgB;AAAA,MACpC,qBAAqB;AAAA,MACrB,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,cAAc,EAAE,SAAS,EAAE,WAAA,EAAU,EAAE;AAAA,MACvC,YAAA,CAAa,MAAW;AACtB,QAAA,EAAW,GACX,EAAQ,EAAiB,uBAAuB,EAAE,cAAc,EAAO,IAAI,KAAK,CAAC;AAAA,MACnF;AAAA,MACA,mBAAA,CAAoB,MAAa;AAC/B,QAAA,EAAa,CAAQ,GACrB,EAAQ,EAAiB,sBAAsB;AAAA,MACjD;AAAA,MACM,MAAA;AAAA,MACN,WAAW;AAAA,QACT,gBAAgB,EAAE,UAAU;AAAA,UAAE,OAAO;AAAA,UAAa,IAAI,EAAE,IAAI,EAAE;AAAA,QAAE,EAAE;AAAA,QAClE,KAAK;AAAA,UACH,cAAc;AAAA,UACd,cAAA,MAAoB,CAAC,KAAY,IAAa,EAAE;AAAA,UAChD,cAAc;AAAA,UACd,SAAS,IAAW,IAAmB;AAAA,QACzC;AAAA,MACF;AAAA,MACW,WAAA;AAAA,MACX,cAAc,CAAC,OAAO,MAAM;AAAA,MAC5B,IAAI;AAAA,QACF,qBAAqB,EAAE,SAAS,OAAO;AAAA,QACtC,CAAA,+BAA+B,EAAe,CAAe,CAAA,IAAE,GAAM;AAAA,UACpE,iBAAiB,EAAM,QAAQ,SAAS,UAAU,YAAY;AAAA,UAC9D,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,IACD,CAAA;AAAA,EACE,CAAA;AAET"}
@@ -5,7 +5,7 @@ import { observer as b } from "mobx-react-lite";
5
5
  import v from "@mui/material/Stack";
6
6
  import { jsx as e } from "react/jsx-runtime";
7
7
  import { alpha as o, useTheme as D } from "@mui/material/styles";
8
- import { AdapterDateFns as S } from "@mui/x-date-pickers/AdapterDateFnsV3";
8
+ import { AdapterDateFns as S } from "@mui/x-date-pickers/AdapterDateFns";
9
9
  import { LocalizationProvider as x } from "@mui/x-date-pickers/LocalizationProvider";
10
10
  import { StaticDatePicker as w } from "@mui/x-date-pickers";
11
11
  var B = ({ isOpen: n, onClose: a }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ManageDOB.es.js","names":[],"sources":["../../../src/finstrong/components/ManageDOB.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { alpha, useTheme } from '@mui/material/styles'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { StaticDatePicker } from '@mui/x-date-pickers'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\n\nimport { Drawer, useFinstrongStore, useGlobalCopyStore, useUserStore } from '../../common'\n\ninterface ManageDOBProps {\n isOpen: boolean\n onClose: () => void\n}\n\nconst ManageDOB = ({ isOpen, onClose }: ManageDOBProps) => {\n const { finstrong: finstrongCopy } = useGlobalCopyStore()\n const theme = useTheme()\n const { updateUser, user } = useUserStore()\n const { loadPeerScore } = useFinstrongStore()\n const [selectedDate, setSelectedDate] = React.useState<number | null | undefined>(user.birthday)\n\n const handleChange = (date: Date | null) => {\n setSelectedDate(Math.floor(new Date(date!).getTime() / 1000))\n }\n const handlePrimaryAction = () => {\n if (!selectedDate || selectedDate === user.birthday) return\n updateUser({ ...user, birthday: selectedDate }).finally(() => {\n loadPeerScore()\n })\n onClose()\n }\n\n return (\n <Drawer\n footerStyles={{ borderTop: 1, borderColor: 'divider', px: 24, py: 16 }}\n isOpen={isOpen}\n onClose={onClose}\n onPrimaryAction={handlePrimaryAction}\n onSecondaryAction={onClose}\n title={finstrongCopy.date_of_birth}\n >\n <Stack sx={{ bgcolor: 'background.default', height: '100%' }}>\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n {/* TODO: Use the existing Calendar component, but update a few things in it */}\n <StaticDatePicker\n disableFuture={true}\n onChange={handleChange}\n slotProps={{\n nextIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n previousIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n switchViewButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n }}\n slots={{\n actionBar: () => null,\n toolbar: () => null,\n }}\n sx={{\n width: '100%',\n '& .MuiIconButton-edgeEnd': {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n }}\n value={selectedDate ? new Date(selectedDate * 1000) : new Date()}\n />\n </LocalizationProvider>\n </Stack>\n </Drawer>\n )\n}\n\nexport default observer(ManageDOB)\n"],"mappings":";;;;;;;;;;AAiBA,IAAM,IAAA,CAAa,EAAE,QAAA,GAAQ,SAAA,EAAA,MAA8B;AACzD,QAAM,EAAE,WAAW,EAAA,IAAkB,EAAmB,GAClD,IAAQ,EAAS,GACjB,EAAE,YAAA,GAAY,MAAA,EAAA,IAAS,EAAa,GACpC,EAAE,eAAA,EAAA,IAAkB,EAAkB,GACtC,CAAC,GAAc,CAAA,IAAmB,EAAM,SAAoC,EAAK,QAAQ,GAEzF,IAAA,CAAgB,MAAsB;AAC1C,IAAA,EAAgB,KAAK,MAAM,IAAI,KAAK,CAAK,EAAE,QAAQ,IAAI,GAAI,CAAC;AAAA,EAC9D;AASA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,cAAc;AAAA,MAAE,WAAW;AAAA,MAAG,aAAa;AAAA,MAAW,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAC7D,QAAA;AAAA,IACC,SAAA;AAAA,IACT,iBAbE,MAA4B;AAChC,MAAI,CAAC,KAAgB,MAAiB,EAAK,aAC3C,EAAW;AAAA,QAAE,GAAG;AAAA,QAAM,UAAU;AAAA,MAAa,CAAC,EAAE,QAAA,MAAc;AAC5D,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../../../src/finstrong/components/ManageDOB.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { alpha, useTheme } from '@mui/material/styles'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'\nimport { StaticDatePicker } from '@mui/x-date-pickers'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\n\nimport { Drawer, useFinstrongStore, useGlobalCopyStore, useUserStore } from '../../common'\n\ninterface ManageDOBProps {\n isOpen: boolean\n onClose: () => void\n}\n\nconst ManageDOB = ({ isOpen, onClose }: ManageDOBProps) => {\n const { finstrong: finstrongCopy } = useGlobalCopyStore()\n const theme = useTheme()\n const { updateUser, user } = useUserStore()\n const { loadPeerScore } = useFinstrongStore()\n const [selectedDate, setSelectedDate] = React.useState<number | null | undefined>(user.birthday)\n\n const handleChange = (date: Date | null) => {\n setSelectedDate(Math.floor(new Date(date!).getTime() / 1000))\n }\n const handlePrimaryAction = () => {\n if (!selectedDate || selectedDate === user.birthday) return\n updateUser({ ...user, birthday: selectedDate }).finally(() => {\n loadPeerScore()\n })\n onClose()\n }\n\n return (\n <Drawer\n footerStyles={{ borderTop: 1, borderColor: 'divider', px: 24, py: 16 }}\n isOpen={isOpen}\n onClose={onClose}\n onPrimaryAction={handlePrimaryAction}\n onSecondaryAction={onClose}\n title={finstrongCopy.date_of_birth}\n >\n <Stack sx={{ bgcolor: 'background.default', height: '100%' }}>\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n {/* TODO: Use the existing Calendar component, but update a few things in it */}\n <StaticDatePicker\n disableFuture={true}\n onChange={handleChange}\n slotProps={{\n nextIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n previousIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n switchViewButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n }}\n slots={{\n actionBar: () => null,\n toolbar: () => null,\n }}\n sx={{\n width: '100%',\n '& .MuiIconButton-edgeEnd': {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n }}\n value={selectedDate ? new Date(selectedDate * 1000) : new Date()}\n />\n </LocalizationProvider>\n </Stack>\n </Drawer>\n )\n}\n\nexport default observer(ManageDOB)\n"],"mappings":";;;;;;;;;;AAiBA,IAAM,IAAA,CAAa,EAAE,QAAA,GAAQ,SAAA,EAAA,MAA8B;AACzD,QAAM,EAAE,WAAW,EAAA,IAAkB,EAAmB,GAClD,IAAQ,EAAS,GACjB,EAAE,YAAA,GAAY,MAAA,EAAA,IAAS,EAAa,GACpC,EAAE,eAAA,EAAA,IAAkB,EAAkB,GACtC,CAAC,GAAc,CAAA,IAAmB,EAAM,SAAoC,EAAK,QAAQ,GAEzF,IAAA,CAAgB,MAAsB;AAC1C,IAAA,EAAgB,KAAK,MAAM,IAAI,KAAK,CAAK,EAAE,QAAQ,IAAI,GAAI,CAAC;AAAA,EAC9D;AASA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,cAAc;AAAA,MAAE,WAAW;AAAA,MAAG,aAAa;AAAA,MAAW,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IAC7D,QAAA;AAAA,IACC,SAAA;AAAA,IACT,iBAbE,MAA4B;AAChC,MAAI,CAAC,KAAgB,MAAiB,EAAK,aAC3C,EAAW;AAAA,QAAE,GAAG;AAAA,QAAM,UAAU;AAAA,MAAa,CAAC,EAAE,QAAA,MAAc;AAC5D,QAAA,EAAc;AAAA,MAChB,CAAC,GACD,EAAQ;AAAA,IACV;AAAA,IAQI,mBAAmB;AAAA,IACnB,OAAO,EAAc;AAAA,IAErB,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,SAAS;AAAA,QAAsB,QAAQ;AAAA,MAAO;AAAA,MACzD,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAsB,aAAa;AAAA,QAEjC,UAAA,gBAAA,EAAC,GAAD;AAAA,UACE,eAAe;AAAA,UACf,UAAU;AAAA,UACV,WAAW;AAAA,YACT,gBAAgB,EACd,IAAI;AAAA,cACF,OAAO;AAAA,cACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,YAChE,EACF;AAAA,YACA,oBAAoB,EAClB,IAAI;AAAA,cACF,OAAO;AAAA,cACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,YAChE,EACF;AAAA,YACA,kBAAkB,EAChB,IAAI;AAAA,cACF,OAAO;AAAA,cACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,YAChE,EACF;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL,WAAA,MAAiB;AAAA,YACjB,SAAA,MAAe;AAAA,UACjB;AAAA,UACA,IAAI;AAAA,YACF,OAAO;AAAA,YACP,4BAA4B;AAAA,cAC1B,OAAO;AAAA,cACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,YAChE;AAAA,UACF;AAAA,UACA,OAAO,IAAe,oBAAI,KAAK,IAAe,GAAI,IAAI,oBAAI,KAAK;AAAA,QAChE,CAAA;AAAA,MACmB,CAAA;AAAA,IACjB,CAAA;AAAA,EACD,CAAA;AAEZ,GAEA,IAAe,EAAS,CAAS"}
@@ -3,7 +3,7 @@ import { observer as p } from "mobx-react-lite";
3
3
  import { jsx as o } from "react/jsx-runtime";
4
4
  import { alpha as e, useTheme as d } from "@mui/material/styles";
5
5
  import h from "@mui/material/Box";
6
- import { AdapterDateFns as s } from "@mui/x-date-pickers/AdapterDateFnsV3";
6
+ import { AdapterDateFns as s } from "@mui/x-date-pickers/AdapterDateFns";
7
7
  import { DatePicker as c, LocalizationProvider as u } from "@mui/x-date-pickers";
8
8
  var g = ({ selectedDate: t, setSelectedDate: a }) => {
9
9
  const { finstrong: i } = m(), r = d(), n = (l) => {
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingBirthday.es.js","names":[],"sources":["../../../../src/finstrong/components/onboarding/OnboardingBirthday.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\nimport { DatePicker, LocalizationProvider } from '@mui/x-date-pickers'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\n\nimport { useGlobalCopyStore } from '../../../common'\n\ninterface OnboardingBirthdayProps {\n selectedDate: number | null | undefined\n setSelectedDate: (value: number | null | undefined) => void\n}\n\nconst OnboardingBirthday = ({ selectedDate, setSelectedDate }: OnboardingBirthdayProps) => {\n const { finstrong: copy } = useGlobalCopyStore()\n const theme = useTheme()\n\n const handleChange = (date: Date | null) => {\n setSelectedDate(Math.floor(new Date(date!).getTime() / 1000))\n }\n\n return (\n <Box sx={{ p: 24 }}>\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DatePicker\n disableFuture={true}\n label={copy.onboarding_select_date}\n onChange={handleChange}\n slotProps={{\n nextIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n previousIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n }}\n sx={{\n width: '100%',\n '& .MuiIconButton-edgeEnd': {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n }}\n value={selectedDate ? new Date(selectedDate * 1000) : null}\n />\n </LocalizationProvider>\n </Box>\n )\n}\n\nexport default observer(OnboardingBirthday)\n"],"mappings":";;;;;;;AAcA,IAAM,IAAA,CAAsB,EAAE,cAAA,GAAc,iBAAA,EAAA,MAA+C;AACzF,QAAM,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,IAAQ,EAAS,GAEjB,IAAA,CAAgB,MAAsB;AAC1C,IAAA,EAAgB,KAAK,MAAM,IAAI,KAAK,CAAK,EAAE,QAAQ,IAAI,GAAI,CAAC;AAAA,EAC9D;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI,EAAE,GAAG,GAAG;AAAA,IACf,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAsB,aAAa;AAAA,MACjC,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,eAAe;AAAA,QACf,OAAO,EAAK;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,UACT,gBAAgB,EACd,IAAI;AAAA,YACF,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE,EACF;AAAA,UACA,oBAAoB,EAClB,IAAI;AAAA,YACF,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE,EACF;AAAA,QACF;AAAA,QACA,IAAI;AAAA,UACF,OAAO;AAAA,UACP,4BAA4B;AAAA,YAC1B,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE;AAAA,QACF;AAAA,QACA,OAAO,IAAe,oBAAI,KAAK,IAAe,GAAI,IAAI;AAAA,MACvD,CAAA;AAAA,IACmB,CAAA;AAAA,EACnB,CAAA;AAET,GAEA,IAAe,EAAS,CAAkB"}
1
+ {"version":3,"file":"OnboardingBirthday.es.js","names":[],"sources":["../../../../src/finstrong/components/onboarding/OnboardingBirthday.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\nimport { DatePicker, LocalizationProvider } from '@mui/x-date-pickers'\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'\n\nimport { useGlobalCopyStore } from '../../../common'\n\ninterface OnboardingBirthdayProps {\n selectedDate: number | null | undefined\n setSelectedDate: (value: number | null | undefined) => void\n}\n\nconst OnboardingBirthday = ({ selectedDate, setSelectedDate }: OnboardingBirthdayProps) => {\n const { finstrong: copy } = useGlobalCopyStore()\n const theme = useTheme()\n\n const handleChange = (date: Date | null) => {\n setSelectedDate(Math.floor(new Date(date!).getTime() / 1000))\n }\n\n return (\n <Box sx={{ p: 24 }}>\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DatePicker\n disableFuture={true}\n label={copy.onboarding_select_date}\n onChange={handleChange}\n slotProps={{\n nextIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n previousIconButton: {\n sx: {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n },\n }}\n sx={{\n width: '100%',\n '& .MuiIconButton-edgeEnd': {\n color: 'primary.main',\n '&:hover': { bgcolor: alpha(theme.palette.primary.light, 0.1) },\n },\n }}\n value={selectedDate ? new Date(selectedDate * 1000) : null}\n />\n </LocalizationProvider>\n </Box>\n )\n}\n\nexport default observer(OnboardingBirthday)\n"],"mappings":";;;;;;;AAcA,IAAM,IAAA,CAAsB,EAAE,cAAA,GAAc,iBAAA,EAAA,MAA+C;AACzF,QAAM,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,IAAQ,EAAS,GAEjB,IAAA,CAAgB,MAAsB;AAC1C,IAAA,EAAgB,KAAK,MAAM,IAAI,KAAK,CAAK,EAAE,QAAQ,IAAI,GAAI,CAAC;AAAA,EAC9D;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,IAAI,EAAE,GAAG,GAAG;AAAA,IACf,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAsB,aAAa;AAAA,MACjC,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,eAAe;AAAA,QACf,OAAO,EAAK;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,UACT,gBAAgB,EACd,IAAI;AAAA,YACF,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE,EACF;AAAA,UACA,oBAAoB,EAClB,IAAI;AAAA,YACF,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE,EACF;AAAA,QACF;AAAA,QACA,IAAI;AAAA,UACF,OAAO;AAAA,UACP,4BAA4B;AAAA,YAC1B,OAAO;AAAA,YACP,WAAW,EAAE,SAAS,EAAM,EAAM,QAAQ,QAAQ,OAAO,GAAG,EAAE;AAAA,UAChE;AAAA,QACF;AAAA,QACA,OAAO,IAAe,oBAAI,KAAK,IAAe,GAAI,IAAI;AAAA,MACvD,CAAA;AAAA,IACmB,CAAA;AAAA,EACnB,CAAA;AAET,GAEA,IAAe,EAAS,CAAkB"}
@@ -6,7 +6,7 @@ import { observer as T } from "mobx-react-lite";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
7
  import { fromUnixTime as s } from "date-fns/fromUnixTime";
8
8
  import { getUnixTime as v } from "date-fns/getUnixTime";
9
- import { AdapterDateFns as x } from "@mui/x-date-pickers/AdapterDateFnsV3";
9
+ import { AdapterDateFns as x } from "@mui/x-date-pickers/AdapterDateFns";
10
10
  import { LocalizationProvider as D } from "@mui/x-date-pickers/LocalizationProvider";
11
11
  import { DatePicker as g } from "@mui/x-date-pickers";
12
12
  import { isValid as E } from "date-fns/isValid";
@@ -1 +1 @@
1
- {"version":3,"file":"BirthdayAction.es.js","names":[],"sources":["../../../../src/goals/components/actions/BirthdayAction.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { fromUnixTime } from 'date-fns/fromUnixTime'\nimport { getUnixTime } from 'date-fns/getUnixTime'\nimport { isValid } from 'date-fns/isValid'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { DatePicker, DateValidationError } from '@mui/x-date-pickers'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\n\nimport { ListItemAction, useGlobalCopyStore, useGoalStore, useUserStore } from '../../../common'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport { Goal } from '../../../core'\n\ninterface BirthdayActionProps {\n goal: Goal\n}\n\nexport const BirthdayAction = observer(({ goal }: BirthdayActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { user, updateUser } = useUserStore()\n const { setAlert } = useGoalStore()\n\n const [birthday, setBirthday] = React.useState<Date | null>(fromUnixTime(user.birthday ?? 0))\n const [error, setError] = React.useState<DateValidationError>(null)\n\n const isDisabled = goal.is_complete\n\n const handleSave = async () => {\n if (birthday && isValid(birthday)) {\n await updateUser({ ...user, birthday: getUnixTime(birthday) })\n setAlert(copy.alert_goal_updated_birthday)\n }\n }\n\n return (\n <ListItemAction\n isDisabled={isDisabled}\n isSaveDisabled={Boolean(error)}\n label={copy.details_birthday}\n onSave={handleSave}\n primaryText={copy.details_birthday}\n secondaryText={`${formatDate(fromUnixTime(user.birthday ?? 0), DATE_FORMATS_INTL.MONTH_DAY_YEAR)}`}\n zeroStateText={!goal.guid && !user.birthday ? copy.add_birthday : undefined}\n >\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DatePicker\n label={copy.details_birthday}\n onChange={setBirthday}\n onError={(error) => setError(error)}\n sx={{ width: '100%' }}\n value={birthday}\n />\n </LocalizationProvider>\n </ListItemAction>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAa,IAAiB,EAAA,CAAU,EAAE,MAAA,EAAA,MAAgC;AACxE,QAAM,EAAE,OAAO,EAAA,IAAS,EAAmB,GACrC,EAAE,MAAA,GAAM,YAAA,EAAA,IAAe,EAAa,GACpC,EAAE,UAAA,EAAA,IAAa,EAAa,GAE5B,CAAC,GAAU,CAAA,IAAe,EAAM,SAAsB,EAAa,EAAK,YAAY,CAAC,CAAC,GACtF,CAAC,GAAO,CAAA,IAAY,EAAM,SAA8B,IAAI,GAE5D,IAAa,EAAK,aAElB,IAAa,YAAY;AAC7B,IAAI,KAAY,EAAQ,CAAQ,MAC9B,MAAM,EAAW;AAAA,MAAE,GAAG;AAAA,MAAM,UAAU,EAAY,CAAQ;AAAA,IAAE,CAAC,GAC7D,EAAS,EAAK,2BAA2B;AAAA,EAE7C;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACc,YAAA;AAAA,IACZ,gBAAgB,EAAQ;AAAA,IACxB,OAAO,EAAK;AAAA,IACZ,QAAQ;AAAA,IACR,aAAa,EAAK;AAAA,IAClB,eAAe,GAAG,EAAW,EAAa,EAAK,YAAY,CAAC,GAAG,EAAkB,cAAc,CAAA;AAAA,IAC/F,eAAe,CAAC,EAAK,QAAQ,CAAC,EAAK,WAAW,EAAK,eAAe;AAAA,IAElE,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAsB,aAAa;AAAA,MACjC,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,OAAO,EAAK;AAAA,QACZ,UAAU;AAAA,QACV,SAAA,CAAU,MAAU,EAAS,CAAK;AAAA,QAClC,IAAI,EAAE,OAAO,OAAO;AAAA,QACpB,OAAO;AAAA,MACR,CAAA;AAAA,IACmB,CAAA;AAAA,EACR,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"BirthdayAction.es.js","names":[],"sources":["../../../../src/goals/components/actions/BirthdayAction.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { fromUnixTime } from 'date-fns/fromUnixTime'\nimport { getUnixTime } from 'date-fns/getUnixTime'\nimport { isValid } from 'date-fns/isValid'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'\nimport { DatePicker, DateValidationError } from '@mui/x-date-pickers'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\n\nimport { ListItemAction, useGlobalCopyStore, useGoalStore, useUserStore } from '../../../common'\nimport { DATE_FORMATS_INTL, formatDate } from '../../../core/constants'\nimport { Goal } from '../../../core'\n\ninterface BirthdayActionProps {\n goal: Goal\n}\n\nexport const BirthdayAction = observer(({ goal }: BirthdayActionProps) => {\n const { goals: copy } = useGlobalCopyStore()\n const { user, updateUser } = useUserStore()\n const { setAlert } = useGoalStore()\n\n const [birthday, setBirthday] = React.useState<Date | null>(fromUnixTime(user.birthday ?? 0))\n const [error, setError] = React.useState<DateValidationError>(null)\n\n const isDisabled = goal.is_complete\n\n const handleSave = async () => {\n if (birthday && isValid(birthday)) {\n await updateUser({ ...user, birthday: getUnixTime(birthday) })\n setAlert(copy.alert_goal_updated_birthday)\n }\n }\n\n return (\n <ListItemAction\n isDisabled={isDisabled}\n isSaveDisabled={Boolean(error)}\n label={copy.details_birthday}\n onSave={handleSave}\n primaryText={copy.details_birthday}\n secondaryText={`${formatDate(fromUnixTime(user.birthday ?? 0), DATE_FORMATS_INTL.MONTH_DAY_YEAR)}`}\n zeroStateText={!goal.guid && !user.birthday ? copy.add_birthday : undefined}\n >\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DatePicker\n label={copy.details_birthday}\n onChange={setBirthday}\n onError={(error) => setError(error)}\n sx={{ width: '100%' }}\n value={birthday}\n />\n </LocalizationProvider>\n </ListItemAction>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAa,IAAiB,EAAA,CAAU,EAAE,MAAA,EAAA,MAAgC;AACxE,QAAM,EAAE,OAAO,EAAA,IAAS,EAAmB,GACrC,EAAE,MAAA,GAAM,YAAA,EAAA,IAAe,EAAa,GACpC,EAAE,UAAA,EAAA,IAAa,EAAa,GAE5B,CAAC,GAAU,CAAA,IAAe,EAAM,SAAsB,EAAa,EAAK,YAAY,CAAC,CAAC,GACtF,CAAC,GAAO,CAAA,IAAY,EAAM,SAA8B,IAAI,GAE5D,IAAa,EAAK,aAElB,IAAa,YAAY;AAC7B,IAAI,KAAY,EAAQ,CAAQ,MAC9B,MAAM,EAAW;AAAA,MAAE,GAAG;AAAA,MAAM,UAAU,EAAY,CAAQ;AAAA,IAAE,CAAC,GAC7D,EAAS,EAAK,2BAA2B;AAAA,EAE7C;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACc,YAAA;AAAA,IACZ,gBAAgB,EAAQ;AAAA,IACxB,OAAO,EAAK;AAAA,IACZ,QAAQ;AAAA,IACR,aAAa,EAAK;AAAA,IAClB,eAAe,GAAG,EAAW,EAAa,EAAK,YAAY,CAAC,GAAG,EAAkB,cAAc,CAAA;AAAA,IAC/F,eAAe,CAAC,EAAK,QAAQ,CAAC,EAAK,WAAW,EAAK,eAAe;AAAA,IAElE,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAsB,aAAa;AAAA,MACjC,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,OAAO,EAAK;AAAA,QACZ,UAAU;AAAA,QACV,SAAA,CAAU,MAAU,EAAS,CAAK;AAAA,QAClC,IAAI,EAAE,OAAO,OAAO;AAAA,QACpB,OAAO;AAAA,MACR,CAAA;AAAA,IACmB,CAAA;AAAA,EACR,CAAA;AAEpB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { InsightsPayload } from '../../../../core';
2
+ interface DirectDepositBlockProps {
3
+ payload: InsightsPayload;
4
+ beatGuid?: string;
5
+ }
6
+ /**
7
+ * Direct Deposit component block — the shared hero visual for the Set Up
8
+ * Direct Deposit, Switch Direct Deposit, and Missing Interest Rate beats.
9
+ *
10
+ * The backend picks the design branch via `instance_slot.variant` and carries
11
+ * the account facts flat on `instance_slot` (V2 contract — no
12
+ * `instance_slot_data`). Everything variant-specific is flat on the layout
13
+ * config (`./layout.ts`); `DirectDepositCard` is a variant-agnostic hero.
14
+ */
15
+ declare const DirectDepositBlock: ({ payload }: DirectDepositBlockProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default DirectDepositBlock;
@@ -0,0 +1,24 @@
1
+ import { DepositLogo as f } from "../../../components/ComponentBlocks/DepositLogo.es.js";
2
+ import { directDepositVariant as l, getLayoutConfig as D } from "./layout.es.js";
3
+ import g from "../../../components/DirectDepositCard.es.js";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ import { useTheme as _ } from "@mui/material/styles";
6
+ var L = ({ payload: i }) => {
7
+ const e = _(), { instance_slot: n } = i, { account_name: a, account_type: s, institution_guid: r, institution_name: c, status_text: m, variant: u } = n, t = D(e), p = t[u] ?? t[l.SetUpDirectDeposit];
8
+ return /* @__PURE__ */ o(g, {
9
+ ...p,
10
+ logo: /* @__PURE__ */ o(f, {
11
+ iconName: "account_balance",
12
+ institutionName: c ?? "",
13
+ institutionGuid: r ?? ""
14
+ }),
15
+ name: a,
16
+ statusLabel: m,
17
+ subtitle: s
18
+ });
19
+ };
20
+ export {
21
+ L as default
22
+ };
23
+
24
+ //# sourceMappingURL=DirectDepositBlock.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DirectDepositBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/DirectDepositBlock.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles'\n\nimport type { InsightsPayload } from '../../../../core'\n\nimport DirectDepositCard from '../../../components/DirectDepositCard'\n\nimport { directDepositVariant, getLayoutConfig, type DirectDepositVariant } from './layout'\nimport DepositLogo from '../../../components/ComponentBlocks/DepositLogo'\n\ninterface DirectDepositBlockProps {\n payload: InsightsPayload\n beatGuid?: string\n}\n\n/**\n * Direct Deposit component block — the shared hero visual for the Set Up\n * Direct Deposit, Switch Direct Deposit, and Missing Interest Rate beats.\n *\n * The backend picks the design branch via `instance_slot.variant` and carries\n * the account facts flat on `instance_slot` (V2 contract — no\n * `instance_slot_data`). Everything variant-specific is flat on the layout\n * config (`./layout.ts`); `DirectDepositCard` is a variant-agnostic hero.\n */\nconst DirectDepositBlock = ({ payload }: DirectDepositBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n const { account_name, account_type, institution_guid, institution_name, status_text, variant } =\n instance_slot\n\n const layoutConfig = getLayoutConfig(theme)\n // Unknown backend variants degrade to the pending setup styling rather than\n // crashing (mirrors createVariantBlock's fallback philosophy).\n const config =\n layoutConfig[variant as DirectDepositVariant] ??\n layoutConfig[directDepositVariant.SetUpDirectDeposit]\n\n return (\n <DirectDepositCard\n {...config}\n logo={\n <DepositLogo\n iconName=\"account_balance\"\n institutionName={institution_name ?? ''}\n institutionGuid={institution_guid ?? ''}\n />\n }\n name={account_name}\n statusLabel={status_text}\n subtitle={account_type}\n />\n )\n}\n\nexport default DirectDepositBlock\n"],"mappings":";;;;;AAuBA,IAAM,IAAA,CAAsB,EAAE,SAAA,EAAA,MAAuC;AACnE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,cAAA,GAAc,cAAA,GAAc,kBAAA,GAAkB,kBAAA,GAAkB,aAAA,GAAa,SAAA,EAAA,IACnF,GAEI,IAAe,EAAgB,CAAK,GAGpC,IACJ,EAAa,CAAA,KACb,EAAa,EAAqB,kBAAA;AAEpC,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MACE,gBAAA,EAAC,GAAD;AAAA,MACE,UAAS;AAAA,MACT,iBAAiB,KAAoB;AAAA,MACrC,iBAAiB,KAAoB;AAAA,IACtC,CAAA;AAAA,IAEH,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,EACX,CAAA;AAEL"}
@@ -0,0 +1 @@
1
+ export { default as DirectDepositBlock } from './DirectDepositBlock';
@@ -0,0 +1,28 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ import { DirectDepositCardStyleProps, DirectDepositPillConfig } from '../../../components/DirectDepositCard';
3
+ /**
4
+ * Design branches of the Direct Deposit component block (Figma: "Direct
5
+ * Deposit" — Detailed Primary / Detailed Success / Deposit Completed):
6
+ *
7
+ * - `SetUpDirectDeposit` — pending setup: flat `primary.lighter` slot, neutral pill
8
+ * ("Direct Deposit Not Set Up").
9
+ * - `DirectDepositComplete` — Set Up / Switch Direct Deposit success: celebration wash +
10
+ * confetti, solid success pill with a check_circle glyph ("Direct Deposit Complete").
11
+ * - `MissingInterestRate` — pending rate: blue gradient slot, primary-tinted pill
12
+ * ("Unknown Interest Rate (APR)%").
13
+ * - `InterestRateAdded` — rate added: green gradient slot, solid success pill
14
+ * ("Interest Rate: 19.99% APR").
15
+ */
16
+ export declare const directDepositVariant: {
17
+ readonly SetUpDirectDeposit: "set_up_direct_deposit";
18
+ readonly DirectDepositComplete: "direct_deposit_complete";
19
+ readonly MissingInterestRate: "missing_interest_rate";
20
+ readonly InterestRateAdded: "interest_rate_added";
21
+ };
22
+ export type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant];
23
+ export declare const NEUTRAL_PILL: DirectDepositPillConfig;
24
+ /**
25
+ * Per-variant style props for `DirectDepositCard`, keyed by the backend
26
+ * `instance_slot.variant` (mirrors AccountBlock's `getLayoutConfig`).
27
+ */
28
+ export declare const getLayoutConfig: (theme: Theme) => Record<DirectDepositVariant, DirectDepositCardStyleProps>;
@@ -0,0 +1,63 @@
1
+ import { WARM_LIME_ACCENT_GRADIENT as o } from "../../../components/celebrationGradients.es.js";
2
+ var e = {
3
+ SetUpDirectDeposit: "set_up_direct_deposit",
4
+ DirectDepositComplete: "direct_deposit_complete",
5
+ MissingInterestRate: "missing_interest_rate",
6
+ InterestRateAdded: "interest_rate_added"
7
+ }, i = {
8
+ light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)",
9
+ dark: "linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)"
10
+ }, l = {
11
+ light: "linear-gradient(180deg, #94C9B7 0%, #12875E 100%)",
12
+ dark: "linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)"
13
+ }, n = {
14
+ bgcolor: "grey.200",
15
+ borderColor: "grey.200",
16
+ labelColor: "text.primary"
17
+ }, d = {
18
+ bgcolor: "primary.lighter",
19
+ borderColor: "primary.lighter",
20
+ labelColor: "text.primary"
21
+ }, t = {
22
+ bgcolor: "success.main",
23
+ borderColor: "success.main",
24
+ labelColor: "success.contrastText"
25
+ }, c = (a) => {
26
+ const r = a.palette.mode;
27
+ return {
28
+ [e.SetUpDirectDeposit]: {
29
+ bgcolor: "primary.lighter",
30
+ nameVariant: "body2",
31
+ pill: n
32
+ },
33
+ [e.DirectDepositComplete]: {
34
+ backgroundImage: o,
35
+ bgcolor: "background.paper",
36
+ nameVariant: "body2",
37
+ pill: {
38
+ ...t,
39
+ icon: "check_circle"
40
+ },
41
+ showConfetti: !0
42
+ },
43
+ [e.MissingInterestRate]: {
44
+ backgroundImage: i[r],
45
+ bgcolor: "background.paper",
46
+ nameVariant: "body1",
47
+ pill: d
48
+ },
49
+ [e.InterestRateAdded]: {
50
+ backgroundImage: l[r],
51
+ bgcolor: "background.paper",
52
+ nameVariant: "body1",
53
+ pill: t
54
+ }
55
+ };
56
+ };
57
+ export {
58
+ n as NEUTRAL_PILL,
59
+ e as directDepositVariant,
60
+ c as getLayoutConfig
61
+ };
62
+
63
+ //# sourceMappingURL=layout.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DirectDepositBlock/layout.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles'\n\nimport { WARM_LIME_ACCENT_GRADIENT } from '../../../components/celebrationGradients'\nimport type {\n DirectDepositCardStyleProps,\n DirectDepositPillConfig,\n} from '../../../components/DirectDepositCard'\n\n/**\n * Design branches of the Direct Deposit component block (Figma: \"Direct\n * Deposit\" — Detailed Primary / Detailed Success / Deposit Completed):\n *\n * - `SetUpDirectDeposit` — pending setup: flat `primary.lighter` slot, neutral pill\n * (\"Direct Deposit Not Set Up\").\n * - `DirectDepositComplete` — Set Up / Switch Direct Deposit success: celebration wash +\n * confetti, solid success pill with a check_circle glyph (\"Direct Deposit Complete\").\n * - `MissingInterestRate` — pending rate: blue gradient slot, primary-tinted pill\n * (\"Unknown Interest Rate (APR)%\").\n * - `InterestRateAdded` — rate added: green gradient slot, solid success pill\n * (\"Interest Rate: 19.99% APR\").\n */\nexport const directDepositVariant = {\n SetUpDirectDeposit: 'set_up_direct_deposit',\n DirectDepositComplete: 'direct_deposit_complete',\n MissingInterestRate: 'missing_interest_rate',\n InterestRateAdded: 'interest_rate_added',\n} as const\n\nexport type DirectDepositVariant = (typeof directDepositVariant)[keyof typeof directDepositVariant]\n\n// Figma slot gradients (opaque, vertical). Light/dark pairs are taken from the\n// light and dark pages of the Missing Interest Rates frame — they are bespoke\n// blends with no theme token, so they stay literal hexes keyed by palette mode.\nconst MISSING_RATE_GRADIENTS = {\n light: 'linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)',\n dark: 'linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)',\n} as const\n\nconst RATE_ADDED_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n// Figma light-mode references: neutral pill #ececec, primary-tinted pill\n// #dfe8fd (`primary.lighter`), solid success pill #12875e (`success.main`).\nexport const NEUTRAL_PILL: DirectDepositPillConfig = {\n bgcolor: 'grey.200',\n borderColor: 'grey.200',\n labelColor: 'text.primary',\n}\n\nconst PRIMARY_TINT_PILL: DirectDepositPillConfig = {\n bgcolor: 'primary.lighter',\n borderColor: 'primary.lighter',\n labelColor: 'text.primary',\n}\n\nconst SUCCESS_PILL: DirectDepositPillConfig = {\n bgcolor: 'success.main',\n borderColor: 'success.main',\n labelColor: 'success.contrastText',\n}\n\n/**\n * Per-variant style props for `DirectDepositCard`, keyed by the backend\n * `instance_slot.variant` (mirrors AccountBlock's `getLayoutConfig`).\n */\nexport const getLayoutConfig = (\n theme: Theme,\n): Record<DirectDepositVariant, DirectDepositCardStyleProps> => {\n const mode = theme.palette.mode\n\n return {\n [directDepositVariant.SetUpDirectDeposit]: {\n bgcolor: 'primary.lighter',\n nameVariant: 'body2',\n pill: NEUTRAL_PILL,\n },\n [directDepositVariant.DirectDepositComplete]: {\n backgroundImage: WARM_LIME_ACCENT_GRADIENT,\n bgcolor: 'background.paper',\n nameVariant: 'body2',\n // Figma 1941:192796: 16px check_circle inside the complete pill.\n pill: { ...SUCCESS_PILL, icon: 'check_circle' },\n showConfetti: true,\n },\n [directDepositVariant.MissingInterestRate]: {\n backgroundImage: MISSING_RATE_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: PRIMARY_TINT_PILL,\n },\n [directDepositVariant.InterestRateAdded]: {\n backgroundImage: RATE_ADDED_GRADIENTS[mode],\n bgcolor: 'background.paper',\n nameVariant: 'body1',\n pill: SUCCESS_PILL,\n },\n }\n}\n"],"mappings":";AAqBA,IAAa,IAAuB;AAAA,EAClC,oBAAoB;AAAA,EACpB,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,mBAAmB;AACrB,GAOM,IAAyB;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AACR,GAEM,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,MAAM;AACR,GAIa,IAAwC;AAAA,EACnD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAA6C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAEM,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAMa,IAAA,CACX,MAC8D;AAC9D,QAAM,IAAO,EAAM,QAAQ;AAE3B,SAAO;AAAA,IACJ,CAAA,EAAqB,kBAAA,GAAqB;AAAA,MACzC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACC,CAAA,EAAqB,qBAAA,GAAwB;AAAA,MAC5C,iBAAiB;AAAA,MACjB,SAAS;AAAA,MACT,aAAa;AAAA,MAEb,MAAM;AAAA,QAAE,GAAG;AAAA,QAAc,MAAM;AAAA,MAAe;AAAA,MAC9C,cAAc;AAAA,IAChB;AAAA,IACC,CAAA,EAAqB,mBAAA,GAAsB;AAAA,MAC1C,iBAAiB,EAAuB,CAAA;AAAA,MACxC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,IACC,CAAA,EAAqB,iBAAA,GAAoB;AAAA,MACxC,iBAAiB,EAAqB,CAAA;AAAA,MACtC,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM;AAAA,IACR;AAAA,EACF;AACF"}
@@ -1,5 +1,6 @@
1
1
  export * from './AccountBlock';
2
2
  export * from './AccountSwitchBlock';
3
+ export * from './DirectDepositBlock';
3
4
  export * from './BudgetBlock';
4
5
  export * from './SaveExtraBlock';
5
6
  export * from './TransactionBlock';
@@ -7,6 +7,12 @@ interface AccountHeroCardProps {
7
7
  name: ReactNode;
8
8
  /** Optional secondary line beneath the name, e.g. "Checking Account". */
9
9
  subtitle?: ReactNode;
10
+ /**
11
+ * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics
12
+ * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).
13
+ * Both render at weight 600.
14
+ */
15
+ nameVariant?: 'body1' | 'body2';
10
16
  /** Status element beneath the text (e.g. a `<StatusPill>`). */
11
17
  status?: ReactNode;
12
18
  /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */
@@ -31,5 +37,5 @@ interface AccountHeroCardProps {
31
37
  * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit
32
38
  * (complete) Content. Scope is the Content section only.
33
39
  */
34
- declare const AccountHeroCard: ({ backdrop, backgroundImage, bgcolor, logo, name, status, subtitle, sx, }: AccountHeroCardProps) => import("react/jsx-runtime").JSX.Element;
40
+ declare const AccountHeroCard: ({ backdrop, backgroundImage, bgcolor, logo, name, nameVariant, status, subtitle, sx, }: AccountHeroCardProps) => import("react/jsx-runtime").JSX.Element;
35
41
  export default AccountHeroCard;
@@ -1,22 +1,21 @@
1
- import { getLogoElevation as h } from "./logoShadow.es.js";
1
+ import { getLogoElevation as m } from "./logoShadow.es.js";
2
2
  import r from "@mui/material/Stack";
3
3
  import { Text as d } from "@mxenabled/mxui";
4
4
  import { jsx as t, jsxs as e } from "react/jsx-runtime";
5
5
  import i from "@mui/material/Box";
6
- var w = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo: p, name: c, status: a, subtitle: l, sx: x }) => /* @__PURE__ */ e(i, {
6
+ var v = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo: p, name: c, nameVariant: x = "body2", status: a, subtitle: l, sx: h }) => /* @__PURE__ */ e(i, {
7
7
  sx: {
8
8
  alignItems: "center",
9
9
  bgcolor: s,
10
10
  ...o && { backgroundImage: o },
11
11
  display: "flex",
12
12
  flexDirection: "column",
13
- overflow: "hidden",
14
13
  pb: 16,
15
14
  position: "relative",
16
15
  pt: 41,
17
16
  px: 16,
18
17
  width: "100%",
19
- ...x
18
+ ...h
20
19
  },
21
20
  children: [n && /* @__PURE__ */ t(i, {
22
21
  "aria-hidden": !0,
@@ -31,7 +30,7 @@ var w = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo
31
30
  alignItems: "center",
32
31
  bgcolor: "background.paper",
33
32
  borderRadius: "8px",
34
- boxShadow: h,
33
+ boxShadow: m,
35
34
  gap: 16,
36
35
  pb: 16,
37
36
  position: "relative",
@@ -65,7 +64,7 @@ var w = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo
65
64
  children: [/* @__PURE__ */ t(d, {
66
65
  sx: { fontWeight: 600 },
67
66
  truncate: !0,
68
- variant: "body2",
67
+ variant: x,
69
68
  children: c
70
69
  }), l && /* @__PURE__ */ t(d, {
71
70
  color: "text.secondary",
@@ -85,7 +84,7 @@ var w = ({ backdrop: n, backgroundImage: o, bgcolor: s = "primary.lighter", logo
85
84
  })]
86
85
  });
87
86
  export {
88
- w as default
87
+ v as default
89
88
  };
90
89
 
91
90
  //# sourceMappingURL=AccountHeroCard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 metrics (13px / lineHeight 16) at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. */}\n <Text sx={{ fontWeight: 600 }} truncate={true} variant=\"body2\">\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AA8CA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,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AAA,QAA9D,UAAA,CAGE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,YAAY,IAAI;AAAA,UAAG,UAAU;AAAA,UAAM,SAAQ;AAAA,UACpD,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
1
+ {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /**\n * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics\n * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).\n * Both render at weight 600.\n */\n nameVariant?: 'body1' | 'body2'\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 (13/16) or body1 (15/20) metrics at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. */}\n <Text sx={{ fontWeight: 600 }} truncate={true} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AAoDA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,QAAA,GACA,UAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,SAAS;AAAA,IACT,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AAAA,EAbF,UAAA,CAeG,KACC,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa;AAAA,IAAM,IAAI;AAAA,MAAE,OAAO;AAAA,MAAG,UAAU;AAAA,MAAY,QAAQ;AAAA,IAAE;AAAA,IACrE,UAAA;AAAA,EACE,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MAGZ,SAAS;AAAA,MACT,cAAc;AAAA,MAEd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,MAAM;AAAA,QACN,UAAU;AAAA,QACV,KAAK;AAAA,QACL,WAAW;AAAA,MACb;AAAA,MAEC,UAAA;AAAA,IACE,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,KAAK;AAAA,QAAI,UAAU;AAAA,QAAG,OAAO;AAAA,MAAO;AAAA,MAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,UAAU;AAAA,UAAG,OAAO;AAAA,QAAO;AAAA,QAA9D,UAAA,CAGE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,YAAY,IAAI;AAAA,UAAG,UAAU;AAAA,UAAM,SAAS;AAAA,UACrD,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DirectDepositPillConfig {
3
+ /** Pill background color token. */
4
+ bgcolor: string;
5
+ /** Pill border color token. */
6
+ borderColor: string;
7
+ /** Pill label color token. */
8
+ labelColor: string;
9
+ /** Optional mx-icons glyph rendered before the label (e.g. `check_circle`). */
10
+ icon?: string;
11
+ }
12
+ /**
13
+ * Style props for the card. Variant-specific values live in the Direct Deposit
14
+ * block's `layout.ts` (`getLayoutConfig`) — the card itself is variant-agnostic.
15
+ */
16
+ export interface DirectDepositCardStyleProps {
17
+ /** Slot surface token behind the white hero card. Default `primary.lighter`. */
18
+ bgcolor?: string;
19
+ /** Decorative wash layered over `bgcolor` (celebration/gradient slots). */
20
+ backgroundImage?: string;
21
+ /** Confetti burst behind the hero card (complete states). */
22
+ showConfetti?: boolean;
23
+ /** Hero name typography. Default `body2` (13/16); rate variants use `body1` (15/20). */
24
+ nameVariant?: 'body1' | 'body2';
25
+ /** Status pill color tokens + optional leading glyph. */
26
+ pill?: DirectDepositPillConfig;
27
+ }
28
+ interface DirectDepositCardProps extends DirectDepositCardStyleProps {
29
+ /** Institution/account logo, rendered overhanging the hero card's top edge. */
30
+ logo: ReactNode;
31
+ /** Primary line, e.g. "Epic Bank Checking, *1234". */
32
+ name: ReactNode;
33
+ /** Optional secondary line, e.g. "Checking Account" / "Credit Card". */
34
+ subtitle?: ReactNode;
35
+ /** Optional status pill label, e.g. "Direct Deposit Not Set Up". */
36
+ statusLabel?: ReactNode;
37
+ }
38
+ /**
39
+ * The basic Direct Deposit hero card: an overhanging logo above a white card
40
+ * with a name, optional subtitle, and a status pill, over a tinted/gradient
41
+ * slot with an optional confetti backdrop.
42
+ *
43
+ * Purely presentational — it knows nothing about beats or variants. The Direct
44
+ * Deposit block resolves `instance_slot.variant` to these style props via its
45
+ * `layout.ts` (`getLayoutConfig`).
46
+ */
47
+ declare const DirectDepositCard: ({ backgroundImage, bgcolor, logo, name, nameVariant, pill, showConfetti, statusLabel, subtitle, }: DirectDepositCardProps) => import("react/jsx-runtime").JSX.Element;
48
+ export default DirectDepositCard;