@justeattakeaway/pie-toast 0.4.4 → 0.4.6

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.
@@ -60,7 +60,7 @@
60
60
  "type": {
61
61
  "text": "DefaultProps"
62
62
  },
63
- "default": "{\n message: '',\n isOpen: true,\n variant: 'neutral',\n isStrong: false,\n isDismissible: true,\n isMultiline: false,\n duration: 5000,\n}"
63
+ "default": "{\n message: '',\n isOpen: true,\n variant: 'neutral',\n isStrong: false,\n isDismissible: false,\n isMultiline: false,\n duration: 5000,\n}"
64
64
  }
65
65
  ],
66
66
  "exports": [
package/dist/index.d.ts CHANGED
@@ -209,7 +209,7 @@ export declare interface ToastProps {
209
209
  */
210
210
  message: string;
211
211
  /**
212
- * It allows the message content being displayed as multiline limited to three rows.
212
+ * Allows the message content to be displayed as multiline, limited to three rows.
213
213
  */
214
214
  isMultiline?: boolean;
215
215
  /**
@@ -219,7 +219,7 @@ export declare interface ToastProps {
219
219
  /**
220
220
  * Sets the duration of the toast in milliseconds before it auto-dismisses.
221
221
  * If the value is null auto-dismiss is disabled
222
- * If the value is not provided it auto-dismisses after 5 seconds (5000 milliseconds)
222
+ * If the value is not provided it auto-dismisses after 5 seconds
223
223
  */
224
224
  duration?: number | null;
225
225
  }
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ const k = "*,*:after,*:before{box-sizing:inherit}.c-toast{--toast-border-radius:
14
14
  isOpen: !0,
15
15
  variant: "neutral",
16
16
  isStrong: !1,
17
- isDismissible: !0,
17
+ isDismissible: !1,
18
18
  isMultiline: !1,
19
19
  duration: 5e3
20
20
  };
@@ -246,10 +246,9 @@ const g = class g extends O(C) {
246
246
  };
247
247
  return l`
248
248
  <div
249
+ role="${i === "error" ? "alert" : "status"}"
249
250
  data-test-id="${o}"
250
- class="${$(m)}"
251
- aria-live="${i === "error" ? "assertive" : "polite"}"
252
- >
251
+ class="${$(m)}">
253
252
  <div class="${s}-contentArea">
254
253
  <div class="${$(A)}">
255
254
  ${this.variantHasIcon(i) ? this.getVariantIcon() : d}
package/dist/react.d.ts CHANGED
@@ -214,7 +214,7 @@ export declare interface ToastProps {
214
214
  */
215
215
  message: string;
216
216
  /**
217
- * It allows the message content being displayed as multiline limited to three rows.
217
+ * Allows the message content to be displayed as multiline, limited to three rows.
218
218
  */
219
219
  isMultiline?: boolean;
220
220
  /**
@@ -224,7 +224,7 @@ export declare interface ToastProps {
224
224
  /**
225
225
  * Sets the duration of the toast in milliseconds before it auto-dismisses.
226
226
  * If the value is null auto-dismiss is disabled
227
- * If the value is not provided it auto-dismisses after 5 seconds (5000 milliseconds)
227
+ * If the value is not provided it auto-dismisses after 5 seconds
228
228
  */
229
229
  duration?: number | null;
230
230
  }
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.4.4",
4
+ "version": "0.4.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
package/src/defs.ts CHANGED
@@ -37,7 +37,7 @@ export interface ToastProps {
37
37
  */
38
38
  message: string;
39
39
  /**
40
- * It allows the message content being displayed as multiline limited to three rows.
40
+ * Allows the message content to be displayed as multiline, limited to three rows.
41
41
  */
42
42
  isMultiline?: boolean;
43
43
  /**
@@ -48,7 +48,7 @@ export interface ToastProps {
48
48
  /**
49
49
  * Sets the duration of the toast in milliseconds before it auto-dismisses.
50
50
  * If the value is null auto-dismiss is disabled
51
- * If the value is not provided it auto-dismisses after 5 seconds (5000 milliseconds)
51
+ * If the value is not provided it auto-dismisses after 5 seconds
52
52
  */
53
53
  duration?: number | null;
54
54
  }
@@ -84,7 +84,7 @@ export const defaultProps: DefaultProps = {
84
84
  isOpen: true,
85
85
  variant: 'neutral',
86
86
  isStrong: false,
87
- isDismissible: true,
87
+ isDismissible: false,
88
88
  isMultiline: false,
89
89
  duration: 5000,
90
90
  };
package/src/index.ts CHANGED
@@ -409,10 +409,9 @@ export class PieToast extends RtlMixin(LitElement) implements ToastProps {
409
409
 
410
410
  return html`
411
411
  <div
412
+ role="${variant === 'error' ? 'alert' : 'status'}"
412
413
  data-test-id="${componentSelector}"
413
- class="${classMap(componentWrapperClasses)}"
414
- aria-live="${variant === 'error' ? 'assertive' : 'polite'}"
415
- >
414
+ class="${classMap(componentWrapperClasses)}">
416
415
  <div class="${componentClass}-contentArea">
417
416
  <div class="${classMap(messageAreaClasses)}">
418
417
  ${this.variantHasIcon(variant) ? this.getVariantIcon() : nothing}