scb-wc-test 0.1.112 → 0.1.113
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 +118 -116
- package/mvc/components/all.js +1 -0
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +51 -0
- package/package.json +6 -2
- package/scb-cookies-consent/scb-cookies-consent.d.ts +12 -0
- package/scb-cookies-consent/scb-cookies-consent.js +97 -0
- package/scb-wc-test.bundle.js +368 -318
package/all.js
CHANGED
|
@@ -15,6 +15,7 @@ import './mvc/components/scb-card/scb-card.js';
|
|
|
15
15
|
import './mvc/components/scb-checkbox/scb-checkbox-group.js';
|
|
16
16
|
import './mvc/components/scb-checkbox/scb-checkbox.js';
|
|
17
17
|
import './mvc/components/scb-chip/scb-chip.js';
|
|
18
|
+
import './mvc/components/scb-cookies-consent/scb-cookies-consent.js';
|
|
18
19
|
import './mvc/components/scb-datepicker/scb-datepicker.js';
|
|
19
20
|
import './mvc/components/scb-dialog/scb-dialog.js';
|
|
20
21
|
import './mvc/components/scb-divider/scb-divider.js';
|
|
@@ -87,6 +88,7 @@ import './scb-card/scb-card.js';
|
|
|
87
88
|
import './scb-checkbox/scb-checkbox-group.js';
|
|
88
89
|
import './scb-checkbox/scb-checkbox.js';
|
|
89
90
|
import './scb-chip/scb-chip.js';
|
|
91
|
+
import './scb-cookies-consent/scb-cookies-consent.js';
|
|
90
92
|
import './scb-datepicker/scb-datepicker.js';
|
|
91
93
|
import './scb-dialog/scb-dialog.js';
|
|
92
94
|
import './scb-divider/scb-divider.js';
|
package/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './scb-card/scb-card';
|
|
|
11
11
|
export * from './scb-checkbox/scb-checkbox-group';
|
|
12
12
|
export * from './scb-checkbox/scb-checkbox';
|
|
13
13
|
export * from './scb-chip/scb-chip';
|
|
14
|
+
export * from './scb-cookies-consent/scb-cookies-consent';
|
|
14
15
|
export * from './scb-datepicker/scb-datepicker';
|
|
15
16
|
export * from './scb-dialog/scb-dialog';
|
|
16
17
|
export * from './scb-divider/scb-divider';
|
package/index.js
CHANGED
|
@@ -4,133 +4,135 @@ import { ScbAppBar as p } from "./scb-app-bar/scb-app-bar.js";
|
|
|
4
4
|
import { ScbAvatar as b } from "./scb-avatar/scb-avatar.js";
|
|
5
5
|
import { ScbBadge as f } from "./scb-badge/scb-badge.js";
|
|
6
6
|
import { SCBBreadcrumbItem as i } from "./scb-breadcrumb/scb-breadcrumb-item.js";
|
|
7
|
-
import { SCBBreadcrumb as
|
|
8
|
-
import { ScbButton as
|
|
9
|
-
import { ScbCalendarCard as
|
|
7
|
+
import { SCBBreadcrumb as d } from "./scb-breadcrumb/scb-breadcrumb.js";
|
|
8
|
+
import { ScbButton as C } from "./scb-button/scb-button.js";
|
|
9
|
+
import { ScbCalendarCard as s } from "./scb-calendar-card/scb-calendar-card.js";
|
|
10
10
|
import { ScbCard as B } from "./scb-card/scb-card.js";
|
|
11
11
|
import { ScbCheckboxGroup as D } from "./scb-checkbox/scb-checkbox-group.js";
|
|
12
|
-
import { ScbCheckbox as
|
|
12
|
+
import { ScbCheckbox as T } from "./scb-checkbox/scb-checkbox.js";
|
|
13
13
|
import { ScbChip as F } from "./scb-chip/scb-chip.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
14
|
+
import { ScbCookiesConsent as P } from "./scb-cookies-consent/scb-cookies-consent.js";
|
|
15
|
+
import { ScbDatepicker as G } from "./scb-datepicker/scb-datepicker.js";
|
|
16
|
+
import { ScbDialog as A } from "./scb-dialog/scb-dialog.js";
|
|
17
|
+
import { ScbDivider as M } from "./scb-divider/scb-divider.js";
|
|
18
|
+
import { ScbDrawerItem as z } from "./scb-drawer/scb-drawer-item.js";
|
|
19
|
+
import { ScbDrawerSection as K } from "./scb-drawer/scb-drawer-section.js";
|
|
20
|
+
import { ScbDrawer as O } from "./scb-drawer/scb-drawer.js";
|
|
21
|
+
import { ScbSubDrawer as V } from "./scb-drawer/scb-sub-drawer.js";
|
|
22
|
+
import { ScbFactCardContent as q } from "./scb-fact-card/scb-fact-card-content.js";
|
|
23
|
+
import { ScbFactCard as J } from "./scb-fact-card/scb-fact-card.js";
|
|
24
|
+
import { ScbFooterSection as W } from "./scb-footer/scb-footer-section.js";
|
|
25
|
+
import { ScbFooter as Y } from "./scb-footer/scb-footer.js";
|
|
26
|
+
import { ScbGridItem as _ } from "./scb-grid/scb-grid-item.js";
|
|
27
|
+
import { ScbGrid as rr } from "./scb-grid/scb-grid.js";
|
|
28
|
+
import { ScbStack as er } from "./scb-grid/scb-stack.js";
|
|
29
|
+
import { ScbHeaderDrawerGroup as cr } from "./scb-header/scb-header-drawer-group.js";
|
|
30
|
+
import { ScbHeaderDrawerItem as pr } from "./scb-header/scb-header-drawer-item.js";
|
|
31
|
+
import { ScbHeaderTab as br } from "./scb-header/scb-header-tab.js";
|
|
32
|
+
import { ScbHeaderUtility as fr } from "./scb-header/scb-header-utility.js";
|
|
33
|
+
import { ScbHeader as ir } from "./scb-header/scb-header.js";
|
|
34
|
+
import { ScbHorizontalScroller as dr } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
35
|
+
import { ScbIconButton as Cr } from "./scb-icon-button/scb-icon-button.js";
|
|
36
|
+
import { ScbKeyFigureCard as sr } from "./scb-keyfigure-card/scb-keyfigure-card.js";
|
|
37
|
+
import { ScbLink as Br } from "./scb-link/scb-link.js";
|
|
38
|
+
import { ScbListItem as Dr } from "./scb-list/scb-list-item.js";
|
|
39
|
+
import { ScbList as Tr } from "./scb-list/scb-list.js";
|
|
40
|
+
import { ScbMenuItem as Fr } from "./scb-menu/scb-menu-item.js";
|
|
41
|
+
import { ScbMenu as Pr } from "./scb-menu/scb-menu.js";
|
|
42
|
+
import { ScbSubMenu as Gr } from "./scb-menu/scb-sub-menu.js";
|
|
43
|
+
import { ScbNotificationCard as Ar } from "./scb-notification-card/scb-notification-card.js";
|
|
44
|
+
import { ScbPagination as Mr } from "./scb-pagination/scb-pagination.js";
|
|
45
|
+
import { ScbProgressIndicator as zr } from "./scb-progress-indicator/scb-progress-indicator.js";
|
|
46
|
+
import { ScbProgressStep as Kr } from "./scb-progress-stepper/scb-progress-step.js";
|
|
47
|
+
import { ScbProgressStepper as Or } from "./scb-progress-stepper/scb-progress-stepper.js";
|
|
48
|
+
import { ScbRadioButton as Vr } from "./scb-radio-button/scb-radio-button.js";
|
|
49
|
+
import { ScbRadioGroup as qr } from "./scb-radio-button/scb-radio-group.js";
|
|
50
|
+
import { ScbSearch as Jr } from "./scb-search/scb-search.js";
|
|
51
|
+
import { ScbSegmentedButton as Wr } from "./scb-segmented-button/scb-segmented-button.js";
|
|
52
|
+
import { ScbSegmentedItem as Yr } from "./scb-segmented-button/scb-segmented-item.js";
|
|
53
|
+
import { ScbSelectOption as _r } from "./scb-select/scb-select-option.js";
|
|
54
|
+
import { ScbSelect as ro } from "./scb-select/scb-select.js";
|
|
55
|
+
import { ScbSkeleton as eo } from "./scb-skeleton/scb-skeleton.js";
|
|
56
|
+
import { ScbSnackbar as co } from "./scb-snackbar/scb-snackbar.js";
|
|
57
|
+
import { ScbStatusPill as po } from "./scb-status-pill/scb-status-pill.js";
|
|
58
|
+
import { ScbStep as bo } from "./scb-stepper/scb-step.js";
|
|
59
|
+
import { ScbStepper as fo } from "./scb-stepper/scb-stepper.js";
|
|
60
|
+
import { ScbSwitch as io } from "./scb-switch/scb-switch.js";
|
|
61
|
+
import { ScbPrimaryTab as uo } from "./scb-tabs/scb-primary-tab.js";
|
|
62
|
+
import { ScbSecondaryTab as lo } from "./scb-tabs/scb-secondary-tab.js";
|
|
63
|
+
import { ScbTabs as Io } from "./scb-tabs/scb-tabs.js";
|
|
64
|
+
import { ScbTextField as go } from "./scb-textfield/scb-textfield.js";
|
|
65
|
+
import { ScbTocItem as ko } from "./scb-toc/scb-toc-item.js";
|
|
66
|
+
import { ScbToc as wo } from "./scb-toc/scb-toc.js";
|
|
67
|
+
import { ScbTooltip as Ho } from "./scb-tooltip/scb-tooltip.js";
|
|
68
|
+
import { ScbViz as ho } from "./scb-viz/scb-viz.js";
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
d as SCBBreadcrumb,
|
|
70
71
|
i as SCBBreadcrumbItem,
|
|
71
72
|
c as ScbAccordion,
|
|
72
73
|
e as ScbAccordionItem,
|
|
73
74
|
p as ScbAppBar,
|
|
74
75
|
b as ScbAvatar,
|
|
75
76
|
f as ScbBadge,
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
C as ScbButton,
|
|
78
|
+
s as ScbCalendarCard,
|
|
78
79
|
B as ScbCard,
|
|
79
|
-
|
|
80
|
+
T as ScbCheckbox,
|
|
80
81
|
D as ScbCheckboxGroup,
|
|
81
82
|
F as ScbChip,
|
|
82
|
-
P as
|
|
83
|
-
G as
|
|
84
|
-
A as
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
z as
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cr as
|
|
97
|
-
pr as
|
|
98
|
-
br as
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Ar as
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
zr as
|
|
112
|
-
Kr as
|
|
113
|
-
Or as
|
|
114
|
-
Vr as
|
|
115
|
-
qr as
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Wr as
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
eo as
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
po as
|
|
126
|
-
bo as
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
Ho as
|
|
83
|
+
P as ScbCookiesConsent,
|
|
84
|
+
G as ScbDatepicker,
|
|
85
|
+
A as ScbDialog,
|
|
86
|
+
M as ScbDivider,
|
|
87
|
+
O as ScbDrawer,
|
|
88
|
+
z as ScbDrawerItem,
|
|
89
|
+
K as ScbDrawerSection,
|
|
90
|
+
J as ScbFactCard,
|
|
91
|
+
q as ScbFactCardContent,
|
|
92
|
+
Y as ScbFooter,
|
|
93
|
+
W as ScbFooterSection,
|
|
94
|
+
rr as ScbGrid,
|
|
95
|
+
_ as ScbGridItem,
|
|
96
|
+
ir as ScbHeader,
|
|
97
|
+
cr as ScbHeaderDrawerGroup,
|
|
98
|
+
pr as ScbHeaderDrawerItem,
|
|
99
|
+
br as ScbHeaderTab,
|
|
100
|
+
fr as ScbHeaderUtility,
|
|
101
|
+
dr as ScbHorizontalScroller,
|
|
102
|
+
Cr as ScbIconButton,
|
|
103
|
+
sr as ScbKeyFigureCard,
|
|
104
|
+
Br as ScbLink,
|
|
105
|
+
Tr as ScbList,
|
|
106
|
+
Dr as ScbListItem,
|
|
107
|
+
Pr as ScbMenu,
|
|
108
|
+
Fr as ScbMenuItem,
|
|
109
|
+
Ar as ScbNotificationCard,
|
|
110
|
+
Mr as ScbPagination,
|
|
111
|
+
uo as ScbPrimaryTab,
|
|
112
|
+
zr as ScbProgressIndicator,
|
|
113
|
+
Kr as ScbProgressStep,
|
|
114
|
+
Or as ScbProgressStepper,
|
|
115
|
+
Vr as ScbRadioButton,
|
|
116
|
+
qr as ScbRadioGroup,
|
|
117
|
+
Jr as ScbSearch,
|
|
118
|
+
lo as ScbSecondaryTab,
|
|
119
|
+
Wr as ScbSegmentedButton,
|
|
120
|
+
Yr as ScbSegmentedItem,
|
|
121
|
+
ro as ScbSelect,
|
|
122
|
+
_r as ScbSelectOption,
|
|
123
|
+
eo as ScbSkeleton,
|
|
124
|
+
co as ScbSnackbar,
|
|
125
|
+
er as ScbStack,
|
|
126
|
+
po as ScbStatusPill,
|
|
127
|
+
bo as ScbStep,
|
|
128
|
+
fo as ScbStepper,
|
|
129
|
+
V as ScbSubDrawer,
|
|
130
|
+
Gr as ScbSubMenu,
|
|
131
|
+
io as ScbSwitch,
|
|
132
|
+
Io as ScbTabs,
|
|
133
|
+
go as ScbTextField,
|
|
134
|
+
wo as ScbToc,
|
|
135
|
+
ko as ScbTocItem,
|
|
136
|
+
Ho as ScbTooltip,
|
|
137
|
+
ho as ScbViz
|
|
136
138
|
};
|
package/mvc/components/all.js
CHANGED
|
@@ -11,6 +11,7 @@ import './scb-card/scb-card.js';
|
|
|
11
11
|
import './scb-checkbox/scb-checkbox.js';
|
|
12
12
|
import './scb-checkbox/scb-checkbox-group.js';
|
|
13
13
|
import './scb-chip/scb-chip.js';
|
|
14
|
+
import './scb-cookies-consent/scb-cookies-consent.js';
|
|
14
15
|
import './scb-datepicker/scb-datepicker.js';
|
|
15
16
|
import './scb-dialog/scb-dialog.js';
|
|
16
17
|
import './scb-divider/scb-divider.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{a as p,n as c,i as d,x as f,t as u}from"../../vendor/vendor.js";import"../scb-button/scb-button.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 e=customElements.define.bind(customElements);customElements.define=function(o,s,i){try{customElements.get(o)||e(o,s,i)}catch(a){var r=String(a||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var x=Object.defineProperty,h=Object.getOwnPropertyDescriptor,l=(t,e,o,s)=>{for(var i=s>1?void 0:s?h(e,o):e,r=t.length-1,a;r>=0;r--)(a=t[r])&&(i=(s?a(e,o,i):a(i))||i);return s&&i&&x(e,o,i),i};let n=class extends d{constructor(){super(...arguments),this.open=!0,this.title="",this.supportingText="",this.ariaLabel="Cookie-inställningar"}firstUpdated(){this.addEventListener("click",t=>{const e=t.target;e.slot==="buttons"&&(e.id==="accept-btn"?this.closeAndRemove("cookies-accept"):e.id==="decline-btn"?this.closeAndRemove("cookies-decline"):e.id==="handle-btn"&&this.closeAndRemove("cookies-handle"))})}connectedCallback(){super.connectedCallback(),this.id||(this.id="cookie-consent")}closeAndRemove(t){this.dispatchEvent(new CustomEvent(t)),this.remove()}render(){return this.open?f`
|
|
2
|
+
<div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
|
|
3
|
+
<h2>${this.title}</h2>
|
|
4
|
+
<div>
|
|
5
|
+
${this.supportingText}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="button-container">
|
|
8
|
+
<slot name="buttons"></slot>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
`:null}};n.styles=p`
|
|
12
|
+
:host {
|
|
13
|
+
position: fixed;
|
|
14
|
+
width: 650px;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
bottom: 32px;
|
|
18
|
+
left: 32px;
|
|
19
|
+
background: #fff;
|
|
20
|
+
color: #222;
|
|
21
|
+
box-shadow: 0 8px 10px -6px #0000001a, 0 20px 25px -5px #0000001a;
|
|
22
|
+
color: var(--md-sys-color-on-surface, #0f0865);
|
|
23
|
+
background: var(--md-sys-color-surface, #fff);
|
|
24
|
+
border-radius: 16px;
|
|
25
|
+
padding: 36px 0;
|
|
26
|
+
z-index: 1000;
|
|
27
|
+
gap: 16px;
|
|
28
|
+
font-family: 'Inter', sans-serif;
|
|
29
|
+
}
|
|
30
|
+
.cookies-consent {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: 16px;
|
|
34
|
+
padding: 0 20px;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
margin: 0 auto;
|
|
37
|
+
max-width: 1440px;
|
|
38
|
+
position: relative;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
.cookies-consent h2 {
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
line-height: 24px;
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
.button-container {
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: 8px;
|
|
49
|
+
justify-content: flex-start;
|
|
50
|
+
}
|
|
51
|
+
`;l([c({type:Boolean})],n.prototype,"open",2);l([c({type:String,reflect:!0})],n.prototype,"title",2);l([c({type:String,attribute:"supporting-text",reflect:!0})],n.prototype,"supportingText",2);l([c({type:String,attribute:"aria-label",reflect:!0})],n.prototype,"ariaLabel",2);n=l([u("scb-cookies-consent")],n);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.113",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -123,6 +123,10 @@
|
|
|
123
123
|
"import": "./scb-chip/scb-chip.js",
|
|
124
124
|
"require": "./scb-chip/scb-chip.js"
|
|
125
125
|
},
|
|
126
|
+
"./scb-cookies-consent": {
|
|
127
|
+
"import": "./scb-cookies-consent/scb-cookies-consent.js",
|
|
128
|
+
"require": "./scb-cookies-consent/scb-cookies-consent.js"
|
|
129
|
+
},
|
|
126
130
|
"./scb-datepicker": {
|
|
127
131
|
"import": "./scb-datepicker/scb-datepicker.js",
|
|
128
132
|
"require": "./scb-datepicker/scb-datepicker.js"
|
|
@@ -341,5 +345,5 @@
|
|
|
341
345
|
},
|
|
342
346
|
"./mvc/*": "./mvc/*"
|
|
343
347
|
},
|
|
344
|
-
"buildHash": "
|
|
348
|
+
"buildHash": "9912A6A6B43D81145F5851FC78928B16730D533E7289472D02B0A64231F56FF0"
|
|
345
349
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ScbCookiesConsent extends LitElement {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
supportingText: string;
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
static styles: import('lit').CSSResult;
|
|
8
|
+
firstUpdated(): void;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
closeAndRemove(eventName: string): void;
|
|
11
|
+
render(): import('lit-html').TemplateResult<1> | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { css as c, LitElement as d, html as f } from "lit";
|
|
2
|
+
import { property as r, customElement as x } from "lit/decorators.js";
|
|
3
|
+
import "../scb-button/scb-button.js";
|
|
4
|
+
var u = Object.defineProperty, h = Object.getOwnPropertyDescriptor, s = (i, e, a, n) => {
|
|
5
|
+
for (var t = n > 1 ? void 0 : n ? h(e, a) : e, l = i.length - 1, p; l >= 0; l--)
|
|
6
|
+
(p = i[l]) && (t = (n ? p(e, a, t) : p(t)) || t);
|
|
7
|
+
return n && t && u(e, a, t), t;
|
|
8
|
+
};
|
|
9
|
+
let o = class extends d {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.open = !0, this.title = "", this.supportingText = "", this.ariaLabel = "Cookie-inställningar";
|
|
12
|
+
}
|
|
13
|
+
firstUpdated() {
|
|
14
|
+
this.addEventListener("click", (i) => {
|
|
15
|
+
const e = i.target;
|
|
16
|
+
e.slot === "buttons" && (e.id === "accept-btn" ? this.closeAndRemove("cookies-accept") : e.id === "decline-btn" ? this.closeAndRemove("cookies-decline") : e.id === "handle-btn" && this.closeAndRemove("cookies-handle"));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback(), this.id || (this.id = "cookie-consent");
|
|
21
|
+
}
|
|
22
|
+
closeAndRemove(i) {
|
|
23
|
+
this.dispatchEvent(new CustomEvent(i)), this.remove();
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return this.open ? f`
|
|
27
|
+
<div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
|
|
28
|
+
<h2>${this.title}</h2>
|
|
29
|
+
<div>
|
|
30
|
+
${this.supportingText}
|
|
31
|
+
</div>
|
|
32
|
+
<div class="button-container">
|
|
33
|
+
<slot name="buttons"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
` : null;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
o.styles = c`
|
|
40
|
+
:host {
|
|
41
|
+
position: fixed;
|
|
42
|
+
width: 650px;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
bottom: 32px;
|
|
46
|
+
left: 32px;
|
|
47
|
+
background: #fff;
|
|
48
|
+
color: #222;
|
|
49
|
+
box-shadow: 0 8px 10px -6px #0000001a, 0 20px 25px -5px #0000001a;
|
|
50
|
+
color: var(--md-sys-color-on-surface, #0f0865);
|
|
51
|
+
background: var(--md-sys-color-surface, #fff);
|
|
52
|
+
border-radius: 16px;
|
|
53
|
+
padding: 36px 0;
|
|
54
|
+
z-index: 1000;
|
|
55
|
+
gap: 16px;
|
|
56
|
+
font-family: 'Inter', sans-serif;
|
|
57
|
+
}
|
|
58
|
+
.cookies-consent {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 16px;
|
|
62
|
+
padding: 0 20px;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
margin: 0 auto;
|
|
65
|
+
max-width: 1440px;
|
|
66
|
+
position: relative;
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
69
|
+
.cookies-consent h2 {
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
line-height: 24px;
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
.button-container {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: 8px;
|
|
77
|
+
justify-content: flex-start;
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
s([
|
|
81
|
+
r({ type: Boolean })
|
|
82
|
+
], o.prototype, "open", 2);
|
|
83
|
+
s([
|
|
84
|
+
r({ type: String, reflect: !0 })
|
|
85
|
+
], o.prototype, "title", 2);
|
|
86
|
+
s([
|
|
87
|
+
r({ type: String, attribute: "supporting-text", reflect: !0 })
|
|
88
|
+
], o.prototype, "supportingText", 2);
|
|
89
|
+
s([
|
|
90
|
+
r({ type: String, attribute: "aria-label", reflect: !0 })
|
|
91
|
+
], o.prototype, "ariaLabel", 2);
|
|
92
|
+
o = s([
|
|
93
|
+
x("scb-cookies-consent")
|
|
94
|
+
], o);
|
|
95
|
+
export {
|
|
96
|
+
o as ScbCookiesConsent
|
|
97
|
+
};
|