@justeattakeaway/pie-link 0.12.2 → 0.13.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,421 @@
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', 'high-visibility', 'inverse']"
14
+ },
15
+ "default": "['default', 'high-visibility', 'inverse']"
16
+ },
17
+ {
18
+ "kind": "variable",
19
+ "name": "sizes",
20
+ "type": {
21
+ "text": "['small', 'medium']"
22
+ },
23
+ "default": "['small', 'medium']"
24
+ },
25
+ {
26
+ "kind": "variable",
27
+ "name": "iconPlacements",
28
+ "type": {
29
+ "text": "['leading', 'trailing']"
30
+ },
31
+ "default": "['leading', 'trailing']"
32
+ },
33
+ {
34
+ "kind": "variable",
35
+ "name": "tags",
36
+ "type": {
37
+ "text": "['a', 'button']"
38
+ },
39
+ "default": "['a', 'button']"
40
+ },
41
+ {
42
+ "kind": "variable",
43
+ "name": "buttonTypes",
44
+ "type": {
45
+ "text": "['submit', 'button', 'reset', 'menu']"
46
+ },
47
+ "default": "['submit', 'button', 'reset', 'menu']"
48
+ },
49
+ {
50
+ "kind": "variable",
51
+ "name": "underlineTypes",
52
+ "type": {
53
+ "text": "['default', 'reversed']"
54
+ },
55
+ "default": "['default', 'reversed']"
56
+ }
57
+ ],
58
+ "exports": [
59
+ {
60
+ "kind": "js",
61
+ "name": "variants",
62
+ "declaration": {
63
+ "name": "variants",
64
+ "module": "src/defs.js"
65
+ }
66
+ },
67
+ {
68
+ "kind": "js",
69
+ "name": "sizes",
70
+ "declaration": {
71
+ "name": "sizes",
72
+ "module": "src/defs.js"
73
+ }
74
+ },
75
+ {
76
+ "kind": "js",
77
+ "name": "iconPlacements",
78
+ "declaration": {
79
+ "name": "iconPlacements",
80
+ "module": "src/defs.js"
81
+ }
82
+ },
83
+ {
84
+ "kind": "js",
85
+ "name": "tags",
86
+ "declaration": {
87
+ "name": "tags",
88
+ "module": "src/defs.js"
89
+ }
90
+ },
91
+ {
92
+ "kind": "js",
93
+ "name": "buttonTypes",
94
+ "declaration": {
95
+ "name": "buttonTypes",
96
+ "module": "src/defs.js"
97
+ }
98
+ },
99
+ {
100
+ "kind": "js",
101
+ "name": "underlineTypes",
102
+ "declaration": {
103
+ "name": "underlineTypes",
104
+ "module": "src/defs.js"
105
+ }
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "kind": "javascript-module",
111
+ "path": "src/index.js",
112
+ "declarations": [
113
+ {
114
+ "kind": "class",
115
+ "description": "",
116
+ "name": "PieLink",
117
+ "slots": [
118
+ {
119
+ "description": "The icon slot",
120
+ "name": "icon"
121
+ },
122
+ {
123
+ "description": "Default slot",
124
+ "name": ""
125
+ }
126
+ ],
127
+ "members": [
128
+ {
129
+ "kind": "field",
130
+ "name": "tag",
131
+ "type": {
132
+ "text": "LinkProps['tag']"
133
+ },
134
+ "privacy": "public",
135
+ "default": "'a'",
136
+ "attribute": "tag"
137
+ },
138
+ {
139
+ "kind": "field",
140
+ "name": "variant",
141
+ "type": {
142
+ "text": "LinkProps['variant']"
143
+ },
144
+ "privacy": "public",
145
+ "default": "'default'",
146
+ "attribute": "variant"
147
+ },
148
+ {
149
+ "kind": "field",
150
+ "name": "size",
151
+ "type": {
152
+ "text": "LinkProps['size']"
153
+ },
154
+ "privacy": "public",
155
+ "default": "'medium'",
156
+ "attribute": "size"
157
+ },
158
+ {
159
+ "kind": "field",
160
+ "name": "underline",
161
+ "type": {
162
+ "text": "LinkProps['underline']"
163
+ },
164
+ "privacy": "public",
165
+ "default": "'default'",
166
+ "attribute": "underline"
167
+ },
168
+ {
169
+ "kind": "field",
170
+ "name": "iconPlacement",
171
+ "type": {
172
+ "text": "LinkProps['iconPlacement']"
173
+ },
174
+ "privacy": "public",
175
+ "default": "'leading'",
176
+ "attribute": "iconPlacement"
177
+ },
178
+ {
179
+ "kind": "field",
180
+ "name": "href",
181
+ "type": {
182
+ "text": "string | undefined"
183
+ },
184
+ "privacy": "public",
185
+ "attribute": "href",
186
+ "reflects": true
187
+ },
188
+ {
189
+ "kind": "field",
190
+ "name": "target",
191
+ "type": {
192
+ "text": "string | undefined"
193
+ },
194
+ "privacy": "public",
195
+ "attribute": "target",
196
+ "reflects": true
197
+ },
198
+ {
199
+ "kind": "field",
200
+ "name": "rel",
201
+ "type": {
202
+ "text": "string | undefined"
203
+ },
204
+ "privacy": "public",
205
+ "attribute": "rel",
206
+ "reflects": true
207
+ },
208
+ {
209
+ "kind": "field",
210
+ "name": "isBold",
211
+ "type": {
212
+ "text": "boolean"
213
+ },
214
+ "privacy": "public",
215
+ "default": "false",
216
+ "attribute": "isBold"
217
+ },
218
+ {
219
+ "kind": "field",
220
+ "name": "isStandalone",
221
+ "type": {
222
+ "text": "boolean"
223
+ },
224
+ "privacy": "public",
225
+ "default": "false",
226
+ "attribute": "isStandalone"
227
+ },
228
+ {
229
+ "kind": "field",
230
+ "name": "hasVisited",
231
+ "type": {
232
+ "text": "boolean"
233
+ },
234
+ "privacy": "public",
235
+ "default": "false",
236
+ "attribute": "hasVisited"
237
+ },
238
+ {
239
+ "kind": "field",
240
+ "name": "type",
241
+ "type": {
242
+ "text": "LinkProps['type']"
243
+ },
244
+ "privacy": "public",
245
+ "default": "'submit'",
246
+ "attribute": "type"
247
+ },
248
+ {
249
+ "kind": "field",
250
+ "name": "aria",
251
+ "type": {
252
+ "text": "AriaProps"
253
+ },
254
+ "privacy": "public",
255
+ "attribute": "aria"
256
+ },
257
+ {
258
+ "kind": "method",
259
+ "name": "renderContent",
260
+ "privacy": "private",
261
+ "return": {
262
+ "type": {
263
+ "text": "TemplateResult"
264
+ }
265
+ },
266
+ "description": "Renders the link content.\nIcons are only shown in block elements"
267
+ },
268
+ {
269
+ "kind": "method",
270
+ "name": "renderButton",
271
+ "privacy": "private",
272
+ "return": {
273
+ "type": {
274
+ "text": "TemplateResult"
275
+ }
276
+ },
277
+ "description": "Renders the link as a button element."
278
+ },
279
+ {
280
+ "kind": "method",
281
+ "name": "renderAnchor",
282
+ "privacy": "private",
283
+ "return": {
284
+ "type": {
285
+ "text": "TemplateResult"
286
+ }
287
+ },
288
+ "description": "Renders the link as an anchor element."
289
+ }
290
+ ],
291
+ "attributes": [
292
+ {
293
+ "name": "tag",
294
+ "type": {
295
+ "text": "LinkProps['tag']"
296
+ },
297
+ "default": "'a'",
298
+ "fieldName": "tag"
299
+ },
300
+ {
301
+ "name": "variant",
302
+ "type": {
303
+ "text": "LinkProps['variant']"
304
+ },
305
+ "default": "'default'",
306
+ "fieldName": "variant"
307
+ },
308
+ {
309
+ "name": "size",
310
+ "type": {
311
+ "text": "LinkProps['size']"
312
+ },
313
+ "default": "'medium'",
314
+ "fieldName": "size"
315
+ },
316
+ {
317
+ "name": "underline",
318
+ "type": {
319
+ "text": "LinkProps['underline']"
320
+ },
321
+ "default": "'default'",
322
+ "fieldName": "underline"
323
+ },
324
+ {
325
+ "name": "iconPlacement",
326
+ "type": {
327
+ "text": "LinkProps['iconPlacement']"
328
+ },
329
+ "default": "'leading'",
330
+ "fieldName": "iconPlacement"
331
+ },
332
+ {
333
+ "name": "href",
334
+ "type": {
335
+ "text": "string | undefined"
336
+ },
337
+ "fieldName": "href"
338
+ },
339
+ {
340
+ "name": "target",
341
+ "type": {
342
+ "text": "string | undefined"
343
+ },
344
+ "fieldName": "target"
345
+ },
346
+ {
347
+ "name": "rel",
348
+ "type": {
349
+ "text": "string | undefined"
350
+ },
351
+ "fieldName": "rel"
352
+ },
353
+ {
354
+ "name": "isBold",
355
+ "type": {
356
+ "text": "boolean"
357
+ },
358
+ "default": "false",
359
+ "fieldName": "isBold"
360
+ },
361
+ {
362
+ "name": "isStandalone",
363
+ "type": {
364
+ "text": "boolean"
365
+ },
366
+ "default": "false",
367
+ "fieldName": "isStandalone"
368
+ },
369
+ {
370
+ "name": "hasVisited",
371
+ "type": {
372
+ "text": "boolean"
373
+ },
374
+ "default": "false",
375
+ "fieldName": "hasVisited"
376
+ },
377
+ {
378
+ "name": "type",
379
+ "type": {
380
+ "text": "LinkProps['type']"
381
+ },
382
+ "default": "'submit'",
383
+ "fieldName": "type"
384
+ },
385
+ {
386
+ "name": "aria",
387
+ "type": {
388
+ "text": "AriaProps"
389
+ },
390
+ "fieldName": "aria"
391
+ }
392
+ ],
393
+ "superclass": {
394
+ "name": "LitElement",
395
+ "package": "lit"
396
+ },
397
+ "tagName": "pie-link",
398
+ "customElement": true
399
+ }
400
+ ],
401
+ "exports": [
402
+ {
403
+ "kind": "js",
404
+ "name": "*",
405
+ "declaration": {
406
+ "name": "*",
407
+ "package": "./defs"
408
+ }
409
+ },
410
+ {
411
+ "kind": "js",
412
+ "name": "PieLink",
413
+ "declaration": {
414
+ "name": "PieLink",
415
+ "module": "src/index.js"
416
+ }
417
+ }
418
+ ]
419
+ }
420
+ ]
421
+ }
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-link",
3
3
  "description": "PIE Design System Link built using Web Components",
4
- "version": "0.12.2",
4
+ "version": "0.13.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": "yarn build:wrapper pie-link && 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.15.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 { PieLink as PieLinkReact } from './index';
5
+
6
+ export * from './defs';
7
+
8
+ export const PieLink = createComponent({
9
+ displayName: 'PieLink',
10
+ elementClass: PieLinkReact,
11
+ react: React,
12
+ tagName: 'pie-link',
13
+ events: {},
14
+ });