@justeattakeaway/pie-tag 0.3.0 → 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 +6 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/react.d.ts +7 -5
- package/dist/react.js +6 -6
- package/package.json +4 -4
- package/src/defs-react.ts +3 -0
- package/src/defs.ts +3 -3
- package/src/index.ts +2 -2
- package/src/react.ts +10 -4
package/custom-elements.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -21,15 +21,15 @@ export declare interface TagProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* What style variant the tag should be such as neutral/ghost etc.
|
|
23
23
|
*/
|
|
24
|
-
variant
|
|
24
|
+
variant?: typeof variants[number];
|
|
25
25
|
/**
|
|
26
26
|
* When true, the 'green', "yellow", "red", "blue" and "neutral" variants change their styles and become bolder
|
|
27
27
|
*/
|
|
28
|
-
isStrong
|
|
28
|
+
isStrong?: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* What size the tag should be.
|
|
31
31
|
*/
|
|
32
|
-
size
|
|
32
|
+
size?: typeof sizes[number];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export declare const variants: readonly ["neutral-alternative", "neutral", "outline", "ghost", "blue", "green", "yellow", "red", "brand"];
|
package/dist/index.js
CHANGED
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CSSResult } from 'lit';
|
|
2
2
|
import type { LitElement } from 'lit';
|
|
3
|
-
import
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
4
|
import type { TemplateResult } from 'lit-html';
|
|
5
5
|
|
|
6
|
-
export declare const PieTag:
|
|
6
|
+
export declare const PieTag: React_2.ForwardRefExoticComponent<TagProps & React_2.RefAttributes<PieTag_2> & ReactBaseType>;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @tagname pie-tag
|
|
@@ -18,21 +18,23 @@ declare class PieTag_2 extends LitElement implements TagProps {
|
|
|
18
18
|
static styles: CSSResult;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
declare type ReactBaseType = React_2.HTMLAttributes<HTMLSpanElement>;
|
|
22
|
+
|
|
21
23
|
export declare const sizes: readonly ["small", "large"];
|
|
22
24
|
|
|
23
25
|
export declare interface TagProps {
|
|
24
26
|
/**
|
|
25
27
|
* What style variant the tag should be such as neutral/ghost etc.
|
|
26
28
|
*/
|
|
27
|
-
variant
|
|
29
|
+
variant?: typeof variants[number];
|
|
28
30
|
/**
|
|
29
31
|
* When true, the 'green', "yellow", "red", "blue" and "neutral" variants change their styles and become bolder
|
|
30
32
|
*/
|
|
31
|
-
isStrong
|
|
33
|
+
isStrong?: boolean;
|
|
32
34
|
/**
|
|
33
35
|
* What size the tag should be.
|
|
34
36
|
*/
|
|
35
|
-
size
|
|
37
|
+
size?: typeof sizes[number];
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export declare const variants: readonly ["neutral-alternative", "neutral", "outline", "ghost", "blue", "green", "yellow", "red", "brand"];
|
package/dist/react.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
import { createComponent as t } from "@lit/react";
|
|
3
3
|
import { PieTag as a } from "./index.js";
|
|
4
|
-
import { sizes as
|
|
4
|
+
import { sizes as P, variants as T } from "./index.js";
|
|
5
5
|
import "lit";
|
|
6
6
|
import "lit/decorators.js";
|
|
7
7
|
import "@justeattakeaway/pie-webc-core";
|
|
8
|
-
const
|
|
8
|
+
const o = t({
|
|
9
9
|
displayName: "PieTag",
|
|
10
10
|
elementClass: a,
|
|
11
11
|
react: e,
|
|
12
12
|
tagName: "pie-tag",
|
|
13
13
|
events: {}
|
|
14
|
-
});
|
|
14
|
+
}), g = o;
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
g as PieTag,
|
|
17
|
+
P as sizes,
|
|
18
|
+
T as variants
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-tag",
|
|
3
3
|
"description": "PIE Design System Tag 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",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
35
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
36
|
-
"@justeattakeaway/pie-wrapper-react": "0.
|
|
35
|
+
"@justeattakeaway/pie-components-config": "0.9.0",
|
|
36
|
+
"@justeattakeaway/pie-wrapper-react": "0.13.0",
|
|
37
37
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
40
|
+
"@justeattakeaway/pie-webc-core": "0.17.0"
|
|
41
41
|
},
|
|
42
42
|
"volta": {
|
|
43
43
|
"extends": "../../../package.json"
|
package/src/defs.ts
CHANGED
|
@@ -5,15 +5,15 @@ export interface TagProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* What style variant the tag should be such as neutral/ghost etc.
|
|
7
7
|
*/
|
|
8
|
-
variant
|
|
8
|
+
variant?: typeof variants[number];
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* When true, the 'green', "yellow", "red", "blue" and "neutral" variants change their styles and become bolder
|
|
12
12
|
*/
|
|
13
|
-
isStrong
|
|
13
|
+
isStrong?: boolean;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* What size the tag should be.
|
|
17
17
|
*/
|
|
18
|
-
size
|
|
18
|
+
size?: typeof sizes[number];
|
|
19
19
|
}
|
package/src/index.ts
CHANGED
|
@@ -37,8 +37,8 @@ export class PieTag extends LitElement implements TagProps {
|
|
|
37
37
|
return html`
|
|
38
38
|
<div
|
|
39
39
|
class="c-tag"
|
|
40
|
-
variant=${variant}
|
|
41
|
-
size=${size}
|
|
40
|
+
variant=${variant || 'neutral'}
|
|
41
|
+
size=${size || 'large'}
|
|
42
42
|
?isStrong=${isStrong}
|
|
43
43
|
data-test-id="pie-tag"
|
|
44
44
|
>
|
package/src/react.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { createComponent } from '@lit/react';
|
|
4
|
-
import { PieTag as
|
|
3
|
+
import { PieTag as PieTagLit } from './index';
|
|
4
|
+
import { TagProps } from './defs';
|
|
5
5
|
|
|
6
6
|
export * from './defs';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const PieTagReact = createComponent({
|
|
9
9
|
displayName: 'PieTag',
|
|
10
|
-
elementClass:
|
|
10
|
+
elementClass: PieTagLit,
|
|
11
11
|
react: React,
|
|
12
12
|
tagName: 'pie-tag',
|
|
13
13
|
events: {},
|
|
14
14
|
});
|
|
15
|
+
|
|
16
|
+
type ReactBaseType = React.HTMLAttributes<HTMLSpanElement>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export const PieTag = PieTagReact as React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<PieTagLit> & ReactBaseType>;
|