@justeattakeaway/pie-button 1.6.0 → 1.6.2

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.
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # @justeattakeaway/pie-button
2
+ [Source Code](https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-button) | [Design Documentation](https://pie.design/components/button) | [NPM](https://www.npmjs.com/package/@justeattakeaway/pie-button)
2
3
 
3
4
  <p>
4
5
  <a href="https://www.npmjs.com/@justeattakeaway/pie-button">
@@ -115,8 +116,10 @@ import '@justeattakeaway/pie-webc/components/button.js'
115
116
  ```
116
117
 
117
118
  ```html
118
- <!-- pass js file into <script> tag -->
119
- <pie-button type="reset" isFullWidth="true" onclick="e => console.log(e)">Click me!</pie-button>
119
+ <pie-button type="reset" isFullWidth="true" onclick="e => console.log(e)">
120
+ Click me!
121
+ </pie-button>
122
+
120
123
  <script type="module" src="/main.js"></script>
121
124
  ```
122
125
 
@@ -126,7 +129,9 @@ import '@justeattakeaway/pie-webc/components/button.js'
126
129
  // Vue templates (using Nuxt 3)
127
130
  import '@justeattakeaway/pie-webc/components/button.js';
128
131
 
129
- <pie-button @click="handleClick" size="large" type="button" variant="secondary">Click me!</pie-button>
132
+ <pie-button @click="handleClick" size="large" type="button" variant="secondary">
133
+ Click me!
134
+ </pie-button>
130
135
  ```
131
136
 
132
137
  **For React Applications:**
@@ -134,7 +139,9 @@ import '@justeattakeaway/pie-webc/components/button.js';
134
139
  ```jsx
135
140
  import { PieButton } from '@justeattakeaway/pie-webc/react/button.js';
136
141
 
137
- <PieButton onClick={handleClick}>increment</PieButton>
142
+ <PieButton onClick={handleClick}>
143
+ increment
144
+ </PieButton>
138
145
  ```
139
146
 
140
147
  ## Questions and Support
@@ -48,9 +48,9 @@
48
48
  "kind": "variable",
49
49
  "name": "variants",
50
50
  "type": {
51
- "text": "[\n 'primary', 'primary-alternative', 'secondary', 'outline', 'outline-inverse', 'ghost',\n 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',\n]"
51
+ "text": "[\r\n 'primary', 'primary-alternative', 'secondary', 'outline', 'outline-inverse', 'ghost',\r\n 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',\r\n]"
52
52
  },
53
- "default": "[\n 'primary', 'primary-alternative', 'secondary', 'outline', 'outline-inverse', 'ghost',\n 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',\n]"
53
+ "default": "[\r\n 'primary', 'primary-alternative', 'secondary', 'outline', 'outline-inverse', 'ghost',\r\n 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',\r\n]"
54
54
  },
55
55
  {
56
56
  "kind": "variable",
@@ -90,7 +90,7 @@
90
90
  "type": {
91
91
  "text": "DefaultProps"
92
92
  },
93
- "default": "{\n tag: 'button',\n size: 'medium',\n type: 'submit',\n variant: 'primary',\n iconPlacement: 'leading',\n disabled: false,\n isLoading: false,\n isFullWidth: false,\n isResponsive: false,\n}"
93
+ "default": "{\r\n tag: 'button',\r\n size: 'medium',\r\n type: 'submit',\r\n variant: 'primary',\r\n iconPlacement: 'leading',\r\n disabled: false,\r\n isLoading: false,\r\n isFullWidth: false,\r\n isResponsive: false,\r\n}"
94
94
  }
95
95
  ],
96
96
  "exports": [
@@ -361,7 +361,7 @@
361
361
  }
362
362
  }
363
363
  ],
364
- "description": "This method creates an invisible button of the same type as pie-button. It is then clicked, and immediately removed from the DOM.\nThis is done so that we trigger native form actions, such as submit and reset in the browser. The performance impact of adding and removing a single button to the DOM\nshould be neglible, however this should be monitored.\nThis is the only viable way of guaranteeing native button behaviour when using a web component in place of an actual HTML button.\n\nTODO: if we need to repeat this logic elsewhere, then we should consider moving this code to a shared class or mixin."
364
+ "description": "This method creates an invisible button of the same type as pie-button. It is then clicked, and immediately removed from the DOM.\r\nThis is done so that we trigger native form actions, such as submit and reset in the browser. The performance impact of adding and removing a single button to the DOM\r\nshould be neglible, however this should be monitored.\r\nThis is the only viable way of guaranteeing native button behaviour when using a web component in place of an actual HTML button.\r\n\r\nTODO: if we need to repeat this logic elsewhere, then we should consider moving this code to a shared class or mixin."
365
365
  },
366
366
  {
367
367
  "kind": "method",
package/dist/index.js CHANGED
@@ -478,7 +478,7 @@ const O = class O extends It {
478
478
  this.getAttribute("v") || this.setAttribute("v", O.v);
479
479
  }
480
480
  };
481
- O.v = "1.6.0";
481
+ O.v = "1.6.2";
482
482
  let j = O;
483
483
  const Nt = ["button", "a"], Pt = ["xsmall", "small-productive", "small-expressive", "medium", "large"], Jt = ["productive", "expressive"], Ot = ["submit", "button", "reset"], _t = [
484
484
  "primary",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-button",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "PIE design system button built using web components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,8 +53,8 @@
53
53
  "dist/*.js"
54
54
  ],
55
55
  "dependencies": {
56
- "@justeattakeaway/pie-spinner": "1.2.0",
57
- "@justeattakeaway/pie-webc-core": "0.26.0",
56
+ "@justeattakeaway/pie-spinner": "1.2.1",
57
+ "@justeattakeaway/pie-webc-core": "1.0.0",
58
58
  "element-internals-polyfill": "1.3.11"
59
59
  }
60
60
  }