@justeattakeaway/pie-notification 0.21.18 → 0.21.20

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.
@@ -90,7 +90,7 @@
90
90
  "type": {
91
91
  "text": "ActionProps"
92
92
  },
93
- "default": "{\r\n text: '',\r\n ariaLabel: '',\r\n size: 'small-productive',\r\n}"
93
+ "default": "{\n text: '',\n ariaLabel: '',\n size: 'small-productive',\n}"
94
94
  },
95
95
  {
96
96
  "kind": "variable",
@@ -98,7 +98,7 @@
98
98
  "type": {
99
99
  "text": "DefaultProps"
100
100
  },
101
- "default": "{\r\n variant: 'neutral',\r\n position: 'inline-content',\r\n isDismissible: false,\r\n isCompact: false,\r\n headingLevel: 'h2',\r\n hideIcon: false,\r\n isOpen: true,\r\n hasStackedActions: false,\r\n leadingAction: defaultActionButtonProps,\r\n supportingAction: defaultActionButtonProps,\r\n}"
101
+ "default": "{\n variant: 'neutral',\n position: 'inline-content',\n isDismissible: false,\n isCompact: false,\n headingLevel: 'h2',\n hideIcon: false,\n isOpen: true,\n hasStackedActions: false,\n leadingAction: defaultActionButtonProps,\n supportingAction: defaultActionButtonProps,\n}"
102
102
  }
103
103
  ],
104
104
  "exports": [
@@ -302,7 +302,7 @@
302
302
  "kind": "method",
303
303
  "name": "renderFooter",
304
304
  "privacy": "private",
305
- "description": "Template for the footer area\r\nCalled within the main render function."
305
+ "description": "Template for the footer area\nCalled within the main render function."
306
306
  },
307
307
  {
308
308
  "kind": "method",
@@ -313,7 +313,7 @@
313
313
  "text": "TemplateResult"
314
314
  }
315
315
  },
316
- "description": "Template for the header area\r\nCalled within the main render function."
316
+ "description": "Template for the header area\nCalled within the main render function."
317
317
  },
318
318
  {
319
319
  "kind": "method",
@@ -330,7 +330,7 @@
330
330
  "text": "TemplateResult | typeof nothing"
331
331
  }
332
332
  },
333
- "description": "Template for the heading icon area.\r\nIt can return an icon provided externally via named slot or it can return a default icon according to the chosen variant if defined.\r\nCalled within the main render function."
333
+ "description": "Template for the heading icon area.\nIt can return an icon provided externally via named slot or it can return a default icon according to the chosen variant if defined.\nCalled within the main render function."
334
334
  },
335
335
  {
336
336
  "kind": "method",
@@ -341,13 +341,13 @@
341
341
  "text": "TemplateResult"
342
342
  }
343
343
  },
344
- "description": "Template for the close button element. Called within the\r\nmain render function."
344
+ "description": "Template for the close button element. Called within the\nmain render function."
345
345
  },
346
346
  {
347
347
  "kind": "method",
348
348
  "name": "handleCloseButton",
349
349
  "privacy": "private",
350
- "description": "It handles the action when user clicks in the close button.\r\nAlso triggers an event when is executed."
350
+ "description": "It handles the action when user clicks in the close button.\nAlso triggers an event when is executed."
351
351
  },
352
352
  {
353
353
  "kind": "method",
@@ -361,7 +361,7 @@
361
361
  }
362
362
  }
363
363
  ],
364
- "description": "It handles the action button action.\r\nAlso triggers an event according to its `actionType`."
364
+ "description": "It handles the action button action.\nAlso triggers an event according to its `actionType`."
365
365
  },
