@stripe/connect-js 2.0.1-beta.4 → 2.0.1-beta.6

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.
@@ -2,7 +2,8 @@ const componentNameMapping = {
2
2
  payments: "stripe-connect-payments",
3
3
  payouts: "stripe-connect-payouts",
4
4
  "payment-details": "stripe-connect-payment-details",
5
- "account-onboarding": "stripe-connect-account-onboarding"
5
+ "account-onboarding": "stripe-connect-account-onboarding",
6
+ "payment-method-settings": "stripe-connect-payment-method-settings"
6
7
  };
7
8
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
8
9
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
@@ -78,7 +79,7 @@ const createWrapper = stripeConnect => {
78
79
  sdk: true,
79
80
  sdkOptions: {
80
81
  // This will be replaced by the npm package version when bundling
81
- sdkVersion: "2.0.1-beta.4"
82
+ sdkVersion: "2.0.1-beta.5"
82
83
  }
83
84
  })
84
85
  }));
package/dist/connect.js CHANGED
@@ -6,7 +6,8 @@ const componentNameMapping = {
6
6
  payments: "stripe-connect-payments",
7
7
  payouts: "stripe-connect-payouts",
8
8
  "payment-details": "stripe-connect-payment-details",
9
- "account-onboarding": "stripe-connect-account-onboarding"
9
+ "account-onboarding": "stripe-connect-account-onboarding",
10
+ "payment-method-settings": "stripe-connect-payment-method-settings"
10
11
  };
11
12
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
12
13
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
@@ -82,7 +83,7 @@ const createWrapper = stripeConnect => {
82
83
  sdk: true,
83
84
  sdkOptions: {
84
85
  // This will be replaced by the npm package version when bundling
85
- sdkVersion: "2.0.1-beta.4"
86
+ sdkVersion: "2.0.1-beta.5"
86
87
  }
87
88
  })
88
89
  }));
package/dist/pure.esm.js CHANGED
@@ -2,7 +2,8 @@ const componentNameMapping = {
2
2
  payments: "stripe-connect-payments",
3
3
  payouts: "stripe-connect-payouts",
4
4
  "payment-details": "stripe-connect-payment-details",
5
- "account-onboarding": "stripe-connect-account-onboarding"
5
+ "account-onboarding": "stripe-connect-account-onboarding",
6
+ "payment-method-settings": "stripe-connect-payment-method-settings"
6
7
  };
7
8
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
8
9
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
@@ -78,7 +79,7 @@ const createWrapper = stripeConnect => {
78
79
  sdk: true,
79
80
  sdkOptions: {
80
81
  // This will be replaced by the npm package version when bundling
81
- sdkVersion: "2.0.1-beta.4"
82
+ sdkVersion: "2.0.1-beta.5"
82
83
  }
83
84
  })
84
85
  }));
package/dist/pure.js CHANGED
@@ -6,7 +6,8 @@ const componentNameMapping = {
6
6
  payments: "stripe-connect-payments",
7
7
  payouts: "stripe-connect-payouts",
8
8
  "payment-details": "stripe-connect-payment-details",
9
- "account-onboarding": "stripe-connect-account-onboarding"
9
+ "account-onboarding": "stripe-connect-account-onboarding",
10
+ "payment-method-settings": "stripe-connect-payment-method-settings"
10
11
  };
11
12
  const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
12
13
  const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
@@ -82,7 +83,7 @@ const createWrapper = stripeConnect => {
82
83
  sdk: true,
83
84
  sdkOptions: {
84
85
  // This will be replaced by the npm package version when bundling
85
- sdkVersion: "2.0.1-beta.4"
86
+ sdkVersion: "2.0.1-beta.5"
86
87
  }
87
88
  })
88
89
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/connect-js",
3
- "version": "2.0.1-beta.4",
3
+ "version": "2.0.1-beta.6",
4
4
  "description": "Connect.js loading utility package",
5
5
  "main": "dist/connect.js",
6
6
  "module": "dist/connect.esm.js",
package/src/shared.ts CHANGED
@@ -10,7 +10,8 @@ type ConnectElementHTMLName =
10
10
  | "stripe-connect-payments"
11
11
  | "stripe-connect-payouts"
