@justeattakeaway/pie-card 0.21.2 → 0.21.3

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.
@@ -88,18 +88,12 @@
88
88
  {
89
89
  "kind": "field",
90
90
  "name": "tag",
91
- "type": {
92
- "text": "CardProps['tag']"
93
- },
94
91
  "privacy": "public",
95
92
  "attribute": "tag"
96
93
  },
97
94
  {
98
95
  "kind": "field",
99
96
  "name": "variant",
100
- "type": {
101
- "text": "CardProps['variant']"
102
- },
103
97
  "privacy": "public",
104
98
  "attribute": "variant"
105
99
  },
@@ -107,7 +101,7 @@
107
101
  "kind": "field",
108
102
  "name": "href",
109
103
  "type": {
110
- "text": "string | undefined"
104
+ "text": "CardProps['href']"
111
105
  },
112
106
  "privacy": "public",
113
107
  "attribute": "href",
@@ -117,7 +111,7 @@
117
111
  "kind": "field",
118
112
  "name": "target",
119
113
  "type": {
120
- "text": "string | undefined"
114
+ "text": "CardProps['target']"
121
115
  },
122
116
  "privacy": "public",
123
117
  "attribute": "target",
@@ -127,7 +121,7 @@
127
121
  "kind": "field",
128
122
  "name": "rel",
129
123
  "type": {
130
- "text": "string | undefined"
124
+ "text": "CardProps['rel']"
131
125
  },
132
126
  "privacy": "public",
133
127
  "attribute": "rel",
@@ -143,7 +137,7 @@
143
137
  "kind": "field",
144
138
  "name": "aria",
145
139
  "type": {
146
- "text": "CardProps['aria'] | undefined"
140
+ "text": "CardProps['aria']"
147
141
  },
148
142
  "privacy": "public",
149
143
  "attribute": "aria"
@@ -158,7 +152,7 @@
158
152
  "kind": "field",
159
153
  "name": "padding",
160
154
  "type": {
161
- "text": "CardProps['padding'] | undefined"
155
+ "text": "CardProps['padding']"
162
156
  },
163
157
  "privacy": "public",
164
158
  "attribute": "padding"
