scb-wc 0.1.166 → 0.1.168

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.
Files changed (51) hide show
  1. package/README.md +17 -20
  2. package/all.js +0 -5
  3. package/index.js +90 -95
  4. package/mvc/components/all.js +0 -5
  5. package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
  6. package/mvc/components/scb-button/scb-button.js +3 -3
  7. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  8. package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
  9. package/mvc/components/scb-card/scb-card.js +2 -2
  10. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  11. package/mvc/components/scb-header/scb-header.js +2 -2
  12. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  13. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  14. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  15. package/mvc/components/scb-list/scb-list-item.js +2 -2
  16. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  17. package/mvc/components/scb-nav/scb-nav.js +1 -1
  18. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  19. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  20. package/mvc/components/scb-search/scb-search.js +1 -1
  21. package/mvc/components/scb-segmented-button/scb-segmented-item.js +3 -3
  22. package/mvc/components/scb-select/scb-select-option.js +1 -1
  23. package/mvc/components/scb-select/scb-select.js +1 -1
  24. package/mvc/components/scb-stepper/scb-step.js +1 -1
  25. package/mvc/components/scb-textfield/scb-textfield.js +171 -40
  26. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  27. package/mvc/scb-wc-core.css +1 -1
  28. package/mvc/scb-wc-selfhost.css +1 -1
  29. package/mvc/scb-wc.css +1 -1
  30. package/mvc/vendor/lazy-focus-ring.js +2 -0
  31. package/mvc/vendor/lazy-ripple.js +2 -0
  32. package/mvc/{components/scb-chevron → vendor}/scb-chevron.js +1 -1
  33. package/mvc/vendor/scb-icon-svg.js +11 -0
  34. package/package.json +2 -2
  35. package/scb-wc-core.css +1 -1
  36. package/scb-wc-public-entry/index.d.ts +99 -0
  37. package/scb-wc-selfhost.css +1 -1
  38. package/scb-wc.bundle.js +258 -258
  39. package/scb-wc.css +1 -1
  40. package/scb-wc.d.ts +198 -208
  41. package/shared/scb-icon-svg.js +2 -5
  42. package/mvc/components/scb-datepicker/scb-datepicker.js +0 -132
  43. package/mvc/components/shared/lazy-focus-ring.js +0 -2
  44. package/mvc/components/shared/lazy-ripple.js +0 -2
  45. package/mvc/components/shared/scb-icon-svg.js +0 -11
  46. package/scb-components/index.d.ts +0 -104
  47. package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
  48. package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -45
  49. package/scb-components/shared/lazy-focus-ring.d.ts +0 -4
  50. package/scb-components/shared/lazy-ripple.d.ts +0 -9
  51. package/scb-components/shared/scb-icon-svg.d.ts +0 -3
package/README.md CHANGED
@@ -1,19 +1,16 @@
1
- # Om SCB Web Components Preview
1
+ # Om SCB Web Components
2
2
 
3
- > ⚠️ **Previewkanal**
4
- > Installera `scb-wc` via `@next` för komponenter under utveckling. API, utseende och beteende kan ändras eller tas bort mellan versioner.
5
-
6
- SCB Web Components preview innehåller SCB:s gemensamma webbkomponenter.
3
+ SCB Web Components innehåller SCB:s gemensamma webbkomponenter.
7
4
 
8
5
  ## Dokumentation
9
6
 
10
- Previewkomponenterna dokumenteras och demonstreras i Storybook på SCB:s interna testadress:
7
+ Produktionskomponenterna dokumenteras och demonstreras i Storybook på SCB:s interna adress:
11
8
 
12
- - Test: <https://webcomponentstest.scb.intra>
9
+ - Prod: <https://webcomponents.scb.intra>
13
10
 
14
- Den publika/stabila Storybooken finns på:
11
+ Testkomponenterna finns på:
15
12
 
16
- - Prod: <https://webcomponents.scb.intra>
13
+ - Test: <https://webcomponentstest.scb.intra>
17
14
 
18
15
  ## Kom igång
19
16
 
@@ -22,7 +19,7 @@ Den publika/stabila Storybooken finns på:
22
19
  Välj den teknik du använder. Exemplet skapar en vanlig webbplats:
23
20
 
24
21
  ```sh
25
- npx scb-wc@next init html my-app
22
+ npx scb-wc init html my-app
26
23
  cd my-app
27
24
  npm install
28
25
  npm run dev
@@ -39,7 +36,7 @@ Byt `html` mot:
39
36
  Kör kommandot i mappen där appens `package.json` ligger:
40
37
 
41
38
  ```sh
42
- npm install scb-wc@next
39
+ npm install scb-wc
43
40
  ```
44
41
 
45
42
  Importera CSS och bara de komponenter som sidan använder:
@@ -58,9 +55,9 @@ Lägg sedan komponenten i sidan:
58
55
 
59
56
  ### Nästa steg
60
57
 
61
- - Öppna Kom igång i [Test Storybook](https://webcomponentstest.scb.intra/?path=/docs/docs-kom-igång--beskrivning) för HTML/CSS, React, MVC och Blazor.
62
- - Öppna [mallar och exempel](https://webcomponentstest.scb.intra/?path=/docs/examples-and-templates-att-använda-mallar-och-exempel--beskrivning) när du vill bygga en hel sida.
63
- - Öppna [komponentöversikten](https://webcomponentstest.scb.intra/?path=/story/components-översikt-alla-komponenter-exposé--expose) när du vill välja nästa komponent.
58
+ - Öppna Kom igång i [Prod Storybook](https://webcomponents.scb.intra/?path=/docs/docs-kom-igång--beskrivning) för HTML/CSS, React, MVC och Blazor.
59
+ - Öppna [mallar och exempel](https://webcomponents.scb.intra/?path=/docs/examples-and-templates-att-använda-mallar-och-exempel--beskrivning) när du vill bygga en hel sida.
60
+ - Öppna [komponentöversikten](https://webcomponents.scb.intra/?path=/story/components-översikt-alla-komponenter-exposé--expose) när du vill välja nästa komponent.
64
61
 
65
62
  ## Kort referens
66
63
 
@@ -88,15 +85,15 @@ Webbplatsmallarna använder standardläget. Service- och appmallarna laddar Comp
88
85
 
89
86
  ### MVC och statiska webbplatser
90
87
 
91
- Paketets färdiga MVC-filer ligger i `node_modules/scb-wc/mvc/`. Följ det kopierbara MVC-exemplet i [Kom igång](https://webcomponentstest.scb.intra/?path=/docs/docs-kom-igång--beskrivning). Det visar vilket `ui:install`-script som ska läggas i appens `package.json` och vilka filer layouten ska ladda.
88
+ Paketets färdiga MVC-filer ligger i `node_modules/scb-wc/mvc/`. Följ det kopierbara MVC-exemplet i [Kom igång](https://webcomponents.scb.intra/?path=/docs/docs-kom-igång--beskrivning). Det visar vilket `ui:install`-script som ska läggas i appens `package.json` och vilka filer layouten ska ladda.
92
89
 
93
90
  ### Blazor
94
91
 
95
- Blazor använder samma MVC-filer plus wrappers och interop under `node_modules/scb-wc/blazor/`. Följ [Kom igång](https://webcomponentstest.scb.intra/?path=/docs/docs-kom-igång--beskrivning) för första installationen och [Blazor-guiden](https://webcomponentstest.scb.intra/?path=/docs/docs-om-användning-i-blazor--beskrivning) när integrationen behöver state, parametrar eller events.
92
+ Blazor använder samma MVC-filer plus wrappers och interop under `node_modules/scb-wc/blazor/`. Följ [Kom igång](https://webcomponents.scb.intra/?path=/docs/docs-kom-igång--beskrivning) för första installationen och [Blazor-guiden](https://webcomponents.scb.intra/?path=/docs/docs-om-användning-i-blazor--beskrivning) när integrationen behöver state, parametrar eller events.
96
93
 
97
94
  ### Fonter och egna ikoner
98
95
 
99
- Vanliga appar använder `scb-wc.css`. Selfhost och egna Material Symbols-subset är avancerade val. Följ [Foundations/Icons](https://webcomponentstest.scb.intra/?path=/docs/foundations-icons-ikoner--beskrivning) om appen inte får ladda Google Fonts eller behöver fler ikoner än paketets `icons.json`.
96
+ Vanliga appar använder `scb-wc.css`. Selfhost och egna Material Symbols-subset är avancerade val. Följ [Foundations/Icons](https://webcomponents.scb.intra/?path=/docs/foundations-icons-ikoner--beskrivning) om appen inte får ladda Google Fonts eller behöver fler ikoner än paketets `icons.json`.
100
97
 
101
98
  ### Bundlad version
102
99
 
@@ -118,18 +115,18 @@ Kör först i appens mapp:
118
115
  npm outdated scb-wc
119
116
  ```
120
117
 
121
- Om en ny version finns, läs [Uppdatera SCB Web Components](https://webcomponentstest.scb.intra/?path=/docs/docs-uppdatera-version-i-din-app--beskrivning). Där står om versionen kräver ändringar i appen och eventuella migrationssteg.
118
+ Om en ny version finns, läs [Uppdatera SCB Web Components](https://webcomponents.scb.intra/?path=/docs/docs-uppdatera-version-i-din-app--beskrivning). Där står om versionen kräver ändringar i appen och eventuella migrationssteg.
122
119
 
123
120
  Uppdatera sedan paketet, bygg appen och kör appens vanliga tester:
124
121
 
125
122
  ```sh
126
- npm install scb-wc@next
123
+ npm install scb-wc
127
124
  ```
128
125
 
129
126
  För MVC och Blazor behöver du även köra appens befintliga kopieringsscript efter installationen. Exakta steg finns på uppdateringssidan.
130
127
 
131
128
  ## Viktigt
132
129
 
133
- - `scb-wc@next` är **previewkanalen**. Komponenter kan ändras eller tas bort mellan versioner. Använd `scb-wc@latest` i externa produktionsmiljöer.
130
+ - `scb-wc@latest` är produktionskanalen. Använd `scb-wc@next` för komponenter under utveckling och experiment.
134
131
  - Kör alltid npm-kommandon i mappen där appens `package.json` ligger.
135
132
  - Ladda inte samma komponent på flera sätt på samma sida.
package/all.js CHANGED
@@ -18,12 +18,10 @@ import './scb-card/scb-list-card.js';
18
18
  import './scb-card/scb-social-card.js';
19
19
  import './scb-checkbox/scb-checkbox-group.js';
20
20
  import './scb-checkbox/scb-checkbox.js';
21
- import './scb-chevron/scb-chevron.js';
22
21
  import './scb-chip/scb-chip.js';
23
22
  import './scb-collapse/scb-collapse.js';
24
23
  import './scb-container-card/scb-container-card.js';
25
24
  import './scb-cookies-consent/scb-cookies-consent.js';
26
- import './scb-datepicker/scb-datepicker.js';
27
25
  import './scb-dialog/scb-dialog.js';
28
26
  import './scb-divider/scb-divider.js';
29
27
  import './scb-drawer/scb-drawer.js';
@@ -99,6 +97,3 @@ import './scb-viz/scb-viz-series-differentiation-registry.js';
99
97
  import './scb-viz/scb-viz-series-differentiation-runtime.js';
100
98
  import './scb-viz/scb-viz-table-runtime.js';
101
99
  import './scb-viz/scb-viz.js';
102
- import './shared/lazy-focus-ring.js';
103
- import './shared/lazy-ripple.js';
104
- import './shared/scb-icon-svg.js';
package/index.js CHANGED
@@ -1,34 +1,31 @@
1
- import { addLazyFocusRingListeners as e, ensureFocusRingOnFocusVisible as t, ensureFocusRingOnTab as n, ensureFocusRingReady as r } from "./shared/lazy-focus-ring.js";
2
- import { ScbAvatar as i } from "./scb-avatar/scb-avatar.js";
3
- import { ScbChevron as a } from "./scb-chevron/scb-chevron.js";
4
- import { ScbAccordionItem as o } from "./scb-accordion/scb-accordion-item.js";
5
- import { ScbButton as s } from "./scb-button/scb-button.js";
6
- import { ScbAccordion as c } from "./scb-accordion/scb-accordion.js";
7
- import { ScbActionCard as l, ScbCard as u, ScbContainerCard as d, ScbLinkCard as f, ScbListCard as p, ScbSocialCard as m } from "./scb-card/scb-card.js";
1
+ import { ScbAvatar as e } from "./scb-avatar/scb-avatar.js";
2
+ import { ScbAccordionItem as t } from "./scb-accordion/scb-accordion-item.js";
3
+ import { ScbButton as n } from "./scb-button/scb-button.js";
4
+ import { ScbAccordion as r } from "./scb-accordion/scb-accordion.js";
5
+ import { ScbActionCard as i, ScbCard as a, ScbContainerCard as o, ScbLinkCard as s, ScbListCard as c, ScbSocialCard as l } from "./scb-card/scb-card.js";
8
6
  import "./scb-action-card/scb-action-card.js";
9
- import { ScbIconButton as h } from "./scb-icon-button/scb-icon-button.js";
10
- import { ScbSearch as g } from "./scb-search/scb-search.js";
11
- import { ScbAppBar as _ } from "./scb-app-bar/scb-app-bar.js";
12
- import { ScbBadge as v } from "./scb-badge/scb-badge.js";
13
- import { ScbLink as y } from "./scb-link/scb-link.js";
14
- import { SCBBreadcrumbItem as b } from "./scb-breadcrumb/scb-breadcrumb-item.js";
15
- import { SCBBreadcrumb as x } from "./scb-breadcrumb/scb-breadcrumb.js";
16
- import { ScbCalendarEvent as S } from "./scb-calendar/scb-calendar-event.js";
17
- import { ScbDivider as C } from "./scb-divider/scb-divider.js";
18
- import { ScbDatepicker as w } from "./scb-datepicker/scb-datepicker.js";
19
- import { ScbTooltip as T } from "./scb-tooltip/scb-tooltip.js";
20
- import { ScbTextField as E } from "./scb-textfield/scb-textfield.js";
21
- import { ScbCheckboxGroup as D } from "./scb-checkbox/scb-checkbox-group.js";
22
- import { ScbCheckbox as O } from "./scb-checkbox/scb-checkbox.js";
23
- import { ScbRadioGroup as k } from "./scb-radio-button/scb-radio-group.js";
24
- import { ScbRadioButton as A } from "./scb-radio-button/scb-radio-button.js";
25
- import { ScbSwitch as j } from "./scb-switch/scb-switch.js";
26
- import { ScbChip as M } from "./scb-chip/scb-chip.js";
27
- import { ScbDialog as N } from "./scb-dialog/scb-dialog.js";
28
- import { ScbListItem as P } from "./scb-list/scb-list-item.js";
29
- import { ScbList as F } from "./scb-list/scb-list.js";
30
- import { ScbCalendar as I } from "./scb-calendar/scb-calendar.js";
31
- import { ScbCalendarCard as L } from "./scb-calendar-card/scb-calendar-card.js";
7
+ import { ScbIconButton as u } from "./scb-icon-button/scb-icon-button.js";
8
+ import { ScbSearch as d } from "./scb-search/scb-search.js";
9
+ import { ScbAppBar as f } from "./scb-app-bar/scb-app-bar.js";
10
+ import { ScbBadge as p } from "./scb-badge/scb-badge.js";
11
+ import { ScbLink as m } from "./scb-link/scb-link.js";
12
+ import { SCBBreadcrumbItem as h } from "./scb-breadcrumb/scb-breadcrumb-item.js";
13
+ import { SCBBreadcrumb as g } from "./scb-breadcrumb/scb-breadcrumb.js";
14
+ import { ScbCalendarEvent as _ } from "./scb-calendar/scb-calendar-event.js";
15
+ import { ScbDivider as v } from "./scb-divider/scb-divider.js";
16
+ import { ScbTooltip as y } from "./scb-tooltip/scb-tooltip.js";
17
+ import { ScbTextField as b } from "./scb-textfield/scb-textfield.js";
18
+ import { ScbCheckboxGroup as x } from "./scb-checkbox/scb-checkbox-group.js";
19
+ import { ScbCheckbox as S } from "./scb-checkbox/scb-checkbox.js";
20
+ import { ScbRadioGroup as C } from "./scb-radio-button/scb-radio-group.js";
21
+ import { ScbRadioButton as w } from "./scb-radio-button/scb-radio-button.js";
22
+ import { ScbSwitch as T } from "./scb-switch/scb-switch.js";
23
+ import { ScbChip as E } from "./scb-chip/scb-chip.js";
24
+ import { ScbDialog as D } from "./scb-dialog/scb-dialog.js";
25
+ import { ScbListItem as O } from "./scb-list/scb-list-item.js";
26
+ import { ScbList as k } from "./scb-list/scb-list.js";
27
+ import { ScbCalendar as A } from "./scb-calendar/scb-calendar.js";
28
+ import { ScbCalendarCard as j } from "./scb-calendar-card/scb-calendar-card.js";
32
29
  import "./scb-card/scb-action-card.js";
33
30
  import "./scb-container-card/scb-container-card.js";
34
31
  import "./scb-card/scb-container-card.js";
@@ -38,68 +35,66 @@ import "./scb-list-card/scb-list-card.js";
38
35
  import "./scb-card/scb-list-card.js";
39
36
  import "./scb-social-card/scb-social-card.js";
40
37
  import "./scb-card/scb-social-card.js";
41
- import { ScbCollapse as R } from "./scb-collapse/scb-collapse.js";
42
- import { ScbCookiesConsent as z } from "./scb-cookies-consent/scb-cookies-consent.js";
43
- import { ScbDrawer as B } from "./scb-drawer/scb-drawer.js";
44
- import { ScbDropZone as V } from "./scb-drop-zone/scb-drop-zone.js";
45
- import { ScbOptionsMenuItem as H } from "./scb-options-menu/scb-options-menu-item.js";
46
- import { ScbOptionsSubMenu as U } from "./scb-options-menu/scb-options-sub-menu.js";
47
- import { ScbOptionsMenu as W } from "./scb-options-menu/scb-options-menu.js";
48
- import { ScbDropdown as G } from "./scb-dropdown/scb-dropdown.js";
49
- import { ScbFab as K } from "./scb-fab/scb-fab.js";
50
- import { ScbFactCardContent as q } from "./scb-fact-card/scb-fact-card-content.js";
51
- import { ScbFactCard as J } from "./scb-fact-card/scb-fact-card.js";
52
- import { ScbFooterSection as Y } from "./scb-footer/scb-footer-section.js";
53
- import { ScbGridItem as X } from "./scb-grid/scb-grid-item.js";
54
- import { ScbStack as Z } from "./scb-grid/scb-stack.js";
55
- import { ScbGrid as Q } from "./scb-grid/scb-grid.js";
56
- import { ScbFooter as $ } from "./scb-footer/scb-footer.js";
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, c as ScbAccordion, o as ScbAccordionItem, l as ScbActionCard, _ as ScbAppBar, i as ScbAvatar, v as ScbBadge, s as ScbButton, I as ScbCalendar, L as ScbCalendarCard, S as ScbCalendarEvent, u as ScbCard, O as ScbCheckbox, D as ScbCheckboxGroup, a as ScbChevron, M as ScbChip, R as ScbCollapse, d 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, h as ScbIconButton, pe as ScbKeyFigureCard, y as ScbLink, f as ScbLinkCard, F as ScbList, p 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, g 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, m 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 };
38
+ import { ScbCollapse as M } from "./scb-collapse/scb-collapse.js";
39
+ import { ScbCookiesConsent as N } from "./scb-cookies-consent/scb-cookies-consent.js";
40
+ import { ScbDrawer as P } from "./scb-drawer/scb-drawer.js";
41
+ import { ScbDropZone as F } from "./scb-drop-zone/scb-drop-zone.js";
42
+ import { ScbOptionsMenuItem as I } from "./scb-options-menu/scb-options-menu-item.js";
43
+ import { ScbOptionsSubMenu as L } from "./scb-options-menu/scb-options-sub-menu.js";
44
+ import { ScbOptionsMenu as R } from "./scb-options-menu/scb-options-menu.js";
45
+ import { ScbDropdown as z } from "./scb-dropdown/scb-dropdown.js";
46
+ import { ScbFab as B } from "./scb-fab/scb-fab.js";
47
+ import { ScbFactCardContent as V } from "./scb-fact-card/scb-fact-card-content.js";
48
+ import { ScbFactCard as H } from "./scb-fact-card/scb-fact-card.js";
49
+ import { ScbFooterSection as U } from "./scb-footer/scb-footer-section.js";
50
+ import { ScbGridItem as W } from "./scb-grid/scb-grid-item.js";
51
+ import { ScbStack as G } from "./scb-grid/scb-stack.js";
52
+ import { ScbGrid as K } from "./scb-grid/scb-grid.js";
53
+ import { ScbFooter as q } from "./scb-footer/scb-footer.js";
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, r as ScbAccordion, t as ScbAccordionItem, i as ScbActionCard, f as ScbAppBar, e as ScbAvatar, p as ScbBadge, n as ScbButton, A as ScbCalendar, j as ScbCalendarCard, _ as ScbCalendarEvent, a as ScbCard, S as ScbCheckbox, x as ScbCheckboxGroup, E as ScbChip, M as ScbCollapse, o 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, u as ScbIconButton, ae as ScbKeyFigureCard, m as ScbLink, s as ScbLinkCard, k as ScbList, c 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, d 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, l 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 };
@@ -18,12 +18,10 @@ import './scb-card/scb-list-card.js';
18
18
  import './scb-card/scb-social-card.js';
19
19
  import './scb-checkbox/scb-checkbox.js';
20
20
  import './scb-checkbox/scb-checkbox-group.js';
21
- import './scb-chevron/scb-chevron.js';
22
21
  import './scb-chip/scb-chip.js';
23
22
  import './scb-collapse/scb-collapse.js';
24
23
  import './scb-container-card/scb-container-card.js';
25
24
  import './scb-cookies-consent/scb-cookies-consent.js';
26
- import './scb-datepicker/scb-datepicker.js';
27
25
  import './scb-dialog/scb-dialog.js';
28
26
  import './scb-divider/scb-divider.js';
29
27
  import './scb-drawer/scb-drawer.js';
@@ -99,6 +97,3 @@ import './scb-viz/scb-viz-print-runtime.js';
99
97
  import './scb-viz/scb-viz-series-differentiation-registry.js';
100
98
  import './scb-viz/scb-viz-series-differentiation-runtime.js';
101
99
  import './scb-viz/scb-viz-table-runtime.js';
102
- import './shared/lazy-focus-ring.js';
103
- import './shared/lazy-ripple.js';
104
- import './shared/scb-icon-svg.js';
@@ -1,4 +1,4 @@
1
- import{g as l,h as p,m as u,p as o,v as a,y as m}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{ensureFocusRingOnFocusVisible as h}from"../shared/lazy-focus-ring.js";import{t as n}from"../../vendor/decorate.js";import"../scb-avatar/scb-avatar.js";import"../scb-chevron/scb-chevron.js";(function(){try{var v=typeof globalThis<"u"?globalThis:window;if(!v.__scb_ce_guard_installed__){v.__scb_ce_guard_installed__=!0;var c=customElements.define.bind(customElements);customElements.define=function(i,t,b){try{customElements.get(i)||c(i,t,b)}catch(s){var e=String(s||"");if(e.indexOf("already been used")===-1&&e.indexOf("NotSupportedError")===-1)throw s}}}}catch{}})();var d,g,r=(d=class extends p{constructor(...c){super(...c),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=g._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=i=>{i.preventDefault();const t=!this.open;this.closest("scb-accordion")?.onItemToggled?.(this,t),this.setOpen(t)},this._onToggle=i=>{const t=i.currentTarget;t.open||(t.open=!0),this._applyInertByOpen()}}static _uid(){return globalThis.crypto?.randomUUID?.()??`${g._uidPrefix}-${++g._uidSeq}`}static get observedAttributes(){const c=super.observedAttributes||[];return c.includes("title")?c:[...c,"title"]}attributeChangedCallback(c,i,t){if(c==="title"&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(c,i,t),c==="title"&&t!==null&&(this._ignoreNextNativeTitleAttrChange=!0,this.removeAttribute("title"))}firstUpdated(){this._applyInertByOpen()}_applyInertByOpen(){const c=this.renderRoot.querySelector(".scb-accordion-bottom");c&&(this.open?(c.removeAttribute("inert"),c.setAttribute("aria-hidden","false")):(c.setAttribute("inert",""),c.setAttribute("aria-hidden","true")))}_onKeyDown(c){const i=this.closest("scb-accordion"),t=Array.from(i?.querySelectorAll("scb-accordion-item")||[]).map(s=>s.renderRoot.querySelector("details")?.querySelector(".scb-accordion-top")||null).filter(s=>!!s),b=c.currentTarget,e=t.indexOf(b);switch(c.key){case"ArrowDown":c.preventDefault(),e<t.length-1&&t[e+1].focus();break;case"ArrowUp":c.preventDefault(),e>0&&t[e-1].focus();break;case"Home":c.preventDefault(),t.length&&t[0].focus();break;case"End":c.preventDefault(),t.length&&t[t.length-1].focus();break}}setOpen(c){this.open=!!c;const i=this.renderRoot.querySelector("details");i&&!i.open&&(i.open=!0),this._applyInertByOpen()}updated(c){if(c.has("open")){const i=this.renderRoot.querySelector("details");i&&!i.open&&(i.open=!0),this._applyInertByOpen(),this.dispatchEvent(new CustomEvent("open-changed",{detail:{open:this.open,title:this.title},bubbles:!0,composed:!0}))}}render(){const c=`bottom-${this._unique}`,i=`header-${this._unique}`,t=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?a`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?a`
1
+ import{g as l,h as p,m as u,p as o,v as a,y as m}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{n as h}from"../../vendor/lazy-focus-ring.js";import{t as n}from"../../vendor/decorate.js";import"../scb-avatar/scb-avatar.js";import"../../vendor/scb-chevron.js";(function(){try{var v=typeof globalThis<"u"?globalThis:window;if(!v.__scb_ce_guard_installed__){v.__scb_ce_guard_installed__=!0;var c=customElements.define.bind(customElements);customElements.define=function(i,t,b){try{customElements.get(i)||c(i,t,b)}catch(s){var e=String(s||"");if(e.indexOf("already been used")===-1&&e.indexOf("NotSupportedError")===-1)throw s}}}}catch{}})();var d,g,r=(d=class extends p{constructor(...c){super(...c),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=g._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=i=>{i.preventDefault();const t=!this.open;this.closest("scb-accordion")?.onItemToggled?.(this,t),this.setOpen(t)},this._onToggle=i=>{const t=i.currentTarget;t.open||(t.open=!0),this._applyInertByOpen()}}static _uid(){return globalThis.crypto?.randomUUID?.()??`${g._uidPrefix}-${++g._uidSeq}`}static get observedAttributes(){const c=super.observedAttributes||[];return c.includes("title")?c:[...c,"title"]}attributeChangedCallback(c,i,t){if(c==="title"&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(c,i,t),c==="title"&&t!==null&&(this._ignoreNextNativeTitleAttrChange=!0,this.removeAttribute("title"))}firstUpdated(){this._applyInertByOpen()}_applyInertByOpen(){const c=this.renderRoot.querySelector(".scb-accordion-bottom");c&&(this.open?(c.removeAttribute("inert"),c.setAttribute("aria-hidden","false")):(c.setAttribute("inert",""),c.setAttribute("aria-hidden","true")))}_onKeyDown(c){const i=this.closest("scb-accordion"),t=Array.from(i?.querySelectorAll("scb-accordion-item")||[]).map(s=>s.renderRoot.querySelector("details")?.querySelector(".scb-accordion-top")||null).filter(s=>!!s),b=c.currentTarget,e=t.indexOf(b);switch(c.key){case"ArrowDown":c.preventDefault(),e<t.length-1&&t[e+1].focus();break;case"ArrowUp":c.preventDefault(),e>0&&t[e-1].focus();break;case"Home":c.preventDefault(),t.length&&t[0].focus();break;case"End":c.preventDefault(),t.length&&t[t.length-1].focus();break}}setOpen(c){this.open=!!c;const i=this.renderRoot.querySelector("details");i&&!i.open&&(i.open=!0),this._applyInertByOpen()}updated(c){if(c.has("open")){const i=this.renderRoot.querySelector("details");i&&!i.open&&(i.open=!0),this._applyInertByOpen(),this.dispatchEvent(new CustomEvent("open-changed",{detail:{open:this.open,title:this.title},bubbles:!0,composed:!0}))}}render(){const c=`bottom-${this._unique}`,i=`header-${this._unique}`,t=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?a`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?a`
2
2
  <scb-avatar
3
3
  label=${this.avatarLabel}
4
4
  alt=${this.avatarAlt}
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../shared/lazy-focus-ring.js","../../vendor/preload-helper.js","../shared/lazy-ripple.js"])))=>i.map(i=>d[i]);
2
- import{g as l,h as w,m as A,p as s,v as c,y as C}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as R}from"../../vendor/preload-helper.js";import{t as N}from"../../vendor/component-defaults.js";import{t as n}from"../../vendor/decorate.js";import{n as T,t as x}from"../../vendor/assertClassBrand.js";(function(){try{var p=typeof globalThis<"u"?globalThis:window;if(!p.__scb_ce_guard_installed__){p.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,o){try{customElements.get(t)||e(t,i,o)}catch(b){var r=String(b||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw b}}}}catch{}})();var h,g,f;function P(){return g??(g=R(()=>import("../shared/lazy-focus-ring.js"),__vite__mapDeps([0,1]),import.meta.url)),g}function k(){return f??(f=R(()=>import("../shared/lazy-ripple.js"),__vite__mapDeps([2,1]),import.meta.url)),f}var a=(h=new WeakSet,class extends w{constructor(...e){super(...e),T(this,h),this.variant="filled",this.size=N["scb-button"].size,this.type="button",this.name="",this.value="",this.formId=null,this.formAction="",this.formEnctype="",this.formMethod="",this.formNoValidate=!1,this.formTarget="",this.label="Button",this.trailingIcon=!1,this.icon="",this.iconFilled=!1,this.disabled=!1,this.fullWidth=!1,this.href="",this.target="",this.rel="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasDefaultSlotContent=!1,this.__nativeFocusRingReady=!1,this.__nativeRippleReady=!1,this.__nativeRipplePendingClick=!1,this.__ensureNativeFocusRing=()=>{this.__nativeFocusRingReady||P().then(({ensureFocusRingReady:t})=>(t(),customElements.whenDefined("md-focus-ring"))).then(()=>{this.__nativeFocusRingReady=!0,this.toggleAttribute("data-native-focus-ring-ready",!0),this.requestUpdate(),this.updateComplete.then(()=>this.__syncNativeFocusRingControl())})},this.__onNativeFocusIn=t=>{const i=t.composedPath()[0];i instanceof HTMLElement&&i.matches(":focus-visible")&&this.__ensureNativeFocusRing()},this.__ensureNativeRipple=t=>{this.__nativeRippleReady||this.disabled||(t&&(this.__nativeRipplePendingPointerEvent=t),k().then(({ensureRippleReady:i})=>i()).then(()=>{this.disabled||(this.__nativeRippleReady=!0,this.requestUpdate(),this.updateComplete.then(()=>{this.__syncNativeFocusRingControl(),this.__replayNativeRippleState()}))}))},this.__onNativePointerWarmup=t=>{this.__ensureNativeRipple(t)},this.__onNativeClick=t=>{if(this.disabled){t.preventDefault(),t.stopPropagation();return}(!this.__nativeRippleReady||this.__nativeRipplePendingPointerEvent)&&(this.__nativeRipplePendingClick=!0,this.__ensureNativeRipple()),!this.href&&queueMicrotask(()=>{if(t.defaultPrevented||this.disabled||this.href)return;const i=this.__getAssociatedForm();if(!i)return;const o=this.__normalizedButtonType();o==="submit"&&this.__requestFormSubmit(i),o==="reset"&&i.reset()})}}__getNativeControl(){return this.renderRoot.querySelector(".native-button")}__handleDefaultSlotChange(e){const t=e.target.assignedNodes({flatten:!0}).some(i=>i.nodeType===Node.TEXT_NODE?!!i.textContent?.trim():i.nodeType===Node.ELEMENT_NODE);this.__hasDefaultSlotContent!==t&&(this.__hasDefaultSlotContent=t,this.requestUpdate()),this.updateComplete.then(()=>this.__syncAriaToInner())}__syncAriaToInner(){const e=this.__getNativeControl();e&&this.__syncAriaToControl(e)}__syncAriaToControl(e){const t=(this.getAttribute("aria-label")||"").trim(),i=this.label.trim()===""&&!this.__hasDefaultSlotContent?(this.icon||"").trim():"",o=t||i;o?e.setAttribute("aria-label",o):e.removeAttribute("aria-label");const r=this.getAttribute("aria-controls");r!==null?e.setAttribute("aria-controls",r):e.removeAttribute("aria-controls");const b=this.getAttribute("aria-haspopup");b!==null?e.setAttribute("aria-haspopup",b):e.removeAttribute("aria-haspopup");const y=this.getAttribute("aria-expanded");y!==null?e.setAttribute("aria-expanded",y):e.removeAttribute("aria-expanded"),this.__ariaObserver?.disconnect(),this.__ariaObserver=new MutationObserver(S=>{const d=this.__getNativeControl();if(d)for(const m of S){if(m.type!=="attributes"||!m.attributeName)continue;const u=m.attributeName,v=this.getAttribute(u);if(u==="aria-label"){const _=(v||(this.label.trim()===""&&!this.__hasDefaultSlotContent?(this.icon||"").trim():"")).trim();_?d.setAttribute("aria-label",_):d.removeAttribute("aria-label")}else(u==="aria-controls"||u==="aria-expanded"||u==="aria-haspopup")&&(v===null?d.removeAttribute(u):d.setAttribute(u,v))}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-label","aria-controls","aria-expanded","aria-haspopup"]})}connectedCallback(){super.connectedCallback()}focus(e){const t=this.__getNativeControl();if(t){t.focus(e);return}this.updateComplete.then(()=>this.__getNativeControl()?.focus(e))}blur(){this.__getNativeControl()?.blur()}firstUpdated(){x(h,this,z).call(this)}updated(e){(e.has("variant")||e.has("label")||e.has("icon")||e.has("href"))&&this.updateComplete.then(()=>this.__syncAriaToInner()),(this.__nativeFocusRingReady||this.__nativeRippleReady)&&this.updateComplete.then(()=>this.__syncNativeFocusRingControl()),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&x(h,this,z).call(this)}disconnectedCallback(){this.__ariaObserver?.disconnect(),super.disconnectedCallback()}__normalizedButtonType(){return this.type==="submit"||this.type==="reset"?this.type:"button"}__getAssociatedForm(){if(this.formId!==null||this.hasAttribute("form")){const e=(this.formId??this.getAttribute("form")??"").trim();if(!e)return null;const t=this.getRootNode(),i=t instanceof Document||t instanceof ShadowRoot?t.getElementById(e):null;return i instanceof HTMLFormElement?i:null}return this.closest("form")}get form(){return this.__getAssociatedForm()}__requestFormSubmit(e){const t=this.ownerDocument.createElement("button");t.type="submit",t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),t.setAttribute("data-scb-button-submitter","");const i=[["name",this.name,this.hasAttribute("name")],["value",this.value,this.hasAttribute("value")],["formaction",this.formAction,this.hasAttribute("formaction")],["formenctype",this.formEnctype,this.hasAttribute("formenctype")],["formmethod",this.formMethod,this.hasAttribute("formmethod")],["formtarget",this.formTarget,this.hasAttribute("formtarget")]];for(const[o,r,b]of i)(b||r!=="")&&t.setAttribute(o,r);this.formNoValidate&&t.setAttribute("formnovalidate",""),e.append(t);try{e.requestSubmit(t)}finally{t.remove()}}__syncNativeFocusRingControl(){const e=this.renderRoot.querySelector("md-focus-ring"),t=this.__getNativeControl();e&&t&&(e.control=t,e.visible=t.matches(":focus-visible"));const i=this.renderRoot.querySelector("md-ripple");i&&t&&(i.control=t)}async __replayNativeRippleState(){const e=this.renderRoot.querySelector("md-ripple"),t=this.__getNativeControl(),i=this.__nativeRipplePendingPointerEvent,o=this.__nativeRipplePendingClick;this.__nativeRipplePendingPointerEvent=void 0,this.__nativeRipplePendingClick=!1;const{syncRippleToControl:r}=await k();await r(e,t,i,o)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}static get styles(){return C`:host{display:inline-flex;block-size:var(--scb-button-block-size, auto);margin-block-start:var(--scb-button-spacing-block-start, 0);margin-block-end:var(--scb-button-spacing-block-end, 0);margin-inline-start:var(--scb-button-spacing-inline-start, 0);margin-inline-end:var(--scb-button-spacing-inline-end, 0);--scb-button-font-variation-settings:'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;--scb-button-container-height:var(--scb-buttons-control-size-medium, var(--scb-control-size-medium, var(--scale-10, 40px)));--scb-button-padding-block:var(--scb-buttons-padding-block-medium, var(--spacing-3, 8px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-medium, var(--spacing-5, 16px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-medium, var(--spacing-5, 16px));--scb-button-icon-gap:var(--scb-buttons-gap-medium, var(--spacing-3, 8px));--scb-button-icon-size:var(--scb-buttons-icon-size-medium, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-medium, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-medium-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-medium-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-medium-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-medium-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-medium-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='extra-small']){--scb-button-container-height:var(--scb-buttons-control-size-extra-small, var(--scb-control-size-extra-small, var(--scale-08, 32px)));--scb-button-padding-block:var(--scb-buttons-padding-block-extra-small, var(--spacing-2, 4px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-extra-small, var(--spacing-4, 12px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-extra-small, var(--spacing-4, 12px));--scb-button-icon-gap:var(--scb-buttons-gap-extra-small, var(--spacing-2, 4px));--scb-button-icon-size:var(--scb-buttons-icon-size-extra-small, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-extra-small, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-extra-small-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-extra-small-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-extra-small-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-extra-small-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-extra-small-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='small']){--scb-button-container-height:var(--scb-buttons-control-size-small, var(--scb-control-size-small, var(--scale-08, 32px)));--scb-button-padding-block:var(--scb-buttons-padding-block-small, var(--spacing-2, 4px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px));--scb-button-icon-gap:var(--scb-buttons-gap-small, var(--spacing-2, 4px));--scb-button-icon-size:var(--scb-buttons-icon-size-small, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-small, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-small-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-small-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-small-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-small-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-small-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='large']){--scb-button-container-height:var(--scb-buttons-control-size-large, var(--scb-control-size-large, var(--scale-12, 56px)));--scb-button-padding-block:var(--scb-buttons-padding-block-large, var(--spacing-5, 16px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-large, var(--spacing-7, 20px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-large, var(--spacing-7, 20px));--scb-button-icon-gap:var(--scb-buttons-gap-large, var(--spacing-3, 8px));--scb-button-icon-size:var(--scb-buttons-icon-size-large, var(--icon-size-medium, 24px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-large, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-large-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-large-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-large-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-large-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-large-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([icon-filled]){--scb-button-font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.native-button,.native-button-wrap{position:relative;display:inline-flex}.native-button-wrap{border-radius:var(--scb-button-shape-radius, var(--md-sys-shape-corner-full, 999px))}.native-button{z-index:0;box-sizing:border-box;align-items:center;justify-content:center;gap:var(--scb-button-icon-gap);min-block-size:var(--scb-button-block-size, var(--scb-button-container-height));block-size:var(--scb-button-block-size, var(--scb-button-container-height));min-inline-size:64px;inline-size:auto;padding-block:var(--scb-button-padding-block);padding-inline:var(--scb-button-padding-inline);overflow:hidden;border:0;border-radius:inherit;background:0 0;color:var(--md-sys-color-primary);font-family:var(--scb-button-label-text-font);font-size:var(--scb-button-label-text-size);font-weight:var(--scb-button-label-text-weight);line-height:var(--scb-button-label-text-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));letter-spacing:var(--scb-button-label-text-tracking, normal);text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation}::slotted(*){display:inline!important;margin:0!important;color:inherit!important;font:inherit!important;letter-spacing:inherit!important;line-height:inherit!important}.native-button::before{content:"";position:absolute;inset:0;z-index:-1;background:currentColor;opacity:0;pointer-events:none;transition:opacity var(--motion-duration-short, 150ms) var(--motion-easing-standard, ease)}.native-button:hover::before{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}.native-button:active::before{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}.native-button:focus{outline:0}:host(:not([data-native-focus-ring-ready])) .native-button:focus-visible{outline:var(--stroke-border-m, 2px) solid var(--md-sys-color-primary);outline-offset:var(--spacing-1, 2px)}.native-button:disabled,.native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content));cursor:default;opacity:1;pointer-events:none}:host(:not([variant])) .native-button,:host([variant='filled']) .native-button{border-color:transparent;background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}:host([variant='outlined']) .native-button{background:0 0;color:var(--md-sys-color-primary);box-shadow:inset 0 0 0 var(--stroke-border, 1px) var(--md-sys-color-outline)}:host([variant='outlined']) .native-button:disabled,:host([variant='outlined']) .native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content));box-shadow:inset 0 0 0 var(--stroke-border, 1px) var(--scb-color-compat-disabled-container)}:host([variant='filled-tonal']) .native-button{border-color:transparent;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}:host(:not([variant])) .native-button:disabled,:host(:not([variant])) .native-button[aria-disabled=true],:host([variant='filled']) .native-button:disabled,:host([variant='filled']) .native-button[aria-disabled=true],:host([variant='filled-tonal']) .native-button:disabled,:host([variant='filled-tonal']) .native-button[aria-disabled=true]{background:var(--scb-button-disabled-container-color, var(--scb-color-compat-disabled-container));color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content))}:host([variant='text']) .native-button{min-inline-size:0;background:0 0;color:var(--md-sys-color-primary)}:host([variant='text']) .native-button:disabled,:host([variant='text']) .native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content))}.native-icon{flex:0 0 auto;display:inline-block;inline-size:var(--scb-button-icon-size);block-size:var(--scb-button-icon-size);overflow:hidden;font-family:"Material Symbols Outlined";font-size:var(--scb-button-icon-size);line-height:1;text-align:center;white-space:nowrap;text-transform:none;word-wrap:normal;direction:ltr;font-feature-settings:"liga"1;font-variation-settings:var(--scb-button-font-variation-settings);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.native-icon.scb-svg-icon{fill:currentColor;font:inherit}.native-button-wrap md-ripple{position:absolute;inset:0;border-radius:inherit;pointer-events:none}.native-button-wrap md-focus-ring{pointer-events:none}:host([full-width]){display:flex;inline-size:100%}:host([full-width]) .native-button,:host([full-width]) .native-button-wrap{inline-size:100%;flex:1 1 auto}`}render(){const e=!!this.icon?.trim(),t=e?c`<span class="native-icon" part="icon" aria-hidden="true">${this.icon}</span>`:l,i=this.label.trim()===""&&!this.__hasDefaultSlotContent?this.icon:void 0,o=c`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/lazy-focus-ring.js","../../vendor/rolldown-runtime.js","../../vendor/preload-helper.js","../../vendor/lazy-ripple.js"])))=>i.map(i=>d[i]);
2
+ import{g as l,h as w,m as A,p as s,v as c,y as C}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as R}from"../../vendor/preload-helper.js";import{t as N}from"../../vendor/component-defaults.js";import{t as n}from"../../vendor/decorate.js";import{n as T,t as x}from"../../vendor/assertClassBrand.js";(function(){try{var b=typeof globalThis<"u"?globalThis:window;if(!b.__scb_ce_guard_installed__){b.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,o){try{customElements.get(t)||e(t,i,o)}catch(u){var r=String(u||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw u}}}}catch{}})();var h,g,f;function P(){return g??(g=R(()=>import("../../vendor/lazy-focus-ring.js").then(b=>b.i),__vite__mapDeps([0,1,2]),import.meta.url)),g}function k(){return f??(f=R(()=>import("../../vendor/lazy-ripple.js"),__vite__mapDeps([3,2]),import.meta.url)),f}var a=(h=new WeakSet,class extends w{constructor(...e){super(...e),T(this,h),this.variant="filled",this.size=N["scb-button"].size,this.type="button",this.name="",this.value="",this.formId=null,this.formAction="",this.formEnctype="",this.formMethod="",this.formNoValidate=!1,this.formTarget="",this.label="Button",this.trailingIcon=!1,this.icon="",this.iconFilled=!1,this.disabled=!1,this.fullWidth=!1,this.href="",this.target="",this.rel="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasDefaultSlotContent=!1,this.__nativeFocusRingReady=!1,this.__nativeRippleReady=!1,this.__nativeRipplePendingClick=!1,this.__ensureNativeFocusRing=()=>{this.__nativeFocusRingReady||P().then(({ensureFocusRingReady:t})=>(t(),customElements.whenDefined("md-focus-ring"))).then(()=>{this.__nativeFocusRingReady=!0,this.toggleAttribute("data-native-focus-ring-ready",!0),this.requestUpdate(),this.updateComplete.then(()=>this.__syncNativeFocusRingControl())})},this.__onNativeFocusIn=t=>{const i=t.composedPath()[0];i instanceof HTMLElement&&i.matches(":focus-visible")&&this.__ensureNativeFocusRing()},this.__ensureNativeRipple=t=>{this.__nativeRippleReady||this.disabled||(t&&(this.__nativeRipplePendingPointerEvent=t),k().then(({ensureRippleReady:i})=>i()).then(()=>{this.disabled||(this.__nativeRippleReady=!0,this.requestUpdate(),this.updateComplete.then(()=>{this.__syncNativeFocusRingControl(),this.__replayNativeRippleState()}))}))},this.__onNativePointerWarmup=t=>{this.__ensureNativeRipple(t)},this.__onNativeClick=t=>{if(this.disabled){t.preventDefault(),t.stopPropagation();return}(!this.__nativeRippleReady||this.__nativeRipplePendingPointerEvent)&&(this.__nativeRipplePendingClick=!0,this.__ensureNativeRipple()),!this.href&&queueMicrotask(()=>{if(t.defaultPrevented||this.disabled||this.href)return;const i=this.__getAssociatedForm();if(!i)return;const o=this.__normalizedButtonType();o==="submit"&&this.__requestFormSubmit(i),o==="reset"&&i.reset()})}}__getNativeControl(){return this.renderRoot.querySelector(".native-button")}__handleDefaultSlotChange(e){const t=e.target.assignedNodes({flatten:!0}).some(i=>i.nodeType===Node.TEXT_NODE?!!i.textContent?.trim():i.nodeType===Node.ELEMENT_NODE);this.__hasDefaultSlotContent!==t&&(this.__hasDefaultSlotContent=t,this.requestUpdate()),this.updateComplete.then(()=>this.__syncAriaToInner())}__syncAriaToInner(){const e=this.__getNativeControl();e&&this.__syncAriaToControl(e)}__syncAriaToControl(e){const t=(this.getAttribute("aria-label")||"").trim(),i=this.label.trim()===""&&!this.__hasDefaultSlotContent?(this.icon||"").trim():"",o=t||i;o?e.setAttribute("aria-label",o):e.removeAttribute("aria-label");const r=this.getAttribute("aria-controls");r!==null?e.setAttribute("aria-controls",r):e.removeAttribute("aria-controls");const u=this.getAttribute("aria-haspopup");u!==null?e.setAttribute("aria-haspopup",u):e.removeAttribute("aria-haspopup");const y=this.getAttribute("aria-expanded");y!==null?e.setAttribute("aria-expanded",y):e.removeAttribute("aria-expanded"),this.__ariaObserver?.disconnect(),this.__ariaObserver=new MutationObserver(S=>{const d=this.__getNativeControl();if(d)for(const m of S){if(m.type!=="attributes"||!m.attributeName)continue;const p=m.attributeName,v=this.getAttribute(p);if(p==="aria-label"){const _=(v||(this.label.trim()===""&&!this.__hasDefaultSlotContent?(this.icon||"").trim():"")).trim();_?d.setAttribute("aria-label",_):d.removeAttribute("aria-label")}else(p==="aria-controls"||p==="aria-expanded"||p==="aria-haspopup")&&(v===null?d.removeAttribute(p):d.setAttribute(p,v))}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-label","aria-controls","aria-expanded","aria-haspopup"]})}connectedCallback(){super.connectedCallback()}focus(e){const t=this.__getNativeControl();if(t){t.focus(e);return}this.updateComplete.then(()=>this.__getNativeControl()?.focus(e))}blur(){this.__getNativeControl()?.blur()}firstUpdated(){x(h,this,z).call(this)}updated(e){(e.has("variant")||e.has("label")||e.has("icon")||e.has("href"))&&this.updateComplete.then(()=>this.__syncAriaToInner()),(this.__nativeFocusRingReady||this.__nativeRippleReady)&&this.updateComplete.then(()=>this.__syncNativeFocusRingControl()),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&x(h,this,z).call(this)}disconnectedCallback(){this.__ariaObserver?.disconnect(),super.disconnectedCallback()}__normalizedButtonType(){return this.type==="submit"||this.type==="reset"?this.type:"button"}__getAssociatedForm(){if(this.formId!==null||this.hasAttribute("form")){const e=(this.formId??this.getAttribute("form")??"").trim();if(!e)return null;const t=this.getRootNode(),i=t instanceof Document||t instanceof ShadowRoot?t.getElementById(e):null;return i instanceof HTMLFormElement?i:null}return this.closest("form")}get form(){return this.__getAssociatedForm()}__requestFormSubmit(e){const t=this.ownerDocument.createElement("button");t.type="submit",t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),t.setAttribute("data-scb-button-submitter","");const i=[["name",this.name,this.hasAttribute("name")],["value",this.value,this.hasAttribute("value")],["formaction",this.formAction,this.hasAttribute("formaction")],["formenctype",this.formEnctype,this.hasAttribute("formenctype")],["formmethod",this.formMethod,this.hasAttribute("formmethod")],["formtarget",this.formTarget,this.hasAttribute("formtarget")]];for(const[o,r,u]of i)(u||r!=="")&&t.setAttribute(o,r);this.formNoValidate&&t.setAttribute("formnovalidate",""),e.append(t);try{e.requestSubmit(t)}finally{t.remove()}}__syncNativeFocusRingControl(){const e=this.renderRoot.querySelector("md-focus-ring"),t=this.__getNativeControl();e&&t&&(e.control=t,e.visible=t.matches(":focus-visible"));const i=this.renderRoot.querySelector("md-ripple");i&&t&&(i.control=t)}async __replayNativeRippleState(){const e=this.renderRoot.querySelector("md-ripple"),t=this.__getNativeControl(),i=this.__nativeRipplePendingPointerEvent,o=this.__nativeRipplePendingClick;this.__nativeRipplePendingPointerEvent=void 0,this.__nativeRipplePendingClick=!1;const{syncRippleToControl:r}=await k();await r(e,t,i,o)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}static get styles(){return C`:host{display:inline-flex;block-size:var(--scb-button-block-size, auto);margin-block-start:var(--scb-button-spacing-block-start, 0);margin-block-end:var(--scb-button-spacing-block-end, 0);margin-inline-start:var(--scb-button-spacing-inline-start, 0);margin-inline-end:var(--scb-button-spacing-inline-end, 0);--scb-button-font-variation-settings:'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;--scb-button-container-height:var(--scb-buttons-control-size-medium, var(--scb-control-size-medium, var(--scale-10, 40px)));--scb-button-padding-block:var(--scb-buttons-padding-block-medium, var(--spacing-3, 8px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-medium, var(--spacing-5, 16px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-medium, var(--spacing-5, 16px));--scb-button-icon-gap:var(--scb-buttons-gap-medium, var(--spacing-3, 8px));--scb-button-icon-size:var(--scb-buttons-icon-size-medium, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-medium, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-medium-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-medium-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-medium-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-medium-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-medium-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='extra-small']){--scb-button-container-height:var(--scb-buttons-control-size-extra-small, var(--scb-control-size-extra-small, var(--scale-08, 32px)));--scb-button-padding-block:var(--scb-buttons-padding-block-extra-small, var(--spacing-2, 4px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-extra-small, var(--spacing-4, 12px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-extra-small, var(--spacing-4, 12px));--scb-button-icon-gap:var(--scb-buttons-gap-extra-small, var(--spacing-2, 4px));--scb-button-icon-size:var(--scb-buttons-icon-size-extra-small, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-extra-small, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-extra-small-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-extra-small-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-extra-small-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-extra-small-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-extra-small-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='small']){--scb-button-container-height:var(--scb-buttons-control-size-small, var(--scb-control-size-small, var(--scale-08, 32px)));--scb-button-padding-block:var(--scb-buttons-padding-block-small, var(--spacing-2, 4px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px));--scb-button-icon-gap:var(--scb-buttons-gap-small, var(--spacing-2, 4px));--scb-button-icon-size:var(--scb-buttons-icon-size-small, var(--icon-size-small, 20px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-small, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-small-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-small-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-small-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-small-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-small-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([size='large']){--scb-button-container-height:var(--scb-buttons-control-size-large, var(--scb-control-size-large, var(--scale-12, 56px)));--scb-button-padding-block:var(--scb-buttons-padding-block-large, var(--spacing-5, 16px));--scb-button-padding-inline:var(--scb-buttons-padding-inline-large, var(--spacing-7, 20px));--scb-button-icon-edge-space:var(--scb-buttons-padding-inline-large, var(--spacing-7, 20px));--scb-button-icon-gap:var(--scb-buttons-gap-large, var(--spacing-3, 8px));--scb-button-icon-size:var(--scb-buttons-icon-size-large, var(--icon-size-medium, 24px));--scb-button-shape-radius:var(--scb-buttons-shape-radius-large, var(--radius-full, 999px));--scb-button-label-text-font:var(--scb-buttons-text-large-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-button-label-text-size:var(--scb-buttons-text-large-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-button-label-text-weight:var(--scb-buttons-text-large-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight)));--scb-button-label-text-line-height:var(--scb-buttons-text-large-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-button-label-text-tracking:var(--scb-buttons-text-large-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([icon-filled]){--scb-button-font-variation-settings:'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24}.native-button,.native-button-wrap{position:relative;display:inline-flex}.native-button-wrap{border-radius:var(--scb-button-shape-radius, var(--md-sys-shape-corner-full, 999px))}.native-button{z-index:0;box-sizing:border-box;align-items:center;justify-content:center;gap:var(--scb-button-icon-gap);min-block-size:var(--scb-button-block-size, var(--scb-button-container-height));block-size:var(--scb-button-block-size, var(--scb-button-container-height));min-inline-size:64px;inline-size:auto;padding-block:var(--scb-button-padding-block);padding-inline:var(--scb-button-padding-inline);overflow:hidden;border:0;border-radius:inherit;background:0 0;color:var(--md-sys-color-primary);font-family:var(--scb-button-label-text-font);font-size:var(--scb-button-label-text-size);font-weight:var(--scb-button-label-text-weight);line-height:var(--scb-button-label-text-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));letter-spacing:var(--scb-button-label-text-tracking, normal);text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;appearance:none;-webkit-appearance:none;touch-action:manipulation}::slotted(*){display:inline!important;margin:0!important;color:inherit!important;font:inherit!important;letter-spacing:inherit!important;line-height:inherit!important}.native-button::before{content:"";position:absolute;inset:0;z-index:-1;background:currentColor;opacity:0;pointer-events:none;transition:opacity var(--motion-duration-short, 150ms) var(--motion-easing-standard, ease)}.native-button:hover::before{opacity:var(--md-sys-state-hover-state-layer-opacity, 0.08)}.native-button:active::before{opacity:var(--md-sys-state-pressed-state-layer-opacity, 0.12)}.native-button:focus{outline:0}:host(:not([data-native-focus-ring-ready])) .native-button:focus-visible{outline:var(--stroke-border-m, 2px) solid var(--md-sys-color-primary);outline-offset:var(--spacing-1, 2px)}.native-button:disabled,.native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content));cursor:default;opacity:1;pointer-events:none}:host(:not([variant])) .native-button,:host([variant='filled']) .native-button{border-color:transparent;background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}:host([variant='outlined']) .native-button{background:0 0;color:var(--md-sys-color-primary);box-shadow:inset 0 0 0 var(--stroke-border, 1px) var(--md-sys-color-outline)}:host([variant='outlined']) .native-button:disabled,:host([variant='outlined']) .native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content));box-shadow:inset 0 0 0 var(--stroke-border, 1px) var(--scb-color-compat-disabled-container)}:host([variant='filled-tonal']) .native-button{border-color:transparent;background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}:host(:not([variant])) .native-button:disabled,:host(:not([variant])) .native-button[aria-disabled=true],:host([variant='filled']) .native-button:disabled,:host([variant='filled']) .native-button[aria-disabled=true],:host([variant='filled-tonal']) .native-button:disabled,:host([variant='filled-tonal']) .native-button[aria-disabled=true]{background:var(--scb-button-disabled-container-color, var(--scb-color-compat-disabled-container));color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content))}:host([variant='text']) .native-button{min-inline-size:0;background:0 0;color:var(--md-sys-color-primary)}:host([variant='text']) .native-button:disabled,:host([variant='text']) .native-button[aria-disabled=true]{color:var(--scb-button-disabled-content-color, var(--scb-color-compat-disabled-content))}.native-icon{flex:0 0 auto;display:inline-block;inline-size:var(--scb-button-icon-size);block-size:var(--scb-button-icon-size);overflow:hidden;font-family:"Material Symbols Outlined";font-size:var(--scb-button-icon-size);line-height:1;text-align:center;white-space:nowrap;text-transform:none;word-wrap:normal;direction:ltr;font-feature-settings:"liga"1;font-variation-settings:var(--scb-button-font-variation-settings);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.native-icon.scb-svg-icon{fill:currentColor;font:inherit}.native-button-wrap md-ripple{position:absolute;inset:0;border-radius:inherit;pointer-events:none}.native-button-wrap md-focus-ring{pointer-events:none}:host([full-width]){display:flex;inline-size:100%}:host([full-width]) .native-button,:host([full-width]) .native-button-wrap{inline-size:100%;flex:1 1 auto}`}render(){const e=!!this.icon?.trim(),t=e?c`<span class="native-icon" part="icon" aria-hidden="true">${this.icon}</span>`:l,i=this.label.trim()===""&&!this.__hasDefaultSlotContent?this.icon:void 0,o=c`
3
3
  <slot
4
4
  @slotchange=${this.__handleDefaultSlotChange}
5
5
  style=${this.__hasDefaultSlotContent?l:"display: none"}
@@ -46,4 +46,4 @@ import{g as l,h as w,m as A,p as s,v as c,y as C}from"../../vendor/vendor.js";im
46
46
  ${this.__nativeRippleReady?c`<md-ripple aria-hidden="true"></md-ripple>`:l}
47
47
  ${this.__nativeFocusRingReady?c`<md-focus-ring aria-hidden="true"></md-focus-ring>`:l}
48
48
  </span>
49
- `}});function z(){const p=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??p,t=this.mapSpacingToken(this.spacingBottom)??p,i=this.mapSpacingToken(this.spacingLeft),o=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-button-spacing-block-start",e):this.style.removeProperty("--scb-button-spacing-block-start"),t?this.style.setProperty("--scb-button-spacing-block-end",t):this.style.removeProperty("--scb-button-spacing-block-end"),i?this.style.setProperty("--scb-button-spacing-inline-start",i):this.style.removeProperty("--scb-button-spacing-inline-start"),o?this.style.setProperty("--scb-button-spacing-inline-end",o):this.style.removeProperty("--scb-button-spacing-inline-end")}n([s({type:String,reflect:!0})],a.prototype,"variant",void 0);n([s({type:String,reflect:!0})],a.prototype,"size",void 0);n([s({type:String,reflect:!0})],a.prototype,"type",void 0);n([s({type:String})],a.prototype,"name",void 0);n([s({type:String})],a.prototype,"value",void 0);n([s({type:String,attribute:"form"})],a.prototype,"formId",void 0);n([s({type:String,attribute:"formaction"})],a.prototype,"formAction",void 0);n([s({type:String,attribute:"formenctype"})],a.prototype,"formEnctype",void 0);n([s({type:String,attribute:"formmethod"})],a.prototype,"formMethod",void 0);n([s({type:Boolean,attribute:"formnovalidate"})],a.prototype,"formNoValidate",void 0);n([s({type:String,attribute:"formtarget"})],a.prototype,"formTarget",void 0);n([s({type:String})],a.prototype,"label",void 0);n([s({type:Boolean,attribute:"trailing-icon"})],a.prototype,"trailingIcon",void 0);n([s({type:String})],a.prototype,"icon",void 0);n([s({type:Boolean,attribute:"icon-filled",reflect:!0})],a.prototype,"iconFilled",void 0);n([s({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0);n([s({type:Boolean,attribute:"full-width",reflect:!0})],a.prototype,"fullWidth",void 0);n([s({type:String})],a.prototype,"href",void 0);n([s({type:String})],a.prototype,"target",void 0);n([s({type:String})],a.prototype,"rel",void 0);n([s({type:String,reflect:!0})],a.prototype,"spacing",void 0);n([s({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);n([s({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);n([s({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);a=n([A("scb-button")],a);export{a as ScbButton};
49
+ `}});function z(){const b=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??b,t=this.mapSpacingToken(this.spacingBottom)??b,i=this.mapSpacingToken(this.spacingLeft),o=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-button-spacing-block-start",e):this.style.removeProperty("--scb-button-spacing-block-start"),t?this.style.setProperty("--scb-button-spacing-block-end",t):this.style.removeProperty("--scb-button-spacing-block-end"),i?this.style.setProperty("--scb-button-spacing-inline-start",i):this.style.removeProperty("--scb-button-spacing-inline-start"),o?this.style.setProperty("--scb-button-spacing-inline-end",o):this.style.removeProperty("--scb-button-spacing-inline-end")}n([s({type:String,reflect:!0})],a.prototype,"variant",void 0);n([s({type:String,reflect:!0})],a.prototype,"size",void 0);n([s({type:String,reflect:!0})],a.prototype,"type",void 0);n([s({type:String})],a.prototype,"name",void 0);n([s({type:String})],a.prototype,"value",void 0);n([s({type:String,attribute:"form"})],a.prototype,"formId",void 0);n([s({type:String,attribute:"formaction"})],a.prototype,"formAction",void 0);n([s({type:String,attribute:"formenctype"})],a.prototype,"formEnctype",void 0);n([s({type:String,attribute:"formmethod"})],a.prototype,"formMethod",void 0);n([s({type:Boolean,attribute:"formnovalidate"})],a.prototype,"formNoValidate",void 0);n([s({type:String,attribute:"formtarget"})],a.prototype,"formTarget",void 0);n([s({type:String})],a.prototype,"label",void 0);n([s({type:Boolean,attribute:"trailing-icon"})],a.prototype,"trailingIcon",void 0);n([s({type:String})],a.prototype,"icon",void 0);n([s({type:Boolean,attribute:"icon-filled",reflect:!0})],a.prototype,"iconFilled",void 0);n([s({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0);n([s({type:Boolean,attribute:"full-width",reflect:!0})],a.prototype,"fullWidth",void 0);n([s({type:String})],a.prototype,"href",void 0);n([s({type:String})],a.prototype,"target",void 0);n([s({type:String})],a.prototype,"rel",void 0);n([s({type:String,reflect:!0})],a.prototype,"spacing",void 0);n([s({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);n([s({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);n([s({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);a=n([A("scb-button")],a);export{a as ScbButton};
@@ -1,4 +1,4 @@
1
- import{g as z,h as Q,m as X,p as _,v as k,y as Z}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{addLazyFocusRingListeners as V}from"../shared/lazy-focus-ring.js";import{t as f}from"../../vendor/decorate.js";import{n as tt,t as I}from"../../vendor/assertClassBrand.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-calendar-event.js";import"../scb-dialog/scb-dialog.js";import"../scb-list/scb-list.js";(function(){try{var $=typeof globalThis<"u"?globalThis:window;if(!$.__scb_ce_guard_installed__){$.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,a,s){try{customElements.get(e)||t(e,a,s)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var L,O,H={fromAttribute($){if($===null)return!1;const t=$.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},m=(L=new WeakSet,O=class extends Q{constructor(...t){super(...t),tt(this,L),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{const a=Array.from(this.shadowRoot?.querySelectorAll(".calendar-day[data-date]")??[]),s=this.shadowRoot?.activeElement,n=s&&a.includes(s)?s:document.activeElement,r=a.indexOf(n);if(r===-1)return;let l;switch(e.key){case"ArrowRight":l=a[r+1];break;case"ArrowLeft":l=a[r-1];break;case"ArrowDown":l=this.__dayOffsetFrom(n,7);break;case"ArrowUp":l=this.__dayOffsetFrom(n,-7);break;case"Home":l=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[])[0];break;case"End":{const o=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=o[o.length-1];break}case"PageUp":e.preventDefault(),this.__focusAdjacentMonth(n,-1);return;case"PageDown":e.preventDefault(),this.__focusAdjacentMonth(n,1);return;default:return}l&&l!==n&&(e.preventDefault(),this.__focusCalendarDay(l))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate="",this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(t){const e=(t??"")+"";e!==this.selectedDate&&(this.selectedDate=e)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(t,e,a){super.attributeChangedCallback(t,e,a),t==="value"&&(this.value=a??"")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=V(this,this.renderRoot),I(L,this,W).call(this);const t=Number(this.displayYear),e=Number(this.displayMonth);!Number.isNaN(t)&&!Number.isNaN(e)&&e>=1&&e<=12&&(this._current=new Date(t,e-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}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}updated(t){if(super.updated?.(t),t.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&I(L,this,W).call(this),!this._syncingDisplay&&(t.has("displayYear")||t.has("displayMonth"))){const e=Number(this.displayYear),a=Number(this.displayMonth);if(!Number.isNaN(e)&&!Number.isNaN(a)&&a>=1&&a<=12){const s=this._current.getFullYear(),n=this._current.getMonth()+1;(s!==e||n!==a)&&(this._current=new Date(e,a-1,1),this._dispatchMonthChange(e,a),this.requestUpdate())}}}_ensureEventsFromJson(){const t=(this.eventsJson??"").trim();if(!t){this._eventsFromJson=null,this._eventsJsonLast=t;return}if(!(this._eventsJsonLast===t&&this._eventsFromJson!==null)){this._eventsJsonLast=t;try{const e=JSON.parse(t);Array.isArray(e)?this._eventsFromJson=e:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(t){const e=t.title??"",a=t.description??"",s=t.href??"",n=t.startDate??t["start-date"]??t.start??t.date??"",r=t.endDate??t["end-date"]??t.end??"";return{title:e+"",description:a?a+"":void 0,href:s?s+"":void 0,start:n?n+"":void 0,end:r?r+"":void 0}}_toLocalEventDate(t,e){const a=(t??"").trim();if(!a)return null;if(!a.includes("T")){const n=a.split("-").map(d=>Number(d));if(n.length!==3||n.some(d=>Number.isNaN(d)))return null;const[r,l,o]=n;return e?new Date(r,l-1,o,23,59,59,999):new Date(r,l-1,o,0,0,0,0)}const s=new Date(a);return Number.isNaN(s.getTime())?null:s}_toDateKey(t){return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}_buildEventMapFromInputs(t){const e=new Map;for(const a of t){const s=this._normalizeEventInput(a),n=s.start||"",r=s.end||"";if(!(!n||!s.title))if(n&&r){const l=this._toLocalEventDate(n,!1),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=e.get(d)||[];u.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),e.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),T=e.get(u)||[];T.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),e.set(u,T)}}else{const l=n.split("T")[0],o=e.get(l)||[];o.push({title:s.title,description:s.description,href:s.href,start:n}),e.set(l,o)}}return e}_buildEventMapFromChildren(){const t=Array.from(this.querySelectorAll("scb-calendar-event")),e=new Map;for(const a of t){const s=a,n=(s.startDate??s.date??"")+""||a.getAttribute("start-date")||a.getAttribute("date")||"",r=(s.endDate??"")+""||a.getAttribute("end-date")||"";if(n&&r){const l=this._toLocalEventDate(n,!1),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=e.get(d)||[];u.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),e.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),T=e.get(u)||[];T.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),e.set(u,T)}}else if(n&&a.title){const l=n.split("T")[0],o=e.get(l)||[];o.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),e.set(l,o)}}return e}_syncDisplayFromCurrent(t=!0){const e=this._current.getFullYear(),a=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=e,this.displayMonth=a}finally{this._syncingDisplay=!1}t&&this._dispatchMonthChange(e,a)}_dispatchMonthChange(t,e){const a={displayYear:t,displayMonth:e};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:a})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:a}))}_dispatchSelect(t){const e={selectedDate:t};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:e}))}_formatDayLabel(t){return new Intl.DateTimeFormat(this.lang==="en"?"en-GB":"sv-SE",{day:"numeric",month:"long",year:"numeric"}).format(t)}_formatDayAriaLabel(t,e,a){const s=a.map(r=>`${r.prefix||""}${r.title}`.trim()).filter(Boolean),n=[this._formatDayLabel(t)];return e&&n.push(e),s.length===1?n.push(this.lang==="en"?`1 event: ${s[0]}`:`1 händelse: ${s[0]}`):s.length>1&&n.push(this.lang==="en"?`${s.length} events: ${s.join(", ")}`:`${s.length} händelser: ${s.join(", ")}`),n.join(". ")}__dayOffsetFrom(t,e){const a=t.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`);s.setDate(s.getDate()+e);const n=this.__formatDateKey(s);return this.shadowRoot?.querySelector(`.calendar-day[data-date="${n}"]`)??void 0}__formatDateKey(t){return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}__focusCalendarDay(t){this.shadowRoot?.querySelectorAll(".calendar-day[data-date]").forEach(e=>{e.tabIndex=e===t?0:-1}),this._rovingDate=t.dataset.date??"",t.focus()}__focusAdjacentMonth(t,e){const a=t.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`),n=new Date(s.getFullYear(),s.getMonth()+e,1),r=Math.min(s.getDate(),this._daysInMonth(n.getFullYear(),n.getMonth())),l=new Date(n.getFullYear(),n.getMonth(),r);this._current=new Date(l.getFullYear(),l.getMonth(),1),this.selectedDate="",this._popupEvent=null,this._rovingDate=this.__formatDateKey(l),this._syncDisplayFromCurrent(),this.requestUpdate(),this.updateComplete.then(()=>{const o=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);o&&this.__focusCalendarDay(o)})}_daysInMonth(t,e){return new Date(t,e+1,0).getDate()}_firstDayOfWeek(t,e){const a=new Date(t,e,1).getDay();return a===0?6:a-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(t){this._popupEvent=t,this.selectedDate=t.date,this._dispatchSelect(t.date),this._lastActiveDay=this.shadowRoot?.activeElement||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelector("scb-dialog");e&&(document.activeElement&&(e.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.open=!0})}),e.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(t,e){const a=new Date(t.valueOf());return a.setDate(a.getDate()+e),a}_easterDay(t){if(typeof this._easterDateCalculated["Ar"+t]<"u")return new Date(this._easterDateCalculated["Ar"+t]);let e=t;e<100&&(e=e+1900),e<1950&&(e=e+100);const a=e%19,s=e%4,n=e%7,r=(19*a+24)%30,l=(2*s+4*n+6*r+5)%7;let o=22+r+l,d=0;o==57&&(o-=7),o==56&&r==28&&l==6&&a>10&&(o-=7),o>31?(o-=31,d=4):d=3;const u=new Date(e,d-1,o);return this._easterDateCalculated["Ar"+t]=u,new Date(this._easterDateCalculated["Ar"+t])}_swedishHolidayName(t){const e=t.getMonth();if(e===1||e===6||e===7||e===8)return null;const a=t.getMonth()+1,s=t.getDate(),n=t.getFullYear(),r=this._easterDay(n),l=this.lang==="en",o=[["Nyårsdagen","New Year's Day",a===1&&s===1],["Trettondedag jul","Epiphany",a===1&&s===6],["Långfredag","Good Friday",+t==+this._addDays(r,-2)],["Påskdagen","Easter Sunday",+t==+r],["Annandag påsk","Easter Monday",+t==+this._addDays(r,1)],["Kristi himmelsfärdsdag","Ascension Day",+t==+this._addDays(r,39)],["Pingstdagen","Pentecost",+t==+this._addDays(r,50)&&n<2005],["Första maj","May Day",a===5&&s===1],["Nationaldagen","National Day",a===6&&s===6&&n>=2005],["Midsommarafton","Midsummer's Eve",a===6&&s>=19&&s<=25&&t.getDay()===5],["Midsommardagen","Midsummer's Day",a===6&&s>=20&&s<=26&&t.getDay()===6],["Julafton","Christmas Eve",a===12&&s===24],["Juldagen","Christmas Day",a===12&&s===25],["Annandag jul","Boxing Day",a===12&&s===26],["Alla helgons dag","All Saints' Day",a===10&&s>=31&&t.getDay()===6||a===11&&s<=6&&t.getDay()===6]];for(const d of o){const[u,T,M]=d;if(M)return l?T:u}return null}render(){const t=this._current.getFullYear(),e=this._current.getMonth(),a=this._daysInMonth(t,e),s=this._firstDayOfWeek(t,e),n=this._today,r=this.lang==="en",l=r?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let o=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(o=o.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),T=`${t}-${String(e+1).padStart(2,"0")}-`,M=new Date(t,e,1);if(this.disableWeekend)for(;M.getDay()===0||M.getDay()===6;)M.setDate(M.getDate()+1);const P=this.__formatDateKey(n),B=[...u.keys()].find(i=>{if(!i.startsWith(T))return!1;if(!this.disableWeekend)return!0;const h=new Date(`${i}T12:00:00`);return h.getDay()!==0&&h.getDay()!==6}),U=[this._rovingDate,this.selectedDate,P,B,this.__formatDateKey(M)].find(i=>i?.startsWith(T))??this.__formatDateKey(M),K=[];let N=1;for(let i=0;i<6;i++){const h=[],b=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let p=N;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const E=e===0?11:e-1,C=e===0?t-1:t,y=this._daysInMonth(C,E)-(s-w-1),J=new Date(C,E,y);h.push(k`
1
+ import{g as z,h as Q,m as X,p as _,v as k,y as Z}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as V}from"../../vendor/lazy-focus-ring.js";import{t as f}from"../../vendor/decorate.js";import{n as tt,t as I}from"../../vendor/assertClassBrand.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-calendar-event.js";import"../scb-dialog/scb-dialog.js";import"../scb-list/scb-list.js";(function(){try{var $=typeof globalThis<"u"?globalThis:window;if(!$.__scb_ce_guard_installed__){$.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,a,s){try{customElements.get(e)||t(e,a,s)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var L,O,H={fromAttribute($){if($===null)return!1;const t=$.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!=="no"}},m=(L=new WeakSet,O=class extends Q{constructor(...t){super(...t),tt(this,L),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{const a=Array.from(this.shadowRoot?.querySelectorAll(".calendar-day[data-date]")??[]),s=this.shadowRoot?.activeElement,n=s&&a.includes(s)?s:document.activeElement,r=a.indexOf(n);if(r===-1)return;let l;switch(e.key){case"ArrowRight":l=a[r+1];break;case"ArrowLeft":l=a[r-1];break;case"ArrowDown":l=this.__dayOffsetFrom(n,7);break;case"ArrowUp":l=this.__dayOffsetFrom(n,-7);break;case"Home":l=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[])[0];break;case"End":{const o=Array.from(n.closest('[role="row"]')?.querySelectorAll(".calendar-day[data-date]")??[]);l=o[o.length-1];break}case"PageUp":e.preventDefault(),this.__focusAdjacentMonth(n,-1);return;case"PageDown":e.preventDefault(),this.__focusAdjacentMonth(n,1);return;default:return}l&&l!==n&&(e.preventDefault(),this.__focusCalendarDay(l))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate="",this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(t){const e=(t??"")+"";e!==this.selectedDate&&(this.selectedDate=e)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(t,e,a){super.attributeChangedCallback(t,e,a),t==="value"&&(this.value=a??"")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=V(this,this.renderRoot),I(L,this,W).call(this);const t=Number(this.displayYear),e=Number(this.displayMonth);!Number.isNaN(t)&&!Number.isNaN(e)&&e>=1&&e<=12&&(this._current=new Date(t,e-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}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}updated(t){if(super.updated?.(t),t.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&I(L,this,W).call(this),!this._syncingDisplay&&(t.has("displayYear")||t.has("displayMonth"))){const e=Number(this.displayYear),a=Number(this.displayMonth);if(!Number.isNaN(e)&&!Number.isNaN(a)&&a>=1&&a<=12){const s=this._current.getFullYear(),n=this._current.getMonth()+1;(s!==e||n!==a)&&(this._current=new Date(e,a-1,1),this._dispatchMonthChange(e,a),this.requestUpdate())}}}_ensureEventsFromJson(){const t=(this.eventsJson??"").trim();if(!t){this._eventsFromJson=null,this._eventsJsonLast=t;return}if(!(this._eventsJsonLast===t&&this._eventsFromJson!==null)){this._eventsJsonLast=t;try{const e=JSON.parse(t);Array.isArray(e)?this._eventsFromJson=e:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(t){const e=t.title??"",a=t.description??"",s=t.href??"",n=t.startDate??t["start-date"]??t.start??t.date??"",r=t.endDate??t["end-date"]??t.end??"";return{title:e+"",description:a?a+"":void 0,href:s?s+"":void 0,start:n?n+"":void 0,end:r?r+"":void 0}}_toLocalEventDate(t,e){const a=(t??"").trim();if(!a)return null;if(!a.includes("T")){const n=a.split("-").map(d=>Number(d));if(n.length!==3||n.some(d=>Number.isNaN(d)))return null;const[r,l,o]=n;return e?new Date(r,l-1,o,23,59,59,999):new Date(r,l-1,o,0,0,0,0)}const s=new Date(a);return Number.isNaN(s.getTime())?null:s}_toDateKey(t){return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}_buildEventMapFromInputs(t){const e=new Map;for(const a of t){const s=this._normalizeEventInput(a),n=s.start||"",r=s.end||"";if(!(!n||!s.title))if(n&&r){const l=this._toLocalEventDate(n,!1),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=e.get(d)||[];u.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),e.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),T=e.get(u)||[];T.push({title:s.title,description:s.description,href:s.href,start:n,end:r}),e.set(u,T)}}else{const l=n.split("T")[0],o=e.get(l)||[];o.push({title:s.title,description:s.description,href:s.href,start:n}),e.set(l,o)}}return e}_buildEventMapFromChildren(){const t=Array.from(this.querySelectorAll("scb-calendar-event")),e=new Map;for(const a of t){const s=a,n=(s.startDate??s.date??"")+""||a.getAttribute("start-date")||a.getAttribute("date")||"",r=(s.endDate??"")+""||a.getAttribute("end-date")||"";if(n&&r){const l=this._toLocalEventDate(n,!1),o=this._toLocalEventDate(r,!0);if(!l||!o)continue;if(o<l){const d=n.split("T")[0],u=e.get(d)||[];u.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),e.set(d,u);continue}for(let d=new Date(l);d<=o;d.setDate(d.getDate()+1)){const u=this._toDateKey(d),T=e.get(u)||[];T.push({title:a.title??"",description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n,end:r}),e.set(u,T)}}else if(n&&a.title){const l=n.split("T")[0],o=e.get(l)||[];o.push({title:a.title,description:a.description,href:s.href||a.getAttribute("href")||void 0,start:n}),e.set(l,o)}}return e}_syncDisplayFromCurrent(t=!0){const e=this._current.getFullYear(),a=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=e,this.displayMonth=a}finally{this._syncingDisplay=!1}t&&this._dispatchMonthChange(e,a)}_dispatchMonthChange(t,e){const a={displayYear:t,displayMonth:e};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:a})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:a}))}_dispatchSelect(t){const e={selectedDate:t};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:e}))}_formatDayLabel(t){return new Intl.DateTimeFormat(this.lang==="en"?"en-GB":"sv-SE",{day:"numeric",month:"long",year:"numeric"}).format(t)}_formatDayAriaLabel(t,e,a){const s=a.map(r=>`${r.prefix||""}${r.title}`.trim()).filter(Boolean),n=[this._formatDayLabel(t)];return e&&n.push(e),s.length===1?n.push(this.lang==="en"?`1 event: ${s[0]}`:`1 händelse: ${s[0]}`):s.length>1&&n.push(this.lang==="en"?`${s.length} events: ${s.join(", ")}`:`${s.length} händelser: ${s.join(", ")}`),n.join(". ")}__dayOffsetFrom(t,e){const a=t.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`);s.setDate(s.getDate()+e);const n=this.__formatDateKey(s);return this.shadowRoot?.querySelector(`.calendar-day[data-date="${n}"]`)??void 0}__formatDateKey(t){return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}__focusCalendarDay(t){this.shadowRoot?.querySelectorAll(".calendar-day[data-date]").forEach(e=>{e.tabIndex=e===t?0:-1}),this._rovingDate=t.dataset.date??"",t.focus()}__focusAdjacentMonth(t,e){const a=t.dataset.date;if(!a)return;const s=new Date(`${a}T12:00:00`),n=new Date(s.getFullYear(),s.getMonth()+e,1),r=Math.min(s.getDate(),this._daysInMonth(n.getFullYear(),n.getMonth())),l=new Date(n.getFullYear(),n.getMonth(),r);this._current=new Date(l.getFullYear(),l.getMonth(),1),this.selectedDate="",this._popupEvent=null,this._rovingDate=this.__formatDateKey(l),this._syncDisplayFromCurrent(),this.requestUpdate(),this.updateComplete.then(()=>{const o=this.shadowRoot?.querySelector(`.calendar-day[data-date="${this._rovingDate}"]`);o&&this.__focusCalendarDay(o)})}_daysInMonth(t,e){return new Date(t,e+1,0).getDate()}_firstDayOfWeek(t,e){const a=new Date(t,e,1).getDay();return a===0?6:a-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(t){this._popupEvent=t,this.selectedDate=t.date,this._dispatchSelect(t.date),this._lastActiveDay=this.shadowRoot?.activeElement||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelector("scb-dialog");e&&(document.activeElement&&(e.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.open=!0})}),e.addEventListener("close",this._handleDialogClose,{once:!0}))})}_addDays(t,e){const a=new Date(t.valueOf());return a.setDate(a.getDate()+e),a}_easterDay(t){if(typeof this._easterDateCalculated["Ar"+t]<"u")return new Date(this._easterDateCalculated["Ar"+t]);let e=t;e<100&&(e=e+1900),e<1950&&(e=e+100);const a=e%19,s=e%4,n=e%7,r=(19*a+24)%30,l=(2*s+4*n+6*r+5)%7;let o=22+r+l,d=0;o==57&&(o-=7),o==56&&r==28&&l==6&&a>10&&(o-=7),o>31?(o-=31,d=4):d=3;const u=new Date(e,d-1,o);return this._easterDateCalculated["Ar"+t]=u,new Date(this._easterDateCalculated["Ar"+t])}_swedishHolidayName(t){const e=t.getMonth();if(e===1||e===6||e===7||e===8)return null;const a=t.getMonth()+1,s=t.getDate(),n=t.getFullYear(),r=this._easterDay(n),l=this.lang==="en",o=[["Nyårsdagen","New Year's Day",a===1&&s===1],["Trettondedag jul","Epiphany",a===1&&s===6],["Långfredag","Good Friday",+t==+this._addDays(r,-2)],["Påskdagen","Easter Sunday",+t==+r],["Annandag påsk","Easter Monday",+t==+this._addDays(r,1)],["Kristi himmelsfärdsdag","Ascension Day",+t==+this._addDays(r,39)],["Pingstdagen","Pentecost",+t==+this._addDays(r,50)&&n<2005],["Första maj","May Day",a===5&&s===1],["Nationaldagen","National Day",a===6&&s===6&&n>=2005],["Midsommarafton","Midsummer's Eve",a===6&&s>=19&&s<=25&&t.getDay()===5],["Midsommardagen","Midsummer's Day",a===6&&s>=20&&s<=26&&t.getDay()===6],["Julafton","Christmas Eve",a===12&&s===24],["Juldagen","Christmas Day",a===12&&s===25],["Annandag jul","Boxing Day",a===12&&s===26],["Alla helgons dag","All Saints' Day",a===10&&s>=31&&t.getDay()===6||a===11&&s<=6&&t.getDay()===6]];for(const d of o){const[u,T,M]=d;if(M)return l?T:u}return null}render(){const t=this._current.getFullYear(),e=this._current.getMonth(),a=this._daysInMonth(t,e),s=this._firstDayOfWeek(t,e),n=this._today,r=this.lang==="en",l=r?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let o=r?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(o=o.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),T=`${t}-${String(e+1).padStart(2,"0")}-`,M=new Date(t,e,1);if(this.disableWeekend)for(;M.getDay()===0||M.getDay()===6;)M.setDate(M.getDate()+1);const P=this.__formatDateKey(n),B=[...u.keys()].find(i=>{if(!i.startsWith(T))return!1;if(!this.disableWeekend)return!0;const h=new Date(`${i}T12:00:00`);return h.getDay()!==0&&h.getDay()!==6}),U=[this._rovingDate,this.selectedDate,P,B,this.__formatDateKey(M)].find(i=>i?.startsWith(T))??this.__formatDateKey(M),K=[];let N=1;for(let i=0;i<6;i++){const h=[],b=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let p=N;for(let D=0;D<b.length;D++){const w=b[D];if(i===0&&w<s){if(!this.disableWeekend||w<5){const E=e===0?11:e-1,C=e===0?t-1:t,y=this._daysInMonth(C,E)-(s-w-1),J=new Date(C,E,y);h.push(k`
2
2
  <div
3
3
  class="calendar-day calendar-day--other"
4
4
  role="gridcell"