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/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
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 finns för att underlätta skapandet av enhetliga, tillgängliga och användbara webbapplikationer.
|
|
4
7
|
|
|
5
8
|
Komponenterna bygger på:
|
|
6
9
|
- [Lit](https://lit.dev/)
|
|
@@ -8,54 +11,32 @@ Komponenterna bygger på:
|
|
|
8
11
|
|
|
9
12
|
## Storybook och dokumentation (internt)
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Previewkomponenterna dokumenteras och demonstreras i Storybook på SCB:s interna testadress:
|
|
12
15
|
|
|
13
|
-
-
|
|
16
|
+
- Test: <https://webcomponentstest.scb.intra>
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
Den publika/stabila Storybooken finns på:
|
|
16
19
|
|
|
17
|
-
-
|
|
20
|
+
- Prod: <https://webcomponents.scb.intra>
|
|
18
21
|
|
|
19
22
|
---
|
|
20
23
|
|
|
21
24
|
## Kom igång
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
npx scb-wc init html my-app
|
|
27
|
-
npx scb-wc init html-service my-service
|
|
28
|
-
npx scb-wc init react my-react-app
|
|
29
|
-
npx scb-wc init react-service my-react-service
|
|
30
|
-
npx scb-wc init blazor my-blazor-app
|
|
31
|
-
npx scb-wc init blazor-service my-blazor-service
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Webbplatsmallarna skapar en liten starterapp med:
|
|
35
|
-
- `scb-header`
|
|
36
|
-
- `scb-footer`
|
|
37
|
-
- `scb-grid`
|
|
38
|
-
- några vanliga komponenter
|
|
39
|
-
|
|
40
|
-
Webbtjänstmallarna skapar en starterapp med:
|
|
41
|
-
- `scb-app-bar`
|
|
42
|
-
- `scb-search`
|
|
43
|
-
- `scb-table-advanced`
|
|
44
|
-
- komponenter för actions och status
|
|
26
|
+
> **Obs:** Kör alla kommandon i mappen där din `package.json` ligger.
|
|
27
|
+
> Har du ingen? Kör `npm init -y` i projektroten (eller annan lämplig mapp).
|
|
45
28
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Om du redan har en app med `package.json`, kör kommandon i den mappen och installera paketet:
|
|
29
|
+
Installera previewkanalen:
|
|
49
30
|
|
|
50
31
|
```sh
|
|
51
|
-
npm install scb-wc
|
|
32
|
+
npm install scb-wc@next
|
|
52
33
|
```
|
|
53
34
|
|
|
54
35
|
---
|
|
55
36
|
|
|
56
37
|
## Alternativ 1: Använd som ES‑moduler (t.ex. i React, Vue, SPA)
|
|
57
38
|
|
|
58
|
-
Importera CSS och de
|
|
39
|
+
Importera CSS och de testkomponenter du använder (bäst för tree‑shaking):
|
|
59
40
|
|
|
60
41
|
```js
|
|
61
42
|
// Global CSS + tokens (måste bara importeras en gång)
|
|
@@ -85,17 +66,19 @@ Vill du selfhosta kan du istället importera:
|
|
|
85
66
|
import 'scb-wc/scb-wc-selfhost.css';
|
|
86
67
|
```
|
|
87
68
|
|
|
88
|
-
Då används paketets egna fontfiler under `node_modules/scb-wc/fonts/`.
|
|
69
|
+
Då används paketets egna fontfiler under `node_modules/scb-wc/fonts/`. Material Symbols är inte hela Google-fonten här. Selfhost-filen innehåller alla ikoner som visas under `Foundations/Icons (ikoner)` i Storybook. Listan kommer från paketets `icons.json`. Fonten behåller stöd för både fyllda och ofyllda varianter.
|
|
89
70
|
|
|
90
71
|
### Optimera Material Symbols med eget ikon-subset
|
|
91
72
|
|
|
92
|
-
|
|
73
|
+
Det här är bara för appar som behöver Material Symbols utöver paketets `icons.json`. Då använder du `scb-wc-core.css` + ditt genererade `scb-wc-icons.css` i stället för `scb-wc-selfhost.css`.
|
|
74
|
+
|
|
75
|
+
Skapa en ikonlista i appens rot. Om du vill ersätta paketets selfhost-lista, kopiera paketets `icons.json` och lägg till dina egna ikon-namn:
|
|
93
76
|
|
|
94
77
|
```sh
|
|
95
78
|
npx scb-wc subset-icons --icons ./src/scb-icons.json --out ./public/scb-icons
|
|
96
79
|
```
|
|
97
80
|
|
|
98
|
-
Om `--icons` utelämnas används paketets standardlista `icons.json`. Kommandot skapar `scb-wc-icons.css`, en lokal fontfil och en kopia av ikonlistan i målmappen. Ladda då den fontlösa bas-CSS:en plus den genererade ikon-CSS:en:
|
|
81
|
+
Om `--icons` utelämnas används paketets standardlista `icons.json`. Om du skickar in en egen fil lägger kommandot till några basikoner, men inte hela paketets ikonlista. Kommandot skapar `scb-wc-icons.css`, en lokal fontfil och en kopia av ikonlistan i målmappen. Ladda då den fontlösa bas-CSS:en plus den genererade ikon-CSS:en:
|
|
99
82
|
|
|
100
83
|
```js
|
|
101
84
|
import 'scb-wc/scb-wc-core.css';
|
|
@@ -103,11 +86,13 @@ import '/scb-icons/scb-wc-icons.css';
|
|
|
103
86
|
import 'scb-wc/scb-typography.css';
|
|
104
87
|
```
|
|
105
88
|
|
|
89
|
+
För MVC/MPA räcker det normalt att använda `scb-wc-selfhost.css`, eftersom den redan pekar på paketets selfhostade fontfiler.
|
|
90
|
+
|
|
106
91
|
---
|
|
107
92
|
|
|
108
93
|
## Alternativ 2: Använd i MVC/MPA via `<script type="module">`
|
|
109
94
|
|
|
110
|
-
Det här läget använder den färdig‑
|
|
95
|
+
Det här läget använder den färdig‑splittade **MVC‑ESM**‑builden som följer med paketet under:
|
|
111
96
|
|
|
112
97
|
```text
|
|
113
98
|
node_modules/scb-wc/mvc/
|
|
@@ -120,7 +105,7 @@ Lägg till i din apps `package.json`:
|
|
|
120
105
|
```jsonc
|
|
121
106
|
{
|
|
122
107
|
"scripts": {
|
|
123
|
-
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\""
|
|
108
|
+
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\""
|
|
124
109
|
}
|
|
125
110
|
}
|
|
126
111
|
```
|
|
@@ -131,22 +116,23 @@ Kör sedan:
|
|
|
131
116
|
npm run ui:install
|
|
132
117
|
```
|
|
133
118
|
|
|
134
|
-
Det kopierar hela `node_modules/scb-wc/mvc/` till `wwwroot/ui/` i din applikation (komponenter, vendor och
|
|
119
|
+
Det kopierar hela `node_modules/scb-wc/mvc/` till `wwwroot/ui/` i din applikation (komponenter, vendor, CSS och fonts).
|
|
135
120
|
|
|
136
|
-
### 2.2) Ladda filer i
|
|
121
|
+
### 2.2) Ladda filer i layouten (Razor, .cshtml, klassisk MVC)
|
|
137
122
|
|
|
138
|
-
|
|
123
|
+
Exemplet använder selfhost-läget. Lägg CSS i `<head>` och ladda bara de komponentskript som sidan använder.
|
|
139
124
|
|
|
140
125
|
```html
|
|
141
|
-
<!--
|
|
142
|
-
<link rel="stylesheet" href="~/ui/scb-wc.css" />
|
|
126
|
+
<!-- Global layout, helst i <head> -->
|
|
127
|
+
<link rel="stylesheet" href="~/ui/scb-wc-selfhost.css" />
|
|
143
128
|
<link rel="stylesheet" href="~/ui/scb-typography.css" />
|
|
144
129
|
|
|
145
|
-
<!-- Ladda
|
|
146
|
-
<script type="module" src="~/ui/components/scb-link/scb-link.js"></script>
|
|
130
|
+
<!-- Ladda bara de komponenter sidan använder -->
|
|
147
131
|
<script type="module" src="~/ui/components/scb-button/scb-button.js"></script>
|
|
148
132
|
```
|
|
149
133
|
|
|
134
|
+
`~/ui/scb-wc-selfhost.css` laddar Inter och paketets Material Symbols-subset från `~/ui/fonts/`.
|
|
135
|
+
|
|
150
136
|
### 2.3) CI/CD‑exempel
|
|
151
137
|
|
|
152
138
|
Kör samma script i din pipeline:
|
|
@@ -167,7 +153,7 @@ Behöver du en annan webbrotsökväg (t.ex. om din `wwwroot` ligger någon annan
|
|
|
167
153
|
|
|
168
154
|
## Alternativ 3: Bundlad version (IIFE) för äldre miljöer
|
|
169
155
|
|
|
170
|
-
Om ESM inte stöds kan du använda den bundlade varianten från paketroten.
|
|
156
|
+
Om ESM inte stöds kan du använda den bundlade test‑varianten från paketroten.
|
|
171
157
|
Flytta följande tre filer från `node_modules/scb-wc` och använd dem i applikationen:
|
|
172
158
|
|
|
173
159
|
```text
|
|
@@ -190,7 +176,7 @@ node_modules/scb-wc/scb-typography.css
|
|
|
190
176
|
|
|
191
177
|
SCB Web Components fungerar även i Blazor‑appar när du vill använda samma komponenter i både MVC/MPA och Blazor.
|
|
192
178
|
|
|
193
|
-
Grundprincipen är
|
|
179
|
+
Grundprincipen är samma som för `scb-wc`:
|
|
194
180
|
|
|
195
181
|
1. Använd MVC‑ESM‑builden (`node_modules/scb-wc/mvc`) och kopiera den till `wwwroot/ui` med `ui:install`.
|
|
196
182
|
2. Ladda `scb-blazor-bridge.js` från `wwwroot/ui` i din Blazor‑layout.
|
|
@@ -203,8 +189,8 @@ Lägg till ett script som kopierar interop-filen från `node_modules` till ditt
|
|
|
203
189
|
```jsonc
|
|
204
190
|
{
|
|
205
191
|
"scripts": {
|
|
206
|
-
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\"",
|
|
207
|
-
"ui:blazor:interop": "node -e \"const fs=require('fs'),p=require('path');const start=process.env.INIT_CWD||process.cwd();const src=p.resolve('node_modules/scb-wc/blazor/ScbBlazorInteropBase.cs');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const dst=p.resolve(start,'ScbBlazor/ScbBlazorInteropBase.cs');fs.mkdirSync(p.dirname(dst),{recursive:true});fs.copyFileSync(src,dst);console.log('Kopierade '+src+' → '+dst);\""
|
|
192
|
+
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\"",
|
|
193
|
+
"ui:blazor:interop": "node -e \"const fs=require('fs'),p=require('path');const start=process.env.INIT_CWD||process.cwd();const src=p.resolve('node_modules/scb-wc/blazor/ScbBlazorInteropBase.cs');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const dst=p.resolve(start,'ScbBlazor/ScbBlazorInteropBase.cs');fs.mkdirSync(p.dirname(dst),{recursive:true});fs.copyFileSync(src,dst);console.log('Kopierade '+src+' → '+dst);\""
|
|
208
194
|
}
|
|
209
195
|
}
|
|
210
196
|
```
|
|
@@ -218,13 +204,13 @@ Exempel på layout:
|
|
|
218
204
|
<script type="module" src="~/ui/scb-blazor-bridge.js"></script>
|
|
219
205
|
```
|
|
220
206
|
|
|
221
|
-
`ScbBlazorInteropBase` kan
|
|
207
|
+
`ScbBlazorInteropBase` är samma bas‑klass i preview- och public-kanalen. Du kan därför dela samma C#‑fil mellan projekt som använder `scb-wc@next` och `scb-wc@latest`.
|
|
222
208
|
|
|
223
209
|
---
|
|
224
210
|
|
|
225
211
|
## Viktigt
|
|
226
212
|
|
|
227
|
-
- `scb-wc@
|
|
213
|
+
- `scb-wc@next` är **previewkanalen**. Komponenter kan ändras eller tas bort mellan versioner. Använd `scb-wc@latest` i externa produktionsmiljöer.
|
|
228
214
|
- **Kör kommandon i mappen med din `package.json`.** Placeringen av `package.json` styr standardmål för `ui:install` (rot → `wwwroot/ui`, `ClientApp/` → använd `--ui_wwwroot=../wwwroot`).
|
|
229
215
|
- **Blanda inte MVC‑ESM och IIFE på samma sida.** Välj en distributionsform per sida/app.
|
|
230
216
|
- **Blazor:** Se till att `scb-blazor-bridge.js` laddas efter att komponent‑JS:et finns på sidan, och att `ScbBlazorInteropBase` inte dupliceras i flera namespaces i samma lösning.
|
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';
|
package/bin/scb-wc.mjs
CHANGED
|
@@ -21,7 +21,7 @@ const defaultSubsetOutDir = 'public/scb-icons';
|
|
|
21
21
|
const defaultSubsetCssFile = 'scb-wc-icons.css';
|
|
22
22
|
const defaultSubsetFontBase = 'material-symbols-outlined-subset';
|
|
23
23
|
const materialSymbolsCssUrl = 'https://fonts.googleapis.com/css2';
|
|
24
|
-
const materialSymbolsFamilyQuery = 'Material Symbols Outlined:opsz,wght,FILL,GRAD@
|
|
24
|
+
const materialSymbolsFamilyQuery = 'Material Symbols Outlined:opsz,wght,FILL,GRAD@20..48,400,0..1,0';
|
|
25
25
|
const requiredIconNames = [
|
|
26
26
|
'arrow_back',
|
|
27
27
|
'arrow_forward',
|
|
@@ -108,7 +108,7 @@ function parseFlags(args) {
|
|
|
108
108
|
fail(`Ogiltigt argument: ${arg}`);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
if (key === 'dry-run' || key === 'help') {
|
|
111
|
+
if (key === 'dry-run' || key === 'help' || key === 'no-required-icons' || key === 'allow-empty') {
|
|
112
112
|
flags[key] = true;
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
@@ -161,8 +161,9 @@ function readIconList(iconsPath) {
|
|
|
161
161
|
return list.map((icon) => String(icon ?? '').trim()).filter(Boolean);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
function normalizeIconNames(iconNames) {
|
|
165
|
-
const
|
|
164
|
+
function normalizeIconNames(iconNames, { includeRequired = true } = {}) {
|
|
165
|
+
const baseIconNames = includeRequired ? requiredIconNames : [];
|
|
166
|
+
const normalized = Array.from(new Set([...baseIconNames, ...iconNames]))
|
|
166
167
|
.map((icon) => icon.trim())
|
|
167
168
|
.filter(Boolean)
|
|
168
169
|
.sort((a, b) => a.localeCompare(b));
|
|
@@ -191,7 +192,8 @@ function requestUrl(url, redirects = 5) {
|
|
|
191
192
|
url,
|
|
192
193
|
{
|
|
193
194
|
headers: {
|
|
194
|
-
|
|
195
|
+
Accept: 'text/css,*/*;q=0.1',
|
|
196
|
+
'User-Agent': 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124 Safari/537.36',
|
|
195
197
|
},
|
|
196
198
|
},
|
|
197
199
|
(response) => {
|
|
@@ -264,6 +266,19 @@ function findFontSources(cssText) {
|
|
|
264
266
|
}));
|
|
265
267
|
}
|
|
266
268
|
|
|
269
|
+
function writeEmptySubsetFiles({ iconNames, outDir, cssFile }) {
|
|
270
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
271
|
+
|
|
272
|
+
const header = [
|
|
273
|
+
'/* Generated by `npx scb-wc subset-icons`. */',
|
|
274
|
+
'/* Icons: none */',
|
|
275
|
+
'',
|
|
276
|
+
].join('\n');
|
|
277
|
+
|
|
278
|
+
fs.writeFileSync(path.join(outDir, cssFile), `${header}`, 'utf8');
|
|
279
|
+
fs.writeFileSync(path.join(outDir, 'icons.json'), `${JSON.stringify(iconNames, null, 2)}\n`, 'utf8');
|
|
280
|
+
}
|
|
281
|
+
|
|
267
282
|
async function writeSubsetFiles({ cssText, iconNames, outDir, cssFile }) {
|
|
268
283
|
const sources = findFontSources(cssText);
|
|
269
284
|
if (!sources.length) {
|
|
@@ -299,6 +314,10 @@ async function runSubsetIcons(args) {
|
|
|
299
314
|
return;
|
|
300
315
|
}
|
|
301
316
|
|
|
317
|
+
if (flags.preset) {
|
|
318
|
+
fail('--preset stöds inte längre. Använd --icons för att ange ikonlista.');
|
|
319
|
+
}
|
|
320
|
+
|
|
302
321
|
const iconsPath = flags.icons ?? resolveDefaultIconsPath();
|
|
303
322
|
const outDir = path.resolve(process.cwd(), flags.out ?? defaultSubsetOutDir);
|
|
304
323
|
const cssFile = flags['css-file'] ?? defaultSubsetCssFile;
|
|
@@ -312,8 +331,13 @@ async function runSubsetIcons(args) {
|
|
|
312
331
|
fail('--display måste vara auto, block, swap, fallback eller optional.');
|
|
313
332
|
}
|
|
314
333
|
|
|
315
|
-
const iconNames = normalizeIconNames(readIconList(iconsPath)
|
|
316
|
-
|
|
334
|
+
const iconNames = normalizeIconNames(readIconList(iconsPath), {
|
|
335
|
+
includeRequired: !flags['no-required-icons'],
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
if (!iconNames.length && !flags['allow-empty']) {
|
|
339
|
+
fail('Ikonlistan är tom. Lägg till ikoner eller använd --allow-empty.');
|
|
340
|
+
}
|
|
317
341
|
|
|
318
342
|
if (flags['dry-run']) {
|
|
319
343
|
console.log(`Skulle skapa Material Symbols-subset med ${iconNames.length} ikoner.`);
|
|
@@ -323,6 +347,14 @@ async function runSubsetIcons(args) {
|
|
|
323
347
|
return;
|
|
324
348
|
}
|
|
325
349
|
|
|
350
|
+
if (!iconNames.length) {
|
|
351
|
+
writeEmptySubsetFiles({ iconNames, outDir, cssFile });
|
|
352
|
+
console.log(`Skapade tom ikon-CSS i ${outDir}`);
|
|
353
|
+
console.log(`Ladda CSS-filen: ${path.join(outDir, cssFile)}`);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const cssUrl = buildMaterialSymbolsUrl(iconNames, display);
|
|
326
358
|
const cssText = await fetchText(cssUrl);
|
|
327
359
|
await writeSubsetFiles({ cssText, iconNames, outDir, cssFile });
|
|
328
360
|
console.log(`Skapade ikon-subset med ${iconNames.length} ikoner i ${outDir}`);
|
|
@@ -739,6 +739,9 @@ namespace ScbBlazor
|
|
|
739
739
|
Type = dto.Type ?? string.Empty,
|
|
740
740
|
Variant = dto.Variant ?? string.Empty,
|
|
741
741
|
Direction = dto.Direction ?? string.Empty,
|
|
742
|
+
Title = dto.Title ?? string.Empty,
|
|
743
|
+
Subtitle = dto.Subtitle ?? string.Empty,
|
|
744
|
+
SupportingText = dto.SupportingText ?? string.Empty,
|
|
742
745
|
CardHref = dto.CardHref ?? string.Empty,
|
|
743
746
|
|
|
744
747
|
MediaType = dto.MediaType ?? string.Empty,
|
|
@@ -2974,6 +2977,9 @@ namespace ScbBlazor
|
|
|
2974
2977
|
public string Type { get; set; } = string.Empty;
|
|
2975
2978
|
public string Variant { get; set; } = string.Empty;
|
|
2976
2979
|
public string Direction { get; set; } = string.Empty;
|
|
2980
|
+
public string Title { get; set; } = string.Empty;
|
|
2981
|
+
public string Subtitle { get; set; } = string.Empty;
|
|
2982
|
+
public string SupportingText { get; set; } = string.Empty;
|
|
2977
2983
|
public string CardHref { get; set; } = string.Empty;
|
|
2978
2984
|
|
|
2979
2985
|
public string MediaType { get; set; } = string.Empty;
|
|
@@ -3840,6 +3846,9 @@ namespace ScbBlazor
|
|
|
3840
3846
|
public string? Type { get; set; }
|
|
3841
3847
|
public string? Variant { get; set; }
|
|
3842
3848
|
public string? Direction { get; set; }
|
|
3849
|
+
public string? Title { get; set; }
|
|
3850
|
+
public string? Subtitle { get; set; }
|
|
3851
|
+
public string? SupportingText { get; set; }
|
|
3843
3852
|
public string? CardHref { get; set; }
|
|
3844
3853
|
|
|
3845
3854
|
public string? MediaType { get; set; }
|
package/index.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { ScbChevron as e } from "./scb-chevron/scb-chevron.js";
|
|
2
|
+
import { ScbAccordionItem as t } from "./scb-accordion/scb-accordion-item.js";
|
|
3
|
+
import { ScbButton as n } from "./scb-button/scb-button.js";
|
|
4
|
+
import { ScbAccordion as r } from "./scb-accordion/scb-accordion.js";
|
|
5
|
+
import { ScbListItem as i } from "./scb-list/scb-list-item.js";
|
|
6
|
+
import { ScbList as a } from "./scb-list/scb-list.js";
|
|
7
|
+
import { ScbIconButton as o } from "./scb-icon-button/scb-icon-button.js";
|
|
8
|
+
import { ScbLink as s } from "./scb-link/scb-link.js";
|
|
9
|
+
import { ScbChip as c } from "./scb-chip/scb-chip.js";
|
|
10
|
+
import { ScbAvatar as l } from "./scb-avatar/scb-avatar.js";
|
|
11
|
+
import { ScbTooltip as u } from "./scb-tooltip/scb-tooltip.js";
|
|
12
|
+
import { ScbActionCard as d, ScbCard as f, ScbContainerCard as p, ScbLinkCard as m, ScbListCard as h, ScbSocialCard as g } from "./scb-card/scb-card.js";
|
|
12
13
|
import "./scb-action-card/scb-action-card.js";
|
|
13
|
-
import { ScbSearch as
|
|
14
|
-
import { ScbAppBar as
|
|
15
|
-
import { ScbBadge as
|
|
16
|
-
import { SCBBreadcrumbItem as
|
|
17
|
-
import { SCBBreadcrumb as
|
|
18
|
-
import { ScbCalendarEvent as
|
|
19
|
-
import { ScbDivider as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
14
|
+
import { ScbSearch as _ } from "./scb-search/scb-search.js";
|
|
15
|
+
import { ScbAppBar as v } from "./scb-app-bar/scb-app-bar.js";
|
|
16
|
+
import { ScbBadge as y } from "./scb-badge/scb-badge.js";
|
|
17
|
+
import { SCBBreadcrumbItem as b } from "./scb-breadcrumb/scb-breadcrumb-item.js";
|
|
18
|
+
import { SCBBreadcrumb as x } from "./scb-breadcrumb/scb-breadcrumb.js";
|
|
19
|
+
import { ScbCalendarEvent as S } from "./scb-calendar/scb-calendar-event.js";
|
|
20
|
+
import { ScbDivider as C } from "./scb-divider/scb-divider.js";
|
|
21
|
+
import { ScbDatepicker as w } from "./scb-datepicker/scb-datepicker.js";
|
|
22
|
+
import { ScbTextField as T } from "./scb-textfield/scb-textfield.js";
|
|
23
|
+
import { ScbCheckboxGroup as E } from "./scb-checkbox/scb-checkbox-group.js";
|
|
24
|
+
import { ScbCheckbox as D } from "./scb-checkbox/scb-checkbox.js";
|
|
25
|
+
import { ScbRadioGroup as O } from "./scb-radio-button/scb-radio-group.js";
|
|
26
|
+
import { ScbRadioButton as k } from "./scb-radio-button/scb-radio-button.js";
|
|
27
|
+
import { ScbSwitch as A } from "./scb-switch/scb-switch.js";
|
|
28
|
+
import { ScbDialog as j } from "./scb-dialog/scb-dialog.js";
|
|
29
|
+
import { ScbCalendar as M } from "./scb-calendar/scb-calendar.js";
|
|
30
|
+
import { ScbCalendarCard as N } from "./scb-calendar-card/scb-calendar-card.js";
|
|
29
31
|
import "./scb-card/scb-action-card.js";
|
|
30
32
|
import "./scb-container-card/scb-container-card.js";
|
|
31
33
|
import "./scb-card/scb-container-card.js";
|
|
@@ -35,64 +37,64 @@ import "./scb-list-card/scb-list-card.js";
|
|
|
35
37
|
import "./scb-card/scb-list-card.js";
|
|
36
38
|
import "./scb-social-card/scb-social-card.js";
|
|
37
39
|
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 { ScbFab as
|
|
47
|
-
import { ScbFactCardContent as
|
|
48
|
-
import { ScbFactCard as
|
|
49
|
-
import { ScbFooterSection as
|
|
50
|
-
import { ScbGridItem as
|
|
51
|
-
import { ScbStack as
|
|
52
|
-
import { ScbGrid as
|
|
53
|
-
import { ScbFooter as
|
|
54
|
-
import { ScbHorizontalScroller as
|
|
55
|
-
import { ScbOverlay as
|
|
56
|
-
import { ScbGalleryGrid as
|
|
57
|
-
import { ScbHeaderMenuGroup as
|
|
58
|
-
import { ScbHeaderMenuItem as
|
|
59
|
-
import { ScbHeaderTab as
|
|
60
|
-
import { ScbHeaderUtility as
|
|
61
|
-
import { ScbSkeleton as
|
|
62
|
-
import { ScbHeader as
|
|
63
|
-
import { ScbKeyFigureCard as
|
|
64
|
-
import { ScbMenuItem as
|
|
65
|
-
import { ScbmenuSection as
|
|
66
|
-
import { ScbSubmenu as
|
|
67
|
-
import { ScbMenu as
|
|
68
|
-
import { ScbNavItem as
|
|
69
|
-
import { ScbNav as
|
|
70
|
-
import { ScbNotificationCard as
|
|
71
|
-
import { ScbPagination as
|
|
72
|
-
import { ScbProgressIndicator as
|
|
73
|
-
import { ScbProgressStep as
|
|
74
|
-
import { ScbProgressStepper as
|
|
75
|
-
import { ScbScrollspy as
|
|
76
|
-
import { ScbSegmentedItem as
|
|
77
|
-
import { ScbSegmentedButton as
|
|
78
|
-
import { ScbSelectOption as
|
|
79
|
-
import { ScbSelect as
|
|
80
|
-
import { ScbSlider as
|
|
81
|
-
import { ScbSnackbar as
|
|
82
|
-
import { ScbStatusPill as
|
|
83
|
-
import { ScbStep as
|
|
84
|
-
import { ScbStepper as
|
|
85
|
-
import { ScbTable as
|
|
86
|
-
import { ScbTableAdvanced as
|
|
87
|
-
import { ScbPrimaryTab as
|
|
88
|
-
import { ScbSecondaryTab as
|
|
89
|
-
import { ScbTabs as
|
|
90
|
-
import { ScbTocItem as
|
|
91
|
-
import { ScbToc as
|
|
92
|
-
import { buildScbVizExportFileName as
|
|
93
|
-
import { buildScbVizPrintDocumentHtml as
|
|
94
|
-
import { appendScbVizSeriesDifferentiationPatternMarks as
|
|
95
|
-
import { clearScbVizSeriesDifferentiationColorClass as
|
|
96
|
-
import { buildScbVizResolvedTableView as
|
|
97
|
-
import { ScbViz as
|
|
98
|
-
export {
|
|
40
|
+
import { ScbCollapse as P } from "./scb-collapse/scb-collapse.js";
|
|
41
|
+
import { ScbCookiesConsent as F } from "./scb-cookies-consent/scb-cookies-consent.js";
|
|
42
|
+
import { ScbDrawer as I } from "./scb-drawer/scb-drawer.js";
|
|
43
|
+
import { ScbDropZone as L } from "./scb-drop-zone/scb-drop-zone.js";
|
|
44
|
+
import { ScbOptionsMenuItem as R } from "./scb-options-menu/scb-options-menu-item.js";
|
|
45
|
+
import { ScbOptionsSubMenu as z } from "./scb-options-menu/scb-options-sub-menu.js";
|
|
46
|
+
import { ScbOptionsMenu as B } from "./scb-options-menu/scb-options-menu.js";
|
|
47
|
+
import { ScbDropdown as V } from "./scb-dropdown/scb-dropdown.js";
|
|
48
|
+
import { ScbFab as H } from "./scb-fab/scb-fab.js";
|
|
49
|
+
import { ScbFactCardContent as U } from "./scb-fact-card/scb-fact-card-content.js";
|
|
50
|
+
import { ScbFactCard as W } from "./scb-fact-card/scb-fact-card.js";
|
|
51
|
+
import { ScbFooterSection as G } from "./scb-footer/scb-footer-section.js";
|
|
52
|
+
import { ScbGridItem as K } from "./scb-grid/scb-grid-item.js";
|
|
53
|
+
import { ScbStack as q } from "./scb-grid/scb-stack.js";
|
|
54
|
+
import { ScbGrid as J } from "./scb-grid/scb-grid.js";
|
|
55
|
+
import { ScbFooter as Y } from "./scb-footer/scb-footer.js";
|
|
56
|
+
import { ScbHorizontalScroller as X } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
57
|
+
import { ScbOverlay as Z } from "./scb-overlay/scb-overlay.js";
|
|
58
|
+
import { ScbGalleryGrid as Q } from "./scb-gallery-grid/scb-gallery-grid.js";
|
|
59
|
+
import { ScbHeaderMenuGroup as $ } from "./scb-header/scb-header-menu-group.js";
|
|
60
|
+
import { ScbHeaderMenuItem as ee } from "./scb-header/scb-header-menu-item.js";
|
|
61
|
+
import { ScbHeaderTab as te } from "./scb-header/scb-header-tab.js";
|
|
62
|
+
import { ScbHeaderUtility as ne } from "./scb-header/scb-header-utility.js";
|
|
63
|
+
import { ScbSkeleton as re } from "./scb-skeleton/scb-skeleton.js";
|
|
64
|
+
import { ScbHeader as ie } from "./scb-header/scb-header.js";
|
|
65
|
+
import { ScbKeyFigureCard as ae } from "./scb-keyfigure-card/scb-keyfigure-card.js";
|
|
66
|
+
import { ScbMenuItem as oe } from "./scb-menu/scb-menu-item.js";
|
|
67
|
+
import { ScbmenuSection as se } from "./scb-menu/scb-menu-section.js";
|
|
68
|
+
import { ScbSubmenu as ce } from "./scb-menu/scb-sub-menu.js";
|
|
69
|
+
import { ScbMenu as le } from "./scb-menu/scb-menu.js";
|
|
70
|
+
import { ScbNavItem as ue } from "./scb-nav/scb-nav-item.js";
|
|
71
|
+
import { ScbNav as de } from "./scb-nav/scb-nav.js";
|
|
72
|
+
import { ScbNotificationCard as fe } from "./scb-notification-card/scb-notification-card.js";
|
|
73
|
+
import { ScbPagination as pe } from "./scb-pagination/scb-pagination.js";
|
|
74
|
+
import { ScbProgressIndicator as me } from "./scb-progress-indicator/scb-progress-indicator.js";
|
|
75
|
+
import { ScbProgressStep as he } from "./scb-progress-stepper/scb-progress-step.js";
|
|
76
|
+
import { ScbProgressStepper as ge } from "./scb-progress-stepper/scb-progress-stepper.js";
|
|
77
|
+
import { ScbScrollspy as _e } from "./scb-scrollspy/scb-scrollspy.js";
|
|
78
|
+
import { ScbSegmentedItem as ve } from "./scb-segmented-button/scb-segmented-item.js";
|
|
79
|
+
import { ScbSegmentedButton as ye } from "./scb-segmented-button/scb-segmented-button.js";
|
|
80
|
+
import { ScbSelectOption as be } from "./scb-select/scb-select-option.js";
|
|
81
|
+
import { ScbSelect as xe } from "./scb-select/scb-select.js";
|
|
82
|
+
import { ScbSlider as Se } from "./scb-slider/scb-slider.js";
|
|
83
|
+
import { ScbSnackbar as Ce } from "./scb-snackbar/scb-snackbar.js";
|
|
84
|
+
import { ScbStatusPill as we } from "./scb-status-pill/scb-status-pill.js";
|
|
85
|
+
import { ScbStep as Te } from "./scb-stepper/scb-step.js";
|
|
86
|
+
import { ScbStepper as Ee } from "./scb-stepper/scb-stepper.js";
|
|
87
|
+
import { ScbTable as De } from "./scb-table/scb-table.js";
|
|
88
|
+
import { ScbTableAdvanced as Oe } from "./scb-table-advanced/scb-table-advanced.js";
|
|
89
|
+
import { ScbPrimaryTab as ke } from "./scb-tabs/scb-primary-tab.js";
|
|
90
|
+
import { ScbSecondaryTab as Ae } from "./scb-tabs/scb-secondary-tab.js";
|
|
91
|
+
import { ScbTabs as je } from "./scb-tabs/scb-tabs.js";
|
|
92
|
+
import { ScbTocItem as Me } from "./scb-toc/scb-toc-item.js";
|
|
93
|
+
import { ScbToc as Ne } from "./scb-toc/scb-toc.js";
|
|
94
|
+
import { buildScbVizExportFileName as Pe, createScbVizCsvBlob as Fe, createScbVizRasterBlobFromElement as Ie, createScbVizRasterDataUrlFromElement as Le, downloadScbVizBlob as Re, getScbVizCurrentFullscreenElement as ze, getScbVizExportBaseFileName as Be, getScbVizFullscreenDocument as Ve, isScbVizFullscreenSupported as He, openScbVizPrintFrame as Ue, runWithScbVizForcedPrintLightMode as We, toggleScbVizFullscreen as Ge } from "./scb-viz/scb-viz-actions-runtime.js";
|
|
95
|
+
import { buildScbVizPrintDocumentHtml as Ke, buildScbVizPrintableFooterHtml as qe, buildScbVizPrintableTableHtml as Je } from "./scb-viz/scb-viz-print-runtime.js";
|
|
96
|
+
import { appendScbVizSeriesDifferentiationPatternMarks as Ye, getScbVizSeriesDifferentiationPatternDefinition as Xe, getScbVizSeriesDifferentiationPatternKinds as Ze, getScbVizSeriesDifferentiationRegistry as Qe, getScbVizSeriesDifferentiationVariant as $e, scbVizSeriesDifferentiationRegistry as et } from "./scb-viz/scb-viz-series-differentiation-registry.js";
|
|
97
|
+
import { clearScbVizSeriesDifferentiationColorClass as tt, clearScbVizSeriesDifferentiationMetadata as nt, ensureScbVizGroupedSeriesDifferentiationStore as rt, ensureScbVizStyledModeSeriesPattern as it, getScbVizGroupedSeriesDifferentiationKey as at, getScbVizGroupedSeriesDifferentiationVariant as ot, getScbVizGroupedSeriesDifferentiationVariantIndex as st, getScbVizHighchartsColorClassName as ct, getScbVizHighchartsSvgElement as lt, getScbVizHighchartsSvgRoot as ut, getScbVizLegendSeriesDifferentiationTargets as dt, getScbVizSeriesDifferentiationColorIndex as ft, getScbVizSeriesDifferentiationVariantByIndex as pt, isScbVizGroupedSeriesDifferentiationChart as mt, isScbVizHighchartsStyledMode as ht, setScbVizSeriesDifferentiationColorClass as gt, setScbVizSeriesDifferentiationMetadata as _t, shouldShowScbVizSeriesDifferentiationAction as vt, usesScbVizGroupedPointDifferentiation as yt } from "./scb-viz/scb-viz-series-differentiation-runtime.js";
|
|
98
|
+
import { buildScbVizResolvedTableView as bt, createScbVizCsvRows as xt, inferScbVizTableAlignments as St, normalizeScbVizRenderableCell as Ct, readScbVizTableDataFromSlot as wt } from "./scb-viz/scb-viz-table-runtime.js";
|
|
99
|
+
import { ScbViz as Tt } from "./scb-viz/scb-viz.js";
|
|
100
|
+
export { x as SCBBreadcrumb, b as SCBBreadcrumbItem, r as ScbAccordion, t as ScbAccordionItem, d as ScbActionCard, v as ScbAppBar, l as ScbAvatar, y as ScbBadge, n as ScbButton, M as ScbCalendar, N as ScbCalendarCard, S as ScbCalendarEvent, f as ScbCard, D as ScbCheckbox, E as ScbCheckboxGroup, e as ScbChevron, c as ScbChip, P as ScbCollapse, p as ScbContainerCard, F as ScbCookiesConsent, w as ScbDatepicker, j as ScbDialog, C as ScbDivider, I as ScbDrawer, L as ScbDropZone, V as ScbDropdown, H as ScbFab, W as ScbFactCard, U as ScbFactCardContent, Y as ScbFooter, G as ScbFooterSection, Q as ScbGalleryGrid, J as ScbGrid, K as ScbGridItem, ie as ScbHeader, $ as ScbHeaderMenuGroup, ee as ScbHeaderMenuItem, te as ScbHeaderTab, ne as ScbHeaderUtility, X as ScbHorizontalScroller, o as ScbIconButton, ae as ScbKeyFigureCard, s as ScbLink, m as ScbLinkCard, a as ScbList, h as ScbListCard, i as ScbListItem, le as ScbMenu, oe as ScbMenuItem, de as ScbNav, ue as ScbNavItem, fe as ScbNotificationCard, B as ScbOptionsMenu, R as ScbOptionsMenuItem, z as ScbOptionsSubMenu, Z as ScbOverlay, pe as ScbPagination, ke as ScbPrimaryTab, me as ScbProgressIndicator, he as ScbProgressStep, ge as ScbProgressStepper, k as ScbRadioButton, O as ScbRadioGroup, _e as ScbScrollspy, _ as ScbSearch, Ae as ScbSecondaryTab, ye as ScbSegmentedButton, ve as ScbSegmentedItem, xe as ScbSelect, be as ScbSelectOption, re as ScbSkeleton, Se as ScbSlider, Ce as ScbSnackbar, g as ScbSocialCard, q as ScbStack, we as ScbStatusPill, Te as ScbStep, Ee as ScbStepper, ce as ScbSubmenu, A as ScbSwitch, De as ScbTable, Oe as ScbTableAdvanced, je as ScbTabs, T as ScbTextField, Ne as ScbToc, Me as ScbTocItem, u as ScbTooltip, Tt as ScbViz, se as ScbmenuSection, Ye as appendScbVizSeriesDifferentiationPatternMarks, Pe as buildScbVizExportFileName, Ke as buildScbVizPrintDocumentHtml, qe as buildScbVizPrintableFooterHtml, Je as buildScbVizPrintableTableHtml, bt as buildScbVizResolvedTableView, tt as clearScbVizSeriesDifferentiationColorClass, nt as clearScbVizSeriesDifferentiationMetadata, Fe as createScbVizCsvBlob, xt as createScbVizCsvRows, Ie as createScbVizRasterBlobFromElement, Le as createScbVizRasterDataUrlFromElement, Re as downloadScbVizBlob, rt as ensureScbVizGroupedSeriesDifferentiationStore, it as ensureScbVizStyledModeSeriesPattern, ze as getScbVizCurrentFullscreenElement, Be as getScbVizExportBaseFileName, Ve as getScbVizFullscreenDocument, at as getScbVizGroupedSeriesDifferentiationKey, ot as getScbVizGroupedSeriesDifferentiationVariant, st as getScbVizGroupedSeriesDifferentiationVariantIndex, ct as getScbVizHighchartsColorClassName, lt as getScbVizHighchartsSvgElement, ut as getScbVizHighchartsSvgRoot, dt as getScbVizLegendSeriesDifferentiationTargets, ft as getScbVizSeriesDifferentiationColorIndex, Xe as getScbVizSeriesDifferentiationPatternDefinition, Ze as getScbVizSeriesDifferentiationPatternKinds, Qe as getScbVizSeriesDifferentiationRegistry, $e as getScbVizSeriesDifferentiationVariant, pt as getScbVizSeriesDifferentiationVariantByIndex, St as inferScbVizTableAlignments, He as isScbVizFullscreenSupported, mt as isScbVizGroupedSeriesDifferentiationChart, ht as isScbVizHighchartsStyledMode, Ct as normalizeScbVizRenderableCell, Ue as openScbVizPrintFrame, wt as readScbVizTableDataFromSlot, We as runWithScbVizForcedPrintLightMode, et as scbVizSeriesDifferentiationRegistry, gt as setScbVizSeriesDifferentiationColorClass, _t as setScbVizSeriesDifferentiationMetadata, vt as shouldShowScbVizSeriesDifferentiationAction, Ge as toggleScbVizFullscreen, yt 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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../vendor/vendor-material.js";import{_ as b,b as m,g as h,h as o,v as l,y as s}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as r}from"../../vendor/decorate.js";import"
|
|
1
|
+
import"../../vendor/vendor-material.js";import{_ as b,b as m,g as h,h as o,v as l,y as s}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as r}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";(function(){try{var g=typeof globalThis<"u"?globalThis:window;if(!g.__scb_ce_guard_installed__){g.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(t,e,v){try{customElements.get(t)||i(t,e,v)}catch(c){var n=String(c||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var d,p,a=(d=class extends b{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=p._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=t=>{t.preventDefault();const e=!this.open;this.closest("scb-accordion")?.onItemToggled?.(this,e),this.setOpen(e)},this._onToggle=t=>{const e=t.currentTarget;e.open||(e.open=!0),this._applyInertByOpen()}}static _uid(){return globalThis.crypto?.randomUUID?.()??`${p._uidPrefix}-${++p._uidSeq}`}static get observedAttributes(){const i=super.observedAttributes||[];return i.includes("title")?i:[...i,"title"]}attributeChangedCallback(i,t,e){if(i==="title"&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(i,t,e),i==="title"&&e!==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 t=this.closest("scb-accordion"),e=Array.from(t?.querySelectorAll("scb-accordion-item")||[]).map(c=>c.renderRoot.querySelector("details")?.querySelector(".scb-accordion-top")||null).filter(c=>!!c),v=i.currentTarget,n=e.indexOf(v);switch(i.key){case"ArrowDown":i.preventDefault(),n<e.length-1&&e[n+1].focus();break;case"ArrowUp":i.preventDefault(),n>0&&e[n-1].focus();break;case"Home":i.preventDefault(),e.length&&e[0].focus();break;case"End":i.preventDefault(),e.length&&e[e.length-1].focus();break}}setOpen(i){this.open=!!i;const t=this.renderRoot.querySelector("details");t&&!t.open&&(t.open=!0),this._applyInertByOpen()}updated(i){if(i.has("open")){const t=this.renderRoot.querySelector("details");t&&!t.open&&(t.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}`,t=`header-${this._unique}`,e=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?s`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?s`
|
|
2
2
|
<scb-avatar
|
|
3
3
|
label=${this.avatarLabel}
|
|
4
4
|
alt=${this.avatarAlt}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as h,b as v,g as d,h as p,y as f}from"
|
|
1
|
+
import{_ as h,b as v,g as d,h as p,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return f`
|
|
2
2
|
<svg
|
|
3
3
|
class="chevron-icon"
|
|
4
4
|
viewBox="0 0 24 24"
|