@primer-io/primer-js 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/custom-elements.json +1779 -3073
- package/dist/jsx/index.d.ts +37 -66
- package/dist/primer-loader.d.ts +1079 -1539
- package/dist/primer-loader.js +37 -49
- package/dist/vscode.html-custom-data.json +30 -36
- package/dist/web-types.json +73 -82
- package/package.json +1 -1
package/dist/jsx/index.d.ts
CHANGED
|
@@ -367,6 +367,17 @@ export type PrimerKlarnaComponentProps = {
|
|
|
367
367
|
primerContext?: ContextType | undefined;
|
|
368
368
|
};
|
|
369
369
|
|
|
370
|
+
export type NativePaymentComponentProps = {
|
|
371
|
+
/** */
|
|
372
|
+
type?: PaymentMethodType | undefined;
|
|
373
|
+
/** */
|
|
374
|
+
paymentMethod?: NativePaymentMethod | undefined;
|
|
375
|
+
/** */
|
|
376
|
+
disabled?: boolean;
|
|
377
|
+
/** */
|
|
378
|
+
primerContext?: ContextType | undefined;
|
|
379
|
+
};
|
|
380
|
+
|
|
370
381
|
export type PaymentMethodComponentProps = {
|
|
371
382
|
/** */
|
|
372
383
|
type?: PaymentMethodType | undefined;
|
|
@@ -386,6 +397,9 @@ export type PaymentMethodAccordionComponentProps = {
|
|
|
386
397
|
/** When true, suppresses auto-collapse on window blur.
|
|
387
398
|
Used when payment flows open external popups (e.g. Klarna). */
|
|
388
399
|
"suppress-blur-collapse"?: boolean;
|
|
400
|
+
/** When true, the accordion ignores every collapse trigger (button toggle,
|
|
401
|
+
outside click, window blur). */
|
|
402
|
+
loading?: boolean;
|
|
389
403
|
|
|
390
404
|
/** */
|
|
391
405
|
"onexpanded-change"?: (e: CustomEvent<CustomEvent>) => void;
|
|
@@ -448,6 +462,15 @@ export type PrimerMainComponentProps = {
|
|
|
448
462
|
primerContext?: ContextType | undefined;
|
|
449
463
|
};
|
|
450
464
|
|
|
465
|
+
export type QRCodeComponentProps = {
|
|
466
|
+
/** */
|
|
467
|
+
paymentMethod?: QRCodePaymentMethod | undefined;
|
|
468
|
+
/** */
|
|
469
|
+
disabled?: boolean;
|
|
470
|
+
/** */
|
|
471
|
+
primerContext?: ContextType | undefined;
|
|
472
|
+
};
|
|
473
|
+
|
|
451
474
|
export type RedirectPaymentComponentProps = {
|
|
452
475
|
/** */
|
|
453
476
|
paymentMethod?: RedirectPaymentMethod | undefined;
|
|
@@ -582,33 +605,6 @@ Falls back to localized default if not explicitly set. */
|
|
|
582
605
|
primerContext?: ContextType | undefined;
|
|
583
606
|
};
|
|
584
607
|
|
|
585
|
-
export type ApplePayComponentProps = {
|
|
586
|
-
/** */
|
|
587
|
-
paymentMethod?: NativePaymentMethod | undefined;
|
|
588
|
-
/** */
|
|
589
|
-
disabled?: boolean;
|
|
590
|
-
/** */
|
|
591
|
-
primerContext?: ContextType | undefined;
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
export type GooglePayComponentProps = {
|
|
595
|
-
/** */
|
|
596
|
-
paymentMethod?: NativePaymentMethod | undefined;
|
|
597
|
-
/** */
|
|
598
|
-
disabled?: boolean;
|
|
599
|
-
/** */
|
|
600
|
-
primerContext?: ContextType | undefined;
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
export type PayPalComponentProps = {
|
|
604
|
-
/** */
|
|
605
|
-
paymentMethod?: NativePaymentMethod | undefined;
|
|
606
|
-
/** */
|
|
607
|
-
disabled?: boolean;
|
|
608
|
-
/** */
|
|
609
|
-
primerContext?: ContextType | undefined;
|
|
610
|
-
};
|
|
611
|
-
|
|
612
608
|
export type PaymentMethodContentComponentProps = {
|
|
613
609
|
/** The asset configuration containing icon and display data */
|
|
614
610
|
assetConfig?: AssetConfig | null;
|
|
@@ -988,6 +984,13 @@ export type CustomElements = {
|
|
|
988
984
|
*/
|
|
989
985
|
"primer-klarna": Partial<PrimerKlarnaComponentProps & BaseProps & BaseEvents>;
|
|
990
986
|
|
|
987
|
+
/**
|
|
988
|
+
*
|
|
989
|
+
* ---
|
|
990
|
+
*
|
|
991
|
+
*/
|
|
992
|
+
"primer-native-payment": Partial<NativePaymentComponentProps & BaseProps & BaseEvents>;
|
|
993
|
+
|
|
991
994
|
/**
|
|
992
995
|
*
|
|
993
996
|
* ---
|
|
@@ -1054,6 +1057,13 @@ export type CustomElements = {
|
|
|
1054
1057
|
*/
|
|
1055
1058
|
"primer-main": Partial<PrimerMainComponentProps & BaseProps & BaseEvents>;
|
|
1056
1059
|
|
|
1060
|
+
/**
|
|
1061
|
+
*
|
|
1062
|
+
* ---
|
|
1063
|
+
*
|
|
1064
|
+
*/
|
|
1065
|
+
"primer-qrcode": Partial<QRCodeComponentProps & BaseProps & BaseEvents>;
|
|
1066
|
+
|
|
1057
1067
|
/**
|
|
1058
1068
|
*
|
|
1059
1069
|
* ---
|
|
@@ -1182,45 +1192,6 @@ export type CustomElements = {
|
|
|
1182
1192
|
*/
|
|
1183
1193
|
"primer-input-cvv": Partial<InputCvvComponentProps & BaseProps & BaseEvents>;
|
|
1184
1194
|
|
|
1185
|
-
/**
|
|
1186
|
-
* Apple Pay component with standard button container rendering.
|
|
1187
|
-
*
|
|
1188
|
-
* Apple Pay uses the standard button container approach:
|
|
1189
|
-
* - Renders to a button container div (not shadow root)
|
|
1190
|
-
* - Passes buttonHeight in render options
|
|
1191
|
-
* - Uses updateOverlayForContainer for disabled state
|
|
1192
|
-
* - Simpler than Google Pay's shadow root approach
|
|
1193
|
-
* ---
|
|
1194
|
-
*
|
|
1195
|
-
*/
|
|
1196
|
-
"primer-apple-pay": Partial<ApplePayComponentProps & BaseProps & BaseEvents>;
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Google Pay component with shadow root rendering for full-width button support.
|
|
1200
|
-
*
|
|
1201
|
-
* Google Pay requires special rendering logic:
|
|
1202
|
-
* - Renders directly to shadow root (not button container)
|
|
1203
|
-
* - Does NOT render .native-button-container div
|
|
1204
|
-
* - Passes shadowRoot: true in render options
|
|
1205
|
-
* - Requires retry logic for async button rendering
|
|
1206
|
-
* ---
|
|
1207
|
-
*
|
|
1208
|
-
*/
|
|
1209
|
-
"primer-google-pay": Partial<GooglePayComponentProps & BaseProps & BaseEvents>;
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* PayPal component with standard button container rendering.
|
|
1213
|
-
*
|
|
1214
|
-
* PayPal uses the standard button container approach:
|
|
1215
|
-
* - Renders to a button container div (not shadow root)
|
|
1216
|
-
* - Passes buttonHeight in render options (sdk-core constrains to 25-55px)
|
|
1217
|
-
* - Uses updateOverlayForContainer for disabled state
|
|
1218
|
-
* - Height is calculated from CSS (PAYMENT_METHOD_LINE_HEIGHT + padding)
|
|
1219
|
-
* ---
|
|
1220
|
-
*
|
|
1221
|
-
*/
|
|
1222
|
-
"primer-paypal": Partial<PayPalComponentProps & BaseProps & BaseEvents>;
|
|
1223
|
-
|
|
1224
1195
|
/**
|
|
1225
1196
|
* PaymentMethodContentComponent - renders payment method information with icon and details
|
|
1226
1197
|
* This component encapsulates the display logic and styles for payment method content
|