@primer-io/primer-js 1.2.0 → 1.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.
@@ -224,6 +224,37 @@
224
224
  ],
225
225
  "references": []
226
226
  },
227
+ {
228
+ "name": "primer-pt-phone-number-input",
229
+ "description": "Portuguese Phone Number Input\n\nInline phone input dedicated to Portuguese (+351) numbers. Renders a PT\nflag, a fixed `+351` prefix, and a digit-only field; the user types only\nthe local digits. Emits `input` / `change` events whose detail is the full\nE.164 number (`+351` + digits) or an empty string when no digits are\nentered.\n\nThis is intentionally PT-only — MB WAY is the only consumer and only\noperates in Portugal. If we ever need other locales, fork into a\ncountry-aware component rather than generalising this one.\n---\n\n\n### **Events:**\n - **eventName**\n- **input** - CustomEvent<string> with full phone number on each keystroke\n- **change** - CustomEvent<string> with full phone number on commit",
230
+ "attributes": [
231
+ {
232
+ "name": "prefix",
233
+ "description": "Fixed PT dial code. Exposed as a property only so tests can override.",
234
+ "values": []
235
+ },
236
+ {
237
+ "name": "value",
238
+ "description": "Externally-provided full phone number including the prefix. The component\ndisplays only the local portion (everything after the prefix).",
239
+ "values": []
240
+ },
241
+ { "name": "placeholder", "values": [] },
242
+ { "name": "input-id", "values": [] },
243
+ {
244
+ "name": "max-length",
245
+ "description": "Maximum total length of the full phone number (including prefix).",
246
+ "values": []
247
+ },
248
+ {
249
+ "name": "min-length",
250
+ "description": "Minimum total length of the full phone number (including prefix).",
251
+ "values": []
252
+ },
253
+ { "name": "disabled", "values": [] },
254
+ { "name": "has-errors", "values": [] }
255
+ ],
256
+ "references": []
257
+ },
227
258
  {
228
259
  "name": "primer-select",
229
260
  "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",
@@ -233,11 +264,6 @@
233
264
  "description": "The name attribute for the select element",
234
265
  "values": []
235
266
  },
236
- {
237
- "name": "id",
238
- "description": "The id attribute for the select element",
239
- "values": []
240
- },
241
267
  {
242
268
  "name": "value",
243
269
  "description": "The current value of the select",
@@ -300,6 +326,18 @@
300
326
  ],
301
327
  "references": []
302
328
  },
329
+ {
330
+ "name": "primer-adyen-mbway",
331
+ "description": "Adyen MB WAY Payment Component\n\nInline phone-number entry → tokenize → poll MB WAY app → resume.\n---\n",
332
+ "attributes": [
333
+ {
334
+ "name": "paymentMethod",
335
+ "values": [{ "name": "MbwayPaymentMethod" }]
336
+ },
337
+ { "name": "disabled", "values": [] }
338
+ ],
339
+ "references": []
340
+ },
303
341
  {
304
342
  "name": "primer-billing-address",
305
343
  "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.",
@@ -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": "1.2.0",
4
+ "version": "1.4.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -565,6 +565,102 @@
565
565
  "events": []
566
566
  }
567
567
  },
568
+ {
569
+ "name": "primer-pt-phone-number-input",
570
+ "description": "Portuguese Phone Number Input\n\nInline phone input dedicated to Portuguese (+351) numbers. Renders a PT\nflag, a fixed `+351` prefix, and a digit-only field; the user types only\nthe local digits. Emits `input` / `change` events whose detail is the full\nE.164 number (`+351` + digits) or an empty string when no digits are\nentered.\n\nThis is intentionally PT-only — MB WAY is the only consumer and only\noperates in Portugal. If we ever need other locales, fork into a\ncountry-aware component rather than generalising this one.\n---\n\n\n### **Events:**\n - **eventName**\n- **input** - CustomEvent<string> with full phone number on each keystroke\n- **change** - CustomEvent<string> with full phone number on commit",
571
+ "doc-url": "",
572
+ "attributes": [
573
+ {
574
+ "name": "prefix",
575
+ "description": "Fixed PT dial code. Exposed as a property only so tests can override.",
576
+ "value": { "type": "string", "default": "'+351'" }
577
+ },
578
+ {
579
+ "name": "value",
580
+ "description": "Externally-provided full phone number including the prefix. The component\ndisplays only the local portion (everything after the prefix).",
581
+ "value": { "type": "string", "default": "''" }
582
+ },
583
+ {
584
+ "name": "placeholder",
585
+ "value": { "type": "string", "default": "''" }
586
+ },
587
+ {
588
+ "name": "input-id",
589
+ "value": {
590
+ "type": "string",
591
+ "default": "'primer-pt-phone-number-input'"
592
+ }
593
+ },
594
+ {
595
+ "name": "max-length",
596
+ "description": "Maximum total length of the full phone number (including prefix).",
597
+ "value": { "type": "number", "default": "15" }
598
+ },
599
+ {
600
+ "name": "min-length",
601
+ "description": "Minimum total length of the full phone number (including prefix).",
602
+ "value": { "type": "number", "default": "9" }
603
+ },
604
+ {
605
+ "name": "disabled",
606
+ "value": { "type": "boolean", "default": "false" }
607
+ },
608
+ {
609
+ "name": "has-errors",
610
+ "value": { "type": "boolean", "default": "false" }
611
+ }
612
+ ],
613
+ "events": [
614
+ { "name": "eventName", "type": "CustomEvent" },
615
+ {
616
+ "name": "input",
617
+ "description": "CustomEvent<string> with full phone number on each keystroke"
618
+ },
619
+ {
620
+ "name": "change",
621
+ "description": "CustomEvent<string> with full phone number on commit"
622
+ }
623
+ ],
624
+ "js": {
625
+ "properties": [
626
+ {
627
+ "name": "prefix",
628
+ "description": "Fixed PT dial code. Exposed as a property only so tests can override.",
629
+ "type": "string"
630
+ },
631
+ {
632
+ "name": "value",
633
+ "description": "Externally-provided full phone number including the prefix. The component\ndisplays only the local portion (everything after the prefix).",
634
+ "type": "string"
635
+ },
636
+ { "name": "placeholder", "type": "string" },
637
+ { "name": "inputId", "type": "string" },
638
+ {
639
+ "name": "maxLength",
640
+ "description": "Maximum total length of the full phone number (including prefix).",
641
+ "type": "number"
642
+ },
643
+ {
644
+ "name": "minLength",
645
+ "description": "Minimum total length of the full phone number (including prefix).",
646
+ "type": "number"
647
+ },
648
+ { "name": "disabled", "type": "boolean" },
649
+ { "name": "hasErrors", "type": "boolean" }
650
+ ],
651
+ "events": [
652
+ { "name": "eventName", "type": "CustomEvent" },
653
+ {
654
+ "name": "input",
655
+ "description": "CustomEvent<string> with full phone number on each keystroke"
656
+ },
657
+ {
658
+ "name": "change",
659
+ "description": "CustomEvent<string> with full phone number on commit"
660
+ }
661
+ ]
662
+ }
663
+ },
568
664
  {
569
665
  "name": "primer-select",
570
666
  "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",
@@ -575,11 +671,6 @@
575
671
  "description": "The name attribute for the select element",
576
672
  "value": { "type": "string", "default": "''" }
577
673
  },