@@ -254,36 +248,30 @@
254
248
  "attributes": [
255
249
  {
256
250
  "name": "tag",
257
- "type": {
258
- "text": "CardProps['tag']"
259
- },
260
251
  "fieldName": "tag"
261
252
  },
262
253
  {
263
254
  "name": "variant",
264
- "type": {
265
- "text": "CardProps['variant']"
266
- },
267
255
  "fieldName": "variant"
268
256
  },
269
257
  {
270
258
  "name": "href",
271
259
  "type": {
272
- "text": "string | undefined"
260
+ "text": "CardProps['href']"
273
261
  },
274
262
  "fieldName": "href"
275
263
  },
276
264
  {
277
265
  "name": "target",
278
266
  "type": {
279
- "text": "string | undefined"
267
+ "text": "CardProps['target']"
280
268
  },
281
269
  "fieldName": "target"
282
270
  },
283
271
  {
284
272
  "name": "rel",
285
273
  "type": {
286
- "text": "string | undefined"
274
+ "text": "CardProps['rel']"
287
275
  },
288
276
  "fieldName": "rel"
289
277
  },
@@ -294,7 +282,7 @@
294
282
  {
295
283
  "name": "aria",
296
284
  "type": {
297
- "text": "CardProps['aria'] | undefined"
285
+ "text": "CardProps['aria']"
298
286
  },
299
287
  "fieldName": "aria"
300
288
  },
@@ -305,7 +293,7 @@
305
293
  {
306
294
  "name": "padding",
307
295
  "type": {
308
- "text": "CardProps['padding'] | undefined"
296
+ "text": "CardProps['padding']"
309
297
  },
310
298
  "fieldName": "padding"
311
299
  }
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import type { LitElement } from 'lit';
4
4
  import type { PropertyValues } from 'lit';
5
5
  import type { TemplateResult } from 'lit';
6
6
 
7
- export declare type AriaProps = {
7
+ declare type AriaProps = {
8
8
  label?: string;
9
9
  };
10
10
 
@@ -61,15 +61,15 @@ export declare const paddingValues: string[];
61
61
  * @tagname pie-card
62
62
  */
63
63
  export declare class PieCard extends LitElement implements CardProps {
64
- tag: CardProps['tag'];
65
- variant: CardProps['variant'];
66
- href?: string;
67
- target?: string;
68
- rel?: string;
64
+ tag: "a" | "button";
65
+ variant: "default" | "outline" | "inverse" | "outline-inverse";
66
+ href: CardProps['href'];
67
+ target: CardProps['target'];
68
+ rel: CardProps['rel'];
69
69
  disabled: boolean;
70
- aria?: CardProps['aria'];
70
+ aria: CardProps['aria'];
71
71
  isDraggable: boolean;
72
- padding?: CardProps['padding'];
72
+ padding: CardProps['padding'];
73
73
  private assignedElements?;
74
74
  private onClickHandler;
75
75
  /**
package/dist/index.js CHANGED
@@ -137,11 +137,11 @@ const p = "pie-card", h = class h extends S {
137
137
  h.styles = $(k);
138
138
  let t = h;
139
139
  c([
140
- d(),
140
+ d({ type: String }),
141
141
  b(p, O, s.tag)
142
142
  ], t.prototype, "tag");
143
143
  c([
144
- d(),
144
+ d({ type: String }),
145
145
  b(p, E, s.variant)
146
146
  ], t.prototype, "variant");
147
147
  c([
package/dist/react.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { PropertyValues } from 'lit';
5
5
  import * as React_2 from 'react';
6
6
  import type { TemplateResult } from 'lit';
7
7
 
8
- export declare type AriaProps = {
8
+ declare type AriaProps = {
9
9
  label?: string;
10
10
  };
11
11
 
@@ -64,15 +64,15 @@ export declare const PieCard: React_2.ForwardRefExoticComponent<CardProps & Reac
64
64
  * @tagname pie-card
65
65
  */
66
66
  declare class PieCard_2 extends LitElement implements CardProps {
67
- tag: CardProps['tag'];
68
- variant: CardProps['variant'];
69
- href?: string;
70
- target?: string;
71
- rel?: string;
67
+ tag: "a" | "button";
68
+ variant: "default" | "outline" | "inverse" | "outline-inverse";
69
+ href: CardProps['href'];
70
+ target: CardProps['target'];
71
+ rel: CardProps['rel'];
72
72
  disabled: boolean;
73
- aria?: CardProps['aria'];
73
+ aria: CardProps['aria'];
74
74
  isDraggable: boolean;
75
- padding?: CardProps['padding'];
75
+ padding: CardProps['padding'];
76
76
  private assignedElements?;
77
77
  private onClickHandler;
78
78
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-card",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "description": "PIE Design System Card built using Web Components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/defs.ts CHANGED
@@ -8,7 +8,7 @@ export const paddingValues = spacingTokens.flatMap((first) => [first, ...spacing
8
8
 
9
9
  type PaddingValue = typeof spacingTokens[number];
10
10
 
11
- export type AriaProps = {
11
+ type AriaProps = {
12
12
  label?: string;
13
13
  };
14
14
 
package/src/index.ts CHANGED
@@ -23,35 +23,35 @@ const componentSelector = 'pie-card';
23
23
  * @tagname pie-card
24
24
  */
25
25
  export class PieCard extends LitElement implements CardProps {
26
- @property()
26
+ @property({ type: String })
27
27
  @validPropertyValues(componentSelector, tags, defaultProps.tag)
28
- public tag: CardProps['tag'] = defaultProps.tag;
28
+ public tag = defaultProps.tag;
29
29
 
30
- @property()
30
+ @property({ type: String })
31
31
  @validPropertyValues(componentSelector, variants, defaultProps.variant)
32
- public variant: CardProps['variant'] = defaultProps.variant;
32
+ public variant = defaultProps.variant;
33
33
 
34
34
  @property({ type: String, reflect: true })
35
- public href?: string;
35
+ public href: CardProps['href'];
36
36
 
37
37
  @property({ type: String, reflect: true })
38
- public target?: string;
38
+ public target: CardProps['target'];
39
39
 
40
40
  @property({ type: String, reflect: true })
41
- public rel?: string;
41
+ public rel: CardProps['rel'];
42
42
 
43
43
  @property({ type: Boolean })
44
44
  public disabled = defaultProps.disabled;
45
45
 
46
46
  @property({ type: Object })
47
- public aria?: CardProps['aria'];
47
+ public aria: CardProps['aria'];
48
48
 
49
49
  @property({ type: Boolean })
50
50
  public isDraggable = defaultProps.isDraggable;
51
51
 
52
52
  @property({ type: String })
53
53
  @validPropertyValues(componentSelector, paddingValues, undefined)
54
- public padding?: CardProps['padding'];
54
+ public padding: CardProps['padding'];
55
55
 
56
56
  @queryAssignedElements({ flatten: true })
57
57
  private assignedElements?: HTMLElement[];