scb-wc 0.1.75 → 0.1.76

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.
Files changed (76) hide show
  1. package/index.js +20 -20
  2. package/mvc/components/scb-accordion/scb-accordion-item.js +2 -2
  3. package/mvc/components/scb-avatar/scb-avatar.js +2 -2
  4. package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +33 -15
  5. package/mvc/components/scb-button/scb-button.js +80 -41
  6. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  7. package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
  8. package/mvc/components/scb-card/scb-card.js +3 -3
  9. package/mvc/components/scb-checkbox/scb-checkbox.js +32 -7
  10. package/mvc/components/scb-chip/scb-chip.js +6 -6
  11. package/mvc/components/scb-dialog/scb-dialog.js +1 -1
  12. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  13. package/mvc/components/scb-fab/scb-fab.js +24 -6
  14. package/mvc/components/scb-fact-card/scb-fact-card.js +4 -4
  15. package/mvc/components/scb-header/scb-header.js +474 -124
  16. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +1 -1
  17. package/mvc/components/scb-icon-button/scb-icon-button.js +2 -2
  18. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +2 -2
  19. package/mvc/components/scb-link/scb-link.js +14 -10
  20. package/mvc/components/scb-list/scb-list-item.js +5 -5
  21. package/mvc/components/scb-list/scb-list.js +3 -3
  22. package/mvc/components/scb-menu/scb-menu-item.js +2 -2
  23. package/mvc/components/scb-nav/scb-nav.js +1 -1
  24. package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
  25. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  26. package/mvc/components/scb-pagination/scb-pagination.js +1 -1
  27. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  28. package/mvc/components/scb-radio-button/scb-radio-button.js +39 -9
  29. package/mvc/components/scb-search/scb-search.js +3 -3
  30. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  31. package/mvc/components/scb-select/scb-select-option.js +3 -3
  32. package/mvc/components/scb-select/scb-select.js +1 -1
  33. package/mvc/components/scb-slider/scb-slider.js +58 -4
  34. package/mvc/components/scb-status-pill/scb-status-pill.js +1 -1
  35. package/mvc/components/scb-stepper/scb-step.js +1 -1
  36. package/mvc/components/scb-switch/scb-switch.js +51 -6
  37. package/mvc/components/scb-tabs/scb-primary-tab.js +3 -2
  38. package/mvc/components/scb-tabs/scb-secondary-tab.js +3 -2
  39. package/mvc/components/scb-tabs/scb-tabs.js +11 -2
  40. package/mvc/components/scb-textfield/scb-textfield.js +1 -1
  41. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  42. package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
  43. package/mvc/vendor/assist-chip.js +20 -0
  44. package/mvc/vendor/attachable-controller.js +1 -0
  45. package/mvc/vendor/checkbox-validator.js +1 -0
  46. package/mvc/vendor/chip-set.js +2 -0
  47. package/mvc/vendor/chip.js +18 -0
  48. package/mvc/vendor/delegate.js +1 -0
  49. package/mvc/vendor/element-internals.js +1 -0
  50. package/mvc/vendor/elevation.js +2 -0
  51. package/mvc/vendor/filled-icon-button.js +2 -0
  52. package/mvc/vendor/filled-tonal-icon-button.js +2 -0
  53. package/mvc/vendor/filter-chip.js +43 -0
  54. package/mvc/vendor/focusable.js +1 -0
  55. package/mvc/vendor/form-associated.js +1 -0
  56. package/mvc/vendor/form-label-activation.js +1 -0
  57. package/mvc/vendor/form-submitter.js +1 -0
  58. package/mvc/vendor/icon-button.js +2 -0
  59. package/mvc/vendor/icon.js +2 -0
  60. package/mvc/vendor/list.js +8 -0
  61. package/mvc/vendor/md-focus-ring.js +2 -0
  62. package/mvc/vendor/outlined-icon-button.js +2 -0
  63. package/mvc/vendor/redispatch-event.js +1 -0
  64. package/mvc/vendor/ripple.js +2 -0
  65. package/mvc/vendor/rolldown-runtime.js +1 -0
  66. package/mvc/vendor/shared-styles.js +3 -0
  67. package/mvc/vendor/shared-styles2.js +30 -0
  68. package/mvc/vendor/tab-styles.js +17 -0
  69. package/mvc/vendor/validator.js +1 -0
  70. package/package.json +2 -2
  71. package/scb-breadcrumb/scb-breadcrumb.js +38 -21
  72. package/scb-components/scb-header/scb-header.d.ts +11 -4
  73. package/scb-header/scb-header.js +512 -156
  74. package/scb-link/scb-link.js +24 -20
  75. package/scb-wc.bundle.js +602 -232
  76. package/mvc/vendor/vendor-material.js +0 -364
@@ -1,13 +1,6 @@
1
1
  import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
2
- import "../scb-button/scb-button.js";
3
- import "../scb-icon-button/scb-icon-button.js";
4
- import "../scb-search/scb-search.js";
5
- import "../scb-grid/scb-grid-item.js";
6
- import "../scb-grid/scb-grid.js";
7
- import "../scb-skeleton/scb-skeleton.js";
8
2
  import { LitElement as t, css as n, html as r, nothing as i } from "lit";
9
3
  import { customElement as a, property as o, state as s } from "lit/decorators.js";
10
- import "@material/web/focus/md-focus-ring.js";
11
4
  //#region src/scb-components/scb-header/scb-header.ts
12
5
  var c, l = 0;
