@primer-io/primer-js 0.1.4 → 0.1.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.
@@ -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": "custom-styles", "values": [] },
10
- { "name": "client-token", "values": [] },
9
+ { "name": "customStyles", "values": [] },
10
+ { "name": "clientToken", "values": [] },
11
11
  { "name": "options", "values": [{ "name": "PrimerCheckoutOptions" }] },
12
12
  {
13
- "name": "js-initialized",
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
  }
@@ -24,6 +24,7 @@
24
24
  {
25
25
  "name": "variant",
26
26
  "values": [
27
+ { "name": "" },
27
28
  { "name": "primary" },
28
29
  { "name": "secondary" },
29
30
  { "name": "tertiary" }
@@ -36,8 +37,9 @@
36
37
  "values": []
37
38
  },
38
39
  {
39
- "name": "buttonType",
40
+ "name": "type",
40
41
  "values": [
42
+ { "name": "" },
41
43
  { "name": "button" },
42
44
  { "name": "submit" },
43
45
  { "name": "reset" }
@@ -258,6 +260,7 @@
258
260
  "name": "primer-card-form",
259
261
  "description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
260
262
  "attributes": [
263
+ { "name": "hide-labels", "values": [] },
261
264
  {
262
265
  "name": "paymentManagers",
263
266
  "description": "Payment managers injected from context",
@@ -380,7 +383,13 @@
380
383
  {
381
384
  "name": "primer-vault-manager",
382
385
  "description": "VaultManagerComponent - displays and manages saved payment methods\n---\n",
383
- "attributes": [],
386
+ "attributes": [
387
+ {
388
+ "name": "animationDuration",
389
+ "description": "Animation duration override",
390
+ "values": []
391
+ }
392
+ ],
384
393
  "references": []
385
394
  },
386
395
  {
@@ -598,7 +607,7 @@
598
607
  },
599
608
  {
600
609
  "name": "primer-vault-payment-method-item",
601
- "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**",
610
+ "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**",
602
611
  "attributes": [
603
612
  {
604
613
  "name": "headlessUtils",
@@ -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",
4
+ "version": "0.1.6",
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": "custom-styles",
15
+ "name": "customStyles",
16
16
  "value": { "type": "string", "default": "''" }
17
17
  },
18
18
  {
19
- "name": "client-token",
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": "js-initialized",
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
  }
@@ -75,7 +75,7 @@
75
75
  {
76
76
  "name": "variant",
77
77
  "value": {
78
- "type": "'primary' | 'secondary' | 'tertiary'",
78
+ "type": "| 'primary'\n | 'secondary'\n | 'tertiary'",
79
79
  "default": "'primary'"
80
80
  }
81
81
  },
@@ -89,9 +89,9 @@
89
89
  "value": { "type": "boolean", "default": "false" }
90
90
  },
91
91
  {
92
- "name": "buttonType",
92
+ "name": "type",
93
93
  "value": {
94
- "type": "'button' | 'submit' | 'reset'",
94
+ "type": "| 'button'\n | 'submit'\n | 'reset'",
95
95
  "default": "'button'"
96
96
  }
97
97
  },
@@ -114,7 +114,7 @@
114
114
  "properties": [
115
115
  {
116
116
  "name": "variant",
117
- "type": "'primary' | 'secondary' | 'tertiary'"
117
+ "type": "| 'primary'\n | 'secondary'\n | 'tertiary'"
118
118
  },
119
119
  { "name": "disabled", "type": "boolean" },
120
120
  {
@@ -122,7 +122,10 @@
122
122
  "description": "Loading state of the button\nWhen true, the button will display a spinner and be disabled",
123
123
  "type": "boolean"
124
124
  },
125
- { "name": "buttonType", "type": "'button' | 'submit' | 'reset'" },
125
+ {
126
+ "name": "buttonType",
127
+ "type": "| 'button'\n | 'submit'\n | 'reset'"
128
+ },
126
129
  {
127
130
  "name": "selectionState",
128
131
  "description": "Selection state of the button\n- default: Not checked\n- checked: Button is checked",
@@ -649,6 +652,10 @@
649
652
  "description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
650
653
  "doc-url": "",
651
654
  "attributes": [
655
+ {
656
+ "name": "hide-labels",
657
+ "value": { "type": "boolean", "default": "false" }
658
+ },
652
659
  {
653
660
  "name": "paymentManagers",
654
661
  "description": "Payment managers injected from context",
@@ -661,6 +668,7 @@
661
668
  "events": [],
662
669
  "js": {
663
670
  "properties": [
671
+ { "name": "hideLabels", "type": "boolean" },
664
672
  {
665
673
  "name": "paymentManagers",
666
674
  "description": "Payment managers injected from context",
@@ -910,23 +918,29 @@
910
918
  "name": "primer-vault-manager",
911
919
  "description": "VaultManagerComponent - displays and manages saved payment methods\n---\n",
912
920
  "doc-url": "",
913
- "attributes": [],
921
+ "attributes": [
922
+ {
923
+ "name": "animationDuration",
924
+ "description": "Animation duration override",
925
+ "value": { "type": "number", "default": "300" }
926
+ }
927
+ ],
914
928
  "events": [],
915
929
  "js": {
916
930
  "properties": [
917
931
  {
918
932
  "name": "addEventListener",
919
- "description": "Strongly typed event declarations",
920
933
  "type": "<K extends keyof VaultManagerEventMap>(\n type: K,\n listener: (ev: VaultManagerEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ) => void"
921
934
  },
922
935
  {
923
936
  "name": "removeEventListener",
924
937
  "type": "<K extends keyof VaultManagerEventMap>(\n type: K,\n listener: (ev: VaultManagerEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ) => void"
925
938
  },
939
+ { "name": "vaultManagerContext", "type": "VaultManagerContext" },
926
940
  {
927
- "name": "vaultManagerContext",
928
- "description": "The vault manager core context from the SDK\nContains vault-related functionality and state",
929
- "type": "VaultManagerContext"
941
+ "name": "animationDuration",
942
+ "description": "Animation duration override",
943
+ "type": "number"
930
944
  }
931
945
  ],
932
946
  "events": []
@@ -1432,7 +1446,7 @@
1432
1446
  },
1433
1447
  {
1434
1448
  "name": "primer-vault-payment-method-item",
1435
- "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**",
1449
+ "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**",
1436
1450
  "doc-url": "",
1437
1451
  "attributes": [
1438
1452
  {
package/package.json CHANGED
@@ -2,13 +2,35 @@
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.4",
5
+ "version": "0.1.6",
6
6
  "type": "module",
7
7
  "main": "./dist/primer-loader.js",
8
8
  "types": "./dist/primer-loader.d.ts",
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/primer-loader.d.ts",
15
+ "default": "./dist/primer-loader.js"
16
+ },
17
+ "./react": {
18
+ "types": "./dist/primer-react-wrappers.d.ts",
19
+ "default": "./dist/primer-react-wrappers.js"
20
+ },
21
+ "./dist/jsx/index": {
22
+ "types": "./dist/jsx/index.d.ts",
23
+ "default": "./dist/jsx/index.d.ts"
24
+ },
25
+ "./src/types/sdk": {
26
+ "types": "./src/types/sdk.ts",
27
+ "default": "./src/types/sdk.ts"
28
+ },
29
+ "./src/*": "./src/*"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^18.2.0"
33
+ },
12
34
  "customElements": "dist/custom-elements.json",
13
35
  "web-types": "./dist/web-types.json"
14
36
  }