@justeattakeaway/pie-form-label 0.14.3 → 0.14.5

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.
@@ -27,7 +27,7 @@
27
27
  "kind": "field",
28
28
  "name": "for",
29
29
  "type": {
30
- "text": "string | undefined"
30
+ "text": "FormLabelProps['for']"
31
31
  },
32
32
  "privacy": "public",
33
33
  "attribute": "for",
@@ -37,7 +37,7 @@
37
37
  "kind": "field",
38
38
  "name": "optional",
39
39
  "type": {
40
- "text": "string | undefined"
40
+ "text": "FormLabelProps['optional']"
41
41
  },
42
42
  "privacy": "public",
43
43
  "attribute": "optional"
@@ -46,7 +46,7 @@
46
46
  "kind": "field",
47
47
  "name": "trailing",
48
48
  "type": {
49
- "text": "string | undefined"
49
+ "text": "FormLabelProps['trailing']"
50
50
  },
51
51
  "privacy": "public",
52
52
  "attribute": "trailing"
@@ -71,21 +71,21 @@
71
71
  {
72
72
  "name": "for",
73
73
  "type": {
74
- "text": "string | undefined"
74
+ "text": "FormLabelProps['for']"
75
75
  },
76
76
  "fieldName": "for"
77
77
  },
78
78
  {
79
79
  "name": "optional",
80
80
  "type": {
81
- "text": "string | undefined"
81
+ "text": "FormLabelProps['optional']"
82
82
  },
83
83
  "fieldName": "optional"
84
84
  },
85
85
  {
86
86
  "name": "trailing",
87
87
  "type": {
88
- "text": "string | undefined"
88
+ "text": "FormLabelProps['trailing']"
89
89
  },
90
90
  "fieldName": "trailing"
91
91
  }
