@moneykit/connect 0.3.12 → 0.3.14

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/index.js CHANGED
@@ -1 +1 @@
1
- import c from"query-string";var d={name:"@moneykit/connect",description:"MoneyKit Connect launcher for web.",version:"0.3.12",author:"MoneyKit",repository:{type:"git",url:"https://github.com/moneykit/connect-js.git"},types:"./types/index.d.ts",license:"MIT"};var p="https://connect.moneykit.com";function k(i,t){let e=document.createElement("iframe");e.id="moneykit-connect-frame",e.src=i,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.zIndex="999999";let n=t?document.getElementById(t):document.body;if(!n)throw new Error(`MoneyKit could not find container element with ID "${t}".`);return n.appendChild(e),e.addEventListener("load",function(){e.focus()}),e}function m(i){i.remove()}var g="moneykit.linkSessionToken",h=class{constructor(t={}){this.options={...t}}link(t,e,n,r){this.startLink(t,e,n,r)}relink(t,e,n,r){this.startRelink(t,e,n,r)}continue(t,e,n,r){if(window.opener){window.opener.postMessage({moneykit:!0,type:"link.resume",eventData:{redirectURL:t}},p);return}this.continueLink(t,e,n,r)}__linkDirect(t,e,n,r){this.startLink(t,e,n,r,{viewMode:"direct"})}__relinkDirect(t,e,n,r){this.startRelink(t,e,n,r,{viewMode:"direct"})}__continueDirect(t,e,n,r){this.continueLink(t,e,n,r,{viewMode:"direct"})}startLink(t,e,n,r,s){let l={...this.linkParametersFromOptions(),linkSessionToken:t,origin:window.location.origin,...s},a=c.stringifyUrl({url:`${p}/start`,query:l});localStorage.setItem(g,t),this.launch(a,e,n,r)}startRelink(t,e,n,r,s){let l={...this.linkParametersFromOptions(),linkSessionToken:t,origin:window.location.origin,...s},a=c.stringifyUrl({url:`${p}/relink`,query:l});localStorage.setItem(g,t),this.launch(a,e,n,r)}continueLink(t,e,n,r,s){let l=localStorage.getItem(g);l||console.warn("Unable to get MoneyKit link session token from local storage.");let a={...this.linkParametersFromOptions(),linkSessionToken:l,redirectURL:t,origin:window.location.origin,...s},o=c.stringifyUrl({url:`${p}/continue`,query:a});this.launch(o,e,n,r)}linkParametersFromOptions(){let t=this.options.applicationName??"",e=this.options.device??null,n=this.options.stepTimers??!0;return{applicationName:t,device:e,stepTimers:n,launcherVersion:d.version}}launch(t,e,n,r){let s=k(t,this.options.containerID),l=new AbortController,a=T(s,l,e,n,r,this.options.__onDemoEvent,this.options.theme);window.addEventListener("message",a,{signal:l.signal})}};function T(i,t,e,n,r,s,l){return a=>{if(a.origin!=p||!("moneykit"in a.data||"__moneykitDemo"in a.data))return;let o=a.data;switch(o.type){case"connect.started":l&&a.source?.postMessage({moneykit:!0,type:"connect.set_theme",data:{theme:l}},{targetOrigin:p});break;case"link.complete":e&&o.data.exchangeableToken&&e(o.data.exchangeableToken,o.data.institution),m(i),t.abort();break;case"relink.complete":e&&e(o.data.institution),m(i),t.abort();break;case"link.exit":m(i),n&&n(o.data.error),t.abort();break;case"link.close_oauth":window.close();break;case"link.event":r&&r(o.data);break;case"demo.link.event":s&&s(o.data);break}}}var y=h;var b=(o=>(o[o.largeTitle=0]="largeTitle",o[o.title1=1]="title1",o[o.title2=2]="title2",o[o.title3=3]="title3",o[o.body=4]="body",o[o.smallBody=5]="smallBody",o[o.button=6]="button",o[o.input=7]="input",o))(b||{}),v=(i,t)=>{switch(t){case 0:return i.typography.largeTitle;case 1:return i.typography.title1;case 2:return i.typography.title2;case 3:return i.typography.title3;case 5:return i.typography.smallBody;case 6:return i.typography.button;case 7:return i.typography.input;default:return i.typography.body}};var f={colors:{accent:"#0077ff",primaryBackground:{light:"#fff",dark:"#212124"},secondaryBackground:{light:"#f2f2f5",dark:"#212124"},primaryContent:{light:"#fff",dark:"#343438"},secondaryContent:{light:"#f5f5f5",dark:"#343438"},primaryForeground:{light:"#111",dark:"#fff"},secondaryForeground:{light:"rgba(67, 67, 76, 0.6)",dark:"rgba(235, 235, 245, 0.6)"},tertiaryForeground:{light:"rgba(67, 67, 76, 0.3)",dark:"rgba(235, 234, 244, 0.3)"},primaryFill:{light:"rgba(120, 120, 128, 0.2)",dark:"rgba(120, 120, 128, 0.36)"},secondaryFill:{light:"rgba(120, 120, 128, 0.16)",dark:"rgba(120, 120, 128, 0.32)"},tertiaryFill:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},success:{light:"#00ca32",dark:"#35DE5F"},warning:{light:"#ff9500",dark:"#FF9400"},error:{light:"#dd2424",dark:"#FA4242"},separator:{light:"rgba(60, 60, 67, 0.06)",dark:"rgba(84, 84, 88, 0.4)"},selection:{light:"rgba(120, 120, 128, 0.28)",dark:"rgba(120, 120, 128, 0.48)"}},typography:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif",largeTitle:{size:"34px",lineHeight:"41px",letterSpacing:"-0.01em",weight:700},title1:{size:"28px",lineHeight:"34px",letterSpacing:"0",weight:700},title2:{size:"22px",lineHeight:"28px",letterSpacing:"0",weight:700},title3:{size:"20px",lineHeight:"24px",letterSpacing:"0",weight:700},body:{size:"17px",lineHeight:"24px",letterSpacing:"-0.01em",weight:500},smallBody:{size:"11px",lineHeight:"16px",letterSpacing:"-0.0225em",weight:400},button:{size:"18px",lineHeight:"24px",letterSpacing:"-1%",weight:700},input:{size:"18px",lineHeight:"24px",letterSpacing:"0",weight:500}},images:{close:"/images/close.svg",search:"/images/search.svg",spinner:"/images/spinner.png"},spacing:{contentHorizontalInset:"28px",buttonHorizontalInset:"28px"},components:{navigationBar:{height:"64px"},contentView:{borderRadius:"12px",boxShadow:{light:"none",dark:"inset 0 0 0 1px rgba(228, 227, 243, 0.04)"},border:null,separatorStyle:"all_except_last"},buttonPrimary:{height:"44px",borderRadius:"12px",inheritInstitutionColor:!0},searchInput:{backgroundColor:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},height:"48px",borderRadius:"12px",border:null,alignment:"center",focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},textField:{backgroundColor:null,height:"52px",borderRadius:"0px",boxShadow:null,focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},progressSpinner:{strokeWidth:8,diameter:56,lineCap:"round"},icon:{strokeWidth:8,lineCap:"round"},separator:{height:"1px"}},screens:{finder:{title:"Connect Your Bank",subtitle:null,searchPlaceholder:"Search Banks",institutionCellBoxShadow:null,institutionCellBorderRadius:"12px",institutionCellBorder:{light:"1px solid rgba(60, 60, 67, 0.1)",dark:"1px solid rgba(84, 84, 88, 0.4)"},institutionCellSpacing:"16px",institutionCellBackgroundColor:{light:"#fff",dark:"#212124"}}},modal:{borderRadius:"20px",boxShadow:{light:"0px 2px 4px rgba(0, 0, 0, 0.1), 0 40px 80px rgba(0,0,0,.15)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"},overlayBackgroundColor:{light:"rgba(0, 0, 0, 0.4)",dark:"rgba(0, 0, 0, 0.75)"},overlayBackdropFilter:null},popover:{borderRadius:"24px",boxShadow:{light:"0px 0px 80px rgba(0, 0, 0, 0.16)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"}}};var I=y;export{b as ThemeTypographyTextStyle,I as default,f as moneyui,v as themeTypographyStyleForTextStyle};
1
+ import c from"query-string";var d={name:"@moneykit/connect",description:"MoneyKit Connect launcher for web.",version:"0.3.14",author:"MoneyKit",repository:{type:"git",url:"https://github.com/moneykit/connect-js.git"},types:"./types/index.d.ts",license:"MIT"};var p="https://connect.moneykit.com";function k(i,t){let e=document.createElement("iframe");e.id="moneykit-connect-frame",e.src=i,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.zIndex="999999";let n=t?document.getElementById(t):document.body;if(!n)throw new Error(`MoneyKit could not find container element with ID "${t}".`);return n.appendChild(e),e.addEventListener("load",function(){e.focus()}),e}function m(i){i.remove()}var g="moneykit.linkSessionToken",h=class{constructor(t={}){this.options={...t}}link(t,e,n,r){this.startLink(t,e,n,r)}relink(t,e,n,r){this.startRelink(t,e,n,r)}continue(t,e,n,r){if(window.opener){window.opener.postMessage({moneykit:!0,type:"link.resume",eventData:{redirectURL:t}},p);return}this.continueLink(t,e,n,r)}__linkDirect(t,e,n,r){this.startLink(t,e,n,r,{viewMode:"direct"})}__relinkDirect(t,e,n,r){this.startRelink(t,e,n,r,{viewMode:"direct"})}__continueDirect(t,e,n,r){this.continueLink(t,e,n,r,{viewMode:"direct"})}startLink(t,e,n,r,s){let l={...this.linkParametersFromOptions(),linkSessionToken:t,origin:window.location.origin,...s},a=c.stringifyUrl({url:`${p}/start`,query:l});localStorage.setItem(g,t),this.launch(a,e,n,r)}startRelink(t,e,n,r,s){let l={...this.linkParametersFromOptions(),linkSessionToken:t,origin:window.location.origin,...s},a=c.stringifyUrl({url:`${p}/relink`,query:l});localStorage.setItem(g,t),this.launch(a,e,n,r)}continueLink(t,e,n,r,s){let l=localStorage.getItem(g);l||console.warn("Unable to get MoneyKit link session token from local storage.");let a={...this.linkParametersFromOptions(),linkSessionToken:l,redirectURL:t,origin:window.location.origin,...s},o=c.stringifyUrl({url:`${p}/continue`,query:a});this.launch(o,e,n,r)}linkParametersFromOptions(){let t=this.options.applicationName??"",e=this.options.device??null,n=this.options.stepTimers??!0;return{applicationName:t,device:e,stepTimers:n,launcherVersion:d.version}}launch(t,e,n,r){let s=k(t,this.options.containerID),l=new AbortController,a=T(s,l,e,n,r,this.options.__onDemoEvent,this.options.theme);window.addEventListener("message",a,{signal:l.signal})}};function T(i,t,e,n,r,s,l){return a=>{if(a.origin!=p||!("moneykit"in a.data||"__moneykitDemo"in a.data))return;let o=a.data;switch(o.type){case"connect.started":l&&a.source?.postMessage({moneykit:!0,type:"connect.set_theme",data:{theme:l}},{targetOrigin:p});break;case"link.complete":e&&o.data.exchangeableToken&&e(o.data.exchangeableToken,o.data.institution),m(i),t.abort();break;case"relink.complete":e&&e(o.data.institution),m(i),t.abort();break;case"link.exit":m(i),n&&n(o.data.error),t.abort();break;case"link.close_oauth":window.close();break;case"link.event":r&&r(o.data);break;case"demo.link.event":s&&s(o.data);break}}}var y=h;var b=(o=>(o[o.largeTitle=0]="largeTitle",o[o.title1=1]="title1",o[o.title2=2]="title2",o[o.title3=3]="title3",o[o.body=4]="body",o[o.smallBody=5]="smallBody",o[o.button=6]="button",o[o.input=7]="input",o))(b||{}),v=(i,t)=>{switch(t){case 0:return i.typography.largeTitle;case 1:return i.typography.title1;case 2:return i.typography.title2;case 3:return i.typography.title3;case 5:return i.typography.smallBody;case 6:return i.typography.button;case 7:return i.typography.input;default:return i.typography.body}};var f={colors:{accent:"#0077ff",primaryBackground:{light:"#fff",dark:"#212124"},secondaryBackground:{light:"#f2f2f5",dark:"#212124"},primaryContent:{light:"#fff",dark:"#343438"},secondaryContent:{light:"#f5f5f5",dark:"#343438"},primaryForeground:{light:"#111",dark:"#fff"},secondaryForeground:{light:"rgba(67, 67, 76, 0.6)",dark:"rgba(235, 235, 245, 0.6)"},tertiaryForeground:{light:"rgba(67, 67, 76, 0.3)",dark:"rgba(235, 234, 244, 0.3)"},primaryFill:{light:"rgba(120, 120, 128, 0.2)",dark:"rgba(120, 120, 128, 0.36)"},secondaryFill:{light:"rgba(120, 120, 128, 0.16)",dark:"rgba(120, 120, 128, 0.32)"},tertiaryFill:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},success:{light:"#00ca32",dark:"#35DE5F"},warning:{light:"#ff9500",dark:"#FF9400"},error:{light:"#dd2424",dark:"#FA4242"},separator:{light:"rgba(60, 60, 67, 0.06)",dark:"rgba(84, 84, 88, 0.4)"},selection:{light:"rgba(120, 120, 128, 0.28)",dark:"rgba(120, 120, 128, 0.48)"}},typography:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif",largeTitle:{size:"34px",lineHeight:"41px",letterSpacing:"-0.01em",weight:700},title1:{size:"28px",lineHeight:"34px",letterSpacing:"0",weight:700},title2:{size:"22px",lineHeight:"28px",letterSpacing:"0",weight:700},title3:{size:"20px",lineHeight:"24px",letterSpacing:"0",weight:700},body:{size:"17px",lineHeight:"24px",letterSpacing:"-0.01em",weight:500},smallBody:{size:"11px",lineHeight:"16px",letterSpacing:"-0.0225em",weight:400},button:{size:"18px",lineHeight:"24px",letterSpacing:"-1%",weight:700},input:{size:"18px",lineHeight:"24px",letterSpacing:"0",weight:500}},images:{close:"/images/close.svg",search:"/images/search.svg",spinner:"/images/spinner.png"},spacing:{contentHorizontalInset:"28px",buttonHorizontalInset:"28px"},components:{navigationBar:{height:"64px"},contentView:{borderRadius:"12px",boxShadow:{light:"none",dark:"inset 0 0 0 1px rgba(228, 227, 243, 0.04)"},border:null,separatorStyle:"all_except_last"},button:{height:"44px",borderRadius:"12px",inheritInstitutionColor:!0},searchInput:{backgroundColor:{light:"rgba(118, 118, 128, 0.12)",dark:"rgba(118, 118, 128, 0.24)"},height:"48px",borderRadius:"12px",border:null,alignment:"center",focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},textField:{backgroundColor:null,height:"52px",borderRadius:"0px",boxShadow:null,focus:{glow:!0,backgroundColor:null,border:null,boxShadow:null}},progressSpinner:{strokeWidth:8,diameter:56,lineCap:"round"},icon:{strokeWidth:8,lineCap:"round"},separator:{height:"1px"}},screens:{finder:{title:"Connect Your Bank",subtitle:null,searchPlaceholder:"Search Banks",institutionCellBoxShadow:null,institutionCellBorderRadius:"12px",institutionCellBorder:{light:"1px solid rgba(60, 60, 67, 0.1)",dark:"1px solid rgba(84, 84, 88, 0.4)"},institutionCellSpacing:"16px",institutionCellBackgroundColor:{light:"#fff",dark:"#212124"}}},modal:{borderRadius:"20px",boxShadow:{light:"0px 2px 4px rgba(0, 0, 0, 0.1), 0 40px 80px rgba(0,0,0,.15)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"},overlayBackgroundColor:{light:"rgba(0, 0, 0, 0.4)",dark:"rgba(0, 0, 0, 0.75)"},overlayBackdropFilter:null},popover:{borderRadius:"24px",boxShadow:{light:"0px 0px 80px rgba(0, 0, 0, 0.16)",dark:"inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px black, 0px 6px 18px rgba(0, 0, 0, 0.3)"}}};var I=y;export{b as ThemeTypographyTextStyle,I as default,f as moneyui,v as themeTypographyStyleForTextStyle};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moneykit/connect",
3
3
  "description": "MoneyKit Connect launcher for web.",
