@flodesk/grain 2.13.0 → 2.15.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.
@@ -30,7 +30,8 @@ var _excluded = ["children", "gap", "columns", "autoFlow", "justifyItems", "alig
30
30
  var _templateObject;
31
31
 
32
32
  var __jsx = _react.default.createElement;
33
- var Wrapper = (0, _styled.default)(_box.Box)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n ", ";\n justify-content: start;\n align-items: center;\n gap: ", ";\n grid-template-columns: ", ";\n justify-items: ", ";\n align-items: ", ";\n justify-content: ", ";\n align-content: ", ";\n place-items: ", ";\n place-content: ", ";\n"])), function (p) {
33
+
34
+ var Wrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n ", ";\n justify-content: start;\n align-items: center;\n gap: ", ";\n grid-template-columns: ", ";\n justify-items: ", ";\n align-items: ", ";\n justify-content: ", ";\n align-content: ", ";\n place-items: ", ";\n place-content: ", ";\n"])), function (p) {
34
35
  return !p.columns && "grid-auto-flow: ".concat(p.autoFlow);
35
36
  }, function (p) {
36
37
  return (0, _utilities.getSpace)(p.gap);
@@ -17,37 +17,52 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
17
17
 
18
18
  var _utilities = require("../utilities");
19
19
 
20
+ var _propTypes = require("prop-types");
21
+
20
22
  var _react = _interopRequireDefault(require("react"));
21
23
 
22
24
  var _styled = _interopRequireDefault(require("@emotion/styled"));
23
25
 
24
26
  var _types = require("../types");
25
27
 
26
- var _excluded = ["icon", "size", "color"];
28
+ var _excluded = ["icon", "size", "color", "hasEvenBoundary"];
27
29
 
28
30
  var _templateObject;
29
31
 
30
32
  var __jsx = _react.default.createElement;
31
33
 
32
- var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n width: fit-content;\n color: ", ";\n \n svg {\n display: block;\n height: ", ";\n }\n"])), function (p) {
34
+ var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n width: ", ";\n color: ", ";\n \n svg {\n display: block;\n height: ", ";\n ", ";\n }\n"])), function (p) {
35
+ return (0, _utilities.getColor)(p.color);
36
+ }, function (p) {
33
37
  return (0, _utilities.getColor)(p.color);
34
38
  }, function (p) {
35
39
  return (0, _utilities.getIconSize)(p.size);
40
+ }, function (p) {
41
+ return p.hasEvenBoundary && "width: ".concat((0, _utilities.getIconSize)(p.size));
36
42
  });
37
43
 
38
- var Icon = function Icon(_ref) {
44
+ var Icon = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
39
45
  var icon = _ref.icon,
40
46
  _ref$size = _ref.size,
41
47
  size = _ref$size === void 0 ? 'm' : _ref$size,
42
48
  color = _ref.color,
49
+ hasEvenBoundary = _ref.hasEvenBoundary,
43
50
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
44
51
  return __jsx(Wrapper, (0, _extends2.default)({
45
52
  size: size,
46
- color: color
53
+ color: color,
54
+ hasEvenBoundary: hasEvenBoundary,
55
+ ref: ref
47
56
  }, props), icon && icon);
48
- };
57
+ });
49
58
 
50
59
  exports.Icon = Icon;
