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,190 @@
|
|
|
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, nothing as i } from "lit";
|
|
3
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
4
|
+
import "@material/web/icon/icon.js";
|
|
5
|
+
import "@material/web/fab/fab.js";
|
|
6
|
+
//#region src/scb-test-components/scb-fab/scb-fab.ts
|
|
7
|
+
var s = class extends t {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e), this.icon = "edit", this.label = "Redigera", this.ariaLabel = "Redigera", this.size = "small", this.type = "regular", this.disabled = !1, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this.#e = (e) => {
|
|
10
|
+
this.disabled && (e.preventDefault(), e.stopImmediatePropagation());
|
|
11
|
+
}, this.#t = (e) => {
|
|
12
|
+
this.disabled && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopImmediatePropagation());
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.styles = n`
|
|
17
|
+
:host {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
|
|
20
|
+
/* Default är medium */
|
|
21
|
+
--scb-fab-padding: calc(var(--spacing-7) + var(--spacing-2));
|
|
22
|
+
--scb-fab-icon-size: var(--icon-size-medium, 24px);
|
|
23
|
+
--scb-fab-shape-radius: var(--radius-l, 16px);
|
|
24
|
+
|
|
25
|
+
/* Storleken drivs av padding runt ikonen */
|
|
26
|
+
--scb-fab-container-size: calc(
|
|
27
|
+
var(--scb-fab-icon-size) + (var(--scb-fab-padding) * 2)
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
/* Yttre avstånd */
|
|
31
|
+
--scb-fab-spacing-block-start: 0px;
|
|
32
|
+
--scb-fab-spacing-block-end: 0px;
|
|
33
|
+
--scb-fab-spacing-inline-start: 0px;
|
|
34
|
+
--scb-fab-spacing-inline-end: 0px;
|
|
35
|
+
|
|
36
|
+
margin-block-start: var(--scb-fab-spacing-block-start, 0px);
|
|
37
|
+
margin-block-end: var(--scb-fab-spacing-block-end, 0px);
|
|
38
|
+
margin-inline-start: var(--scb-fab-spacing-inline-start, 0px);
|
|
39
|
+
margin-inline-end: var(--scb-fab-spacing-inline-end, 0px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([size='small']) {
|
|
43
|
+
--scb-fab-padding: calc(var(--spacing-5) + var(--spacing-1));
|
|
44
|
+
--scb-fab-icon-size: var(--icon-size-small, 20px);
|
|
45
|
+
--scb-fab-shape-radius: var(--radius-l, 16px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([size='medium']) {
|
|
49
|
+
--scb-fab-padding: calc(var(--spacing-7) + var(--spacing-2));
|
|
50
|
+
--scb-fab-icon-size: var(--icon-size-medium, 24px);
|
|
51
|
+
--scb-fab-shape-radius: var(--radius-l, 16px);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([size='large']) {
|
|
55
|
+
--scb-fab-padding: calc(var(--spacing-8) - var(--spacing-1));
|
|
56
|
+
--scb-fab-icon-size: var(--icon-size-extra-large, 36px);
|
|
57
|
+
--scb-fab-shape-radius: var(--radius-l, 16px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
md-fab {
|
|
61
|
+
/* Ikonstorlek */
|
|
62
|
+
--md-fab-icon-size: var(--scb-fab-icon-size);
|
|
63
|
+
--md-fab-small-icon-size: var(--scb-fab-icon-size);
|
|
64
|
+
--md-fab-large-icon-size: var(--scb-fab-icon-size);
|
|
65
|
+
|
|
66
|
+
/* Form (square) */
|
|
67
|
+
--md-fab-container-shape: var(--scb-fab-shape-radius);
|
|
68
|
+
--md-fab-small-container-shape: var(--scb-fab-shape-radius);
|
|
69
|
+
--md-fab-large-container-shape: var(--scb-fab-shape-radius);
|
|
70
|
+
--md-fab-extended-container-shape: var(--scb-fab-shape-radius);
|
|
71
|
+
|
|
72
|
+
/* Sätt storlek genom container-tokens som härleds från padding */
|
|
73
|
+
--md-fab-container-height: var(--scb-fab-container-size);
|
|
74
|
+
--md-fab-container-width: var(--scb-fab-container-size);
|
|
75
|
+
|
|
76
|
+
--md-fab-small-container-height: var(--scb-fab-container-size);
|
|
77
|
+
--md-fab-small-container-width: var(--scb-fab-container-size);
|
|
78
|
+
|
|
79
|
+
--md-fab-large-container-height: var(--scb-fab-container-size);
|
|
80
|
+
--md-fab-large-container-width: var(--scb-fab-container-size);
|
|
81
|
+
|
|
82
|
+
--md-fab-extended-container-height: var(--scb-fab-container-size);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([disabled]) md-fab {
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
|
|
88
|
+
/* Disabled ska bete sig som disabled knapp */
|
|
89
|
+
--md-fab-container-color: color-mix(
|
|
90
|
+
in srgb,
|
|
91
|
+
var(--md-sys-color-on-surface) 12%,
|
|
92
|
+
transparent
|
|
93
|
+
);
|
|
94
|
+
--md-fab-icon-color: color-mix(
|
|
95
|
+
in srgb,
|
|
96
|
+
var(--md-sys-color-on-surface) 38%,
|
|
97
|
+
transparent
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
md-icon {
|
|
103
|
+
/* Säkerställ att ikonen inte ärver font-size från omgivande typografi */
|
|
104
|
+
--md-icon-size: var(--scb-fab-icon-size);
|
|
105
|
+
font-size: var(--scb-fab-icon-size) !important;
|
|
106
|
+
line-height: 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
svg[slot="icon"],
|
|
110
|
+
img[slot="icon"] {
|
|
111
|
+
inline-size: var(--scb-fab-icon-size);
|
|
112
|
+
block-size: var(--scb-fab-icon-size);
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
super.connectedCallback(), this.addEventListener("click", this.#e, !0), this.addEventListener("keydown", this.#t, !0);
|
|
118
|
+
}
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
this.removeEventListener("click", this.#e, !0), this.removeEventListener("keydown", this.#t, !0), super.disconnectedCallback();
|
|
121
|
+
}
|
|
122
|
+
#e;
|
|
123
|
+
#t;
|
|
124
|
+
firstUpdated() {
|
|
125
|
+
this.#n();
|
|
126
|
+
}
|
|
127
|
+
updated(e) {
|
|
128
|
+
super.updated(e), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#n();
|
|
129
|
+
}
|
|
130
|
+
mapSpacing(e) {
|
|
131
|
+
let t = (e ?? "").trim();
|
|
132
|
+
if (!t) return;
|
|
133
|
+
let n = Number(t);
|
|
134
|
+
return Number.isFinite(n) && n >= 0 && n <= 14 && String(n) === t ? `var(--spacing-${n})` : t;
|
|
135
|
+
}
|
|
136
|
+
#n() {
|
|
137
|
+
let e = this.mapSpacing(this.spacing), t = this.mapSpacing(this.spacingTop) ?? e, n = this.mapSpacing(this.spacingBottom) ?? e, r = this.mapSpacing(this.spacingLeft), i = this.mapSpacing(this.spacingRight);
|
|
138
|
+
this.style.setProperty("--scb-fab-spacing-block-start", t ?? "0px"), this.style.setProperty("--scb-fab-spacing-block-end", n ?? "0px"), this.style.setProperty("--scb-fab-spacing-inline-start", r ?? "0px"), this.style.setProperty("--scb-fab-spacing-inline-end", i ?? "0px");
|
|
139
|
+
}
|
|
140
|
+
__renderMd() {
|
|
141
|
+
let e = this.type === "extended" ? (this.label ?? "").trim() : "", t = (this.ariaLabel ?? "").trim() || e;
|
|
142
|
+
return r`
|
|
143
|
+
<md-fab
|
|
144
|
+
size="${this.size}"
|
|
145
|
+
?disabled=${this.disabled}
|
|
146
|
+
aria-label=${t || i}
|
|
147
|
+
label=${e || i}
|
|
148
|
+
>
|
|
149
|
+
${this.icon ? r`<md-icon slot="icon">${this.icon}</md-icon>` : i}
|
|
150
|
+
</md-fab>
|
|
151
|
+
`;
|
|
152
|
+
}
|
|
153
|
+
render() {
|
|
154
|
+
return this.__renderMd();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
e([o({ type: String })], s.prototype, "icon", void 0), e([o({ type: String })], s.prototype, "label", void 0), e([o({
|
|
158
|
+
type: String,
|
|
159
|
+
attribute: "aria-label"
|
|
160
|
+
})], s.prototype, "ariaLabel", void 0), e([o({
|
|
161
|
+
type: String,
|
|
162
|
+
reflect: !0
|
|
163
|
+
})], s.prototype, "size", void 0), e([o({
|
|
164
|
+
type: String,
|
|
165
|
+
reflect: !0
|
|
166
|
+
})], s.prototype, "type", void 0), e([o({
|
|
167
|
+
type: Boolean,
|
|
168
|
+
reflect: !0
|
|
169
|
+
})], s.prototype, "disabled", void 0), e([o({
|
|
170
|
+
type: String,
|
|
171
|
+
reflect: !0
|
|
172
|
+
})], s.prototype, "spacing", void 0), e([o({
|
|
173
|
+
type: String,
|
|
174
|
+
attribute: "spacing-top",
|
|
175
|
+
reflect: !0
|
|
176
|
+
})], s.prototype, "spacingTop", void 0), e([o({
|
|
177
|
+
type: String,
|
|
178
|
+
attribute: "spacing-bottom",
|
|
179
|
+
reflect: !0
|
|
180
|
+
})], s.prototype, "spacingBottom", void 0), e([o({
|
|
181
|
+
type: String,
|
|
182
|
+
attribute: "spacing-left",
|
|
183
|
+
reflect: !0
|
|
184
|
+
})], s.prototype, "spacingLeft", void 0), e([o({
|
|
185
|
+
type: String,
|
|
186
|
+
attribute: "spacing-right",
|
|
187
|
+
reflect: !0
|
|
188
|
+
})], s.prototype, "spacingRight", void 0), s = e([a("scb-fab")], s);
|
|
189
|
+
//#endregion
|
|
190
|
+
export { s as ScbFab };
|
|
@@ -0,0 +1,82 @@
|
|
|
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-fact-card/scb-fact-card-content.ts
|
|
5
|
+
var o = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.title = "", this.factCardTitle = "", this.subtitle = "", this.supportingText = "";
|
|
8
|
+
}
|
|
9
|
+
get #e() {
|
|
10
|
+
return this.factCardTitle || this.title;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = n`
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: var(--scb-fact-card-content-block-gap, var(--spacing-4, 12px));
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.label {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
align-items: center;
|
|
25
|
+
font-size: var(--scb-fact-card-content-title-size, var(--md-sys-typescale-headline-small-size, 22px));
|
|
26
|
+
font-weight: var(--weight-bold, 700);
|
|
27
|
+
line-height: var(--scb-fact-card-content-title-line-height, var(--md-sys-typescale-headline-small-line-height, 28px));
|
|
28
|
+
letter-spacing: var(--scb-fact-card-content-title-letter-spacing, var(--md-sys-typescale-headline-small-tracking, -0.5px));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sub-label {
|
|
32
|
+
font-size: var(--scb-fact-card-content-subtitle-size, var(--md-sys-typescale-title-medium-size, 18px));
|
|
33
|
+
font-weight: var(--weight-semibold, 600);
|
|
34
|
+
line-height: var(--scb-fact-card-content-subtitle-line-height, var(--md-sys-typescale-title-medium-line-height, 26px));
|
|
35
|
+
letter-spacing: var(--scb-fact-card-content-subtitle-letter-spacing, var(--md-sys-typescale-title-medium-tracking, -0.3px));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.supporting-text {
|
|
39
|
+
font-size: var(--scb-fact-card-content-supporting-size, var(--md-sys-typescale-body-medium-size, 16px));
|
|
40
|
+
line-height: var(--scb-fact-card-content-supporting-line-height, var(--md-sys-typescale-body-medium-line-height, 24px));
|
|
41
|
+
letter-spacing: var(--scb-fact-card-content-supporting-letter-spacing, var(--md-sys-typescale-body-medium-tracking, -0.15px));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.content.links ::slotted(*) {
|
|
45
|
+
margin-top: var(--scb-fact-card-content-links-offset, var(--spacing-3, 8px));
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: var(--scb-fact-card-content-links-gap, var(--spacing-3, 8px));
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return r`
|
|
54
|
+
${this.#e ? r`<div class="label">${this.#e}</div>` : ""}
|
|
55
|
+
${this.subtitle ? r`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
56
|
+
${this.supportingText ? r`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
57
|
+
|
|
58
|
+
<div class="content links">
|
|
59
|
+
<slot></slot>
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
e([a({
|
|
65
|
+
type: String,
|
|
66
|
+
reflect: !0,
|
|
67
|
+
attribute: "title"
|
|
68
|
+
})], o.prototype, "title", void 0), e([a({
|
|
69
|
+
type: String,
|
|
70
|
+
reflect: !0,
|
|
71
|
+
attribute: "fact-card-title"
|
|
72
|
+
})], o.prototype, "factCardTitle", void 0), e([a({
|
|
73
|
+
type: String,
|
|
74
|
+
reflect: !0,
|
|
75
|
+
attribute: "subtitle"
|
|
76
|
+
})], o.prototype, "subtitle", void 0), e([a({
|
|
77
|
+
type: String,
|
|
78
|
+
reflect: !0,
|
|
79
|
+
attribute: "supporting-text"
|
|
80
|
+
})], o.prototype, "supportingText", void 0), o = e([i("scb-fact-card-content")], o);
|
|
81
|
+
//#endregion
|
|
82
|
+
export { o as ScbFactCardContent };
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import "../scb-icon-button/scb-icon-button.js";
|
|
3
|
+
import "../scb-link/scb-link.js";
|
|
4
|
+
import "./scb-fact-card-content.js";
|
|
5
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
6
|
+
import { customElement as i, property as a } from "lit/decorators.js";
|
|
7
|
+
//#region src/scb-test-components/scb-fact-card/scb-fact-card.ts
|
|
8
|
+
var o, s = class extends t {
|
|
9
|
+
static {
|
|
10
|
+
o = this;
|
|
11
|
+
}
|
|
12
|
+
constructor(...e) {
|
|
13
|
+
super(...e), this.__onCloseClick = (e) => {
|
|
14
|
+
e.stopPropagation(), this.__setOpen(!1);
|
|
15
|
+
}, this.variant = "filled", this.size = "large", this.title = "", this.subtitle = "", this.supportingText = "", this.icon = "", this.showCloseButton = !1, this.open = !0, this.__lastTriggerEl = null, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.__iconLoaded = !1;
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.__instances = /* @__PURE__ */ new Map();
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.__docListenerAttached = !1;
|
|
25
|
+
}
|
|
26
|
+
static __handleDocClick(e) {
|
|
27
|
+
let t = e.composedPath();
|
|
28
|
+
for (let e of t) {
|
|
29
|
+
if (!(e instanceof Element)) continue;
|
|
30
|
+
let t = e.getAttribute("data-fact-card-toggle") || e.getAttribute("aria-controls");
|
|
31
|
+
if (!t) continue;
|
|
32
|
+
let n = o.__instances.get(t);
|
|
33
|
+
if (!n) {
|
|
34
|
+
o.__instances.delete(t);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
n.__lastTriggerEl = e, n.__setOpen(!n.open);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
static __ensureDocListener() {
|
|
42
|
+
o.__docListenerAttached || (document.addEventListener("click", o.__handleDocClick, !0), o.__docListenerAttached = !0);
|
|
43
|
+
}
|
|
44
|
+
static __maybeRemoveDocListener() {
|
|
45
|
+
o.__docListenerAttached && o.__instances.size === 0 && (document.removeEventListener("click", o.__handleDocClick, !0), o.__docListenerAttached = !1);
|
|
46
|
+
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
super.connectedCallback(), this.id && o.__instances.set(this.id, this), o.__ensureDocListener();
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this.id && o.__instances.delete(this.id), o.__maybeRemoveDocListener(), super.disconnectedCallback();
|
|
52
|
+
}
|
|
53
|
+
updated(e) {
|
|
54
|
+
e.has("open") && this.__updateTriggersExpanded(), e.has("width") && (this.width ? this.style.inlineSize = this.width : this.style.removeProperty("inline-size")), e.has("maxWidth") && (this.maxWidth ? this.style.maxInlineSize = this.maxWidth : this.style.removeProperty("max-inline-size")), e.has("height") && (this.height ? this.style.blockSize = this.height : this.style.removeProperty("block-size")), e.has("maxHeight") && (this.maxHeight ? this.style.maxBlockSize = this.maxHeight : this.style.removeProperty("max-block-size")), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#e();
|
|
55
|
+
}
|
|
56
|
+
__updateTriggersExpanded() {
|
|
57
|
+
this.id && document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach((e) => {
|
|
58
|
+
e.hasAttribute("aria-controls") && e.setAttribute("aria-expanded", String(this.open));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
__setOpen(e) {
|
|
62
|
+
let t = this.open;
|
|
63
|
+
t !== e && (this.open = e, this.dispatchEvent(new CustomEvent("openchange", {
|
|
64
|
+
bubbles: !0,
|
|
65
|
+
composed: !0,
|
|
66
|
+
detail: { open: this.open }
|
|
67
|
+
})), e && !t ? this.dispatchEvent(new CustomEvent("open", {
|
|
68
|
+
bubbles: !0,
|
|
69
|
+
composed: !0
|
|
70
|
+
})) : !e && t && this.dispatchEvent(new CustomEvent("close", {
|
|
71
|
+
bubbles: !0,
|
|
72
|
+
composed: !0
|
|
73
|
+
})));
|
|
74
|
+
}
|
|
75
|
+
static {
|
|
76
|
+
this.styles = n`
|
|
77
|
+
:host {
|
|
78
|
+
--scb-fact-card-icon-overhang: 40px;
|
|
79
|
+
display: block;
|
|
80
|
+
position: relative;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
min-inline-size: 0;
|
|
84
|
+
max-inline-size: var(--scb-fact-card-max-w, none);
|
|
85
|
+
height: auto;
|
|
86
|
+
padding: 0;
|
|
87
|
+
margin-block-start: var(--scb-fact-card-spacing-block-start, 0);
|
|
88
|
+
margin-block-end: var(--scb-fact-card-spacing-block-end, 0);
|
|
89
|
+
margin-inline-start: var(--scb-fact-card-spacing-inline-start, 0);
|
|
90
|
+
margin-inline-end: var(--scb-fact-card-spacing-inline-end, 0);
|
|
91
|
+
|
|
92
|
+
--scb-fact-card-padding: var(--spacing-7, 24px);
|
|
93
|
+
--scb-fact-card-content-gap: var(--spacing-8, 32px);
|
|
94
|
+
--scb-fact-card-close-padding-right: var(--spacing-12, 80px);
|
|
95
|
+
--scb-fact-card-icon-padding-block: var(--spacing-5, 16px);
|
|
96
|
+
--scb-fact-card-icon-padding-inline: var(--spacing-7, 24px);
|
|
97
|
+
|
|
98
|
+
--scb-fact-card-content-title-size: var(--md-sys-typescale-headline-small-size, 22px);
|
|
99
|
+
--scb-fact-card-content-title-line-height: var(--md-sys-typescale-headline-small-line-height, 28px);
|
|
100
|
+
--scb-fact-card-content-title-letter-spacing: var(--md-sys-typescale-headline-small-tracking, -0.5px);
|
|
101
|
+
|
|
102
|
+
--scb-fact-card-content-subtitle-size: var(--md-sys-typescale-title-medium-size, 18px);
|
|
103
|
+
--scb-fact-card-content-subtitle-line-height: var(--md-sys-typescale-title-medium-line-height, 26px);
|
|
104
|
+
--scb-fact-card-content-subtitle-letter-spacing: var(--md-sys-typescale-title-medium-tracking, -0.3px);
|
|
105
|
+
|
|
106
|
+
--scb-fact-card-content-supporting-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
107
|
+
--scb-fact-card-content-supporting-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
108
|
+
--scb-fact-card-content-supporting-letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
109
|
+
|
|
110
|
+
--scb-fact-card-content-links-gap: var(--spacing-3, 8px);
|
|
111
|
+
--scb-fact-card-content-links-offset: var(--spacing-3, 8px);
|
|
112
|
+
--scb-fact-card-content-block-gap: var(--spacing-4, 12px);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:host([size='medium']) {
|
|
116
|
+
--scb-fact-card-icon-overhang: 36px;
|
|
117
|
+
--scb-fact-card-padding: var(--spacing-6, 20px);
|
|
118
|
+
--scb-fact-card-content-gap: var(--spacing-6, 20px);
|
|
119
|
+
--scb-fact-card-close-padding-right: var(--spacing-11, 64px);
|
|
120
|
+
--scb-fact-card-icon-padding-block: var(--spacing-4, 12px);
|
|
121
|
+
--scb-fact-card-icon-padding-inline: var(--spacing-6, 20px);
|
|
122
|
+
|
|
123
|
+
--scb-fact-card-content-title-size: var(--md-sys-typescale-title-large-size, 20px);
|
|
124
|
+
--scb-fact-card-content-title-line-height: var(--md-sys-typescale-title-large-line-height, 28px);
|
|
125
|
+
--scb-fact-card-content-title-letter-spacing: var(--md-sys-typescale-title-large-tracking, -0.3px);
|
|
126
|
+
|
|
127
|
+
--scb-fact-card-content-subtitle-size: var(--md-sys-typescale-title-small-size, 16px);
|
|
128
|
+
--scb-fact-card-content-subtitle-line-height: var(--md-sys-typescale-title-small-line-height, 24px);
|
|
129
|
+
--scb-fact-card-content-subtitle-letter-spacing: var(--md-sys-typescale-title-small-tracking, -0.2px);
|
|
130
|
+
|
|
131
|
+
--scb-fact-card-content-supporting-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
132
|
+
--scb-fact-card-content-supporting-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
133
|
+
--scb-fact-card-content-supporting-letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
134
|
+
|
|
135
|
+
--scb-fact-card-content-links-gap: var(--spacing-2, 4px);
|
|
136
|
+
--scb-fact-card-content-links-offset: var(--spacing-2, 4px);
|
|
137
|
+
--scb-fact-card-content-block-gap: var(--spacing-3, 8px);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([size='small']) {
|
|
141
|
+
--scb-fact-card-icon-overhang: 32px;
|
|
142
|
+
--scb-fact-card-padding: var(--spacing-5, 16px);
|
|
143
|
+
--scb-fact-card-content-gap: var(--spacing-5, 16px);
|
|
144
|
+
--scb-fact-card-close-padding-right: var(--spacing-10, 56px);
|
|
145
|
+
--scb-fact-card-icon-padding-block: var(--spacing-3, 8px);
|
|
146
|
+
--scb-fact-card-icon-padding-inline: var(--spacing-5, 16px);
|
|
147
|
+
|
|
148
|
+
--scb-fact-card-content-title-size: var(--md-sys-typescale-title-medium-size, 18px);
|
|
149
|
+
--scb-fact-card-content-title-line-height: var(--md-sys-typescale-title-medium-line-height, 26px);
|
|
150
|
+
--scb-fact-card-content-title-letter-spacing: var(--md-sys-typescale-title-medium-tracking, -0.3px);
|
|
151
|
+
|
|
152
|
+
--scb-fact-card-content-subtitle-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
153
|
+
--scb-fact-card-content-subtitle-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
154
|
+
--scb-fact-card-content-subtitle-letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
155
|
+
|
|
156
|
+
--scb-fact-card-content-supporting-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
157
|
+
--scb-fact-card-content-supporting-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
158
|
+
--scb-fact-card-content-supporting-letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
159
|
+
|
|
160
|
+
--scb-fact-card-content-links-gap: var(--spacing-2, 4px);
|
|
161
|
+
--scb-fact-card-content-links-offset: var(--spacing-2, 4px);
|
|
162
|
+
--scb-fact-card-content-block-gap: var(--spacing-2, 4px);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:host([sizing='stretch']) {
|
|
166
|
+
inline-size: 100%;
|
|
167
|
+
block-size: 100%;
|
|
168
|
+
max-inline-size: none;
|
|
169
|
+
}
|
|
170
|
+
:host([sizing='content-width']) {
|
|
171
|
+
display: inline-block;
|
|
172
|
+
inline-size: auto;
|
|
173
|
+
block-size: auto;
|
|
174
|
+
max-inline-size: var(--scb-fact-card-max-w, none);
|
|
175
|
+
}
|
|
176
|
+
:host([sizing='content-height']) {
|
|
177
|
+
inline-size: 100%;
|
|
178
|
+
block-size: auto;
|
|
179
|
+
max-inline-size: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.outer {
|
|
183
|
+
position: relative;
|
|
184
|
+
inline-size: 100%;
|
|
185
|
+
max-inline-size: 100%;
|
|
186
|
+
--_icon-pad: 0px;
|
|
187
|
+
padding-top: var(--_icon-pad);
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
}
|
|
190
|
+
:host([sizing='content-width']) .outer {
|
|
191
|
+
inline-size: max-content;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([height]) .outer,
|
|
195
|
+
:host([max-height]) .outer,
|
|
196
|
+
:host([sizing='stretch']) .outer {
|
|
197
|
+
block-size: 100%;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.scb-fact-card {
|
|
201
|
+
color: var(--md-sys-color-on-surface, #0F0865);
|
|
202
|
+
font-family: var(--brand-font, "Inter", sans-serif);
|
|
203
|
+
position: relative;
|
|
204
|
+
border-radius: var(--md-sys-shape-corner-large, 16px);
|
|
205
|
+
background: var(--md-sys-color-surface-dim, #F9F8EF);
|
|
206
|
+
padding: var(--scb-fact-card-padding);
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
inline-size: 100%;
|
|
209
|
+
max-inline-size: 100%;
|
|
210
|
+
min-inline-size: 0;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
block-size: auto;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:host([height]) .scb-fact-card,
|
|
216
|
+
:host([max-height]) .scb-fact-card,
|
|
217
|
+
:host([sizing='stretch']) .scb-fact-card {
|
|
218
|
+
block-size: calc(100% - var(--_icon-pad));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.scb-fact-card.has-close {
|
|
222
|
+
padding-right: var(--scb-fact-card-close-padding-right);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.scb-fact-card.outlined {
|
|
226
|
+
border: 1px solid var(--md-sys-color-outline, #808080);
|
|
227
|
+
background: var(--md-sys-color-surface, #FFFFFF);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.outer.has-icon {
|
|
231
|
+
--_icon-pad: var(--scb-fact-card-icon-overhang);
|
|
232
|
+
}
|
|
233
|
+
.outer.has-icon .scb-fact-card {
|
|
234
|
+
border-top-left-radius: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.icon-wrapper {
|
|
238
|
+
position: absolute;
|
|
239
|
+
z-index: 1;
|
|
240
|
+
top: 0;
|
|
241
|
+
left: 0;
|
|
242
|
+
padding: var(--scb-fact-card-icon-padding-block) var(--scb-fact-card-icon-padding-inline);
|
|
243
|
+
padding-bottom: 0;
|
|
244
|
+
width: fit-content;
|
|
245
|
+
border-radius: var(--md-sys-shape-corner-full, 1000px) var(--md-sys-shape-corner-full, 1000px) 0 0 /
|
|
246
|
+
var(--md-sys-shape-corner-full, 1000px) var(--md-sys-shape-corner-full, 1000px) 0 0;
|
|
247
|
+
background: var(--md-sys-color-surface-dim, #F9F8EF);
|
|
248
|
+
line-height: 0;
|
|
249
|
+
}
|
|
250
|
+
.icon-wrapper.outlined {
|
|
251
|
+
border: var(--stroke-border, 1px) solid var(--md-sys-color-outline, #808080);
|
|
252
|
+
border-bottom: none;
|
|
253
|
+
background: var(--md-sys-color-surface, #FFFFFF);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
scb-icon-button {
|
|
257
|
+
position: absolute;
|
|
258
|
+
right: var(--scale-01, 12px);
|
|
259
|
+
top: var(--scale-01, 12px);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.scb-fact-card.clickable {
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.content {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
gap: var(--scb-fact-card-content-gap);
|
|
270
|
+
inline-size: 100%;
|
|
271
|
+
min-inline-size: 0;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.content .label,
|
|
275
|
+
.content .sub-label,
|
|
276
|
+
.content .supporting-text {
|
|
277
|
+
white-space: normal;
|
|
278
|
+
overflow: visible;
|
|
279
|
+
text-overflow: clip;
|
|
280
|
+
word-break: normal;
|
|
281
|
+
overflow-wrap: normal;
|
|
282
|
+
hyphens: auto;
|
|
283
|
+
}
|
|
284
|
+
`;
|
|
285
|
+
}
|
|
286
|
+
render() {
|
|
287
|
+
if (!this.open) return r``;
|
|
288
|
+
let e = this.variant === "outlined" ? "outlined" : "filled", t = !!this.icon;
|
|
289
|
+
return r`
|
|
290
|
+
<div class="outer ${t ? "has-icon" : ""}">
|
|
291
|
+
${t ? r`<div class="icon-wrapper ${e}"><md-icon>${this.icon}</md-icon></div>` : ""}
|
|
292
|
+
<div class="scb-fact-card ${e} ${this.showCloseButton ? "has-close" : ""}">
|
|
293
|
+
${this.showCloseButton ? r`
|
|
294
|
+
<scb-icon-button
|
|
295
|
+
variant="standard"
|
|
296
|
+
icon="close"
|
|
297
|
+
@click=${this.__onCloseClick}
|
|
298
|
+
></scb-icon-button>
|
|
299
|
+
` : ""}
|
|
300
|
+
<div class="content">
|
|
301
|
+
<slot></slot>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
`;
|
|
306
|
+
}
|
|
307
|
+
async firstUpdated() {
|
|
308
|
+
this.#e(), o.__iconLoaded || (await import("@material/web/icon/icon.js"), o.__iconLoaded = !0);
|
|
309
|
+
}
|
|
310
|
+
mapSpacingToken(e) {
|
|
311
|
+
if (!e) return;
|
|
312
|
+
let t = String(e).trim();
|
|
313
|
+
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
314
|
+
}
|
|
315
|
+
#e() {
|
|
316
|
+
let e = this.mapSpacingToken(this.spacing), t = this.mapSpacingToken(this.spacingTop), n = this.mapSpacingToken(this.spacingBottom), r = this.mapSpacingToken(this.spacingLeft), i = this.mapSpacingToken(this.spacingRight), a = t ?? e, o = n ?? e;
|
|
317
|
+
a ? this.style.setProperty("--scb-fact-card-spacing-block-start", a) : this.style.removeProperty("--scb-fact-card-spacing-block-start"), o ? this.style.setProperty("--scb-fact-card-spacing-block-end", o) : this.style.removeProperty("--scb-fact-card-spacing-block-end"), r ? this.style.setProperty("--scb-fact-card-spacing-inline-start", r) : this.style.removeProperty("--scb-fact-card-spacing-inline-start"), i ? this.style.setProperty("--scb-fact-card-spacing-inline-end", i) : this.style.removeProperty("--scb-fact-card-spacing-inline-end");
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
e([a({ type: String })], s.prototype, "variant", void 0), e([a({
|
|
321
|
+
type: String,
|
|
322
|
+
reflect: !0
|
|
323
|
+
})], s.prototype, "size", void 0), e([a({
|
|
324
|
+
type: String,
|
|
325
|
+
attribute: "title"
|
|
326
|
+
})], s.prototype, "title", void 0), e([a({
|
|
327
|
+
type: String,
|
|
328
|
+
attribute: "subtitle"
|
|
329
|
+
})], s.prototype, "subtitle", void 0), e([a({
|
|
330
|
+
type: String,
|
|
331
|
+
attribute: "supporting-text"
|
|
332
|
+
})], s.prototype, "supportingText", void 0), e([a({ type: String })], s.prototype, "icon", void 0), e([a({
|
|
333
|
+
type: Boolean,
|
|
334
|
+
attribute: "show-close-button"
|
|
335
|
+
})], s.prototype, "showCloseButton", void 0), e([a({
|
|
336
|
+
type: Boolean,
|
|
337
|
+
reflect: !0
|
|
338
|
+
})], s.prototype, "open", void 0), e([a({
|
|
339
|
+
type: String,
|
|
340
|
+
reflect: !0
|
|
341
|
+
})], s.prototype, "sizing", void 0), e([a({
|
|
342
|
+
type: String,
|
|
343
|
+
reflect: !0
|
|
344
|
+
})], s.prototype, "width", void 0), e([a({
|
|
345
|
+
type: String,
|
|
346
|
+
reflect: !0,
|
|
347
|
+
attribute: "max-width"
|
|
348
|
+
})], s.prototype, "maxWidth", void 0), e([a({
|
|
349
|
+
type: String,
|
|
350
|
+
reflect: !0
|
|
351
|
+
})], s.prototype, "height", void 0), e([a({
|
|
352
|
+
type: String,
|
|
353
|
+
reflect: !0,
|
|
354
|
+
attribute: "max-height"
|
|
355
|
+
})], s.prototype, "maxHeight", void 0), e([a({
|
|
356
|
+
type: String,
|
|
357
|
+
reflect: !0
|
|
358
|
+
})], s.prototype, "spacing", void 0), e([a({
|
|
359
|
+
type: String,
|
|
360
|
+
reflect: !0,
|
|
361
|
+
attribute: "spacing-top"
|
|
362
|
+
})], s.prototype, "spacingTop", void 0), e([a({
|
|
363
|
+
type: String,
|
|
364
|
+
reflect: !0,
|
|
365
|
+
attribute: "spacing-bottom"
|
|
366
|
+
})], s.prototype, "spacingBottom", void 0), e([a({
|
|
367
|
+
type: String,
|
|
368
|
+
reflect: !0,
|
|
369
|
+
attribute: "spacing-left"
|
|
370
|
+
})], s.prototype, "spacingLeft", void 0), e([a({
|
|
371
|
+
type: String,
|
|
372
|
+
reflect: !0,
|
|
373
|
+
attribute: "spacing-right"
|
|
374
|
+
})], s.prototype, "spacingRight", void 0), s = o = e([i("scb-fact-card")], s);
|
|
375
|
+
//#endregion
|
|
376
|
+
export { s as ScbFactCard };
|
|
@@ -0,0 +1,23 @@
|
|
|
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-footer/scb-footer-section.ts
|
|
5
|
+
var o = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.title = "";
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.styles = n`
|
|
11
|
+
:host { display: none; }
|
|
12
|
+
`;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return r`<slot></slot>`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
e([a({
|
|
19
|
+
type: String,
|
|
20
|
+
reflect: !0
|
|
21
|
+
})], o.prototype, "title", void 0), o = e([i("scb-footer-section")], o);
|
|
22
|
+
//#endregion
|
|
23
|
+
export { o as ScbFooterSection };
|