PageSourceSearch

https://www.principal.com/profiles/contrib/houston/modules/pfg_pds…/5.22.1/es/global-header-user-menu-label.js

js principal.com collected 2026-09-24 08:41:41 UTC 2,529 bytes, 65 lines download raw bytes

1import { nothing as m, html as d } from "lit";
2import { property as r } from "lit/decorators.js";
3import { pdsCustomElement as f } from "./pds-custom-element.js";
4import { P as h } from "./PdsElement.BuTF7VEW.js";
5import { required as u } from "./required.js";
6import "./user-avatar.js";
7const c = "*,::slotted(*),*:before,*:after{box-sizing:border-box}:host{display:block}.pds-c-global-header-user-menu-label{font-weight:var(--pds-semantic-type-label-default-font-weight);font-size:var(--pds-semantic-type-label-default-font-size);line-height:var(--pds-semantic-type-label-default-line-height);font-family:var(--pds-semantic-type-label-default-font-family);letter-spacing:var(--pds-semantic-type-label-default-letter-spacing);text-transform:var(--pds-semantic-type-label-default-text-transform);display:inline-flex;align-items:center;justify-content:start;white-space:nowrap}.pds-c-global-header-user-menu-label pds-user-avatar{margin-right:calc(var(--pds-base-unit) * 1)}.pds-c-global-header-user-menu-label--hide-name pds-user-avatar{margin-right:0}";
8var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (p, s, i, l) => {
9  for (var e = l > 1 ? void 0 : l ? g(s, i) : s, n = p.length - 1, o; n >= 0; n--)
10    (o = p[n]) && (e = (l ? o(s, i, e) : o(e)) || e);
11  return l && e && b(s, i, e), e;
12};
13let t = class extends h {
14  constructor() {
15    super(...arguments), this.notifications = !1, this.hideName = !1;
16  }
17  /**
18   * @internal
19   */
20  get classNames() {
21    return {
22      "hide-name": !!this.hideName
23    };
24  }
25  render() {
26    return d`<span class=${this.getClass()}>
27      <pds-user-avatar
28        initials=${this.initials}
29        hasNotifications=${this.notifications ? "true" : m}
30        aria-label="${this.fullName} ${this.translateText("user-menu")}"
31        ><slot
32          name="user-image"
33          slot="media"
34          allowed-elements="img, svg, slot, span"
35          @slotchange=${this.handleSlotValidation}
36        ></slot
37      ></pds-user-avatar>
38      ${this.hideName ? m : d`<span>${this.fullName}</span>`}
39    </span>`;
40  }
41};
42a([
43  r()
44], t.prototype, "fullName", 2);
45a([
46  u,
47  r()
48], t.prototype, "initials", 2);
49a([
50  r({ type: Boolean })
51], t.prototype, "notifications", 2);
52a([
53  r({ type: Boolean })
54], t.prototype, "hideName", 2);
55t = a([
56  f("pds-global-header-user-menu-label", {
57    category: "component",
58    type: "component",
59    styles: c
60  })
61], t);
62export {
63  t as PdsGlobalHeaderUserMenuLabel
64};
65//# sourceMappingURL=global-header-user-menu-label.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.