60
+ Icon.propTypes = {
61
+ icon: _propTypes.PropTypes.node,
62
+ hasEvenBoundary: _propTypes.PropTypes.boolean,
63
+ size: _types.types.iconSize,
64
+ color: _types.types.color
65
+ };
51
66
  Icon.__docgenInfo = {
52
67
  "description": "",
53
68
  "methods": [],
@@ -94,6 +109,14 @@ Icon.__docgenInfo = {
94
109
  "required": false,
95
110
  "description": ""
96
111
  },
112
+ "hasEvenBoundary": {
113
+ "type": {
114
+ "name": "custom",
115
+ "raw": "PropTypes.boolean"
116
+ },
117
+ "required": false,
118
+ "description": ""
119
+ },
97
120
  "color": {
98
121
  "type": {
99
122
  "name": "union",
@@ -11,6 +11,8 @@ exports.TextInput = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+
14
16
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
17
 
16
18
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
@@ -25,33 +27,59 @@ var _types = require("../types");
25
27
 
26
28
  var _react2 = require("@emotion/react");
27
29
 
28
- var _excluded = ["value", "placeholder", "size", "label", "id"];
30
+ var _box = require("./box");
31
+
32
+ var _icon = require("./icon");
29
33
 
30
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
34
+ var _excluded = ["value", "placeholder", "size", "label", "id", "icon"];
35
+
36
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
31
37
 
32
38
  var __jsx = _react.default.createElement;
33
39
  var variables = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n --grn-fieldTextBoxPaddingX-s: 8px;\n --grn-fieldTextBoxPaddingX-m: 12px;\n --grn-color-fieldBorder: var(--grn-color-fade3);\n --grn-color-fieldBorder-hover: var(--grn-color-fade6);\n"])));
34
- var inputSizes = {
35
- s: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: var(--grn-textBoxHeight-s);\n padding: 0 var(--grn-fieldTextBoxPaddingX-s);\n border-radius: ", ";\n "])), (0, _utilities.getRadius)('xs')),
36
- m: (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: var(--grn-textBoxHeight-m);\n padding: 0 var(--grn-fieldTextBoxPaddingX-m);\n border-radius: ", ";\n "])), (0, _utilities.getRadius)('s'))
40
+ var inputSizesStyles = {
41
+ s: {
42
+ height: 'var(--grn-textBoxHeight-s)',
43
+ padding: '0 var(--grn-fieldTextBoxPaddingX-s)',
44
+ borderRadius: (0, _utilities.getRadius)('xs')
45
+ },
46
+ m: {
47
+ height: 'var(--grn-textBoxHeight-m)',
48
+ padding: '0 var(--grn-fieldTextBoxPaddingX-m)',
49
+ borderRadius: (0, _utilities.getRadius)('s')
50
+ }
37
51
  };
38
- var labelSizes = {
39
- s: '2px',
40
- m: 'xs'
52
+ var sizesStyles = {
53
+ s: {
54
+ labelGap: 2,
55
+ iconOffset: 8,
56
+ iconTextGap: 4
57
+ },
58
+ m: {
59
+ labelGap: 4,
60
+ iconOffset: 12,
61
+ iconTextGap: 8
62
+ }
41
63
  };
42
64
 
43
- var Wrapper = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n font-size: ", ";\n"])), variables, function (p) {
65
+ var Wrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n font-size: ", ";\n"])), variables, function (p) {
44
66
  return (0, _utilities.getTextSize)(p.size);
45
67
  });
46
68
 
47
- var Label = _styled.default.label(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n margin-bottom: ", ";\n"])), function (p) {
48
- return (0, _utilities.getSpace)(labelSizes[p.size]);
69
+ var Label = _styled.default.label(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n margin-bottom: ", "px;\n"])), function (p) {
70
+ return sizesStyles[p.size].labelGap;
49
71
  });
50
72
 
51
- var InputField = _styled.default.input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n background-color: transparent;\n color: inherit;\n font-size: inherit;\n transition: ", ";\n border: 1px solid var(--grn-color-fieldBorder);\n width: 100%;\n ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n transition: ", ";\n border-color: var(--grn-color-fieldBorder-hover);\n }\n \n &:focus {\n transition: 0s;\n border-color: var(--grn-color-selection);\n }\n"])), (0, _utilities.getTransition)('slow'), function (p) {
52
- return inputSizes[p.size];
73
+ var InputField = _styled.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n font-family: inherit;\n background-color: transparent;\n color: inherit;\n font-size: inherit;\n transition: border-color ", ";\n border: 1px solid var(--grn-color-fieldBorder);\n width: 100%;\n ", ";\n ", ";\n outline: none;\n\n &::placeholder {\n color: ", ";\n }\n\n &:hover {\n transition: ", ";\n border-color: var(--grn-color-fieldBorder-hover);\n }\n \n &:focus {\n transition: 0s;\n border-color: var(--grn-color-selection);\n }\n"])), (0, _utilities.getTransition)('slow'), function (p) {
74
+ return inputSizesStyles[p.size];
75
+ }, function (p) {
76
+ return p.paddingLeft && "padding-left: ".concat(p.paddingLeft, "px");
53
77
  }, (0, _utilities.getColor)('grey5'), (0, _utilities.getTransition)('fast'));
54
78
 
79
+ var IconSection = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n margin: auto;\n left: ", "px;\n top: 0; \n bottom: 0;\n height: fit-content;\n"])), function (p) {
80
+ return sizesStyles[p.size].iconOffset;
81
+ });
82
+
55
83
  var TextInput = function TextInput(_ref) {
56
84
  var value = _ref.value,
57
85
  placeholder = _ref.placeholder,
@@ -59,20 +87,46 @@ var TextInput = function TextInput(_ref) {
59
87
  size = _ref$size === void 0 ? 'm' : _ref$size,
60
88
  label = _ref.label,
61
89
  id = _ref.id,
90
+ icon = _ref.icon,
62
91
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
92
+
93
+ var iconRef = _react.default.useRef(null);
94
+
95
+ var _React$useState = _react.default.useState(),
96
+ _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
97
+ iconWidth = _React$useState2[0],
98
+ setIconWidth = _React$useState2[1];
99
+
100
+ _react.default.useEffect(function () {
101
+ if (iconRef.current) {
102
+ setIconWidth(iconRef.current.getBoundingClientRect().width);
103
+ }
104
+ }, []);
105
+
106
+ var paddingLeft = icon && sizesStyles[size].iconOffset + iconWidth + sizesStyles[size].iconTextGap;
63
107
  return __jsx(Wrapper, {
64
108
  size: size,
65
109
  type: "text"
66
110
  }, label && __jsx(Label, {
67
111
  htmlFor: id,
68
112
  size: size
69
- }, label), __jsx(InputField, (0, _extends2.default)({
113
+ }, label), __jsx(_box.Box, {
114
+ position: "relative"
115
+ }, icon && __jsx(IconSection, {
116
+ size: size
117
+ }, __jsx(_icon.Icon, {
118
+ ref: iconRef,
119
+ icon: icon,
120
+ size: size
121
+ })), __jsx(InputField, (0, _extends2.default)({
70
122
  value: value,
71
123
  placeholder: placeholder,
72
124
  size: size,
73
125
  label: label,
74
- id: id
75
- }, props)));
126
+ icon: icon,
127
+ id: id,
128
+ paddingLeft: paddingLeft
129
+ }, props))));
76
130
  };
