@justeattakeaway/pie-divider 0.9.2 → 0.9.3

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/dist/index.js CHANGED
@@ -1,60 +1,42 @@
1
- import { unsafeCSS as h, LitElement as u, html as f } from "lit";
2
- import { property as c } from "lit/decorators.js";
3
- const l = (i, e, t) => function(r, o) {
4
- const n = `#${o}`;
5
- Object.defineProperty(r, o, {
6
- get() {
7
- return this[n];
8
- },
9
- set(s) {
10
- e.includes(s) ? this[n] = s : (console.error(
11
- `<${i}> Invalid value "${s}" provided for property "${o}".`,
12
- `Must be one of: ${e.join(" | ")}.`,
13
- `Falling back to default value: "${t}"`
14
- ), this[n] = t);
15
- },
16
- configurable: !0
17
- });
18
- };
19
- function g(i, e) {
20
- customElements.get(i) ? console.warn(`PIE Web Component: "${i}" has already been defined. Please ensure the component is only being defined once in your application.`) : customElements.define(i, e);
21
- }
1
+ import { unsafeCSS as p, LitElement as h, html as u } from "lit";
2
+ import { property as s } from "lit/decorators.js";
3
+ import { validPropertyValues as l, defineCustomElement as f } from "@justeattakeaway/pie-webc-core";
22
4
  const m = `.c-divider{--divider-bg-color: var(--dt-color-divider-default);--divider-width: 100%;--divider-height: 1px;margin:0;border:0;width:var(--divider-width);height:var(--divider-height);background-color:var(--divider-bg-color)}.c-divider[variant=inverse]{--divider-bg-color: var(--dt-color-divider-inverse)}.c-divider[orientation=vertical]{--divider-width: 1px;--divider-height: 100%}
23
- `, b = ["default", "inverse"], y = ["horizontal", "vertical"];
24
- var P = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, p = (i, e, t, d) => {
25
- for (var r = d > 1 ? void 0 : d ? $(e, t) : e, o = i.length - 1, n; o >= 0; o--)
26
- (n = i[o]) && (r = (d ? n(e, t, r) : n(r)) || r);
27
- return d && r && P(e, t, r), r;
5
+ `, g = ["default", "inverse"], y = ["horizontal", "vertical"];
6
+ var b = Object.defineProperty, w = Object.getOwnPropertyDescriptor, c = (d, i, e, t) => {
7
+ for (var r = t > 1 ? void 0 : t ? w(i, e) : i, n = d.length - 1, a; n >= 0; n--)
8
+ (a = d[n]) && (r = (t ? a(i, e, r) : a(r)) || r);
9
+ return t && r && b(i, e, r), r;
28
10
  };
29
11
  const v = "pie-divider";
30
- class a extends u {
12
+ class o extends h {
31
13
  constructor() {
32
14
  super(...arguments), this.variant = "default", this.orientation = "horizontal";
33
15
  }
34
16
  render() {
35
- const { variant: e, orientation: t } = this;
36
- return f`
17
+ const { variant: i, orientation: e } = this;
18
+ return u`
37
19
  <hr
38
20
  data-test-id="pie-divider"
39
21
  aria-hidden="true"
40
22
  class="c-divider"
41
- variant=${e}
42
- orientation=${t}
23
+ variant=${i}
24
+ orientation=${e}
43
25
  />`;
44
26
  }
45
27
  }
46
- a.styles = h(m);
47
- p([
48
- c({ type: String }),
49
- l(v, b, "default")
50
- ], a.prototype, "variant", 2);
51
- p([
52
- c({ type: String }),
28
+ o.styles = p(m);
29
+ c([
30
+ s({ type: String }),
31
+ l(v, g, "default")
32
+ ], o.prototype, "variant", 2);
33
+ c([
34
+ s({ type: String }),
53
35
  l(v, y, "horizontal")
54
- ], a.prototype, "orientation", 2);
55
- g(v, a);
36
+ ], o.prototype, "orientation", 2);
37
+ f(v, o);
56
38
  export {
57
- a as PieDivider,
39
+ o as PieDivider,
58
40
  y as orientations,
59
- b as variants
41
+ g as variants
60
42
  };
package/dist/react.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import * as e from "react";
2
2
  import { createComponent as i } from "@lit/react";
3
3
  import { PieDivider as r } from "./index.js";
4
- import { orientations as d, variants as v } from "./index.js";
4
+ import { orientations as v, variants as c } from "./index.js";
5
5
  import "lit";
6
6
  import "lit/decorators.js";
7
- const p = i({
7
+ import "@justeattakeaway/pie-webc-core";
8
+ const s = i({
8
9
  displayName: "PieDivider",
9
10
  elementClass: r,
10
11
  react: e,
@@ -12,7 +13,7 @@ const p = i({
12
13
  events: {}
13
14
  });
14
15
  export {
15
- p as PieDivider,
16
- d as orientations,
17
- v as variants
16
+ s as PieDivider,
17
+ v as orientations,
18
+ c as variants
18
19
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-divider",
3
3
  "description": "PIE Design System Divider built using Web Components",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -28,10 +28,10 @@
28
28
  "author": "Just Eat Takeaway.com - Design System Team",
29
29
  "license": "Apache-2.0",
30
30
  "devDependencies": {
31
- "@justeattakeaway/pie-components-config": "0.6.0"
31
+ "@justeattakeaway/pie-components-config": "0.6.1"
32
32
  },
33
33
  "dependencies": {
34
- "@justeattakeaway/pie-webc-core": "0.12.0"
34
+ "@justeattakeaway/pie-webc-core": "0.13.0"
35
35
  },
36
36
  "volta": {
37
37
  "extends": "../../../package.json"