@descope/web-components-ui 1.112.0 → 1.113.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.
package/dist/index.esm.js CHANGED
@@ -1385,7 +1385,7 @@ const createProxy$1 = ({
1385
1385
  return ProxyClass;
1386
1386
  };
1387
1387
 
1388
- const observedAttributes$9 = ['required', 'pattern'];
1388
+ const observedAttributes$8 = ['required', 'pattern'];
1389
1389
 
1390
1390
  const errorAttributes$1 = {
1391
1391
  valueMissing: 'data-errormessage-value-missing',
@@ -1404,7 +1404,7 @@ const inputValidationMixin$1 = (superclass) =>
1404
1404
  #validationTarget = validationTargetSymbol$1;
1405
1405
 
1406
1406
  static get observedAttributes() {
1407
- return [...(superclass.observedAttributes || []), ...observedAttributes$9];
1407
+ return [...(superclass.observedAttributes || []), ...observedAttributes$8];
1408
1408
  }
1409
1409
 
1410
1410
  static get formAssociated() {
@@ -1582,7 +1582,7 @@ const inputValidationMixin$1 = (superclass) =>
1582
1582
  attributeChangedCallback(attrName, oldValue, newValue) {
1583
1583
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
1584
1584
 
1585
- if (observedAttributes$9.includes(attrName)) {
1585
+ if (observedAttributes$8.includes(attrName)) {
1586
1586
  this.#setValidity();
1587
1587
  }
1588
1588
  }
@@ -3661,7 +3661,7 @@ const inputEventsDispatchingMixin = (superclass) =>
3661
3661
  }
3662
3662
  };
3663
3663
 
3664
- const observedAttributes$8 = ['required', 'pattern'];
3664
+ const observedAttributes$7 = ['required', 'pattern'];
3665
3665
 
3666
3666
  const errorAttributes = {
3667
3667
  valueMissing: 'data-errormessage-value-missing',
@@ -3680,7 +3680,7 @@ const inputValidationMixin = (superclass) =>
3680
3680
  #validationTarget = validationTargetSymbol;
3681
3681
 
3682
3682
  static get observedAttributes() {
3683
- return [...(superclass.observedAttributes || []), ...observedAttributes$8];
3683
+ return [...(superclass.observedAttributes || []), ...observedAttributes$7];
3684
3684
  }
3685
3685
 
3686
3686
  static get formAssociated() {
@@ -3883,7 +3883,7 @@ const inputValidationMixin = (superclass) =>
3883
3883
  attributeChangedCallback(attrName, oldValue, newValue) {
3884
3884
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
3885
3885
 
3886
- if (observedAttributes$8.includes(attrName)) {
3886
+ if (observedAttributes$7.includes(attrName)) {
3887
3887
  this.#setValidity();
3888
3888
  }
3889
3889
  }
@@ -8271,7 +8271,7 @@ const toggleMaskVisibility = (input, value) => {
8271
8271
 
8272
8272
  const componentName$_ = getComponentName$1('passcode-internal');
8273
8273
 
8274
- const observedAttributes$7 = ['digits', 'loading'];
8274
+ const observedAttributes$6 = ['digits', 'loading'];
8275
8275
 
8276
8276
  const forwardAttributes = [
8277
8277
  'disabled',
@@ -8286,7 +8286,7 @@ const BaseInputClass$a = createBaseInputClass$1({ componentName: componentName$_
8286
8286
 
8287
8287
  class PasscodeInternal extends BaseInputClass$a {
8288
8288
  static get observedAttributes() {
8289
- return observedAttributes$7.concat(BaseInputClass$a.observedAttributes || []);
8289
+ return observedAttributes$6.concat(BaseInputClass$a.observedAttributes || []);
8290
8290
  }
8291
8291
 
8292
8292
  constructor() {
@@ -8480,7 +8480,7 @@ class PasscodeInternal extends BaseInputClass$a {
8480
8480
 
8481
8481
  // sync attributes to inputs
8482
8482
  if (oldValue !== newValue) {
8483
- if (observedAttributes$7.includes(attrName)) {
8483
+ if (observedAttributes$6.includes(attrName)) {
8484
8484
  if (attrName === 'digits') {
8485
8485
  this.renderInputs();
8486
8486
  }
@@ -8498,12 +8498,12 @@ class PasscodeInternal extends BaseInputClass$a {
8498
8498
 
8499
8499
  const componentName$Z = getComponentName$1('passcode');
8500
8500
 
8501
- const observedAttributes$6 = ['digits'];
8501
+ const observedAttributes$5 = ['digits'];
8502
8502
 
8503
8503
  const customMixin$c = (superclass) =>
8504
8504
  class PasscodeMixinClass extends superclass {
8505
8505
  static get observedAttributes() {
8506
- return observedAttributes$6.concat(superclass.observedAttributes || []);
8506
+ return observedAttributes$5.concat(superclass.observedAttributes || []);
8507
8507
  }
8508
8508
 
8509
8509
  get digits() {
@@ -11083,7 +11083,7 @@ const matchingParenthesis = (val) => {
11083
11083
 
11084
11084
  const componentName$U = getComponentName$1('phone-field-internal-input-box');
11085
11085
 
11086
- const observedAttributes$5 = [
11086
+ const observedAttributes$4 = [
11087
11087
  'disabled',
11088
11088
  'size',
11089
11089
  'readonly',
@@ -11101,7 +11101,7 @@ const BaseInputClass$8 = createBaseInputClass$1({ componentName: componentName$U
11101
11101
 
11102
11102
  class PhoneFieldInternal extends BaseInputClass$8 {
11103
11103
  static get observedAttributes() {
11104
- return [].concat(BaseInputClass$8.observedAttributes || [], observedAttributes$5);
11104
+ return [].concat(BaseInputClass$8.observedAttributes || [], observedAttributes$4);
11105
11105
  }
11106
11106
 
11107
11107
  #ayt;
@@ -11221,7 +11221,7 @@ class PhoneFieldInternal extends BaseInputClass$8 {
11221
11221
  attributeChangedCallback(attrName, oldValue, newValue) {
11222
11222
  super.attributeChangedCallback(attrName, oldValue, newValue);
11223
11223
 
11224
- if (oldValue !== newValue && observedAttributes$5.includes(attrName)) {
11224
+ if (oldValue !== newValue && observedAttributes$4.includes(attrName)) {
11225
11225
  const attr = mapAttrs[attrName] || attrName;
11226
11226
  this.textField.setAttribute(attr, newValue);
11227
11227
  }
@@ -12373,7 +12373,7 @@ customElements.define(componentName$Q, NewPasswordClass);
12373
12373
 
12374
12374
  const componentName$P = getComponentName$1('recaptcha');
12375
12375
 
12376
- const observedAttributes$4 = ['enabled', 'site-key', 'action', 'enterprise'];
12376
+ const observedAttributes$3 = ['enabled', 'site-key', 'action', 'enterprise'];
12377
12377
 
12378
12378
  const BaseClass$4 = createBaseClass$1({
12379
12379
  componentName: componentName$P,
@@ -12381,7 +12381,7 @@ const BaseClass$4 = createBaseClass$1({
12381
12381
  });
12382
12382
  class RawRecaptcha extends BaseClass$4 {
12383
12383
  static get observedAttributes() {
12384
- return observedAttributes$4.concat(BaseClass$4.observedAttributes || []);
12384
+ return observedAttributes$3.concat(BaseClass$4.observedAttributes || []);
12385
12385
  }
12386
12386
 
12387
12387
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -12617,7 +12617,7 @@ const getFilename = (fileObj) => {
12617
12617
 
12618
12618
  const componentName$O = getComponentName$1('upload-file');
12619
12619
 
12620
- const observedAttributes$3 = [
12620
+ const observedAttributes$2 = [
12621
12621
  'title',
12622
12622
  'description',
12623
12623
  'button-label',
@@ -12634,7 +12634,7 @@ const BaseInputClass$6 = createBaseInputClass$1({ componentName: componentName$O
12634
12634
 
12635
12635
  class RawUploadFile extends BaseInputClass$6 {
12636
12636
  static get observedAttributes() {
12637
- return observedAttributes$3.concat(BaseInputClass$6.observedAttributes || []);
12637
+ return observedAttributes$2.concat(BaseInputClass$6.observedAttributes || []);
12638
12638
  }
12639
12639
 
12640
12640
  constructor() {
@@ -18849,12 +18849,12 @@ customElements.define(componentName$f, AlertClass);
18849
18849
 
18850
18850
  const componentName$e = getComponentName$1('hcaptcha');
18851
18851
 
18852
- const observedAttributes$2 = ['enabled', 'site-key'];
18852
+ const observedAttributes$1 = ['enabled', 'site-key'];
18853
18853
 
18854
18854
  const BaseInputClass$2 = createBaseInputClass$1({ componentName: componentName$e, baseSelector: ':host > div' });
18855
18855
  class RawHcaptcha extends BaseInputClass$2 {
18856
18856
  static get observedAttributes() {
18857
- return observedAttributes$2.concat(BaseInputClass$2.observedAttributes || []);
18857
+ return observedAttributes$1.concat(BaseInputClass$2.observedAttributes || []);
18858
18858
  }
18859
18859
 
18860
18860
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -23417,7 +23417,7 @@ const formatTime = (ms = 0) => {
23417
23417
 
23418
23418
  const componentName$5 = getComponentName('timer');
23419
23419
 
23420
- const observedAttributes$1 = ['seconds', 'hide-icon', 'paused'];
23420
+ const observedAttributes = ['seconds', 'hide-icon', 'paused'];
23421
23421
 
23422
23422
  const BaseClass$2 = createBaseClass({
23423
23423
  componentName: componentName$5,
@@ -23432,7 +23432,7 @@ class RawTimer extends BaseClass$2 {
23432
23432
  #intervalId;
23433
23433
 
23434
23434
  static get observedAttributes() {
23435
- return observedAttributes$1.concat(BaseClass$2.observedAttributes || []);
23435
+ return observedAttributes.concat(BaseClass$2.observedAttributes || []);
23436
23436
  }
23437
23437
 
23438
23438
  constructor() {
@@ -24538,8 +24538,6 @@ var recoveryCodes$1 = /*#__PURE__*/Object.freeze({
24538
24538
 
24539
24539
  const componentName = getComponentName('outbound-apps');
24540
24540
 
24541
- const observedAttributes = ['connect-button-label', 'disconnect-button-label', 'data'];
24542
-
24543
24541
  const itemRenderer = (
24544
24542
  { name, description, logo, appId, isConnected },
24545
24543
  _,
@@ -24554,22 +24552,21 @@ const itemRenderer = (
24554
24552
  size=${ref.size}
24555
24553
  class="app-logo"
24556
24554
  ></descope-avatar>
24557
- <div class="content">
24558
- <div class="app-title">
24555
+
24556
+ <div class="content">
24559
24557
  <descope-text
24558
+ class="app-title"
24560
24559
  variant="subtitle1"
24561
24560
  mode="primary"
24562
24561
  >${name}</descope-text>
24563
- </div>
24564
24562
  ${
24565
24563
  description
24566
24564
  ? `
24567
- <div class="app-description">
24568
24565
  <descope-text
24566
+ class="app-description"
24569
24567
  variant="body2"
24570
24568
  mode="primary"
24571
24569
  >${description}</descope-text>
24572
- </div>
24573
24570
  `
24574
24571
  : ''
24575
24572
  }
@@ -24589,15 +24586,13 @@ const BaseClass = createBaseClass({
24589
24586
  });
24590
24587
 
24591
24588
  class RawOutboundAppsClass extends BaseClass {
24592
- static get observedAttributes() {
24593
- return observedAttributes;
24594
- }
24595
-
24596
24589
  constructor() {
24597
24590
  super();
24598
24591
 
24599
24592
  this.attachShadow({ mode: 'open' }).innerHTML = `
24600
- <descope-list></descope-list>
24593
+ <descope-list>
24594
+ <slot name="empty-state" slot="empty-state"></slot>
24595
+ </descope-list>
24601
24596
  `;
24602
24597
 
24603
24598
  this.appsList = this.shadowRoot.querySelector('descope-list');
@@ -24614,6 +24609,13 @@ class RawOutboundAppsClass extends BaseClass {
24614
24609
  }
24615
24610
  .content {
24616
24611
  flex-grow: 1;
24612
+ display: flex;
24613
+ flex-direction: column;
24614
+ }
24615
+ .app-title,
24616
+ .app-description {
24617
+ display: flex;
24618
+ direction: inherit;
24617
24619
  }
24618
24620
  descope-list {
24619
24621
  display: block;
@@ -24631,11 +24633,17 @@ class RawOutboundAppsClass extends BaseClass {
24631
24633
  this.appsList.addEventListener('click', this.onAppsListClick.bind(this));
24632
24634
  }
24633
24635
 
24636
+ get readonly() {
24637
+ return this.getAttribute('readonly') === 'true';
24638
+ }
24639
+
24634
24640
  onAppsListClick(e) {
24635
- const id = e.srcElement.getAttribute('data-outbound-app-id');
24636
- const action = e.srcElement.getAttribute('data-action');
24637
- if (id && action) {
24638
- this.dispatchEvent(new CustomEvent(`${action}-clicked`, { bubbles: true, detail: { id, action } }));
24641
+ if (!this.readonly) {
24642
+ const id = e.srcElement.getAttribute('data-outbound-app-id');
24643
+ const action = e.srcElement.getAttribute('data-action');
24644
+ if (id && action) {
24645
+ this.dispatchEvent(new CustomEvent(`${action}-clicked`, { bubbles: true, detail: { id, action } }));
24646
+ }
24639
24647
  }
24640
24648
  }
24641
24649
 
@@ -24686,6 +24694,10 @@ const OutboundAppsClass = compose(
24686
24694
  selector: () => ' .app-logo',
24687
24695
  property: 'margin-inline-end'
24688
24696
  },
24697
+ contentGap: {
24698
+ selector: () => ' .content',
24699
+ property: 'gap'
24700
+ },
24689
24701
  itemsTextAlign: {
24690
24702
  selector: TextClass.componentName,
24691
24703
  property: TextClass.cssVarList.textAlign,
@@ -24743,6 +24755,7 @@ const outboundApps = {
24743
24755
 
24744
24756
  [vars$1.appLogoBackgroundColor]: 'none',
24745
24757
  [vars$1.appLogoGap]: globals.spacing.md,
24758
+ [vars$1.contentGap]: globals.spacing.xs,
24746
24759
 
24747
24760
  // list-item overrides
24748
24761
  [vars$1.itemCursor]: 'default',