77
131
 
78
132
  exports.TextInput = TextInput;
@@ -106,6 +160,13 @@ TextInput.__docgenInfo = {
106
160
  "required": true,
107
161
  "description": ""
108
162
  },
163
+ "placeholder": {
164
+ "type": {
165
+ "name": "string"
166
+ },
167
+ "required": false,
168
+ "description": ""
169
+ },
109
170
  "value": {
110
171
  "type": {
111
172
  "name": "string"
@@ -114,6 +175,18 @@ TextInput.__docgenInfo = {
114
175
  "description": ""
115
176
  },
116
177
  "label": {
178
+ "type": {
179
+ "name": "union",
180
+ "value": [{
181
+ "name": "string"
182
+ }, {
183
+ "name": "node"
184
+ }]
185
+ },
186
+ "required": false,
187
+ "description": ""
188
+ },
189
+ "icon": {
117
190
  "type": {
118
191
  "name": "node"
119
192
  },
@@ -38,18 +38,11 @@ var IconAlignCenter = function IconAlignCenter(props) {
38
38
  viewBox: "0 0 20 32",
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("rect", {
42
- x: 1,
43
- y: 7,
44
- width: 18,
45
- height: 18,
46
- rx: 1,
47
- stroke: "currentColor",
48
- strokeWidth: 2,
49
- strokeLinecap: "square"
50
- }), __jsx("path", {
51
- fill: "currentColor",
52
- d: "M9 4h2v24H9z"
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M11 4H9v2H2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7v2h2v-2h7a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7V4ZM9 8H2v16h7V8Zm2 16V8h7v16h-7Z",
45
+ fill: "currentColor"
53
46
  }));
54
47
  };
55
48
 
@@ -39,9 +39,10 @@ var IconChart = function IconChart(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- stroke: "currentColor",
43
- strokeWidth: 2,
44
- d: "M16 9h7v18h-7zM8 5h8v22H8zM1 18h7v9H1z"
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M7 4h10v4h7v20H0V17h7V4Zm2 13v9h6V6H9v11Zm-2 2H2v7h5v-7Zm15 7h-5V10h5v16Z",
45
+ fill: "currentColor"
45
46
  }));
