@primer-io/primer-js 0.3.12 → 0.4.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.
@@ -231,6 +231,43 @@
231
231
  "attributes": [],
232
232
  "references": []
233
233
  },
234
+ {
235
+ "name": "primer-select",
236
+ "description": "A native select dropdown component\n---\n\n\n### **Events:**\n - **change** - Fired when selection changes\n- **input** - Fired when input value changes\n- **focus** - Fired when select receives focus\n- **blur** - Fired when select loses focus",
237
+ "attributes": [
238
+ {
239
+ "name": "name",
240
+ "description": "The name attribute for the select element",
241
+ "values": []
242
+ },
243
+ {
244
+ "name": "id",
245
+ "description": "The id attribute for the select element",
246
+ "values": []
247
+ },
248
+ {
249
+ "name": "value",
250
+ "description": "The current value of the select",
251
+ "values": []
252
+ },
253
+ {
254
+ "name": "disabled",
255
+ "description": "Whether the select is disabled",
256
+ "values": []
257
+ },
258
+ {
259
+ "name": "has-error",
260
+ "description": "Whether the select is in an error state",
261
+ "values": []
262
+ },
263
+ {
264
+ "name": "placeholder",
265
+ "description": "Placeholder text for the select",
266
+ "values": []
267
+ }
268
+ ],
269
+ "references": []
270
+ },
234
271
  {
235
272
  "name": "primer-spinner",
236
273
  "description": "Spinner component with configurable size and color\nAdapted to work both standalone and within input components\n---\n",
@@ -264,6 +301,12 @@
264
301
  ],
265
302
  "references": []
266
303
  },
304
+ {
305
+ "name": "primer-billing-address",
306
+ "description": "BillingAddressComponent provides a form for collecting billing address information.\n\nConfiguration is exclusively server-side via SDK Core's checkoutModules. Field visibility\nis determined by the BILLING_ADDRESS module in the client session configuration.\n---\n\n\n### **Events:**\n - **primer-billing-address-change** - Fired when form data changes\n- **primer-billing-address-submit** - Fired when form is submitted\n\n### **Methods:**\n - **validateForSubmission(): _Promise<boolean>_** - Public method to validate billing address fields\nCalled by the parent form (card-form) when submitting\nReturns true if billing address is valid\nNote: Does NOT call setBillingAddress API - that happens after card validation\n- **submitToSDK(): _Promise<boolean>_** - Public method to submit billing address to SDK Core\nCalled by parent form ONLY after both card and billing address validation pass\n\nNote: headlessUtils is guaranteed to be available when this method is called,\nas the component only renders (and becomes interactive) after initialization task completes.",
307
+ "attributes": [],
308
+ "references": []
309
+ },
267
310
  {
268
311
  "name": "primer-card-form",
269
312
  "description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
@@ -432,7 +475,7 @@
432
475
  "values": []
433
476
  },
434
477
  {
435
- "name": "headlessInstance",
478
+ "name": "headlessUtils",
436
479
  "values": [{ "name": "HeadlessUtilsContextType" }]
437
480
  },
438
481
  {
@@ -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.3.12",
4
+ "version": "0.4.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -573,6 +573,126 @@
573
573
  "events": [{ "name": "eventName", "type": "CustomEvent" }]
574
574
  }
575
575
  },
576
+ {
577
+ "name": "primer-select",
578
+ "description": "A native select dropdown component\n---\n\n\n### **Events:**\n - **change** - Fired when selection changes\n- **input** - Fired when input value changes\n- **focus** - Fired when select receives focus\n- **blur** - Fired when select loses focus",
579
+ "doc-url": "",
580
+ "attributes": [
581
+ {
582
+ "name": "name",
583
+ "description": "The name attribute for the select element",
584
+ "value": { "type": "string", "default": "''" }
585
+ },
586
+ {
587
+ "name": "id",
588
+ "description": "The id attribute for the select element",
589
+ "value": { "type": "string", "default": "''" }
590
+ },
591
+ {
592
+ "name": "value",
593
+ "description": "The current value of the select",
594
+ "value": { "type": "string", "default": "''" }
595
+ },
596
+ {
597
+ "name": "disabled",
598
+ "description": "Whether the select is disabled",
599
+ "value": { "type": "boolean", "default": "false" }
600
+ },
601
+ {
602
+ "name": "has-error",
603
+ "description": "Whether the select is in an error state",
604
+ "value": { "type": "boolean", "default": "false" }
605
+ },
606
+ {
607
+ "name": "placeholder",
608
+ "description": "Placeholder text for the select",
609
+ "value": { "type": "string", "default": "''" }
610
+ }
611
+ ],
612
+ "events": [
613
+ {
614
+ "name": "change",
615
+ "type": "CustomEvent",
616
+ "description": "Fired when selection changes"
617
+ },
618
+ {
619
+ "name": "input",
620
+ "type": "CustomEvent",
621
+ "description": "Fired when input value changes"
622
+ },
623
+ {
624
+ "name": "focus",
625
+ "type": "CustomEvent",
626
+ "description": "Fired when select receives focus"
627
+ },
628
+ {
629
+ "name": "blur",
630
+ "type": "CustomEvent",
631
+ "description": "Fired when select loses focus"
632
+ }
633
+ ],
634
+ "js": {
635
+ "properties": [
636
+ {
637
+ "name": "name",
638
+ "description": "The name attribute for the select element",
639
+ "type": "string"
640
+ },
641
+ {
642
+ "name": "id",
643
+ "description": "The id attribute for the select element",
644
+ "type": "string"
645
+ },
646
+ {
647
+ "name": "value",
648
+ "description": "The current value of the select",
649
+ "type": "string"
650
+ },
651
+ {
652
+ "name": "disabled",
653
+ "description": "Whether the select is disabled",
654
+ "type": "boolean"
655
+ },
656
+ {
657
+ "name": "hasError",
658
+ "description": "Whether the select is in an error state",
659
+ "type": "boolean"
660
+ },
661
+ {
662
+ "name": "placeholder",
663
+ "description": "Placeholder text for the select",
664
+ "type": "string"
665
+ },
666
+ {
667
+ "name": "options",
668
+ "description": "Array of options for the select",
669
+ "type": "SelectOption[]"
670
+ }
671
+ ],
672
+ "events": [
673
+ {
674
+ "name": "change",
675
+ "type": "CustomEvent",
676
+ "description": "Fired when selection changes"
677
+ },
678
+ {
679
+ "name": "input",
680
+ "type": "CustomEvent",
681
+ "description": "Fired when input value changes"
682
+ },
683
+ {
684
+ "name": "focus",
685
+ "type": "CustomEvent",
686
+ "description": "Fired when select receives focus"
687
+ },
688
+ {
689
+ "name": "blur",
690
+ "type": "CustomEvent",
691
+ "description": "Fired when select loses focus"
692
+ }
693
+ ]
694
+ }
695
+ },
576
696
  {
577
697
  "name": "primer-spinner",
578
698
  "description": "Spinner component with configurable size and color\nAdapted to work both standalone and within input components\n---\n",
@@ -663,6 +783,50 @@
663
783
  ]
