scb-wc-test 0.1.11 → 0.1.13
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/all.js +2 -0
- package/index.d.ts +1 -0
- package/index.js +34 -32
- package/mvc/components/all.js +1 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +21 -61
- package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
- package/mvc/components/scb-avatar/scb-avatar.js +1 -1
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +1 -1
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +1 -1
- package/mvc/components/scb-button/scb-button.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +165 -126
- package/mvc/components/scb-card/scb-card.js +223 -217
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +1 -1
- package/mvc/components/scb-checkbox/scb-checkbox.js +9 -11
- package/mvc/components/scb-chips/scb-chip.js +1 -1
- package/mvc/components/scb-dialog/scb-dialog.js +2 -2
- package/mvc/components/scb-divider/scb-divider.js +43 -53
- package/mvc/components/scb-drawer/scb-drawer-item.js +2 -2
- package/mvc/components/scb-drawer/scb-drawer-section.js +4 -4
- package/mvc/components/scb-drawer/scb-drawer.js +1 -1
- package/mvc/components/scb-drawer/scb-sub-drawer.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card.js +68 -55
- package/mvc/components/scb-footer/scb-footer-section.js +2 -2
- package/mvc/components/scb-footer/scb-footer.js +1 -1
- package/mvc/components/scb-grid/scb-grid-item.js +5 -3
- package/mvc/components/scb-grid/scb-grid.js +27 -10
- package/mvc/components/scb-grid/scb-stack.js +10 -6
- package/mvc/components/scb-header/scb-header-drawer-group.js +1 -1
- package/mvc/components/scb-header/scb-header-drawer-item.js +1 -1
- package/mvc/components/scb-header/scb-header-tab.js +1 -1
- package/mvc/components/scb-header/scb-header-utility.js +1 -1
- package/mvc/components/scb-header/scb-header.js +53 -49
- package/mvc/components/scb-icon-button/scb-icon-button.js +45 -80
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +84 -58
- package/mvc/components/scb-link/scb-link.js +39 -16
- package/mvc/components/scb-list/scb-list-item.js +115 -37
- package/mvc/components/scb-list/scb-list.js +16 -7
- package/mvc/components/scb-menu/scb-menu-item.js +1 -1
- package/mvc/components/scb-menu/scb-menu.js +1 -1
- package/mvc/components/scb-menu/scb-sub-menu.js +1 -1
- package/mvc/components/scb-notification/scb-notification.js +1 -1
- package/mvc/components/scb-notification-card/scb-notification-card.js +187 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +1 -1
- package/mvc/components/scb-radio-button/scb-radio-button.js +29 -36
- package/mvc/components/scb-radio-button/scb-radio-group.js +1 -1
- package/mvc/components/scb-search/scb-search.js +48 -37
- package/mvc/components/scb-snackbar/scb-snackbar.js +8 -8
- package/mvc/components/scb-status-pill/scb-status-pill.js +1 -1
- package/mvc/components/scb-switch/scb-switch.js +1 -1
- package/mvc/components/scb-tabs/scb-primary-tab.js +1 -1
- package/mvc/components/scb-tabs/scb-secondary-tab.js +1 -1
- package/mvc/components/scb-tabs/scb-tabs.js +1 -1
- package/mvc/components/scb-textfield/scb-textfield.js +1 -1
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/scb-toc/scb-toc.js +2 -2
- package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
- package/mvc/vendor/vendor-material.js +232 -312
- package/mvc/vendor/vendor.js +19 -23
- package/package.json +6 -2
- package/scb-accordion/scb-accordion-item.js +47 -98
- package/scb-calendar-card/scb-calendar-card.d.ts +6 -4
- package/scb-calendar-card/scb-calendar-card.js +207 -154
- package/scb-card/scb-card.d.ts +8 -3
- package/scb-card/scb-card.js +265 -250
- package/scb-checkbox/scb-checkbox.d.ts +1 -0
- package/scb-checkbox/scb-checkbox.js +56 -49
- package/scb-divider/scb-divider.d.ts +16 -4
- package/scb-divider/scb-divider.js +63 -69
- package/scb-fact-card/scb-fact-card.d.ts +8 -7
- package/scb-fact-card/scb-fact-card.js +100 -78
- package/scb-grid/scb-grid-item.d.ts +7 -2
- package/scb-grid/scb-grid-item.js +47 -33
- package/scb-grid/scb-grid.d.ts +7 -3
- package/scb-grid/scb-grid.js +57 -21
- package/scb-grid/scb-stack.d.ts +5 -1
- package/scb-grid/scb-stack.js +57 -31
- package/scb-header/scb-header.d.ts +1 -2
- package/scb-header/scb-header.js +154 -162
- package/scb-icon-button/scb-icon-button.d.ts +15 -11
- package/scb-icon-button/scb-icon-button.js +149 -132
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +6 -1
- package/scb-keyfigure-card/scb-keyfigure-card.js +139 -93
- package/scb-link/scb-link.d.ts +1 -0
- package/scb-link/scb-link.js +65 -38
- package/scb-list/scb-list-item.d.ts +8 -5
- package/scb-list/scb-list-item.js +183 -73
- package/scb-list/scb-list.d.ts +5 -0
- package/scb-list/scb-list.js +71 -21
- package/scb-notification-card/scb-notification-card.d.ts +18 -0
- package/scb-notification-card/scb-notification-card.js +264 -0
- package/scb-radio-button/scb-radio-button.js +46 -53
- package/scb-search/scb-search.d.ts +8 -0
- package/scb-search/scb-search.js +176 -139
- package/scb-wc-test.bundle.js +1870 -1546
|
@@ -1,256 +1,262 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
1
|
+
import{a as p,n as s,i as h,x as t,t as v}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../../vendor/preload-helper.js";import"../scb-list/scb-list-item.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(l,c,d){try{customElements.get(l)||r(l,c,d)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var m=Object.defineProperty,b=Object.getOwnPropertyDescriptor,i=(a,r,l,c)=>{for(var d=c>1?void 0:c?b(r,l):r,n=a.length-1,o;n>=0;n--)(o=a[n])&&(d=(c?o(r,l,d):o(d))||d);return c&&d&&m(r,l,d),d};let e=class extends h{constructor(){super(...arguments),this.type="",this.variant="",this.direction="",this.mediaType="",this.mediaHref="",this.cardHref="",this.label="",this.subLabel="",this.supportingText="",this.commentsText="",this.comments=0,this.likesText="",this.likes=0,this.fullHeight=!1,this.fullWidth=!1,this.stretch=!1}render(){const a=this.variant?`${this.variant.toLowerCase()}`:"",r=this.direction?`${this.direction.toLowerCase()}`:"",l=this.cardHref?"clickable":"",c=this.mediaType?`${this.mediaType.toLowerCase()}`:"";switch(this.type){case"standard":return t`
|
|
2
|
+
<div class="scb-card ${a} ${r} ${l}">
|
|
3
|
+
${this.cardHref?t`<md-ripple></md-ripple>`:""}
|
|
4
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
5
|
+
<div class="full-content">
|
|
6
|
+
<div class="top-content">
|
|
7
|
+
${this.label?t`
|
|
8
|
+
<div class="header">
|
|
9
|
+
${this.cardHref?t`<a href="${this.cardHref}" tabindex="0">${this.label}</a><md-icon>arrow_forward</md-icon>`:this.label}
|
|
10
|
+
</div>`:""}
|
|
11
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
12
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
13
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
`;case"list":return t`
|
|
18
|
+
<div class="scb-card ${a} vertical ${l}">
|
|
19
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
20
|
+
<div class="full-content">
|
|
21
|
+
<div class="top-content">
|
|
22
|
+
${this.label?t`<div class="header">${this.label}</div>`:""}
|
|
23
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
24
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
25
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
26
|
+
</div>
|
|
27
|
+
<div class="content list">
|
|
28
|
+
<slot></slot>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
35
32
|
`;case"social":return t`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
33
|
+
<div class="scb-card ${a} ${r} ${l}">
|
|
34
|
+
${this.cardHref?t`<md-ripple></md-ripple>`:""}
|
|
35
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
36
|
+
<div class="full-content">
|
|
37
|
+
<div class="top-content">
|
|
38
|
+
${this.label?t`
|
|
39
|
+
<div class="header">
|
|
40
|
+
${this.cardHref?t`<a href="${this.cardHref}" tabindex="0">${this.label}</a><md-icon>arrow_forward</md-icon>`:this.label}
|
|
41
|
+
</div>`:""}
|
|
42
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
43
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
44
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="content">
|
|
47
|
+
<div class="social-metrics">
|
|
48
|
+
<span class="comments"><md-icon>mode_comment</md-icon> <span>${this.commentsText}: ${this.comments}</span></span>
|
|
49
|
+
<span class="likes"><md-icon>thumb_up</md-icon> <span>${this.likesText}: ${this.likes}</span></span>
|
|
56
50
|
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
57
54
|
`;case"link":return t`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
55
|
+
<div class="scb-card ${a} ${r} ${l}">
|
|
56
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
57
|
+
<div class="full-content">
|
|
58
|
+
<div class="top-content">
|
|
59
|
+
${this.label?t`<div class="header">${this.label}</div>`:""}
|
|
60
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
61
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
62
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="content links">
|
|
65
|
+
<slot></slot>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
75
69
|
`;case"action":return t`
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</div>
|
|
91
|
-
<div class="content actions">
|
|
92
|
-
<slot></slot>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
70
|
+
<div class="scb-card ${a} ${r} ${l}">
|
|
71
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
72
|
+
<div class="full-content">
|
|
73
|
+
<div class="top-content">
|
|
74
|
+
${this.label?t`<div class="header">${this.label}</div>`:""}
|
|
75
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
76
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
77
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
78
|
+
</div>
|
|
79
|
+
<div class="content actions">
|
|
80
|
+
<slot></slot>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
96
84
|
`;default:return t`
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
</div>
|
|
85
|
+
<div class="scb-card ${a} ${r} ${l}">
|
|
86
|
+
${this.cardHref?t`<md-ripple></md-ripple>`:""}
|
|
87
|
+
${this.mediaHref?t`<img src="${this.mediaHref}" class="${c}" alt="" ?hidden=${!this.mediaHref} />`:""}
|
|
88
|
+
<div class="full-content">
|
|
89
|
+
<div class="top-content">
|
|
90
|
+
${this.label?t`
|
|
91
|
+
<div class="header">
|
|
92
|
+
${this.cardHref?t`<a href="${this.cardHref}" tabindex="0">${this.label}</a><md-icon>arrow_forward</md-icon>`:this.label}
|
|
93
|
+
</div>`:""}
|
|
94
|
+
${this.subLabel?t`<div class="sub-label">${this.subLabel}</div>`:""}
|
|
95
|
+
${this.supportingText?t`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
96
|
+
${this.date?t`<div class="date">${this.date}</div>`:""}
|
|
97
|
+
</div>
|
|
111
98
|
</div>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
:host{ --scb-card-min-w: 360px; }
|
|
115
|
-
|
|
99
|
+
</div>
|
|
100
|
+
`}}firstUpdated(){if(this.cardHref){const a=this.renderRoot.querySelector(".scb-card");a&&a.addEventListener("click",r=>{r.target.closest("a")||(window.location.href=this.cardHref)})}}};e.styles=p`
|
|
116
101
|
:host {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
102
|
+
--scb-card-max-w: 360px;
|
|
103
|
+
display: block;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
inline-size: 100%;
|
|
106
|
+
min-inline-size: 0;
|
|
107
|
+
max-inline-size: var(--scb-card-max-w);
|
|
108
|
+
height: auto;
|
|
120
109
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
font-size: var(--md-sys-typescale-title-large-size);
|
|
135
|
-
vertical-align: middle;
|
|
136
|
-
}
|
|
137
|
-
.social-metrics {
|
|
138
|
-
display: flex;
|
|
139
|
-
margin-top: var(--spacing-4);
|
|
140
|
-
gap: var(--spacing-5);
|
|
141
|
-
flex-wrap: wrap;
|
|
142
|
-
}
|
|
143
|
-
.comments, .likes {
|
|
144
|
-
display: flex;
|
|
145
|
-
align-items: center;
|
|
146
|
-
gap: var(--spacing-2);
|
|
147
|
-
}
|
|
148
|
-
.scb-card.outlined {
|
|
149
|
-
border: 1px solid var(--md-sys-color-outline-variant);
|
|
110
|
+
:host([type="standard"]) { --scb-card-max-w: var(--scb-card-standard-max-w, 360px); }
|
|
111
|
+
:host([type="list"]) { --scb-card-max-w: var(--scb-card-list-max-w, 360px); }
|
|
112
|
+
:host([type="social"]) { --scb-card-max-w: var(--scb-card-social-max-w, 360px); }
|
|
113
|
+
:host([type="link"]) { --scb-card-max-w: var(--scb-card-link-max-w, 360px); }
|
|
114
|
+
:host([type="action"]) { --scb-card-max-w: var(--scb-card-action-max-w, 360px); }
|
|
115
|
+
|
|
116
|
+
:host([full-width]) { max-inline-size: none; }
|
|
117
|
+
:host([stretch]),
|
|
118
|
+
:host([full-height]) { block-size: 100%; }
|
|
119
|
+
|
|
120
|
+
:host([stretch]) .scb-card,
|
|
121
|
+
:host([full-height]) .scb-card {
|
|
122
|
+
block-size: 100%;
|
|
150
123
|
}
|
|
151
|
-
|
|
152
|
-
|
|
124
|
+
|
|
125
|
+
.scb-card {
|
|
126
|
+
color: var(--md-sys-color-on-surface);
|
|
127
|
+
display: flex;
|
|
128
|
+
position: relative;
|
|
129
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
130
|
+
background: var(--md-sys-color-surface);
|
|
131
|
+
box-sizing: border-box;
|
|
132
|
+
inline-size: 100%;
|
|
133
|
+
min-inline-size: 0;
|
|
134
|
+
max-inline-size: 100%;
|
|
135
|
+
overflow: hidden;
|
|
153
136
|
}
|
|
154
|
-
|
|
155
|
-
|
|
137
|
+
|
|
138
|
+
.scb-card.outlined { border: 1px solid var(--md-sys-color-outline-variant); }
|
|
139
|
+
.scb-card.filled { background: var(--md-sys-color-surface-dim); }
|
|
140
|
+
.scb-card.vertical { flex-direction: column; }
|
|
141
|
+
.scb-card.clickable{ cursor: pointer; }
|
|
142
|
+
|
|
143
|
+
md-ripple {
|
|
144
|
+
position: absolute;
|
|
145
|
+
inset: 0;
|
|
146
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
147
|
+
pointer-events: none;
|
|
156
148
|
}
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
|
|
150
|
+
.full-content { padding: var(--spacing-7) var(--spacing-6); }
|
|
151
|
+
.top-content {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: column;
|
|
154
|
+
gap: var(--spacing-3);
|
|
155
|
+
min-inline-size: 0;
|
|
159
156
|
}
|
|
160
157
|
|
|
161
|
-
/* Textstilar */
|
|
162
158
|
.header {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
.header a {
|
|
172
|
-
color: inherit;
|
|
173
|
-
text-decoration: none;
|
|
159
|
+
font-size: var(--md-sys-typescale-headline-small-size);
|
|
160
|
+
font-weight: var(--weight-bold);
|
|
161
|
+
line-height: var(--md-sys-typescale-headline-small-line-height);
|
|
162
|
+
letter-spacing: var(--md-sys-typescale-headline-small-Tracking);
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
align-items: center;
|
|
166
|
+
min-inline-size: 0;
|
|
174
167
|
}
|
|
168
|
+
.header a { color: inherit; text-decoration: none; }
|
|
175
169
|
.sub-label {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
170
|
+
font-size: var(--md-sys-typescale-title-medium-size);
|
|
171
|
+
font-weight: var(--weight-semibold);
|
|
172
|
+
line-height: var(--md-sys-typescale-title-medium-line-height);
|
|
173
|
+
letter-spacing: var(--md-sys-typescale-title-medium-tracking);
|
|
180
174
|
}
|
|
181
175
|
.supporting-text {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
font-size: var(--md-sys-typescale-body-large-size);
|
|
177
|
+
line-height: var(--md-sys-typescale-body-large-line-height);
|
|
178
|
+
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
185
179
|
}
|
|
186
180
|
.date {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
.full-content {
|
|
192
|
-
padding: var(--spacing-7) var(--spacing-6);
|
|
193
|
-
}
|
|
194
|
-
md-ripple {
|
|
195
|
-
border-radius: var(--md-sys-shape-corner-large);
|
|
196
|
-
}
|
|
197
|
-
.top-content {
|
|
198
|
-
display: flex;
|
|
199
|
-
flex-direction: column;
|
|
200
|
-
gap: var(--spacing-3);
|
|
201
|
-
|
|
181
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
182
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
183
|
+
letter-spacing: var(--md-sys-typescale-body-medium-Tracking);
|
|
202
184
|
}
|
|
185
|
+
|
|
203
186
|
.scb-card img {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
187
|
+
display: block;
|
|
188
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
189
|
+
inline-size: 100%;
|
|
190
|
+
max-inline-size: 100%;
|
|
191
|
+
height: auto;
|
|
192
|
+
object-fit: cover;
|
|
207
193
|
}
|
|
208
|
-
.scb-card img.avatar{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
194
|
+
.scb-card img.avatar {
|
|
195
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
196
|
+
width: var(--icon-size-large);
|
|
197
|
+
height: var(--icon-size-large);
|
|
198
|
+
margin: var(--spacing-7) 0 0 var(--spacing-6);
|
|
199
|
+
inline-size: auto;
|
|
200
|
+
object-fit: cover;
|
|
213
201
|
}
|
|
214
202
|
.scb-card img.avatar + .full-content {
|
|
215
|
-
|
|
203
|
+
padding: var(--spacing-5) var(--spacing-6) var(--spacing-7) var(--spacing-6);
|
|
216
204
|
}
|
|
217
205
|
|
|
218
|
-
/* Horisontella kortspecifika stilar */
|
|
219
206
|
.scb-card.horizontal {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
207
|
+
flex-direction: row;
|
|
208
|
+
inline-size: 100%;
|
|
209
|
+
max-inline-size: 100%;
|
|
223
210
|
}
|
|
224
211
|
.scb-card.horizontal .full-content {
|
|
225
|
-
|
|
226
|
-
|
|
212
|
+
padding: var(--spacing-6) var(--spacing-6) var(--spacing-6) 0;
|
|
213
|
+
inline-size: 100%;
|
|
214
|
+
min-inline-size: 0;
|
|
227
215
|
}
|
|
228
|
-
.scb-card.horizontal img{
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
border-radius: var(--md-sys-shape-corner-full);
|
|
235
|
-
width: var(--icon-size-large);
|
|
236
|
-
height: var(--icon-size-large);
|
|
237
|
-
margin: var(--spacing-6) 0 var(--spacing-6) var(--spacing-6);
|
|
216
|
+
.scb-card.horizontal img {
|
|
217
|
+
height: 133px;
|
|
218
|
+
width: auto;
|
|
219
|
+
margin: var(--spacing-6);
|
|
220
|
+
object-fit: cover;
|
|
221
|
+
flex: 0 0 auto;
|
|
238
222
|
}
|
|
239
223
|
|
|
240
|
-
.
|
|
241
|
-
|
|
224
|
+
.social-metrics {
|
|
225
|
+
display: flex;
|
|
226
|
+
margin-top: var(--spacing-4);
|
|
227
|
+
gap: var(--spacing-5);
|
|
228
|
+
flex-wrap: wrap;
|
|
229
|
+
}
|
|
230
|
+
.social-metrics md-icon {
|
|
231
|
+
width: var(--scale-05);
|
|
232
|
+
height: var(--scale-05);
|
|
233
|
+
font-size: var(--md-sys-typescale-title-large-size);
|
|
234
|
+
vertical-align: middle;
|
|
242
235
|
}
|
|
236
|
+
.comments, .likes {
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
gap: var(--spacing-2);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.scb-card .content.list { margin-top: var(--spacing-7); }
|
|
243
243
|
.scb-card .content.actions ::slotted(*) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
244
|
+
margin-top: var(--spacing-7);
|
|
245
|
+
display: flex;
|
|
246
|
+
flex-wrap: wrap;
|
|
247
|
+
gap: var(--spacing-3);
|
|
248
248
|
}
|
|
249
249
|
.scb-card .content.links ::slotted(*) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
margin-top: var(--spacing-3);
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
gap: var(--spacing-3);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
.scb-card:not(.filled) .content.list ::slotted(scb-list) {
|
|
257
|
+
--scb-list-bg: var(--md-sys-color-surface);
|
|
258
|
+
}
|
|
259
|
+
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
260
|
+
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
261
|
+
}
|
|
262
|
+
`;i([s({type:String})],e.prototype,"type",2);i([s({type:String})],e.prototype,"variant",2);i([s({type:String})],e.prototype,"direction",2);i([s({type:String,attribute:"media-type"})],e.prototype,"mediaType",2);i([s({type:String,attribute:"media-href"})],e.prototype,"mediaHref",2);i([s({type:String,attribute:"card-href"})],e.prototype,"cardHref",2);i([s({type:String})],e.prototype,"label",2);i([s({type:String,attribute:"sub-label"})],e.prototype,"subLabel",2);i([s({type:String,attribute:"supporting-text"})],e.prototype,"supportingText",2);i([s({type:Date,reflect:!0})],e.prototype,"date",2);i([s({type:String,attribute:"social-comments-text"})],e.prototype,"commentsText",2);i([s({type:Number,attribute:"social-comments",reflect:!0})],e.prototype,"comments",2);i([s({type:String,attribute:"social-likes-text"})],e.prototype,"likesText",2);i([s({type:Number,attribute:"social-likes",reflect:!0})],e.prototype,"likes",2);i([s({type:Boolean,reflect:!0,attribute:"full-height"})],e.prototype,"fullHeight",2);i([s({type:Boolean,reflect:!0,attribute:"full-width"})],e.prototype,"fullWidth",2);i([s({type:Boolean,reflect:!0})],e.prototype,"stretch",2);e=i([v("scb-card")],e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as u,n as d,i as f,x as b,t as g}from"../../vendor/vendor.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(e,o,r){try{customElements.get(e)||s(e,o,r)}catch(a){var i=String(a||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var _=Object.defineProperty,v=Object.getOwnPropertyDescriptor,h=t=>{throw TypeError(t)},l=(t,s,e,o)=>{for(var r=o>1?void 0:o?v(s,e):s,i=t.length-1,a;i>=0;i--)(a=t[i])&&(r=(o?a(s,e,r):a(r))||r);return o&&r&&_(s,e,r),r},y=(t,s,e)=>s.has(t)||h("Cannot "+e),p=(t,s,e)=>(y(t,s,"read from private field"),e?e.call(t):s.get(t)),x=(t,s,e)=>s.has(t)?h("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),c;let n=class extends f{constructor(){super(...arguments),this.orientation="vertical",this.disabled=!1,this.spacing="group",x(this,c,()=>{const t=this.shadowRoot?.querySelector("slot");if(!t)return;const s=t.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="scb-checkbox");for(const e of s)this.disabled?e.setAttribute("disabled",""):e.removeAttribute("disabled"),this.orientation==="horizontal"?e.setAttribute("orientation","horizontal"):e.removeAttribute("orientation"),this.spacing==="group"?e.style.setProperty("--scb-checkbox-gap","0"):e.style.removeProperty("--scb-checkbox-gap")})}render(){const t=this.orientation==="horizontal"?"row":"column";return b`
|
|
2
2
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${t}`}>
|
|
3
3
|
<slot @slotchange=${p(this,c)}></slot>
|
|
4
4
|
</div>
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as h,n as l,i as b,E as d,x as p,t as u}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,o,s){try{customElements.get(e)||i(e,o,s)}catch(a){var r=String(a||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(t,i,e,o)=>{for(var s=o>1?void 0:o?g(i,e):i,r=t.length-1,a;r>=0;r--)(a=t[r])&&(s=(o?a(i,e,s):a(s))||s);return o&&s&&m(i,e,s),s};let c=class extends b{constructor(){super(...arguments),this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this._checkboxId=""}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`}firstUpdated(){const t=this.shadowRoot?.querySelector("md-checkbox");t&&t.addEventListener("change",()=>{const e=t.checked;this.checked=e,this.dispatchEvent(new CustomEvent("change",{detail:{checked:e},bubbles:!0,composed:!0}))}),this.shadowRoot?.querySelector("label.wrap")?.addEventListener("click",e=>{if(this.disabled)return;if(!e.composedPath().some(r=>{const a=r;return a?.tagName?.toLowerCase?.()==="md-checkbox"||a?.classList?.contains("box-wrap")})){e.preventDefault();const r=this.shadowRoot.querySelector("md-checkbox");r&&(r.checked=!r.checked,r.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria()}updated(t){super.updated(t),t.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(t.has("label")||t.has("supportingText"))&&this.__syncInnerAria()}__syncInnerAria(){const i=this.shadowRoot?.querySelector("md-checkbox")?.shadowRoot;if(!i)return;const e=i.querySelector('[role="checkbox"]')||i.querySelector('input[type="checkbox"]');if(!e)return;const o=this.label?`${this._checkboxId}-label`:"",s=this.supportingText?`${this._checkboxId}-supporting-text`:"";o?e.setAttribute("aria-labelledby",o):e.removeAttribute("aria-labelledby"),s?e.setAttribute("aria-describedby",s):e.removeAttribute("aria-describedby")}render(){const t=this.supportingText?`${this._checkboxId}-supporting-text`:void 0;return p`
|
|
2
2
|
<label class="wrap">
|
|
3
3
|
<div class="box-wrap">
|
|
4
4
|
<md-checkbox
|
|
5
5
|
id="${this._checkboxId}"
|
|
6
|
-
touch-target="wrapper"
|
|
7
6
|
?disabled=${this.disabled}
|
|
8
7
|
?indeterminate=${this.indeterminate}
|
|
9
8
|
?checked=${this.checked}
|
|
10
|
-
|
|
11
|
-
aria-label=${this.label||d}
|
|
9
|
+
${d}
|
|
12
10
|
></md-checkbox>
|
|
13
11
|
</div>
|
|
14
|
-
${this.label?p`<span class="lbl">${this.label}</span>`:d}
|
|
12
|
+
${this.label?p`<span class="lbl" id="${this._checkboxId}-label">${this.label}</span>`:d}
|
|
15
13
|
</label>
|
|
16
14
|
|
|
17
|
-
${this.supportingText?p`<div id="${
|
|
15
|
+
${this.supportingText?p`<div id="${t}" class="supporting-text">
|
|
18
16
|
${this.supportingText}
|
|
19
17
|
</div>`:d}
|
|
20
18
|
<slot></slot>
|
|
21
|
-
`}};
|
|
19
|
+
`}};c.styles=h`
|
|
22
20
|
:host {
|
|
23
21
|
display: inline-grid;
|
|
24
22
|
grid-template-columns: auto;
|
|
@@ -55,10 +53,10 @@ import{b as h,n as l,i as b,E as d,x as p,t as u}from"../../vendor/vendor.js";im
|
|
|
55
53
|
.lbl {
|
|
56
54
|
color: var(--md-sys-color-on-surface);
|
|
57
55
|
font-family: var(--brand-font);
|
|
58
|
-
font-size: var(--md-sys-typescale-body-
|
|
59
|
-
line-height: var(--md-sys-typescale-body-
|
|
56
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
57
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
60
58
|
font-weight: var(--weight-regular, 400);
|
|
61
|
-
letter-spacing: var(--md-sys-typescale-body-
|
|
59
|
+
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
|
62
60
|
}
|
|
63
61
|
:host([disabled]) .lbl { color: var(--n-60); }
|
|
64
62
|
|
|
@@ -73,4 +71,4 @@ import{b as h,n as l,i as b,E as d,x as p,t as u}from"../../vendor/vendor.js";im
|
|
|
73
71
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
74
72
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
75
73
|
}
|
|
76
|
-
`;n([l({type:Boolean,reflect:!0})],
|
|
74
|
+
`;n([l({type:Boolean,reflect:!0})],c.prototype,"disabled",2);n([l({type:Boolean,reflect:!0})],c.prototype,"indeterminate",2);n([l({type:Boolean,reflect:!0})],c.prototype,"checked",2);n([l({type:String})],c.prototype,"label",2);n([l({type:String,attribute:"supporting-text"})],c.prototype,"supportingText",2);c=n([u("scb-checkbox")],c);export{c as ScbCheckbox};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as h}from"../../vendor/preload-helper.js";import{
|
|
2
|
+
import{_ as h}from"../../vendor/preload-helper.js";import{a as p,n as a,i as _,x as n,t as u}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(r,l,s){try{customElements.get(r)||o(r,l,s)}catch(c){var d=String(c||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var m=Object.defineProperty,f=Object.getOwnPropertyDescriptor,i=(e,o,r,l)=>{for(var s=l>1?void 0:l?f(o,r):o,d=e.length-1,c;d>=0;d--)(c=e[d])&&(s=(l?c(o,r,s):c(s))||s);return l&&s&&m(o,r,s),s};let t=class extends _{constructor(){super(...arguments),this.variant="assist",this.label="",this.icon="",this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1}updated(e){super.updated(e),(e.has("variant")||e.has("icon"))&&this.__ensureDepsLoaded()}firstUpdated(){this.__ensureDepsLoaded()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"assist":await h(()=>import("../../vendor/vendor-material.js").then(e=>e.j),__vite__mapDeps([0,1]),import.meta.url);break;case"filter":await h(()=>import("../../vendor/vendor-material.js").then(e=>e.k),__vite__mapDeps([0,1]),import.meta.url);break}this.__loadedVariants.add(this.variant)}!this._insideChipSet&&!this.__chipSetLoaded&&(await h(()=>import("../../vendor/vendor-material.js").then(e=>e.m),__vite__mapDeps([0,1]),import.meta.url),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await h(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),this.__iconLoaded=!0)}get _insideChipSet(){return!!this.closest("md-chip-set")}render(){const e=this._renderChip();return this._insideChipSet?e:n`<md-chip-set>${e}</md-chip-set>`}_renderChip(){const e=this.icon?n`<md-icon slot="icon">${this.icon}</md-icon>`:null;switch(this.variant){case"assist":return n`
|
|
3
3
|
<md-assist-chip
|
|
4
4
|
label=${this.label}
|
|
5
5
|
?disabled=${this.disabled}
|