Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datacamp/waffles-card

Package Overview
Dependencies
Maintainers
39
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datacamp/waffles-card - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

19

CHANGELOG.md

@@ -6,2 +6,21 @@ # Change Log

# [3.0.0](https://github.com/datacamp-engineering/design-system/tree/master/packages/react-components/card/compare/@datacamp/waffles-card@2.2.0...@datacamp/waffles-card@3.0.0) (2020-01-09)
### Features
* allow id to be set on Card ([f59cecb](https://github.com/datacamp-engineering/design-system/tree/master/packages/react-components/card/commit/f59cecb))
* show border for all elevation levels ([ef32fd8](https://github.com/datacamp-engineering/design-system/tree/master/packages/react-components/card/commit/ef32fd8))
### BREAKING CHANGES
* This version will add a border to all cards no matter
their elevation level. This allows them to be placed on white
backgrounds
# [2.2.0](https://github.com/datacamp-engineering/design-system/tree/master/packages/react-components/card/compare/@datacamp/waffles-card@2.1.6...@datacamp/waffles-card@2.2.0) (2019-12-18)

@@ -8,0 +27,0 @@

2

componentMetadata.json

@@ -1,1 +0,1 @@

{"src/index.tsx":[{"description":"","displayName":"Card","methods":[],"props":{"as":{"required":false,"tsType":{"name":"union","raw":"'div' | 'section' | 'aside'","elements":[{"name":"literal","value":"'div'"},{"name":"literal","value":"'section'"},{"name":"literal","value":"'aside'"}]},"description":"The html element to render.","defaultValue":{"value":"'div'","computed":false}},"children":{"required":true,"tsType":{"name":"ReactNode"},"description":"The content of the card."},"className":{"required":false,"tsType":{"name":"string"},"description":"A css className. This can be used to add custom styling."},"elevation":{"required":false,"tsType":{"name":"union","raw":"0 | 1 | 2 | 3 | 4","elements":[{"name":"literal","value":"0"},{"name":"literal","value":"1"},{"name":"literal","value":"2"},{"name":"literal","value":"3"},{"name":"literal","value":"4"}]},"description":"The border/shadow to use on the Card. 0 corresponds to a border, and the\nother values correspond to levels of shadow.","defaultValue":{"value":"0","computed":false}},"hoverElevation":{"required":false,"tsType":{"name":"union","raw":"0 | 1 | 2 | 3 | 4","elements":[{"name":"literal","value":"0"},{"name":"literal","value":"1"},{"name":"literal","value":"2"},{"name":"literal","value":"3"},{"name":"literal","value":"4"}]},"description":"The border/shadow to use when the Card is hovered. Accepts the same values\nas elevation, and must also be greater than the elevation level provided."}}}]}
{"src/index.tsx":[{"description":"","displayName":"Card","methods":[],"props":{"as":{"required":false,"tsType":{"name":"union","raw":"'div' | 'section' | 'aside'","elements":[{"name":"literal","value":"'div'"},{"name":"literal","value":"'section'"},{"name":"literal","value":"'aside'"}]},"description":"The html element to render.","defaultValue":{"value":"'div'","computed":false}},"children":{"required":true,"tsType":{"name":"ReactNode"},"description":"The content of the card."},"className":{"required":false,"tsType":{"name":"string"},"description":"A css className. This can be used to add custom styling."},"elevation":{"required":false,"tsType":{"name":"union","raw":"0 | 1 | 2 | 3 | 4","elements":[{"name":"literal","value":"0"},{"name":"literal","value":"1"},{"name":"literal","value":"2"},{"name":"literal","value":"3"},{"name":"literal","value":"4"}]},"description":"The border/shadow to use on the Card. 0 corresponds to a border, and the\nother values correspond to levels of shadow.","defaultValue":{"value":"0","computed":false}},"hoverElevation":{"required":false,"tsType":{"name":"union","raw":"0 | 1 | 2 | 3 | 4","elements":[{"name":"literal","value":"0"},{"name":"literal","value":"1"},{"name":"literal","value":"2"},{"name":"literal","value":"3"},{"name":"literal","value":"4"}]},"description":"The border/shadow to use when the Card is hovered. Accepts the same values\nas elevation, and must also be greater than the elevation level provided."},"id":{"required":false,"tsType":{"name":"string"},"description":""}}}]}

@@ -8,6 +8,6 @@ import tokens from '@datacamp/waffles-tokens/lib/future-tokens.json';

0: tokens.shadow.border.value,
1: tokens.shadow.sm.value,
2: tokens.shadow.md.value,
3: tokens.shadow.lg.value,
4: tokens.shadow.xl.value
1: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(tokens.shadow.sm.value),
2: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(tokens.shadow.md.value),
3: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(tokens.shadow.lg.value),
4: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(tokens.shadow.xl.value)
}; // same as keyof typeof elevationMap but able to generate proptypes correctly

@@ -22,3 +22,4 @@

elevation = _ref$elevation === void 0 ? 0 : _ref$elevation,
_hoverElevation = _ref.hoverElevation;
_hoverElevation = _ref.hoverElevation,
id = _ref.id;
// warn when hoverElevation is less than elevation

@@ -50,3 +51,4 @@ PropTypes.checkPropTypes({

transition: 'all 0.6s cubic-bezier(0.075, 0.82, 0.165, 1)'
}, ";label:Card;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0VXIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdG9rZW5zIGZyb20gJ0BkYXRhY2FtcC93YWZmbGVzLXRva2Vucy9saWIvZnV0dXJlLXRva2Vucy5qc29uJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCBSZWFjdCwgeyBSZWFjdEVsZW1lbnQsIFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IGVsZXZhdGlvbk1hcCA9IHtcbiAgMDogdG9rZW5zLnNoYWRvdy5ib3JkZXIudmFsdWUsXG4gIDE6IHRva2Vucy5zaGFkb3cuc20udmFsdWUsXG4gIDI6IHRva2Vucy5zaGFkb3cubWQudmFsdWUsXG4gIDM6IHRva2Vucy5zaGFkb3cubGcudmFsdWUsXG4gIDQ6IHRva2Vuc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M7XG59XG5cbmNvbnN0IENhcmQgPSAoe1xuICBhczogRWxlbWVudCA9ICdkaXYnLFxuICBjaGlsZHJlbixcbiAgY2xhc3NOYW1lLFxuICBlbGV2YXRpb24gPSAwLFxuICBob3ZlckVsZXZhdGlvbixcbn06IENhcmRQcm9wcyk6IFJlYWN0RWxlbWVudCA9PiB7XG4gIC8vIHdhcm4gd2hlbiBob3ZlckVsZXZhdGlvbiBpcyBsZXNzIHRoYW4gZWxldmF0aW9uXG4gIFByb3BUeXBlcy5jaGVja1Byb3BUeXBlcyhcbiAgICB7XG4gICAgICBob3ZlckVsZXZhdGlvbigpIHtcbiAgICAgICAgaWYgKGhvdmVyRWxldmF0aW9uICE9PSB1bmRlZmluZWQgJiYgaG92ZXJFbGV2YXRpb24gPD0gZWxldmF0aW9uKSB7XG4gICAgICAgICAgcmV0dXJuIG5ldyBFcnJvcihcbiAgICAgICAgICAgICdJbnZhbGlkIHByb3AgYGhvdmVyRWxldmF0aW9uYCBzdXBwbGllZCB0byBgQ2FyZGAuIGhvdmVyRWxldmF0aW9uIG11c3QgYmUgZ3JlYXRlciB0aGFuIGVsZXZhdGlvbidcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfSxcbiAgICB9LFxuICAgIHsgZWxldmF0aW9uLCBob3ZlckVsZXZhdGlvbiB9LFxuICAgICdob3ZlckVsZXZhdGlvbicsXG4gICAgJ0NhcmQnXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8RWxlbWVudFxuICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICBjc3M9e2Nzcyh7XG4gICAgICAgICc6aG92ZXInOlxuICAgICAgICAgIGhvdmVyRWxldmF0aW9uICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgID8ge1xuICAgICAgICAgICAgICAgIGJveFNoYWRvdzogZWxldmF0aW9uTWFwW2hvdmVyRWxldmF0aW9uXSxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUoMCwgLTFweClgLFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA6IHt9LFxuICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHRva2Vucy5jb2xvci5vcGFxdWUud2hpdGUudmFsdWUucmdiLFxuICAgICAgICBib3JkZXJSYWRpdXM6IHRva2Vucy5yYWRpaS5zbWFsbC52YWx1ZSxcbiAgICAgICAgYm94U2hhZG93OiBlbGV2YXRpb25NYXBbZWxldmF0aW9uXSxcbiAgICAgICAgdHJhbnNpdGlvbjogJ2FsbCAwLjZzIGN1YmljLWJlemllcigwLjA3NSwgMC44MiwgMC4xNjUsIDEpJyxcbiAgICAgIH0pfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbn1cbiAgICA8L0VsZW1lbnQ+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBDYXJkO1xuIl19 */"))
}, ";label:Card;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0VXIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdG9rZW5zIGZyb20gJ0BkYXRhY2FtcC93YWZmbGVzLXRva2Vucy9saWIvZnV0dXJlLXRva2Vucy5qc29uJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCBSZWFjdCwgeyBSZWFjdEVsZW1lbnQsIFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IGVsZXZhdGlvbk1hcCA9IHtcbiAgMDogdG9rZW5zLnNoYWRvdy5ib3JkZXIudm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biAgICAgIH0sXG4gICAgfSxcbiAgICB7IGVsZXZhdGlvbiwgaG92ZXJFbGV2YXRpb24gfSxcbiAgICAnaG92ZXJFbGV2YXRpb24nLFxuICAgICdDYXJkJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPEVsZW1lbnRcbiAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgY3NzPXtjc3Moe1xuICAgICAgICAnOmhvdmVyJzpcbiAgICAgICAgICBob3ZlckVsZXZhdGlvbiAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICBib3hTaGFkb3c6IGVsZXZhdGlvbk1hcFtob3ZlckVsZXZhdGlvbl0sXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlKDAsIC0xcHgpYCxcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgOiB7fSxcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiB0b2tlbnMuY29sb3Iub3BhcXVlLndoaXRlLnZhbHVlLnJnYixcbiAgICAgICAgYm9yZGVyUmFkaXVzOiB0b2tlbnMucmFkaWkuc21hbGwudmFsdWUsXG4gICAgICAgIGJveFNoYWRvdzogZWxldmF0aW9uTWFwW2VsZXZhdGlvbl0sXG4gICAgICAgIHRyYW5zaXRpb246ICdhbGwgMC42cyBjdWJpYy1iZXppZXIoMC4wNzUsIDAuODIsIDAuMTY1LCAxKScsXG4gICAgICB9KX1cbiAgICAgIGlkPXtpZH1cbiAgICA+XG4gICAgICB7Y2hpbGRyZW59XG4gICAgPC9FbGVtZW50PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2FyZDtcbiJdfQ== */")),
id: id
}, children);

