@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.
- package/custom-elements.json +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -4
- package/dist/react.d.ts +2 -2
- package/package.json +1 -1
- package/src/defs.ts +3 -3
- package/src/index.ts +2 -3
package/custom-elements.json
CHANGED
|
@@ -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:
|
|
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
|
-
*
|
|
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
|
|
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: !
|
|
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
|
-
*
|
|
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
|
|
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
package/src/defs.ts
CHANGED
|
@@ -37,7 +37,7 @@ export interface ToastProps {
|
|
|
37
37
|
*/
|
|
38
38
|
message: string;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
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
|
|
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:
|
|
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}
|