@justeattakeaway/pie-card 0.19.5 → 0.19.7

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
@@ -20,16 +20,14 @@ This component can be easily integrated into various frontend frameworks and cus
20
20
  To install `pie-card` in your application, run the following on your command line:
21
21
 
22
22
  ```bash
23
- # npm
24
- $ npm i @justeattakeaway/pie-card
23
+ npm i @justeattakeaway/pie-card
25
24
 
26
- # yarn
27
- $ yarn add @justeattakeaway/pie-card
25
+ yarn add @justeattakeaway/pie-card
28
26
  ```
29
27
 
30
28
  ## Documentation
31
29
 
32
- Visit [Card | PIE Design System](https://pie.design/components/card/overview) to view more information on this component.
30
+ Visit [Card | PIE Design System](https://pie.design/components/card) to view more information on this component.
33
31
 
34
32
  ## Questions
35
33
 
@@ -38,7 +38,7 @@
38
38
  "type": {
39
39
  "text": "DefaultProps"
40
40
  },
41
- "default": "{\n tag: 'button',\n variant: 'default',\n disabled: false,\n isDraggable: false,\n}"
41
+ "default": "{\n disabled: false,\n variant: 'default',\n isDraggable: false,\n tag: 'button',\n}"
42
42
  }
43
43
  ],
