@justeattakeaway/pie-icon-button 0.6.0 → 0.6.1

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.
@@ -1,4 +1,4 @@
1
- [3:10:46 PM] @custom-elements-manifest/analyzer: Created new manifest.
1
+ [2:38:37 PM] @custom-elements-manifest/analyzer: Created new manifest.
2
2
  react wrapper has been added!
3
3
  vite v4.3.9 building for production...
4
4
  transforming...
@@ -9,6 +9,6 @@ computing gzip size...
9
9
  dist/react.js 59.03 kB │ gzip: 15.92 kB
10
10
  
11
11
  [vite:dts] Start generate declaration files...
12
- ✓ built in 28.00s
13
- [vite:dts] Declaration files built in 25385ms.
12
+ ✓ built in 23.86s
13
+ [vite:dts] Declaration files built in 21734ms.
14
14
  
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @justeattakeaway/pie-icon-button
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [Changed] - Updated defs to use different array type syntax ([#566](https://github.com/justeattakeaway/pie/pull/566)) by [@ashleynolan](https://github.com/ashleynolan)
8
+
3
9
  ## 0.6.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -24,7 +24,9 @@
24
24
 
25
25
  ## `pie-icon-button`
26
26
 
27
- `pie-icon-button` is a Web Component built using the Lit library. It offers a simple and accessible icon button component for web applications. This component can be easily integrated into various frontend frameworks and customized through a set of properties.
27
+ `pie-icon-button` is a Web Component built using the Lit library. It offers a simple and accessible icon button component for web applications.
28
+
29
+ This component can be easily integrated into various frontend frameworks and customized through a set of properties.
28
30
 
29
31
  ## Local development
30
32
 
@@ -66,11 +68,11 @@ import { PieIconButton } from '@justeattakeaway/pie-icon-button/dist/react';
66
68
 
67
69
  ## Props
68
70
 
69
- | Property | Type | Default | Description |
70
- |-------------|-----------|-----------------|----------------------------------------------------------------------|
71
- | size | `String` | `medium` | Size of the Icon Button, one of `iconButtonSizes` – `xsmall`, `small`, `medium`, `large` |
71
+ | Property | Type | Default | Description |
72
+ |-------------|-----------|-----------------|-------------------------------------------------------------------------------------------------------------------|
73
+ | size | `String` | `medium` | Size of the Icon Button, one of `iconButtonSizes` – `xsmall`, `small`, `medium`, `large` |
72
74
  | variant | `String` | `primary` | Variant of the button, one of `iconButtonVariants` – `primary`, `secondary`, `outline`, `ghost`, `ghost-tertiary` |
73
- | disabled | `Boolean` | `false` | If `true`, disables the button. |
75
+ | disabled | `Boolean` | `false` | If `true`, disables the button. |
74
76
 
75
77
  In your markup or JSX, you can then use these to set the properties for the `pie-icon-button` component:
76
78
 
@@ -90,18 +92,21 @@ For example, to add a click handler in various templates:
90
92
 
91
93
 
92
94
  ### HTML
95
+
93
96
  ```html
94
97
  <!-- Other attributes omitted for clarity -->
95
98
  <pie-icon-button onclick="e => console.log(e)">Click me!</pie-icon-button>
96
99
  ```
97
100
 
98
101
  ### Vue templates (using Nuxt 3)
102
+
99
103
  ```html
100
104
  <!-- Other attributes omitted for clarity -->
101
105
  <pie-icon-button @click="handleClick">Click me!</pie-icon-button>
102
106
  ```
103
107
 
104
108
  ### React templates (using Next 13)
109
+
105
110
  ```html
106
111
  <!-- Other attributes omitted for clarity -->
107
112
  <PieIconButton onClick={handleClick}>increment</PieIconButton>
@@ -129,13 +134,13 @@ yarn test:visual --filter=pie-icon-button
129
134
 
130
135
  Note: To run these locally, you will need to ensure that any environment variables required are set up on your machine to mirror those on CI (such as Percy tokens). How you achieve this will differ between operating systems.
131
136
 
132
- Setup via bash:
137
+ #### Setup via bash
133
138
 
134
139
  ```bash
135
140
  export PERCY_TOKEN_PIE_ICON_BUTTON=abcde
136
141
  ```
137
142
 
138
- Setup via package.json:
143
+ #### Setup via package.json
139
144
 
140
145
  Under scripts `test:visual` replace the environment variable with the below:
141
146
 
@@ -18,9 +18,9 @@ export interface IconButtonProps {
18
18
  /**
19
19
  * Icon Button size variants
20
20
  */
21
- export declare const iconButtonSizes: IconButtonProps['size'][];
21
+ export declare const iconButtonSizes: Array<IconButtonProps['size']>;
22
22
  /**
23
23
  * Icon Button style variants
24
24
  */
25
- export declare const iconButtonVariants: IconButtonProps['variant'][];
25
+ export declare const iconButtonVariants: Array<IconButtonProps['variant']>;
26
26
  //# sourceMappingURL=defs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../src/defs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C;;;OAGG;IACH,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,CAAC;IAC1E;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,EAKpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAAC,EAM1D,CAAC"}
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../src/defs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9C;;;OAGG;IACH,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,CAAC;IAC1E;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAK1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,CAMhE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-icon-button",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "PIE Design System Icon Button built using Web Components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/defs.ts CHANGED
@@ -19,7 +19,7 @@ export interface IconButtonProps {
19
19
  /**
20
20
  * Icon Button size variants
21
21
  */
22
- export const iconButtonSizes: IconButtonProps['size'][] = [
22
+ export const iconButtonSizes: Array<IconButtonProps['size']> = [
23
23
  'xsmall',
24
24
  'small',
25
25
  'medium',
@@ -29,7 +29,7 @@ export const iconButtonSizes: IconButtonProps['size'][] = [
29
29
  /**
30
30
  * Icon Button style variants
31
31
  */
32
- export const iconButtonVariants: IconButtonProps['variant'][] = [
32
+ export const iconButtonVariants: Array<IconButtonProps['variant']> = [
33
33
  'primary',
34
34
  'secondary',
35
35
  'outline',