@primer-io/primer-js 0.1.0 → 0.1.1
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 +520 -514
- package/dist/primer-loader.d.ts +8 -2
- package/dist/primer-loader.js +2 -2
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
{
|
|
23
23
|
"kind": "variable",
|
|
24
24
|
"name": "ae",
|
|
25
|
-
"default": "class extends f{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this.locale=\"en-GB\";this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new Wt(this),this.sdkStateController=new qt(this),this.primerEventsController=new tt(this),this.styleProcessingController=new Zt(this),this.vaultManagerController=new _t(this),this.cardNetworkController=new Bt(this),new ur(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}attributeChangedCallback(e,r,i){e===\"customstyles\"?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,r,i)}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Wr(this.options?.locale)?this.locale=Zr(this.options?.locale):N.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to default locale `en-GB`\")),qr(this.locale||\"en-GB\"))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}checkLoadingStateChange(){let e=this.sdkStateController?.state.isLoading||!1;this.previousLoadingState&&!e&&(this.jsInitialized=!0),this.previousLoadingState=e}render(){let e=this.sdkStateController.state,r=e.isLoading,i=e.error,n=!r&&!i;return m` ${
|
|
25
|
+
"default": "class extends f{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this.locale=\"en-GB\";this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new Wt(this),this.sdkStateController=new qt(this),this.primerEventsController=new tt(this),this.styleProcessingController=new Zt(this),this.vaultManagerController=new _t(this),this.cardNetworkController=new Bt(this),new ur(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}attributeChangedCallback(e,r,i){e===\"customstyles\"?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,r,i)}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Wr(this.options?.locale)?this.locale=Zr(this.options?.locale):N.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to default locale `en-GB`\")),qr(this.locale||\"en-GB\"))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}checkLoadingStateChange(){let e=this.sdkStateController?.state.isLoading||!1;this.previousLoadingState&&!e&&(this.jsInitialized=!0),this.previousLoadingState=e}render(){let e=this.sdkStateController.state,r=e.isLoading,i=e.error,n=!r&&!i;return m` ${$(r,()=>u)} ${$(i,()=>m`<primer-checkout-error></primer-checkout-error>`)} ${$(n,()=>m` <slot name=\"main\" @slotchange=${this.onSlotChange}></slot> ${$(this.hasAssignedContent,()=>u,()=>m`<primer-main></primer-main>`)} `,()=>u)} `}addEventListener(e,r,i){super.addEventListener(e,r,i)}}"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"kind": "variable",
|
|
@@ -77,37 +77,37 @@
|
|
|
77
77
|
{
|
|
78
78
|
"kind": "variable",
|
|
79
79
|
"name": "Z",
|
|
80
|
-
"default": "class extends f{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.klarnaCategories=null;this.selectedCategory=null;this.isExpanded=!1;this.headerAriaLabel=P(\"pay_with\",{id:\"pay_with\"});this._paymentMethodManagerTask=new V(this,{task:async([e,r])=>{if(!e||!r)return
|
|
80
|
+
"default": "class extends f{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.klarnaCategories=null;this.selectedCategory=null;this.isExpanded=!1;this.headerAriaLabel=P(\"pay_with\",{id:\"pay_with\"});this._paymentMethodManagerTask=new V(this,{task:async([e,r])=>{if(!e||!r)return D;let i=await r.getCDNAssets(\"KLARNA\");return{manager:e.manager,klarnaIcon:i?.assets?.icon?`${i.goatCdnUrl}/${i.assets.icon}`:\"\"}},args:()=>[this.paymentManagers.get(\"KLARNA\"),this.headlessUtils]})}toggleExpand(){this.isExpanded=!this.isExpanded,this.isExpanded||(this.selectedCategory=null)}async startKlarnaPayment(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory))try{await this._paymentMethodManagerTask.value.manager.start({paymentMethodCategoryId:this.selectedCategory})}catch(e){N.error(\"Failed to start Klarna payment\",e)}}async renderSelectedCategory(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory||!this.klarnaContainer))try{this.klarnaContainer.innerHTML=\"\",await this._paymentMethodManagerTask.value.manager.renderCategory({containerId:this.klarnaContainer,paymentMethodCategoryId:this.selectedCategory,onHeightChange:e=>{e>0&&(this.klarnaContainer.style.height=`${e}px`)}})}catch(e){N.error(\"Failed to render Klarna category\",e)}}selectCategory(e){this.selectedCategory=e,this.renderSelectedCategory()}updated(e){e.has(\"selectedCategory\")&&this.selectedCategory&&this.renderSelectedCategory()}renderCategorySelection(){let e=this.klarnaCategories?.categories||[];return this.klarnaCategories?.isLoading||!1?m`<div class=\"loading\"> <primer-spinner size=\"small\"></primer-spinner> </div>`:e.length<=1?u:m` <div class=\"category-selection\"> ${e.map(i=>m` <button class=${ce({\"category-button\":!0,selected:i.id===this.selectedCategory})} @click=${()=>{this.selectCategory(i.id)}} > ${i.name} </button> `)} </div> `}renderExpandedContent(){return m` ${this.renderCategorySelection()} ${this.selectedCategory?m` <div id=\"klarna-category-container\" class=\"klarna-category-container\" ></div> `:u} <button class=${ce({\"klarna-pay-button\":!0,loading:!!this.sdkState?.isProcessing,disabled:!this.selectedCategory})} ?disabled=${!this.selectedCategory||this.sdkState?.isProcessing} @click=${()=>this.startKlarnaPayment()} > ${P(\"confirm\",{id:\"confirm\"})} </button> `}render(){return this._paymentMethodManagerTask.render({error:e=>{let r=e instanceof Error?e.message:\"Unknown error in Klarna\";return m`<div class=\"error\"> Error loading Klarna: ${r} </div>`},complete:({manager:e,klarnaIcon:r})=>e?m` <div class=\"klarna-container ${this.isExpanded?\"expanded\":\"\"}\"> <div class=\"klarna-button-header\"> <primer-button buttonType=\"button\" variant=\"secondary\" class=\"klarna-button\" @click=${this.toggleExpand} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${this.headerAriaLabel} > <img src=${r} alt=\"Klarna logo\" /> <span>${P(\"pay_with\",{id:\"pay_with\"})} Klarna</span> <span class=\"klarna-accordion-icon ${this.isExpanded?\"expanded\":\"\"}\" > ▼ </span> </primer-button> </div> <div class=\"klarna-expanded-content ${this.isExpanded?\"visible\":\"\"}\" > <div class=\"klarna-accordion-content\"> ${this.renderExpandedContent()} </div> </div> </div> `:u})}}"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"kind": "variable",
|
|
84
|
-
"name": "
|
|
84
|
+
"name": "De",
|
|
85
85
|
"default": "class extends f{constructor(){super(...arguments);this.type=void 0;this.paymentMethods=null}render(){if(!this.type)return u;let e=this.paymentMethods?.get(this.type);if(!e)return u;switch(e?.managerType){case\"CARD\":return m`<primer-card-form></primer-card-form>`;case\"NATIVE\":return m`<primer-native-payment .paymentMethod=${e} ></primer-native-payment>`;case\"REDIRECT\":return m`<primer-redirect-payment .paymentMethod=${e} ></primer-redirect-payment>`;case\"KLARNA\":return m`<primer-klarna></primer-klarna>`;default:return u}}}"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"kind": "variable",
|
|
89
89
|
"name": "ge",
|
|
90
|
-
"default": "class extends f{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this._paymentMethodManagerTask=new V(this,{task:async([e,r])=>!e||!r
|
|
90
|
+
"default": "class extends f{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this._paymentMethodManagerTask=new V(this,{task:async([e,r])=>!e||!r?D:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new V(this,{task:async([e,r])=>{if(!e||!r)return D;let i=r.getPaymentMethodConfiguration(e);return i?{backgroundColor:i.displayMetadata.button.backgroundColor.colored,name:i.name,iconUrl:i.displayMetadata.button.iconUrl.colored}:D},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new V(this,{task:async([e,r])=>!e||!r?D:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}startRedirectPayment(){this._paymentMethodManagerTask.value&&this._paymentMethodManagerTask.value.start()}render(){return this._setupTasks.render({error:()=>u,complete:({assetsConfig:e})=>(this.style.setProperty(\"--redirect-payment-button-bg-color\",e.backgroundColor),m` <primer-button @click=\"${()=>this.startRedirectPayment()}\" class=${ce({loading:!!this.sdkState?.isProcessing})} title=\"${P(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" > <span class=\"image-container\"> <img src=\"${e.iconUrl}\" alt=\"${e.name}\" /> </span> </primer-button>`)})}}"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"kind": "variable",
|
|
94
|
-
"name": "
|
|
95
|
-
"default": "class extends f{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null}render(){return this.sdkState?.isSuccessful?m` <slot name=\"checkout-complete\"> <primer-checkout-complete></primer-checkout-complete> </slot> `:m` <slot name=\"payments\" @slotchange=${this.onSlotChange}></slot> ${
|
|
94
|
+
"name": "$e",
|
|
95
|
+
"default": "class extends f{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null}render(){return this.sdkState?.isSuccessful?m` <slot name=\"checkout-complete\"> <primer-checkout-complete></primer-checkout-complete> </slot> `:m` <slot name=\"payments\" @slotchange=${this.onSlotChange}></slot> ${$(this.hasAssignedContent,()=>u,()=>m` <div class=${ce({\"primer-is-processing\":!!this.sdkState?.isProcessing})} > <primer-vault-manager></primer-vault-manager> <primer-show-other-payments> <div slot=\"other-payments\" class=\"primer-main-list\"> ${this.paymentMethods?.toArray().map(e=>m` <primer-payment-method type=${e.type} ></primer-payment-method> `)} </div> </primer-show-other-payments> <primer-error-message-container></primer-error-message-container> </div> `)} `}}"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"kind": "variable",
|
|
99
99
|
"name": "Me",
|
|
100
|
-
"default": "class extends f{constructor(){super();this.paymentManagers=new Map;this.computedStyles=null;this._buttonId=\"button-container\";this.loadManagerTask=new V(this,{args:()=>[this.paymentMethod?.type],task:async([e])=>{if(!e)return
|
|
100
|
+
"default": "class extends f{constructor(){super();this.paymentManagers=new Map;this.computedStyles=null;this._buttonId=\"button-container\";this.loadManagerTask=new V(this,{args:()=>[this.paymentMethod?.type],task:async([e])=>{if(!e)return D;let r=this.paymentManagers.get(e)?.manager;if(!r)throw new Error(`No manager found for payment method type ${e}`);return r}}),new V(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return D;await this.updateComplete;let r=this.shadowRoot?.getElementById(this._buttonId);if(!r)return;let i=this.calculateButtonHeight(),n=e.createButton(),p=this.createRenderOptions(i);return await n.render(this.paymentMethod?.type===\"GOOGLE_PAY\"?this.shadowRoot?.getRootNode():r,p),e}})}calculateButtonHeight(){if(typeof window>\"u\"||!this.isConnected||!this.computedStyles)return 0;let e=parseFloat(this.computedStyles.getPropertyValue(\"--primer-typography-title-large-line-height\")),r=parseFloat(this.computedStyles.getPropertyValue(\"--primer-space-medium\"));return e+2*r}createRenderOptions(e){let r=this.paymentMethod?.type;return r===\"GOOGLE_PAY\"?{style:{shadowRoot:!0}}:r===\"APPLE_PAY\"?{style:{buttonHeight:e}}:r===\"PAYPAL\"?{style:{buttonHeight:e}}:{style:{buttonHeight:e}}}updated(e){e.has(\"paymentMethod\")&&this.paymentMethod&&(this._buttonId=`button-container-${this.paymentMethod.type}`)}render(){return this.loadManagerTask.render({error:()=>u,complete:()=>m` <!-- The native button container is rendered first --> <div class=\"native-button-container\" id=\"${this._buttonId}\"></div> `,pending:()=>u})}}"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"kind": "variable",
|
|
104
104
|
"name": "_e",
|
|
105
|
-
"default": "class extends f{constructor(){super(...arguments);this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.paymentManagers=new Map;this.cardFormProvider=new K(this,{context:gr,initialValue:null});this.eventsController=new tt(this);this.setupCardFormTask=new V(this,{task:async([e])=>{if(!e?.manager)return
|
|
105
|
+
"default": "class extends f{constructor(){super(...arguments);this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.paymentManagers=new Map;this.cardFormProvider=new K(this,{context:gr,initialValue:null});this.eventsController=new tt(this);this.setupCardFormTask=new V(this,{task:async([e])=>{if(!e?.manager)return D;let{manager:r}=e,{cardNumberInput:i,expiryInput:n,cvvInput:p}=r.createHostedInputs();return this.cardFormProvider.setValue({cardNumberInput:i,expiryInput:n,cvvInput:p,setCardholderName:x=>r.setCardholderName(x),setCardNetwork:x=>{this.selectedCardNetwork=x},validate:()=>r.validate(),submit:x=>r.submit(x)}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;this.isSubmitButton(i)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer-form-submit\",this.handleDirectSubmit)}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer-form-submit\",this.handleDirectSubmit),super.disconnectedCallback()}isSubmitButton(e){let r=e.tagName.toLowerCase(),i=r===\"button\",n=r===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"buttonType\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e)return;let r=await e.validate?.();if(r?.valid){let i=await e.submit?.(this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0);this.eventsController.dispatchFormSubmitSuccess(i)}else{let i=r?.validationErrors;this.cardFormProvider.setValue({...e,errors:i}),this.eventsController.dispatchFormSubmitErrors(i)}}render(){return this.setupCardFormTask.status===ke.ERROR||this.setupCardFormTask.status===ke.INITIAL?u:m` <form @submit=${this.handleFormSubmit}> <slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot> ${this.setupCardFormTask.render({complete:()=>$(this.hasAssignedContent,()=>u,()=>m` <div class=\"card-form\"> <primer-input-card-number></primer-input-card-number> <div class=\"card-form-row\"> <primer-input-card-expiry></primer-input-card-expiry> <primer-input-cvv></primer-input-cvv> </div> <primer-input-card-holder-name></primer-input-card-holder-name> </div> <primer-card-form-submit></primer-card-form-submit> `)})} </form> `}}"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"kind": "variable",
|
|
109
109
|
"name": "lt",
|
|
110
|
-
"default": "class extends j{constructor(){super();this.config={inputType:\"cardNumber\",containerSelector:\"#cardNumber\",errorName:\"cardNumber-card\",translations:{label:{id:\"cardNumber\",defaultMessage:\"Card Number\"},placeholder:\"4111 1111 1111 1111\",ariaLabel:{id:\"cardNumber\",defaultMessage:\"Card Number\"}}};this.childUpdated()}handleNetworkSelected(e){let{network:r}=e.detail;this.cardFormContext&&this.cardFormContext.setCardNetwork(r)}renderInput(){if(this.hostedInputController.setupTask.status===ke.ERROR)return u;let e=this.getError();return m` <primer-input-wrapper .focusWithin=\"${this.hostedInputController.isFocused}\" .hasError=${!!e} > <primer-input-label slot=\"label\">${this.label}</primer-input-label> <div slot=\"input\" class=\"card-number-container\"> <div id=\"${this.config.containerSelector.substring(1)}\"></div> <div class=\"network-selector-container\"> <primer-card-network-selector @network-selected=${this.handleNetworkSelected} ></primer-card-network-selector> </div> </div> ${
|
|
110
|
+
"default": "class extends j{constructor(){super();this.config={inputType:\"cardNumber\",containerSelector:\"#cardNumber\",errorName:\"cardNumber-card\",translations:{label:{id:\"cardNumber\",defaultMessage:\"Card Number\"},placeholder:\"4111 1111 1111 1111\",ariaLabel:{id:\"cardNumber\",defaultMessage:\"Card Number\"}}};this.childUpdated()}handleNetworkSelected(e){let{network:r}=e.detail;this.cardFormContext&&this.cardFormContext.setCardNetwork(r)}renderInput(){if(this.hostedInputController.setupTask.status===ke.ERROR)return u;let e=this.getError();return m` <primer-input-wrapper .focusWithin=\"${this.hostedInputController.isFocused}\" .hasError=${!!e} > <primer-input-label slot=\"label\">${this.label}</primer-input-label> <div slot=\"input\" class=\"card-number-container\"> <div id=\"${this.config.containerSelector.substring(1)}\"></div> <div class=\"network-selector-container\"> <primer-card-network-selector @network-selected=${this.handleNetworkSelected} ></primer-card-network-selector> </div> </div> ${$(e,r=>m` <primer-input-error slot=\"error\"> ${P(r,{id:r})} </primer-input-error> `,()=>u)} </primer-input-wrapper> `}render(){return this.renderInput()}}"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"kind": "variable",
|
|
@@ -132,17 +132,17 @@
|
|
|
132
132
|
{
|
|
133
133
|
"kind": "variable",
|
|
134
134
|
"name": "le",
|
|
135
|
-
"default": "class extends f{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=ao();this.dropdownRef=ao();this.networkOptionRefs=[];this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(this.getSelectableNetworks().length>1)switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex]))
|
|
135
|
+
"default": "class extends f{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=ao();this.dropdownRef=ao();this.networkOptionRefs=[];this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(!(!(this.getSelectableNetworks().length>1)||!(this.contains(e.target)||this===e.target||this.isDropdownOpen&&e.target===document.body)))switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex])):!this.isDropdownOpen&&this.buttonRef.value===document.activeElement&&(e.preventDefault(),this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Escape\":this.isDropdownOpen&&(e.preventDefault(),this.isDropdownOpen=!1,this.buttonRef.value?.focus());break;case\"Tab\":this.isDropdownOpen&&(this.isDropdownOpen=!1);break}};this.handleDocumentKeyDown=e=>{this.isDropdownOpen&&this.handleKeyDown(e)}}toggleDropdown(e){this.isKeyboardNavigation=!1,e.stopPropagation(),this.getSelectableNetworks().length>1&&(this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}getNetworkIconUrl(e){return this.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}getSelectableNetworks(){return this.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let r=this.getSelectableNetworks().findIndex(i=>i.network===e.network);return r>=0?r:0}selectNetwork(e,r){e.stopPropagation(),this.selectedCardNetwork=r,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:r.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,r){this.networkOptionRefs[r]=e}connectedCallback(){super.connectedCallback(),setTimeout(()=>{document.addEventListener(\"click\",this.handleClickOutside),document.addEventListener(\"mousemove\",this.handleMouseMove),this.addEventListener(\"keydown\",this.handleKeyDown),document.addEventListener(\"keydown\",this.handleDocumentKeyDown)},0)}disconnectedCallback(){document.removeEventListener(\"click\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleDocumentKeyDown),document.removeEventListener(\"mousemove\",this.handleMouseMove),this.removeEventListener(\"keydown\",this.handleKeyDown),super.disconnectedCallback()}render(){if(this.cardNetworks?.isLoading)return m`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return m`<primer-icon name=\"payment-card\"></primer-icon>`;let r=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!r)return m`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let i=e.length>1;return m` <button ${br(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${n=>{(n.key===\" \"||n.key===\"Enter\")&&i&&(n.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${i?`Selected card network: ${r.displayName}. Click to change.`:`Card network: ${r.displayName}`} aria-expanded=${i?this.isDropdownOpen:u} aria-haspopup=${i?\"true\":u} aria-controls=${i?\"network-dropdown\":u} > <img class=\"network-icon\" src=${this.getNetworkIconUrl(r)} alt=${r.displayName} /> ${$(i,()=>m` <primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" name=\"chevron-down\" ></primer-icon> `,()=>u)} </button> ${$(this.isDropdownOpen,()=>m` <div ${br(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" > ${e.map((n,p)=>m` <div ${br(x=>this.setNetworkOptionRef(x,p))} class=\"network-option ${this.isKeyboardNavigation&&p===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${x=>this.selectNetwork(x,n)} @keydown=${x=>{(x.key===\"Enter\"||x.key===\" \")&&this.selectNetwork(x,n)}} role=\"option\" aria-selected=${n.network===r.network} tabindex=\"${p===this.focusedNetworkIndex?\"0\":\"-1\"}\" > <img class=\"network-option-icon\" src=${this.getNetworkIconUrl(n)} alt=${n.displayName} /> <span class=\"network-name\">${n.displayName}</span> ${$(n.network===r.network,()=>m` <primer-icon class=\"checkmark\" name=\"checkmark\" ></primer-icon> `,()=>u)} </div> `)} </div> `,()=>u)} `}}"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"kind": "variable",
|
|
139
139
|
"name": "pe",
|
|
140
|
-
"default": "class extends f{constructor(){super(...arguments);this.vaultManagerContext=null;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\"}handleToggleEditMode(e){this.isEditMode=e.detail,this.deletePaymentMethodId=null}handleDeletePaymentMethod(e){this.deletePaymentMethodId=e.detail}handleCancelDelete(){this.deletePaymentMethodId=null}async handleConfirmDelete(){if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=P(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null}catch(e){this.errorMessage=e instanceof Error?e.message:P(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}}handlePaymentError(e){let r=e.detail?.error;this.errorMessage=r instanceof Error?r.message:P(\"payment_processing_error\",{id:\"payment_processing_error\"})}handleCloseError(){this.errorMessage=\"\"}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let r=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===e);if(!r)return\"\";try{return Cr(r).description||\"\"}catch{return\"\"}}renderDeleteConfirmation(){if(!this.deletePaymentMethodId)return u;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return m` <div class=\"delete-confirmation-container\"> <primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ></primer-vault-delete-confirmation> </div> `}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?u:m` <primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ></primer-vault-payment-method-item> `}render(){if(!this.vaultManagerContext?.enabled)return u;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,r=this.vaultManagerContext.isLoading,i=!this.isEditMode&&e&&!r&&!this.deletePaymentMethodId;return m` <div class=\"vault-manager\"> <primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header> ${
|
|
140
|
+
"default": "class extends f{constructor(){super(...arguments);this.vaultManagerContext=null;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\"}handleToggleEditMode(e){this.isEditMode=e.detail,this.deletePaymentMethodId=null}handleDeletePaymentMethod(e){this.deletePaymentMethodId=e.detail}handleCancelDelete(){this.deletePaymentMethodId=null}async handleConfirmDelete(){if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=P(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null}catch(e){this.errorMessage=e instanceof Error?e.message:P(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}}handlePaymentError(e){let r=e.detail?.error;this.errorMessage=r instanceof Error?r.message:P(\"payment_processing_error\",{id:\"payment_processing_error\"})}handleCloseError(){this.errorMessage=\"\"}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let r=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===e);if(!r)return\"\";try{return Cr(r).description||\"\"}catch{return\"\"}}renderDeleteConfirmation(){if(!this.deletePaymentMethodId)return u;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return m` <div class=\"delete-confirmation-container\"> <primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ></primer-vault-delete-confirmation> </div> `}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?u:m` <primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ></primer-vault-payment-method-item> `}render(){if(!this.vaultManagerContext?.enabled)return u;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,r=this.vaultManagerContext.isLoading,i=!this.isEditMode&&e&&!r&&!this.deletePaymentMethodId;return m` <div class=\"vault-manager\"> <primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header> ${$(this.errorMessage,()=>m` <primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ></primer-vault-error-message> `,()=>u)} <div class=\"vault-manager-content\"> ${$(!r&&!e,()=>m`<primer-vault-empty-state></primer-vault-empty-state>`,()=>u)} ${$(!r&&e&&this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>u)} ${$(!r&&e&&!this.deletePaymentMethodId,()=>m` <div class=\"payment-methods-list\"> ${this.vaultManagerContext?.vaultedPaymentMethods.map(n=>this.renderPaymentMethodItem(n))} ${$(i,()=>m` <primer-vault-payment-submit @primer-vault-payment-error=${this.handlePaymentError} ></primer-vault-payment-submit> `,()=>u)} </div> `,()=>u)} </div> </div> `}}"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"kind": "variable",
|
|
144
144
|
"name": "me",
|
|
145
|
-
"default": "class extends f{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new V(this,{task:async([e,r,i])=>{if(!e||!r||!i)return
|
|
145
|
+
"default": "class extends f{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new V(this,{task:async([e,r,i])=>{if(!e||!r||!i)return D;let n=\"\";if(ji(e))n=r.getCardNetworkAsset(e.paymentInstrumentData.network).cardUrl;else{let h=await r.getCDNAssets(e.paymentMethodType);h&&(n=h.assets?.icon?`${h.goatCdnUrl}/${h.assets.icon}`:\"\")}let p=i.cvvRecapture,x=Cr(e);return{icon:n,shouldShowCVV:p,...x}},args:()=>[this.paymentMethod,this.headlessUtils,this.vaultManagerContext]})}isSelected(){if(!this.vaultManagerContext||!this.paymentMethod)return!1;let e=this.vaultItemContext?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}handleClick(){this.isEditMode||!this.vaultManagerContext||!this.paymentMethod||(this.isSelected()?this.vaultItemContext?.setSelectedVaultedPaymentMethod(null):this.vaultItemContext?.setSelectedVaultedPaymentMethod(this.paymentMethod))}handleDeleteClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(\"delete-payment-method\",{detail:this.paymentMethod?.id,bubbles:!0,composed:!0}))}renderPaymentMethodContent(e){let r=e.icon?m`<img class=\"payment-method-icon\" src=${e.icon} alt=${e.description} />`:m` <div class=\"payment-method-icon payment-method-icon-generic\"> <primer-icon name=\"payment-card\" size=\"sm\"></primer-icon> </div> `;return m` ${r} <div class=\"payment-method-details\"> <div class=\"payment-method-description\">${e.description}</div> ${e.secondaryDescription?m`<div class=\"payment-method-secondary-description\"> ${e.secondaryDescription} </div>`:u} </div> `}render(){return this._getAssetsTask.render({error:()=>u,complete:e=>{let r=this.isSelected()?\"checked\":\"default\";return this.isEditMode?m` <div class=\"payment-method-item\" @click=${this.handleClick}> <div class=\"payment-method-content\"> ${this.renderPaymentMethodContent(e)} <button class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${P(\"delete\",{id:\"delete\"})} ${e.description}`} > <primer-icon name=\"trash\" size=\"sm\"></primer-icon> </button> </div> </div> `:m` <div class=\"payment-method-wrapper\"> <primer-button variant=\"secondary\" class=\"payment-method-button\" selectable selectionState=${r} @click=${this.handleClick} > ${this.renderPaymentMethodContent(e)} </primer-button> ${$(e.shouldShowCVV&&this.isSelected(),()=>m`<primer-vault-cvv-input .paymentMethod=\"${this.paymentMethod}\" ></primer-vault-cvv-input>`)} </div> `}})}}"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"kind": "variable",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
{
|
|
173
173
|
"kind": "variable",
|
|
174
174
|
"name": "J",
|
|
175
|
-
"default": "class extends f{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this._setupCVVIframe=new V(this,{task:async([e,r])=>!e||!r||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||r.createCvvInput===void 0
|
|
175
|
+
"default": "class extends f{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this._setupCVVIframe=new V(this,{task:async([e,r])=>!e||!r||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||r.createCvvInput===void 0?D:{network:e.paymentInstrumentData.network,createCvvInput:r.createCvvInput},args:()=>[this.paymentMethod,this.vaultManagerFormContext]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new V(this,{task:async([e])=>{if(!e)return D;await this.updateComplete;let r=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!r)return;let i=fr(this.computedStyles),n=i?{input:{base:i}}:void 0,p={cardNetwork:e.network,container:r,name:\"cvv\",placeholder:\"123\",style:n};this.cvvInput=await e.createCvvInput(p),this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.error||null,this.vaultManagerCvvContext?.setCvvInput(this.cvvInput),this.cvvInput.addListener(\"change\",()=>{this.onCvvInputChange()}),this.cvvInput.addListener(\"blur\",()=>{this.onBlur()}))},args:()=>[this._setupCVVIframe.value]})}disconnectedCallback(){super.disconnectedCallback(),this.cvvInput&&(this.cvvInput.remove(),this.cvvInput=null,this.cvvError=null,this.vaultManagerCvvContext?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.vaultManagerCvvContext||(this.cvvInputIsDirty=!0,this.cvvError=this.cvvInput.metadata.error||null)}onBlur(){this.cvvInput&&(this.cvvInputIsBlurred=!0,this.cvvError=this.cvvInput.metadata.error||null)}render(){return this._setupCVVIframe.render({error:()=>u,complete:()=>m` <div class=\"cvv-input-container\"> <primer-input-wrapper .hasError=${!!this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred)} > <primer-input-label slot=\"label\">CVV</primer-input-label> <div slot=\"input\" id=\"${this.cvvContainerId}\"></div> ${$(this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>m` <primer-input-error slot=\"error\"> ${this.cvvError} </primer-input-error> `)} </primer-input-wrapper> </div> `})}}"
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"kind": "variable",
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
"kind": "js",
|
|
353
353
|
"name": "PaymentMethod",
|
|
354
354
|
"declaration": {
|
|
355
|
-
"name": "
|
|
355
|
+
"name": "De",
|
|
356
356
|
"module": "cdn/primer-components.js"
|
|
357
357
|
}
|
|
358
358
|
},
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
"kind": "js",
|
|
409
409
|
"name": "PrimerMain",
|
|
410
410
|
"declaration": {
|
|
411
|
-
"name": "
|
|
411
|
+
"name": "$e",
|
|
412
412
|
"module": "cdn/primer-components.js"
|
|
413
413
|
}
|
|
414
414
|
},
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
518
|
"kind": "function",
|
|
519
|
-
"name": "
|
|
519
|
+
"name": "G"
|
|
520
520
|
},
|
|
521
521
|
{
|
|
522
522
|
"kind": "function",
|
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
"kind": "js",
|
|
541
541
|
"name": "injectLightTheme",
|
|
542
542
|
"declaration": {
|
|
543
|
-
"name": "
|
|
543
|
+
"name": "G",
|
|
544
544
|
"module": "dist/primer-loader.js"
|
|
545
545
|
}
|
|
546
546
|
},
|
|
@@ -2473,78 +2473,226 @@
|
|
|
2473
2473
|
},
|
|
2474
2474
|
{
|
|
2475
2475
|
"kind": "javascript-module",
|
|
2476
|
-
"path": "src/
|
|
2476
|
+
"path": "src/contexts/card-networks-context.ts",
|
|
2477
|
+
"declarations": [
|
|
2478
|
+
{
|
|
2479
|
+
"kind": "variable",
|
|
2480
|
+
"name": "cardNetworksContext"
|
|
2481
|
+
}
|
|
2482
|
+
],
|
|
2483
|
+
"exports": [
|
|
2484
|
+
{
|
|
2485
|
+
"kind": "js",
|
|
2486
|
+
"name": "cardNetworksContext",
|
|
2487
|
+
"declaration": {
|
|
2488
|
+
"name": "cardNetworksContext",
|
|
2489
|
+
"module": "src/contexts/card-networks-context.ts"
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
]
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
"kind": "javascript-module",
|
|
2496
|
+
"path": "src/contexts/client-options-context.ts",
|
|
2497
|
+
"declarations": [
|
|
2498
|
+
{
|
|
2499
|
+
"kind": "variable",
|
|
2500
|
+
"name": "clientOptionsContext"
|
|
2501
|
+
}
|
|
2502
|
+
],
|
|
2503
|
+
"exports": [
|
|
2504
|
+
{
|
|
2505
|
+
"kind": "js",
|
|
2506
|
+
"name": "clientOptionsContext",
|
|
2507
|
+
"declaration": {
|
|
2508
|
+
"name": "clientOptionsContext",
|
|
2509
|
+
"module": "src/contexts/client-options-context.ts"
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
]
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"kind": "javascript-module",
|
|
2516
|
+
"path": "src/contexts/computed-styles-context.ts",
|
|
2517
|
+
"declarations": [
|
|
2518
|
+
{
|
|
2519
|
+
"kind": "variable",
|
|
2520
|
+
"name": "computedStylesContext"
|
|
2521
|
+
}
|
|
2522
|
+
],
|
|
2523
|
+
"exports": [
|
|
2524
|
+
{
|
|
2525
|
+
"kind": "js",
|
|
2526
|
+
"name": "computedStylesContext",
|
|
2527
|
+
"declaration": {
|
|
2528
|
+
"name": "computedStylesContext",
|
|
2529
|
+
"module": "src/contexts/computed-styles-context.ts"
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
]
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
"kind": "javascript-module",
|
|
2536
|
+
"path": "src/contexts/headless-unitils-context.ts",
|
|
2537
|
+
"declarations": [
|
|
2538
|
+
{
|
|
2539
|
+
"kind": "variable",
|
|
2540
|
+
"name": "headlessUnitilsContext"
|
|
2541
|
+
}
|
|
2542
|
+
],
|
|
2543
|
+
"exports": [
|
|
2544
|
+
{
|
|
2545
|
+
"kind": "js",
|
|
2546
|
+
"name": "headlessUnitilsContext",
|
|
2547
|
+
"declaration": {
|
|
2548
|
+
"name": "headlessUnitilsContext",
|
|
2549
|
+
"module": "src/contexts/headless-unitils-context.ts"
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
]
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
"kind": "javascript-module",
|
|
2556
|
+
"path": "src/contexts/klarna-categories-context.ts",
|
|
2557
|
+
"declarations": [
|
|
2558
|
+
{
|
|
2559
|
+
"kind": "variable",
|
|
2560
|
+
"name": "klarnaCategoriesContext"
|
|
2561
|
+
}
|
|
2562
|
+
],
|
|
2563
|
+
"exports": [
|
|
2564
|
+
{
|
|
2565
|
+
"kind": "js",
|
|
2566
|
+
"name": "klarnaCategoriesContext",
|
|
2567
|
+
"declaration": {
|
|
2568
|
+
"name": "klarnaCategoriesContext",
|
|
2569
|
+
"module": "src/contexts/klarna-categories-context.ts"
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
]
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
"kind": "javascript-module",
|
|
2576
|
+
"path": "src/contexts/payment-manager-context.ts",
|
|
2577
|
+
"declarations": [
|
|
2578
|
+
{
|
|
2579
|
+
"kind": "variable",
|
|
2580
|
+
"name": "paymentManagerContext"
|
|
2581
|
+
}
|
|
2582
|
+
],
|
|
2583
|
+
"exports": [
|
|
2584
|
+
{
|
|
2585
|
+
"kind": "js",
|
|
2586
|
+
"name": "paymentManagerContext",
|
|
2587
|
+
"declaration": {
|
|
2588
|
+
"name": "paymentManagerContext",
|
|
2589
|
+
"module": "src/contexts/payment-manager-context.ts"
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
]
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
"kind": "javascript-module",
|
|
2596
|
+
"path": "src/contexts/payment-methods-context.ts",
|
|
2597
|
+
"declarations": [
|
|
2598
|
+
{
|
|
2599
|
+
"kind": "variable",
|
|
2600
|
+
"name": "paymentMethodsContext"
|
|
2601
|
+
}
|
|
2602
|
+
],
|
|
2603
|
+
"exports": [
|
|
2604
|
+
{
|
|
2605
|
+
"kind": "js",
|
|
2606
|
+
"name": "paymentMethodsContext",
|
|
2607
|
+
"declaration": {
|
|
2608
|
+
"name": "paymentMethodsContext",
|
|
2609
|
+
"module": "src/contexts/payment-methods-context.ts"
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
]
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
"kind": "javascript-module",
|
|
2616
|
+
"path": "src/contexts/payments-objects.ts",
|
|
2477
2617
|
"declarations": [
|
|
2478
2618
|
{
|
|
2479
2619
|
"kind": "class",
|
|
2480
|
-
"description": "
|
|
2481
|
-
"name": "
|
|
2620
|
+
"description": "",
|
|
2621
|
+
"name": "InitializedPayments",
|
|
2482
2622
|
"members": [
|
|
2483
2623
|
{
|
|
2484
2624
|
"kind": "field",
|
|
2485
|
-
"name": "
|
|
2625
|
+
"name": "_methods",
|
|
2486
2626
|
"type": {
|
|
2487
|
-
"text": "
|
|
2627
|
+
"text": "InitializedPaymentMethodMap"
|
|
2488
2628
|
},
|
|
2489
|
-
"privacy": "private"
|
|
2629
|
+
"privacy": "private",
|
|
2630
|
+
"readonly": true,
|
|
2631
|
+
"default": "map"
|
|
2490
2632
|
},
|
|
2491
2633
|
{
|
|
2492
2634
|
"kind": "method",
|
|
2493
|
-
"name": "
|
|
2635
|
+
"name": "get",
|
|
2494
2636
|
"return": {
|
|
2495
2637
|
"type": {
|
|
2496
|
-
"text": "
|
|
2638
|
+
"text": "RedirectPaymentMethod | undefined"
|
|
2497
2639
|
}
|
|
2498
|
-
}
|
|
2640
|
+
},
|
|
2641
|
+
"parameters": [
|
|
2642
|
+
{
|
|
2643
|
+
"name": "type",
|
|
2644
|
+
"type": {
|
|
2645
|
+
"text": "T"
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
]
|
|
2499
2649
|
},
|
|
2500
2650
|
{
|
|
2501
2651
|
"kind": "method",
|
|
2502
|
-
"name": "
|
|
2652
|
+
"name": "get",
|
|
2503
2653
|
"return": {
|
|
2504
2654
|
"type": {
|
|
2505
|
-
"text": "
|
|
2655
|
+
"text": "PaymentMethodByType<T> | undefined"
|
|
2506
2656
|
}
|
|
2507
2657
|
},
|
|
2508
|
-
"
|
|
2658
|
+
"parameters": [
|
|
2659
|
+
{
|
|
2660
|
+
"name": "type",
|
|
2661
|
+
"type": {
|
|
2662
|
+
"text": "T"
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
]
|
|
2509
2666
|
},
|
|
2510
2667
|
{
|
|
2511
2668
|
"kind": "method",
|
|
2512
|
-
"name": "
|
|
2513
|
-
"privacy": "private",
|
|
2514
|
-
"return": {
|
|
2515
|
-
"type": {
|
|
2516
|
-
"text": "void"
|
|
2517
|
-
}
|
|
2518
|
-
},
|
|
2669
|
+
"name": "get",
|
|
2519
2670
|
"parameters": [
|
|
2520
2671
|
{
|
|
2521
|
-
"name": "
|
|
2672
|
+
"name": "type",
|
|
2522
2673
|
"type": {
|
|
2523
|
-
"text": "
|
|
2524
|
-
}
|
|
2525
|
-
"description": "The new card networks context"
|
|
2674
|
+
"text": "T"
|
|
2675
|
+
}
|
|
2526
2676
|
}
|
|
2527
|
-
]
|
|
2528
|
-
"description": "Updates card networks state and dispatches events"
|
|
2677
|
+
]
|
|
2529
2678
|
},
|
|
2530
2679
|
{
|
|
2531
2680
|
"kind": "method",
|
|
2532
|
-
"name": "
|
|
2681
|
+
"name": "toArray",
|
|
2533
2682
|
"return": {
|
|
2534
2683
|
"type": {
|
|
2535
|
-
"text": "
|
|
2684
|
+
"text": "InitializedPaymentMethod[]"
|
|
2536
2685
|
}
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
"
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
"kind": "method",
|
|
2690
|
+
"name": "size",
|
|
2691
|
+
"return": {
|
|
2692
|
+
"type": {
|
|
2693
|
+
"text": "number"
|
|
2545
2694
|
}
|
|
2546
|
-
|
|
2547
|
-
"description": "Processes a card network change event"
|
|
2695
|
+
}
|
|
2548
2696
|
}
|
|
2549
2697
|
]
|
|
2550
2698
|
}
|
|
@@ -2552,37 +2700,192 @@
|
|
|
2552
2700
|
"exports": [
|
|
2553
2701
|
{
|
|
2554
2702
|
"kind": "js",
|
|
2555
|
-
"name": "
|
|
2703
|
+
"name": "InitializedPayments",
|
|
2556
2704
|
"declaration": {
|
|
2557
|
-
"name": "
|
|
2558
|
-
"module": "src/
|
|
2705
|
+
"name": "InitializedPayments",
|
|
2706
|
+
"module": "src/contexts/payments-objects.ts"
|
|
2559
2707
|
}
|
|
2560
2708
|
}
|
|
2561
2709
|
]
|
|
2562
2710
|
},
|
|
2563
2711
|
{
|
|
2564
2712
|
"kind": "javascript-module",
|
|
2565
|
-
"path": "src/
|
|
2713
|
+
"path": "src/contexts/sdk-state-context.ts",
|
|
2566
2714
|
"declarations": [
|
|
2567
2715
|
{
|
|
2568
|
-
"kind": "
|
|
2569
|
-
"
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2716
|
+
"kind": "variable",
|
|
2717
|
+
"name": "sdkStateContext"
|
|
2718
|
+
}
|
|
2719
|
+
],
|
|
2720
|
+
"exports": [
|
|
2721
|
+
{
|
|
2722
|
+
"kind": "js",
|
|
2723
|
+
"name": "sdkStateContext",
|
|
2724
|
+
"declaration": {
|
|
2725
|
+
"name": "sdkStateContext",
|
|
2726
|
+
"module": "src/contexts/sdk-state-context.ts"
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
]
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
"kind": "javascript-module",
|
|
2733
|
+
"path": "src/contexts/types.ts",
|
|
2734
|
+
"declarations": [],
|
|
2735
|
+
"exports": []
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"kind": "javascript-module",
|
|
2739
|
+
"path": "src/contexts/vault-item-context.ts",
|
|
2740
|
+
"declarations": [
|
|
2741
|
+
{
|
|
2742
|
+
"kind": "variable",
|
|
2743
|
+
"name": "vaultItemContext"
|
|
2744
|
+
}
|
|
2745
|
+
],
|
|
2746
|
+
"exports": [
|
|
2747
|
+
{
|
|
2748
|
+
"kind": "js",
|
|
2749
|
+
"name": "vaultItemContext",
|
|
2750
|
+
"declaration": {
|
|
2751
|
+
"name": "vaultItemContext",
|
|
2752
|
+
"module": "src/contexts/vault-item-context.ts"
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
]
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
"kind": "javascript-module",
|
|
2759
|
+
"path": "src/contexts/vault-manager-context.ts",
|
|
2760
|
+
"declarations": [
|
|
2761
|
+
{
|
|
2762
|
+
"kind": "variable",
|
|
2763
|
+
"name": "vaultManagerContext"
|
|
2764
|
+
}
|
|
2765
|
+
],
|
|
2766
|
+
"exports": [
|
|
2767
|
+
{
|
|
2768
|
+
"kind": "js",
|
|
2769
|
+
"name": "vaultManagerContext",
|
|
2770
|
+
"declaration": {
|
|
2771
|
+
"name": "vaultManagerContext",
|
|
2772
|
+
"module": "src/contexts/vault-manager-context.ts"
|
|
2773
|
+
}
|
|
2774
|
+
}
|
|
2775
|
+
]
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
"kind": "javascript-module",
|
|
2779
|
+
"path": "src/controllers/card-network-controller.ts",
|
|
2780
|
+
"declarations": [
|
|
2781
|
+
{
|
|
2782
|
+
"kind": "class",
|
|
2783
|
+
"description": "CardNetworkController manages and processes card network data\n\nThis controller is responsible for:\n- Handling card network change events\n- Processing detected and selectable card networks\n- Maintaining card network state",
|
|
2784
|
+
"name": "CardNetworkController",
|
|
2785
|
+
"members": [
|
|
2786
|
+
{
|
|
2787
|
+
"kind": "field",
|
|
2788
|
+
"name": "host",
|
|
2789
|
+
"type": {
|
|
2790
|
+
"text": "PrimerCheckoutType"
|
|
2791
|
+
},
|
|
2792
|
+
"privacy": "private"
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
"kind": "method",
|
|
2796
|
+
"name": "hostConnected",
|
|
2797
|
+
"return": {
|
|
2798
|
+
"type": {
|
|
2799
|
+
"text": "void"
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"kind": "method",
|
|
2805
|
+
"name": "setCardNetworksLoading",
|
|
2806
|
+
"return": {
|
|
2807
|
+
"type": {
|
|
2808
|
+
"text": "void"
|
|
2809
|
+
}
|
|
2810
|
+
},
|
|
2811
|
+
"description": "Sets the card networks to loading state"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"kind": "method",
|
|
2815
|
+
"name": "updateCardNetworksState",
|
|
2816
|
+
"privacy": "private",
|
|
2817
|
+
"return": {
|
|
2818
|
+
"type": {
|
|
2819
|
+
"text": "void"
|
|
2820
|
+
}
|
|
2821
|
+
},
|
|
2822
|
+
"parameters": [
|
|
2823
|
+
{
|
|
2824
|
+
"name": "cardNetworks",
|
|
2825
|
+
"type": {
|
|
2826
|
+
"text": "CardNetworksContext"
|
|
2827
|
+
},
|
|
2828
|
+
"description": "The new card networks context"
|
|
2829
|
+
}
|
|
2830
|
+
],
|
|
2831
|
+
"description": "Updates card networks state and dispatches events"
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"kind": "method",
|
|
2835
|
+
"name": "processCardNetworkChangeEvent",
|
|
2836
|
+
"return": {
|
|
2837
|
+
"type": {
|
|
2838
|
+
"text": "Promise<void>"
|
|
2839
|
+
}
|
|
2840
|
+
},
|
|
2841
|
+
"parameters": [
|
|
2842
|
+
{
|
|
2843
|
+
"name": "event",
|
|
2844
|
+
"type": {
|
|
2845
|
+
"text": "CardNetworkChangeEvent"
|
|
2846
|
+
},
|
|
2847
|
+
"description": "The card network change event"
|
|
2848
|
+
}
|
|
2849
|
+
],
|
|
2850
|
+
"description": "Processes a card network change event"
|
|
2851
|
+
}
|
|
2852
|
+
]
|
|
2853
|
+
}
|
|
2854
|
+
],
|
|
2855
|
+
"exports": [
|
|
2856
|
+
{
|
|
2857
|
+
"kind": "js",
|
|
2858
|
+
"name": "CardNetworkController",
|
|
2859
|
+
"declaration": {
|
|
2860
|
+
"name": "CardNetworkController",
|
|
2861
|
+
"module": "src/controllers/card-network-controller.ts"
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
]
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"kind": "javascript-module",
|
|
2868
|
+
"path": "src/controllers/headless-sdk-controller.ts",
|
|
2869
|
+
"declarations": [
|
|
2870
|
+
{
|
|
2871
|
+
"kind": "class",
|
|
2872
|
+
"description": "",
|
|
2873
|
+
"name": "HeadlessSdkController",
|
|
2874
|
+
"members": [
|
|
2875
|
+
{
|
|
2876
|
+
"kind": "field",
|
|
2877
|
+
"name": "host",
|
|
2878
|
+
"type": {
|
|
2879
|
+
"text": "PrimerCheckoutType"
|
|
2880
|
+
}
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
"kind": "field",
|
|
2884
|
+
"name": "sdkInstanceTask",
|
|
2885
|
+
"type": {
|
|
2886
|
+
"text": "Task<\n [string | null, PrimerCheckoutOptions | null],\n PrimerHeadlessCheckout | null\n >"
|
|
2887
|
+
},
|
|
2888
|
+
"privacy": "private",
|
|
2586
2889
|
"default": "new Task(host, { args: () => [this.host.clientToken, this.host.options] as const, task: this.initializeHeadless(), })"
|
|
2587
2890
|
},
|
|
2588
2891
|
{
|
|
@@ -3249,440 +3552,203 @@
|
|
|
3249
3552
|
"text": "Record<string, unknown>"
|
|
3250
3553
|
}
|
|
3251
3554
|
}
|
|
3252
|
-
]
|
|
3253
|
-
},
|
|
3254
|
-
{
|
|
3255
|
-
"kind": "method",
|
|
3256
|
-
"name": "reset"
|
|
3257
|
-
},
|
|
3258
|
-
{
|
|
3259
|
-
"kind": "field",
|
|
3260
|
-
"name": "state",
|
|
3261
|
-
"type": {
|
|
3262
|
-
"text": "SdkState"
|
|
3263
|
-
},
|
|
3264
|
-
"privacy": "public",
|
|
3265
|
-
"readonly": true
|
|
3266
|
-
}
|
|
3267
|
-
]
|
|
3268
|
-
}
|
|
3269
|
-
],
|
|
3270
|
-
"exports": [
|
|
3271
|
-
{
|
|
3272
|
-
"kind": "js",
|
|
3273
|
-
"name": "initialSDKState",
|
|
3274
|
-
"declaration": {
|
|
3275
|
-
"name": "initialSDKState",
|
|
3276
|
-
"module": "src/controllers/sdk-state-controller.ts"
|
|
3277
|
-
}
|
|
3278
|
-
},
|
|
3279
|
-
{
|
|
3280
|
-
"kind": "js",
|
|
3281
|
-
"name": "SdkStateController",
|
|
3282
|
-
"declaration": {
|
|
3283
|
-
"name": "SdkStateController",
|
|
3284
|
-
"module": "src/controllers/sdk-state-controller.ts"
|
|
3285
|
-
}
|
|
3286
|
-
}
|
|
3287
|
-
]
|
|
3288
|
-
},
|
|
3289
|
-
{
|
|
3290
|
-
"kind": "javascript-module",
|
|
3291
|
-
"path": "src/controllers/style-processing-controller.ts",
|
|
3292
|
-
"declarations": [
|
|
3293
|
-
{
|
|
3294
|
-
"kind": "class",
|
|
3295
|
-
"description": "Controller that handles processing and application of custom styles to Lit components.\nSafely converts JSON style objects to CSS variables applied to the host element.",
|
|
3296
|
-
"name": "StyleProcessingController",
|
|
3297
|
-
"members": [
|
|
3298
|
-
{
|
|
3299
|
-
"kind": "field",
|
|
3300
|
-
"name": "host",
|
|
3301
|
-
"type": {
|
|
3302
|
-
"text": "ReactiveControllerHost & LitElement"
|
|
3303
|
-
}
|
|
3304
|
-
},
|
|
3305
|
-
{
|
|
3306
|
-
"kind": "field",
|
|
3307
|
-
"name": "cssVarCache",
|
|
3308
|
-
"privacy": "private",
|
|
3309
|
-
"static": true,
|
|
3310
|
-
"default": "new Map<string, string>()"
|
|
3311
|
-
},
|
|
3312
|
-
{
|
|
3313
|
-
"kind": "method",
|
|
3314
|
-
"name": "processCustomStyles",
|
|
3315
|
-
"return": {
|
|
3316
|
-
"type": {
|
|
3317
|
-
"text": "void"
|
|
3318
|
-
}
|
|
3319
|
-
},
|
|
3320
|
-
"parameters": [
|
|
3321
|
-
{
|
|
3322
|
-
"name": "jsonString",
|
|
3323
|
-
"type": {
|
|
3324
|
-
"text": "string"
|
|
3325
|
-
},
|
|
3326
|
-
"description": "The JSON string representing custom styles."
|
|
3327
|
-
}
|
|
3328
|
-
],
|
|
3329
|
-
"description": "Processes the customStyles JSON string.\nExpected JSON contains only CSS variable properties in camelCase."
|
|
3330
|
-
},
|
|
3331
|
-
{
|
|
3332
|
-
"kind": "method",
|
|
3333
|
-
"name": "isValidCssProperty",
|
|
3334
|
-
"privacy": "private",
|
|
3335
|
-
"return": {
|
|
3336
|
-
"type": {
|
|
3337
|
-
"text": ""
|
|
3338
|
-
}
|
|
3339
|
-
},
|
|
3340
|
-
"parameters": [
|
|
3341
|
-
{
|
|
3342
|
-
"name": "property",
|
|
3343
|
-
"type": {
|
|
3344
|
-
"text": "string"
|
|
3345
|
-
},
|
|
3346
|
-
"description": "The CSS property name to validate."
|
|
3347
|
-
}
|
|
3348
|
-
],
|
|
3349
|
-
"description": "Validates a CSS property name to ensure it follows expected patterns."
|
|
3350
|
-
},
|
|
3351
|
-
{
|
|
3352
|
-
"kind": "method",
|
|
3353
|
-
"name": "isValidCssValue",
|
|
3354
|
-
"privacy": "private",
|
|
3355
|
-
"return": {
|
|
3356
|
-
"type": {
|
|
3357
|
-
"text": ""
|
|
3358
|
-
}
|
|
3359
|
-
},
|
|
3360
|
-
"parameters": [
|
|
3361
|
-
{
|
|
3362
|
-
"name": "value",
|
|
3363
|
-
"type": {
|
|
3364
|
-
"text": "string"
|
|
3365
|
-
},
|
|
3366
|
-
"description": "The CSS value to validate."
|
|
3367
|
-
}
|
|
3368
|
-
],
|
|
3369
|
-
"description": "Validates a CSS value to ensure it only contains safe, expected characters.\nAllowed characters include alphanumerics, whitespace, and common CSS punctuation.\nThis helps prevent CSS injection attacks."
|
|
3370
|
-
},
|
|
3371
|
-
{
|
|
3372
|
-
"kind": "method",
|
|
3373
|
-
"name": "getCssVarName",
|
|
3374
|
-
"privacy": "private",
|
|
3375
|
-
"return": {
|
|
3376
|
-
"type": {
|
|
3377
|
-
"text": ""
|
|
3378
|
-
}
|
|
3379
|
-
},
|
|
3380
|
-
"parameters": [
|
|
3381
|
-
{
|
|
3382
|
-
"name": "key",
|
|
3383
|
-
"type": {
|
|
3384
|
-
"text": "string"
|
|
3385
|
-
},
|
|
3386
|
-
"description": "The camelCase property key"
|
|
3387
|
-
}
|
|
3388
|
-
],
|
|
3389
|
-
"description": "Gets the CSS variable name for a camelCase property key.\nUses caching for performance."
|
|
3390
|
-
},
|
|
3391
|
-
{
|
|
3392
|
-
"kind": "method",
|
|
3393
|
-
"name": "applyStyles",
|
|
3394
|
-
"privacy": "private",
|
|
3395
|
-
"return": {
|
|
3396
|
-
"type": {
|
|
3397
|
-
"text": "void"
|
|
3398
|
-
}
|
|
3399
|
-
},
|
|
3400
|
-
"parameters": [
|
|
3401
|
-
{
|
|
3402
|
-
"name": "styles",
|
|
3403
|
-
"type": {
|
|
3404
|
-
"text": "StylesObject"
|
|
3405
|
-
},
|
|
3406
|
-
"description": "An object with style keys and corresponding CSS values."
|
|
3407
|
-
}
|
|
3408
|
-
],
|
|
3409
|
-
"description": "Transforms a styles object into CSS variables and applies them to the host element.\nEach key (in camelCase) is converted into a kebab-case CSS variable prefixed with '--'.\nOnly valid CSS properties and values are applied."
|
|
3410
|
-
},
|
|
3411
|
-
{
|
|
3412
|
-
"kind": "method",
|
|
3413
|
-
"name": "removeStyle",
|
|
3414
|
-
"return": {
|
|
3415
|
-
"type": {
|
|
3416
|
-
"text": "void"
|
|
3417
|
-
}
|
|
3418
|
-
},
|
|
3419
|
-
"parameters": [
|
|
3420
|
-
{
|
|
3421
|
-
"name": "key",
|
|
3422
|
-
"type": {
|
|
3423
|
-
"text": "string"
|
|
3424
|
-
},
|
|
3425
|
-
"description": "The camelCase property key to remove"
|
|
3426
|
-
}
|
|
3427
|
-
],
|
|
3428
|
-
"description": "Removes a specific CSS variable from the host element"
|
|
3429
|
-
},
|
|
3430
|
-
{
|
|
3431
|
-
"kind": "method",
|
|
3432
|
-
"name": "clearAllStyles",
|
|
3433
|
-
"return": {
|
|
3434
|
-
"type": {
|
|
3435
|
-
"text": "void"
|
|
3436
|
-
}
|
|
3437
|
-
},
|
|
3438
|
-
"description": "Removes all custom styles from the host element"
|
|
3439
|
-
},
|
|
3440
|
-
{
|
|
3441
|
-
"kind": "method",
|
|
3442
|
-
"name": "hostDisconnected",
|
|
3443
|
-
"return": {
|
|
3444
|
-
"type": {
|
|
3445
|
-
"text": "void"
|
|
3446
|
-
}
|
|
3447
|
-
},
|
|
3448
|
-
"description": "Optional cleanup when the host is disconnected"
|
|
3449
|
-
}
|
|
3450
|
-
]
|
|
3451
|
-
}
|
|
3452
|
-
],
|
|
3453
|
-
"exports": [
|
|
3454
|
-
{
|
|
3455
|
-
"kind": "js",
|
|
3456
|
-
"name": "StyleProcessingController",
|
|
3457
|
-
"declaration": {
|
|
3458
|
-
"name": "StyleProcessingController",
|
|
3459
|
-
"module": "src/controllers/style-processing-controller.ts"
|
|
3460
|
-
}
|
|
3461
|
-
}
|
|
3462
|
-
]
|
|
3463
|
-
},
|
|
3464
|
-
{
|
|
3465
|
-
"kind": "javascript-module",
|
|
3466
|
-
"path": "src/contexts/card-networks-context.ts",
|
|
3467
|
-
"declarations": [
|
|
3468
|
-
{
|
|
3469
|
-
"kind": "variable",
|
|
3470
|
-
"name": "cardNetworksContext"
|
|
3471
|
-
}
|
|
3472
|
-
],
|
|
3473
|
-
"exports": [
|
|
3474
|
-
{
|
|
3475
|
-
"kind": "js",
|
|
3476
|
-
"name": "cardNetworksContext",
|
|
3477
|
-
"declaration": {
|
|
3478
|
-
"name": "cardNetworksContext",
|
|
3479
|
-
"module": "src/contexts/card-networks-context.ts"
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
|
-
]
|
|
3483
|
-
},
|
|
3484
|
-
{
|
|
3485
|
-
"kind": "javascript-module",
|
|
3486
|
-
"path": "src/contexts/client-options-context.ts",
|
|
3487
|
-
"declarations": [
|
|
3488
|
-
{
|
|
3489
|
-
"kind": "variable",
|
|
3490
|
-
"name": "clientOptionsContext"
|
|
3491
|
-
}
|
|
3492
|
-
],
|
|
3493
|
-
"exports": [
|
|
3494
|
-
{
|
|
3495
|
-
"kind": "js",
|
|
3496
|
-
"name": "clientOptionsContext",
|
|
3497
|
-
"declaration": {
|
|
3498
|
-
"name": "clientOptionsContext",
|
|
3499
|
-
"module": "src/contexts/client-options-context.ts"
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
]
|
|
3503
|
-
},
|
|
3504
|
-
{
|
|
3505
|
-
"kind": "javascript-module",
|
|
3506
|
-
"path": "src/contexts/computed-styles-context.ts",
|
|
3507
|
-
"declarations": [
|
|
3508
|
-
{
|
|
3509
|
-
"kind": "variable",
|
|
3510
|
-
"name": "computedStylesContext"
|
|
3511
|
-
}
|
|
3512
|
-
],
|
|
3513
|
-
"exports": [
|
|
3514
|
-
{
|
|
3515
|
-
"kind": "js",
|
|
3516
|
-
"name": "computedStylesContext",
|
|
3517
|
-
"declaration": {
|
|
3518
|
-
"name": "computedStylesContext",
|
|
3519
|
-
"module": "src/contexts/computed-styles-context.ts"
|
|
3520
|
-
}
|
|
3521
|
-
}
|
|
3522
|
-
]
|
|
3523
|
-
},
|
|
3524
|
-
{
|
|
3525
|
-
"kind": "javascript-module",
|
|
3526
|
-
"path": "src/contexts/headless-unitils-context.ts",
|
|
3527
|
-
"declarations": [
|
|
3528
|
-
{
|
|
3529
|
-
"kind": "variable",
|
|
3530
|
-
"name": "headlessUnitilsContext"
|
|
3531
|
-
}
|
|
3532
|
-
],
|
|
3533
|
-
"exports": [
|
|
3534
|
-
{
|
|
3535
|
-
"kind": "js",
|
|
3536
|
-
"name": "headlessUnitilsContext",
|
|
3537
|
-
"declaration": {
|
|
3538
|
-
"name": "headlessUnitilsContext",
|
|
3539
|
-
"module": "src/contexts/headless-unitils-context.ts"
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
]
|
|
3543
|
-
},
|
|
3544
|
-
{
|
|
3545
|
-
"kind": "javascript-module",
|
|
3546
|
-
"path": "src/contexts/klarna-categories-context.ts",
|
|
3547
|
-
"declarations": [
|
|
3548
|
-
{
|
|
3549
|
-
"kind": "variable",
|
|
3550
|
-
"name": "klarnaCategoriesContext"
|
|
3551
|
-
}
|
|
3552
|
-
],
|
|
3553
|
-
"exports": [
|
|
3554
|
-
{
|
|
3555
|
-
"kind": "js",
|
|
3556
|
-
"name": "klarnaCategoriesContext",
|
|
3557
|
-
"declaration": {
|
|
3558
|
-
"name": "klarnaCategoriesContext",
|
|
3559
|
-
"module": "src/contexts/klarna-categories-context.ts"
|
|
3560
|
-
}
|
|
3561
|
-
}
|
|
3562
|
-
]
|
|
3563
|
-
},
|
|
3564
|
-
{
|
|
3565
|
-
"kind": "javascript-module",
|
|
3566
|
-
"path": "src/contexts/payment-manager-context.ts",
|
|
3567
|
-
"declarations": [
|
|
3568
|
-
{
|
|
3569
|
-
"kind": "variable",
|
|
3570
|
-
"name": "paymentManagerContext"
|
|
3555
|
+
]
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"kind": "method",
|
|
3559
|
+
"name": "reset"
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
"kind": "field",
|
|
3563
|
+
"name": "state",
|
|
3564
|
+
"type": {
|
|
3565
|
+
"text": "SdkState"
|
|
3566
|
+
},
|
|
3567
|
+
"privacy": "public",
|
|
3568
|
+
"readonly": true
|
|
3569
|
+
}
|
|
3570
|
+
]
|
|
3571
3571
|
}
|
|
3572
3572
|
],
|
|
3573
3573
|
"exports": [
|
|
3574
3574
|
{
|
|
3575
3575
|
"kind": "js",
|
|
3576
|
-
"name": "
|
|
3576
|
+
"name": "initialSDKState",
|
|
3577
3577
|
"declaration": {
|
|
3578
|
-
"name": "
|
|
3579
|
-
"module": "src/
|
|
3578
|
+
"name": "initialSDKState",
|
|
3579
|
+
"module": "src/controllers/sdk-state-controller.ts"
|
|
3580
3580
|
}
|
|
3581
|
-
}
|
|
3582
|
-
]
|
|
3583
|
-
},
|
|
3584
|
-
{
|
|
3585
|
-
"kind": "javascript-module",
|
|
3586
|
-
"path": "src/contexts/payment-methods-context.ts",
|
|
3587
|
-
"declarations": [
|
|
3588
|
-
{
|
|
3589
|
-
"kind": "variable",
|
|
3590
|
-
"name": "paymentMethodsContext"
|
|
3591
|
-
}
|
|
3592
|
-
],
|
|
3593
|
-
"exports": [
|
|
3581
|
+
},
|
|
3594
3582
|
{
|
|
3595
3583
|
"kind": "js",
|
|
3596
|
-
"name": "
|
|
3584
|
+
"name": "SdkStateController",
|
|
3597
3585
|
"declaration": {
|
|
3598
|
-
"name": "
|
|
3599
|
-
"module": "src/
|
|
3586
|
+
"name": "SdkStateController",
|
|
3587
|
+
"module": "src/controllers/sdk-state-controller.ts"
|
|
3600
3588
|
}
|
|
3601
3589
|
}
|
|
3602
3590
|
]
|
|
3603
3591
|
},
|
|
3604
3592
|
{
|
|
3605
3593
|
"kind": "javascript-module",
|
|
3606
|
-
"path": "src/
|
|
3594
|
+
"path": "src/controllers/style-processing-controller.ts",
|
|
3607
3595
|
"declarations": [
|
|
3608
3596
|
{
|
|
3609
3597
|
"kind": "class",
|
|
3610
|
-
"description": "",
|
|
3611
|
-
"name": "
|
|
3598
|
+
"description": "Controller that handles processing and application of custom styles to Lit components.\nSafely converts JSON style objects to CSS variables applied to the host element.",
|
|
3599
|
+
"name": "StyleProcessingController",
|
|
3612
3600
|
"members": [
|
|
3613
3601
|
{
|
|
3614
3602
|
"kind": "field",
|
|
3615
|
-
"name": "
|
|
3603
|
+
"name": "host",
|
|
3616
3604
|
"type": {
|
|
3617
|
-
"text": "
|
|
3605
|
+
"text": "ReactiveControllerHost & LitElement"
|
|
3606
|
+
}
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
"kind": "field",
|
|
3610
|
+
"name": "cssVarCache",
|
|
3611
|
+
"privacy": "private",
|
|
3612
|
+
"static": true,
|
|
3613
|
+
"default": "new Map<string, string>()"
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"kind": "method",
|
|
3617
|
+
"name": "processCustomStyles",
|
|
3618
|
+
"return": {
|
|
3619
|
+
"type": {
|
|
3620
|
+
"text": "void"
|
|
3621
|
+
}
|
|
3618
3622
|
},
|
|
3623
|
+
"parameters": [
|
|
3624
|
+
{
|
|
3625
|
+
"name": "jsonString",
|
|
3626
|
+
"type": {
|
|
3627
|
+
"text": "string"
|
|
3628
|
+
},
|
|
3629
|
+
"description": "The JSON string representing custom styles."
|
|
3630
|
+
}
|
|
3631
|
+
],
|
|
3632
|
+
"description": "Processes the customStyles JSON string.\nExpected JSON contains only CSS variable properties in camelCase."
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
"kind": "method",
|
|
3636
|
+
"name": "isValidCssProperty",
|
|
3619
3637
|
"privacy": "private",
|
|
3620
|
-
"
|
|
3621
|
-
|
|
3638
|
+
"return": {
|
|
3639
|
+
"type": {
|
|
3640
|
+
"text": ""
|
|
3641
|
+
}
|
|
3642
|
+
},
|
|
3643
|
+
"parameters": [
|
|
3644
|
+
{
|
|
3645
|
+
"name": "property",
|
|
3646
|
+
"type": {
|
|
3647
|
+
"text": "string"
|
|
3648
|
+
},
|
|
3649
|
+
"description": "The CSS property name to validate."
|
|
3650
|
+
}
|
|
3651
|
+
],
|
|
3652
|
+
"description": "Validates a CSS property name to ensure it follows expected patterns."
|
|
3622
3653
|
},
|
|
3623
3654
|
{
|
|
3624
3655
|
"kind": "method",
|
|
3625
|
-
"name": "
|
|
3656
|
+
"name": "isValidCssValue",
|
|
3657
|
+
"privacy": "private",
|
|
3626
3658
|
"return": {
|
|
3627
3659
|
"type": {
|
|
3628
|
-
"text": "
|
|
3660
|
+
"text": ""
|
|
3629
3661
|
}
|
|
3630
3662
|
},
|
|
3631
3663
|
"parameters": [
|
|
3632
3664
|
{
|
|
3633
|
-
"name": "
|
|
3665
|
+
"name": "value",
|
|
3634
3666
|
"type": {
|
|
3635
|
-
"text": "
|
|
3636
|
-
}
|
|
3667
|
+
"text": "string"
|
|
3668
|
+
},
|
|
3669
|
+
"description": "The CSS value to validate."
|
|
3637
3670
|
}
|
|
3638
|
-
]
|
|
3671
|
+
],
|
|
3672
|
+
"description": "Validates a CSS value to ensure it only contains safe, expected characters.\nAllowed characters include alphanumerics, whitespace, and common CSS punctuation.\nThis helps prevent CSS injection attacks."
|
|
3639
3673
|
},
|
|
3640
3674
|
{
|
|
3641
3675
|
"kind": "method",
|
|
3642
|
-
"name": "
|
|
3676
|
+
"name": "getCssVarName",
|
|
3677
|
+
"privacy": "private",
|
|
3643
3678
|
"return": {
|
|
3644
3679
|
"type": {
|
|
3645
|
-
"text": "
|
|
3680
|
+
"text": ""
|
|
3646
3681
|
}
|
|
3647
3682
|
},
|
|
3648
3683
|
"parameters": [
|
|
3649
3684
|
{
|
|
3650
|
-
"name": "
|
|
3685
|
+
"name": "key",
|
|
3651
3686
|
"type": {
|
|
3652
|
-
"text": "
|
|
3653
|
-
}
|
|
3687
|
+
"text": "string"
|
|
3688
|
+
},
|
|
3689
|
+
"description": "The camelCase property key"
|
|
3654
3690
|
}
|
|
3655
|
-
]
|
|
3691
|
+
],
|
|
3692
|
+
"description": "Gets the CSS variable name for a camelCase property key.\nUses caching for performance."
|
|
3656
3693
|
},
|
|
3657
3694
|
{
|
|
3658
3695
|
"kind": "method",
|
|
3659
|
-
"name": "
|
|
3696
|
+
"name": "applyStyles",
|
|
3697
|
+
"privacy": "private",
|
|
3698
|
+
"return": {
|
|
3699
|
+
"type": {
|
|
3700
|
+
"text": "void"
|
|
3701
|
+
}
|
|
3702
|
+
},
|
|
3660
3703
|
"parameters": [
|
|
3661
3704
|
{
|
|
3662
|
-
"name": "
|
|
3705
|
+
"name": "styles",
|
|
3663
3706
|
"type": {
|
|
3664
|
-
"text": "
|
|
3665
|
-
}
|
|
3707
|
+
"text": "StylesObject"
|
|
3708
|
+
},
|
|
3709
|
+
"description": "An object with style keys and corresponding CSS values."
|
|
3666
3710
|
}
|
|
3667
|
-
]
|
|
3711
|
+
],
|
|
3712
|
+
"description": "Transforms a styles object into CSS variables and applies them to the host element.\nEach key (in camelCase) is converted into a kebab-case CSS variable prefixed with '--'.\nOnly valid CSS properties and values are applied."
|
|
3668
3713
|
},
|
|
3669
3714
|
{
|
|
3670
3715
|
"kind": "method",
|
|
3671
|
-
"name": "
|
|
3716
|
+
"name": "removeStyle",
|
|
3672
3717
|
"return": {
|
|
3673
3718
|
"type": {
|
|
3674
|
-
"text": "
|
|
3719
|
+
"text": "void"
|
|
3675
3720
|
}
|
|
3676
|
-
}
|
|
3721
|
+
},
|
|
3722
|
+
"parameters": [
|
|
3723
|
+
{
|
|
3724
|
+
"name": "key",
|
|
3725
|
+
"type": {
|
|
3726
|
+
"text": "string"
|
|
3727
|
+
},
|
|
3728
|
+
"description": "The camelCase property key to remove"
|
|
3729
|
+
}
|
|
3730
|
+
],
|
|
3731
|
+
"description": "Removes a specific CSS variable from the host element"
|
|
3677
3732
|
},
|
|
3678
3733
|
{
|
|
3679
3734
|
"kind": "method",
|
|
3680
|
-
"name": "
|
|
3735
|
+
"name": "clearAllStyles",
|
|
3681
3736
|
"return": {
|
|
3682
3737
|
"type": {
|
|
3683
|
-
"text": "
|
|
3738
|
+
"text": "void"
|
|
3684
3739
|
}
|
|
3685
|
-
}
|
|
3740
|
+
},
|
|
3741
|
+
"description": "Removes all custom styles from the host element"
|
|
3742
|
+
},
|
|
3743
|
+
{
|
|
3744
|
+
"kind": "method",
|
|
3745
|
+
"name": "hostDisconnected",
|
|
3746
|
+
"return": {
|
|
3747
|
+
"type": {
|
|
3748
|
+
"text": "void"
|
|
3749
|
+
}
|
|
3750
|
+
},
|
|
3751
|
+
"description": "Optional cleanup when the host is disconnected"
|
|
3686
3752
|
}
|
|
3687
3753
|
]
|
|
3688
3754
|
}
|
|
@@ -3690,76 +3756,10 @@
|
|
|
3690
3756
|
"exports": [
|
|
3691
3757
|
{
|
|
3692
3758
|
"kind": "js",
|
|
3693
|
-
"name": "
|
|
3694
|
-
"declaration": {
|
|
3695
|
-
"name": "InitializedPayments",
|
|
3696
|
-
"module": "src/contexts/payments-objects.ts"
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
]
|
|
3700
|
-
},
|
|
3701
|
-
{
|
|
3702
|
-
"kind": "javascript-module",
|
|
3703
|
-
"path": "src/contexts/sdk-state-context.ts",
|
|
3704
|
-
"declarations": [
|
|
3705
|
-
{
|
|
3706
|
-
"kind": "variable",
|
|
3707
|
-
"name": "sdkStateContext"
|
|
3708
|
-
}
|
|
3709
|
-
],
|
|
3710
|
-
"exports": [
|
|
3711
|
-
{
|
|
3712
|
-
"kind": "js",
|
|
3713
|
-
"name": "sdkStateContext",
|
|
3714
|
-
"declaration": {
|
|
3715
|
-
"name": "sdkStateContext",
|
|
3716
|
-
"module": "src/contexts/sdk-state-context.ts"
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
]
|
|
3720
|
-
},
|
|
3721
|
-
{
|
|
3722
|
-
"kind": "javascript-module",
|
|
3723
|
-
"path": "src/contexts/types.ts",
|
|
3724
|
-
"declarations": [],
|
|
3725
|
-
"exports": []
|
|
3726
|
-
},
|
|
3727
|
-
{
|
|
3728
|
-
"kind": "javascript-module",
|
|
3729
|
-
"path": "src/contexts/vault-item-context.ts",
|
|
3730
|
-
"declarations": [
|
|
3731
|
-
{
|
|
3732
|
-
"kind": "variable",
|
|
3733
|
-
"name": "vaultItemContext"
|
|
3734
|
-
}
|
|
3735
|
-
],
|
|
3736
|
-
"exports": [
|
|
3737
|
-
{
|
|
3738
|
-
"kind": "js",
|
|
3739
|
-
"name": "vaultItemContext",
|
|
3740
|
-
"declaration": {
|
|
3741
|
-
"name": "vaultItemContext",
|
|
3742
|
-
"module": "src/contexts/vault-item-context.ts"
|
|
3743
|
-
}
|
|
3744
|
-
}
|
|
3745
|
-
]
|
|
3746
|
-
},
|
|
3747
|
-
{
|
|
3748
|
-
"kind": "javascript-module",
|
|
3749
|
-
"path": "src/contexts/vault-manager-context.ts",
|
|
3750
|
-
"declarations": [
|
|
3751
|
-
{
|
|
3752
|
-
"kind": "variable",
|
|
3753
|
-
"name": "vaultManagerContext"
|
|
3754
|
-
}
|
|
3755
|
-
],
|
|
3756
|
-
"exports": [
|
|
3757
|
-
{
|
|
3758
|
-
"kind": "js",
|
|
3759
|
-
"name": "vaultManagerContext",
|
|
3759
|
+
"name": "StyleProcessingController",
|
|
3760
3760
|
"declaration": {
|
|
3761
|
-
"name": "
|
|
3762
|
-
"module": "src/
|
|
3761
|
+
"name": "StyleProcessingController",
|
|
3762
|
+
"module": "src/controllers/style-processing-controller.ts"
|
|
3763
3763
|
}
|
|
3764
3764
|
}
|
|
3765
3765
|
]
|
|
@@ -3867,7 +3867,7 @@
|
|
|
3867
3867
|
{
|
|
3868
3868
|
"kind": "variable",
|
|
3869
3869
|
"name": "lightThemeCSS",
|
|
3870
|
-
"default": "`/** * Do not edit directly, this file was auto-generated. */ primer-checkout { --primer-color-background-transparent-default: rgba(255, 255, 255, 0); --primer-color-border-transparent-default: rgba(255, 255, 255, 0); --primer-color-gray-100: #f5f5f5; --primer-color-gray-200: #eeeeee; --primer-color-gray-300: #e0e0e0; --primer-color-gray-400: #bdbdbd; --primer-color-gray-500: #9e9e9e; --primer-color-gray-600: #757575; --primer-color-gray-900: #212121; --primer-color-gray-000: #ffffff; --primer-color-brand: #2f98ff; --primer-color-red-100: #ffecec; --primer-color-red-500: #ff7279; --primer-color-red-900: #b4324b; --primer-color-blue-500: #399dff; --primer-color-blue-900: #2270f4; --primer-radius-base: 4px; --primer-typography-brand:
|
|
3870
|
+
"default": "`/** * Do not edit directly, this file was auto-generated. */ primer-checkout { --primer-color-background-transparent-default: rgba(255, 255, 255, 0); --primer-color-border-transparent-default: rgba(255, 255, 255, 0); --primer-color-gray-100: #f5f5f5; --primer-color-gray-200: #eeeeee; --primer-color-gray-300: #e0e0e0; --primer-color-gray-400: #bdbdbd; --primer-color-gray-500: #9e9e9e; --primer-color-gray-600: #757575; --primer-color-gray-900: #212121; --primer-color-gray-000: #ffffff; --primer-color-brand: #2f98ff; --primer-color-red-100: #ffecec; --primer-color-red-500: #ff7279; --primer-color-red-900: #b4324b; --primer-color-blue-500: #399dff; --primer-color-blue-900: #2270f4; --primer-radius-base: 4px; --primer-typography-brand: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif; --primer-typography-title-xlarge-letter-spacing: -0.6px; --primer-typography-title-xlarge-weight: 550; --primer-typography-title-xlarge-size: 24px; --primer-typography-title-xlarge-line-height: 32px; --primer-typography-title-large-letter-spacing: -0.2px; --primer-typography-title-large-weight: 550; --primer-typography-title-large-size: 16px; --primer-typography-title-large-line-height: 20px; --primer-typography-body-large-letter-spacing: -0.2px; --primer-typography-body-large-weight: 400; --primer-typography-body-large-size: 16px; --primer-typography-body-large-line-height: 20px; --primer-typography-body-medium-letter-spacing: 0px; --primer-typography-body-medium-weight: 400; --primer-typography-body-medium-size: 14px; --primer-typography-body-medium-line-height: 20px; --primer-typography-body-small-letter-spacing: 0px; --primer-typography-body-small-weight: 400; --primer-typography-body-small-size: 12px; --primer-typography-body-small-line-height: 16px; --primer-space-base: 4px; --primer-size-base: 4px; --primer-animation-duration: 200ms; --primer-animation-easing: cubic-bezier(0.44, 0, 0.4, 1); --primer-color-background-outlined-default: var(--primer-color-gray-000); --primer-color-background-outlined-disabled: var(--primer-color-gray-100); --primer-color-background-transparent-hover: var(--primer-color-gray-100); --primer-color-background-transparent-active: var(--primer-color-gray-200); --primer-color-background-transparent-loading: var(--primer-color-gray-100); --primer-color-background-transparent-focus: var(--primer-color-background-transparent-default); --primer-color-background-transparent-disabled: var(--primer-color-gray-100); --primer-color-background-transparent-selected: var(--primer-color-gray-100); --primer-color-text-primary: var(--primer-color-gray-900); --primer-color-text-placeholder: var(--primer-color-gray-500); --primer-color-text-disabled: var(--primer-color-gray-400); --primer-color-text-negative: var(--primer-color-red-900); --primer-color-text-link: var(--primer-color-blue-900); --primer-color-text-secondary: var(--primer-color-gray-600); --primer-color-border-outlined-default: var(--primer-color-gray-300); --primer-color-border-outlined-hover: var(--primer-color-gray-400); --primer-color-border-outlined-active: var(--primer-color-gray-500); --primer-color-border-outlined-disabled: var(--primer-color-gray-200); --primer-color-border-outlined-loading: var(--primer-color-gray-200); --primer-color-border-outlined-selected: var(--primer-color-brand); --primer-color-border-outlined-error: var(--primer-color-red-500); --primer-color-border-transparent-hover: var(--primer-color-border-transparent-default); --primer-color-border-transparent-active: var(--primer-color-border-transparent-default); --primer-color-border-transparent-disabled: var(--primer-color-border-transparent-default); --primer-color-border-transparent-selected: var(--primer-color-border-transparent-default); --primer-color-icon-primary: var(--primer-color-gray-900); --primer-color-icon-disabled: var(--primer-color-gray-400); --primer-color-icon-negative: var(--primer-color-red-500); --primer-color-focus: var(--primer-color-brand); --primer-color-loader: var(--primer-color-brand); --primer-radius-medium: 8px; --primer-radius-small: 4px; --primer-radius-large: 12px; --primer-radius-xsmall: 2px; --primer-typography-title-xlarge-font: var(--primer-typography-brand); --primer-typography-title-large-font: var(--primer-typography-brand); --primer-typography-body-large-font: var(--primer-typography-brand); --primer-typography-body-medium-font: var(--primer-typography-brand); --primer-typography-body-small-font: var(--primer-typography-brand); --primer-space-xxsmall: 2px; --primer-space-xsmall: 4px; --primer-space-small: 8px; --primer-space-medium: 12px; --primer-space-large: 16px; --primer-space-xlarge: 20px; --primer-size-small: 16px; --primer-size-medium: 20px; --primer-size-large: 24px; --primer-size-xlarge: 32px; --primer-size-xxlarge: 40px; --primer-size-xxxlarge: 56px; --primer-color-background-outlined-focus: var(--primer-color-background-outlined-default); --primer-color-background-outlined-loading: var(--primer-color-background-outlined-disabled); --primer-color-background-outlined-active: var(--primer-color-background-outlined-default); --primer-color-background-outlined-hover: var(--primer-color-background-outlined-default); --primer-color-background-outlined-selected: var(--primer-color-background-outlined-default); --primer-color-background-outlined-error: var(--primer-color-background-outlined-default); --primer-color-border-outlined-focus: var(--primer-color-focus); --primer-color-border-transparent-focus: var(--primer-color-focus); --primer-color-border-transparent-loading: var(--primer-color-border-transparent-disabled); } `",
|
|
3871
3871
|
"description": "Light theme CSS variables"
|
|
3872
3872
|
},
|
|
3873
3873
|
{
|
|
@@ -10073,6 +10073,12 @@
|
|
|
10073
10073
|
}
|
|
10074
10074
|
],
|
|
10075
10075
|
"description": "Save reference to network option element"
|
|
10076
|
+
},
|
|
10077
|
+
{
|
|
10078
|
+
"kind": "field",
|
|
10079
|
+
"name": "handleDocumentKeyDown",
|
|
10080
|
+
"privacy": "private",
|
|
10081
|
+
"description": "Handle document-level keydown events, but only when dropdown is open\nThis allows keyboard navigation to continue working"
|
|
10076
10082
|
}
|
|
10077
10083
|
],
|
|
10078
10084
|
"events": [
|