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,215 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import "./scb-segmented-item.js";
|
|
3
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
4
|
+
import { customElement as i, property as a } from "lit/decorators.js";
|
|
5
|
+
//#region src/scb-test-components/scb-segmented-button/scb-segmented-button.ts
|
|
6
|
+
var o = class extends t {
|
|
7
|
+
static {
|
|
8
|
+
this.formAssociated = !0;
|
|
9
|
+
}
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this._internals = null, this.variant = "single-select", this.value = "", this.values = [], this.disabled = !1, this.required = !1, this.name = "", this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this._form = null, this._formResetHandler = null, this._initialValue = "", this._initialValues = [], this._customValidationMessage = "", "attachInternals" in this && (this._internals = this.attachInternals());
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = n`
|
|
15
|
+
:host {
|
|
16
|
+
--scb-segmented-button-width: 100%;
|
|
17
|
+
--scb-segmented-button-height: 48px;
|
|
18
|
+
max-width: var(--scb-segmented-button-width);
|
|
19
|
+
height: var(--scb-segmented-button-height);
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-auto-flow: column;
|
|
22
|
+
grid-auto-columns: 1fr;
|
|
23
|
+
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
24
|
+
margin-block-start: var(--scb-segmented-button-spacing-block-start, 0);
|
|
25
|
+
margin-block-end: var(--scb-segmented-button-spacing-block-end, 0);
|
|
26
|
+
margin-inline-start: var(--scb-segmented-button-spacing-inline-start, 0);
|
|
27
|
+
margin-inline-end: var(--scb-segmented-button-spacing-inline-end, 0);
|
|
28
|
+
}
|
|
29
|
+
/* Border radius only on first and last button */
|
|
30
|
+
::slotted(scb-segmented-item:first-child .segmented-item),
|
|
31
|
+
::slotted([role='button']:first-child .segmented-item) {
|
|
32
|
+
border-top-left-radius: var(--md-sys-shape-corner-full);
|
|
33
|
+
border-bottom-left-radius: var(--md-sys-shape-corner-full);
|
|
34
|
+
}
|
|
35
|
+
::slotted(scb-segmented-item:last-child .segmented-item),
|
|
36
|
+
::slotted([role='button']:last-child .segmented-item) {
|
|
37
|
+
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
38
|
+
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
39
|
+
}
|
|
40
|
+
/* First button gets left border */
|
|
41
|
+
::slotted(scb-segmented-item:first-child .segmented-item),
|
|
42
|
+
::slotted([role='button']:first-child .segmented-item) {
|
|
43
|
+
border-left: 1px solid var(--md-sys-color-outline);
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
super.connectedCallback(), this._form = this.closest("form"), this._form && (this._formResetHandler = () => {
|
|
49
|
+
this.value = this._initialValue, this.values = Array.isArray(this._initialValues) ? [...this._initialValues] : [], this.updateSegments(), this._syncFormValue();
|
|
50
|
+
}, this._form.addEventListener("reset", this._formResetHandler, !0));
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this._form && this._formResetHandler && this._form.removeEventListener("reset", this._formResetHandler, !0), super.disconnectedCallback();
|
|
54
|
+
}
|
|
55
|
+
firstUpdated() {
|
|
56
|
+
this._initialValue = this.value, this._initialValues = Array.isArray(this.values) ? [...this.values] : [], this.updateSegments();
|
|
57
|
+
let e = this.shadowRoot?.querySelector("slot");
|
|
58
|
+
e && (e.addEventListener("slotchange", () => {
|
|
59
|
+
this.updateSegments();
|
|
60
|
+
}), e.addEventListener("click", (e) => this.onSlotClick(e)), e.addEventListener("focus", () => {
|
|
61
|
+
this.dispatchEvent(new CustomEvent("focus", {
|
|
62
|
+
detail: {},
|
|
63
|
+
bubbles: !0,
|
|
64
|
+
composed: !0
|
|
65
|
+
}));
|
|
66
|
+
}, !0), e.addEventListener("blur", () => {
|
|
67
|
+
this.dispatchEvent(new CustomEvent("blur", {
|
|
68
|
+
detail: {},
|
|
69
|
+
bubbles: !0,
|
|
70
|
+
composed: !0
|
|
71
|
+
}));
|
|
72
|
+
}, !0), e.addEventListener("keydown", (e) => {
|
|
73
|
+
if (e.code === "Space" || e.code === "Enter" || e.code === "NumpadEnter") {
|
|
74
|
+
let t = e.target;
|
|
75
|
+
if (t && t.closest) {
|
|
76
|
+
let n = t.closest("scb-segmented-item");
|
|
77
|
+
n && !n.hasAttribute("disabled") && !this.disabled && (this.onSlotClick(e), e.preventDefault());
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
})), this._syncFormValue(), this._syncValidity(), this.#e();
|
|
81
|
+
}
|
|
82
|
+
updated(e) {
|
|
83
|
+
super.updated(e), this.updateSegments(), (e.has("value") || e.has("values") || e.has("disabled") || e.has("variant") || e.has("name")) && (this._syncFormValue(), this._syncValidity()), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#e();
|
|
84
|
+
}
|
|
85
|
+
onSlotClick(e) {
|
|
86
|
+
let t = e.target;
|
|
87
|
+
if (!t || !t.closest) return;
|
|
88
|
+
let n = t.closest("scb-segmented-item");
|
|
89
|
+
if (!n || this.disabled || n.hasAttribute("disabled")) return;
|
|
90
|
+
let r = n.getAttribute("value") || "";
|
|
91
|
+
r && (this.variant === "multi-select" ? (this.values.indexOf(r) === -1 ? this.values = [...this.values, r] : this.values = this.values.filter((e) => e !== r), this.dispatchEvent(new CustomEvent("change", {
|
|
92
|
+
detail: { values: this.values },
|
|
93
|
+
bubbles: !0,
|
|
94
|
+
composed: !0
|
|
95
|
+
})), this.updateSegments()) : r !== this.value && (this.value = r, this.dispatchEvent(new CustomEvent("change", {
|
|
96
|
+
detail: { value: r },
|
|
97
|
+
bubbles: !0,
|
|
98
|
+
composed: !0
|
|
99
|
+
})), this.updateSegments()));
|
|
100
|
+
}
|
|
101
|
+
updateSegments() {
|
|
102
|
+
let e = this.shadowRoot?.querySelector("slot");
|
|
103
|
+
e && e.assignedElements().forEach((e) => {
|
|
104
|
+
if (e.tagName === "SCB-SEGMENTED-ITEM") {
|
|
105
|
+
let t = e.getAttribute("value") || "";
|
|
106
|
+
if (t) {
|
|
107
|
+
let n = !1;
|
|
108
|
+
n = this.variant === "multi-select" ? !!this.values && this.values.includes(t) : t === this.value, e.setAttribute("aria-pressed", n ? "true" : "false"), n ? e.setAttribute("selected", "true") : e.removeAttribute("selected");
|
|
109
|
+
}
|
|
110
|
+
this.disabled && e.setAttribute("disabled", "true");
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
formDisabledCallback(e) {
|
|
115
|
+
this.disabled = e;
|
|
116
|
+
}
|
|
117
|
+
_getValidationMessage() {
|
|
118
|
+
return this._customValidationMessage ? this._customValidationMessage : this.required ? this.variant === "multi-select" ? this.values.length === 0 ? "Välj minst ett alternativ." : "" : this.value ? "" : "Välj ett alternativ." : "";
|
|
119
|
+
}
|
|
120
|
+
_syncValidity() {
|
|
121
|
+
if (!this._internals) return;
|
|
122
|
+
let e = this.disabled ? "" : this._getValidationMessage();
|
|
123
|
+
e ? (this._internals.setValidity({ valueMissing: !0 }, e), this.setAttribute("aria-invalid", "true")) : (this._internals.setValidity({}), this.removeAttribute("aria-invalid"));
|
|
124
|
+
}
|
|
125
|
+
checkValidity() {
|
|
126
|
+
return !this._getValidationMessage();
|
|
127
|
+
}
|
|
128
|
+
reportValidity() {
|
|
129
|
+
return this._syncValidity(), this._internals ? this._internals.reportValidity() : this.checkValidity();
|
|
130
|
+
}
|
|
131
|
+
setCustomValidity(e) {
|
|
132
|
+
this._customValidationMessage = e, this._syncValidity();
|
|
133
|
+
}
|
|
134
|
+
get validity() {
|
|
135
|
+
return this._internals?.validity;
|
|
136
|
+
}
|
|
137
|
+
get validationMessage() {
|
|
138
|
+
return this._internals?.validationMessage ?? this._getValidationMessage();
|
|
139
|
+
}
|
|
140
|
+
get willValidate() {
|
|
141
|
+
return this._internals?.willValidate ?? !0;
|
|
142
|
+
}
|
|
143
|
+
_syncFormValue() {
|
|
144
|
+
if (this._internals) {
|
|
145
|
+
if (this.disabled || !this.name) {
|
|
146
|
+
this._internals.setFormValue(null);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (this.variant === "multi-select") {
|
|
150
|
+
if (!this.values || this.values.length === 0) {
|
|
151
|
+
this._internals.setFormValue(null);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
let e = new FormData();
|
|
155
|
+
for (let t of this.values) e.append(this.name, t);
|
|
156
|
+
this._internals.setFormValue(e);
|
|
157
|
+
} else {
|
|
158
|
+
if (!this.value) {
|
|
159
|
+
this._internals.setFormValue(null);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this._internals.setFormValue(this.value);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
mapSpacingToken(e) {
|
|
167
|
+
if (!e) return;
|
|
168
|
+
let t = String(e).trim();
|
|
169
|
+
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
170
|
+
}
|
|
171
|
+
#e() {
|
|
172
|
+
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);
|
|
173
|
+
t ? this.style.setProperty("--scb-segmented-button-spacing-block-start", t) : this.style.removeProperty("--scb-segmented-button-spacing-block-start"), n ? this.style.setProperty("--scb-segmented-button-spacing-block-end", n) : this.style.removeProperty("--scb-segmented-button-spacing-block-end"), r ? this.style.setProperty("--scb-segmented-button-spacing-inline-start", r) : this.style.removeProperty("--scb-segmented-button-spacing-inline-start"), i ? this.style.setProperty("--scb-segmented-button-spacing-inline-end", i) : this.style.removeProperty("--scb-segmented-button-spacing-inline-end");
|
|
174
|
+
}
|
|
175
|
+
render() {
|
|
176
|
+
return r`<slot></slot>`;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
e([a({
|
|
180
|
+
type: String,
|
|
181
|
+
reflect: !0
|
|
182
|
+
})], o.prototype, "variant", void 0), e([a({
|
|
183
|
+
type: String,
|
|
184
|
+
reflect: !0
|
|
185
|
+
})], o.prototype, "value", void 0), e([a({ type: Array })], o.prototype, "values", void 0), e([a({
|
|
186
|
+
type: Boolean,
|
|
187
|
+
reflect: !0
|
|
188
|
+
})], o.prototype, "disabled", void 0), e([a({
|
|
189
|
+
type: Boolean,
|
|
190
|
+
reflect: !0
|
|
191
|
+
})], o.prototype, "required", void 0), e([a({
|
|
192
|
+
type: String,
|
|
193
|
+
reflect: !0
|
|
194
|
+
})], o.prototype, "name", void 0), e([a({
|
|
195
|
+
type: String,
|
|
196
|
+
reflect: !0
|
|
197
|
+
})], o.prototype, "spacing", void 0), e([a({
|
|
198
|
+
type: String,
|
|
199
|
+
attribute: "spacing-top",
|
|
200
|
+
reflect: !0
|
|
201
|
+
})], o.prototype, "spacingTop", void 0), e([a({
|
|
202
|
+
type: String,
|
|
203
|
+
attribute: "spacing-bottom",
|
|
204
|
+
reflect: !0
|
|
205
|
+
})], o.prototype, "spacingBottom", void 0), e([a({
|
|
206
|
+
type: String,
|
|
207
|
+
attribute: "spacing-left",
|
|
208
|
+
reflect: !0
|
|
209
|
+
})], o.prototype, "spacingLeft", void 0), e([a({
|
|
210
|
+
type: String,
|
|
211
|
+
attribute: "spacing-right",
|
|
212
|
+
reflect: !0
|
|
213
|
+
})], o.prototype, "spacingRight", void 0), o = e([i("scb-segmented-button")], o);
|
|
214
|
+
//#endregion
|
|
215
|
+
export { o as ScbSegmentedButton };
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
import "@material/web/icon/icon.js";
|
|
6
|
+
import "@material/web/ripple/ripple.js";
|
|
7
|
+
//#region src/scb-test-components/scb-segmented-button/scb-segmented-item.ts
|
|
8
|
+
var o = class extends t {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.label = "", this.value = "", this.selected = !1, this.icon = "", this.href = "", this.disabled = !1, this.onHostKeydown = (e) => {
|
|
11
|
+
if (!this.href || this.isEffectivelyDisabled || e.code !== "Space" && e.code !== "Enter" && e.code !== "NumpadEnter") return;
|
|
12
|
+
let t = this.shadowRoot?.querySelector("a[href]");
|
|
13
|
+
t && (e.preventDefault(), e.stopPropagation(), t.click());
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
get isEffectivelyDisabled() {
|
|
17
|
+
let e = this.parentElement?.hasAttribute?.("disabled");
|
|
18
|
+
return this.disabled || !!e;
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.styles = n`
|
|
22
|
+
.segmented-item {
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: var(--spacing-3);
|
|
25
|
+
align-items: center;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
28
|
+
border-left: none;
|
|
29
|
+
background-color: var(--md-sys-color-surface);
|
|
30
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
31
|
+
font: inherit;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
position: relative;
|
|
34
|
+
font-size: var(--md-sys-typescale-label-medium-size);
|
|
35
|
+
line-height: var(--md-sys-typescale-label-medium-line-height);
|
|
36
|
+
font-weight: var(--md-sys-typescale-label-medium-weight);
|
|
37
|
+
letter-spacing: var(--md-sys-typescale-label-medium-tracking);
|
|
38
|
+
color: var(--md-sys-color-on-surface);
|
|
39
|
+
justify-content: center;
|
|
40
|
+
height: 100%;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
}
|
|
43
|
+
.segmented-item span {
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
md-icon {
|
|
47
|
+
font-size: 20px;
|
|
48
|
+
width: 20px;
|
|
49
|
+
height: 20px;
|
|
50
|
+
}
|
|
51
|
+
:host([disabled]) .segmented-item,
|
|
52
|
+
.segmented-item[aria-disabled="true"] {
|
|
53
|
+
opacity: 0.5;
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
filter: grayscale(0.5);
|
|
57
|
+
}
|
|
58
|
+
:host([aria-pressed="true"]) .segmented-item {
|
|
59
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
60
|
+
color: var(--md-sys-color-primary);
|
|
61
|
+
}
|
|
62
|
+
:host(:focus){
|
|
63
|
+
outline: none;
|
|
64
|
+
}
|
|
65
|
+
md-focus-ring {
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
display: none;
|
|
70
|
+
border-radius: inherit;
|
|
71
|
+
}
|
|
72
|
+
:host(:focus) md-focus-ring,
|
|
73
|
+
md-focus-ring[data-show="true"] {
|
|
74
|
+
display: block;
|
|
75
|
+
}
|
|
76
|
+
:host([disabled]):host(:focus) md-focus-ring,
|
|
77
|
+
:host([disabled]) md-focus-ring[data-show="true"] {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
:host(:first-child) .segmented-item{
|
|
81
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
82
|
+
border-top-left-radius: var(--md-sys-shape-corner-full);
|
|
83
|
+
border-bottom-left-radius: var(--md-sys-shape-corner-full);
|
|
84
|
+
}
|
|
85
|
+
:host(:last-child) .segmented-item {
|
|
86
|
+
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
87
|
+
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
let e = this.isEffectivelyDisabled, t = !!this.icon, n = !!this.label, i = `segmented-item${t || this.selected ? " has-icon" : ""}${n ? "" : " no-label"}`, a = r`
|
|
93
|
+
<md-ripple ?disabled="${e}"></md-ripple>
|
|
94
|
+
${this.selected ? t && n ? r`<md-icon>check</md-icon>` : t ? r`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>` : r`<md-icon>check</md-icon>` : t ? r`<md-icon>${this.icon}</md-icon>` : ""}
|
|
95
|
+
${n ? r`<span>${this.label}</span>` : ""}
|
|
96
|
+
<md-focus-ring inward></md-focus-ring>
|
|
97
|
+
`;
|
|
98
|
+
return this.href ? r`<a class="${i}" href="${this.href}" aria-disabled="${e ? "true" : "false"}" tabindex="-1">${a}</a>` : r`<div class="${i}" aria-disabled="${e ? "true" : "false"}">${a}</div>`;
|
|
99
|
+
}
|
|
100
|
+
updateInteractiveAttributes() {
|
|
101
|
+
this.setAttribute("tabindex", this.disabled ? "-1" : "0"), this.setAttribute("role", this.href ? "link" : "button");
|
|
102
|
+
}
|
|
103
|
+
firstUpdated() {
|
|
104
|
+
this.addEventListener("keydown", this.onHostKeydown), this.updateInteractiveAttributes();
|
|
105
|
+
}
|
|
106
|
+
disconnectedCallback() {
|
|
107
|
+
this.removeEventListener("keydown", this.onHostKeydown), super.disconnectedCallback();
|
|
108
|
+
}
|
|
109
|
+
updated(e) {
|
|
110
|
+
super.updated(e), (e.has("disabled") || e.has("href")) && this.updateInteractiveAttributes();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
e([a({
|
|
114
|
+
type: String,
|
|
115
|
+
reflect: !0
|
|
116
|
+
})], o.prototype, "label", void 0), e([a({
|
|
117
|
+
type: String,
|
|
118
|
+
reflect: !0
|
|
119
|
+
})], o.prototype, "value", void 0), e([a({
|
|
120
|
+
type: Boolean,
|
|
121
|
+
reflect: !0
|
|
122
|
+
})], o.prototype, "selected", void 0), e([a({
|
|
123
|
+
type: String,
|
|
124
|
+
reflect: !0
|
|
125
|
+
})], o.prototype, "icon", void 0), e([a({
|
|
126
|
+
type: String,
|
|
127
|
+
reflect: !0
|
|
128
|
+
})], o.prototype, "href", void 0), e([a({
|
|
129
|
+
type: Boolean,
|
|
130
|
+
reflect: !0
|
|
131
|
+
})], o.prototype, "disabled", void 0), o = e([i("scb-segmented-item")], o);
|
|
132
|
+
//#endregion
|
|
133
|
+
export { o as ScbSegmentedItem };
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import "@material/web/icon/icon.js";
|
|
6
|
+
import "@material/web/ripple/ripple.js";
|
|
7
|
+
//#region src/scb-test-components/scb-select/scb-select-option.ts
|
|
8
|
+
var o = class extends t {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.value = "", this.disabled = !1, this.showCheckbox = !1, this.checked = !1, this.showRadio = !1, this.label = "", this.noHighlightSelected = !1;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = n`
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
:host([hidden]) {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
:host([disabled]) {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
opacity: 0.38;
|
|
24
|
+
}
|
|
25
|
+
:host(:focus-visible) .item {
|
|
26
|
+
outline: 2px solid var(--md-sys-color-primary);
|
|
27
|
+
outline-offset: -2px;
|
|
28
|
+
}
|
|
29
|
+
:host([data-focused]) .item {
|
|
30
|
+
background-color: var(--md-sys-color-surface-container);
|
|
31
|
+
}
|
|
32
|
+
.item {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
padding: var(--scb-select-option-padding-y, var(--spacing-3))
|
|
36
|
+
var(--scb-select-option-padding-x, var(--spacing-5));
|
|
37
|
+
gap: var(--scb-select-option-gap, var(--spacing-4));
|
|
38
|
+
min-height: var(--scb-select-option-min-height, 40px);
|
|
39
|
+
position: relative;
|
|
40
|
+
font-size: var(--scb-select-option-font-size, var(--md-sys-typescale-body-large-size));
|
|
41
|
+
line-height: var(--scb-select-option-line-height, var(--md-sys-typescale-body-large-line-height));
|
|
42
|
+
letter-spacing: var(--scb-select-option-letter-spacing, var(--md-sys-typescale-body-large-tracking));
|
|
43
|
+
}
|
|
44
|
+
.label {
|
|
45
|
+
min-width: 0;
|
|
46
|
+
flex: 1 1 auto;
|
|
47
|
+
}
|
|
48
|
+
md-icon {
|
|
49
|
+
font-size: var(--scb-select-option-icon-size, var(--icon-size-medium, 24px));
|
|
50
|
+
line-height: 1;
|
|
51
|
+
flex: 0 0 auto;
|
|
52
|
+
}
|
|
53
|
+
md-focus-ring {
|
|
54
|
+
border-radius: var(--md-sys-shape-corner-small);
|
|
55
|
+
}
|
|
56
|
+
.item.checked {
|
|
57
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
58
|
+
}
|
|
59
|
+
:host([no-highlight-selected]) .item.checked {
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
md-icon.radio-checked {
|
|
63
|
+
color: var(--md-sys-color-primary);
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return r`
|
|
69
|
+
<div class="item ${this.checked ? "checked" : ""}" ?aria-disabled=${this.disabled}>
|
|
70
|
+
<md-ripple></md-ripple>
|
|
71
|
+
${this.showCheckbox ? r`<md-icon class="${this.checked ? "checkbox-checked" : ""}" aria-hidden="true">${this.checked ? "check_box" : "check_box_outline_blank"}</md-icon>` : null}
|
|
72
|
+
${this.showRadio ? r`<md-icon class="${this.checked ? "radio-checked" : ""}" aria-hidden="true">${this.checked ? "radio_button_checked" : "radio_button_unchecked"}</md-icon>` : null}
|
|
73
|
+
<div class="label">${this.label ? this.label : r`<slot></slot>`}</div>
|
|
74
|
+
<md-focus-ring inward></md-focus-ring>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
e([a({ type: String })], o.prototype, "value", void 0), e([a({
|
|
80
|
+
type: Boolean,
|
|
81
|
+
reflect: !0
|
|
82
|
+
})], o.prototype, "disabled", void 0), e([a({ type: Boolean })], o.prototype, "showCheckbox", void 0), e([a({ type: Boolean })], o.prototype, "checked", void 0), e([a({ type: Boolean })], o.prototype, "showRadio", void 0), e([a({ type: String })], o.prototype, "label", void 0), e([a({
|
|
83
|
+
type: Boolean,
|
|
84
|
+
attribute: "no-highlight-selected",
|
|
85
|
+
reflect: !0
|
|
86
|
+
})], o.prototype, "noHighlightSelected", void 0), o = e([i("scb-select-option")], o);
|
|
87
|
+
//#endregion
|
|
88
|
+
export { o as ScbSelectOption };
|