12
12
  | "stripe-connect-payment-details"
13
- | "stripe-connect-account-onboarding";
13
+ | "stripe-connect-account-onboarding"
14
+ | "stripe-connect-payment-method-settings";
14
15
 
15
16
  const componentNameMapping: Record<
16
17
  ConnectElementTagName,
@@ -19,7 +20,8 @@ const componentNameMapping: Record<
19
20
  payments: "stripe-connect-payments",
20
21
  payouts: "stripe-connect-payouts",
21
22
  "payment-details": "stripe-connect-payment-details",
22
- "account-onboarding": "stripe-connect-account-onboarding"
23
+ "account-onboarding": "stripe-connect-account-onboarding",
24
+ "payment-method-settings": "stripe-connect-payment-method-settings"
23
25
  };
24
26
 
25
27
  const EXISTING_SCRIPT_MESSAGE =
package/types/shared.d.ts CHANGED
@@ -6,114 +6,342 @@ export declare type OverlayOption = "dialog" | "drawer";
6
6
  * Appearance options for the Connect instance.
7
7
  */
8
8
  export declare type AppearanceOptions = {
9
+ /**
10
+ * The type of overlay used throughout the Connect.js design system. Set this to be either a Dialog or Drawer.
11
+ */
9
12
  overlays?: OverlayOption;
10
13
  variables?: AppearanceVariables;
11
14
  };
12
15
 
