@justeattakeaway/pie-modal 0.1.1 → 0.3.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.
@@ -1,11 +1,14 @@
1
+ [11:03:18 AM] @custom-elements-manifest/analyzer: Created new manifest.
2
+ react wrapper has been added!
1
3
  vite v4.2.1 building for production...
2
4
  transforming...
3
- ✓ 1 modules transformed.
5
+ ✓ 17 modules transformed.
4
6
  rendering chunks...
5
7
  computing gzip size...
6
- dist/index.js 0.63 kB │ gzip: 0.40 kB
8
+ dist/index.js  1.46 kB │ gzip: 0.76 kB
9
+ dist/react.js 59.09 kB │ gzip: 15.93 kB
7
10
  
8
11
  [vite:dts] Start generate declaration files...
9
- ✓ built in 24.45s
10
- [vite:dts] Declaration files built in 23862ms.
12
+ ✓ built in 35.44s
13
+ [vite:dts] Declaration files built in 33629ms.
11
14
  
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @justeattakeaway/pie-modal
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Changed] - Build script to include generating react wrapper ([#426](https://github.com/justeattakeaway/pie/pull/426)) by [@LTurns](https://github.com/LTurns)
8
+
9
+ ### Patch Changes
10
+
11
+ - [Added] - Missing `test:ci` scripts to package.json ([#492](https://github.com/justeattakeaway/pie/pull/492)) by [@siggerzz](https://github.com/siggerzz)
12
+
13
+ - [Updated] - components to use the shared configurations ([#487](https://github.com/justeattakeaway/pie/pull/487)) by [@fernandofranca](https://github.com/fernandofranca)
14
+
15
+ - Updated dependencies [[`090354733`](https://github.com/justeattakeaway/pie/commit/090354733f24f0aa52ce287db7f8d13648414150)]:
16
+ - @justeattakeaway/pie-webc-core@0.2.0
17
+
18
+ ## 0.2.0
19
+
20
+ ### Minor Changes
21
+
22
+ - [Changed] - use RTL mixin on component ([#478](https://github.com/justeattakeaway/pie/pull/478)) by [@jamieomaguire](https://github.com/jamieomaguire)
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [[`1f79d9d1a`](https://github.com/justeattakeaway/pie/commit/1f79d9d1a6fe9160b244e82d956290136b87187b)]:
27
+ - @justeattakeaway/pie-webc-core@0.1.0
28
+
3
29
  ## 0.1.1
4
30
 
5
31
  ### Patch Changes
package/README.md CHANGED
@@ -29,3 +29,13 @@ Compile and watch for changes (auto-compiles `dist` on save)
29
29
  ```
30
30
  yarn watch
31
31
  ```
32
+
33
+ ### Importing the component
34
+
35
+ ```javascript
36
+ // default
37
+ import { PieModal } from '@justeattakeaway/pie-button';
38
+
39
+ // react
40
+ import { PieModal } from '@justeattakeaway/pie-button/dist/react';
41
+ ```
package/dist/index.js CHANGED
@@ -1,22 +1,43 @@
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;
1
+ import { html as n, LitElement as p } from "lit";
2
+ import { property as d } from "lit/decorators/property.js";
3
+ var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, m = (i, e, s, t) => {
4
+ for (var r = t > 1 ? void 0 : t ? f(e, s) : e, o = i.length - 1, l; o >= 0; o--)
5
+ (l = i[o]) && (r = (t ? l(e, s, r) : l(r)) || r);
6
+ return t && r && u(e, s, r), r;
7
7
  };
8
- let m = class extends p {
8
+ const a = (i) => {
9
+ class e extends i {
10
+ constructor() {
11
+ super(...arguments), this.dir = "";
12
+ }
13
+ /**
14
+ * Returns true if the element is in Right to Left mode.
15
+ * If a dir attribute is not explicitly set on the web component
16
+ * then it falls back to the nearest parent with a dir attribute set.
17
+ *
18
+ * A dir attribute being set will result in a reactive property.
19
+ * If the component falls back to a parent dir attribute then the value
20
+ * will not be reactive and is only computed once
21
+ */
22
+ get isRTL() {
23
+ var t;
24
+ return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((t = window == null ? void 0 : window.getComputedStyle(this)) == null ? void 0 : t.direction) === "rtl";
25
+ }
26
+ }
27
+ return m([
28
+ d({ type: String })
29
+ ], e.prototype, "dir", 2), e;
30
+ };
31
+ class c extends a(p) {
9
32
  // eslint-disable-next-line class-methods-use-this
10
33
  render() {
11
- return v`
34
+ return n`
12
35
  <div>This is the Pie Modal
13
36
  <slot></slot>
14
37
  </div>`;
15
38
  }
16
- };
17
- m = _([
18
- f("pie-modal")
19
- ], m);
39
+ }
40
+ customElements.define("pie-modal", c);
20
41
  export {
21
- m as PieModal
42
+ c as PieModal
22
43
  };