46
47
  };
47
48
 
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.array.iterator.js");
4
+
5
+ require("core-js/modules/es.object.to-string.js");
6
+
7
+ require("core-js/modules/es.string.iterator.js");
8
+
9
+ require("core-js/modules/es.weak-map.js");
10
+
11
+ require("core-js/modules/web.dom-collections.iterator.js");
12
+
13
+ require("core-js/modules/es.object.define-property.js");
14
+
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+
17
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
18
+
19
+ var _typeof = require("@babel/runtime/helpers/typeof");
20
+
21
+ Object.defineProperty(exports, "__esModule", {
22
+ value: true
23
+ });
24
+ exports.default = void 0;
25
+
26
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
27
+
28
+ var React = _interopRequireWildcard(require("react"));
29
+
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
+
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
34
+ var __jsx = React.createElement;
35
+
36
+ var IconChevronHorizontal = function IconChevronHorizontal(props) {
37
+ return __jsx("svg", (0, _extends2.default)({
38
+ viewBox: "0 0 24 32",
39
+ fill: "none",
40
+ xmlns: "http://www.w3.org/2000/svg"
41
+ }, props), __jsx("path", {
42
+ d: "M8.7 8.75L1.45 16l7.25 7.25M15.3 23.25L22.55 16 15.3 8.75",
43
+ stroke: "currentColor",
44
+ strokeWidth: 2
45
+ }));
46
+ };
47
+
48
+ IconChevronHorizontal.__docgenInfo = {
49
+ "description": "",
50
+ "methods": [],
51
+ "displayName": "IconChevronHorizontal"
52
+ };
53
+ var _default = IconChevronHorizontal;
54
+ exports.default = _default;
@@ -39,13 +39,10 @@ var IconCrop = function IconCrop(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M5 4v18a1 1 0 0 0 1 1h18",
43
- stroke: "currentColor",
44
- strokeWidth: 2
45
- }), __jsx("path", {
46
- d: "M0 9h18a1 1 0 0 1 1 1v18",
47
- stroke: "currentColor",
48
- strokeWidth: 2
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M4 10v12a2 2 0 0 0 2 2h12v4h2v-4h4v-2h-4V10a2 2 0 0 0-2-2H6V4H4v4H0v2h4Zm2 0v12h12V10H6Z",
45
+ fill: "currentColor"
49
46
  }));
50
47
  };
51
48
 
@@ -38,18 +38,12 @@ var IconCross = function IconCross(props) {
38
38
  viewBox: "0 0 20 32",
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("g", {
42
- clipPath: "url(#Cross_svg__a)",
43
- stroke: "currentColor",
44
- strokeWidth: 2
45
- }, __jsx("path", {
46
- d: "M19 7 1 25M1 7l18 18"
47
- })), __jsx("defs", null, __jsx("clipPath", {
48
- id: "Cross_svg__a"
49
- }, __jsx("path", {
50
- fill: "#fff",
51
- d: "M0 0h20v32H0z"
52
- }))));
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "m10 17.414 8.293 8.293 1.414-1.414L11.414 16l8.293-8.293-1.414-1.414L10 14.586 1.707 6.293.293 7.707 8.586 16 .293 24.293l1.414 1.414L10 17.414Z",
45
+ fill: "currentColor"
46
+ }));
53
47
  };
54
48
 
55
49
  IconCross.__docgenInfo = {
@@ -39,15 +39,10 @@ var IconFile = function IconFile(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M1 4c0-.552.456-1 1.008-1H12l7 7v18a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Z",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "round"
46
- }), __jsx("path", {
47
- d: "M11 4v7h7",
48
- stroke: "currentColor",
49
- strokeWidth: 2,
50
- strokeLinecap: "square"
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M2.008 2A2.007 2.007 0 0 0 0 4v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9.586l-.293-.293-7-7L12.414 2H2.008ZM2 28V4.004A.017.017 0 0 1 2.005 4H10v8h8v16H2Zm15.586-18L12 4.414V10h5.586Z",
45
+ fill: "currentColor"
51
46
  }));
