@justeattakeaway/pie-form-label 0.12.1 → 0.12.2

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -20
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { LitElement as m, html as c, nothing as a, unsafeCSS as g } from "lit";
2
- import { ifDefined as d } from "lit/directives/if-defined.js";
3
- import { RtlMixin as b, defineCustomElement as h } from "@justeattakeaway/pie-webc-core";
1
+ import { LitElement as g, html as c, nothing as i, unsafeCSS as m } from "lit";
2
+ import { ifDefined as b } from "lit/directives/if-defined.js";
3
+ import { RtlMixin as d, defineCustomElement as h } from "@justeattakeaway/pie-webc-core";
4
4
  import { property as f } from "lit/decorators.js";
5
- const u = `.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);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);margin-block-end:var(--dt-spacing-a)}.c-formLabel-optional,.c-formLabel-trailing{color:var(--dt-color-content-subdued);font-weight:var(--dt-font-weight-regular)}.c-formLabel-leading{margin-inline-end:var(--dt-spacing-b)}.c-formLabel-trailing{flex-shrink:0;white-space:var(--dt-spacing-d)}
5
+ const u = `*,*:after,*:before{box-sizing:inherit}.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);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);margin-block-end:var(--dt-spacing-a)}.c-formLabel-optional,.c-formLabel-trailing{color:var(--dt-color-content-subdued);font-weight:var(--dt-font-weight-regular)}.c-formLabel-leading{margin-inline-end:var(--dt-spacing-b)}.c-formLabel-trailing{flex-shrink:0;white-space:var(--dt-spacing-d)}
6
6
  `;
7
- var v = Object.defineProperty, L = Object.getOwnPropertyDescriptor, p = (i, e, t, l) => {
8
- for (var o = l > 1 ? void 0 : l ? L(e, t) : e, n = i.length - 1, s; n >= 0; n--)
9
- (s = i[n]) && (o = (l ? s(e, t, o) : s(o)) || o);
10
- return l && o && v(e, t, o), o;
7
+ var v = Object.defineProperty, L = Object.getOwnPropertyDescriptor, p = (a, e, t, l) => {
8
+ for (var r = l > 1 ? void 0 : l ? L(e, t) : e, n = a.length - 1, s; n >= 0; n--)
9
+ (s = a[n]) && (r = (l ? s(e, t, r) : s(r)) || r);
10
+ return l && r && v(e, t, r), r;
11
11
  };
12
12
  const y = "pie-form-label";
13
- class r extends b(m) {
13
+ class o extends d(g) {
14
14
  _renderOptionalLabel() {
15
15
  const { optional: e } = this;
16
- return e ? c`<span class="c-formLabel-optional">${e}</span>` : a;
16
+ return e ? c`<span class="c-formLabel-optional">${e}</span>` : i;
17
17
  }
18
18
  handleClick() {
19
19
  if (this.for) {
@@ -33,27 +33,27 @@ class r extends b(m) {
33
33
  @click=${this.handleClick}
34
34
  data-test-id="pie-form-label"
35
35
  class="c-formLabel"
36
- for=${d(this.for)}>
36
+ for=${b(this.for)}>
37
37
  <div>
38
- ${t ? this._renderOptionalLabel() : a}
38
+ ${t ? this._renderOptionalLabel() : i}
39
39
  <span class="c-formLabel-leading"><slot></slot></span>
40
- ${t ? a : this._renderOptionalLabel()}
40
+ ${t ? i : this._renderOptionalLabel()}
41
41
  </div>
42
- ${e ? c`<span class="c-formLabel-trailing">${e}</span>` : a}
42
+ ${e ? c`<span class="c-formLabel-trailing">${e}</span>` : i}
43
43
  </label>`;
44
44
  }
45
45
  }
46
- r.styles = g(u);
46
+ o.styles = m(u);
47
47
  p([
48
48
  f({ type: String, reflect: !0 })
49
- ], r.prototype, "for", 2);
49
+ ], o.prototype, "for", 2);
50
50
  p([
51
51
  f({ type: String })
52
- ], r.prototype, "optional", 2);
52
+ ], o.prototype, "optional", 2);
53
53
  p([
54
54
  f({ type: String })
55
- ], r.prototype, "trailing", 2);
56
- h(y, r);
55
+ ], o.prototype, "trailing", 2);
56
+ h(y, o);
57
57
  export {
58
- r as PieFormLabel
58
+ o as PieFormLabel
59
59
  };
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.12.1",
4
+ "version": "0.12.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -33,13 +33,13 @@
33
33
  "devDependencies": {
34
34
  "@custom-elements-manifest/analyzer": "0.9.0",
35
35
  "@justeattakeaway/pie-components-config": "0.11.0",
36
- "@justeattakeaway/pie-input": "^0.12.1",
37
- "@justeattakeaway/pie-switch": "^0.27.1",
36
+ "@justeattakeaway/pie-input": "^0.13.1",
37
+ "@justeattakeaway/pie-switch": "^0.27.3",
38
38
  "@justeattakeaway/pie-wrapper-react": "0.14.0",
39
39
  "cem-plugin-module-file-extensions": "0.0.5"
40
40
  },
41
41
  "dependencies": {
42
- "@justeattakeaway/pie-webc-core": "0.19.0"
42
+ "@justeattakeaway/pie-webc-core": "0.19.1"
43
43
  },
44
44
  "volta": {
45
45
  "extends": "../../../package.json"