@justeattakeaway/pie-button 0.25.0 → 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-button",
3
- "version": "0.25.0",
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",
@@ -12,7 +12,7 @@
12
12
  "**/*.d.ts"
13
13
  ],
14
14
  "scripts": {
15
- "build": "yarn build:wrapper pie-button && run -T vite build ",
15
+ "build": "yarn build:wrapper pie-button && run -T vite build",
16
16
  "lint:scripts": "run -T eslint .",
17
17
  "lint:scripts:fix": "run -T eslint . --fix",
18
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];