@descope/web-components-ui 3.21.0 → 3.22.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.
@@ -9547,7 +9547,8 @@ var collapsibleContainer$1 = /*#__PURE__*/Object.freeze({
9547
9547
  const componentName$16 = getComponentName('recovery-codes');
9548
9548
 
9549
9549
  const NO_ACTION = 'none';
9550
- const DEFAULT_ERROR_MESSAGE = 'Please save your recovery codes to continue';
9550
+ const DEFAULT_ERROR_MESSAGE =
9551
+ 'Copy or download your recovery codes to continue.';
9551
9552
 
9552
9553
  // default button label per action (buttons variant). the icons variant uses the vaadin
9553
9554
  // glyphs hardcoded in the shadow-DOM template below; the buttons variant uses image srcs.
@@ -10953,7 +10954,11 @@ const resolveAuthType = (authType) => {
10953
10954
  return { label: authType.toUpperCase(), configured: true };
10954
10955
  };
10955
10956
 
10956
- const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10957
+ const itemRenderer$2 = (
10958
+ { id, name, isDefault, link, authType, authOnly },
10959
+ _,
10960
+ ref,
10961
+ ) => {
10957
10962
  const deleteAction =
10958
10963
  !isDefault && ref?.allowDelete
10959
10964
  ? `<span
@@ -10976,9 +10981,14 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10976
10981
  : '';
10977
10982
 
10978
10983
  const { label: authTypeLabel, configured } = resolveAuthType(authType);
10984
+ // Sits next to the auth type because it says what the connection is FOR, the same kind of fact.
10985
+ const authOnlyBadge = authOnly
10986
+ ? `<descope-badge class="auth-only-badge" size="xs"><span class="auth-only-text"></span></descope-badge>`
10987
+ : '';
10979
10988
  const authTypeRow = configured
10980
10989
  ? `<div class="auth-type-row">
10981
10990
  <descope-badge class="auth-type-badge" size="xs"></descope-badge>
10991
+ ${authOnlyBadge}
10982
10992
  </div>`
10983
10993
  : `<div class="auth-type-row">
10984
10994
  <descope-text
@@ -10986,6 +10996,7 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10986
10996
  variant="body2"
10987
10997
  mode="secondary"
10988
10998
  >${ref?.notConfiguredLabel}</descope-text>
10999
+ ${authOnlyBadge}
10989
11000
  </div>`;
10990
11001
 
10991
11002
  const template = document.createElement('template');
@@ -11030,6 +11041,9 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
11030
11041
 
11031
11042
  const authTypeBadge = template.content.querySelector('.auth-type-badge');
11032
11043
  if (authTypeBadge) authTypeBadge.textContent = authTypeLabel;
11044
+
11045
+ const authOnlyEl = template.content.querySelector('.auth-only-text');
11046
+ if (authOnlyEl) authOnlyEl.textContent = ref?.authOnlyLabel;
11033
11047
  return template;
11034
11048
  };
11035
11049
 
@@ -11154,6 +11168,28 @@ class RawMultiSsoClass extends BaseClass$4 {
11154
11168
  .auth-type-row {
11155
11169
  display: flex;
11156
11170
  align-items: center;
11171
+ min-width: 0;
11172
+ }
11173
+
11174
+ /* The auth type is short and fixed, so it keeps its size and the consumer-supplied label is
11175
+ the one that gives way. */
11176
+ .auth-type-badge {
11177
+ flex-shrink: 0;
11178
+ }
11179
+
11180
+ /* The label is consumer-supplied and localized, so it can be far longer than the row. It
11181
+ shrinks to whatever the row leaves it and ellipsises only then, rather than being held to a
11182
+ fixed width that would truncate it while space is still going spare. */
11183
+ .auth-only-badge {
11184
+ min-width: 0;
11185
+ flex-shrink: 1;
11186
+ }
11187
+
11188
+ .auth-only-text {
11189
+ display: block;
11190
+ overflow: hidden;
11191
+ text-overflow: ellipsis;
11192
+ white-space: nowrap;
11157
11193
  }
11158
11194
 
11159
11195
  .action {
@@ -11201,6 +11237,10 @@ class RawMultiSsoClass extends BaseClass$4 {
11201
11237
  return this.getAttribute('configure-tooltip-label') ?? '';
11202
11238
  }
11203
11239
 
11240
+ get authOnlyLabel() {
11241
+ return this.getAttribute('auth-only-label') || 'Authentication only';
11242
+ }
11243
+
11204
11244
  init() {
11205
11245
  super.init?.();
11206
11246
 
@@ -11322,6 +11362,10 @@ const MultiSsoClass = compose(
11322
11362
  selector: () => '.action',
11323
11363
  property: 'gap',
11324
11364
  },
11365
+ authTypeRowGap: {
11366
+ selector: () => '.auth-type-row',
11367
+ property: 'gap',
11368
+ },
11325
11369
  unconfiguredAuthTypeTextColor: {
11326
11370
  selector: () => '[not-configured]',
11327
11371
  property: TextClass.cssVarList.textColor,
@@ -11453,6 +11497,7 @@ const MultiSsoClass = compose(
11453
11497
  'not-configured-label',
11454
11498
  'delete-tooltip-label',
11455
11499
  'configure-tooltip-label',
11500
+ 'auth-only-label',
11456
11501
  ],
11457
11502
  }),
11458
11503
  componentNameValidationMixin$1,
@@ -11468,6 +11513,8 @@ const MultiSso = {
11468
11513
  [vars$P.headerListGap]: globalRefs$s.spacing.md,
11469
11514
  [vars$P.itemContentGap]: globalRefs$s.spacing.md,
11470
11515
  [vars$P.actionGap]: globalRefs$s.spacing.sm,
11516
+ // keeps the authentication-only badge off the auth-type badge beside it
11517
+ [vars$P.authTypeRowGap]: globalRefs$s.spacing.sm,
11471
11518
  [vars$P.unconfiguredAuthTypeTextColor]: globalRefs$s.colors.surface.dark,
11472
11519
  [vars$P.unconfiguredAuthTypeTextFontStyle]: 'italic',
11473
11520
  [vars$P.buttonMaxWidth]: '50%',