366
366
  {
367
367
  "kind": "method",
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { LitElement as A, unsafeCSS as I, nothing as s } from "lit";
2
2
  import { classMap as O } from "lit/directives/class-map.js";
3
- import { html as p, unsafeStatic as z } from "lit/static-html.js";
3
+ import { html as f, unsafeStatic as z } from "lit/static-html.js";
4
4
  import { validPropertyValues as N, safeCustomElement as _, dispatchCustomEvent as x } from "@justeattakeaway/pie-webc-core";
5
5
  import { property as r, queryAssignedElements as S } from "lit/decorators.js";
6
- import { ifDefined as u } from "lit/directives/if-defined.js";
6
+ import { ifDefined as g } from "lit/directives/if-defined.js";
7
7
  import "@justeattakeaway/pie-button";
8
8
  import "@justeattakeaway/pie-icon-button";
9
9
  import "@justeattakeaway/pie-icons-webc/dist/IconAlertCircle.js";
@@ -16,13 +16,13 @@ const y = class y extends A {
16
16
  this.getAttribute("v") || this.setAttribute("v", y.v);
17
17
  }
18
18
  };
19
- y.v = "0.21.18";
19
+ y.v = "0.21.20";
20
20
  let C = y;
21
- const E = ["neutral", "neutral-alternative", "info", "success", "warning", "error", "translucent"], L = ["h2", "h3", "h4", "h5", "h6"], T = ["inline-content", "full-width"], B = ["small-productive", "xsmall"], t = "pie-notification", l = "c-notification", D = `${t}-close`, V = `${t}-open`, P = `${t}-leading-action-click`, F = `${t}-supporting-action-click`, $ = {
21
+ const E = ["neutral", "neutral-alternative", "info", "success", "warning", "error", "translucent"], L = ["h2", "h3", "h4", "h5", "h6"], T = ["inline-content", "full-width"], B = ["small-productive", "xsmall"], t = "pie-notification", u = "c-notification", D = `${t}-close`, V = `${t}-open`, P = `${t}-leading-action-click`, F = `${t}-supporting-action-click`, $ = {
22
22
  text: "",
23
23
  ariaLabel: "",
24
24
  size: "small-productive"
25
- }, d = {
25
+ }, l = {
26
26
  variant: "neutral",
27
27
  position: "inline-content",
28
28
  isDismissible: !1,
@@ -33,15 +33,15 @@ const E = ["neutral", "neutral-alternative", "info", "success", "warning", "erro
33
33
  hasStackedActions: !1,
34
34
  leadingAction: $,
35
35
  supportingAction: $
36
- }, j = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-notification{--notification-border-radius: var(--dt-radius-rounded-c);--notification-background-color: var(--dt-color-container-subtle);--notification-direction: column;--notification-heading-font-family: var(--dt-font-heading-s-family);--notification-heading-font-size: calc(var(--dt-font-heading-s-size--narrow) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--narrow) * 1px);--notification-heading-font-weight: var(--dt-font-heading-s-weight);--notification-font-family: var(--dt-font-body-l-family);--notification-font-size: calc(var(--dt-font-body-l-size) * 1px);--notification-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--notification-font-weight: var(--dt-font-body-l-weight);--notification-close-icon-offset: var(--dt-spacing-b);--notification-icon-fill: var(--dt-color-content-inverse);--notification-icon-background-color: var(--dt-color-container-inverse);--icon-size-override: 24px;padding:var(--dt-spacing-d);border-radius:var(--notification-border-radius);background-color:var(--notification-background-color);position:relative;display:flex;flex-direction:var(--notification-direction);gap:var(--dt-spacing-d);font-family:var(--notification-font-family);font-size:var(--notification-font-size);line-height:var(--notification-line-height);font-weight:var(--notification-font-weight);color:var(--dt-color-content-default)}.c-notification.c-notification--compact{--notification-direction: row}.c-notification.c-notification--full-width{--notification-border-radius: var(--dt-radius-rounded-none)}.c-notification.c-notification--neutral-alternative{--notification-background-color: var(--dt-color-container-default)}.c-notification.c-notification--info{--notification-background-color: var(--dt-color-support-info-tonal);--notification-icon-background-color: var(--dt-color-support-info)}.c-notification.c-notification--success{--notification-background-color: var(--dt-color-support-positive-tonal);--notification-icon-background-color: var(--dt-color-support-positive)}.c-notification.c-notification--warning{--notification-background-color: var(--dt-color-support-warning-tonal);--notification-icon-background-color: var(--dt-color-support-warning);--notification-icon-fill: var(--dt-color-content-dark)}.c-notification.c-notification--error{--notification-background-color: var(--dt-color-support-error-tonal);--notification-icon-background-color: var(--dt-color-support-error);--notification-icon-fill: var(--dt-color-content-light)}.c-notification.c-notification--translucent{--notification-background-color: var(--dt-color-container-prominent);-webkit-backdrop-filter:blur(var(--dt-blur-prominent));backdrop-filter:blur(var(--dt-blur-prominent))}.c-notification-heading{margin:0;margin-block-end:var(--dt-spacing-a);font-family:var(--notification-heading-font-family);font-size:var(--notification-heading-font-size);line-height:var(--notification-heading-line-height);font-weight:var(--notification-heading-font-weight)}@media (min-width: 769px){.c-notification-heading{--notification-heading-font-size: calc(var(--dt-font-heading-s-size--wide) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--wide) * 1px)}}.c-notification-content-section{display:flex;flex-direction:row;align-items:center;gap:var(--dt-spacing-c)}.c-notification-content-section.c-notification-content-section--dismissible{max-width:calc(100% - var(--notification-close-icon-offset) - 40px)}.c-notification-icon-close{position:absolute;inset-block-start:var(--notification-close-icon-offset);inset-inline-end:var(--notification-close-icon-offset)}.c-notification-footer{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--dt-spacing-d)}.c-notification-footer.c-notification-footer--compact{align-self:center;margin-inline-start:auto}@media (max-width: 767px){.c-notification-footer.c-notification-footer--stacked{flex-direction:column-reverse}}.icon,::slotted([slot=icon]){display:inline-flex;align-self:flex-start;background-color:var(--notification-icon-background-color);color:var(--notification-icon-fill);border-radius:var(--dt-radius-rounded-b);padding:var(--dt-spacing-a)}";
37
- var G = Object.defineProperty, H = Object.getOwnPropertyDescriptor, c = (i, o, n, f) => {
38
- for (var e = f > 1 ? void 0 : f ? H(o, n) : o, g = i.length - 1, h; g >= 0; g--)
39
- (h = i[g]) && (e = (f ? h(o, n, e) : h(e)) || e);
40
- return f && e && G(o, n, e), e;
36
+ }, j = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-notification{--notification-border-radius: var(--dt-radius-rounded-c);--notification-background-color: var(--dt-color-container-subtle);--notification-direction: column;--notification-heading-font-family: var(--dt-font-heading-s-family);--notification-heading-font-size: calc(var(--dt-font-heading-s-size--narrow) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--narrow) * 1px);--notification-heading-font-weight: var(--dt-font-heading-s-weight);--notification-font-family: var(--dt-font-body-l-family);--notification-font-size: calc(var(--dt-font-body-l-size) * 1px);--notification-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--notification-font-weight: var(--dt-font-body-l-weight);--notification-close-icon-offset: var(--dt-spacing-b);--notification-icon-fill: var(--dt-color-content-inverse);--notification-icon-background-color: var(--dt-color-container-inverse);--icon-size-override: 24px;padding:var(--dt-spacing-d);border-radius:var(--notification-border-radius);background-color:var(--notification-background-color);position:relative;display:flex;flex-direction:var(--notification-direction);gap:var(--dt-spacing-d);font-family:var(--notification-font-family);font-size:var(--notification-font-size);line-height:var(--notification-line-height);font-weight:var(--notification-font-weight);color:var(--dt-color-content-default)}.c-notification.is-compact{--notification-direction: row}.c-notification.c-notification--full-width{--notification-border-radius: var(--dt-radius-rounded-none)}.c-notification.c-notification--neutral-alternative{--notification-background-color: var(--dt-color-container-default)}.c-notification.c-notification--info{--notification-background-color: var(--dt-color-support-info-tonal);--notification-icon-background-color: var(--dt-color-support-info)}.c-notification.c-notification--success{--notification-background-color: var(--dt-color-support-positive-tonal);--notification-icon-background-color: var(--dt-color-support-positive)}.c-notification.c-notification--warning{--notification-background-color: var(--dt-color-support-warning-tonal);--notification-icon-background-color: var(--dt-color-support-warning);--notification-icon-fill: var(--dt-color-content-dark)}.c-notification.c-notification--error{--notification-background-color: var(--dt-color-support-error-tonal);--notification-icon-background-color: var(--dt-color-support-error);--notification-icon-fill: var(--dt-color-content-light)}.c-notification.c-notification--translucent{--notification-background-color: var(--dt-color-container-prominent);-webkit-backdrop-filter:blur(var(--dt-blur-prominent));backdrop-filter:blur(var(--dt-blur-prominent))}.c-notification-heading{margin:0;margin-block-end:var(--dt-spacing-a);font-family:var(--notification-heading-font-family);font-size:var(--notification-heading-font-size);line-height:var(--notification-heading-line-height);font-weight:var(--notification-heading-font-weight)}@media (min-width: 769px){.c-notification-heading{--notification-heading-font-size: calc(var(--dt-font-heading-s-size--wide) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--wide) * 1px)}}.c-notification-content-section{display:flex;flex-direction:row;align-items:center;gap:var(--dt-spacing-c)}.c-notification-content-section.is-dismissible{max-width:calc(100% - var(--notification-close-icon-offset) - 40px)}.c-notification-icon-close{position:absolute;inset-block-start:var(--notification-close-icon-offset);inset-inline-end:var(--notification-close-icon-offset)}.c-notification-footer{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--dt-spacing-d)}.c-notification-footer.is-compact{align-self:center;margin-inline-start:auto}@media (max-width: 767px){.c-notification-footer.c-notification-footer--stacked{flex-direction:column-reverse}}@media (min-width: 768px){.c-notification-footer.c-notification-footer--stacked>pie-button{width:auto}}.icon,::slotted([slot=icon]){display:inline-flex;align-self:flex-start;background-color:var(--notification-icon-background-color);color:var(--notification-icon-fill);border-radius:var(--dt-radius-rounded-b);padding:var(--dt-spacing-a)}";
37
+ var G = Object.defineProperty, H = Object.getOwnPropertyDescriptor, c = (i, o, n, d) => {
38
+ for (var e = d > 1 ? void 0 : d ? H(o, n) : o, h = i.length - 1, p; h >= 0; h--)
39
+ (p = i[h]) && (e = (d ? p(o, n, e) : p(e)) || e);
40
+ return d && e && G(o, n, e), e;
41
41
  };
