@justeattakeaway/pie-notification 0.12.4 → 0.12.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.
@@ -196,18 +196,12 @@
196
196
  {
197
197
  "kind": "field",
198
198
  "name": "variant",
199
- "type": {
200
- "text": "NonNullable<NotificationProps['variant']>"
201
- },
202
199
  "privacy": "public",
203
200
  "attribute": "variant"
204
201
  },
205
202
  {
206
203
  "kind": "field",
207
204
  "name": "position",
208
- "type": {
209
- "text": "NonNullable<NotificationProps['position']>"
210
- },
211
205
  "privacy": "public",
212
206
  "attribute": "position"
213
207
  },
@@ -227,7 +221,7 @@
227
221
  "kind": "field",
228
222
  "name": "heading",
229
223
  "type": {
230
- "text": "string | undefined"
224
+ "text": "NotificationProps['heading']"
231
225
  },
232
226
  "privacy": "public",
233
227
  "attribute": "heading"
@@ -235,9 +229,6 @@
235
229
  {
236
230
  "kind": "field",
237
231
  "name": "headingLevel",
238
- "type": {
239
- "text": "NonNullable<NotificationProps['headingLevel']>"
240
- },
241
232
  "privacy": "public",
242
233
  "attribute": "headingLevel"
243
234
  },
@@ -417,16 +408,10 @@
417
408
  },
418
409
  {
419
410
  "name": "variant",
420
- "type": {
421
- "text": "NonNullable<NotificationProps['variant']>"
422
- },
423
411
  "fieldName": "variant"
424
412
  },
425
413
  {
426
414
  "name": "position",
427
- "type": {
428
- "text": "NonNullable<NotificationProps['position']>"
429
- },
430
415
  "fieldName": "position"
431
416
  },
