@primer-io/primer-js 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +2798 -1268
- package/dist/jsx/index.d.ts +96 -6
- package/dist/primer-loader.d.ts +243 -39
- package/dist/primer-loader.js +754 -265
- package/dist/vscode.html-custom-data.json +45 -5
- package/dist/web-types.json +111 -10
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"name": "primer-checkout",
|
|
7
7
|
"description": "PrimerCheckoutComponent implements the main checkout experience.\nThis component includes a CSS-only loader that displays before the JavaScript\nis fully loaded, ensuring users see a loading indicator immediately.\n\nThe loader can be disabled by:\n1. Adding the 'loader-disabled' attribute to the component\n2. Setting the CSS custom property --primer-loader-disabled: 1\n---\n",
|
|
8
8
|
"attributes": [
|
|
9
|
-
{ "name": "
|
|
10
|
-
{ "name": "
|
|
9
|
+
{ "name": "customStyles", "values": [] },
|
|
10
|
+
{ "name": "clientToken", "values": [] },
|
|
11
11
|
{ "name": "options", "values": [{ "name": "PrimerCheckoutOptions" }] },
|
|
12
12
|
{
|
|
13
|
-
"name": "
|
|
13
|
+
"name": "_jsInitialized",
|
|
14
14
|
"description": "Whether the component has completed initialization and loading\nThis is used to control the CSS-only loader visibility",
|
|
15
15
|
"values": []
|
|
16
16
|
}
|
|
@@ -105,6 +105,12 @@
|
|
|
105
105
|
],
|
|
106
106
|
"references": []
|
|
107
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"name": "primer-dialog",
|
|
110
|
+
"description": "\n---\n\n\n### **Events:**\n - **primer-dialog-close**",
|
|
111
|
+
"attributes": [],
|
|
112
|
+
"references": []
|
|
113
|
+
},
|
|
108
114
|
{
|
|
109
115
|
"name": "primer-error-message",
|
|
110
116
|
"description": "A reusable atomic error message component that displays error information\nwith appropriate styling and accessibility attributes.\n\nThis component is fully accessible and designed to work with screen readers.\nIt includes animations for visibility transitions.\n---\n\n\n### **CSS Parts:**\n - **error-message** - The main error message container\n- **error-icon** - The error icon container\n- **error-content** - The error text content",
|
|
@@ -209,6 +215,12 @@
|
|
|
209
215
|
],
|
|
210
216
|
"references": []
|
|
211
217
|
},
|
|
218
|
+
{
|
|
219
|
+
"name": "primer-portal",
|
|
220
|
+
"description": "\n---\n\n\n### **Events:**\n - **eventName**",
|
|
221
|
+
"attributes": [],
|
|
222
|
+
"references": []
|
|
223
|
+
},
|
|
212
224
|
{
|
|
213
225
|
"name": "primer-spinner",
|
|
214
226
|
"description": "Spinner component with configurable size and color\nAdapted to work both standalone and within input components\n---\n",
|
|
@@ -231,6 +243,17 @@
|
|
|
231
243
|
],
|
|
232
244
|
"references": []
|
|
233
245
|
},
|
|
246
|
+
{
|
|
247
|
+
"name": "primer-ach-payment",
|
|
248
|
+
"description": "\n---\n\n\n### **Events:**\n - **primer-ach-error**\n- **primer-ach-bank-details-collected**\n- **primer-ach-mandate-confirmed**\n- **primer-ach-mandate-declined**",
|
|
249
|
+
"attributes": [
|
|
250
|
+
{
|
|
251
|
+
"name": "paymentMethod",
|
|
252
|
+
"values": [{ "name": "InitializedPaymentMethod" }]
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"references": []
|
|
256
|
+
},
|
|
234
257
|
{
|
|
235
258
|
"name": "primer-card-form",
|
|
236
259
|
"description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
|
|
@@ -243,6 +266,17 @@
|
|
|
243
266
|
],
|
|
244
267
|
"references": []
|
|
245
268
|
},
|
|
269
|
+
{
|
|
270
|
+
"name": "primer-dynamic-payment",
|
|
271
|
+
"description": "\n---\n",
|
|
272
|
+
"attributes": [
|
|
273
|
+
{
|
|
274
|
+
"name": "paymentMethod",
|
|
275
|
+
"values": [{ "name": "InitializedPaymentMethod" }]
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"references": []
|
|
279
|
+
},
|
|
246
280
|
{
|
|
247
281
|
"name": "primer-error-message-container",
|
|
248
282
|
"description": "A container component that connects to the SDK state context\nand displays appropriate error messages based on error state.\n\nThis component handles both process errors (typically from backend)\nand validation errors (typically from client-side), managing when\nand how they are displayed based on the current SDK state.\n---\n",
|
|
@@ -346,7 +380,13 @@
|
|
|
346
380
|
{
|
|
347
381
|
"name": "primer-vault-manager",
|
|
348
382
|
"description": "VaultManagerComponent - displays and manages saved payment methods\n---\n",
|
|
349
|
-
"attributes": [
|
|
383
|
+
"attributes": [
|
|
384
|
+
{
|
|
385
|
+
"name": "animationDuration",
|
|
386
|
+
"description": "Animation duration override",
|
|
387
|
+
"values": []
|
|
388
|
+
}
|
|
389
|
+
],
|
|
350
390
|
"references": []
|
|
351
391
|
},
|
|
352
392
|
{
|
|
@@ -564,7 +604,7 @@
|
|
|
564
604
|
},
|
|
565
605
|
{
|
|
566
606
|
"name": "primer-vault-payment-method-item",
|
|
567
|
-
"description": "VaultPaymentMethodItemComponent - displays a single payment method\nUses the VaultManagerController for display formatting\nNow supports selection via the simplified button checked state\nEnhanced with smooth transitions between edit and payment modes\n---\n\n\n### **Events:**\n - **delete-payment-method**",
|
|
607
|
+
"description": "VaultPaymentMethodItemComponent - displays a single payment method\nUses the VaultManagerController for display formatting\nNow supports selection via the simplified button checked state\nEnhanced with smooth transitions between edit and payment modes\nAlways renders the primer-button for consistent UI and improved accessibility\n---\n\n\n### **Events:**\n - **delete-payment-method**",
|
|
568
608
|
"attributes": [
|
|
569
609
|
{
|
|
570
610
|
"name": "headlessUtils",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@primer-io/primer-js",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{
|
|
15
|
-
"name": "
|
|
15
|
+
"name": "customStyles",
|
|
16
16
|
"value": { "type": "string", "default": "''" }
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
"name": "
|
|
19
|
+
"name": "clientToken",
|
|
20
20
|
"value": { "type": "string", "default": "''" }
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"value": { "type": "PrimerCheckoutOptions", "default": "{}" }
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "_jsInitialized",
|
|
28
28
|
"description": "Whether the component has completed initialization and loading\nThis is used to control the CSS-only loader visibility",
|
|
29
29
|
"value": { "type": "boolean", "default": "false" }
|
|
30
30
|
}
|
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
{
|
|
59
59
|
"name": "cardNetworkController",
|
|
60
60
|
"type": "CardNetworkController"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "achPaymentEventsController",
|
|
64
|
+
"type": "AchPaymentEventsController"
|
|
61
65
|
}
|
|
62
66
|
],
|
|
63
67
|
"events": []
|
|
@@ -229,6 +233,17 @@
|
|
|
229
233
|
"events": [{ "name": "expanded-changed", "type": "CustomEvent" }]
|
|
230
234
|
}
|
|
231
235
|
},
|
|
236
|
+
{
|
|
237
|
+
"name": "primer-dialog",
|
|
238
|
+
"description": "\n---\n\n\n### **Events:**\n - **primer-dialog-close**",
|
|
239
|
+
"doc-url": "",
|
|
240
|
+
"attributes": [],
|
|
241
|
+
"events": [{ "name": "primer-dialog-close", "type": "CustomEvent" }],
|
|
242
|
+
"js": {
|
|
243
|
+
"properties": [],
|
|
244
|
+
"events": [{ "name": "primer-dialog-close", "type": "CustomEvent" }]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
232
247
|
{
|
|
233
248
|
"name": "primer-error-message",
|
|
234
249
|
"description": "A reusable atomic error message component that displays error information\nwith appropriate styling and accessibility attributes.\n\nThis component is fully accessible and designed to work with screen readers.\nIt includes animations for visibility transitions.\n---\n\n\n### **CSS Parts:**\n - **error-message** - The main error message container\n- **error-icon** - The error icon container\n- **error-content** - The error text content",
|
|
@@ -528,6 +543,17 @@
|
|
|
528
543
|
"events": [{ "name": "wrapper-click", "type": "CustomEvent" }]
|
|
529
544
|
}
|
|
530
545
|
},
|
|
546
|
+
{
|
|
547
|
+
"name": "primer-portal",
|
|
548
|
+
"description": "\n---\n\n\n### **Events:**\n - **eventName**",
|
|
549
|
+
"doc-url": "",
|
|
550
|
+
"attributes": [],
|
|
551
|
+
"events": [{ "name": "eventName", "type": "CustomEvent" }],
|
|
552
|
+
"js": {
|
|
553
|
+
"properties": [{ "name": "id", "type": "string" }],
|
|
554
|
+
"events": [{ "name": "eventName", "type": "CustomEvent" }]
|
|
555
|
+
}
|
|
556
|
+
},
|
|
531
557
|
{
|
|
532
558
|
"name": "primer-spinner",
|
|
533
559
|
"description": "Spinner component with configurable size and color\nAdapted to work both standalone and within input components\n---\n",
|
|
@@ -574,6 +600,50 @@
|
|
|
574
600
|
"events": []
|
|
575
601
|
}
|
|
576
602
|
},
|
|
603
|
+
{
|
|
604
|
+
"name": "primer-ach-payment",
|
|
605
|
+
"description": "\n---\n\n\n### **Events:**\n - **primer-ach-error**\n- **primer-ach-bank-details-collected**\n- **primer-ach-mandate-confirmed**\n- **primer-ach-mandate-declined**",
|
|
606
|
+
"doc-url": "",
|
|
607
|
+
"attributes": [
|
|
608
|
+
{
|
|
609
|
+
"name": "paymentMethod",
|
|
610
|
+
"value": { "type": "InitializedPaymentMethod | undefined" }
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"events": [
|
|
614
|
+
{ "name": "primer-ach-error", "type": "CustomEvent" },
|
|
615
|
+
{
|
|
616
|
+
"name": "primer-ach-bank-details-collected",
|
|
617
|
+
"type": "CustomEvent"
|
|
618
|
+
},
|
|
619
|
+
{ "name": "primer-ach-mandate-confirmed", "type": "CustomEvent" },
|
|
620
|
+
{ "name": "primer-ach-mandate-declined", "type": "CustomEvent" }
|
|
621
|
+
],
|
|
622
|
+
"js": {
|
|
623
|
+
"properties": [
|
|
624
|
+
{
|
|
625
|
+
"name": "paymentMethod",
|
|
626
|
+
"type": "InitializedPaymentMethod | undefined"
|
|
627
|
+
},
|
|
628
|
+
{ "name": "paymentManagers", "type": "InitializedManagersMap" },
|
|
629
|
+
{ "name": "sdkState", "type": "SdkStateContext | undefined" },
|
|
630
|
+
{
|
|
631
|
+
"name": "clientOptions",
|
|
632
|
+
"type": "ClientOptionsContext | undefined"
|
|
633
|
+
},
|
|
634
|
+
{ "name": "screen", "type": "'form' | 'mandate'" }
|
|
635
|
+
],
|
|
636
|
+
"events": [
|
|
637
|
+
{ "name": "primer-ach-error", "type": "CustomEvent" },
|
|
638
|
+
{
|
|
639
|
+
"name": "primer-ach-bank-details-collected",
|
|
640
|
+
"type": "CustomEvent"
|
|
641
|
+
},
|
|
642
|
+
{ "name": "primer-ach-mandate-confirmed", "type": "CustomEvent" },
|
|
643
|
+
{ "name": "primer-ach-mandate-declined", "type": "CustomEvent" }
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
},
|
|
577
647
|
{
|
|
578
648
|
"name": "primer-card-form",
|
|
579
649
|
"description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
|
|
@@ -600,6 +670,31 @@
|
|
|
600
670
|
"events": []
|
|
601
671
|
}
|
|
602
672
|
},
|
|
673
|
+
{
|
|
674
|
+
"name": "primer-dynamic-payment",
|
|
675
|
+
"description": "\n---\n",
|
|
676
|
+
"doc-url": "",
|
|
677
|
+
"attributes": [
|
|
678
|
+
{
|
|
679
|
+
"name": "paymentMethod",
|
|
680
|
+
"value": { "type": "InitializedPaymentMethod | undefined" }
|
|
681
|
+
}
|
|
682
|
+
],
|
|
683
|
+
"events": [],
|
|
684
|
+
"js": {
|
|
685
|
+
"properties": [
|
|
686
|
+
{
|
|
687
|
+
"name": "paymentMethod",
|
|
688
|
+
"type": "InitializedPaymentMethod | undefined"
|
|
689
|
+
},
|
|
690
|
+
{ "name": "paymentManagers", "type": "InitializedManagersMap" },
|
|
691
|
+
{ "name": "sdkState", "type": "SdkStateContext" },
|
|
692
|
+
{ "name": "headlessUtils", "type": "HeadlessUnitilsContext" },
|
|
693
|
+
{ "name": "open", "type": "boolean" }
|
|
694
|
+
],
|
|
695
|
+
"events": []
|
|
696
|
+
}
|
|
697
|
+
},
|
|
603
698
|
{
|
|
604
699
|
"name": "primer-error-message-container",
|
|
605
700
|
"description": "A container component that connects to the SDK state context\nand displays appropriate error messages based on error state.\n\nThis component handles both process errors (typically from backend)\nand validation errors (typically from client-side), managing when\nand how they are displayed based on the current SDK state.\n---\n",
|
|
@@ -815,23 +910,29 @@
|
|
|
815
910
|
"name": "primer-vault-manager",
|
|
816
911
|
"description": "VaultManagerComponent - displays and manages saved payment methods\n---\n",
|
|
817
912
|
"doc-url": "",
|
|
818
|
-
"attributes": [
|
|
913
|
+
"attributes": [
|
|
914
|
+
{
|
|
915
|
+
"name": "animationDuration",
|
|
916
|
+
"description": "Animation duration override",
|
|
917
|
+
"value": { "type": "number", "default": "300" }
|
|
918
|
+
}
|
|
919
|
+
],
|
|
819
920
|
"events": [],
|
|
820
921
|
"js": {
|
|
821
922
|
"properties": [
|
|
822
923
|
{
|
|
823
924
|
"name": "addEventListener",
|
|
824
|
-
"description": "Strongly typed event declarations",
|
|
825
925
|
"type": "<K extends keyof VaultManagerEventMap>(\n type: K,\n listener: (ev: VaultManagerEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ) => void"
|
|
826
926
|
},
|
|
827
927
|
{
|
|
828
928
|
"name": "removeEventListener",
|
|
829
929
|
"type": "<K extends keyof VaultManagerEventMap>(\n type: K,\n listener: (ev: VaultManagerEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ) => void"
|
|
830
930
|
},
|
|
931
|
+
{ "name": "vaultManagerContext", "type": "VaultManagerContext" },
|
|
831
932
|
{
|
|
832
|
-
"name": "
|
|
833
|
-
"description": "
|
|
834
|
-
"type": "
|
|
933
|
+
"name": "animationDuration",
|
|
934
|
+
"description": "Animation duration override",
|
|
935
|
+
"type": "number"
|
|
835
936
|
}
|
|
836
937
|
],
|
|
837
938
|
"events": []
|
|
@@ -1337,7 +1438,7 @@
|
|
|
1337
1438
|
},
|
|
1338
1439
|
{
|
|
1339
1440
|
"name": "primer-vault-payment-method-item",
|
|
1340
|
-
"description": "VaultPaymentMethodItemComponent - displays a single payment method\nUses the VaultManagerController for display formatting\nNow supports selection via the simplified button checked state\nEnhanced with smooth transitions between edit and payment modes\n---\n\n\n### **Events:**\n - **delete-payment-method**",
|
|
1441
|
+
"description": "VaultPaymentMethodItemComponent - displays a single payment method\nUses the VaultManagerController for display formatting\nNow supports selection via the simplified button checked state\nEnhanced with smooth transitions between edit and payment modes\nAlways renders the primer-button for consistent UI and improved accessibility\n---\n\n\n### **Events:**\n - **delete-payment-method**",
|
|
1341
1442
|
"doc-url": "",
|
|
1342
1443
|
"attributes": [
|
|
1343
1444
|
{
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@primer-io/primer-js",
|
|
3
3
|
"description": "Primer Composable Checkout is a web component-based SDK for building secure, customizable, and PCI-compliant checkout experiences. Designed with a modular architecture, it integrates seamlessly with any JavaScript framework and supports multiple payment methods.",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.5",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/primer-loader.js",
|
|
8
8
|
"types": "./dist/primer-loader.d.ts",
|