@oicl/openbridge-webcomponents 2.0.0-next.154 → 2.0.0-next.155

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.
@@ -93589,6 +93589,39 @@ const compentStyle$K = i$7`* {
93589
93589
  "ss04" on;
93590
93590
  }
93591
93591
 
93592
+ .wrapper.size-large .user-label {
93593
+ font-family: var(--global-typography-font-family);
93594
+ font-weight: var(--global-typography-ui-body-font-weight);
93595
+ font-size: var(--global-typography-ui-body-font-size);
93596
+ line-height: var(--global-typography-ui-body-line-height);
93597
+ font-feature-settings:
93598
+ "liga" off,
93599
+ "clig" off,
93600
+ "ss04" on;
93601
+ }
93602
+
93603
+ .wrapper.size-large .user-sublabel {
93604
+ font-family: var(--global-typography-font-family);
93605
+ font-weight: var(--global-typography-ui-body-font-weight);
93606
+ font-size: var(--global-typography-ui-body-font-size);
93607
+ line-height: var(--global-typography-ui-body-line-height);
93608
+ font-feature-settings:
93609
+ "liga" off,
93610
+ "clig" off,
93611
+ "ss04" on;
93612
+ }
93613
+
93614
+ .wrapper.size-large.has-sublabel .user-label {
93615
+ font-family: var(--global-typography-font-family);
93616
+ font-weight: var(--global-typography-ui-body-active-font-weight);
93617
+ font-size: var(--global-typography-ui-body-active-font-size);
93618
+ line-height: var(--global-typography-ui-body-active-line-height);
93619
+ font-feature-settings:
93620
+ "liga" off,
93621
+ "clig" off,
93622
+ "ss04" on;
93623
+ }
93624
+
93592
93625
  .wrapper.size-large.style-selected .user-initials {
93593
93626
  font-family: var(--global-typography-font-family);
93594
93627
  font-weight: var(--font-weight-bold);
@@ -93601,6 +93634,17 @@ const compentStyle$K = i$7`* {
93601
93634
  "ss04" on;
93602
93635
  }
93603
93636
 
