@primer-io/primer-js 1.2.0 → 1.3.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",
@@ -300,6 +331,18 @@
300
331
  ],
301
332
  "references": []
302
333
  },
334
+ {
335
+ "name": "primer-adyen-mbway",
336
+ "description": "Adyen MB WAY Payment Component\n\nInline phone-number entry → tokenize → poll MB WAY app → resume.\n---\n",
337
+ "attributes": [
338
+ {
339
+ "name": "paymentMethod",
340
+ "values": [{ "name": "MbwayPaymentMethod" }]
341
+ },
342
+ { "name": "disabled", "values": [] }
343
+ ],
344
+ "references": []
345
+ },
303
346
  {
304
347
  "name": "primer-billing-address",
305
348
  "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.3.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",
@@ -765,6 +861,32 @@
765
861
  "events": []
766
862
  }
767
863
  },
864
+ {
865
+ "name": "primer-adyen-mbway",
866
+ "description": "Adyen MB WAY Payment Component\n\nInline phone-number entry → tokenize → poll MB WAY app → resume.\n---\n",
867
+ "doc-url": "",
868
+ "attributes": [
869
+ {
870
+ "name": "paymentMethod",
871
+ "value": { "type": "MbwayPaymentMethod | undefined" }
872
+ },
873
+ {
874
+ "name": "disabled",
875
+ "value": { "type": "boolean", "default": "false" }
876
+ }
877
+ ],
878
+ "events": [],
879
+ "js": {
880
+ "properties": [
881
+ {
882
+ "name": "paymentMethod",
883
+ "type": "MbwayPaymentMethod | undefined"
884
+ },
885
+ { "name": "disabled", "type": "boolean" }
886
+ ],
887
+ "events": []
888
+ }
889
+ },
768
890
  {
769
891
  "name": "primer-billing-address",
770
892
  "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.3.0",
6
6
  "type": "module",
7
7
  "main": "./dist/primer-loader.js",
8
8
  "types": "./dist/primer-loader.d.ts",