@justeattakeaway/pie-cookie-banner 0.26.4 → 0.26.5

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { unsafeCSS as B, LitElement as $, html as s, nothing as b } from "lit";
2
- import { state as m, property as f, queryAll as A } from "lit/decorators.js";
1
+ import { LitElement as $, html as s, nothing as m, unsafeCSS as A } from "lit";
2
+ import { state as y, property as f, queryAll as T } from "lit/decorators.js";
3
3
  import { repeat as C } from "lit/directives/repeat.js";
4
4
  import "@justeattakeaway/pie-button";
5
5
  import "@justeattakeaway/pie-divider";
@@ -7,9 +7,8 @@ import "@justeattakeaway/pie-icon-button";
7
7
  import "@justeattakeaway/pie-link";
8
8
  import "@justeattakeaway/pie-modal";
9
9
  import "@justeattakeaway/pie-switch";
10
- import { defineCustomElement as T, dispatchCustomEvent as g } from "@justeattakeaway/pie-webc-core";
11
- const O = `*,*: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}
12
- `, S = {
10
+ import { dispatchCustomEvent as g, defineCustomElement as O } from "@justeattakeaway/pie-webc-core";
11
+ const S = "*,*: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}", M = {
13
12
  title: "Cookies",
14
13
  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. Click <linkNecessaryOnly>Necessary only</linkNecessaryOnly> to continue without accepting more. Click <linkManagePreferences>Manage preferences</linkManagePreferences> to share your preferences or <linkAcceptAll>Accept all</linkAcceptAll>.",
15
14
  cta: {
@@ -17,7 +16,7 @@ const O = `*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb
17
16
  necessaryOnly: "Necessary only",
18
17
  acceptAll: "Accept all"
19
18
  }
20
- }, P = {
19
+ }, N = {
21
20
  title: "Manage your preferences",
22
21
  description: "You can find all the information in the <linkCookieStatement>Cookie Statement</linkCookieStatement> and <linkCookieTechList>Cookie technology list</linkCookieTechList>.",
23
22
  all: {
@@ -45,10 +44,10 @@ const O = `*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb
45
44
  ariaLabel: ""
46
45
  }
47
46
  }
48
- }, M = {
49
- banner: S,
50
- preferencesManagement: P
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 = [
47
+ }, P = {
48
+ banner: M,
49
+ preferencesManagement: N
50
+ }, z = "pie-cookie-banner-accept-all", E = "pie-cookie-banner-necessary-only", L = "pie-cookie-banner-manage-prefs", R = "pie-cookie-banner-prefs-saved", H = [
52
51
  {
53
52
  id: "all",
54
53
  hasDivider: !0,
@@ -75,66 +74,56 @@ const O = `*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb
75
74
  ], h = {
76
75
  hasPrimaryActionsOnly: !1,
77
76
  defaultPreferences: {},
78
- locale: M,
77
+ locale: P,
79
78
  cookieStatementLink: "",
80
79
  cookieTechnologiesLink: ""
81
80
  };
82
- function y(a) {
83
- console.error(`[localisation-utils]: ${a}`);
81
+ function v(i) {
82
+ console.error(`[localisation-utils]: ${i}`);
84
83
  }
85
- function j(a, e) {
86
- const n = (t) => String.prototype.split.call(e, t).filter(Boolean).reduce((o, r) => o != null && typeof o == "object" ? o[r] : o, a), i = n(/[,[\]]+?/) || n(/[,[\].]+?/);
87
- return typeof i != "string" ? "" : i;
84
+ function j(i, e) {
85
+ const n = (t) => String.prototype.split.call(e, t).filter(Boolean).reduce((a, r) => a != null && typeof a == "object" ? a[r] : a, i), o = n(/[,[\]]+?/) || n(/[,[\].]+?/);
86
+ return typeof o != "string" ? "" : o;
88
87
  }
89
- function v(a, e) {
90
- if (!a)
91
- throw new Error('"locale" parameter cannot be empty');
92
- if (!e)
93
- throw new Error('"key" parameter cannot be empty');
94
- const n = j(a, e);
95
- return n || (y(`Couldn't find a value for the key "${e}", it will be used as fallback.`), e);
88
+ function _(i, e) {
89
+ if (!i) throw new Error('"locale" parameter cannot be empty');
90
+ if (!e) throw new Error('"key" parameter cannot be empty');
91
+ const n = j(i, e);
92
+ return n || (v(`Couldn't find a value for the key "${e}", it will be used as fallback.`), e);
96
93
  }
97
- function H(a) {
98
- const n = a.map((t) => `(<${t}.*>.*</${t}>)`).join("|");
94
+ function K(i) {
95
+ const n = i.map((t) => `(<${t}.*>.*</${t}>)`).join("|");
99
96
  return new RegExp(n, "igm");
100
97
  }
101
- function D(a, e) {
98
+ function D(i, e) {
102
99
  const n = Object.keys(e);
103
- if (n.length === 0)
104
- return [a];
105
- const i = H(n);
106
- return a.split(i).filter((t) => !!t).map((t) => {
107
- if (!t.match(i))
108
- return t;
100
+ if (n.length === 0) return [i];
101
+ const o = K(n);
102
+ return i.split(o).filter((t) => !!t).map((t) => {
103
+ if (!t.match(o)) return t;
109
104
  const r = t.match(/<(.*)>(.*)<\/.*>/);
110
- if (!r)
111
- return t;
105
+ if (!r) return t;
112
106
  const [, p, l] = r;
113
107
  return [p, l];
114
108
  }).map((t) => {
115
- if (!Array.isArray(t))
116
- return t;
109
+ if (!Array.isArray(t)) return t;
117
110
  const [r, p] = t, l = e[r];
118
- return l || typeof l == "function" ? l(p) : (y(`Custom tag "${r}" does not have a matching enhancer function`), p);
111
+ return l || typeof l == "function" ? l(p) : (v(`Custom tag "${r}" does not have a matching enhancer function`), p);
119
112
  });
120
113
  }
121
- function K(a, e, n) {
122
- if (!a)
123
- throw new Error('"locale" parameter cannot be empty');
124
- if (!e)
125
- throw new Error('"key" parameter cannot be empty');
126
- if (!n)
127
- throw new Error('"customTagEnhancers" parameter cannot be empty');
128
- const i = v(a, e);
129
- return D(i, n);
114
+ function F(i, e, n) {
115
+ if (!i) throw new Error('"locale" parameter cannot be empty');
116
+ if (!e) throw new Error('"key" parameter cannot be empty');
117
+ if (!n) throw new Error('"customTagEnhancers" parameter cannot be empty');
118
+ const o = _(i, e);
119
+ return D(o, n);
130
120
  }
131
- var F = Object.defineProperty, V = Object.getOwnPropertyDescriptor, d = (a, e, n, i) => {
132
- for (var t = i > 1 ? void 0 : i ? V(e, n) : e, o = a.length - 1, r; o >= 0; o--)
133
- (r = a[o]) && (t = (i ? r(e, n, t) : r(t)) || t);
134
- return i && t && F(e, n, t), t;
121
+ var V = Object.defineProperty, d = (i, e, n, o) => {
122
+ for (var t = void 0, a = i.length - 1, r; a >= 0; a--)
123
+ (r = i[a]) && (t = r(e, n, t) || t);
124
+ return t && V(e, n, t), t;
135
125
  };
136
- const I = "pie-cookie-banner";
137
- class c extends $ {
126
+ const I = "pie-cookie-banner", k = class k extends $ {
138
127
  constructor() {
139
128
  super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this.hasPrimaryActionsOnly = h.hasPrimaryActionsOnly, this.defaultPreferences = h.defaultPreferences, this.locale = h.locale, this.cookieStatementLink = h.cookieStatementLink, this.cookieTechnologiesLink = h.cookieTechnologiesLink, this._customTagEnhancers = {
140
129
  linkStatement: (e) => s`<pie-link href="${this.cookieStatementLink}" variant="inverse" target="_blank" data-test-id="cookie-statement-link">${e}</pie-link>`,
@@ -144,27 +133,27 @@ class c extends $ {
144
133
  linkCookieStatement: (e) => s`<pie-link href="${this.cookieStatementLink}" size="small" target="_blank" data-test-id="cookie-statement-link">${e}</pie-link>`,
145
134
  linkCookieTechList: (e) => s`<pie-link href="${this.cookieTechnologiesLink}" size="small" target="_blank" data-test-id="cookie-technology-link">${e}</pie-link>`
146
135
  }, this._onNecessaryOnly = () => {
147
- g(this, z), this._isCookieBannerHidden = !0;
136
+ g(this, E), this._isCookieBannerHidden = !0;
148
137
  }, this._onAcceptAll = () => {
149
- g(this, N), this._isCookieBannerHidden = !0;
138
+ g(this, z), this._isCookieBannerHidden = !0;
150
139
  }, this._openManagePreferencesModal = () => {
151
- this._isCookieBannerHidden = !0, g(this, E), this._isModalOpen = !0;
140
+ this._isCookieBannerHidden = !0, g(this, L), this._isModalOpen = !0;
152
141
  }, this._handleSwitchStates = (e) => {
153
- const { id: n } = e == null ? void 0 : e.currentTarget, i = [...this._preferencesNodes].find(({ id: t }) => t === "all");
154
- if (n === i.id) {
142
+ const { id: n } = e == null ? void 0 : e.currentTarget, o = [...this._preferencesNodes].find(({ id: t }) => t === "all");
143
+ if (n === o.id) {
155
144
  const { checked: t } = e.target;
156
- this._preferencesNodes.forEach((o) => {
157
- o.checked = o.disabled ? o.checked : t;
145
+ this._preferencesNodes.forEach((a) => {
146
+ a.checked = a.disabled ? a.checked : t;
158
147
  });
159
148
  } else
160
- i.checked = [...this._preferencesNodes].filter(({ id: t }) => t !== "all").every(({ checked: t }) => t);
149
+ o.checked = [...this._preferencesNodes].filter(({ id: t }) => t !== "all").every(({ checked: t }) => t);
161
150
  };
162
151
  }
163
152
  _localiseText(e) {
164
- return v(this.locale, e);
153
+ return _(this.locale, e);
165
154
  }
166
155
  _localiseRichText(e) {
167
- return K(this.locale, e, this._customTagEnhancers);
156
+ return F(this.locale, e, this._customTagEnhancers);
168
157
  }
169
158
  /**
170
159
  * Handles closing the modal and re-displaying the cookie banner
@@ -184,9 +173,9 @@ class c extends $ {
184
173
  */
185
174
  _handlePreferencesSaved() {
186
175
  let e = {};
187
- [...this._preferencesNodes].filter(({ id: n }) => n !== "all").forEach(({ id: n, checked: i }) => {
188
- e = { ...e, [n]: i };
189
- }), g(this, L, e), this._isModalOpen = !1, this._isCookieBannerHidden = !0;
176
+ [...this._preferencesNodes].filter(({ id: n }) => n !== "all").forEach(({ id: n, checked: o }) => {
177
+ e = { ...e, [n]: o };
178
+ }), g(this, R, e), this._isModalOpen = !1, this._isCookieBannerHidden = !0;
190
179
  }
191
180
  /**
192
181
  * Renders the content of the preference item.
@@ -195,29 +184,29 @@ class c extends $ {
195
184
  renderPreference({
196
185
  id: e,
197
186
  checked: n,
198
- disabled: i,
187
+ disabled: o,
199
188
  hasDivider: t,
200
- hasDescription: o
189
+ hasDescription: a
201
190
  }) {
202
- var k;
203
- const r = this._localiseText(`preferencesManagement.${e}.title`), p = `preferencesManagement.${e}.description`, l = o && this._localiseText(p), x = ["functional", "personalized", "analytical"].every((w) => {
204
- var u;
205
- return ((u = this.defaultPreferences) == null ? void 0 : u[w]) === !0;
191
+ var u;
192
+ const r = this._localiseText(`preferencesManagement.${e}.title`), p = `preferencesManagement.${e}.description`, l = a && this._localiseText(p), w = ["functional", "personalized", "analytical"].every((B) => {
193
+ var b;
194
+ return ((b = this.defaultPreferences) == null ? void 0 : b[B]) === !0;
206
195
  });
207
196
  return s`
208
197
  <div class="c-cookieBanner-preference">
209
198
  <div>
210
199
  <h3 class="c-cookieBanner-subheading">${r}</h3>
211
- ${l ? s`<p class="c-cookieBanner-description">${l}</p>` : b}
200
+ ${l ? s`<p class="c-cookieBanner-description">${l}</p>` : m}
212
201
  </div>
213
202
  <pie-switch
214
203
  id="${e}"
215
- ?checked="${((k = this.defaultPreferences) == null ? void 0 : k[e]) || x || n}"
216
- ?disabled="${i}"
204
+ ?checked="${((u = this.defaultPreferences) == null ? void 0 : u[e]) || w || n}"
205
+ ?disabled="${o}"
217
206
  @change="${this._handleSwitchStates}">
218
207
  </pie-switch>
219
208
  </div>
220
- ${t ? s`<pie-divider></pie-divider>` : b}`;
209
+ ${t ? s`<pie-divider></pie-divider>` : m}`;
221
210
  }
222
211
  /**
223
212
  * Renders the modal content.
@@ -229,7 +218,7 @@ class c extends $ {
229
218
  ${this._localiseRichText("preferencesManagement.description")}
230
219
  </p>
231
220
  ${C(
232
- R,
221
+ H,
233
222
  ({ id: e }) => e,
234
223
  (e) => this.renderPreference(e)
235
224
  )}`;
@@ -285,39 +274,40 @@ class c extends $ {
285
274
  </div>
286
275
  </aside>`;
287
276
  }
288
- }
289
- c.styles = B(O);
277
+ };
278
+ k.styles = A(S);
279
+ let c = k;
290
280
  d([
291
- m()
292
- ], c.prototype, "_isCookieBannerHidden", 2);
281
+ y()
282
+ ], c.prototype, "_isCookieBannerHidden");
293
283
  d([
294
- m()
295
- ], c.prototype, "_isModalOpen", 2);
284
+ y()
285
+ ], c.prototype, "_isModalOpen");
296
286
  d([
297
287
  f({ type: Boolean })
298
- ], c.prototype, "hasPrimaryActionsOnly", 2);
288
+ ], c.prototype, "hasPrimaryActionsOnly");
299
289
  d([
300
290
  f({ type: Object })
301
- ], c.prototype, "defaultPreferences", 2);
291
+ ], c.prototype, "defaultPreferences");
302
292
  d([
303
293
  f({ type: Object })
304
- ], c.prototype, "locale", 2);
294
+ ], c.prototype, "locale");
305
295
  d([
306
296
  f({ type: String })
307
- ], c.prototype, "cookieStatementLink", 2);
297
+ ], c.prototype, "cookieStatementLink");
308
298
  d([
309
299
  f({ type: String })
310
- ], c.prototype, "cookieTechnologiesLink", 2);
300
+ ], c.prototype, "cookieTechnologiesLink");
311
301
  d([
312
- A("pie-switch")
313
- ], c.prototype, "_preferencesNodes", 2);
314
- T(I, c);
302
+ T("pie-switch")
303
+ ], c.prototype, "_preferencesNodes");
304
+ O(I, c);
315
305
  export {
316
- N as ON_COOKIE_BANNER_ACCEPT_ALL,
317
- E as ON_COOKIE_BANNER_MANAGE_PREFS,
318
- z as ON_COOKIE_BANNER_NECESSARY_ONLY,
319
- L as ON_COOKIE_BANNER_PREFS_SAVED,
306
+ z as ON_COOKIE_BANNER_ACCEPT_ALL,
307
+ L as ON_COOKIE_BANNER_MANAGE_PREFS,
308
+ E as ON_COOKIE_BANNER_NECESSARY_ONLY,
309
+ R as ON_COOKIE_BANNER_PREFS_SAVED,
320
310
  c as PieCookieBanner,
321
311
  h as defaultProps,
322
- R as preferences
312
+ H as preferences
323
313
  };
package/dist/react.js CHANGED
@@ -1,18 +1,8 @@
1
1
  import * as e from "react";
2
2
  import { createComponent as o } from "@lit/react";
3
3
  import { PieCookieBanner as n } from "./index.js";
4
- import { ON_COOKIE_BANNER_ACCEPT_ALL as A, ON_COOKIE_BANNER_MANAGE_PREFS as f, ON_COOKIE_BANNER_NECESSARY_ONLY as l, ON_COOKIE_BANNER_PREFS_SAVED as R, defaultProps as S, preferences as b } from "./index.js";
5
- import "lit";
6
- import "lit/decorators.js";
7
- import "lit/directives/repeat.js";
8
- import "@justeattakeaway/pie-button";
9
- import "@justeattakeaway/pie-divider";
10
- import "@justeattakeaway/pie-icon-button";
11
- import "@justeattakeaway/pie-link";
12
- import "@justeattakeaway/pie-modal";
13
- import "@justeattakeaway/pie-switch";
14
- import "@justeattakeaway/pie-webc-core";
15
- const r = o({
4
+ import { ON_COOKIE_BANNER_ACCEPT_ALL as t, ON_COOKIE_BANNER_MANAGE_PREFS as C, ON_COOKIE_BANNER_NECESSARY_ONLY as N, ON_COOKIE_BANNER_PREFS_SAVED as _, defaultProps as E, preferences as P } from "./index.js";
5
+ const a = o({
16
6
  displayName: "PieCookieBanner",
17
7
  elementClass: n,
18
8
  react: e,
@@ -27,13 +17,13 @@ const r = o({
27
17
  onPieCookieBannerPrefsSaved: "pie-cookie-banner-prefs-saved"
28
18
  // when a user clicks save preferences.
29
19
  }
30
- }), k = r;
20
+ }), s = a;
31
21
  export {
32
- A as ON_COOKIE_BANNER_ACCEPT_ALL,
33
- f as ON_COOKIE_BANNER_MANAGE_PREFS,
34
- l as ON_COOKIE_BANNER_NECESSARY_ONLY,
35
- R as ON_COOKIE_BANNER_PREFS_SAVED,
36
- k as PieCookieBanner,
37
- S as defaultProps,
38
- b as preferences
22
+ t as ON_COOKIE_BANNER_ACCEPT_ALL,
23
+ C as ON_COOKIE_BANNER_MANAGE_PREFS,
24
+ N as ON_COOKIE_BANNER_NECESSARY_ONLY,
25
+ _ as ON_COOKIE_BANNER_PREFS_SAVED,
26
+ s as PieCookieBanner,
27
+ E as defaultProps,
28
+ P as preferences
39
29
  };
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.26.4",
4
+ "version": "0.26.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -37,9 +37,8 @@
37
37
  "license": "Apache-2.0",
38
38
  "devDependencies": {
39
39
  "@custom-elements-manifest/analyzer": "0.9.0",
40
- "@justeat/pie-design-tokens": "6.3.1",
41
40
  "@justeattakeaway/pie-components-config": "0.18.0",
42
- "@justeattakeaway/pie-css": "0.12.1",
41
+ "@justeattakeaway/pie-css": "0.13.0",
43
42
  "@justeattakeaway/pie-wrapper-react": "0.14.1",
44
43
  "cem-plugin-module-file-extensions": "0.0.5"
45
44
  },
@@ -48,7 +47,7 @@
48
47
  "@justeattakeaway/pie-divider": "0.14.0",
49
48
  "@justeattakeaway/pie-icon-button": "0.28.12",
50
49
  "@justeattakeaway/pie-link": "0.18.0",
51
- "@justeattakeaway/pie-modal": "0.46.2",
50
+ "@justeattakeaway/pie-modal": "0.47.0",
52
51
  "@justeattakeaway/pie-switch": "0.30.1",
53
52
  "@justeattakeaway/pie-webc-core": "0.24.0"
54
53
  },