52
47
  };
53
48
 
@@ -39,16 +39,13 @@ var IconFolderAdd = function IconFolderAdd(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M8 3H1v21a1 1 0 001 1h24a1 1 0 001-1V8a1 1 0 00-1-1H10L8 3z",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "square"
42
+ d: "M1 3V2H0v1h1Zm7 0 .894-.447L8.618 2H8v1Zm2 4-.894.447.276.553H10V7ZM1 4h7V2H1v2Zm6.106-.553 2 4 1.788-.894-2-4-1.788.894ZM2 11V3H0v8h2Zm8-3h16V6H10v2Zm16 0v3h2V8h-2ZM0 11v13h2V11H0Zm2 15h24v-2H2v2Zm26-2V11h-2v13h2Zm-2 2a2 2 0 0 0 2-2h-2v2ZM0 24a2 2 0 0 0 2 2v-2H0ZM26 8h2a2 2 0 0 0-2-2v2Z",
43
+ fill: "currentColor"
46
44
  }), __jsx("path", {
47
- fill: "currentColor",
48
- d: "M8 15h12v2H8z"
49
- }), __jsx("path", {
50
- fill: "currentColor",
51
- d: "M13 10h2v12h-2z"
45
+ fillRule: "evenodd",
46
+ clipRule: "evenodd",
47
+ d: "M15 10h-2v5H8v2h5v5h2v-5h5v-2h-5v-5Z",
48
+ fill: "currentColor"
52
49
  }));
53
50
  };
54
51
 
@@ -39,10 +39,8 @@ var IconFolder = function IconFolder(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M8 3H1v21a1 1 0 001 1h24a1 1 0 001-1V8a1 1 0 00-1-1H10L8 3z",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "square"
42
+ d: "M1 3V2H0v1h1Zm7 0 .894-.447L8.618 2H8v1Zm2 4-.894.447.276.553H10V7ZM1 4h7V2H1v2Zm6.106-.553 2 4 1.788-.894-2-4-1.788.894ZM2 11V3H0v8h2Zm8-3h16V6H10v2Zm16 0v3h2V8h-2ZM0 11v13h2V11H0Zm2 15h24v-2H2v2Zm26-2V11h-2v13h2Zm-2 2a2 2 0 0 0 2-2h-2v2ZM0 24a2 2 0 0 0 2 2v-2H0ZM26 8h2a2 2 0 0 0-2-2v2Z",
43
+ fill: "currentColor"
46
44
  }));
47
45
  };
48
46
 
@@ -38,20 +38,11 @@ var IconGlobe = function IconGlobe(props) {
38
38
  viewBox: "0 0 28 32",
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("circle", {
42
- cx: 14,
43
- cy: 16,
44
- r: 13,
45
- stroke: "currentColor",
46
- strokeWidth: 2,
47
- strokeLinecap: "round",
48
- strokeLinejoin: "round"
49
- }), __jsx("path", {
50
- d: "M22 16c0 3.703-.967 7.01-2.477 9.359C18.006 27.719 16.03 29 14 29s-4.006-1.281-5.523-3.641C6.967 23.009 6 19.703 6 16c0-3.703.967-7.01 2.477-9.359C9.994 4.281 11.97 3 14 3s4.006 1.281 5.523 3.641C21.033 8.991 22 12.297 22 16ZM14 3v26M27 16H1",
51
- stroke: "currentColor",
52
- strokeWidth: 2,
53
- strokeLinecap: "round",
54
- strokeLinejoin: "round"
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M13 17v10.868c-1.273-.336-2.57-1.32-3.682-3.05C8.06 22.859 7.181 20.125 7.025 17H13Zm2 0v10.868c1.273-.336 2.57-1.32 3.682-3.05 1.259-1.959 2.137-4.693 2.293-7.818H15Zm5.975-2H15V4.132c1.273.336 2.57 1.32 3.682 3.05 1.259 1.959 2.137 4.693 2.293 7.818Zm2.002 2c-.168 3.706-1.263 7.014-2.928 9.366A12 12 0 0 0 25.96 17h-2.982Zm2.982-2h-2.982c-.168-3.706-1.263-7.014-2.928-9.366A12 12 0 0 1 25.96 15ZM28 16c0 7.732-6.268 14-14 14S0 23.732 0 16 6.268 2 14 2s14 6.268 14 14ZM2.041 17a12 12 0 0 0 5.91 9.366C6.286 24.014 5.19 20.706 5.023 17H2.04Zm2.982-2H2.04a12 12 0 0 1 5.91-9.366C6.286 7.986 5.19 11.294 5.023 15Zm2.002 0c.156-3.125 1.034-5.859 2.293-7.818 1.112-1.73 2.41-2.714 3.682-3.05V15H7.025Z",
45
+ fill: "currentColor"
55
46
  }));
