@justeattakeaway/pie-icon-button 0.26.0 → 0.27.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.
@@ -2,6 +2,12 @@
2
2
  "schemaVersion": "1.0.0",
3
3
  "readme": "",
4
4
  "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/defs-react.js",
8
+ "declarations": [],
9
+ "exports": []
10
+ },
5
11
  {
6
12
  "kind": "javascript-module",
7
13
  "path": "src/defs.js",
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CSSResult } from 'lit';
2
2
  import type { LitElement } from 'lit';
3
- import type { ReactWebComponent } from '@lit/react';
3
+ import * as React_2 from 'react';
4
4
  import type { TemplateResult } from 'lit';
5
5
 
6
6
  export declare interface IconButtonProps {
@@ -26,7 +26,7 @@ export declare interface IconButtonProps {
26
26
  isLoading?: boolean;
27
27
  }
28
28
 
29
- export declare const PieIconButton: ReactWebComponent<PieIconButton_2, {}>;
29
+ export declare const PieIconButton: React_2.ForwardRefExoticComponent<IconButtonProps & React_2.RefAttributes<PieIconButton_2> & ReactBaseType>;
30
30
 
31
31
  /**
32
32
  * @tagname pie-icon-button
@@ -46,6 +46,8 @@ declare class PieIconButton_2 extends LitElement implements IconButtonProps {
46
46
  static styles: CSSResult;
47
47
  }
48
48
 
49
+ declare type ReactBaseType = React_2.ButtonHTMLAttributes<HTMLButtonElement>;
50
+
49
51
  export declare const sizes: readonly ["xsmall", "small", "medium", "large"];
50
52
 
51
53
  export declare const variants: readonly ["primary", "secondary", "outline", "ghost", "ghost-secondary", "inverse", "ghost-inverse"];
package/dist/react.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import * as t from "react";
2
2
  import { createComponent as o } from "@lit/react";
3
3
  import { PieIconButton as e } from "./index.js";
4
- import { sizes as f, variants as B } from "./index.js";
4
+ import { sizes as I, variants as P } from "./index.js";
5
5
  import "lit";
6
6
  import "lit/decorators.js";
7
7
  import "@justeattakeaway/pie-webc-core";
8
8
  import "@justeattakeaway/pie-spinner";
9
- const s = o({
9
+ const n = o({
10
10
  displayName: "PieIconButton",
11
11
  elementClass: e,
12
12
  react: t,
13
13
  tagName: "pie-icon-button",
14
14
  events: {}
15
- });
15
+ }), s = n;
16
16
  export {
17
17
  s as PieIconButton,
18
- f as sizes,
19
- B as variants
18
+ I as sizes,
19
+ P as variants
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-icon-button",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "PIE Design System Icon Button built using Web Components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,14 +30,14 @@
30
30
  "license": "Apache-2.0",
31
31
  "devDependencies": {
32
32
  "@custom-elements-manifest/analyzer": "0.9.0",
33
- "@justeattakeaway/pie-components-config": "0.8.0",
34
- "@justeattakeaway/pie-wrapper-react": "0.12.0",
33
+ "@justeattakeaway/pie-components-config": "0.9.0",
34
+ "@justeattakeaway/pie-wrapper-react": "0.13.0",
35
35
  "cem-plugin-module-file-extensions": "0.0.5"
36
36
  },
37
37
  "dependencies": {
38
- "@justeattakeaway/pie-icons-webc": "0.17.0",
39
- "@justeattakeaway/pie-spinner": "0.4.0",
40
- "@justeattakeaway/pie-webc-core": "0.16.0"
38
+ "@justeattakeaway/pie-icons-webc": "0.17.1",
39
+ "@justeattakeaway/pie-spinner": "0.5.0",
40
+ "@justeattakeaway/pie-webc-core": "0.17.0"
41
41
  },
42
42
  "volta": {
43
43
  "extends": "../../../package.json"
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+
3
+ export type ReactBaseType = React.ButtonHTMLAttributes<HTMLButtonElement>
package/src/react.ts CHANGED
@@ -1,14 +1,20 @@
1
-
2
1
  import * as React from 'react';
3
2
  import { createComponent } from '@lit/react';
4
- import { PieIconButton as PieIconButtonReact } from './index';
3
+ import { PieIconButton as PieIconButtonLit } from './index';
4
+ import { IconButtonProps } from './defs';
5
5
 
6
6
  export * from './defs';
7
7
 
8
- export const PieIconButton = createComponent({
8
+ const PieIconButtonReact = createComponent({
9
9
  displayName: 'PieIconButton',
10
- elementClass: PieIconButtonReact,
10
+ elementClass: PieIconButtonLit,
11
11
  react: React,
12
12
  tagName: 'pie-icon-button',
13
13
  events: {},
14
14
  });
15
+
16
+ type ReactBaseType = React.ButtonHTMLAttributes<HTMLButtonElement>
17
+
18
+
19
+
20
+ export const PieIconButton = PieIconButtonReact as React.ForwardRefExoticComponent<React.PropsWithoutRef<IconButtonProps> & React.RefAttributes<PieIconButtonLit> & ReactBaseType>;