@@ -60,4 +62,5 @@ };

elevation: PropTypes.oneOf([0, 1, 2, 3, 4]),
hoverElevation: PropTypes.oneOf([0, 1, 2, 3, 4])
hoverElevation: PropTypes.oneOf([0, 1, 2, 3, 4]),
id: PropTypes.string
};
export default Card;

@@ -20,6 +20,6 @@ "use strict";

0: _futureTokens.default.shadow.border.value,
1: _futureTokens.default.shadow.sm.value,
2: _futureTokens.default.shadow.md.value,
3: _futureTokens.default.shadow.lg.value,
4: _futureTokens.default.shadow.xl.value
1: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(_futureTokens.default.shadow.sm.value),
2: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(_futureTokens.default.shadow.md.value),
3: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(_futureTokens.default.shadow.lg.value),
4: "0px 0px 1px 0px rgba(61, 66, 81, 0.3), ".concat(_futureTokens.default.shadow.xl.value)
}; // same as keyof typeof elevationMap but able to generate proptypes correctly

@@ -36,3 +36,4 @@

elevation = _ref$elevation === void 0 ? 0 : _ref$elevation,
_hoverElevation = _ref.hoverElevation;
_hoverElevation = _ref.hoverElevation,
id = _ref.id;

@@ -66,3 +67,4 @@ // warn when hoverElevation is less than elevation