4
- "version": "0.3.12",
4
+ "version": "0.3.14",
5
5
  "author": "MoneyKit",
6
6
  "repository": {
7
7
  "type": "git",
@@ -111,7 +111,7 @@ export type ThemeSpacing = {
111
111
  export type ThemeComponents = {
112
112
  navigationBar: ThemeComponentsNavigationBar;
113
113
  contentView: ThemeComponentsContentView;
114
- buttonPrimary: ThemeComponentsButton;
114
+ button: ThemeComponentsButton;
115
115
  searchInput: ThemeComponentsSearchInput;
116
116
  textField: ThemeComponentsTextField;
117
117
  progressSpinner: ThemeComponentsProgressSpinner;
@@ -131,6 +131,8 @@ export type ThemeComponentsButton = {
131
131
  height: ThemeSize;
132
132
  borderRadius: ThemeBorderRadius;
133
133
  inheritInstitutionColor: boolean;
134
+ continueTitle?: string;
135
+ doneTitle?: string;
134
136
  };
135
137
  export type ThemeComponentsSearchInput = {
136
138
  backgroundColor: ThemeDynamicColor | null;
@@ -1,5 +0,0 @@
1
- import { default as MoneyKit } from "./lib/connect-launcher";
2
- export * from "./lib/connect-launcher";
3
- export * from "./lib/connect-theme";
4
- export * from "./lib/moneyui";
5
- export default MoneyKit;
@@ -1,62 +0,0 @@
1
- import { type Theme } from "./connect-theme";
2
- export type Institution = {
3
- avatar: string | null;
4
- avatar_dark: string | null;
5
- color: string;
6
- color_dark: string | null;
7
- country: string;
8
- domain: string;
9
- id: string;
10
- logo: string | null;
11
- logo_dark: string | null;
12
- name: string;
13
- search_group: "primary" | "secondary" | "tertiary";
14
- };
15
- export type AccountType = "depository.cash" | "depository.checking" | "depository.savings" | "depository.prepaid" | "depository.other" | "credit_card" | "loan.general" | "loan.mortgage" | "loan.other" | "investment" | "other";
16
- export type LinkedInstitution = Institution & {
17
- selectedAccounts: {
18
- account_id: string;
19
- account_type: AccountType;
20
- name: string;
21
- account_mask: string | null;
22
- }[];
23
- trackedScreens: {
24
- tag: string;
25
- name: string;
26
- duration: number;
27
- }[];
28
- };
29
- export type MoneyKitDevice = "mobile" | "desktop" | "mobile-playground";
30
- export type MoneyKitOptions = {
31
- applicationName?: string;
32
- theme?: Theme;
33
- device?: MoneyKitDevice;
34
- stepTimers?: boolean;
35
- containerID?: string;
36
- __onDemoEvent?: LinkEventCallback;
37
- };
38
- export type LinkSuccessCallback = (exchangeableToken: string, institution: LinkedInstitution) => void;
39
- export type RelinkSuccessCallback = (institution: LinkedInstitution) => void;
40
- export type LinkExitCallback = (error: LinkExitError | null) => void;
41
- export type LinkEventCallback = (event: Record<string, unknown>) => void;
42
- export type LinkExitError = {
43
- error_id: string;
44
- displayed_message: string;
45
- request_id: string | null;
46
- };
47
- declare class MoneyKit {
48
- options: MoneyKitOptions;
49
- constructor(options?: MoneyKitOptions);
50
- link(linkSessionToken: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: LinkEventCallback): void;
51
- relink(linkSessionToken: string, onRelinkSuccess?: RelinkSuccessCallback, onRelinkExit?: LinkExitCallback, onRelinkEvent?: LinkEventCallback): void;
52
- continue(redirectURL: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: LinkEventCallback): void;
53
- __linkDirect(linkSessionToken: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: LinkEventCallback): void;
54
- __relinkDirect(linkSessionToken: string, onLinkSuccess?: RelinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: LinkEventCallback): void;
55
- __continueDirect(redirectURL: string, onLinkSuccess?: LinkSuccessCallback, onLinkExit?: LinkExitCallback, onLinkEvent?: LinkEventCallback): void;
56
- private startLink;
57
- private startRelink;
58
- private continueLink;
59
- private linkParametersFromOptions;
60
- private launch;
61
- }
62
- export default MoneyKit;
@@ -1,185 +0,0 @@
1
- export type Theme = {
2
- colors: ThemeColors;
3
- typography: ThemeTypography;
4
- images: ThemeImages;
5
- spacing: ThemeSpacing;
6
- components: ThemeComponents;
7
- screens: ThemeScreens;
8
- modal: ThemeModal;
9
- popover: ThemePopover;
10
- };
11
- export type ThemeAppearanceBasedValue<T> = {
12
- light: T;
13
- dark: T;
14
- };
15
- export type ThemeSize = string;
16
- export type ThemeFontFamily = string;
17
- export type ThemeBorderRadius = string;
18
- export type ThemeColor = string;
19
- export type ThemeDynamicColor = ThemeColor | ThemeAppearanceBasedValue<ThemeColor>;
20
- export type ThemeBoxShadow = string;
21
- export type ThemeDynamicBoxShadow = ThemeBoxShadow | ThemeAppearanceBasedValue<ThemeBoxShadow>;
22
- export type ThemeBorder = string;
23
- export type ThemeDynamicBorder = ThemeBorder | ThemeAppearanceBasedValue<ThemeBorder>;
24
- export type ThemeBackdropFilter = string;
25
- export type ThemeDynamicBackdropFilter = ThemeBackdropFilter | ThemeAppearanceBasedValue<ThemeBackdropFilter>;
26
- export type ThemeImageUrl = string;
27
- export type ThemeTransitionDuration = string | number;
28
- export type ThemeTransitionTimingFunction = string;
29
- export type ThemeTransform = string;
30
- export type ThemeOpacity = string | number;
31
- export type ThemeLineCap = "round" | "butt" | "square";
32
- export type ThemeSeparatorStyle = "all" | "all_except_last" | "none";
33
- export type ThemeModal = {
34
- borderRadius: ThemeBorderRadius | null;
35
- boxShadow: ThemeDynamicBoxShadow | null;
36
- overlayBackgroundColor: ThemeDynamicColor | null;
37
- overlayBackdropFilter: ThemeDynamicBackdropFilter | null;
38
- };
39
- export type ThemePopover = {
40
- borderRadius: ThemeBorderRadius | null;
41
- boxShadow: ThemeDynamicBoxShadow | null;
42
- };
43
- export type ThemeColors = {
44
- accent: ThemeDynamicColor;
45
- primaryBackground: ThemeDynamicColor;
46
- secondaryBackground: ThemeDynamicColor;
47
- primaryContent: ThemeDynamicColor;
48
- secondaryContent: ThemeDynamicColor;
49
- primaryForeground: ThemeDynamicColor;
50
- secondaryForeground: ThemeDynamicColor;
51
- tertiaryForeground: ThemeDynamicColor;
52
- primaryFill: ThemeDynamicColor;
53
- secondaryFill: ThemeDynamicColor;
54
- tertiaryFill: ThemeDynamicColor;
55
- success: ThemeDynamicColor;
56
- warning: ThemeDynamicColor;
57
- error: ThemeDynamicColor;
58
- separator: ThemeDynamicColor;
59
- selection: ThemeDynamicColor;
60
- };
61
- export type ThemeTypography = {
62
- fontFamily: ThemeFontFamily;
63
- largeTitle: ThemeTypographyStyle;
64
- title1: ThemeTypographyStyle;
65
- title2: ThemeTypographyStyle;
66
- title3: ThemeTypographyStyle;
67
- body: ThemeTypographyStyle;
68
- smallBody: ThemeTypographyStyle;
69
- button: ThemeTypographyStyle;
70
- input: ThemeTypographyStyle;
71
- };
72
- export type ThemeImages = {
73
- close?: ThemeImageUrl;
74
- search?: ThemeImageUrl;
75
- spinner?: ThemeImageUrl;
76
- radio?: ThemeImageUrl;
77
- radioChecked?: ThemeImageUrl;
78
- checkbox?: ThemeImageUrl;
79
- checkboxChecked?: ThemeImageUrl;
80
- verified?: ThemeImageUrl;
81
- permissionAccountNumbers?: ThemeImageUrl;
82
- permissionBalances?: ThemeImageUrl;
83
- permissionIdentity?: ThemeImageUrl;
84
- permissionTransactions?: ThemeImageUrl;
85
- mfaSms?: ThemeImageUrl;
86
- mfaEmail?: ThemeImageUrl;
87
- mfaPhone?: ThemeImageUrl;
88
- };
89
- export declare enum ThemeTypographyTextStyle {
90
- largeTitle = 0,
91
- title1 = 1,
92
- title2 = 2,
93
- title3 = 3,
94
- body = 4,
95
- smallBody = 5,
96
- button = 6,
97
- input = 7
98
- }
99
- export type ThemeTypographyStyle = {
100
- fontFamily?: ThemeFontFamily;
101
- size: string;
102
- lineHeight: string;
103
- letterSpacing: string;
104
- weight: ThemeTypographyWeight;
105
- };
106
- export type ThemeTypographyWeight = "normal" | "bold" | "lighter" | "bolder" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "inherit" | "initial" | "revert" | "revert-layer" | "unset";
107
- export type ThemeSpacing = {
108
- contentHorizontalInset: string;
109
- buttonHorizontalInset: string;
110
- };
111
- export type ThemeComponents = {
112
- navigationBar: ThemeComponentsNavigationBar;
113
- contentView: ThemeComponentsContentView;
114
- buttonPrimary: ThemeComponentsButton;
115
- searchInput: ThemeComponentsSearchInput;
116
- textField: ThemeComponentsTextField;
117
- progressSpinner: ThemeComponentsProgressSpinner;
118
- icon: ThemeComponentsIcon;
119
- separator: ThemeComponentsSeparator;
120
- };
121
- export type ThemeComponentsNavigationBar = {
122
- height: string;
123
- };
124
- export type ThemeComponentsContentView = {
125
- borderRadius: ThemeBorderRadius;
126
- boxShadow: ThemeDynamicBoxShadow | null;
127
- border: ThemeDynamicBorder | null;
128
- separatorStyle: ThemeSeparatorStyle;
129
- };
130
- export type ThemeComponentsButton = {
131
- height: ThemeSize;
132
- borderRadius: ThemeBorderRadius;
133
- inheritInstitutionColor: boolean;
134
- };
135
- export type ThemeComponentsSearchInput = {
136
- backgroundColor: ThemeDynamicColor | null;
137
- height: ThemeSize;
138
- borderRadius: ThemeBorderRadius;
139
- border: ThemeDynamicBorder | null;
140
- alignment: "left" | "center";
141
- focus: {
142
- glow: boolean;
143
- backgroundColor: ThemeDynamicColor | null;
144
- border: ThemeDynamicBorder | null;
145
- boxShadow: ThemeDynamicBoxShadow | null;
146
- };
147
- };
148
- export type ThemeComponentsTextField = {
149
- backgroundColor: ThemeDynamicColor | null;
150
- height: ThemeSize;
151
- borderRadius: ThemeBorderRadius;
152
- boxShadow: ThemeDynamicBoxShadow | null;
153
- focus: {
154
- glow: boolean;
155
- backgroundColor: ThemeDynamicColor | null;
156
- border: ThemeDynamicBorder | null;
157
- boxShadow: ThemeDynamicBoxShadow | null;
158
- };
159
- };
160
- export type ThemeComponentsProgressSpinner = {
161
- strokeWidth: number;
162
- diameter: number;
163
- lineCap: ThemeLineCap;
164
- };
165
- export type ThemeComponentsIcon = {
166
- strokeWidth: number;
167
- lineCap: ThemeLineCap;
168
- };
169
- export type ThemeComponentsSeparator = {
170
- height: ThemeSize;
171
- };
172
- export type ThemeScreens = {
173
- finder: ThemeScreensFinder;
174
- };
175
- export type ThemeScreensFinder = {
176
- title: string;
177
- subtitle: string | null;
178
- searchPlaceholder: string;
179
- institutionCellBoxShadow: ThemeDynamicBoxShadow | null;
180
- institutionCellBorderRadius: ThemeBorderRadius;
181
- institutionCellBorder: ThemeDynamicBorder | null;
182
- institutionCellSpacing: string;
183
- institutionCellBackgroundColor: ThemeDynamicColor | null;
184
- };
185
- export declare const themeTypographyStyleForTextStyle: (theme: Theme, textStyle: ThemeTypographyTextStyle) => ThemeTypographyStyle;
@@ -1,2 +0,0 @@
1
- import { Theme } from "./connect-theme";
2
- export declare const moneyui: Theme;