@odus/checkout 0.26.2 → 0.27.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.
@@ -1,5 +1,5 @@
1
- import { c as en, a as Hn, f as Tt, d as qn, C as he, I as tn, g as Kn, S as Ft, b as gi, e as be, A as $n, P as Wn, E as Gn, h as Yn, i as Xn, j as Zn, k as Jn, l as Qn, F as es, m as ts, n as is } from "./Alert-CeFsv_tJ.js";
2
- import { o as Co, p as Ao, q as Mo, r as _o, s as ko, t as Io, u as No, v as Oo } from "./Alert-CeFsv_tJ.js";
1
+ import { c as en, a as Hn, f as Tt, d as qn, C as he, I as tn, g as Kn, S as Ft, b as gi, e as be, A as $n, P as Wn, E as Gn, h as Yn, i as Xn, j as Zn, k as Jn, l as Qn, F as es, m as ts, n as is } from "./Alert-CJCIVeeP.js";
2
+ import { o as Co, p as Ao, q as Mo, r as _o, s as ko, t as Io, u as No, v as Oo } from "./Alert-CJCIVeeP.js";
3
3
  const V = {
4
4
  // Checkout lifecycle events
5
5
  CHECKOUT_INITIALIZED: "checkout.initialized",
@@ -4383,10 +4383,11 @@ class Zi extends he {
4383
4383
  onBlur;
4384
4384
  fieldsContainer;
4385
4385
  translationFunc;
4386
+ locale;
4386
4387
  stateOptions;
4387
4388
  grouped;
4388
4389
  constructor(e) {
4389
- super("div", ["address-section"]), this.type = e.type, this.onChange = e.onChange, this.onBlur = e.onBlur, this.translationFunc = e.translationFunc, this.grouped = e.grouped ?? !0;
4390
+ super("div", ["address-section"]), this.type = e.type, this.onChange = e.onChange, this.onBlur = e.onBlur, this.translationFunc = e.translationFunc, this.locale = e.locale, this.grouped = e.grouped ?? !0;
4390
4391
  const { title: t, checkoutProfile: n, fieldsConfig: s, values: r, errors: a, touched: l } = e;
4391
4392
  if (this.grouped) {
4392
4393
  const c = document.createElement("h3");
@@ -4530,7 +4531,7 @@ class Zi extends he {
4530
4531
  } else {
4531
4532
  const v = this.createInput(
4532
4533
  "state",
4533
- t.state?.label ?? this.translationFunc("address.state"),
4534
+ t.state?.label ?? this.translationFunc("address.chooseState"),
4534
4535
  n.state,
4535
4536
  s.state,
4536
4537
  r.state,
@@ -4553,7 +4554,13 @@ class Zi extends he {
4553
4554
  error: !1,
4554
4555
  errorMsg: void 0,
4555
4556
  styles: a,
4556
- ...this.grouped ? { placeholder: t } : { label: t, placeholder: t },
4557
+ ...this.grouped ? { placeholder: t } : {
4558
+ label: t,
4559
+ placeholder: (() => {
4560
+ const p = `address.placeholder.${e}`, g = this.translationFunc(p);
4561
+ return g !== p ? g : t;
4562
+ })()
4563
+ },
4557
4564
  value: n,
4558
4565
  autocomplete: l,
4559
4566
  onChange: (p) => {
@@ -4580,7 +4587,7 @@ class Zi extends he {
4580
4587
  }), m;
4581
4588
  }
4582
4589
  createCountrySelect(e, t, n, s, r, a) {
4583
- const l = `${this.type}Address.country`, c = Kn(r), m = new Ft({
4590
+ const l = `${this.type}Address.country`, c = Kn(r, this.locale), m = new Ft({
4584
4591
  name: l,
4585
4592
  error: !1,
4586
4593
  errorMsg: void 0,
@@ -4590,7 +4597,7 @@ class Zi extends he {
4590
4597
  label: a ?? this.translationFunc("address.chooseCountry")
4591
4598
  },
4592
4599
  value: e,
4593
- options: c,
4600
+ groups: c,
4594
4601
  autocomplete: "country",
4595
4602
  onChange: (p) => {
4596
4603
  m.setError(!1);
@@ -5020,6 +5027,7 @@ class uo {
5020
5027
  formElement;
5021
5028
  focusManager;
5022
5029
  translationFunc;
5030
+ locale;
5023
5031
  onFieldFocus;
5024
5032
  onChange;
5025
5033
  onBlur;
@@ -5047,7 +5055,7 @@ class uo {
5047
5055
  cardCvvFocusHandler;
5048
5056
  nameFocusHandler;
5049
5057
  constructor(e) {
5050
- this.formElement = e.formElement, this.focusManager = e.focusManager, this.translationFunc = e.translationFunc, this.onFieldFocus = e.onFieldFocus, this.onChange = e.onChange, this.onBlur = e.onBlur, this.onPaypalSubmit = e.onPaypalSubmit, this.onApplePaySubmit = e.onApplePaySubmit, this.supportedPaymentMethods = e.supportedPaymentMethods, this.paymentId = e.paymentId, this.checkoutKey = e.checkoutKey, this.checkoutDetails = e.checkoutDetails, this.environment = e.environment;
5058
+ this.formElement = e.formElement, this.focusManager = e.focusManager, this.translationFunc = e.translationFunc, this.locale = e.locale, this.onFieldFocus = e.onFieldFocus, this.onChange = e.onChange, this.onBlur = e.onBlur, this.onPaypalSubmit = e.onPaypalSubmit, this.onApplePaySubmit = e.onApplePaySubmit, this.supportedPaymentMethods = e.supportedPaymentMethods, this.paymentId = e.paymentId, this.checkoutKey = e.checkoutKey, this.checkoutDetails = e.checkoutDetails, this.environment = e.environment;
5051
5059
  }
5052
5060
  createPaymentMethods(e, t, n = !1) {
5053
5061
  try {
@@ -5110,7 +5118,8 @@ class uo {
5110
5118
  checkoutProfile: e,
5111
5119
  translationFunc: this.translationFunc,
5112
5120
  defaultCountry: e.layout.phoneNumber?.defaultCountry || "US",
5113
- allowedCountries: e.layout.phoneNumber?.allowedCountries
5121
+ allowedCountries: e.layout.phoneNumber?.allowedCountries,
5122
+ locale: this.locale
5114
5123
  }), this.phoneNumberFocusHandler = () => this.onFieldFocus("phoneNumber"), this.phoneNumberField.getElement().addEventListener("focus", this.phoneNumberFocusHandler, !0), this.focusManager.registerField("phoneNumber", this.phoneNumberField), this.formElement.appendChild(this.phoneNumberField.getElement());
5115
5124
  } catch (r) {
5116
5125
  throw console.error("Error creating phone number field:", r), r;
@@ -5201,6 +5210,7 @@ class uo {
5201
5210
  onChange: this.onChange,
5202
5211
  onBlur: this.onBlur,
5203
5212
  translationFunc: this.translationFunc,
5213
+ locale: this.locale,
5204
5214
  grouped: e.layout.grouped
5205
5215
  }), this.formElement.appendChild(this.billingAddressSection.getElement());
5206
5216
  } catch (r) {
@@ -5233,6 +5243,7 @@ class uo {
5233
5243
  onChange: this.onChange,
5234
5244
  onBlur: this.onBlur,
5235
5245
  translationFunc: this.translationFunc,
5246
+ locale: this.locale,
5236
5247
  grouped: e.layout.grouped
5237
5248
  }), this.formElement.appendChild(this.shippingAddressSection.getElement());
5238
5249
  } catch (r) {
@@ -5550,6 +5561,7 @@ class go extends he {
5550
5561
  formElement: this.element,
5551
5562
  focusManager: this.focusManager,
5552
5563
  translationFunc: this.translation.t,
5564
+ locale: e.locale ?? void 0,
5553
5565
  onFieldFocus: (t) => this.eventHandler.handleFieldFocus(t),
5554
5566
  onChange: (t) => this.eventHandler.handleChange(t),
5555
5567
  onBlur: (t) => this.eventHandler.handleBlur(t),
@@ -1,4 +1,4 @@
1
- import { l as a, I as m, S as y, g as C, b as g, A as E, F as k, i as z, a as c, f as N, J as S, E as P, k as x, P as F, h as R, w as A, m as V, n as M, j as B } from "./Alert-CeFsv_tJ.js";
1
+ import { l as a, I as m, S as y, g as C, b as g, A as E, F as k, i as z, a as c, f as N, J as S, E as P, k as x, P as F, h as R, w as A, m as V, n as M, j as B } from "./Alert-CJCIVeeP.js";
2
2
  const l = ".form-helper-text{color:#dc2727;font-family:var(--odus-font-family, inherit);font-size:12px;font-weight:500;margin-top:4px;display:block;overflow:hidden;max-height:100px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out}.form-helper-text-hidden{max-height:0;opacity:0;margin-top:0;overflow:hidden}", h = ".input-wrapper{display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;align-items:stretch}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-size:var(--odus-input-font-size, 16px);font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input[name=cardNumber]{padding-right:100px}.form-input-error{color:#dc2727}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}", u = ".input-label{font-family:var(--odus-font-family, inherit);font-size:var(--odus-label-font-size, 14px);font-weight:var(--odus-label-font-weight, 400);color:var(--odus-label-color, var(--odus-color-text, #1a1a1a));letter-spacing:var(--odus-label-letter-spacing, normal);line-height:var(--odus-label-line-height, 1.4);margin-bottom:var(--odus-label-margin-bottom, 6px)}", I = ":host{--odus-font-family: system-ui, sans-serif;--odus-font-size: 16px;--odus-color-error: #dc2727;--odus-color-text: #1a1a1a;--odus-color-background: #ffffff;--odus-border-color: #e0e0e0;--odus-border-radius: 6px;--odus-spacing-sm: 8px;--odus-spacing-md: 16px;--odus-spacing-lg: 24px;--odus-input-height: 44px;--odus-input-padding: 8px 12px;--odus-input-font-size: var(--odus-font-size);--odus-input-font-weight: 400;--odus-input-letter-spacing: .02em;--odus-input-line-height: 1.5;--odus-input-placeholder-color: #717173;--odus-input-placeholder-opacity: .3;--odus-input-focus-shadow: 0 0 0 1px rgba(50, 151, 211, .7), 0 1px 1px 0 rgba(0, 0, 0, .07), 0 0 0 4px rgba(50, 151, 211, .3);--odus-label-font-size: 14px;--odus-label-font-weight: 400;--odus-label-color: var(--odus-color-text);--odus-label-letter-spacing: normal;--odus-label-line-height: 1.4;--odus-label-margin-bottom: 6px;--odus-card-gap: 12px;--odus-button-height: 48px;--odus-button-border-radius: var(--odus-border-radius)}.form-input{opacity:1;font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:var( --odus-input-focus-shadow, 0 0 0 1px rgba(50, 151, 211, .7), 0 1px 1px 0 rgba(0, 0, 0, .07), 0 0 0 4px rgba(50, 151, 211, .3) );position:relative;z-index:2}.input-label{font-family:var(--odus-font-family, inherit)!important;font-size:var(--odus-label-font-size, 14px)!important;font-weight:var(--odus-label-font-weight, 400)!important;color:var(--odus-label-color, var(--odus-color-text, #1a1a1a))!important;letter-spacing:var(--odus-label-letter-spacing, normal)!important;line-height:var(--odus-label-line-height, 1.4)!important;margin-bottom:var(--odus-label-margin-bottom, 6px)!important}.form-helper-text{font-family:var(--odus-font-family, inherit)!important}";
3
3
  class d {
4
4
  shadowRoot = null;
@@ -76,7 +76,7 @@ class L extends d {
76
76
  name: "billingAddress.city",
77
77
  label: e("address.city"),
78
78
  error: !1,
79
- placeholder: e("address.city"),
79
+ placeholder: e("address.placeholder.city"),
80
80
  value: this._value,
81
81
  autocomplete: "address-level2",
82
82
  onChange: (t) => {
@@ -129,7 +129,7 @@ class L extends d {
129
129
  return this._error;
130
130
  }
131
131
  }
132
- const v = `.form-select{opacity:1;font-weight:400;letter-spacing:.02em;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;padding:8px 32px 8px 12px;border:none;outline:none;line-height:1.5;z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23717173' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.form-select-error{color:#dc2727}.form-select-placeholder{color:#d4d4d5}.form-select option[disabled]{color:#717173;opacity:.5}.form-select:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}`;
132
+ const v = `.form-select{opacity:1;font-weight:400;letter-spacing:.02em;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;padding:8px 32px 8px 12px;border:none;outline:none;line-height:1.5;z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' stroke='%23717173' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.form-select-error{color:#dc2727}.form-select-placeholder{color:#d4d4d5}.form-select option[disabled]{color:#717173;opacity:.5}.form-select:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}`;
133
133
  class T extends d {
134
134
  _value = "";
135
135
  _error = null;
@@ -141,21 +141,21 @@ class T extends d {
141
141
  render() {
142
142
  if (!this.shadowRoot) return;
143
143
  this._select?.getElement().remove(), this.options.initialValue && !this._value && (this._value = String(this.options.initialValue));
144
- const { t: e } = a();
144
+ const { t: e, locale: t } = a();
145
145
  this._select = new y({
146
146
  name: "billingAddress.country",
147
147
  label: e("address.country"),
148
148
  error: !1,
149
149
  placeholder: e("address.chooseCountry"),
150
150
  value: this._value,
151
- options: C(this._allowedCountries),
151
+ groups: C(this._allowedCountries, t),
152
152
  autocomplete: "country",
153
- onChange: (t) => {
154
- this._value = t.target.value, this._error = null, this.emit("change", this._value);
153
+ onChange: (r) => {
154
+ this._value = r.target.value, this._error = null, this.emit("change", this._value);
155
155
  }
156
156
  }), this._select.addEventListener("blur", () => {
157
- const { t } = a();
158
- this._error = this._value ? null : t("validation.countryRequired"), this._select?.setError(!!this._error, this._error ?? void 0), this.emit("blur", this._value);
157
+ const { t: r } = a();
158
+ this._error = this._value ? null : r("validation.countryRequired"), this._select?.setError(!!this._error, this._error ?? void 0), this.emit("blur", this._value);
159
159
  }), this.shadowRoot.appendChild(this._select.getElement());
160
160
  }
161
161
  getCss() {
@@ -166,7 +166,7 @@ class T extends d {
166
166
  color: var(--odus-color-text, #1a1a1a) !important;
167
167
  font-family: var(--odus-font-family, system-ui, sans-serif) !important;
168
168
  font-size: var(--odus-input-font-size, 16px) !important;
169
- background: var(--odus-color-background, #ffffff) !important;
169
+ background-color: var(--odus-color-background, #ffffff) !important;
170
170
  border-radius: var(--odus-border-radius, 6px) !important;
171
171
  box-shadow:
172
172
  0 0 0 1px var(--odus-border-color, #e0e0e0),
@@ -212,7 +212,7 @@ class j extends d {
212
212
  name: "billingAddress.firstName",
213
213
  label: e("address.firstName"),
214
214
  error: !1,
215
- placeholder: e("address.firstName"),
215
+ placeholder: e("address.placeholder.firstName"),
216
216
  value: this._value,
217
217
  autocomplete: "given-name",
218
218
  onChange: (t) => {
@@ -277,7 +277,7 @@ class q extends d {
277
277
  name: "billingAddress.lastName",
278
278
  label: e("address.lastName"),
279
279
  error: !1,
280
- placeholder: e("address.lastName"),
280
+ placeholder: e("address.placeholder.lastName"),
281
281
  value: this._value,
282
282
  autocomplete: "family-name",
283
283
  onChange: (t) => {
@@ -454,7 +454,7 @@ class O extends d {
454
454
  name: "billingAddress.street",
455
455
  label: e("address.street"),
456
456
  error: !1,
457
- placeholder: e("address.street"),
457
+ placeholder: e("address.placeholder.street"),
458
458
  value: this._value,
459
459
  autocomplete: "street-address",
460
460
  onChange: (t) => {
@@ -519,7 +519,7 @@ class Z extends d {
519
519
  name: "billingAddress.zipCode",
520
520
  label: e("address.zipCode"),
521
521
  error: !1,
522
- placeholder: e("address.zipCode"),
522
+ placeholder: e("address.placeholder.zipCode"),
523
523
  value: this._value,
524
524
  autocomplete: "postal-code",
525
525
  onChange: (t) => {
@@ -1113,7 +1113,7 @@ class ie extends d {
1113
1113
  return null;
1114
1114
  }
1115
1115
  }
1116
- const ae = ".country-dial-code-dropdown{position:relative;display:inline-block}.country-dial-code-trigger{display:flex;align-items:center;gap:6px;padding:var(--odus-input-padding, 8px 12px);padding-right:8px;background:#fff;border:none;cursor:pointer;font-weight:400;letter-spacing:.02em;line-height:var(--odus-input-line-height, 1.5);transition:all .1s ease-in;white-space:nowrap;border-right:1px solid #e0e0e0;box-sizing:border-box}.country-dial-code-trigger:hover{background:#f5f5f5}.country-dial-code-trigger:focus{outline:none}.country-dial-code-trigger .country-flag{font-size:14px;line-height:1}.country-dial-code-trigger .country-chevron{color:#717173;flex-shrink:0;transition:transform .15s ease}.country-dial-code-trigger[aria-expanded=true] .country-chevron{transform:rotate(180deg)}.country-dial-code-panel{position:absolute;top:0;left:0;z-index:10000;width:280px;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #0000000d,0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;max-height:360px;display:flex;flex-direction:column;overflow:hidden}.country-dial-code-panel.hidden{display:none}.country-search-wrapper{padding:12px;border-bottom:1px solid #e0e0e0;flex-shrink:0}.country-search{width:100%;padding:6px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:inherit;font-family:inherit;outline:none;transition:all .1s ease-in;box-sizing:border-box}.country-search:focus{border-color:#3297d3b3;box-shadow:0 0 0 3px #3297d31a}.country-search::placeholder{color:#717173;opacity:.6}.countries-list{overflow-y:auto;flex:1;min-height:0}.countries-list::-webkit-scrollbar{width:8px}.countries-list::-webkit-scrollbar-track{background:#f5f5f5}.countries-list::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:4px}.countries-list::-webkit-scrollbar-thumb:hover{background:#b0b0b0}.country-group-header{padding:8px 16px 4px;font-size:12px;font-weight:600;color:#717173;text-transform:uppercase;letter-spacing:.05em;background:#fafafa;position:sticky;top:0;z-index:1}.country-item{display:flex;align-items:center;gap:12px;padding:10px 16px;width:100%;border:none;background:#fff;cursor:pointer;transition:background .1s ease;text-align:left;font-size:14px;font-family:inherit;color:inherit}.country-item:hover{background:#f5f5f5}.country-item.selected{background:#3297d314;color:#3297d3}.country-item:focus{outline:none;background:#f0f0f0}.country-item .country-flag{font-size:20px;line-height:1;flex-shrink:0}.country-item .country-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.country-item .country-dial-code{color:#717173;font-size:.95em;flex-shrink:0}.country-item.selected .country-dial-code{color:#3297d3cc}.no-results{padding:24px 16px;text-align:center;color:#717173;font-size:14px}.phone-number-field-wrapper{display:flex;width:100%}.phone-number-field-container{display:flex;align-items:center;width:100%;border-radius:inherit;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;position:relative}.phone-number-field-container.focused{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;z-index:2}.phone-number-field-container.error{box-shadow:0 0 0 1px #dc2727,0 2px 4px #dc27271a}.phone-number-field-container.error.focused{box-shadow:0 0 0 1px #dc2727,0 1px 1px #00000012,0 0 0 4px #dc272733}.phone-number-field-container .country-dial-code-dropdown{flex-shrink:0}.phone-number-field-container .country-dial-code-trigger{border:none;box-shadow:none;border-radius:0;border-top-left-radius:var(--phone-border-radius, 0px);border-bottom-left-radius:var(--phone-border-radius, 0px)}.phone-number-field-container .phone-input-wrapper{flex:1;min-width:0}.phone-number-field-container .phone-input-wrapper .form-input{border:none;box-shadow:none;border-radius:0;border-top-right-radius:var(--phone-border-radius, 0px);border-bottom-right-radius:var(--phone-border-radius, 0px);padding:var(--odus-input-padding, 8px 12px)}.phone-number-field-container .phone-input-wrapper .form-input:focus{box-shadow:none;z-index:auto}", ne = {
1116
+ const ae = ".country-dial-code-dropdown{position:relative;display:inline-block}.country-dial-code-trigger{display:flex;align-items:center;gap:6px;padding:var(--odus-input-padding, 8px 12px);padding-right:8px;background:#fff;border:none;cursor:pointer;font-weight:400;letter-spacing:.02em;line-height:var(--odus-input-line-height, 1.5);transition:all .1s ease-in;white-space:nowrap;border-right:1px solid #e0e0e0;box-sizing:border-box}.country-dial-code-trigger:hover{background:#f5f5f5}.country-dial-code-trigger:focus{outline:none}.country-dial-code-trigger .country-flag{font-size:14px;line-height:1}.country-dial-code-trigger .country-chevron{color:#717173;flex-shrink:0;transition:transform .15s ease}.country-dial-code-trigger[aria-expanded=true] .country-chevron{transform:rotate(180deg)}.country-dial-code-panel{position:fixed;top:0;left:0;z-index:10000;width:280px;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #0000000d,0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;max-height:360px;display:flex;flex-direction:column;overflow:hidden}.country-dial-code-panel.hidden{display:none}.country-search-wrapper{padding:12px;border-bottom:1px solid #e0e0e0;flex-shrink:0}.country-search{width:100%;padding:6px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:inherit;font-family:inherit;outline:none;transition:all .1s ease-in;box-sizing:border-box}.country-search:focus{border-color:#3297d3b3;box-shadow:0 0 0 3px #3297d31a}.country-search::placeholder{color:#717173;opacity:.6}.countries-list{overflow-y:auto;flex:1;min-height:0}.countries-list::-webkit-scrollbar{width:8px}.countries-list::-webkit-scrollbar-track{background:#f5f5f5}.countries-list::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:4px}.countries-list::-webkit-scrollbar-thumb:hover{background:#b0b0b0}.country-group-header{padding:8px 16px 4px;font-size:12px;font-weight:600;color:#717173;text-transform:uppercase;letter-spacing:.05em;background:#fafafa;position:sticky;top:0;z-index:1}.country-item{display:flex;align-items:center;gap:12px;padding:10px 16px;width:100%;border:none;background:#fff;cursor:pointer;transition:background .1s ease;text-align:left;font-size:14px;font-family:inherit;color:inherit}.country-item:hover{background:#f5f5f5}.country-item.selected{background:#3297d314;color:#3297d3}.country-item:focus{outline:none;background:#f0f0f0}.country-item .country-flag{font-size:20px;line-height:1;flex-shrink:0}.country-item .country-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.country-item .country-dial-code{color:#717173;font-size:.95em;flex-shrink:0}.country-item.selected .country-dial-code{color:#3297d3cc}.no-results{padding:24px 16px;text-align:center;color:#717173;font-size:14px}.phone-number-field-wrapper{display:flex;width:100%}.phone-number-field-container{display:flex;align-items:center;width:100%;border-radius:inherit;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;position:relative}.phone-number-field-container.focused{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;z-index:2}.phone-number-field-container.error{box-shadow:0 0 0 1px #dc2727,0 2px 4px #dc27271a}.phone-number-field-container.error.focused{box-shadow:0 0 0 1px #dc2727,0 1px 1px #00000012,0 0 0 4px #dc272733}.phone-number-field-container .country-select-wrapper{flex-shrink:0;position:relative;display:flex;align-items:center;gap:4px;padding:var(--odus-input-padding, 8px 12px);padding-right:6px;background:transparent;border-top-left-radius:var(--phone-border-radius, 0px);border-bottom-left-radius:var(--phone-border-radius, 0px);white-space:nowrap}.phone-number-field-container .country-select-wrapper .country-flag{font-size:14px;line-height:1;pointer-events:none}.phone-number-field-container .country-select-wrapper .country-chevron{display:flex;align-items:center;color:#717173;flex-shrink:0;pointer-events:none}.phone-number-field-container .country-select-wrapper .country-select{position:absolute;inset:0;border:none;outline:none;background:transparent;cursor:pointer;opacity:0;width:100%;height:100%}.phone-number-field-container .phone-input-wrapper{flex:1;min-width:0}.phone-number-field-container .phone-input-wrapper .form-input{border:none;box-shadow:none;border-radius:0;border-top-right-radius:var(--phone-border-radius, 0px);border-bottom-right-radius:var(--phone-border-radius, 0px);padding:var(--odus-input-padding, 8px 2px)}.phone-number-field-container .phone-input-wrapper .form-input:focus{box-shadow:none;z-index:auto}", ne = {
1117
1117
  name: "odus-elements",
1118
1118
  styles: {
1119
1119
  fontSize: 14,
@@ -1145,20 +1145,20 @@ class de extends d {
1145
1145
  render() {
1146
1146
  if (!this.shadowRoot) return;
1147
1147
  this._field?.destroy(), this._field?.getElement().remove(), this.options.initialValue && !this._phone && (this._phone = String(this.options.initialValue));
1148
- const { t: e } = a();
1148
+ const { t: e, locale: t } = a();
1149
1149
  this._field = new R({
1150
1150
  value: this._phone,
1151
1151
  error: !1,
1152
1152
  checkoutProfile: ne,
1153
1153
  translationFunc: e,
1154
- panelContainer: this.shadowRoot ?? void 0,
1154
+ locale: t,
1155
1155
  onChange: () => {
1156
1156
  this._phone = this._field?.getValue() ?? "", this._error = null, this.emit("change", this._phone);
1157
1157
  },
1158
1158
  onBlur: () => {
1159
1159
  this._phone = this._field?.getValue() ?? "";
1160
- const t = c(), r = this._field?.getCountry();
1161
- this._error = t.phoneNumber(this._phone, r) ?? null, this._field?.setError(!!this._error, this._error ?? void 0), this.emit("blur", this._phone);
1160
+ const r = c(), o = this._field?.getCountry();
1161
+ this._error = r.phoneNumber(this._phone, o) ?? null, this._field?.setError(!!this._error, this._error ?? void 0), this.emit("blur", this._phone);
1162
1162
  }
1163
1163
  }), this.shadowRoot.appendChild(this._field.getElement());
1164
1164
  }
@@ -1167,7 +1167,7 @@ class de extends d {
1167
1167
  `) + `
1168
1168
  :host { display: block; }
1169
1169
  .form-input,
1170
- .country-dial-code-trigger {
1170
+ .country-select-wrapper {
1171
1171
  color: var(--odus-color-text, #1a1a1a) !important;
1172
1172
  font-family: var(--odus-font-family, system-ui, sans-serif) !important;
1173
1173
  font-size: var(--odus-input-font-size, 16px) !important;
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .input-wrapper{display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;align-items:stretch}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-size:var(--odus-input-font-size, 16px);font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input[name=cardNumber]{padding-right:100px}.form-input-error{color:#dc2727}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}.form-helper-text{color:#dc2727;font-family:var(--odus-font-family, inherit);font-size:12px;font-weight:500;margin-top:4px;display:block;overflow:hidden;max-height:100px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out}.form-helper-text-hidden{max-height:0;opacity:0;margin-top:0;overflow:hidden}.input-label{font-family:var(--odus-font-family, inherit);font-size:var(--odus-label-font-size, 14px);font-weight:var(--odus-label-font-weight, 400);color:var(--odus-label-color, var(--odus-color-text, #1a1a1a));letter-spacing:var(--odus-label-letter-spacing, normal);line-height:var(--odus-label-line-height, 1.4);margin-bottom:var(--odus-label-margin-bottom, 6px)}.form-select{opacity:1;font-weight:400;letter-spacing:.02em;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;padding:8px 32px 8px 12px;border:none;outline:none;line-height:1.5;z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23717173' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.form-select-error{color:#dc2727}.form-select-placeholder{color:#d4d4d5}.form-select option[disabled]{color:#717173;opacity:.5}.form-select:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}.card-element{position:relative;height:38.5px;transition:box-shadow .1s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;padding:0;border:none;background:#fff;border-radius:inherit;box-sizing:border-box}.card-element iframe{width:100%;min-width:0;display:block}.card-element-focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d}.card-icon{width:18px;transition:opacity .6s ease-in;opacity:1}.card-icon img{max-width:100%;display:block;height:auto}.cards-position{position:absolute;z-index:10;right:12px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:8px;pointer-events:none}.loading{position:relative}.loading:after{content:"";position:absolute;inset:0;height:100%;width:100%;background-color:#fff;border-radius:inherit}@media only screen and (min-width: 600px){.card-icon{width:20px}}apple-pay-button{-webkit-appearance:-apple-pay-button;-apple-pay-button-type:plain;-apple-pay-button-style:black;appearance:-apple-pay-button;height:40px;min-height:40px;border-radius:4px;cursor:pointer;display:inline-block;width:100%;box-sizing:border-box}apple-pay-button:hover{filter:brightness(.9)}.paypal{background-color:#ffc439;color:#253b80;font-weight:700;padding:8px 16px;box-shadow:0 2px 4px #0000001a;text-transform:none;cursor:pointer;border-radius:4px}.paypal:hover{background-color:#ffc439;filter:brightness(.95)}.paypal-icon-container{display:flex;align-items:center;justify-content:center}.paypal-icon-container img{width:69px;height:22px}.country-dial-code-dropdown{position:relative;display:inline-block}.country-dial-code-trigger{display:flex;align-items:center;gap:6px;padding:var(--odus-input-padding, 8px 12px);padding-right:8px;background:#fff;border:none;cursor:pointer;font-weight:400;letter-spacing:.02em;line-height:var(--odus-input-line-height, 1.5);transition:all .1s ease-in;white-space:nowrap;border-right:1px solid #e0e0e0;box-sizing:border-box}.country-dial-code-trigger:hover{background:#f5f5f5}.country-dial-code-trigger:focus{outline:none}.country-dial-code-trigger .country-flag{font-size:14px;line-height:1}.country-dial-code-trigger .country-chevron{color:#717173;flex-shrink:0;transition:transform .15s ease}.country-dial-code-trigger[aria-expanded=true] .country-chevron{transform:rotate(180deg)}.country-dial-code-panel{position:absolute;top:0;left:0;z-index:10000;width:280px;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #0000000d,0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;max-height:360px;display:flex;flex-direction:column;overflow:hidden}.country-dial-code-panel.hidden{display:none}.country-search-wrapper{padding:12px;border-bottom:1px solid #e0e0e0;flex-shrink:0}.country-search{width:100%;padding:6px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:inherit;font-family:inherit;outline:none;transition:all .1s ease-in;box-sizing:border-box}.country-search:focus{border-color:#3297d3b3;box-shadow:0 0 0 3px #3297d31a}.country-search::placeholder{color:#717173;opacity:.6}.countries-list{overflow-y:auto;flex:1;min-height:0}.countries-list::-webkit-scrollbar{width:8px}.countries-list::-webkit-scrollbar-track{background:#f5f5f5}.countries-list::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:4px}.countries-list::-webkit-scrollbar-thumb:hover{background:#b0b0b0}.country-group-header{padding:8px 16px 4px;font-size:12px;font-weight:600;color:#717173;text-transform:uppercase;letter-spacing:.05em;background:#fafafa;position:sticky;top:0;z-index:1}.country-item{display:flex;align-items:center;gap:12px;padding:10px 16px;width:100%;border:none;background:#fff;cursor:pointer;transition:background .1s ease;text-align:left;font-size:14px;font-family:inherit;color:inherit}.country-item:hover{background:#f5f5f5}.country-item.selected{background:#3297d314;color:#3297d3}.country-item:focus{outline:none;background:#f0f0f0}.country-item .country-flag{font-size:20px;line-height:1;flex-shrink:0}.country-item .country-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.country-item .country-dial-code{color:#717173;font-size:.95em;flex-shrink:0}.country-item.selected .country-dial-code{color:#3297d3cc}.no-results{padding:24px 16px;text-align:center;color:#717173;font-size:14px}.phone-number-field-wrapper{display:flex;width:100%}.phone-number-field-container{display:flex;align-items:center;width:100%;border-radius:inherit;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;position:relative}.phone-number-field-container.focused{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;z-index:2}.phone-number-field-container.error{box-shadow:0 0 0 1px #dc2727,0 2px 4px #dc27271a}.phone-number-field-container.error.focused{box-shadow:0 0 0 1px #dc2727,0 1px 1px #00000012,0 0 0 4px #dc272733}.phone-number-field-container .country-dial-code-dropdown{flex-shrink:0}.phone-number-field-container .country-dial-code-trigger{border:none;box-shadow:none;border-radius:0;border-top-left-radius:var(--phone-border-radius, 0px);border-bottom-left-radius:var(--phone-border-radius, 0px)}.phone-number-field-container .phone-input-wrapper{flex:1;min-width:0}.phone-number-field-container .phone-input-wrapper .form-input{border:none;box-shadow:none;border-radius:0;border-top-right-radius:var(--phone-border-radius, 0px);border-bottom-right-radius:var(--phone-border-radius, 0px);padding:var(--odus-input-padding, 8px 12px)}.phone-number-field-container .phone-input-wrapper .form-input:focus{box-shadow:none;z-index:auto}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.error-alert{background-color:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:16px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;animation:slideIn .3s ease-out}.error-alert-content{display:flex;align-items:flex-start;gap:12px}.error-alert-icon-container{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;background-color:#fee2e2;border-radius:50%;color:#dc2626}.error-alert-icon{color:#dc2626}.error-alert-text-container{flex:1;min-width:0}.error-alert-title{margin:0 0 4px;font-size:14px;font-weight:600;color:#991b1b;line-height:1.4}.error-alert-message{margin:0;font-family:var(--odus-font-family, inherit);font-size:14px;color:#7f1d1d;line-height:1.5;word-break:break-word}.form-container{display:flex;flex-direction:column;gap:16px;padding:4px;position:relative;min-height:340px;max-width:100%;text-align:left}.form-container>*{font-family:inherit}.card-details{display:flex}.card-details>*{flex:1;min-width:0}.error-messages-container>*{display:none}.error-messages-container>*:first-child{display:block}.address-section{display:flex;flex-direction:column;gap:6px}.address-section-title{font-size:14px;font-weight:600;margin:0;padding:0}.address-same-as-billing{display:flex;align-items:center;gap:4px;cursor:pointer}.address-same-as-billing input[type=checkbox]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.address-same-as-billing .checkbox-icon{width:24px;height:24px;flex-shrink:0;cursor:pointer}.address-same-as-billing .checkbox-icon .checkbox-checked{display:none}.address-same-as-billing .checkbox-icon .checkbox-unchecked{display:block}.address-same-as-billing input[type=checkbox]:checked+.checkbox-icon .checkbox-checked{display:block}.address-same-as-billing input[type=checkbox]:checked+.checkbox-icon .checkbox-unchecked{display:none}.address-same-as-billing label{font-size:14px;cursor:pointer}.address-fields{display:flex;flex-direction:column;gap:0;transition:opacity .2s ease}.address-fields--ungrouped{gap:16px}.address-row{display:flex;gap:0}.address-row-single{width:100%}.address-row-single>*{flex:1}.address-row-double{width:100%}.address-row-double>*{flex:1;min-width:0}.payment-methods{display:flex;flex-direction:column;gap:12px}.skeleton-container{display:flex;flex-direction:column;gap:12px;padding:4px;position:relative;height:49px;max-width:100%;text-align:left;inset:0;width:100%}.skeleton{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;border-radius:8px;animation:shimmer 1.5s ease-in-out infinite;position:relative;overflow:hidden}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton-field{display:flex;flex-direction:column;gap:8px}.skeleton-label{height:16px;width:80px;border-radius:4px}.skeleton-input,.skeleton-payment-method{height:35px;width:100%;border-radius:8px}.skeleton-card-row{display:flex;gap:12px}.skeleton-card-row .skeleton-field{flex:1}.skeleton-submit-button{height:35px;width:100%;border-radius:8px}.skeleton-separator-text{height:14px;width:100px;border-radius:4px}.payment-separator_container{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px}.payment-separator{width:100%;display:flex;align-items:center;justify-content:space-between;margin:0 0 -8px}.payment-separator__line{height:1.3px;flex-grow:1;background:#9f9f9f}.payment-separator__text{font-size:14px;color:#0d0d0d;padding:0 16px;margin:0;font-weight:400}.button{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;font-size:14px;font-weight:500;line-height:1.5;text-align:center;cursor:pointer;transition:all .2s ease;font-weight:700;border:none;outline:none;white-space:nowrap;height:min-content;width:100%}.disabled{pointer-events:none}.valid{outline:none;overflow:hidden;transition:all .3s ease}.valid:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transition:left .5s;animation:glowSlide 6s infinite}@keyframes glowSlide{0%{left:-100%}50%{left:100%}to{left:100%}}.valid:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.1) 25%,rgba(255,255,255,.3) 50%,rgba(255,255,255,.1) 75%,transparent 100%);transform:translate(-100%);animation:smoothGlow 7s infinite}@keyframes smoothGlow{0%{transform:translate(-100%)}to{transform:translate(100%)}}.blur-bg{position:absolute;inset:0;height:100%;width:100%;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(3.5px);backdrop-filter:blur(3.5px);z-index:9999}.loader{width:64px;height:64px;border-radius:50%;background:conic-gradient(from 270deg,#134e4a 0deg,#0f766e 90deg,#0d9488 180deg,#5eaba3 240deg,rgba(13,148,136,.2) 300deg,transparent 330deg);animation:spin 1s linear infinite;position:relative}.loader:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#fff}@keyframes spin{to{transform:rotate(360deg)}}.title{margin-top:20px;font-size:18px;color:#4f4f4f;animation:fadeIn 1s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
1
+ .input-wrapper{display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;align-items:stretch}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-size:var(--odus-input-font-size, 16px);font-weight:var(--odus-input-font-weight, 400);letter-spacing:var(--odus-input-letter-spacing, .02em);transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px var(--odus-border-color, #e0e0e0),0 2px 4px #00000012,0 1px 1.5px #0000000d;background:var(--odus-color-background, #fff);padding:var(--odus-input-padding, 8px 12px);border:none;outline:none;line-height:var(--odus-input-line-height, 1.5);z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%}.form-input[name=cardNumber]{padding-right:100px}.form-input-error{color:#dc2727}.form-input::placeholder{color:var(--odus-input-placeholder-color, #717173);opacity:var(--odus-input-placeholder-opacity, .3)}.form-input:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}.form-helper-text{color:#dc2727;font-family:var(--odus-font-family, inherit);font-size:12px;font-weight:500;margin-top:4px;display:block;overflow:hidden;max-height:100px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out}.form-helper-text-hidden{max-height:0;opacity:0;margin-top:0;overflow:hidden}.input-label{font-family:var(--odus-font-family, inherit);font-size:var(--odus-label-font-size, 14px);font-weight:var(--odus-label-font-weight, 400);color:var(--odus-label-color, var(--odus-color-text, #1a1a1a));letter-spacing:var(--odus-label-letter-spacing, normal);line-height:var(--odus-label-line-height, 1.4);margin-bottom:var(--odus-label-margin-bottom, 6px)}.form-select{opacity:1;font-weight:400;letter-spacing:.02em;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;padding:8px 32px 8px 12px;border:none;outline:none;line-height:1.5;z-index:0;box-sizing:border-box;min-height:0;flex:1;width:100%;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' stroke='%23717173' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.form-select-error{color:#dc2727}.form-select-placeholder{color:#d4d4d5}.form-select option[disabled]{color:#717173;opacity:.5}.form-select:focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;position:relative;z-index:2}.card-element{position:relative;height:38.5px;transition:box-shadow .1s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;padding:0;border:none;background:#fff;border-radius:inherit;box-sizing:border-box}.card-element iframe{width:100%;min-width:0;display:block}.card-element-focus{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d}.card-icon{width:18px;transition:opacity .6s ease-in;opacity:1}.card-icon img{max-width:100%;display:block;height:auto}.cards-position{position:absolute;z-index:10;right:12px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:8px;pointer-events:none}.loading{position:relative}.loading:after{content:"";position:absolute;inset:0;height:100%;width:100%;background-color:#fff;border-radius:inherit}@media only screen and (min-width: 600px){.card-icon{width:20px}}apple-pay-button{-webkit-appearance:-apple-pay-button;-apple-pay-button-type:plain;-apple-pay-button-style:black;appearance:-apple-pay-button;height:40px;min-height:40px;border-radius:4px;cursor:pointer;display:inline-block;width:100%;box-sizing:border-box}apple-pay-button:hover{filter:brightness(.9)}.paypal{background-color:#ffc439;color:#253b80;font-weight:700;padding:8px 16px;box-shadow:0 2px 4px #0000001a;text-transform:none;cursor:pointer;border-radius:4px}.paypal:hover{background-color:#ffc439;filter:brightness(.95)}.paypal-icon-container{display:flex;align-items:center;justify-content:center}.paypal-icon-container img{width:69px;height:22px}.country-dial-code-dropdown{position:relative;display:inline-block}.country-dial-code-trigger{display:flex;align-items:center;gap:6px;padding:var(--odus-input-padding, 8px 12px);padding-right:8px;background:#fff;border:none;cursor:pointer;font-weight:400;letter-spacing:.02em;line-height:var(--odus-input-line-height, 1.5);transition:all .1s ease-in;white-space:nowrap;border-right:1px solid #e0e0e0;box-sizing:border-box}.country-dial-code-trigger:hover{background:#f5f5f5}.country-dial-code-trigger:focus{outline:none}.country-dial-code-trigger .country-flag{font-size:14px;line-height:1}.country-dial-code-trigger .country-chevron{color:#717173;flex-shrink:0;transition:transform .15s ease}.country-dial-code-trigger[aria-expanded=true] .country-chevron{transform:rotate(180deg)}.country-dial-code-panel{position:fixed;top:0;left:0;z-index:10000;width:280px;background:#fff;border-radius:8px;box-shadow:0 0 0 1px #0000000d,0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;max-height:360px;display:flex;flex-direction:column;overflow:hidden}.country-dial-code-panel.hidden{display:none}.country-search-wrapper{padding:12px;border-bottom:1px solid #e0e0e0;flex-shrink:0}.country-search{width:100%;padding:6px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:inherit;font-family:inherit;outline:none;transition:all .1s ease-in;box-sizing:border-box}.country-search:focus{border-color:#3297d3b3;box-shadow:0 0 0 3px #3297d31a}.country-search::placeholder{color:#717173;opacity:.6}.countries-list{overflow-y:auto;flex:1;min-height:0}.countries-list::-webkit-scrollbar{width:8px}.countries-list::-webkit-scrollbar-track{background:#f5f5f5}.countries-list::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:4px}.countries-list::-webkit-scrollbar-thumb:hover{background:#b0b0b0}.country-group-header{padding:8px 16px 4px;font-size:12px;font-weight:600;color:#717173;text-transform:uppercase;letter-spacing:.05em;background:#fafafa;position:sticky;top:0;z-index:1}.country-item{display:flex;align-items:center;gap:12px;padding:10px 16px;width:100%;border:none;background:#fff;cursor:pointer;transition:background .1s ease;text-align:left;font-size:14px;font-family:inherit;color:inherit}.country-item:hover{background:#f5f5f5}.country-item.selected{background:#3297d314;color:#3297d3}.country-item:focus{outline:none;background:#f0f0f0}.country-item .country-flag{font-size:20px;line-height:1;flex-shrink:0}.country-item .country-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.country-item .country-dial-code{color:#717173;font-size:.95em;flex-shrink:0}.country-item.selected .country-dial-code{color:#3297d3cc}.no-results{padding:24px 16px;text-align:center;color:#717173;font-size:14px}.phone-number-field-wrapper{display:flex;width:100%}.phone-number-field-container{display:flex;align-items:center;width:100%;border-radius:inherit;transition:box-shadow .1s ease-in,border-radius .2s ease-in;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;background:#fff;position:relative}.phone-number-field-container.focused{box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d;z-index:2}.phone-number-field-container.error{box-shadow:0 0 0 1px #dc2727,0 2px 4px #dc27271a}.phone-number-field-container.error.focused{box-shadow:0 0 0 1px #dc2727,0 1px 1px #00000012,0 0 0 4px #dc272733}.phone-number-field-container .country-select-wrapper{flex-shrink:0;position:relative;display:flex;align-items:center;gap:4px;padding:var(--odus-input-padding, 8px 12px);padding-right:6px;background:transparent;border-top-left-radius:var(--phone-border-radius, 0px);border-bottom-left-radius:var(--phone-border-radius, 0px);white-space:nowrap}.phone-number-field-container .country-select-wrapper .country-flag{font-size:14px;line-height:1;pointer-events:none}.phone-number-field-container .country-select-wrapper .country-chevron{display:flex;align-items:center;color:#717173;flex-shrink:0;pointer-events:none}.phone-number-field-container .country-select-wrapper .country-select{position:absolute;inset:0;border:none;outline:none;background:transparent;cursor:pointer;opacity:0;width:100%;height:100%}.phone-number-field-container .phone-input-wrapper{flex:1;min-width:0}.phone-number-field-container .phone-input-wrapper .form-input{border:none;box-shadow:none;border-radius:0;border-top-right-radius:var(--phone-border-radius, 0px);border-bottom-right-radius:var(--phone-border-radius, 0px);padding:var(--odus-input-padding, 8px 2px)}.phone-number-field-container .phone-input-wrapper .form-input:focus{box-shadow:none;z-index:auto}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.error-alert{background-color:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:16px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;animation:slideIn .3s ease-out}.error-alert-content{display:flex;align-items:flex-start;gap:12px}.error-alert-icon-container{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;background-color:#fee2e2;border-radius:50%;color:#dc2626}.error-alert-icon{color:#dc2626}.error-alert-text-container{flex:1;min-width:0}.error-alert-title{margin:0 0 4px;font-size:14px;font-weight:600;color:#991b1b;line-height:1.4}.error-alert-message{margin:0;font-family:var(--odus-font-family, inherit);font-size:14px;color:#7f1d1d;line-height:1.5;word-break:break-word}.form-container{display:flex;flex-direction:column;gap:16px;padding:4px;position:relative;min-height:340px;max-width:100%;text-align:left}.form-container>*{font-family:inherit}.card-details{display:flex}.card-details>*{flex:1;min-width:0}.error-messages-container>*{display:none}.error-messages-container>*:first-child{display:block}.address-section{display:flex;flex-direction:column;gap:6px}.address-section-title{font-size:14px;font-weight:600;margin:0;padding:0}.address-same-as-billing{display:flex;align-items:center;gap:4px;cursor:pointer}.address-same-as-billing input[type=checkbox]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.address-same-as-billing .checkbox-icon{width:24px;height:24px;flex-shrink:0;cursor:pointer}.address-same-as-billing .checkbox-icon .checkbox-checked{display:none}.address-same-as-billing .checkbox-icon .checkbox-unchecked{display:block}.address-same-as-billing input[type=checkbox]:checked+.checkbox-icon .checkbox-checked{display:block}.address-same-as-billing input[type=checkbox]:checked+.checkbox-icon .checkbox-unchecked{display:none}.address-same-as-billing label{font-size:14px;cursor:pointer}.address-fields{display:flex;flex-direction:column;gap:0;transition:opacity .2s ease}.address-fields--ungrouped{gap:16px}.address-row{display:flex;gap:0}.address-row-single{width:100%}.address-row-single>*{flex:1}.address-row-double{width:100%}.address-row-double>*{flex:1;min-width:0}.payment-methods{display:flex;flex-direction:column;gap:12px}.skeleton-container{display:flex;flex-direction:column;gap:12px;padding:4px;position:relative;height:49px;max-width:100%;text-align:left;inset:0;width:100%}.skeleton{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;border-radius:8px;animation:shimmer 1.5s ease-in-out infinite;position:relative;overflow:hidden}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton-field{display:flex;flex-direction:column;gap:8px}.skeleton-label{height:16px;width:80px;border-radius:4px}.skeleton-input,.skeleton-payment-method{height:35px;width:100%;border-radius:8px}.skeleton-card-row{display:flex;gap:12px}.skeleton-card-row .skeleton-field{flex:1}.skeleton-submit-button{height:35px;width:100%;border-radius:8px}.skeleton-separator-text{height:14px;width:100px;border-radius:4px}.payment-separator_container{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px}.payment-separator{width:100%;display:flex;align-items:center;justify-content:space-between;margin:0 0 -8px}.payment-separator__line{height:1.3px;flex-grow:1;background:#9f9f9f}.payment-separator__text{font-size:14px;color:#0d0d0d;padding:0 16px;margin:0;font-weight:400}.button{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;font-size:14px;font-weight:500;line-height:1.5;text-align:center;cursor:pointer;transition:all .2s ease;font-weight:700;border:none;outline:none;white-space:nowrap;height:min-content;width:100%}.disabled{pointer-events:none}.valid{outline:none;overflow:hidden;transition:all .3s ease}.valid:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transition:left .5s;animation:glowSlide 6s infinite}@keyframes glowSlide{0%{left:-100%}50%{left:100%}to{left:100%}}.valid:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.1) 25%,rgba(255,255,255,.3) 50%,rgba(255,255,255,.1) 75%,transparent 100%);transform:translate(-100%);animation:smoothGlow 7s infinite}@keyframes smoothGlow{0%{transform:translate(-100%)}to{transform:translate(100%)}}.blur-bg{position:absolute;inset:0;height:100%;width:100%;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(3.5px);backdrop-filter:blur(3.5px);z-index:9999}.loader{width:64px;height:64px;border-radius:50%;background:conic-gradient(from 270deg,#134e4a 0deg,#0f766e 90deg,#0d9488 180deg,#5eaba3 240deg,rgba(13,148,136,.2) 300deg,transparent 330deg);animation:spin 1s linear infinite;position:relative}.loader:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#fff}@keyframes spin{to{transform:rotate(360deg)}}.title{margin-top:20px;font-size:18px;color:#4f4f4f;animation:fadeIn 1s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "0.26.2",
3
+ "version": "0.27.0",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "0.26.2",
3
+ "version": "0.27.0",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",