package/dist/index.d.ts CHANGED
@@ -23,9 +23,9 @@ export declare interface FormLabelProps {
23
23
  * @tagname pie-form-label
24
24
  */
25
25
  export declare class PieFormLabel extends PieFormLabel_base implements FormLabelProps {
26
- for?: string;
27
- optional?: string;
28
- trailing?: string;
26
+ for: FormLabelProps['for'];
27
+ optional: FormLabelProps['optional'];
28
+ trailing: FormLabelProps['trailing'];
29
29
  private _renderOptionalLabel;
30
30
  private handleClick;
31
31
  render(): TemplateResult<1>;
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { LitElement as d, html as l, nothing as i, unsafeCSS as g } from "lit";
1
+ import { LitElement as d, html as l, nothing as o, unsafeCSS as g } from "lit";
2
2
  import { ifDefined as m } from "lit/directives/if-defined.js";
3
3
  import { RtlMixin as b, defineCustomElement as h } from "@justeattakeaway/pie-webc-core";
4
4
  import { property as n } from "lit/decorators.js";
5
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
- var v = Object.defineProperty, s = (f, e, t, L) => {
7
- for (var r = void 0, a = f.length - 1, p; a >= 0; a--)
8
- (p = f[a]) && (r = p(e, t, r) || r);
6
+ var v = Object.defineProperty, s = (c, e, t, L) => {
7
+ for (var r = void 0, a = c.length - 1, p; a >= 0; a--)
8
+ (p = c[a]) && (r = p(e, t, r) || r);
9
9
  return r && v(e, t, r), r;
10
10
  };
11
- const y = "pie-form-label", c = class c extends b(d) {
11
+ const y = "pie-form-label", f = class f extends b(d) {
12
12
  _renderOptionalLabel() {
13
13
  const { optional: e } = this;
14
- return e ? l`<span class="c-formLabel-optional">${e}</span>` : i;
14
+ return e ? l`<span class="c-formLabel-optional">${e}</span>` : o;
15
15
  }
16
16
  handleClick() {
17
17
  if (this.for) {
@@ -32,26 +32,26 @@ const y = "pie-form-label", c = class c extends b(d) {
32
32
  class="c-formLabel"
33
33
  for=${m(this.for)}>
34
34
  <div>
35
- ${t ? this._renderOptionalLabel() : i}
35
+ ${t ? this._renderOptionalLabel() : o}
36
36
  <span class="c-formLabel-leading" data-test-id="pie-form-label-leading"><slot></slot></span>
37
- ${t ? i : this._renderOptionalLabel()}
37
+ ${t ? o : this._renderOptionalLabel()}
38
38
  </div>
39
- ${e ? l`<span class="c-formLabel-trailing" data-test-id="pie-form-label-trailing">${e}</span>` : i}
39
+ ${e ? l`<span class="c-formLabel-trailing" data-test-id="pie-form-label-trailing">${e}</span>` : o}
40
40
  </label>`;
41
41
  }
42
42
  };
43
- c.styles = g(u);
44
- let o = c;
43
+ f.styles = g(u);
44
+ let i = f;
45
45
  s([
46
46
  n({ type: String, reflect: !0 })
47
- ], o.prototype, "for");
47
+ ], i.prototype, "for");
48
48
  s([
49
49
  n({ type: String })
50
- ], o.prototype, "optional");
50
+ ], i.prototype, "optional");
51
51
  s([
52
52
  n({ type: String })
53
- ], o.prototype, "trailing");
54
- h(y, o);
53
+ ], i.prototype, "trailing");
54
+ h(y, i);
55
55
  export {
56
- o as PieFormLabel
56
+ i as PieFormLabel
57
57
  };
package/dist/react.d.ts CHANGED
@@ -26,9 +26,9 @@ export declare const PieFormLabel: React_2.ForwardRefExoticComponent<FormLabelPr
26
26
  * @tagname pie-form-label
27
27
  */
28
28
  declare class PieFormLabel_2 extends PieFormLabel_base implements FormLabelProps {
29
- for?: string;
30
- optional?: string;
31
- trailing?: string;
29
+ for: FormLabelProps['for'];
30
+ optional: FormLabelProps['optional'];
31
+ trailing: FormLabelProps['trailing'];
32
32
  private _renderOptionalLabel;
33
33
  private handleClick;
34
34
  render(): TemplateResult<1>;
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-form-label",
3
3
  "description": "PIE Design System Form Label built using Web Components",
4
- "version": "0.14.3",
4
+ "version": "0.14.5",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/justeattakeaway/pie",
8
+ "directory": "packages/components/pie-form-label"
9
+ },
10
+ "homepage": "https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-form-label",
5
11
  "type": "module",
6
12
  "main": "dist/index.js",
7
13
  "module": "dist/index.js",
@@ -24,9 +30,6 @@
24
30
  "lint:style": "run -T stylelint ./src/**/*.{css,scss}",
25
31
  "lint:style:fix": "yarn lint:style --fix",
26
32
  "watch": "run -T vite build --watch",
27
- "test": "echo \"Error: no test specified\" && exit 0",
28
- "test:ci": "yarn test",
29
- "test:browsers-setup": "npx playwright-lit-setup",
30
33
  "test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
31
34
  "test:browsers:ci": "yarn test:browsers",
32
35
  "test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_FORM_LABEL} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
@@ -37,10 +40,10 @@
37
40
  "devDependencies": {
38
41
  "@custom-elements-manifest/analyzer": "0.9.0",
39
42
  "@justeattakeaway/pie-components-config": "0.18.0",
40
- "@justeattakeaway/pie-css": "0.13.1",
41
- "@justeattakeaway/pie-switch": "0.30.3",
42
- "@justeattakeaway/pie-text-input": "0.24.2",
43
- "@justeattakeaway/pie-wrapper-react": "0.14.2",
43
+ "@justeattakeaway/pie-css": "0.15.1",
44
+ "@justeattakeaway/pie-switch": "1.2.1",
45
+ "@justeattakeaway/pie-text-input": "0.26.1",
46
+ "@justeattakeaway/pie-wrapper-react": "0.14.3",
44
47
  "cem-plugin-module-file-extensions": "0.0.5"
45
48
  },
46
49
  "dependencies": {
package/src/index.ts CHANGED
@@ -17,13 +17,13 @@ const componentSelector = 'pie-form-label';
17
17
  */
18
18
  export class PieFormLabel extends RtlMixin(LitElement) implements FormLabelProps {
19
19
  @property({ type: String, reflect: true })
20
- public for?: string;
20
+ public for: FormLabelProps['for'];
21
21
 
22
22
  @property({ type: String })
23
- public optional?: string;
23
+ public optional: FormLabelProps['optional'];
24
24
 
25
25
  @property({ type: String })
26
- public trailing?: string;
26
+ public trailing: FormLabelProps['trailing'];
27
27
 
28
28
  private _renderOptionalLabel (): TemplateResult | typeof nothing {
29
29
  const { optional } = this;