@justeattakeaway/pie-button 0.8.0 → 0.9.0

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.
@@ -3,7 +3,7 @@ transforming...
3
3
  ✓ 4 modules transformed.
4
4
  rendering chunks...
5
5
  computing gzip size...
6
- dist/index.js 3.79 kB │ gzip: 1.59 kB
6
+ dist/index.js 3.81 kB │ gzip: 1.60 kB
7
7
  
8
8
  [vite:dts] Start generate declaration files...
9
9
  ../../../node_modules/@types/react-dom/node_modules/@types/react/index.d.ts:3135:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
@@ -25,5 +25,5 @@ computing gzip size...
25
25
     ~~~~~~~~~~~~~~~~~~~~~~~~
26
26
  'LibraryManagedAttributes' was also declared here.
27
27
 
28
- [vite:dts] Declaration files built in 10579ms.
28
+ [vite:dts] Declaration files built in 17153ms.
29
29
  
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Added] - HTMLElementTagNameMap entry for pie-button element ([#364](https://github.com/justeattakeaway/pie/pull/364)) by [@jamieomaguire](https://github.com/jamieomaguire)
8
+
9
+ - [Added] - Slot functionality to pie-button component and associated SB and example app integrations ([#364](https://github.com/justeattakeaway/pie/pull/364)) by [@jamieomaguire](https://github.com/jamieomaguire)
10
+
3
11
  ## 0.8.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ var a = /* @__PURE__ */ ((o) => (o.XSMALL = "xsmall", o.SMALL = "small", o.MEDIU
23
23
  (s = o[r]) && (e = (t ? s(n, i, e) : s(e)) || e);
24
24
  return t && e && y(n, i, e), e;
25
25
  };
26
- function E(o) {
26
+ function k(o) {
27
27
  return (n) => {
28
28
  if (!customElements.get(o))
29
29
  return v(o)(n);
@@ -49,7 +49,7 @@ let l = class extends h {
49
49
  type=${n}
50
50
  ?disabled=${t}
51
51
  @click="${r}">
52
- I'm a PIE button
52
+ <slot></slot>
53
53
  </button>`;
54
54
  }
55
55
  };
@@ -67,10 +67,10 @@ c([
67
67
  p(Object.values(b), b.PRIMARY)
68
68
  ], l.prototype, "variant", 2);
69
69
  c([
70
- u()
70
+ u({ type: Boolean, reflect: !0 })
71
71
  ], l.prototype, "disabled", 2);
72
72
  l = c([
73
- E("pie-button")
73
+ k("pie-button")
74
74
  ], l);
75
75
  export {
76
76
  a as BUTTON_SIZE,
@@ -9,4 +9,9 @@ export declare class PieButton extends LitElement {
9
9
  render(): import("lit-html").TemplateResult<1>;
10
10
  static styles: import("lit").CSSResult;
11
11
  }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'pie-button': PieButton;
15
+ }
16
+ }
12
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAMlD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;AAWpD,qBACa,SAAU,SAAQ,UAAU;IAGrC,IAAI,EAAG,WAAW,CAAsB;IAIxC,IAAI,EAAG,WAAW,CAAsB;IAIxC,OAAO,EAAG,cAAc,CAA0B;IAGlD,QAAQ,EAAG,OAAO,CAAS;IAE3B,MAAM;IA2BN,MAAM,CAAC,MAAM,0BAAqB;CACrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAMlD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;AAWpD,qBACa,SAAU,SAAQ,UAAU;IAGrC,IAAI,EAAG,WAAW,CAAsB;IAIxC,IAAI,EAAG,WAAW,CAAsB;IAIxC,OAAO,EAAG,cAAc,CAA0B;IAGlD,QAAQ,EAAG,OAAO,CAAS;IAE3B,MAAM;IA2BN,MAAM,CAAC,MAAM,0BAAqB;CACrC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-button",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "PIE design system button built using web components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -32,7 +32,7 @@ export class PieButton extends LitElement {
32
32
  @validPropertyValues(Object.values(BUTTON_VARIANT), BUTTON_VARIANT.PRIMARY)
33
33
  variant : BUTTON_VARIANT = BUTTON_VARIANT.PRIMARY;
34
34
 
35
- @property()
35
+ @property({type: Boolean, reflect: true})
36
36
  disabled : boolean = false;
37
37
 
38
38
  render () {
@@ -57,10 +57,16 @@ export class PieButton extends LitElement {
57
57
  type=${type}
58
58
  ?disabled=${disabled}
59
59
  @click="${raiseWCEvent}">
60
- I'm a PIE button
60
+ <slot></slot>
61
61
  </button>`;
62
62
  }
63
63
 
64
64
  // Renders a `CSSResult` generated from SCSS by Vite
65
65
  static styles = unsafeCSS(styles);
66
66
  }
67
+
68
+ declare global {
69
+ interface HTMLElementTagNameMap {
70
+ 'pie-button': PieButton;
71
+ }
72
+ }