13
6
  (() => {
@@ -212,6 +205,13 @@ var u = {
212
205
  this._hideLogoText ? c = !(r >= this._logoTextUnlockAt) : i > r + .5 && (c = !0, this._logoTextUnlockAt = r + this._HYST);
213
206
  } else c = !1, this._logoTextUnlockAt = 0;
214
207
  this._setHideLogoText(c);
208
+ }, this._onGlobalFocusRingKeydown = (e) => {
209
+ e.key === "Tab" && (this.toggleAttribute("data-keyboard-focus", !0), this._ensureFocusRingReady());
210
+ }, this._onGlobalFocusRingPointerDown = () => {
211
+ this.removeAttribute("data-keyboard-focus");
212
+ }, this._onLocalFocusIn = (e) => {
213
+ let t = e.composedPath()[0];
214
+ t instanceof HTMLElement && t.matches(":focus-visible") && this._ensureFocusRingReady();
215
215
  }, this._onDrawerOpened = () => {
216
216
  this._menuExpanded = !0, this._syncMenuBtnAria(), this.dispatchEvent(new CustomEvent("drawer-open", {
217
217
  bubbles: !0,
@@ -236,26 +236,10 @@ var u = {
236
236
  bubbles: !0,
237
237
  composed: !0
238
238
  })), !this._drawerReady && (e.stopPropagation(), await this._ensureDrawerReady(), await this.updateComplete, this._openDrawerNow()));
239
- }, this._onSearchClick = (e) => {
240
- let t = this._searchEl;
241
- if (t?.submit && typeof t.submit == "function") {
242
- t.submit();
243
- return;
244
- }
245
- let n = t?.value ?? "";
246
- this.searchText = n, this.dispatchEvent(new CustomEvent("search-click", {
247
- detail: { value: n },
248
- bubbles: !0,
249
- composed: !0
250
- })), this.dispatchEvent(new CustomEvent("searchclick", {
251
- detail: { value: n },
252
- bubbles: !0,
253
- composed: !0
254
- })), t?.focus?.();
255
239
  }, this._onMobileSearchToggle = () => {
256
240
  let e = !this._mobileSearchOpen;
257
241
  this._setMobileSearchOpen(e), e && this.updateComplete.then(() => {
258
- this.renderRoot.querySelector(".mobile-search-panel scb-search")?.focus?.();
242
+ this.renderRoot.querySelector(".mobile-search-panel .header-search-input")?.focus?.();
259
243
  });
260
244
  }, this._onTabClick = (e) => {
261
245
  let t = e.currentTarget;
@@ -313,40 +297,13 @@ var u = {
313
297
  if (r == null) return;
314
298
  let i = Math.max(0, Math.min(n.length - 1, r));
315
299
  t === "ArrowRight" ? i = (i + 1) % n.length : t === "ArrowLeft" ? i = (i - 1 + n.length) % n.length : t === "Home" ? i = 0 : t === "End" && (i = n.length - 1), e.preventDefault(), this._focusTabAtIndex(i);
316
- }, this._onSearchInput = (e) => {
317
- this.searchText = e.detail?.value ?? "", this.dispatchEvent(new CustomEvent("search-input", {
318
- detail: { value: this.searchText },
319
- bubbles: !0,
320
- composed: !0
321
- })), this.dispatchEvent(new CustomEvent("searchinput", {
322
- detail: { value: this.searchText },
323
- bubbles: !0,
324
- composed: !0
325
- })), this.dispatchEvent(new CustomEvent("search-text-change", {
326
- detail: { value: this.searchText },
327
- bubbles: !0,
328
- composed: !0
329
- })), this.dispatchEvent(new CustomEvent("searchtextchange", {
330
- detail: { value: this.searchText },
331
- bubbles: !0,
332
- composed: !0
333
- }));
334
- }, this._onSearchSubmit = (e) => {
335
- this.searchText = e.detail?.value ?? "", this.dispatchEvent(new CustomEvent("search-change", {
336
- detail: {
337
- value: this.searchText,
338
- active: e.detail?.active
339
- },
340
- bubbles: !0,
341
- composed: !0
342
- })), this.dispatchEvent(new CustomEvent("searchchange", {
343
- detail: {
344
- value: this.searchText,
345
- active: e.detail?.active
346
- },
347
- bubbles: !0,
348
- composed: !0
349
- }));
300
+ }, this._onNativeSearchInput = (e) => {
301
+ let t = e.currentTarget;
302
+ this._emitSearchInput(t?.value ?? "");
303
+ }, this._onNativeSearchSubmit = (e) => {
304
+ e.preventDefault();
305
+ let t = e.currentTarget?.querySelector(".header-search-input");
306
+ this._emitSearchChange(t?.value ?? "");
350
307
  }, this._onSearchClear = () => {
351
308
  this.searchText = "", this.dispatchEvent(new CustomEvent("search-text-change", {
352
309
  detail: { value: "" },
@@ -357,6 +314,11 @@ var u = {
357
314
  bubbles: !0,
358
315
  composed: !0
359
316
  }));
317
+ }, this._onNativeSearchClear = (e) => {
318
+ e.preventDefault(), this._onSearchClear(), this.updateComplete.then(() => {
319
+ let t = (e.currentTarget?.closest("form"))?.querySelector(".header-search-input");
320
+ t && (t.value = ""), t?.focus();
321
+ });
360
322
  };
361
323
  let e = ++l;
362
324
  this._drawerId = `scb-header-drawer-${e}`, this._searchId = `scb-header-search-${e}`;
@@ -410,6 +372,12 @@ var u = {
410
372
  color: var(--md-sys-color-on-surface, #1b1b1f);
411
373
  --scb-header-search-max: 380px;
412
374
  --scb-header-search-min: 250px;
375
+ --scb-header-search-padding-x: var(--spacing-4, 12px);
376
+ --scb-header-search-padding-y: var(--spacing-4, 12px);
377
+ --scb-header-search-leading-size: var(--scale-10, 40px);
378
+ --scb-header-search-icon-size: var(--icon-size-medium, 24px);
379
+ --scb-header-search-font-size: var(--md-sys-typescale-body-medium-size, 16px);
380
+ --scb-header-search-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
413
381
 
414
382
  --scb-header-logo-w: var(--icon-size-extra-extra-large, 48px);
415
383
  --scb-header-logo-h: calc(var(--scb-header-logo-w) * 1.125);
@@ -474,6 +442,13 @@ var u = {
474
442
  --md-sys-typescale-label-small-line-height,
475
443
  1.25rem
476
444
  );
445
+
446
+ --scb-header-search-padding-x: var(--spacing-3, 8px);
447
+ --scb-header-search-padding-y: var(--spacing-3, 8px);
448
+ --scb-header-search-leading-size: var(--scale-09, 36px);
449
+ --scb-header-search-icon-size: var(--icon-size-small, 20px);
450
+ --scb-header-search-font-size: var(--md-sys-typescale-body-small-size, 14px);
451
+ --scb-header-search-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
477
452
  }
478
453
 
479
454
  :host([size='large']) {
@@ -503,18 +478,33 @@ var u = {
503
478
  --md-sys-typescale-title-medium-line-height,
504
479
  1.625rem
505
480
  );
481
+
482
+ --scb-header-search-padding-x: var(--spacing-5, 16px);
483
+ --scb-header-search-padding-y: var(--spacing-5, 16px);
484
+ --scb-header-search-leading-size: var(--scale-11, 48px);
485
+ --scb-header-search-icon-size: var(--icon-size-medium, 24px);
486
+ --scb-header-search-font-size: var(--md-sys-typescale-body-large-size, 18px);
487
+ --scb-header-search-line-height: var(--md-sys-typescale-body-large-line-height, 26px);
506
488
  }
507
489
 
508
- .header-landmark > scb-grid {
490
+ .header-grid {
491
+ box-sizing: border-box;
492
+ inline-size: 100%;
493
+ max-inline-size: var(--scb-header-max-width, 1440px);
494
+ margin-inline: auto;
509
495
  padding-inline: 20px;
510
496
  }
511
497
 
512
498
  @media (min-width: 840px) {
513
- .header-landmark > scb-grid {
499
+ .header-grid {
514
500
  padding-inline: 32px;
515
501
  }
516
502
  }
517
503
 
504
+ .header-grid-item {
505
+ min-inline-size: 0;
506
+ }
507
+
518
508
  .top-row {
519
509
  display: flex;
520
510
  align-items: center;
@@ -533,6 +523,7 @@ var u = {
533
523
  );
534
524
  margin-top: var(--spacing-2, 4px);
535
525
  }
526
+
536
527
  .logo-wrap md-focus-ring {
537
528
  position: absolute;
538
529
  inset: var(--spacing-neg-2, -4px);
@@ -540,6 +531,7 @@ var u = {
540
531
  display: none;
541
532
  border-radius: inherit;
542
533
  }
534
+
543
535
  .logo-group:focus-visible + md-focus-ring {
544
536
  display: block;
545
537
  }
@@ -557,6 +549,7 @@ var u = {
557
549
  .logo-group:focus-visible {
558
550
  outline: none;
559
551
  }
552
+
560
553
  .logo-group svg {
561
554
  width: var(--scb-header-logo-slot-w);
562
555
  height: var(--scb-header-logo-slot-h);
@@ -668,16 +661,123 @@ var u = {
668
661
  max-width: var(--scb-header-search-max);
669
662
  min-width: var(--scb-header-search-min);
670
663
  }
671
- scb-search {
672
- width: 100%;
664
+
665
+ .header-search {
666
+ display: flex;
667
+ align-items: stretch;
668
+ flex: 1 1 auto;
669
+ min-width: 0;
670
+ gap: var(--spacing-3, 8px);
673
671
  }
674
- .search scb-search {
672
+
673
+ .header-search-field {
674
+ position: relative;
675
675
  flex: 1 1 auto;
676
- width: auto;
676
+ min-width: 0;
677
677
  }
678
- .search scb-button {
678
+
679
+ .header-search-input {
680
+ box-sizing: border-box;
681
+ inline-size: 100%;
682
+ min-block-size: var(
683
+ --scb-search-height,
684
+ calc(
685
+ var(--scb-header-search-line-height) +
686
+ var(--scb-header-search-padding-y) +
687
+ var(--scb-header-search-padding-y)
688
+ )
689
+ );
690
+ padding-block: var(--scb-header-search-padding-y);
691
+ padding-inline-start: calc(
692
+ var(--scb-header-search-padding-x) +
693
+ var(--scb-header-search-leading-size) +
694
+ var(--spacing-2, 4px)
695
+ );
696
+ padding-inline-end: calc(
697
+ var(--scb-header-search-padding-x) +
698
+ var(--scb-header-search-leading-size) +
699
+ var(--spacing-2, 4px)
700
+ );
701
+ border: var(--stroke-border, 1px) solid var(--md-sys-color-outline, #808080);
702
+ border-radius: var(--radius-full, 1000px);
703
+ background: transparent;
704
+ color: var(--md-sys-color-on-surface, #1b1b1f);
705
+ font-family: var(--md-sys-typescale-body-large-font, var(--brand-font, Inter), sans-serif);
706
+ font-size: var(--scb-header-search-font-size);
707
+ line-height: var(--scb-header-search-line-height);
708
+ letter-spacing: 0;
709
+ -webkit-appearance: none;
710
+ appearance: none;
711
+ }
712
+
713
+ .header-search-input::placeholder {
714
+ color: var(--md-sys-color-on-surface-variant, #1b1b1f);
715
+ opacity: 1;
716
+ }
717
+
718
+ .header-search-input:hover {
719
+ outline: var(--stroke-border, 1px) solid var(--md-sys-color-outline, #808080);
720
+ outline-offset: 0;
721
+ }
722
+
723
+ .header-search-input:focus {
724
+ outline: none;
725
+ }
726
+
727
+ .header-search-input::-webkit-search-cancel-button {
728
+ -webkit-appearance: none;
729
+ appearance: none;
730
+ display: none;
731
+ }
732
+
733
+ .header-search-icon,
734
+ .header-search-clear {
735
+ position: absolute;
736
+ inset-block-start: 50%;
737
+ transform: translateY(-50%);
738
+ display: inline-flex;
739
+ align-items: center;
740
+ justify-content: center;
741
+ inline-size: var(--scb-header-search-leading-size);
742
+ block-size: var(--scb-header-search-leading-size);
743
+ color: var(--md-sys-color-on-surface-variant, #1b1b1f);
744
+ }
745
+
746
+ .header-search-icon {
747
+ inset-inline-start: var(--scb-header-search-padding-x);
748
+ pointer-events: none;
749
+ }
750
+
751
+ .header-search-clear {
752
+ inset-inline-end: var(--scb-header-search-padding-x);
753
+ border: 0;
754
+ border-radius: var(--radius-full, 1000px);
755
+ padding: 0;
756
+ background: transparent;
757
+ cursor: pointer;
758
+ }
759
+
760
+ .header-search-clear[hidden] {
761
+ display: none;
762
+ }
763
+
764
+ .header-search-field md-focus-ring.input-ring {
765
+ position: absolute;
766
+ inset: 0;
767
+ pointer-events: none;
768
+ display: none;
769
+ border-radius: var(--radius-full, 1000px);
770
+ z-index: 4;
771
+ }
772
+
773
+ :host([data-keyboard-focus]) .header-search-input:focus ~ md-focus-ring.input-ring {
774
+ display: block;
775
+ }
776
+
777
+ .search-submit {
679
778
  flex: 0 0 auto;
680
779
  }
780
+
681
781
  @media (min-width: 600px) {
682
782
  .search {
683
783
  display: flex;
@@ -687,7 +787,6 @@ var u = {
687
787
  .mobile-search-trigger {
688
788
  display: inline-flex;
689
789
  color: var(--md-sys-color-on-surface, #1b1b1f);
690
- --md-sys-color-primary: var(--md-sys-color-on-surface, #1b1b1f);
691
790
  }
692
791
 
693
792
  @media (min-width: 600px) {
@@ -707,7 +806,7 @@ var u = {
707
806
  background: var(--scb-header-background, transparent);
708
807
  }
709
808
 
710
- .mobile-search-panel scb-search {
809
+ .mobile-search-panel .header-search {
711
810
  flex: 1 1 auto;
712
811
  min-width: 0;
713
812
  }
@@ -784,8 +883,17 @@ var u = {
784
883
  align-items: center;
785
884
  }
786
885
 
787
- .tabs-nav--skeleton scb-skeleton {
886
+ .tab-skeleton {
788
887
  flex: 0 0 auto;
888
+ display: inline-block;
889
+ block-size: 16px;
890
+ border-radius: var(--radius-full, 1000px);
891
+ background: linear-gradient(
892
+ 90deg,
893
+ var(--md-sys-color-surface-container-low, #f5f5f5),
894
+ var(--md-sys-color-surface-container, #ebf8ff),
895
+ var(--md-sys-color-surface-container-low, #f5f5f5)
896
+ );
789
897
  }
790
898
 
791
899
  .tab-wrap {
@@ -795,15 +903,14 @@ var u = {
795
903
 
796
904
  }
797
905
 
798
- .tab-wrap md-focus-ring {
906
+ .tab-wrap md-focus-ring {
799
907
  position: absolute;
800
908
  inset-block: var(--spacing-1, 2px);
801
909
  inset-inline: var(--spacing-neg-2, -4px);
802
910
  pointer-events: none;
803
911
  display: none;
804
912
  border-radius: 5px;
805
- }
806
-
913
+ }
807
914
 
808
915
  .tab-link {
809
916
  position: relative;
@@ -855,10 +962,199 @@ var u = {
855
962
  background-color: var(--md-sys-color-primary);
856
963
  }
857
964
 
965
+ .tab-link:focus-visible {
966
+ outline: none;
967
+ }
968
+
858
969
  .tab-link:focus-visible + md-focus-ring {
859
970
  display: block;
860
971
  }
861
972
 
973
+ .utility-link,
974
+ .header-text-button,
975
+ .header-icon-button,
976
+ .search-submit {
977
+ border: 0;
978
+ font: inherit;
979
+ letter-spacing: 0;
980
+ -webkit-tap-highlight-color: transparent;
981
+ position: relative;
982
+ }
983
+
984
+ .utility-link,
985
+ .header-text-button,
986
+ .search-submit {
987
+ box-sizing: border-box;
988
+ display: inline-flex;
989
+ align-items: center;
990
+ justify-content: center;
991
+ min-block-size: calc(
992
+ var(--md-sys-typescale-label-small-line-height, 20px) +
993
+ ((var(--spacing-4, 12px) - var(--spacing-1, 2px)) * 2)
994
+ );
995
+ padding-block: calc(var(--spacing-4, 12px) - var(--spacing-1, 2px));
996
+ padding-inline: var(--spacing-5, 16px);
997
+ border-radius: var(--radius-full, 1000px);
998
+ color: var(--md-sys-color-primary, var(--p-40, #1f44ff));
999
+ font-family: var(--md-sys-typescale-label-small-font, var(--brand-font, Inter), sans-serif);
1000
+ font-size: var(--md-sys-typescale-label-small-size, 14px);
1001
+ line-height: var(--md-sys-typescale-label-small-line-height, 20px);
1002
+ font-weight: var(--md-sys-typescale-label-small-weight, 600);
1003
+ text-decoration: none;
1004
+ background: transparent;
1005
+ cursor: pointer;
1006
+ white-space: nowrap;
1007
+ }
1008
+
1009
+ .utility-link:hover,
1010
+ .header-text-button:hover {
1011
+ background: color-mix(in srgb, var(--md-sys-color-primary, #1f44ff) 8%, transparent);
1012
+ }
1013
+
1014
+ .search-submit {
1015
+ min-block-size: var(--scb-search-height, var(--scale-11, 48px));
1016
+ min-inline-size: var(--scale-12, 64px);
1017
+ color: var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));
1018
+ background: var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff));
1019
+ }
1020
+
1021
+ .search-submit:hover {
1022
+ background: color-mix(
1023
+ in srgb,
1024
+ var(--md-sys-color-secondary-container, #d6f1ff) 92%,
1025
+ var(--md-sys-color-on-secondary-container, #1e00be)
1026
+ );
1027
+ }
1028
+
1029
+ .header-icon-button {
1030
+ position: relative;
1031
+ display: inline-flex;
1032
+ align-items: center;
1033
+ justify-content: center;
1034
+ inline-size: calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px) * 2));
1035
+ block-size: calc(var(--icon-size-medium, 24px) + (var(--spacing-3, 12px) * 2));
1036
+ padding: 0;
1037
+ border-radius: var(--radius-full, 1000px);
1038
+ color: var(--md-sys-color-on-surface, #1b1b1f);
1039
+ background: transparent;
1040
+ cursor: pointer;
1041
+ }
1042
+
1043
+ .mobile-search-trigger,
1044
+ .mobile-search-close {
1045
+ color: var(--md-sys-color-on-secondary-container, var(--p-30, #1e00be));
1046
+ background: var(--md-sys-color-secondary-container, var(--p-90, #d6f1ff));
1047
+ }
1048
+
1049
+ @media (min-width: 600px) {
1050
+ .mobile-search-trigger.header-icon-button {
1051
+ display: none;
1052
+ }
1053
+ }
1054
+
1055
+ .header-icon-button:hover,
1056
+ .header-search-clear:hover {
1057
+ background: color-mix(in srgb, currentColor 8%, transparent);
1058
+ }
1059
+
1060
+ .mobile-search-trigger:hover,
1061
+ .mobile-search-close:hover {
1062
+ background: color-mix(
1063
+ in srgb,
1064
+ var(--md-sys-color-secondary-container, #d6f1ff) 92%,
1065
+ var(--md-sys-color-on-secondary-container, #1e00be)
1066
+ );
1067
+ }
1068
+
1069
+ .utility-link:focus,
1070
+ .utility-link:focus-visible,
1071
+ .header-text-button:focus,
1072
+ .header-text-button:focus-visible,
1073
+ .header-icon-button:focus,
1074
+ .header-icon-button:focus-visible,
1075
+ .search-submit:focus,
1076
+ .search-submit:focus-visible,
1077
+ .header-search-clear:focus,
1078
+ .header-search-clear:focus-visible {
1079
+ outline: none;
1080
+ }
1081
+
1082
+ .utility-link:focus-visible,
1083
+ .header-text-button:focus-visible,
1084
+ .header-icon-button:focus-visible,
1085
+ .search-submit:focus-visible,
1086
+ .header-search-clear:focus-visible {
1087
+ outline: none;
1088
+ }
1089
+
1090
+ .utility-link md-focus-ring,
1091
+ .header-text-button md-focus-ring,
1092
+ .header-icon-button md-focus-ring,
1093
+ .search-submit md-focus-ring,
1094
+ .header-search-clear md-focus-ring {
1095
+ position: absolute;
1096
+ inset: var(--spacing-neg-2, -4px);
1097
+ pointer-events: none;
1098
+ display: none;
1099
+ border-radius: inherit;
1100
+ }
1101
+
1102
+ .utility-link:focus-visible md-focus-ring,
1103
+ .header-text-button:focus-visible md-focus-ring,
1104
+ .header-icon-button:focus-visible md-focus-ring,
1105
+ .search-submit:focus-visible md-focus-ring,
1106
+ .header-search-clear:focus-visible md-focus-ring {
1107
+ display: block;
1108
+ }
1109
+
1110
+ .header-text-button {
1111
+ gap: var(--spacing-3, 8px);
1112
+ }
1113
+
1114
+ .header-text-button .header-symbol {
1115
+ inline-size: var(--icon-size-small, 20px);
1116
+ font-size: var(--icon-size-small, 20px);
1117
+ line-height: var(--icon-size-small, 20px);
1118
+ }
1119
+
1120
+ .header-symbol {
1121
+ display: inline-block;
1122
+ inline-size: 1em;
1123
+ overflow: hidden;
1124
+ font-family: 'Material Symbols Outlined';
1125
+ font-size: var(--icon-size-medium, 24px);
1126
+ line-height: 1;
1127
+ text-align: center;
1128
+ white-space: nowrap;
1129
+ text-transform: none;
1130
+ word-wrap: normal;
1131
+ direction: ltr;
1132
+ font-feature-settings: 'liga' 1;
1133
+ font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
1134
+ -webkit-font-smoothing: antialiased;
1135
+ -moz-osx-font-smoothing: grayscale;
1136
+ }
1137
+
1138
+ .header-search-icon.header-symbol {
1139
+ display: inline-flex;
1140
+ align-items: center;
1141
+ justify-content: center;
1142
+ inline-size: var(--scb-header-search-leading-size);
1143
+ font-size: var(--scb-header-search-icon-size);
1144
+ }
1145
+
1146
+ .sr-only {
1147
+ position: absolute;
1148
+ inline-size: 1px;
1149
+ block-size: 1px;
1150
+ padding: 0;
1151
+ margin: -1px;
1152
+ overflow: hidden;
1153
+ clip: rect(0, 0, 0, 0);
1154
+ white-space: nowrap;
1155
+ border: 0;
1156
+ }
1157
+
862
1158
  .divider {
863
1159
  border-bottom: var(--stroke-border, 1px) solid
864
1160
  var(--md-sys-color-outline-variant, #e0e0e0);
@@ -886,9 +1182,6 @@ var u = {
886
1182
  get _menuBtn() {
887
1183
  return this.renderRoot.querySelector(".menu-trigger");
888
1184
  }
889
- get _searchEl() {
890
- return this.renderRoot.querySelector(`#${this._searchId}`);
891
- }
892
1185
  get _tabsNav() {
893
1186
  return this.renderRoot.querySelector(".tabs-nav");
894
1187
  }
@@ -1011,7 +1304,7 @@ var u = {
1011
1304
  return r - n.left > n.width + 1;
1012
1305
  }
1013
1306
  connectedCallback() {
1014
- super.connectedCallback(), this._initialUpgradeComplete || this.setAttribute("data-upgrading", ""), this._harvest({ scheduleMeasure: !1 }), this._attachSlotObservers();
1307
+ super.connectedCallback(), window.addEventListener("keydown", this._onGlobalFocusRingKeydown, !0), window.addEventListener("pointerdown", this._onGlobalFocusRingPointerDown, !0), this._initialUpgradeComplete || this.setAttribute("data-upgrading", ""), this._harvest({ scheduleMeasure: !1 }), this._attachSlotObservers();
1015
1308
  }
1016
1309
  _finishInitialUpgrade() {
1017
1310
  this._initialUpgradeComplete || (this._initialUpgradeComplete = !0, requestAnimationFrame(() => {
@@ -1019,7 +1312,7 @@ var u = {
1019
1312
  }));
1020
1313
  }
1021
1314
  firstUpdated() {
1022
- this._syncLandmarkAttributes(), this.showDrawer && !this.deferDrawer && this._ensureDrawerReady(), this.updateComplete.then(() => {
1315
+ this._syncLandmarkAttributes(), this.renderRoot.addEventListener("focusin", this._onLocalFocusIn), this.showDrawer && !this.deferDrawer && this._ensureDrawerReady(), this.updateComplete.then(() => {
1023
1316
  this._harvest({ scheduleMeasure: !1 }), this._attachSlotObservers(), this._syncDropdownTabs(), this._finishInitialUpgrade();
1024
1317
  });
1025
1318
  let e = this._top;
@@ -1033,7 +1326,7 @@ var u = {
1033
1326
  });
1034
1327
  }
1035
1328
  disconnectedCallback() {
1036
- this._ro?.disconnect(), this._slotMo?.disconnect(), this._slotWatchers.forEach((e) => e.disconnect()), this._slotWatchers = [], window.removeEventListener("resize", this._onWindowResize), super.disconnectedCallback();
1329
+ this._ro?.disconnect(), this._slotMo?.disconnect(), this._slotWatchers.forEach((e) => e.disconnect()), this._slotWatchers = [], this.renderRoot.removeEventListener("focusin", this._onLocalFocusIn), window.removeEventListener("keydown", this._onGlobalFocusRingKeydown, !0), window.removeEventListener("pointerdown", this._onGlobalFocusRingPointerDown, !0), window.removeEventListener("resize", this._onWindowResize), super.disconnectedCallback();
1037
1330
  }
1038
1331
  _mapSpacingToken(e) {
1039
1332
  if (!e) return;
@@ -1067,8 +1360,15 @@ var u = {
1067
1360
  let e = this.renderRoot.querySelector(`#${this._drawerId}`);
1068
1361
  e && (e.open = !0);
1069
1362
  }
1363
+ _ensureFocusRingReady() {
1364
+ customElements.get("md-focus-ring") || (this._focusRingImportPromise ??= import("@material/web/focus/md-focus-ring.js").then(() => void 0), this._focusRingImportPromise);
1365
+ }
1070
1366
  async _ensureDrawerReady() {
1071
- this._drawerReady ||= (this._drawerImportPromise ??= Promise.all([import("../scb-drawer/scb-drawer.js"), import("../scb-menu/scb-menu.js")]).then(() => void 0), await this._drawerImportPromise, !0);
1367
+ this._drawerReady ||= (this._drawerImportPromise ??= Promise.all([
1368
+ import("../scb-drawer/scb-drawer.js"),
1369
+ import("../scb-menu/scb-menu.js"),
1370
+ import("../scb-search/scb-search.js")
1371
+ ]).then(() => void 0), await this._drawerImportPromise, !0);
1072
1372
  }
1073
1373
  async _ensureDropdownReady() {
1074
1374
  customElements.get("scb-dropdown") || (this._dropdownImportPromise ??= import("../scb-dropdown/scb-dropdown.js").then(() => void 0), await this._dropdownImportPromise);
@@ -1146,34 +1446,114 @@ var u = {
1146
1446
  _syncFlags(e, t) {
1147
1447
  this.toggleAttribute("data-no-utility", e), this.toggleAttribute("data-no-search", t);
1148
1448
  }
1449
+ _emitSearchInput(e) {
1450
+ this.searchText = e, this.dispatchEvent(new CustomEvent("search-input", {
1451
+ detail: { value: this.searchText },
1452
+ bubbles: !0,
1453
+ composed: !0
1454
+ })), this.dispatchEvent(new CustomEvent("searchinput", {
1455
+ detail: { value: this.searchText },
1456
+ bubbles: !0,
1457
+ composed: !0
1458
+ })), this.dispatchEvent(new CustomEvent("search-text-change", {
1459
+ detail: { value: this.searchText },
1460
+ bubbles: !0,
1461
+ composed: !0
1462
+ })), this.dispatchEvent(new CustomEvent("searchtextchange", {
1463
+ detail: { value: this.searchText },
1464
+ bubbles: !0,
1465
+ composed: !0
1466
+ }));
1467
+ }
1468
+ _emitSearchChange(e, t) {
1469
+ this.searchText = e, this.dispatchEvent(new CustomEvent("search-change", {
1470
+ detail: {
1471
+ value: this.searchText,
1472
+ active: t
1473
+ },
1474
+ bubbles: !0,
1475
+ composed: !0
1476
+ })), this.dispatchEvent(new CustomEvent("searchchange", {
1477
+ detail: {
1478
+ value: this.searchText,
1479
+ active: t
1480
+ },
1481
+ bubbles: !0,
1482
+ composed: !0
1483
+ }));
1484
+ }
1149
1485
  _renderMenuButton(e = "", t = !1) {
1150
1486
  let n = e ? `menu-trigger ${e}` : "menu-trigger", i = (this.menuButtonLabel ?? "").trim() || "Meny", a = this._menuExpanded ? "true" : "false";
1151
1487
  return t ? r`
1152
- <scb-icon-button
1153
- class=${n}
1154
- icon="menu"
1155
- .size=${this.size}
1488
+ <button
1489
+ type="button"
1490
+ class=${`${n} header-icon-button`}
1156
1491
  aria-label=${i}
1157
1492
  aria-controls=${this._drawerId}
1158
1493
  aria-haspopup="dialog"
1159
1494
  aria-expanded=${a}
1160
1495
  title="Öppna meny"
1161
1496
  @click=${this._onMenuClick}
1162
- ></scb-icon-button>
1497
+ >
1498
+ <span class="header-symbol" aria-hidden="true">menu</span>
1499
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1500
+ </button>
1163
1501
  ` : r`
1164
- <scb-button
1165
- class=${n}
1166
- variant="text"
1167
- label=${i}
1168
- icon="menu"
1169
- trailing-icon
1170
- .size=${this.size}
1502
+ <button
1503
+ type="button"
1504
+ class=${`${n} header-text-button`}
1171
1505
  aria-controls=${this._drawerId}
1172
1506
  aria-haspopup="dialog"
1173
1507
  aria-expanded=${a}
1174
1508
  title="Öppna meny"
1175
1509
  @click=${this._onMenuClick}
1176
- ></scb-button>
1510
+ >
1511
+ <span>${i}</span>
1512
+ <span class="header-symbol" aria-hidden="true">menu</span>
1513
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1514
+ </button>
1515
+ `;
1516
+ }
1517
+ _renderSearchForm(e, t, n = !0, a = !1) {
1518
+ let o = this.searchPlaceholder ?? "", s = o.trim() || e, c = (this.searchText ?? "").length > 0;
1519
+ return r`
1520
+ <form
1521
+ class=${a ? "header-search header-search--mobile" : "header-search"}
1522
+ style=${t}
1523
+ role="search"
1524
+ @submit=${this._onNativeSearchSubmit}
1525
+ >
1526
+ <label class="header-search-field">
1527
+ <span class="header-search-icon header-symbol" aria-hidden="true">search</span>
1528
+ <span class="sr-only">${s}</span>
1529
+ <input
1530
+ id=${a ? i : this._searchId}
1531
+ class="header-search-input"
1532
+ type="search"
1533
+ .value=${this.searchText}
1534
+ placeholder=${o || i}
1535
+ aria-label=${s}
1536
+ @input=${this._onNativeSearchInput}
1537
+ />
1538
+ <md-focus-ring class="input-ring" aria-hidden="true"></md-focus-ring>
1539
+ <button
1540
+ type="button"
1541
+ class="header-search-clear"
1542
+ aria-label="Rensa sökfält"
1543
+ ?hidden=${!c}
1544
+ @click=${this._onNativeSearchClear}
1545
+ >
1546
+ <span class="header-symbol" aria-hidden="true">close</span>
1547
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1548
+ </button>
1549
+ </label>
1550
+ ${n ? r`
1551
+ <button type="submit" class="search-submit">
1552
+ ${e}
1553
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1554
+ </button>
1555
+ ` : i}
1556
+ </form>
1177
1557
  `;
1178
1558
  }
1179
1559
  render() {
@@ -1190,18 +1570,11 @@ var u = {
1190
1570
  ></slot>
1191
1571
 
1192
1572
  <div class="header-landmark">
1193
- <scb-grid
1194
- cols-compact="4"
1195
- cols-medium="8"
1196
- cols-expanded="12"
1197
- max-width=${this.maxWidth}
1198
- gap="0"
1573
+ <div
1574
+ class="header-grid"
1575
+ style=${`--scb-header-max-width:${this.maxWidth || "1440px"}`}
1199
1576
  >
1200
- <scb-grid-item
1201
- col-span-compact="4"
1202
- col-span-medium="8"
1203
- col-span-expanded="12"
1204
- >
1577
+ <div class="header-grid-item">
1205
1578
  <div class="top-row">
1206
1579
  <div class="logo-wrap">
1207
1580
  <a
@@ -1212,81 +1585,64 @@ var u = {
1212
1585
  ${this._renderLogo()}
1213
1586
  <span class="logo-text">${a}</span>
1214
1587
  </a>
1215
- <md-focus-ring></md-focus-ring>
1588
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1216
1589
  </div>
1217
1590
 
1218
1591
  <div class="actions">
1219
1592
  <nav class="utility" aria-label="Funktionslänkar">
1220
1593
  ${t.map((e) => r`
1221
- <scb-button
1222
- variant="text"
1223
- .href=${e.href}
1224
- .target=${e.target ?? ""}
1225
- label=${e.label}
1226
- ></scb-button>
1594
+ <a
1595
+ class="utility-link"
1596
+ href=${e.href}
1597
+ target=${e.target || i}
1598
+ rel=${e.target === "_blank" ? "noopener noreferrer" : i}
1599
+ >
1600
+ ${e.label}
1601
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1602
+ </a>
1227
1603
  `)}
1228
1604
  </nav>
1229
1605
 
1230
1606
  ${this.showSearch ? r`
1231
1607
  <div class="search" style=${c}>
1232
- <scb-search
1233
- id=${this._searchId}
1234
- .size=${this.size}
1235
- style=${c}
1236
- .value=${this.searchText}
1237
- .supportingText=${this.searchPlaceholder ?? ""}
1238
- @scb-search-input=${this._onSearchInput}
1239
- @scb-search-submit=${this._onSearchSubmit}
1240
- @scb-search-clear=${this._onSearchClear}
1241
- ></scb-search>
1242
- <scb-button
1243
- variant="filled-tonal"
1244
- label=${g}
1245
- .size=${this.size}
1246
- @click=${this._onSearchClick}
1247
- ></scb-button>
1608
+ ${this._renderSearchForm(g, c)}
1248
1609
  </div>
1249
1610
  ` : i}
1250
1611
  ${_ ? r`
1251
- <scb-icon-button
1252
- class="mobile-search-trigger"
1253
- variant="filled-tonal"
1254
- icon="search"
1255
- .size=${this.size}
1612
+ <button
1613
+ type="button"
1614
+ class="mobile-search-trigger header-icon-button"
1615
+ aria-label=${g}
1616
+ title=${g}
1256
1617
  @click=${this._onMobileSearchToggle}
1257
- ></scb-icon-button>
1618
+ >
1619
+ <span class="header-symbol" aria-hidden="true">search</span>
1620
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1621
+ </button>
1258
1622
  ` : i}
1259
1623
  ${m ? this._renderMenuButton("", !0) : i}
1260
1624
  </div>
1261
1625
 
1262
1626
  ${this.showSearch && this._mobileSearchOpen ? r`
1263
1627
  <div class="mobile-search-panel" style=${c}>
1264
- <scb-search
1265
- .size=${this.size}
1266
- style=${c}
1267
- .value=${this.searchText}
1268
- .supportingText=${this.searchPlaceholder ?? ""}
1269
- @scb-search-input=${this._onSearchInput}
1270
- @scb-search-submit=${this._onSearchSubmit}
1271
- @scb-search-clear=${this._onSearchClear}
1272
- ></scb-search>
1273
- <scb-icon-button
1274
- variant="filled-tonal"
1275
- icon="close"
1276
- .size=${this.size}
1628
+ ${this._renderSearchForm(g, c, !1, !0)}
1629
+ <button
1630
+ type="button"
1631
+ class="mobile-search-close header-icon-button"
1632
+ aria-label="Stäng sök"
1633
+ title="Stäng sök"
1277
1634
  @click=${this._onMobileSearchToggle}
1278
- ></scb-icon-button>
1635
+ >
1636
+ <span class="header-symbol" aria-hidden="true">close</span>
1637
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1638
+ </button>
1279
1639
  </div>
1280
1640
  ` : i}
1281
1641
 
1282
1642
  </div>
1283
- </scb-grid-item>
1643
+ </div>
1284
1644
 
1285
- <scb-grid-item
1286
- col-span-compact="4"
1287
- col-span-medium="8"
1288
- col-span-expanded="12"
1289
- >
1645
+ <div class="header-grid-item">
1290
1646
  <div class=${l || h ? "tabs-row" : "tabs-row tabs-row--empty"}>
1291
1647
  ${l ? u ? r`
1292
1648
  <div class="tabs-inset">
@@ -1317,7 +1673,7 @@ var u = {
1317
1673
  >
1318
1674
  ${e.label}
1319
1675
  </a>
1320
- <md-focus-ring></md-focus-ring>
1676
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1321
1677
  </div>
1322
1678
  ` : r`
1323
1679
  <div class="tab-wrap">
@@ -1330,7 +1686,7 @@ var u = {
1330
1686
  >
1331
1687
  ${e.label}
1332
1688
  </button>
1333
- <md-focus-ring></md-focus-ring>
1689
+ <md-focus-ring aria-hidden="true"></md-focus-ring>
1334
1690
  </div>
1335
1691
  `)}
1336
1692
  </nav>
@@ -1339,8 +1695,8 @@ var u = {
1339
1695
 
1340
1696
  ${h ? this._renderMenuButton("menu-trigger--tabs-right") : i}
1341
1697
  </div>
1342
- </scb-grid-item>
1343
- </scb-grid>
1698
+ </div>
1699
+ </div>
1344
1700
  <div class="divider" role="presentation"></div>
1345
1701
  </div>
1346
1702
 
@@ -1399,7 +1755,7 @@ var u = {
1399
1755
  "88px",
1400
1756
  "64px"
1401
1757
  ], t = (this.reserveTabsWidths ?? "").split(/[\s,]+/).map((e) => e.trim()).filter(Boolean).map((e) => /^\d+(?:\.\d+)?$/.test(e) ? `${e}px` : e), n = t.length > 0 ? t : e, i = Number(this.reserveTabsCount), a = Number.isFinite(i) && i > 0 ? Math.floor(i) : t.length > 0 ? t.length : e.length;
1402
- return r`${Array.from({ length: a }, (e, t) => n[t % n.length]).map((e) => r`<scb-skeleton variant="rounded" width=${e} height="16px"></scb-skeleton>`)}`;
1758
+ return r`${Array.from({ length: a }, (e, t) => n[t % n.length]).map((e) => r`<span class="tab-skeleton" style=${`inline-size:${e}`}></span>`)}`;
1403
1759
  }
1404
1760
  _renderLogo() {
1405
1761
  let e = (this.logoSrc ?? "").trim();