42
42
  let a = class extends C {
43
43
  constructor() {
44
- super(...arguments), this.isOpen = d.isOpen, this.variant = d.variant, this.position = d.position, this.isDismissible = d.isDismissible, this.isCompact = d.isCompact, this.headingLevel = d.headingLevel, this.hideIcon = d.hideIcon, this.hasStackedActions = d.hasStackedActions;
44
+ super(...arguments), this.isOpen = l.isOpen, this.variant = l.variant, this.position = l.position, this.isDismissible = l.isDismissible, this.isCompact = l.isCompact, this.headingLevel = l.headingLevel, this.hideIcon = l.hideIcon, this.hasStackedActions = l.hasStackedActions;
45
45
  }
46
46
  /**
47
47
  * Lifecycle method executed when component is updated.
@@ -61,13 +61,13 @@ let a = class extends C {
61
61
  leadingAction: i,
62
62
  supportingAction: o,
63
63
  isCompact: n,
64
- hasStackedActions: f
64
+ hasStackedActions: d
65
65
  } = this, e = {
66
- [`${l}-footer`]: !0,
67
- [`${l}-footer--compact`]: n,
68
- [`${l}-footer--stacked`]: f && !n
66
+ [`${u}-footer`]: !0,
67
+ "is-compact": n,
68
+ [`${u}-footer--stacked`]: d && !n
69
69
  };
70
- return p`
70
+ return f`
71
71
  <footer
72
72
  class="${O(e)}"
73
73
  data-test-id="${t}-footer">
@@ -84,9 +84,9 @@ let a = class extends C {
84
84
  */
85
85
  renderNotificationHeading() {
86
86
  const { heading: i, headingLevel: o } = this, n = z(o);
87
- return p`<${n}
87
+ return f`<${n}
88
88
  id="${t}-heading"
89
- class="${l}-heading"
89
+ class="${u}-heading"
90
90
  data-test-id="${t}-heading">
91
91
  ${i}
92
92
  </${n}>`;
@@ -99,13 +99,13 @@ let a = class extends C {
99
99
  getDefaultVariantIcon() {
100
100
  switch (this.variant) {
101
101
  case "info":
102
- return p`<icon-info-circle class="icon" size="m" data-test-id="${t}-heading-icon-info"></icon-info-circle>`;
102
+ return f`<icon-info-circle class="icon" size="m" data-test-id="${t}-heading-icon-info"></icon-info-circle>`;
103
103
  case "success":
104
- return p`<icon-check-circle class="icon" size="m" data-test-id="${t}-heading-icon-success"></icon-check-circle>`;
104
+ return f`<icon-check-circle class="icon" size="m" data-test-id="${t}-heading-icon-success"></icon-check-circle>`;
105
105
  case "warning":
106
- return p`<icon-alert-triangle class="icon" size="m" data-test-id="${t}-heading-icon-warning"></icon-alert-triangle>`;
106
+ return f`<icon-alert-triangle class="icon" size="m" data-test-id="${t}-heading-icon-warning"></icon-alert-triangle>`;
107
107
  case "error":
108
- return p`<icon-alert-circle class="icon" size="m" data-test-id="${t}-heading-icon-error"></icon-alert-circle>`;
108
+ return f`<icon-alert-circle class="icon" size="m" data-test-id="${t}-heading-icon-error"></icon-alert-circle>`;
109
109
  default:
110
110
  return s;
111
111
  }
@@ -118,7 +118,7 @@ let a = class extends C {
118
118
  * @private
119
119
  */
120
120
  renderIcon() {
121
- return p`<slot name="icon">${this.getDefaultVariantIcon()}</slot>`;
121
+ return f`<slot name="icon">${this.getDefaultVariantIcon()}</slot>`;
122
122
  }
123
123
  /**
124
124
  * Template for the close button element. Called within the
@@ -128,14 +128,14 @@ let a = class extends C {
128
128
  */
129
129
  renderCloseButton() {
130
130
  var i;
131
- return p`
131
+ return f`
132
132
  <pie-icon-button
133
133
  variant="ghost-secondary"
134
134
  size="small"
135
- class="${l}-icon-close"
135
+ class="${u}-icon-close"
136
136
  data-test-id="${t}-icon-close"
137
137
  @click="${this.handleCloseButton}"
138
- aria-label="${u((i = this.aria) == null ? void 0 : i.close)}">
138
+ aria-label="${g((i = this.aria) == null ? void 0 : i.close)}">
139
139
  <icon-close></icon-close>
140
140
  </pie-icon-button>`;
141
141
  }
@@ -171,30 +171,30 @@ let a = class extends C {
171
171
  renderActionButton(i, o) {
172
172
  const {
173
173
  text: n,
174
- ariaLabel: f,
174
+ ariaLabel: d,
175
175
  size: e = $.size,
176
- href: g,
177
- target: h,
176
+ href: h,
177
+ target: p,
178
178
  rel: k,
179
179
  download: v
180
180
  } = i;
181
181
  if (!n)
182
182
  return s;
183
- const m = o === "leading" ? "primary" : "ghost", w = e && B.includes(e) ? e : $.size, b = !!g;
184
- return p`
183
+ const m = o === "leading" ? "primary" : "ghost", w = e && B.includes(e) ? e : $.size, b = !!h;
184
+ return f`
185
185
  <pie-button
186
186
  variant="${m}"
187
- size="${u(w)}"
188
- aria-label="${u(f)}"
187
+ size="${g(w)}"
188
+ aria-label="${g(d)}"
189
189
  @click="${() => this.handleActionClick(o)}"
190
190
  data-test-id="${t}-${o}-action"
191
191
  ?isFullWidth="${this.hasStackedActions}"
192
192
  tag="${b ? "a" : "button"}"
193
193
  type="${b ? s : "button"}"
194
- href="${u(g)}"
195
- target="${u(h)}"
196
- rel="${u(k)}"
197
- download="${u(v)}">
194
+ href="${g(h)}"
195
+ target="${g(p)}"
196
+ rel="${g(k)}"
197
+ download="${g(v)}">
198
198
  ${n}
199
199
  </pie-button>
200
200
  `;
@@ -204,43 +204,43 @@ let a = class extends C {
204
204
  variant: i,
205
205
  position: o,
206
206
  heading: n,
207
- isDismissible: f,
207
+ isDismissible: d,
208
208
  isCompact: e,
209
- hideIcon: g,
210
- leadingAction: h,
209
+ hideIcon: h,
210
+ leadingAction: p,
211
211
  isOpen: k,
212
212
  aria: v
213
213
  } = this;
214
214
  if (!k)
215
215
  return s;
216
- const m = f && !e, w = {
217
- [l]: !0,
218
- [`${l}--${i}`]: !0,
219
- [`${l}--${o}`]: !0,
220
- [`${l}--compact`]: e
216
+ const m = d && !e, w = {
217
+ [u]: !0,
218
+ [`${u}--${i}`]: !0,
219
+ [`${u}--${o}`]: !0,
220
+ "is-compact": e
221
221
  }, b = {
222
- [`${l}-content-section`]: !0,
223
- [`${l}-content-section--dismissible`]: m
222
+ [`${u}-content-section`]: !0,
223
+ "is-dismissible": m
224
224
  };
225
- return p`
225
+ return f`
226
226
  <div
227
227
  data-test-id="${t}"
228
228
  class="${O(w)}"
229
229
  role="region"
230
230
  aria-live="${i === "error" ? "assertive" : "polite"}"
231
231
  aria-labelledby="${n ? `${t}-heading` : s}"
232
- aria-label="${!n && u(v == null ? void 0 : v.label)}">
232
+ aria-label="${!n && g(v == null ? void 0 : v.label)}">
233
233
  ${m ? this.renderCloseButton() : s}
234
234
 
235
235
  <section class="${O(b)}">
236
- ${g ? s : this.renderIcon()}
236
+ ${h ? s : this.renderIcon()}
237
237
  <article>
238
238
  ${n ? this.renderNotificationHeading() : s}
239
239
  <slot></slot>
240
240
  </article>
241
241
  </section>
242
242
 
243
- ${h != null && h.text ? this.renderFooter() : s}
243
+ ${p != null && p.text ? this.renderFooter() : s}
244
244
  </div>`;
245
245
  }
246
246
  };
@@ -250,11 +250,11 @@ c([
250
250
  ], a.prototype, "isOpen", 2);
251
251
  c([
252
252
  r({ type: String }),
253
- N(t, E, d.variant)
253
+ N(t, E, l.variant)
254
254
  ], a.prototype, "variant", 2);
255
255
  c([
256
256
  r({ type: String }),
257
- N(t, T, d.position)
257
+ N(t, T, l.position)
258
258
  ], a.prototype, "position", 2);
259
259
  c([
260
260
  r({ type: Boolean })
@@ -267,7 +267,7 @@ c([
267
267
  ], a.prototype, "heading", 2);
268
268
  c([
269
269
  r({ type: String }),
270
- N(t, L, d.headingLevel)
270
+ N(t, L, l.headingLevel)
271
271
  ], a.prototype, "headingLevel", 2);
272
272
  c([
273
273
  r({ type: Boolean })
@@ -297,10 +297,10 @@ export {
297
297
  F as ON_NOTIFICATION_SUPPORTING_ACTION_CLICK_EVENT,
298
298
  a as PieNotification,
299
299
  B as actionSizes,
300
- l as componentClass,
300
+ u as componentClass,
301
301
  t as componentSelector,
302
302
  $ as defaultActionButtonProps,
303
- d as defaultProps,
303
+ l as defaultProps,
304
304
  L as headingLevels,
305
305
  T as positions,
306
306
  E as variants
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-notification",
3
3
  "description": "PIE Design System Notification built using Web Components",
4
- "version": "0.21.18",
4
+ "version": "0.21.20",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
@@ -45,15 +45,15 @@
45
45
  "devDependencies": {
46
46
  "@custom-elements-manifest/analyzer": "0.9.0",
47
47
  "@justeattakeaway/pie-components-config": "0.21.0",
48
- "@justeattakeaway/pie-css": "0.32.0",
48
+ "@justeattakeaway/pie-css": "1.0.0",
49
49
  "@justeattakeaway/pie-monorepo-utils": "0.7.0",
50
- "@justeattakeaway/pie-wrapper-react": "0.14.3",
50
+ "@justeattakeaway/pie-wrapper-react": "0.14.4",
51
51
  "cem-plugin-module-file-extensions": "0.0.5"
52
52
  },
53
53
  "dependencies": {
54
- "@justeattakeaway/pie-icon-button": "2.7.4",
55
- "@justeattakeaway/pie-icons-webc": "1.21.1",
56
- "@justeattakeaway/pie-webc-core": "12.0.0"
54
+ "@justeattakeaway/pie-icon-button": "2.7.5",
55
+ "@justeattakeaway/pie-icons-webc": "1.21.2",
56
+ "@justeattakeaway/pie-webc-core": "13.0.0"
57
57
  },
58
58
  "volta": {
59
59
  "extends": "../../../package.json"
package/src/index.ts CHANGED
@@ -116,7 +116,7 @@ export class PieNotification extends PieElement implements NotificationProps {
116
116
  } = this;
117
117
  const classes = {
118
118
  [`${componentClass}-footer`]: true,
119
- [`${componentClass}-footer--compact`]: isCompact,
119
+ 'is-compact': isCompact,
120
120
  [`${componentClass}-footer--stacked`]: hasStackedActions && !isCompact,
121
121
  };
122
122
  return html`
@@ -292,12 +292,12 @@ export class PieNotification extends PieElement implements NotificationProps {
292
292
  [componentClass]: true,
293
293
  [`${componentClass}--${variant}`]: true,
294
294
  [`${componentClass}--${position}`]: true,
295
- [`${componentClass}--compact`]: isCompact,
295
+ 'is-compact': isCompact,
296
296
  };
297
297
 
298
298
  const contentSectionClasses = {
299
299
  [`${componentClass}-content-section`]: true,
300
- [`${componentClass}-content-section--dismissible`]: showCloseButton,
300
+ 'is-dismissible': showCloseButton,
301
301
  };
302
302
 
303
303
  return html`
@@ -35,7 +35,7 @@
35
35
  font-weight: var(--notification-font-weight);
36
36
  color: var(--dt-color-content-default);
37
37
 
38
- &.c-notification--compact {
38
+ &.is-compact {
39
39
  --notification-direction: row;
40
40
  }
41
41
 
@@ -97,7 +97,7 @@
97
97
  align-items: center;
98
98
  gap: var(--dt-spacing-c);
99
99
 
100
- &.c-notification-content-section--dismissible {
100
+ &.is-dismissible {
101
101
  max-width: calc(100% - var(--notification-close-icon-offset) - 40px); // 40px is the size of the medium icon button
102
102
  }
103
103
  }
@@ -114,15 +114,21 @@
114
114
  justify-content: flex-end;
115
115
  gap: var(--dt-spacing-d);
116
116
 
117
- &.c-notification-footer--compact {
117
+ &.is-compact {
118
118
  align-self: center;
119
119
  margin-inline-start: auto;
120
120
  }
121
121
 
122
- @include media('<md') {
123
- &.c-notification-footer--stacked {
122
+ &.c-notification-footer--stacked {
123
+ @include media('<md') {
124
124
  flex-direction: column-reverse;
125
125
  }
126
+
127
+ @include media('>=md') {
128
+ > pie-button {
129
+ width: auto;
130
+ }
131
+ }
126
132
  }
127
133
  }
128
134
  }