@descope/web-components-ui 3.21.1 → 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.
@@ -10954,7 +10954,11 @@ const resolveAuthType = (authType) => {
10954
10954
  return { label: authType.toUpperCase(), configured: true };
10955
10955
  };
10956
10956
 
10957
- const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10957
+ const itemRenderer$2 = (
10958
+ { id, name, isDefault, link, authType, authOnly },
10959
+ _,
10960
+ ref,
10961
+ ) => {
10958
10962
  const deleteAction =
10959
10963
  !isDefault && ref?.allowDelete
10960
10964
  ? `<span
@@ -10977,9 +10981,14 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10977
10981
  : '';
10978
10982
 
10979
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
+ : '';
10980
10988
  const authTypeRow = configured
10981
10989
  ? `<div class="auth-type-row">
10982
10990
  <descope-badge class="auth-type-badge" size="xs"></descope-badge>
10991
+ ${authOnlyBadge}
10983
10992
  </div>`
10984
10993
  : `<div class="auth-type-row">
10985
10994
  <descope-text
@@ -10987,6 +10996,7 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
10987
10996
  variant="body2"
10988
10997
  mode="secondary"
10989
10998
  >${ref?.notConfiguredLabel}</descope-text>
10999
+ ${authOnlyBadge}
10990
11000
  </div>`;
10991
11001
 
10992
11002
  const template = document.createElement('template');
@@ -11031,6 +11041,9 @@ const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
11031
11041
 
11032
11042
  const authTypeBadge = template.content.querySelector('.auth-type-badge');
11033
11043
  if (authTypeBadge) authTypeBadge.textContent = authTypeLabel;
11044
+
11045
+ const authOnlyEl = template.content.querySelector('.auth-only-text');
11046
+ if (authOnlyEl) authOnlyEl.textContent = ref?.authOnlyLabel;
11034
11047
  return template;
11035
11048
  };
11036
11049
 
@@ -11155,6 +11168,28 @@ class RawMultiSsoClass extends BaseClass$4 {
11155
11168
  .auth-type-row {
11156
11169
  display: flex;
11157
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;
11158
11193
  }
11159
11194
 
11160
11195
  .action {
@@ -11202,6 +11237,10 @@ class RawMultiSsoClass extends BaseClass$4 {
11202
11237
  return this.getAttribute('configure-tooltip-label') ?? '';
11203
11238
  }
11204
11239
 
11240
+ get authOnlyLabel() {
11241
+ return this.getAttribute('auth-only-label') || 'Authentication only';
11242
+ }
11243
+
11205
11244
  init() {
11206
11245
  super.init?.();
11207
11246
 
@@ -11323,6 +11362,10 @@ const MultiSsoClass = compose(
11323
11362
  selector: () => '.action',
11324
11363
  property: 'gap',
11325
11364
  },
11365
+ authTypeRowGap: {
11366
+ selector: () => '.auth-type-row',
11367
+ property: 'gap',
11368
+ },
11326
11369
  unconfiguredAuthTypeTextColor: {
11327
11370
  selector: () => '[not-configured]',
11328
11371
  property: TextClass.cssVarList.textColor,
@@ -11454,6 +11497,7 @@ const MultiSsoClass = compose(
11454
11497
  'not-configured-label',
11455
11498
  'delete-tooltip-label',
11456
11499
  'configure-tooltip-label',
11500
+ 'auth-only-label',
11457
11501
  ],
11458
11502
  }),
11459
11503
  componentNameValidationMixin$1,
@@ -11469,6 +11513,8 @@ const MultiSso = {
11469
11513
  [vars$P.headerListGap]: globalRefs$s.spacing.md,
11470
11514
  [vars$P.itemContentGap]: globalRefs$s.spacing.md,
11471
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,
11472
11518
  [vars$P.unconfiguredAuthTypeTextColor]: globalRefs$s.colors.surface.dark,
11473
11519
  [vars$P.unconfiguredAuthTypeTextFontStyle]: 'italic',
11474
11520
  [vars$P.buttonMaxWidth]: '50%',