578
- {
579
- "name": "id",
580
- "description": "The id attribute for the select element",
581
- "value": { "type": "string", "default": "''" }
582
- },
583
674
  {
584
675
  "name": "value",
585
676
  "description": "The current value of the select",
@@ -602,26 +693,16 @@
602
693
  }
603
694
  ],
604
695
  "events": [
605
- {
606
- "name": "change",
607
- "type": "CustomEvent",
608
- "description": "Fired when selection changes"
609
- },
696
+ { "name": "change", "description": "Fired when selection changes" },
610
697
  {
611
698
  "name": "input",
612
- "type": "CustomEvent",
613
699
  "description": "Fired when input value changes"
614
700
  },
615
701
  {
616
702
  "name": "focus",
617
- "type": "CustomEvent",
618
703
  "description": "Fired when select receives focus"
619
704
  },
620
- {
621
- "name": "blur",
622
- "type": "CustomEvent",
623
- "description": "Fired when select loses focus"
624
- }
705
+ { "name": "blur", "description": "Fired when select loses focus" }
625
706
  ],
626
707
  "js": {
627
708
  "properties": [
@@ -630,11 +711,6 @@
630
711
  "description": "The name attribute for the select element",
631
712
  "type": "string"
632
713
  },
633
- {
634
- "name": "id",
635
- "description": "The id attribute for the select element",
636
- "type": "string"
637
- },
638
714
  {
639
715
  "name": "value",
640
716
  "description": "The current value of the select",
@@ -664,24 +740,17 @@
664
740
  "events": [
665
741
  {
666
742
  "name": "change",
667
- "type": "CustomEvent",
668
743
  "description": "Fired when selection changes"
669
744
  },
670
745
  {
671
746
  "name": "input",
672
- "type": "CustomEvent",
673
747
  "description": "Fired when input value changes"
674
748
  },
675
749
  {
676
750
  "name": "focus",
677
- "type": "CustomEvent",
678
751
  "description": "Fired when select receives focus"
679
752
  },
680
- {
681
- "name": "blur",
682
- "type": "CustomEvent",
683
- "description": "Fired when select loses focus"
684
- }
753
+ { "name": "blur", "description": "Fired when select loses focus" }
685
754
  ]
686
755
  }
687
756
  },
@@ -765,6 +834,32 @@
765
834
  "events": []
766
835
  }
767
836
  },
837
+ {
838
+ "name": "primer-adyen-mbway",
839
+ "description": "Adyen MB WAY Payment Component\n\nInline phone-number entry → tokenize → poll MB WAY app → resume.\n---\n",
840
+ "doc-url": "",
841
+ "attributes": [
842
+ {
843
+ "name": "paymentMethod",
844
+ "value": { "type": "MbwayPaymentMethod | undefined" }
845
+ },
846
+ {
847
+ "name": "disabled",
848
+ "value": { "type": "boolean", "default": "false" }
849
+ }
850
+ ],
851
+ "events": [],
852
+ "js": {
853
+ "properties": [
854
+ {
855
+ "name": "paymentMethod",
856
+ "type": "MbwayPaymentMethod | undefined"
857
+ },
858
+ { "name": "disabled", "type": "boolean" }
859
+ ],
860
+ "events": []
861
+ }
862
+ },
768
863
  {
769
864
  "name": "primer-billing-address",
770
865
  "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.",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@primer-io/primer-js",
3
3
  "description": "Primer 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": "1.2.0",
5
+ "version": "1.4.0",
6
6
  "type": "module",
7
7
  "main": "./dist/primer-loader.js",
8
8
  "types": "./dist/primer-loader.d.ts",