44
44
  "exports": [
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
1
+ import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
2
2
  import type { CSSResult } from 'lit';
3
3
  import type { LitElement } from 'lit';
4
4
  import type { TemplateResult } from 'lit';
@@ -48,7 +48,7 @@ export declare interface CardProps {
48
48
  padding?: PaddingValue | `${PaddingValue},${PaddingValue}`;
49
49
  }
50
50
 
51
- export declare type DefaultProps = ComponentDefaultPropsGeneric<CardProps, 'tag' | 'variant' | 'disabled' | 'isDraggable'>;
51
+ export declare type DefaultProps = ComponentDefaultProps<CardProps, 'disabled' | 'variant' | 'isDraggable' | 'tag'>;
52
52
 
53
53
  export declare const defaultProps: DefaultProps;
54
54
 
package/dist/index.js CHANGED
@@ -4,10 +4,10 @@ import { property as d } from "lit/decorators.js";
4
4
  import { validPropertyValues as g, defineCustomElement as y } from "@justeattakeaway/pie-webc-core";
5
5
  const $ = `.c-card[isdraggable]{cursor:grab}.c-card[isdraggable]:active{cursor:grabbing}*,*:after,*:before{box-sizing:inherit}.c-card{--card-bg-color: var(--dt-color-container-default);--card-color: var(--dt-color-content-default);--card-radius: var(--dt-radius-rounded-c);--card-border-color: transparent;display:block;position:relative;color:var(--card-color);background-color:var(--card-bg-color);border:1px solid var(--card-border-color);border-radius:var(--card-radius);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;text-decoration:none}.c-card[variant=default]{box-shadow:var(--dt-elevation-card)}.c-card[variant=default]:hover:not([disabled]){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--card-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), calc(var(--dt-color-container-default-l) + var(--hover-modifier)))}.c-card[variant=default]:active:not([disabled]){--active-modifier: calc(-1 * var(--dt-color-active-01));--card-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), calc(var(--dt-color-container-default-l) + var(--active-modifier)))}.c-card[variant=outline]{border-color:var(--dt-color-border-strong)}.c-card[variant=outline]:hover:not([disabled]){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--card-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), calc(var(--dt-color-container-default-l) + var(--hover-modifier)))}.c-card[variant=outline]:active:not([disabled]){--active-modifier: calc(-1 * var(--dt-color-active-01));--card-bg-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), calc(var(--dt-color-container-default-l) + var(--active-modifier)))}.c-card[variant=inverse]{--card-bg-color: var(--dt-color-container-dark);--card-color: var(--dt-color-content-inverse);box-shadow:var(--dt-elevation-dark-card)}.c-card[variant=inverse]:hover:not([disabled]){--hover-modifier: var(--dt-color-hover-01);--card-bg-color: hsl(var(--dt-color-container-dark-h), var(--dt-color-container-dark-s), calc(var(--dt-color-container-dark-l) + var(--hover-modifier)))}.c-card[variant=inverse]:active:not([disabled]){--active-modifier: var(--dt-color-active-01);--card-bg-color: hsl(var(--dt-color-container-dark-h), var(--dt-color-container-dark-s), calc(var(--dt-color-container-dark-l) + var(--active-modifier)))}.c-card[variant=outline-inverse]{--card-bg-color: var(--dt-color-container-dark);--card-color: var(--dt-color-content-inverse);border-color:var(--dt-color-border-inverse)}.c-card[variant=outline-inverse]:hover:not([disabled]){--hover-modifier: var(--dt-color-hover-01);--card-bg-color: hsl(var(--dt-color-container-dark-h), var(--dt-color-container-dark-s), calc(var(--dt-color-container-dark-l) + var(--hover-modifier)))}.c-card[variant=outline-inverse]:active:not([disabled]){--active-modifier: var(--dt-color-active-01);--card-bg-color: hsl(var(--dt-color-container-dark-h), var(--dt-color-container-dark-s), calc(var(--dt-color-container-dark-l) + var(--active-modifier)))}.c-card[disabled]{--card-bg-color: var(--dt-color-disabled-01);cursor:not-allowed}.c-card[disabled] ::slotted(*){color:var(--dt-color-content-disabled)}.c-card[disabled] img{opacity:.5}.c-card[disabled][variant=inverse],.c-card[disabled][variant=outline-inverse]{--card-bg-color: var(--dt-color-disabled-01-inverse)}.c-card:focus-visible{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}
6
6
  `, S = ["default", "outline", "inverse", "outline-inverse"], k = ["a", "button"], u = ["a", "b", "c", "d", "e", "f", "g"], x = u.flatMap((i) => [i, ...u.map((e) => `${i},${e}`)]), l = {
7
- tag: "button",
8
- variant: "default",
9
7
  disabled: !1,
10
- isDraggable: !1
8
+ variant: "default",
9
+ isDraggable: !1,
10
+ tag: "button"
11
11
  };
12
12
  var D = Object.defineProperty, C = Object.getOwnPropertyDescriptor, c = (i, e, a, o) => {
13
13
  for (var r = o > 1 ? void 0 : o ? C(e, a) : e, n = i.length - 1, s; n >= 0; n--)
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
1
+ import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
2
2
  import type { CSSResult } from 'lit';
3
3
  import type { LitElement } from 'lit';
4
4
  import * as React_2 from 'react';
@@ -49,7 +49,7 @@ export declare interface CardProps {
49
49
  padding?: PaddingValue | `${PaddingValue},${PaddingValue}`;
50
50
  }
51
51
 
52
- export declare type DefaultProps = ComponentDefaultPropsGeneric<CardProps, 'tag' | 'variant' | 'disabled' | 'isDraggable'>;
52
+ export declare type DefaultProps = ComponentDefaultProps<CardProps, 'disabled' | 'variant' | 'isDraggable' | 'tag'>;
53
53
 
54
54
  export declare const defaultProps: DefaultProps;
55
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-card",
3
- "version": "0.19.5",
3
+ "version": "0.19.7",
4
4
  "description": "PIE Design System Card built using Web Components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,11 +37,11 @@
37
37
  "devDependencies": {
38
38
  "@custom-elements-manifest/analyzer": "0.9.0",
39
39
  "@justeattakeaway/pie-components-config": "0.16.0",
40
- "@justeattakeaway/pie-wrapper-react": "0.14.0",
40
+ "@justeattakeaway/pie-wrapper-react": "0.14.1",
41
41
  "cem-plugin-module-file-extensions": "0.0.5"
42
42
  },
43
43
  "dependencies": {
44
- "@justeattakeaway/pie-webc-core": "0.23.0"
44
+ "@justeattakeaway/pie-webc-core": "0.24.0"
45
45
  },
46
46
  "volta": {
47
47
  "extends": "../../../package.json"
package/src/defs.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ComponentDefaultPropsGeneric } from '@justeattakeaway/pie-webc-core';
1
+ import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
2
2
 
3
3
  export const variants = ['default', 'outline', 'inverse', 'outline-inverse'] as const;
4
4
  export const tags = ['a', 'button'] as const;
@@ -51,7 +51,7 @@ export interface CardProps {
51
51
  /**
52
52
  * What HTML element the card should be such as `a` or `button`.
53
53
  */
54
- tag?: typeof tags[number];
54
+ tag?: typeof tags[number];
55
55
 
56
56
  /**
57
57
  * Sets the padding of the card. Can be either a single value or two values
@@ -61,11 +61,11 @@ export interface CardProps {
61
61
  padding?: PaddingValue | `${PaddingValue},${PaddingValue}`;
62
62
  }
63
63
 
64
- export type DefaultProps = ComponentDefaultPropsGeneric<CardProps, 'tag' | 'variant' | 'disabled' | 'isDraggable'>;
64
+ export type DefaultProps = ComponentDefaultProps<CardProps, 'disabled' | 'variant' | 'isDraggable' | 'tag'>;
65
65
 
66
66
  export const defaultProps: DefaultProps = {
67
- tag: 'button',
68
- variant: 'default',
69
67
  disabled: false,
68
+ variant: 'default',
70
69
  isDraggable: false,
70
+ tag: 'button',
71
71
  };