@justeattakeaway/pie-button 0.24.1 → 0.26.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.
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-button",
3
- "version": "0.24.1",
3
+ "version": "0.26.0",
4
4
  "description": "PIE design system button built using web components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
- "types": "dist/types/index.d.ts",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "src",
11
+ "dist",
12
+ "**/*.d.ts"
13
+ ],
9
14
  "scripts": {
10
- "build": "yarn build:wrapper pie-button && run -T vite build ",
15
+ "build": "yarn build:wrapper pie-button && run -T vite build",
11
16
  "lint:scripts": "run -T eslint .",
12
17
  "lint:scripts:fix": "run -T eslint . --fix",
13
18
  "lint:style": "run -T stylelint ./src/**/*.{css,scss}",
package/src/button.scss CHANGED
@@ -214,13 +214,18 @@
214
214
  @include spinner-base-colors('--dt-color-content-interactive-secondary');
215
215
  }
216
216
 
217
- &[variant='ghost-inverse'] {
217
+ &[variant='ghost-inverse'],
218
+ &[variant='outline-inverse'] {
218
219
  --btn-bg-color: transparent;
219
220
  --btn-text-color: var(--dt-color-content-interactive-primary);
220
221
 
221
222
  @include button-interactive-states('--dt-color-container-inverse', true);
222
223
  }
223
224
 
225
+ &[variant='outline-inverse'] {
226
+ border: 1px solid var(--dt-color-border-strong);
227
+ }
228
+
224
229
  &[variant='destructive'] {
225
230
  --btn-bg-color: var(--dt-color-support-error);
226
231
 
@@ -258,7 +263,7 @@
258
263
 
259
264
  &[size='xsmall'] {
260
265
  --btn-padding: 6px var(--dt-spacing-b);
261
- --btn-font-size: calc(var(--dt-font-size-14) * 1px);
266
+ --btn-font-size: #{p.font-size(--dt-font-size-14)};
262
267
  --btn-line-height: calc(var(--dt-font-size-14-line-height) * 1px);
263
268
  --btn-icon-size: 16px;
264
269
  --spinner-size: var(--spinner-size-s);
@@ -267,7 +272,7 @@
267
272
 
268
273
  &[size='small-expressive'] {
269
274
  --btn-padding: 6px var(--dt-spacing-d);
270
- --btn-font-size: calc(var(--dt-font-size-20) * 1px);
275
+ --btn-font-size: #{p.font-size(--dt-font-size-20)};
271
276
  --btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);
272
277
  --btn-icon-size: 20px;
273
278
  --spinner-size: var(--spinner-size-s);
@@ -276,7 +281,7 @@
276
281
 
277
282
  &[size='small-productive'] {
278
283
  --btn-padding: 8px var(--dt-spacing-d);
279
- --btn-font-size: calc(var(--dt-font-size-16) * 1px);
284
+ --btn-font-size: #{p.font-size(--dt-font-size-16)};
280
285
  --btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);
281
286
  --btn-icon-size: 20px;
282
287
  --spinner-size: var(--spinner-size-s);
@@ -289,7 +294,7 @@
289
294
 
290
295
  &[size='large'] {
291
296
  --btn-padding: 14px var(--dt-spacing-e);
292
- --btn-font-size: calc(var(--dt-font-size-20) * 1px);
297
+ --btn-font-size: #{p.font-size(--dt-font-size-20)};
293
298
  --btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);
294
299
  --spinner-size: var(--spinner-size-m);
295
300
  --spinner-border-width: var(--spinner-border-width-m);
package/src/defs.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export const sizes = ['xsmall', 'small-productive', 'small-expressive', 'medium', 'large'] as const;
2
2
  export const types = ['submit', 'button', 'reset', 'menu'] as const;
3
3
  export const variants = [
4
- 'primary', 'secondary', 'outline', 'ghost', 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',
4
+ 'primary', 'secondary', 'outline', 'outline-inverse', 'ghost',
5
+ 'inverse', 'ghost-inverse', 'destructive', 'destructive-ghost',
5
6
  ] as const;
6
7
 
7
8
  export type Variant = typeof variants[number];
package/src/index.ts CHANGED
@@ -7,12 +7,7 @@ import {
7
7
  } from './defs';
8
8
 
9
9
  // Valid values available to consumers
10
- export {
11
- type ButtonProps,
12
- sizes,
13
- types,
14
- variants,
15
- };
10
+ export * from './defs';
16
11
 
17
12
  const componentSelector = 'pie-button';
18
13
 
package/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- .turbo
2
- dist
3
- node_modules
4
- lit-browsers-report
5
- lit-visual-report
@@ -1,14 +0,0 @@
1
- [2:03:50 PM] @custom-elements-manifest/analyzer: Created new manifest.
2
- react wrapper has been added!
3
- vite v4.3.9 building for production...
4
- transforming...
5
- ✓ 22 modules transformed.
6
- rendering chunks...
7
- computing gzip size...
8
- dist/index.js 14.78 kB │ gzip: 2.72 kB
9
- dist/react.js 59.01 kB │ gzip: 15.91 kB
10
- 
11
- [vite:dts] Start generate declaration files...
12
- ✓ built in 46.23s
13
- [vite:dts] Declaration files built in 42885ms.
14
- 
package/CHANGELOG.md DELETED
@@ -1,306 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.24.1
4
-
5
- ### Patch Changes
6
-
7
- - [Changed] - use latest pie-design-tokens ([#716](https://github.com/justeattakeaway/pie/pull/716)) by [@xander-marjoram](https://github.com/xander-marjoram)
8
-
9
- ## 0.24.0
10
-
11
- ### Minor Changes
12
-
13
- - [Added] - destructive and destructive-ghost button variants ([#686](https://github.com/justeattakeaway/pie/pull/686)) by [@xander-marjoram](https://github.com/xander-marjoram)
14
-
15
- [Fixed] - hover and active colours for ghost-inverse variant
16
- [Added] - mixin for reassigning button spinner HSL custom properties
17
-
18
- - [Added] - `font-size` function added & tests ([#681](https://github.com/justeattakeaway/pie/pull/681)) by [@ashleynolan](https://github.com/ashleynolan)
19
-
20
- [Added] - adding pie-css to pie-button
21
-
22
- ### Patch Changes
23
-
24
- - [Changed] - use latest pie-design-tokens ([#694](https://github.com/justeattakeaway/pie/pull/694)) by [@xander-marjoram](https://github.com/xander-marjoram)
25
-
26
- ## 0.23.0
27
-
28
- ### Minor Changes
29
-
30
- - [Added] - axe builder to be shared as a base instance across broswer accessibility tests ([#669](https://github.com/justeattakeaway/pie/pull/669)) by [@raoufswe](https://github.com/raoufswe)
31
-
32
- ## 0.22.0
33
-
34
- ### Minor Changes
35
-
36
- - [Fixed] - Prevent tree-shaking of components in storybook ([#667](https://github.com/justeattakeaway/pie/pull/667)) by [@xander-marjoram](https://github.com/xander-marjoram)
37
-
38
- [Removed] - Built webc icons from source control
39
- [Added] - Type declaration files for components
40
- [Added] - Types for pie-icons
41
- [Added] - TS version of pie-icons-configs/config.js (Will be used after DSW-1025)
42
- [Added] - Webc icon tests for width, height and base classes
43
- [Changed] - Update pie-icons-webc build to generate a slightly different template for regular and large icons (using different types, etc.)
44
- [Changed] - Update pie-icons-webc rollup config to remove commonjs build
45
- [Changed] - Use `just-kebab-case` and `just-pascal-case` instead of `kebab-case` and `pascal-case` to simplify usage (and they're more recently maintained)
46
-
47
- ## 0.21.0
48
-
49
- ### Minor Changes
50
-
51
- - [Changed] - Add js/ts linting and fix errors ([#653](https://github.com/justeattakeaway/pie/pull/653)) by [@jamieomaguire](https://github.com/jamieomaguire)
52
-
53
- ## 0.20.0
54
-
55
- ### Minor Changes
56
-
57
- - [Added] - Slots for leading and trailing icons ([#634](https://github.com/justeattakeaway/pie/pull/634)) by [@ashleynolan](https://github.com/ashleynolan)
58
-
59
- ## 0.19.0
60
-
61
- ### Minor Changes
62
-
63
- - [Added] - pie-button loading state ([#603](https://github.com/justeattakeaway/pie/pull/603)) by [@jamieomaguire](https://github.com/jamieomaguire)
64
-
65
- ## 0.18.0
66
-
67
- ### Minor Changes
68
-
69
- - [Added] - inverse and ghost-inverse variants to pie-button ([#596](https://github.com/justeattakeaway/pie/pull/596)) by [@jamieomaguire](https://github.com/jamieomaguire)
70
-
71
- - [Changed] - Set all component props to public ([#597](https://github.com/justeattakeaway/pie/pull/597)) by [@jamieomaguire](https://github.com/jamieomaguire)
72
-
73
- ## 0.17.0
74
-
75
- ### Minor Changes
76
-
77
- - [Changed] - Styles updated to fully match design updates ([#581](https://github.com/justeattakeaway/pie/pull/581)) by [@ashleynolan](https://github.com/ashleynolan)
78
-
79
- - Focus styles have been updated to the new style
80
- - Padding, font-size and line-heights adjusted inline with designs
81
- - Outline button text colour updated from `color-content-interactive-tertiary` to `color-content-interactive-secondary`
82
- - Primary buttons at `xsmall` and `small-productive` now have darker background
83
- - `ghost` variant background colour changed to `transparent` (rather than #fff)
84
-
85
- ## 0.16.1
86
-
87
- ### Patch Changes
88
-
89
- - [Changed] - Updated defs to use different array type syntax ([#566](https://github.com/justeattakeaway/pie/pull/566)) by [@ashleynolan](https://github.com/ashleynolan)
90
-
91
- ## 0.16.0
92
-
93
- ### Minor Changes
94
-
95
- - [Updated] - enum types to string union types to string union types ([#508](https://github.com/justeattakeaway/pie/pull/508)) by [@FayeCarter](https://github.com/FayeCarter)
96
-
97
- ## 0.15.0
98
-
99
- ### Minor Changes
100
-
101
- - [Changed] - Refactor visual tests to have labels showing props ([#519](https://github.com/justeattakeaway/pie/pull/519)) by [@jamieomaguire](https://github.com/jamieomaguire)
102
-
103
- - [Changed] - use prop variant helper for simpler and more extensive visual tests ([#499](https://github.com/justeattakeaway/pie/pull/499)) by [@jamieomaguire](https://github.com/jamieomaguire)
104
-
105
- - [Changed] - moved pie-webc-core dependency to devDependencies in each component ([#499](https://github.com/justeattakeaway/pie/pull/499)) by [@jamieomaguire](https://github.com/jamieomaguire)
106
-
107
- - [Added] - Additional notes on visual tests and environment variables ([#525](https://github.com/justeattakeaway/pie/pull/525)) by [@jamieomaguire](https://github.com/jamieomaguire)
108
-
109
- - [Added] Read me percy config examples ([#529](https://github.com/justeattakeaway/pie/pull/529)) by [@kevinrodrigues](https://github.com/kevinrodrigues)
110
-
111
- ### Patch Changes
112
-
113
- - [Changed] - Use `componentSelector` to define the custom element ([#530](https://github.com/justeattakeaway/pie/pull/530)) by [@raoufswe](https://github.com/raoufswe)
114
-
115
- ## 0.14.0
116
-
117
- ### Minor Changes
118
-
119
- - [Changed] - customElement.define parameter to string ([#507](https://github.com/justeattakeaway/pie/pull/507)) by [@LTurns](https://github.com/LTurns)
120
-
121
- - [Fixed] – Encapsulated styles and removed reflect ([#507](https://github.com/justeattakeaway/pie/pull/507)) by [@LTurns](https://github.com/LTurns)
122
-
123
- ## 0.13.0
124
-
125
- ### Minor Changes
126
-
127
- - [Changed] - Build script to include generating react wrapper ([#426](https://github.com/justeattakeaway/pie/pull/426)) by [@LTurns](https://github.com/LTurns)
128
-
129
- - [Changed] - Deleted old prop validation decorator to replace with shared one from the core package ([#491](https://github.com/justeattakeaway/pie/pull/491)) by [@jamieomaguire](https://github.com/jamieomaguire)
130
-
131
- - [Changed] - Changed styles to use CSS Custom Props and host attrs ([#482](https://github.com/justeattakeaway/pie/pull/482)) by [@ashleynolan](https://github.com/ashleynolan)
132
-
133
- ### Patch Changes
134
-
135
- - [Added] - Missing `test:ci` scripts to package.json ([#492](https://github.com/justeattakeaway/pie/pull/492)) by [@siggerzz](https://github.com/siggerzz)
136
-
137
- - [Fixed] - Resolved TS Build errors ([#482](https://github.com/justeattakeaway/pie/pull/482)) by [@ashleynolan](https://github.com/ashleynolan)
138
-
139
- - [Updated] - components to use the shared configurations ([#487](https://github.com/justeattakeaway/pie/pull/487)) by [@fernandofranca](https://github.com/fernandofranca)
140
-
141
- - Updated dependencies [[`090354733`](https://github.com/justeattakeaway/pie/commit/090354733f24f0aa52ce287db7f8d13648414150)]:
142
- - @justeattakeaway/pie-webc-core@0.2.0
143
-
144
- ## 0.12.2
145
-
146
- ### Patch Changes
147
-
148
- - Updated dependencies [[`1f79d9d1a`](https://github.com/justeattakeaway/pie/commit/1f79d9d1a6fe9160b244e82d956290136b87187b)]:
149
- - @justeattakeaway/pie-webc-core@0.1.0
150
-
151
- ## 0.12.1
152
-
153
- ### Patch Changes
154
-
155
- - [Changed] - Added missing newline at the end of tsconfig.json ([#439](https://github.com/justeattakeaway/pie/pull/439)) by [@fernandofranca](https://github.com/fernandofranca)
156
-
157
- [Changed] - Updated README.md
158
- [Removed] - Removed npm `dev` script
159
-
160
- ## 0.12.0
161
-
162
- ### Minor Changes
163
-
164
- - [Changed] - extended readme file to mention props, events and enum exports ([#434](https://github.com/justeattakeaway/pie/pull/434)) by [@jamieomaguire](https://github.com/jamieomaguire)
165
-
166
- - [Changed] - Prevent hover and active status on disabled btns and change outline to border for safari support ([#434](https://github.com/justeattakeaway/pie/pull/434)) by [@jamieomaguire](https://github.com/jamieomaguire)
167
-
168
- - [Removed] - custom event handler and updated tests accordingly ([#434](https://github.com/justeattakeaway/pie/pull/434)) by [@jamieomaguire](https://github.com/jamieomaguire)
169
-
170
- - [Added] - isFullWidth prop to button ([#434](https://github.com/justeattakeaway/pie/pull/434)) by [@jamieomaguire](https://github.com/jamieomaguire)
171
-
172
- ## 0.11.0
173
-
174
- ### Minor Changes
175
-
176
- - [Changed] - Improved readme files ([#418](https://github.com/justeattakeaway/pie/pull/418)) by [@jamieomaguire](https://github.com/jamieomaguire)
177
-
178
- - [Changed] - Refactor SCSS to reduce duplication ([#416](https://github.com/justeattakeaway/pie/pull/416)) by [@jamieomaguire](https://github.com/jamieomaguire)
179
-
180
- - [Changed] - Copy playwright projects from monorepo root ([#416](https://github.com/justeattakeaway/pie/pull/416)) by [@jamieomaguire](https://github.com/jamieomaguire)
181
-
182
- - [Changed] - Split small size into expressive and productive ([#416](https://github.com/justeattakeaway/pie/pull/416)) by [@jamieomaguire](https://github.com/jamieomaguire)
183
-
184
- ### Patch Changes
185
-
186
- - [Removed] the custom decorator and uses the native `customElement` decorator instead ([#417](https://github.com/justeattakeaway/pie/pull/417)) by [@fernandofranca](https://github.com/fernandofranca)
187
-
188
- ## 0.10.2
189
-
190
- ### Patch Changes
191
-
192
- - [Added] Declare global statement back in. ([#393](https://github.com/justeattakeaway/pie/pull/393)) by [@kevinrodrigues](https://github.com/kevinrodrigues)
193
-
194
- ## 0.10.1
195
-
196
- ### Patch Changes
197
-
198
- - [Fixed] - Added module entry for component ([#378](https://github.com/justeattakeaway/pie/pull/378)) by [@ashleynolan](https://github.com/ashleynolan)
199
-
200
- ## 0.10.0
201
-
202
- ### Minor Changes
203
-
204
- - [Removed] Global declare statement ([#371](https://github.com/justeattakeaway/pie/pull/371)) by [@kevinrodrigues](https://github.com/kevinrodrigues)
205
-
206
- ## 0.9.0
207
-
208
- ### Minor Changes
209
-
210
- - [Added] - HTMLElementTagNameMap entry for pie-button element ([#364](https://github.com/justeattakeaway/pie/pull/364)) by [@jamieomaguire](https://github.com/jamieomaguire)
211
-
212
- - [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)
213
-
214
- ## 0.8.0
215
-
216
- ### Minor Changes
217
-
218
- - [Updated] - Register approach for button web component ([#346](https://github.com/justeattakeaway/pie/pull/346)) by [@fernandofranca](https://github.com/fernandofranca)
219
-
220
- [Added] - "types" field in package.json for better DX and IDE TypesScript support
221
- [Updated] - Provide Vite settings for generating TypeScript declaration files during build
222
-
223
- ## 0.7.0
224
-
225
- ### Minor Changes
226
-
227
- - [Updated] button to handle custom events ([#309](https://github.com/justeattakeaway/pie/pull/309)) by [@FayeCarter](https://github.com/FayeCarter)
228
-
229
- ### Patch Changes
230
-
231
- - Add missing Volta settings to package.json ([#322](https://github.com/justeattakeaway/pie/pull/322)) by [@fernandofranca](https://github.com/fernandofranca)
232
-
233
- ## 0.6.1
234
-
235
- ### Patch Changes
236
-
237
- - [Added] `watch` script in `package.json` ([#233](https://github.com/justeattakeaway/pie/pull/233)) by [@LTurns](https://github.com/LTurns)
238
-
239
- [Added] README content for `yarn watch` script
240
-
241
- ## 0.6.0
242
-
243
- ### Minor Changes
244
-
245
- - [Added] - state styling to button (focus/hover/active/disabled) ([#234](https://github.com/justeattakeaway/pie/pull/234)) by [@raoufswe](https://github.com/raoufswe)
246
-
247
- ## 0.5.1
248
-
249
- ### Patch Changes
250
-
251
- - [Changed] - Replaced hard-coded font values with scss variables ([#226](https://github.com/justeattakeaway/pie/pull/226)) by [@LTurns](https://github.com/LTurns)
252
-
253
- ## 0.5.0
254
-
255
- ### Minor Changes
256
-
257
- - [Changed] - Bring button styles into the component ([#178](https://github.com/justeattakeaway/pie/pull/178)) by [@xander-marjoram](https://github.com/xander-marjoram)
258
-
259
- - [Added] - Size property to pie-button component ([#178](https://github.com/justeattakeaway/pie/pull/178)) by [@xander-marjoram](https://github.com/xander-marjoram)
260
-
261
- - [Removed] - index.html file in favour of Storybook ([#178](https://github.com/justeattakeaway/pie/pull/178)) by [@xander-marjoram](https://github.com/xander-marjoram)
262
-
263
- ## 0.4.0
264
-
265
- ### Minor Changes
266
-
267
- - [Changed] - Set TSconfig target to ES6 to allow modern syntax such as property accessors ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
268
-
269
- - [Added] Create decorator for validating property values ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
270
-
271
- - [Added] - `variant` property to decide how we style the button ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
272
-
273
- - [Added] - Lit `classmap` directive to handle conditional css class logic and rendering ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
274
-
275
- - [Changed] - Refactored props to include validation based on enums and add console errors for invalid values ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
276
-
277
- - [Changed] - Renamed `actionType` property to `type` ([#171](https://github.com/justeattakeaway/pie/pull/171)) by [@jamieomaguire](https://github.com/jamieomaguire)
278
-
279
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
280
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
281
-
282
- ## v0.3.0
283
-
284
- _January 24, 2023_
285
-
286
- ### Added
287
-
288
- - Button default styling (medium).
289
- - JET font family to html file.
290
-
291
- ## v0.2.0
292
-
293
- _January 23, 2023_
294
-
295
- ### Added
296
-
297
- - `actionType` property mapped to `type` attribute.
298
-
299
- ## v0.1.0
300
-
301
- _January 19, 2023_
302
-
303
- ### Added
304
-
305
- - Basic button using Lit
306
- - Initial TypeScript and Vite config
@@ -1 +0,0 @@
1
- export * from './packages/components/pie-button/src/index'
@@ -1 +0,0 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../src/defs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,gFAAiF,CAAC;AACpG,eAAO,MAAM,KAAK,gDAAiD,CAAC;AACpE,eAAO,MAAM,QAAQ,uHAEX,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAE9C,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACtB"}
@@ -1,26 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { ButtonProps, sizes, types, variants } from './defs';
3
- export { type ButtonProps, sizes, types, variants, };
4
- declare const componentSelector = "pie-button";
5
- /**
6
- * @slot icon-leading - Leading icon
7
- * @slot icon-trailing - Trailing icon
8
- * @slot - Default slot
9
- */
10
- export declare class PieButton extends LitElement implements ButtonProps {
11
- size: ButtonProps['size'];
12
- type: ButtonProps['type'];
13
- variant: ButtonProps['variant'];
14
- disabled: boolean;
15
- isLoading: boolean;
16
- isFullWidth: boolean;
17
- render(): import("lit-html").TemplateResult<1>;
18
- focus(): void;
19
- static styles: import("lit").CSSResult;
20
- }
21
- declare global {
22
- interface HTMLElementTagNameMap {
23
- [componentSelector]: PieButton;
24
- }
25
- }
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAIlD,OAAO,EACH,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EACtC,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,EACL,KAAK,EACL,QAAQ,GACX,CAAC;AAEF,QAAA,MAAM,iBAAiB,eAAe,CAAC;AAEvC;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,UAAW,YAAW,WAAW;IAGrD,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAY;IAIrC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAY;IAIrC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAa;IAG5C,QAAQ,UAAS;IAGjB,SAAS,UAAS;IAGlB,WAAW,UAAS;IAE3B,MAAM;IAoBN,KAAK;IAKL,MAAM,CAAC,MAAM,0BAAqB;CACrC;AAID,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC;KAClC;CACJ"}
@@ -1,3 +0,0 @@
1
- import { PieButton as PieButtonReact } from './index';
2
- export declare const PieButton: import("@lit-labs/react").ReactWebComponent<PieButtonReact, {}>;
3
- //# sourceMappingURL=react.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/react.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAEtD,eAAO,MAAM,SAAS,iEAMpB,CAAC"}
@@ -1 +0,0 @@
1
- export * from './packages/components/pie-button/src/react'
@@ -1,56 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <link rel="preload" href="https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Regular-optimised.woff2" as="font" type="font/woff2" crossorigin>
7
- <link rel="preload" href="https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Bold-optimised.woff2" as="font" type="font/woff2" crossorigin>
8
- <link rel="preload" href="https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-ExtraBold-optimised.woff2" as="font" type="font/woff2" crossorigin>
9
- <style>
10
- @font-face {
11
- font-family: JETSansDigital;
12
- src: url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Regular-optimised.woff2') format("woff2"),
13
- url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Regular-optimised.woff') format("woff");
14
- font-weight: 400;
15
- font-display: swap;
16
- }
17
- @font-face {
18
- font-family: JETSansDigital;
19
- src: url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Bold-optimised.woff2') format("woff2"),
20
- url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-Bold-optimised.woff') format("woff");
21
- font-weight: 700;
22
- font-display: swap;
23
- }
24
- @font-face {
25
- font-family: JETSansDigital;
26
- src: url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-ExtraBold-optimised.woff2') format("woff2"),
27
- url('https://d30v2pzvrfyzpo.cloudfront.net/fonts/JETSansDigital-ExtraBold-optimised.woff') format("woff");
28
- font-weight: 800;
29
- font-display: swap;
30
- }
31
- body {
32
- font-feature-settings: "tnum"; /* Enable tabular numbers */
33
- }
34
- /* basic styles to center align components and give them some spacing */
35
- #root {
36
- padding: 1em;
37
- }
38
-
39
- #root > * {
40
- display: block;
41
- margin-inline: auto;
42
- }
43
-
44
- #root > * + * {
45
- margin-top: 1em;
46
- }
47
- </style>
48
- <title>Testing Page</title>
49
- <link rel="stylesheet" type="text/css" href="https://unpkg.com/@justeat/pie-design-tokens/dist/jet.css" />
50
- <link rel="stylesheet" type="text/css" href="https://unpkg.com/@justeat/pie-design-tokens/dist/jet-hsl-colors.css" />
51
- </head>
52
- <body>
53
- <div id="root"></div>
54
- <script type="module" src="./index.ts"></script>
55
- </body>
56
- </html>
@@ -1 +0,0 @@
1
- // Import common styles here
@@ -1,4 +0,0 @@
1
- import { defineConfig } from '@sand4rt/experimental-ct-web';
2
- import { getPlaywrightVisualConfig } from '@justeattakeaway/pie-components-config';
3
-
4
- export default defineConfig(getPlaywrightVisualConfig());
@@ -1,4 +0,0 @@
1
- import { defineConfig } from '@sand4rt/experimental-ct-web';
2
- import { getPlaywrightConfig } from '@justeattakeaway/pie-components-config';
3
-
4
- export default defineConfig(getPlaywrightConfig());
@@ -1,35 +0,0 @@
1
- import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/fixtures.ts';
2
- import { getAllPropCombinations, splitCombinationsByPropertyValue } from '@justeattakeaway/pie-webc-testing/src/helpers/get-all-prop-combos.ts';
3
- import { PropObject, WebComponentPropValues } from '@justeattakeaway/pie-webc-testing/src/helpers/defs.ts';
4
- import { PieButton } from '@/index';
5
- import { sizes, variants } from '@/defs';
6
-
7
- const props: PropObject = {
8
- variant: variants,
9
- size: sizes,
10
- type: 'button', // Changing the type does not affect the appearance of the button
11
- isFullWidth: [true, false],
12
- disabled: [true, false],
13
- };
14
-
15
- const componentPropsMatrix : WebComponentPropValues[] = getAllPropCombinations(props);
16
- const componentPropsMatrixByVariant: Record<string, WebComponentPropValues[]> = splitCombinationsByPropertyValue(componentPropsMatrix, 'variant');
17
- const componentVariants: string[] = Object.keys(componentPropsMatrixByVariant);
18
-
19
- componentVariants.forEach((variant) => test(`Render all prop variations for Variant: ${variant}`, async ({ makeAxeBuilder, mount }) => {
20
- await Promise.all(componentPropsMatrixByVariant[variant].map(async (combo: WebComponentPropValues) => {
21
- await mount(
22
- PieButton,
23
- {
24
- props: { ...combo },
25
- slots: {
26
- default: 'Hello world',
27
- },
28
- },
29
- );
30
- }));
31
-
32
- const results = await makeAxeBuilder().analyze();
33
-
34
- expect(results.violations).toEqual([]);
35
- }));
@@ -1,30 +0,0 @@
1
- import { test, expect } from '@sand4rt/experimental-ct-web';
2
- import { PieButton, ButtonProps } from '@/index';
3
-
4
- const props: ButtonProps = {
5
- size: 'large',
6
- variant: 'primary',
7
- };
8
-
9
- test('should correctly work with native click events', async ({ mount }) => {
10
- const messages: string[] = [];
11
- const expectedEventMessage = 'Native event dispatched';
12
- const component = await mount(
13
- PieButton,
14
- {
15
- props,
16
- slots: {
17
- default: 'Click me!',
18
- },
19
- on: {
20
- click: () => {
21
- messages.push(expectedEventMessage);
22
- },
23
- },
24
- },
25
- );
26
-
27
- await component.click();
28
-
29
- expect(messages).toEqual([expectedEventMessage]);
30
- });