scb-wc 0.1.237 → 0.1.239
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 +19 -16
- package/all.d.ts +14 -0
- package/all.js +14 -0
- package/index.js +99 -85
- package/mvc/components/all.js +9 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
- package/mvc/components/scb-accordion/scb-accordion.js +1 -1
- package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
- package/mvc/components/scb-button/scb-button.js +3 -3
- package/mvc/components/scb-calendar/scb-calendar.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
- package/mvc/components/scb-card/scb-card.js +2 -2
- package/mvc/{vendor → components/scb-chevron}/scb-chevron.js +1 -1
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +1 -1
- package/mvc/components/scb-datepicker/scb-datepicker.js +143 -0
- package/mvc/components/scb-dialog/scb-dialog.js +1 -1
- package/mvc/components/scb-drawer/scb-drawer.js +3 -3
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +1 -1
- package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card.js +1 -1
- package/mvc/components/scb-header/scb-header.js +2 -2
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
- package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/mvc/components/scb-link/scb-link.js +1 -1
- package/mvc/components/scb-link-button/scb-link-button.js +1 -1
- package/mvc/components/scb-list/scb-list-item.js +6 -6
- package/mvc/components/scb-menu/scb-menu-item.js +3 -3
- package/mvc/components/scb-menu/scb-menu.js +5 -5
- package/mvc/components/scb-nav/scb-nav.js +1 -1
- package/mvc/components/scb-notification-card/scb-notification-card.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +1 -1
- package/mvc/components/scb-overlay/scb-overlay.js +3 -3
- package/mvc/components/scb-pagination/scb-pagination.js +1 -1
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
- package/mvc/components/scb-search/scb-search.js +3 -3
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
- package/mvc/components/scb-select/scb-select-option.js +1 -1
- package/mvc/components/scb-select/scb-select.js +1 -1
- package/mvc/components/scb-snackbar/scb-snackbar.js +1 -1
- package/mvc/components/scb-stepper/scb-step.js +1 -1
- package/mvc/components/scb-table/scb-table.js +1 -1
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +1 -1
- package/mvc/components/scb-table-next/read-table.js +1 -0
- package/mvc/components/scb-table-next/scb-table-next.js +6 -0
- package/mvc/components/scb-textfield/scb-textfield.js +34 -176
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
- package/mvc/{vendor → components/shared}/component-size-token.js +1 -1
- package/mvc/components/shared/lazy-focus-ring.js +2 -0
- package/mvc/components/shared/lazy-ripple.js +2 -0
- package/mvc/{vendor → components/shared}/manual-popover.js +1 -1
- package/mvc/components/shared/scb-icon-svg.js +11 -0
- package/package.json +12 -2
- package/scb-components/index.d.ts +108 -0
- package/scb-components/scb-table-next/read-table.d.ts +29 -0
- package/scb-components/scb-table-next/scb-table-next.d.ts +22 -0
- package/scb-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-components/scb-viz/scb-viz-print-runtime.d.ts +30 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-components/shared/component-size-token.d.ts +1 -0
- package/scb-components/shared/lazy-focus-ring.d.ts +4 -0
- package/scb-components/shared/lazy-ripple.d.ts +9 -0
- package/scb-components/shared/manual-popover.d.ts +7 -0
- package/scb-components/shared/scb-icon-svg.d.ts +3 -0
- package/scb-menu/scb-menu-item.js +7 -1
- package/scb-menu/scb-menu.js +3 -0
- package/scb-table-next/read-table.js +87 -0
- package/scb-table-next/scb-table-next.js +226 -0
- package/scb-viz/scb-viz-series-differentiation-registry.js +10 -7
- package/scb-viz/scb-viz.js +43 -43
- package/scb-wc.bundle.js +417 -287
- package/scb-wc.d.ts +28 -0
- package/shared/scb-icon-svg.js +5 -2
- package/mvc/vendor/lazy-focus-ring.js +0 -2
- package/mvc/vendor/lazy-ripple.js +0 -2
- package/mvc/vendor/scb-icon-svg.js +0 -11
package/README.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
# Om SCB Web Components
|
|
1
|
+
# Om SCB Web Components Preview
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **Previewkanal**
|
|
4
|
+
> Installera `scb-wc` via `@next` för komponenter under utveckling. API, utseende och beteende kan ändras eller tas bort mellan versioner.
|
|
5
|
+
|
|
6
|
+
SCB Web Components preview innehåller SCB:s gemensamma webbkomponenter.
|
|
4
7
|
|
|
5
8
|
## Dokumentation
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Previewkomponenterna dokumenteras och demonstreras i Storybook på SCB:s interna testadress:
|
|
8
11
|
|
|
9
|
-
-
|
|
12
|
+
- Test: <https://webcomponentstest.scb.intra>
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Den publika/stabila Storybooken finns på:
|
|
12
15
|
|
|
13
|
-
-
|
|
16
|
+
- Prod: <https://webcomponents.scb.intra>
|
|
14
17
|
|
|
15
18
|
## Kom igång
|
|
16
19
|
|
|
@@ -19,7 +22,7 @@ Testkomponenterna finns på:
|
|
|
19
22
|
Välj den teknik du använder. Exemplet skapar en vanlig webbplats:
|
|
20
23
|
|
|
21
24
|
```sh
|
|
22
|
-
npx scb-wc init html my-app
|
|
25
|
+
npx scb-wc@next init html my-app
|
|
23
26
|
cd my-app
|
|
24
27
|
npm install
|
|
25
28
|
npm run dev
|
|
@@ -35,7 +38,7 @@ Byt `html` mot:
|
|
|
35
38
|
Kör kommandot i mappen där appens `package.json` ligger:
|
|
36
39
|
|
|
37
40
|
```sh
|
|
38
|
-
npm install scb-wc
|
|
41
|
+
npm install scb-wc@next
|
|
39
42
|
```
|
|
40
43
|
|
|
41
44
|
Importera CSS och bara de komponenter som sidan använder:
|
|
@@ -54,9 +57,9 @@ Lägg sedan komponenten i sidan:
|
|
|
54
57
|
|
|
55
58
|
### Nästa steg
|
|
56
59
|
|
|
57
|
-
- Öppna Kom igång i [
|
|
58
|
-
- Öppna [mallar och exempel](https://
|
|
59
|
-
- Öppna [komponentöversikten](https://
|
|
60
|
+
- Öppna Kom igång i [Test Storybook](https://webcomponentstest.scb.intra/?path=/docs/docs-kom-igång--beskrivning) för HTML/CSS, React och MVC.
|
|
61
|
+
- Öppna [mallar och exempel](https://webcomponentstest.scb.intra/?path=/docs/examples-and-templates-att-använda-mallar-och-exempel--beskrivning) när du vill bygga en hel sida.
|
|
62
|
+
- Öppna [komponentöversikten](https://webcomponentstest.scb.intra/?path=/story/components-översikt-alla-komponenter-exposé--expose) när du vill välja nästa komponent.
|
|
60
63
|
|
|
61
64
|
## Kort referens
|
|
62
65
|
|
|
@@ -84,11 +87,11 @@ Webbplatsmallarna använder standardläget. Service- och appmallarna laddar Comp
|
|
|
84
87
|
|
|
85
88
|
### MVC och statiska webbplatser
|
|
86
89
|
|
|
87
|
-
Paketets färdiga MVC-filer ligger i `node_modules/scb-wc/mvc/`. Följ det kopierbara MVC-exemplet i [Kom igång](https://
|
|
90
|
+
Paketets färdiga MVC-filer ligger i `node_modules/scb-wc/mvc/`. Följ det kopierbara MVC-exemplet i [Kom igång](https://webcomponentstest.scb.intra/?path=/docs/docs-kom-igång--beskrivning). Det visar vilket `ui:install`-script som ska läggas i appens `package.json` och vilka filer layouten ska ladda.
|
|
88
91
|
|
|
89
92
|
### Fonter och egna ikoner
|
|
90
93
|
|
|
91
|
-
Vanliga appar använder `scb-wc.css`. Selfhost och egna Material Symbols-subset är avancerade val. Följ [Foundations/Icons](https://
|
|
94
|
+
Vanliga appar använder `scb-wc.css`. Selfhost och egna Material Symbols-subset är avancerade val. Följ [Foundations/Icons](https://webcomponentstest.scb.intra/?path=/docs/foundations-icons-ikoner--beskrivning) om appen inte får ladda Google Fonts eller behöver fler ikoner än paketets `icons.json`.
|
|
92
95
|
|
|
93
96
|
### Bundlad version
|
|
94
97
|
|
|
@@ -110,18 +113,18 @@ Kör först i appens mapp:
|
|
|
110
113
|
npm outdated scb-wc
|
|
111
114
|
```
|
|
112
115
|
|
|
113
|
-
Om en ny version finns, läs [Uppdatera SCB Web Components](https://
|
|
116
|
+
Om en ny version finns, läs [Uppdatera SCB Web Components](https://webcomponentstest.scb.intra/?path=/docs/docs-uppdatera-s%C3%A5-uppdaterar-du--beskrivning). Där länkas du vidare till versionen och eventuella migrationssteg.
|
|
114
117
|
|
|
115
118
|
Uppdatera sedan paketet, bygg appen och kör appens vanliga tester:
|
|
116
119
|
|
|
117
120
|
```sh
|
|
118
|
-
npm install scb-wc
|
|
121
|
+
npm install scb-wc@next
|
|
119
122
|
```
|
|
120
123
|
|
|
121
124
|
För MVC behöver du även köra appens befintliga kopieringsscript efter installationen. Exakta steg finns på uppdateringssidan.
|
|
122
125
|
|
|
123
126
|
## Viktigt
|
|
124
127
|
|
|
125
|
-
- `scb-wc@
|
|
128
|
+
- `scb-wc@next` är **previewkanalen**. Komponenter kan ändras eller tas bort mellan versioner. Använd `scb-wc@latest` i externa produktionsmiljöer.
|
|
126
129
|
- Kör alltid npm-kommandon i mappen där appens `package.json` ligger.
|
|
127
130
|
- Ladda inte samma komponent på flera sätt på samma sida.
|
package/all.d.ts
CHANGED
|
@@ -18,10 +18,12 @@ import './scb-components/scb-card/scb-list-card.js';
|
|
|
18
18
|
import './scb-components/scb-card/scb-social-card.js';
|
|
19
19
|
import './scb-components/scb-checkbox/scb-checkbox-group.js';
|
|
20
20
|
import './scb-components/scb-checkbox/scb-checkbox.js';
|
|
21
|
+
import './scb-components/scb-chevron/scb-chevron.js';
|
|
21
22
|
import './scb-components/scb-chip/scb-chip.js';
|
|
22
23
|
import './scb-components/scb-collapse/scb-collapse.js';
|
|
23
24
|
import './scb-components/scb-container-card/scb-container-card.js';
|
|
24
25
|
import './scb-components/scb-cookies-consent/scb-cookies-consent.js';
|
|
26
|
+
import './scb-components/scb-datepicker/scb-datepicker.js';
|
|
25
27
|
import './scb-components/scb-dialog/scb-dialog.js';
|
|
26
28
|
import './scb-components/scb-divider/scb-divider.js';
|
|
27
29
|
import './scb-components/scb-drawer/scb-drawer.js';
|
|
@@ -83,6 +85,8 @@ import './scb-components/scb-stepper/scb-step.js';
|
|
|
83
85
|
import './scb-components/scb-stepper/scb-stepper.js';
|
|
84
86
|
import './scb-components/scb-switch/scb-switch.js';
|
|
85
87
|
import './scb-components/scb-table-advanced/scb-table-advanced.js';
|
|
88
|
+
import './scb-components/scb-table-next/read-table.js';
|
|
89
|
+
import './scb-components/scb-table-next/scb-table-next.js';
|
|
86
90
|
import './scb-components/scb-table/scb-table.js';
|
|
87
91
|
import './scb-components/scb-tabs/scb-primary-tab.js';
|
|
88
92
|
import './scb-components/scb-tabs/scb-secondary-tab.js';
|
|
@@ -91,4 +95,14 @@ import './scb-components/scb-textfield/scb-textfield.js';
|
|
|
91
95
|
import './scb-components/scb-toc/scb-toc-item.js';
|
|
92
96
|
import './scb-components/scb-toc/scb-toc.js';
|
|
93
97
|
import './scb-components/scb-tooltip/scb-tooltip.js';
|
|
98
|
+
import './scb-components/scb-viz/scb-viz-actions-runtime.js';
|
|
99
|
+
import './scb-components/scb-viz/scb-viz-print-runtime.js';
|
|
100
|
+
import './scb-components/scb-viz/scb-viz-series-differentiation-registry.js';
|
|
101
|
+
import './scb-components/scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
102
|
+
import './scb-components/scb-viz/scb-viz-table-runtime.js';
|
|
94
103
|
import './scb-components/scb-viz/scb-viz.js';
|
|
104
|
+
import './scb-components/shared/component-size-token.js';
|
|
105
|
+
import './scb-components/shared/lazy-focus-ring.js';
|
|
106
|
+
import './scb-components/shared/lazy-ripple.js';
|
|
107
|
+
import './scb-components/shared/manual-popover.js';
|
|
108
|
+
import './scb-components/shared/scb-icon-svg.js';
|
package/all.js
CHANGED
|
@@ -18,10 +18,12 @@ import './scb-card/scb-list-card.js';
|
|
|
18
18
|
import './scb-card/scb-social-card.js';
|
|
19
19
|
import './scb-checkbox/scb-checkbox-group.js';
|
|
20
20
|
import './scb-checkbox/scb-checkbox.js';
|
|
21
|
+
import './scb-chevron/scb-chevron.js';
|
|
21
22
|
import './scb-chip/scb-chip.js';
|
|
22
23
|
import './scb-collapse/scb-collapse.js';
|
|
23
24
|
import './scb-container-card/scb-container-card.js';
|
|
24
25
|
import './scb-cookies-consent/scb-cookies-consent.js';
|
|
26
|
+
import './scb-datepicker/scb-datepicker.js';
|
|
25
27
|
import './scb-dialog/scb-dialog.js';
|
|
26
28
|
import './scb-divider/scb-divider.js';
|
|
27
29
|
import './scb-drawer/scb-drawer.js';
|
|
@@ -83,6 +85,8 @@ import './scb-stepper/scb-step.js';
|
|
|
83
85
|
import './scb-stepper/scb-stepper.js';
|
|
84
86
|
import './scb-switch/scb-switch.js';
|
|
85
87
|
import './scb-table-advanced/scb-table-advanced.js';
|
|
88
|
+
import './scb-table-next/read-table.js';
|
|
89
|
+
import './scb-table-next/scb-table-next.js';
|
|
86
90
|
import './scb-table/scb-table.js';
|
|
87
91
|
import './scb-tabs/scb-primary-tab.js';
|
|
88
92
|
import './scb-tabs/scb-secondary-tab.js';
|
|
@@ -91,4 +95,14 @@ import './scb-textfield/scb-textfield.js';
|
|
|
91
95
|
import './scb-toc/scb-toc-item.js';
|
|
92
96
|
import './scb-toc/scb-toc.js';
|
|
93
97
|
import './scb-tooltip/scb-tooltip.js';
|
|
98
|
+
import './scb-viz/scb-viz-actions-runtime.js';
|
|
99
|
+
import './scb-viz/scb-viz-print-runtime.js';
|
|
100
|
+
import './scb-viz/scb-viz-series-differentiation-registry.js';
|
|
101
|
+
import './scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
102
|
+
import './scb-viz/scb-viz-table-runtime.js';
|
|
94
103
|
import './scb-viz/scb-viz.js';
|
|
104
|
+
import './shared/component-size-token.js';
|
|
105
|
+
import './shared/lazy-focus-ring.js';
|
|
106
|
+
import './shared/lazy-ripple.js';
|
|
107
|
+
import './shared/manual-popover.js';
|
|
108
|
+
import './shared/scb-icon-svg.js';
|
package/index.js
CHANGED
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { addLazyFocusRingListeners as e, ensureFocusRingOnFocusVisible as t, ensureFocusRingOnTab as n, ensureFocusRingReady as r } from "./shared/lazy-focus-ring.js";
|
|
2
|
+
import { componentSizeToken as i } from "./shared/component-size-token.js";
|
|
3
|
+
import { ScbAvatar as a } from "./scb-avatar/scb-avatar.js";
|
|
4
|
+
import { ScbChevron as o } from "./scb-chevron/scb-chevron.js";
|
|
5
|
+
import { ScbAccordionItem as s } from "./scb-accordion/scb-accordion-item.js";
|
|
6
|
+
import { ScbButton as c } from "./scb-button/scb-button.js";
|
|
7
|
+
import { ScbAccordion as l } from "./scb-accordion/scb-accordion.js";
|
|
8
|
+
import { ScbActionCard as u, ScbCard as d, ScbContainerCard as f, ScbLinkCard as p, ScbListCard as m, ScbSocialCard as h } from "./scb-card/scb-card.js";
|
|
6
9
|
import "./scb-action-card/scb-action-card.js";
|
|
7
|
-
import { ScbIconButton as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
10
|
+
import { ScbIconButton as g } from "./scb-icon-button/scb-icon-button.js";
|
|
11
|
+
import { closeManualPopover as _, closeManualPopoverAfterAnimations as v, closeNestedPopupSurfaces as y, isManualPopoverOpen as b, openManualPopover as x } from "./shared/manual-popover.js";
|
|
12
|
+
import { ScbSearch as S } from "./scb-search/scb-search.js";
|
|
13
|
+
import { ScbAppBar as C } from "./scb-app-bar/scb-app-bar.js";
|
|
14
|
+
import { ScbBadge as w } from "./scb-badge/scb-badge.js";
|
|
15
|
+
import { ScbLink as T } from "./scb-link/scb-link.js";
|
|
16
|
+
import { SCBBreadcrumbItem as E } from "./scb-breadcrumb/scb-breadcrumb-item.js";
|
|
17
|
+
import { SCBBreadcrumb as D } from "./scb-breadcrumb/scb-breadcrumb.js";
|
|
18
|
+
import { ScbCalendarEvent as O } from "./scb-calendar/scb-calendar-event.js";
|
|
19
|
+
import { ScbDivider as k } from "./scb-divider/scb-divider.js";
|
|
20
|
+
import { ScbDatepicker as A } from "./scb-datepicker/scb-datepicker.js";
|
|
21
|
+
import { ScbTooltip as j } from "./scb-tooltip/scb-tooltip.js";
|
|
22
|
+
import { ScbTextField as M } from "./scb-textfield/scb-textfield.js";
|
|
23
|
+
import { ScbCheckboxGroup as N } from "./scb-checkbox/scb-checkbox-group.js";
|
|
24
|
+
import { ScbCheckbox as P } from "./scb-checkbox/scb-checkbox.js";
|
|
25
|
+
import { ScbRadioGroup as F } from "./scb-radio-button/scb-radio-group.js";
|
|
26
|
+
import { ScbRadioButton as I } from "./scb-radio-button/scb-radio-button.js";
|
|
27
|
+
import { ScbSwitch as L } from "./scb-switch/scb-switch.js";
|
|
28
|
+
import { ScbChip as R } from "./scb-chip/scb-chip.js";
|
|
29
|
+
import { ScbDialog as z } from "./scb-dialog/scb-dialog.js";
|
|
30
|
+
import { ScbListItem as B } from "./scb-list/scb-list-item.js";
|
|
31
|
+
import { ScbList as V } from "./scb-list/scb-list.js";
|
|
32
|
+
import { ScbCalendar as H } from "./scb-calendar/scb-calendar.js";
|
|
33
|
+
import { ScbCalendarCard as U } from "./scb-calendar-card/scb-calendar-card.js";
|
|
29
34
|
import "./scb-card/scb-action-card.js";
|
|
30
35
|
import "./scb-container-card/scb-container-card.js";
|
|
31
36
|
import "./scb-card/scb-container-card.js";
|
|
@@ -35,61 +40,70 @@ import "./scb-list-card/scb-list-card.js";
|
|
|
35
40
|
import "./scb-card/scb-list-card.js";
|
|
36
41
|
import "./scb-social-card/scb-social-card.js";
|
|
37
42
|
import "./scb-card/scb-social-card.js";
|
|
38
|
-
import { ScbCollapse as
|
|
39
|
-
import { ScbCookiesConsent as
|
|
40
|
-
import { ScbDrawer as
|
|
41
|
-
import { ScbDropZone as
|
|
42
|
-
import { ScbOptionsMenuItem as
|
|
43
|
-
import { ScbOptionsSubMenu as
|
|
44
|
-
import { ScbOptionsMenu as
|
|
45
|
-
import { ScbDropdown as
|
|
46
|
-
import { ScbFactCardContent as
|
|
47
|
-
import { ScbFactCard as
|
|
48
|
-
import { ScbFooterSection as
|
|
49
|
-
import { ScbGridItem as
|
|
50
|
-
import { ScbStack as
|
|
51
|
-
import { ScbGrid as
|
|
52
|
-
import { ScbFooter as
|
|
53
|
-
import { ScbIcon as
|
|
54
|
-
import { ScbNotificationCard as
|
|
55
|
-
import { ScbFormErrorSummary as
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
|
|
43
|
+
import { ScbCollapse as W } from "./scb-collapse/scb-collapse.js";
|
|
44
|
+
import { ScbCookiesConsent as G } from "./scb-cookies-consent/scb-cookies-consent.js";
|
|
45
|
+
import { ScbDrawer as K } from "./scb-drawer/scb-drawer.js";
|
|
46
|
+
import { ScbDropZone as q } from "./scb-drop-zone/scb-drop-zone.js";
|
|
47
|
+
import { ScbOptionsMenuItem as J } from "./scb-options-menu/scb-options-menu-item.js";
|
|
48
|
+
import { ScbOptionsSubMenu as Y } from "./scb-options-menu/scb-options-sub-menu.js";
|
|
49
|
+
import { ScbOptionsMenu as X } from "./scb-options-menu/scb-options-menu.js";
|
|
50
|
+
import { ScbDropdown as Z } from "./scb-dropdown/scb-dropdown.js";
|
|
51
|
+
import { ScbFactCardContent as Q } from "./scb-fact-card/scb-fact-card-content.js";
|
|
52
|
+
import { ScbFactCard as $ } from "./scb-fact-card/scb-fact-card.js";
|
|
53
|
+
import { ScbFooterSection as ee } from "./scb-footer/scb-footer-section.js";
|
|
54
|
+
import { ScbGridItem as te } from "./scb-grid/scb-grid-item.js";
|
|
55
|
+
import { ScbStack as ne } from "./scb-grid/scb-stack.js";
|
|
56
|
+
import { ScbGrid as re } from "./scb-grid/scb-grid.js";
|
|
57
|
+
import { ScbFooter as ie } from "./scb-footer/scb-footer.js";
|
|
58
|
+
import { ScbIcon as ae } from "./scb-icon/scb-icon.js";
|
|
59
|
+
import { ScbNotificationCard as oe } from "./scb-notification-card/scb-notification-card.js";
|
|
60
|
+
import { ScbFormErrorSummary as se } from "./scb-form-error-summary/scb-form-error-summary.js";
|
|
61
|
+
import { hasScbSvgIcon as ce, renderScbIcon as le } from "./shared/scb-icon-svg.js";
|
|
62
|
+
import { ScbHorizontalScroller as ue } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
63
|
+
import { ScbOverlay as de } from "./scb-overlay/scb-overlay.js";
|
|
64
|
+
import { ScbGalleryGrid as fe } from "./scb-gallery-grid/scb-gallery-grid.js";
|
|
65
|
+
import { ScbHeaderMenuGroup as pe } from "./scb-header/scb-header-menu-group.js";
|
|
66
|
+
import { ScbHeaderMenuItem as me } from "./scb-header/scb-header-menu-item.js";
|
|
67
|
+
import { ScbHeaderTab as he } from "./scb-header/scb-header-tab.js";
|
|
68
|
+
import { ScbHeaderUtility as ge } from "./scb-header/scb-header-utility.js";
|
|
69
|
+
import { ScbHeader as _e } from "./scb-header/scb-header.js";
|
|
70
|
+
import { ScbKeyFigureCard as ve } from "./scb-keyfigure-card/scb-keyfigure-card.js";
|
|
71
|
+
import { ScbLinkButton as ye } from "./scb-link-button/scb-link-button.js";
|
|
72
|
+
import { ScbMenuItem as be } from "./scb-menu/scb-menu-item.js";
|
|
73
|
+
import { ScbmenuSection as xe } from "./scb-menu/scb-menu-section.js";
|
|
74
|
+
import { ScbSubmenu as Se } from "./scb-menu/scb-sub-menu.js";
|
|
75
|
+
import { ScbMenu as Ce } from "./scb-menu/scb-menu.js";
|
|
76
|
+
import { ScbNavItem as we } from "./scb-nav/scb-nav-item.js";
|
|
77
|
+
import { ScbNav as Te } from "./scb-nav/scb-nav.js";
|
|
78
|
+
import { ScbPagination as Ee } from "./scb-pagination/scb-pagination.js";
|
|
79
|
+
import { ScbProgressIndicator as De } from "./scb-progress-indicator/scb-progress-indicator.js";
|
|
80
|
+
import { ScbProgressStep as Oe } from "./scb-progress-stepper/scb-progress-step.js";
|
|
81
|
+
import { ScbProgressStepper as ke } from "./scb-progress-stepper/scb-progress-stepper.js";
|
|
82
|
+
import { ScbScrollspy as Ae } from "./scb-scrollspy/scb-scrollspy.js";
|
|
83
|
+
import { ScbSegmentedItem as je } from "./scb-segmented-button/scb-segmented-item.js";
|
|
84
|
+
import { ScbSegmentedButton as Me } from "./scb-segmented-button/scb-segmented-button.js";
|
|
85
|
+
import { ScbSelectOption as Ne } from "./scb-select/scb-select-option.js";
|
|
86
|
+
import { ScbSelect as Pe } from "./scb-select/scb-select.js";
|
|
87
|
+
import { ScbSkeleton as Fe } from "./scb-skeleton/scb-skeleton.js";
|
|
88
|
+
import { ScbSlider as Ie } from "./scb-slider/scb-slider.js";
|
|
89
|
+
import { ScbSnackbar as Le } from "./scb-snackbar/scb-snackbar.js";
|
|
90
|
+
import { ScbStatusPill as Re } from "./scb-status-pill/scb-status-pill.js";
|
|
91
|
+
import { ScbStep as ze } from "./scb-stepper/scb-step.js";
|
|
92
|
+
import { ScbStepper as Be } from "./scb-stepper/scb-stepper.js";
|
|
93
|
+
import { ScbTable as Ve } from "./scb-table/scb-table.js";
|
|
94
|
+
import { ScbTableAdvanced as He } from "./scb-table-advanced/scb-table-advanced.js";
|
|
95
|
+
import { readTable as Ue } from "./scb-table-next/read-table.js";
|
|
96
|
+
import { ScbTableNext as We } from "./scb-table-next/scb-table-next.js";
|
|
97
|
+
import { ScbPrimaryTab as Ge } from "./scb-tabs/scb-primary-tab.js";
|
|
98
|
+
import { ScbSecondaryTab as Ke } from "./scb-tabs/scb-secondary-tab.js";
|
|
99
|
+
import { ScbTabs as qe } from "./scb-tabs/scb-tabs.js";
|
|
100
|
+
import { ScbTocItem as Je } from "./scb-toc/scb-toc-item.js";
|
|
101
|
+
import { ScbToc as Ye } from "./scb-toc/scb-toc.js";
|
|
102
|
+
import { buildScbVizExportFileName as Xe, createScbVizCsvBlob as Ze, createScbVizRasterBlobFromElement as Qe, createScbVizRasterDataUrlFromElement as $e, downloadScbVizBlob as et, getScbVizCurrentFullscreenElement as tt, getScbVizExportBaseFileName as nt, getScbVizFullscreenDocument as rt, isScbVizFullscreenSupported as it, openScbVizPrintFrame as at, runWithScbVizForcedPrintLightMode as ot, toggleScbVizFullscreen as st } from "./scb-viz/scb-viz-actions-runtime.js";
|
|
103
|
+
import { buildScbVizPrintDocumentHtml as ct, buildScbVizPrintableFooterHtml as lt, buildScbVizPrintableTableHtml as ut } from "./scb-viz/scb-viz-print-runtime.js";
|
|
104
|
+
import { appendScbVizSeriesDifferentiationPatternMarks as dt, getScbVizSeriesDifferentiationPatternDefinition as ft, getScbVizSeriesDifferentiationPatternKinds as pt, getScbVizSeriesDifferentiationRegistry as mt, getScbVizSeriesDifferentiationVariant as ht, scbVizSeriesDifferentiationRegistry as gt } from "./scb-viz/scb-viz-series-differentiation-registry.js";
|
|
105
|
+
import { clearScbVizSeriesDifferentiationColorClass as _t, clearScbVizSeriesDifferentiationMetadata as vt, ensureScbVizGroupedSeriesDifferentiationStore as yt, ensureScbVizStyledModeSeriesPattern as bt, getScbVizGroupedSeriesDifferentiationKey as xt, getScbVizGroupedSeriesDifferentiationVariant as St, getScbVizGroupedSeriesDifferentiationVariantIndex as Ct, getScbVizHighchartsColorClassName as wt, getScbVizHighchartsSvgElement as Tt, getScbVizHighchartsSvgRoot as Et, getScbVizLegendSeriesDifferentiationTargets as Dt, getScbVizSeriesDifferentiationColorIndex as Ot, getScbVizSeriesDifferentiationVariantByIndex as kt, isScbVizGroupedSeriesDifferentiationChart as At, isScbVizHighchartsStyledMode as jt, setScbVizSeriesDifferentiationColorClass as Mt, setScbVizSeriesDifferentiationMetadata as Nt, shouldShowScbVizSeriesDifferentiationAction as Pt, usesScbVizGroupedPointDifferentiation as Ft } from "./scb-viz/scb-viz-series-differentiation-runtime.js";
|
|
106
|
+
import { buildScbVizResolvedTableView as It, createScbVizCsvRows as Lt, inferScbVizTableAlignments as Rt, normalizeScbVizRenderableCell as zt, readScbVizTableDataFromSlot as Bt } from "./scb-viz/scb-viz-table-runtime.js";
|
|
107
|
+
import { ScbViz as Vt } from "./scb-viz/scb-viz.js";
|
|
108
|
+
import { ensureRippleReady as Ht, syncRippleToControl as Ut } from "./shared/lazy-ripple.js";
|
|
109
|
+
export { D as SCBBreadcrumb, E as SCBBreadcrumbItem, l as ScbAccordion, s as ScbAccordionItem, u as ScbActionCard, C as ScbAppBar, a as ScbAvatar, w as ScbBadge, c as ScbButton, H as ScbCalendar, U as ScbCalendarCard, O as ScbCalendarEvent, d as ScbCard, P as ScbCheckbox, N as ScbCheckboxGroup, o as ScbChevron, R as ScbChip, W as ScbCollapse, f as ScbContainerCard, G as ScbCookiesConsent, A as ScbDatepicker, z as ScbDialog, k as ScbDivider, K as ScbDrawer, q as ScbDropZone, Z as ScbDropdown, $ as ScbFactCard, Q as ScbFactCardContent, ie as ScbFooter, ee as ScbFooterSection, se as ScbFormErrorSummary, fe as ScbGalleryGrid, re as ScbGrid, te as ScbGridItem, _e as ScbHeader, pe as ScbHeaderMenuGroup, me as ScbHeaderMenuItem, he as ScbHeaderTab, ge as ScbHeaderUtility, ue as ScbHorizontalScroller, ae as ScbIcon, g as ScbIconButton, ve as ScbKeyFigureCard, T as ScbLink, ye as ScbLinkButton, p as ScbLinkCard, V as ScbList, m as ScbListCard, B as ScbListItem, Ce as ScbMenu, be as ScbMenuItem, Te as ScbNav, we as ScbNavItem, oe as ScbNotificationCard, X as ScbOptionsMenu, J as ScbOptionsMenuItem, Y as ScbOptionsSubMenu, de as ScbOverlay, Ee as ScbPagination, Ge as ScbPrimaryTab, De as ScbProgressIndicator, Oe as ScbProgressStep, ke as ScbProgressStepper, I as ScbRadioButton, F as ScbRadioGroup, Ae as ScbScrollspy, S as ScbSearch, Ke as ScbSecondaryTab, Me as ScbSegmentedButton, je as ScbSegmentedItem, Pe as ScbSelect, Ne as ScbSelectOption, Fe as ScbSkeleton, Ie as ScbSlider, Le as ScbSnackbar, h as ScbSocialCard, ne as ScbStack, Re as ScbStatusPill, ze as ScbStep, Be as ScbStepper, Se as ScbSubmenu, L as ScbSwitch, Ve as ScbTable, He as ScbTableAdvanced, We as ScbTableNext, qe as ScbTabs, M as ScbTextField, Ye as ScbToc, Je as ScbTocItem, j as ScbTooltip, Vt as ScbViz, xe as ScbmenuSection, e as addLazyFocusRingListeners, dt as appendScbVizSeriesDifferentiationPatternMarks, Xe as buildScbVizExportFileName, ct as buildScbVizPrintDocumentHtml, lt as buildScbVizPrintableFooterHtml, ut as buildScbVizPrintableTableHtml, It as buildScbVizResolvedTableView, _t as clearScbVizSeriesDifferentiationColorClass, vt as clearScbVizSeriesDifferentiationMetadata, _ as closeManualPopover, v as closeManualPopoverAfterAnimations, y as closeNestedPopupSurfaces, i as componentSizeToken, Ze as createScbVizCsvBlob, Lt as createScbVizCsvRows, Qe as createScbVizRasterBlobFromElement, $e as createScbVizRasterDataUrlFromElement, et as downloadScbVizBlob, t as ensureFocusRingOnFocusVisible, n as ensureFocusRingOnTab, r as ensureFocusRingReady, Ht as ensureRippleReady, yt as ensureScbVizGroupedSeriesDifferentiationStore, bt as ensureScbVizStyledModeSeriesPattern, tt as getScbVizCurrentFullscreenElement, nt as getScbVizExportBaseFileName, rt as getScbVizFullscreenDocument, xt as getScbVizGroupedSeriesDifferentiationKey, St as getScbVizGroupedSeriesDifferentiationVariant, Ct as getScbVizGroupedSeriesDifferentiationVariantIndex, wt as getScbVizHighchartsColorClassName, Tt as getScbVizHighchartsSvgElement, Et as getScbVizHighchartsSvgRoot, Dt as getScbVizLegendSeriesDifferentiationTargets, Ot as getScbVizSeriesDifferentiationColorIndex, ft as getScbVizSeriesDifferentiationPatternDefinition, pt as getScbVizSeriesDifferentiationPatternKinds, mt as getScbVizSeriesDifferentiationRegistry, ht as getScbVizSeriesDifferentiationVariant, kt as getScbVizSeriesDifferentiationVariantByIndex, ce as hasScbSvgIcon, Rt as inferScbVizTableAlignments, b as isManualPopoverOpen, it as isScbVizFullscreenSupported, At as isScbVizGroupedSeriesDifferentiationChart, jt as isScbVizHighchartsStyledMode, zt as normalizeScbVizRenderableCell, x as openManualPopover, at as openScbVizPrintFrame, Bt as readScbVizTableDataFromSlot, Ue as readTable, le as renderScbIcon, ot as runWithScbVizForcedPrintLightMode, gt as scbVizSeriesDifferentiationRegistry, Mt as setScbVizSeriesDifferentiationColorClass, Nt as setScbVizSeriesDifferentiationMetadata, Pt as shouldShowScbVizSeriesDifferentiationAction, Ut as syncRippleToControl, st as toggleScbVizFullscreen, Ft as usesScbVizGroupedPointDifferentiation };
|
package/mvc/components/all.js
CHANGED
|
@@ -18,10 +18,12 @@ import './scb-card/scb-list-card.js';
|
|
|
18
18
|
import './scb-card/scb-social-card.js';
|
|
19
19
|
import './scb-checkbox/scb-checkbox.js';
|
|
20
20
|
import './scb-checkbox/scb-checkbox-group.js';
|
|
21
|
+
import './scb-chevron/scb-chevron.js';
|
|
21
22
|
import './scb-chip/scb-chip.js';
|
|
22
23
|
import './scb-collapse/scb-collapse.js';
|
|
23
24
|
import './scb-container-card/scb-container-card.js';
|
|
24
25
|
import './scb-cookies-consent/scb-cookies-consent.js';
|
|
26
|
+
import './scb-datepicker/scb-datepicker.js';
|
|
25
27
|
import './scb-dialog/scb-dialog.js';
|
|
26
28
|
import './scb-divider/scb-divider.js';
|
|
27
29
|
import './scb-drawer/scb-drawer.js';
|
|
@@ -83,6 +85,8 @@ import './scb-stepper/scb-step.js';
|
|
|
83
85
|
import './scb-stepper/scb-stepper.js';
|
|
84
86
|
import './scb-switch/scb-switch.js';
|
|
85
87
|
import './scb-table-advanced/scb-table-advanced.js';
|
|
88
|
+
import './scb-table-next/read-table.js';
|
|
89
|
+
import './scb-table-next/scb-table-next.js';
|
|
86
90
|
import './scb-table/scb-table.js';
|
|
87
91
|
import './scb-tabs/scb-primary-tab.js';
|
|
88
92
|
import './scb-tabs/scb-secondary-tab.js';
|
|
@@ -97,3 +101,8 @@ import './scb-viz/scb-viz-print-runtime.js';
|
|
|
97
101
|
import './scb-viz/scb-viz-series-differentiation-registry.js';
|
|
98
102
|
import './scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
99
103
|
import './scb-viz/scb-viz-table-runtime.js';
|
|
104
|
+
import './shared/component-size-token.js';
|
|
105
|
+
import './shared/lazy-focus-ring.js';
|
|
106
|
+
import './shared/lazy-ripple.js';
|
|
107
|
+
import './shared/manual-popover.js';
|
|
108
|
+
import './shared/scb-icon-svg.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as l,h as p,m as v,p as n,v as o,y as h}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{
|
|
1
|
+
import{g as l,h as p,m as v,p as n,v as o,y as h}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{ensureFocusRingOnFocusVisible as u}from"../shared/lazy-focus-ring.js";import{componentSizeToken as y}from"../shared/component-size-token.js";import{t as r}from"../../vendor/decorate.js";import"../scb-avatar/scb-avatar.js";import"../scb-chevron/scb-chevron.js";(function(){try{var b=typeof globalThis<"u"?globalThis:window;if(!b.__scb_ce_guard_installed__){b.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,c,g){try{customElements.get(e)||i(e,c,g)}catch(s){var a=String(s||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw s}}}}catch{}})();var d,m,t=(d=class extends p{constructor(...i){super(...i),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=m._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=e=>{e.preventDefault();const c=!this.open;this.closest("scb-accordion")?.onItemToggled?.(this,c),this.setOpen(c)},this._onToggle=e=>{const c=e.currentTarget;c.open||(c.open=!0),this._applyInertByOpen()}}static _uid(){return globalThis.crypto?.randomUUID?.()??`${m._uidPrefix}-${++m._uidSeq}`}static get observedAttributes(){const i=super.observedAttributes||[];return i.includes("title")?i:[...i,"title"]}attributeChangedCallback(i,e,c){if(i==="title"&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(i,e,c),i==="title"&&c!==null&&(this._ignoreNextNativeTitleAttrChange=!0,this.removeAttribute("title"))}firstUpdated(){this._applyInertByOpen()}_applyInertByOpen(){const i=this.renderRoot.querySelector(".scb-accordion-bottom");i&&(this.open?(i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")):(i.setAttribute("inert",""),i.setAttribute("aria-hidden","true")))}_onKeyDown(i){const e=this.closest("scb-accordion"),c=Array.from(e?.querySelectorAll("scb-accordion-item")||[]).map(s=>s.renderRoot.querySelector("details")?.querySelector(".scb-accordion-top")||null).filter(s=>!!s),g=i.currentTarget,a=c.indexOf(g);switch(i.key){case"ArrowDown":i.preventDefault(),a<c.length-1&&c[a+1].focus();break;case"ArrowUp":i.preventDefault(),a>0&&c[a-1].focus();break;case"Home":i.preventDefault(),c.length&&c[0].focus();break;case"End":i.preventDefault(),c.length&&c[c.length-1].focus();break}}setOpen(i){this.open=!!i;const e=this.renderRoot.querySelector("details");e&&!e.open&&(e.open=!0),this._applyInertByOpen()}updated(i){if(i.has("open")){const e=this.renderRoot.querySelector("details");e&&!e.open&&(e.open=!0),this._applyInertByOpen(),this.dispatchEvent(new CustomEvent("open-changed",{detail:{open:this.open,title:this.title},bubbles:!0,composed:!0}))}}render(){const i=`bottom-${this._unique}`,e=`header-${this._unique}`,c=this.closest("scb-accordion")?.getAttribute("size")||"large",g=y(this,`--scb-accordion-item-design-leading-avatar-component-size-${c}`,["small","medium","large","extra-large"],"medium"),a=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?o`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?o`
|
|
2
2
|
<scb-avatar
|
|
3
3
|
label=${this.avatarLabel}
|
|
4
4
|
alt=${this.avatarAlt}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as f,h as v,m as y,p as c,v as h,y as k}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{
|
|
1
|
+
import{g as f,h as v,m as y,p as c,v as h,y as k}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{componentSizeToken as _}from"../shared/component-size-token.js";import{t as S}from"../../vendor/component-defaults.js";import{t as e}from"../../vendor/decorate.js";import{t as a}from"../../vendor/assertClassBrand.js";import{t as A}from"../../vendor/classPrivateMethodInitSpec.js";import"./scb-accordion-item.js";import"../scb-button/scb-button.js";(function(){try{var n=typeof globalThis<"u"?globalThis:window;if(!n.__scb_ce_guard_installed__){n.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(t,r,l){try{customElements.get(t)||i(t,r,l)}catch(b){var g=String(b||"");if(g.indexOf("already been used")===-1&&g.indexOf("NotSupportedError")===-1)throw b}}}}catch{}})();var o,d,s=(o=new WeakSet,d=class extends v{constructor(...i){super(...i),A(this,o),this.singleOpen=!1,this.showCloseAll=!1,this.openAllLabel="Öppna alla",this.closeAllLabel="Stäng alla",this.controlsLabel="Accordionkontroller",this.size=S["scb-accordion"].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}connectedCallback(){super.connectedCallback(),this.addEventListener("open-changed",a(o,this,m))}disconnectedCallback(){this.removeEventListener("open-changed",a(o,this,m)),super.disconnectedCallback()}render(){const i=!this.singleOpen&&this.showCloseAll,t=i?a(o,this,O).call(this):!1;return h`
|
|
2
2
|
<div class="scb-accordion" ?single-open=${this.singleOpen}>
|
|
3
3
|
${i?h`
|
|
4
4
|
<div class="scb-accordion-actions" role="toolbar" aria-label=${this.controlsLabel}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as M,m as q,p as l,v,y as N}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{
|
|
1
|
+
import{h as M,m as q,p as l,v,y as N}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{componentSizeToken as k}from"../shared/component-size-token.js";import{t as I}from"../../vendor/component-defaults.js";import{t as p}from"../../vendor/decorate.js";import{t as i}from"../../vendor/assertClassBrand.js";import{t as F}from"../../vendor/classPrivateMethodInitSpec.js";import"../scb-avatar/scb-avatar.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import{closeManualPopover as x,openManualPopover as U}from"../shared/manual-popover.js";import"../scb-search/scb-search.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var a=customElements.define.bind(customElements);customElements.define=function(r,s,b){try{customElements.get(r)||a(r,s,b)}catch(c){var g=String(c||"");if(g.indexOf("already been used")===-1&&g.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var t,u,W={default:{size:"small",variant:"centered"},"small-flexible":{size:"small",variant:"start"},search:{size:"small",variant:"search"},"medium-flexible":{size:"medium",variant:"start"},"large-flexible":{size:"large",variant:"start"}},H={"action-padding-inline":{small:"var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))",medium:"var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))",large:"var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))"},"action-padding-block":{small:"var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))",medium:"var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))",large:"var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))"}},G="data-scb-app-bar-managed-action-size",V="data-scb-app-bar-managed-avatar-size",n=(t=new WeakSet,u=class extends M{constructor(...a){super(...a),F(this,t),this.title="",this.appBarTitle="",this.size=I["scb-app-bar"].size,this.variant="centered",this.type="",this.position="default",this.ariaLabel="",this.defaultAriaLabel="Appfält",this.searchAriaLabel="Sökfält",this.searchSupportingText="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__titleResizeRaf=0}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<"u"&&(this.__titleResizeObserver=new ResizeObserver(()=>i(t,this,h).call(this)))}disconnectedCallback(){this.__titleResizeRaf&&(cancelAnimationFrame(this.__titleResizeRaf),this.__titleResizeRaf=0),this.__titleResizeObserver?.disconnect(),this.__titleResizeObserver=void 0,x(this.renderRoot.querySelector("header")),super.disconnectedCallback()}handleActionsSlotChange(a){a.target.assignedElements({flatten:!0}).forEach(r=>{i(t,this,T).call(this,r)}),i(t,this,h).call(this)}handleAvatarSlotChange(a){a.target.assignedElements({flatten:!0}).forEach(r=>{i(t,this,A).call(this,r)}),i(t,this,h).call(this)}firstUpdated(){i(t,this,w).call(this),i(t,this,R).call(this),i(t,this,_).call(this)}updated(a){if((a.has("title")||a.has("appBarTitle"))&&(this.dispatchEvent(new CustomEvent("title-changed",{detail:{title:f.call(i(t,this))},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("app-bar-title-changed",{detail:{appBarTitle:f.call(i(t,this))},bubbles:!0,composed:!0}))),a.has("position")){const r=this.renderRoot.querySelector("header");this.position==="top"||this.position==="bottom"?U(r):x(r),this.dispatchEvent(new CustomEvent("position-changed",{detail:{position:this.position},bubbles:!0,composed:!0}))}a.has("type")&&this.dispatchEvent(new CustomEvent("type-changed",{detail:{type:this.type},bubbles:!0,composed:!0})),a.has("size")&&this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:d.call(i(t,this))},bubbles:!0,composed:!0})),a.has("variant")&&this.dispatchEvent(new CustomEvent("variant-changed",{detail:{variant:o.call(i(t,this))},bubbles:!0,composed:!0})),(a.has("type")||a.has("size")||a.has("variant"))&&this.updateComplete.then(()=>{i(t,this,_).call(this)}),a.has("searchSupportingText")&&this.dispatchEvent(new CustomEvent("search-supporting-text-changed",{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0})),(a.has("spacing")||a.has("spacingTop")||a.has("spacingBottom")||a.has("spacingLeft")||a.has("spacingRight"))&&i(t,this,w).call(this),i(t,this,R).call(this)}mapSpacingToken(a){if(!a)return;const r=String(a).trim();if(r)return/^\d+$/.test(r)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(r,10)))})`:r}render(){const a=o.call(i(t,this)),r=d.call(i(t,this)),s=k(this,`--scb-app-bar-design-search-component-size-${r}`,["extra-small","small","medium","large"],"small");return v`
|
|
2
2
|
<header class=${`variant-${a} size-${r} ${J.call(i(t,this))}`} role="banner" aria-label=${D.call(i(t,this))}>
|
|
3
3
|
<div class="leading">
|
|
4
4
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|