@carbon-labs/wc-global-header 0.15.0 → 0.16.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.
@@ -379,10 +379,10 @@ const Rc = (s, t) => {
379
379
  let c, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = So;
380
380
  for (let u = 0; u < o; u++) {
381
381
  const l = s[u];
382
- let p, v, h = -1, g = 0;
383
- for (; g < l.length && (n.lastIndex = g, v = n.exec(l), v !== null); ) g = n.lastIndex, n === So ? v[1] === "!--" ? n = de : v[1] !== void 0 ? n = ae : v[2] !== void 0 ? (Ve.test(v[2]) && (c = RegExp("</" + v[2], "g")), n = Kt) : v[3] !== void 0 && (n = Kt) : n === Kt ? v[0] === ">" ? (n = c ?? So, h = -1) : v[1] === void 0 ? h = -2 : (h = n.lastIndex - v[2].length, p = v[1], n = v[3] === void 0 ? Kt : v[3] === '"' ? le : ue) : n === le || n === ue ? n = Kt : n === de || n === ae ? n = So : (n = Kt, c = void 0);
384
- const b = n === Kt && s[u + 1].startsWith("/>") ? " " : "";
385
- r += n === So ? l + Ec : h >= 0 ? (e.push(p), l.slice(0, h) + De + l.slice(h) + Bt + b) : l + Bt + (h === -2 ? u : b);
382
+ let p, v, h = -1, b = 0;
383
+ for (; b < l.length && (n.lastIndex = b, v = n.exec(l), v !== null); ) b = n.lastIndex, n === So ? v[1] === "!--" ? n = de : v[1] !== void 0 ? n = ae : v[2] !== void 0 ? (Ve.test(v[2]) && (c = RegExp("</" + v[2], "g")), n = Kt) : v[3] !== void 0 && (n = Kt) : n === Kt ? v[0] === ">" ? (n = c ?? So, h = -1) : v[1] === void 0 ? h = -2 : (h = n.lastIndex - v[2].length, p = v[1], n = v[3] === void 0 ? Kt : v[3] === '"' ? le : ue) : n === le || n === ue ? n = Kt : n === de || n === ae ? n = So : (n = Kt, c = void 0);
384
+ const g = n === Kt && s[u + 1].startsWith("/>") ? " " : "";
385
+ r += n === So ? l + Ec : h >= 0 ? (e.push(p), l.slice(0, h) + De + l.slice(h) + Bt + g) : l + Bt + (h === -2 ? u : g);
386
386
  }
387
387
  return [je(s, r + (s[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), e];
388
388
  };
@@ -399,15 +399,15 @@ let $s = class Ue {
399
399
  for (; (c = so.nextNode()) !== null && l.length < u; ) {
400
400
  if (c.nodeType === 1) {
401
401
  if (c.hasAttributes()) for (const h of c.getAttributeNames()) if (h.endsWith(De)) {
402
- const g = v[n++], b = c.getAttribute(h).split(Bt), f = /([.?@])?(.*)/.exec(g);
403
- l.push({ type: 1, index: r, name: f[2], strings: b, ctor: f[1] === "." ? Lc : f[1] === "?" ? Nc : f[1] === "@" ? Hc : us }), c.removeAttribute(h);
402
+ const b = v[n++], g = c.getAttribute(h).split(Bt), f = /([.?@])?(.*)/.exec(b);
403
+ l.push({ type: 1, index: r, name: f[2], strings: g, ctor: f[1] === "." ? Lc : f[1] === "?" ? Nc : f[1] === "@" ? Hc : us }), c.removeAttribute(h);
404
404
  } else h.startsWith(Bt) && (l.push({ type: 6, index: r }), c.removeAttribute(h));
405
405
  if (Ve.test(c.tagName)) {
406
- const h = c.textContent.split(Bt), g = h.length - 1;
407
- if (g > 0) {
406
+ const h = c.textContent.split(Bt), b = h.length - 1;
407
+ if (b > 0) {
408
408
  c.textContent = Go ? Go.emptyScript : "";
409
- for (let b = 0; b < g; b++) c.append(h[b], Eo()), so.nextNode(), l.push({ type: 2, index: ++r });
410
- c.append(h[g], Eo());
409
+ for (let g = 0; g < b; g++) c.append(h[g], Eo()), so.nextNode(), l.push({ type: 2, index: ++r });
410
+ c.append(h[b], Eo());
411
411
  }
412
412
  }
413
413
  } else if (c.nodeType === 8) if (c.data === qe) l.push({ type: 2, index: r });
@@ -906,7 +906,7 @@ let R = class extends uo(at(y)) {
906
906
  }
907
907
  render() {
908
908
  var t, o, e;
909
- const { autofocus: c, buttonClassName: r, dangerDescription: n, disabled: u, download: l, href: p, hreflang: v, kind: h, isExpressive: g, isSelected: b, linkRole: f, openTooltip: x, ping: C, rel: $, size: S, tabIndex: M, target: L, tooltipAlignment: O, tooltipPosition: z, tooltipText: I, type: k, _hasIcon: P, hasMainContent: D, _handleSlotChange: q } = this;
909
+ const { autofocus: c, buttonClassName: r, dangerDescription: n, disabled: u, download: l, href: p, hreflang: v, kind: h, isExpressive: b, isSelected: g, linkRole: f, openTooltip: x, ping: C, rel: $, size: S, tabIndex: M, target: L, tooltipAlignment: O, tooltipPosition: z, tooltipText: I, type: k, _hasIcon: P, hasMainContent: D, _handleSlotChange: q } = this;
910
910
  let V = {
911
911
  [`${i}--btn`]: !0,
912
912
  [`${i}--btn--${h}`]: h,
@@ -917,8 +917,8 @@ let R = class extends uo(at(y)) {
917
917
  [`${i}--btn--${S}`]: S,
918
918
  [`${i}--layout--size-${S}`]: S,
919
919
  [`${i}-ce--btn--has-icon`]: P,
920
- [`${i}--btn--expressive`]: g,
921
- [`${i}--btn--selected`]: b && h === "ghost"
920
+ [`${i}--btn--expressive`]: b,
921
+ [`${i}--btn--selected`]: g && h === "ghost"
922
922
  };
923
923
  if (r) {
924
924
  const X = {};
@@ -2231,48 +2231,48 @@ function ye(s, t, o) {
2231
2231
  reference: e,
2232
2232
  floating: c
2233
2233
  } = s;
2234
- const r = qt(t), n = Ws(t), u = Zs(n), l = io(t), p = r === "y", v = e.x + e.width / 2 - c.width / 2, h = e.y + e.height / 2 - c.height / 2, g = e[u] / 2 - c[u] / 2;
2235
- let b;
2234
+ const r = qt(t), n = Ws(t), u = Zs(n), l = io(t), p = r === "y", v = e.x + e.width / 2 - c.width / 2, h = e.y + e.height / 2 - c.height / 2, b = e[u] / 2 - c[u] / 2;
2235
+ let g;
2236
2236
  switch (l) {
2237
2237
  case "top":
2238
- b = {
2238
+ g = {
2239
2239
  x: v,
2240
2240
  y: e.y - c.height
2241
2241
  };
2242
2242
  break;
2243
2243
  case "bottom":
2244
- b = {
2244
+ g = {
2245
2245
  x: v,
2246
2246
  y: e.y + e.height
2247
2247
  };
2248
2248
  break;
2249
2249
  case "right":
2250
- b = {
2250
+ g = {
2251
2251
  x: e.x + e.width,
2252
2252
  y: h
2253
2253
  };
2254
2254
  break;
2255
2255
  case "left":
2256
- b = {
2256
+ g = {
2257
2257
  x: e.x - c.width,
2258
2258
  y: h
2259
2259
  };
2260
2260
  break;
2261
2261
  default:
2262
- b = {
2262
+ g = {
2263
2263
  x: e.x,
2264
2264
  y: e.y
2265
2265
  };
2266
2266
  }
2267
2267
  switch (wo(t)) {
2268
2268
  case "start":
2269
- b[n] -= g * (o && p ? -1 : 1);
2269
+ g[n] -= b * (o && p ? -1 : 1);
2270
2270
  break;
2271
2271
  case "end":
2272
- b[n] += g * (o && p ? -1 : 1);
2272
+ g[n] += b * (o && p ? -1 : 1);
2273
2273
  break;
2274
2274
  }
2275
- return b;
2275
+ return g;
2276
2276
  }
2277
2277
  const mr = async (s, t, o) => {
2278
2278
  const {
@@ -2288,7 +2288,7 @@ const mr = async (s, t, o) => {
2288
2288
  }), {
2289
2289
  x: v,
2290
2290
  y: h
2291
- } = ye(p, e, l), g = e, b = {}, f = 0;
2291
+ } = ye(p, e, l), b = e, g = {}, f = 0;
2292
2292
  for (let x = 0; x < u.length; x++) {
2293
2293
  const {
2294
2294
  name: C,
@@ -2302,9 +2302,9 @@ const mr = async (s, t, o) => {
2302
2302
  x: v,
2303
2303
  y: h,
2304
2304
  initialPlacement: e,
2305
- placement: g,
2305
+ placement: b,
2306
2306
  strategy: c,
2307
- middlewareData: b,
2307
+ middlewareData: g,
2308
2308
  rects: p,
2309
2309
  platform: n,
2310
2310
  elements: {
@@ -2312,27 +2312,27 @@ const mr = async (s, t, o) => {
2312
2312
  floating: t
2313
2313
  }
2314
2314
  });
2315
- v = S ?? v, h = M ?? h, b = {
2316
- ...b,
2315
+ v = S ?? v, h = M ?? h, g = {
2316
+ ...g,
2317
2317
  [C]: {
2318
- ...b[C],
2318
+ ...g[C],
2319
2319
  ...L
2320
2320
  }
2321
- }, O && f <= 50 && (f++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (p = O.rects === !0 ? await n.getElementRects({
2321
+ }, O && f <= 50 && (f++, typeof O == "object" && (O.placement && (b = O.placement), O.rects && (p = O.rects === !0 ? await n.getElementRects({
2322
2322
  reference: s,
2323
2323
  floating: t,
2324
2324
  strategy: c
2325
2325
  }) : O.rects), {
2326
2326
  x: v,
2327
2327
  y: h
2328
- } = ye(p, g, l)), x = -1);
2328
+ } = ye(p, b, l)), x = -1);
2329
2329
  }
2330
2330
  return {
2331
2331
  x: v,
2332
2332
  y: h,
2333
- placement: g,
2333
+ placement: b,
2334
2334
  strategy: c,
2335
- middlewareData: b
2335
+ middlewareData: g
2336
2336
  };
2337
2337
  };
2338
2338
  async function tc(s, t) {
@@ -2349,9 +2349,9 @@ async function tc(s, t) {
2349
2349
  boundary: p = "clippingAncestors",
2350
2350
  rootBoundary: v = "viewport",
2351
2351
  elementContext: h = "floating",
2352
- altBoundary: g = !1,
2353
- padding: b = 0
2354
- } = Vo(t, s), f = Je(b), C = u[g ? h === "floating" ? "reference" : "floating" : h], $ = es(await r.getClippingRect({
2352
+ altBoundary: b = !1,
2353
+ padding: g = 0
2354
+ } = Vo(t, s), f = Je(g), C = u[b ? h === "floating" ? "reference" : "floating" : h], $ = es(await r.getClippingRect({
2355
2355
  element: (o = await (r.isElement == null ? void 0 : r.isElement(C))) == null || o ? C : C.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
2356
2356
  boundary: p,
2357
2357
  rootBoundary: v,
@@ -2398,17 +2398,17 @@ const vr = (s) => ({
2398
2398
  } = Vo(s, t) || {};
2399
2399
  if (p == null)
2400
2400
  return {};
2401
- const h = Je(v), g = {
2401
+ const h = Je(v), b = {
2402
2402
  x: o,
2403
2403
  y: e
2404
- }, b = Ws(c), f = Zs(b), x = await n.getDimensions(p), C = b === "y", $ = C ? "top" : "left", S = C ? "bottom" : "right", M = C ? "clientHeight" : "clientWidth", L = r.reference[f] + r.reference[b] - g[b] - r.floating[f], O = g[b] - r.reference[b], z = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(p));
2404
+ }, g = Ws(c), f = Zs(g), x = await n.getDimensions(p), C = g === "y", $ = C ? "top" : "left", S = C ? "bottom" : "right", M = C ? "clientHeight" : "clientWidth", L = r.reference[f] + r.reference[g] - b[g] - r.floating[f], O = b[g] - r.reference[g], z = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(p));
2405
2405
  let I = z ? z[M] : 0;
2406
2406
  (!I || !await (n.isElement == null ? void 0 : n.isElement(z))) && (I = u.floating[M] || r.floating[f]);
2407
2407
  const k = L / 2 - O / 2, P = I / 2 - x[f] / 2 - 1, D = Ft(h[$], P), q = Ft(h[S], P), V = D, K = I - x[f] - q, F = I / 2 - x[f] / 2 + k, et = er(V, F, K), J = !l.arrow && wo(c) != null && F !== et && r.reference[f] / 2 - (F < V ? D : q) - x[f] / 2 < 0, X = J ? F < V ? F - V : F - K : 0;
2408
2408
  return {
2409
- [b]: g[b] + X,
2409
+ [g]: b[g] + X,
2410
2410
  data: {
2411
- [b]: et,
2411
+ [g]: et,
2412
2412
  centerOffset: F - et - X,
2413
2413
  ...J && {
2414
2414
  alignmentOffset: X
@@ -2433,16 +2433,16 @@ const vr = (s) => ({
2433
2433
  } = t, {
2434
2434
  mainAxis: v = !0,
2435
2435
  crossAxis: h = !0,
2436
- fallbackPlacements: g,
2437
- fallbackStrategy: b = "bestFit",
2436
+ fallbackPlacements: b,
2437
+ fallbackStrategy: g = "bestFit",
2438
2438
  fallbackAxisSideDirection: f = "none",
2439
2439
  flipAlignment: x = !0,
2440
2440
  ...C
2441
2441
  } = Vo(s, t);
2442
2442
  if ((o = r.arrow) != null && o.alignmentOffset)
2443
2443
  return {};
2444
- const $ = io(c), S = qt(u), M = io(u) === u, L = await (l.isRTL == null ? void 0 : l.isRTL(p.floating)), O = g || (M || !x ? [ss(u)] : ir(u)), z = f !== "none";
2445
- !g && z && O.push(...lr(u, x, f, L));
2444
+ const $ = io(c), S = qt(u), M = io(u) === u, L = await (l.isRTL == null ? void 0 : l.isRTL(p.floating)), O = b || (M || !x ? [ss(u)] : ir(u)), z = f !== "none";
2445
+ !b && z && O.push(...lr(u, x, f, L));
2446
2446
  const I = [u, ...O], k = await tc(t, C), P = [];
2447
2447
  let D = ((e = r.flip) == null ? void 0 : e.overflows) || [];
2448
2448
  if (v && P.push(k[$]), h) {
@@ -2469,7 +2469,7 @@ const vr = (s) => ({
2469
2469
  };
2470
2470
  let J = (V = D.filter((X) => X.overflows[0] <= 0).sort((X, tt) => X.overflows[1] - tt.overflows[1])[0]) == null ? void 0 : V.placement;
2471
2471
  if (!J)
2472
- switch (b) {
2472
+ switch (g) {
2473
2473
  case "bestFit": {
2474
2474
  var K;
2475
2475
  const X = (K = D.filter((tt) => {
@@ -2506,8 +2506,8 @@ async function br(s, t) {
2506
2506
  elements: c
2507
2507
  } = s, r = await (e.isRTL == null ? void 0 : e.isRTL(c.floating)), n = io(o), u = wo(o), l = qt(o) === "y", p = gr.has(n) ? -1 : 1, v = r && l ? -1 : 1, h = Vo(t, s);
2508
2508
  let {
2509
- mainAxis: g,
2510
- crossAxis: b,
2509
+ mainAxis: b,
2510
+ crossAxis: g,
2511
2511
  alignmentAxis: f
2512
2512
  } = typeof h == "number" ? {
2513
2513
  mainAxis: h,
@@ -2518,12 +2518,12 @@ async function br(s, t) {
2518
2518
  crossAxis: h.crossAxis || 0,
2519
2519
  alignmentAxis: h.alignmentAxis
2520
2520
  };
2521
- return u && typeof f == "number" && (b = u === "end" ? f * -1 : f), l ? {
2522
- x: b * v,
2523
- y: g * p
2521
+ return u && typeof f == "number" && (g = u === "end" ? f * -1 : f), l ? {
2522
+ x: g * v,
2523
+ y: b * p
2524
2524
  } : {
2525
- x: g * p,
2526
- y: b * v
2525
+ x: b * p,
2526
+ y: g * v
2527
2527
  };
2528
2528
  }
2529
2529
  const fr = function(s) {
@@ -2563,17 +2563,17 @@ const fr = function(s) {
2563
2563
  apply: l = () => {
2564
2564
  },
2565
2565
  ...p
2566
- } = Vo(s, t), v = await tc(t, p), h = io(c), g = wo(c), b = qt(c) === "y", {
2566
+ } = Vo(s, t), v = await tc(t, p), h = io(c), b = wo(c), g = qt(c) === "y", {
2567
2567
  width: f,
2568
2568
  height: x
2569
2569
  } = r.floating;
2570
2570
  let C, $;
2571
- h === "top" || h === "bottom" ? (C = h, $ = g === (await (n.isRTL == null ? void 0 : n.isRTL(u.floating)) ? "start" : "end") ? "left" : "right") : ($ = h, C = g === "end" ? "top" : "bottom");
2571
+ h === "top" || h === "bottom" ? (C = h, $ = b === (await (n.isRTL == null ? void 0 : n.isRTL(u.floating)) ? "start" : "end") ? "left" : "right") : ($ = h, C = b === "end" ? "top" : "bottom");
2572
2572
  const S = x - v.top - v.bottom, M = f - v.left - v.right, L = Ft(x - v[C], S), O = Ft(f - v[$], M), z = !t.middlewareData.shift;
2573
2573
  let I = L, k = O;
2574
- if ((o = t.middlewareData.shift) != null && o.enabled.x && (k = M), (e = t.middlewareData.shift) != null && e.enabled.y && (I = S), z && !g) {
2574
+ if ((o = t.middlewareData.shift) != null && o.enabled.x && (k = M), (e = t.middlewareData.shift) != null && e.enabled.y && (I = S), z && !b) {
2575
2575
  const D = nt(v.left, 0), q = nt(v.right, 0), V = nt(v.top, 0), K = nt(v.bottom, 0);
2576
- b ? k = f - 2 * (D !== 0 || q !== 0 ? D + q : nt(v.left, v.right)) : I = x - 2 * (V !== 0 || K !== 0 ? V + K : nt(v.top, v.bottom));
2576
+ g ? k = f - 2 * (D !== 0 || q !== 0 ? D + q : nt(v.left, v.right)) : I = x - 2 * (V !== 0 || K !== 0 ? V + K : nt(v.top, v.bottom));
2577
2577
  }
2578
2578
  await l({
2579
2579
  ...t,
@@ -2750,9 +2750,9 @@ function ao(s, t, o, e) {
2750
2750
  const u = Ir(r, o, e) ? cc(r) : St(0);
2751
2751
  let l = (c.left + u.x) / n.x, p = (c.top + u.y) / n.y, v = c.width / n.x, h = c.height / n.y;
2752
2752
  if (r) {
2753
- const g = it(r), b = e && xt(e) ? it(e) : e;
2754
- let f = g, x = Rs(f);
2755
- for (; x && e && b !== f; ) {
2753
+ const b = it(r), g = e && xt(e) ? it(e) : e;
2754
+ let f = b, x = Rs(f);
2755
+ for (; x && e && g !== f; ) {
2756
2756
  const C = fo(x), $ = x.getBoundingClientRect(), S = kt(x), M = $.left + (x.clientLeft + parseFloat(S.paddingLeft)) * C.x, L = $.top + (x.clientTop + parseFloat(S.paddingTop)) * C.y;
2757
2757
  l *= C.x, p *= C.y, v *= C.x, h *= C.y, l += M, p += L, f = it(x), x = Rs(f);
2758
2758
  }
@@ -2791,15 +2791,15 @@ function Or(s) {
2791
2791
  }, p = St(1);
2792
2792
  const v = St(0), h = Mt(e);
2793
2793
  if ((h || !h && !r) && ((Co(e) !== "body" || Fo(n)) && (l = vs(e)), Mt(e))) {
2794
- const b = ao(e);
2795
- p = fo(e), v.x = b.x + e.clientLeft, v.y = b.y + e.clientTop;
2794
+ const g = ao(e);
2795
+ p = fo(e), v.x = g.x + e.clientLeft, v.y = g.y + e.clientTop;
2796
2796
  }
2797
- const g = n && !h && !r ? rc(n, l) : St(0);
2797
+ const b = n && !h && !r ? rc(n, l) : St(0);
2798
2798
  return {
2799
2799
  width: o.width * p.x,
2800
2800
  height: o.height * p.y,
2801
- x: o.x * p.x - l.scrollLeft * p.x + v.x + g.x,
2802
- y: o.y * p.y - l.scrollTop * p.y + v.y + g.y
2801
+ x: o.x * p.x - l.scrollLeft * p.x + v.x + b.x,
2802
+ y: o.y * p.y - l.scrollTop * p.y + v.y + b.y
2803
2803
  };
2804
2804
  }
2805
2805
  function Er(s) {
@@ -2827,7 +2827,7 @@ function Rr(s, t) {
2827
2827
  }
2828
2828
  const p = hs(e);
2829
2829
  if (p <= 0) {
2830
- const v = e.ownerDocument, h = v.body, g = getComputedStyle(h), b = v.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, f = Math.abs(e.clientWidth - h.clientWidth - b);
2830
+ const v = e.ownerDocument, h = v.body, b = getComputedStyle(h), g = v.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, f = Math.abs(e.clientWidth - h.clientWidth - g);
2831
2831
  f <= xe && (r -= f);
2832
2832
  } else p <= xe && (r += p);
2833
2833
  return {
@@ -2923,14 +2923,14 @@ function Dr(s, t, o) {
2923
2923
  }
2924
2924
  if (e || !e && !r)
2925
2925
  if ((Co(t) !== "body" || Fo(c)) && (u = vs(t)), e) {
2926
- const b = ao(t, !0, r, t);
2927
- l.x = b.x + t.clientLeft, l.y = b.y + t.clientTop;
2926
+ const g = ao(t, !0, r, t);
2927
+ l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
2928
2928
  } else c && p();
2929
2929
  r && !e && c && p();
2930
- const v = c && !e && !r ? rc(c, u) : St(0), h = n.left + u.scrollLeft - l.x - v.x, g = n.top + u.scrollTop - l.y - v.y;
2930
+ const v = c && !e && !r ? rc(c, u) : St(0), h = n.left + u.scrollLeft - l.x - v.x, b = n.top + u.scrollTop - l.y - v.y;
2931
2931
  return {
2932
2932
  x: h,
2933
- y: g,
2933
+ y: b,
2934
2934
  width: n.width,
2935
2935
  height: n.height
2936
2936
  };
@@ -3006,12 +3006,12 @@ function jr(s, t) {
3006
3006
  const p = s.getBoundingClientRect(), {
3007
3007
  left: v,
3008
3008
  top: h,
3009
- width: g,
3010
- height: b
3009
+ width: b,
3010
+ height: g
3011
3011
  } = p;
3012
- if (u || t(), !g || !b)
3012
+ if (u || t(), !b || !g)
3013
3013
  return;
3014
- const f = Xo(h), x = Xo(c.clientWidth - (v + g)), C = Xo(c.clientHeight - (h + b)), $ = Xo(v), M = {
3014
+ const f = Xo(h), x = Xo(c.clientWidth - (v + b)), C = Xo(c.clientHeight - (h + g)), $ = Xo(v), M = {
3015
3015
  rootMargin: -f + "px " + -x + "px " + -C + "px " + -$ + "px",
3016
3016
  threshold: nt(0, Ft(1, l)) || 1
3017
3017
  };
@@ -3055,14 +3055,14 @@ function Ur(s, t, o, e) {
3055
3055
  }), r && $.addEventListener("resize", o);
3056
3056
  });
3057
3057
  const h = p && u ? jr(p, o) : null;
3058
- let g = -1, b = null;
3059
- n && (b = new ResizeObserver(($) => {
3058
+ let b = -1, g = null;
3059
+ n && (g = new ResizeObserver(($) => {
3060
3060
  let [S] = $;
3061
- S && S.target === p && b && (b.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
3061
+ S && S.target === p && g && (g.unobserve(t), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
3062
3062
  var M;
3063
- (M = b) == null || M.observe(t);
3063
+ (M = g) == null || M.observe(t);
3064
3064
  })), o();
3065
- }), p && !l && b.observe(p), b.observe(t));
3065
+ }), p && !l && g.observe(p), g.observe(t));
3066
3066
  let f, x = l ? ao(s) : null;
3067
3067
  l && C();
3068
3068
  function C() {
@@ -3073,7 +3073,7 @@ function Ur(s, t, o, e) {
3073
3073
  var $;
3074
3074
  v.forEach((S) => {
3075
3075
  c && S.removeEventListener("scroll", o), r && S.removeEventListener("resize", o);
3076
- }), h == null || h(), ($ = b) == null || $.disconnect(), b = null, l && cancelAnimationFrame(f);
3076
+ }), h == null || h(), ($ = g) == null || $.disconnect(), g = null, l && cancelAnimationFrame(f);
3077
3077
  };
3078
3078
  }
3079
3079
  const Xr = fr, Zr = hr, we = yr, Wr = vr, Yr = (s, t, o) => {
@@ -3109,41 +3109,41 @@ class Gr {
3109
3109
  const { arrowElement: o, alignment: e, caret: c, trigger: r, target: n, styleElement: u, matchWidth: l, open: p, flipArguments: v } = this.options, h = u ?? n;
3110
3110
  if (!h)
3111
3111
  return;
3112
- let g;
3112
+ let b;
3113
3113
  switch (e) {
3114
3114
  case "top-left":
3115
- g = "top-start";
3115
+ b = "top-start";
3116
3116
  break;
3117
3117
  case "top-right":
3118
- g = "top-end";
3118
+ b = "top-end";
3119
3119
  break;
3120
3120
  case "bottom-left":
3121
- g = "bottom-start";
3121
+ b = "bottom-start";
3122
3122
  break;
3123
3123
  case "bottom-right":
3124
- g = "bottom-end";
3124
+ b = "bottom-end";
3125
3125
  break;
3126
3126
  case "left-bottom":
3127
- g = "left-end";
3127
+ b = "left-end";
3128
3128
  break;
3129
3129
  case "left-top":
3130
- g = "left-start";
3130
+ b = "left-start";
3131
3131
  break;
3132
3132
  case "right-bottom":
3133
- g = "right-end";
3133
+ b = "right-end";
3134
3134
  break;
3135
3135
  case "right-top":
3136
- g = "right-start";
3136
+ b = "right-start";
3137
3137
  break;
3138
3138
  default:
3139
- g = e;
3139
+ b = e;
3140
3140
  break;
3141
3141
  }
3142
- const b = [
3142
+ const g = [
3143
3143
  Zr(v),
3144
3144
  Xr(c ? 10 : 0),
3145
3145
  ...c && o ? [Wr({ element: o, padding: 15 })] : [],
3146
- ...l && (g === "bottom" || g === "top") ? [
3146
+ ...l && (b === "bottom" || b === "top") ? [
3147
3147
  we({
3148
3148
  apply({ rects: f, elements: x }) {
3149
3149
  x.floating.style.width = `${f.reference.width}px`;
@@ -3160,8 +3160,8 @@ class Gr {
3160
3160
  if (p) {
3161
3161
  const { x: f, y: x, placement: C, middlewareData: $, strategy: S } = await Yr(r, h, {
3162
3162
  strategy: "fixed",
3163
- middleware: b,
3164
- placement: g
3163
+ middleware: g,
3164
+ placement: b
3165
3165
  });
3166
3166
  if (h.style.left = `${f}px`, h.style.top = `${x}px`, h.style.position = `${S}`, o) {
3167
3167
  const { x: M, y: L } = $.arrow, O = {
@@ -4037,7 +4037,7 @@ let mt = class extends y {
4037
4037
  };
4038
4038
  }
4039
4039
  render() {
4040
- var o, e, c, r, n, u, l, p, v, h, g, b, f, x, C, $, S, M, L, O, z, I;
4040
+ var o, e, c, r, n, u, l, p, v, h, b, g, f, x, C, $, S, M, L, O, z, I;
4041
4041
  const t = "title-icon";
4042
4042
  return typeof this.isCollapsible > "u" || this.isCollapsible ? this.isSideNavMenuItems ? m`
4043
4043
  <cds-custom-side-nav-menu
@@ -4089,12 +4089,12 @@ let mt = class extends y {
4089
4089
  <cds-custom-side-nav-link
4090
4090
  class="${B}--side-nav__link"
4091
4091
  role="link"
4092
- href="${(g = this.link) == null ? void 0 : g.href}"
4092
+ href="${(b = this.link) == null ? void 0 : b.href}"
4093
4093
  @click="${(k) => {
4094
4094
  var P;
4095
4095
  return this.handleSideNavLinkClick(k, (P = this.link) == null ? void 0 : P.label);
4096
4096
  }}"
4097
- title="${(b = this.link) == null ? void 0 : b.label}"
4097
+ title="${(g = this.link) == null ? void 0 : g.label}"
4098
4098
  ${this.isHybridIpaas ? _ : "large"}>
4099
4099
  ${this.getIcon((f = this.link) == null ? void 0 : f.iconName, (x = this.link) == null ? void 0 : x.productIcon)}${(C = this.link) == null ? void 0 : C.label}
4100
4100
  </cds-custom-side-nav-link>
@@ -4533,8 +4533,8 @@ class ei extends Yc {
4533
4533
  if (l in Cs) {
4534
4534
  const h = Cs[l];
4535
4535
  if (p === void 0 || v === void 0) continue;
4536
- const g = h(p, v);
4537
- g.transform !== void 0 && (u[l] = g.value, n = !0, c.transform = `${c.transform ?? ""} ${g.transform}`, g.overrideFrom !== void 0 && Object.assign(c, g.overrideFrom));
4536
+ const b = h(p, v);
4537
+ b.transform !== void 0 && (u[l] = b.value, n = !0, c.transform = `${c.transform ?? ""} ${b.transform}`, b.overrideFrom !== void 0 && Object.assign(c, b.overrideFrom));
4538
4538
  } else p !== v && p !== void 0 && v !== void 0 && (n = !0, c[l] = p, r[l] = v);
4539
4539
  }
4540
4540
  return c.transformOrigin = r.transformOrigin = e ? "center center" : "top left", this.animatingProperties = u, n ? [c, r] : void 0;
@@ -5053,7 +5053,7 @@ let T = class extends $i(fc(y)) {
5053
5053
  this.type = this.type === Ct.PASSWORD ? Ct.TEXT : Ct.PASSWORD;
5054
5054
  }
5055
5055
  render() {
5056
- const { disabled: t, enableCounter: o, helperText: e, hideLabel: c, inline: r, invalid: n, invalidText: u, label: l, maxCount: p, readonly: v, required: h, size: g, type: b, warn: f, warnText: x, value: C, _handleInput: $, _hasAILabel: S, _handleSlotChange: M } = this, L = wi({
5056
+ const { disabled: t, enableCounter: o, helperText: e, hideLabel: c, inline: r, invalid: n, invalidText: u, label: l, maxCount: p, readonly: v, required: h, size: b, type: g, warn: f, warnText: x, value: C, _handleInput: $, _hasAILabel: S, _handleSlotChange: M } = this, L = wi({
5057
5057
  class: `${i}--text-input__invalid-icon`
5058
5058
  }), O = Ci({
5059
5059
  class: `${i}--text-input__invalid-icon ${i}--text-input__invalid-icon--warning`
@@ -5080,9 +5080,9 @@ let T = class extends $i(fc(y)) {
5080
5080
  [`${i}--text-input`]: !0,
5081
5081
  [`${i}--text-input--invalid`]: z.invalid,
5082
5082
  [`${i}--text-input--warning`]: z.warn,
5083
- [`${i}--text-input--${g}`]: g,
5084
- [`${i}--layout--size-${g}`]: g,
5085
- [`${i}--password-input`]: b === Ct.PASSWORD,
5083
+ [`${i}--text-input--${b}`]: b,
5084
+ [`${i}--layout--size-${b}`]: b,
5085
+ [`${i}--password-input`]: g === Ct.PASSWORD,
5086
5086
  [`${i}--text-input__field-wrapper--decorator`]: S
5087
5087
  }), D = H({
5088
5088
  [`${i}--text-input__field-outer-wrapper`]: !0,
@@ -5097,7 +5097,7 @@ let T = class extends $i(fc(y)) {
5097
5097
  }), K = H({
5098
5098
  [`${i}--form__helper-text`]: !0,
5099
5099
  [`${i}--form__helper-text--disabled`]: z.disabled
5100
- }), F = b !== Ct.PASSWORD, et = F ? zi({ class: `${i}--icon-visibility-off` }) : ki({ class: `${i}--icon-visibility-on` }), J = H({
5100
+ }), F = g !== Ct.PASSWORD, et = F ? zi({ class: `${i}--icon-visibility-off` }) : ki({ class: `${i}--icon-visibility-on` }), J = H({
5101
5101
  [`${i}--text-input--password__visibility__toggle`]: !0,
5102
5102
  [`${i}--btn`]: !0,
5103
5103
  [`${i}--btn--icon-only`]: !0,
@@ -5150,13 +5150,13 @@ let T = class extends $i(fc(y)) {
5150
5150
  placeholder="${Dt(this.placeholder)}"
5151
5151
  ?readonly="${v}"
5152
5152
  ?required="${h}"
5153
- type="${Dt(b)}"
5153
+ type="${Dt(g)}"
5154
5154
  .value="${this._value}"
5155
5155
  maxlength="${Dt(p)}"
5156
5156
  @input="${$}" />
5157
5157
  <slot name="ai-label" @slotchange="${M}"></slot>
5158
5158
  <slot name="slug" @slotchange="${M}"></slot>
5159
- ${this.showPasswordVisibilityToggle && (b === Ct.PASSWORD || b === Ct.TEXT) ? tt() : null}
5159
+ ${this.showPasswordVisibilityToggle && (g === Ct.PASSWORD || g === Ct.TEXT) ? tt() : null}
5160
5160
  </div>
5161
5161
  ${r ? null : se}
5162
5162
  <div
@@ -5346,13 +5346,13 @@ let Z = class extends uo(at(fc(y))) {
5346
5346
  e || o.append(c, r);
5347
5347
  }
5348
5348
  render() {
5349
- const { autoComplete: t, closeButtonLabelText: o, disabled: e, hasCustomIcon: c, labelText: r, name: n, placeholder: u, role: l, type: p, value: v = "", _handleInput: h, _handleClearInputButtonClick: g, _handleSlotChange: b } = this, f = H({
5349
+ const { autoComplete: t, closeButtonLabelText: o, disabled: e, hasCustomIcon: c, labelText: r, name: n, placeholder: u, role: l, type: p, value: v = "", _handleInput: h, _handleClearInputButtonClick: b, _handleSlotChange: g } = this, f = H({
5350
5350
  [`${i}--search-close`]: !0,
5351
5351
  [`${i}--search-close--hidden`]: !this.value
5352
5352
  });
5353
5353
  return m`
5354
5354
  <div class="${i}--search-magnifier">
5355
- <slot name="icon" @slotchange=${b}>
5355
+ <slot name="icon" @slotchange=${g}>
5356
5356
  ${c ? m`` : m`${xi({
5357
5357
  part: "search-icon",
5358
5358
  class: `${i}--search-magnifier-icon`,
@@ -5378,7 +5378,7 @@ let Z = class extends uo(at(fc(y))) {
5378
5378
  <button
5379
5379
  part="close-button"
5380
5380
  class="${f}"
5381
- @click="${g}"
5381
+ @click="${b}"
5382
5382
  type="button"
5383
5383
  aria-label="${o}">
5384
5384
  ${_i({
@@ -6063,7 +6063,7 @@ let Xt = class extends y {
6063
6063
  this.headerProps.assistMeConfigs && s.has("headerProps") && Te(this.headerProps);
6064
6064
  }
6065
6065
  render() {
6066
- var s, t, o, e, c, r, n, u, l, p, v, h, g, b, f, x, C, $, S, M, L, O, z;
6066
+ var s, t, o, e, c, r, n, u, l, p, v, h, b, g, f, x, C, $, S, M, L, O, z;
6067
6067
  return m`
6068
6068
  <cds-custom-header
6069
6069
  class="${B}__header"
@@ -6098,7 +6098,7 @@ let Xt = class extends y {
6098
6098
  <cds-custom-side-nav-items>
6099
6099
  <!-- sideNav group array render -->
6100
6100
  ${(v = (p = this.headerProps) == null ? void 0 : p.sideNav) != null && v.groups ? m`
6101
- ${(g = (h = this.headerProps.sideNav) == null ? void 0 : h.groups) == null ? void 0 : g.map(
6101
+ ${(b = (h = this.headerProps.sideNav) == null ? void 0 : h.groups) == null ? void 0 : b.map(
6102
6102
  (I, k, { length: P }) => {
6103
6103
  var q;
6104
6104
  const D = P;
@@ -6127,7 +6127,7 @@ let Xt = class extends y {
6127
6127
 
6128
6128
  <!-- sideNav link render -->
6129
6129
  ${this.headerProps.sideNav.links && this.headerProps.sideNav.links.length > 0 ? m`
6130
- ${(f = (b = this.headerProps.sideNav) == null ? void 0 : b.links) == null ? void 0 : f.map((I) => {
6130
+ ${(f = (g = this.headerProps.sideNav) == null ? void 0 : g.links) == null ? void 0 : f.map((I) => {
6131
6131
  var k, P, D;
6132
6132
  return m`
6133
6133
  <clabs-global-header-side-nav-item
@@ -6258,24 +6258,27 @@ let U = class extends y {
6258
6258
  return this.logoutCallback ? s.onClickHandler = this.logoutCallback : s.href = `${this.basePath}/logout`, s;
6259
6259
  }
6260
6260
  buildHeaderOptions(s) {
6261
- var n, u, l, p, v, h;
6261
+ var n, u, l, p, v, h, b;
6262
6262
  const t = {
6263
6263
  email: this.userEmail,
6264
6264
  displayName: this.displayName
6265
6265
  }, o = [];
6266
- this.productName && o.push({ label: "Product", text: this.productName }), this.productVersion && o.push({ label: "Version", text: this.productVersion }), s.mainSectionItems && s.mainSectionItems.length > 0 && s.mainSectionItems.forEach((g) => {
6266
+ this.productName ? o.push({ label: "Product", text: this.productName }) : o.push({
6267
+ label: "Product",
6268
+ text: (n = s == null ? void 0 : s.brand) == null ? void 0 : n.product
6269
+ }), this.productVersion && o.push({ label: "Version", text: this.productVersion }), s.mainSectionItems && s.mainSectionItems.length > 0 && s.mainSectionItems.forEach((g) => {
6267
6270
  o.push(g);
6268
6271
  });
6269
6272
  const e = {
6270
6273
  label: this.productName ? this.productName : ""
6271
- }, c = (n = s.profileFooterLinks) == null ? void 0 : n.findIndex(
6272
- (g) => g.text.toLowerCase() === "logout"
6274
+ }, c = (u = s.profileFooterLinks) == null ? void 0 : u.findIndex(
6275
+ (g) => g.text.toLowerCase() === "log out"
6273
6276
  );
6274
- c !== void 0 && c > -1 ? (u = s.profileFooterLinks) == null || u.splice(
6277
+ c !== void 0 && c > -1 ? (l = s.profileFooterLinks) == null || l.splice(
6275
6278
  c,
6276
6279
  1,
6277
6280
  this.initLogoutLink()
6278
- ) : (l = s.profileFooterLinks) == null || l.push(this.initLogoutLink());
6281
+ ) : (p = s.profileFooterLinks) == null || p.push(this.initLogoutLink());
6279
6282
  const r = {
6280
6283
  ...s,
6281
6284
  capabilityName: this.productName === null ? s.capabilityName : e,
@@ -6287,9 +6290,9 @@ let U = class extends y {
6287
6290
  }), this.notificationOpenCallback && (r.notificationConfigs = {
6288
6291
  onClick: this.notificationOpenCallback
6289
6292
  }), this.searchConfigs && (r.searchConfigs = {
6290
- placeholder: ((p = this.searchConfigs) == null ? void 0 : p.placeholder) ?? "Search",
6291
- callback: (v = this.searchConfigs) == null ? void 0 : v.callback,
6292
- submitCallback: (h = this.searchConfigs) == null ? void 0 : h.submitCallback
6293
+ placeholder: ((v = this.searchConfigs) == null ? void 0 : v.placeholder) ?? "Search",
6294
+ callback: (h = this.searchConfigs) == null ? void 0 : h.callback,
6295
+ submitCallback: (b = this.searchConfigs) == null ? void 0 : b.submitCallback
6293
6296
  }), this.aiCallback && (r.chatBotConfigs = {
6294
6297
  onClick: this.aiCallback
6295
6298
  }), this.aiCallbackEvent && (r.chatBotConfigs = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/wc-global-header",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "author": "Your Name <your@email.com>",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -45,5 +45,5 @@
45
45
  "@web/test-runner": "^0.20.2",
46
46
  "vite": "^5.4.21"
47
47
  },
48
- "gitHead": "9c1dd9681d0f990c167dac45d6accbaef184e9dd"
48
+ "gitHead": "8699e8ab081c78918c14c75b88c5204b532e2cb6"
49
49
  }