@justeattakeaway/pie-notification 0.2.0 → 0.3.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 +6 -0
- package/dist/react.d.ts +4 -2
- package/dist/react.js +2 -2
- package/package.json +4 -4
- package/src/defs-react.ts +7 -0
- package/src/react.ts +10 -4
package/custom-elements.json
CHANGED
package/dist/react.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { CSSResult } from 'lit';
|
|
2
2
|
import type { LitElement } from 'lit';
|
|
3
|
-
import
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
4
|
import type { TemplateResult } from 'lit-html';
|
|
5
5
|
|
|
6
6
|
export declare interface NotificationProps {
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export declare const PieNotification:
|
|
9
|
+
export declare const PieNotification: React_2.ForwardRefExoticComponent<NotificationProps & React_2.RefAttributes<PieNotification_2> & ReactBaseType>;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @tagname pie-notification
|
|
@@ -16,4 +16,6 @@ declare class PieNotification_2 extends LitElement implements NotificationProps
|
|
|
16
16
|
static styles: CSSResult;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
declare type ReactBaseType = React_2.HTMLAttributes<HTMLDivElement>;
|
|
20
|
+
|
|
19
21
|
export { }
|
package/dist/react.js
CHANGED
|
@@ -3,13 +3,13 @@ import { createComponent as t } from "@lit/react";
|
|
|
3
3
|
import { PieNotification as o } from "./index.js";
|
|
4
4
|
import "lit";
|
|
5
5
|
import "@justeattakeaway/pie-webc-core";
|
|
6
|
-
const
|
|
6
|
+
const e = t({
|
|
7
7
|
displayName: "PieNotification",
|
|
8
8
|
elementClass: o,
|
|
9
9
|
react: i,
|
|
10
10
|
tagName: "pie-notification",
|
|
11
11
|
events: {}
|
|
12
|
-
});
|
|
12
|
+
}), r = e;
|
|
13
13
|
export {
|
|
14
14
|
r as PieNotification
|
|
15
15
|
};
|
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.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
35
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
36
|
-
"@justeattakeaway/pie-wrapper-react": "0.
|
|
35
|
+
"@justeattakeaway/pie-components-config": "0.9.0",
|
|
36
|
+
"@justeattakeaway/pie-wrapper-react": "0.13.0",
|
|
37
37
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
40
|
+
"@justeattakeaway/pie-webc-core": "0.17.0"
|
|
41
41
|
},
|
|
42
42
|
"volta": {
|
|
43
43
|
"extends": "../../../package.json"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* TODO: Update the React base type as soon as the notification component markup is defined
|
|
4
|
+
* Use the React IntrinsicElements interface to find how to map standard HTML elements to existing React Interfaces
|
|
5
|
+
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0bb210867d16170c4a08d9ce5d132817651a0f80/types/react/index.d.ts#L2829
|
|
6
|
+
*/
|
|
7
|
+
export type ReactBaseType = React.HTMLAttributes<HTMLDivElement>
|
package/src/react.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { createComponent } from '@lit/react';
|
|
4
|
-
import { PieNotification as
|
|
3
|
+
import { PieNotification as PieNotificationLit } from './index';
|
|
4
|
+
import { NotificationProps } from './defs';
|
|
5
5
|
|
|
6
6
|
export * from './defs';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const PieNotificationReact = createComponent({
|
|
9
9
|
displayName: 'PieNotification',
|
|
10
|
-
elementClass:
|
|
10
|
+
elementClass: PieNotificationLit,
|
|
11
11
|
react: React,
|
|
12
12
|
tagName: 'pie-notification',
|
|
13
13
|
events: {},
|
|
14
14
|
});
|
|
15
|
+
|
|
16
|
+
type ReactBaseType = React.HTMLAttributes<HTMLDivElement>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export const PieNotification = PieNotificationReact as React.ForwardRefExoticComponent<React.PropsWithoutRef<NotificationProps> & React.RefAttributes<PieNotificationLit> & ReactBaseType>;
|