transition: 'all 0.6s cubic-bezier(0.075, 0.82, 0.165, 1)'
}, ";label:Card;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0VXIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdG9rZW5zIGZyb20gJ0BkYXRhY2FtcC93YWZmbGVzLXRva2Vucy9saWIvZnV0dXJlLXRva2Vucy5qc29uJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCBSZWFjdCwgeyBSZWFjdEVsZW1lbnQsIFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcblxuZXhwb3J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05hbWV9XG4gICAgICBjc3M9e2Nzcyh7XG4gICAgICAgICc6aG92ZXInOlxuICAgICAgICAgIGhvdmVyRWxldmF0aW9uICE9PSB1bmRlZmluZWRcbiAgICAgICAgICAgID8ge1xuICAgICAgICAgICAgICAgIGJveFNoYWRvdzogZWxldmF0aW9uTWFwW2hvdmVyRWxldmF0aW9uXSxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUoMCwgLTFweClgLFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA6IHt9LFxuICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IHRva2Vucy5jb2xvci5vcGFxdWUud2hpdGUudmFsdWUucmdiLFxuICAgICAgICBib3JkZXJSYWRpdXM6IHRva2Vucy5yYWRpaS5zbWFsbC52YWx1ZSxcbiAgICAgICAgYm94U2hhZG93OiBlbGV2YXRpb25NYXBbZWxldmF0aW9uXSxcbiAgICAgICAgdHJhbnNpdGlvbjogJ2FsbCAwLjZzIGN1YmljLWJlemllcigwLjA3NSwgMC44MiwgMC4xNjUsIDEpJyxcbiAgICAgIH0pfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbn1cbiAgICA8L0VsZW1lbnQ+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBDYXJkO1xuIl19 */"))
}, ";label:Card;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0VXIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdG9rZW5zIGZyb20gJ0BkYXRhY2FtcC93YWZmbGVzLXRva2Vucy9saWIvZnV0dXJlLXRva2Vucy5qc29uJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUn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FbGVtZW50PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2FyZDtcbiJdfQ== */")),
id: id
}, children);

