@justeattakeaway/pie-modal 0.1.1
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 +11 -0
- package/LICENSE +17 -0
- package/README.md +31 -0
- package/declaration.d.ts +9 -0
- package/dist/index.js +22 -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 +19 -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.63 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 24.45s
|
|
10
|
+
[32m[36m[vite:dts][32m Declaration files built in 23862ms.
|
|
11
|
+
[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @justeattakeaway/pie-modal
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [Added] - PieModal component shell ([#439](https://github.com/justeattakeaway/pie/pull/439)) by [@fernandofranca](https://github.com/fernandofranca)
|
|
8
|
+
|
|
9
|
+
[Added] - README and LICENSE files
|
|
10
|
+
[Added] - Initial TypeScript and Vite config
|
|
11
|
+
[Added] - `declaration.d.ts` file for TypeScript
|
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,31 @@
|
|
|
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-modal">
|
|
7
|
+
<img alt="GitHub Workflow Status" src="https://img.shields.io/npm/v/@justeattakeaway/pie-modal.svg">
|
|
8
|
+
</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# pie-modal
|
|
12
|
+
|
|
13
|
+
This modal is a Web Component built using Lit.
|
|
14
|
+
|
|
15
|
+
## Local development
|
|
16
|
+
|
|
17
|
+
Install dependencies at the root
|
|
18
|
+
```
|
|
19
|
+
yarn
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Navigate to this folder, compile with TypeScript and build with Vite
|
|
23
|
+
```
|
|
24
|
+
cd packages/components/pie-modal
|
|
25
|
+
yarn build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Compile and watch for changes (auto-compiles `dist` on save)
|
|
29
|
+
```
|
|
30
|
+
yarn watch
|
|
31
|
+
```
|
package/declaration.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement as p, html as v } from "lit";
|
|
2
|
+
import { customElement as f } from "lit/decorators.js";
|
|
3
|
+
var n = Object.defineProperty, P = Object.getOwnPropertyDescriptor, _ = (i, r, l, t) => {
|
|
4
|
+
for (var e = t > 1 ? void 0 : t ? P(r, l) : r, o = i.length - 1, s; o >= 0; o--)
|
|
5
|
+
(s = i[o]) && (e = (t ? s(r, l, e) : s(e)) || e);
|
|
6
|
+
return t && e && n(r, l, e), e;
|
|
7
|
+
};
|
|
8
|
+
let m = class extends p {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
render() {
|
|
11
|
+
return v`
|
|
12
|
+
<div>This is the Pie Modal
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
m = _([
|
|
18
|
+
f("pie-modal")
|
|
19
|
+
], m);
|
|
20
|
+
export {
|
|
21
|
+
m as PieModal
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/index'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class PieModal extends LitElement {
|
|
3
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface HTMLElementTagNameMap {
|
|
7
|
+
'pie-modal': PieModal;
|
|
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,QAAS,SAAQ,UAAU;IAEpC,MAAM;CAMT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justeattakeaway/pie-modal",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "PIE design system modal 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,19 @@
|
|
|
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-modal')
|
|
5
|
+
export class PieModal extends LitElement {
|
|
6
|
+
// eslint-disable-next-line class-methods-use-this
|
|
7
|
+
render () {
|
|
8
|
+
return html`
|
|
9
|
+
<div>This is the Pie Modal
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</div>`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'pie-modal': PieModal;
|
|
18
|
+
}
|
|
19
|
+
}
|
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
|
+
});
|