432
417
  {
@@ -440,15 +425,12 @@
440
425
  {
441
426
  "name": "heading",
442
427
  "type": {
443
- "text": "string | undefined"
428
+ "text": "NotificationProps['heading']"
444
429
  },
445
430
  "fieldName": "heading"
446
431
  },
447
432
  {
448
433
  "name": "headingLevel",
449
- "type": {
450
- "text": "NonNullable<NotificationProps['headingLevel']>"
451
- },
452
434
  "fieldName": "headingLevel"
453
435
  },
454
436
  {
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare type ActionProps = {
16
16
  ariaLabel?: string;
17
17
  };
18
18
 
19
- export declare type AriaProps = {
19
+ declare type AriaProps = {
20
20
  close?: string;
21
21
  label?: string;
22
22
  };
@@ -53,7 +53,7 @@ export declare interface NotificationProps {
53
53
  */
54
54
  heading?: string;
55
55
  /**
56
- * The HTML heading tag to use for the notification's heading. Can be h1-h6.
56
+ * The HTML heading tag to use for the notification's heading. Can be h2-h6.
57
57
  */
58
58
  headingLevel?: typeof headingLevels[number];
59
59
  /**
@@ -123,12 +123,12 @@ export declare const ON_NOTIFICATION_SUPPORTING_ACTION_CLICK_EVENT: string;
123
123
  */
124
124
  export declare class PieNotification extends LitElement implements NotificationProps {
125
125
  isOpen: boolean;
126
- variant: NonNullable<NotificationProps['variant']>;
127
- position: NonNullable<NotificationProps['position']>;
126
+ variant: "neutral" | "neutral-alternative" | "info" | "success" | "warning" | "error";
127
+ position: "inline-content" | "full-width";
128
128
  isDismissible: boolean;
129
129
  isCompact: boolean;
130
- heading?: string;
131
- headingLevel: NonNullable<NotificationProps['headingLevel']>;
130
+ heading: NotificationProps['heading'];
131
+ headingLevel: "h2" | "h3" | "h4" | "h5" | "h6";
132
132
  hideIcon: boolean;
133
133
  leadingAction: NotificationProps['leadingAction'];
134
134
  supportingAction: NotificationProps['supportingAction'];
package/dist/index.js CHANGED
@@ -221,11 +221,11 @@ a([
221
221
  r({ type: Boolean })
222
222
  ], o.prototype, "isOpen");
223
223
  a([
224
- r(),
224
+ r({ type: String }),
225
225
  $(t, z, d.variant)
226
226
  ], o.prototype, "variant");
227
227
  a([
228
- r(),
228
+ r({ type: String }),
229
229
  $(t, T, d.position)
230
230
  ], o.prototype, "position");
231
231
  a([
@@ -238,7 +238,7 @@ a([
238
238
  r({ type: String })
239
239
  ], o.prototype, "heading");
240
240
  a([
241
- r(),
241
+ r({ type: String }),
242
242
  $(t, S, d.headingLevel)
243
243
  ], o.prototype, "headingLevel");
244
244
  a([
package/dist/react.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare type ActionProps = {
17
17
  ariaLabel?: string;
18
18
  };
19
19
 
20
- export declare type AriaProps = {
20
+ declare type AriaProps = {
21
21
  close?: string;
22
22
  label?: string;
23
23
  };
@@ -54,7 +54,7 @@ export declare interface NotificationProps {
54
54
  */
55
55
  heading?: string;
56
56
  /**
57
- * The HTML heading tag to use for the notification's heading. Can be h1-h6.
57
+ * The HTML heading tag to use for the notification's heading. Can be h2-h6.
58
58
  */
59
59
  headingLevel?: typeof headingLevels[number];
60
60
  /**
@@ -126,12 +126,12 @@ export declare const PieNotification: React_2.ForwardRefExoticComponent<Notifica
126
126
  */
127
127
  declare class PieNotification_2 extends LitElement implements NotificationProps {
128
128
  isOpen: boolean;
129
- variant: NonNullable<NotificationProps['variant']>;
130
- position: NonNullable<NotificationProps['position']>;
129
+ variant: "neutral" | "neutral-alternative" | "info" | "success" | "warning" | "error";
130
+ position: "inline-content" | "full-width";
131
131
  isDismissible: boolean;
132
132
  isCompact: boolean;
133
- heading?: string;
134
- headingLevel: NonNullable<NotificationProps['headingLevel']>;
133
+ heading: NotificationProps['heading'];
134
+ headingLevel: "h2" | "h3" | "h4" | "h5" | "h6";
135
135
  hideIcon: boolean;
136
136
  leadingAction: NotificationProps['leadingAction'];
137
137
  supportingAction: NotificationProps['supportingAction'];
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.12.4",
4
+ "version": "0.12.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "cem-plugin-module-file-extensions": "0.0.5"
43
43
  },
44
44
  "dependencies": {
45
- "@justeattakeaway/pie-icon-button": "0.29.1",
45
+ "@justeattakeaway/pie-icon-button": "1.0.0",
46
46
  "@justeattakeaway/pie-icons-webc": "1.1.0",
47
47
  "@justeattakeaway/pie-webc-core": "0.24.2"
48
48
  },
package/src/defs.ts CHANGED
@@ -4,7 +4,7 @@ export const variants = ['neutral', 'neutral-alternative', 'info', 'success', 'w
4
4
  export const headingLevels = ['h2', 'h3', 'h4', 'h5', 'h6'] as const;
5
5
  export const positions = ['inline-content', 'full-width'] as const;
6
6
 
7
- export type AriaProps = {
7
+ type AriaProps = {
8
8
  close?: string;
9
9
  label?: string;
10
10
  };
@@ -48,7 +48,7 @@ export interface NotificationProps {
48
48
  heading?: string;
49
49
 
50
50
  /**
51
- * The HTML heading tag to use for the notification's heading. Can be h1-h6.
51
+ * The HTML heading tag to use for the notification's heading. Can be h2-h6.
52
52
  */
53
53
  headingLevel?: typeof headingLevels[number];
54
54
 
package/src/index.ts CHANGED
@@ -50,13 +50,13 @@ export class PieNotification extends LitElement implements NotificationProps {
50
50
  @property({ type: Boolean })
51
51
  public isOpen = defaultProps.isOpen;
52
52
 
53
- @property()
53
+ @property({ type: String })
54
54
  @validPropertyValues(componentSelector, variants, defaultProps.variant)
55
- public variant: NonNullable<NotificationProps['variant']> = defaultProps.variant;
55
+ public variant = defaultProps.variant;
56
56
 
57
- @property()
57
+ @property({ type: String })
58
58
  @validPropertyValues(componentSelector, positions, defaultProps.position)
59
- public position: NonNullable<NotificationProps['position']> = defaultProps.position;
59
+ public position = defaultProps.position;
60
60
 
61
61
  @property({ type: Boolean })
62
62
  public isDismissible = defaultProps.isDismissible;
@@ -65,11 +65,11 @@ export class PieNotification extends LitElement implements NotificationProps {
65
65
  public isCompact = defaultProps.isCompact;
66
66
 
67
67
  @property({ type: String })
68
- public heading?: string;
68
+ public heading: NotificationProps['heading'];
69
69
 
70
- @property()
70
+ @property({ type: String })
71
71
  @validPropertyValues(componentSelector, headingLevels, defaultProps.headingLevel)
72
- public headingLevel: NonNullable<NotificationProps['headingLevel']> = defaultProps.headingLevel;
72
+ public headingLevel = defaultProps.headingLevel;
73
73
 
74
74
  @property({ type: Boolean })
75
75
  public hideIcon = defaultProps.hideIcon;