Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "processout.js",
"version": "1.8.5",
"version": "1.8.6",
"description": "ProcessOut.js is a JavaScript library for ProcessOut's payment processing API.",
"scripts": {
"build:processout": "tsc -p src/processout && uglifyjs --compress --keep-fnames --ie8 dist/processout.js -o dist/processout.js",
Expand Down
17 changes: 15 additions & 2 deletions src/dynamic-checkout/payment-methods/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,10 @@ module ProcessOut {
private getCountryInput(billingAddressFieldsWrapper: HTMLElement) {
const countryInput = HTMLElements.createElement({
tagName: "select",
classNames: ["dco-payment-method-card-form-input"],
classNames: [
"dco-payment-method-card-form-input",
"dco-payment-method-card-form-input--placeholder",
],
attributes: {
id: "country-select",
name: "country",
Expand Down Expand Up @@ -741,6 +744,7 @@ module ProcessOut {

countryInput.addEventListener("change", e => {
const selectElement = e.target as HTMLSelectElement
selectElement.classList.remove("dco-payment-method-card-form-input--placeholder")

HTMLElements.replaceChildren(
billingAddressFieldsWrapper,
Expand Down Expand Up @@ -787,13 +791,22 @@ module ProcessOut {
if (unit === "state" && countryConfig.states) {
input = HTMLElements.createElement({
tagName: "select",
classNames: ["dco-payment-method-card-form-input"],
classNames: [
"dco-payment-method-card-form-input",
"dco-payment-method-card-form-input--placeholder",
],
attributes: {
name: unit,
"aria-label": Translations.getText("state-label", this.paymentConfig.locale),
},
})

input.addEventListener("change", (e: Event) => {
;(e.target as HTMLSelectElement).classList.remove(
"dco-payment-method-card-form-input--placeholder",
)
})

HTMLElements.appendChildren(input, [
this.getDefaultSelectOption(
Translations.getText("select-state-placeholder", this.paymentConfig.locale),
Expand Down
23 changes: 10 additions & 13 deletions src/dynamic-checkout/styles/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ const defaultStyles = `
color: #c2c2c2;
}

select.dco-payment-method-card-form-input--placeholder {
color: #696F79;
}

.dco-payment-method-card-form-section-inputs-wrapper {
display: flex;
gap: 10px;
Expand Down Expand Up @@ -567,37 +571,29 @@ const defaultStyles = `
}

.dco-express-checkout-header-settings-button {
min-width: 44px;
min-height: 44px;
padding: 0;
display: flex;
justify-content: center;
justify-content: flex-end;
align-items: center;
background-color: transparent;
border: none;
cursor: pointer;
transition: all .4s;
border-radius: 4px;
}

.dco-delete-payment-method-button {
min-width: 44px;
min-height: 44px;
display: flex;
justify-content: center;
justify-content: flex-end;
align-items: center;
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
transition: all .4s;
border-radius: 4px;
pointer-events: auto;
margin-left: auto;
}

.dco-delete-payment-method-button:hover, .dco-express-checkout-header-settings-button:hover {
background-color: #1213140f;
}

.dco-express-checkout-header-wrapper {
display: flex;
Expand Down Expand Up @@ -636,8 +632,9 @@ const defaultStyles = `

.dco-modal-payment-methods-list {
width: 100%;
border: 1px solid #dde0e3;
border-radius: 4px;
display: flex;
flex-direction: column;
gap: 10px;
}

.dco-modal-payment-methods-list--no-methods {
Expand Down
Loading