@descope/flow-components 2.0.601 → 2.0.603

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.cjs.js CHANGED
@@ -79243,7 +79243,7 @@ function requireIndex_cjs () {
79243
79243
  }
79244
79244
  };
79245
79245
 
79246
- const observedAttributes$7 = ['required', 'pattern'];
79246
+ const observedAttributes$6 = ['required', 'pattern'];
79247
79247
 
79248
79248
  const errorAttributes$1 = {
79249
79249
  valueMissing: 'data-errormessage-value-missing',
@@ -79262,7 +79262,7 @@ function requireIndex_cjs () {
79262
79262
  #validationTarget = validationTargetSymbol$1;
79263
79263
 
79264
79264
  static get observedAttributes() {
79265
- return [...(superclass.observedAttributes || []), ...observedAttributes$7];
79265
+ return [...(superclass.observedAttributes || []), ...observedAttributes$6];
79266
79266
  }
79267
79267
 
79268
79268
  static get formAssociated() {
@@ -79465,7 +79465,7 @@ function requireIndex_cjs () {
79465
79465
  attributeChangedCallback(attrName, oldValue, newValue) {
79466
79466
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
79467
79467
 
79468
- if (observedAttributes$7.includes(attrName)) {
79468
+ if (observedAttributes$6.includes(attrName)) {
79469
79469
  this.#setValidity();
79470
79470
  }
79471
79471
  }
@@ -81185,7 +81185,7 @@ function requireIndex_cjs () {
81185
81185
  return ProxyClass;
81186
81186
  };
81187
81187
 
81188
- const observedAttributes$6 = ['required', 'pattern'];
81188
+ const observedAttributes$5 = ['required', 'pattern'];
81189
81189
 
81190
81190
  const errorAttributes = {
81191
81191
  valueMissing: 'data-errormessage-value-missing',
@@ -81204,7 +81204,7 @@ function requireIndex_cjs () {
81204
81204
  #validationTarget = validationTargetSymbol;
81205
81205
 
81206
81206
  static get observedAttributes() {
81207
- return [...(superclass.observedAttributes || []), ...observedAttributes$6];
81207
+ return [...(superclass.observedAttributes || []), ...observedAttributes$5];
81208
81208
  }
81209
81209
 
81210
81210
  static get formAssociated() {
@@ -81382,7 +81382,7 @@ function requireIndex_cjs () {
81382
81382
  attributeChangedCallback(attrName, oldValue, newValue) {
81383
81383
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
81384
81384
 
81385
- if (observedAttributes$6.includes(attrName)) {
81385
+ if (observedAttributes$5.includes(attrName)) {
81386
81386
  this.#setValidity();
81387
81387
  }
81388
81388
  }
@@ -84991,12 +84991,12 @@ descope-boolean-field-internal {
84991
84991
 
84992
84992
  const componentName$T = getComponentName$1('passcode');
84993
84993
 
84994
- const observedAttributes$5 = ['digits'];
84994
+ const observedAttributes$4 = ['digits'];
84995
84995
 
84996
84996
  const customMixin$b = (superclass) =>
84997
84997
  class PasscodeMixinClass extends superclass {
84998
84998
  static get observedAttributes() {
84999
- return observedAttributes$5.concat(superclass.observedAttributes || []);
84999
+ return observedAttributes$4.concat(superclass.observedAttributes || []);
85000
85000
  }
85001
85001
 
85002
85002
  get digits() {
@@ -88716,7 +88716,7 @@ descope-boolean-field-internal {
88716
88716
 
88717
88717
  const componentName$I = getComponentName$1('upload-file');
88718
88718
 
88719
- const observedAttributes$4 = [
88719
+ const observedAttributes$3 = [
88720
88720
  'title',
88721
88721
  'description',
88722
88722
  'button-label',
@@ -88733,7 +88733,7 @@ descope-boolean-field-internal {
88733
88733
 
88734
88734
  class RawUploadFile extends BaseInputClass$4 {
88735
88735
  static get observedAttributes() {
88736
- return observedAttributes$4.concat(BaseInputClass$4.observedAttributes || []);
88736
+ return observedAttributes$3.concat(BaseInputClass$4.observedAttributes || []);
88737
88737
  }
88738
88738
 
88739
88739
  constructor() {
@@ -97255,12 +97255,12 @@ descope-boolean-field-internal {
97255
97255
 
97256
97256
  const componentName$c = getComponentName$1('hcaptcha');
97257
97257
 
97258
- const observedAttributes$3 = ['enabled', 'site-key'];
97258
+ const observedAttributes$2 = ['enabled', 'site-key'];
97259
97259
 
97260
97260
  const BaseInputClass$1 = createBaseInputClass({ componentName: componentName$c, baseSelector: ':host > div' });
97261
97261
  class RawHcaptcha extends BaseInputClass$1 {
97262
97262
  static get observedAttributes() {
97263
- return observedAttributes$3.concat(BaseInputClass$1.observedAttributes || []);
97263
+ return observedAttributes$2.concat(BaseInputClass$1.observedAttributes || []);
97264
97264
  }
97265
97265
 
97266
97266
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -98098,7 +98098,7 @@ descope-boolean-field-internal {
98098
98098
 
98099
98099
  const componentName$7 = getComponentName('timer');
98100
98100
 
98101
- const observedAttributes$2 = ['seconds', 'hide-icon', 'paused'];
98101
+ const observedAttributes$1 = ['seconds', 'hide-icon', 'paused'];
98102
98102
 
98103
98103
  const BaseClass$3 = createBaseClass$1({
98104
98104
  componentName: componentName$7,
@@ -98113,7 +98113,7 @@ descope-boolean-field-internal {
98113
98113
  #intervalId;
98114
98114
 
98115
98115
  static get observedAttributes() {
98116
- return observedAttributes$2.concat(BaseClass$3.observedAttributes || []);
98116
+ return observedAttributes$1.concat(BaseClass$3.observedAttributes || []);
98117
98117
  }
98118
98118
 
98119
98119
  constructor() {
@@ -99219,8 +99219,6 @@ descope-boolean-field-internal {
99219
99219
 
99220
99220
  const componentName$2 = getComponentName('outbound-apps');
99221
99221
 
99222
- const observedAttributes$1 = ['connect-button-label', 'disconnect-button-label', 'data'];
99223
-
99224
99222
  const itemRenderer = (
99225
99223
  { name, description, logo, appId, isConnected },
99226
99224
  _,
@@ -99233,24 +99231,24 @@ descope-boolean-field-internal {
99233
99231
  ${logo ? `img="${logo}"` : ''}
99234
99232
  ${name ? `display-name="${name}" abbr=${limitAbbreviation(name)}` : ''}
99235
99233
  size=${ref.size}
99234
+ ${logo ? 'st-avatar-background-color="none"' : ''}
99236
99235
  class="app-logo"
99237
99236
  ></descope-avatar>
99238
- <div class="content">
99239
- <div class="app-title">
99237
+
99238
+ <div class="content">
99240
99239
  <descope-text
99240
+ class="app-title"
99241
99241
  variant="subtitle1"
99242
99242
  mode="primary"
99243
99243
  >${name}</descope-text>
99244
- </div>
99245
99244
  ${
99246
99245
  description
99247
99246
  ? `
99248
- <div class="app-description">
99249
99247
  <descope-text
99248
+ class="app-description"
99250
99249
  variant="body2"
99251
99250
  mode="primary"
99252
99251
  >${description}</descope-text>
99253
- </div>
99254
99252
  `
99255
99253
  : ''
99256
99254
  }
@@ -99270,15 +99268,13 @@ descope-boolean-field-internal {
99270
99268
  });
99271
99269
 
99272
99270
  class RawOutboundAppsClass extends BaseClass$1 {
99273
- static get observedAttributes() {
99274
- return observedAttributes$1;
99275
- }
99276
-
99277
99271
  constructor() {
99278
99272
  super();
99279
99273
 
99280
99274
  this.attachShadow({ mode: 'open' }).innerHTML = `
99281
- <descope-list></descope-list>
99275
+ <descope-list>
99276
+ <slot name="empty-state" slot="empty-state"></slot>
99277
+ </descope-list>
99282
99278
  `;
99283
99279
 
99284
99280
  this.appsList = this.shadowRoot.querySelector('descope-list');
@@ -99295,6 +99291,13 @@ descope-boolean-field-internal {
99295
99291
  }
99296
99292
  .content {
99297
99293
  flex-grow: 1;
99294
+ display: flex;
99295
+ flex-direction: column;
99296
+ }
99297
+ .app-title,
99298
+ .app-description {
99299
+ display: flex;
99300
+ direction: inherit;
99298
99301
  }
99299
99302
  descope-list {
99300
99303
  display: block;
@@ -99312,11 +99315,17 @@ descope-boolean-field-internal {
99312
99315
  this.appsList.addEventListener('click', this.onAppsListClick.bind(this));
99313
99316
  }
99314
99317
 
99318
+ get readonly() {
99319
+ return this.getAttribute('readonly') === 'true';
99320
+ }
99321
+
99315
99322
  onAppsListClick(e) {
99316
- const id = e.srcElement.getAttribute('data-outbound-app-id');
99317
- const action = e.srcElement.getAttribute('data-action');
99318
- if (id && action) {
99319
- this.dispatchEvent(new CustomEvent(`${action}-clicked`, { bubbles: true, detail: { id, action } }));
99323
+ if (!this.readonly) {
99324
+ const id = e.srcElement.getAttribute('data-outbound-app-id');
99325
+ const action = e.srcElement.getAttribute('data-action');
99326
+ if (id && action) {
99327
+ this.dispatchEvent(new CustomEvent(`${action}-clicked`, { bubbles: true, detail: { id, action } }));
99328
+ }
99320
99329
  }
99321
99330
  }
99322
99331
 
@@ -99359,14 +99368,14 @@ descope-boolean-field-internal {
99359
99368
  selector: TextClass.componentName,
99360
99369
  property: TextClass.cssVarList.fontSize,
99361
99370
  },
99362
- appLogoBackgroundColor: {
99363
- selector: AvatarClass.componentName,
99364
- property: AvatarClass.cssVarList.avatarBackgroundColor,
99365
- },
99366
99371
  appLogoGap: {
99367
99372
  selector: () => ' .app-logo',
99368
99373
  property: 'margin-inline-end'
99369
99374
  },
99375
+ contentGap: {
99376
+ selector: () => ' .content',
99377
+ property: 'gap'
99378
+ },
99370
99379
  itemsTextAlign: {
99371
99380
  selector: TextClass.componentName,
99372
99381
  property: TextClass.cssVarList.textAlign,
@@ -99424,6 +99433,7 @@ descope-boolean-field-internal {
99424
99433
 
99425
99434
  [vars$1.appLogoBackgroundColor]: 'none',
99426
99435
  [vars$1.appLogoGap]: globals.spacing.md,
99436
+ [vars$1.contentGap]: globals.spacing.xs,
99427
99437
 
99428
99438
  // list-item overrides
99429
99439
  [vars$1.itemCursor]: 'default',
@@ -100008,7 +100018,6 @@ descope-boolean-field-internal {
100008
100018
  index_cjs$4.getThemeRefs = getThemeRefs;
100009
100019
  index_cjs$4.getThemeVars = getThemeVars;
100010
100020
  index_cjs$4.globalsThemeToStyle = globalsThemeToStyle;
100011
- index_cjs$4.observedAttributes = observedAttributes$1;
100012
100021
  index_cjs$4.themeToCSSVarsObj = themeToCSSVarsObj;
100013
100022
  index_cjs$4.themeToStyle = themeToStyle;
100014
100023
  index_cjs$4.themeVars = themeVars;
@@ -100077,6 +100086,7 @@ const TimerButtonClass = index_cjsExports.TimerButtonClass;
100077
100086
  const CollapsibleContainerClass = index_cjsExports.CollapsibleContainerClass;
100078
100087
  const RecoveryCodesListClass = index_cjsExports.RecoveryCodesList;
100079
100088
  const HcaptchaClass = index_cjsExports.HcaptchaClass;
100089
+ const OutboundAppsClass = index_cjsExports.OutboundAppsClass;
100080
100090
 
100081
100091
  const Checkbox = React__default.default.forwardRef((props, ref) => React__default.default.createElement("descope-checkbox", { ...props, ref: ref }));
100082
100092
 
@@ -100562,6 +100572,9 @@ const RecoveryCodesList = React__default.default.forwardRef(({ data, ...props },
100562
100572
 
100563
100573
  const Hcaptcha = React__default.default.forwardRef(({ enabled, ...props }, ref) => (React__default.default.createElement("descope-hcaptcha", { ref: ref, enabled: enabled, ...props })));
100564
100574
 
100575
+ const OutboundApps = React__default.default.forwardRef(({ emptyState, data, ...props }, ref) => (React__default.default.createElement("descope-outbound-apps", { data: data ? JSON.stringify(data) : undefined, ...props, ref: ref },
100576
+ React__default.default.createElement("div", { slot: "empty-state" }, emptyState))));
100577
+
100565
100578
  const globalsThemeToStyle = index_cjsExports.globalsThemeToStyle;
100566
100579
  const createComponentsTheme = index_cjsExports.createComponentsTheme;
100567
100580
  const themeToStyle = index_cjsExports.themeToStyle;
@@ -100642,6 +100655,8 @@ exports.NotificationClass = NotificationClass;
100642
100655
  exports.NotpImageClass = NotpImageClass;
100643
100656
  exports.NumberField = NumberField;
100644
100657
  exports.NumberFieldClass = NumberFieldClass;
100658
+ exports.OutboundApps = OutboundApps;
100659
+ exports.OutboundAppsClass = OutboundAppsClass;
100645
100660
  exports.PasscodeClass = PasscodeClass;
100646
100661
  exports.Password = Password;
100647
100662
  exports.PasswordClass = PasswordClass;