@justeattakeaway/pie-icon-button 0.1.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/.turbo/turbo-build.log +11 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE +17 -0
- package/README.md +13 -0
- package/declaration.d.ts +9 -0
- package/dist/index.js +23 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/package.json +19 -0
- package/src/index.ts +20 -0
- package/tsconfig.json +30 -0
- package/vite.config.js +21 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[36mvite v4.2.1 [32mbuilding for production...[36m[39m
|
|
2
|
+
transforming...
|
|
3
|
+
[32m✓[39m 1 modules transformed.
|
|
4
|
+
rendering chunks...
|
|
5
|
+
computing gzip size...
|
|
6
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m0.67 kB[22m[1m[22m[2m │ gzip: 0.40 kB[22m
|
|
7
|
+
[32m
|
|
8
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
9
|
+
[32m✓[39m built in 11.98s
|
|
10
|
+
[32m[36m[vite:dts][32m Declaration files built in 11853ms.
|
|
11
|
+
[39m
|
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright (c) Just Eat Takeaway.com
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img align="center" src="../../../readme_image.png" height="200" alt="">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/@justeattakeaway/pie-icon-button">
|
|
7
|
+
<img alt="GitHub Workflow Status" src="https://img.shields.io/npm/v/@justeattakeaway/pie-icon-button.svg">
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
## `pie-icon-button`
|
|
12
|
+
|
|
13
|
+
`pie-icon-button` is a Web Component built using the Lit library. It offers a simple and accessible icon button component for web applications. This component can be easily integrated into various frontend frameworks and customized through a set of properties.
|
package/declaration.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement as m, html as u } from "lit";
|
|
2
|
+
import { customElement as i } from "lit/decorators.js";
|
|
3
|
+
var c = Object.defineProperty, f = Object.getOwnPropertyDescriptor, b = (p, e, r, o) => {
|
|
4
|
+
for (var t = o > 1 ? void 0 : o ? f(e, r) : e, n = p.length - 1, l; n >= 0; n--)
|
|
5
|
+
(l = p[n]) && (t = (o ? l(e, r, t) : l(t)) || t);
|
|
6
|
+
return o && t && c(e, r, t), t;
|
|
7
|
+
};
|
|
8
|
+
let s = class extends m {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
render() {
|
|
11
|
+
return u`
|
|
12
|
+
<button>
|
|
13
|
+
I am a pie-icon-button
|
|
14
|
+
<slot></slot>
|
|
15
|
+
</button>`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
s = b([
|
|
19
|
+
i("pie-icon-button")
|
|
20
|
+
], s);
|
|
21
|
+
export {
|
|
22
|
+
s as PieIconButton
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/index'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class PieIconButton extends LitElement {
|
|
3
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface HTMLElementTagNameMap {
|
|
7
|
+
'pie-icon-button': PieIconButton;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAGvC,qBACa,aAAc,SAAQ,UAAU;IAEzC,MAAM;CAOT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,iBAAiB,EAAE,aAAa,CAAC;KACpC;CACJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justeattakeaway/pie-icon-button",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "PIE Design System Icon Button built using Web Components",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "run -T vite build",
|
|
11
|
+
"watch": "run -T vite build --watch",
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 0"
|
|
13
|
+
},
|
|
14
|
+
"author": "JustEatTakeaway - Design System Web Team",
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"volta": {
|
|
17
|
+
"extends": "../../../package.json"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement, html } from 'lit'; // eslint-disable-line import/no-extraneous-dependencies
|
|
2
|
+
import { customElement } from 'lit/decorators.js'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
|
+
|
|
4
|
+
@customElement('pie-icon-button')
|
|
5
|
+
export class PieIconButton extends LitElement {
|
|
6
|
+
// eslint-disable-next-line class-methods-use-this
|
|
7
|
+
render () {
|
|
8
|
+
return html`
|
|
9
|
+
<button>
|
|
10
|
+
I am a pie-icon-button
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</button>`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
'pie-icon-button': PieIconButton;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": ["es2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"inlineSources": true,
|
|
10
|
+
"outDir": "./compiled",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["./src/*"]
|
|
14
|
+
},
|
|
15
|
+
"rootDir": ".",
|
|
16
|
+
"strict": true,
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"noImplicitReturns": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noImplicitAny": true,
|
|
22
|
+
"noImplicitThis": true,
|
|
23
|
+
"moduleResolution": "node",
|
|
24
|
+
"allowSyntheticDefaultImports": true,
|
|
25
|
+
"experimentalDecorators": true,
|
|
26
|
+
"forceConsistentCasingInFileNames": true
|
|
27
|
+
},
|
|
28
|
+
"include": ["src/**/*.ts","./declaration.d.ts", "test/**/*.ts"],
|
|
29
|
+
"exclude": []
|
|
30
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
build: {
|
|
8
|
+
lib: {
|
|
9
|
+
entry: 'src/index.ts',
|
|
10
|
+
fileName: 'index',
|
|
11
|
+
formats: ['es'],
|
|
12
|
+
},
|
|
13
|
+
rollupOptions: {
|
|
14
|
+
external: /^lit/,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
plugins: [dts({
|
|
18
|
+
insertTypesEntry: true,
|
|
19
|
+
outputDir: 'dist/types',
|
|
20
|
+
})],
|
|
21
|
+
});
|