@justeattakeaway/pie-icon-button 0.25.2 → 0.26.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,168 @@
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']"
14
+ },
15
+ "default": "['xsmall', 'small', 'medium', 'large']"
16
+ },
17
+ {
18
+ "kind": "variable",
19
+ "name": "variants",
20
+ "type": {
21
+ "text": "['primary', 'secondary', 'outline', 'ghost',\n 'ghost-secondary', 'inverse', 'ghost-inverse']"
22
+ },
23
+ "default": "['primary', 'secondary', 'outline', 'ghost',\n 'ghost-secondary', 'inverse', 'ghost-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": "PieIconButton",
53
+ "members": [
54
+ {
55
+ "kind": "field",
56
+ "name": "size",
57
+ "type": {
58
+ "text": "IconButtonProps['size'] | undefined"
59
+ },
60
+ "privacy": "public",
61
+ "default": "'medium'",
62
+ "attribute": "size"
63
+ },
64
+ {
65
+ "kind": "field",
66
+ "name": "variant",
67
+ "type": {
68
+ "text": "IconButtonProps['variant'] | undefined"
69
+ },
70
+ "privacy": "public",
71
+ "default": "'primary'",
72
+ "attribute": "variant"
73
+ },
74
+ {
75
+ "kind": "field",
76
+ "name": "disabled",
77
+ "type": {
78
+ "text": "boolean"
79
+ },
80
+ "privacy": "public",
81
+ "default": "false",
82
+ "attribute": "disabled"
83
+ },
84
+ {
85
+ "kind": "field",
86
+ "name": "isLoading",
87
+ "type": {
88
+ "text": "boolean"
89
+ },
90
+ "privacy": "public",
91
+ "default": "false",
92
+ "attribute": "isLoading"
93
+ },
94
+ {
95
+ "kind": "method",
96
+ "name": "renderSpinner",
97
+ "privacy": "private",
98
+ "return": {
99
+ "type": {
100
+ "text": "TemplateResult"
101
+ }
102
+ },
103
+ "description": "Template for the loading state"
104
+ }
105
+ ],
106
+ "attributes": [
107
+ {
108
+ "name": "size",
109
+ "type": {
110
+ "text": "IconButtonProps['size'] | undefined"
111
+ },
112
+ "default": "'medium'",
113
+ "fieldName": "size"
114
+ },
115
+ {
116
+ "name": "variant",
117
+ "type": {
118
+ "text": "IconButtonProps['variant'] | undefined"
119
+ },
120
+ "default": "'primary'",
121
+ "fieldName": "variant"
122
+ },
123
+ {
124
+ "name": "disabled",
125
+ "type": {
126
+ "text": "boolean"
127
+ },
128
+ "default": "false",
129
+ "fieldName": "disabled"
130
+ },
131
+ {
132
+ "name": "isLoading",
133
+ "type": {
134
+ "text": "boolean"
135
+ },
136
+ "default": "false",
137
+ "fieldName": "isLoading"
138
+ }
139
+ ],
140
+ "superclass": {
141
+ "name": "LitElement",
142
+ "package": "lit"
143
+ },
144
+ "tagName": "pie-icon-button",
145
+ "customElement": true
146
+ }
147
+ ],
148
+ "exports": [
149
+ {
150
+ "kind": "js",
151
+ "name": "*",
152
+ "declaration": {
153
+ "name": "*",
154
+ "package": "./defs"
155
+ }
156
+ },
157
+ {
158
+ "kind": "js",
159
+ "name": "PieIconButton",
160
+ "declaration": {
161
+ "name": "PieIconButton",
162
+ "module": "src/index.js"
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ }
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-icon-button",
3
- "version": "0.25.2",
3
+ "version": "0.26.0",
4
4
  "description": "PIE Design System Icon Button 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-icon-button && 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": "run -T eslint . --fix",
18
21
  "lint:style": "run -T stylelint ./src/**/*.{css,scss}",
@@ -25,14 +28,21 @@
25
28
  },
26
29
  "author": "Just Eat Takeaway.com - Design System Team",
27
30
  "license": "Apache-2.0",
31
+ "devDependencies": {
32
+ "@custom-elements-manifest/analyzer": "0.9.0",
33
+ "@justeattakeaway/pie-components-config": "0.8.0",
34
+ "@justeattakeaway/pie-wrapper-react": "0.12.0",
35
+ "cem-plugin-module-file-extensions": "0.0.5"
36
+ },
28
37
  "dependencies": {
29
- "@justeattakeaway/pie-icons-webc": "0.16.2",
30
- "@justeattakeaway/pie-spinner": "0.3.3",
31
- "@justeattakeaway/pie-webc-core": "0.15.0"
38
+ "@justeattakeaway/pie-icons-webc": "0.17.0",
39
+ "@justeattakeaway/pie-spinner": "0.4.0",
40
+ "@justeattakeaway/pie-webc-core": "0.16.0"
32
41
  },
33
42
  "volta": {
34
43
  "extends": "../../../package.json"
35
44
  },
45
+ "customElements": "custom-elements.json",
36
46
  "sideEffects": [
37
47
  "dist/*.js"
38
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 { PieIconButton as PieIconButtonReact } from './index';
5
+
6
+ export * from './defs';
7
+
8
+ export const PieIconButton = createComponent({
9
+ displayName: 'PieIconButton',
10
+ elementClass: PieIconButtonReact,
11
+ react: React,
12
+ tagName: 'pie-icon-button',
13
+ events: {},
14
+ });