@justeattakeaway/pie-modal 0.1.1 → 0.2.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 +4 -4
- package/CHANGELOG.md +11 -0
- package/dist/index.js +41 -12
- package/dist/types/index.d.ts +1 -1
- package/dist/types/packages/components/pie-modal/src/index.d.ts +15 -0
- package/dist/types/packages/components/pie-modal/src/index.d.ts.map +1 -0
- package/package.json +4 -1
- package/src/index.ts +2 -1
- package/dist/types/src/index.d.ts +0 -10
- package/dist/types/src/index.d.ts.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[36mvite v4.2.1 [32mbuilding for production...[36m[39m
|
|
2
2
|
transforming...
|
|
3
|
-
[32m✓[39m
|
|
3
|
+
[32m✓[39m 5 modules transformed.
|
|
4
4
|
rendering chunks...
|
|
5
5
|
computing gzip size...
|
|
6
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
6
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m1.78 kB[22m[1m[22m[2m │ gzip: 0.81 kB[22m
|
|
7
7
|
[32m
|
|
8
8
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
9
|
-
[32m✓[39m built in
|
|
10
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
9
|
+
[32m✓[39m built in 23.66s
|
|
10
|
+
[32m[36m[vite:dts][32m Declaration files built in 23401ms.
|
|
11
11
|
[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @justeattakeaway/pie-modal
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [Changed] - use RTL mixin on component ([#478](https://github.com/justeattakeaway/pie/pull/478)) by [@jamieomaguire](https://github.com/jamieomaguire)
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`1f79d9d1a`](https://github.com/justeattakeaway/pie/commit/1f79d9d1a6fe9160b244e82d956290136b87187b)]:
|
|
12
|
+
- @justeattakeaway/pie-webc-core@0.1.0
|
|
13
|
+
|
|
3
14
|
## 0.1.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { customElement as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { html as p, LitElement as f } from "lit";
|
|
2
|
+
import { customElement as u } from "lit/decorators.js";
|
|
3
|
+
import { property as m } from "lit/decorators/property.js";
|
|
4
|
+
var v = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, c = (i, e, s, t) => {
|
|
5
|
+
for (var r = t > 1 ? void 0 : t ? _(e, s) : e, o = i.length - 1, l; o >= 0; o--)
|
|
6
|
+
(l = i[o]) && (r = (t ? l(e, s, r) : l(r)) || r);
|
|
7
|
+
return t && r && v(e, s, r), r;
|
|
7
8
|
};
|
|
8
|
-
|
|
9
|
+
const d = (i) => {
|
|
10
|
+
class e extends i {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this.dir = "";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if the element is in Right to Left mode.
|
|
16
|
+
* If a dir attribute is not explicitly set on the web component
|
|
17
|
+
* then it falls back to the nearest parent with a dir attribute set.
|
|
18
|
+
*
|
|
19
|
+
* A dir attribute being set will result in a reactive property.
|
|
20
|
+
* If the component falls back to a parent dir attribute then the value
|
|
21
|
+
* will not be reactive and is only computed once
|
|
22
|
+
*/
|
|
23
|
+
get isRTL() {
|
|
24
|
+
var t;
|
|
25
|
+
return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((t = window == null ? void 0 : window.getComputedStyle(this)) == null ? void 0 : t.direction) === "rtl";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return c([
|
|
29
|
+
m({ type: String })
|
|
30
|
+
], e.prototype, "dir", 2), e;
|
|
31
|
+
};
|
|
32
|
+
var a = Object.defineProperty, P = Object.getOwnPropertyDescriptor, h = (i, e, s, t) => {
|
|
33
|
+
for (var r = t > 1 ? void 0 : t ? P(e, s) : e, o = i.length - 1, l; o >= 0; o--)
|
|
34
|
+
(l = i[o]) && (r = (t ? l(e, s, r) : l(r)) || r);
|
|
35
|
+
return t && r && a(e, s, r), r;
|
|
36
|
+
};
|
|
37
|
+
let n = class extends d(f) {
|
|
9
38
|
// eslint-disable-next-line class-methods-use-this
|
|
10
39
|
render() {
|
|
11
|
-
return
|
|
40
|
+
return p`
|
|
12
41
|
<div>This is the Pie Modal
|
|
13
42
|
<slot></slot>
|
|
14
43
|
</div>`;
|
|
15
44
|
}
|
|
16
45
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
],
|
|
46
|
+
n = h([
|
|
47
|
+
u("pie-modal")
|
|
48
|
+
], n);
|
|
20
49
|
export {
|
|
21
|
-
|
|
50
|
+
n as PieModal
|
|
22
51
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './src/index'
|
|
1
|
+
export * from './packages/components/pie-modal/src/index'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare const PieModal_base: (new (...args: any[]) => {
|
|
3
|
+
dir: string;
|
|
4
|
+
isRTL: boolean;
|
|
5
|
+
}) & typeof LitElement;
|
|
6
|
+
export declare class PieModal extends PieModal_base {
|
|
7
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'pie-modal': PieModal;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# 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;;;;;AAIvC,qBACa,QAAS,SAAQ,aAAoB;IAE9C,MAAM;CAMT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-modal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "PIE design system modal built using web components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"author": "JustEatTakeaway - Design System Web Team",
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@justeattakeaway/pie-webc-core": "workspace:*"
|
|
18
|
+
},
|
|
16
19
|
"volta": {
|
|
17
20
|
"extends": "../../../package.json"
|
|
18
21
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LitElement, html } from 'lit'; // eslint-disable-line import/no-extraneous-dependencies
|
|
2
2
|
import { customElement } from 'lit/decorators.js'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
|
+
import { RtlMixin } from '@justeattakeaway/pie-webc-core';
|
|
3
4
|
|
|
4
5
|
@customElement('pie-modal')
|
|
5
|
-
export class PieModal extends LitElement {
|
|
6
|
+
export class PieModal extends RtlMixin(LitElement) {
|
|
6
7
|
// eslint-disable-next-line class-methods-use-this
|
|
7
8
|
render () {
|
|
8
9
|
return html`
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|