scb-wc 0.1.2 → 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 -1663
- package/blazor/scb-blazor-bridge.js +6827 -2517
- 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 -2517
- 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,505 @@
|
|
|
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
|
+
import "@material/web/focus/md-focus-ring.js";
|
|
5
|
+
//#region src/scb-test-components/scb-calendar-card/scb-calendar-card.ts
|
|
6
|
+
var o, s = class extends t {
|
|
7
|
+
static {
|
|
8
|
+
o = this;
|
|
9
|
+
}
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e), this.variant = "default", this.size = "medium", this.date = null, this.direction = "horizontal", this.title = "", this.calendarCardTitle = "", this.subtitle = "", this.supportingText = "", this.cardHref = "", this.cardHrefNav = "", this.showMedia = null, this.mediaWidth = "", this.mediaHeight = "", this.mediaAspect = "", this.width = "", this.maxWidth = "", this.minWidth = "", this.height = "", this.maxHeight = "", this.minHeight = "", this.sizing = "stretch", this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0;
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.__iconLoaded = !1;
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.__rippleLoaded = !1;
|
|
18
|
+
}
|
|
19
|
+
get #e() {
|
|
20
|
+
return this.calendarCardTitle || this.title;
|
|
21
|
+
}
|
|
22
|
+
async firstUpdated() {
|
|
23
|
+
o.__iconLoaded || (await import("@material/web/icon/icon.js"), o.__iconLoaded = !0), o.__rippleLoaded || (await import("@material/web/ripple/ripple.js"), o.__rippleLoaded = !0), this.__applyInnerSizing(), this.#n();
|
|
24
|
+
}
|
|
25
|
+
static {
|
|
26
|
+
this.styles = n`
|
|
27
|
+
:host {
|
|
28
|
+
display: block;
|
|
29
|
+
position: relative;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
inline-size: 100%;
|
|
32
|
+
min-inline-size: 0;
|
|
33
|
+
padding: var(--scb-calendar-card-focus-ring-gap, 4px);
|
|
34
|
+
margin-block-start: var(--scb-calendar-card-spacing-block-start, 0);
|
|
35
|
+
margin-block-end: var(--scb-calendar-card-spacing-block-end, 0);
|
|
36
|
+
margin-inline-start: var(--scb-calendar-card-spacing-inline-start, 0);
|
|
37
|
+
margin-inline-end: var(--scb-calendar-card-spacing-inline-end, 0);
|
|
38
|
+
|
|
39
|
+
--scb-calendar-card-padding: var(--spacing-spacing-7, 24px);
|
|
40
|
+
--scb-calendar-card-gap: var(--spacing-spacing-4, 12px);
|
|
41
|
+
--scb-calendar-card-horizontal-gap: var(--spacing-spacing-6, 20px);
|
|
42
|
+
--scb-calendar-card-horizontal-min-block-size: 112px;
|
|
43
|
+
|
|
44
|
+
--scb-calendar-card-media-size: var(--spacing-spacing-11, 64px);
|
|
45
|
+
--scb-calendar-card-media-gap: var(--spacing-spacing-2, 4px);
|
|
46
|
+
--scb-calendar-card-day-size: var(--scale-07, 28px);
|
|
47
|
+
--scb-calendar-card-day-letter-spacing: -0.6px;
|
|
48
|
+
--scb-calendar-card-month-size: var(--scale-02, 14px);
|
|
49
|
+
|
|
50
|
+
--scb-calendar-card-content-gap: var(--spacing-spacing-4, 12px);
|
|
51
|
+
--scb-calendar-card-header-gap: var(--spacing-spacing-2, 4px);
|
|
52
|
+
--scb-calendar-card-title-min-block-size: 32px;
|
|
53
|
+
--scb-calendar-card-icon-size: 20px;
|
|
54
|
+
|
|
55
|
+
--scb-calendar-card-title-font-size: var(--md-sys-typescale-headline-small-size, 24px);
|
|
56
|
+
--scb-calendar-card-title-line-height: var(--md-sys-typescale-headline-small-line-height2, 30px);
|
|
57
|
+
--scb-calendar-card-title-letter-spacing: var(--md-sys-typescale-headline-small-tracking, -0.6px);
|
|
58
|
+
|
|
59
|
+
--scb-calendar-card-subtitle-font-size: var(--md-sys-typescale-title-medium-size, 18px);
|
|
60
|
+
--scb-calendar-card-subtitle-line-height: var(--md-sys-typescale-title-medium-line-height, 26px);
|
|
61
|
+
--scb-calendar-card-subtitle-letter-spacing: var(--md-sys-typescale-title-medium-tracking, -0.3px);
|
|
62
|
+
|
|
63
|
+
--scb-calendar-card-supporting-font-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
64
|
+
--scb-calendar-card-supporting-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
65
|
+
--scb-calendar-card-supporting-letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([size='medium']) {
|
|
69
|
+
--scb-calendar-card-padding: var(--spacing-spacing-6, 20px);
|
|
70
|
+
--scb-calendar-card-gap: var(--spacing-spacing-3, 8px);
|
|
71
|
+
--scb-calendar-card-horizontal-gap: var(--spacing-spacing-5, 16px);
|
|
72
|
+
--scb-calendar-card-horizontal-min-block-size: 96px;
|
|
73
|
+
|
|
74
|
+
--scb-calendar-card-media-size: var(--spacing-spacing-10, 56px);
|
|
75
|
+
--scb-calendar-card-day-size: var(--scale-06, 24px);
|
|
76
|
+
--scb-calendar-card-day-letter-spacing: -0.4px;
|
|
77
|
+
--scb-calendar-card-month-size: var(--scale-01, 12px);
|
|
78
|
+
|
|
79
|
+
--scb-calendar-card-content-gap: var(--spacing-spacing-3, 8px);
|
|
80
|
+
--scb-calendar-card-header-gap: var(--spacing-spacing-1, 2px);
|
|
81
|
+
--scb-calendar-card-title-min-block-size: 28px;
|
|
82
|
+
|
|
83
|
+
--scb-calendar-card-title-font-size: var(--md-sys-typescale-title-medium-size, 18px);
|
|
84
|
+
--scb-calendar-card-title-line-height: var(--md-sys-typescale-title-medium-line-height, 26px);
|
|
85
|
+
--scb-calendar-card-title-letter-spacing: var(--md-sys-typescale-title-medium-tracking, -0.3px);
|
|
86
|
+
|
|
87
|
+
--scb-calendar-card-subtitle-font-size: var(--md-sys-typescale-title-small-size, 16px);
|
|
88
|
+
--scb-calendar-card-subtitle-line-height: var(--md-sys-typescale-title-small-line-height, 24px);
|
|
89
|
+
--scb-calendar-card-subtitle-letter-spacing: var(--md-sys-typescale-title-small-tracking, -0.2px);
|
|
90
|
+
|
|
91
|
+
--scb-calendar-card-supporting-font-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
92
|
+
--scb-calendar-card-supporting-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
93
|
+
--scb-calendar-card-supporting-letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([size='small']) {
|
|
97
|
+
--scb-calendar-card-padding: var(--spacing-spacing-5, 16px);
|
|
98
|
+
--scb-calendar-card-gap: var(--spacing-spacing-3, 8px);
|
|
99
|
+
--scb-calendar-card-horizontal-gap: var(--spacing-spacing-4, 12px);
|
|
100
|
+
--scb-calendar-card-horizontal-min-block-size: 84px;
|
|
101
|
+
|
|
102
|
+
--scb-calendar-card-media-size: var(--spacing-spacing-9, 48px);
|
|
103
|
+
--scb-calendar-card-day-size: var(--scale-05, 20px);
|
|
104
|
+
--scb-calendar-card-day-letter-spacing: -0.3px;
|
|
105
|
+
--scb-calendar-card-month-size: var(--scale-01, 12px);
|
|
106
|
+
|
|
107
|
+
--scb-calendar-card-content-gap: var(--spacing-spacing-2, 4px);
|
|
108
|
+
--scb-calendar-card-header-gap: var(--spacing-spacing-1, 2px);
|
|
109
|
+
--scb-calendar-card-title-min-block-size: 24px;
|
|
110
|
+
--scb-calendar-card-icon-size: 18px;
|
|
111
|
+
|
|
112
|
+
--scb-calendar-card-title-font-size: var(--md-sys-typescale-title-small-size, 16px);
|
|
113
|
+
--scb-calendar-card-title-line-height: var(--md-sys-typescale-title-small-line-height, 24px);
|
|
114
|
+
--scb-calendar-card-title-letter-spacing: var(--md-sys-typescale-title-small-tracking, -0.2px);
|
|
115
|
+
|
|
116
|
+
--scb-calendar-card-subtitle-font-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
117
|
+
--scb-calendar-card-subtitle-line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
118
|
+
--scb-calendar-card-subtitle-letter-spacing: var(--md-sys-typescale-body-medium-tracking, -0.15px);
|
|
119
|
+
|
|
120
|
+
--scb-calendar-card-supporting-font-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
121
|
+
--scb-calendar-card-supporting-line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
122
|
+
--scb-calendar-card-supporting-letter-spacing: var(--md-sys-typescale-body-small-tracking, -0.1px);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host([sizing='stretch']) {
|
|
126
|
+
inline-size: 100%;
|
|
127
|
+
block-size: 100%;
|
|
128
|
+
max-inline-size: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:host([sizing='content-width']) {
|
|
132
|
+
display: inline-block;
|
|
133
|
+
inline-size: auto;
|
|
134
|
+
block-size: auto;
|
|
135
|
+
}
|
|
136
|
+
:host([sizing='content-width']) .calendar-card {
|
|
137
|
+
inline-size: max-content;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([sizing='content-height']) {
|
|
141
|
+
inline-size: 100%;
|
|
142
|
+
block-size: auto;
|
|
143
|
+
max-inline-size: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
md-focus-ring {
|
|
147
|
+
position: absolute;
|
|
148
|
+
inset: 0;
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
display: none;
|
|
151
|
+
border-radius: var(--scb-calendar-card-focus-ring-radius, var(--radius-large, 16px));
|
|
152
|
+
}
|
|
153
|
+
.calendar-card:focus-visible + md-focus-ring {
|
|
154
|
+
display: block;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.calendar-card {
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
|
|
161
|
+
position: relative;
|
|
162
|
+
display: flex;
|
|
163
|
+
color: var(--md-sys-color-on-surface, #0f0865);
|
|
164
|
+
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
165
|
+
font-style: normal;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
align-items: flex-start;
|
|
168
|
+
gap: var(--scb-calendar-card-gap);
|
|
169
|
+
align-self: stretch;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
transition:
|
|
172
|
+
box-shadow 0.18s ease,
|
|
173
|
+
transform 0.18s ease,
|
|
174
|
+
background-color 0.18s ease,
|
|
175
|
+
border-color 0.18s ease;
|
|
176
|
+
|
|
177
|
+
inline-size: 100%;
|
|
178
|
+
max-inline-size: 100%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Lås standard till proportionella siffror i kortet */
|
|
182
|
+
.calendar-card,
|
|
183
|
+
.calendar-card .title,
|
|
184
|
+
.calendar-card .subtitle,
|
|
185
|
+
.calendar-card .supporting-text {
|
|
186
|
+
font-variant-numeric: proportional-nums;
|
|
187
|
+
font-feature-settings: 'tnum' 0, 'pnum' 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.calendar-card:focus,
|
|
191
|
+
.calendar-card:focus-visible {
|
|
192
|
+
outline: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.calendar-card.horizontal {
|
|
196
|
+
flex-direction: row;
|
|
197
|
+
align-items: flex-start;
|
|
198
|
+
max-width: none;
|
|
199
|
+
width: 100%;
|
|
200
|
+
gap: var(--scb-calendar-card-horizontal-gap);
|
|
201
|
+
min-block-size: var(--scb-calendar-card-horizontal-min-block-size);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.calendar-card.outlined {
|
|
205
|
+
border-radius: var(--radius-large, 16px);
|
|
206
|
+
border: 1px solid var(--md-sys-color-outline-variant, #ccc);
|
|
207
|
+
background: var(--md-sys-color-surface, #fff);
|
|
208
|
+
padding: var(--scb-calendar-card-padding);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.calendar-card.filled {
|
|
212
|
+
border-radius: var(--radius-large, 16px);
|
|
213
|
+
background: var(--md-sys-color-surface-dim, #f9f8ef);
|
|
214
|
+
padding: var(--scb-calendar-card-padding);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.calendar-card.filled .media {
|
|
218
|
+
background: var(--md-sys-color-surface, #fff);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
md-ripple {
|
|
222
|
+
border-radius: var(--radius-l, 16px);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.media {
|
|
226
|
+
display: flex;
|
|
227
|
+
width: var(--scb-calendar-card-media-size);
|
|
228
|
+
min-width: var(--scb-calendar-card-media-size);
|
|
229
|
+
max-width: var(--scb-calendar-card-media-size);
|
|
230
|
+
height: var(--scb-calendar-card-media-size);
|
|
231
|
+
padding: var(--spacing-spacing-0, 0) 0;
|
|
232
|
+
flex-direction: column;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: var(--scb-calendar-card-media-gap);
|
|
236
|
+
border-radius: var(--md-sys-shape-corner-small);
|
|
237
|
+
background: var(--md-sys-color-surface-dim, #f9f8ef);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.calendar-card.horizontal .media {
|
|
241
|
+
align-self: flex-start;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.media .day {
|
|
245
|
+
font-size: var(--scb-calendar-card-day-size);
|
|
246
|
+
font-weight: var(--weight-bold, 700);
|
|
247
|
+
line-height: 100%;
|
|
248
|
+
letter-spacing: var(--scb-calendar-card-day-letter-spacing);
|
|
249
|
+
font-variant-numeric: tabular-nums;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.media .month {
|
|
253
|
+
font-size: var(--scb-calendar-card-month-size);
|
|
254
|
+
font-weight: var(--weight-regular, 400);
|
|
255
|
+
line-height: 100%;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.container {
|
|
259
|
+
flex: 1 1 auto;
|
|
260
|
+
min-width: 0;
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
gap: var(--scb-calendar-card-content-gap);
|
|
264
|
+
width: 100%;
|
|
265
|
+
align-self: flex-start;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.header-container {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
gap: var(--scb-calendar-card-header-gap);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.title-container {
|
|
275
|
+
width: 100%;
|
|
276
|
+
flex: 0 0 auto;
|
|
277
|
+
display: flex;
|
|
278
|
+
align-items: center;
|
|
279
|
+
gap: var(--spacing-spacing-3, 8px);
|
|
280
|
+
color: inherit;
|
|
281
|
+
text-decoration: none;
|
|
282
|
+
min-block-size: var(--scb-calendar-card-title-min-block-size);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.title {
|
|
286
|
+
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
287
|
+
font-size: var(--scb-calendar-card-title-font-size);
|
|
288
|
+
font-weight: var(--weight-bold, 700);
|
|
289
|
+
line-height: var(--scb-calendar-card-title-line-height);
|
|
290
|
+
letter-spacing: var(--scb-calendar-card-title-letter-spacing);
|
|
291
|
+
flex: 1 1 auto;
|
|
292
|
+
min-inline-size: 0;
|
|
293
|
+
white-space: normal;
|
|
294
|
+
word-break: normal;
|
|
295
|
+
overflow-wrap: break-word;
|
|
296
|
+
hyphens: auto;
|
|
297
|
+
overflow: visible;
|
|
298
|
+
text-overflow: clip;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.title-container md-icon {
|
|
302
|
+
inline-size: var(--scb-calendar-card-icon-size);
|
|
303
|
+
block-size: var(--scb-calendar-card-icon-size);
|
|
304
|
+
flex: 0 0 auto;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.icon-container{
|
|
308
|
+
display: flex;
|
|
309
|
+
width: var(--spacing-spacing-7, 24px);
|
|
310
|
+
height: var(--spacing-spacing-7, 24px);
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.subtitle {
|
|
316
|
+
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
317
|
+
font-size: var(--scb-calendar-card-subtitle-font-size);
|
|
318
|
+
font-weight: var(--weight-semibold, 600);
|
|
319
|
+
line-height: var(--scb-calendar-card-subtitle-line-height);
|
|
320
|
+
letter-spacing: var(--scb-calendar-card-subtitle-letter-spacing);
|
|
321
|
+
white-space: normal;
|
|
322
|
+
word-break: normal;
|
|
323
|
+
overflow-wrap: break-word;
|
|
324
|
+
hyphens: manual;
|
|
325
|
+
overflow: visible;
|
|
326
|
+
text-overflow: clip;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.supporting-text {
|
|
330
|
+
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
331
|
+
font-size: var(--scb-calendar-card-supporting-font-size);
|
|
332
|
+
font-weight: var(--weight-regular, 400);
|
|
333
|
+
line-height: var(--scb-calendar-card-supporting-line-height);
|
|
334
|
+
letter-spacing: var(--scb-calendar-card-supporting-letter-spacing);
|
|
335
|
+
white-space: normal;
|
|
336
|
+
word-break: normal;
|
|
337
|
+
overflow-wrap: break-word;
|
|
338
|
+
hyphens: manual;
|
|
339
|
+
overflow: visible;
|
|
340
|
+
text-overflow: clip;
|
|
341
|
+
}
|
|
342
|
+
`;
|
|
343
|
+
}
|
|
344
|
+
render() {
|
|
345
|
+
let e = this.variant ? `${this.variant.toLowerCase()}` : "", t = this.direction ? `${this.direction.toLowerCase()}` : "", n = this.cardHref ? "clickable" : "", { day: i, month: a } = this.#t(), o = this.mediaWidth && this.mediaWidth.trim() !== "" ? this.mediaWidth : "", s = this.mediaHeight && this.mediaHeight.trim() !== "" ? this.mediaHeight : "", c = this.mediaAspect && this.mediaAspect.trim() !== "" ? this.mediaAspect : "", l = `${o ? `inline-size:${o};` : ""}${s ? `block-size:${s};` : ""}${c ? `aspect-ratio:${c};` : ""}`;
|
|
346
|
+
return r`
|
|
347
|
+
<div
|
|
348
|
+
class="calendar-card ${t} ${n} ${e}"
|
|
349
|
+
role="${this.cardHref ? "link" : "group"}"
|
|
350
|
+
aria-label="${this.#e || "Kalenderkort"}"
|
|
351
|
+
tabindex="${this.cardHref ? "0" : "-1"}"
|
|
352
|
+
@click=${this.cardHref ? this._handleHrefNavigation : null}
|
|
353
|
+
@keydown=${this.cardHref ? this._onKeyDown : null}
|
|
354
|
+
style="cursor: ${this.cardHref ? "pointer" : "default"};"
|
|
355
|
+
>
|
|
356
|
+
${this.cardHref ? r`<md-ripple></md-ripple>` : ""}
|
|
357
|
+
${this.showMedia ? r`
|
|
358
|
+
<div class="media" style="${l}" aria-label="Datum: ${i} ${a}">
|
|
359
|
+
<div class="day">${i}</div>
|
|
360
|
+
<div class="month">${a}</div>
|
|
361
|
+
</div>
|
|
362
|
+
` : ""}
|
|
363
|
+
<div class="container">
|
|
364
|
+
<div class="header-container">
|
|
365
|
+
<div class="title-container">
|
|
366
|
+
<div class="title">${this.#e}</div>
|
|
367
|
+
${this.cardHref ? r`<div class="icon-container"><md-icon>arrow_forward</md-icon></div>` : ""}
|
|
368
|
+
</div>
|
|
369
|
+
${this.subtitle ? r`<div class="subtitle">${this.subtitle}</div>` : ""}</div>
|
|
370
|
+
${this.supportingText ? r`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
${this.cardHref ? r`<md-focus-ring></md-focus-ring>` : ""}
|
|
374
|
+
`;
|
|
375
|
+
}
|
|
376
|
+
#t() {
|
|
377
|
+
let e = {
|
|
378
|
+
day: 1,
|
|
379
|
+
month: "Jan"
|
|
380
|
+
};
|
|
381
|
+
if (!this.date) return e;
|
|
382
|
+
let t = this.date instanceof Date ? this.date : (() => {
|
|
383
|
+
let e = new Date(String(this.date));
|
|
384
|
+
return Number.isNaN(e.getTime()) ? null : e;
|
|
385
|
+
})();
|
|
386
|
+
if (!t) return e;
|
|
387
|
+
let n = t.getDate(), r = new Intl.DateTimeFormat("sv-SE", { month: "short" }).format(t).replace(".", "").trim();
|
|
388
|
+
return {
|
|
389
|
+
day: n,
|
|
390
|
+
month: r.charAt(0).toUpperCase() + r.slice(1)
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
__applyInnerSizing() {
|
|
394
|
+
let e = this.renderRoot.querySelector(".calendar-card");
|
|
395
|
+
e && (this.width && this.width.trim() !== "" ? (e.style.inlineSize = "100%", e.style.maxInlineSize = "100%") : (e.style.removeProperty("inline-size"), e.style.removeProperty("max-inline-size")), this.height && this.height.trim() !== "" || this.sizing === "stretch" ? e.style.blockSize = "100%" : e.style.removeProperty("block-size"), this.maxHeight && this.maxHeight.trim() !== "" ? e.style.maxBlockSize = "100%" : e.style.removeProperty("max-block-size"));
|
|
396
|
+
}
|
|
397
|
+
_onKeyDown(e) {
|
|
398
|
+
(e.key === "Enter" || e.key === " ") && this.cardHref && (window.open(this.cardHref, "_self"), e.preventDefault());
|
|
399
|
+
}
|
|
400
|
+
_handleHrefNavigation() {
|
|
401
|
+
this.cardHref && (this.cardHrefNav === "tab" ? window.open(this.cardHref, "_blank") : this.cardHrefNav === "window" ? window.open(this.cardHref, "_blank", "noopener,noreferrer,width=800,height=600") : window.open(this.cardHref, "_self"));
|
|
402
|
+
}
|
|
403
|
+
mapSpacingToken(e) {
|
|
404
|
+
if (!e) return;
|
|
405
|
+
let t = String(e).trim();
|
|
406
|
+
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
407
|
+
}
|
|
408
|
+
#n() {
|
|
409
|
+
let e = this.mapSpacingToken(this.spacing), t = this.mapSpacingToken(this.spacingTop) ?? e, n = this.mapSpacingToken(this.spacingBottom) ?? e, r = this.mapSpacingToken(this.spacingLeft), i = this.mapSpacingToken(this.spacingRight);
|
|
410
|
+
t ? this.style.setProperty("--scb-calendar-card-spacing-block-start", t) : this.style.removeProperty("--scb-calendar-card-spacing-block-start"), n ? this.style.setProperty("--scb-calendar-card-spacing-block-end", n) : this.style.removeProperty("--scb-calendar-card-spacing-block-end"), r ? this.style.setProperty("--scb-calendar-card-spacing-inline-start", r) : this.style.removeProperty("--scb-calendar-card-spacing-inline-start"), i ? this.style.setProperty("--scb-calendar-card-spacing-inline-end", i) : this.style.removeProperty("--scb-calendar-card-spacing-inline-end");
|
|
411
|
+
}
|
|
412
|
+
updated(e) {
|
|
413
|
+
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("minWidth") && (this.minWidth ? this.style.minInlineSize = this.minWidth : this.style.removeProperty("min-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("minHeight") && (this.minHeight ? this.style.minBlockSize = this.minHeight : this.style.removeProperty("min-block-size")), (e.has("width") || e.has("height") || e.has("maxHeight") || e.has("sizing")) && this.__applyInnerSizing(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#n();
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
e([a({
|
|
417
|
+
type: String,
|
|
418
|
+
reflect: !0
|
|
419
|
+
})], s.prototype, "variant", void 0), e([a({
|
|
420
|
+
type: String,
|
|
421
|
+
reflect: !0
|
|
422
|
+
})], s.prototype, "size", void 0), e([a({
|
|
423
|
+
type: String,
|
|
424
|
+
attribute: "date"
|
|
425
|
+
})], s.prototype, "date", void 0), e([a({
|
|
426
|
+
type: String,
|
|
427
|
+
reflect: !0
|
|
428
|
+
})], s.prototype, "direction", void 0), e([a({
|
|
429
|
+
type: String,
|
|
430
|
+
reflect: !0
|
|
431
|
+
})], s.prototype, "title", void 0), e([a({
|
|
432
|
+
type: String,
|
|
433
|
+
attribute: "calendar-card-title",
|
|
434
|
+
reflect: !0
|
|
435
|
+
})], s.prototype, "calendarCardTitle", void 0), e([a({
|
|
436
|
+
type: String,
|
|
437
|
+
reflect: !0
|
|
438
|
+
})], s.prototype, "subtitle", void 0), e([a({
|
|
439
|
+
type: String,
|
|
440
|
+
attribute: "supporting-text",
|
|
441
|
+
reflect: !0
|
|
442
|
+
})], s.prototype, "supportingText", void 0), e([a({
|
|
443
|
+
type: String,
|
|
444
|
+
attribute: "card-href"
|
|
445
|
+
})], s.prototype, "cardHref", void 0), e([a({
|
|
446
|
+
type: String,
|
|
447
|
+
attribute: "card-href-nav"
|
|
448
|
+
})], s.prototype, "cardHrefNav", void 0), e([a({
|
|
449
|
+
type: Boolean,
|
|
450
|
+
reflect: !0,
|
|
451
|
+
attribute: "show-media"
|
|
452
|
+
})], s.prototype, "showMedia", void 0), e([a({
|
|
453
|
+
type: String,
|
|
454
|
+
attribute: "media-width"
|
|
455
|
+
})], s.prototype, "mediaWidth", void 0), e([a({
|
|
456
|
+
type: String,
|
|
457
|
+
attribute: "media-height"
|
|
458
|
+
})], s.prototype, "mediaHeight", void 0), e([a({
|
|
459
|
+
type: String,
|
|
460
|
+
attribute: "media-aspect"
|
|
461
|
+
})], s.prototype, "mediaAspect", void 0), e([a({
|
|
462
|
+
type: String,
|
|
463
|
+
reflect: !0
|
|
464
|
+
})], s.prototype, "width", void 0), e([a({
|
|
465
|
+
type: String,
|
|
466
|
+
reflect: !0,
|
|
467
|
+
attribute: "max-width"
|
|
468
|
+
})], s.prototype, "maxWidth", void 0), e([a({
|
|
469
|
+
type: String,
|
|
470
|
+
attribute: "min-width"
|
|
471
|
+
})], s.prototype, "minWidth", void 0), e([a({
|
|
472
|
+
type: String,
|
|
473
|
+
reflect: !0
|
|
474
|
+
})], s.prototype, "height", void 0), e([a({
|
|
475
|
+
type: String,
|
|
476
|
+
reflect: !0,
|
|
477
|
+
attribute: "max-height"
|
|
478
|
+
})], s.prototype, "maxHeight", void 0), e([a({
|
|
479
|
+
type: String,
|
|
480
|
+
attribute: "min-height"
|
|
481
|
+
})], s.prototype, "minHeight", void 0), e([a({
|
|
482
|
+
type: String,
|
|
483
|
+
reflect: !0
|
|
484
|
+
})], s.prototype, "sizing", void 0), e([a({
|
|
485
|
+
type: String,
|
|
486
|
+
reflect: !0
|
|
487
|
+
})], s.prototype, "spacing", void 0), e([a({
|
|
488
|
+
type: String,
|
|
489
|
+
attribute: "spacing-top",
|
|
490
|
+
reflect: !0
|
|
491
|
+
})], s.prototype, "spacingTop", void 0), e([a({
|
|
492
|
+
type: String,
|
|
493
|
+
attribute: "spacing-bottom",
|
|
494
|
+
reflect: !0
|
|
495
|
+
})], s.prototype, "spacingBottom", void 0), e([a({
|
|
496
|
+
type: String,
|
|
497
|
+
attribute: "spacing-left",
|
|
498
|
+
reflect: !0
|
|
499
|
+
})], s.prototype, "spacingLeft", void 0), e([a({
|
|
500
|
+
type: String,
|
|
501
|
+
attribute: "spacing-right",
|
|
502
|
+
reflect: !0
|
|
503
|
+
})], s.prototype, "spacingRight", void 0), s = o = e([i("scb-calendar-card")], s);
|
|
504
|
+
//#endregion
|
|
505
|
+
export { s as ScbCalendarCard };
|