scb-wc 0.1.128 → 0.1.130
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/all.js +1 -0
- package/blazor/ScbBlazorInteropBase.cs +65 -0
- package/blazor/scb-blazor-bridge.js +46 -0
- package/fonts/material-symbols-outlined/files/material-symbols-outlined-subset.woff2 +0 -0
- package/icons.json +11 -3
- package/index.js +47 -46
- package/mvc/components/all.js +1 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +1 -0
- package/mvc/components/scb-accordion/scb-accordion.js +7 -7
- package/mvc/components/scb-app-bar/scb-app-bar.js +11 -11
- package/mvc/components/scb-badge/scb-badge.js +5 -5
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -2
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +7 -7
- package/mvc/components/scb-button/scb-button.js +3 -3
- package/mvc/components/scb-calendar/scb-calendar.js +35 -27
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +3 -3
- package/mvc/components/scb-card/scb-card.js +28 -28
- package/mvc/components/scb-checkbox/scb-checkbox.js +19 -13
- package/mvc/components/scb-chip/scb-chip.js +2 -2
- package/mvc/components/scb-collapse/scb-collapse.js +13 -9
- package/mvc/components/scb-dialog/scb-dialog.js +16 -16
- package/mvc/components/scb-drawer/scb-drawer.js +5 -4
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +39 -30
- package/mvc/components/scb-dropdown/scb-dropdown.js +3 -1
- package/mvc/components/scb-fab/scb-fab.js +10 -9
- package/mvc/components/scb-fact-card/scb-fact-card.js +3 -2
- package/mvc/components/scb-footer/scb-footer.js +13 -13
- package/mvc/components/scb-form-error-summary/scb-form-error-summary.js +24 -0
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +14 -9
- package/mvc/components/scb-header/scb-header-menu-group.js +1 -1
- package/mvc/components/scb-header/scb-header-menu-item.js +1 -1
- package/mvc/components/scb-header/scb-header-tab.js +1 -1
- package/mvc/components/scb-header/scb-header.js +24 -24
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +4 -4
- package/mvc/components/scb-link/scb-link.js +2 -2
- package/mvc/components/scb-list/scb-list-item.js +14 -6
- package/mvc/components/scb-list/scb-list.js +2 -2
- package/mvc/components/scb-menu/scb-menu-item.js +16 -16
- package/mvc/components/scb-menu/scb-menu.js +6 -6
- package/mvc/components/scb-nav/scb-nav.js +5 -5
- package/mvc/components/scb-notification-card/scb-notification-card.js +7 -7
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +3 -3
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -2
- package/mvc/components/scb-overlay/scb-overlay.js +5 -5
- package/mvc/components/scb-pagination/scb-pagination.js +56 -90
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +4 -4
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +14 -9
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +14 -8
- package/mvc/components/scb-radio-button/scb-radio-group.js +11 -4
- package/mvc/components/scb-search/scb-search.js +13 -9
- package/mvc/components/scb-select/scb-select-option.js +3 -3
- package/mvc/components/scb-select/scb-select.js +33 -12
- package/mvc/components/scb-skeleton/scb-skeleton.js +2 -2
- package/mvc/components/scb-slider/scb-slider.js +55 -48
- package/mvc/components/scb-snackbar/scb-snackbar.js +21 -7
- package/mvc/components/scb-stepper/scb-step.js +7 -7
- package/mvc/components/scb-stepper/scb-stepper.js +3 -3
- package/mvc/components/scb-switch/scb-switch.js +20 -8
- package/mvc/components/scb-table/scb-table.js +2 -2
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +5 -5
- package/mvc/components/scb-textfield/scb-textfield.js +77 -63
- package/mvc/components/scb-toc/scb-toc-item.js +5 -4
- package/mvc/components/scb-toc/scb-toc.js +7 -5
- package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
- package/mvc/components/scb-viz/scb-viz.js +1 -1
- package/mvc/fonts/material-symbols-outlined/files/material-symbols-outlined-subset.woff2 +0 -0
- package/mvc/scb-blazor-bridge.js +46 -0
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- package/mvc/scb.svg +13 -13
- package/mvc/vendor/scb-card-variants.internal.js +20 -21
- package/mvc/vendor/scb-header-drawer.internal.js +4 -2
- package/package.json +6 -2
- package/scb-accordion/scb-accordion-item.js +1 -0
- package/scb-accordion/scb-accordion.js +12 -3
- package/scb-app-bar/scb-app-bar.js +25 -12
- package/scb-badge/scb-badge.js +23 -23
- package/scb-breadcrumb/scb-breadcrumb-item.js +9 -0
- package/scb-breadcrumb/scb-breadcrumb.js +5 -2
- package/scb-button/scb-button.js +27 -4
- package/scb-calendar/scb-calendar.js +97 -72
- package/scb-calendar-card/scb-calendar-card.js +10 -4
- package/scb-card/scb-card-variants.internal.js +23 -22
- package/scb-card/scb-card.js +72 -38
- package/scb-checkbox/scb-checkbox.js +86 -23
- package/scb-chip/scb-chip.js +15 -6
- package/scb-collapse/scb-collapse.js +26 -9
- package/scb-components/scb-accordion/scb-accordion.d.ts +3 -0
- package/scb-components/scb-app-bar/scb-app-bar.d.ts +3 -0
- package/scb-components/scb-breadcrumb/scb-breadcrumb.d.ts +1 -0
- package/scb-components/scb-button/scb-button.d.ts +2 -0
- package/scb-components/scb-calendar/scb-calendar.d.ts +2 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +2 -0
- package/scb-components/scb-card/scb-card.d.ts +6 -0
- package/scb-components/scb-checkbox/scb-checkbox.d.ts +10 -0
- package/scb-components/scb-collapse/scb-collapse.d.ts +2 -0
- package/scb-components/scb-dialog/scb-dialog.d.ts +7 -0
- package/scb-components/scb-drawer/scb-drawer.d.ts +8 -1
- package/scb-components/scb-drop-zone/scb-drop-zone.d.ts +49 -0
- package/scb-components/scb-fact-card/scb-fact-card.d.ts +1 -0
- package/scb-components/scb-footer/scb-footer.d.ts +1 -0
- package/scb-components/scb-form-error-summary/scb-form-error-summary.d.ts +22 -0
- package/scb-components/scb-gallery-grid/scb-gallery-grid.d.ts +4 -0
- package/scb-components/scb-header/scb-header-drawer.internal.d.ts +2 -0
- package/scb-components/scb-header/scb-header-menu-item.d.ts +2 -0
- package/scb-components/scb-header/scb-header-tab.d.ts +2 -0
- package/scb-components/scb-header/scb-header.d.ts +6 -0
- package/scb-components/scb-list/scb-list-item.d.ts +3 -0
- package/scb-components/scb-list/scb-list.d.ts +2 -0
- package/scb-components/scb-menu/scb-menu-item.d.ts +7 -0
- package/scb-components/scb-nav/scb-nav.d.ts +2 -0
- package/scb-components/scb-notification-card/scb-notification-card.d.ts +1 -0
- package/scb-components/scb-pagination/scb-pagination.d.ts +6 -0
- package/scb-components/scb-progress-indicator/scb-progress-indicator.d.ts +4 -0
- package/scb-components/scb-progress-stepper/scb-progress-step.d.ts +3 -0
- package/scb-components/scb-progress-stepper/scb-progress-stepper.d.ts +6 -0
- package/scb-components/scb-radio-button/scb-radio-group.d.ts +7 -0
- package/scb-components/scb-search/scb-search.d.ts +9 -0
- package/scb-components/scb-select/scb-select-option.d.ts +1 -0
- package/scb-components/scb-select/scb-select.d.ts +20 -0
- package/scb-components/scb-skeleton/scb-skeleton.d.ts +8 -0
- package/scb-components/scb-slider/scb-slider.d.ts +35 -0
- package/scb-components/scb-snackbar/scb-snackbar.d.ts +2 -0
- package/scb-components/scb-switch/scb-switch.d.ts +11 -0
- package/scb-components/scb-table/scb-table.d.ts +6 -0
- package/scb-components/scb-table-advanced/scb-table-advanced.d.ts +6 -0
- package/scb-components/scb-textfield/scb-textfield.d.ts +12 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +2 -0
- package/scb-components/scb-toc/scb-toc.d.ts +2 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +5 -0
- package/scb-components/scb-viz/scb-viz.d.ts +1 -1
- package/scb-datepicker/scb-datepicker.js +37 -8
- package/scb-dialog/scb-dialog.js +88 -35
- package/scb-drawer/scb-drawer.js +77 -19
- package/scb-drop-zone/scb-drop-zone.js +187 -52
- package/scb-dropdown/scb-dropdown.js +3 -1
- package/scb-fab/scb-fab.js +1 -0
- package/scb-fact-card/scb-fact-card.js +6 -2
- package/scb-footer/scb-footer.js +30 -25
- package/scb-form-error-summary/scb-form-error-summary.js +151 -0
- package/scb-gallery-grid/scb-gallery-grid.js +79 -35
- package/scb-header/scb-header-drawer.internal.js +2 -0
- package/scb-header/scb-header-menu-group.js +1 -1
- package/scb-header/scb-header-menu-item.js +6 -0
- package/scb-header/scb-header-tab.js +6 -0
- package/scb-header/scb-header.js +35 -15
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +4 -4
- package/scb-link/scb-link.js +10 -0
- package/scb-list/scb-list-item.js +52 -35
- package/scb-list/scb-list.js +21 -11
- package/scb-menu/scb-menu-item.js +53 -13
- package/scb-menu/scb-menu.js +1 -1
- package/scb-nav/scb-nav.js +9 -3
- package/scb-notification-card/scb-notification-card.js +29 -8
- package/scb-options-menu/scb-options-menu-item.js +4 -4
- package/scb-options-menu/scb-options-menu.js +5 -10
- package/scb-overlay/scb-overlay.js +73 -11
- package/scb-pagination/scb-pagination.js +131 -117
- package/scb-progress-indicator/scb-progress-indicator.js +17 -9
- package/scb-progress-stepper/scb-progress-step.js +26 -10
- package/scb-progress-stepper/scb-progress-stepper.js +55 -31
- package/scb-radio-button/scb-radio-group.js +92 -16
- package/scb-search/scb-search.js +104 -16
- package/scb-select/scb-select-option.js +4 -1
- package/scb-select/scb-select.js +235 -71
- package/scb-skeleton/scb-skeleton.js +26 -2
- package/scb-slider/scb-slider.js +162 -29
- package/scb-snackbar/scb-snackbar.js +34 -7
- package/scb-stepper/scb-step.js +12 -5
- package/scb-stepper/scb-stepper.js +4 -4
- package/scb-switch/scb-switch.js +103 -16
- package/scb-table/scb-table.js +53 -16
- package/scb-table-advanced/scb-table-advanced.js +50 -14
- package/scb-textfield/scb-textfield.js +42 -18
- package/scb-toc/scb-toc-item.js +24 -15
- package/scb-toc/scb-toc.js +24 -9
- package/scb-tooltip/scb-tooltip.js +14 -4
- package/scb-viz/scb-viz.js +1 -0
- package/scb-wc-core.css +1 -1
- package/scb-wc-public-entry/index.d.ts +1 -0
- package/scb-wc-selfhost.css +1 -1
- package/scb-wc.bundle.js +3867 -3312
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +2 -0
package/all.js
CHANGED
|
@@ -32,6 +32,7 @@ import './scb-fact-card/scb-fact-card-content.js';
|
|
|
32
32
|
import './scb-fact-card/scb-fact-card.js';
|
|
33
33
|
import './scb-footer/scb-footer-section.js';
|
|
34
34
|
import './scb-footer/scb-footer.js';
|
|
35
|
+
import './scb-form-error-summary/scb-form-error-summary.js';
|
|
35
36
|
import './scb-gallery-grid/scb-gallery-grid.js';
|
|
36
37
|
import './scb-grid/scb-grid-item.js';
|
|
37
38
|
import './scb-grid/scb-grid.js';
|
|
@@ -203,6 +203,9 @@ namespace ScbBlazor
|
|
|
203
203
|
// Alla länkar (scb-link) på sidan
|
|
204
204
|
protected LinkState[] Links { get; private set; } = Array.Empty<LinkState>();
|
|
205
205
|
|
|
206
|
+
// Alla felöversikter (scb-form-error-summary) på sidan
|
|
207
|
+
protected FormErrorSummaryState[] FormErrorSummaries { get; private set; } = Array.Empty<FormErrorSummaryState>();
|
|
208
|
+
|
|
206
209
|
|
|
207
210
|
// Alla avatars (scb-avatar) på sidan
|
|
208
211
|
protected AvatarState[] Avatars { get; private set; } = Array.Empty<AvatarState>();
|
|
@@ -1308,6 +1311,7 @@ namespace ScbBlazor
|
|
|
1308
1311
|
Value = dto.Value ?? string.Empty,
|
|
1309
1312
|
Label = dto.Label ?? string.Empty,
|
|
1310
1313
|
SupportingText = dto.SupportingText ?? string.Empty,
|
|
1314
|
+
HelpText = dto.HelpText ?? string.Empty,
|
|
1311
1315
|
Error = dto.Error,
|
|
1312
1316
|
Name = dto.Name ?? string.Empty,
|
|
1313
1317
|
Id = dto.Id ?? string.Empty
|
|
@@ -1378,6 +1382,9 @@ namespace ScbBlazor
|
|
|
1378
1382
|
selects[i] = new SelectState
|
|
1379
1383
|
{
|
|
1380
1384
|
Id = dto.Id ?? string.Empty,
|
|
1385
|
+
Label = dto.Label ?? string.Empty,
|
|
1386
|
+
SupportingText = dto.SupportingText ?? string.Empty,
|
|
1387
|
+
HelpText = dto.HelpText ?? string.Empty,
|
|
1381
1388
|
Variant = dto.Variant ?? string.Empty,
|
|
1382
1389
|
Open = dto.Open,
|
|
1383
1390
|
Value = dto.Value ?? string.Empty,
|
|
@@ -1616,6 +1623,32 @@ namespace ScbBlazor
|
|
|
1616
1623
|
Links = Array.Empty<LinkState>();
|
|
1617
1624
|
}
|
|
1618
1625
|
|
|
1626
|
+
// Form error summaries
|
|
1627
|
+
if (state.FormErrorSummaries is not null && state.FormErrorSummaries.Length > 0)
|
|
1628
|
+
{
|
|
1629
|
+
var summaries = new FormErrorSummaryState[state.FormErrorSummaries.Length];
|
|
1630
|
+
for (var i = 0; i < state.FormErrorSummaries.Length; i++)
|
|
1631
|
+
{
|
|
1632
|
+
var dto = state.FormErrorSummaries[i];
|
|
1633
|
+
summaries[i] = new FormErrorSummaryState
|
|
1634
|
+
{
|
|
1635
|
+
Heading = dto.Heading ?? string.Empty,
|
|
1636
|
+
HeadingLevel = dto.HeadingLevel ?? string.Empty,
|
|
1637
|
+
Spacing = dto.Spacing ?? string.Empty,
|
|
1638
|
+
SpacingTop = dto.SpacingTop ?? string.Empty,
|
|
1639
|
+
SpacingBottom = dto.SpacingBottom ?? string.Empty,
|
|
1640
|
+
SpacingLeft = dto.SpacingLeft ?? string.Empty,
|
|
1641
|
+
SpacingRight = dto.SpacingRight ?? string.Empty
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
FormErrorSummaries = summaries;
|
|
1646
|
+
}
|
|
1647
|
+
else
|
|
1648
|
+
{
|
|
1649
|
+
FormErrorSummaries = Array.Empty<FormErrorSummaryState>();
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1619
1652
|
// Avatars
|
|
1620
1653
|
if (state.Avatars is not null && state.Avatars.Length > 0)
|
|
1621
1654
|
{
|
|
@@ -3235,6 +3268,7 @@ namespace ScbBlazor
|
|
|
3235
3268
|
public string Value { get; set; } = string.Empty;
|
|
3236
3269
|
public string Label { get; set; } = string.Empty;
|
|
3237
3270
|
public string SupportingText { get; set; } = string.Empty;
|
|
3271
|
+
public string HelpText { get; set; } = string.Empty;
|
|
3238
3272
|
public bool Error { get; set; }
|
|
3239
3273
|
public string Name { get; set; } = string.Empty;
|
|
3240
3274
|
public string Id { get; set; } = string.Empty;
|
|
@@ -3263,6 +3297,9 @@ namespace ScbBlazor
|
|
|
3263
3297
|
protected sealed class SelectState
|
|
3264
3298
|
{
|
|
3265
3299
|
public string Id { get; set; } = string.Empty;
|
|
3300
|
+
public string Label { get; set; } = string.Empty;
|
|
3301
|
+
public string SupportingText { get; set; } = string.Empty;
|
|
3302
|
+
public string HelpText { get; set; } = string.Empty;
|
|
3266
3303
|
public string Variant { get; set; } = string.Empty;
|
|
3267
3304
|
public bool Open { get; set; }
|
|
3268
3305
|
public string Value { get; set; } = string.Empty;
|
|
@@ -3371,6 +3408,17 @@ namespace ScbBlazor
|
|
|
3371
3408
|
public string Text { get; set; } = string.Empty;
|
|
3372
3409
|
}
|
|
3373
3410
|
|
|
3411
|
+
protected sealed class FormErrorSummaryState
|
|
3412
|
+
{
|
|
3413
|
+
public string Heading { get; set; } = string.Empty;
|
|
3414
|
+
public string HeadingLevel { get; set; } = string.Empty;
|
|
3415
|
+
public string Spacing { get; set; } = string.Empty;
|
|
3416
|
+
public string SpacingTop { get; set; } = string.Empty;
|
|
3417
|
+
public string SpacingBottom { get; set; } = string.Empty;
|
|
3418
|
+
public string SpacingLeft { get; set; } = string.Empty;
|
|
3419
|
+
public string SpacingRight { get; set; } = string.Empty;
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3374
3422
|
|
|
3375
3423
|
protected sealed class AvatarState
|
|
3376
3424
|
{
|
|
@@ -3638,6 +3686,8 @@ namespace ScbBlazor
|
|
|
3638
3686
|
|
|
3639
3687
|
public LinkDto[] Links { get; set; } = Array.Empty<LinkDto>();
|
|
3640
3688
|
|
|
3689
|
+
public FormErrorSummaryDto[] FormErrorSummaries { get; set; } = Array.Empty<FormErrorSummaryDto>();
|
|
3690
|
+
|
|
3641
3691
|
public AvatarDto[] Avatars { get; set; } = Array.Empty<AvatarDto>();
|
|
3642
3692
|
|
|
3643
3693
|
public BadgeDto[] Badges { get; set; } = Array.Empty<BadgeDto>();
|
|
@@ -4105,6 +4155,7 @@ namespace ScbBlazor
|
|
|
4105
4155
|
public string? Value { get; set; }
|
|
4106
4156
|
public string? Label { get; set; }
|
|
4107
4157
|
public string? SupportingText { get; set; }
|
|
4158
|
+
public string? HelpText { get; set; }
|
|
4108
4159
|
public bool Error { get; set; }
|
|
4109
4160
|
public string? Name { get; set; }
|
|
4110
4161
|
public string? Id { get; set; }
|
|
@@ -4133,6 +4184,9 @@ namespace ScbBlazor
|
|
|
4133
4184
|
private sealed class SelectDto
|
|
4134
4185
|
{
|
|
4135
4186
|
public string? Id { get; set; }
|
|
4187
|
+
public string? Label { get; set; }
|
|
4188
|
+
public string? SupportingText { get; set; }
|
|
4189
|
+
public string? HelpText { get; set; }
|
|
4136
4190
|
public string? Variant { get; set; }
|
|
4137
4191
|
public bool Open { get; set; }
|
|
4138
4192
|
public string? Value { get; set; }
|
|
@@ -4223,6 +4277,17 @@ namespace ScbBlazor
|
|
|
4223
4277
|
public string? Text { get; set; }
|
|
4224
4278
|
}
|
|
4225
4279
|
|
|
4280
|
+
private sealed class FormErrorSummaryDto
|
|
4281
|
+
{
|
|
4282
|
+
public string? Heading { get; set; }
|
|
4283
|
+
public string? HeadingLevel { get; set; }
|
|
4284
|
+
public string? Spacing { get; set; }
|
|
4285
|
+
public string? SpacingTop { get; set; }
|
|
4286
|
+
public string? SpacingBottom { get; set; }
|
|
4287
|
+
public string? SpacingLeft { get; set; }
|
|
4288
|
+
public string? SpacingRight { get; set; }
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4226
4291
|
private sealed class ButtonDto
|
|
4227
4292
|
{
|
|
4228
4293
|
public string? Variant { get; set; }
|
|
@@ -1978,6 +1978,7 @@ window.SCBBlazor.getState = function (root) {
|
|
|
1978
1978
|
const buttons = ctx.querySelectorAll('scb-button');
|
|
1979
1979
|
const chips = ctx.querySelectorAll('scb-chip');
|
|
1980
1980
|
const links = ctx.querySelectorAll('scb-link');
|
|
1981
|
+
const formErrorSummaries = ctx.querySelectorAll('scb-form-error-summary');
|
|
1981
1982
|
const subMenus = ctx.querySelectorAll('scb-options-sub-menu');
|
|
1982
1983
|
const avatars = ctx.querySelectorAll('scb-avatar');
|
|
1983
1984
|
const badges = ctx.querySelectorAll('scb-badge');
|
|
@@ -3084,6 +3085,12 @@ window.SCBBlazor.getState = function (root) {
|
|
|
3084
3085
|
''
|
|
3085
3086
|
).toString();
|
|
3086
3087
|
|
|
3088
|
+
const helpText = (
|
|
3089
|
+
anyTf.helpText ??
|
|
3090
|
+
tf.getAttribute('help-text') ??
|
|
3091
|
+
''
|
|
3092
|
+
).toString();
|
|
3093
|
+
|
|
3087
3094
|
const error =
|
|
3088
3095
|
typeof anyTf.error === 'boolean'
|
|
3089
3096
|
? anyTf.error
|
|
@@ -3105,6 +3112,7 @@ window.SCBBlazor.getState = function (root) {
|
|
|
3105
3112
|
value,
|
|
3106
3113
|
label,
|
|
3107
3114
|
supportingText,
|
|
3115
|
+
helpText,
|
|
3108
3116
|
error,
|
|
3109
3117
|
name,
|
|
3110
3118
|
id,
|
|
@@ -3187,6 +3195,17 @@ window.SCBBlazor.getState = function (root) {
|
|
|
3187
3195
|
|
|
3188
3196
|
const selectsState = Array.from(selects).map((sel) => {
|
|
3189
3197
|
const anySel = sel;
|
|
3198
|
+
const label = (anySel.label ?? sel.getAttribute('label') ?? '').toString();
|
|
3199
|
+
const supportingText = (
|
|
3200
|
+
anySel.supportingText ??
|
|
3201
|
+
sel.getAttribute('supporting-text') ??
|
|
3202
|
+
''
|
|
3203
|
+
).toString();
|
|
3204
|
+
const helpText = (
|
|
3205
|
+
anySel.helpText ??
|
|
3206
|
+
sel.getAttribute('help-text') ??
|
|
3207
|
+
''
|
|
3208
|
+
).toString();
|
|
3190
3209
|
const variant = (anySel.variant ?? sel.getAttribute('variant') ?? '').toString();
|
|
3191
3210
|
const open =
|
|
3192
3211
|
typeof anySel.open === 'boolean' ? anySel.open : sel.hasAttribute('open');
|
|
@@ -3201,6 +3220,9 @@ window.SCBBlazor.getState = function (root) {
|
|
|
3201
3220
|
|
|
3202
3221
|
return {
|
|
3203
3222
|
id: sel.id || '',
|
|
3223
|
+
label,
|
|
3224
|
+
supportingText,
|
|
3225
|
+
helpText,
|
|
3204
3226
|
variant,
|
|
3205
3227
|
open: !!open,
|
|
3206
3228
|
value,
|
|
@@ -3883,6 +3905,29 @@ window.SCBBlazor.getState = function (root) {
|
|
|
3883
3905
|
};
|
|
3884
3906
|
});
|
|
3885
3907
|
|
|
3908
|
+
// Alla scb-form-error-summary på sidan
|
|
3909
|
+
const formErrorSummariesState = Array.from(formErrorSummaries).map((summary) => {
|
|
3910
|
+
const anySummary = summary;
|
|
3911
|
+
|
|
3912
|
+
const heading = (anySummary.heading ?? summary.getAttribute('heading') ?? '').toString();
|
|
3913
|
+
const headingLevel = (anySummary.headingLevel ?? summary.getAttribute('heading-level') ?? '').toString();
|
|
3914
|
+
const spacing = (anySummary.spacing ?? summary.getAttribute('spacing') ?? '').toString();
|
|
3915
|
+
const spacingTop = (anySummary.spacingTop ?? summary.getAttribute('spacing-top') ?? '').toString();
|
|
3916
|
+
const spacingBottom = (anySummary.spacingBottom ?? summary.getAttribute('spacing-bottom') ?? '').toString();
|
|
3917
|
+
const spacingLeft = (anySummary.spacingLeft ?? summary.getAttribute('spacing-left') ?? '').toString();
|
|
3918
|
+
const spacingRight = (anySummary.spacingRight ?? summary.getAttribute('spacing-right') ?? '').toString();
|
|
3919
|
+
|
|
3920
|
+
return {
|
|
3921
|
+
heading,
|
|
3922
|
+
headingLevel,
|
|
3923
|
+
spacing,
|
|
3924
|
+
spacingTop,
|
|
3925
|
+
spacingBottom,
|
|
3926
|
+
spacingLeft,
|
|
3927
|
+
spacingRight,
|
|
3928
|
+
};
|
|
3929
|
+
});
|
|
3930
|
+
|
|
3886
3931
|
// Alla scb-avatar på sidan
|
|
3887
3932
|
const avatarsState = Array.from(avatars).map((av) => {
|
|
3888
3933
|
const anyAv = av;
|
|
@@ -4233,6 +4278,7 @@ window.SCBBlazor.getState = function (root) {
|
|
|
4233
4278
|
buttons: buttonsState,
|
|
4234
4279
|
chips: chipsState,
|
|
4235
4280
|
links: linksState,
|
|
4281
|
+
formErrorSummaries: formErrorSummariesState,
|
|
4236
4282
|
avatars: avatarsState,
|
|
4237
4283
|
badges: badgesState,
|
|
4238
4284
|
iconButtons: iconButtonsState,
|
|
Binary file
|
package/icons.json
CHANGED
|
@@ -26,12 +26,14 @@
|
|
|
26
26
|
"refresh",
|
|
27
27
|
"print",
|
|
28
28
|
"group",
|
|
29
|
+
"groups",
|
|
29
30
|
"person_add",
|
|
30
31
|
"person",
|
|
31
32
|
"download",
|
|
32
33
|
"mobile_arrow_down",
|
|
33
34
|
"upload",
|
|
34
35
|
"mail",
|
|
36
|
+
"email",
|
|
35
37
|
"calendar_month",
|
|
36
38
|
"calendar_today",
|
|
37
39
|
"volume_up",
|
|
@@ -77,6 +79,7 @@
|
|
|
77
79
|
"style",
|
|
78
80
|
"restore",
|
|
79
81
|
"payment",
|
|
82
|
+
"payments",
|
|
80
83
|
"shopping_cart",
|
|
81
84
|
"list",
|
|
82
85
|
"ballot",
|
|
@@ -88,6 +91,8 @@
|
|
|
88
91
|
"data_table",
|
|
89
92
|
"share",
|
|
90
93
|
"home",
|
|
94
|
+
"query_stats",
|
|
95
|
+
"analytics",
|
|
91
96
|
"arrow_back",
|
|
92
97
|
"arrow_forward",
|
|
93
98
|
"arrow_upward",
|
|
@@ -104,15 +109,18 @@
|
|
|
104
109
|
"event_note",
|
|
105
110
|
"image",
|
|
106
111
|
"language",
|
|
112
|
+
"apps",
|
|
107
113
|
"repeat",
|
|
108
114
|
"insert_chart",
|
|
109
115
|
"insert_chart_filled",
|
|
110
116
|
"leaderboard",
|
|
111
117
|
"article",
|
|
118
|
+
"assignment",
|
|
112
119
|
"reorder",
|
|
113
120
|
"subject",
|
|
114
121
|
"visibility",
|
|
115
122
|
"visibility_off",
|
|
123
|
+
"lock",
|
|
116
124
|
"arrow_right",
|
|
117
125
|
"arrow_drop_down",
|
|
118
126
|
"tune",
|
|
@@ -144,6 +152,7 @@
|
|
|
144
152
|
"filter_alt",
|
|
145
153
|
"open_in_new",
|
|
146
154
|
"search",
|
|
155
|
+
"notifications",
|
|
147
156
|
"support",
|
|
148
157
|
"location_searching",
|
|
149
158
|
"explore",
|
|
@@ -173,8 +182,7 @@
|
|
|
173
182
|
"work",
|
|
174
183
|
"person_4",
|
|
175
184
|
"price_change",
|
|
185
|
+
"trending_up",
|
|
176
186
|
"keyboard_arrow_down",
|
|
177
|
-
"keyboard_arrow_up"
|
|
178
|
-
"stop",
|
|
179
|
-
"pause"
|
|
187
|
+
"keyboard_arrow_up"
|
|
180
188
|
]
|
package/index.js
CHANGED
|
@@ -51,49 +51,50 @@ import { ScbGridItem as W } from "./scb-grid/scb-grid-item.js";
|
|
|
51
51
|
import { ScbStack as G } from "./scb-grid/scb-stack.js";
|
|
52
52
|
import { ScbGrid as K } from "./scb-grid/scb-grid.js";
|
|
53
53
|
import { ScbFooter as q } from "./scb-footer/scb-footer.js";
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
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
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
|
|
54
|
+
import { ScbIcon as J } from "./scb-icon/scb-icon.js";
|
|
55
|
+
import { ScbNotificationCard as Y } from "./scb-notification-card/scb-notification-card.js";
|
|
56
|
+
import { ScbFormErrorSummary as X } from "./scb-form-error-summary/scb-form-error-summary.js";
|
|
57
|
+
import { ScbHorizontalScroller as Z } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
58
|
+
import { ScbOverlay as Q } from "./scb-overlay/scb-overlay.js";
|
|
59
|
+
import { ScbGalleryGrid as $ } from "./scb-gallery-grid/scb-gallery-grid.js";
|
|
60
|
+
import { ScbHeaderMenuGroup as ee } from "./scb-header/scb-header-menu-group.js";
|
|
61
|
+
import { ScbHeaderMenuItem as te } from "./scb-header/scb-header-menu-item.js";
|
|
62
|
+
import { ScbHeaderTab as ne } from "./scb-header/scb-header-tab.js";
|
|
63
|
+
import { ScbHeaderUtility as re } from "./scb-header/scb-header-utility.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 { ScbPagination as fe } from "./scb-pagination/scb-pagination.js";
|
|
73
|
+
import { ScbProgressIndicator as pe } from "./scb-progress-indicator/scb-progress-indicator.js";
|
|
74
|
+
import { ScbProgressStep as me } from "./scb-progress-stepper/scb-progress-step.js";
|
|
75
|
+
import { ScbProgressStepper as he } from "./scb-progress-stepper/scb-progress-stepper.js";
|
|
76
|
+
import { ScbScrollspy as ge } from "./scb-scrollspy/scb-scrollspy.js";
|
|
77
|
+
import { ScbSegmentedItem as _e } from "./scb-segmented-button/scb-segmented-item.js";
|
|
78
|
+
import { ScbSegmentedButton as ve } from "./scb-segmented-button/scb-segmented-button.js";
|
|
79
|
+
import { ScbSelectOption as ye } from "./scb-select/scb-select-option.js";
|
|
80
|
+
import { ScbSelect as be } from "./scb-select/scb-select.js";
|
|
81
|
+
import { ScbSkeleton as xe } from "./scb-skeleton/scb-skeleton.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 { g as SCBBreadcrumb, h as SCBBreadcrumbItem, n as ScbAccordion, e as ScbAccordionItem, r as ScbActionCard, f as ScbAppBar, d as ScbAvatar, p as ScbBadge, t as ScbButton, A as ScbCalendar, j as ScbCalendarCard, _ as ScbCalendarEvent, i as ScbCard, S as ScbCheckbox, x as ScbCheckboxGroup, E as ScbChip, M as ScbCollapse, a as ScbContainerCard, N as ScbCookiesConsent, D as ScbDialog, v as ScbDivider, P as ScbDrawer, F as ScbDropZone, z as ScbDropdown, B as ScbFab, H as ScbFactCard, V as ScbFactCardContent, q as ScbFooter, U as ScbFooterSection, X as ScbFormErrorSummary, $ as ScbGalleryGrid, K as ScbGrid, W as ScbGridItem, ie as ScbHeader, ee as ScbHeaderMenuGroup, te as ScbHeaderMenuItem, ne as ScbHeaderTab, re as ScbHeaderUtility, Z as ScbHorizontalScroller, J as ScbIcon, l as ScbIconButton, ae as ScbKeyFigureCard, m as ScbLink, o as ScbLinkCard, k as ScbList, s as ScbListCard, O as ScbListItem, le as ScbMenu, oe as ScbMenuItem, de as ScbNav, ue as ScbNavItem, Y as ScbNotificationCard, R as ScbOptionsMenu, I as ScbOptionsMenuItem, L as ScbOptionsSubMenu, Q as ScbOverlay, fe as ScbPagination, ke as ScbPrimaryTab, pe as ScbProgressIndicator, me as ScbProgressStep, he as ScbProgressStepper, w as ScbRadioButton, C as ScbRadioGroup, ge as ScbScrollspy, u as ScbSearch, Ae as ScbSecondaryTab, ve as ScbSegmentedButton, _e as ScbSegmentedItem, be as ScbSelect, ye as ScbSelectOption, xe as ScbSkeleton, Se as ScbSlider, Ce as ScbSnackbar, c as ScbSocialCard, G as ScbStack, we as ScbStatusPill, Te as ScbStep, Ee as ScbStepper, ce as ScbSubmenu, T as ScbSwitch, De as ScbTable, Oe as ScbTableAdvanced, je as ScbTabs, b as ScbTextField, Ne as ScbToc, Me as ScbTocItem, y 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
|
@@ -32,6 +32,7 @@ import './scb-fact-card/scb-fact-card.js';
|
|
|
32
32
|
import './scb-fact-card/scb-fact-card-content.js';
|
|
33
33
|
import './scb-footer/scb-footer.js';
|
|
34
34
|
import './scb-footer/scb-footer-section.js';
|
|
35
|
+
import './scb-form-error-summary/scb-form-error-summary.js';
|
|
35
36
|
import './scb-gallery-grid/scb-gallery-grid.js';
|
|
36
37
|
import './scb-grid/scb-grid.js';
|
|
37
38
|
import './scb-grid/scb-grid-item.js';
|
|
@@ -13,6 +13,7 @@ import{g as l,h as m,m as b,p as o,v as s,y as h}from"../../vendor/vendor.js";im
|
|
|
13
13
|
id=${t}
|
|
14
14
|
class="scb-accordion-top"
|
|
15
15
|
aria-controls=${i}
|
|
16
|
+
aria-expanded=${String(this.open)}
|
|
16
17
|
@click=${this._onSummaryClick}
|
|
17
18
|
@keydown=${this._onKeyDown}
|
|
18
19
|
@focusin=${u}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{g as m,h as
|
|
1
|
+
import{g as m,h as y,m as v,p as a,v as b,y as _}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as o}from"../../vendor/decorate.js";import"./scb-accordion-item.js";import{n as S,t as c}from"../../vendor/assertClassBrand.js";import"../scb-button/scb-button.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,r,l){try{customElements.get(e)||t(e,r,l)}catch(g){var h=String(g||"");if(h.indexOf("already been used")===-1&&h.indexOf("NotSupportedError")===-1)throw g}}}}catch{}})();var n,p,s=(n=new WeakSet,p=class extends y{constructor(...t){super(...t),S(this,n),this.singleOpen=!1,this.showCloseAll=!1,this.openAllLabel="Öppna alla",this.closeAllLabel="Stäng alla",this.controlsLabel="Accordionkontroller",this.size="large",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",c(n,this,f))}disconnectedCallback(){this.removeEventListener("open-changed",c(n,this,f)),super.disconnectedCallback()}render(){const t=!this.singleOpen&&this.showCloseAll,e=t?c(n,this,k).call(this):!1;return b`
|
|
2
2
|
<div class="scb-accordion" ?single-open=${this.singleOpen}>
|
|
3
|
-
${t?
|
|
4
|
-
<div class="scb-accordion-actions" role="toolbar" aria-label
|
|
3
|
+
${t?b`
|
|
4
|
+
<div class="scb-accordion-actions" role="toolbar" aria-label=${this.controlsLabel}>
|
|
5
5
|
<scb-button
|
|
6
6
|
variant="text"
|
|
7
|
-
label=${
|
|
8
|
-
@click=${n
|
|
7
|
+
label=${e?this.closeAllLabel:this.openAllLabel}
|
|
8
|
+
@click=${c(n,this,A)}
|
|
9
9
|
></scb-button>
|
|
10
10
|
</div>
|
|
11
11
|
`:m}
|
|
12
12
|
|
|
13
|
-
<slot @slotchange=${n
|
|
13
|
+
<slot @slotchange=${c(n,this,O)}></slot>
|
|
14
14
|
</div>
|
|
15
|
-
`}firstUpdated(){n
|
|
15
|
+
`}firstUpdated(){c(n,this,u).call(this),c(n,this,d).call(this)}updated(t){(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&c(n,this,u).call(this),t.has("singleOpen")&&c(n,this,d).call(this)}_getDirectItems(){return Array.from(this.children).filter(t=>t.tagName==="SCB-ACCORDION-ITEM")}onItemToggled(t,e){if(this.singleOpen&&e){this._getDirectItems().forEach(r=>{r!==t&&r.setOpen(!1)});return}!this.singleOpen&&this.showCloseAll&&this.requestUpdate()}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}},p.styles=_`:host{display:block;margin-block-start:var(--scb-accordion-spacing-block-start, 0);margin-block-end:var(--scb-accordion-spacing-block-end, 0);margin-inline-start:var(--scb-accordion-spacing-inline-start, 0);margin-inline-end:var(--scb-accordion-spacing-inline-end, 0);--scb-accordion-actions-padding-inline:var(--spacing-5, 16px)}:host,:host([size='medium']),:host([size='small']){--scb-accordion-actions-padding-block:var(--spacing-2, 4px)}:host([size='medium']){--scb-accordion-actions-padding-inline:var(--spacing-5, 16px)}:host([size='small']){--scb-accordion-actions-padding-inline:var(--spacing-4, 12px)}.scb-accordion-actions{display:flex;justify-content:flex-end;padding-inline:var(--scb-accordion-actions-padding-inline);padding-block-start:var(--scb-accordion-actions-padding-block);padding-block-end:var(--scb-accordion-actions-padding-block)}`,p);function k(){const i=this._getDirectItems();return i.length>0&&i.every(t=>t.open)}function A(){if(this.singleOpen||!this.showCloseAll)return;const i=this._getDirectItems(),t=i.length>0&&i.every(e=>e.open);i.forEach(e=>e.setOpen(!t))}function f(){this.singleOpen||this.showCloseAll&&this.requestUpdate()}function O(){if(this.singleOpen){c(n,this,d).call(this);return}this.showCloseAll&&this.requestUpdate()}function d(){if(!this.singleOpen)return;const i=this._getDirectItems().filter(t=>t.open);i.length<=1||i.slice(1).forEach(t=>t.setOpen(!1))}function u(){const i=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??i,e=this.mapSpacingToken(this.spacingBottom)??i,r=this.mapSpacingToken(this.spacingLeft),l=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-accordion-spacing-block-start",t):this.style.removeProperty("--scb-accordion-spacing-block-start"),e?this.style.setProperty("--scb-accordion-spacing-block-end",e):this.style.removeProperty("--scb-accordion-spacing-block-end"),r?this.style.setProperty("--scb-accordion-spacing-inline-start",r):this.style.removeProperty("--scb-accordion-spacing-inline-start"),l?this.style.setProperty("--scb-accordion-spacing-inline-end",l):this.style.removeProperty("--scb-accordion-spacing-inline-end")}o([a({type:Boolean,attribute:"single-open",reflect:!0})],s.prototype,"singleOpen",void 0);o([a({type:Boolean,attribute:"show-close-all",reflect:!0})],s.prototype,"showCloseAll",void 0);o([a({type:String,attribute:"open-all-label"})],s.prototype,"openAllLabel",void 0);o([a({type:String,attribute:"close-all-label"})],s.prototype,"closeAllLabel",void 0);o([a({type:String,attribute:"controls-label"})],s.prototype,"controlsLabel",void 0);o([a({type:String,reflect:!0})],s.prototype,"size",void 0);o([a({type:String,reflect:!0})],s.prototype,"spacing",void 0);o([a({type:String,attribute:"spacing-top",reflect:!0})],s.prototype,"spacingTop",void 0);o([a({type:String,attribute:"spacing-bottom",reflect:!0})],s.prototype,"spacingBottom",void 0);o([a({type:String,attribute:"spacing-left",reflect:!0})],s.prototype,"spacingLeft",void 0);o([a({type:String,attribute:"spacing-right",reflect:!0})],s.prototype,"spacingRight",void 0);s=o([v("scb-accordion")],s);
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import{h as z,m as T,p as o,v as d,y as
|
|
2
|
-
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label
|
|
1
|
+
import{h as z,m as T,p as o,v as d,y as w}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as l}from"../../vendor/decorate.js";import{n as k,t as i}from"../../vendor/assertClassBrand.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-search/scb-search.js";import"../scb-avatar/scb-avatar.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,r,c){try{customElements.get(s)||t(s,r,c)}catch(h){var b=String(h||"");if(b.indexOf("already been used")===-1&&b.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var e,f,n=(e=new WeakSet,f=class extends z{constructor(...t){super(...t),k(this,e),this.title="",this.appBarTitle="",this.type="default",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(e,this,m).call(this)))}disconnectedCallback(){this.__titleResizeRaf&&(cancelAnimationFrame(this.__titleResizeRaf),this.__titleResizeRaf=0),this.__titleResizeObserver?.disconnect(),this.__titleResizeObserver=void 0,super.disconnectedCallback()}handleActionsSlotChange(t){t.target.assignedElements({flatten:!0}).forEach(s=>{if(s.tagName==="SCB-BUTTON"){const r=s;(!r.hasAttribute("size")||r.getAttribute("size")==="medium")&&r.setAttribute("size","small")}}),i(e,this,m).call(this)}handleAvatarSlotChange(t){t.target.assignedElements({flatten:!0}).forEach(s=>{s.tagName==="SCB-AVATAR"&&s.setAttribute("size","small")}),i(e,this,m).call(this)}firstUpdated(){i(e,this,S).call(this),i(e,this,v).call(this)}updated(t){(t.has("title")||t.has("appBarTitle"))&&(this.dispatchEvent(new CustomEvent("title-changed",{detail:{title:p.call(i(e,this))},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("app-bar-title-changed",{detail:{appBarTitle:p.call(i(e,this))},bubbles:!0,composed:!0}))),t.has("position")&&this.dispatchEvent(new CustomEvent("position-changed",{detail:{position:this.position},bubbles:!0,composed:!0})),t.has("type")&&(this.dispatchEvent(new CustomEvent("type-changed",{detail:{type:this.type},bubbles:!0,composed:!0})),i(e,this,v).call(this)),t.has("searchSupportingText")&&this.dispatchEvent(new CustomEvent("search-supporting-text-changed",{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0})),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&i(e,this,S).call(this)}mapSpacingToken(t){if(!t)return;const s=String(t).trim();if(s)return/^\d+$/.test(s)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(s,10)))})`:s}render(){switch(this.type){case"small-flexible":return d`
|
|
2
|
+
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label=${g.call(i(e,this))}>
|
|
3
3
|
<div class="leading">
|
|
4
4
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
5
5
|
</div>
|
|
6
|
-
<h1 class="headline">${
|
|
6
|
+
<h1 class="headline">${p.call(i(e,this))}</h1>
|
|
7
7
|
<div class="trailing">
|
|
8
8
|
<slot name="trailing" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
9
9
|
<slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
|
|
10
10
|
</div>
|
|
11
11
|
</header>
|
|
12
12
|
`;case"medium-flexible":return d`
|
|
13
|
-
<header class="medium-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label
|
|
13
|
+
<header class="medium-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label=${g.call(i(e,this))}>
|
|
14
14
|
<div class="leading">
|
|
15
15
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
16
16
|
</div>
|
|
17
|
-
<h1 class="headline">${
|
|
17
|
+
<h1 class="headline">${p.call(i(e,this))}</h1>
|
|
18
18
|
<div class="trailing">
|
|
19
19
|
<slot name="trailing" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
20
20
|
<slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
|
|
21
21
|
</div>
|
|
22
22
|
</header>
|
|
23
23
|
`;case"large-flexible":return d`
|
|
24
|
-
<header class="large-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label
|
|
24
|
+
<header class="large-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label=${g.call(i(e,this))}>
|
|
25
25
|
<div class="leading">
|
|
26
26
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
27
27
|
</div>
|
|
28
|
-
<h1 class="headline">${
|
|
28
|
+
<h1 class="headline">${p.call(i(e,this))}</h1>
|
|
29
29
|
<div class="trailing">
|
|
30
30
|
<slot name="trailing" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
31
31
|
<slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
|
|
32
32
|
</div>
|
|
33
33
|
</header>
|
|
34
34
|
`;case"search":return d`
|
|
35
|
-
<header class="search ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label
|
|
35
|
+
<header class="search ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label=${g.call(i(e,this))}>
|
|
36
36
|
<div class="leading">
|
|
37
37
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
38
38
|
</div>
|
|
@@ -45,14 +45,14 @@ import{h as z,m as T,p as o,v as d,y as $}from"../../vendor/vendor.js";import"..
|
|
|
45
45
|
</div>
|
|
46
46
|
</header>
|
|
47
47
|
`;default:return d`
|
|
48
|
-
<header class="default ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label
|
|
48
|
+
<header class="default ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label=${g.call(i(e,this))}>
|
|
49
49
|
<div class="leading">
|
|
50
50
|
<slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
51
51
|
</div>
|
|
52
|
-
<h1 class="headline">${
|
|
52
|
+
<h1 class="headline">${p.call(i(e,this))}</h1>
|
|
53
53
|
<div class="trailing">
|
|
54
54
|
<slot name="trailing" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
55
55
|
<slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
|
|
56
56
|
</div>
|
|
57
57
|
</header>
|
|
58
|
-
`}}},
|
|
58
|
+
`}}},f.styles=[w`:host{display:block;font-family:var(--brand-font, Inter, Arial, sans-serif);position:relative;container-type:inline-size;container-name:app-bar-container;--app-search-height:64px;margin-block-start:var(--scb-app-bar-spacing-block-start, 0);margin-block-end:var(--scb-app-bar-spacing-block-end, 0);margin-inline-start:var(--scb-app-bar-spacing-inline-start, 0);margin-inline-end:var(--scb-app-bar-spacing-inline-end, 0)}header{background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface);display:flex;align-items:center;padding:0 var(--spacing-5);position:relative;z-index:10;transition:height .3s;min-height:var(--app-search-height)}header.search{height:var(--app-search-height)}header.medium-flexible{min-height:96px}header.large-flexible{min-height:128px}header.position-top{position:fixed;top:0;left:0;right:0;z-index:100}header.position-bottom{position:fixed;bottom:0;left:0;right:0;z-index:100}header.default .trailing{margin-inline-start:auto}header.default .headline{position:absolute;inset-inline-start:50%;inset-block-start:50%;transform:translate(-50%,-50%);max-width:var(--scb-app-bar-title-max-width, 100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.headline{flex:1 1 auto;text-align:center;font-family:var(--md-sys-typescale-title-large-font, var(--brand-font, Inter, Arial, sans-serif));font-size:var(--md-sys-typescale-title-large-size);line-height:var(--md-sys-typescale-title-large-line-height, calc(var(--md-sys-typescale-title-large-size) * 1.3));font-weight:600;margin:0}header.small-flexible .headline{text-align:left;margin-left:var(--spacing-5)}header.medium-flexible .headline{font-family:var(--md-sys-typescale-headline-small-font, var(--brand-font, Inter, Arial, sans-serif));font-size:var(--md-sys-typescale-headline-small-size);line-height:var(--md-sys-typescale-headline-small-line-height, 30px);font-weight:700;letter-spacing:var(--md-sys-typescale-headline-small-tracking);text-align:left;margin:0 0 0 var(--spacing-3)}header.large-flexible .headline{font-family:var(--md-sys-typescale-headline-medium-font, var(--brand-font, Inter, Arial, sans-serif));font-size:var(--md-sys-typescale-headline-medium-size);font-weight:700;line-height:var(--md-sys-typescale-headline-medium-line-height);letter-spacing:var(--md-sys-typescale-headline-medium-tracking);text-align:left;margin:0 0 0 var(--spacing-3)}.search-container{flex:1 1 auto;display:flex;align-items:center;justify-content:center;padding:0 var(--spacing-3)}.leading,.trailing{display:flex;align-items:center;gap:var(--spacing-2)}`],f);function m(){this.type==="default"&&(this.__titleResizeRaf||(this.__titleResizeRaf=requestAnimationFrame(()=>{this.__titleResizeRaf=0,i(e,this,E).call(this)})))}function v(){this.__titleResizeObserver?.disconnect();const a=this.shadowRoot?.querySelector("header");if(a&&a.style.removeProperty("--scb-app-bar-title-max-width"),this.type!=="default"||!this.__titleResizeObserver)return;const t=this.shadowRoot?.querySelector("header.default");if(!t)return;const s=t.querySelector(".leading"),r=t.querySelector(".trailing");!s||!r||(this.__titleResizeObserver.observe(t),this.__titleResizeObserver.observe(s),this.__titleResizeObserver.observe(r),i(e,this,m).call(this))}function u(a){if(!a)return 0;const t=parseFloat(a);return Number.isFinite(t)?t:0}function y(a){const t=getComputedStyle(a);return i(e,this,u).call(this,t.columnGap||t.gap)}function E(){const a=this.shadowRoot?.querySelector("header.default");if(!a)return;const t=a.querySelector(".leading"),s=a.querySelector(".trailing");if(!t||!s)return;const r=a.getBoundingClientRect(),c=t.getBoundingClientRect(),b=s.getBoundingClientRect(),h=getComputedStyle(a),_=i(e,this,u).call(this,h.paddingInlineStart||h.paddingLeft),x=i(e,this,u).call(this,h.paddingInlineEnd||h.paddingRight),A=Math.max(0,r.width-_-x),R=Math.max(c.width,b.width),C=Math.max(i(e,this,y).call(this,t),i(e,this,y).call(this,s)),$=Math.max(0,A-R*2-C*2);a.style.setProperty("--scb-app-bar-title-max-width",`${$}px`)}function S(){const a=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??a,s=this.mapSpacingToken(this.spacingBottom)??a,r=this.mapSpacingToken(this.spacingLeft),c=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-app-bar-spacing-block-start",t):this.style.removeProperty("--scb-app-bar-spacing-block-start"),s?this.style.setProperty("--scb-app-bar-spacing-block-end",s):this.style.removeProperty("--scb-app-bar-spacing-block-end"),r?this.style.setProperty("--scb-app-bar-spacing-inline-start",r):this.style.removeProperty("--scb-app-bar-spacing-inline-start"),c?this.style.setProperty("--scb-app-bar-spacing-inline-end",c):this.style.removeProperty("--scb-app-bar-spacing-inline-end")}function p(){return this.appBarTitle||this.title}function g(){const a=this.ariaLabel.trim();return a||(this.type==="search"?this.searchAriaLabel:this.defaultAriaLabel)}l([o({type:String,reflect:!0})],n.prototype,"title",void 0);l([o({type:String,attribute:"app-bar-title",reflect:!0})],n.prototype,"appBarTitle",void 0);l([o({type:String,reflect:!0})],n.prototype,"type",void 0);l([o({type:String,reflect:!0})],n.prototype,"position",void 0);l([o({type:String,attribute:"aria-label",reflect:!0})],n.prototype,"ariaLabel",void 0);l([o({type:String,attribute:"default-aria-label"})],n.prototype,"defaultAriaLabel",void 0);l([o({type:String,attribute:"search-aria-label"})],n.prototype,"searchAriaLabel",void 0);l([o({type:String,attribute:"search-supporting-text",reflect:!0})],n.prototype,"searchSupportingText",void 0);l([o({type:String,reflect:!0})],n.prototype,"spacing",void 0);l([o({type:String,attribute:"spacing-top",reflect:!0})],n.prototype,"spacingTop",void 0);l([o({type:String,attribute:"spacing-bottom",reflect:!0})],n.prototype,"spacingBottom",void 0);l([o({type:String,attribute:"spacing-left",reflect:!0})],n.prototype,"spacingLeft",void 0);l([o({type:String,attribute:"spacing-right",reflect:!0})],n.prototype,"spacingRight",void 0);n=l([T("scb-app-bar")],n);
|