@justeattakeaway/pie-cookie-banner 0.20.5 → 0.22.0
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/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/react.d.ts +2 -2
- package/locales/en-fr.json +40 -0
- package/locales/fr-fr.json +11 -11
- package/locales/index.js +5 -2
- package/package.json +8 -8
- package/src/cookie-banner.scss +10 -0
- package/src/defs.ts +2 -3
- /package/locales/{dk-dk.json → da-dk.json} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
4
|
import { PieSwitch } from '@justeattakeaway/pie-switch';
|
|
@@ -76,7 +76,7 @@ export declare interface CustomTagEnhancers {
|
|
|
76
76
|
[key: string]: (tagContent: string) => TemplateResult;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export declare type DefaultProps =
|
|
79
|
+
export declare type DefaultProps = ComponentDefaultProps<CookieBannerProps>;
|
|
80
80
|
|
|
81
81
|
export declare const defaultProps: DefaultProps;
|
|
82
82
|
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const O = {
|
|
|
47
47
|
}, P = {
|
|
48
48
|
banner: O,
|
|
49
49
|
preferencesManagement: S
|
|
50
|
-
}, M = `*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}
|
|
50
|
+
}, M = `*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}@media (prefers-reduced-motion: no-preference){.c-cookieBanner{animation:.5s animate-enter ease-out}@keyframes animate-enter{0%{transform:translate3d(0,75%,0)}to{transform:translateZ(0)}}}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media (min-width: 700px) and (orientation: landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}
|
|
51
51
|
`, N = "pie-cookie-banner-accept-all", z = "pie-cookie-banner-necessary-only", E = "pie-cookie-banner-manage-prefs", L = "pie-cookie-banner-prefs-saved", R = [
|
|
52
52
|
{
|
|
53
53
|
id: "all",
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
4
|
import { PieSwitch } from '@justeattakeaway/pie-switch';
|
|
@@ -77,7 +77,7 @@ export declare interface CustomTagEnhancers {
|
|
|
77
77
|
[key: string]: (tagContent: string) => TemplateResult;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export declare type DefaultProps =
|
|
80
|
+
export declare type DefaultProps = ComponentDefaultProps<CookieBannerProps>;
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Event name for when all cookies are accepted.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"banner": {
|
|
3
|
+
"title": "Cookies",
|
|
4
|
+
"description": "We use our own and third party cookies and other tech to enhance and personalise your user experience, optimize analytics, and show ads with third parties (read our <linkStatement>Statement</linkStatement>). Necessary cookies are always set. Select <linkNecessaryOnly>Continue without accepting</linkNecessaryOnly> to accept only essential trackers required for an optimal use of our platform. Click <linkManagePreferences>Manage preferences</linkManagePreferences> to share your preferences or <linkAcceptAll>Accept all</linkAcceptAll>.",
|
|
5
|
+
"cta": {
|
|
6
|
+
"managePreferences": "Manage preferences",
|
|
7
|
+
"necessaryOnly": "Continue without accepting",
|
|
8
|
+
"acceptAll": "Accept all"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"preferencesManagement": {
|
|
12
|
+
"title": "Manage your preferences",
|
|
13
|
+
"description": "You can find all the information in the <linkCookieStatement>Cookie Statement</linkCookieStatement> and <linkCookieTechList>Cookie technology list</linkCookieTechList>.",
|
|
14
|
+
"all": {
|
|
15
|
+
"title": "Turn all on"
|
|
16
|
+
},
|
|
17
|
+
"necessary": {
|
|
18
|
+
"title": "Necessary Technologies",
|
|
19
|
+
"description": "These technologies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these technologies."
|
|
20
|
+
},
|
|
21
|
+
"functional": {
|
|
22
|
+
"title": "Functional Technologies",
|
|
23
|
+
"description": "These technologies allow the website to remember the choices you make to give you better functionality and personal features."
|
|
24
|
+
},
|
|
25
|
+
"analytical": {
|
|
26
|
+
"title": "Analytical Technologies",
|
|
27
|
+
"description": "These analytical technologies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website."
|
|
28
|
+
},
|
|
29
|
+
"personalized": {
|
|
30
|
+
"title": "Personalised (targeting and advertising) Technologies",
|
|
31
|
+
"description": "These marketing technologies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on our website and our advertising partners' websites."
|
|
32
|
+
},
|
|
33
|
+
"cta": {
|
|
34
|
+
"save": {
|
|
35
|
+
"label": "Save",
|
|
36
|
+
"ariaLabel": ""
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/locales/fr-fr.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"banner": {
|
|
3
3
|
"title": "Cookies",
|
|
4
|
-
"description": "Nous utilisons nos propres cookies et ceux de tiers, ainsi que d’autres technologies, afin d’améliorer et de personnaliser votre expérience d’utilisateur, d’optimiser nos analyses et d’afficher des publicités en partenariat avec des tiers (veuillez consulter notre <linkStatement>déclaration</linkStatement>). Nous installons toujours les cookies essentiels.
|
|
4
|
+
"description": "Nous utilisons nos propres cookies et ceux de tiers, ainsi que d’autres technologies, afin d’améliorer et de personnaliser votre expérience d’utilisateur, d’optimiser nos analyses et d’afficher des publicités en partenariat avec des tiers (veuillez consulter notre <linkStatement>déclaration</linkStatement>). Nous installons toujours les cookies essentiels. Sélectionnez <linkNecessaryOnly>Continuer sans accepter</linkNecessaryOnly> pour accepter seulement les traqueurs nécessaires au fonctionnement optimal de notre plateforme. Cliquez sur <linkManagePreferences>Gérer les préférences</linkManagePreferences> pour choisir vous-même vos cookies ou sur <linkAcceptAll>Tout accepter</linkAcceptAll>.",
|
|
5
5
|
"cta": {
|
|
6
6
|
"managePreferences": "Gérer les préférences",
|
|
7
|
-
"necessaryOnly": "
|
|
7
|
+
"necessaryOnly": "Continuer sans accepter",
|
|
8
8
|
"acceptAll": "Tout accepter"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"preferencesManagement": {
|
|
12
12
|
"title": "Gérer vos préférences",
|
|
13
|
-
"description": "Vous trouverez toutes les informations dans la <linkCookieStatement>déclaration relative aux
|
|
13
|
+
"description": "Vous trouverez toutes les informations dans la <linkCookieStatement>déclaration relative aux technologies</linkCookieStatement> et dans la liste des <linkCookieTechList>technologies relatives aux technologies</linkCookieTechList>.",
|
|
14
14
|
"all": {
|
|
15
15
|
"title": "Tout activer"
|
|
16
16
|
},
|
|
17
17
|
"necessary": {
|
|
18
|
-
"title": "
|
|
19
|
-
"description": "Ces
|
|
18
|
+
"title": "Technologies nécessaires",
|
|
19
|
+
"description": "Ces technologies sont indispensables au bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent être fournis sans ces technologies."
|
|
20
20
|
},
|
|
21
21
|
"functional": {
|
|
22
|
-
"title": "
|
|
23
|
-
"description": "Ces
|
|
22
|
+
"title": "Technologies fonctionnelles",
|
|
23
|
+
"description": "Ces technologies permettent au site Web de se souvenir de vos choix pour vous offrir de meilleures fonctionnalités et une expérience personnalisée."
|
|
24
24
|
},
|
|
25
25
|
"analytical": {
|
|
26
|
-
"title": "
|
|
27
|
-
"description": "Les
|
|
26
|
+
"title": "Technologies analytiques",
|
|
27
|
+
"description": "Les technologies analytiques, incluant des technologies statistiques, sont utilisés pour comprendre comment les visiteurs interagissent avec le site Web. Ils nous permettent d’en mesurer et d’en améliorer les performances."
|
|
28
28
|
},
|
|
29
29
|
"personalized": {
|
|
30
|
-
"title": "
|
|
31
|
-
"description": "Ces
|
|
30
|
+
"title": "Technologies personnalisées (ciblage et publicité)",
|
|
31
|
+
"description": "Ces technologies marketing sont utilisés pour adapter les informations affichées à vos centres d’intérêt et pour mesurer l’efficacité de ces publicités, à la fois sur notre site Web et sur les sites Web de nos partenaires publicitaires."
|
|
32
32
|
},
|
|
33
33
|
"cta": {
|
|
34
34
|
"save": {
|
package/locales/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import bgBG from './bg-bg.json';
|
|
2
2
|
import deDE from './de-de.json';
|
|
3
|
-
import
|
|
3
|
+
import daDK from './da-dk.json';
|
|
4
4
|
import enGB from './en-gb.json';
|
|
5
|
+
import enFR from './en-fr.json';
|
|
5
6
|
import esES from './es-es.json';
|
|
6
7
|
import frFR from './fr-fr.json';
|
|
7
8
|
import heIL from './he-il.json';
|
|
@@ -14,7 +15,9 @@ import skSK from './sk-sk.json';
|
|
|
14
15
|
export default {
|
|
15
16
|
bgBG,
|
|
16
17
|
deDE,
|
|
17
|
-
|
|
18
|
+
daDK,
|
|
19
|
+
dkDK: daDK,
|
|
20
|
+
enFR,
|
|
18
21
|
enGB,
|
|
19
22
|
esES,
|
|
20
23
|
frFR,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-cookie-banner",
|
|
3
3
|
"description": "PIE Design System Cookie Banner built using Web Components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@justeattakeaway/pie-button": "0.47.
|
|
47
|
-
"@justeattakeaway/pie-divider": "0.13.
|
|
48
|
-
"@justeattakeaway/pie-icon-button": "0.28.
|
|
49
|
-
"@justeattakeaway/pie-link": "0.17.
|
|
50
|
-
"@justeattakeaway/pie-modal": "0.43.
|
|
51
|
-
"@justeattakeaway/pie-switch": "0.29.
|
|
52
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
46
|
+
"@justeattakeaway/pie-button": "0.47.8",
|
|
47
|
+
"@justeattakeaway/pie-divider": "0.13.7",
|
|
48
|
+
"@justeattakeaway/pie-icon-button": "0.28.9",
|
|
49
|
+
"@justeattakeaway/pie-link": "0.17.7",
|
|
50
|
+
"@justeattakeaway/pie-modal": "0.43.4",
|
|
51
|
+
"@justeattakeaway/pie-switch": "0.29.10",
|
|
52
|
+
"@justeattakeaway/pie-webc-core": "0.24.0"
|
|
53
53
|
},
|
|
54
54
|
"volta": {
|
|
55
55
|
"extends": "../../../package.json"
|
package/src/cookie-banner.scss
CHANGED
|
@@ -46,6 +46,16 @@ $breakpoint-wide: 700px;
|
|
|
46
46
|
&[isCookieBannerHidden] {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
51
|
+
@keyframes animate-enter {
|
|
52
|
+
0% { transform: translate3d(0, 75%, 0); }
|
|
53
|
+
|
|
54
|
+
100% { transform: translate3d(0, 0, 0); }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
animation: 0.5s animate-enter ease-out;
|
|
58
|
+
}
|
|
49
59
|
}
|
|
50
60
|
|
|
51
61
|
.c-cookieBanner-title,
|
package/src/defs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
TemplateResult,
|
|
@@ -143,5 +143,4 @@ export interface CustomTagEnhancers {
|
|
|
143
143
|
[key: string]: (tagContent: string) => TemplateResult;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export type DefaultProps =
|
|
147
|
-
|
|
146
|
+
export type DefaultProps = ComponentDefaultProps<CookieBannerProps>;
|
|
File without changes
|