@descope/flow-components 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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.21.0",
8
+ "buildVersion": "3.22.0",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.21.0",
8
+ "buildVersion": "3.22.0",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -89207,7 +89207,8 @@ function requireIndex_cjs () {
89207
89207
  const componentName$16 = getComponentName('recovery-codes');
89208
89208
 
89209
89209
  const NO_ACTION = 'none';
89210
- const DEFAULT_ERROR_MESSAGE = 'Please save your recovery codes to continue';
89210
+ const DEFAULT_ERROR_MESSAGE =
89211
+ 'Copy or download your recovery codes to continue.';
89211
89212
 
89212
89213
  // default button label per action (buttons variant). the icons variant uses the vaadin
89213
89214
  // glyphs hardcoded in the shadow-DOM template below; the buttons variant uses image srcs.
@@ -90613,7 +90614,11 @@ function requireIndex_cjs () {
90613
90614
  return { label: authType.toUpperCase(), configured: true };
90614
90615
  };
90615
90616
 
90616
- const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
90617
+ const itemRenderer$2 = (
90618
+ { id, name, isDefault, link, authType, authOnly },
90619
+ _,
90620
+ ref,
90621
+ ) => {
90617
90622
  const deleteAction =
90618
90623
  !isDefault && ref?.allowDelete
90619
90624
  ? `<span
@@ -90636,9 +90641,14 @@ function requireIndex_cjs () {
90636
90641
  : '';
90637
90642
 
90638
90643
  const { label: authTypeLabel, configured } = resolveAuthType(authType);
90644
+ // Sits next to the auth type because it says what the connection is FOR, the same kind of fact.
90645
+ const authOnlyBadge = authOnly
90646
+ ? `<descope-badge class="auth-only-badge" size="xs"><span class="auth-only-text"></span></descope-badge>`
90647
+ : '';
90639
90648
  const authTypeRow = configured
90640
90649
  ? `<div class="auth-type-row">
90641
90650
  <descope-badge class="auth-type-badge" size="xs"></descope-badge>
90651
+ ${authOnlyBadge}
90642
90652
  </div>`
90643
90653
  : `<div class="auth-type-row">
90644
90654
  <descope-text
@@ -90646,6 +90656,7 @@ function requireIndex_cjs () {
90646
90656
  variant="body2"
90647
90657
  mode="secondary"
90648
90658
  >${ref?.notConfiguredLabel}</descope-text>
90659
+ ${authOnlyBadge}
90649
90660
  </div>`;
90650
90661
 
90651
90662
  const template = document.createElement('template');
@@ -90690,6 +90701,9 @@ function requireIndex_cjs () {
90690
90701
 
90691
90702
  const authTypeBadge = template.content.querySelector('.auth-type-badge');
90692
90703
  if (authTypeBadge) authTypeBadge.textContent = authTypeLabel;
90704
+
90705
+ const authOnlyEl = template.content.querySelector('.auth-only-text');
90706
+ if (authOnlyEl) authOnlyEl.textContent = ref?.authOnlyLabel;
90693
90707
  return template;
90694
90708
  };
90695
90709
 
@@ -90814,6 +90828,28 @@ function requireIndex_cjs () {
90814
90828
  .auth-type-row {
90815
90829
  display: flex;
90816
90830
  align-items: center;
90831
+ min-width: 0;
90832
+ }
90833
+
90834
+ /* The auth type is short and fixed, so it keeps its size and the consumer-supplied label is
90835
+ the one that gives way. */
90836
+ .auth-type-badge {
90837
+ flex-shrink: 0;
90838
+ }
90839
+
90840
+ /* The label is consumer-supplied and localized, so it can be far longer than the row. It
90841
+ shrinks to whatever the row leaves it and ellipsises only then, rather than being held to a
90842
+ fixed width that would truncate it while space is still going spare. */
90843
+ .auth-only-badge {
90844
+ min-width: 0;
90845
+ flex-shrink: 1;
90846
+ }
90847
+
90848
+ .auth-only-text {
90849
+ display: block;
90850
+ overflow: hidden;
90851
+ text-overflow: ellipsis;
90852
+ white-space: nowrap;
90817
90853
  }
90818
90854
 
90819
90855
  .action {
@@ -90861,6 +90897,10 @@ function requireIndex_cjs () {
90861
90897
  return this.getAttribute('configure-tooltip-label') ?? '';
90862
90898
  }
90863
90899
 
90900
+ get authOnlyLabel() {
90901
+ return this.getAttribute('auth-only-label') || 'Authentication only';
90902
+ }
90903
+
90864
90904
  init() {
90865
90905
  super.init?.();
90866
90906
 
@@ -90982,6 +91022,10 @@ function requireIndex_cjs () {
90982
91022
  selector: () => '.action',
90983
91023
  property: 'gap',
90984
91024
  },
91025
+ authTypeRowGap: {
91026
+ selector: () => '.auth-type-row',
91027
+ property: 'gap',
91028
+ },
90985
91029
  unconfiguredAuthTypeTextColor: {
90986
91030
  selector: () => '[not-configured]',
90987
91031
  property: TextClass.cssVarList.textColor,
@@ -91113,6 +91157,7 @@ function requireIndex_cjs () {
91113
91157
  'not-configured-label',
91114
91158
  'delete-tooltip-label',
91115
91159
  'configure-tooltip-label',
91160
+ 'auth-only-label',
91116
91161
  ],
91117
91162
  }),
91118
91163
  componentNameValidationMixin$1,
@@ -91128,6 +91173,8 @@ function requireIndex_cjs () {
91128
91173
  [vars$P.headerListGap]: globalRefs$s.spacing.md,
91129
91174
  [vars$P.itemContentGap]: globalRefs$s.spacing.md,
91130
91175
  [vars$P.actionGap]: globalRefs$s.spacing.sm,
91176
+ // keeps the authentication-only badge off the auth-type badge beside it
91177
+ [vars$P.authTypeRowGap]: globalRefs$s.spacing.sm,
91131
91178
  [vars$P.unconfiguredAuthTypeTextColor]: globalRefs$s.colors.surface.dark,
91132
91179
  [vars$P.unconfiguredAuthTypeTextFontStyle]: 'italic',
91133
91180
  [vars$P.buttonMaxWidth]: '50%',
package/dist/index.d.ts CHANGED
@@ -844,6 +844,7 @@ type SsoConfiguration = {
844
844
  isDefault?: boolean;
845
845
  link?: string;
846
846
  authType?: string;
847
+ authOnly?: boolean;
847
848
  };
848
849
  type Props$n = {
849
850
  label?: string;
@@ -854,6 +855,7 @@ type Props$n = {
854
855
  'allow-configure'?: boolean;
855
856
  'delete-tooltip-label'?: string;
856
857
  'configure-tooltip-label'?: string;
858
+ 'auth-only-label'?: string;
857
859
  data?: SsoConfiguration[];
858
860
  'data-create-flow-id'?: string;
859
861
  'data-delete-flow-id'?: string;
@@ -6,6 +6,7 @@ type SsoConfiguration = {
6
6
  isDefault?: boolean;
7
7
  link?: string;
8
8
  authType?: string;
9
+ authOnly?: boolean;
9
10
  };
10
11
  type Props = {
11
12
  label?: string;
@@ -16,6 +17,7 @@ type Props = {
16
17
  'allow-configure'?: boolean;
17
18
  'delete-tooltip-label'?: string;
18
19
  'configure-tooltip-label'?: string;
20
+ 'auth-only-label'?: string;
19
21
  data?: SsoConfiguration[];
20
22
  'data-create-flow-id'?: string;
21
23
  'data-delete-flow-id'?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.21.0",
3
+ "version": "3.22.0",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,7 +98,7 @@
98
98
  "webpack-subresource-integrity": "5.2.0-rc.1"
99
99
  },
100
100
  "dependencies": {
101
- "@descope/web-components-ui": "3.21.0"
101
+ "@descope/web-components-ui": "3.22.0"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": ">= 18"