@justeattakeaway/pie-cookie-banner 0.22.0 → 0.23.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.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { unsafeCSS as B, LitElement as $, html as s, nothing as b } from "lit";
2
2
  import { state as m, property as f, queryAll as A } from "lit/decorators.js";
3
- import { repeat as C } from "lit/directives/repeat.js";
3
+ import { repeat as T } from "lit/directives/repeat.js";
4
4
  import "@justeattakeaway/pie-button";
5
5
  import "@justeattakeaway/pie-divider";
6
6
  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";
10
+ import { defineCustomElement as C, dispatchCustomEvent as g } from "@justeattakeaway/pie-webc-core";
11
11
  const O = {
12
12
  title: "Cookies",
13
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>.",
@@ -228,19 +228,13 @@ class c extends $ {
228
228
  <p class="c-cookieBanner-description" data-test-id="modal-description">
229
229
  ${this._localiseRichText("preferencesManagement.description")}
230
230
  </p>
231
- ${C(
231
+ ${T(
232
232
  R,
233
233
  ({ id: e }) => e,
234
234
  (e) => this.renderPreference(e)
235
235
  )}`;
236
236
  }
237
237
  render() {
238
- const e = {
239
- text: this._localiseText("preferencesManagement.cta.save.label"),
240
- variant: "primary",
241
- ariaLabel: this._localiseText("preferencesManagement.cta.save.label")
242
- // TODO: Replace with the appropriate "ariaLabel" as soon as the spreadsheet is updated
243
- };
244
238
  return s`
245
239
  <pie-modal
246
240
  .isOpen="${this._isModalOpen}"
@@ -248,7 +242,9 @@ class c extends $ {
248
242
  hasStackedActions
249
243
  isFullWidthBelowMid
250
244
  heading="${this._localiseText("preferencesManagement.title")}"
251
- .leadingAction="${e}"
245
+ leadingActionText="${this._localiseText("preferencesManagement.cta.save.label")}"
246
+ leadingActionVariant="primary"
247
+ .aria=${{ leadingActionLabel: this._localiseText("preferencesManagement.cta.save.label") }}
252
248
  @pie-modal-leading-action-click="${this._handlePreferencesSaved}"
253
249
  @pie-modal-back="${this._displayCookieBanner}">
254
250
  ${this.renderModalContent()}
@@ -313,7 +309,7 @@ d([
313
309
  d([
314
310
  A("pie-switch")
315
311
  ], c.prototype, "_preferencesNodes", 2);
316
- T(I, c);
312
+ C(I, c);
317
313
  export {
318
314
  N as ON_COOKIE_BANNER_ACCEPT_ALL,
319
315
  E as ON_COOKIE_BANNER_MANAGE_PREFS,
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.22.0",
4
+ "version": "0.23.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -43,12 +43,12 @@
43
43
  "cem-plugin-module-file-extensions": "0.0.5"
44
44
  },
45
45
  "dependencies": {
46
- "@justeattakeaway/pie-button": "0.47.8",
46
+ "@justeattakeaway/pie-button": "0.48.0",
47
47
  "@justeattakeaway/pie-divider": "0.13.7",
48
48
  "@justeattakeaway/pie-icon-button": "0.28.9",
49
49
  "@justeattakeaway/pie-link": "0.17.7",
50
- "@justeattakeaway/pie-modal": "0.43.4",
51
- "@justeattakeaway/pie-switch": "0.29.10",
50
+ "@justeattakeaway/pie-modal": "0.44.0",
51
+ "@justeattakeaway/pie-switch": "0.29.11",
52
52
  "@justeattakeaway/pie-webc-core": "0.24.0"
53
53
  },
54
54
  "volta": {
package/src/index.ts CHANGED
@@ -229,12 +229,6 @@ export class PieCookieBanner extends LitElement implements CookieBannerProps {
229
229
  }
230
230
 
231
231
  render () {
232
- const modalActionProps = {
233
- text: this._localiseText('preferencesManagement.cta.save.label'),
234
- variant: 'primary',
235
- ariaLabel: this._localiseText('preferencesManagement.cta.save.label'), // TODO: Replace with the appropriate "ariaLabel" as soon as the spreadsheet is updated
236
- };
237
-
238
232
  return html`
239
233
  <pie-modal
240
234
  .isOpen="${this._isModalOpen}"
@@ -242,7 +236,9 @@ export class PieCookieBanner extends LitElement implements CookieBannerProps {
242
236
  hasStackedActions
243
237
  isFullWidthBelowMid
244
238
  heading="${this._localiseText('preferencesManagement.title')}"
245
- .leadingAction="${modalActionProps}"
239
+ leadingActionText="${this._localiseText('preferencesManagement.cta.save.label')}"
240
+ leadingActionVariant="primary"
241
+ .aria=${{ leadingActionLabel: this._localiseText('preferencesManagement.cta.save.label') }}
246
242
  @pie-modal-leading-action-click="${this._handlePreferencesSaved}"
247
243
  @pie-modal-back="${this._displayCookieBanner}">
248
244
  ${this.renderModalContent()}