@primer-io/primer-js 0.0.2 → 0.1.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/dist/custom-elements.json +7726 -3155
- package/dist/jsx/index.d.ts +415 -10
- package/dist/primer-loader.d.ts +1076 -175
- package/dist/primer-loader.js +165 -1
- package/dist/vscode.html-custom-data.json +285 -19
- package/dist/web-types.json +664 -47
- package/package.json +2 -1
package/dist/primer-loader.js
CHANGED
|
@@ -1 +1,165 @@
|
|
|
1
|
-
var
|
|
1
|
+
var c="https://sdk.primer.io/web/v2-latest/Primer.min.js",d="https://sdk.primer.io/web/primer-js/v0-latest/primer-components.js";var p=typeof window<"u"&&typeof window.document<"u";function h(r){return document.querySelector(`script[src^="${r}"]`)}function v(r,o){let e=document.createElement("script");return e.setAttribute("src",r),e.setAttribute("async",""),e.setAttribute("crossorigin","anonymous"),o&&e.setAttribute("type","module"),e}function a(r,o=!1){if(!p)throw new Error("Cannot load script in server environment");let e=h(r)??v(r,o);return new Promise((m,t)=>{e.onload=()=>{m()},e.onerror=()=>{t()},e.parentNode||document.head.appendChild(e)})}function x(r){return document.querySelector(`#${r}`)}function S(r,o){let e=document.createElement("style");return e.textContent=r,e.id=o,e}function i(r,o,e=!0){if(!p||x(o))return;let t=S(r,o);e&&document.head.firstChild?document.head.insertBefore(t,document.head.firstChild):document.head.appendChild(t)}var s=`
|
|
2
|
+
@keyframes primer-css-spinner-rotate {
|
|
3
|
+
0% {
|
|
4
|
+
transform: rotate(0deg);
|
|
5
|
+
}
|
|
6
|
+
100% {
|
|
7
|
+
transform: rotate(360deg);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
primer-checkout:has(:not(:defined)) > * {
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
primer-checkout:not([js-initialized]) {
|
|
16
|
+
display: block;
|
|
17
|
+
position: relative;
|
|
18
|
+
width: 100%;
|
|
19
|
+
min-height: 64px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
primer-checkout:not([js-initialized]):not([loader-disabled])::after {
|
|
23
|
+
content: "";
|
|
24
|
+
display: block;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset: 0;
|
|
28
|
+
margin: auto;
|
|
29
|
+
width: var(--primer-size-xlarge);
|
|
30
|
+
height: var(--primer-size-xlarge);
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
border: 3px solid #f5f5f5;
|
|
33
|
+
border-top-color: var(--primer-color-loader);
|
|
34
|
+
animation: primer-css-spinner-rotate 1.2s linear infinite;
|
|
35
|
+
z-index: 9999;
|
|
36
|
+
}
|
|
37
|
+
`;var g=`/**
|
|
38
|
+
* Do not edit directly, this file was auto-generated.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
primer-checkout {
|
|
42
|
+
--primer-color-background-transparent-default: rgba(255, 255, 255, 0);
|
|
43
|
+
--primer-color-border-transparent-default: rgba(255, 255, 255, 0);
|
|
44
|
+
--primer-color-gray-100: #f5f5f5;
|
|
45
|
+
--primer-color-gray-200: #eeeeee;
|
|
46
|
+
--primer-color-gray-300: #e0e0e0;
|
|
47
|
+
--primer-color-gray-400: #bdbdbd;
|
|
48
|
+
--primer-color-gray-500: #9e9e9e;
|
|
49
|
+
--primer-color-gray-600: #757575;
|
|
50
|
+
--primer-color-gray-900: #212121;
|
|
51
|
+
--primer-color-gray-000: #ffffff;
|
|
52
|
+
--primer-color-brand: #2f98ff;
|
|
53
|
+
--primer-color-red-100: #ffecec;
|
|
54
|
+
--primer-color-red-500: #ff7279;
|
|
55
|
+
--primer-color-red-900: #b4324b;
|
|
56
|
+
--primer-color-blue-500: #399dff;
|
|
57
|
+
--primer-color-blue-900: #2270f4;
|
|
58
|
+
--primer-radius-base: 4px;
|
|
59
|
+
--primer-typography-brand: Inter;
|
|
60
|
+
--primer-typography-title-xlarge-letter-spacing: -0.6px;
|
|
61
|
+
--primer-typography-title-xlarge-weight: 550;
|
|
62
|
+
--primer-typography-title-xlarge-size: 24px;
|
|
63
|
+
--primer-typography-title-xlarge-line-height: 32px;
|
|
64
|
+
--primer-typography-title-large-letter-spacing: -0.2px;
|
|
65
|
+
--primer-typography-title-large-weight: 550;
|
|
66
|
+
--primer-typography-title-large-size: 16px;
|
|
67
|
+
--primer-typography-title-large-line-height: 20px;
|
|
68
|
+
--primer-typography-body-large-letter-spacing: -0.2px;
|
|
69
|
+
--primer-typography-body-large-weight: 400;
|
|
70
|
+
--primer-typography-body-large-size: 16px;
|
|
71
|
+
--primer-typography-body-large-line-height: 20px;
|
|
72
|
+
--primer-typography-body-medium-letter-spacing: 0px;
|
|
73
|
+
--primer-typography-body-medium-weight: 400;
|
|
74
|
+
--primer-typography-body-medium-size: 14px;
|
|
75
|
+
--primer-typography-body-medium-line-height: 20px;
|
|
76
|
+
--primer-typography-body-small-letter-spacing: 0px;
|
|
77
|
+
--primer-typography-body-small-weight: 400;
|
|
78
|
+
--primer-typography-body-small-size: 12px;
|
|
79
|
+
--primer-typography-body-small-line-height: 16px;
|
|
80
|
+
--primer-space-base: 4px;
|
|
81
|
+
--primer-size-base: 4px;
|
|
82
|
+
--primer-animation-duration: 200ms;
|
|
83
|
+
--primer-animation-easing: cubic-bezier(0.44, 0, 0.4, 1);
|
|
84
|
+
--primer-color-background-outlined-default: var(--primer-color-gray-000);
|
|
85
|
+
--primer-color-background-outlined-disabled: var(--primer-color-gray-100);
|
|
86
|
+
--primer-color-background-transparent-hover: var(--primer-color-gray-100);
|
|
87
|
+
--primer-color-background-transparent-active: var(--primer-color-gray-200);
|
|
88
|
+
--primer-color-background-transparent-loading: var(--primer-color-gray-100);
|
|
89
|
+
--primer-color-background-transparent-focus: var(--primer-color-background-transparent-default);
|
|
90
|
+
--primer-color-background-transparent-disabled: var(--primer-color-gray-100);
|
|
91
|
+
--primer-color-background-transparent-selected: var(--primer-color-gray-100);
|
|
92
|
+
--primer-color-text-primary: var(--primer-color-gray-900);
|
|
93
|
+
--primer-color-text-placeholder: var(--primer-color-gray-500);
|
|
94
|
+
--primer-color-text-disabled: var(--primer-color-gray-400);
|
|
95
|
+
--primer-color-text-negative: var(--primer-color-red-900);
|
|
96
|
+
--primer-color-text-link: var(--primer-color-blue-900);
|
|
97
|
+
--primer-color-text-secondary: var(--primer-color-gray-600);
|
|
98
|
+
--primer-color-border-outlined-default: var(--primer-color-gray-300);
|
|
99
|
+
--primer-color-border-outlined-hover: var(--primer-color-gray-400);
|
|
100
|
+
--primer-color-border-outlined-active: var(--primer-color-gray-500);
|
|
101
|
+
--primer-color-border-outlined-disabled: var(--primer-color-gray-200);
|
|
102
|
+
--primer-color-border-outlined-loading: var(--primer-color-gray-200);
|
|
103
|
+
--primer-color-border-outlined-selected: var(--primer-color-brand);
|
|
104
|
+
--primer-color-border-outlined-error: var(--primer-color-red-500);
|
|
105
|
+
--primer-color-border-transparent-hover: var(--primer-color-border-transparent-default);
|
|
106
|
+
--primer-color-border-transparent-active: var(--primer-color-border-transparent-default);
|
|
107
|
+
--primer-color-border-transparent-disabled: var(--primer-color-border-transparent-default);
|
|
108
|
+
--primer-color-border-transparent-selected: var(--primer-color-border-transparent-default);
|
|
109
|
+
--primer-color-icon-primary: var(--primer-color-gray-900);
|
|
110
|
+
--primer-color-icon-disabled: var(--primer-color-gray-400);
|
|
111
|
+
--primer-color-icon-negative: var(--primer-color-red-500);
|
|
112
|
+
--primer-color-focus: var(--primer-color-brand);
|
|
113
|
+
--primer-color-loader: var(--primer-color-brand);
|
|
114
|
+
--primer-radius-medium: 8px;
|
|
115
|
+
--primer-radius-small: 4px;
|
|
116
|
+
--primer-radius-large: 12px;
|
|
117
|
+
--primer-radius-xsmall: 2px;
|
|
118
|
+
--primer-typography-title-xlarge-font: var(--primer-typography-brand);
|
|
119
|
+
--primer-typography-title-large-font: var(--primer-typography-brand);
|
|
120
|
+
--primer-typography-body-large-font: var(--primer-typography-brand);
|
|
121
|
+
--primer-typography-body-medium-font: var(--primer-typography-brand);
|
|
122
|
+
--primer-typography-body-small-font: var(--primer-typography-brand);
|
|
123
|
+
--primer-space-xxsmall: 2px;
|
|
124
|
+
--primer-space-xsmall: 4px;
|
|
125
|
+
--primer-space-small: 8px;
|
|
126
|
+
--primer-space-medium: 12px;
|
|
127
|
+
--primer-space-large: 16px;
|
|
128
|
+
--primer-space-xlarge: 20px;
|
|
129
|
+
--primer-size-small: 16px;
|
|
130
|
+
--primer-size-medium: 20px;
|
|
131
|
+
--primer-size-large: 24px;
|
|
132
|
+
--primer-size-xlarge: 32px;
|
|
133
|
+
--primer-size-xxlarge: 40px;
|
|
134
|
+
--primer-size-xxxlarge: 56px;
|
|
135
|
+
--primer-color-background-outlined-focus: var(--primer-color-background-outlined-default);
|
|
136
|
+
--primer-color-background-outlined-loading: var(--primer-color-background-outlined-disabled);
|
|
137
|
+
--primer-color-background-outlined-active: var(--primer-color-background-outlined-default);
|
|
138
|
+
--primer-color-background-outlined-hover: var(--primer-color-background-outlined-default);
|
|
139
|
+
--primer-color-background-outlined-selected: var(--primer-color-background-outlined-default);
|
|
140
|
+
--primer-color-background-outlined-error: var(--primer-color-background-outlined-default);
|
|
141
|
+
--primer-color-border-outlined-focus: var(--primer-color-focus);
|
|
142
|
+
--primer-color-border-transparent-focus: var(--primer-color-focus);
|
|
143
|
+
--primer-color-border-transparent-loading: var(--primer-color-border-transparent-disabled);
|
|
144
|
+
}
|
|
145
|
+
`,y=`/**
|
|
146
|
+
* Do not edit directly, this file was auto-generated.
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
primer-checkout.primer-dark-theme {
|
|
150
|
+
--primer-color-gray-100: #292929;
|
|
151
|
+
--primer-color-gray-200: #424242;
|
|
152
|
+
--primer-color-gray-300: #575757;
|
|
153
|
+
--primer-color-gray-400: #858585;
|
|
154
|
+
--primer-color-gray-500: #767577;
|
|
155
|
+
--primer-color-gray-600: #c7c7c7;
|
|
156
|
+
--primer-color-gray-900: #efefef;
|
|
157
|
+
--primer-color-gray-000: #171619;
|
|
158
|
+
--primer-color-brand: #2f98ff;
|
|
159
|
+
--primer-color-red-100: #321c20;
|
|
160
|
+
--primer-color-red-500: #e46d70;
|
|
161
|
+
--primer-color-red-900: #f6bfbf;
|
|
162
|
+
--primer-color-blue-500: #3f93e4;
|
|
163
|
+
--primer-color-blue-900: #4aaeff;
|
|
164
|
+
}
|
|
165
|
+
`;var k="primer-light-theme-css",E="primer-dark-theme-css";function l(){i(g,k,!0)}function n(){i(y,E,!0)}function u(){l(),n()}function b(){i(s,"primer-css-loader-styles",!1)}function f(){u()}function B(){l()}function Q(){n()}async function w(r=c){await a(r),await window.Primer.preloadPrimer()}async function T(r=d){b(),f(),await a(r,!0)}async function $(){b(),f(),await w(),await T()}export{Q as injectDarkTheme,B as injectLightTheme,b as injectLoaderStyles,f as injectThemeStyles,$ as loadPrimer};
|
|
@@ -4,18 +4,22 @@
|
|
|
4
4
|
"tags": [
|
|
5
5
|
{
|
|
6
6
|
"name": "primer-checkout",
|
|
7
|
-
"description": "\n---\n",
|
|
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
9
|
{ "name": "custom-styles", "values": [] },
|
|
10
10
|
{ "name": "client-token", "values": [] },
|
|
11
11
|
{ "name": "options", "values": [{ "name": "PrimerCheckoutOptions" }] },
|
|
12
|
-
{
|
|
12
|
+
{
|
|
13
|
+
"name": "js-initialized",
|
|
14
|
+
"description": "Whether the component has completed initialization and loading\nThis is used to control the CSS-only loader visibility",
|
|
15
|
+
"values": []
|
|
16
|
+
}
|
|
13
17
|
],
|
|
14
18
|
"references": []
|
|
15
19
|
},
|
|
16
20
|
{
|
|
17
21
|
"name": "primer-button",
|
|
18
|
-
"description": "\n---\n",
|
|
22
|
+
"description": "\n---\n\n\n### **Events:**\n - **selection-change**",
|
|
19
23
|
"attributes": [
|
|
20
24
|
{
|
|
21
25
|
"name": "variant",
|
|
@@ -26,6 +30,11 @@
|
|
|
26
30
|
]
|
|
27
31
|
},
|
|
28
32
|
{ "name": "disabled", "values": [] },
|
|
33
|
+
{
|
|
34
|
+
"name": "loading",
|
|
35
|
+
"description": "Loading state of the button\nWhen true, the button will display a spinner and be disabled",
|
|
36
|
+
"values": []
|
|
37
|
+
},
|
|
29
38
|
{
|
|
30
39
|
"name": "buttonType",
|
|
31
40
|
"values": [
|
|
@@ -33,6 +42,16 @@
|
|
|
33
42
|
{ "name": "submit" },
|
|
34
43
|
{ "name": "reset" }
|
|
35
44
|
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "selectionState",
|
|
48
|
+
"description": "Selection state of the button\n- default: Not checked\n- checked: Button is checked",
|
|
49
|
+
"values": [{ "name": "ButtonSelectionState" }]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "selectable",
|
|
53
|
+
"description": "Indicates if this button is selectable/checkable",
|
|
54
|
+
"values": []
|
|
36
55
|
}
|
|
37
56
|
],
|
|
38
57
|
"references": []
|
|
@@ -49,12 +68,74 @@
|
|
|
49
68
|
],
|
|
50
69
|
"references": []
|
|
51
70
|
},
|
|
71
|
+
{
|
|
72
|
+
"name": "primer-collapsable",
|
|
73
|
+
"description": "A collapsable component that smoothly expands and collapses content.\nUses CSS Grid for smooth animation and incorporates the primary button.\n---\n\n\n### **Events:**\n - **expanded-changed**\n\n### **Methods:**\n - **expand(): _void_** - Expand the collapsable programmatically\n- **collapse(): _void_** - Collapse the collapsable programmatically",
|
|
74
|
+
"attributes": [
|
|
75
|
+
{
|
|
76
|
+
"name": "header",
|
|
77
|
+
"description": "The header text for the collapsable",
|
|
78
|
+
"values": []
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "expanded",
|
|
82
|
+
"description": "Whether the collapsable is expanded by default",
|
|
83
|
+
"values": []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "expandText",
|
|
87
|
+
"description": "Text for expand button (for accessibility)",
|
|
88
|
+
"values": []
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "collapseText",
|
|
92
|
+
"description": "Text for collapse button (for accessibility)",
|
|
93
|
+
"values": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "ariaLabel",
|
|
97
|
+
"description": "ARIA label for the collapsable header",
|
|
98
|
+
"values": []
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "buttonVariant",
|
|
102
|
+
"description": "The button variant to use",
|
|
103
|
+
"values": [{ "name": "ButtonVariant" }]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"references": []
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "primer-error-message",
|
|
110
|
+
"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",
|
|
111
|
+
"attributes": [
|
|
112
|
+
{
|
|
113
|
+
"name": "message",
|
|
114
|
+
"description": "The error message text to display",
|
|
115
|
+
"values": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "visible",
|
|
119
|
+
"description": "Whether the error message is visible",
|
|
120
|
+
"values": []
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "role",
|
|
124
|
+
"description": "Accessibility role for the error message\nDefaults to \"alert\" for proper screen reader announcements",
|
|
125
|
+
"values": []
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"references": []
|
|
129
|
+
},
|
|
52
130
|
{
|
|
53
131
|
"name": "primer-icon",
|
|
54
132
|
"description": "\n---\n",
|
|
55
133
|
"attributes": [
|
|
56
134
|
{ "name": "color", "values": [] },
|
|
57
|
-
{
|
|
135
|
+
{
|
|
136
|
+
"name": "size",
|
|
137
|
+
"values": [{ "name": "lg" }, { "name": "md" }, { "name": "sm" }]
|
|
138
|
+
},
|
|
58
139
|
{
|
|
59
140
|
"name": "name",
|
|
60
141
|
"description": "The name of the icon to draw - available names can be found under library.ts file",
|
|
@@ -162,9 +243,35 @@
|
|
|
162
243
|
],
|
|
163
244
|
"references": []
|
|
164
245
|
},
|
|
246
|
+
{
|
|
247
|
+
"name": "primer-error-message-container",
|
|
248
|
+
"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",
|
|
249
|
+
"attributes": [{ "name": "show-processing-errors", "values": [] }],
|
|
250
|
+
"references": []
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "primer-klarna",
|
|
254
|
+
"description": "This component renders Klarna payment method in a card-like (accordion) container with\npayment categories options to choose from.\n\n[ Pay with Klarna v ] --> accordion header\n\n[ Pay Now ] [ Buy now, pay later ] --> payment categories options from Klarna\n[ Continue with Klarna ] --> opens a Klarna popup\n---\n",
|
|
255
|
+
"attributes": [
|
|
256
|
+
{
|
|
257
|
+
"name": "paymentManagers",
|
|
258
|
+
"values": [{ "name": "InitializedManagersMap" }]
|
|
259
|
+
},
|
|
260
|
+
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] },
|
|
261
|
+
{
|
|
262
|
+
"name": "headlessUtils",
|
|
263
|
+
"values": [{ "name": "HeadlessUnitilsContext" }]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "klarnaCategories",
|
|
267
|
+
"values": [{ "name": "KlarnaCategoriesContext" }]
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"references": []
|
|
271
|
+
},
|
|
165
272
|
{
|
|
166
273
|
"name": "primer-native-payment",
|
|
167
|
-
"description": "\n---\n",
|
|
274
|
+
"description": "Component for rendering native payment buttons (Apple Pay, Google Pay, PayPal)\nwith proper height calculations based on design system variables.\n---\n",
|
|
168
275
|
"attributes": [
|
|
169
276
|
{
|
|
170
277
|
"name": "paymentMethod",
|
|
@@ -173,6 +280,10 @@
|
|
|
173
280
|
{
|
|
174
281
|
"name": "paymentManagers",
|
|
175
282
|
"values": [{ "name": "InitializedManagersMap" }]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "computedStyles",
|
|
286
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
176
287
|
}
|
|
177
288
|
],
|
|
178
289
|
"references": []
|
|
@@ -182,7 +293,10 @@
|
|
|
182
293
|
"description": "\n---\n",
|
|
183
294
|
"attributes": [
|
|
184
295
|
{ "name": "type", "values": [{ "name": "PaymentMethodType" }] },
|
|
185
|
-
{
|
|
296
|
+
{
|
|
297
|
+
"name": "paymentMethods",
|
|
298
|
+
"values": [{ "name": "PaymentMethodsContext" }]
|
|
299
|
+
}
|
|
186
300
|
],
|
|
187
301
|
"references": []
|
|
188
302
|
},
|
|
@@ -193,16 +307,21 @@
|
|
|
193
307
|
"references": []
|
|
194
308
|
},
|
|
195
309
|
{
|
|
196
|
-
"name": "primer-checkout-
|
|
310
|
+
"name": "primer-checkout-error",
|
|
197
311
|
"description": "\n---\n",
|
|
198
|
-
"attributes": [
|
|
312
|
+
"attributes": [
|
|
313
|
+
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] }
|
|
314
|
+
],
|
|
199
315
|
"references": []
|
|
200
316
|
},
|
|
201
317
|
{
|
|
202
318
|
"name": "primer-main",
|
|
203
319
|
"description": "\n---\n",
|
|
204
320
|
"attributes": [
|
|
205
|
-
{
|
|
321
|
+
{
|
|
322
|
+
"name": "paymentMethods",
|
|
323
|
+
"values": [{ "name": "PaymentMethodsContext" }]
|
|
324
|
+
},
|
|
206
325
|
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] }
|
|
207
326
|
],
|
|
208
327
|
"references": []
|
|
@@ -214,15 +333,22 @@
|
|
|
214
333
|
{
|
|
215
334
|
"name": "paymentMethod",
|
|
216
335
|
"values": [{ "name": "InitializedPaymentMethod" }]
|
|
217
|
-
}
|
|
218
|
-
{
|
|
219
|
-
"name": "paymentManagers",
|
|
220
|
-
"values": [{ "name": "InitializedManagersMap" }]
|
|
221
|
-
},
|
|
222
|
-
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] }
|
|
336
|
+
}
|
|
223
337
|
],
|
|
224
338
|
"references": []
|
|
225
339
|
},
|
|
340
|
+
{
|
|
341
|
+
"name": "primer-show-other-payments",
|
|
342
|
+
"description": "Component for showing/hiding other payment methods when vault is present\nUtilizes the collapsable component for smooth transitions\n---\n",
|
|
343
|
+
"attributes": [],
|
|
344
|
+
"references": []
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "primer-vault-manager",
|
|
348
|
+
"description": "VaultManagerComponent - displays and manages saved payment methods\n---\n",
|
|
349
|
+
"attributes": [],
|
|
350
|
+
"references": []
|
|
351
|
+
},
|
|
226
352
|
{
|
|
227
353
|
"name": "primer-card-form-submit",
|
|
228
354
|
"description": "A form submit button component for card forms.\nProvides a consistent submit button with translation support.\n---\n",
|
|
@@ -232,6 +358,15 @@
|
|
|
232
358
|
"description": "The button text to display.\nFalls back to localized default if not explicitly set.",
|
|
233
359
|
"values": []
|
|
234
360
|
},
|
|
361
|
+
{
|
|
362
|
+
"name": "headlessInstance",
|
|
363
|
+
"values": [{ "name": "HeadlessUnitilsContext" }]
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "clientOptions",
|
|
367
|
+
"values": [{ "name": "ClientOptionsContext" }]
|
|
368
|
+
},
|
|
369
|
+
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] },
|
|
235
370
|
{
|
|
236
371
|
"name": "variant",
|
|
237
372
|
"description": "The button variant to use.",
|
|
@@ -253,8 +388,12 @@
|
|
|
253
388
|
},
|
|
254
389
|
{
|
|
255
390
|
"name": "primer-input-card-expiry",
|
|
256
|
-
"description": "\n---\n\n\n### **Methods:**\n \n",
|
|
391
|
+
"description": "\n---\n\n\n### **Methods:**\n \n- **getError(): _string|null_** - Get the error code from the hosted input controller when the input is submitted or touched\n\nCan be used instead of the error returned by the `validate()` method since internally `primer-sdk-web`\nuses the same logic to compute the error code\n",
|
|
257
392
|
"attributes": [
|
|
393
|
+
{
|
|
394
|
+
"name": "computedStyles",
|
|
395
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
396
|
+
},
|
|
258
397
|
{
|
|
259
398
|
"name": "label",
|
|
260
399
|
"description": "The input label text.\nFalls back to localized default if not explicitly set.",
|
|
@@ -275,8 +414,12 @@
|
|
|
275
414
|
},
|
|
276
415
|
{
|
|
277
416
|
"name": "primer-input-card-holder-name",
|
|
278
|
-
"description": "\n---\n\n\n### **Methods:**\n \n",
|
|
417
|
+
"description": "\n---\n\n\n### **Methods:**\n \n- **getError(): _string|null_** - Get the error code from the hosted input controller when the input is submitted or touched\n\nCan be used instead of the error returned by the `validate()` method since internally `primer-sdk-web`\nuses the same logic to compute the error code\n",
|
|
279
418
|
"attributes": [
|
|
419
|
+
{
|
|
420
|
+
"name": "computedStyles",
|
|
421
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
422
|
+
},
|
|
280
423
|
{
|
|
281
424
|
"name": "label",
|
|
282
425
|
"description": "The input label text.\nFalls back to localized default if not explicitly set.",
|
|
@@ -297,8 +440,12 @@
|
|
|
297
440
|
},
|
|
298
441
|
{
|
|
299
442
|
"name": "primer-input-card-number",
|
|
300
|
-
"description": "Card number input component with dynamic card network detection and selection\n---\n\n\n### **Methods:**\n \n",
|
|
443
|
+
"description": "Card number input component with dynamic card network detection and selection\n---\n\n\n### **Methods:**\n \n\n- **getError(): _string|null_** - Get the error code from the hosted input controller when the input is submitted or touched\n\nCan be used instead of the error returned by the `validate()` method since internally `primer-sdk-web`\nuses the same logic to compute the error code",
|
|
301
444
|
"attributes": [
|
|
445
|
+
{
|
|
446
|
+
"name": "computedStyles",
|
|
447
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
448
|
+
},
|
|
302
449
|
{
|
|
303
450
|
"name": "label",
|
|
304
451
|
"description": "The input label text.\nFalls back to localized default if not explicitly set.",
|
|
@@ -319,8 +466,12 @@
|
|
|
319
466
|
},
|
|
320
467
|
{
|
|
321
468
|
"name": "primer-input-cvv",
|
|
322
|
-
"description": "\n---\n\n\n### **Methods:**\n \n",
|
|
469
|
+
"description": "\n---\n\n\n### **Methods:**\n \n- **getError(): _string|null_** - Get the error code from the hosted input controller when the input is submitted or touched\n\nCan be used instead of the error returned by the `validate()` method since internally `primer-sdk-web`\nuses the same logic to compute the error code\n",
|
|
323
470
|
"attributes": [
|
|
471
|
+
{
|
|
472
|
+
"name": "computedStyles",
|
|
473
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
474
|
+
},
|
|
324
475
|
{
|
|
325
476
|
"name": "label",
|
|
326
477
|
"description": "The input label text.\nFalls back to localized default if not explicitly set.",
|
|
@@ -338,6 +489,121 @@
|
|
|
338
489
|
}
|
|
339
490
|
],
|
|
340
491
|
"references": []
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "primer-vault-cvv-input",
|
|
495
|
+
"description": "CVV Input component for vault payment methods\nRenders a secure iframe for CVV input when required by the selected payment method\nUses dedicated CVV context to minimize re-renders\n---\n\n\n### **Methods:**\n - **onCvvInputChange()** - Update CVV metadata in the context when input changes",
|
|
496
|
+
"attributes": [
|
|
497
|
+
{
|
|
498
|
+
"name": "computedStyles",
|
|
499
|
+
"values": [{ "name": "CSSStyleDeclaration" }]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "paymentMethod",
|
|
503
|
+
"values": [{ "name": "PaymentCardVaultedMethod" }]
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"references": []
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "primer-vault-delete-confirmation",
|
|
510
|
+
"description": "VaultDeleteConfirmationComponent - displays confirmation UI for deleting a payment method\n---\n\n\n### **Events:**\n - **confirm-delete**\n- **cancel-delete**",
|
|
511
|
+
"attributes": [
|
|
512
|
+
{
|
|
513
|
+
"name": "isDeleting",
|
|
514
|
+
"description": "Whether a delete operation is in progress",
|
|
515
|
+
"values": []
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "paymentMethodId",
|
|
519
|
+
"description": "The ID of the payment method being deleted",
|
|
520
|
+
"values": []
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "paymentMethodName",
|
|
524
|
+
"description": "Payment method name to display in confirmation",
|
|
525
|
+
"values": []
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"references": []
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "primer-vault-empty-state",
|
|
532
|
+
"description": "VaultEmptyStateComponent - displays when no payment methods are available\n---\n",
|
|
533
|
+
"attributes": [],
|
|
534
|
+
"references": []
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "primer-vault-error-message",
|
|
538
|
+
"description": "VaultErrorMessageComponent - displays error messages with improved visuals\n---\n\n\n### **Events:**\n - **close-error**",
|
|
539
|
+
"attributes": [
|
|
540
|
+
{
|
|
541
|
+
"name": "errorMessage",
|
|
542
|
+
"description": "The error message to display",
|
|
543
|
+
"values": []
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"references": []
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "primer-vault-manager-header",
|
|
550
|
+
"description": "VaultManagerHeaderComponent - displays the header for the vault manager\n---\n\n\n### **Events:**\n - **toggle-edit-mode**",
|
|
551
|
+
"attributes": [
|
|
552
|
+
{
|
|
553
|
+
"name": "isEditMode",
|
|
554
|
+
"description": "Whether we're in edit mode",
|
|
555
|
+
"values": []
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "hasPaymentMethods",
|
|
559
|
+
"description": "Whether we have payment methods to edit",
|
|
560
|
+
"values": []
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"references": []
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"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**",
|
|
568
|
+
"attributes": [
|
|
569
|
+
{
|
|
570
|
+
"name": "headlessUtils",
|
|
571
|
+
"values": [{ "name": "HeadlessUnitilsContext" }]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "isEditMode",
|
|
575
|
+
"description": "Whether the component is in edit mode",
|
|
576
|
+
"values": []
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
"references": []
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "primer-vault-payment-submit",
|
|
583
|
+
"description": "A submit button component for vault payment flows.\nProvides a consistent submit button with translation support.\nIntegrates with the vault manager context to handle payment submission.\n---\n",
|
|
584
|
+
"attributes": [
|
|
585
|
+
{
|
|
586
|
+
"name": "buttonText",
|
|
587
|
+
"description": "The button text to display.\nFalls back to localized default if not explicitly set.",
|
|
588
|
+
"values": []
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "headlessInstance",
|
|
592
|
+
"values": [{ "name": "HeadlessUnitilsContext" }]
|
|
593
|
+
},
|
|
594
|
+
{ "name": "sdkState", "values": [{ "name": "SdkStateContext" }] },
|
|
595
|
+
{
|
|
596
|
+
"name": "variant",
|
|
597
|
+
"description": "The button variant to use.",
|
|
598
|
+
"values": []
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "disabled",
|
|
602
|
+
"description": "Whether the button is disabled.\nThis property allows external disabling of the button\nregardless of the context state.",
|
|
603
|
+
"values": []
|
|
604
|
+
}
|
|
605
|
+
],
|
|
606
|
+
"references": []
|
|
341
607
|
}
|
|
342
608
|
]
|
|
343
609
|
}
|