@justeattakeaway/pie-form-label 0.18.4 → 0.18.6

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,21 +1,21 @@
1
- import { LitElement as b, unsafeCSS as m, nothing as g, html as f } from "lit";
2
- import { ifDefined as h } from "lit/directives/if-defined.js";
1
+ import { LitElement as b, unsafeCSS as h, nothing as g, html as f } from "lit";
2
+ import { ifDefined as m } from "lit/directives/if-defined.js";
3
3
  import { safeCustomElement as v } from "@justeattakeaway/pie-webc-core";
4
4
  import { property as d } from "lit/decorators.js";
5
- const o = class o extends b {
5
+ const l = class l extends b {
6
6
  willUpdate() {
7
- this.getAttribute("v") || this.setAttribute("v", o.v);
7
+ this.getAttribute("v") || this.setAttribute("v", l.v);
8
8
  }
9
9
  };
10
- o.v = "0.18.4";
11
- let p = o;
12
- const u = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-formLabel{--form-label-font-size: calc(var(--dt-font-size-14) * 1px);--form-label-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--form-label-font-weight: var(--dt-font-weight-bold);--form-label-color: var(--dt-color-content-default-solid);display:flex;justify-content:space-between;align-items:flex-end;gap:var(--dt-spacing-d);color:var(--form-label-color);font-size:var(--form-label-font-size);line-height:var(--form-label-line-height);font-weight:var(--form-label-font-weight);padding-block-end:var(--dt-spacing-a)}.c-formLabel-optional,.c-formLabel-trailing{color:var(--dt-color-content-subdued-solid);font-weight:var(--dt-font-weight-regular)}.c-formLabel-leading-wrapper{display:flex}.c-formLabel-leading{margin-inline-end:var(--dt-spacing-b)}.c-formLabel-trailing{flex-shrink:0;white-space:var(--dt-spacing-d)}";
13
- var L = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (e, a, n, l) => {
14
- for (var t = l > 1 ? void 0 : l ? y(a, n) : a, s = e.length - 1, c; s >= 0; s--)
15
- (c = e[s]) && (t = (l ? c(a, n, t) : c(t)) || t);
16
- return l && t && L(a, n, t), t;
10
+ l.v = "0.18.6";
11
+ let p = l;
12
+ const u = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-formLabel{--form-label-font-size: calc(var(--dt-font-body-strong-s-size) * 1px);--form-label-line-height: calc(var(--dt-font-body-strong-s-line-height) * 1px);--form-label-font-weight: var(--dt-font-body-strong-s-weight);--form-label-color: var(--dt-color-content-default-solid);display:flex;justify-content:space-between;align-items:flex-end;gap:var(--dt-spacing-d);color:var(--form-label-color);font-size:var(--form-label-font-size);line-height:var(--form-label-line-height);font-weight:var(--form-label-font-weight);padding-block-end:var(--dt-spacing-a)}.c-formLabel-optional,.c-formLabel-trailing{color:var(--dt-color-content-subdued-solid);font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px);font-weight:var(--dt-font-body-s-weight)}.c-formLabel-leading-wrapper{display:flex}.c-formLabel-leading{margin-inline-end:var(--dt-spacing-b)}.c-formLabel-trailing{flex-shrink:0;white-space:var(--dt-spacing-d)}";
13
+ var y = Object.defineProperty, L = Object.getOwnPropertyDescriptor, i = (e, r, n, a) => {
14
+ for (var t = a > 1 ? void 0 : a ? L(r, n) : r, s = e.length - 1, c; s >= 0; s--)
15
+ (c = e[s]) && (t = (a ? c(r, n, t) : c(t)) || t);
16
+ return a && t && y(r, n, t), t;
17
17
  };
18
- let r = class extends p {
18
+ let o = class extends p {
19
19
  _renderOptionalLabel() {
20
20
  const { optional: e } = this;
21
21
  return e ? f`<span class="c-formLabel-optional">${e}</span>` : g;
@@ -36,7 +36,7 @@ let r = class extends p {
36
36
  @click=${this.handleClick}
37
37
  data-test-id="pie-form-label"
38
38
  class="c-formLabel"
39
- for=${h(this.for)}>
39
+ for=${m(this.for)}>
40
40
  <div class="c-formLabel-leading-wrapper">
41
41
  <span class="c-formLabel-leading" data-test-id="pie-form-label-leading"><slot></slot></span>
42
42
  ${this._renderOptionalLabel()}
@@ -45,19 +45,19 @@ let r = class extends p {
45
45
  </label>`;
46
46
  }
47
47
  };
48
- r.styles = m(u);
48
+ o.styles = h(u);
49
49
  i([
50
50
  d({ type: String, reflect: !0 })
51
- ], r.prototype, "for", 2);
51
+ ], o.prototype, "for", 2);
52
52
  i([
53
53
  d({ type: String })
54
- ], r.prototype, "optional", 2);
54
+ ], o.prototype, "optional", 2);
55
55
  i([
56
56
  d({ type: String })
57
- ], r.prototype, "trailing", 2);
58
- r = i([
57
+ ], o.prototype, "trailing", 2);
58
+ o = i([
59
59
  v("pie-form-label")
60
- ], r);
60
+ ], o);
61
61
  export {
62
- r as PieFormLabel
62
+ o as PieFormLabel
63
63
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-form-label",
3
3
  "description": "PIE Design System Form Label built using Web Components",
4
- "version": "0.18.4",
4
+ "version": "0.18.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
@@ -43,15 +43,15 @@
43
43
  "devDependencies": {
44
44
  "@custom-elements-manifest/analyzer": "0.9.0",
45
45
  "@justeattakeaway/pie-components-config": "0.21.0",
46
- "@justeattakeaway/pie-css": "0.24.0",
46
+ "@justeattakeaway/pie-css": "0.25.0",
47
47
  "@justeattakeaway/pie-monorepo-utils": "0.7.0",
48
- "@justeattakeaway/pie-switch": "2.3.5",
49
- "@justeattakeaway/pie-text-input": "0.29.6",
48
+ "@justeattakeaway/pie-switch": "2.3.7",
49
+ "@justeattakeaway/pie-text-input": "0.29.8",
50
50
  "@justeattakeaway/pie-wrapper-react": "0.14.3",
51
51
  "cem-plugin-module-file-extensions": "0.0.5"
52
52
  },
53
53
  "dependencies": {
54
- "@justeattakeaway/pie-webc-core": "4.0.0"
54
+ "@justeattakeaway/pie-webc-core": "5.0.0"
55
55
  },
56
56
  "volta": {
57
57
  "extends": "../../../package.json"
@@ -5,9 +5,9 @@
5
5
  }
6
6
 
7
7
  .c-formLabel {
8
- --form-label-font-size: #{p.font-size(--dt-font-size-14)};
9
- --form-label-line-height: calc(var(--dt-font-size-14-line-height) * 1px);
10
- --form-label-font-weight: var(--dt-font-weight-bold);
8
+ --form-label-font-size: #{p.font-size(--dt-font-body-strong-s-size)};
9
+ --form-label-line-height: calc(var(--dt-font-body-strong-s-line-height) * 1px);
10
+ --form-label-font-weight: var(--dt-font-body-strong-s-weight);
11
11
  --form-label-color: var(--dt-color-content-default-solid);
12
12
 
13
13
  display: flex;
@@ -24,7 +24,9 @@
24
24
  .c-formLabel-optional,
25
25
  .c-formLabel-trailing {
26
26
  color: var(--dt-color-content-subdued-solid);
27
- font-weight: var(--dt-font-weight-regular);
27
+ font-size: #{p.font-size(--dt-font-body-s-size)};
28
+ line-height: calc(var(--dt-font-body-s-line-height) * 1px);
29
+ font-weight: var(--dt-font-body-s-weight);
28
30
  }
29
31
 
30
32
  .c-formLabel-leading-wrapper {