13
16
  export declare type AppearanceVariables = {
17
+ // Commonly used
18
+
19
+ /**
20
+ * The font family value used throughout embedded components. If an embedded component inherits a font-family value from an element on your site in which it’s placed, this setting overrides that inheritance.
21
+ */
22
+ fontFamily?: string;
23
+
24
+ /**
25
+ * The baseline font size set on the embedded component root. This scales the value of other font size variables. This supports pixel values only.
26
+ */
27
+ fontSizeBase?: string;
28
+
29
+ /**
30
+ * The base spacing unit that derives all spacing values. Increase or decrease this value to make your layout more or less spacious. This supports pixel values only.
31
+ */
32
+ spacingUnit?: string;
33
+
34
+ /**
35
+ * The general border radius used in embedded components. This sets the default border radius for all components. This supports pixel values only.
36
+ */
37
+ borderRadius?: string;
38
+
39
+ /**
40
+ * The primary color used throughout embedded components. Set this to your primary brand color. This accepts hex values or RGB/HSL strings.
41
+ */
14
42
  colorPrimary?: string;
43
+
44
+ /**
45
+ * The background color for embedded components, including overlays, tooltips, and popovers. This accepts hex values or RGB/HSL strings.
46
+ */
47
+ colorBackground?: string;
48
+
49
+ /**
50
+ * The color used for regular text. This accepts hex values or RGB/HSL strings.
51
+ */
52
+ colorText?: string;
53
+
54
+ /**
55
+ * The color used to indicate errors or destructive actions. This accepts hex values or RGB/HSL strings.
56
+ */
57
+ colorDanger?: string;
58
+
59
+ // Less commonly used
60
+
15
61
  // Primary Button
16
- buttonPrimaryColorBorder?: string;
62
+ /**
63
+ * The color used as a background for primary buttons. This accepts hex values or RGB/HSL strings.
64
+ */
17
65
  buttonPrimaryColorBackground?: string;
66
+ /**
67
+ * The border color used for primary buttons. This accepts hex values or RGB/HSL strings.
68
+ */
69
+ buttonPrimaryColorBorder?: string;
70
+ /**
71
+ * The text color used for primary buttons. This accepts hex values or RGB/HSL strings.
72
+ */
18
73
  buttonPrimaryColorText?: string;
74
+
19
75
  // Secondary Button
20
- buttonSecondaryColorBorder?: string;
76
+ /**
77
+ * The color used as a background for secondary buttons. This accepts hex values or RGB/HSL strings.
78
+ */
21
79
  buttonSecondaryColorBackground?: string;
80
+ /**
81
+ * The color used as a border for secondary buttons. This accepts hex values or RGB/HSL strings.
82
+ */
83
+ buttonSecondaryColorBorder?: string;
84
+ /**
85
+ * The text color used for secondary buttons. This accepts hex values or RGB/HSL strings.
86
+ */
22
87
  buttonSecondaryColorText?: string;
23
- // Link
88
+
89
+ /**
90
+ * The color used for secondary text. This accepts hex values or RGB/RGBA/HSL strings.
91
+ */
92
+ colorSecondaryText?: string;
93
+ /**
94
+ * The color used for primary actions and links. This accepts hex values or RGB/HSL strings.
95
+ */
24
96
  actionPrimaryColorText?: string;
97
+ /**
98
+ * The color used for secondary actions and links. This accepts hex values or RGB/HSL strings.
99
+ */
25
100
  actionSecondaryColorText?: string;
26
- // Border
27
- colorBorder?: string;
28
- // Form
29
- formHighlightColorBorder?: string;
30
- formAccentColor?: string;
31
- // Text
32
- colorText?: string;
33
- colorSecondaryText?: string;
34
- // Background
35
- colorBackground?: string;
36
- offsetBackgroundColor?: string;
37
- formBackgroundColor?: string;
38
-
39
- // Feedback Colors
40
- colorDanger?: string;
41
101
 
42
102
  // Neutral Badge Colors
43
- badgeNeutralColorBorder?: string;
103
+ /**
104
+ * The background color used to represent neutral state or lack of state in status badges. This accepts hex values or RGB/HSL strings.
105
+ */
44
106
  badgeNeutralColorBackground?: string;
107
+ /**
108
+ * The text color used to represent neutral state or lack of state in status badges. This accepts hex values or RGB/HSL strings.
109
+ */
45
110
  badgeNeutralColorText?: string;
111
+ /**
112
+ * The border color used to represent neutral state or lack of state in status badges. This accepts hex values or RGB/RGBA/HSL strings.
113
+ */
114
+ badgeNeutralColorBorder?: string;
46
115
 
47
116
  // Success Badge Colors
48
- badgeSuccessColorBorder?: string;
117
+ /**
118
+ * The background color used to reinforce a successful outcome in status badges. This accepts hex values or RGB/HSL strings.
119
+ */
49
120
  badgeSuccessColorBackground?: string;
121
+ /**
122
+ * The text color used to reinforce a successful outcome in status badges. This accepts hex values or RGB/HSL strings.
123
+ */
50
124
  badgeSuccessColorText?: string;
125
+ /**
126
+ * The border color used to reinforce a successful outcome in status badges. This accepts hex values or RGB/RGBA/HSL strings.
127
+ */
128
+ badgeSuccessColorBorder?: string;
51
129
 
52
130
  // Warning Badge Colors
53
- badgeWarningColorBorder?: string;
131
+ /**
132
+ * The background color used in status badges to highlight things that might require action, but are optional to resolve. This accepts hex values or RGB/HSL strings.
133
+ */
54
134
  badgeWarningColorBackground?: string;
135
+ /**
136
+ * The text color used in status badges to highlight things that might require action, but are optional to resolve. This accepts hex values or RGB/HSL strings.
137
+ */
55
138
  badgeWarningColorText?: string;
139
+ /**
140
+ * The border color used in status badges to highlight things that might require action, but are optional to resolve. This accepts hex values or RGB/RGBA/HSL strings.
141
+ */
142
+ badgeWarningColorBorder?: string;
56
143
 
57
144
  // Danger Badge Colors
58
- badgeDangerColorBorder?: string;
145
+ /**
146
+ * The background color used in status badges for high-priority, critical situations that the user must address immediately, and to indicate failed or unsuccessful outcomes. This accepts hex values or RGB/HSL strings.
147
+ */
59
148
  badgeDangerColorBackground?: string;
149
+ /**
150
+ * The text color used in status badges for high-priority, critical situations that the user must address immediately, and to indicate failed or unsuccessful outcomes. This accepts hex values or RGB/HSL strings.
151
+ */
60
152
  badgeDangerColorText?: string;
153
+ /**
154
+ * The border color used in status badges for high-priority, critical situations that the user must address immediately, and to indicate failed or unsuccessful outcomes. This accepts hex values or RGB/RGBA/HSL strings.
155
+ */
156
+ badgeDangerColorBorder?: string;
157
+
158
+ // Background
159
+ /**
160
+ * The background color used when highlighting information, like the selected row on a table or particular piece of UI. This accepts hex values or RGB/HSL strings.
161
+ */
162
+ offsetBackgroundColor?: string;
163
+ /**
164
+ * The background color used for form items. This accepts hex values or RGB/HSL strings.
165
+ */
166
+ formBackgroundColor?: string;
167
+
168
+ /**
169
+ * The color used for borders throughout the component. This accepts hex values or RGB/RGBA/HSL strings.
170
+ */
171
+ colorBorder?: string;
172
+
173
+ // Form
174
+ /**
175
+ * The color used to highlight form items when focused. This accepts hex values or RGB/RGBA/HSL strings.
176
+ */
177
+ formHighlightColorBorder?: string;
178
+ /**
179
+ * The color used for to fill in form items like checkboxes, radio buttons and switches. This accepts hex values or RGB/HSL strings.
180
+ */
181
+ formAccentColor?: string;
61
182
 
62
183
  // Border Sizing
63
- borderRadius?: string;
184
+ /**
185
+ * The border radius used for buttons. This supports pixel values only.
186
+ */
64
187
  buttonBorderRadius?: string;
188
+ /**
189
+ * The border radius used for form elements. This supports pixel values only.
190
+ */
65
191
  formBorderRadius?: string;
192
+ /**
193
+ * The border radius used for badges. This supports pixel values only.
194
+ */
66
195
  badgeBorderRadius?: string;
196
+ /**
197
+ * The border radius used for overlays. This supports pixel values only.
198
+ */
67
199
  overlayBorderRadius?: string;
68
200
 
69
- // Overlay
70
- overlayZIndex?: number;
71
-
72
201
  // Font Sizing
73
- fontSizeBase?: string;
74
202
 
75
- // Spacing
76
- spacingUnit?: string;
203
+ // Overlay
204
+ /**
205
+ * A z-index to use for the overlay throughout embedded components. Set this number to control the z-order of the overlay.
206
+ */
207
+ overlayZIndex?: number;
77
208
 
78
209
  // Body Typography
210
+ /**
211
+ * The font size for the large body typography. Body typography variables accept a valid font size value.
212
+ */
79
213
  bodyLgFontSize?: string;
214
+ /**
215
+ * The font weight for the large body typography. Body typography variables accept a valid font weight value.
216
+ */
80
217
  bodyLgFontWeight?: string;
218
+ /**
219
+ * The font size for the medium body typography. Body typography variables accept a valid font size value.
220
+ */
81
221
  bodyMdFontSize?: string;
222
+ /**
223
+ * The font weight for the medium body typography. Body typography variables accept a valid font weight value.
224
+ */
82
225
  bodyMdFontWeight?: string;
226
+ /**
227
+ * The font size for the small body typography. Body typography variables accept a valid font size value.
228
+ */
83
229
  bodySmFontSize?: string;
230
+ /**
231
+ * The font weight for the small body typography. Body typography variables accept a valid font weight value.
232
+ */
84
233
  bodySmFontWeight?: string;
85
234
 
86
- // Label Typography
87
- labelLgFontSize?: string;
88
- labelLgFontWeight?: string;
89
- labelLgTextTransform?: string;
90
- labelMdFontSize?: string;
91
- labelMdFontWeight?: string;
92
- labelMdTextTransform?: string;
93
- labelSmFontSize?: string;
94
- labelSmFontWeight?: string;
95
- labelSmTextTransform?: string;
96
-
97
235
  // Heading Typography
236
+ /**
237
+ * The font size for the extra large heading typography. Heading typography variables accept a valid font size value.
238
+ */
98
239
  headingXlFontSize?: string;
240
+ /**
241
+ * The font weight for the extra large heading typography. Heading typography variables accept a valid font weight value.
242
+ */
99
243
  headingXlFontWeight?: string;
244
+ /**
245
+ * The text transform for the extra large heading typography. Heading typography variables accept a valid text transform value.
246
+ */
100
247
  headingXlTextTransform?: string;
248
+ /**
249
+ * The font size for the large heading typography. Heading typography variables accept a valid font size value.
250
+ */
101
251
  headingLgFontSize?: string;
252
+ /**
253
+ * The font weight for the large heading typography. Heading typography variables accept a valid font weight value.
254
+ */
102
255
  headingLgFontWeight?: string;
256
+ /**
257
+ * The text transform for the large heading typography. Heading typography variables accept a valid text transform value.
258
+ */
103
259
  headingLgTextTransform?: string;
260
+ /**
261
+ * The font size for the medium heading typography. Heading typography variables accept a valid font size value.
262
+ */
104
263
  headingMdFontSize?: string;
264
+ /**
265
+ * The font weight for the medium heading typography. Heading typography variables accept a valid font weight value.
266
+ */
105
267
  headingMdFontWeight?: string;
268
+ /**
269
+ * The text transform for the medium heading typography. Heading typography variables accept a valid text transform value.
270
+ */
106
271
  headingMdTextTransform?: string;
272
+ /**
273
+ * The font size for the small heading typography. Heading typography variables accept a valid font size value.
274
+ */
107
275
  headingSmFontSize?: string;
276
+ /**
277
+ * The font weight for the small heading typography. Heading typography variables accept a valid font weight value.
278
+ */
108
279
  headingSmFontWeight?: string;
280
+ /**
281
+ * The text transform for the small heading typography. Heading typography variables accept a valid text transform value.
282
+ */
109
283
  headingSmTextTransform?: string;
284
+ /**
285
+ * The font size for the extra small heading typography. Heading typography variables accept a valid font size value.
286
+ */
110
287
  headingXsFontSize?: string;
288
+ /**
289
+ * The font weight for the extra small heading typography. Heading typography variables accept a valid font weight value.
290
+ */
111
291
  headingXsFontWeight?: string;
292
+ /**
293
+ * The text transform for the extra small heading typography. Heading typography variables accept a valid text transform value.
294
+ */
112
295
  headingXsTextTransform?: string;
296
+
297
+ // Label Typography
298
+ /**
299
+ * The font size for the large label typography. Label typography variables accept a valid font size value.
300
+ */
301
+ labelLgFontSize?: string;
302
+ /**
303
+ * The font weight for the large label typography. Label typography variables accept a valid font weight value.
304
+ */
305
+ labelLgFontWeight?: string;
306
+ /**
307
+ * The text transform for the large label typography. Label typography variables accept a valid text transform value.
308
+ */
309
+ labelLgTextTransform?: string;
310
+ /**
311
+ * The font size for the medium label typography. Label typography variables accept a valid font size value.
312
+ */
313
+ labelMdFontSize?: string;
314
+ /**
315
+ * The font weight for the medium label typography. Label typography variables accept a valid font weight value.
316
+ */
317
+ labelMdFontWeight?: string;
318
+ /**
319
+ * The text transform for the medium label typography. Label typography variables accept a valid text transform value.
320
+ */
321
+ labelMdTextTransform?: string;
322
+ /**
323
+ * The font size for the small label typography. Label typography variables accept a valid font size value.
324
+ */
325
+ labelSmFontSize?: string;
326
+ /**
327
+ * The font weight for the small label typography. Label typography variables accept a valid font weight value.
328
+ */
329
+ labelSmFontWeight?: string;
330
+ /**
331
+ * The text transform for the small label typography. Label typography variables accept a valid text transform value.
332
+ */
333
+ labelSmTextTransform?: string;
113
334
  };
114
335
 
115
336
  export type IStripeConnectUpdateParams = {
337
+ /**
338
+ * Appearance options for the Connect instance.
339
+ */
116
340
  appearance?: AppearanceOptions;
341
+
342
+ /**
343
+ * The locale to use for the Connect instance.
344
+ */
117
345
  locale?: string;
118
346
  };
119
347
 
@@ -185,7 +413,8 @@ export type ConnectElementTagName =
185
413
  | "payments"
186
414
  | "payouts"
187
415
  | "payment-details"
188
- | "account-onboarding";
416
+ | "account-onboarding"
417
+ | "payment-method-settings";
189
418
 
190
419
  export declare const findScript: () => HTMLScriptElement | null;
191
420
 
File without changes