@justeattakeaway/pie-switch 1.3.2 → 1.3.4

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.
@@ -125,7 +125,8 @@
125
125
  "text": "SwitchProps['name']"
126
126
  },
127
127
  "privacy": "public",
128
- "attribute": "name"
128
+ "attribute": "name",
129
+ "reflects": true
129
130
  },
130
131
  {
131
132
  "kind": "field",
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var $t = Object.defineProperty, Rt = (f, s, c, h) => {
11
11
  };
12
12
  class dt extends It {
13
13
  constructor() {
14
- super(...arguments), this.v = "1.3.2";
14
+ super(...arguments), this.v = "1.3.4";
15
15
  }
16
16
  }
17
17
  Rt([
@@ -651,7 +651,7 @@ v([
651
651
  y({ type: String })
652
652
  ], p.prototype, "value");
653
653
  v([
654
- y({ type: String })
654
+ y({ type: String, reflect: !0 })
655
655
  ], p.prototype, "name");
656
656
  v([
657
657
  y({ type: Boolean, reflect: !0 })
package/dist/react.d.ts CHANGED
@@ -101,7 +101,7 @@ declare type PieSwitchEvents = {
101
101
  onChange?: (event: CustomEvent) => void;
102
102
  };
103
103
 
104
- declare type ReactBaseType = React_2.InputHTMLAttributes<HTMLInputElement>;
104
+ declare type ReactBaseType = Omit<React_2.InputHTMLAttributes<HTMLInputElement>, 'onChange'>;
105
105
 
106
106
  export declare interface SwitchProps {
107
107
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-switch",
3
3
  "description": "PIE Design System Switch built using Web Components",
4
- "version": "1.3.2",
4
+ "version": "1.3.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
package/src/defs-react.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import type React from 'react';
2
2
 
3
- export type ReactBaseType = React.InputHTMLAttributes<HTMLInputElement>
3
+ // Omit event types to avoid conflicting with PieSwitch's type definition
4
+ export type ReactBaseType = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ export class PieSwitch extends FormControlMixin(RtlMixin(PieElement)) implements
44
44
  @property({ type: String })
45
45
  public value = defaultProps.value;
46
46
 
47
- @property({ type: String })
47
+ @property({ type: String, reflect: true })
48
48
  public name: SwitchProps['name'];
49
49
 
50
50
  @property({ type: Boolean, reflect: true })
package/src/react.ts CHANGED
@@ -16,7 +16,7 @@ const PieSwitchReact = createComponent({
16
16
  },
17
17
  });
18
18
 
19
- type ReactBaseType = React.InputHTMLAttributes<HTMLInputElement>
19
+ type ReactBaseType = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>
20
20
 
21
21
  type PieSwitchEvents = {
22
22
  onInvalid?: (event: Event) => void;