@flodesk/grain 11.76.1 → 11.78.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/es/components/message-box.js +75 -0
- package/es/icons/icon-people.js +13 -0
- package/es/icons/icon-trophy.js +13 -0
- package/es/icons/index.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
const _excluded = ["variant", "action", "description", "padding", "radius"];
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
import "core-js/modules/es.symbol.description.js";
|
|
5
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
6
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
7
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import { Text } from './text';
|
|
11
|
+
import { Box } from './box';
|
|
12
|
+
import { getColor } from '../utilities';
|
|
13
|
+
import { types } from '../types';
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
const variantStyles = {
|
|
16
|
+
info: {
|
|
17
|
+
background: 'backgroundInfoSubtleLarge',
|
|
18
|
+
color: 'onBackgroundInfoSubtle'
|
|
19
|
+
},
|
|
20
|
+
danger: {
|
|
21
|
+
background: 'backgroundDangerSubtleLarge',
|
|
22
|
+
color: 'onBackgroundDangerSubtle'
|
|
23
|
+
},
|
|
24
|
+
warning: {
|
|
25
|
+
background: 'backgroundWarningSubtleLarge',
|
|
26
|
+
color: 'onBackgroundWarningSubtle'
|
|
27
|
+
},
|
|
28
|
+
success: {
|
|
29
|
+
background: 'backgroundSuccessSubtleLarge',
|
|
30
|
+
color: 'onBackgroundSuccessSubtle'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const ActionSection = /*#__PURE__*/_styled(Box, process.env.NODE_ENV === "production" ? {
|
|
34
|
+
target: "e5z9c0h0"
|
|
35
|
+
} : {
|
|
36
|
+
target: "e5z9c0h0",
|
|
37
|
+
label: "ActionSection"
|
|
38
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
39
|
+
name: "dd1uhd",
|
|
40
|
+
styles: "mix-blend-mode:luminosity"
|
|
41
|
+
} : {
|
|
42
|
+
name: "dd1uhd",
|
|
43
|
+
styles: "mix-blend-mode:luminosity",
|
|
44
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL21lc3NhZ2UtYm94LmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQmlDIiwiZmlsZSI6Ii4uLy4uL3NyYy9jb21wb25lbnRzL21lc3NhZ2UtYm94LmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgVGV4d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ICAgIDxCb3hcbiAgICAgIGNvbG9yPXtnZXRDb2xvcih2YXJpYW50U3R5bGVzW3ZhcmlhbnRdLmNvbG9yKX1cbiAgICAgIGJhY2tncm91bmRDb2xvcj17Z2V0Q29sb3IodmFyaWFudFN0eWxlc1t2YXJpYW50XS5iYWNrZ3JvdW5kKX1cbiAgICAgIHBhZGRpbmc9e3BhZGRpbmd9XG4gICAgICByYWRpdXM9e3JhZGl1c31cbiAgICAgIHZhcmlhbnQ9e3ZhcmlhbnR9XG4gICAgICB7Li4ucHJvcHN9XG4gICAgPlxuICAgICAge2Rlc2NyaXB0aW9uICYmIChcbiAgICAgICAgPFRleHQgdHJpbVRvcCB0cmltQm90dG9tPXshQm9vbGVhbihhY3Rpb24pfT5cbiAgICAgICAgICB7ZGVzY3JpcHRpb259XG4gICAgICAgIDwvVGV4dD5cbiAgICAgICl9XG4gICAgICB7YWN0aW9uICYmIDxBY3Rpb25TZWN0aW9uIG1hcmdpblRvcD1cIm1cIj57YWN0aW9ufTwvQWN0aW9uU2VjdGlvbj59XG4gICAgPC9Cb3g+XG4gICk7XG59O1xuXG5NZXNzYWdlQm94LnByb3BUeXBlcyA9IHtcbiAgdmFyaWFudDogUHJvcFR5cGVzLm9uZU9mKE9iamVjdC5rZXlzKHZhcmlhbnRTdHlsZXMpKSxcbiAgYWN0aW9uOiBQcm9wVHlwZXMubm9kZSxcbiAgZGVzY3JpcHRpb246IFByb3BUeXBlcy5vbmVPZlR5cGUoW1Byb3BUeXBlcy5ub2RlLCBQcm9wVHlwZXMuc3RyaW5nXSksXG4gIHJhZGl1czogdHlwZXMucmFkaXVzLFxuICBwYWRkaW5nOiB0eXBlcy5yZXNwb25zaXZlU3BhY2UsXG59O1xuIl19 */",
|
|
45
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
46
|
+
});
|
|
47
|
+
export const MessageBox = _ref => {
|
|
48
|
+
let {
|
|
49
|
+
variant = 'info',
|
|
50
|
+
action,
|
|
51
|
+
description,
|
|
52
|
+
padding = 'l',
|
|
53
|
+
radius = 'l'
|
|
54
|
+
} = _ref,
|
|
55
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
return ___EmotionJSX(Box, _extends({
|
|
57
|
+
color: getColor(variantStyles[variant].color),
|
|
58
|
+
backgroundColor: getColor(variantStyles[variant].background),
|
|
59
|
+
padding: padding,
|
|
60
|
+
radius: radius,
|
|
61
|
+
variant: variant
|
|
62
|
+
}, props), description && ___EmotionJSX(Text, {
|
|
63
|
+
trimTop: true,
|
|
64
|
+
trimBottom: !Boolean(action)
|
|
65
|
+
}, description), action && ___EmotionJSX(ActionSection, {
|
|
66
|
+
marginTop: "m"
|
|
67
|
+
}, action));
|
|
68
|
+
};
|
|
69
|
+
MessageBox.propTypes = {
|
|
70
|
+
variant: PropTypes.oneOf(Object.keys(variantStyles)),
|
|
71
|
+
action: PropTypes.node,
|
|
72
|
+
description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
73
|
+
radius: types.radius,
|
|
74
|
+
padding: types.responsiveSpace
|
|
75
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
4
|
+
const IconPeople = props => ___EmotionJSX("svg", _extends({
|
|
5
|
+
viewBox: "0 0 34 36",
|
|
6
|
+
fill: "none",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, props), ___EmotionJSX("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
d: "M12.669 19.031c1.865 0 3.355-.001 4.556.097 1.218.1 2.27.31 3.239.803a8.25 8.25 0 0 1 3.605 3.605c.494.969.704 2.021.803 3.24.098 1.2.097 2.69.097 4.555v2.138a1.5 1.5 0 0 1-3 0V31.33c0-1.915-.001-3.261-.087-4.311-.085-1.033-.243-1.647-.486-2.122a5.25 5.25 0 0 0-2.294-2.294c-.475-.243-1.089-.401-2.122-.486-1.05-.086-2.396-.087-4.311-.087h-.338c-1.915 0-3.261.001-4.311.087-1.033.085-1.647.243-2.123.486a5.25 5.25 0 0 0-2.293 2.294c-.243.475-.401 1.089-.486 2.122-.086 1.05-.087 2.396-.087 4.311v2.138a1.5 1.5 0 0 1-3 0V31.33c0-1.865-.001-3.355.097-4.556.1-1.218.31-2.27.803-3.239a8.25 8.25 0 0 1 3.605-3.605c.969-.494 2.021-.704 3.24-.803 1.2-.098 2.69-.097 4.555-.097zm14.493 1.518a1.5 1.5 0 0 1 1.976-.773q.165.073.326.155a8.25 8.25 0 0 1 3.605 3.605c.494.969.703 2.022.803 3.24.098 1.201.097 2.69.097 4.555v2.138a1.5 1.5 0 0 1-3 0V31.33c0-1.914-.001-3.26-.087-4.31-.085-1.033-.244-1.647-.486-2.123a5.25 5.25 0 0 0-2.294-2.294 3 3 0 0 0-.167-.08 1.5 1.5 0 0 1-.773-1.975M12.5 1.03a7.969 7.969 0 1 1 0 15.938 7.969 7.969 0 0 1 0-15.938m10.152 1.424a1.5 1.5 0 0 1 1.967-.795 7.97 7.97 0 0 1 4.85 7.341 7.98 7.98 0 0 1-4.842 7.337 1.5 1.5 0 0 1-1.18-2.758 4.982 4.982 0 0 0 0-9.158 1.5 1.5 0 0 1-.795-1.967M12.5 4.031a4.969 4.969 0 1 0 0 9.938 4.969 4.969 0 0 0 0-9.938"
|
|
11
|
+
}));
|
|
12
|
+
IconPeople.viewBoxWidth = 34;
|
|
13
|
+
export default IconPeople;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
4
|
+
const IconTrophy = props => ___EmotionJSX("svg", _extends({
|
|
5
|
+
viewBox: "0 0 36 36",
|
|
6
|
+
fill: "none",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, props), ___EmotionJSX("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
d: "M29 0a1.5 1.5 0 0 1 1.5 1.5V7h4A1.5 1.5 0 0 1 36 8.5c0 1.714-.496 4.8-1.96 7.701-1.457 2.884-3.96 5.746-8.03 6.718-1.753 1.56-3.921 2.62-6.323 2.96.435 1.638 1.602 3.164 3.144 4.44 1.978 1.637 4.212 2.565 5.335 2.69A1.5 1.5 0 0 1 28 36H8a1.5 1.5 0 0 1-.166-2.991c1.123-.125 3.357-1.053 5.335-2.69 1.542-1.276 2.708-2.802 3.142-4.44-2.4-.34-4.569-1.4-6.323-2.96-4.068-.973-6.571-3.834-8.027-6.718C.496 13.3 0 10.214 0 8.5A1.5 1.5 0 0 1 1.5 7h4V1.5A1.5 1.5 0 0 1 7 0zM18 29.386c-.802 1.265-1.845 2.356-2.919 3.245q-.228.188-.464.369h6.766q-.236-.18-.464-.37c-1.074-.888-2.117-1.98-2.919-3.244M8.5 12.73C8.5 18.499 12.847 23 18 23s9.5-4.5 9.5-10.27V3h-19zM3.124 10c.198 1.361.655 3.146 1.515 4.85.44.873.977 1.702 1.622 2.438A14 14 0 0 1 5.5 12.73V10zM30.5 12.73c0 1.595-.27 3.131-.762 4.558a11.7 11.7 0 0 0 1.623-2.438c.86-1.704 1.317-3.489 1.515-4.85H30.5z"
|
|
11
|
+
}));
|
|
12
|
+
IconTrophy.viewBoxWidth = 36;
|
|
13
|
+
export default IconTrophy;
|
package/es/icons/index.js
CHANGED
|
@@ -128,4 +128,6 @@ export { default as IconDevices } from './icon-devices.js';
|
|
|
128
128
|
export { default as IconCornerSquare } from './icon-corner-square.js';
|
|
129
129
|
export { default as IconCornerRound } from './icon-corner-round.js';
|
|
130
130
|
export { default as IconCornerPill } from './icon-corner-pill.js';
|
|
131
|
-
export { default as IconCalendar } from './icon-calendar.js';
|
|
131
|
+
export { default as IconCalendar } from './icon-calendar.js';
|
|
132
|
+
export { default as IconPeople } from './icon-people.js';
|
|
133
|
+
export { default as IconTrophy } from './icon-trophy.js';
|