56
47
  };
57
48
 
@@ -38,25 +38,11 @@ var IconImage = function IconImage(props) {
38
38
  viewBox: "0 0 28 32",
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("rect", {
42
- x: 1,
43
- y: 7,
44
- width: 26,
45
- height: 18,
46
- rx: 1,
47
- stroke: "currentColor",
48
- strokeWidth: 2,
49
- strokeLinecap: "square"
50
- }), __jsx("path", {
51
- d: "M1 21l9.182-8 13.182 12.111",
52
- stroke: "currentColor",
53
- strokeWidth: 2
54
- }), __jsx("circle", {
55
- cx: 21,
56
- cy: 13,
57
- r: 3,
58
- stroke: "currentColor",
59
- strokeWidth: 2
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M0 8a2 2 0 0 1 2-2h24a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8Zm26 0H2v10.802l7.525-6.556.675-.588.658.606L23.632 24H26V8ZM2 24v-2.545l8.164-7.113L20.676 24H2Zm17-11a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z",
45
+ fill: "currentColor"
60
46
  }));
61
47
  };
62
48
 
@@ -38,20 +38,11 @@ var IconMail = function IconMail(props) {
38
38
  viewBox: "0 0 28 32",
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("rect", {
42
- x: 1,
43
- y: 7,
44
- width: 26,
45
- height: 18,
46
- rx: 1,
47
- stroke: "currentColor",
48
- strokeWidth: 2,
49
- strokeLinecap: "square"
50
- }), __jsx("path", {
51
- d: "m2.5 8.5 11.5 10 11.5-10",
52
- stroke: "currentColor",
53
- strokeWidth: 2,
54
- strokeLinecap: "square"
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M2 6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H2Zm22.551 2H3.449L14 17.175 24.551 8ZM2 9.39V24h24V9.39l-11.344 9.865-.656.57-.656-.57L2 9.39Z",
45
+ fill: "currentColor"
55
46
  }));
56
47
  };
57
48
 
@@ -39,14 +39,10 @@ var IconPencil = function IconPencil(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M1 27v-5L14 9l5 5L6 27H1Z",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "round"
46
- }), __jsx("path", {
47
- d: "m14.25 8.75 3.293-3.293a1 1 0 0 1 1.414 0l3.586 3.586a1 1 0 0 1 0 1.414L19.25 13.75",
48
- stroke: "currentColor",
49
- strokeWidth: 2
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M19.664 4.75a2 2 0 0 0-2.828 0L14 7.586l-.457.457-.25.25-13 13-.293.293V28h6.414l.293-.293 13-13 .25-.25.457-.457 2.836-2.836a2 2 0 0 0 0-2.828L19.664 4.75ZM19 12.586l2.836-2.836-3.586-3.586L15.414 9 19 12.586ZM2 26v-3.586l12-12L17.586 14l-12 12H2Z",
45
+ fill: "currentColor"
50
46
  }));
51
47
  };
52
48
 
@@ -39,11 +39,10 @@ var IconPlus = function IconPlus(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- fill: "currentColor",
43
- d: "M0 15h20v2H0z"
44
- }), __jsx("path", {
45
- fill: "currentColor",
46
- d: "M9 6h2v20H9z"
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M11 6H9v9H0v2h9v9h2v-9h9v-2h-9V6Z",
45
+ fill: "currentColor"
47
46
  }));
48
47
  };
49
48
 
