@justeattakeaway/pie-toast 0.7.8 → 0.8.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.
@@ -434,8 +434,8 @@
434
434
  }
435
435
  ],
436
436
  "superclass": {
437
- "name": "LitElement",
438
- "package": "lit"
437
+ "name": "PieElement",
438
+ "package": "@justeattakeaway/pie-webc-core/src/internals/PieElement"
439
439
  },
440
440
  "tagName": "pie-toast",
441
441
  "customElement": true
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
2
2
  import type { CSSResult } from 'lit';
3
3
  import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
4
- import type { LitElement } from 'lit';
4
+ import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement';
5
5
  import type { PropertyValues } from 'lit';
6
6
  import type { RTLInterface } from '@justeattakeaway/pie-webc-core';
7
7
  import type { TemplateResult } from 'lit';
@@ -173,7 +173,7 @@ export declare class PieToast extends PieToast_base implements ToastProps {
173
173
  render(): TemplateResult<1>;
174
174
  }
175
175
 
176
- declare const PieToast_base: GenericConstructor<RTLInterface> & typeof LitElement;
176
+ declare const PieToast_base: GenericConstructor<RTLInterface> & typeof PieElement;
177
177
 
178
178
  export declare interface ToastProps {
179
179
  /**
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { LitElement as x, unsafeCSS as A, html as c, nothing as l } from "lit";
2
- import { property as p, query as f } from "lit/decorators.js";
3
- import { classMap as C } from "lit/directives/class-map.js";
4
- import { RtlMixin as w, dispatchCustomEvent as h, validPropertyValues as k, defineCustomElement as E } from "@justeattakeaway/pie-webc-core";
1
+ import { LitElement as A, unsafeCSS as C, html as l, nothing as u } from "lit";
2
+ import { property as d, query as g } from "lit/decorators.js";
3
+ import { classMap as _ } from "lit/directives/class-map.js";
4
+ import { RtlMixin as w, dispatchCustomEvent as h, validPropertyValues as E, defineCustomElement as k } from "@justeattakeaway/pie-webc-core";
5
5
  import "@justeattakeaway/pie-icon-button";
6
6
  import "@justeattakeaway/pie-button";
7
7
  import "@justeattakeaway/pie-icons-webc/dist/IconClose.js";
@@ -9,7 +9,20 @@ import "@justeattakeaway/pie-icons-webc/dist/IconInfoCircle.js";
9
9
  import "@justeattakeaway/pie-icons-webc/dist/IconAlertCircle.js";
10
10
  import "@justeattakeaway/pie-icons-webc/dist/IconAlertTriangle.js";
11
11
  import "@justeattakeaway/pie-icons-webc/dist/IconCheckCircle.js";
12
- const _ = "*,*:after,*:before{box-sizing:inherit}.c-toast{--toast-border-radius: var(--dt-radius-rounded-b);--toast-background-color: var(--dt-color-container-inverse);--toast-font-color: var(--dt-color-content-inverse);--toast-font-size: calc(var(--dt-font-body-s-size) * 1px);--toast-line-height: calc(var(--dt-font-body-s-line-height) * 1px);--toast-icon-fill: var(--dt-color-content-default);--toast-translate-start: -100%;--toast-translate-end: 0;display:flex;flex-direction:column;justify-content:center;min-height:48px;max-height:122px;min-width:300px;max-width:420px;padding:var(--dt-spacing-b) var(--dt-spacing-c) var(--dt-spacing-b) var(--dt-spacing-d);border-radius:var(--toast-border-radius);background-color:var(--toast-background-color);box-shadow:var(--dt-elevation-03);color:var(--toast-font-color);font-size:var(--toast-font-size);line-height:var(--toast-line-height);transition-property:all;transition-duration:var(--dt-motion-timing-100);transition-timing-function:var(--dt-motion-easing-in)}.c-toast--rtl{--toast-translate-start: 100%}.c-toast--animate-in{animation-duration:var(--dt-motion-timing-200);animation-name:animate-in;animation-timing-function:var(--dt-motion-easing-out);transform:translate(var(--toast-translate-end))}.c-toast--animate-out{animation-duration:var(--dt-motion-timing-100);animation-name:animate-out;animation-timing-function:var(--dt-motion-easing-in);transform:translate(var(--toast-translate-start));opacity:0}.c-toast--info{--toast-icon-fill: var(--dt-color-support-info-inverse)}.c-toast--info.c-toast--strong{--toast-background-color: var(--dt-color-support-info);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast--warning{--toast-icon-fill: var(--dt-color-support-warning-inverse)}.c-toast--warning.c-toast--strong{--toast-background-color: var(--dt-color-support-warning);--toast-icon-fill: var(--dt-color-content-dark);--toast-font-color: var(--dt-color-content-dark)}.c-toast--success{--toast-icon-fill: var(--dt-color-support-positive-inverse)}.c-toast--success.c-toast--strong{--toast-background-color: var(--dt-color-support-positive);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast--error{--toast-icon-fill: var(--dt-color-support-error-inverse)}.c-toast--error.c-toast--strong{--toast-background-color: var(--dt-color-support-error);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast-contentArea{display:flex;gap:var(--dt-spacing-b);justify-content:space-between}.c-toast-messageArea{display:flex;align-items:center;gap:var(--dt-spacing-b);padding:6px var(--dt-spacing-a) 6px 0;overflow:hidden}.c-toast-messageArea span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.c-toast-actionsArea{display:flex;gap:var(--dt-spacing-b);flex-shrink:0}.c-toast--multiline .c-toast-contentArea{align-items:flex-start;gap:0}.c-toast--multiline .c-toast-messageArea{align-items:flex-start;padding-block-end:var(--dt-spacing-b)}.c-toast--multiline .c-toast-messageArea span{max-height:60px;white-space:inherit;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.c-toast-footer{display:flex;justify-content:flex-end}.c-toast-icon{color:var(--toast-icon-fill)}@keyframes animate-in{0%{transform:translate(var(--toast-translate-start))}to{transform:translate(var(--toast-translate-end))}}@keyframes animate-out{0%{transform:translate(var(--toast-translate-end))}to{transform:translate(var(--toast-translate-start))}}", O = ["neutral", "info", "warning", "success", "error"], s = "pie-toast", o = "c-toast", T = `${s}-close`, L = `${s}-open`, B = `${s}-leading-action-click`, d = {
12
+ var O = Object.defineProperty, T = (v, t, n, p) => {
13
+ for (var o = void 0, s = v.length - 1, c; s >= 0; s--)
14
+ (c = v[s]) && (o = c(t, n, o) || o);
15
+ return o && O(t, n, o), o;
16
+ };
17
+ class b extends A {
18
+ constructor() {
19
+ super(...arguments), this.v = "0.8.0";
20
+ }
21
+ }
22
+ T([
23
+ d({ type: String, reflect: !0 })
24
+ ], b.prototype, "v");
25
+ const L = "*,*:after,*:before{box-sizing:inherit}.c-toast{--toast-border-radius: var(--dt-radius-rounded-b);--toast-background-color: var(--dt-color-container-inverse);--toast-font-color: var(--dt-color-content-inverse);--toast-font-size: calc(var(--dt-font-body-s-size) * 1px);--toast-line-height: calc(var(--dt-font-body-s-line-height) * 1px);--toast-icon-fill: var(--dt-color-content-default);--toast-translate-start: -100%;--toast-translate-end: 0;display:flex;flex-direction:column;justify-content:center;min-height:48px;max-height:122px;min-width:300px;max-width:420px;padding:var(--dt-spacing-b) var(--dt-spacing-c) var(--dt-spacing-b) var(--dt-spacing-d);border-radius:var(--toast-border-radius);background-color:var(--toast-background-color);box-shadow:var(--dt-elevation-03);color:var(--toast-font-color);font-size:var(--toast-font-size);line-height:var(--toast-line-height);transition-property:all;transition-duration:var(--dt-motion-timing-100);transition-timing-function:var(--dt-motion-easing-in)}.c-toast--rtl{--toast-translate-start: 100%}.c-toast--animate-in{animation-duration:var(--dt-motion-timing-200);animation-name:animate-in;animation-timing-function:var(--dt-motion-easing-out);transform:translate(var(--toast-translate-end))}.c-toast--animate-out{animation-duration:var(--dt-motion-timing-100);animation-name:animate-out;animation-timing-function:var(--dt-motion-easing-in);transform:translate(var(--toast-translate-start));opacity:0}.c-toast--info{--toast-icon-fill: var(--dt-color-support-info-inverse)}.c-toast--info.c-toast--strong{--toast-background-color: var(--dt-color-support-info);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast--warning{--toast-icon-fill: var(--dt-color-support-warning-inverse)}.c-toast--warning.c-toast--strong{--toast-background-color: var(--dt-color-support-warning);--toast-icon-fill: var(--dt-color-content-dark);--toast-font-color: var(--dt-color-content-dark)}.c-toast--success{--toast-icon-fill: var(--dt-color-support-positive-inverse)}.c-toast--success.c-toast--strong{--toast-background-color: var(--dt-color-support-positive);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast--error{--toast-icon-fill: var(--dt-color-support-error-inverse)}.c-toast--error.c-toast--strong{--toast-background-color: var(--dt-color-support-error);--toast-icon-fill: var(--dt-color-content-inverse)}.c-toast-contentArea{display:flex;gap:var(--dt-spacing-b);justify-content:space-between}.c-toast-messageArea{display:flex;align-items:center;gap:var(--dt-spacing-b);padding:6px var(--dt-spacing-a) 6px 0;overflow:hidden}.c-toast-messageArea span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.c-toast-actionsArea{display:flex;gap:var(--dt-spacing-b);flex-shrink:0}.c-toast--multiline .c-toast-contentArea{align-items:flex-start;gap:0}.c-toast--multiline .c-toast-messageArea{align-items:flex-start;padding-block-end:var(--dt-spacing-b)}.c-toast--multiline .c-toast-messageArea span{max-height:60px;white-space:inherit;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.c-toast-footer{display:flex;justify-content:flex-end}.c-toast-icon{color:var(--toast-icon-fill)}@keyframes animate-in{0%{transform:translate(var(--toast-translate-start))}to{transform:translate(var(--toast-translate-end))}}@keyframes animate-out{0%{transform:translate(var(--toast-translate-end))}to{transform:translate(var(--toast-translate-start))}}", B = ["neutral", "info", "warning", "success", "error"], i = "pie-toast", e = "c-toast", N = `${i}-close`, S = `${i}-open`, I = `${i}-leading-action-click`, m = {
13
26
  message: "",
14
27
  isOpen: !0,
15
28
  variant: "neutral",
@@ -18,14 +31,14 @@ const _ = "*,*:after,*:before{box-sizing:inherit}.c-toast{--toast-border-radius:
18
31
  isMultiline: !1,
19
32
  duration: 5e3
20
33
  };
21
- var N = Object.defineProperty, r = (g, t, a, u) => {
22
- for (var e = void 0, n = g.length - 1, m; n >= 0; n--)
23
- (m = g[n]) && (e = m(t, a, e) || e);
24
- return e && N(t, a, e), e;
34
+ var z = Object.defineProperty, r = (v, t, n, p) => {
35
+ for (var o = void 0, s = v.length - 1, c; s >= 0; s--)
36
+ (c = v[s]) && (o = c(t, n, o) || o);
37
+ return o && z(t, n, o), o;
25
38
  };
26
- const v = class v extends w(x) {
39
+ const f = class f extends w(b) {
27
40
  constructor() {
28
- super(...arguments), this.message = d.message, this.isOpen = d.isOpen, this.variant = d.variant, this.isStrong = d.isStrong, this.isDismissible = d.isDismissible, this.isMultiline = d.isMultiline, this.duration = d.duration, this._timeoutId = null, this._abortController = null;
41
+ super(...arguments), this.message = m.message, this.isOpen = m.isOpen, this.variant = m.variant, this.isStrong = m.isStrong, this.isDismissible = m.isDismissible, this.isMultiline = m.isMultiline, this.duration = m.duration, this._timeoutId = null, this._abortController = null;
29
42
  }
30
43
  /**
31
44
  * Create a timeout function and set its id into a private attribute.
@@ -56,12 +69,12 @@ const v = class v extends w(x) {
56
69
  *
57
70
  * @private
58
71
  */
59
- addListenersToElement(t, a, u, e) {
60
- t && (t.addEventListener(a, () => {
72
+ addListenersToElement(t, n, p, o) {
73
+ t && (t.addEventListener(n, () => {
61
74
  this._timeoutId && clearTimeout(this._timeoutId);
62
- }, { signal: e }), t.addEventListener(u, () => {
75
+ }, { signal: o }), t.addEventListener(p, () => {
63
76
  this.setAutoDismiss();
64
- }, { signal: e }));
77
+ }, { signal: o }));
65
78
  }
66
79
  /**
67
80
  * It creates all event listeners to handle the auto-dismiss capability
@@ -81,7 +94,7 @@ const v = class v extends w(x) {
81
94
  * It aborts all event listeners when toast is closed.
82
95
  */
83
96
  async updated(t) {
84
- t.has("isOpen") && this.isOpen && (h(this, L, { targetNotification: this }), this.duration !== null && this.createAutoDismissEventListeners()), t.has("isOpen") && !this.isOpen && this.abortAndCleanEventListeners();
97
+ t.has("isOpen") && this.isOpen && (h(this, S, { targetNotification: this }), this.duration !== null && this.createAutoDismissEventListeners()), t.has("isOpen") && !this.isOpen && this.abortAndCleanEventListeners();
85
98
  }
86
99
  /**
87
100
  * It handle the action button action.
@@ -89,7 +102,7 @@ const v = class v extends w(x) {
89
102
  * @private
90
103
  */
91
104
  handleActionClick() {
92
- h(this, B, { targetNotification: this });
105
+ h(this, I, { targetNotification: this });
93
106
  }
94
107
  /**
95
108
  * Render the action button depending on action type and its action.
@@ -100,16 +113,16 @@ const v = class v extends w(x) {
100
113
  * @private
101
114
  */
102
115
  renderActionButton(t) {
103
- const { text: a, ariaLabel: u } = t;
104
- return c`
116
+ const { text: n, ariaLabel: p } = t;
117
+ return l`
105
118
  <pie-button
106
119
  variant="${this.shouldNotUseInverseBtnVariant() ? "ghost" : "ghost-inverse"}"
107
120
  size="xsmall"
108
- aria-label="${u || l}"
121
+ aria-label="${p || u}"
109
122
  @click="${() => this.handleActionClick()}"
110
- data-test-id="${s}-leading-action"
123
+ data-test-id="${i}-leading-action"
111
124
  type="button">
112
- ${a}
125
+ ${n}
113
126
  </pie-button>
114
127
  `;
115
128
  }
@@ -122,9 +135,9 @@ const v = class v extends w(x) {
122
135
  */
123
136
  renderFooter() {
124
137
  const { leadingAction: t } = this;
125
- return c`
126
- <footer class="${o}-footer" data-test-id="${s}-footer" >
127
- ${t ? this.renderActionButton(t) : l}
138
+ return l`
139
+ <footer class="${e}-footer" data-test-id="${i}-footer" >
140
+ ${t ? this.renderActionButton(t) : u}
128
141
  </footer>
129
142
  `;
130
143
  }
@@ -135,11 +148,11 @@ const v = class v extends w(x) {
135
148
  * @private
136
149
  */
137
150
  renderCloseButton() {
138
- return c`
151
+ return l`
139
152
  <pie-icon-button
140
153
  variant="${this.shouldNotUseInverseBtnVariant() ? "ghost-secondary" : "ghost-inverse"}"
141
154
  size="xsmall"
142
- data-test-id="${s}-close"
155
+ data-test-id="${i}-close"
143
156
  @click="${this.closeToastComponent}">
144
157
  <icon-close></icon-close>
145
158
  </pie-icon-button>`;
@@ -153,8 +166,8 @@ const v = class v extends w(x) {
153
166
  * @private
154
167
  */
155
168
  renderMessage(t) {
156
- return c`
157
- <span data-test-id="${s}-message">
169
+ return l`
170
+ <span data-test-id="${i}-message">
158
171
  ${t}
159
172
  </span>
160
173
  `;
@@ -166,7 +179,7 @@ const v = class v extends w(x) {
166
179
  * @private
167
180
  */
168
181
  closeToastComponent() {
169
- this.isOpen = !1, h(this, T, { targetNotification: this }), this.abortAndCleanEventListeners();
182
+ this.isOpen = !1, h(this, N, { targetNotification: this }), this.abortAndCleanEventListeners();
170
183
  }
171
184
  /**
172
185
  * Util method that returns an icon from a variant that has default icon.
@@ -176,15 +189,15 @@ const v = class v extends w(x) {
176
189
  getVariantIcon() {
177
190
  switch (this.variant) {
178
191
  case "info":
179
- return c`<icon-info-circle class="${o}-icon" size="s" data-test-id="${s}-heading-icon-info"></icon-info-circle>`;
192
+ return l`<icon-info-circle class="${e}-icon" size="s" data-test-id="${i}-heading-icon-info"></icon-info-circle>`;
180
193
  case "success":
181
- return c`<icon-check-circle class="${o}-icon" size="s" data-test-id="${s}-heading-icon-success"></icon-check-circle>`;
194
+ return l`<icon-check-circle class="${e}-icon" size="s" data-test-id="${i}-heading-icon-success"></icon-check-circle>`;
182
195
  case "warning":
183
- return c`<icon-alert-triangle class="${o}-icon" size="s" data-test-id="${s}-heading-icon-warning"></icon-alert-triangle>`;
196
+ return l`<icon-alert-triangle class="${e}-icon" size="s" data-test-id="${i}-heading-icon-warning"></icon-alert-triangle>`;
184
197
  case "error":
185
- return c`<icon-alert-circle class="${o}-icon" size="s" data-test-id="${s}-heading-icon-error"></icon-alert-circle>`;
198
+ return l`<icon-alert-circle class="${e}-icon" size="s" data-test-id="${i}-heading-icon-error"></icon-alert-circle>`;
186
199
  default:
187
- return l;
200
+ return u;
188
201
  }
189
202
  }
190
203
  /**
@@ -208,82 +221,82 @@ const v = class v extends w(x) {
208
221
  render() {
209
222
  const {
210
223
  isOpen: t,
211
- variant: a,
212
- message: u,
213
- isDismissible: e,
214
- leadingAction: n,
215
- isMultiline: m,
216
- isStrong: b,
217
- isRTL: $
218
- } = this, y = {
219
- [o]: !0,
220
- [`${o}--rtl`]: $,
221
- [`${o}--multiline`]: m,
222
- [`${o}--${a}`]: !0,
223
- [`${o}--strong`]: b,
224
- [`${o}--animate-in`]: t,
225
- [`${o}--animate-out`]: !t
224
+ variant: n,
225
+ message: p,
226
+ isDismissible: o,
227
+ leadingAction: s,
228
+ isMultiline: c,
229
+ isStrong: $,
230
+ isRTL: y
231
+ } = this, x = {
232
+ [e]: !0,
233
+ [`${e}--rtl`]: y,
234
+ [`${e}--multiline`]: c,
235
+ [`${e}--${n}`]: !0,
236
+ [`${e}--strong`]: $,
237
+ [`${e}--animate-in`]: t,
238
+ [`${e}--animate-out`]: !t
226
239
  };
227
- return c`
240
+ return l`
228
241
  <div
229
- role="${a === "error" ? "alert" : "status"}"
230
- data-test-id="${s}"
231
- class="${C(y)}">
232
- <div class="${o}-contentArea">
233
- <div class="${o}-messageArea">
234
- ${this.variantHasIcon(a) ? this.getVariantIcon() : l}
235
- ${u === "" ? l : this.renderMessage(u)}
242
+ role="${n === "error" ? "alert" : "status"}"
243
+ data-test-id="${i}"
244
+ class="${_(x)}">
245
+ <div class="${e}-contentArea">
246
+ <div class="${e}-messageArea">
247
+ ${this.variantHasIcon(n) ? this.getVariantIcon() : u}
248
+ ${p === "" ? u : this.renderMessage(p)}
236
249
  </div>
237
- <div class="${o}-actionsArea">
238
- ${!m && (n != null && n.text) ? this.renderActionButton(n) : l}
239
- ${e ? this.renderCloseButton() : l}
250
+ <div class="${e}-actionsArea">
251
+ ${!c && (s != null && s.text) ? this.renderActionButton(s) : u}
252
+ ${o ? this.renderCloseButton() : u}
240
253
  </div>
241
254
  </div>
242
- ${m && (n != null && n.text) ? this.renderFooter() : l}
255
+ ${c && (s != null && s.text) ? this.renderFooter() : u}
243
256
  </div>`;
244
257
  }
245
258
  };
246
- v.styles = A(_);
247
- let i = v;
259
+ f.styles = C(L);
260
+ let a = f;
248
261
  r([
249
- p({ type: String })
250
- ], i.prototype, "message");
262
+ d({ type: String })
263
+ ], a.prototype, "message");
251
264
  r([
252
- p({ type: Boolean })
253
- ], i.prototype, "isOpen");
265
+ d({ type: Boolean })
266
+ ], a.prototype, "isOpen");
254
267
  r([
255
- p({ type: String }),
256
- k(s, O, d.variant)
257
- ], i.prototype, "variant");
268
+ d({ type: String }),
269
+ E(i, B, m.variant)
270
+ ], a.prototype, "variant");
258
271
  r([
259
- p({ type: Boolean })
260
- ], i.prototype, "isStrong");
272
+ d({ type: Boolean })
273
+ ], a.prototype, "isStrong");
261
274
  r([
262
- p({ type: Boolean })
263
- ], i.prototype, "isDismissible");
275
+ d({ type: Boolean })
276
+ ], a.prototype, "isDismissible");
264
277
  r([
265
- p({ type: Boolean })
266
- ], i.prototype, "isMultiline");
278
+ d({ type: Boolean })
279
+ ], a.prototype, "isMultiline");
267
280
  r([
268
- p({ type: Object })
269
- ], i.prototype, "leadingAction");
281
+ d({ type: Object })
282
+ ], a.prototype, "leadingAction");
270
283
  r([
271
- p({ type: Number })
272
- ], i.prototype, "duration");
284
+ d({ type: Number })
285
+ ], a.prototype, "duration");
273
286
  r([
274
- f("pie-button")
275
- ], i.prototype, "actionButton");
287
+ g("pie-button")
288
+ ], a.prototype, "actionButton");
276
289
  r([
277
- f("pie-icon-button")
278
- ], i.prototype, "closeButton");
279
- E(s, i);
290
+ g("pie-icon-button")
291
+ ], a.prototype, "closeButton");
292
+ k(i, a);
280
293
  export {
281
- T as ON_TOAST_CLOSE_EVENT,
282
- B as ON_TOAST_LEADING_ACTION_CLICK_EVENT,
283
- L as ON_TOAST_OPEN_EVENT,
284
- i as PieToast,
285
- o as componentClass,
286
- s as componentSelector,
287
- d as defaultProps,
288
- O as variants
294
+ N as ON_TOAST_CLOSE_EVENT,
295
+ I as ON_TOAST_LEADING_ACTION_CLICK_EVENT,
296
+ S as ON_TOAST_OPEN_EVENT,
297
+ a as PieToast,
298
+ e as componentClass,
299
+ i as componentSelector,
300
+ m as defaultProps,
301
+ B as variants
289
302
  };
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
2
2
  import type { CSSResult } from 'lit';
3
3
  import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
4
- import type { LitElement } from 'lit';
4
+ import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement';
5
5
  import type { PropertyValues } from 'lit';
6
6
  import * as React_2 from 'react';
7
7
  import type { RTLInterface } from '@justeattakeaway/pie-webc-core';
@@ -176,7 +176,7 @@ declare class PieToast_2 extends PieToast_base implements ToastProps {
176
176
  render(): TemplateResult<1>;
177
177
  }
178
178
 
179
- declare const PieToast_base: GenericConstructor<RTLInterface> & typeof LitElement;
179
+ declare const PieToast_base: GenericConstructor<RTLInterface> & typeof PieElement;
180
180
 
181
181
  declare type PieToastEvents = {
182
182
  onPieToastClose?: (event: CustomEvent) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-toast",
3
3
  "description": "PIE Design System Toast built using Web Components",
4
- "version": "0.7.8",
4
+ "version": "0.8.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
@@ -39,15 +39,16 @@
39
39
  "license": "Apache-2.0",
40
40
  "devDependencies": {
41
41
  "@custom-elements-manifest/analyzer": "0.9.0",
42
- "@justeattakeaway/pie-components-config": "0.18.0",
43
- "@justeattakeaway/pie-css": "0.15.1",
42
+ "@justeattakeaway/pie-components-config": "0.19.0",
43
+ "@justeattakeaway/pie-css": "0.16.0",
44
+ "@justeattakeaway/pie-monorepo-utils": "0.5.0",
44
45
  "cem-plugin-module-file-extensions": "0.0.5"
45
46
  },
46
47
  "dependencies": {
47
- "@justeattakeaway/pie-button": "1.4.0",
48
- "@justeattakeaway/pie-icon-button": "1.3.2",
49
- "@justeattakeaway/pie-icons-webc": "1.6.0",
50
- "@justeattakeaway/pie-webc-core": "0.24.2"
48
+ "@justeattakeaway/pie-button": "1.5.0",
49
+ "@justeattakeaway/pie-icon-button": "1.4.0",
50
+ "@justeattakeaway/pie-icons-webc": "1.6.1",
51
+ "@justeattakeaway/pie-webc-core": "0.25.0"
51
52
  },
52
53
  "volta": {
53
54
  "extends": "../../../package.json"
package/src/index.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
- LitElement,
3
2
  html,
4
3
  unsafeCSS,
5
4
  nothing,
6
5
  type TemplateResult,
7
6
  type PropertyValues,
8
7
  } from 'lit';
8
+ import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement';
9
9
  import { property, query } from 'lit/decorators.js';
10
10
  import { classMap } from 'lit/directives/class-map.js';
11
11
  import {
@@ -44,7 +44,7 @@ export * from './defs';
44
44
  * @event {CustomEvent} pie-toast-open - when the toast is opened.
45
45
  * @event {CustomEvent} pie-toast-leading-action-click - when the user interacts with the leading action.
46
46
  */
47
- export class PieToast extends RtlMixin(LitElement) implements ToastProps {
47
+ export class PieToast extends RtlMixin(PieElement) implements ToastProps {
48
48
  @property({ type: String })
49
49
  public message = defaultProps.message;
50
50