@justeattakeaway/pie-divider 0.14.0 → 0.14.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/dist/index.js CHANGED
@@ -1,64 +1,63 @@
1
- import { unsafeCSS as g, LitElement as m, html as c } from "lit";
2
- import { property as s } from "lit/decorators.js";
3
- import { classMap as p } from "lit/directives/class-map.js";
4
- import { validPropertyValues as b, defineCustomElement as f } from "@justeattakeaway/pie-webc-core";
5
- const u = `*,*:after,*:before{box-sizing:inherit}.c-divider{--divider-bg-color: var(--dt-color-divider-default);--divider-width: 100%;--divider-min-width: 16px;--divider-height: 1px;--divider-label-max-width: 90%;width:var(--divider-width)}.c-divider,.c-divider hr{margin:0;border:0;background-color:var(--divider-bg-color)}.c-divider:not(.c-divider--labelled){height:var(--divider-height)}.c-divider.c-divider--labelled{display:flex;align-items:center;text-align:center;gap:var(--dt-spacing-b);background-color:transparent}.c-divider.c-divider--labelled .c-divider-label{max-width:var(--divider-label-max-width);word-wrap:break-word}.c-divider.c-divider--labelled hr{flex-grow:1;height:var(--divider-height);min-width:var(--divider-min-width)}.c-divider.c-divider--labelled.c-divider--inverse{color:var(--dt-color-content-inverse)}.c-divider.c-divider--inverse{--divider-bg-color: var(--dt-color-divider-inverse)}.c-divider.c-divider--vertical{--divider-width: 1px;--divider-height: 100%}
6
- `, w = ["default", "inverse"], x = ["horizontal", "vertical"], l = {
1
+ import { LitElement as m, html as n, unsafeCSS as f } from "lit";
2
+ import { property as v } from "lit/decorators.js";
3
+ import { classMap as b } from "lit/directives/class-map.js";
4
+ import { validPropertyValues as g, defineCustomElement as u } from "@justeattakeaway/pie-webc-core";
5
+ const w = "*,*:after,*:before{box-sizing:inherit}.c-divider{--divider-bg-color: var(--dt-color-divider-default);--divider-width: 100%;--divider-min-width: 16px;--divider-height: 1px;--divider-label-max-width: 90%;width:var(--divider-width)}.c-divider,.c-divider hr{margin:0;border:0;background-color:var(--divider-bg-color)}.c-divider:not(.c-divider--labelled){height:var(--divider-height)}.c-divider.c-divider--labelled{display:flex;align-items:center;text-align:center;gap:var(--dt-spacing-b);background-color:transparent}.c-divider.c-divider--labelled .c-divider-label{max-width:var(--divider-label-max-width);word-wrap:break-word}.c-divider.c-divider--labelled hr{flex-grow:1;height:var(--divider-height);min-width:var(--divider-min-width)}.c-divider.c-divider--labelled.c-divider--inverse{color:var(--dt-color-content-inverse)}.c-divider.c-divider--inverse{--divider-bg-color: var(--dt-color-divider-inverse)}.c-divider.c-divider--vertical{--divider-width: 1px;--divider-height: 100%}", x = ["default", "inverse"], y = ["horizontal", "vertical"], a = {
7
6
  variant: "default",
8
7
  orientation: "horizontal",
9
8
  label: ""
10
9
  };
11
- var y = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, h = (n, d, t, r) => {
12
- for (var i = r > 1 ? void 0 : r ? $(d, t) : d, a = n.length - 1, v; a >= 0; a--)
13
- (v = n[a]) && (i = (r ? v(d, t, i) : v(i)) || i);
14
- return r && i && y(d, t, i), i;
10
+ var $ = Object.defineProperty, c = (h, l, t, o) => {
11
+ for (var i = void 0, r = h.length - 1, p; r >= 0; r--)
12
+ (p = h[r]) && (i = p(l, t, i) || i);
13
+ return i && $(l, t, i), i;
15
14
  };
16
- const e = "pie-divider";
17
- class o extends m {
15
+ const e = "pie-divider", s = class s extends m {
18
16
  constructor() {
19
- super(...arguments), this.variant = l.variant, this.orientation = l.orientation, this.label = l.label;
17
+ super(...arguments), this.variant = a.variant, this.orientation = a.orientation, this.label = a.label;
20
18
  }
21
19
  render() {
22
- const { variant: d, orientation: t, label: r } = this, i = r.length > 0 && t === "horizontal", a = {
20
+ const { variant: l, orientation: t, label: o } = this, i = o.length > 0 && t === "horizontal", r = {
23
21
  "c-divider": !0,
24
- "c-divider--inverse": d === "inverse",
22
+ "c-divider--inverse": l === "inverse",
25
23
  "c-divider--vertical": t === "vertical",
26
24
  "c-divider--labelled": i
27
25
  };
28
- return c`
29
- ${i ? c`
26
+ return n`
27
+ ${i ? n`
30
28
  <div
31
29
  id="${e}"
32
30
  data-test-id="${e}"
33
- class="${p(a)}"
31
+ class="${b(r)}"
34
32
  aria-labelledby="${e}-label">
35
33
  <hr aria-hidden="true"/>
36
- <span id="${e}-label" class="c-divider-label">${r}</span>
34
+ <span id="${e}-label" class="c-divider-label">${o}</span>
37
35
  <hr aria-hidden="true"/>
38
- </div>` : c`
36
+ </div>` : n`
39
37
  <hr id="${e}"
40
38
  data-test-id="${e}"
41
- class="${p(a)}"
39
+ class="${b(r)}"
42
40
  aria-hidden="true"
43
41
  />`}`;
44
42
  }
45
- }
46
- o.styles = g(u);
47
- h([
48
- s({ type: String }),
49
- b(e, w, l.variant)
50
- ], o.prototype, "variant", 2);
51
- h([
52
- s({ type: String }),
53
- b(e, x, l.orientation)
54
- ], o.prototype, "orientation", 2);
55
- h([
56
- s({ type: String })
57
- ], o.prototype, "label", 2);
58
- f(e, o);
43
+ };
44
+ s.styles = f(w);
45
+ let d = s;
46
+ c([
47
+ v({ type: String }),
48
+ g(e, x, a.variant)
49
+ ], d.prototype, "variant");
50
+ c([
51
+ v({ type: String }),
52
+ g(e, y, a.orientation)
53
+ ], d.prototype, "orientation");
54
+ c([
55
+ v({ type: String })
56
+ ], d.prototype, "label");
57
+ u(e, d);
59
58
  export {
60
- o as PieDivider,
61
- l as defaultProps,
62
- x as orientations,
63
- w as variants
59
+ d as PieDivider,
60
+ a as defaultProps,
61
+ y as orientations,
62
+ x as variants
64
63
  };
package/dist/react.js CHANGED
@@ -1,21 +1,17 @@
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 { defaultProps as P, orientations as f, variants as D } from "./index.js";
5
- import "lit";
6
- import "lit/decorators.js";
7
- import "lit/directives/class-map.js";
8
- import "@justeattakeaway/pie-webc-core";
4
+ import { defaultProps as n, orientations as p, variants as v } from "./index.js";
9
5
  const t = i({
10
6
  displayName: "PieDivider",
11
7
  elementClass: r,
12
8
  react: e,
13
9
  tagName: "pie-divider",
14
10
  events: {}
15
- }), n = t;
11
+ }), m = t;
16
12
  export {
17
- n as PieDivider,
18
- P as defaultProps,
19
- f as orientations,
20
- D as variants
13
+ m as PieDivider,
14
+ n as defaultProps,
15
+ p as orientations,
16
+ v as variants
21
17
  };
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.14.0",
4
+ "version": "0.14.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -37,12 +37,12 @@
37
37
  "devDependencies": {
38
38
  "@custom-elements-manifest/analyzer": "0.9.0",
39
39
  "@justeattakeaway/pie-components-config": "0.18.0",
40
- "@justeattakeaway/pie-css": "0.12.1",
40
+ "@justeattakeaway/pie-css": "0.13.0",
41
41
  "@justeattakeaway/pie-wrapper-react": "0.14.1",
42
42
  "cem-plugin-module-file-extensions": "0.0.5"
43
43
  },
44
44
  "dependencies": {
45
- "@justeattakeaway/pie-webc-core": "0.24.0"
45
+ "@justeattakeaway/pie-webc-core": "0.24.1"
46
46
  },
47
47
  "volta": {
48
48
  "extends": "../../../package.json"