@@ -39,14 +39,10 @@ var IconShare = function IconShare(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M23 21.111V26a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6c0-.552.446-1 .999-1h4.89",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "square"
46
- }), __jsx("path", {
47
- d: "M12 5h11v11M9 19 23 5",
48
- stroke: "currentColor",
49
- strokeWidth: 2
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M2 6v20h20v-5.889h2V26a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6c0-1.103.893-2 1.999-2H7.889v2H2Zm10.03 0H12V4H22.999L23 5V4h1v12h-2V7.414L9.707 19.707l-1.414-1.414L20.586 6H12.029Z",
45
+ fill: "currentColor"
50
46
  }));
51
47
  };
52
48
 
@@ -43,11 +43,9 @@ var IconSmile = function IconSmile(props) {
43
43
  cy: 16,
44
44
  r: 13,
45
45
  stroke: "currentColor",
46
- strokeWidth: 2,
47
- strokeLinecap: "round",
48
- strokeLinejoin: "round"
46
+ strokeWidth: 2
49
47
  }), __jsx("path", {
50
- d: "M20.5 18.598A6.998 6.998 0 0114 23a7 7 0 01-6.5-4.402",
48
+ d: "M20.5 18.598A6.998 6.998 0 0 1 14 23a7 7 0 0 1-6.5-4.402",
51
49
  stroke: "currentColor",
52
50
  strokeWidth: 2,
53
51
  strokeLinecap: "round",
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.array.iterator.js");
4
+
5
+ require("core-js/modules/es.object.to-string.js");
6
+
7
+ require("core-js/modules/es.string.iterator.js");
8
+
9
+ require("core-js/modules/es.weak-map.js");
10
+
11
+ require("core-js/modules/web.dom-collections.iterator.js");
12
+
13
+ require("core-js/modules/es.object.define-property.js");
14
+
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+
17
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
18
+
19
+ var _typeof = require("@babel/runtime/helpers/typeof");
20
+
21
+ Object.defineProperty(exports, "__esModule", {
22
+ value: true
23
+ });
24
+ exports.default = void 0;
25
+
26
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
27
+
28
+ var React = _interopRequireWildcard(require("react"));
29
+
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
+
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
34
+ var __jsx = React.createElement;
35
+
36
+ var IconSwitch = function IconSwitch(props) {
37
+ return __jsx("svg", (0, _extends2.default)({
38
+ viewBox: "0 0 24 32",
39
+ fill: "none",
40
+ xmlns: "http://www.w3.org/2000/svg"
41
+ }, props), __jsx("path", {
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M7.993 2.043l-7.25 7.25L.036 10l.707.707 7.25 7.25 1.414-1.414L3.864 11H24V9H3.864l5.543-5.543-1.414-1.414zm15.264 20.664l-7.25 7.25-1.414-1.414L20.136 23H0v-2h20.136l-5.543-5.543 1.414-1.414 7.25 7.25.707.707-.707.707z",
45
+ fill: "currentColor"
46
+ }));
47
+ };
48
+
49
+ IconSwitch.__docgenInfo = {
50
+ "description": "",
51
+ "methods": [],
52
+ "displayName": "IconSwitch"
53
+ };
54
+ var _default = IconSwitch;
55
+ exports.default = _default;
@@ -39,19 +39,10 @@ var IconTrash = function IconTrash(props) {
39
39
  fill: "none",
40
40
  xmlns: "http://www.w3.org/2000/svg"
41
41
  }, props), __jsx("path", {
42
- d: "M3 11v17a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V11",
43
- stroke: "currentColor",
44
- strokeWidth: 2,
45
- strokeLinecap: "square"
46
- }), __jsx("path", {
47
- d: "M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",
48
- stroke: "currentColor",
49
- strokeWidth: 2
50
- }), __jsx("path", {
51
- d: "M1 8a1 1 0 0 1 1-1h20a1 1 0 0 1 1 1v3H1V8Z",
52
- stroke: "currentColor",
53
- strokeWidth: 2,
54
- strokeLinecap: "square"
42
+ fillRule: "evenodd",
43
+ clipRule: "evenodd",
44
+ d: "M8 4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2h6a2 2 0 0 1 2 2v4h-2v16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V12H0V8a2 2 0 0 1 2-2h6V4Zm2 2h4V4h-4v2Zm-8 4h20V8H2v2Zm18 2H4v16h16V12Z",
45
+ fill: "currentColor"
55
46
  }));
