scb-wc 0.1.71 → 0.1.72
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.
- package/README.md +37 -51
- package/all.js +2 -0
- package/bin/scb-wc.mjs +39 -7
- package/blazor/ScbBlazorInteropBase.cs +9 -0
- package/index.js +90 -88
- package/mvc/components/all.js +2 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
- package/mvc/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
- package/mvc/components/scb-datepicker/scb-datepicker.js +296 -0
- package/mvc/components/scb-dropdown/scb-dropdown.js +2 -2
- package/mvc/components/scb-header/scb-header.js +65 -66
- package/mvc/components/scb-list/scb-list.js +1 -1
- package/mvc/components/scb-menu/scb-menu-item.js +1 -1
- package/mvc/components/scb-search/scb-search.js +6 -5
- package/mvc/components/scb-select/scb-select.js +1 -1
- package/mvc/components/scb-textfield/scb-textfield.js +24 -319
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/scb-wc-selfhost.css +3 -6
- package/package.json +2 -2
- package/scb-chevron/scb-chevron.js +1 -0
- package/scb-components/index.d.ts +99 -0
- package/scb-components/scb-chevron/scb-chevron.d.ts +11 -0
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +39 -0
- package/scb-components/scb-header/scb-header.d.ts +6 -3
- package/scb-components/scb-search/scb-search.d.ts +6 -0
- package/scb-datepicker/scb-datepicker.js +1 -0
- package/scb-header/scb-header.js +51 -37
- package/scb-search/scb-search.js +41 -22
- package/scb-wc-selfhost.css +3 -6
- package/scb-wc.bundle.js +237 -238
- package/scb-wc.d.ts +198 -194
- package/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/mvc/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/scb-wc-public-entry/index.d.ts +0 -97
package/mvc/scb-wc-selfhost.css
CHANGED
|
@@ -15,15 +15,12 @@
|
|
|
15
15
|
src: url('./fonts/inter/files/inter-latin-wght-italic.woff2') format('woff2');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/* Material Symbols Outlined (selfhost) */
|
|
18
|
+
/* Material Symbols Outlined (selfhost subset from scripts/icons.json) */
|
|
19
19
|
@font-face {
|
|
20
20
|
font-family: 'Material Symbols Outlined';
|
|
21
21
|
font-style: normal;
|
|
22
|
-
font-weight:
|
|
22
|
+
font-weight: 400;
|
|
23
23
|
font-display: swap;
|
|
24
|
-
src:
|
|
25
|
-
local('Material Symbols Outlined'),
|
|
26
|
-
local('MaterialSymbolsOutlined'),
|
|
27
|
-
url('./fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2') format('woff2');
|
|
24
|
+
src: url('./fonts/material-symbols-outlined/files/material-symbols-outlined-subset.woff2') format('woff2');
|
|
28
25
|
}
|
|
29
26
|
@keyframes scb-kf-fade-in{0%{opacity:0}to{opacity:1}}@keyframes scb-kf-fade-out{0%{opacity:1}to{opacity:0}}@keyframes scb-kf-slide-in{0%{opacity:0;transform:translate(var(--scb-kf-slide-from-x, -16px),var(--scb-kf-slide-from-y, 0px))}to{opacity:1;transform:translate(0,0)}}@keyframes scb-kf-slide-out{0%{opacity:1;transform:translate(0,0)}to{opacity:0;transform:translate(var(--scb-kf-slide-to-x, 16px),var(--scb-kf-slide-to-y, 0px))}}@keyframes scb-kf-scale-in{0%{opacity:0;transform:scale(var(--scb-kf-scale-from, 0.96))}to{opacity:1;transform:scale(1)}}@keyframes scb-kf-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(var(--scb-kf-scale-to, 0.98))}}@keyframes scb-kf-pulse{0%,to{transform:scale(1)}50%{transform:scale(var(--scb-kf-pulse-scale, 1.04))}}:root{color-scheme:light dark;--p-100:#FFFFFF;--p-99:#FAFDFF;--p-95:#EBF8FF;--p-90:#D6F1FF;--p-80:#B8E7FF;--p-70:#99D1FF;--p-60:#75AFFF;--p-50:#477EFF;--p-40:#1F44FF;--p-30:#1E00BE;--p-20:#0F0865;--p-10:#0B0544;--p-0:#000000;--s-100:#FFFFFF;--s-99:#FFFAFF;--s-95:#FFEBFF;--s-90:#FFDBFF;--s-80:#FFC2FF;--s-70:#FA9EFA;--s-60:#EC75F0;--s-50:#D850E2;--s-40:#B633C1;--s-30:#91219C;--s-20:#6A1471;--s-10:#430449;--s-0:#000000;--t-100:#FFFFFF;--t-99:#FAFFFA;--t-95:#E7FEE9;--t-90:#C1FAC9;--t-80:#91EDAD;--t-70:#50E294;--t-60:#00CC7B;--t-50:#00A865;--t-40:#008A53;--t-30:#007041;--t-20:#004D2D;--t-10:#00331E;--t-0:#000000;--e-100:#FFFFFF;--e-99:#FFFBFA;--e-95:#FFFEEB;--e-90:#FFD7C7;--e-80:#FFB699;--e-70:#FA9269;--e-60:#ED7140;--e-50:#DB490F;--e-40:#BF3600;--e-30:#942500;--e-20:#631900;--e-10:#3D0C00;--e-0:#000000;--w-100:#FFFFFF;--w-99:#FFFCEB;--w-95:#FFF7D1;--w-90:#FEEEA0;--w-80:#FCE369;--w-70:#F3D53F;--w-60:#E6C10A;--w-50:#D1A400;--w-40:#B28C00;--w-30:#8F7200;--w-20:#6B5600;--w-10:#473800;--w-0:#000000;--n-100:#FFFFFF;--n-99:#FAFAFA;--n-95:#F0F0F0;--n-90:#DBDBDB;--n-80:#CCCCCC;--n-70:#B3B3B3;--n-60:#999999;--n-50:#808080;--n-40:#666666;--n-30:#4D4D4D;--n-20:#333333;--n-10:#1A1A1A;--n-0:#000000;--nv-100:#FFFFFF;--nv-99:#FDFCF7;--nv-95:#F9F8EF;--nv-90:#EAE7D7;--nv-80:#D7D4BC;--nv-70:#BEB39D;--nv-60:#A69D8C;--nv-50:#726F65;--nv-40:#504F49;--nv-30:#3B3A35;--nv-20:#2B2A27;--nv-10:#1B1A18;--nv-0:#000000;--brand-font:"Inter", sans-serif;--weight-regular:400;--weight-semibold:600;--weight-bold:700;--scale-01:12px;--scale-02:14px;--scale-03:16px;--scale-04:18px;--scale-05:20px;--scale-06:24px;--scale-07:28px;--scale-08:32px;--scale-09:36px;--scale-10:40px;--scale-11:48px;--scale-12:64px;--scale-13:80px;--spacing-neg-4:-12px;--spacing-neg-3:-8px;--spacing-neg-2:-4px;--spacing-neg-1:-2px;--spacing-0:0px;--spacing-1:2px;--spacing-2:4px;--spacing-3:8px;--spacing-4:12px;--spacing-5:16px;--spacing-6:20px;--spacing-7:24px;--spacing-8:32px;--spacing-9:40px;--spacing-10:48px;--spacing-11:64px;--spacing-12:80px;--spacing-13:96px;--spacing-14:120px;--line-height-01:18px;--line-height-02:20px;--line-height-03:24px;--line-height-04:26px;--line-height-05:28px;--line-height-06:32px;--line-height-07:34px;--line-height-08:38px;--line-height-09:42px;--line-height-10:56px;--line-height-11:76px;--tracking-01:0px;--tracking-02:-0.1px;--tracking-03:-0.15px;--tracking-04:-0.3px;--tracking-05:-0.4px;--tracking-06:-0.6px;--tracking-07:-0.7px;--md-sys-typescale-display-large-font:var(--brand-font);--md-sys-typescale-display-large-size:40px;--md-sys-typescale-display-large-line-height:46px;--md-sys-typescale-display-large-weight:var(--weight-bold);--md-sys-typescale-display-large-tracking:-0.7px;--md-sys-typescale-display-medium-font:var(--brand-font);--md-sys-typescale-display-medium-size:36px;--md-sys-typescale-display-medium-line-height:42px;--md-sys-typescale-display-medium-weight:var(--weight-bold);--md-sys-typescale-display-medium-tracking:-0.6px;--md-sys-typescale-display-small-font:var(--brand-font);--md-sys-typescale-display-small-size:32px;--md-sys-typescale-display-small-line-height:38px;--md-sys-typescale-display-small-weight:var(--weight-bold);--md-sys-typescale-display-small-tracking:-0.6px;--md-sys-typescale-headline-large-font:var(--brand-font);--md-sys-typescale-headline-large-size:28px;--md-sys-typescale-headline-large-line-height:34px;--md-sys-typescale-headline-large-weight:var(--weight-bold);--md-sys-typescale-headline-large-tracking:-0.6px;--md-sys-typescale-headline-medium-font:var(--brand-font);--md-sys-typescale-headline-medium-size:24px;--md-sys-typescale-headline-medium-line-height:30px;--md-sys-typescale-headline-medium-weight:var(--weight-bold);--md-sys-typescale-headline-medium-tracking:-0.6px;--md-sys-typescale-headline-small-font:var(--brand-font);--md-sys-typescale-headline-small-size:22px;--md-sys-typescale-headline-small-line-height:28px;--md-sys-typescale-headline-small-weight:var(--weight-bold);--md-sys-typescale-headline-small-tracking:-0.5px;--md-sys-typescale-title-large-font:var(--brand-font);--md-sys-typescale-title-large-size:20px;--md-sys-typescale-title-large-line-height:28px;--md-sys-typescale-title-large-weight:var(--weight-semibold);--md-sys-typescale-title-large-tracking:-0.4px;--md-sys-typescale-title-medium-font:var(--brand-font);--md-sys-typescale-title-medium-size:18px;--md-sys-typescale-title-medium-line-height:26px;--md-sys-typescale-title-medium-weight:var(--weight-semibold);--md-sys-typescale-title-medium-tracking:-0.3px;--md-sys-typescale-title-small-font:var(--brand-font);--md-sys-typescale-title-small-size:16px;--md-sys-typescale-title-small-line-height:24px;--md-sys-typescale-title-small-weight:var(--weight-semibold);--md-sys-typescale-title-small-tracking:-0.15px;--md-sys-typescale-label-large-font:var(--brand-font);--md-sys-typescale-label-large-size:18px;--md-sys-typescale-label-large-line-height:26px;--md-sys-typescale-label-large-weight:var(--weight-semibold);--md-sys-typescale-label-large-tracking:-0.3px;--md-sys-typescale-label-medium-font:var(--brand-font);--md-sys-typescale-label-medium-size:16px;--md-sys-typescale-label-medium-line-height:24px;--md-sys-typescale-label-medium-weight:var(--weight-semibold);--md-sys-typescale-label-medium-tracking:-0.15px;--md-sys-typescale-label-small-font:var(--brand-font);--md-sys-typescale-label-small-size:14px;--md-sys-typescale-label-small-line-height:20px;--md-sys-typescale-label-small-weight:var(--weight-semibold);--md-sys-typescale-label-small-tracking:0.1px;--md-sys-typescale-body-large-font:var(--brand-font);--md-sys-typescale-body-large-size:18px;--md-sys-typescale-body-large-line-height:26px;--md-sys-typescale-body-large-weight:var(--weight-regular);--md-sys-typescale-body-large-tracking:-0.3px;--md-sys-typescale-body-medium-font:var(--brand-font);--md-sys-typescale-body-medium-size:16px;--md-sys-typescale-body-medium-line-height:24px;--md-sys-typescale-body-medium-weight:var(--weight-regular);--md-sys-typescale-body-medium-tracking:-0.15px;--md-sys-typescale-body-small-font:var(--brand-font);--md-sys-typescale-body-small-size:14px;--md-sys-typescale-body-small-line-height:20px;--md-sys-typescale-body-small-weight:var(--weight-regular);--md-sys-typescale-body-small-tracking:-0.1px;--md-sys-color-primary:light-dark(var(--p-40), var(--p-70));--md-sys-color-on-primary:light-dark(var(--p-100), var(--p-20));--md-sys-color-primary-container:light-dark(var(--p-80), var(--p-30));--md-sys-color-on-primary-container:light-dark(var(--p-30), var(--p-100));--md-sys-color-primary-fixed:light-dark(var(--p-90), var(--p-90));--md-sys-color-primary-fixed-dim:light-dark(var(--p-80), var(--p-80));--md-sys-color-on-primary-fixed:light-dark(var(--p-20), var(--p-20));--md-sys-color-on-primary-fixed-variant:light-dark(var(--p-30), var(--p-30));--md-sys-color-secondary:light-dark(var(--p-20), var(--p-80));--md-sys-color-on-secondary:light-dark(var(--p-100), var(--p-20));--md-sys-color-secondary-container:light-dark(var(--p-90), var(--p-30));--md-sys-color-on-secondary-container:light-dark(var(--p-30), var(--p-100));--md-sys-color-secondary-fixed:light-dark(var(--p-90), var(--p-90));--md-sys-color-secondary-fixed-dim:light-dark(var(--p-80), var(--p-80));--md-sys-color-on-secondary-fixed:light-dark(var(--p-20), var(--p-20));--md-sys-color-on-secondary-fixed-variant:light-dark(var(--p-30), var(--p-30));--md-sys-color-tertiary:light-dark(var(--s-40), var(--s-80));--md-sys-color-on-tertiary:light-dark(var(--t-100), var(--s-20));--md-sys-color-tertiary-container:light-dark(var(--s-90), var(--s-10));--md-sys-color-on-tertiary-container:light-dark(var(--s-20), var(--s-100));--md-sys-color-tertiary-fixed:light-dark(var(--s-90), var(--s-90));--md-sys-color-tertiary-fixed-dim:light-dark(var(--s-80), var(--s-80));--md-sys-color-on-tertiary-fixed:light-dark(var(--s-10), var(--s-10));--md-sys-color-on-tertiary-fixed-variant:light-dark(var(--s-30), var(--s-30));--md-sys-color-background:light-dark(var(--p-100), var(--p-0));--md-sys-color-on-background:light-dark(var(--p-20), var(--p-100));--md-sys-color-surface:light-dark(var(--nv-100), var(--nv-20));--md-sys-color-surface-variant:light-dark(var(--nv-99), var(--n-10));--md-sys-color-surface-bright:light-dark(var(--nv-99), var(--nv-20));--md-sys-color-surface-dim:light-dark(var(--nv-95), var(--nv-10));--md-sys-color-surface-container-lowest:light-dark(var(--p-100), var(--nv-0));--md-sys-color-surface-container-low:light-dark(var(--p-99), var(--nv-10));--md-sys-color-surface-container:light-dark(var(--p-95), var(--nv-20));--md-sys-color-surface-container-high:light-dark(var(--p-90), var(--nv-20));--md-sys-color-surface-container-highest:light-dark(var(--p-80), var(--nv-20));--md-sys-color-surface-tint:light-dark(var(--p-40), var(--p-70));--md-sys-color-on-surface:light-dark(var(--p-20), var(--p-100));--md-sys-color-on-surface-variant:light-dark(var(--p-20), var(--p-100));--md-sys-color-inverse-surface:light-dark(var(--p-20), var(--p-90));--md-sys-color-inverse-on-surface:light-dark(var(--p-95), var(--p-20));--md-sys-color-inverse-primary:light-dark(var(--p-80), var(--p-40));--md-sys-color-outline:light-dark(var(--n-50), var(--n-30));--md-sys-color-outline-variant:light-dark(var(--n-80), var(--n-30));--md-sys-color-scrim:light-dark(var(--n-0), var(--n-0));--md-sys-color-shadow:light-dark(var(--n-0), var(--n-0));--md-sys-color-error:light-dark(var(--e-40), var(--e-80));--md-sys-color-on-error:light-dark(var(--e-100), var(--e-20));--md-sys-color-error-container:light-dark(var(--e-90), var(--e-20));--md-sys-color-on-error-container:light-dark(var(--e-30), var(--e-95));--md-sys-color-warning:light-dark(var(--w-40), var(--w-80));--md-sys-color-on-warning:light-dark(var(--w-100), var(--w-20));--md-sys-color-warning-container:light-dark(var(--w-90), var(--w-20));--md-sys-color-on-warning-container:light-dark(var(--w-20), var(--w-95));--md-sys-color-info:light-dark(var(--p-40), var(--p-80));--md-sys-color-on-info:light-dark(var(--p-100), var(--p-20));--md-sys-color-info-container:light-dark(var(--p-90), var(--p-20));--md-sys-color-on-info-container:light-dark(var(--p-30), var(--p-95));--md-sys-color-success:light-dark(var(--t-40), var(--t-80));--md-sys-color-on-success:light-dark(var(--t-100), var(--t-20));--md-sys-color-success-container:light-dark(var(--t-95), var(--t-20));--md-sys-color-on-success-container:light-dark(var(--t-30), var(--t-95));--radius-none:0px;--radius-xs:4px;--radius-s:8px;--radius-m:12px;--radius-l:16px;--radius-xl:24px;--radius-full:1000px;--md-sys-shape-corner-none:var(--radius-none);--md-sys-shape-corner-extra-small:var(--radius-xs);--md-sys-shape-corner-small:var(--radius-s);--md-sys-shape-corner-medium:var(--radius-m);--md-sys-shape-corner-large:var(--radius-l);--md-sys-shape-corner-extra-large:var(--radius-xl);--md-sys-shape-corner-full:var(--radius-full);--stroke-border:1px;--stroke-focus-ring:3px;--md-focus-ring-color:light-dark(var(--p-40), var(--p-80));--md-focus-ring-width:var(--stroke-focus-ring);--md-outlined-button-outline-width:var(--stroke-border);--md-outlined-field-outline-width:var(--stroke-border);--icon-size-small:20px;--icon-size-medium:24px;--icon-size-large:30px;--icon-size-extra-large:36px;--icon-size-extra-extra-large:48px;--icon-size-number:0px}:root[data-density="-2"],[data-density="-2"]{--spacing-0:0px;--spacing-1:0px;--spacing-2:2px;--spacing-3:6px;--spacing-4:10px;--spacing-5:14px;--spacing-6:18px;--spacing-7:20px;--spacing-8:28px;--spacing-9:36px;--spacing-10:42px;--spacing-11:56px;--spacing-12:72px;--spacing-13:88px;--spacing-14:112px}:root[data-density="-4"],[data-density="-4"]{--spacing-0:0px;--spacing-1:0px;--spacing-2:0px;--spacing-3:4px;--spacing-4:8px;--spacing-5:12px;--spacing-6:16px;--spacing-7:16px;--spacing-8:24px;--spacing-9:30px;--spacing-10:36px;--spacing-11:50px;--spacing-12:64px;--spacing-13:80px;--spacing-14:104px}@media (min-width:600px){:root{--md-sys-typescale-display-large-size:64px;--md-sys-typescale-display-large-line-height:70px;--md-sys-typescale-display-large-tracking:-0.9px;--md-sys-typescale-display-medium-size:48px;--md-sys-typescale-display-medium-line-height:54px;--md-sys-typescale-display-medium-tracking:-0.7px;--md-sys-typescale-display-small-size:36px;--md-sys-typescale-display-small-line-height:42px;--md-sys-typescale-display-small-tracking:-0.6px;--md-sys-typescale-headline-large-size:32px;--md-sys-typescale-headline-large-line-height:38px;--md-sys-typescale-headline-large-tracking:-0.6px;--md-sys-typescale-headline-medium-size:28px;--md-sys-typescale-headline-medium-line-height:34px;--md-sys-typescale-headline-medium-tracking:-0.6px;--md-sys-typescale-headline-small-size:24px;--md-sys-typescale-headline-small-line-height:30px;--md-sys-typescale-headline-small-tracking:-0.6px}}:root{--motion-scale-1:0.98;--motion-scale-2:0.96;--motion-scale-3:0.94;--motion-scale-4:0.92;--motion-scale-5:0.90;--motion-distance-0:0px;--motion-distance-1:4px;--motion-distance-2:8px;--motion-distance-3:12px;--motion-distance-4:16px;--motion-scale:var(--motion-scale-3);--motion-easing-linear:cubic-bezier(0, 0, 1, 1);--motion-easing-standard:cubic-bezier(0.2, 0, 0, 1);--motion-easing-standard-accelerate:cubic-bezier(0.3, 0, 1, 1);--motion-easing-standard-decelerate:cubic-bezier(0, 0, 0, 1);--motion-easing-emphasized:var(--motion-easing-emphasized-decelerate);--motion-easing-emphasized-accelerate:cubic-bezier(0.3, 0, 0.8, 0.15);--motion-easing-emphasized-decelerate:cubic-bezier(0.05, 0.7, 0.1, 1);--motion-duration-short:calc(200ms * var(--motion-scale));--motion-duration-medium:calc(300ms * var(--motion-scale));--motion-duration-long:calc(500ms * var(--motion-scale));--motion-duration-extra-long:calc(700ms * var(--motion-scale));--motion-keyframe-fade-in:scb-kf-fade-in;--motion-keyframe-fade-out:scb-kf-fade-out;--motion-keyframe-slide-in:scb-kf-slide-in;--motion-keyframe-slide-out:scb-kf-slide-out;--motion-keyframe-scale-in:scb-kf-scale-in;--motion-keyframe-scale-out:scb-kf-scale-out;--motion-keyframe-pulse:scb-kf-pulse}:root[data-motion-scale="1"],[data-motion-scale="1"]{--motion-scale:var(--motion-scale-1)}:root[data-motion-scale="2"],[data-motion-scale="2"]{--motion-scale:var(--motion-scale-2)}:root[data-motion-scale="3"],[data-motion-scale="3"]{--motion-scale:var(--motion-scale-3)}:root[data-motion-scale="4"],[data-motion-scale="4"]{--motion-scale:var(--motion-scale-4)}:root[data-motion-scale="5"],[data-motion-scale="5"]{--motion-scale:var(--motion-scale-5)}@media (prefers-reduced-motion:reduce){:root{--motion-scale:var(--motion-scale-1)}}scb-app-bar:not(:defined),scb-breadcrumb:not(:defined),scb-header:not(:defined){display:block}scb-header:not(:defined){min-block-size:var(--scb-header-pre-upgrade-height, 136px)}scb-breadcrumb:not(:defined){min-block-size:var(--scb-breadcrumb-pre-upgrade-height, 48px)}scb-app-bar:not(:defined){min-block-size:var(--scb-app-bar-pre-upgrade-height, 64px)}label{color:light-dark(var(--p-10),var(--p-100))}fieldset.scb-fieldset{border:0;padding:0;margin:0}fieldset.scb-fieldset+fieldset.scb-fieldset{margin-block-start:var(--spacing-8, 32px)}legend.scb-legend{display:block;margin:0 0 var(--spacing-6, 20px)0;font-family:var(--brand-font);font-size:var(--md-sys-typescale-title-small-size);line-height:var(--md-sys-typescale-title-small-line-height);font-weight:var(--weight-semibold);letter-spacing:var(--md-sys-typescale-title-small-tracking);color:var(--md-sys-color-on-surface)}fieldset.scb-fieldset[disabled]{opacity:.7}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.72",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -460,5 +460,5 @@
|
|
|
460
460
|
},
|
|
461
461
|
"./mvc/*": "./mvc/*"
|
|
462
462
|
},
|
|
463
|
-
"buildHash": "
|
|
463
|
+
"buildHash": "27AC2B35C55FCBEF9FEB3CD7588D1231AB9E90EF3131B09B415AD68C9248EC12"
|
|
464
464
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export * from './scb-accordion/scb-accordion-item';
|
|
2
|
+
export * from './scb-accordion/scb-accordion';
|
|
3
|
+
export * from './scb-action-card/scb-action-card';
|
|
4
|
+
export * from './scb-app-bar/scb-app-bar';
|
|
5
|
+
export * from './scb-avatar/scb-avatar';
|
|
6
|
+
export * from './scb-badge/scb-badge';
|
|
7
|
+
export * from './scb-breadcrumb/scb-breadcrumb-item';
|
|
8
|
+
export * from './scb-breadcrumb/scb-breadcrumb';
|
|
9
|
+
export * from './scb-button/scb-button';
|
|
10
|
+
export * from './scb-calendar/scb-calendar-event';
|
|
11
|
+
export * from './scb-calendar/scb-calendar';
|
|
12
|
+
export * from './scb-calendar-card/scb-calendar-card';
|
|
13
|
+
export * from './scb-card/scb-action-card';
|
|
14
|
+
export * from './scb-card/scb-card';
|
|
15
|
+
export * from './scb-card/scb-container-card';
|
|
16
|
+
export * from './scb-card/scb-link-card';
|
|
17
|
+
export * from './scb-card/scb-list-card';
|
|
18
|
+
export * from './scb-card/scb-social-card';
|
|
19
|
+
export * from './scb-checkbox/scb-checkbox-group';
|
|
20
|
+
export * from './scb-checkbox/scb-checkbox';
|
|
21
|
+
export * from './scb-chevron/scb-chevron';
|
|
22
|
+
export * from './scb-chip/scb-chip';
|
|
23
|
+
export * from './scb-collapse/scb-collapse';
|
|
24
|
+
export * from './scb-container-card/scb-container-card';
|
|
25
|
+
export * from './scb-cookies-consent/scb-cookies-consent';
|
|
26
|
+
export * from './scb-datepicker/scb-datepicker';
|
|
27
|
+
export * from './scb-dialog/scb-dialog';
|
|
28
|
+
export * from './scb-divider/scb-divider';
|
|
29
|
+
export * from './scb-drawer/scb-drawer';
|
|
30
|
+
export * from './scb-drop-zone/scb-drop-zone';
|
|
31
|
+
export * from './scb-dropdown/scb-dropdown';
|
|
32
|
+
export * from './scb-fab/scb-fab';
|
|
33
|
+
export * from './scb-fact-card/scb-fact-card-content';
|
|
34
|
+
export * from './scb-fact-card/scb-fact-card';
|
|
35
|
+
export * from './scb-footer/scb-footer-section';
|
|
36
|
+
export * from './scb-footer/scb-footer';
|
|
37
|
+
export * from './scb-gallery-grid/scb-gallery-grid';
|
|
38
|
+
export * from './scb-grid/scb-grid-item';
|
|
39
|
+
export * from './scb-grid/scb-grid';
|
|
40
|
+
export * from './scb-grid/scb-stack';
|
|
41
|
+
export * from './scb-header/scb-header-menu-group';
|
|
42
|
+
export * from './scb-header/scb-header-menu-item';
|
|
43
|
+
export * from './scb-header/scb-header-tab';
|
|
44
|
+
export * from './scb-header/scb-header-utility';
|
|
45
|
+
export * from './scb-header/scb-header';
|
|
46
|
+
export * from './scb-horizontal-scroller/scb-horizontal-scroller';
|
|
47
|
+
export * from './scb-icon-button/scb-icon-button';
|
|
48
|
+
export * from './scb-keyfigure-card/scb-keyfigure-card';
|
|
49
|
+
export * from './scb-link/scb-link';
|
|
50
|
+
export * from './scb-link-card/scb-link-card';
|
|
51
|
+
export * from './scb-list/scb-list-item';
|
|
52
|
+
export * from './scb-list/scb-list';
|
|
53
|
+
export * from './scb-list-card/scb-list-card';
|
|
54
|
+
export * from './scb-menu/scb-menu-item';
|
|
55
|
+
export * from './scb-menu/scb-menu-section';
|
|
56
|
+
export * from './scb-menu/scb-menu';
|
|
57
|
+
export * from './scb-menu/scb-sub-menu';
|
|
58
|
+
export * from './scb-nav/scb-nav-item';
|
|
59
|
+
export * from './scb-nav/scb-nav';
|
|
60
|
+
export * from './scb-notification-card/scb-notification-card';
|
|
61
|
+
export * from './scb-options-menu/scb-options-menu-item';
|
|
62
|
+
export * from './scb-options-menu/scb-options-menu';
|
|
63
|
+
export * from './scb-options-menu/scb-options-sub-menu';
|
|
64
|
+
export * from './scb-overlay/scb-overlay';
|
|
65
|
+
export * from './scb-pagination/scb-pagination';
|
|
66
|
+
export * from './scb-progress-indicator/scb-progress-indicator';
|
|
67
|
+
export * from './scb-progress-stepper/scb-progress-step';
|
|
68
|
+
export * from './scb-progress-stepper/scb-progress-stepper';
|
|
69
|
+
export * from './scb-radio-button/scb-radio-button';
|
|
70
|
+
export * from './scb-radio-button/scb-radio-group';
|
|
71
|
+
export * from './scb-scrollspy/scb-scrollspy';
|
|
72
|
+
export * from './scb-search/scb-search';
|
|
73
|
+
export * from './scb-segmented-button/scb-segmented-button';
|
|
74
|
+
export * from './scb-segmented-button/scb-segmented-item';
|
|
75
|
+
export * from './scb-select/scb-select-option';
|
|
76
|
+
export * from './scb-select/scb-select';
|
|
77
|
+
export * from './scb-skeleton/scb-skeleton';
|
|
78
|
+
export * from './scb-slider/scb-slider';
|
|
79
|
+
export * from './scb-snackbar/scb-snackbar';
|
|
80
|
+
export * from './scb-social-card/scb-social-card';
|
|
81
|
+
export * from './scb-status-pill/scb-status-pill';
|
|
82
|
+
export * from './scb-stepper/scb-step';
|
|
83
|
+
export * from './scb-stepper/scb-stepper';
|
|
84
|
+
export * from './scb-switch/scb-switch';
|
|
85
|
+
export * from './scb-table/scb-table';
|
|
86
|
+
export * from './scb-table-advanced/scb-table-advanced';
|
|
87
|
+
export * from './scb-tabs/scb-primary-tab';
|
|
88
|
+
export * from './scb-tabs/scb-secondary-tab';
|
|
89
|
+
export * from './scb-tabs/scb-tabs';
|
|
90
|
+
export * from './scb-textfield/scb-textfield';
|
|
91
|
+
export * from './scb-toc/scb-toc-item';
|
|
92
|
+
export * from './scb-toc/scb-toc';
|
|
93
|
+
export * from './scb-tooltip/scb-tooltip';
|
|
94
|
+
export * from './scb-viz/scb-viz-actions-runtime';
|
|
95
|
+
export * from './scb-viz/scb-viz-print-runtime';
|
|
96
|
+
export * from './scb-viz/scb-viz-series-differentiation-registry';
|
|
97
|
+
export * from './scb-viz/scb-viz-series-differentiation-runtime';
|
|
98
|
+
export * from './scb-viz/scb-viz-table-runtime';
|
|
99
|
+
export * from './scb-viz/scb-viz';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ScbChevron extends LitElement {
|
|
3
|
+
open: boolean;
|
|
4
|
+
static styles: import('lit').CSSResult;
|
|
5
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'scb-chevron': ScbChevron;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
export declare class ScbDatepicker extends LitElement {
|
|
3
|
+
private _currentDate;
|
|
4
|
+
private _selectedDate;
|
|
5
|
+
private _showMonthDropdown;
|
|
6
|
+
private _showYearDropdown;
|
|
7
|
+
variant: 'datetime-local' | 'date';
|
|
8
|
+
lang: 'sv' | 'en';
|
|
9
|
+
selectedValue: string;
|
|
10
|
+
open: boolean;
|
|
11
|
+
private _selectedHour;
|
|
12
|
+
private _selectedMinute;
|
|
13
|
+
private readonly _viewportMargin;
|
|
14
|
+
private readonly _popupOffset;
|
|
15
|
+
private _onWindowReposition;
|
|
16
|
+
private _isRenderedInsideDialog;
|
|
17
|
+
private _positionPopupWithinViewport;
|
|
18
|
+
static styles: import('lit').CSSResult[];
|
|
19
|
+
updated(changed: PropertyValues): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
|
+
private _monthNames;
|
|
22
|
+
render(): TemplateResult;
|
|
23
|
+
private _getMonthDays;
|
|
24
|
+
private _outsideClickHandler;
|
|
25
|
+
private _toggleMonthDropdown;
|
|
26
|
+
private _toggleYearDropdown;
|
|
27
|
+
private _onMonthChangeCustom;
|
|
28
|
+
private _onYearChangeCustom;
|
|
29
|
+
private _prevMonth;
|
|
30
|
+
private _prevYear;
|
|
31
|
+
private _nextMonth;
|
|
32
|
+
private _nextYear;
|
|
33
|
+
private _isToday;
|
|
34
|
+
private _isSelected;
|
|
35
|
+
private _selectDate;
|
|
36
|
+
private _fireDateTimeChange;
|
|
37
|
+
private _onTimeChange;
|
|
38
|
+
private _close;
|
|
39
|
+
}
|
|
@@ -18,9 +18,9 @@ export type ScbHeaderSize = 'small' | 'medium' | 'large';
|
|
|
18
18
|
export declare class ScbHeader extends LitElement {
|
|
19
19
|
constructor();
|
|
20
20
|
maxWidth: string;
|
|
21
|
-
spacing
|
|
22
|
-
spacingTop
|
|
23
|
-
spacingBottom
|
|
21
|
+
spacing?: string;
|
|
22
|
+
spacingTop?: string;
|
|
23
|
+
spacingBottom?: string;
|
|
24
24
|
size: ScbHeaderSize;
|
|
25
25
|
logoText: string;
|
|
26
26
|
logotypeText: string;
|
|
@@ -65,6 +65,7 @@ export declare class ScbHeader extends LitElement {
|
|
|
65
65
|
private _drawerReady;
|
|
66
66
|
private _mobileSearchOpen;
|
|
67
67
|
private _drawerImportPromise?;
|
|
68
|
+
private _dropdownImportPromise?;
|
|
68
69
|
private _initialUpgradeComplete;
|
|
69
70
|
private _slotNavItems;
|
|
70
71
|
private _slotUtils;
|
|
@@ -118,10 +119,12 @@ export declare class ScbHeader extends LitElement {
|
|
|
118
119
|
disconnectedCallback(): void;
|
|
119
120
|
private _mapSpacingToken;
|
|
120
121
|
private _applySpacing;
|
|
122
|
+
private _syncLandmarkAttributes;
|
|
121
123
|
private _applyLogoSizing;
|
|
122
124
|
private _closeDrawerNow;
|
|
123
125
|
private _openDrawerNow;
|
|
124
126
|
private _ensureDrawerReady;
|
|
127
|
+
private _ensureDropdownReady;
|
|
125
128
|
private _onDrawerOpened;
|
|
126
129
|
private _onDrawerClosed;
|
|
127
130
|
private _syncMenuBtnAria;
|
|
@@ -21,10 +21,14 @@ export declare class ScbSearch extends LitElement {
|
|
|
21
21
|
fullScreen: boolean;
|
|
22
22
|
private _inputFocused;
|
|
23
23
|
private _visibleSuggestions;
|
|
24
|
+
private _listDepsLoaded;
|
|
24
25
|
private _activeIndex;
|
|
25
26
|
private _listboxId;
|
|
26
27
|
private _boundNativeKeydown?;
|
|
27
28
|
private _kbMode;
|
|
29
|
+
private _listDepsPromise?;
|
|
30
|
+
private _ensureListDepsLoaded;
|
|
31
|
+
private _ensureListDepsWhenNeeded;
|
|
28
32
|
private _valueOnFocus;
|
|
29
33
|
private _lastChangeValue;
|
|
30
34
|
private _kbShouldShowRing;
|
|
@@ -54,6 +58,8 @@ export declare class ScbSearch extends LitElement {
|
|
|
54
58
|
get validationMessage(): string;
|
|
55
59
|
get willValidate(): boolean;
|
|
56
60
|
submit(): void;
|
|
61
|
+
focus(options?: FocusOptions): void;
|
|
62
|
+
blur(): void;
|
|
57
63
|
private get _hasSuggestions();
|
|
58
64
|
private _onSlotChange;
|
|
59
65
|
private _onInput;
|
|
@@ -467,3 +467,4 @@ var s = class extends t {
|
|
|
467
467
|
};
|
|
468
468
|
e([o()], s.prototype, "_currentDate", void 0), e([o()], s.prototype, "_selectedDate", void 0), e([o()], s.prototype, "_showMonthDropdown", void 0), e([o()], s.prototype, "_showYearDropdown", void 0), e([a({ type: String })], s.prototype, "variant", void 0), e([a({ type: String })], s.prototype, "lang", void 0), e([a({ type: String })], s.prototype, "selectedValue", void 0), e([a({ type: Boolean })], s.prototype, "open", void 0), e([o()], s.prototype, "_selectedHour", void 0), e([o()], s.prototype, "_selectedMinute", void 0), s = e([i("scb-datepicker")], s);
|
|
469
469
|
//#endregion
|
|
470
|
+
export { s as ScbDatepicker };
|
package/scb-header/scb-header.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpe
|
|
|
2
2
|
import "../scb-button/scb-button.js";
|
|
3
3
|
import "../scb-icon-button/scb-icon-button.js";
|
|
4
4
|
import "../scb-search/scb-search.js";
|
|
5
|
-
import "../scb-dropdown/scb-dropdown.js";
|
|
6
5
|
import "../scb-grid/scb-grid-item.js";
|
|
7
6
|
import "../scb-grid/scb-grid.js";
|
|
8
7
|
import "../scb-skeleton/scb-skeleton.js";
|
|
@@ -105,7 +104,7 @@ var u = {
|
|
|
105
104
|
c = this;
|
|
106
105
|
}
|
|
107
106
|
constructor() {
|
|
108
|
-
super(), this.maxWidth = "1440px", this.
|
|
107
|
+
super(), this.maxWidth = "1440px", this.size = "medium", this.logoText = "", this.logotypeText = "", this.logoAlt = "", this.logoHref = "/", this.logoSrc = "", this.logoWidth = "", this.logoHeight = "", this.logoAspectRatio = "", this.logoInvertDm = !1, this.banner = !1, this.tabs = [], this.activeTab = null, this.reserveTabs = !1, this.layoutPending = !1, this.utilityItems = [], this.searchButtonLabel = "Sök", this.menuButtonLabel = "Meny", this.deferDrawer = !1, this.showDrawer = !0, this.alwaysShowMenuButton = !1, this.showSearch = !0, this.includeUtilityInMenu = !1, this.drawerOverlay = !0, this.searchText = "", this._drawerId = "main-drawer", this._menuExpanded = !1, this._searchId = "header-search", this._drawerReady = !1, this._mobileSearchOpen = !1, this._initialUpgradeComplete = !1, this._slotNavItems = [], this._slotUtils = [], this._slotMenu = [], this._measureScheduled = !1, this._scheduleMeasure = () => {
|
|
109
108
|
this.layoutPending || this._measureScheduled || (this._measureScheduled = !0, requestAnimationFrame(() => {
|
|
110
109
|
this._measureScheduled = !1, this._measure();
|
|
111
110
|
}));
|
|
@@ -125,11 +124,11 @@ var u = {
|
|
|
125
124
|
let n = t?.item, r = typeof t?.href == "string" ? t.href : typeof t?.itemHref == "string" ? t.itemHref : typeof t?.item_href == "string" ? t.item_href : "", i = n ? n.getAttribute("item-href") ?? n.getAttribute("href") ?? "" : "";
|
|
126
125
|
String(r || i || "").trim() && this._closeDrawerNow();
|
|
127
126
|
}, this._collapsed = !1, this._unlockAtWidth = 0, this._hideLogoText = !1, this._logoTextUnlockAt = 0, this._slotWatchers = [], this._harvestPending = !1, this._harvest = (e = {}) => {
|
|
128
|
-
let t = Array.from(this.children), n = [], r = [], i = [], a = -1, o = (e) => ({
|
|
127
|
+
let t = Array.from(this.children), n = [], r = [], i = [], a = -1, o = !1, s = (e) => ({
|
|
129
128
|
label: e.getAttribute("label") ?? "",
|
|
130
129
|
href: e.getAttribute("href") ?? void 0,
|
|
131
130
|
icon: e.getAttribute("icon") ?? void 0
|
|
132
|
-
}),
|
|
131
|
+
}), c = (e) => {
|
|
133
132
|
e.hasAttribute("role") && e.removeAttribute("role"), e.getAttribute("aria-hidden") !== "true" && e.setAttribute("aria-hidden", "true");
|
|
134
133
|
};
|
|
135
134
|
for (let e of t) {
|
|
@@ -146,6 +145,7 @@ var u = {
|
|
|
146
145
|
if (t === "scb-badge") {
|
|
147
146
|
let t = e.querySelector("scb-dropdown");
|
|
148
147
|
if (t) {
|
|
148
|
+
o = !0;
|
|
149
149
|
let r = t.getAttribute("label") ?? "";
|
|
150
150
|
(t.hasAttribute("selected") || t.getAttribute("selected") === "true" || t.getAttribute("active") === "true" || t.getAttribute("aria-current") === "page") && a === -1 && (a = n.length);
|
|
151
151
|
let i = `scb-header-tab-${n.length}`;
|
|
@@ -158,6 +158,7 @@ var u = {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
if (t === "scb-dropdown") {
|
|
161
|
+
o = !0;
|
|
161
162
|
let t = e.getAttribute("label") ?? "";
|
|
162
163
|
(e.hasAttribute("selected") || e.getAttribute("selected") === "true" || e.getAttribute("active") === "true" || e.getAttribute("aria-current") === "page") && a === -1 && (a = n.length);
|
|
163
164
|
let r = `scb-header-tab-${n.length}`;
|
|
@@ -169,7 +170,7 @@ var u = {
|
|
|
169
170
|
continue;
|
|
170
171
|
}
|
|
171
172
|
if (t === "scb-header-utility") {
|
|
172
|
-
|
|
173
|
+
c(e), r.push({
|
|
173
174
|
label: e.getAttribute("label") ?? "",
|
|
174
175
|
href: e.getAttribute("href") ?? "#",
|
|
175
176
|
target: e.getAttribute("target") ?? void 0
|
|
@@ -182,13 +183,13 @@ var u = {
|
|
|
182
183
|
icon: e.getAttribute("icon") ?? void 0,
|
|
183
184
|
children: []
|
|
184
185
|
};
|
|
185
|
-
e.querySelectorAll("scb-header-menu-item").forEach((e) => t.children.push(
|
|
186
|
+
e.querySelectorAll("scb-header-menu-item").forEach((e) => t.children.push(s(e))), i.push(t);
|
|
186
187
|
continue;
|
|
187
188
|
}
|
|
188
|
-
t === "scb-header-menu-item" && i.push(
|
|
189
|
+
t === "scb-header-menu-item" && i.push(s(e));
|
|
189
190
|
}
|
|
190
|
-
let
|
|
191
|
-
|
|
191
|
+
let l = !this._sameNavItems(this._slotNavItems, n), u = !this._sameUtilityItems(this._slotUtils, r), d = !this._sameMenuNodes(this._slotMenu, i);
|
|
192
|
+
l && (this._slotNavItems = n), u && (this._slotUtils = r), d && (this._slotMenu = i), o && this._ensureDropdownReady(), !this.hasAttribute("active-tab") && a >= 0 && this.activeTab !== a && (this.activeTab = a), (e.scheduleMeasure ?? !0) && queueMicrotask(() => {
|
|
192
193
|
this.updateComplete.then(() => {
|
|
193
194
|
this._scheduleMeasure();
|
|
194
195
|
});
|
|
@@ -1018,14 +1019,14 @@ var u = {
|
|
|
1018
1019
|
}));
|
|
1019
1020
|
}
|
|
1020
1021
|
firstUpdated() {
|
|
1021
|
-
this.showDrawer && !this.deferDrawer && this._ensureDrawerReady(), this.updateComplete.then(() => {
|
|
1022
|
+
this._syncLandmarkAttributes(), this.showDrawer && !this.deferDrawer && this._ensureDrawerReady(), this.updateComplete.then(() => {
|
|
1022
1023
|
this._harvest({ scheduleMeasure: !1 }), this._attachSlotObservers(), this._syncDropdownTabs(), this._finishInitialUpgrade();
|
|
1023
1024
|
});
|
|
1024
1025
|
let e = this._top;
|
|
1025
1026
|
e && (this._ro = new ResizeObserver(() => this._scheduleMeasure()), this._ro.observe(e)), window.addEventListener("resize", this._onWindowResize, { passive: !0 });
|
|
1026
1027
|
}
|
|
1027
1028
|
updated(e) {
|
|
1028
|
-
e.has("searchMax") && this.style.setProperty("--scb-header-search-max", this.searchMax ?? "380px"), e.has("searchMin") && this.style.setProperty("--scb-header-search-min", this.searchMin ?? "250px"), e.has("searchHeight") && (this.searchHeight && this.searchHeight.trim() ? this.style.setProperty("--scb-search-height", this.searchHeight.trim()) : this.style.removeProperty("--scb-search-height")), (e.has("logoWidth") || e.has("logoHeight") || e.has("logoAspectRatio")) && this._applyLogoSizing(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom")) && this._applySpacing(), (e.has("utilityItems") || e.has("tabs") || e.has("logoText") || e.has("logotypeText") || e.has("logoSrc") || e.has("logoWidth") || e.has("logoHeight") || e.has("logoAspectRatio") || e.has("activeTab") || e.has("_slotNavItems") || e.has("_slotUtils") || e.has("_slotMenu") || e.has("showDrawer") || e.has("alwaysShowMenuButton") || e.has("showSearch") || e.has("layoutPending") || e.has("searchMax") || e.has("searchMin") || e.has("size")) && this.updateComplete.then(() => {
|
|
1029
|
+
e.has("searchMax") && this.style.setProperty("--scb-header-search-max", this.searchMax ?? "380px"), e.has("searchMin") && this.style.setProperty("--scb-header-search-min", this.searchMin ?? "250px"), e.has("searchHeight") && (this.searchHeight && this.searchHeight.trim() ? this.style.setProperty("--scb-search-height", this.searchHeight.trim()) : this.style.removeProperty("--scb-search-height")), (e.has("logoWidth") || e.has("logoHeight") || e.has("logoAspectRatio")) && this._applyLogoSizing(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom")) && this._applySpacing(), (e.has("banner") || e.has("bannerLabel")) && this._syncLandmarkAttributes(), (e.has("utilityItems") || e.has("tabs") || e.has("logoText") || e.has("logotypeText") || e.has("logoSrc") || e.has("logoWidth") || e.has("logoHeight") || e.has("logoAspectRatio") || e.has("activeTab") || e.has("_slotNavItems") || e.has("_slotUtils") || e.has("_slotMenu") || e.has("showDrawer") || e.has("alwaysShowMenuButton") || e.has("showSearch") || e.has("layoutPending") || e.has("searchMax") || e.has("searchMin") || e.has("size")) && this.updateComplete.then(() => {
|
|
1029
1030
|
this._scheduleMeasure();
|
|
1030
1031
|
}), (e.has("showDrawer") || e.has("deferDrawer")) && this.showDrawer && !this.deferDrawer && this._ensureDrawerReady(), e.has("showSearch") && !this.showSearch && this._setMobileSearchOpen(!1), e.has("layoutPending") && !this.layoutPending && this.requestLayout(), (e.has("activeTab") || e.has("_slotNavItems") || e.has("tabs") || e.has("size")) && this.updateComplete.then(() => {
|
|
1031
1032
|
this._syncDropdownTabs();
|
|
@@ -1043,6 +1044,17 @@ var u = {
|
|
|
1043
1044
|
let e = this._mapSpacingToken(this.spacing), t = this._mapSpacingToken(this.spacingTop) ?? e, n = this._mapSpacingToken(this.spacingBottom) ?? e;
|
|
1044
1045
|
t ? this.style.setProperty("--scb-header-spacing-block-start", t) : this.style.removeProperty("--scb-header-spacing-block-start"), n ? this.style.setProperty("--scb-header-spacing-block-end", n) : this.style.removeProperty("--scb-header-spacing-block-end");
|
|
1045
1046
|
}
|
|
1047
|
+
_syncLandmarkAttributes() {
|
|
1048
|
+
let e = this.renderRoot.querySelector(".header-landmark");
|
|
1049
|
+
if (!e) return;
|
|
1050
|
+
if (!this.banner) {
|
|
1051
|
+
e.removeAttribute("role"), e.removeAttribute("aria-label");
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
e.setAttribute("role", "banner");
|
|
1055
|
+
let t = (this.bannerLabel ?? "").trim();
|
|
1056
|
+
t ? e.setAttribute("aria-label", t) : e.removeAttribute("aria-label");
|
|
1057
|
+
}
|
|
1046
1058
|
_applyLogoSizing() {
|
|
1047
1059
|
let e = (this.logoWidth ?? "").trim(), t = (this.logoHeight ?? "").trim(), n = (this.logoAspectRatio ?? "").trim();
|
|
1048
1060
|
e ? this.style.setProperty("--scb-header-logo-img-w", e) : this.style.removeProperty("--scb-header-logo-img-w"), t ? this.style.setProperty("--scb-header-logo-img-h", t) : e ? this.style.setProperty("--scb-header-logo-img-h", "auto") : this.style.removeProperty("--scb-header-logo-img-h"), n ? this.style.setProperty("--scb-header-logo-img-aspect-ratio", n) : this.style.removeProperty("--scb-header-logo-img-aspect-ratio");
|
|
@@ -1058,6 +1070,9 @@ var u = {
|
|
|
1058
1070
|
async _ensureDrawerReady() {
|
|
1059
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);
|
|
1060
1072
|
}
|
|
1073
|
+
async _ensureDropdownReady() {
|
|
1074
|
+
customElements.get("scb-dropdown") || (this._dropdownImportPromise ??= import("../scb-dropdown/scb-dropdown.js").then(() => void 0), await this._dropdownImportPromise);
|
|
1075
|
+
}
|
|
1061
1076
|
_syncMenuBtnAria() {
|
|
1062
1077
|
this.renderRoot.querySelectorAll(".menu-trigger").forEach((e) => {
|
|
1063
1078
|
e.setAttribute("aria-expanded", String(this._menuExpanded));
|
|
@@ -1109,27 +1124,30 @@ var u = {
|
|
|
1109
1124
|
return !e || e.length === 0 ? r`` : r`${e.map((e) => this._renderMenuNode(e))}`;
|
|
1110
1125
|
}
|
|
1111
1126
|
_renderMenuNode(e) {
|
|
1112
|
-
let t = Array.isArray(e.children) && e.children.length > 0, n = (e.href ?? "").trim(), a = (e.icon ?? "").trim()
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
item-href=${n
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
+
let t = Array.isArray(e.children) && e.children.length > 0, n = (e.href ?? "").trim(), a = (e.icon ?? "").trim(), o = t ? r`
|
|
1128
|
+
<scb-sub-menu label=${e.label}>
|
|
1129
|
+
${e.children.map((e) => this._renderMenuNode(e))}
|
|
1130
|
+
</scb-sub-menu>
|
|
1131
|
+
` : i;
|
|
1132
|
+
return a && n ? r`
|
|
1133
|
+
<scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${a} item-href=${n}>
|
|
1134
|
+
${o}
|
|
1135
|
+
</scb-menu-item>
|
|
1136
|
+
` : a ? r`
|
|
1137
|
+
<scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${a}>
|
|
1138
|
+
${o}
|
|
1139
|
+
</scb-menu-item>
|
|
1140
|
+
` : n ? r`
|
|
1141
|
+
<scb-menu-item label=${e.label} ?selected=${!1} item-href=${n}>
|
|
1142
|
+
${o}
|
|
1143
|
+
</scb-menu-item>
|
|
1144
|
+
` : r`<scb-menu-item label=${e.label} ?selected=${!1}>${o}</scb-menu-item>`;
|
|
1127
1145
|
}
|
|
1128
1146
|
_syncFlags(e, t) {
|
|
1129
1147
|
this.toggleAttribute("data-no-utility", e), this.toggleAttribute("data-no-search", t);
|
|
1130
1148
|
}
|
|
1131
1149
|
_renderMenuButton(e = "", t = !1) {
|
|
1132
|
-
let n = e ? `menu-trigger ${e}` : "menu-trigger", i = (this.menuButtonLabel ?? "").trim() || "Meny";
|
|
1150
|
+
let n = e ? `menu-trigger ${e}` : "menu-trigger", i = (this.menuButtonLabel ?? "").trim() || "Meny", a = this._menuExpanded ? "true" : "false";
|
|
1133
1151
|
return t ? r`
|
|
1134
1152
|
<scb-icon-button
|
|
1135
1153
|
class=${n}
|
|
@@ -1138,7 +1156,7 @@ var u = {
|
|
|
1138
1156
|
aria-label=${i}
|
|
1139
1157
|
aria-controls=${this._drawerId}
|
|
1140
1158
|
aria-haspopup="dialog"
|
|
1141
|
-
aria-expanded=${
|
|
1159
|
+
aria-expanded=${a}
|
|
1142
1160
|
title="Öppna meny"
|
|
1143
1161
|
@click=${this._onMenuClick}
|
|
1144
1162
|
></scb-icon-button>
|
|
@@ -1152,7 +1170,7 @@ var u = {
|
|
|
1152
1170
|
.size=${this.size}
|
|
1153
1171
|
aria-controls=${this._drawerId}
|
|
1154
1172
|
aria-haspopup="dialog"
|
|
1155
|
-
aria-expanded=${
|
|
1173
|
+
aria-expanded=${a}
|
|
1156
1174
|
title="Öppna meny"
|
|
1157
1175
|
@click=${this._onMenuClick}
|
|
1158
1176
|
></scb-button>
|
|
@@ -1161,7 +1179,7 @@ var u = {
|
|
|
1161
1179
|
render() {
|
|
1162
1180
|
let e = this._getNavItems(), t = this._slotUtils.length ? this._slotUtils : this.utilityItems, n = this._slotMenu.length ? this._slotMenu : this.menuData ?? [], a = this.logoText || this.logotypeText, o = this.logoAlt || a || "Gå till startsidan", s = this.querySelector("[slot=\"drawer-menu\"]") !== null;
|
|
1163
1181
|
this._syncFlags(t.length === 0, !this.showSearch);
|
|
1164
|
-
let c = this.searchHeight && this.searchHeight.trim() ? `--scb-search-height:${this.searchHeight.trim()}` :
|
|
1182
|
+
let c = this.searchHeight && this.searchHeight.trim() ? `--scb-search-height:${this.searchHeight.trim()}` : "", l = e.length > 0 || this.reserveTabs || this.layoutPending, u = (this.reserveTabs || this.layoutPending) && (this.layoutPending || e.length === 0), d = this.showDrawer && (!this.deferDrawer || this._drawerReady), f = typeof window < "u" && window.innerWidth >= this.BP_MD, p = this.showDrawer && (f ? this.alwaysShowMenuButton || this._collapsed : !0), m = p && !f, h = p && f, g = (this.searchButtonLabel ?? "").trim() || "Sök", _ = this.showSearch && !this._mobileSearchOpen;
|
|
1165
1183
|
return r`
|
|
1166
1184
|
<slot
|
|
1167
1185
|
id="data-slot"
|
|
@@ -1171,11 +1189,7 @@ var u = {
|
|
|
1171
1189
|
hidden
|
|
1172
1190
|
></slot>
|
|
1173
1191
|
|
|
1174
|
-
<div
|
|
1175
|
-
class="header-landmark"
|
|
1176
|
-
role=${this.banner ? "banner" : i}
|
|
1177
|
-
aria-label=${this.banner && this.bannerLabel ? this.bannerLabel : i}
|
|
1178
|
-
>
|
|
1192
|
+
<div class="header-landmark">
|
|
1179
1193
|
<scb-grid
|
|
1180
1194
|
cols-compact="4"
|
|
1181
1195
|
cols-medium="8"
|
|
@@ -1298,7 +1312,7 @@ var u = {
|
|
|
1298
1312
|
class="tab-link"
|
|
1299
1313
|
href=${e.href}
|
|
1300
1314
|
data-index=${t}
|
|
1301
|
-
aria-current=${t === this.activeTab ? "page" :
|
|
1315
|
+
aria-current=${t === this.activeTab ? "page" : "false"}
|
|
1302
1316
|
@click=${this._onTabClick}
|
|
1303
1317
|
>
|
|
1304
1318
|
${e.label}
|
|
@@ -1311,7 +1325,7 @@ var u = {
|
|
|
1311
1325
|
type="button"
|
|
1312
1326
|
class="tab-link"
|
|
1313
1327
|
data-index=${t}
|
|
1314
|
-
aria-current=${t === this.activeTab ? "page" :
|
|
1328
|
+
aria-current=${t === this.activeTab ? "page" : "false"}
|
|
1315
1329
|
@click=${this._onTabClick}
|
|
1316
1330
|
>
|
|
1317
1331
|
${e.label}
|