664
784
  }
665
785
  },
786
+ {
787
+ "name": "primer-billing-address",
788
+ "description": "BillingAddressComponent provides a form for collecting billing address information.\n\nConfiguration is exclusively server-side via SDK Core's checkoutModules. Field visibility\nis determined by the BILLING_ADDRESS module in the client session configuration.\n---\n\n\n### **Events:**\n - **primer-billing-address-change** - Fired when form data changes\n- **primer-billing-address-submit** - Fired when form is submitted\n\n### **Methods:**\n - **validateForSubmission(): _Promise<boolean>_** - Public method to validate billing address fields\nCalled by the parent form (card-form) when submitting\nReturns true if billing address is valid\nNote: Does NOT call setBillingAddress API - that happens after card validation\n- **submitToSDK(): _Promise<boolean>_** - Public method to submit billing address to SDK Core\nCalled by parent form ONLY after both card and billing address validation pass\n\nNote: headlessUtils is guaranteed to be available when this method is called,\nas the component only renders (and becomes interactive) after initialization task completes.",
789
+ "doc-url": "",
790
+ "attributes": [],
791
+ "events": [
792
+ {
793
+ "name": "primer-billing-address-change",
794
+ "type": "CustomEvent",
795
+ "description": "Fired when form data changes"
796
+ },
797
+ {
798
+ "name": "primer-billing-address-submit",
799
+ "type": "CustomEvent",
800
+ "description": "Fired when form is submitted"
801
+ }
802
+ ],
803
+ "js": {
804
+ "properties": [
805
+ {
806
+ "name": "configuration",
807
+ "description": "Configuration from SDK Core containing checkoutModules configuration",
808
+ "type": "ConfigurationContextType"
809
+ },
810
+ {
811
+ "name": "headlessUtils",
812
+ "description": "Headless SDK utilities for API methods like setBillingAddress",
813
+ "type": "HeadlessUtilsContextType"
814
+ }
815
+ ],
816
+ "events": [
817
+ {
818
+ "name": "primer-billing-address-change",
819
+ "type": "CustomEvent",
820
+ "description": "Fired when form data changes"
821
+ },
822
+ {
823
+ "name": "primer-billing-address-submit",
824
+ "type": "CustomEvent",
825
+ "description": "Fired when form is submitted"
826
+ }
827
+ ]
828
+ }
829
+ },
666
830
  {
667
831
  "name": "primer-card-form",
668
832
  "description": "CardFormComponent serves as a container for card input components.\nIt handles form submission, validation, and provides context to child components.\n---\n",
@@ -1084,7 +1248,7 @@
1084
1248
  "value": { "type": "string" }
1085
1249
  },
1086
1250
  {
1087
- "name": "headlessInstance",
1251
+ "name": "headlessUtils",
1088
1252
  "value": { "type": "HeadlessUtilsContextType", "default": "null" }
1089
1253
  },
1090
1254
  {
@@ -1118,10 +1282,7 @@
1118
1282
  "description": "The button text to display.\nFalls back to localized default if not explicitly set.",
1119
1283
  "type": "string"
1120
1284
  },
1121
- {
1122
- "name": "headlessInstance",
1123
- "type": "HeadlessUtilsContextType"
1124
- },
1285
+ { "name": "headlessUtils", "type": "HeadlessUtilsContextType" },
1125
1286
  { "name": "clientOptions", "type": "ClientOptionsContextType" },
1126
1287
  { "name": "sdkState", "type": "SdkStateContextType" },
1127
1288
  { "name": "cardFormContext", "type": "CardFormContext | null" },
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.3.12",
5
+ "version": "0.4.0",
6
6
  "type": "module",
7
7
  "main": "./dist/primer-loader.js",
8
8
  "types": "./dist/primer-loader.d.ts",
@@ -11,8 +11,10 @@
11
11
  "src/primer-checkout.ts",
12
12
  "**/*.styles.ts",
13
13
  "src/atoms/**/*.component.ts",
14
+ "src/atoms/**/*.ts",
15
+ "src/containers/native-payment/components/**/*.ts",
14
16
  "src/containers/**/*.component.ts",
15
- "src/containers/native-payment/components/**/*.ts"
17
+ "src/containers/**/*.ts"
16
18
  ],
17
19
  "publishConfig": {
18
20
  "access": "public"