56
47
  };
57
48
 
package/es/icons/index.js CHANGED
@@ -55,6 +55,12 @@ Object.defineProperty(exports, "IconBrowser", {
55
55
  return _iconBrowser.default;
56
56
  }
57
57
  });
58
+ Object.defineProperty(exports, "IconChart", {
59
+ enumerable: true,
60
+ get: function get() {
61
+ return _iconChart.default;
62
+ }
63
+ });
58
64
  Object.defineProperty(exports, "IconCheck", {
59
65
  enumerable: true,
60
66
  get: function get() {
@@ -67,6 +73,12 @@ Object.defineProperty(exports, "IconChevronDown", {
67
73
  return _iconChevronDown.default;
68
74
  }
69
75
  });
76
+ Object.defineProperty(exports, "IconChevronHorizontal", {
77
+ enumerable: true,
78
+ get: function get() {
79
+ return _iconChevronHorizontal.default;
80
+ }
81
+ });
70
82
  Object.defineProperty(exports, "IconChevronLeft", {
71
83
  enumerable: true,
72
84
  get: function get() {
@@ -229,6 +241,12 @@ Object.defineProperty(exports, "IconSmile", {
229
241
  return _iconSmile.default;
230
242
  }
231
243
  });
244
+ Object.defineProperty(exports, "IconSwitch", {
245
+ enumerable: true,
246
+ get: function get() {
247
+ return _iconSwitch.default;
248
+ }
249
+ });
232
250
  Object.defineProperty(exports, "IconTextAlignCenter", {
233
251
  enumerable: true,
234
252
  get: function get() {
@@ -265,12 +283,6 @@ Object.defineProperty(exports, "IconUndo", {
265
283
  return _iconUndo.default;
266
284
  }
267
285
  });
268
- Object.defineProperty(exports, "IconChart", {
269
- enumerable: true,
270
- get: function get() {
271
- return _iconChart.default;
272
- }
273
- });
274
286
 
275
287
  var _iconAlignCenter = _interopRequireDefault(require("./icon-align-center"));
276
288
 
@@ -288,10 +300,14 @@ var _iconArrowUp = _interopRequireDefault(require("./icon-arrow-up"));
288
300
 
289
301
  var _iconBrowser = _interopRequireDefault(require("./icon-browser"));
290
302
 
303
+ var _iconChart = _interopRequireDefault(require("./icon-chart"));
304
+
291
305
  var _iconCheck = _interopRequireDefault(require("./icon-check"));
292
306
 
293
307
  var _iconChevronDown = _interopRequireDefault(require("./icon-chevron-down"));
294
308
 
309
+ var _iconChevronHorizontal = _interopRequireDefault(require("./icon-chevron-horizontal"));
310
+
295
311
  var _iconChevronLeft = _interopRequireDefault(require("./icon-chevron-left"));
296
312
 
297
313
  var _iconChevronRight = _interopRequireDefault(require("./icon-chevron-right"));
@@ -346,6 +362,8 @@ var _iconShare = _interopRequireDefault(require("./icon-share"));
346
362
 
347
363
  var _iconSmile = _interopRequireDefault(require("./icon-smile"));
348
364
 
365
+ var _iconSwitch = _interopRequireDefault(require("./icon-switch"));
366
+
349
367
  var _iconTextAlignCenter = _interopRequireDefault(require("./icon-text-align-center"));
350
368
 
351
369
  var _iconTextAlignLeft = _interopRequireDefault(require("./icon-text-align-left"));
@@ -356,6 +374,4 @@ var _iconTrash = _interopRequireDefault(require("./icon-trash"));
356
374
 
357
375
  var _iconType = _interopRequireDefault(require("./icon-type"));
358
376
 
359
- var _iconUndo = _interopRequireDefault(require("./icon-undo"));
360
-
361
- var _iconChart = _interopRequireDefault(require("./icon-chart"));
377
+ var _iconUndo = _interopRequireDefault(require("./icon-undo"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",