scb-wc 0.1.78 → 0.1.80
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 +41 -22
- package/all.js +0 -2
- package/index.js +88 -90
- package/mvc/components/all.js +0 -2
- package/mvc/components/scb-accordion/scb-accordion-item.js +3 -173
- package/mvc/components/scb-accordion/scb-accordion.js +4 -33
- package/mvc/components/scb-app-bar/scb-app-bar.js +2 -110
- package/mvc/components/scb-avatar/scb-avatar.js +2 -94
- package/mvc/components/scb-badge/scb-badge.js +2 -72
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -12
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +4 -91
- package/mvc/components/scb-button/scb-button.js +47 -309
- package/mvc/components/scb-calendar/scb-calendar-event.js +2 -6
- package/mvc/components/scb-calendar/scb-calendar.js +6 -120
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +21 -350
- package/mvc/components/scb-card/scb-card.js +54 -819
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +3 -31
- package/mvc/components/scb-checkbox/scb-checkbox.js +5 -127
- package/mvc/components/scb-chip/scb-chip.js +2 -76
- package/mvc/components/scb-collapse/scb-collapse.js +2 -44
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +7 -73
- package/mvc/components/scb-dialog/scb-dialog.js +2 -213
- package/mvc/components/scb-divider/scb-divider.js +1 -69
- package/mvc/components/scb-drawer/scb-drawer.js +6 -102
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +2 -410
- package/mvc/components/scb-dropdown/scb-dropdown.js +17 -222
- package/mvc/components/scb-fab/scb-fab.js +7 -95
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +2 -69
- package/mvc/components/scb-fact-card/scb-fact-card.js +2 -214
- package/mvc/components/scb-footer/scb-footer-section.js +1 -3
- package/mvc/components/scb-footer/scb-footer.js +3 -172
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +2 -112
- package/mvc/components/scb-grid/scb-grid-item.js +1 -32
- package/mvc/components/scb-grid/scb-grid.js +1 -99
- package/mvc/components/scb-grid/scb-stack.js +1 -33
- package/mvc/components/scb-header/scb-header-menu-item.js +1 -5
- package/mvc/components/scb-header/scb-header-tab.js +1 -5
- package/mvc/components/scb-header/scb-header.js +75 -888
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +43 -168
- package/mvc/components/scb-icon-button/scb-icon-button.js +59 -171
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +17 -218
- package/mvc/components/scb-link/scb-link.js +4 -55
- package/mvc/components/scb-list/scb-list-item.js +23 -126
- package/mvc/components/scb-list/scb-list.js +5 -26
- package/mvc/components/scb-menu/scb-menu-item.js +16 -190
- package/mvc/components/scb-menu/scb-menu-section.js +4 -36
- package/mvc/components/scb-menu/scb-menu.js +5 -69
- package/mvc/components/scb-menu/scb-sub-menu.js +2 -7
- package/mvc/components/scb-nav/scb-nav-item.js +1 -28
- package/mvc/components/scb-nav/scb-nav.js +5 -98
- package/mvc/components/scb-notification-card/scb-notification-card.js +7 -364
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +3 -50
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -82
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +2 -31
- package/mvc/components/scb-overlay/scb-overlay.js +3 -43
- package/mvc/components/scb-pagination/scb-pagination.js +19 -221
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +2 -67
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +4 -121
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +2 -56
- package/mvc/components/scb-radio-button/scb-radio-button.js +5 -116
- package/mvc/components/scb-radio-button/scb-radio-group.js +2 -32
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +2 -61
- package/mvc/components/scb-search/scb-search.js +5 -249
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -32
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +2 -70
- package/mvc/components/scb-select/scb-select-option.js +2 -54
- package/mvc/components/scb-select/scb-select.js +4 -244
- package/mvc/components/scb-skeleton/scb-skeleton.js +2 -35
- package/mvc/components/scb-slider/scb-slider.js +5 -9
- package/mvc/components/scb-snackbar/scb-snackbar.js +9 -84
- package/mvc/components/scb-status-pill/scb-status-pill.js +2 -43
- package/mvc/components/scb-stepper/scb-step.js +8 -186
- package/mvc/components/scb-stepper/scb-stepper.js +2 -130
- package/mvc/components/scb-switch/scb-switch.js +4 -49
- package/mvc/components/scb-table/scb-table.js +2 -48
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +2 -53
- package/mvc/components/scb-tabs/scb-primary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-secondary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-tabs.js +4 -31
- package/mvc/components/scb-textfield/scb-textfield.js +142 -388
- package/mvc/components/scb-toc/scb-toc-item.js +3 -251
- package/mvc/components/scb-toc/scb-toc.js +2 -16
- package/mvc/components/scb-tooltip/scb-tooltip.js +8 -155
- package/mvc/components/scb-viz/scb-viz.js +4 -619
- package/mvc/scb-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- package/mvc/vendor/assist-chip.js +3 -3
- package/mvc/vendor/chip-set.js +1 -1
- package/mvc/vendor/chip.js +2 -2
- package/mvc/vendor/elevation.js +2 -2
- package/mvc/vendor/filter-chip.js +1 -1
- package/mvc/vendor/focusable.js +1 -1
- package/mvc/vendor/form-associated.js +1 -1
- package/mvc/vendor/icon.js +2 -2
- package/mvc/vendor/lazy-focus-ring.js +2 -0
- package/mvc/vendor/lazy-ripple.js +2 -0
- package/mvc/vendor/md-focus-ring.js +2 -2
- package/mvc/vendor/ripple.js +2 -2
- package/mvc/vendor/scb-card-variants.internal.js +284 -0
- package/mvc/vendor/scb-chevron.js +10 -0
- package/mvc/vendor/scb-header-drawer.internal.js +71 -0
- package/mvc/vendor/shared-styles.js +1 -1
- package/mvc/vendor/tab-styles.js +3 -3
- package/mvc/vendor/validator.js +1 -1
- package/mvc/vendor/vendor.js +3 -4
- package/package.json +2 -2
- package/scb-accordion/scb-accordion-item.js +33 -32
- package/scb-app-bar/scb-app-bar.js +1 -1
- package/scb-button/scb-button.js +287 -259
- package/scb-calendar/scb-calendar.js +49 -49
- package/scb-calendar-card/scb-calendar-card.js +105 -59
- package/scb-card/scb-card-variants.internal.js +230 -0
- package/scb-card/scb-card.js +387 -528
- package/scb-checkbox/scb-checkbox.js +0 -1
- package/scb-chevron/scb-chevron.js +0 -1
- package/scb-components/scb-button/scb-button.d.ts +14 -2
- package/scb-components/scb-calendar/scb-calendar.d.ts +1 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +16 -4
- package/scb-components/scb-card/scb-card-variants.internal.d.ts +15 -0
- package/scb-components/scb-card/scb-card.d.ts +26 -9
- package/scb-components/scb-cookies-consent/scb-cookies-consent.d.ts +3 -0
- package/scb-components/scb-header/scb-header-drawer.internal.d.ts +31 -0
- package/scb-components/scb-header/scb-header.d.ts +1 -2
- package/scb-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +6 -1
- package/scb-components/scb-icon-button/scb-icon-button.d.ts +28 -29
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -4
- package/scb-components/scb-list/scb-list-item.d.ts +20 -2
- package/scb-components/scb-list/scb-list.d.ts +1 -2
- package/scb-components/scb-nav/scb-nav.d.ts +2 -0
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +1 -0
- package/scb-components/scb-select/scb-select-option.d.ts +2 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +1 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +2 -0
- package/scb-cookies-consent/scb-cookies-consent.js +43 -31
- package/scb-datepicker/scb-datepicker.js +27 -25
- package/scb-dialog/scb-dialog.js +1 -1
- package/scb-dropdown/scb-dropdown.js +29 -28
- package/scb-header/scb-header-drawer.internal.js +78 -0
- package/scb-header/scb-header.js +41 -89
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +181 -88
- package/scb-icon-button/scb-icon-button.js +293 -205
- package/scb-keyfigure-card/scb-keyfigure-card.js +96 -43
- package/scb-list/scb-list-item.js +117 -52
- package/scb-list/scb-list.js +9 -9
- package/scb-nav/scb-nav.js +26 -23
- package/scb-notification-card/scb-notification-card.js +0 -2
- package/scb-options-menu/scb-options-menu-item.js +20 -20
- package/scb-pagination/scb-pagination.js +0 -1
- package/scb-progress-stepper/scb-progress-step.js +19 -17
- package/scb-radio-button/scb-radio-button.js +0 -1
- package/scb-search/scb-search.js +29 -28
- package/scb-segmented-button/scb-segmented-item.js +22 -19
- package/scb-select/scb-select-option.js +20 -14
- package/scb-select/scb-select.js +26 -26
- package/scb-stepper/scb-step.js +34 -31
- package/scb-textfield/scb-textfield.js +39 -39
- package/scb-toc/scb-toc-item.js +26 -26
- package/scb-tooltip/scb-tooltip.js +5 -4
- package/scb-viz/scb-viz.js +1 -1
- package/scb-wc-core.css +1 -1
- package/scb-wc-public-entry/index.d.ts +97 -0
- package/scb-wc-selfhost.css +1 -1
- package/scb-wc.bundle.js +1873 -1476
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +194 -198
- package/mvc/components/scb-chevron/scb-chevron.js +0 -41
- package/mvc/components/scb-datepicker/scb-datepicker.js +0 -296
- package/mvc/vendor/element-internals.js +0 -1
- package/mvc/vendor/filled-icon-button.js +0 -2
- package/mvc/vendor/filled-tonal-icon-button.js +0 -2
- package/mvc/vendor/form-label-activation.js +0 -1
- package/mvc/vendor/form-submitter.js +0 -1
- package/mvc/vendor/icon-button.js +0 -2
- package/mvc/vendor/list.js +0 -8
- package/mvc/vendor/outlined-icon-button.js +0 -2
- package/mvc/vendor/shared-styles2.js +0 -30
- package/scb-components/index.d.ts +0 -99
- package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -39
package/scb-card/scb-card.js
CHANGED
|
@@ -1,59 +1,88 @@
|
|
|
1
1
|
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
-
import "../scb-button/scb-button.js";
|
|
3
|
-
import "../scb-list/scb-list.js";
|
|
4
|
-
import "../scb-icon-button/scb-icon-button.js";
|
|
5
|
-
import "../scb-link/scb-link.js";
|
|
6
|
-
import "../scb-chip/scb-chip.js";
|
|
7
|
-
import "../scb-avatar/scb-avatar.js";
|
|
8
|
-
import "../scb-tooltip/scb-tooltip.js";
|
|
9
2
|
import { LitElement as t, css as n, html as r, nothing as i } from "lit";
|
|
10
3
|
import { customElement as a, property as o } from "lit/decorators.js";
|
|
11
|
-
import "@material/web/focus/md-focus-ring.js";
|
|
12
4
|
//#region src/scb-components/scb-card/scb-card.ts
|
|
13
|
-
var s
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"social",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
5
|
+
var s = new Set([
|
|
6
|
+
"social-comments-text",
|
|
7
|
+
"social-comments",
|
|
8
|
+
"social-comments-href",
|
|
9
|
+
"social-likes-text",
|
|
10
|
+
"social-likes",
|
|
11
|
+
"social-likes-hover-content",
|
|
12
|
+
"social-has-liked",
|
|
13
|
+
"social-likes-interactive",
|
|
14
|
+
"social-author",
|
|
15
|
+
"social-author-text",
|
|
16
|
+
"social-author-href"
|
|
17
|
+
]), c, l, u, d, f, p, m, h, g, _;
|
|
18
|
+
function v() {
|
|
19
|
+
return h ??= import("../shared/lazy-focus-ring.js"), h;
|
|
20
|
+
}
|
|
21
|
+
function y() {
|
|
22
|
+
return g ??= import("../shared/lazy-ripple.js"), g;
|
|
23
|
+
}
|
|
24
|
+
function b() {
|
|
25
|
+
return c ??= import("../scb-list/scb-list.js"), c;
|
|
26
|
+
}
|
|
27
|
+
function x() {
|
|
28
|
+
return l ??= import("../scb-icon-button/scb-icon-button.js"), l;
|
|
29
|
+
}
|
|
30
|
+
function S() {
|
|
31
|
+
return u ??= import("../scb-button/scb-button.js"), u;
|
|
32
|
+
}
|
|
33
|
+
function C() {
|
|
34
|
+
return d ??= import("../scb-link/scb-link.js"), d;
|
|
35
|
+
}
|
|
36
|
+
function w() {
|
|
37
|
+
return f ??= import("../scb-chip/scb-chip.js"), f;
|
|
38
|
+
}
|
|
39
|
+
function T() {
|
|
40
|
+
return p ??= import("../scb-avatar/scb-avatar.js"), p;
|
|
41
|
+
}
|
|
42
|
+
function E() {
|
|
43
|
+
return m ??= import("../scb-tooltip/scb-tooltip.js"), m;
|
|
44
|
+
}
|
|
45
|
+
function D() {
|
|
46
|
+
return _ ??= import("./scb-card-variants.internal.js"), _;
|
|
47
|
+
}
|
|
48
|
+
var O = {
|
|
21
49
|
fromAttribute: (e) => e ?? "",
|
|
22
50
|
toAttribute: (e) => typeof e == "string" ? e.trim() === "" ? null : e : null
|
|
23
|
-
},
|
|
24
|
-
static {
|
|
25
|
-
s = this;
|
|
26
|
-
}
|
|
51
|
+
}, k = class extends t {
|
|
27
52
|
constructor(...e) {
|
|
28
|
-
super(...e), this.
|
|
29
|
-
"social-comments-text",
|
|
30
|
-
"social-comments",
|
|
31
|
-
"social-comments-href",
|
|
32
|
-
"social-likes-text",
|
|
33
|
-
"social-likes",
|
|
34
|
-
"social-likes-hover-content",
|
|
35
|
-
"social-has-liked",
|
|
36
|
-
"social-likes-interactive",
|
|
37
|
-
"social-author",
|
|
38
|
-
"social-author-text",
|
|
39
|
-
"social-author-href"
|
|
40
|
-
]), this.__isSyncingManagedSocialAttributes = !1, this.type = "standard", this.variant = "standard", this.direction = "dynamic", this.size = "large", this.mediaType = "", this.mediaHref = "", this.mediaAlt = "", this.mediaSrcset = "", this.mediaSizes = "", this.mediaLoading = "auto", this.mediaDecoding = "async", this.mediaFetchPriority = "auto", this.mediaFit = "cover", this.mediaPosition = "center", this.mediaWidth = "", this.mediaHeight = "", this.mediaAspect = "", this.mediaPlaceholder = !1, this.cardHref = "", this.href = "", this.title = "", this.cardTitle = "", this.subtitle = "", this.vignette = "", this.vignetteVariant = "filled", this.vignetteSpacing = void 0, this.vignetteSpacingTop = void 0, this.vignetteSpacingBottom = void 0, this.vignetteSpacingLeft = void 0, this.vignetteSpacingRight = void 0, this.supportingText = "", this.commentsText = "", this.commentsDisabled = !1, this.commentsHref = "", this.likesText = "", this.likesDisabled = !1, this.likesHoverContent = "", this.hasLiked = !1, this.likesInteractive = !0, this.author = !1, this.authorText = "", this.authorHref = "", this.replyEnabled = !1, this.editEnabled = !1, this.deleteEnabled = !1, 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, this.innerPadding = void 0, this.paddingTop = void 0, this.paddingBottom = void 0, this.paddingLeft = void 0, this.paddingRight = void 0, this.__onImgLoad = (e) => {
|
|
53
|
+
super(...e), this.__dependencyKey = "", this.__focusRingRequested = !1, this.__focusRingLoaded = !1, this.__rippleRequested = !1, this.__rippleLoaded = !1, this.__pendingRippleClick = !1, this.__isSyncingManagedSocialAttributes = !1, this.type = "standard", this.variant = "standard", this.direction = "dynamic", this.size = "large", this.mediaType = "", this.mediaHref = "", this.mediaAlt = "", this.mediaSrcset = "", this.mediaSizes = "", this.mediaLoading = "auto", this.mediaDecoding = "async", this.mediaFetchPriority = "auto", this.mediaFit = "cover", this.mediaPosition = "center", this.mediaWidth = "", this.mediaHeight = "", this.mediaAspect = "", this.mediaPlaceholder = !1, this.cardHref = "", this.href = "", this.title = "", this.cardTitle = "", this.subtitle = "", this.vignette = "", this.vignetteVariant = "filled", this.vignetteSpacing = void 0, this.vignetteSpacingTop = void 0, this.vignetteSpacingBottom = void 0, this.vignetteSpacingLeft = void 0, this.vignetteSpacingRight = void 0, this.supportingText = "", this.commentsText = "", this.commentsDisabled = !1, this.commentsHref = "", this.likesText = "", this.likesDisabled = !1, this.likesHoverContent = "", this.hasLiked = !1, this.likesInteractive = !0, this.author = !1, this.authorText = "", this.authorHref = "", this.replyEnabled = !1, this.editEnabled = !1, this.deleteEnabled = !1, 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, this.innerPadding = void 0, this.paddingTop = void 0, this.paddingBottom = void 0, this.paddingLeft = void 0, this.paddingRight = void 0, this.__onImgLoad = (e) => {
|
|
41
54
|
let t = e.currentTarget.closest(".media");
|
|
42
55
|
t && t.classList.add("is-loaded");
|
|
56
|
+
}, this.__ensureRippleOnInteraction = (e, t = !1) => {
|
|
57
|
+
if (this.__primaryHref()) {
|
|
58
|
+
if (e && (this.__pendingRippleEvent = e), t && (this.__pendingRippleClick = !0), this.__rippleLoaded) {
|
|
59
|
+
this.__syncRipple();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.__rippleRequested || (this.__rippleRequested = !0, y().then(({ ensureRippleReady: e }) => e()).then(() => {
|
|
63
|
+
this.__rippleLoaded = !0, this.requestUpdate(), this.updateComplete.then(() => this.__syncRipple());
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
}, this.__syncRipple = async () => {
|
|
67
|
+
let e = this.renderRoot.querySelector("md-ripple"), t = this.renderRoot.querySelector(".scb-card"), n = this.__pendingRippleEvent, r = this.__pendingRippleClick;
|
|
68
|
+
this.__pendingRippleEvent = void 0, this.__pendingRippleClick = !1;
|
|
69
|
+
let { syncRippleToControl: i } = await y();
|
|
70
|
+
await i(e, t, n, r);
|
|
71
|
+
}, this.__ensureFocusRingOnFocusVisible = () => {
|
|
72
|
+
this.__focusRingLoaded || this.__focusRingRequested || (this.__focusRingRequested = !0, v().then(({ ensureFocusRingReady: e }) => e()).then(() => {
|
|
73
|
+
this.__focusRingLoaded = !0, this.requestUpdate();
|
|
74
|
+
}));
|
|
43
75
|
}, this.__onKeyDown = (e) => {
|
|
44
|
-
let t = this.
|
|
45
|
-
(e.key === "Enter" || e.key === " ") && t && (e.preventDefault(), this.__navigate(t, e));
|
|
76
|
+
let t = this.__primaryHref();
|
|
77
|
+
(e.key === "Enter" || e.key === " ") && t && (e.preventDefault(), this.__ensureRippleOnInteraction(void 0, !0), this.__navigate(t, e));
|
|
46
78
|
}, this.__handleHrefNavigation = (e) => {
|
|
47
|
-
let t = this.
|
|
79
|
+
let t = this.__primaryHref();
|
|
48
80
|
t && (e.target.closest("a") || this.__navigate(t, e));
|
|
81
|
+
}, this.__handleSlottedCardLinkClick = (e) => {
|
|
82
|
+
let t = e.composedPath().find((e) => e instanceof HTMLAnchorElement && e.getAttribute("slot") === "card-link")?.getAttribute("href") || this.__primaryHref();
|
|
83
|
+
t && (this.__dispatchCardNavigate(t, e) || e.preventDefault());
|
|
49
84
|
};
|
|
50
85
|
}
|
|
51
|
-
static {
|
|
52
|
-
this.__iconLoaded = !1;
|
|
53
|
-
}
|
|
54
|
-
static {
|
|
55
|
-
this.__rippleLoaded = !1;
|
|
56
|
-
}
|
|
57
86
|
static {
|
|
58
87
|
this.styles = n`
|
|
59
88
|
:host {
|
|
@@ -192,18 +221,6 @@ var s, c = [
|
|
|
192
221
|
min-height: 190px;
|
|
193
222
|
}
|
|
194
223
|
|
|
195
|
-
.scb-card.no-hover,
|
|
196
|
-
.scb-card.no-hover:hover,
|
|
197
|
-
.scb-card.no-hover:active {
|
|
198
|
-
/* Ta bort hover/klick-effekter */
|
|
199
|
-
box-shadow: none !important;
|
|
200
|
-
cursor: default !important;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.scb-card.no-hover md-ripple {
|
|
204
|
-
display: none !important;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
224
|
:host([type='standard']) {
|
|
208
225
|
--scb-card-max-w: var(--scb-card-standard-max-w, none);
|
|
209
226
|
}
|
|
@@ -268,6 +285,14 @@ var s, c = [
|
|
|
268
285
|
display: block;
|
|
269
286
|
}
|
|
270
287
|
|
|
288
|
+
.scb-card.has-slotted-card-link:focus-within + md-focus-ring {
|
|
289
|
+
display: block;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
:host(:focus-within) .scb-card.has-slotted-card-link + md-focus-ring {
|
|
293
|
+
display: block;
|
|
294
|
+
}
|
|
295
|
+
|
|
271
296
|
.scb-card {
|
|
272
297
|
color: var(--md-sys-color-on-surface, #0F0865);
|
|
273
298
|
font-family: var(--brand-font, var(--brand, "Inter"), sans-serif);
|
|
@@ -281,10 +306,6 @@ var s, c = [
|
|
|
281
306
|
max-inline-size: 100%;
|
|
282
307
|
}
|
|
283
308
|
|
|
284
|
-
:host([type='social']) .scb-card {
|
|
285
|
-
overflow: visible;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
309
|
.scb-card:focus,
|
|
289
310
|
.scb-card:focus-visible {
|
|
290
311
|
outline: none;
|
|
@@ -319,23 +340,24 @@ var s, c = [
|
|
|
319
340
|
cursor: pointer;
|
|
320
341
|
}
|
|
321
342
|
|
|
322
|
-
.
|
|
323
|
-
.social-metrics a.author {
|
|
324
|
-
color: var(--md-sys-color-primary, #1F44FF);
|
|
325
|
-
text-decoration: none;
|
|
326
|
-
border-radius: 4px;
|
|
343
|
+
.scb-card.has-slotted-card-link {
|
|
327
344
|
cursor: pointer;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
slot[name='card-link']::slotted(a) {
|
|
348
|
+
position: absolute;
|
|
349
|
+
inset: 0;
|
|
350
|
+
z-index: 2;
|
|
351
|
+
border-radius: inherit;
|
|
352
|
+
color: transparent;
|
|
353
|
+
font-size: 0;
|
|
354
|
+
text-decoration: none;
|
|
328
355
|
outline: none;
|
|
329
356
|
}
|
|
330
357
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
.social-metrics a.author:focus {
|
|
335
|
-
color: var(--md-sys-color-primary, #1F44FF);
|
|
336
|
-
text-decoration: var(--scb-link-decoration, underline);
|
|
337
|
-
text-underline-offset: var(--scb-link-underline-offset, .22em);
|
|
338
|
-
text-decoration-thickness: var(--scb-link-underline-thickness, 1px);
|
|
358
|
+
slot[name='card-link']::slotted(a:focus),
|
|
359
|
+
slot[name='card-link']::slotted(a:focus-visible) {
|
|
360
|
+
outline: none;
|
|
339
361
|
}
|
|
340
362
|
|
|
341
363
|
md-ripple {
|
|
@@ -353,6 +375,12 @@ var s, c = [
|
|
|
353
375
|
border-radius: var(--md-sys-shape-corner-large, 16px);
|
|
354
376
|
}
|
|
355
377
|
|
|
378
|
+
.media.has-reserved-space {
|
|
379
|
+
inline-size: 100%;
|
|
380
|
+
aspect-ratio: var(--scb-card-media-aspect, 3 / 2);
|
|
381
|
+
min-block-size: var(--scb-card-media-min-block-size, 0);
|
|
382
|
+
}
|
|
383
|
+
|
|
356
384
|
.media img,
|
|
357
385
|
.media ::slotted(img) {
|
|
358
386
|
display: block;
|
|
@@ -363,6 +391,11 @@ var s, c = [
|
|
|
363
391
|
object-position: var(--scb-card-media-position, center);
|
|
364
392
|
}
|
|
365
393
|
|
|
394
|
+
.media.has-reserved-space img,
|
|
395
|
+
.media.has-reserved-space ::slotted(img) {
|
|
396
|
+
block-size: 100%;
|
|
397
|
+
}
|
|
398
|
+
|
|
366
399
|
/* Skeleton-placeholder */
|
|
367
400
|
.media.has-ph::before {
|
|
368
401
|
content: '';
|
|
@@ -399,21 +432,6 @@ var s, c = [
|
|
|
399
432
|
padding-inline-end: var(--scb-card-content-padding-inline-end, var(--scb-card-size-content-padding-inline));
|
|
400
433
|
}
|
|
401
434
|
|
|
402
|
-
.container-content {
|
|
403
|
-
display: flex;
|
|
404
|
-
flex-direction: column;
|
|
405
|
-
gap: var(--scb-card-container-gap, var(--scb-card-size-container-gap));
|
|
406
|
-
padding-block-start: var(--scb-card-container-padding-block-start, var(--scb-card-content-padding-block-start, var(--scb-card-size-content-padding-block)));
|
|
407
|
-
padding-block-end: var(--scb-card-container-padding-block-end, var(--scb-card-content-padding-block-end, var(--scb-card-size-content-padding-block)));
|
|
408
|
-
padding-inline-start: var(--scb-card-container-padding-inline-start, var(--scb-card-content-padding-inline-start, var(--scb-card-size-content-padding-inline)));
|
|
409
|
-
padding-inline-end: var(--scb-card-container-padding-inline-end, var(--scb-card-content-padding-inline-end, var(--scb-card-size-content-padding-inline)));
|
|
410
|
-
min-inline-size: 0;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.container-content.has-header {
|
|
414
|
-
gap: var(--scb-card-container-gap-with-header, var(--scb-card-size-container-gap-with-header));
|
|
415
|
-
}
|
|
416
|
-
|
|
417
435
|
.top-content {
|
|
418
436
|
display: flex;
|
|
419
437
|
flex-direction: column;
|
|
@@ -426,10 +444,6 @@ var s, c = [
|
|
|
426
444
|
margin-block-end: var(--scb-card-chip-gap, var(--scb-card-size-top-gap));
|
|
427
445
|
}
|
|
428
446
|
|
|
429
|
-
.container-content > .chip-slot {
|
|
430
|
-
margin-block-end: 0;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
447
|
.header {
|
|
434
448
|
font-size: var(--scb-card-size-header-font-size);
|
|
435
449
|
font-weight: var(--weight-bold, 700);
|
|
@@ -459,7 +473,30 @@ var s, c = [
|
|
|
459
473
|
text-decoration: none;
|
|
460
474
|
}
|
|
461
475
|
|
|
462
|
-
.
|
|
476
|
+
.card-icon {
|
|
477
|
+
display: inline-block;
|
|
478
|
+
inline-size: 1em;
|
|
479
|
+
block-size: 1em;
|
|
480
|
+
overflow: hidden;
|
|
481
|
+
font-family: 'Material Symbols Outlined';
|
|
482
|
+
font-size: var(--icon-size-medium, 24px);
|
|
483
|
+
line-height: 1;
|
|
484
|
+
text-align: center;
|
|
485
|
+
white-space: nowrap;
|
|
486
|
+
text-transform: none;
|
|
487
|
+
word-wrap: normal;
|
|
488
|
+
direction: ltr;
|
|
489
|
+
font-feature-settings: 'liga' 1;
|
|
490
|
+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
491
|
+
-webkit-font-smoothing: antialiased;
|
|
492
|
+
-moz-osx-font-smoothing: grayscale;
|
|
493
|
+
}
|
|
494
|
+
.card-icon.scb-svg-icon {
|
|
495
|
+
fill: currentColor;
|
|
496
|
+
font: inherit;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.header .card-icon {
|
|
463
500
|
flex: 0 0 auto;
|
|
464
501
|
align-self: start;
|
|
465
502
|
}
|
|
@@ -510,6 +547,10 @@ var s, c = [
|
|
|
510
547
|
inline-size: min(100%, var(--scb-card-size-horizontal-media-max, var(--scb-card-horizontal-media-max, 176px)));
|
|
511
548
|
}
|
|
512
549
|
|
|
550
|
+
.scb-card.horizontal .media.has-reserved-space {
|
|
551
|
+
aspect-ratio: var(--scb-card-media-aspect, var(--scb-card-horizontal-media-aspect, 3 / 2));
|
|
552
|
+
}
|
|
553
|
+
|
|
513
554
|
.scb-card.horizontal .media ::slotted(scb-avatar) {
|
|
514
555
|
margin: 0;
|
|
515
556
|
}
|
|
@@ -526,7 +567,7 @@ var s, c = [
|
|
|
526
567
|
align-items: flex-start;
|
|
527
568
|
}
|
|
528
569
|
|
|
529
|
-
.scb-card.horizontal .header
|
|
570
|
+
.scb-card.horizontal .header .card-icon {
|
|
530
571
|
align-self: flex-start;
|
|
531
572
|
}
|
|
532
573
|
|
|
@@ -538,6 +579,12 @@ var s, c = [
|
|
|
538
579
|
inline-size: 100%;
|
|
539
580
|
block-size: auto;
|
|
540
581
|
}
|
|
582
|
+
|
|
583
|
+
.scb-card.horizontal .media.has-reserved-space img,
|
|
584
|
+
.scb-card.horizontal .media.has-reserved-space ::slotted(img) {
|
|
585
|
+
aspect-ratio: auto;
|
|
586
|
+
block-size: 100%;
|
|
587
|
+
}
|
|
541
588
|
|
|
542
589
|
@container (min-width: 500px) {
|
|
543
590
|
.scb-card.dynamic-direction {
|
|
@@ -555,6 +602,10 @@ var s, c = [
|
|
|
555
602
|
inline-size: min(100%, var(--scb-card-size-horizontal-media-max, var(--scb-card-horizontal-media-max, 176px)));
|
|
556
603
|
}
|
|
557
604
|
|
|
605
|
+
.scb-card.dynamic-direction .media.has-reserved-space {
|
|
606
|
+
aspect-ratio: var(--scb-card-media-aspect, var(--scb-card-horizontal-media-aspect, 3 / 2));
|
|
607
|
+
}
|
|
608
|
+
|
|
558
609
|
.scb-card.dynamic-direction .media ::slotted(scb-avatar) {
|
|
559
610
|
margin: 0;
|
|
560
611
|
}
|
|
@@ -571,7 +622,7 @@ var s, c = [
|
|
|
571
622
|
align-items: flex-start;
|
|
572
623
|
}
|
|
573
624
|
|
|
574
|
-
.scb-card.dynamic-direction .header
|
|
625
|
+
.scb-card.dynamic-direction .header .card-icon {
|
|
575
626
|
align-self: flex-start;
|
|
576
627
|
}
|
|
577
628
|
|
|
@@ -584,6 +635,12 @@ var s, c = [
|
|
|
584
635
|
block-size: auto;
|
|
585
636
|
}
|
|
586
637
|
|
|
638
|
+
.scb-card.dynamic-direction .media.has-reserved-space img,
|
|
639
|
+
.scb-card.dynamic-direction .media.has-reserved-space ::slotted(img) {
|
|
640
|
+
aspect-ratio: auto;
|
|
641
|
+
block-size: 100%;
|
|
642
|
+
}
|
|
643
|
+
|
|
587
644
|
:host([sizing='content-width']) .scb-card.dynamic-direction:has(.media img) .full-content {
|
|
588
645
|
inline-size: max-content;
|
|
589
646
|
flex: 0 1 auto;
|
|
@@ -595,67 +652,6 @@ var s, c = [
|
|
|
595
652
|
flex: 0 1 auto;
|
|
596
653
|
}
|
|
597
654
|
|
|
598
|
-
.social-metrics {
|
|
599
|
-
display: flex;
|
|
600
|
-
margin-top: var(--spacing-4, 12px);
|
|
601
|
-
gap: var(--scb-card-size-social-gap);
|
|
602
|
-
flex-wrap: wrap;
|
|
603
|
-
align-items: center;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
.social-metrics md-icon {
|
|
607
|
-
width: var(--scb-card-size-social-icon);
|
|
608
|
-
height: var(--scb-card-size-social-icon);
|
|
609
|
-
font-size: var(--scb-card-size-social-icon-font-size, var(--scb-card-size-social-icon));
|
|
610
|
-
vertical-align: middle;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.social-text{
|
|
614
|
-
font-size: var(--scb-card-size-social-text);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.comments,
|
|
618
|
-
.likes {
|
|
619
|
-
display: flex;
|
|
620
|
-
align-items: center;
|
|
621
|
-
gap: var(--spacing-2, 4px);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
.social-action {
|
|
625
|
-
display: inline-flex;
|
|
626
|
-
align-items: center;
|
|
627
|
-
gap: var(--spacing-1, 2px);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.scb-card .content.list {
|
|
631
|
-
margin-top: 0;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
.scb-card .content.list.has-top-content {
|
|
635
|
-
margin-top: var(--scb-card-size-list-offset);
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.scb-card .content.actions ::slotted(*) {
|
|
639
|
-
margin-top: var(--scb-card-size-actions-offset);
|
|
640
|
-
display: flex;
|
|
641
|
-
flex-wrap: wrap;
|
|
642
|
-
gap: var(--spacing-3, 8px);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
.scb-card .content.links {
|
|
646
|
-
margin-top: var(--scb-card-size-links-offset);
|
|
647
|
-
font-size: var(--scb-card-size-link-font-size);
|
|
648
|
-
line-height: var(--scb-card-size-link-line-height);
|
|
649
|
-
letter-spacing: var(--scb-card-size-link-letter-spacing);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
.scb-card .content.links ::slotted(a),
|
|
653
|
-
.scb-card .content.links ::slotted(scb-link) {
|
|
654
|
-
display: block;
|
|
655
|
-
margin-block-start: var(--scb-card-size-links-item-offset);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
.scb-card .content.links ::slotted(a),
|
|
659
655
|
.scb-card .content.footer ::slotted(a),
|
|
660
656
|
slot[name='supporting-text']::slotted(a) {
|
|
661
657
|
font-size: var(--scb-card-size-link-font-size);
|
|
@@ -663,7 +659,6 @@ var s, c = [
|
|
|
663
659
|
letter-spacing: var(--scb-card-size-link-letter-spacing);
|
|
664
660
|
}
|
|
665
661
|
|
|
666
|
-
.scb-card .content.links ::slotted(scb-link),
|
|
667
662
|
.scb-card .content.footer ::slotted(scb-link),
|
|
668
663
|
slot[name='supporting-text']::slotted(scb-link) {
|
|
669
664
|
--scb-link-font-size: var(--scb-card-size-link-font-size);
|
|
@@ -678,21 +673,10 @@ var s, c = [
|
|
|
678
673
|
letter-spacing: var(--scb-card-size-link-letter-spacing);
|
|
679
674
|
}
|
|
680
675
|
|
|
681
|
-
.scb-card:not(.filled):not(.filled-alternative) .content.list ::slotted(scb-list) {
|
|
682
|
-
--scb-list-bg: var(--md-sys-color-surface, #FFFFFF);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
686
|
-
--scb-list-bg: var(--md-sys-color-surface-dim, #F9F8EF);
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
.scb-card.filled-alternative .content.list ::slotted(scb-list) {
|
|
690
|
-
--scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
|
|
691
|
-
}
|
|
692
676
|
`;
|
|
693
677
|
}
|
|
694
678
|
attributeChangedCallback(e, t, n) {
|
|
695
|
-
this.__isSyncingManagedSocialAttributes &&
|
|
679
|
+
this.__isSyncingManagedSocialAttributes && s.has(e) || super.attributeChangedCallback(e, t, n);
|
|
696
680
|
}
|
|
697
681
|
get likeButton() {
|
|
698
682
|
return this.cardType === "social" ? this.renderRoot.querySelector(".likes scb-icon-button") : null;
|
|
@@ -720,49 +704,41 @@ var s, c = [
|
|
|
720
704
|
h: 400
|
|
721
705
|
};
|
|
722
706
|
}
|
|
723
|
-
|
|
724
|
-
|
|
707
|
+
__mediaReserveAspect(e = "") {
|
|
708
|
+
let t = (this.mediaAspect || "").trim();
|
|
709
|
+
if (t) return t;
|
|
710
|
+
let n = Number(this.mediaWidth) || 0, r = Number(this.mediaHeight) || 0;
|
|
711
|
+
return n > 0 && r > 0 ? `${n} / ${r}` : e;
|
|
725
712
|
}
|
|
726
|
-
|
|
727
|
-
let t =
|
|
728
|
-
return t
|
|
713
|
+
__mediaReserveStyle(e = "") {
|
|
714
|
+
let t = this.__mediaReserveAspect(e);
|
|
715
|
+
return t ? `--scb-card-media-aspect:${t};` : "";
|
|
729
716
|
}
|
|
730
|
-
|
|
731
|
-
let
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
t = e;
|
|
736
|
-
}
|
|
737
|
-
return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi, " ").replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
|
717
|
+
__slottedMediaAspect() {
|
|
718
|
+
let e = this.querySelector("[slot=\"media\"]");
|
|
719
|
+
if (!e) return "";
|
|
720
|
+
let t = Number(e.getAttribute("width")) || 0, n = Number(e.getAttribute("height")) || 0;
|
|
721
|
+
return t > 0 && n > 0 ? `${t} / ${n}` : "";
|
|
738
722
|
}
|
|
739
|
-
get
|
|
723
|
+
get __resolvedTitle() {
|
|
740
724
|
return this.cardTitle || this.title;
|
|
741
725
|
}
|
|
742
726
|
get cardType() {
|
|
743
727
|
let e = (this.type || "standard").toLowerCase();
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
composed: !0,
|
|
754
|
-
detail: t
|
|
755
|
-
}));
|
|
728
|
+
switch (e) {
|
|
729
|
+
case "standard":
|
|
730
|
+
case "list":
|
|
731
|
+
case "social":
|
|
732
|
+
case "link":
|
|
733
|
+
case "action":
|
|
734
|
+
case "container": return e;
|
|
735
|
+
default: return "standard";
|
|
736
|
+
}
|
|
756
737
|
}
|
|
757
|
-
|
|
758
|
-
this.
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
detail: {
|
|
762
|
-
action: e,
|
|
763
|
-
originalEvent: t
|
|
764
|
-
}
|
|
765
|
-
}));
|
|
738
|
+
__ensureVariantRenderer() {
|
|
739
|
+
return this.cardType === "standard" || this.__variantRenderer ? Promise.resolve() : D().then((e) => {
|
|
740
|
+
this.__variantRenderer !== e && (this.__variantRenderer = e, e.ensureScbCardVariantStyles(this.renderRoot), this.requestUpdate());
|
|
741
|
+
});
|
|
766
742
|
}
|
|
767
743
|
__dispatchCardNavigate(e, t) {
|
|
768
744
|
let n = {
|
|
@@ -786,22 +762,50 @@ var s, c = [
|
|
|
786
762
|
__effectiveHref() {
|
|
787
763
|
return this.cardHref || this.href;
|
|
788
764
|
}
|
|
765
|
+
__slottedCardLink() {
|
|
766
|
+
return this.querySelector(":scope > a[slot=\"card-link\"]");
|
|
767
|
+
}
|
|
768
|
+
__primaryHref() {
|
|
769
|
+
return this.__effectiveHref() || this.__slottedCardLink()?.getAttribute("href") || "";
|
|
770
|
+
}
|
|
789
771
|
__navigate(e, t) {
|
|
790
772
|
e && this.__dispatchCardNavigate(e, t) && window.open(e, "_self");
|
|
791
773
|
}
|
|
792
|
-
|
|
793
|
-
|
|
774
|
+
__slotNames() {
|
|
775
|
+
let e = /* @__PURE__ */ new Set();
|
|
776
|
+
for (let t of Array.from(this.children)) {
|
|
777
|
+
let n = t.getAttribute("slot");
|
|
778
|
+
n && e.add(n);
|
|
779
|
+
}
|
|
780
|
+
return e;
|
|
794
781
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
782
|
+
__hasSlottedContent(e, t) {
|
|
783
|
+
return t ? t.has(e) : Array.from(this.children).some((t) => t.getAttribute("slot") === e);
|
|
784
|
+
}
|
|
785
|
+
__hasLightDomElement(e) {
|
|
786
|
+
return !!this.querySelector(e);
|
|
787
|
+
}
|
|
788
|
+
__ensureDependenciesReady() {
|
|
789
|
+
let e = [], t = [], n = this.cardType, r = !!this.vignette?.trim(), i = (n, r) => {
|
|
790
|
+
t.push(n), e.push(r());
|
|
791
|
+
};
|
|
792
|
+
(n === "list" || this.__hasLightDomElement("scb-list, scb-list-item")) && i("list", b), n !== "standard" && i("card-variants", () => this.__ensureVariantRenderer()), (n === "social" && (!this.likesDisabled && this.likesInteractive || !this.commentsDisabled && this.commentsHref || this.replyEnabled || this.editEnabled || this.deleteEnabled) || this.__hasLightDomElement("scb-icon-button")) && i("icon-button", x), this.__hasLightDomElement("scb-button") && i("button", S), this.__hasLightDomElement("scb-link") && i("link", C), (r || this.__hasLightDomElement("scb-chip")) && i("chip", w), ((this.mediaType || "").toLowerCase() === "avatar" || this.__hasLightDomElement("scb-avatar")) && i("avatar", T), (n === "social" && this.likesHoverContent || this.__hasLightDomElement("scb-tooltip")) && i("tooltip", E);
|
|
793
|
+
let a = t.sort().join("|");
|
|
794
|
+
a !== this.__dependencyKey && (this.__dependencyKey = a, e.length > 0 && Promise.all(e).then(() => this.requestUpdate()));
|
|
795
|
+
}
|
|
796
|
+
__mediaTemplate(e) {
|
|
797
|
+
if (this.__hasSlottedContent("media", e)) {
|
|
798
|
+
let e = this.__mediaReserveStyle(this.__slottedMediaAspect());
|
|
799
|
+
return r`
|
|
800
|
+
<div class="media ${e ? "has-reserved-space" : ""}" style=${e || i}>
|
|
798
801
|
<slot name="media"></slot>
|
|
799
802
|
</div>
|
|
800
803
|
`;
|
|
804
|
+
}
|
|
801
805
|
if ((this.mediaType || "").toLowerCase() === "avatar") return r`
|
|
802
806
|
<div class="media">
|
|
803
807
|
<slot name="media">
|
|
804
|
-
<scb-avatar variant="icon" label="${this
|
|
808
|
+
<scb-avatar variant="icon" label="${this.__resolvedTitle}" icon-name="person"></scb-avatar>
|
|
805
809
|
</slot>
|
|
806
810
|
</div>
|
|
807
811
|
`;
|
|
@@ -811,9 +815,9 @@ var s, c = [
|
|
|
811
815
|
let r = this.__calcAspectWH(n || "3/2");
|
|
812
816
|
e ||= r.w, t ||= r.h;
|
|
813
817
|
}
|
|
814
|
-
let i =
|
|
818
|
+
let i = this.__mediaReserveStyle(`${e} / ${t}`);
|
|
815
819
|
return r`
|
|
816
|
-
<div class="media ${this.mediaPlaceholder ? "has-ph" : ""}" style
|
|
820
|
+
<div class="media has-reserved-space ${this.mediaPlaceholder ? "has-ph" : ""}" style=${i}>
|
|
817
821
|
<slot name="media-sources"></slot>
|
|
818
822
|
<img
|
|
819
823
|
src="${this.mediaHref || ""}"
|
|
@@ -837,11 +841,11 @@ var s, c = [
|
|
|
837
841
|
let t = String(e).trim();
|
|
838
842
|
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
839
843
|
}
|
|
840
|
-
|
|
844
|
+
__applySpacing() {
|
|
841
845
|
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);
|
|
842
846
|
t ? this.style.setProperty("--scb-card-spacing-block-start", t) : this.style.removeProperty("--scb-card-spacing-block-start"), n ? this.style.setProperty("--scb-card-spacing-block-end", n) : this.style.removeProperty("--scb-card-spacing-block-end"), r ? this.style.setProperty("--scb-card-spacing-inline-start", r) : this.style.removeProperty("--scb-card-spacing-inline-start"), i ? this.style.setProperty("--scb-card-spacing-inline-end", i) : this.style.removeProperty("--scb-card-spacing-inline-end");
|
|
843
847
|
}
|
|
844
|
-
|
|
848
|
+
__applyPadding() {
|
|
845
849
|
let e = this.mapSpacingToken(this.innerPadding), t = this.mapSpacingToken(this.paddingTop) ?? e, n = this.mapSpacingToken(this.paddingBottom) ?? e, r = this.mapSpacingToken(this.paddingLeft) ?? e, i = this.mapSpacingToken(this.paddingRight) ?? e;
|
|
846
850
|
t ? this.style.setProperty("--scb-card-content-padding-block-start", t) : this.style.removeProperty("--scb-card-content-padding-block-start"), n ? this.style.setProperty("--scb-card-content-padding-block-end", n) : this.style.removeProperty("--scb-card-content-padding-block-end"), r ? this.style.setProperty("--scb-card-content-padding-inline-start", r) : this.style.removeProperty("--scb-card-content-padding-inline-start"), i ? this.style.setProperty("--scb-card-content-padding-inline-end", i) : this.style.removeProperty("--scb-card-content-padding-inline-end");
|
|
847
851
|
}
|
|
@@ -873,484 +877,339 @@ var s, c = [
|
|
|
873
877
|
this.cardType === "social" && (this.__syncStringAttribute("social-comments-text", this.commentsText), this.__syncNumberAttribute("social-comments", this.comments), this.__syncStringAttribute("social-comments-href", this.commentsHref), this.__syncStringAttribute("social-likes-text", this.likesText), this.__syncNumberAttribute("social-likes", this.likes), this.__syncStringAttribute("social-likes-hover-content", this.likesHoverContent), this.__syncBooleanAttribute("social-has-liked", this.hasLiked), this.__syncBooleanAttribute("social-likes-interactive", this.likesInteractive), this.__syncBooleanAttribute("social-author", this.author), this.__syncStringAttribute("social-author-text", this.authorText), this.__syncStringAttribute("social-author-href", this.authorHref));
|
|
874
878
|
}
|
|
875
879
|
render() {
|
|
876
|
-
let e = this.
|
|
880
|
+
let e = this.__slotNames(), t = (t) => this.__hasSlottedContent(t, e), n = this.cardType, a = this.variant ? `${this.variant.toLowerCase()}` : "", o = (this.direction || "dynamic").toLowerCase(), s = n !== "list" && n !== "container" && o !== "vertical" && o !== "horizontal" ? "dynamic-direction" : "", c = n === "list" || n === "container" ? "vertical" : o === "horizontal" ? "horizontal" : "vertical", l = this.__effectiveHref(), u = t("card-link"), d = n === "standard" || n === "social", f = d && !!l && !u, p = d && (!!l || u), m = f ? "clickable" : "", h = u ? "has-slotted-card-link" : "", g = this.date instanceof Date ? this.date.toISOString().slice(0, 10) : this.date || "", _ = !!this.__resolvedTitle || t("heading"), v = !!this.subtitle || t("subtitle"), y = !!this.supportingText || t("supporting-text"), b = !!g || t("date"), x = t("footer"), S = (e = !1) => _ ? r`
|
|
877
881
|
<div class="header">
|
|
878
882
|
<slot name="heading">
|
|
879
|
-
${e ? r`<a class="title" href="${
|
|
883
|
+
${e ? r`<a class="title" href="${l}" tabindex="-1">${this.__resolvedTitle}</a>` : r`<span class="title">${this.__resolvedTitle}</span>`}
|
|
880
884
|
</slot>
|
|
881
|
-
${e ? r`<
|
|
885
|
+
${e ? r`<span class="card-icon" aria-hidden="true">arrow_forward</span>` : i}
|
|
882
886
|
</div>
|
|
883
|
-
` : i,
|
|
887
|
+
` : i, C = () => v ? r`<div class="sub-label"><slot name="subtitle">${this.subtitle}</slot></div>` : i, w = (e = this.supportingText) => e || t("supporting-text") ? r`<div class="supporting-text"><slot name="supporting-text">${e}</slot></div>` : i, T = () => b ? r`<div class="date"><slot name="date">${g}</slot></div>` : i, E = () => this.__mediaTemplate(e), D = this.vignetteSpacing || i, O = this.vignetteSpacingTop || i, k = this.vignetteSpacingBottom || (this.vignetteSpacing ? i : "5"), A = this.vignetteSpacingLeft || i, j = this.vignetteSpacingRight || i, M = !!this.vignette?.trim(), N = M ? r`<scb-chip
|
|
884
888
|
class="content-vignette"
|
|
885
889
|
variant="static"
|
|
886
890
|
static-variant="${this.vignetteVariant === "outline" || this.vignetteVariant === "outlined" ? "outlined" : "filled"}"
|
|
887
891
|
label="${this.vignette}"
|
|
888
|
-
spacing=${
|
|
889
|
-
spacing-top=${
|
|
890
|
-
spacing-bottom=${
|
|
891
|
-
spacing-left=${
|
|
892
|
-
spacing-right=${
|
|
893
|
-
></scb-chip>` : i,
|
|
894
|
-
${
|
|
892
|
+
spacing=${D}
|
|
893
|
+
spacing-top=${O}
|
|
894
|
+
spacing-bottom=${k}
|
|
895
|
+
spacing-left=${A}
|
|
896
|
+
spacing-right=${j}
|
|
897
|
+
></scb-chip>` : i, P = t("scb-chip") || M, F = () => t("scb-chip") ? r`<div class="chip-slot"><slot name="scb-chip"></slot></div>` : M ? r`<div class="chip-slot">${N}</div>` : i, I = (e = !1, t = !0, n = !0, a = this.supportingText) => r`
|
|
898
|
+
${F()}
|
|
895
899
|
<div class="top-content">
|
|
896
|
-
${
|
|
897
|
-
${
|
|
898
|
-
${t ?
|
|
899
|
-
${n ?
|
|
900
|
+
${S(e)}
|
|
901
|
+
${C()}
|
|
902
|
+
${t ? w(a) : i}
|
|
903
|
+
${n ? T() : i}
|
|
900
904
|
</div>
|
|
901
|
-
`,
|
|
905
|
+
`, L = () => x ? r`
|
|
902
906
|
<div class="content footer">
|
|
903
907
|
<slot name="footer"></slot>
|
|
904
908
|
</div>
|
|
905
|
-
` : i,
|
|
909
|
+
` : i, R = P || _ || v || y || b, z = (e) => r`
|
|
906
910
|
<div
|
|
907
|
-
class="scb-card ${
|
|
908
|
-
@click=${
|
|
909
|
-
@keydown=${
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
911
|
+
class="scb-card ${a} ${c} ${s} ${m} ${h}"
|
|
912
|
+
@click=${f ? this.__handleHrefNavigation : null}
|
|
913
|
+
@keydown=${f ? this.__onKeyDown : null}
|
|
914
|
+
@focusin=${p ? this.__ensureFocusRingOnFocusVisible : null}
|
|
915
|
+
@pointerenter=${p ? this.__ensureRippleOnInteraction : null}
|
|
916
|
+
@pointerdown=${p ? this.__ensureRippleOnInteraction : null}
|
|
917
|
+
style="cursor:${p ? "pointer" : "default"};"
|
|
918
|
+
role=${f ? "link" : i}
|
|
919
|
+
tabindex=${f ? "0" : i}
|
|
920
|
+
aria-label=${this.__resolvedTitle || this.subtitle || "Kort"}
|
|
914
921
|
>
|
|
915
|
-
${
|
|
916
|
-
${
|
|
922
|
+
${p && this.__rippleLoaded ? r`<md-ripple></md-ripple>` : i}
|
|
923
|
+
${u ? r`<slot
|
|
924
|
+
name="card-link"
|
|
925
|
+
@click=${this.__handleSlottedCardLinkClick}
|
|
926
|
+
@focusin=${this.__ensureFocusRingOnFocusVisible}
|
|
927
|
+
@pointerenter=${this.__ensureRippleOnInteraction}
|
|
928
|
+
@pointerdown=${this.__ensureRippleOnInteraction}
|
|
929
|
+
></slot>` : i}
|
|
930
|
+
${E()}
|
|
917
931
|
${e}
|
|
918
932
|
</div>
|
|
919
|
-
|
|
933
|
+
${p && this.__focusRingLoaded ? r`<md-focus-ring></md-focus-ring>` : i}
|
|
920
934
|
`;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
case "social":
|
|
938
|
-
let e = this.commentsHref, t = (e) => {
|
|
939
|
-
e.stopPropagation();
|
|
940
|
-
}, n = (e) => {
|
|
941
|
-
let t = this.renderRoot?.querySelector(".scb-card");
|
|
942
|
-
t && (e ? t.classList.add("no-hover") : t.classList.remove("no-hover"));
|
|
943
|
-
}, a = this.commentsText ? `${this.commentsText}: ` : "", o = this.likesText ? `${this.likesText}: ` : "", c = (e) => (t) => {
|
|
944
|
-
t.stopPropagation(), this.__dispatchSocialActionEvent(e, t);
|
|
945
|
-
}, l = this.likesDisabled ? i : r`
|
|
946
|
-
<span
|
|
947
|
-
class="likes"
|
|
948
|
-
@mouseenter=${() => n(!0)}
|
|
949
|
-
@mouseleave=${() => n(!1)}
|
|
950
|
-
>
|
|
951
|
-
${this.likesInteractive ? r`
|
|
952
|
-
<scb-icon-button
|
|
953
|
-
id="like-button"
|
|
954
|
-
variant="standard"
|
|
955
|
-
icon="thumb_up"
|
|
956
|
-
?icon-filled=${this.hasLiked}
|
|
957
|
-
aria-label="${this.likesText || "Gilla"}"
|
|
958
|
-
@click=${(e) => {
|
|
959
|
-
e.stopPropagation(), this.hasLiked = !this.hasLiked, this.__dispatchLikeEvent("like-click", {
|
|
960
|
-
hasLiked: this.hasLiked,
|
|
961
|
-
likes: this.likes ?? 0
|
|
962
|
-
});
|
|
963
|
-
}}
|
|
964
|
-
@keydown=${(e) => {
|
|
965
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), this.hasLiked = !this.hasLiked, this.__dispatchLikeEvent("like-click", {
|
|
966
|
-
hasLiked: this.hasLiked,
|
|
967
|
-
likes: this.likes ?? 0
|
|
968
|
-
}));
|
|
969
|
-
}}
|
|
970
|
-
@hover=${(e) => {
|
|
971
|
-
e.preventDefault(), e.stopPropagation(), this.__dispatchLikeEvent("like-hover", {
|
|
972
|
-
hasLiked: this.hasLiked,
|
|
973
|
-
likes: this.likes ?? 0
|
|
974
|
-
});
|
|
975
|
-
}}
|
|
976
|
-
></scb-icon-button>
|
|
977
|
-
` : r`<md-icon>thumb_up</md-icon>`}
|
|
978
|
-
<span class="social-text">${o}${this.likes ?? 0}</span>
|
|
979
|
-
</span>
|
|
980
|
-
`;
|
|
981
|
-
return P(r`
|
|
982
|
-
<div class="full-content">
|
|
983
|
-
${j(!!s)}
|
|
984
|
-
<div class="content">
|
|
985
|
-
<div class="social-metrics">
|
|
986
|
-
${this.author ? r`
|
|
987
|
-
<a
|
|
988
|
-
class="author social-text"
|
|
989
|
-
href="${this.authorHref || "#"}"
|
|
990
|
-
tabindex="0"
|
|
991
|
-
@click=${t}
|
|
992
|
-
@mouseenter=${() => n(!0)}
|
|
993
|
-
@mouseleave=${() => n(!1)}
|
|
994
|
-
>${this.authorText}</a
|
|
995
|
-
>
|
|
996
|
-
` : ""}
|
|
997
|
-
${this.commentsDisabled ? i : r`
|
|
998
|
-
<span
|
|
999
|
-
class="comments"
|
|
1000
|
-
@mouseenter=${() => n(!0)}
|
|
1001
|
-
@mouseleave=${() => n(!1)}
|
|
1002
|
-
>
|
|
1003
|
-
${e === "" ? r`
|
|
1004
|
-
<md-icon>comment</md-icon>
|
|
1005
|
-
` : r`
|
|
1006
|
-
<scb-icon-button
|
|
1007
|
-
href="${e}"
|
|
1008
|
-
tabindex="0"
|
|
1009
|
-
@click=${t}
|
|
1010
|
-
variant="standard"
|
|
1011
|
-
icon="comment"
|
|
1012
|
-
aria-label="Gå till kommentarer"
|
|
1013
|
-
></scb-icon-button>
|
|
1014
|
-
`}
|
|
1015
|
-
<span class="social-text">${a}${this.comments ?? 0}</span>
|
|
1016
|
-
</span>
|
|
1017
|
-
`}
|
|
1018
|
-
${this.likesHoverContent ? r`
|
|
1019
|
-
<scb-tooltip
|
|
1020
|
-
variant="rich"
|
|
1021
|
-
for="like-button"
|
|
1022
|
-
supporting-text=${this.__noWrapText(this.likesHoverContent)}
|
|
1023
|
-
trigger="hover"
|
|
1024
|
-
position="right"
|
|
1025
|
-
>
|
|
1026
|
-
${l}
|
|
1027
|
-
</scb-tooltip>
|
|
1028
|
-
` : l}
|
|
1029
|
-
${this.replyEnabled ? r`
|
|
1030
|
-
<span class="social-action">
|
|
1031
|
-
<scb-icon-button
|
|
1032
|
-
variant="standard"
|
|
1033
|
-
icon="reply"
|
|
1034
|
-
aria-label="Svara"
|
|
1035
|
-
@click=${c("reply")}
|
|
1036
|
-
></scb-icon-button>
|
|
1037
|
-
<span class="social-text">Svara</span>
|
|
1038
|
-
</span>
|
|
1039
|
-
` : i}
|
|
1040
|
-
${this.editEnabled ? r`
|
|
1041
|
-
<span class="social-action">
|
|
1042
|
-
<scb-icon-button
|
|
1043
|
-
variant="standard"
|
|
1044
|
-
icon="edit"
|
|
1045
|
-
aria-label="Redigera"
|
|
1046
|
-
@click=${c("edit")}
|
|
1047
|
-
></scb-icon-button>
|
|
1048
|
-
<span class="social-text">Redigera</span>
|
|
1049
|
-
</span>
|
|
1050
|
-
` : i}
|
|
1051
|
-
${this.deleteEnabled ? r`
|
|
1052
|
-
<span class="social-action">
|
|
1053
|
-
<scb-icon-button
|
|
1054
|
-
variant="standard"
|
|
1055
|
-
icon="delete"
|
|
1056
|
-
aria-label="Ta bort"
|
|
1057
|
-
@click=${c("delete")}
|
|
1058
|
-
></scb-icon-button>
|
|
1059
|
-
<span class="social-text">Ta bort</span>
|
|
1060
|
-
</span>
|
|
1061
|
-
` : i}
|
|
1062
|
-
</div>
|
|
1063
|
-
</div>
|
|
1064
|
-
${M()}
|
|
1065
|
-
</div>
|
|
1066
|
-
`);
|
|
1067
|
-
case "link": return P(r`
|
|
1068
|
-
<div class="full-content">
|
|
1069
|
-
${j(!1)}
|
|
1070
|
-
<div class="content links">
|
|
1071
|
-
<slot name="links"></slot><slot></slot>
|
|
1072
|
-
</div>
|
|
1073
|
-
${M()}
|
|
1074
|
-
</div>
|
|
1075
|
-
`);
|
|
1076
|
-
case "action": return P(r`
|
|
1077
|
-
<div class="full-content">
|
|
1078
|
-
${j(!1)}
|
|
1079
|
-
<div class="content actions">
|
|
1080
|
-
<slot name="actions"></slot><slot></slot>
|
|
1081
|
-
</div>
|
|
1082
|
-
${M()}
|
|
1083
|
-
</div>
|
|
1084
|
-
`);
|
|
1085
|
-
case "container": return P(r`
|
|
1086
|
-
<div class="container-content ${f || p ? "has-header" : ""}">
|
|
1087
|
-
${A()}
|
|
1088
|
-
${f || p ? r`
|
|
1089
|
-
<div class="top-content">
|
|
1090
|
-
${_(!1)}
|
|
1091
|
-
${v()}
|
|
1092
|
-
</div>
|
|
1093
|
-
` : i}
|
|
1094
|
-
<slot></slot>
|
|
1095
|
-
${M()}
|
|
1096
|
-
</div>
|
|
1097
|
-
`);
|
|
1098
|
-
default: return P(r`
|
|
935
|
+
return n === "standard" ? z(r`
|
|
936
|
+
<div class="full-content">
|
|
937
|
+
${I(!!l)}
|
|
938
|
+
${L()}
|
|
939
|
+
</div>
|
|
940
|
+
`) : this.__variantRenderer ? z(this.__variantRenderer.renderScbCardVariant(this, n, {
|
|
941
|
+
topContentTpl: I,
|
|
942
|
+
footerTpl: L,
|
|
943
|
+
contentChipTpl: F,
|
|
944
|
+
headerTpl: S,
|
|
945
|
+
subtitleTpl: C,
|
|
946
|
+
effectiveHref: l,
|
|
947
|
+
hasHeading: _,
|
|
948
|
+
hasSubtitle: v,
|
|
949
|
+
hasListTopContent: R
|
|
950
|
+
})) : (this.__ensureVariantRenderer(), z(r`
|
|
1099
951
|
<div class="full-content">
|
|
1100
|
-
${
|
|
1101
|
-
${
|
|
952
|
+
${I(!!l)}
|
|
953
|
+
${L()}
|
|
1102
954
|
</div>
|
|
1103
|
-
`);
|
|
1104
|
-
}
|
|
955
|
+
`));
|
|
1105
956
|
}
|
|
1106
957
|
updated(e) {
|
|
1107
|
-
super.updated(e), 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("type") && (this.cardType === "list" ? this.setAttribute("data-density", "-2") : this.removeAttribute("data-density")), this.mediaFit && this.mediaFit !== "cover" ? this.style.setProperty("--scb-card-media-fit", this.mediaFit) : this.style.removeProperty("--scb-card-media-fit"), this.mediaPosition && this.mediaPosition !== "center" ? this.style.setProperty("--scb-card-media-position", this.mediaPosition) : this.style.removeProperty("--scb-card-media-position"), this.__syncSocialAttributes(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this
|
|
958
|
+
super.updated(e), 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("type") && (this.cardType === "list" ? this.setAttribute("data-density", "-2") : this.removeAttribute("data-density")), this.mediaFit && this.mediaFit !== "cover" ? this.style.setProperty("--scb-card-media-fit", this.mediaFit) : this.style.removeProperty("--scb-card-media-fit"), this.mediaPosition && this.mediaPosition !== "center" ? this.style.setProperty("--scb-card-media-position", this.mediaPosition) : this.style.removeProperty("--scb-card-media-position"), this.__syncSocialAttributes(), this.__ensureDependenciesReady(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.__applySpacing(), (e.has("innerPadding") || e.has("paddingTop") || e.has("paddingBottom") || e.has("paddingLeft") || e.has("paddingRight")) && this.__applyPadding();
|
|
1108
959
|
}
|
|
1109
960
|
async firstUpdated(e) {
|
|
1110
|
-
|
|
961
|
+
this.__lightDomObserver = new MutationObserver(() => this.__ensureDependenciesReady()), this.__lightDomObserver.observe(this, {
|
|
962
|
+
childList: !0,
|
|
963
|
+
subtree: !0,
|
|
964
|
+
attributes: !0,
|
|
965
|
+
attributeFilter: ["slot"]
|
|
966
|
+
}), this.__ensureDependenciesReady(), this.__applySpacing(), this.__applyPadding(), this.__syncSocialAttributes(), this.__primaryHref() && this.contains(document.activeElement) && this.__ensureFocusRingOnFocusVisible(), this.__primaryHref() && this.matches(":hover") && this.__ensureRippleOnInteraction();
|
|
967
|
+
}
|
|
968
|
+
disconnectedCallback() {
|
|
969
|
+
this.__lightDomObserver?.disconnect(), this.__lightDomObserver = void 0, super.disconnectedCallback();
|
|
1111
970
|
}
|
|
1112
971
|
};
|
|
1113
972
|
e([o({
|
|
1114
973
|
type: String,
|
|
1115
974
|
reflect: !0,
|
|
1116
|
-
converter:
|
|
1117
|
-
})],
|
|
975
|
+
converter: O
|
|
976
|
+
})], k.prototype, "type", void 0), e([o({
|
|
1118
977
|
type: String,
|
|
1119
978
|
reflect: !0,
|
|
1120
|
-
converter:
|
|
1121
|
-
})],
|
|
979
|
+
converter: O
|
|
980
|
+
})], k.prototype, "variant", void 0), e([o({
|
|
1122
981
|
type: String,
|
|
1123
982
|
reflect: !0,
|
|
1124
|
-
converter:
|
|
1125
|
-
})],
|
|
983
|
+
converter: O
|
|
984
|
+
})], k.prototype, "direction", void 0), e([o({
|
|
1126
985
|
type: String,
|
|
1127
986
|
reflect: !0
|
|
1128
|
-
})],
|
|
987
|
+
})], k.prototype, "size", void 0), e([o({
|
|
1129
988
|
type: String,
|
|
1130
989
|
attribute: "media-type"
|
|
1131
|
-
})],
|
|
990
|
+
})], k.prototype, "mediaType", void 0), e([o({
|
|
1132
991
|
type: String,
|
|
1133
992
|
attribute: "media-href"
|
|
1134
|
-
})],
|
|
993
|
+
})], k.prototype, "mediaHref", void 0), e([o({
|
|
1135
994
|
type: String,
|
|
1136
995
|
attribute: "media-alt"
|
|
1137
|
-
})],
|
|
996
|
+
})], k.prototype, "mediaAlt", void 0), e([o({
|
|
1138
997
|
type: String,
|
|
1139
998
|
attribute: "media-srcset"
|
|
1140
|
-
})],
|
|
999
|
+
})], k.prototype, "mediaSrcset", void 0), e([o({
|
|
1141
1000
|
type: String,
|
|
1142
1001
|
attribute: "media-sizes"
|
|
1143
|
-
})],
|
|
1002
|
+
})], k.prototype, "mediaSizes", void 0), e([o({
|
|
1144
1003
|
type: String,
|
|
1145
1004
|
attribute: "media-loading"
|
|
1146
|
-
})],
|
|
1005
|
+
})], k.prototype, "mediaLoading", void 0), e([o({
|
|
1147
1006
|
type: String,
|
|
1148
1007
|
attribute: "media-decoding"
|
|
1149
|
-
})],
|
|
1008
|
+
})], k.prototype, "mediaDecoding", void 0), e([o({
|
|
1150
1009
|
type: String,
|
|
1151
1010
|
attribute: "media-fetchpriority"
|
|
1152
|
-
})],
|
|
1011
|
+
})], k.prototype, "mediaFetchPriority", void 0), e([o({
|
|
1153
1012
|
type: String,
|
|
1154
1013
|
attribute: "media-fit"
|
|
1155
|
-
})],
|
|
1014
|
+
})], k.prototype, "mediaFit", void 0), e([o({
|
|
1156
1015
|
type: String,
|
|
1157
1016
|
attribute: "media-position"
|
|
1158
|
-
})],
|
|
1017
|
+
})], k.prototype, "mediaPosition", void 0), e([o({
|
|
1159
1018
|
type: String,
|
|
1160
1019
|
attribute: "media-width"
|
|
1161
|
-
})],
|
|
1020
|
+
})], k.prototype, "mediaWidth", void 0), e([o({
|
|
1162
1021
|
type: String,
|
|
1163
1022
|
attribute: "media-height"
|
|
1164
|
-
})],
|
|
1023
|
+
})], k.prototype, "mediaHeight", void 0), e([o({
|
|
1165
1024
|
type: String,
|
|
1166
1025
|
attribute: "media-aspect"
|
|
1167
|
-
})],
|
|
1026
|
+
})], k.prototype, "mediaAspect", void 0), e([o({
|
|
1168
1027
|
type: Boolean,
|
|
1169
1028
|
attribute: "media-placeholder"
|
|
1170
|
-
})],
|
|
1029
|
+
})], k.prototype, "mediaPlaceholder", void 0), e([o({
|
|
1171
1030
|
type: String,
|
|
1172
1031
|
attribute: "card-href",
|
|
1173
1032
|
reflect: !0,
|
|
1174
|
-
converter:
|
|
1175
|
-
})],
|
|
1033
|
+
converter: O
|
|
1034
|
+
})], k.prototype, "cardHref", void 0), e([o({
|
|
1176
1035
|
type: String,
|
|
1177
1036
|
reflect: !0,
|
|
1178
|
-
converter:
|
|
1179
|
-
})],
|
|
1037
|
+
converter: O
|
|
1038
|
+
})], k.prototype, "href", void 0), e([o({
|
|
1180
1039
|
type: String,
|
|
1181
1040
|
reflect: !0,
|
|
1182
|
-
converter:
|
|
1183
|
-
})],
|
|
1041
|
+
converter: O
|
|
1042
|
+
})], k.prototype, "title", void 0), e([o({
|
|
1184
1043
|
type: String,
|
|
1185
1044
|
attribute: "card-title",
|
|
1186
1045
|
reflect: !0,
|
|
1187
|
-
converter:
|
|
1188
|
-
})],
|
|
1046
|
+
converter: O
|
|
1047
|
+
})], k.prototype, "cardTitle", void 0), e([o({
|
|
1189
1048
|
type: String,
|
|
1190
1049
|
reflect: !0,
|
|
1191
|
-
converter:
|
|
1192
|
-
})],
|
|
1050
|
+
converter: O
|
|
1051
|
+
})], k.prototype, "subtitle", void 0), e([o({
|
|
1193
1052
|
type: String,
|
|
1194
1053
|
reflect: !0,
|
|
1195
|
-
converter:
|
|
1196
|
-
})],
|
|
1054
|
+
converter: O
|
|
1055
|
+
})], k.prototype, "vignette", void 0), e([o({
|
|
1197
1056
|
type: String,
|
|
1198
1057
|
attribute: "vignette-variant",
|
|
1199
|
-
converter:
|
|
1200
|
-
})],
|
|
1058
|
+
converter: O
|
|
1059
|
+
})], k.prototype, "vignetteVariant", void 0), e([o({
|
|
1201
1060
|
type: String,
|
|
1202
1061
|
attribute: "vignette-spacing",
|
|
1203
1062
|
reflect: !0,
|
|
1204
|
-
converter:
|
|
1205
|
-
})],
|
|
1063
|
+
converter: O
|
|
1064
|
+
})], k.prototype, "vignetteSpacing", void 0), e([o({
|
|
1206
1065
|
type: String,
|
|
1207
1066
|
attribute: "vignette-spacing-top",
|
|
1208
1067
|
reflect: !0,
|
|
1209
|
-
converter:
|
|
1210
|
-
})],
|
|
1068
|
+
converter: O
|
|
1069
|
+
})], k.prototype, "vignetteSpacingTop", void 0), e([o({
|
|
1211
1070
|
type: String,
|
|
1212
1071
|
attribute: "vignette-spacing-bottom",
|
|
1213
1072
|
reflect: !0,
|
|
1214
|
-
converter:
|
|
1215
|
-
})],
|
|
1073
|
+
converter: O
|
|
1074
|
+
})], k.prototype, "vignetteSpacingBottom", void 0), e([o({
|
|
1216
1075
|
type: String,
|
|
1217
1076
|
attribute: "vignette-spacing-left",
|
|
1218
1077
|
reflect: !0,
|
|
1219
|
-
converter:
|
|
1220
|
-
})],
|
|
1078
|
+
converter: O
|
|
1079
|
+
})], k.prototype, "vignetteSpacingLeft", void 0), e([o({
|
|
1221
1080
|
type: String,
|
|
1222
1081
|
attribute: "vignette-spacing-right",
|
|
1223
1082
|
reflect: !0,
|
|
1224
|
-
converter:
|
|
1225
|
-
})],
|
|
1083
|
+
converter: O
|
|
1084
|
+
})], k.prototype, "vignetteSpacingRight", void 0), e([o({
|
|
1226
1085
|
type: String,
|
|
1227
1086
|
attribute: "supporting-text",
|
|
1228
1087
|
reflect: !0,
|
|
1229
|
-
converter:
|
|
1230
|
-
})],
|
|
1088
|
+
converter: O
|
|
1089
|
+
})], k.prototype, "supportingText", void 0), e([o({
|
|
1231
1090
|
type: Date,
|
|
1232
1091
|
reflect: !0
|
|
1233
|
-
})],
|
|
1092
|
+
})], k.prototype, "date", void 0), e([o({
|
|
1234
1093
|
type: String,
|
|
1235
1094
|
attribute: "social-comments-text"
|
|
1236
|
-
})],
|
|
1095
|
+
})], k.prototype, "commentsText", void 0), e([o({
|
|
1237
1096
|
type: Number,
|
|
1238
1097
|
attribute: "social-comments"
|
|
1239
|
-
})],
|
|
1098
|
+
})], k.prototype, "comments", void 0), e([o({
|
|
1240
1099
|
type: Boolean,
|
|
1241
1100
|
attribute: "social-comments-disabled"
|
|
1242
|
-
})],
|
|
1101
|
+
})], k.prototype, "commentsDisabled", void 0), e([o({
|
|
1243
1102
|
type: String,
|
|
1244
1103
|
attribute: "social-comments-href"
|
|
1245
|
-
})],
|
|
1104
|
+
})], k.prototype, "commentsHref", void 0), e([o({
|
|
1246
1105
|
type: String,
|
|
1247
1106
|
attribute: "social-likes-text"
|
|
1248
|
-
})],
|
|
1107
|
+
})], k.prototype, "likesText", void 0), e([o({
|
|
1249
1108
|
type: Number,
|
|
1250
1109
|
attribute: "social-likes"
|
|
1251
|
-
})],
|
|
1110
|
+
})], k.prototype, "likes", void 0), e([o({
|
|
1252
1111
|
type: Boolean,
|
|
1253
1112
|
attribute: "social-likes-disabled"
|
|
1254
|
-
})],
|
|
1113
|
+
})], k.prototype, "likesDisabled", void 0), e([o({
|
|
1255
1114
|
type: String,
|
|
1256
1115
|
attribute: "social-likes-hover-content"
|
|
1257
|
-
})],
|
|
1116
|
+
})], k.prototype, "likesHoverContent", void 0), e([o({
|
|
1258
1117
|
type: Boolean,
|
|
1259
1118
|
attribute: "social-has-liked"
|
|
1260
|
-
})],
|
|
1119
|
+
})], k.prototype, "hasLiked", void 0), e([o({
|
|
1261
1120
|
type: Boolean,
|
|
1262
1121
|
attribute: "social-likes-interactive"
|
|
1263
|
-
})],
|
|
1122
|
+
})], k.prototype, "likesInteractive", void 0), e([o({
|
|
1264
1123
|
type: Boolean,
|
|
1265
1124
|
attribute: "social-author"
|
|
1266
|
-
})],
|
|
1125
|
+
})], k.prototype, "author", void 0), e([o({
|
|
1267
1126
|
type: String,
|
|
1268
1127
|
attribute: "social-author-text"
|
|
1269
|
-
})],
|
|
1128
|
+
})], k.prototype, "authorText", void 0), e([o({
|
|
1270
1129
|
type: String,
|
|
1271
1130
|
attribute: "social-author-href"
|
|
1272
|
-
})],
|
|
1131
|
+
})], k.prototype, "authorHref", void 0), e([o({
|
|
1273
1132
|
type: Boolean,
|
|
1274
1133
|
attribute: "social-reply-enabled"
|
|
1275
|
-
})],
|
|
1134
|
+
})], k.prototype, "replyEnabled", void 0), e([o({
|
|
1276
1135
|
type: Boolean,
|
|
1277
1136
|
attribute: "social-edit-enabled"
|
|
1278
|
-
})],
|
|
1137
|
+
})], k.prototype, "editEnabled", void 0), e([o({
|
|
1279
1138
|
type: Boolean,
|
|
1280
1139
|
attribute: "social-delete-enabled"
|
|
1281
|
-
})],
|
|
1140
|
+
})], k.prototype, "deleteEnabled", void 0), e([o({
|
|
1282
1141
|
type: String,
|
|
1283
1142
|
reflect: !0,
|
|
1284
|
-
converter:
|
|
1285
|
-
})],
|
|
1143
|
+
converter: O
|
|
1144
|
+
})], k.prototype, "sizing", void 0), e([o({
|
|
1286
1145
|
type: String,
|
|
1287
1146
|
reflect: !0,
|
|
1288
|
-
converter:
|
|
1289
|
-
})],
|
|
1147
|
+
converter: O
|
|
1148
|
+
})], k.prototype, "width", void 0), e([o({
|
|
1290
1149
|
type: String,
|
|
1291
1150
|
reflect: !0,
|
|
1292
1151
|
attribute: "max-width",
|
|
1293
|
-
converter:
|
|
1294
|
-
})],
|
|
1152
|
+
converter: O
|
|
1153
|
+
})], k.prototype, "maxWidth", void 0), e([o({
|
|
1295
1154
|
type: String,
|
|
1296
1155
|
reflect: !0,
|
|
1297
|
-
converter:
|
|
1298
|
-
})],
|
|
1156
|
+
converter: O
|
|
1157
|
+
})], k.prototype, "height", void 0), e([o({
|
|
1299
1158
|
type: String,
|
|
1300
1159
|
reflect: !0,
|
|
1301
1160
|
attribute: "max-height",
|
|
1302
|
-
converter:
|
|
1303
|
-
})],
|
|
1161
|
+
converter: O
|
|
1162
|
+
})], k.prototype, "maxHeight", void 0), e([o({
|
|
1304
1163
|
type: String,
|
|
1305
1164
|
reflect: !0,
|
|
1306
|
-
converter:
|
|
1307
|
-
})],
|
|
1165
|
+
converter: O
|
|
1166
|
+
})], k.prototype, "spacing", void 0), e([o({
|
|
1308
1167
|
type: String,
|
|
1309
1168
|
attribute: "spacing-top",
|
|
1310
1169
|
reflect: !0,
|
|
1311
|
-
converter:
|
|
1312
|
-
})],
|
|
1170
|
+
converter: O
|
|
1171
|
+
})], k.prototype, "spacingTop", void 0), e([o({
|
|
1313
1172
|
type: String,
|
|
1314
1173
|
attribute: "spacing-bottom",
|
|
1315
1174
|
reflect: !0,
|
|
1316
|
-
converter:
|
|
1317
|
-
})],
|
|
1175
|
+
converter: O
|
|
1176
|
+
})], k.prototype, "spacingBottom", void 0), e([o({
|
|
1318
1177
|
type: String,
|
|
1319
1178
|
attribute: "spacing-left",
|
|
1320
1179
|
reflect: !0,
|
|
1321
|
-
converter:
|
|
1322
|
-
})],
|
|
1180
|
+
converter: O
|
|
1181
|
+
})], k.prototype, "spacingLeft", void 0), e([o({
|
|
1323
1182
|
type: String,
|
|
1324
1183
|
attribute: "spacing-right",
|
|
1325
1184
|
reflect: !0,
|
|
1326
|
-
converter:
|
|
1327
|
-
})],
|
|
1185
|
+
converter: O
|
|
1186
|
+
})], k.prototype, "spacingRight", void 0), e([o({
|
|
1328
1187
|
type: String,
|
|
1329
1188
|
attribute: "padding",
|
|
1330
1189
|
reflect: !0,
|
|
1331
|
-
converter:
|
|
1332
|
-
})],
|
|
1190
|
+
converter: O
|
|
1191
|
+
})], k.prototype, "innerPadding", void 0), e([o({
|
|
1333
1192
|
type: String,
|
|
1334
1193
|
attribute: "padding-top",
|
|
1335
1194
|
reflect: !0,
|
|
1336
|
-
converter:
|
|
1337
|
-
})],
|
|
1195
|
+
converter: O
|
|
1196
|
+
})], k.prototype, "paddingTop", void 0), e([o({
|
|
1338
1197
|
type: String,
|
|
1339
1198
|
attribute: "padding-bottom",
|
|
1340
1199
|
reflect: !0,
|
|
1341
|
-
converter:
|
|
1342
|
-
})],
|
|
1200
|
+
converter: O
|
|
1201
|
+
})], k.prototype, "paddingBottom", void 0), e([o({
|
|
1343
1202
|
type: String,
|
|
1344
1203
|
attribute: "padding-left",
|
|
1345
1204
|
reflect: !0,
|
|
1346
|
-
converter:
|
|
1347
|
-
})],
|
|
1205
|
+
converter: O
|
|
1206
|
+
})], k.prototype, "paddingLeft", void 0), e([o({
|
|
1348
1207
|
type: String,
|
|
1349
1208
|
attribute: "padding-right",
|
|
1350
1209
|
reflect: !0,
|
|
1351
|
-
converter:
|
|
1352
|
-
})],
|
|
1353
|
-
var
|
|
1210
|
+
converter: O
|
|
1211
|
+
})], k.prototype, "paddingRight", void 0), k = e([a("scb-card")], k);
|
|
1212
|
+
var A = class extends k {
|
|
1354
1213
|
constructor() {
|
|
1355
1214
|
super(), this.type = "list";
|
|
1356
1215
|
}
|
|
@@ -1358,8 +1217,8 @@ var d = class extends u {
|
|
|
1358
1217
|
return "list";
|
|
1359
1218
|
}
|
|
1360
1219
|
};
|
|
1361
|
-
|
|
1362
|
-
var
|
|
1220
|
+
A = e([a("scb-list-card")], A);
|
|
1221
|
+
var j = class extends k {
|
|
1363
1222
|
constructor() {
|
|
1364
1223
|
super(), this.type = "link";
|
|
1365
1224
|
}
|
|
@@ -1367,8 +1226,8 @@ var f = class extends u {
|
|
|
1367
1226
|
return "link";
|
|
1368
1227
|
}
|
|
1369
1228
|
};
|
|
1370
|
-
|
|
1371
|
-
var
|
|
1229
|
+
j = e([a("scb-link-card")], j);
|
|
1230
|
+
var M = class extends k {
|
|
1372
1231
|
constructor() {
|
|
1373
1232
|
super(), this.type = "action";
|
|
1374
1233
|
}
|
|
@@ -1376,8 +1235,8 @@ var p = class extends u {
|
|
|
1376
1235
|
return "action";
|
|
1377
1236
|
}
|
|
1378
1237
|
};
|
|
1379
|
-
|
|
1380
|
-
var
|
|
1238
|
+
M = e([a("scb-action-card")], M);
|
|
1239
|
+
var N = class extends k {
|
|
1381
1240
|
constructor() {
|
|
1382
1241
|
super(), this.type = "social";
|
|
1383
1242
|
}
|
|
@@ -1385,8 +1244,8 @@ var m = class extends u {
|
|
|
1385
1244
|
return "social";
|
|
1386
1245
|
}
|
|
1387
1246
|
};
|
|
1388
|
-
|
|
1389
|
-
var
|
|
1247
|
+
N = e([a("scb-social-card")], N);
|
|
1248
|
+
var P = class extends k {
|
|
1390
1249
|
constructor() {
|
|
1391
1250
|
super(), this.type = "container";
|
|
1392
1251
|
}
|
|
@@ -1394,6 +1253,6 @@ var h = class extends u {
|
|
|
1394
1253
|
return "container";
|
|
1395
1254
|
}
|
|
1396
1255
|
};
|
|
1397
|
-
|
|
1256
|
+
P = e([a("scb-container-card")], P);
|
|
1398
1257
|
//#endregion
|
|
1399
|
-
export {
|
|
1258
|
+
export { M as ScbActionCard, k as ScbCard, P as ScbContainerCard, j as ScbLinkCard, A as ScbListCard, N as ScbSocialCard };
|