@justeattakeaway/pie-spinner 0.3.2 → 0.4.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 +137 -0
- package/package.json +11 -4
- package/src/react.ts +14 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/defs.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "sizes",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "['xsmall', 'small', 'medium', 'large', 'xlarge']"
|
|
14
|
+
},
|
|
15
|
+
"default": "['xsmall', 'small', 'medium', 'large', 'xlarge']"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "variable",
|
|
19
|
+
"name": "variants",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "['brand', 'secondary', 'inverse']"
|
|
22
|
+
},
|
|
23
|
+
"default": "['brand', 'secondary', 'inverse']"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"exports": [
|
|
27
|
+
{
|
|
28
|
+
"kind": "js",
|
|
29
|
+
"name": "sizes",
|
|
30
|
+
"declaration": {
|
|
31
|
+
"name": "sizes",
|
|
32
|
+
"module": "src/defs.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"kind": "js",
|
|
37
|
+
"name": "variants",
|
|
38
|
+
"declaration": {
|
|
39
|
+
"name": "variants",
|
|
40
|
+
"module": "src/defs.js"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"kind": "javascript-module",
|
|
47
|
+
"path": "src/index.js",
|
|
48
|
+
"declarations": [
|
|
49
|
+
{
|
|
50
|
+
"kind": "class",
|
|
51
|
+
"description": "",
|
|
52
|
+
"name": "PieSpinner",
|
|
53
|
+
"members": [
|
|
54
|
+
{
|
|
55
|
+
"kind": "field",
|
|
56
|
+
"name": "aria",
|
|
57
|
+
"type": {
|
|
58
|
+
"text": "AriaProps | undefined"
|
|
59
|
+
},
|
|
60
|
+
"privacy": "public",
|
|
61
|
+
"attribute": "aria"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"kind": "field",
|
|
65
|
+
"name": "size",
|
|
66
|
+
"type": {
|
|
67
|
+
"text": "SpinnerProps['size'] | undefined"
|
|
68
|
+
},
|
|
69
|
+
"privacy": "public",
|
|
70
|
+
"default": "'medium'",
|
|
71
|
+
"attribute": "size"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "field",
|
|
75
|
+
"name": "variant",
|
|
76
|
+
"type": {
|
|
77
|
+
"text": "SpinnerProps['variant'] | undefined"
|
|
78
|
+
},
|
|
79
|
+
"privacy": "public",
|
|
80
|
+
"default": "'brand'",
|
|
81
|
+
"attribute": "variant"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"attributes": [
|
|
85
|
+
{
|
|
86
|
+
"name": "aria",
|
|
87
|
+
"type": {
|
|
88
|
+
"text": "AriaProps | undefined"
|
|
89
|
+
},
|
|
90
|
+
"fieldName": "aria"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "size",
|
|
94
|
+
"type": {
|
|
95
|
+
"text": "SpinnerProps['size'] | undefined"
|
|
96
|
+
},
|
|
97
|
+
"default": "'medium'",
|
|
98
|
+
"fieldName": "size"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "variant",
|
|
102
|
+
"type": {
|
|
103
|
+
"text": "SpinnerProps['variant'] | undefined"
|
|
104
|
+
},
|
|
105
|
+
"default": "'brand'",
|
|
106
|
+
"fieldName": "variant"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"superclass": {
|
|
110
|
+
"name": "LitElement",
|
|
111
|
+
"package": "lit"
|
|
112
|
+
},
|
|
113
|
+
"tagName": "pie-spinner",
|
|
114
|
+
"customElement": true
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"exports": [
|
|
118
|
+
{
|
|
119
|
+
"kind": "js",
|
|
120
|
+
"name": "*",
|
|
121
|
+
"declaration": {
|
|
122
|
+
"name": "*",
|
|
123
|
+
"package": "./defs"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "js",
|
|
128
|
+
"name": "PieSpinner",
|
|
129
|
+
"declaration": {
|
|
130
|
+
"name": "PieSpinner",
|
|
131
|
+
"module": "src/index.js"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-spinner",
|
|
3
3
|
"description": "PIE Design System Spinner built using Web Components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.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 run 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.8.0",
|
|
36
|
+
"@justeattakeaway/pie-wrapper-react": "0.12.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.16.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,14 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { createComponent } from '@lit/react';
|
|
4
|
+
import { PieSpinner as PieSpinnerReact } from './index';
|
|
5
|
+
|
|
6
|
+
export * from './defs';
|
|
7
|
+
|
|
8
|
+
export const PieSpinner = createComponent({
|
|
9
|
+
displayName: 'PieSpinner',
|
|
10
|
+
elementClass: PieSpinnerReact,
|
|
11
|
+
react: React,
|
|
12
|
+
tagName: 'pie-spinner',
|
|
13
|
+
events: {},
|
|
14
|
+
});
|