@@ -76,5 +78,6 @@ };

elevation: _propTypes.default.oneOf([0, 1, 2, 3, 4]),
hoverElevation: _propTypes.default.oneOf([0, 1, 2, 3, 4])
hoverElevation: _propTypes.default.oneOf([0, 1, 2, 3, 4]),
id: _propTypes.default.string
};
var _default = Card;
exports.default = _default;
{
"name": "@datacamp/waffles-card",
"version": "2.2.0",
"version": "3.0.0",
"main": "lib/index.js",

@@ -31,9 +31,9 @@ "module": "es/index.js",

"devDependencies": {
"@babel/cli": "7.7.4",
"@babel/core": "7.7.4",
"@babel/cli": "7.7.7",
"@babel/core": "7.7.7",
"@datacamp/waffles-axe-render": "^1.2.0",
"@datacamp/waffles-babel-preset": "^1.3.10",
"@datacamp/waffles-tsconfig": "^1.1.6",
"@datacamp/waffles-babel-preset": "^1.3.11",
"@datacamp/waffles-tsconfig": "^1.1.7",
"@emotion/core": "^10.0.17",
"@stryker-mutator/core": "^2.0.2",
"@stryker-mutator/core": "^2.4.0",
"@stryker-mutator/html-reporter": "^2.4.0",

@@ -48,3 +48,3 @@ "@stryker-mutator/typescript": "^2.4.0",

"react": "16.8.6",
"react-docgen": "5.0.0",
"react-docgen": "5.1.0",
"react-dom": "16.8.6"

@@ -63,3 +63,3 @@ },

},
"gitHead": "d60c93272071a9e01ffa5f8ed4c17d91e2995480"
"gitHead": "7ec11e2f2927cf47b9db26d8f5117dc1ef1e9ea3"
}

@@ -33,4 +33,5 @@ import React, { ReactNode } from 'react';

hoverElevation?: elevationKeys;
id?: string;
}
declare const Card: ({ as: Element, children, className, elevation, hoverElevation, }: CardProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
declare const Card: ({ as: Element, children, className, elevation, hoverElevation, id, }: CardProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
export default Card;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc