@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.
@@ -0,0 +1,11 @@
1
+ vite v4.2.1 building for production...
2
+ transforming...
3
+ ✓ 1 modules transformed.
4
+ rendering chunks...
5
+ computing gzip size...
6
+ dist/index.js 0.67 kB │ gzip: 0.40 kB
7
+ 
8
+ [vite:dts] Start generate declaration files...
9
+ ✓ built in 11.98s
10
+ [vite:dts] Declaration files built in 11853ms.
11
+ 
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @justeattakeaway/pie-icon-button
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Added] - base component shell ([#486](https://github.com/justeattakeaway/pie/pull/486)) by [@jamieomaguire](https://github.com/jamieomaguire)
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.
@@ -0,0 +1,9 @@
1
+ declare module '*.scss' {
2
+ const content: Record<string, string>;
3
+ export default content;
4
+ }
5
+
6
+ declare module '*.scss?inline' {
7
+ const content: Record<string, string>;
8
+ export default content;
9
+ }
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
+ });