@justeattakeaway/pie-card 0.15.1 → 0.16.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.
@@ -0,0 +1,274 @@
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": "variants",
12
+ "type": {
13
+ "text": "['default', 'outline', 'inverse', 'outline-inverse']"
14
+ },
15
+ "default": "['default', 'outline', 'inverse', 'outline-inverse']"
16
+ },
17
+ {
18
+ "kind": "variable",
19
+ "name": "tags",
20
+ "type": {
21
+ "text": "['a', 'button']"
22
+ },
23
+ "default": "['a', 'button']"
24
+ },
25
+ {
26
+ "kind": "variable",
27
+ "name": "paddingValues"
28
+ }
29
+ ],
30
+ "exports": [
31
+ {
32
+ "kind": "js",
33
+ "name": "variants",
34
+ "declaration": {
35
+ "name": "variants",
36
+ "module": "src/defs.js"
37
+ }
38
+ },
39
+ {
40
+ "kind": "js",
41
+ "name": "tags",
42
+ "declaration": {
43
+ "name": "tags",
44
+ "module": "src/defs.js"
45
+ }
46
+ },
47
+ {
48
+ "kind": "js",
49
+ "name": "paddingValues",
50
+ "declaration": {
51
+ "name": "paddingValues",
52
+ "module": "src/defs.js"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "kind": "javascript-module",
59
+ "path": "src/index.js",
60
+ "declarations": [
61
+ {
62
+ "kind": "class",
63
+ "description": "",
64
+ "name": "PieCard",
65
+ "members": [
66
+ {
67
+ "kind": "field",
68
+ "name": "tag",
69
+ "type": {
70
+ "text": "CardProps['tag']"
71
+ },
72
+ "privacy": "public",
73
+ "default": "'button'",
74
+ "attribute": "tag"
75
+ },
76
+ {
77
+ "kind": "field",
78
+ "name": "variant",
79
+ "type": {
80
+ "text": "CardProps['variant']"
81
+ },
82
+ "privacy": "public",
83
+ "default": "'default'",
84
+ "attribute": "variant"
85
+ },
86
+ {
87
+ "kind": "field",
88
+ "name": "href",
89
+ "type": {
90
+ "text": "string | undefined"
91
+ },
92
+ "privacy": "public",
93
+ "attribute": "href",
94
+ "reflects": true
95
+ },
96
+ {
97
+ "kind": "field",
98
+ "name": "target",
99
+ "type": {
100
+ "text": "string | undefined"
101
+ },
102
+ "privacy": "public",
103
+ "attribute": "target",
104
+ "reflects": true
105
+ },
106
+ {
107
+ "kind": "field",
108
+ "name": "rel",
109
+ "type": {
110
+ "text": "string | undefined"
111
+ },
112
+ "privacy": "public",
113
+ "attribute": "rel",
114
+ "reflects": true
115
+ },
116
+ {
117
+ "kind": "field",
118
+ "name": "disabled",
119
+ "type": {
120
+ "text": "boolean"
121
+ },
122
+ "privacy": "public",
123
+ "default": "false",
124
+ "attribute": "disabled"
125
+ },
126
+ {
127
+ "kind": "field",
128
+ "name": "aria",
129
+ "type": {
130
+ "text": "CardProps['aria']"
131
+ },
132
+ "privacy": "public",
133
+ "attribute": "aria"
134
+ },
135
+ {
136
+ "kind": "field",
137
+ "name": "isDraggable",
138
+ "type": {
139
+ "text": "boolean"
140
+ },
141
+ "privacy": "public",
142
+ "default": "false",
143
+ "attribute": "isDraggable"
144
+ },
145
+ {
146
+ "kind": "field",
147
+ "name": "padding",
148
+ "type": {
149
+ "text": "CardProps['padding'] | undefined"
150
+ },
151
+ "privacy": "public",
152
+ "attribute": "padding"
153
+ },
154
+ {
155
+ "kind": "method",
156
+ "name": "renderAnchor",
157
+ "privacy": "private",
158
+ "return": {
159
+ "type": {
160
+ "text": "TemplateResult"
161
+ }
162
+ },
163
+ "description": "Renders the card as an anchor element."
164
+ },
165
+ {
166
+ "kind": "method",
167
+ "name": "generatePaddingCSS",
168
+ "privacy": "private",
169
+ "return": {
170
+ "type": {
171
+ "text": "string"
172
+ }
173
+ },
174
+ "description": "Generates padding for the component based on `padding` values passed\nby the consumer.\n\n\nExample: 'a' or 'a, b'\nSingle values i.e `'a'` applies to all sides and `'a, b'` applies to: top & bottom, left & right"
175
+ }
176
+ ],
177
+ "attributes": [
178
+ {
179
+ "name": "tag",
180
+ "type": {
181
+ "text": "CardProps['tag']"
182
+ },
183
+ "default": "'button'",
184
+ "fieldName": "tag"
185
+ },
186
+ {
187
+ "name": "variant",
188
+ "type": {
189
+ "text": "CardProps['variant']"
190
+ },
191
+ "default": "'default'",
192
+ "fieldName": "variant"
193
+ },
194
+ {
195
+ "name": "href",
196
+ "type": {
197
+ "text": "string | undefined"
198
+ },
199
+ "fieldName": "href"
200
+ },
201
+ {
202
+ "name": "target",
203
+ "type": {
204
+ "text": "string | undefined"
205
+ },
206
+ "fieldName": "target"
207
+ },
208
+ {
209
+ "name": "rel",
210
+ "type": {
211
+ "text": "string | undefined"
212
+ },
213
+ "fieldName": "rel"
214
+ },
215
+ {
216
+ "name": "disabled",
217
+ "type": {
218
+ "text": "boolean"
219
+ },
220
+ "default": "false",
221
+ "fieldName": "disabled"
222
+ },
223
+ {
224
+ "name": "aria",
225
+ "type": {
226
+ "text": "CardProps['aria']"
227
+ },
228
+ "fieldName": "aria"
229
+ },
230
+ {
231
+ "name": "isDraggable",
232
+ "type": {
233
+ "text": "boolean"
234
+ },
235
+ "default": "false",
236
+ "fieldName": "isDraggable"
237
+ },
238
+ {
239
+ "name": "padding",
240
+ "type": {
241
+ "text": "CardProps['padding'] | undefined"
242
+ },
243
+ "fieldName": "padding"
244
+ }
245
+ ],
246
+ "superclass": {
247
+ "name": "LitElement",
248
+ "package": "lit"
249
+ },
250
+ "tagName": "pie-card",
251
+ "customElement": true
252
+ }
253
+ ],
254
+ "exports": [
255
+ {
256
+ "kind": "js",
257
+ "name": "*",
258
+ "declaration": {
259
+ "name": "*",
260
+ "package": "./defs"
261
+ }
262
+ },
263
+ {
264
+ "kind": "js",
265
+ "name": "PieCard",
266
+ "declaration": {
267
+ "name": "PieCard",
268
+ "module": "src/index.js"
269
+ }
270
+ }
271
+ ]
272
+ }
273
+ ]
274
+ }
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/react.d.ts CHANGED
File without changes
package/dist/react.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-card",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "PIE Design System Card built using Web Components",
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": "yarn build:wrapper pie-card && run -T vite 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
- "@justeattakeaway/pie-components-config": "0.7.0"
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.14.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 { PieCard as PieCardReact } from './index';
5
+
6
+ export * from './defs';
7
+
8
+ export const PieCard = createComponent({
9
+ displayName: 'PieCard',
10
+ elementClass: PieCardReact,
11
+ react: React,
12
+ tagName: 'pie-card',
13
+ events: {},
14
+ });