@flodesk/grain 11.54.0 → 11.55.1

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.
@@ -0,0 +1,96 @@
1
+ const _excluded = ["children", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "padding", "radius", "position", "zIndex"];
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ import { Box } from './box';
12
+ import { types } from '../types';
13
+ import { jsx as ___EmotionJSX } from "@emotion/react";
14
+ export const Card = _ref => {
15
+ let {
16
+ children,
17
+ width,
18
+ minWidth,
19
+ maxWidth,
20
+ height,
21
+ minHeight,
22
+ maxHeight,
23
+ padding = 'var(--grn-card-padding)',
24
+ radius = 'var(--grn-card-radius)',
25
+ position,
26
+ zIndex
27
+ } = _ref,
28
+ props = _objectWithoutProperties(_ref, _excluded);
29
+
30
+ return ___EmotionJSX(Box, {
31
+ className: "grn-card-container",
32
+ width: width,
33
+ minWidth: minWidth,
34
+ maxWidth: maxWidth,
35
+ position: position,
36
+ top: 0,
37
+ left: 0,
38
+ right: 0,
39
+ bottom: 0,
40
+ zIndex: zIndex
41
+ }, ___EmotionJSX(Box, _extends({
42
+ className: "grn-card",
43
+ width: "100%",
44
+ padding: padding,
45
+ radius: radius,
46
+ height: height,
47
+ minHeight: minHeight,
48
+ maxHeight: maxHeight
49
+ }, props), children));
50
+ };
51
+ Card.propTypes = {
52
+ color: types.color,
53
+ colorHover: types.color,
54
+ backgroundColor: types.color,
55
+ backgroundColorHover: types.color,
56
+ borderColor: types.color,
57
+ borderColorHover: types.color,
58
+ borderWidth: types.borderWidth,
59
+ borderSide: types.side,
60
+ width: types.responsiveDimension,
61
+ minWidth: types.responsiveDimension,
62
+ maxWidth: types.responsiveDimension,
63
+ height: types.responsiveDimension,
64
+ minHeight: types.responsiveDimension,
65
+ maxHeight: types.responsiveDimension,
66
+ radius: types.radius,
67
+ shadow: types.shadow,
68
+ shadowHover: types.shadow,
69
+ padding: types.responsiveSpace,
70
+ margin: types.responsiveSpace,
71
+ marginTop: types.responsiveSpace,
72
+ marginBottom: types.responsiveSpace,
73
+ marginLeft: types.responsiveSpace,
74
+ marginRight: types.responsiveSpace,
75
+ marginX: types.responsiveSpace,
76
+ marginY: types.responsiveSpace,
77
+ position: types.position,
78
+ top: types.responsiveSpace,
79
+ bottom: types.responsiveSpace,
80
+ left: types.responsiveSpace,
81
+ right: types.responsiveSpace,
82
+ overflow: types.overflow,
83
+ overflowX: types.overflow,
84
+ overflowY: types.overflow,
85
+ aspectRatio: PropTypes.string,
86
+ zIndex: types.zIndex,
87
+ opacity: PropTypes.string,
88
+ opacityHover: PropTypes.string,
89
+ order: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
90
+ alignSelf: types.alignSelf,
91
+ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
92
+ transition: types.transition,
93
+ transitionHover: types.transition,
94
+ cursor: types.cursor,
95
+ tag: PropTypes.string
96
+ };
@@ -30,4 +30,5 @@ export { Nav, NavItem } from './nav';
30
30
  export { Flex } from './flex';
31
31
  export { Badge } from './badge';
32
32
  export { Toast } from './toast';
33
- export { Radio } from './radio';
33
+ export { Radio } from './radio';
34
+ export { Card } from './card';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "11.54.0",
3
+ "version": "11.55.1",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "types": "es/types/index.d.ts",