scb-wc 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -164
- package/all.js +91 -5
- package/blazor/CustomEvents.cs +83 -0
- package/blazor/ScbBlazorInteropBase.cs +4460 -1674
- package/blazor/scb-blazor-bridge.js +6827 -2805
- package/blazor/wrappers/ScbAccordion.razor +50 -0
- package/blazor/wrappers/ScbAppBar.razor +95 -0
- package/blazor/wrappers/ScbBreadcrumb.razor +59 -0
- package/blazor/wrappers/ScbCalendar.razor +100 -0
- package/blazor/wrappers/ScbCalendarCard.razor +189 -0
- package/blazor/wrappers/ScbCheckbox.razor +92 -0
- package/blazor/wrappers/ScbCollapse.razor +76 -0
- package/blazor/wrappers/ScbCookiesConsent.razor +106 -0
- package/blazor/wrappers/ScbDatepicker.razor +77 -0
- package/blazor/wrappers/ScbDialog.razor +72 -0
- package/blazor/wrappers/ScbDrawer.razor +64 -0
- package/blazor/wrappers/ScbDropZone.razor +168 -0
- package/blazor/wrappers/ScbDropdown.razor +76 -0
- package/blazor/wrappers/ScbHorizontalScroller.razor +137 -0
- package/blazor/wrappers/ScbList.razor +77 -0
- package/blazor/wrappers/ScbMenu.razor +71 -0
- package/blazor/wrappers/ScbNav.razor +92 -0
- package/blazor/wrappers/ScbNotificationCard.razor +122 -0
- package/blazor/wrappers/ScbOptionsMenu.razor +88 -0
- package/blazor/wrappers/ScbPagination.razor +80 -0
- package/blazor/wrappers/ScbRadioGroup.razor +94 -0
- package/blazor/wrappers/ScbSearch.razor +83 -0
- package/blazor/wrappers/ScbSegmentedButton.razor +85 -0
- package/blazor/wrappers/ScbSelect.razor +79 -0
- package/blazor/wrappers/ScbSlider.razor +96 -0
- package/blazor/wrappers/ScbSnackbar.razor +93 -0
- package/blazor/wrappers/ScbSwitch.razor +92 -0
- package/blazor/wrappers/ScbTable.razor +67 -0
- package/blazor/wrappers/ScbTableAdvanced.razor +78 -0
- package/blazor/wrappers/ScbTabs.razor +55 -0
- package/blazor/wrappers/ScbTextfield.razor +104 -0
- package/blazor/wrappers/ScbTooltip.razor +88 -0
- package/blazor/wrappers/ScbViz.razor +142 -0
- package/demo-data-preview.svg +12 -0
- package/dummy.png +0 -0
- package/fonts/inter/files/inter-latin-wght-italic.woff2 +0 -0
- package/fonts/inter/files/inter-latin-wght-normal.woff2 +0 -0
- package/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/index.js +91 -1
- package/mvc/components/all.js +90 -1
- package/mvc/components/scb-accordion/scb-accordion-item.js +211 -0
- package/mvc/components/scb-accordion/scb-accordion.js +44 -0
- package/mvc/components/scb-app-bar/scb-app-bar.js +166 -0
- package/mvc/components/scb-avatar/scb-avatar.js +111 -0
- package/mvc/components/scb-badge/scb-badge.js +80 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +14 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +96 -0
- package/mvc/components/scb-button/scb-button.js +268 -0
- package/mvc/components/scb-calendar/scb-calendar-event.js +6 -0
- package/mvc/components/scb-calendar/scb-calendar.js +168 -0
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +346 -0
- package/mvc/components/scb-card/scb-card.js +761 -0
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +33 -0
- package/mvc/components/scb-checkbox/scb-checkbox.js +140 -0
- package/mvc/components/scb-chevron/scb-chevron.js +121 -0
- package/mvc/components/scb-chip/scb-chip.js +66 -0
- package/mvc/components/scb-collapse/scb-collapse.js +89 -0
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +78 -0
- package/mvc/components/scb-datepicker/scb-datepicker.js +296 -0
- package/mvc/components/scb-dialog/scb-dialog.js +265 -0
- package/mvc/components/scb-divider/scb-divider.js +69 -0
- package/mvc/components/scb-drawer/scb-drawer.js +128 -0
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +555 -0
- package/mvc/components/scb-dropdown/scb-dropdown.js +306 -0
- package/mvc/components/scb-fab/scb-fab.js +108 -0
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +46 -0
- package/mvc/components/scb-fact-card/scb-fact-card.js +226 -0
- package/mvc/components/scb-footer/scb-footer-section.js +3 -0
- package/mvc/components/scb-footer/scb-footer.js +210 -0
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +131 -0
- package/mvc/components/scb-grid/scb-grid-item.js +11 -0
- package/mvc/components/scb-grid/scb-grid.js +98 -0
- package/mvc/components/scb-grid/scb-stack.js +33 -0
- package/mvc/components/scb-header/scb-header-menu-group.js +1 -0
- package/mvc/components/scb-header/scb-header-menu-item.js +5 -0
- package/mvc/components/scb-header/scb-header-tab.js +5 -0
- package/mvc/components/scb-header/scb-header-utility.js +1 -0
- package/mvc/components/scb-header/scb-header.js +681 -0
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +196 -0
- package/mvc/components/scb-icon-button/scb-icon-button.js +171 -0
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +212 -0
- package/mvc/components/scb-link/scb-link.js +61 -0
- package/mvc/components/scb-list/scb-list-item.js +153 -0
- package/mvc/components/scb-list/scb-list.js +26 -0
- package/mvc/components/scb-menu/scb-menu-item.js +205 -0
- package/mvc/components/scb-menu/scb-menu-section.js +42 -0
- package/mvc/components/scb-menu/scb-menu.js +81 -0
- package/mvc/components/scb-menu/scb-sub-menu.js +10 -0
- package/mvc/components/scb-nav/scb-nav-item.js +28 -0
- package/mvc/components/scb-nav/scb-nav.js +104 -0
- package/mvc/components/scb-notification-card/scb-notification-card.js +358 -0
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +66 -0
- package/mvc/components/scb-options-menu/scb-options-menu.js +88 -0
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +34 -0
- package/mvc/components/scb-overlay/scb-overlay.js +49 -0
- package/mvc/components/scb-pagination/scb-pagination.js +312 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +87 -0
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +147 -0
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +62 -0
- package/mvc/components/scb-radio-button/scb-radio-button.js +132 -0
- package/mvc/components/scb-radio-button/scb-radio-group.js +43 -0
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +79 -0
- package/mvc/components/scb-search/scb-search.js +292 -0
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +32 -0
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +74 -0
- package/mvc/components/scb-select/scb-select-option.js +61 -0
- package/mvc/components/scb-select/scb-select.js +284 -0
- package/mvc/components/scb-skeleton/scb-skeleton.js +38 -0
- package/mvc/components/scb-slider/scb-slider.js +27 -0
- package/mvc/components/scb-snackbar/scb-snackbar.js +128 -0
- package/mvc/components/scb-status-pill/scb-status-pill.js +45 -0
- package/mvc/components/scb-stepper/scb-step.js +239 -0
- package/mvc/components/scb-stepper/scb-stepper.js +139 -0
- package/mvc/components/scb-switch/scb-switch.js +59 -0
- package/mvc/components/scb-table/scb-table.js +51 -0
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +76 -0
- package/mvc/components/scb-tabs/scb-primary-tab.js +6 -0
- package/mvc/components/scb-tabs/scb-secondary-tab.js +6 -0
- package/mvc/components/scb-tabs/scb-tabs.js +28 -0
- package/mvc/components/scb-textfield/scb-textfield.js +595 -0
- package/mvc/components/scb-toc/scb-toc-item.js +303 -0
- package/mvc/components/scb-toc/scb-toc.js +19 -0
- package/mvc/components/scb-tooltip/scb-tooltip.js +196 -0
- package/mvc/components/scb-vignette/scb-vignette.js +37 -0
- package/mvc/components/scb-viz/scb-viz-actions-runtime.js +2 -0
- package/mvc/components/scb-viz/scb-viz-print-runtime.js +98 -0
- package/mvc/components/scb-viz/scb-viz-series-differentiation-registry.js +1 -0
- package/mvc/components/scb-viz/scb-viz-series-differentiation-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz-table-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz.js +1140 -0
- package/mvc/fonts/inter/files/inter-latin-wght-italic.woff2 +0 -0
- package/mvc/fonts/inter/files/inter-latin-wght-normal.woff2 +0 -0
- package/mvc/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/mvc/scb-blazor-bridge.js +6827 -2805
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb-typography.css +1 -1
- package/mvc/scb-wc.css +3 -2
- package/mvc/scb.svg +13 -13
- package/mvc/vendor/assertClassBrand.js +1 -0
- package/mvc/vendor/classPrivateFieldGet2.js +1 -0
- package/mvc/vendor/decorate.js +1 -0
- package/mvc/vendor/preload-helper.js +1 -0
- package/mvc/vendor/vendor-lit.js +1 -0
- package/mvc/vendor/vendor-material.js +364 -0
- package/mvc/vendor/vendor.js +4 -0
- package/package.json +420 -77
- package/scb-accordion/scb-accordion-item.js +340 -0
- package/scb-accordion/scb-accordion.js +151 -0
- package/scb-app-bar/scb-app-bar.js +317 -0
- package/scb-avatar/scb-avatar.js +197 -0
- package/scb-badge/scb-badge.js +165 -0
- package/scb-breadcrumb/scb-breadcrumb-item.js +62 -0
- package/scb-breadcrumb/scb-breadcrumb.js +255 -0
- package/scb-button/scb-button.js +398 -0
- package/scb-calendar/scb-calendar-event.js +48 -0
- package/scb-calendar/scb-calendar.js +700 -0
- package/scb-calendar-card/scb-calendar-card.js +505 -0
- package/scb-card/scb-card.js +1231 -0
- package/scb-checkbox/scb-checkbox-group.js +104 -0
- package/scb-checkbox/scb-checkbox.js +316 -0
- package/scb-chevron/scb-chevron.js +144 -0
- package/scb-chip/scb-chip.js +234 -0
- package/scb-collapse/scb-collapse.js +231 -0
- package/scb-cookies-consent/scb-cookies-consent.js +164 -0
- package/scb-datepicker/scb-datepicker.js +470 -0
- package/scb-dialog/scb-dialog.js +574 -0
- package/scb-divider/scb-divider.js +119 -0
- package/scb-drawer/scb-drawer.js +297 -0
- package/scb-drop-zone/scb-drop-zone.js +965 -0
- package/scb-dropdown/scb-dropdown.js +598 -0
- package/scb-fab/scb-fab.js +190 -0
- package/scb-fact-card/scb-fact-card-content.js +82 -0
- package/scb-fact-card/scb-fact-card.js +376 -0
- package/scb-footer/scb-footer-section.js +23 -0
- package/scb-footer/scb-footer.js +343 -0
- package/scb-gallery-grid/scb-gallery-grid.js +242 -0
- package/scb-grid/scb-grid-item.js +81 -0
- package/scb-grid/scb-grid.js +200 -0
- package/scb-grid/scb-stack.js +120 -0
- package/scb-header/scb-header-menu-group.js +21 -0
- package/scb-header/scb-header-menu-item.js +22 -0
- package/scb-header/scb-header-tab.js +25 -0
- package/scb-header/scb-header-utility.js +27 -0
- package/scb-header/scb-header.js +1358 -0
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +353 -0
- package/scb-icon-button/scb-icon-button.js +335 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +340 -0
- package/scb-link/scb-link.js +136 -0
- package/scb-list/scb-list-item.js +297 -0
- package/scb-list/scb-list.js +119 -0
- package/scb-menu/scb-menu-item.js +330 -0
- package/scb-menu/scb-menu-section.js +60 -0
- package/scb-menu/scb-menu.js +154 -0
- package/scb-menu/scb-sub-menu.js +36 -0
- package/scb-nav/scb-nav-item.js +96 -0
- package/scb-nav/scb-nav.js +263 -0
- package/scb-notification-card/scb-notification-card.js +479 -0
- package/scb-options-menu/scb-options-menu-item.js +218 -0
- package/scb-options-menu/scb-options-menu.js +237 -0
- package/scb-options-menu/scb-options-sub-menu.js +69 -0
- package/scb-overlay/scb-overlay.js +144 -0
- package/scb-pagination/scb-pagination.js +438 -0
- package/scb-progress-indicator/scb-progress-indicator.js +199 -0
- package/scb-progress-stepper/scb-progress-step.js +213 -0
- package/scb-progress-stepper/scb-progress-stepper.js +132 -0
- package/scb-radio-button/scb-radio-button.js +249 -0
- package/scb-radio-button/scb-radio-group.js +216 -0
- package/scb-scrollspy/scb-scrollspy.js +670 -0
- package/scb-search/scb-search.js +643 -0
- package/scb-segmented-button/scb-segmented-button.js +215 -0
- package/scb-segmented-button/scb-segmented-item.js +133 -0
- package/scb-select/scb-select-option.js +88 -0
- package/scb-select/scb-select.js +517 -0
- package/scb-skeleton/scb-skeleton.js +92 -0
- package/scb-slider/scb-slider.js +98 -0
- package/scb-snackbar/scb-snackbar.js +223 -0
- package/scb-status-pill/scb-status-pill.js +100 -0
- package/scb-stepper/scb-step.js +311 -0
- package/scb-stepper/scb-stepper.js +325 -0
- package/scb-switch/scb-switch.js +182 -0
- package/scb-table/scb-table.js +202 -0
- package/scb-table-advanced/scb-table-advanced.js +327 -0
- package/scb-tabs/scb-primary-tab.js +68 -0
- package/scb-tabs/scb-secondary-tab.js +68 -0
- package/scb-tabs/scb-tabs.js +100 -0
- package/scb-test-components/index.d.ts +90 -0
- package/scb-test-components/scb-accordion/scb-accordion-item.d.ts +39 -0
- package/scb-test-components/scb-accordion/scb-accordion.d.ts +27 -0
- package/scb-test-components/scb-app-bar/scb-app-bar.d.ts +25 -0
- package/scb-test-components/scb-avatar/scb-avatar.d.ts +37 -0
- package/scb-test-components/scb-badge/scb-badge.d.ts +28 -0
- package/scb-test-components/scb-breadcrumb/scb-breadcrumb-item.d.ts +15 -0
- package/scb-test-components/scb-breadcrumb/scb-breadcrumb.d.ts +27 -0
- package/scb-test-components/scb-button/scb-button.d.ts +40 -0
- package/scb-test-components/scb-calendar/scb-calendar-event.d.ts +15 -0
- package/scb-test-components/scb-calendar/scb-calendar.d.ts +77 -0
- package/scb-test-components/scb-calendar-card/scb-calendar-card.d.ts +45 -0
- package/scb-test-components/scb-card/scb-card.d.ts +101 -0
- package/scb-test-components/scb-checkbox/scb-checkbox-group.d.ts +23 -0
- package/scb-test-components/scb-checkbox/scb-checkbox.d.ts +52 -0
- package/scb-test-components/scb-chevron/scb-chevron.d.ts +13 -0
- package/scb-test-components/scb-chip/scb-chip.d.ts +61 -0
- package/scb-test-components/scb-collapse/scb-collapse.d.ts +29 -0
- package/scb-test-components/scb-cookies-consent/scb-cookies-consent.d.ts +23 -0
- package/scb-test-components/scb-datepicker/scb-datepicker.d.ts +39 -0
- package/scb-test-components/scb-dialog/scb-dialog.d.ts +72 -0
- package/scb-test-components/scb-divider/scb-divider.d.ts +34 -0
- package/scb-test-components/scb-drawer/scb-drawer.d.ts +72 -0
- package/scb-test-components/scb-drop-zone/scb-drop-zone.d.ts +143 -0
- package/scb-test-components/scb-dropdown/scb-dropdown.d.ts +70 -0
- package/scb-test-components/scb-fab/scb-fab.d.ts +42 -0
- package/scb-test-components/scb-fact-card/scb-fact-card-content.d.ts +15 -0
- package/scb-test-components/scb-fact-card/scb-fact-card.d.ts +49 -0
- package/scb-test-components/scb-footer/scb-footer-section.d.ts +20 -0
- package/scb-test-components/scb-footer/scb-footer.d.ts +31 -0
- package/scb-test-components/scb-gallery-grid/scb-gallery-grid.d.ts +20 -0
- package/scb-test-components/scb-grid/scb-grid-item.d.ts +32 -0
- package/scb-test-components/scb-grid/scb-grid.d.ts +36 -0
- package/scb-test-components/scb-grid/scb-stack.d.ts +32 -0
- package/scb-test-components/scb-header/scb-header-menu-group.d.ts +12 -0
- package/scb-test-components/scb-header/scb-header-menu-item.d.ts +13 -0
- package/scb-test-components/scb-header/scb-header-tab.d.ts +13 -0
- package/scb-test-components/scb-header/scb-header-utility.d.ts +14 -0
- package/scb-test-components/scb-header/scb-header.d.ts +132 -0
- package/scb-test-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +47 -0
- package/scb-test-components/scb-icon-button/scb-icon-button.d.ts +76 -0
- package/scb-test-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +46 -0
- package/scb-test-components/scb-link/scb-link.d.ts +25 -0
- package/scb-test-components/scb-list/scb-list-item.d.ts +38 -0
- package/scb-test-components/scb-list/scb-list.d.ts +26 -0
- package/scb-test-components/scb-menu/scb-menu-item.d.ts +52 -0
- package/scb-test-components/scb-menu/scb-menu-section.d.ts +11 -0
- package/scb-test-components/scb-menu/scb-menu.d.ts +25 -0
- package/scb-test-components/scb-menu/scb-sub-menu.d.ts +14 -0
- package/scb-test-components/scb-nav/scb-nav-item.d.ts +20 -0
- package/scb-test-components/scb-nav/scb-nav.d.ts +50 -0
- package/scb-test-components/scb-notification-card/scb-notification-card.d.ts +46 -0
- package/scb-test-components/scb-options-menu/scb-options-menu-item.d.ts +29 -0
- package/scb-test-components/scb-options-menu/scb-options-menu.d.ts +35 -0
- package/scb-test-components/scb-options-menu/scb-options-sub-menu.d.ts +11 -0
- package/scb-test-components/scb-overlay/scb-overlay.d.ts +24 -0
- package/scb-test-components/scb-pagination/scb-pagination.d.ts +36 -0
- package/scb-test-components/scb-progress-indicator/scb-progress-indicator.d.ts +28 -0
- package/scb-test-components/scb-progress-stepper/scb-progress-step.d.ts +21 -0
- package/scb-test-components/scb-progress-stepper/scb-progress-stepper.d.ts +22 -0
- package/scb-test-components/scb-radio-button/scb-radio-button.d.ts +26 -0
- package/scb-test-components/scb-radio-button/scb-radio-group.d.ts +49 -0
- package/scb-test-components/scb-scrollspy/scb-scrollspy.d.ts +217 -0
- package/scb-test-components/scb-search/scb-search.d.ts +96 -0
- package/scb-test-components/scb-segmented-button/scb-segmented-button.d.ts +80 -0
- package/scb-test-components/scb-segmented-button/scb-segmented-item.d.ts +21 -0
- package/scb-test-components/scb-select/scb-select-option.d.ts +16 -0
- package/scb-test-components/scb-select/scb-select.d.ts +62 -0
- package/scb-test-components/scb-skeleton/scb-skeleton.d.ts +25 -0
- package/scb-test-components/scb-slider/scb-slider.d.ts +28 -0
- package/scb-test-components/scb-snackbar/scb-snackbar.d.ts +24 -0
- package/scb-test-components/scb-status-pill/scb-status-pill.d.ts +22 -0
- package/scb-test-components/scb-stepper/scb-step.d.ts +22 -0
- package/scb-test-components/scb-stepper/scb-stepper.d.ts +47 -0
- package/scb-test-components/scb-switch/scb-switch.d.ts +52 -0
- package/scb-test-components/scb-table/scb-table.d.ts +24 -0
- package/scb-test-components/scb-table-advanced/scb-table-advanced.d.ts +39 -0
- package/scb-test-components/scb-tabs/scb-primary-tab.d.ts +15 -0
- package/scb-test-components/scb-tabs/scb-secondary-tab.d.ts +15 -0
- package/scb-test-components/scb-tabs/scb-tabs.d.ts +21 -0
- package/scb-test-components/scb-textfield/scb-textfield.d.ts +75 -0
- package/scb-test-components/scb-toc/scb-toc-item.d.ts +38 -0
- package/scb-test-components/scb-toc/scb-toc.d.ts +27 -0
- package/scb-test-components/scb-tooltip/scb-tooltip.d.ts +51 -0
- package/scb-test-components/scb-vignette/scb-vignette.d.ts +20 -0
- package/scb-test-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-test-components/scb-viz/scb-viz-print-runtime.d.ts +27 -0
- package/scb-test-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-test-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-test-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-test-components/scb-viz/scb-viz.d.ts +207 -0
- package/scb-textfield/scb-textfield.js +827 -0
- package/scb-toc/scb-toc-item.js +477 -0
- package/scb-toc/scb-toc.js +101 -0
- package/scb-tooltip/scb-tooltip.js +402 -0
- package/scb-typography.css +1 -1
- package/scb-vignette/scb-vignette.js +88 -0
- package/scb-viz/scb-viz-actions-runtime.js +143 -0
- package/scb-viz/scb-viz-print-runtime.js +121 -0
- package/scb-viz/scb-viz-series-differentiation-registry.js +117 -0
- package/scb-viz/scb-viz-series-differentiation-runtime.js +126 -0
- package/scb-viz/scb-viz-table-runtime.js +86 -0
- package/scb-viz/scb-viz.js +2195 -0
- package/scb-wc-selfhost.css +29 -0
- package/scb-wc.bundle.js +12893 -1099
- package/scb-wc.css +3 -2
- package/scb-wc.d.ts +180 -0
- package/index.d.ts +0 -0
- package/mvc/components/index.js +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import "../scb-link/scb-link.js";
|
|
3
|
+
import "./scb-footer-section.js";
|
|
4
|
+
import "../scb-grid/scb-grid-item.js";
|
|
5
|
+
import "../scb-grid/scb-grid.js";
|
|
6
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
7
|
+
import { customElement as i, property as a } from "lit/decorators.js";
|
|
8
|
+
//#region src/scb-test-components/scb-footer/scb-footer.ts
|
|
9
|
+
var o = class extends t {
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e), this.maxWidth = "1440px", this.deferPaint = !1, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.sections = [], this.description = "Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.", this.#e = null, this.#t = "", this.#r = !1, this.#u = 8;
|
|
12
|
+
}
|
|
13
|
+
#e;
|
|
14
|
+
#t;
|
|
15
|
+
#n;
|
|
16
|
+
#r;
|
|
17
|
+
static {
|
|
18
|
+
this.styles = n`
|
|
19
|
+
:host {
|
|
20
|
+
display: block;
|
|
21
|
+
color: var(--p-100);
|
|
22
|
+
background: var(--scb-footer-bg, var(--p-20));
|
|
23
|
+
margin-block-start: var(--scb-footer-spacing-block-start, 0);
|
|
24
|
+
margin-block-end: var(--scb-footer-spacing-block-end, 0);
|
|
25
|
+
/* Token för loggans bredd och proportion i footer */
|
|
26
|
+
--scb-footer-logo-w: 48px;
|
|
27
|
+
--scb-footer-logo-aspect: 48 / 54;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.outer {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
align-items: center;
|
|
34
|
+
padding: var(--spacing-10, 48px) 0 var(--spacing-5, 16px);
|
|
35
|
+
gap: var(--spacing-4, 12px);
|
|
36
|
+
align-self: stretch;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([defer-paint]) .outer {
|
|
40
|
+
content-visibility: auto;
|
|
41
|
+
contain-intrinsic-size: var(--scb-footer-cis, 560px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
nav { width: 100%; }
|
|
45
|
+
|
|
46
|
+
scb-grid {
|
|
47
|
+
--scb-grid-padding-inline: var(--spacing-8, 32px);
|
|
48
|
+
--scb-grid-row-gap: var(--spacing-9, 40px);
|
|
49
|
+
--scb-grid-column-gap: var(--spacing-9, 40px);
|
|
50
|
+
--scb-grid-gap: var(--spacing-9, 40px) var(--spacing-9, 40px);
|
|
51
|
+
--scb-grid-max-width: var(--scb-footer-max-width, 1440px);
|
|
52
|
+
}
|
|
53
|
+
@media (max-width: 839.98px) {
|
|
54
|
+
scb-grid { --scb-grid-row-gap: var(--spacing-11, 64px); }
|
|
55
|
+
}
|
|
56
|
+
@media (min-width: 840px) {
|
|
57
|
+
scb-grid { --scb-grid-row-gap: var(--spacing-11, 64px); }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.group {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: var(--spacing-7, 24px);
|
|
64
|
+
min-width: 248px;
|
|
65
|
+
flex: 1 0 0;
|
|
66
|
+
align-self: stretch;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 840px) {
|
|
70
|
+
.group--centered {
|
|
71
|
+
flex: 0 1 auto;
|
|
72
|
+
min-width: 248px;
|
|
73
|
+
max-width: 420px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (min-width: 840px) {
|
|
78
|
+
.center-row {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: start;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
gap: var(--spacing-9, 40px);
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (max-width: 599px) {
|
|
88
|
+
scb-grid-item:nth-child(n+2) .group { margin-top: var(--spacing-7, 24px); }
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 600px) and (max-width: 839px) {
|
|
91
|
+
scb-grid-item:nth-child(n+3) .group { margin-top: var(--spacing-7, 24px); }
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.title {
|
|
95
|
+
margin: 0;
|
|
96
|
+
color: var(--p-100);
|
|
97
|
+
font-family: var(--brand-font);
|
|
98
|
+
font-size: var(--md-sys-typescale-title-medium-size);
|
|
99
|
+
line-height: var(--md-sys-typescale-title-medium-line-height);
|
|
100
|
+
letter-spacing: var(--md-sys-typescale-title-medium-tracking);
|
|
101
|
+
font-weight: var(--weight-semibold);
|
|
102
|
+
align-self: stretch;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
ul {
|
|
106
|
+
list-style: none;
|
|
107
|
+
margin: 0;
|
|
108
|
+
padding: 0;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: var(--spacing-5, 16px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
scb-link {
|
|
115
|
+
--scb-link-color: var(--p-100);
|
|
116
|
+
--scb-link-visited-color: var(--p-100);
|
|
117
|
+
}
|
|
118
|
+
scb-link::part(anchor) {
|
|
119
|
+
font-family: var(--brand-font);
|
|
120
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
121
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
122
|
+
font-weight: var(--weight-regular);
|
|
123
|
+
letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.brand {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
align-items: center;
|
|
130
|
+
align-self: stretch;
|
|
131
|
+
padding: var(--spacing-9, 40px) var(--spacing-8, 32px);
|
|
132
|
+
gap: var(--spacing-5, 16px);
|
|
133
|
+
}
|
|
134
|
+
.brand-inner {
|
|
135
|
+
width: 100%;
|
|
136
|
+
max-width: var(--scb-footer-max-width, 1440px);
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
align-items: center;
|
|
140
|
+
gap: var(--spacing-5, 16px);
|
|
141
|
+
margin-inline: auto;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* tokeniserad storlek samt låst proportion för loggan */
|
|
145
|
+
.logo {
|
|
146
|
+
display: block;
|
|
147
|
+
inline-size: var(--scb-footer-logo-w);
|
|
148
|
+
block-size: calc(var(--scb-footer-logo-w) * (54 / 48));
|
|
149
|
+
aspect-ratio: var(--scb-footer-logo-aspect);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.desc {
|
|
153
|
+
margin: 0;
|
|
154
|
+
text-align: center;
|
|
155
|
+
opacity: .9;
|
|
156
|
+
font-family: var(--brand-font);
|
|
157
|
+
font-size: var(--md-sys-typescale-body-small-size);
|
|
158
|
+
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
159
|
+
font-weight: var(--weight-regular);
|
|
160
|
+
letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
161
|
+
color: var(--p-100);
|
|
162
|
+
width: min(100%, 312px);
|
|
163
|
+
overflow-wrap: anywhere;
|
|
164
|
+
}
|
|
165
|
+
@media (min-width: 600px) { .desc { width: min(100%, 376px); } }
|
|
166
|
+
|
|
167
|
+
.spacer { display: none; }
|
|
168
|
+
@media (min-width: 840px) { .spacer { display: block; } }
|
|
169
|
+
`;
|
|
170
|
+
}
|
|
171
|
+
#i(e) {
|
|
172
|
+
if (!e) return;
|
|
173
|
+
let t = String(e).trim();
|
|
174
|
+
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
175
|
+
}
|
|
176
|
+
#a() {
|
|
177
|
+
let e = this.#i(this.spacing), t = this.#i(this.spacingTop) ?? e, n = this.#i(this.spacingBottom) ?? e;
|
|
178
|
+
t ? this.style.setProperty("--scb-footer-spacing-block-start", t) : this.style.removeProperty("--scb-footer-spacing-block-start"), n ? this.style.setProperty("--scb-footer-spacing-block-end", n) : this.style.removeProperty("--scb-footer-spacing-block-end");
|
|
179
|
+
}
|
|
180
|
+
connectedCallback() {
|
|
181
|
+
super.connectedCallback(), this.style.setProperty("--scb-footer-max-width", this.maxWidth), this.#a(), this.#l(!0), this.#o();
|
|
182
|
+
}
|
|
183
|
+
updated(e) {
|
|
184
|
+
e.has("maxWidth") && this.style.setProperty("--scb-footer-max-width", this.maxWidth), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom")) && this.#a();
|
|
185
|
+
}
|
|
186
|
+
disconnectedCallback() {
|
|
187
|
+
super.disconnectedCallback(), this.#n?.disconnect();
|
|
188
|
+
}
|
|
189
|
+
#o() {
|
|
190
|
+
this.#n?.disconnect(), this.#n = new MutationObserver((e) => {
|
|
191
|
+
for (let t of e) {
|
|
192
|
+
if (t.type === "childList") {
|
|
193
|
+
let e = [...t.addedNodes].some((e) => e.tagName === "SCB-FOOTER-SECTION" || e.tagName === "SCB-LINK"), n = [...t.removedNodes].some((e) => e.tagName === "SCB-FOOTER-SECTION" || e.tagName === "SCB-LINK");
|
|
194
|
+
if (e || n) {
|
|
195
|
+
this.#s();
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (t.type === "attributes" && (t.target.tagName === "SCB-FOOTER-SECTION" || t.target.tagName === "SCB-LINK")) {
|
|
200
|
+
this.#s();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}), this.#n.observe(this, {
|
|
205
|
+
subtree: !0,
|
|
206
|
+
childList: !0,
|
|
207
|
+
attributes: !0,
|
|
208
|
+
attributeFilter: [
|
|
209
|
+
"title",
|
|
210
|
+
"href",
|
|
211
|
+
"target"
|
|
212
|
+
]
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
#s() {
|
|
216
|
+
this.#r || (this.#r = !0, queueMicrotask(() => {
|
|
217
|
+
this.#r = !1, this.#l(!1);
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
get #c() {
|
|
221
|
+
return this.#e ?? this.sections ?? [];
|
|
222
|
+
}
|
|
223
|
+
#l(e = !1) {
|
|
224
|
+
let t = Array.from(this.querySelectorAll("scb-footer-section"));
|
|
225
|
+
if (!t.length) {
|
|
226
|
+
this.#e !== null && (this.#e = null, this.#t = "", e || this.requestUpdate());
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
let n = t.map((e) => ({
|
|
230
|
+
title: (e.getAttribute("title") || "").trim(),
|
|
231
|
+
links: Array.from(e.querySelectorAll("scb-link")).map((e) => {
|
|
232
|
+
let t = (e.getAttribute("href") || "").trim(), n = e.getAttribute("target"), r = {
|
|
233
|
+
label: (e.textContent || "").trim(),
|
|
234
|
+
href: t
|
|
235
|
+
};
|
|
236
|
+
return n && (r.target = n), r;
|
|
237
|
+
})
|
|
238
|
+
})), r = JSON.stringify(n);
|
|
239
|
+
r !== this.#t && (this.#t = r, this.#e = n, e || this.requestUpdate());
|
|
240
|
+
}
|
|
241
|
+
#u;
|
|
242
|
+
#d(e) {
|
|
243
|
+
let t = [], n = e.length;
|
|
244
|
+
if (n > 0 && n < 4) return t.push(r`
|
|
245
|
+
<scb-grid-item
|
|
246
|
+
col-span-compact="4"
|
|
247
|
+
col-span-medium="8"
|
|
248
|
+
col-span-expanded="${this.#u}"
|
|
249
|
+
>
|
|
250
|
+
<div class="center-row">
|
|
251
|
+
${e.map((e, t) => this.#p(e, t, !0))}
|
|
252
|
+
</div>
|
|
253
|
+
</scb-grid-item>
|
|
254
|
+
`), t;
|
|
255
|
+
for (let r = 0; r < n; r++) t.push(this.#f(e[r], r));
|
|
256
|
+
return t;
|
|
257
|
+
}
|
|
258
|
+
#f(e, t) {
|
|
259
|
+
return r`
|
|
260
|
+
<scb-grid-item
|
|
261
|
+
col-span-compact="4"
|
|
262
|
+
col-span-medium="4"
|
|
263
|
+
col-span-expanded="2"
|
|
264
|
+
>
|
|
265
|
+
${this.#p(e, t, !1)}
|
|
266
|
+
</scb-grid-item>
|
|
267
|
+
`;
|
|
268
|
+
}
|
|
269
|
+
#p(e, t, n) {
|
|
270
|
+
return r`
|
|
271
|
+
<section class="group ${n ? "group--centered" : ""}" aria-labelledby=${`scb-footer-sec-${t}`}>
|
|
272
|
+
<h3 id=${`scb-footer-sec-${t}`} class="title">${e.title}</h3>
|
|
273
|
+
<ul>
|
|
274
|
+
${e.links.map((e) => r`
|
|
275
|
+
<li>
|
|
276
|
+
<scb-link .href=${e.href} .target=${e.target ?? void 0}>${e.label}</scb-link>
|
|
277
|
+
</li>
|
|
278
|
+
`)}
|
|
279
|
+
</ul>
|
|
280
|
+
</section>
|
|
281
|
+
`;
|
|
282
|
+
}
|
|
283
|
+
render() {
|
|
284
|
+
let e = this.#c;
|
|
285
|
+
return r`
|
|
286
|
+
<footer class="outer" role="contentinfo">
|
|
287
|
+
<nav aria-label="Sidfot med länkar">
|
|
288
|
+
<scb-grid
|
|
289
|
+
.colsCompact=${4}
|
|
290
|
+
.colsMedium=${8}
|
|
291
|
+
.colsExpanded=${8}
|
|
292
|
+
padding-block="0"
|
|
293
|
+
.maxWidth=${this.maxWidth}
|
|
294
|
+
>
|
|
295
|
+
${this.#d(e)}
|
|
296
|
+
</scb-grid>
|
|
297
|
+
</nav>
|
|
298
|
+
|
|
299
|
+
<div class="brand">
|
|
300
|
+
<div class="brand-inner">
|
|
301
|
+
<svg class="logo" viewBox="0 0 48 54" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
302
|
+
<g clip-path="url(#clip0_4974_83818)">
|
|
303
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.6527 6.07812C25.6527 5.15909 24.9076 4.41482 23.9877 4.41482C23.0677 4.41482 22.3226 5.15909 22.3226 6.07812V48.0391C22.3226 48.9601 23.0677 49.7061 23.9877 49.7061C24.9076 49.7061 25.6527 48.9601 25.6527 48.0391V32.9153C25.6527 32.8056 25.744 32.7163 25.8527 32.7163H31.3245C31.4342 32.7163 31.5245 32.8056 31.5245 32.9153V48.1711C31.5245 51.3899 28.1496 54 23.9877 54C19.8241 54 16.4501 51.3899 16.4501 48.1711V5.82708C16.4501 2.6103 19.8241 0 23.9877 0C28.1496 0 31.5245 2.6103 31.5245 5.82708V20.8893C31.5245 21.0009 31.4342 21.0883 31.3245 21.0883H25.8527C25.744 21.0883 25.6527 21.0009 25.6527 20.8893V6.07812Z" fill="white"/>
|
|
304
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.198901 10.8446C-0.152687 13.293 -0.0290117 17.3078 0.49751 19.5627C1.07611 22.0203 4.41288 26.9878 5.91609 29.2948C7.42127 31.5999 9.42869 34.0073 9.39892 37.2185V44.9097C9.39892 45.8287 8.65375 46.5748 7.73382 46.5748C6.81659 46.5748 6.0715 45.8287 6.0715 44.9097V33.1217C6.0715 33.012 5.9803 32.9208 5.86868 32.9208H0.39893C0.287311 32.9208 0.198901 33.012 0.198901 33.1217V45.2613C0.198901 48.4798 3.57282 51.0901 7.73382 51.0901C11.8975 51.0901 15.2714 48.4798 15.2714 45.2613V37.2185C15.2463 31.7023 13.7412 30.8985 11.7877 27.5906C10.3886 25.2148 6.94682 20.3143 6.37003 17.8566C5.8417 15.6018 5.86491 12.9916 6.0715 10.6194C6.0715 9.70039 6.81659 8.95432 7.73382 8.95432C8.65375 8.95432 9.39892 9.70039 9.39892 10.6194V21.1032C9.39892 21.2129 9.48913 21.3022 9.60166 21.3022H15.0706C15.183 21.3022 15.2714 21.2129 15.2714 21.1032V10.8446C15.2714 7.62408 11.8975 5.01575 7.73382 5.01575C3.57282 5.01575 0.198901 7.62408 0.198901 10.8446Z" fill="white"/>
|
|
305
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.8911 5.46411H41.2883C44.7561 5.46411 47.5674 8.27534 47.5674 11.7414V20.547C47.5674 23.0158 45.9488 25.0995 43.7161 25.8139V25.933C45.9488 26.6456 47.5674 28.7312 47.5674 31.2018V44.6438C47.5674 47.6988 45.0873 50.1768 42.0344 50.1768L32.8911 50.1823C32.7786 50.1823 32.6892 50.0911 32.6892 49.9832V5.66324C32.6892 5.55539 32.7786 5.46411 32.8911 5.46411ZM38.7636 9.83067C38.6502 9.83067 38.5608 9.92179 38.5608 10.0316V23.9255C38.5608 24.039 38.6502 24.1284 38.7636 24.1284H39.5898C40.6948 24.1284 41.5916 23.2297 41.5916 22.1246V11.8343C41.5916 10.7293 40.6948 9.83067 39.5898 9.83067H38.7636ZM38.7636 28.5432C38.6502 28.5432 38.5608 28.6325 38.5608 28.7423V45.7971C38.5608 45.9088 38.6502 46 38.7636 46H39.7514C40.8584 46 41.7534 45.1014 41.7534 43.9962V30.5469C41.7534 29.4381 40.8584 28.5432 39.7514 28.5432H38.7636Z" fill="white"/>
|
|
306
|
+
</g>
|
|
307
|
+
<defs><clipPath id="clip0_4974_83818"><rect width="48" height="54" fill="white"/></clipPath></defs>
|
|
308
|
+
</svg>
|
|
309
|
+
|
|
310
|
+
<p class="desc">${this.description}</p>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</footer>
|
|
314
|
+
`;
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
e([a({
|
|
318
|
+
type: String,
|
|
319
|
+
attribute: "max-width",
|
|
320
|
+
reflect: !0,
|
|
321
|
+
converter: { fromAttribute: (e) => {
|
|
322
|
+
if (e == null) return "1440px";
|
|
323
|
+
let t = e.trim();
|
|
324
|
+
return t === "" ? "1440px" : /^\d+$/.test(t) ? `${t}px` : t;
|
|
325
|
+
} }
|
|
326
|
+
})], o.prototype, "maxWidth", void 0), e([a({
|
|
327
|
+
type: Boolean,
|
|
328
|
+
reflect: !0,
|
|
329
|
+
attribute: "defer-paint"
|
|
330
|
+
})], o.prototype, "deferPaint", void 0), e([a({
|
|
331
|
+
type: String,
|
|
332
|
+
reflect: !0
|
|
333
|
+
})], o.prototype, "spacing", void 0), e([a({
|
|
334
|
+
type: String,
|
|
335
|
+
attribute: "spacing-top",
|
|
336
|
+
reflect: !0
|
|
337
|
+
})], o.prototype, "spacingTop", void 0), e([a({
|
|
338
|
+
type: String,
|
|
339
|
+
attribute: "spacing-bottom",
|
|
340
|
+
reflect: !0
|
|
341
|
+
})], o.prototype, "spacingBottom", void 0), e([a({ type: Array })], o.prototype, "sections", void 0), e([a({ type: String })], o.prototype, "description", void 0), o = e([i("scb-footer")], o);
|
|
342
|
+
//#endregion
|
|
343
|
+
export { o as ScbFooter };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import "../scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
3
|
+
import "../scb-overlay/scb-overlay.js";
|
|
4
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
5
|
+
import { customElement as i, property as a, state as o } from "lit/decorators.js";
|
|
6
|
+
//#region src/scb-test-components/scb-gallery-grid/scb-gallery-grid.ts
|
|
7
|
+
var s = class extends t {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e), this.variant = "default", this.enableClickCarousel = !0, this.overlayOpen = !1, this.overlayIndex = 0, this.overlayImages = [], this.#e = [], this.#t = (e) => {
|
|
10
|
+
e.key === "Escape" && this.overlayOpen && this.#d();
|
|
11
|
+
}, this.#n = () => {
|
|
12
|
+
this.#c();
|
|
13
|
+
}, this.#r = (e) => {
|
|
14
|
+
if (!this.enableClickCarousel) return;
|
|
15
|
+
let t = e.currentTarget;
|
|
16
|
+
t instanceof HTMLElement && t.setAttribute("data-scb-gallery-hover", "");
|
|
17
|
+
}, this.#i = (e) => {
|
|
18
|
+
if (!this.enableClickCarousel) return;
|
|
19
|
+
let t = e.currentTarget;
|
|
20
|
+
t instanceof HTMLElement && t.removeAttribute("data-scb-gallery-hover");
|
|
21
|
+
}, this.#a = (e) => {
|
|
22
|
+
if (!this.enableClickCarousel) return;
|
|
23
|
+
let t = e.currentTarget;
|
|
24
|
+
if (!(t instanceof HTMLElement)) return;
|
|
25
|
+
let n = t.getAttribute("data-scb-gallery-slide-index");
|
|
26
|
+
if (n == null) return;
|
|
27
|
+
let r = Number(n);
|
|
28
|
+
Number.isFinite(r) && this.#u(r);
|
|
29
|
+
}, this.#d = () => {
|
|
30
|
+
this.overlayOpen = !1;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
#e;
|
|
34
|
+
static {
|
|
35
|
+
this.styles = n`
|
|
36
|
+
:host {
|
|
37
|
+
display: block;
|
|
38
|
+
--scb-gallery-grid-gap: var(--spacing-4, 12px);
|
|
39
|
+
--scb-gallery-grid-item-min: 180px;
|
|
40
|
+
--scb-gallery-grid-item-height: 220px;
|
|
41
|
+
--scb-gallery-grid-masonry-columns: 3;
|
|
42
|
+
--scb-gallery-overlay-max-width: 980px;
|
|
43
|
+
--scb-gallery-overlay-slide-height: min(68vh, 620px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.gallery {
|
|
47
|
+
display: grid;
|
|
48
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--scb-gallery-grid-item-min), 1fr));
|
|
49
|
+
gap: var(--scb-gallery-grid-gap);
|
|
50
|
+
align-items: start;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.gallery > slot {
|
|
54
|
+
display: contents;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.gallery ::slotted(*) {
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
inline-size: 100%;
|
|
60
|
+
min-inline-size: 0;
|
|
61
|
+
block-size: var(--scb-gallery-grid-item-height);
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
transition:
|
|
64
|
+
transform 160ms ease,
|
|
65
|
+
box-shadow 160ms ease;
|
|
66
|
+
will-change: transform;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.gallery ::slotted([data-scb-gallery-hover]) {
|
|
70
|
+
transform: translateY(-6px);
|
|
71
|
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.gallery ::slotted([data-scb-gallery-clickable]) {
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.gallery ::slotted(img),
|
|
79
|
+
.gallery ::slotted(picture),
|
|
80
|
+
.gallery ::slotted(video) {
|
|
81
|
+
inline-size: 100%;
|
|
82
|
+
block-size: 100%;
|
|
83
|
+
object-fit: cover;
|
|
84
|
+
display: block;
|
|
85
|
+
border-radius: var(--md-sys-shape-corner-medium, 12px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host([variant='masonry']) .gallery {
|
|
89
|
+
display: block;
|
|
90
|
+
column-count: var(--scb-gallery-grid-masonry-columns);
|
|
91
|
+
column-gap: var(--scb-gallery-grid-gap);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([variant='masonry']) .gallery ::slotted(*) {
|
|
95
|
+
break-inside: avoid;
|
|
96
|
+
-webkit-column-break-inside: avoid;
|
|
97
|
+
margin-block-end: var(--scb-gallery-grid-gap);
|
|
98
|
+
block-size: auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([variant='masonry']) .gallery ::slotted(img),
|
|
102
|
+
:host([variant='masonry']) .gallery ::slotted(picture),
|
|
103
|
+
:host([variant='masonry']) .gallery ::slotted(video) {
|
|
104
|
+
block-size: auto;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (max-width: 960px) {
|
|
108
|
+
:host([variant='masonry']) .gallery {
|
|
109
|
+
column-count: 2;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (max-width: 640px) {
|
|
114
|
+
:host([variant='masonry']) .gallery {
|
|
115
|
+
column-count: 1;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.overlay-dialog {
|
|
120
|
+
position: relative;
|
|
121
|
+
inline-size: min(var(--scb-gallery-overlay-max-width), 100%);
|
|
122
|
+
max-block-size: 100%;
|
|
123
|
+
border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
124
|
+
background: var(--md-sys-color-surface-container-low, #1f1f1f);
|
|
125
|
+
padding: var(--spacing-4, 12px);
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.overlay-slide {
|
|
130
|
+
inline-size: 100%;
|
|
131
|
+
flex: 0 0 100%;
|
|
132
|
+
block-size: var(--scb-gallery-overlay-slide-height);
|
|
133
|
+
border-radius: var(--md-sys-shape-corner-large, 16px);
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
box-shadow: inset 0 0 0 2px transparent;
|
|
136
|
+
transition: box-shadow 160ms ease;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.overlay-slide img {
|
|
140
|
+
inline-size: 100%;
|
|
141
|
+
block-size: 100%;
|
|
142
|
+
object-fit: contain;
|
|
143
|
+
display: block;
|
|
144
|
+
}
|
|
145
|
+
`;
|
|
146
|
+
}
|
|
147
|
+
connectedCallback() {
|
|
148
|
+
super.connectedCallback(), window.addEventListener("keydown", this.#t);
|
|
149
|
+
}
|
|
150
|
+
disconnectedCallback() {
|
|
151
|
+
window.removeEventListener("keydown", this.#t), this.#o(), super.disconnectedCallback();
|
|
152
|
+
}
|
|
153
|
+
firstUpdated() {
|
|
154
|
+
this.#c();
|
|
155
|
+
}
|
|
156
|
+
updated(e) {
|
|
157
|
+
e.has("enableClickCarousel") && (this.enableClickCarousel || this.#d(), this.#c());
|
|
158
|
+
}
|
|
159
|
+
#t;
|
|
160
|
+
#n;
|
|
161
|
+
#r;
|
|
162
|
+
#i;
|
|
163
|
+
#a;
|
|
164
|
+
#o() {
|
|
165
|
+
this.#e.forEach((e) => {
|
|
166
|
+
e.removeEventListener("pointerenter", this.#r), e.removeEventListener("pointerleave", this.#i), e.removeEventListener("click", this.#a), e.removeAttribute("data-scb-gallery-hover"), e.removeAttribute("data-scb-gallery-clickable"), e.removeAttribute("data-scb-gallery-slide-index");
|
|
167
|
+
}), this.#e = [];
|
|
168
|
+
}
|
|
169
|
+
#s(e) {
|
|
170
|
+
if (e instanceof HTMLImageElement) {
|
|
171
|
+
let t = e.currentSrc || e.src;
|
|
172
|
+
return t ? {
|
|
173
|
+
src: t,
|
|
174
|
+
alt: e.alt || "Galleri-bild"
|
|
175
|
+
} : null;
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
#c() {
|
|
180
|
+
this.#o();
|
|
181
|
+
let e = this.renderRoot.querySelector("slot");
|
|
182
|
+
if (!(e instanceof HTMLSlotElement)) {
|
|
183
|
+
this.overlayImages = [];
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
let t = e.assignedElements({ flatten: !0 }).filter((e) => e instanceof HTMLElement);
|
|
187
|
+
this.#e = t;
|
|
188
|
+
let n = [];
|
|
189
|
+
t.forEach((e) => {
|
|
190
|
+
if (!this.enableClickCarousel) return;
|
|
191
|
+
let t = this.#s(e);
|
|
192
|
+
if (!t) return;
|
|
193
|
+
e.addEventListener("pointerenter", this.#r), e.addEventListener("pointerleave", this.#i);
|
|
194
|
+
let r = n.length;
|
|
195
|
+
n.push(t), e.setAttribute("data-scb-gallery-clickable", ""), e.setAttribute("data-scb-gallery-slide-index", String(r)), e.addEventListener("click", this.#a);
|
|
196
|
+
}), this.overlayImages = n;
|
|
197
|
+
}
|
|
198
|
+
#l() {
|
|
199
|
+
if (this.overlayImages.length === 0) return [];
|
|
200
|
+
let e = Math.max(0, Math.min(this.overlayIndex, this.overlayImages.length - 1));
|
|
201
|
+
return [...this.overlayImages.slice(e), ...this.overlayImages.slice(0, e)];
|
|
202
|
+
}
|
|
203
|
+
#u(e) {
|
|
204
|
+
if (!this.enableClickCarousel || this.overlayImages.length === 0) return;
|
|
205
|
+
let t = Math.max(0, Math.min(e, this.overlayImages.length - 1));
|
|
206
|
+
this.overlayIndex = t, this.overlayOpen = !0;
|
|
207
|
+
}
|
|
208
|
+
#d;
|
|
209
|
+
render() {
|
|
210
|
+
return r`
|
|
211
|
+
<div class="gallery">
|
|
212
|
+
<slot @slotchange=${this.#n}></slot>
|
|
213
|
+
</div>
|
|
214
|
+
${this.overlayOpen && this.enableClickCarousel ? r`
|
|
215
|
+
<scb-overlay open aria-label="Bildkarusell" @scb-overlay-dismiss=${this.#d}>
|
|
216
|
+
<div class="overlay-dialog">
|
|
217
|
+
<scb-horizontal-scroller show-scrollbar class="overlay-carousel" variant="standard" width="100%" content-flex internal-gap="0">
|
|
218
|
+
${this.#l().map((e, t) => r`
|
|
219
|
+
<div
|
|
220
|
+
class="overlay-slide ${t === 0 ? "is-active" : ""}"
|
|
221
|
+
data-overlay-slide-index="${t}"
|
|
222
|
+
>
|
|
223
|
+
<img src="${e.src}" alt="${e.alt}" />
|
|
224
|
+
</div>
|
|
225
|
+
`)}
|
|
226
|
+
</scb-horizontal-scroller>
|
|
227
|
+
</div>
|
|
228
|
+
</scb-overlay>
|
|
229
|
+
` : ""}
|
|
230
|
+
`;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
e([a({
|
|
234
|
+
type: String,
|
|
235
|
+
reflect: !0
|
|
236
|
+
})], s.prototype, "variant", void 0), e([a({
|
|
237
|
+
type: Boolean,
|
|
238
|
+
reflect: !0,
|
|
239
|
+
attribute: "enable-carousel"
|
|
240
|
+
})], s.prototype, "enableClickCarousel", void 0), e([o()], s.prototype, "overlayOpen", void 0), e([o()], s.prototype, "overlayIndex", void 0), e([o()], s.prototype, "overlayImages", void 0), s = e([i("scb-gallery-grid")], s);
|
|
241
|
+
//#endregion
|
|
242
|
+
export { s as ScbGalleryGrid };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
3
|
+
import { customElement as i, property as a } from "lit/decorators.js";
|
|
4
|
+
//#region src/scb-test-components/scb-grid/scb-grid-item.ts
|
|
5
|
+
var o = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.fit = !1;
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.styles = n`
|
|
11
|
+
:host {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: block;
|
|
14
|
+
align-self: var(--scb-grid-item-align, auto);
|
|
15
|
+
justify-self: var(--scb-grid-item-justify, auto);
|
|
16
|
+
block-size: auto;
|
|
17
|
+
}
|
|
18
|
+
:host([fit]) { block-size: 100%; }
|
|
19
|
+
:host([fit]) ::slotted(*) { block-size: 100%; }
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
firstUpdated() {
|
|
23
|
+
this.#e();
|
|
24
|
+
}
|
|
25
|
+
updated() {
|
|
26
|
+
this.#e();
|
|
27
|
+
}
|
|
28
|
+
#e() {
|
|
29
|
+
this.#t("--col-span", this.hasAttribute("col-span") ? String(this.colSpan) : null), this.#t("--col-span-compact", this.hasAttribute("col-span-compact") ? String(this.colSpanCompact) : null), this.#t("--col-span-medium", this.hasAttribute("col-span-medium") ? String(this.colSpanMedium) : null), this.#t("--col-span-expanded", this.hasAttribute("col-span-expanded") ? String(this.colSpanExpanded) : null), this.#t("--row-rule", this.hasAttribute("row-span") ? `span ${this.rowSpan}` : null), this.#t("--row-rule-compact", this.hasAttribute("row-span-compact") ? `span ${this.rowSpanCompact}` : null), this.#t("--row-rule-medium", this.hasAttribute("row-span-medium") ? `span ${this.rowSpanMedium}` : null), this.#t("--row-rule-expanded", this.hasAttribute("row-span-expanded") ? `span ${this.rowSpanExpanded}` : null), this.align ? (this.style.setProperty("--scb-grid-item-align", this.align), this.style.setProperty("align-self", this.align)) : (this.style.removeProperty("--scb-grid-item-align"), this.style.removeProperty("align-self")), this.justify ? (this.style.setProperty("--scb-grid-item-justify", this.justify), this.style.setProperty("justify-self", this.justify)) : (this.style.removeProperty("--scb-grid-item-justify"), this.style.removeProperty("justify-self"));
|
|
30
|
+
}
|
|
31
|
+
#t(e, t) {
|
|
32
|
+
t === null || t === "" ? this.style.removeProperty(e) : this.style.setProperty(e, t);
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return r`<slot></slot>`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
e([a({
|
|
39
|
+
type: Number,
|
|
40
|
+
attribute: "col-span",
|
|
41
|
+
reflect: !0
|
|
42
|
+
})], o.prototype, "colSpan", void 0), e([a({
|
|
43
|
+
type: Number,
|
|
44
|
+
attribute: "col-span-compact",
|
|
45
|
+
reflect: !0
|
|
46
|
+
})], o.prototype, "colSpanCompact", void 0), e([a({
|
|
47
|
+
type: Number,
|
|
48
|
+
attribute: "col-span-medium",
|
|
49
|
+
reflect: !0
|
|
50
|
+
})], o.prototype, "colSpanMedium", void 0), e([a({
|
|
51
|
+
type: Number,
|
|
52
|
+
attribute: "col-span-expanded",
|
|
53
|
+
reflect: !0
|
|
54
|
+
})], o.prototype, "colSpanExpanded", void 0), e([a({
|
|
55
|
+
type: Number,
|
|
56
|
+
attribute: "row-span",
|
|
57
|
+
reflect: !0
|
|
58
|
+
})], o.prototype, "rowSpan", void 0), e([a({
|
|
59
|
+
type: Number,
|
|
60
|
+
attribute: "row-span-compact",
|
|
61
|
+
reflect: !0
|
|
62
|
+
})], o.prototype, "rowSpanCompact", void 0), e([a({
|
|
63
|
+
type: Number,
|
|
64
|
+
attribute: "row-span-medium",
|
|
65
|
+
reflect: !0
|
|
66
|
+
})], o.prototype, "rowSpanMedium", void 0), e([a({
|
|
67
|
+
type: Number,
|
|
68
|
+
attribute: "row-span-expanded",
|
|
69
|
+
reflect: !0
|
|
70
|
+
})], o.prototype, "rowSpanExpanded", void 0), e([a({
|
|
71
|
+
type: String,
|
|
72
|
+
reflect: !0
|
|
73
|
+
})], o.prototype, "align", void 0), e([a({
|
|
74
|
+
type: String,
|
|
75
|
+
reflect: !0
|
|
76
|
+
})], o.prototype, "justify", void 0), e([a({
|
|
77
|
+
type: Boolean,
|
|
78
|
+
reflect: !0
|
|
79
|
+
})], o.prototype, "fit", void 0), o = e([i("scb-grid-item")], o);
|
|
80
|
+
//#endregion
|
|
81
|
+
export { o as ScbGridItem };
|