scb-wc-test 0.1.1
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 +130 -0
- package/all.js +54 -0
- package/dummy.png +0 -0
- package/index.d.ts +54 -0
- package/index.js +108 -0
- package/mvc/components/all.js +53 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +194 -0
- package/mvc/components/scb-accordion/scb-accordion.js +5 -0
- package/mvc/components/scb-app-bar/scb-app-bar.js +144 -0
- package/mvc/components/scb-avatar/scb-avatar.js +99 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +17 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +52 -0
- package/mvc/components/scb-button/scb-button.js +121 -0
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +140 -0
- package/mvc/components/scb-card/scb-card.js +256 -0
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +33 -0
- package/mvc/components/scb-checkbox/scb-checkbox.js +99 -0
- package/mvc/components/scb-chips/scb-chip.js +46 -0
- package/mvc/components/scb-dialog/scb-dialog.js +158 -0
- package/mvc/components/scb-divider/scb-divider.js +53 -0
- package/mvc/components/scb-drawer/scb-drawer-item.js +114 -0
- package/mvc/components/scb-drawer/scb-drawer-section.js +19 -0
- package/mvc/components/scb-drawer/scb-drawer.js +79 -0
- package/mvc/components/scb-drawer/scb-sub-drawer.js +10 -0
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +44 -0
- package/mvc/components/scb-fact-card/scb-fact-card.js +66 -0
- package/mvc/components/scb-footer/scb-footer-section.js +3 -0
- package/mvc/components/scb-footer/scb-footer.js +205 -0
- package/mvc/components/scb-grid/scb-grid-item.js +9 -0
- package/mvc/components/scb-grid/scb-grid.js +81 -0
- package/mvc/components/scb-grid/scb-stack.js +16 -0
- package/mvc/components/scb-header/scb-header-drawer-group.js +1 -0
- package/mvc/components/scb-header/scb-header-drawer-item.js +1 -0
- package/mvc/components/scb-header/scb-header-tab.js +1 -0
- package/mvc/components/scb-header/scb-header-utility.js +1 -0
- package/mvc/components/scb-header/scb-header.js +240 -0
- package/mvc/components/scb-icon-button/scb-icon-button.js +95 -0
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +69 -0
- package/mvc/components/scb-link/scb-link.js +31 -0
- package/mvc/components/scb-list/scb-list-item.js +38 -0
- package/mvc/components/scb-list/scb-list.js +10 -0
- package/mvc/components/scb-menu/scb-menu-item.js +44 -0
- package/mvc/components/scb-menu/scb-menu.js +17 -0
- package/mvc/components/scb-menu/scb-sub-menu.js +29 -0
- package/mvc/components/scb-notification/scb-notification.js +120 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +84 -0
- package/mvc/components/scb-radio-button/scb-radio-button.js +95 -0
- package/mvc/components/scb-radio-button/scb-radio-group.js +28 -0
- package/mvc/components/scb-search/scb-search.js +211 -0
- package/mvc/components/scb-snackbar/scb-snackbar.js +83 -0
- package/mvc/components/scb-status-pill/scb-status-pill.js +31 -0
- package/mvc/components/scb-switch/scb-switch.js +54 -0
- package/mvc/components/scb-tabs/scb-primary-tab.js +7 -0
- package/mvc/components/scb-tabs/scb-secondary-tab.js +7 -0
- package/mvc/components/scb-tabs/scb-tabs.js +23 -0
- package/mvc/components/scb-textfield/scb-textfield.js +135 -0
- package/mvc/components/scb-toc/scb-toc-item.js +84 -0
- package/mvc/components/scb-toc/scb-toc.js +6 -0
- package/mvc/components/scb-tooltip/scb-tooltip.js +216 -0
- package/mvc/scb-logo.svg +21 -0
- package/mvc/scb-wc-test.css +1 -0
- package/mvc/scb.svg +14 -0
- package/mvc/vendor/preload-helper.js +1 -0
- package/mvc/vendor/vendor-lit.js +1 -0
- package/mvc/vendor/vendor-material.js +764 -0
- package/mvc/vendor/vendor.js +68 -0
- package/package.json +248 -0
- package/scb-accordion/scb-accordion-item.d.ts +37 -0
- package/scb-accordion/scb-accordion-item.js +343 -0
- package/scb-accordion/scb-accordion.d.ts +6 -0
- package/scb-accordion/scb-accordion.js +33 -0
- package/scb-app-bar/scb-app-bar.d.ts +10 -0
- package/scb-app-bar/scb-app-bar.js +192 -0
- package/scb-avatar/scb-avatar.d.ts +30 -0
- package/scb-avatar/scb-avatar.js +169 -0
- package/scb-breadcrumb/scb-breadcrumb-item.d.ts +9 -0
- package/scb-breadcrumb/scb-breadcrumb-item.js +54 -0
- package/scb-breadcrumb/scb-breadcrumb.d.ts +16 -0
- package/scb-breadcrumb/scb-breadcrumb.js +105 -0
- package/scb-button/scb-button.d.ts +26 -0
- package/scb-button/scb-button.js +247 -0
- package/scb-calendar-card/scb-calendar-card.d.ts +20 -0
- package/scb-calendar-card/scb-calendar-card.js +191 -0
- package/scb-card/scb-card.d.ts +24 -0
- package/scb-card/scb-card.js +345 -0
- package/scb-checkbox/scb-checkbox-group.d.ts +17 -0
- package/scb-checkbox/scb-checkbox-group.js +80 -0
- package/scb-checkbox/scb-checkbox.d.ts +20 -0
- package/scb-checkbox/scb-checkbox.js +157 -0
- package/scb-chips/scb-chip.d.ts +24 -0
- package/scb-chips/scb-chip.js +150 -0
- package/scb-dialog/scb-dialog.d.ts +58 -0
- package/scb-dialog/scb-dialog.js +390 -0
- package/scb-divider/scb-divider.d.ts +9 -0
- package/scb-divider/scb-divider.js +85 -0
- package/scb-drawer/scb-drawer-item.d.ts +61 -0
- package/scb-drawer/scb-drawer-item.js +220 -0
- package/scb-drawer/scb-drawer-section.d.ts +7 -0
- package/scb-drawer/scb-drawer-section.js +44 -0
- package/scb-drawer/scb-drawer.d.ts +97 -0
- package/scb-drawer/scb-drawer.js +258 -0
- package/scb-drawer/scb-sub-drawer.d.ts +10 -0
- package/scb-drawer/scb-sub-drawer.js +43 -0
- package/scb-fact-card/scb-fact-card-content.d.ts +10 -0
- package/scb-fact-card/scb-fact-card-content.js +83 -0
- package/scb-fact-card/scb-fact-card.d.ts +15 -0
- package/scb-fact-card/scb-fact-card.js +110 -0
- package/scb-footer/scb-footer-section.d.ts +21 -0
- package/scb-footer/scb-footer-section.js +28 -0
- package/scb-footer/scb-footer.d.ts +27 -0
- package/scb-footer/scb-footer.js +326 -0
- package/scb-grid/scb-grid-item.d.ts +28 -0
- package/scb-grid/scb-grid-item.js +66 -0
- package/scb-grid/scb-grid.d.ts +33 -0
- package/scb-grid/scb-grid.js +152 -0
- package/scb-grid/scb-stack.d.ts +29 -0
- package/scb-grid/scb-stack.js +82 -0
- package/scb-header/scb-header-drawer-group.d.ts +13 -0
- package/scb-header/scb-header-drawer-group.js +28 -0
- package/scb-header/scb-header-drawer-item.d.ts +14 -0
- package/scb-header/scb-header-drawer-item.js +31 -0
- package/scb-header/scb-header-tab.d.ts +13 -0
- package/scb-header/scb-header-tab.js +28 -0
- package/scb-header/scb-header-utility.d.ts +14 -0
- package/scb-header/scb-header-utility.js +31 -0
- package/scb-header/scb-header.d.ts +105 -0
- package/scb-header/scb-header.js +618 -0
- package/scb-icon-button/scb-icon-button.d.ts +31 -0
- package/scb-icon-button/scb-icon-button.js +208 -0
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +119 -0
- package/scb-link/scb-link.d.ts +17 -0
- package/scb-link/scb-link.js +74 -0
- package/scb-list/scb-list-item.d.ts +32 -0
- package/scb-list/scb-list-item.js +144 -0
- package/scb-list/scb-list.d.ts +8 -0
- package/scb-list/scb-list.js +39 -0
- package/scb-logo.svg +21 -0
- package/scb-menu/scb-menu-item.d.ts +22 -0
- package/scb-menu/scb-menu-item.js +107 -0
- package/scb-menu/scb-menu.d.ts +21 -0
- package/scb-menu/scb-menu.js +98 -0
- package/scb-menu/scb-sub-menu.d.ts +12 -0
- package/scb-menu/scb-sub-menu.js +69 -0
- package/scb-notification/scb-notification.d.ts +16 -0
- package/scb-notification/scb-notification.js +187 -0
- package/scb-progress-indicator/scb-progress-indicator.d.ts +11 -0
- package/scb-progress-indicator/scb-progress-indicator.js +122 -0
- package/scb-radio-button/scb-radio-button.d.ts +19 -0
- package/scb-radio-button/scb-radio-button.js +176 -0
- package/scb-radio-button/scb-radio-group.d.ts +20 -0
- package/scb-radio-button/scb-radio-group.js +81 -0
- package/scb-search/scb-search.d.ts +45 -0
- package/scb-search/scb-search.js +410 -0
- package/scb-snackbar/scb-snackbar.d.ts +17 -0
- package/scb-snackbar/scb-snackbar.js +140 -0
- package/scb-status-pill/scb-status-pill.d.ts +9 -0
- package/scb-status-pill/scb-status-pill.js +62 -0
- package/scb-switch/scb-switch.d.ts +21 -0
- package/scb-switch/scb-switch.js +111 -0
- package/scb-tabs/scb-primary-tab.d.ts +17 -0
- package/scb-tabs/scb-primary-tab.js +93 -0
- package/scb-tabs/scb-secondary-tab.d.ts +17 -0
- package/scb-tabs/scb-secondary-tab.js +97 -0
- package/scb-tabs/scb-tabs.d.ts +10 -0
- package/scb-tabs/scb-tabs.js +66 -0
- package/scb-textfield/scb-textfield.d.ts +41 -0
- package/scb-textfield/scb-textfield.js +258 -0
- package/scb-toc/scb-toc-item.d.ts +21 -0
- package/scb-toc/scb-toc-item.js +196 -0
- package/scb-toc/scb-toc.d.ts +6 -0
- package/scb-toc/scb-toc.js +27 -0
- package/scb-tooltip/scb-tooltip.d.ts +32 -0
- package/scb-tooltip/scb-tooltip.js +329 -0
- package/scb-wc-test.bundle.js +5429 -0
- package/scb-wc-test.css +1 -0
- package/scb-wc-test.d.ts +106 -0
- package/scb.svg +14 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import{b as h,n as s,i as c,x as i,t as m}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-search/scb-search.js";import"../../vendor/preload-helper.js";import"../scb-list/scb-list.js";import"../scb-list/scb-list-item.js";import"../../vendor/vendor-material.js";var g=Object.defineProperty,x=Object.getOwnPropertyDescriptor,a=(d,l,n,o)=>{for(var e=o>1?void 0:o?x(l,n):l,r=d.length-1,p;r>=0;r--)(p=d[r])&&(e=(o?p(l,n,e):p(e))||e);return o&&e&&g(l,n,e),e};let t=class extends c{constructor(){super(...arguments),this.title="App title",this.type="default",this.position="default",this.searchSupportingText=""}render(){switch(this.type){case"small-flexible":return i`
|
|
2
|
+
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
|
|
3
|
+
<div class="leading">
|
|
4
|
+
<slot name="leading"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<h1 class="headline">${this.title}</h1>
|
|
7
|
+
<div class="trailing">
|
|
8
|
+
<slot name="trailing"></slot>
|
|
9
|
+
</div>
|
|
10
|
+
</header>
|
|
11
|
+
`;case"medium-flexible":return i`
|
|
12
|
+
<header class="medium-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Medium flexible app bar">
|
|
13
|
+
<div class="action-elements">
|
|
14
|
+
<div>
|
|
15
|
+
<slot name="leading"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
<div>
|
|
18
|
+
<slot name="trailing"></slot>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<h1 class="headline">${this.title}</h1>
|
|
22
|
+
</header>
|
|
23
|
+
`;case"large-flexible":return i`
|
|
24
|
+
<header class="large-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Large flexible app bar">
|
|
25
|
+
<div class="action-elements">
|
|
26
|
+
<div style="">
|
|
27
|
+
<slot name="leading"></slot>
|
|
28
|
+
</div>
|
|
29
|
+
<div style="">
|
|
30
|
+
<slot name="trailing"></slot>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<h1 class="headline">${this.title}</h1>
|
|
34
|
+
</header>
|
|
35
|
+
`;case"search":return i`
|
|
36
|
+
<header class="search ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Search app bar">
|
|
37
|
+
<div class="leading">
|
|
38
|
+
<slot name="leading"></slot>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="search-container">
|
|
41
|
+
<scb-search supporting-text=${this.searchSupportingText}></scb-search>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="trailing">
|
|
44
|
+
<slot name="trailing"></slot>
|
|
45
|
+
</div>
|
|
46
|
+
</header>
|
|
47
|
+
`;default:return i`
|
|
48
|
+
<header class="default ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
|
|
49
|
+
<div class="leading">
|
|
50
|
+
<slot name="leading"></slot>
|
|
51
|
+
</div>
|
|
52
|
+
<h1 class="headline">${this.title}</h1>
|
|
53
|
+
<div class="trailing">
|
|
54
|
+
<slot name="trailing"></slot>
|
|
55
|
+
</div>
|
|
56
|
+
</header>
|
|
57
|
+
`}}};t.styles=[h`
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
position: relative;
|
|
61
|
+
container-type: inline-size;
|
|
62
|
+
container-name: app-bar-container;
|
|
63
|
+
}
|
|
64
|
+
header {
|
|
65
|
+
background: var(--md-sys-color-surface-container);
|
|
66
|
+
color: var(--md-sys-color-on-surface);
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
padding: 0 16px;
|
|
70
|
+
position: relative;
|
|
71
|
+
z-index: 10;
|
|
72
|
+
transition: height 0.3s;
|
|
73
|
+
min-height: 64px;
|
|
74
|
+
}
|
|
75
|
+
header.search {
|
|
76
|
+
height: 64px;
|
|
77
|
+
}
|
|
78
|
+
header.medium-flexible {
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
padding: 16px;
|
|
82
|
+
}
|
|
83
|
+
header.large-flexible {
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
align-items: flex-start;
|
|
86
|
+
padding: 16px;
|
|
87
|
+
}
|
|
88
|
+
header.position-top {
|
|
89
|
+
position: fixed;
|
|
90
|
+
top: 0;
|
|
91
|
+
left: 0;
|
|
92
|
+
right: 0;
|
|
93
|
+
z-index: 100;
|
|
94
|
+
}
|
|
95
|
+
header.position-bottom {
|
|
96
|
+
position: fixed;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
z-index: 100;
|
|
101
|
+
}
|
|
102
|
+
.headline {
|
|
103
|
+
flex: 1 1 auto;
|
|
104
|
+
text-align: center;
|
|
105
|
+
font-size: 20px;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
margin: 0;
|
|
108
|
+
}
|
|
109
|
+
header.small-flexible .headline {
|
|
110
|
+
text-align: left;
|
|
111
|
+
margin-left: 16px;
|
|
112
|
+
}
|
|
113
|
+
header.medium-flexible .headline {
|
|
114
|
+
font-size: 24px;
|
|
115
|
+
line-height: 30px;
|
|
116
|
+
font-weight: 700;
|
|
117
|
+
letter-spacing: -0.6px;
|
|
118
|
+
text-align: left;
|
|
119
|
+
margin: 8px 0 0 8px;
|
|
120
|
+
}
|
|
121
|
+
header.large-flexible .headline {
|
|
122
|
+
font-size: 28px;
|
|
123
|
+
font-weight: 700;
|
|
124
|
+
line-height: 34px;
|
|
125
|
+
letter-spacing: -0.6px;
|
|
126
|
+
text-align: left;
|
|
127
|
+
margin: 32px 0 0 8px;
|
|
128
|
+
}
|
|
129
|
+
.search-container {
|
|
130
|
+
flex: 1 1 auto;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
padding: 0 8px;
|
|
135
|
+
}
|
|
136
|
+
.action-elements {
|
|
137
|
+
width: 100%;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: row;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
align-items: center;
|
|
142
|
+
margin-bottom: 8px;
|
|
143
|
+
}
|
|
144
|
+
`];a([s({type:String})],t.prototype,"title",2);a([s({type:String})],t.prototype,"type",2);a([s({type:String,reflect:!0})],t.prototype,"position",2);a([s({type:String,attribute:"search-supporting-text"})],t.prototype,"searchSupportingText",2);t=a([m("scb-app-bar")],t);
|
|
@@ -0,0 +1,99 @@
|
|
|
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 m}from"../../vendor/preload-helper.js";import{b as g,n as l,r as d,i as v,E as c,x as a,t as _}from"../../vendor/vendor.js";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(i,t,o,s)=>{for(var n=s>1?void 0:s?f(t,o):t,h=i.length-1,p;h>=0;h--)(p=i[h])&&(n=(s?p(t,o,n):p(n))||n);return s&&n&&u(t,o,n),n};let e=class extends v{constructor(){super(...arguments),this.src="",this.alt="",this.label="",this.size="medium",this.shape="circular",this.iconName="",this.variant="image",this._imgError=!1,this._hasIconSlot=!1,this._onImgLoad=()=>{this._imgError=!1,this.dispatchEvent(new CustomEvent("image-load",{bubbles:!0,composed:!0}))},this._onImgError=()=>{this._imgError=!0,this.dispatchEvent(new CustomEvent("image-error",{bubbles:!0,composed:!0}))},this._onIconSlotChange=i=>{const t=i.currentTarget;this._hasIconSlot=(t.assignedNodes({flatten:!0})||[]).length>0}}async firstUpdated(){this.variant==="icon"&&await m(()=>import("../../vendor/vendor-material.js").then(i=>i.i),__vite__mapDeps([0,1]),import.meta.url)}_initials(){const i=(this.label||this.alt||"").trim();if(!i)return"?";const t=i.split(/\s+/).filter(Boolean);if(t.length===1)return t[0].slice(0,1).toUpperCase();const o=t[0].slice(0,1),s=t[t.length-1].slice(0,1);return(o+s).toUpperCase()}_ariaLabel(){const i=(this.label||this.alt||"").trim();return i||null}render(){const i=this._ariaLabel(),t=this.variant==="image"&&!!this.src&&!this._imgError,o=a`${c}
|
|
3
|
+
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
4
|
+
${this._hasIconSlot?c:this.iconName?a`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:a`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
5
|
+
`,s=t?a`<img class="photo" part="image" src=${this.src} alt=${this.alt}
|
|
6
|
+
@load=${this._onImgLoad} @error=${this._onImgError} />`:a`
|
|
7
|
+
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
8
|
+
${this._hasIconSlot?c:this.iconName?a`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:a`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
9
|
+
`;return a`
|
|
10
|
+
<div class="container" part="container" role="img" aria-label=${i??c}>
|
|
11
|
+
${this.variant==="icon"?o:s}
|
|
12
|
+
</div>
|
|
13
|
+
`}};e.styles=g`
|
|
14
|
+
:host {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
--_size: 40px;
|
|
18
|
+
--_font-size: 16px;
|
|
19
|
+
--_bg: var(--md-sys-color-primary-fixed-dim, var(--md-sys-color-primary-container));
|
|
20
|
+
--_fg: var(--md-sys-color-on-primary-fixed, var(--md-sys-color-on-primary-container));
|
|
21
|
+
--_radius: var(--radius-full, 1000px);
|
|
22
|
+
--_border: 0 solid transparent;
|
|
23
|
+
|
|
24
|
+
font-family: var(--brand-font, Inter, system-ui, sans-serif);
|
|
25
|
+
color-scheme: light dark;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([size="small"]) { --_size: 32px; --_font-size: var(--md-sys-typescale-label-medium-size, 14px); }
|
|
29
|
+
:host([size="medium"]) { --_size: 40px; --_font-size: var(--md-sys-typescale-label-large-size, 16px); }
|
|
30
|
+
:host([size="large"]) { --_size: 56px; --_font-size: var(--md-sys-typescale-title-large-size, 20px); }
|
|
31
|
+
|
|
32
|
+
:host([shape="circular"]) { --_radius: var(--radius-full, 1000px); }
|
|
33
|
+
:host([shape="rounded"]) { --_radius: var(--radius-s, 8px); }
|
|
34
|
+
:host([shape="square"]) { --_radius: 0; }
|
|
35
|
+
|
|
36
|
+
.container {
|
|
37
|
+
inline-size: var(--_size);
|
|
38
|
+
block-size: var(--_size);
|
|
39
|
+
border-radius: var(--_radius);
|
|
40
|
+
position: relative;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
user-select: none;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
border: var(--_border);
|
|
45
|
+
display: grid;
|
|
46
|
+
place-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([variant="image"]) .container { background: none; }
|
|
50
|
+
:host([variant="image"]) img.photo {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
object-fit: cover;
|
|
54
|
+
display: block;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host([size="small"]) { --_icon-size: var(--icon-size-small, 24px); }
|
|
58
|
+
:host([size="medium"]) { --_icon-size: var(--icon-size-medium, 32px); }
|
|
59
|
+
:host([size="large"]) { --_icon-size: var(--icon-size-large, 40px); }
|
|
60
|
+
|
|
61
|
+
:host([variant="icon"]) .container { background: var(--_bg); color: var(--_fg); }
|
|
62
|
+
|
|
63
|
+
img.icon {
|
|
64
|
+
width: var(--_icon-size);
|
|
65
|
+
height: var(--_icon-size);
|
|
66
|
+
object-fit: contain;
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.fallback {
|
|
71
|
+
display: grid;
|
|
72
|
+
place-items: center;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
font-size: var(--_font-size);
|
|
76
|
+
font-weight: var(--weight-semibold, 600);
|
|
77
|
+
letter-spacing: .01em;
|
|
78
|
+
text-transform: uppercase;
|
|
79
|
+
color: var(--_fg);
|
|
80
|
+
background: var(--_bg);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([variant="image"]) .fallback {
|
|
84
|
+
color: var(--md-sys-color-on-primary-container);
|
|
85
|
+
background: var(--md-sys-color-primary-container);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
::slotted([slot="icon"]) {
|
|
89
|
+
width: var(--_icon-size);
|
|
90
|
+
height: var(--_icon-size);
|
|
91
|
+
line-height: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host(:focus-visible) .container {
|
|
95
|
+
outline: var(--md-focus-ring-width, 2px) solid var(--md-focus-ring-color, var(--p-40));
|
|
96
|
+
outline-offset: 2px;
|
|
97
|
+
border-radius: var(--_radius);
|
|
98
|
+
}
|
|
99
|
+
`;r([l({type:String})],e.prototype,"src",2);r([l({type:String})],e.prototype,"alt",2);r([l({type:String})],e.prototype,"label",2);r([l({type:String,reflect:!0})],e.prototype,"size",2);r([l({type:String,reflect:!0})],e.prototype,"shape",2);r([l({type:String,attribute:"icon-name",reflect:!0})],e.prototype,"iconName",2);r([l({type:String,reflect:!0})],e.prototype,"variant",2);r([d()],e.prototype,"_imgError",2);r([d()],e.prototype,"_hasIconSlot",2);e=r([_("scb-avatar")],e);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{n as o,t as u,i as b,b as m,x as p}from"../../vendor/vendor.js";var h=Object.defineProperty,f=Object.getOwnPropertyDescriptor,a=(l,t,c,s)=>{for(var r=s>1?void 0:s?f(t,c):t,i=l.length-1,n;i>=0;i--)(n=l[i])&&(r=(s?n(t,c,r):n(r))||r);return s&&r&&h(t,c,r),r};let e=class extends b{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return m`
|
|
2
|
+
.breadcrumb-separator {
|
|
3
|
+
margin: 0 8px;
|
|
4
|
+
color: var(--md-sys-color-on-surface);
|
|
5
|
+
}
|
|
6
|
+
.breadcrumb-link {
|
|
7
|
+
color: var(--md-sys-color-primary);
|
|
8
|
+
text-decoration-thickness: 1px;
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
.breadcrumb-link:hover {
|
|
12
|
+
text-decoration-thickness: 2px;
|
|
13
|
+
}
|
|
14
|
+
`}render(){switch(!0){case this.isCurrent:return p`<span class="breadcrumb-current">${this.label}</span>`;default:return p`
|
|
15
|
+
<a href="${this.href}" class="breadcrumb-link">${this.label}</a>
|
|
16
|
+
<span class="breadcrumb-separator">/</span>
|
|
17
|
+
`}}};a([o({type:String})],e.prototype,"label",2);a([o({type:Boolean,attribute:"is-current"})],e.prototype,"isCurrent",2);a([o({type:String,attribute:"item-href"})],e.prototype,"href",2);e=a([u("scb-breadcrumb-item")],e);
|
|
@@ -0,0 +1,52 @@
|
|
|
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 d}from"../../vendor/preload-helper.js";import{n as m,i as p,b,x as n,t as h}from"../../vendor/vendor.js";import"./scb-breadcrumb-item.js";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,c=(e,s,a,l)=>{for(var r=l>1?void 0:l?f(s,a):s,i=e.length-1,o;i>=0;i--)(o=e[i])&&(r=(l?o(s,a,r):o(r))||r);return l&&r&&u(s,a,r),r};let t=class extends p{constructor(){super(...arguments),this.showAll=!1}async __ensureIconLoaded(){t.__iconLoaded||(await d(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),t.__iconLoaded=!0)}static get styles(){return b`
|
|
3
|
+
.scb-breadcrumb {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
}
|
|
8
|
+
.breadcrumb-separator {
|
|
9
|
+
margin: 0 8px;
|
|
10
|
+
color: var(--md-sys-color-on-surface);
|
|
11
|
+
}
|
|
12
|
+
.collapsed > scb-breadcrumb-item {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
.collapsed > scb-breadcrumb-item:nth-child(-n+3),
|
|
16
|
+
.collapsed > scb-breadcrumb-item:nth-last-child(-n+3) {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
}
|
|
19
|
+
.ellipsis {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
color: var(--md-sys-color-primary);
|
|
23
|
+
}
|
|
24
|
+
.collapsed .ellipsis {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
}
|
|
27
|
+
.expanded .ellipsis {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
.breadcrumb-animate {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(10px);
|
|
33
|
+
animation: fadeInBreadcrumb 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
|
|
34
|
+
}
|
|
35
|
+
@keyframes fadeInBreadcrumb {
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: translateY(0);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`}firstUpdated(){this.children.length>6&&!this.showAll&&this.__ensureIconLoaded()}_onEllipsisClick(){this.showAll?(this.showAll=!1,t.__iconLoaded||this.__ensureIconLoaded()):(this.showAll=!0,this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((s,a)=>{s.classList.add("breadcrumb-animate"),s.style.animationDelay=`${a*60}ms`}),setTimeout(()=>{e.forEach(s=>{s.classList.remove("breadcrumb-animate"),s.style.animationDelay=""})},600))}))}render(){let e=[];this.children.length||(e=Array.from(this.shadowRoot?this.shadowRoot.querySelectorAll("scb-breadcrumb-item"):[])),e.length||(e=Array.from(this.children).filter(a=>a.tagName.toLowerCase()==="scb-breadcrumb-item")),e.length>0&&e[e.length-1].setAttribute("is-current","true");const s=e.length>6&&!this.showAll;return n`
|
|
42
|
+
<div class="scb-breadcrumb ${s?"collapsed":"expanded"}">
|
|
43
|
+
${s?e.map((a,l)=>l===3?n`<span
|
|
44
|
+
class="ellipsis"
|
|
45
|
+
aria-label="Visa alla"
|
|
46
|
+
role="button"
|
|
47
|
+
tabindex="0"
|
|
48
|
+
@click=${this._onEllipsisClick}
|
|
49
|
+
@keydown=${r=>{(r.key==="Enter"||r.key===" ")&&this._onEllipsisClick()}}
|
|
50
|
+
><md-icon>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${a}`:n`${a}`):e.map(a=>a)}
|
|
51
|
+
</div>
|
|
52
|
+
`}};t.__iconLoaded=!1;c([m({type:Boolean})],t.prototype,"showAll",2);t=c([h("scb-breadcrumb")],t);
|
|
@@ -0,0 +1,121 @@
|
|
|
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{i as b,b as m,x as u,E as e,n as d,t as p}from"../../vendor/vendor.js";var f=Object.defineProperty,v=Object.getOwnPropertyDescriptor,s=(t,r,o,n)=>{for(var a=n>1?void 0:n?v(r,o):r,i=t.length-1,c;i>=0;i--)(c=t[i])&&(a=(n?c(r,o,a):c(a))||a);return n&&a&&f(r,o,a),a};let l=class extends b{constructor(){super(...arguments),this.variant="filled",this.type="button",this.label="Button",this.trailingIcon=!1,this.icon="",this.disabled=!1,this.href="",this.target="",this.rel="",this.__loadedButtons=new Set,this.__iconLoaded=!1}async __ensureDepsLoaded(){if(!this.__loadedButtons.has(this.variant)){switch(this.variant){case"filled":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.g),__vite__mapDeps([0,1]),import.meta.url);break;case"outlined":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.h),__vite__mapDeps([0,1]),import.meta.url);break;case"filled-tonal":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.j),__vite__mapDeps([0,1]),import.meta.url);break;case"text":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.t),__vite__mapDeps([0,1]),import.meta.url);break}this.__loadedButtons.add(this.variant)}this.icon&&!this.__iconLoaded&&(await h(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),this.__iconLoaded=!0)}__getInnerButton(){return this.renderRoot.querySelector("md-filled-button, md-outlined-button, md-filled-tonal-button, md-text-button")}__syncAriaToInner(){const t=this.__getInnerButton();if(!t)return;const r=this.getAttribute("aria-controls");r&&t.setAttribute("aria-controls",r);const o=this.getAttribute("aria-expanded");o!==null&&(t.setAttribute("aria-expanded",o),this.removeAttribute("aria-expanded")),this.__ariaObserver?.disconnect(),this.__ariaObserver=new MutationObserver(n=>{const a=this.__getInnerButton();if(a){for(const i of n)if(!(i.type!=="attributes"||!i.attributeName)&&(i.attributeName==="aria-controls"||i.attributeName==="aria-expanded")){const c=this.getAttribute(i.attributeName);c===null?a.removeAttribute(i.attributeName):a.setAttribute(i.attributeName,c),i.attributeName==="aria-expanded"&&this.removeAttribute("aria-expanded")}}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}firstUpdated(){(this.type==="submit"||this.type==="reset")&&this.addEventListener("click",()=>{if(!this.disabled){const t=this.closest("form");t&&(this.type==="submit"&&t.requestSubmit(),this.type==="reset"&&t.reset())}}),this.__ensureDepsLoaded(),this.__syncAriaToInner()}updated(t){(t.has("variant")||t.has("icon")&&this.icon)&&this.__ensureDepsLoaded(),t.has("variant")&&this.__syncAriaToInner()}disconnectedCallback(){this.__ariaObserver?.disconnect(),super.disconnectedCallback()}static get styles(){return m`
|
|
3
|
+
/* Gör hosten stretchbar i t.ex. flex/grid */
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
block-size: var(--scb-button-block-size, auto);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Låt inre md-knappen fylla hostens höjd*/
|
|
10
|
+
md-filled-button,
|
|
11
|
+
md-outlined-button,
|
|
12
|
+
md-filled-tonal-button,
|
|
13
|
+
md-text-button {
|
|
14
|
+
block-size: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Errorvarianter */
|
|
18
|
+
/*
|
|
19
|
+
md-filled-button[variant='error'],
|
|
20
|
+
md-outlined-button[variant='error'],
|
|
21
|
+
md-filled-tonal-button[variant='error'],
|
|
22
|
+
md-text-button[variant='error'] {
|
|
23
|
+
--md-sys-color-primary: var(--md-sys-color-error);
|
|
24
|
+
--md-sys-color-on-primary: var(--md-sys-color-on-error);
|
|
25
|
+
}
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/* Outlined – röd outline vid error + tjockare vid hover */
|
|
29
|
+
/*
|
|
30
|
+
md-outlined-button[variant='error'] {
|
|
31
|
+
--_outline-color: var(--md-sys-color-error);
|
|
32
|
+
--md-outlined-button-pressed-outline-color: var(--md-sys-color-error);
|
|
33
|
+
}
|
|
34
|
+
*/
|
|
35
|
+
/* md-outlined-button[variant='error']:hover, */
|
|
36
|
+
md-outlined-button:hover {
|
|
37
|
+
--md-outlined-button-outline-width: var(--spacing-1, 1px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Filled-tonal – error-färger */
|
|
41
|
+
/*
|
|
42
|
+
md-filled-tonal-button[variant='error'] {
|
|
43
|
+
--md-filled-tonal-button-container-color: var(--md-sys-color-error-container);
|
|
44
|
+
--md-filled-tonal-button-label-text-color: var(--md-sys-color-on-error-container);
|
|
45
|
+
--md-filled-tonal-button-hover-label-text-color: var(--md-sys-color-on-error-container);
|
|
46
|
+
--md-filled-tonal-button-pressed-label-text-color: var(--md-sys-color-on-error-container);
|
|
47
|
+
--md-filled-tonal-button-focus-label-text-color: var(--md-sys-color-on-error-container);
|
|
48
|
+
--md-filled-tonal-button-icon-color: var(--md-sys-color-on-error-container);
|
|
49
|
+
--md-filled-tonal-button-hover-icon-color: var(--md-sys-color-on-error-container);
|
|
50
|
+
--md-filled-tonal-button-pressed-icon-color: var(--md-sys-color-on-error-container);
|
|
51
|
+
--md-filled-tonal-button-focus-icon-color: var(--md-sys-color-on-error-container);
|
|
52
|
+
--md-filled-tonal-button-hover-state-layer-color: var(--md-sys-color-on-error-container);
|
|
53
|
+
--md-filled-tonal-button-pressed-state-layer-color: var(--md-sys-color-on-error-container);
|
|
54
|
+
}
|
|
55
|
+
@media (prefers-color-scheme: dark) {
|
|
56
|
+
md-filled-tonal-button[variant='error'] {
|
|
57
|
+
--md-filled-tonal-button-container-color: var(--md-sys-color-on-error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
*/
|
|
61
|
+
`}render(){const t=!!this.icon?.trim(),r=t?u`<md-icon slot="icon">${this.icon}</md-icon>`:e,o=e,n=this.label.trim()===""?this.icon:void 0;switch(this.variant){case"filled":return u`
|
|
62
|
+
<md-filled-button
|
|
63
|
+
type=${this.type}
|
|
64
|
+
variant=${o}
|
|
65
|
+
?trailing-icon=${this.trailingIcon}
|
|
66
|
+
?disabled=${this.disabled}
|
|
67
|
+
aria-label=${n}
|
|
68
|
+
href=${this.href||e}
|
|
69
|
+
target=${this.target||e}
|
|
70
|
+
rel=${this.rel||e}
|
|
71
|
+
>
|
|
72
|
+
${t&&!this.trailingIcon?r:e}
|
|
73
|
+
${this.label}
|
|
74
|
+
${t&&this.trailingIcon?r:e}
|
|
75
|
+
</md-filled-button>
|
|
76
|
+
`;case"outlined":return u`
|
|
77
|
+
<md-outlined-button
|
|
78
|
+
type=${this.type}
|
|
79
|
+
variant=${o}
|
|
80
|
+
?trailing-icon=${this.trailingIcon}
|
|
81
|
+
?disabled=${this.disabled}
|
|
82
|
+
aria-label=${n}
|
|
83
|
+
href=${this.href||e}
|
|
84
|
+
target=${this.target||e}
|
|
85
|
+
rel=${this.rel||e}
|
|
86
|
+
>
|
|
87
|
+
${t&&!this.trailingIcon?r:e}
|
|
88
|
+
${this.label}
|
|
89
|
+
${t&&this.trailingIcon?r:e}
|
|
90
|
+
</md-outlined-button>
|
|
91
|
+
`;case"filled-tonal":return u`
|
|
92
|
+
<md-filled-tonal-button
|
|
93
|
+
type=${this.type}
|
|
94
|
+
variant=${o}
|
|
95
|
+
?trailing-icon=${this.trailingIcon}
|
|
96
|
+
?disabled=${this.disabled}
|
|
97
|
+
aria-label=${n}
|
|
98
|
+
href=${this.href||e}
|
|
99
|
+
target=${this.target||e}
|
|
100
|
+
rel=${this.rel||e}
|
|
101
|
+
>
|
|
102
|
+
${t&&!this.trailingIcon?r:e}
|
|
103
|
+
${this.label}
|
|
104
|
+
${t&&this.trailingIcon?r:e}
|
|
105
|
+
</md-filled-tonal-button>
|
|
106
|
+
`;case"text":return u`
|
|
107
|
+
<md-text-button
|
|
108
|
+
type=${this.type}
|
|
109
|
+
variant=${o}
|
|
110
|
+
?trailing-icon=${this.trailingIcon}
|
|
111
|
+
?disabled=${this.disabled}
|
|
112
|
+
aria-label=${n}
|
|
113
|
+
href=${this.href||e}
|
|
114
|
+
target=${this.target||e}
|
|
115
|
+
rel=${this.rel||e}
|
|
116
|
+
>
|
|
117
|
+
${t&&!this.trailingIcon?r:e}
|
|
118
|
+
${this.label}
|
|
119
|
+
${t&&this.trailingIcon?r:e}
|
|
120
|
+
</md-text-button>
|
|
121
|
+
`;default:return u``}}};s([d({type:String,reflect:!0})],l.prototype,"variant",2);s([d({type:String,reflect:!0})],l.prototype,"type",2);s([d({type:String})],l.prototype,"label",2);s([d({type:Boolean,attribute:"trailing-icon"})],l.prototype,"trailingIcon",2);s([d({type:String})],l.prototype,"icon",2);s([d({type:Boolean,reflect:!0})],l.prototype,"disabled",2);s([d({type:String})],l.prototype,"href",2);s([d({type:String})],l.prototype,"target",2);s([d({type:String})],l.prototype,"rel",2);l=s([p("scb-button")],l);export{l as ScbButton};
|
|
@@ -0,0 +1,140 @@
|
|
|
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 c}from"../../vendor/preload-helper.js";import{b as h,n as s,i as g,x as d,t as v}from"../../vendor/vendor.js";var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,a=(t,n,o,r)=>{for(var i=r>1?void 0:r?f(n,o):n,l=t.length-1,p;l>=0;l--)(p=t[l])&&(i=(r?p(n,o,i):p(i))||i);return r&&i&&u(n,o,i),i};let e=class extends g{constructor(){super(...arguments),this.variant="default",this.direction="horizontal",this.header="",this.subtitle="",this.supportingText="",this.cardHref="",this.showMedia=null}async firstUpdated(){e.__iconLoaded||(await c(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),e.__iconLoaded=!0),e.__rippleLoaded||(await c(()=>import("../../vendor/vendor-material.js").then(t=>t.r),__vite__mapDeps([0,1]),import.meta.url),e.__rippleLoaded=!0)}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",n=this.direction?`${this.direction.toLowerCase()}`:"",o=this.cardHref?"clickable":"",r=new Date().getDate(),i=new Date().toLocaleString("default",{month:"short"}).replace(".","");return d`
|
|
3
|
+
<div
|
|
4
|
+
class="calendar-card ${n} ${o} ${t}"
|
|
5
|
+
role="${this.cardHref?"link":"group"}"
|
|
6
|
+
aria-label="${this.header||"Kalenderkort"}"
|
|
7
|
+
tabindex="${this.cardHref?"0":"-1"}"
|
|
8
|
+
@click="${this.cardHref?()=>window.open(this.cardHref,"_self"):null}"
|
|
9
|
+
@keydown="${this.cardHref?this._onKeyDown:null}"
|
|
10
|
+
style="cursor: ${this.cardHref?"pointer":"default"};"
|
|
11
|
+
>
|
|
12
|
+
${this.cardHref?d`<md-ripple></md-ripple>`:""}
|
|
13
|
+
${this.showMedia?d`
|
|
14
|
+
<div class="media" aria-label="Datum: ${r} ${i}">
|
|
15
|
+
<div class="day">${r}</div>
|
|
16
|
+
<div class="month">${i}</div>
|
|
17
|
+
</div>`:""}
|
|
18
|
+
<div class="container">
|
|
19
|
+
<div class="header-container">
|
|
20
|
+
<div class="header">${this.header}</div>
|
|
21
|
+
${this.cardHref?d`<md-icon>arrow_forward</md-icon>`:""}
|
|
22
|
+
</div>
|
|
23
|
+
${this.subtitle?d`<div class="subtitle">${this.subtitle}</div>`:""}
|
|
24
|
+
${this.supportingText?d`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
`}_onKeyDown(t){(t.key==="Enter"||t.key===" ")&&this.cardHref&&(window.open(this.cardHref,"_self"),t.preventDefault())}};e.__iconLoaded=!1;e.__rippleLoaded=!1;e.styles=h`
|
|
28
|
+
/* Grundläggande stilar för kortet */
|
|
29
|
+
:host {
|
|
30
|
+
.calendar-card {
|
|
31
|
+
position: relative;
|
|
32
|
+
display: flex;
|
|
33
|
+
color: var(--md-sys-color-on-surface, #0F0865);
|
|
34
|
+
font-family: var(--brand, Inter);
|
|
35
|
+
font-style: normal;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
gap: var(--spacing-spacing-3, 8px);
|
|
39
|
+
align-self: stretch;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
|
|
42
|
+
&.vertical {
|
|
43
|
+
max-width: 360px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.horizontal {
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
max-width: 576px;
|
|
49
|
+
gap: var(--spacing-spacing-6, 20px);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.outlined {
|
|
53
|
+
border-radius: var(--radius-large, 16px);
|
|
54
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CCC);
|
|
55
|
+
background: var(--md-sys-color-surface, #FFF);
|
|
56
|
+
padding: var(--spacing-spacing-7, 24px) var(--spacing-spacing-6, 20px);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.filled {
|
|
60
|
+
border-radius: var(--radius-large, 16px);
|
|
61
|
+
background: var(--md-sys-color-surface-dim, #F9F8EF);
|
|
62
|
+
padding: var(--spacing-spacing-7, 24px) var(--spacing-spacing-6, 20px);
|
|
63
|
+
.media {
|
|
64
|
+
background: var(--md-sys-color-surface, #FFF);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Media-del */
|
|
71
|
+
.media {
|
|
72
|
+
display: flex;
|
|
73
|
+
width: var(--spacing-spacing-11, 64px);
|
|
74
|
+
min-width: var(--spacing-spacing-11, 64px);
|
|
75
|
+
max-width: var(--spacing-spacing-11, 64px);
|
|
76
|
+
height: var(--spacing-spacing-11, 64px);
|
|
77
|
+
padding: var(--spacing-spacing-0, 0) 0;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: var(--spacing-spacing-2, 4px);
|
|
82
|
+
border-radius: var(--radius-small, 8px);
|
|
83
|
+
background: var(--md-sys-color-surface-dim, #F9F8EF);
|
|
84
|
+
|
|
85
|
+
.day {
|
|
86
|
+
font-size: var(--scale-07, 28px);
|
|
87
|
+
font-weight: var(--weight-bold, 700);
|
|
88
|
+
line-height: 100%;
|
|
89
|
+
letter-spacing: -0.6px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.month {
|
|
93
|
+
font-size: var(--scale-02, 14px);
|
|
94
|
+
font-weight: var(--weight-regular, 400);
|
|
95
|
+
line-height: 100%;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
md-ripple {
|
|
100
|
+
border-radius: var(--radius-l, 16px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Textstilar */
|
|
104
|
+
.header-container {
|
|
105
|
+
width: 100%;
|
|
106
|
+
flex: 0 0 auto;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 10px;
|
|
110
|
+
padding-top: var(--spacing-pacing-1, 2px);
|
|
111
|
+
color:inherit;
|
|
112
|
+
text-decoration: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.header {
|
|
116
|
+
font-size: var(--md-sys-typescale-headline-small-size, 24px);
|
|
117
|
+
font-weight: var(--weight-bold, 700);
|
|
118
|
+
line-height: var(--md-sys-typescale-headline-small-line-height2, 30px);
|
|
119
|
+
letter-spacing: var(--md-sys-typescale-headline-small-tracking, -0.6px);
|
|
120
|
+
flex: 1 1 0;
|
|
121
|
+
min-width: 0;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.subtitle {
|
|
128
|
+
font-size: var(--md-sys-typescale-title-medium-size, 18px);
|
|
129
|
+
font-weight: var(--weight-semibold, 600);
|
|
130
|
+
line-height: var(--md-sys-typescale-title-medium-line-height, 26px);
|
|
131
|
+
letter-spacing: var(--md-sys-typescale-title-medium-tracking, -0.3px);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.supporting-text {
|
|
135
|
+
font-size: var(--md-sys-typescale-body-large-size, 18px);
|
|
136
|
+
font-weight: var(--weight-regular, 400);
|
|
137
|
+
line-height: var(--md-sys-typescale-body-large-line-height, 26px);
|
|
138
|
+
letter-spacing: var(--md-sys-typescale-body-large-tracking, -0.3px);
|
|
139
|
+
}
|
|
140
|
+
`;a([s({type:String,reflect:!0})],e.prototype,"variant",2);a([s({type:String,reflect:!0})],e.prototype,"direction",2);a([s({type:String})],e.prototype,"header",2);a([s({type:String})],e.prototype,"subtitle",2);a([s({type:String,attribute:"supporting-text"})],e.prototype,"supportingText",2);a([s({type:String,attribute:"card-href"})],e.prototype,"cardHref",2);a([s({type:Boolean,reflect:!0,attribute:"show-media"})],e.prototype,"showMedia",2);e=a([v("scb-calendar-card")],e);
|