@justeattakeaway/pie-notification 0.7.0 → 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.
- package/custom-elements.json +2 -2
- package/dist/index.d.ts +6 -7
- package/dist/index.js +0 -1
- package/dist/react.d.ts +6 -7
- package/package.json +1 -1
- package/src/defs.ts +5 -5
- package/src/index.ts +1 -2
package/custom-elements.json
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"kind": "field",
|
|
218
218
|
"name": "heading",
|
|
219
219
|
"type": {
|
|
220
|
-
"text": "string"
|
|
220
|
+
"text": "string | undefined"
|
|
221
221
|
},
|
|
222
222
|
"privacy": "public",
|
|
223
223
|
"attribute": "heading"
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
{
|
|
546
546
|
"name": "heading",
|
|
547
547
|
"type": {
|
|
548
|
-
"text": "string"
|
|
548
|
+
"text": "string | undefined"
|
|
549
549
|
},
|
|
550
550
|
"fieldName": "heading"
|
|
551
551
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -33,11 +33,11 @@ export declare const headingLevels: readonly ["h2", "h3", "h4", "h5", "h6"];
|
|
|
33
33
|
|
|
34
34
|
export declare interface NotificationProps {
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Sets the variant of the notification.
|
|
37
37
|
*/
|
|
38
38
|
variant?: typeof variants[number];
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Defines the proper styles, whether the component appears within the content or at the top of the interface
|
|
41
41
|
*/
|
|
42
42
|
position?: typeof positions[number];
|
|
43
43
|
/**
|
|
@@ -45,7 +45,7 @@ export declare interface NotificationProps {
|
|
|
45
45
|
*/
|
|
46
46
|
isDismissible?: boolean;
|
|
47
47
|
/**
|
|
48
|
-
* When true, the footer
|
|
48
|
+
* When true, aligns the footer with the header and icons, making the component compact.
|
|
49
49
|
*/
|
|
50
50
|
isCompact?: boolean;
|
|
51
51
|
/**
|
|
@@ -57,7 +57,7 @@ export declare interface NotificationProps {
|
|
|
57
57
|
*/
|
|
58
58
|
headingLevel?: typeof headingLevels[number];
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* When true, the icon will be hidden.
|
|
61
61
|
*/
|
|
62
62
|
hideIcon?: boolean;
|
|
63
63
|
/**
|
|
@@ -73,7 +73,7 @@ export declare interface NotificationProps {
|
|
|
73
73
|
*/
|
|
74
74
|
supportingAction?: ActionProps;
|
|
75
75
|
/**
|
|
76
|
-
* When true,
|
|
76
|
+
* When true, action buttons will stack on narrow screens.
|
|
77
77
|
*/
|
|
78
78
|
hasStackedActions?: boolean;
|
|
79
79
|
/**
|
|
@@ -124,7 +124,7 @@ export declare class PieNotification extends LitElement implements NotificationP
|
|
|
124
124
|
position: NonNullable<NotificationProps['position']>;
|
|
125
125
|
isDismissible: boolean;
|
|
126
126
|
isCompact: boolean;
|
|
127
|
-
heading
|
|
127
|
+
heading?: string;
|
|
128
128
|
headingLevel: NonNullable<NotificationProps['headingLevel']>;
|
|
129
129
|
hideIcon: boolean;
|
|
130
130
|
leadingAction: NotificationProps['leadingAction'];
|
|
@@ -143,7 +143,6 @@ export declare class PieNotification extends LitElement implements NotificationP
|
|
|
143
143
|
/**
|
|
144
144
|
* Lifecycle method executed when component is updated.
|
|
145
145
|
* It dispatches an event if notification is opened.
|
|
146
|
-
* It applies a gutter if there's no heading content in order to avoid the close button overlap the content.
|
|
147
146
|
*/
|
|
148
147
|
protected updated(_changedProperties: PropertyValues<this>): void;
|
|
149
148
|
/**
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,6 @@ class n extends k {
|
|
|
40
40
|
/**
|
|
41
41
|
* Lifecycle method executed when component is updated.
|
|
42
42
|
* It dispatches an event if notification is opened.
|
|
43
|
-
* It applies a gutter if there's no heading content in order to avoid the close button overlap the content.
|
|
44
43
|
*/
|
|
45
44
|
updated(i) {
|
|
46
45
|
i.has("isOpen") && this.isOpen && v(this, B, { targetNotification: this });
|
package/dist/react.d.ts
CHANGED
|
@@ -34,11 +34,11 @@ export declare const headingLevels: readonly ["h2", "h3", "h4", "h5", "h6"];
|
|
|
34
34
|
|
|
35
35
|
export declare interface NotificationProps {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Sets the variant of the notification.
|
|
38
38
|
*/
|
|
39
39
|
variant?: typeof variants[number];
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Defines the proper styles, whether the component appears within the content or at the top of the interface
|
|
42
42
|
*/
|
|
43
43
|
position?: typeof positions[number];
|
|
44
44
|
/**
|
|
@@ -46,7 +46,7 @@ export declare interface NotificationProps {
|
|
|
46
46
|
*/
|
|
47
47
|
isDismissible?: boolean;
|
|
48
48
|
/**
|
|
49
|
-
* When true, the footer
|
|
49
|
+
* When true, aligns the footer with the header and icons, making the component compact.
|
|
50
50
|
*/
|
|
51
51
|
isCompact?: boolean;
|
|
52
52
|
/**
|
|
@@ -58,7 +58,7 @@ export declare interface NotificationProps {
|
|
|
58
58
|
*/
|
|
59
59
|
headingLevel?: typeof headingLevels[number];
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* When true, the icon will be hidden.
|
|
62
62
|
*/
|
|
63
63
|
hideIcon?: boolean;
|
|
64
64
|
/**
|
|
@@ -74,7 +74,7 @@ export declare interface NotificationProps {
|
|
|
74
74
|
*/
|
|
75
75
|
supportingAction?: ActionProps;
|
|
76
76
|
/**
|
|
77
|
-
* When true,
|
|
77
|
+
* When true, action buttons will stack on narrow screens.
|
|
78
78
|
*/
|
|
79
79
|
hasStackedActions?: boolean;
|
|
80
80
|
/**
|
|
@@ -127,7 +127,7 @@ declare class PieNotification_2 extends LitElement implements NotificationProps
|
|
|
127
127
|
position: NonNullable<NotificationProps['position']>;
|
|
128
128
|
isDismissible: boolean;
|
|
129
129
|
isCompact: boolean;
|
|
130
|
-
heading
|
|
130
|
+
heading?: string;
|
|
131
131
|
headingLevel: NonNullable<NotificationProps['headingLevel']>;
|
|
132
132
|
hideIcon: boolean;
|
|
133
133
|
leadingAction: NotificationProps['leadingAction'];
|
|
@@ -146,7 +146,6 @@ declare class PieNotification_2 extends LitElement implements NotificationProps
|
|
|
146
146
|
/**
|
|
147
147
|
* Lifecycle method executed when component is updated.
|
|
148
148
|
* It dispatches an event if notification is opened.
|
|
149
|
-
* It applies a gutter if there's no heading content in order to avoid the close button overlap the content.
|
|
150
149
|
*/
|
|
151
150
|
protected updated(_changedProperties: PropertyValues<this>): void;
|
|
152
151
|
/**
|
package/package.json
CHANGED
package/src/defs.ts
CHANGED
|
@@ -23,12 +23,12 @@ export type ActionProps = {
|
|
|
23
23
|
|
|
24
24
|
export interface NotificationProps {
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Sets the variant of the notification.
|
|
27
27
|
*/
|
|
28
28
|
variant?: typeof variants[number];
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Defines the proper styles, whether the component appears within the content or at the top of the interface
|
|
32
32
|
*/
|
|
33
33
|
position?: typeof positions[number];
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ export interface NotificationProps {
|
|
|
38
38
|
isDismissible?: boolean;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* When true, the footer
|
|
41
|
+
* When true, aligns the footer with the header and icons, making the component compact.
|
|
42
42
|
*/
|
|
43
43
|
isCompact?: boolean;
|
|
44
44
|
|
|
@@ -53,7 +53,7 @@ export interface NotificationProps {
|
|
|
53
53
|
headingLevel?: typeof headingLevels[number];
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* When true, the icon will be hidden.
|
|
57
57
|
*/
|
|
58
58
|
hideIcon?: boolean;
|
|
59
59
|
|
|
@@ -73,7 +73,7 @@ export interface NotificationProps {
|
|
|
73
73
|
supportingAction?: ActionProps;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* When true,
|
|
76
|
+
* When true, action buttons will stack on narrow screens.
|
|
77
77
|
*/
|
|
78
78
|
hasStackedActions?: boolean;
|
|
79
79
|
|
package/src/index.ts
CHANGED
|
@@ -62,7 +62,7 @@ export class PieNotification extends LitElement implements NotificationProps {
|
|
|
62
62
|
public isCompact = defaultProps.isCompact;
|
|
63
63
|
|
|
64
64
|
@property({ type: String })
|
|
65
|
-
public heading
|
|
65
|
+
public heading?: string;
|
|
66
66
|
|
|
67
67
|
@property()
|
|
68
68
|
@validPropertyValues(componentSelector, headingLevels, defaultProps.headingLevel)
|
|
@@ -107,7 +107,6 @@ export class PieNotification extends LitElement implements NotificationProps {
|
|
|
107
107
|
/**
|
|
108
108
|
* Lifecycle method executed when component is updated.
|
|
109
109
|
* It dispatches an event if notification is opened.
|
|
110
|
-
* It applies a gutter if there's no heading content in order to avoid the close button overlap the content.
|
|
111
110
|
*/
|
|
112
111
|
protected updated (_changedProperties: PropertyValues<this>): void {
|
|
113
112
|
if (_changedProperties.has('isOpen') && this.isOpen) {
|