scb-wc 0.1.127 → 0.1.129
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 +49 -48
- 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-datepicker/scb-datepicker.js +40 -26
- 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 +9 -9
- 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-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- 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/index.d.ts +1 -0
- 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-datepicker/scb-datepicker.d.ts +4 -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-selfhost.css +1 -1
- package/scb-wc.bundle.js +4287 -3732
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +2 -0
package/all.js
CHANGED
|
@@ -34,6 +34,7 @@ import './scb-fact-card/scb-fact-card-content.js';
|
|
|
34
34
|
import './scb-fact-card/scb-fact-card.js';
|
|
35
35
|
import './scb-footer/scb-footer-section.js';
|
|
36
36
|
import './scb-footer/scb-footer.js';
|
|
37
|
+
import './scb-form-error-summary/scb-form-error-summary.js';
|
|
37
38
|
import './scb-gallery-grid/scb-gallery-grid.js';
|
|
38
39
|
import './scb-grid/scb-grid-item.js';
|
|
39
40
|
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
|
@@ -54,51 +54,52 @@ import { ScbGridItem as X } from "./scb-grid/scb-grid-item.js";
|
|
|
54
54
|
import { ScbStack as Z } from "./scb-grid/scb-stack.js";
|
|
55
55
|
import { ScbGrid as Q } from "./scb-grid/scb-grid.js";
|
|
56
56
|
import { ScbFooter as $ } from "./scb-footer/scb-footer.js";
|
|
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
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
|
|
57
|
+
import { ScbIcon as ee } from "./scb-icon/scb-icon.js";
|
|
58
|
+
import { ScbNotificationCard as te } from "./scb-notification-card/scb-notification-card.js";
|
|
59
|
+
import { ScbFormErrorSummary as ne } from "./scb-form-error-summary/scb-form-error-summary.js";
|
|
60
|
+
import { hasScbSvgIcon as re, renderScbIcon as ie } from "./shared/scb-icon-svg.js";
|
|
61
|
+
import { ScbHorizontalScroller as ae } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
62
|
+
import { ScbOverlay as oe } from "./scb-overlay/scb-overlay.js";
|
|
63
|
+
import { ScbGalleryGrid as se } from "./scb-gallery-grid/scb-gallery-grid.js";
|
|
64
|
+
import { ScbHeaderMenuGroup as ce } from "./scb-header/scb-header-menu-group.js";
|
|
65
|
+
import { ScbHeaderMenuItem as le } from "./scb-header/scb-header-menu-item.js";
|
|
66
|
+
import { ScbHeaderTab as ue } from "./scb-header/scb-header-tab.js";
|
|
67
|
+
import { ScbHeaderUtility as de } from "./scb-header/scb-header-utility.js";
|
|
68
|
+
import { ScbHeader as fe } from "./scb-header/scb-header.js";
|
|
69
|
+
import { ScbKeyFigureCard as pe } from "./scb-keyfigure-card/scb-keyfigure-card.js";
|
|
70
|
+
import { ScbMenuItem as me } from "./scb-menu/scb-menu-item.js";
|
|
71
|
+
import { ScbmenuSection as he } from "./scb-menu/scb-menu-section.js";
|
|
72
|
+
import { ScbSubmenu as ge } from "./scb-menu/scb-sub-menu.js";
|
|
73
|
+
import { ScbMenu as _e } from "./scb-menu/scb-menu.js";
|
|
74
|
+
import { ScbNavItem as ve } from "./scb-nav/scb-nav-item.js";
|
|
75
|
+
import { ScbNav as ye } from "./scb-nav/scb-nav.js";
|
|
76
|
+
import { ScbPagination as be } from "./scb-pagination/scb-pagination.js";
|
|
77
|
+
import { ScbProgressIndicator as xe } from "./scb-progress-indicator/scb-progress-indicator.js";
|
|
78
|
+
import { ScbProgressStep as Se } from "./scb-progress-stepper/scb-progress-step.js";
|
|
79
|
+
import { ScbProgressStepper as Ce } from "./scb-progress-stepper/scb-progress-stepper.js";
|
|
80
|
+
import { ScbScrollspy as we } from "./scb-scrollspy/scb-scrollspy.js";
|
|
81
|
+
import { ScbSegmentedItem as Te } from "./scb-segmented-button/scb-segmented-item.js";
|
|
82
|
+
import { ScbSegmentedButton as Ee } from "./scb-segmented-button/scb-segmented-button.js";
|
|
83
|
+
import { ScbSelectOption as De } from "./scb-select/scb-select-option.js";
|
|
84
|
+
import { ScbSelect as Oe } from "./scb-select/scb-select.js";
|
|
85
|
+
import { ScbSkeleton as ke } from "./scb-skeleton/scb-skeleton.js";
|
|
86
|
+
import { ScbSlider as Ae } from "./scb-slider/scb-slider.js";
|
|
87
|
+
import { ScbSnackbar as je } from "./scb-snackbar/scb-snackbar.js";
|
|
88
|
+
import { ScbStatusPill as Me } from "./scb-status-pill/scb-status-pill.js";
|
|
89
|
+
import { ScbStep as Ne } from "./scb-stepper/scb-step.js";
|
|
90
|
+
import { ScbStepper as Pe } from "./scb-stepper/scb-stepper.js";
|
|
91
|
+
import { ScbTable as Fe } from "./scb-table/scb-table.js";
|
|
92
|
+
import { ScbTableAdvanced as Ie } from "./scb-table-advanced/scb-table-advanced.js";
|
|
93
|
+
import { ScbPrimaryTab as Le } from "./scb-tabs/scb-primary-tab.js";
|
|
94
|
+
import { ScbSecondaryTab as Re } from "./scb-tabs/scb-secondary-tab.js";
|
|
95
|
+
import { ScbTabs as ze } from "./scb-tabs/scb-tabs.js";
|
|
96
|
+
import { ScbTocItem as Be } from "./scb-toc/scb-toc-item.js";
|
|
97
|
+
import { ScbToc as Ve } from "./scb-toc/scb-toc.js";
|
|
98
|
+
import { buildScbVizExportFileName as He, createScbVizCsvBlob as Ue, createScbVizRasterBlobFromElement as We, createScbVizRasterDataUrlFromElement as Ge, downloadScbVizBlob as Ke, getScbVizCurrentFullscreenElement as qe, getScbVizExportBaseFileName as Je, getScbVizFullscreenDocument as Ye, isScbVizFullscreenSupported as Xe, openScbVizPrintFrame as Ze, runWithScbVizForcedPrintLightMode as Qe, toggleScbVizFullscreen as $e } from "./scb-viz/scb-viz-actions-runtime.js";
|
|
99
|
+
import { buildScbVizPrintDocumentHtml as et, buildScbVizPrintableFooterHtml as tt, buildScbVizPrintableTableHtml as nt } from "./scb-viz/scb-viz-print-runtime.js";
|
|
100
|
+
import { appendScbVizSeriesDifferentiationPatternMarks as rt, getScbVizSeriesDifferentiationPatternDefinition as it, getScbVizSeriesDifferentiationPatternKinds as at, getScbVizSeriesDifferentiationRegistry as ot, getScbVizSeriesDifferentiationVariant as st, scbVizSeriesDifferentiationRegistry as ct } from "./scb-viz/scb-viz-series-differentiation-registry.js";
|
|
101
|
+
import { clearScbVizSeriesDifferentiationColorClass as lt, clearScbVizSeriesDifferentiationMetadata as ut, ensureScbVizGroupedSeriesDifferentiationStore as dt, ensureScbVizStyledModeSeriesPattern as ft, getScbVizGroupedSeriesDifferentiationKey as pt, getScbVizGroupedSeriesDifferentiationVariant as mt, getScbVizGroupedSeriesDifferentiationVariantIndex as ht, getScbVizHighchartsColorClassName as gt, getScbVizHighchartsSvgElement as _t, getScbVizHighchartsSvgRoot as vt, getScbVizLegendSeriesDifferentiationTargets as yt, getScbVizSeriesDifferentiationColorIndex as bt, getScbVizSeriesDifferentiationVariantByIndex as xt, isScbVizGroupedSeriesDifferentiationChart as St, isScbVizHighchartsStyledMode as Ct, setScbVizSeriesDifferentiationColorClass as wt, setScbVizSeriesDifferentiationMetadata as Tt, shouldShowScbVizSeriesDifferentiationAction as Et, usesScbVizGroupedPointDifferentiation as Dt } from "./scb-viz/scb-viz-series-differentiation-runtime.js";
|
|
102
|
+
import { buildScbVizResolvedTableView as Ot, createScbVizCsvRows as kt, inferScbVizTableAlignments as At, normalizeScbVizRenderableCell as jt, readScbVizTableDataFromSlot as Mt } from "./scb-viz/scb-viz-table-runtime.js";
|
|
103
|
+
import { ScbViz as Nt } from "./scb-viz/scb-viz.js";
|
|
104
|
+
import { ensureRippleReady as Pt, syncRippleToControl as Ft } from "./shared/lazy-ripple.js";
|
|
105
|
+
export { x as SCBBreadcrumb, b as SCBBreadcrumbItem, s as ScbAccordion, a as ScbAccordionItem, c as ScbActionCard, _ as ScbAppBar, g as ScbAvatar, v as ScbBadge, o as ScbButton, I as ScbCalendar, L as ScbCalendarCard, S as ScbCalendarEvent, l as ScbCard, O as ScbCheckbox, D as ScbCheckboxGroup, i as ScbChevron, M as ScbChip, R as ScbCollapse, u as ScbContainerCard, z as ScbCookiesConsent, w as ScbDatepicker, N as ScbDialog, C as ScbDivider, B as ScbDrawer, V as ScbDropZone, G as ScbDropdown, K as ScbFab, J as ScbFactCard, q as ScbFactCardContent, $ as ScbFooter, Y as ScbFooterSection, ne as ScbFormErrorSummary, se as ScbGalleryGrid, Q as ScbGrid, X as ScbGridItem, fe as ScbHeader, ce as ScbHeaderMenuGroup, le as ScbHeaderMenuItem, ue as ScbHeaderTab, de as ScbHeaderUtility, ae as ScbHorizontalScroller, ee as ScbIcon, m as ScbIconButton, pe as ScbKeyFigureCard, y as ScbLink, d as ScbLinkCard, F as ScbList, f as ScbListCard, P as ScbListItem, _e as ScbMenu, me as ScbMenuItem, ye as ScbNav, ve as ScbNavItem, te as ScbNotificationCard, W as ScbOptionsMenu, H as ScbOptionsMenuItem, U as ScbOptionsSubMenu, oe as ScbOverlay, be as ScbPagination, Le as ScbPrimaryTab, xe as ScbProgressIndicator, Se as ScbProgressStep, Ce as ScbProgressStepper, A as ScbRadioButton, k as ScbRadioGroup, we as ScbScrollspy, h as ScbSearch, Re as ScbSecondaryTab, Ee as ScbSegmentedButton, Te as ScbSegmentedItem, Oe as ScbSelect, De as ScbSelectOption, ke as ScbSkeleton, Ae as ScbSlider, je as ScbSnackbar, p as ScbSocialCard, Z as ScbStack, Me as ScbStatusPill, Ne as ScbStep, Pe as ScbStepper, ge as ScbSubmenu, j as ScbSwitch, Fe as ScbTable, Ie as ScbTableAdvanced, ze as ScbTabs, E as ScbTextField, Ve as ScbToc, Be as ScbTocItem, T as ScbTooltip, Nt as ScbViz, he as ScbmenuSection, e as addLazyFocusRingListeners, rt as appendScbVizSeriesDifferentiationPatternMarks, He as buildScbVizExportFileName, et as buildScbVizPrintDocumentHtml, tt as buildScbVizPrintableFooterHtml, nt as buildScbVizPrintableTableHtml, Ot as buildScbVizResolvedTableView, lt as clearScbVizSeriesDifferentiationColorClass, ut as clearScbVizSeriesDifferentiationMetadata, Ue as createScbVizCsvBlob, kt as createScbVizCsvRows, We as createScbVizRasterBlobFromElement, Ge as createScbVizRasterDataUrlFromElement, Ke as downloadScbVizBlob, t as ensureFocusRingOnFocusVisible, n as ensureFocusRingOnTab, r as ensureFocusRingReady, Pt as ensureRippleReady, dt as ensureScbVizGroupedSeriesDifferentiationStore, ft as ensureScbVizStyledModeSeriesPattern, qe as getScbVizCurrentFullscreenElement, Je as getScbVizExportBaseFileName, Ye as getScbVizFullscreenDocument, pt as getScbVizGroupedSeriesDifferentiationKey, mt as getScbVizGroupedSeriesDifferentiationVariant, ht as getScbVizGroupedSeriesDifferentiationVariantIndex, gt as getScbVizHighchartsColorClassName, _t as getScbVizHighchartsSvgElement, vt as getScbVizHighchartsSvgRoot, yt as getScbVizLegendSeriesDifferentiationTargets, bt as getScbVizSeriesDifferentiationColorIndex, it as getScbVizSeriesDifferentiationPatternDefinition, at as getScbVizSeriesDifferentiationPatternKinds, ot as getScbVizSeriesDifferentiationRegistry, st as getScbVizSeriesDifferentiationVariant, xt as getScbVizSeriesDifferentiationVariantByIndex, re as hasScbSvgIcon, At as inferScbVizTableAlignments, Xe as isScbVizFullscreenSupported, St as isScbVizGroupedSeriesDifferentiationChart, Ct as isScbVizHighchartsStyledMode, jt as normalizeScbVizRenderableCell, Ze as openScbVizPrintFrame, Mt as readScbVizTableDataFromSlot, ie as renderScbIcon, Qe as runWithScbVizForcedPrintLightMode, ct as scbVizSeriesDifferentiationRegistry, wt as setScbVizSeriesDifferentiationColorClass, Tt as setScbVizSeriesDifferentiationMetadata, Et as shouldShowScbVizSeriesDifferentiationAction, Ft as syncRippleToControl, $e as toggleScbVizFullscreen, Dt as usesScbVizGroupedPointDifferentiation };
|
package/mvc/components/all.js
CHANGED
|
@@ -34,6 +34,7 @@ import './scb-fact-card/scb-fact-card.js';
|
|
|
34
34
|
import './scb-fact-card/scb-fact-card-content.js';
|
|
35
35
|
import './scb-footer/scb-footer.js';
|
|
36
36
|
import './scb-footer/scb-footer-section.js';
|
|
37
|
+
import './scb-form-error-summary/scb-form-error-summary.js';
|
|
37
38
|
import './scb-gallery-grid/scb-gallery-grid.js';
|
|
38
39
|
import './scb-grid/scb-grid.js';
|
|
39
40
|
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);
|