@justeattakeaway/pie-form-label 0.8.5 → 0.10.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 +122 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +0 -0
- package/dist/react.d.ts +6 -5
- package/dist/react.js +6 -6
- package/package.json +11 -4
- package/src/defs-react.ts +3 -0
- package/src/react.ts +20 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/defs-react.js",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"kind": "javascript-module",
|
|
13
|
+
"path": "src/defs.js",
|
|
14
|
+
"declarations": [],
|
|
15
|
+
"exports": []
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "javascript-module",
|
|
19
|
+
"path": "src/index.js",
|
|
20
|
+
"declarations": [
|
|
21
|
+
{
|
|
22
|
+
"kind": "class",
|
|
23
|
+
"description": "",
|
|
24
|
+
"name": "PieFormLabel",
|
|
25
|
+
"members": [
|
|
26
|
+
{
|
|
27
|
+
"kind": "field",
|
|
28
|
+
"name": "for",
|
|
29
|
+
"type": {
|
|
30
|
+
"text": "string | undefined"
|
|
31
|
+
},
|
|
32
|
+
"privacy": "public",
|
|
33
|
+
"attribute": "for",
|
|
34
|
+
"reflects": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "field",
|
|
38
|
+
"name": "optional",
|
|
39
|
+
"type": {
|
|
40
|
+
"text": "string | undefined"
|
|
41
|
+
},
|
|
42
|
+
"privacy": "public",
|
|
43
|
+
"attribute": "optional"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"kind": "field",
|
|
47
|
+
"name": "trailing",
|
|
48
|
+
"type": {
|
|
49
|
+
"text": "string | undefined"
|
|
50
|
+
},
|
|
51
|
+
"privacy": "public",
|
|
52
|
+
"attribute": "trailing"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "method",
|
|
56
|
+
"name": "_renderOptionalLabel",
|
|
57
|
+
"privacy": "private",
|
|
58
|
+
"return": {
|
|
59
|
+
"type": {
|
|
60
|
+
"text": "TemplateResult | typeof nothing"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"attributes": [
|
|
66
|
+
{
|
|
67
|
+
"name": "for",
|
|
68
|
+
"type": {
|
|
69
|
+
"text": "string | undefined"
|
|
70
|
+
},
|
|
71
|
+
"fieldName": "for"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "optional",
|
|
75
|
+
"type": {
|
|
76
|
+
"text": "string | undefined"
|
|
77
|
+
},
|
|
78
|
+
"fieldName": "optional"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "trailing",
|
|
82
|
+
"type": {
|
|
83
|
+
"text": "string | undefined"
|
|
84
|
+
},
|
|
85
|
+
"fieldName": "trailing"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"mixins": [
|
|
89
|
+
{
|
|
90
|
+
"name": "RtlMixin",
|
|
91
|
+
"package": "@justeattakeaway/pie-webc-core"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"superclass": {
|
|
95
|
+
"name": "LitElement",
|
|
96
|
+
"package": "lit"
|
|
97
|
+
},
|
|
98
|
+
"tagName": "pie-form-label",
|
|
99
|
+
"customElement": true
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"exports": [
|
|
103
|
+
{
|
|
104
|
+
"kind": "js",
|
|
105
|
+
"name": "*",
|
|
106
|
+
"declaration": {
|
|
107
|
+
"name": "*",
|
|
108
|
+
"package": "./defs"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"kind": "js",
|
|
113
|
+
"name": "PieFormLabel",
|
|
114
|
+
"declaration": {
|
|
115
|
+
"name": "PieFormLabel",
|
|
116
|
+
"module": "src/index.js"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSResult } from 'lit';
|
|
2
2
|
import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
|
+
import type { RTLInterface } from '@justeattakeaway/pie-webc-core';
|
|
4
5
|
import type { TemplateResult } from 'lit';
|
|
5
6
|
|
|
6
7
|
export declare interface FormLabelProps {
|
|
@@ -30,8 +31,6 @@ export declare class PieFormLabel extends PieFormLabel_base implements FormLabel
|
|
|
30
31
|
static styles: CSSResult;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
declare const PieFormLabel_base: GenericConstructor<
|
|
34
|
-
isRTL: boolean;
|
|
35
|
-
}> & typeof LitElement;
|
|
34
|
+
declare const PieFormLabel_base: GenericConstructor<RTLInterface> & typeof LitElement;
|
|
36
35
|
|
|
37
36
|
export { }
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/react.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CSSResult } from 'lit';
|
|
2
2
|
import type { GenericConstructor } from '@justeattakeaway/pie-webc-core';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
|
-
import
|
|
4
|
+
import * as React_2 from 'react';
|
|
5
|
+
import type { RTLInterface } from '@justeattakeaway/pie-webc-core';
|
|
5
6
|
import type { TemplateResult } from 'lit';
|
|
6
7
|
|
|
7
8
|
export declare interface FormLabelProps {
|
|
@@ -19,7 +20,7 @@ export declare interface FormLabelProps {
|
|
|
19
20
|
trailing?: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export declare const PieFormLabel:
|
|
23
|
+
export declare const PieFormLabel: React_2.ForwardRefExoticComponent<FormLabelProps & React_2.RefAttributes<PieFormLabel_2> & ReactBaseType>;
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* @tagname pie-form-label
|
|
@@ -33,8 +34,8 @@ declare class PieFormLabel_2 extends PieFormLabel_base implements FormLabelProps
|
|
|
33
34
|
static styles: CSSResult;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
declare const PieFormLabel_base: GenericConstructor<
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
declare const PieFormLabel_base: GenericConstructor<RTLInterface> & typeof LitElement;
|
|
38
|
+
|
|
39
|
+
declare type ReactBaseType = React_2.LabelHTMLAttributes<HTMLLabelElement>;
|
|
39
40
|
|
|
40
41
|
export { }
|
package/dist/react.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { PieFormLabel as
|
|
2
|
+
import { createComponent as o } from "@lit/react";
|
|
3
|
+
import { PieFormLabel as m } from "./index.js";
|
|
4
4
|
import "lit";
|
|
5
5
|
import "@justeattakeaway/pie-webc-core";
|
|
6
6
|
import "lit/decorators.js";
|
|
7
|
-
const
|
|
7
|
+
const r = o({
|
|
8
8
|
displayName: "PieFormLabel",
|
|
9
|
-
elementClass:
|
|
9
|
+
elementClass: m,
|
|
10
10
|
react: e,
|
|
11
11
|
tagName: "pie-form-label",
|
|
12
12
|
events: {}
|
|
13
|
-
});
|
|
13
|
+
}), s = r;
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
s as PieFormLabel
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-form-label",
|
|
3
3
|
"description": "PIE Design System Form Label built using Web Components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
|
+
"custom-elements.json",
|
|
10
11
|
"src",
|
|
11
12
|
"dist",
|
|
12
13
|
"**/*.d.ts"
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
|
15
|
-
"build": "
|
|
16
|
+
"build": "run -T vite build",
|
|
17
|
+
"build:react-wrapper": "npx build-react-wrapper",
|
|
18
|
+
"create:manifest": "yarn cem analyze --litelement",
|
|
16
19
|
"lint:scripts": "run -T eslint .",
|
|
17
20
|
"lint:scripts:fix": "yarn lint:scripts --fix",
|
|
18
21
|
"lint:style": "run -T stylelint ./src/**/*.{css,scss}",
|
|
@@ -28,14 +31,18 @@
|
|
|
28
31
|
"author": "Just Eat Takeaway.com - Design System Team",
|
|
29
32
|
"license": "Apache-2.0",
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@
|
|
34
|
+
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
35
|
+
"@justeattakeaway/pie-components-config": "0.9.0",
|
|
36
|
+
"@justeattakeaway/pie-wrapper-react": "0.13.0",
|
|
37
|
+
"cem-plugin-module-file-extensions": "0.0.5"
|
|
32
38
|
},
|
|
33
39
|
"dependencies": {
|
|
34
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
40
|
+
"@justeattakeaway/pie-webc-core": "0.17.0"
|
|
35
41
|
},
|
|
36
42
|
"volta": {
|
|
37
43
|
"extends": "../../../package.json"
|
|
38
44
|
},
|
|
45
|
+
"customElements": "custom-elements.json",
|
|
39
46
|
"sideEffects": [
|
|
40
47
|
"dist/*.js"
|
|
41
48
|
]
|
package/src/react.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { PieFormLabel as PieFormLabelLit } from './index';
|
|
4
|
+
import { FormLabelProps } from './defs';
|
|
5
|
+
|
|
6
|
+
export * from './defs';
|
|
7
|
+
|
|
8
|
+
const PieFormLabelReact = createComponent({
|
|
9
|
+
displayName: 'PieFormLabel',
|
|
10
|
+
elementClass: PieFormLabelLit,
|
|
11
|
+
react: React,
|
|
12
|
+
tagName: 'pie-form-label',
|
|
13
|
+
events: {},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
type ReactBaseType = React.LabelHTMLAttributes<HTMLLabelElement>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export const PieFormLabel = PieFormLabelReact as React.ForwardRefExoticComponent<React.PropsWithoutRef<FormLabelProps> & React.RefAttributes<PieFormLabelLit> & ReactBaseType>;
|