@descope/web-components-ui 1.0.184 → 1.0.186

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.
@@ -6312,7 +6312,7 @@ class RawUploadFile extends BaseInputClass {
6312
6312
  const { host: host$1, wrapper, icon, title, description, requiredIndicator: requiredIndicator$1 } = {
6313
6313
  host: { selector: () => ':host' },
6314
6314
  wrapper: { selector: () => ':host > div' },
6315
- icon: { selector: () => '.icon' },
6315
+ icon: { selector: () => '::slotted(*)' },
6316
6316
  title: { selector: () => '.title' },
6317
6317
  description: { selector: () => '.description' },
6318
6318
  requiredIndicator: { selector: () => '.title::after' },
@@ -6842,7 +6842,7 @@ const themeVars = { globals: vars$r, components: vars };
6842
6842
 
6843
6843
  const componentName = getComponentName('recaptcha');
6844
6844
 
6845
- const observedAttributes = ['disabled', 'site-key', 'action', 'enterprise'];
6845
+ const observedAttributes = ['enabled', 'site-key', 'action', 'enterprise'];
6846
6846
 
6847
6847
  const BaseClass = createBaseClass({
6848
6848
  componentName,
@@ -6855,18 +6855,18 @@ class RawRecaptcha extends BaseClass {
6855
6855
 
6856
6856
  attributeChangedCallback(attrName, oldValue, newValue) {
6857
6857
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
6858
- if (attrName === 'disabled') {
6858
+ if (attrName === 'enabled') {
6859
6859
  this.#toggleRecaptcha(newValue === 'true');
6860
6860
  }
6861
6861
  }
6862
6862
 
6863
- renderRecaptcha(disabled) {
6864
- if (disabled) {
6865
- this.recaptchaEle.style.display = 'none';
6866
- this.mockRecaptchaEle.style.display = '';
6867
- } else {
6863
+ renderRecaptcha(enabled) {
6864
+ if (enabled) {
6868
6865
  this.recaptchaEle.style.display = '';
6869
6866
  this.mockRecaptchaEle.style.display = 'none';
6867
+ } else {
6868
+ this.recaptchaEle.style.display = 'none';
6869
+ this.mockRecaptchaEle.style.display = '';
6870
6870
  }
6871
6871
  }
6872
6872
 
@@ -6875,16 +6875,19 @@ class RawRecaptcha extends BaseClass {
6875
6875
 
6876
6876
  this.attachShadow({ mode: 'open' }).innerHTML = `
6877
6877
  <style>
6878
- :host #recaptcha {
6878
+ :host {
6879
+ display: inline-flex;
6880
+ }
6881
+ :host > div {
6882
+ display: flex;
6883
+ }
6884
+ :host #recaptcha {
6879
6885
  width: 100%;
6880
- height: 100%
6886
+ height: 100%;
6881
6887
  }
6882
6888
  :host img {
6883
6889
  width: 256px;
6884
6890
  }
6885
- :host {
6886
- display: inline-flex;
6887
- }
6888
6891
  </style>
6889
6892
  <div>
6890
6893
  <span id="recaptcha"></span>
@@ -6908,8 +6911,8 @@ class RawRecaptcha extends BaseClass {
6908
6911
  return this.getAttribute('action') || 'load';
6909
6912
  }
6910
6913
 
6911
- get disabled() {
6912
- return this.getAttribute('disabled') === 'true';
6914
+ get enabled() {
6915
+ return this.getAttribute('enabled') === 'true';
6913
6916
  }
6914
6917
 
6915
6918
  get scriptURL() {
@@ -6920,9 +6923,9 @@ class RawRecaptcha extends BaseClass {
6920
6923
  return url.toString();
6921
6924
  }
6922
6925
 
6923
- #toggleRecaptcha(disabled) {
6924
- this.renderRecaptcha(disabled);
6925
- if (!disabled) {
6926
+ #toggleRecaptcha(enabled) {
6927
+ this.renderRecaptcha(enabled);
6928
+ if (enabled) {
6926
6929
  this.#loadRecaptchaScript();
6927
6930
  this.#createOnLoadScript();
6928
6931
  }
@@ -6988,8 +6991,7 @@ class RawRecaptcha extends BaseClass {
6988
6991
 
6989
6992
  connectedCallback() {
6990
6993
  super.connectedCallback?.();
6991
-
6992
- this.#toggleRecaptcha(this.disabled);
6994
+ this.#toggleRecaptcha(this.enabled);
6993
6995
  }
6994
6996
  }
6995
6997