93637
+ .wrapper.size-large.style-selected .user-label {
93638
+ font-family: var(--global-typography-font-family);
93639
+ font-weight: var(--global-typography-ui-body-active-font-weight);
93640
+ font-size: var(--global-typography-ui-body-active-font-size);
93641
+ line-height: var(--global-typography-ui-body-active-line-height);
93642
+ font-feature-settings:
93643
+ "liga" off,
93644
+ "clig" off,
93645
+ "ss04" on;
93646
+ }
93647
+
93604
93648
  .wrapper.size-large.state-static {
93605
93649
  width: var(--ui-components-user-button-visual-size-enhanced);
93606
93650
  height: var(--ui-components-user-button-visual-size-enhanced);
@@ -93622,7 +93666,30 @@ const compentStyle$K = i$7`* {
93622
93666
  color: var(--element-active-color);
93623
93667
  }
93624
93668
 
93625
- .wrapper:disabled .user-label {
93669
+ .wrapper .user-sublabel {
93670
+ font-family: var(--global-typography-font-family);
93671
+ font-weight: var(--global-typography-ui-label-font-weight);
93672
+ font-size: var(--global-typography-ui-label-font-size);
93673
+ line-height: var(--global-typography-ui-label-line-height);
93674
+ font-feature-settings:
93675
+ "liga" off,
93676
+ "clig" off,
93677
+ "ss04" on;
93678
+ color: var(--element-active-color);
93679
+ }
93680
+
93681
+ .wrapper.has-sublabel .user-label {
93682
+ font-family: var(--global-typography-font-family);
93683
+ font-weight: var(--global-typography-ui-label-active-font-weight);
93684
+ font-size: var(--global-typography-ui-label-active-font-size);
93685
+ line-height: var(--global-typography-ui-label-active-line-height);
93686
+ font-feature-settings:
93687
+ "liga" off,
93688
+ "clig" off,
93689
+ "ss04" on;
93690
+ }
93691
+
93692
+ .wrapper:disabled .user-label,.wrapper:disabled .user-sublabel {
93626
93693
  color: var(--element-disabled-color);
93627
93694
  }
93628
93695
 
@@ -94030,15 +94097,21 @@ let ObcUserButton = class extends i$4 {
94030
94097
  "mode-icon": this.shouldShowIcon,
94031
94098
  "mode-initials": !this.shouldShowIcon,
94032
94099
  "state-static": this.static,
94033
- [`size-${this.size}`]: true
94100
+ [`size-${this.size}`]: true,
94101
+ "has-sublabel": Boolean(this.sublabel) && !this.static
94034
94102
  };
94035
94103
  const tag = this.static ? i$2`div` : i$2`button`;
94104
+ const visibleText = [this.label, this.sublabel].filter(Boolean).join(", ");
94105
+ const accessibleName = !this.static && visibleText || this.initials || "User button";
94036
94106
  const label = this.label && !this.static ? u$2`<span class="user-label" part="label">${this.label}</span>` : A;
94107
+ const sublabel = this.sublabel && !this.static ? u$2`<span class="user-sublabel" part="sublabel">
94108
+ ${this.sublabel}
94109
+ </span>` : A;
94037
94110
  return u$2`
94038
94111
  <${tag}
94039
94112
  class=${e$1(wrapperClasses)}
94040
94113
  ?disabled=${this.disabled}
94041
- aria-label=${this.initials || "User button"}
94114
+ aria-label=${accessibleName}
94042
94115
  >
94043
94116
  <div class="content-container" part="content-container">
94044
94117
  <div class="user-button-circle">
@@ -94055,7 +94128,7 @@ let ObcUserButton = class extends i$4 {
94055
94128
  </span>
94056
94129
  `}
94057
94130
  </div>
94058
- ${label}
94131
+ ${label} ${sublabel}
94059
94132
  </div>
94060
94133
  </${tag}>
94061
94134
  `;
@@ -94083,6 +94156,9 @@ __decorateClass$uA([
94083
94156
  __decorateClass$uA([
94084
94157
  n$3({ type: String })
94085
94158
  ], ObcUserButton.prototype, "label", 2);
94159
+ __decorateClass$uA([
94160
+ n$3({ type: String })
94161
+ ], ObcUserButton.prototype, "sublabel", 2);
94086
94162
  ObcUserButton = __decorateClass$uA([
94087
94163
  customElement("obc-user-button")
94088
94164
  ], ObcUserButton);
@@ -124172,6 +124248,21 @@ const componentStyle$l = i$7`* {
124172
124248
  color: var(--element-neutral-color);
124173
124249
  }
124174
124250
 
124251
+ :is(.card .user-profile) obc-user-button:not(.has-role)::part(label) {
124252
+ font-weight: var(--font-weight-regular);
124253
+ }
124254
+
124255
+ :is(.card .user-profile) obc-user-button::part(sublabel) {
124256
+ font-family: var(--global-typography-font-family);
124257
+ font-weight: var(--global-typography-ui-body-font-weight);
124258
+ font-size: var(--global-typography-ui-body-font-size);
124259
+ line-height: var(--global-typography-ui-body-line-height);
124260
+ font-feature-settings:
124261
+ "liga" off,
124262
+ "clig" off,
124263
+ "ss04" on;
124264
+ }
124265
+
124175
124266
  .card .user-primary {
124176
124267
  padding: 0;
124177
124268
  }
@@ -124263,6 +124354,7 @@ let ObcUserMenu = class extends i$4 {
124263
124354
  this.passwordError = "";
124264
124355
  this.recentUsers = [];
124265
124356
  this.signedInActions = [];
124357
+ this.showUseAnotherAccount = true;
124266
124358
  }
124267
124359
  get showRecentUsers() {
124268
124360
  return this.hasRecentlySignedIn && this.recentUsers.length > 0;
@@ -124303,6 +124395,7 @@ let ObcUserMenu = class extends i$4 {
124303
124395
  .size=${size}
124304
124396
  .initials=${user.initials}
124305
124397
  .label=${user.label}
124398
+ .sublabel=${isLarge ? user.role : void 0}
124306
124399
  @click=${() => this.handleRecentUserClick(user)}
124307
124400
  ></obc-user-button>
124308
124401
  `
@@ -124315,6 +124408,7 @@ let ObcUserMenu = class extends i$4 {
124315
124408
  return A;
124316
124409
  }
124317
124410
  const userButtonSize = size === "large" ? Size.large : Size.regular;
124411
+ const role = size === "large" ? this.userRole : void 0;
124318
124412
  return b`
124319
124413
  <div
124320
124414
  class=${e$1({
@@ -124325,13 +124419,15 @@ let ObcUserMenu = class extends i$4 {
124325
124419
  <obc-user-button
124326
124420
  class=${e$1({
124327
124421
  "user-avatar": true,
124328
- [`size-${size}`]: true
124422
+ [`size-${size}`]: true,
124423
+ "has-role": Boolean(role)
124329
124424
  })}
124330
124425
  .variant=${Variant.initials}
124331
124426
  .styleType=${StyleType.normal}
124332
124427
  .size=${userButtonSize}
124333
124428
  .initials=${this.userInitials ?? ""}
124334
124429
  .label=${this.userLabel ?? ""}
124430
+ .sublabel=${role}
124335
124431
  ></obc-user-button>
124336
124432
  </div>
124337
124433
  `;
@@ -124363,7 +124459,7 @@ let ObcUserMenu = class extends i$4 {
124363
124459
  handleRecentUserClick(user) {
124364
124460
  this.dispatchEvent(
124365
124461
  new CustomEvent("recent-user-click", {
124366
- detail: { initials: user.initials, label: user.label }
124462
+ detail: { ...user }
124367
124463
  })
124368
124464
  );
124369
124465
  }
@@ -124411,6 +124507,9 @@ let ObcUserMenu = class extends i$4 {
124411
124507
  handleSignOutClick() {
124412
124508
  this.dispatchEvent(new CustomEvent("sign-out-click"));
124413
124509
  }
124510
+ handleUseAnotherAccountClick() {
124511
+ this.dispatchEvent(new CustomEvent("use-another-account-click"));
124512
+ }
124414
124513
  renderSignIn() {
124415
124514
  return b`
124416
124515
  <div class="title-container">
@@ -124531,6 +124630,15 @@ let ObcUserMenu = class extends i$4 {
124531
124630
  >
124532
124631
  ${msg("Sign in")}
124533
124632
  </obc-button>
124633
+ ${this.showUseAnotherAccount ? b`
124634
+ <obc-button
124635
+ variant=${ButtonVariant.normal}
124636
+ fullWidth
124637
+ @click=${this.handleUseAnotherAccountClick}
124638
+ >
124639
+ ${msg("Use another account")}
124640
+ </obc-button>
124641
+ ` : A}
124534
124642
  </div>
124535
124643
  </div>
124536
124644
  ${this.showRecentUsers ? b`
@@ -124573,6 +124681,15 @@ let ObcUserMenu = class extends i$4 {
124573
124681
  >
124574
124682
  ${msg("Sign in")}
124575
124683
  </obc-button>
124684
+ ${this.showUseAnotherAccount ? b`
124685
+ <obc-button
124686
+ variant=${ButtonVariant.normal}
124687
+ fullWidth
124688
+ @click=${this.handleUseAnotherAccountClick}
124689
+ >
124690
+ ${msg("Use another account")}
124691
+ </obc-button>
124692
+ ` : A}
124576
124693
  </div>
124577
124694
  ${this.showRecentUsers ? b`
124578
124695
  <div class="divider" aria-hidden="true"></div>
@@ -124751,6 +124868,9 @@ __decorateClass$sQ([
124751
124868
  __decorateClass$sQ([
124752
124869
  n$3({ type: String })
124753
124870
  ], ObcUserMenu.prototype, "userLabel", 2);
124871
+ __decorateClass$sQ([
124872
+ n$3({ type: String })
124873
+ ], ObcUserMenu.prototype, "userRole", 2);
124754
124874
  __decorateClass$sQ([
124755
124875
  n$3({ type: Array, attribute: false })
124756
124876
  ], ObcUserMenu.prototype, "recentUsers", 2);
@@ -124760,6 +124880,9 @@ __decorateClass$sQ([
124760
124880
  __decorateClass$sQ([
124761
124881
  n$3({ type: String })
124762
124882
  ], ObcUserMenu.prototype, "primaryActionId", 2);
124883
+ __decorateClass$sQ([
124884
+ n$3({ type: Boolean, attribute: false })
124885
+ ], ObcUserMenu.prototype, "showUseAnotherAccount", 2);
124763
124886
  ObcUserMenu = __decorateClass$sQ([
124764
124887
  customElement("obc-user-menu"),
124765
124888
  localized()