@flodesk/grain 2.20.0 → 2.20.3

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.
Files changed (75) hide show
  1. package/es/components/arrange.js +33 -260
  2. package/es/components/box.js +62 -995
  3. package/es/components/button.js +36 -100
  4. package/es/components/icon-button.js +30 -93
  5. package/es/components/icon-toggle.js +39 -94
  6. package/es/components/icon.js +30 -126
  7. package/es/components/index.js +11 -107
  8. package/es/components/stack.js +26 -81
  9. package/es/components/text-button.js +28 -66
  10. package/es/components/text-input.js +76 -138
  11. package/es/components/text-toggle.js +32 -78
  12. package/es/components/text.js +33 -159
  13. package/es/foundational/index.js +9 -23
  14. package/es/hooks/index.js +1 -15
  15. package/es/hooks/useMedia.js +21 -17
  16. package/es/icons/icon-align-center.js +5 -43
  17. package/es/icons/icon-align-left.js +6 -44
  18. package/es/icons/icon-align-right.js +6 -44
  19. package/es/icons/icon-arrow-down.js +5 -43
  20. package/es/icons/icon-arrow-left.js +5 -43
  21. package/es/icons/icon-arrow-right.js +5 -43
  22. package/es/icons/icon-arrow-up.js +5 -43
  23. package/es/icons/icon-browser.js +9 -47
  24. package/es/icons/icon-chart.js +5 -43
  25. package/es/icons/icon-check.js +7 -45
  26. package/es/icons/icon-chevron-down.js +5 -43
  27. package/es/icons/icon-chevron-horizontal.js +5 -43
  28. package/es/icons/icon-chevron-left.js +5 -43
  29. package/es/icons/icon-chevron-right.js +10 -48
  30. package/es/icons/icon-chevron-up.js +10 -48
  31. package/es/icons/icon-chevron-vertical.js +13 -51
  32. package/es/icons/icon-clip.js +5 -43
  33. package/es/icons/icon-clock.js +6 -44
  34. package/es/icons/icon-crop.js +5 -43
  35. package/es/icons/icon-cross.js +5 -43
  36. package/es/icons/icon-download.js +8 -46
  37. package/es/icons/icon-duplicate.js +6 -44
  38. package/es/icons/icon-ellipsis.js +7 -45
  39. package/es/icons/icon-file.js +5 -43
  40. package/es/icons/icon-folder-add.js +5 -43
  41. package/es/icons/icon-folder.js +5 -43
  42. package/es/icons/icon-gear.js +6 -44
  43. package/es/icons/icon-globe.js +5 -43
  44. package/es/icons/icon-heart.js +5 -43
  45. package/es/icons/icon-image.js +5 -43
  46. package/es/icons/icon-link.js +6 -44
  47. package/es/icons/icon-mail.js +5 -43
  48. package/es/icons/icon-minus.js +5 -43
  49. package/es/icons/icon-monitor.js +5 -43
  50. package/es/icons/icon-pencil.js +5 -43
  51. package/es/icons/icon-phone.js +5 -43
  52. package/es/icons/icon-plus.js +5 -43
  53. package/es/icons/icon-redo.js +5 -43
  54. package/es/icons/icon-search.js +6 -44
  55. package/es/icons/icon-send.js +5 -43
  56. package/es/icons/icon-share.js +5 -43
  57. package/es/icons/icon-smile.js +8 -46
  58. package/es/icons/icon-switch.js +5 -43
  59. package/es/icons/icon-tablet.js +5 -43
  60. package/es/icons/icon-text-align-center.js +5 -43
  61. package/es/icons/icon-text-align-left.js +5 -43
  62. package/es/icons/icon-text-align-right.js +5 -43
  63. package/es/icons/icon-trash.js +5 -43
  64. package/es/icons/icon-type.js +5 -43
  65. package/es/icons/icon-undo.js +5 -43
  66. package/es/icons/icon-upload.js +8 -46
  67. package/es/icons/index.js +51 -417
  68. package/es/index.js +3 -52
  69. package/es/types.js +23 -38
  70. package/es/utilities/helpers.js +22 -50
  71. package/es/utilities/index.js +21 -145
  72. package/es/utilities/responsive.js +58 -79
  73. package/es/utilities/styles.js +45 -89
  74. package/es/variables.js +101 -110
  75. package/package.json +2 -2
@@ -1,98 +1,52 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.define-property.js");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.TextToggleGroup = exports.TextToggle = void 0;
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
-
16
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
- var _utilities = require("../utilities");
19
-
20
- var _react = _interopRequireDefault(require("react"));
21
-
22
- var _styled = _interopRequireDefault(require("@emotion/styled"));
23
-
1
+ import "core-js/modules/es.array.slice.js";
2
+ import "core-js/modules/es.object.freeze.js";
3
+ import "core-js/modules/es.object.define-properties.js";
4
+ import "core-js/modules/es.object.keys.js";
5
+ import "core-js/modules/es.array.index-of.js";
6
+ import "core-js/modules/es.symbol.js";
24
7
  var _excluded = ["children", "isActive", "onClick"],
25
8
  _excluded2 = ["children"];
26
9
 
27
10
  var _templateObject, _templateObject2;
28
11
 
29
- var __jsx = _react.default.createElement;
12
+ import "core-js/modules/es.object.assign.js";
13
+
14
+ 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; }
15
+
16
+ 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; }
30
17
 
31
- var Wrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border: 1px solid var(--grn-color-border);\n border-radius: 1000px;\n width: fit-content;\n"])));
18
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
32
19
 
33
- var ItemWrapper = _styled.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n border: none;\n padding: 0 16px;\n font-family: inherit;\n font-size: inherit;\n font-weight: ", ";\n cursor: pointer;\n height: calc(var(--grn-textBoxHeight-m) - 2px);\n background-color: transparent;\n position: relative;\n color: var(--grn-color-bodyDimmed);\n border-radius: 1000px;\n white-space: nowrap;\n transition: color ", ", box-shadow ", ";\n \n &:hover {\n color: var(--grn-color-body);\n }\n \n ", ";\n"])), (0, _utilities.getWeight)("medium"), (0, _utilities.getTransition)('fast'), (0, _utilities.getTransition)('xFast'), function (p) {
20
+ import { getWeight, getTransition } from "../utilities";
21
+ import React from "react";
22
+ import styled from "@emotion/styled";
23
+ import PropTypes from "prop-types";
24
+ var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n border: 1px solid var(--grn-color-border);\n border-radius: 1000px;\n width: fit-content;\n"])));
25
+ var ItemWrapper = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n appearance: none;\n border: none;\n padding: 0 16px;\n font-family: inherit;\n font-size: inherit;\n font-weight: ", ";\n cursor: pointer;\n height: calc(var(--grn-textBoxHeight-m) - 2px);\n background-color: transparent;\n position: relative;\n color: var(--grn-color-bodyDimmed);\n border-radius: 1000px;\n white-space: nowrap;\n transition: color ", ", box-shadow ", ";\n \n &:hover {\n color: var(--grn-color-body);\n }\n \n ", ";\n"])), getWeight("medium"), getTransition('fast'), getTransition('xFast'), function (p) {
34
26
  return p.isActive && "\n box-shadow: 0 0 0 1px var(--grn-color-grey6);\n color: var(--grn-color-body);\n ";
35
27
  });
36
-
37
- var TextToggle = function TextToggle(_ref) {
28
+ export var TextToggle = function TextToggle(_ref) {
38
29
  var children = _ref.children,
39
30
  isActive = _ref.isActive,
40
31
  onClick = _ref.onClick,
41
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
42
- return __jsx(ItemWrapper, (0, _extends2.default)({
32
+ props = _objectWithoutProperties(_ref, _excluded);
33
+
34
+ return /*#__PURE__*/React.createElement(ItemWrapper, Object.assign({
43
35
  isActive: isActive,
44
36
  onClick: onClick
45
37
  }, props), children);
46
38
  };
47
-
48
- exports.TextToggle = TextToggle;
49
-
50
- var TextToggleGroup = function TextToggleGroup(_ref2) {
39
+ export var TextToggleGroup = function TextToggleGroup(_ref2) {
51
40
  var children = _ref2.children,
52
- props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
53
- return __jsx(Wrapper, props, children);
54
- };
41
+ props = _objectWithoutProperties(_ref2, _excluded2);
55
42
 
56
- exports.TextToggleGroup = TextToggleGroup;
57
- TextToggle.__docgenInfo = {
58
- "description": "",
59
- "methods": [],
60
- "displayName": "TextToggle",
61
- "props": {
62
- "children": {
63
- "type": {
64
- "name": "node"
65
- },
66
- "required": false,
67
- "description": ""
68
- },
69
- "isActive": {
70
- "type": {
71
- "name": "bool"
72
- },
73
- "required": false,
74
- "description": ""
75
- },
76
- "onClick": {
77
- "type": {
78
- "name": "func"
79
- },
80
- "required": false,
81
- "description": ""
82
- }
83
- }
43
+ return /*#__PURE__*/React.createElement(Wrapper, props, children);
44
+ };
45
+ TextToggleGroup.propTypes = {
46
+ children: PropTypes.node
84
47
  };
85
- TextToggleGroup.__docgenInfo = {
86
- "description": "",
87
- "methods": [],
88
- "displayName": "TextToggleGroup",
89
- "props": {
90
- "children": {
91
- "type": {
92
- "name": "node"
93
- },
94
- "required": false,
95
- "description": ""
96
- }
97
- }
48
+ TextToggle.propTypes = {
49
+ children: PropTypes.node,
50
+ isActive: PropTypes.bool,
51
+ onClick: PropTypes.func
98
52
  };
@@ -1,40 +1,32 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.define-property.js");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.Text = void 0;
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
-
16
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
- var _utilities = require("../utilities");
19
-
20
- var _react = _interopRequireDefault(require("react"));
1
+ import "core-js/modules/es.array.slice.js";
2
+ import "core-js/modules/es.object.freeze.js";
3
+ import "core-js/modules/es.object.define-properties.js";
4
+ import "core-js/modules/es.object.keys.js";
5
+ import "core-js/modules/es.array.index-of.js";
6
+ import "core-js/modules/es.symbol.js";
7
+ var _excluded = ["children", "size", "weight", "color", "tag", "hasEllipsis", "ellipsisLines", "align"];
21
8
 
22
- var _styled = _interopRequireDefault(require("@emotion/styled"));
9
+ var _templateObject;
23
10
 
24
- var _types = require("../types");
11
+ import "core-js/modules/es.object.assign.js";
25
12
 
26
- var _excluded = ["children", "size", "weight", "color", "tag", "hasEllipsis", "ellipsisLines", "align"];
13
+ 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; }
27
14
 
28
- var _templateObject;
15
+ 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; }
29
16
 
30
- var __jsx = _react.default.createElement;
17
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
31
18
 
32
- var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n ", ";\n font-weight: ", ";\n color: ", ";\n text-align: ", ";\n \n ", ";\n ", ";\n ", ";\n"])), function (p) {
33
- return (0, _utilities.getResponsiveTextSize)(p.size);
19
+ import { getColor, getResponsiveTextSize, getWeight } from '../utilities';
20
+ import { PropTypes } from 'prop-types';
21
+ import React from "react";
22
+ import styled from "@emotion/styled";
23
+ import { types } from '../types';
24
+ var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n ", ";\n font-weight: ", ";\n color: ", ";\n text-align: ", ";\n \n ", ";\n ", ";\n ", ";\n"])), function (p) {
25
+ return getResponsiveTextSize(p.size);
34
26
  }, function (p) {
35
- return (0, _utilities.getWeight)(p.weight);
27
+ return getWeight(p.weight);
36
28
  }, function (p) {
37
- return (0, _utilities.getColor)(p.color);
29
+ return getColor(p.color);
38
30
  }, function (p) {
39
31
  return p.align;
40
32
  }, function (p) {
@@ -44,8 +36,7 @@ var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _ta
44
36
  }, function (p) {
45
37
  return p.hasEllipsis && p.ellipsisLines && "\n display: -webkit-box;\n -webkit-line-clamp: ".concat(p.ellipsisLines, ";\n -webkit-box-orient: vertical;\n ");
46
38
  });
47
-
48
- var Text = function Text(_ref) {
39
+ export var Text = function Text(_ref) {
49
40
  var children = _ref.children,
50
41
  _ref$size = _ref.size,
51
42
  size = _ref$size === void 0 ? 'm' : _ref$size,
@@ -56,8 +47,9 @@ var Text = function Text(_ref) {
56
47
  hasEllipsis = _ref.hasEllipsis,
57
48
  ellipsisLines = _ref.ellipsisLines,
58
49
  align = _ref.align,
59
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
60
- return __jsx(Wrapper, (0, _extends2.default)({
50
+ props = _objectWithoutProperties(_ref, _excluded);
51
+
52
+ return /*#__PURE__*/React.createElement(Wrapper, Object.assign({
61
53
  size: size,
62
54
  weight: weight,
63
55
  color: color,
@@ -67,130 +59,12 @@ var Text = function Text(_ref) {
67
59
  align: align
68
60
  }, props), children);
69
61
  };
70
-
71
- exports.Text = Text;
72
- Text.__docgenInfo = {
73
- "description": "",
74
- "methods": [],
75
- "displayName": "Text",
76
- "props": {
77
- "size": {
78
- "defaultValue": {
79
- "value": "'m'",
80
- "computed": false
81
- },
82
- "type": {
83
- "name": "union",
84
- "value": [{
85
- "name": "enum",
86
- "value": [{
87
- "value": "\"s\"",
88
- "computed": false
89
- }, {
90
- "value": "\"m\"",
91
- "computed": false
92
- }, {
93
- "value": "\"l\"",
94
- "computed": false
95
- }, {
96
- "value": "\"xl\"",
97
- "computed": false
98
- }, {
99
- "value": "\"xxl\"",
100
- "computed": false
101
- }]
102
- }, {
103
- "name": "string"
104
- }, {
105
- "name": "object"
106
- }]
107
- },
108
- "required": false,
109
- "description": ""
110
- },
111
- "weight": {
112
- "defaultValue": {
113
- "value": "'normal'",
114
- "computed": false
115
- },
116
- "type": {
117
- "name": "enum",
118
- "value": [{
119
- "value": "\"normal\"",
120
- "computed": false
121
- }, {
122
- "value": "\"medium\"",
123
- "computed": false
124
- }, {
125
- "value": "\"semiBold\"",
126
- "computed": false
127
- }]
128
- },
129
- "required": false,
130
- "description": ""
131
- },
132
- "color": {
133
- "type": {
134
- "name": "union",
135
- "value": [{
136
- "name": "enum",
137
- "value": [{
138
- "value": "\"greys\"",
139
- "computed": false
140
- }, {
141
- "value": "\"fades\"",
142
- "computed": false
143
- }, {
144
- "value": "\"baseColors\"",
145
- "computed": false
146
- }, {
147
- "value": "\"semanticColors\"",
148
- "computed": false
149
- }]
150
- }, {
151
- "name": "string"
152
- }]
153
- },
154
- "required": false,
155
- "description": ""
156
- },
157
- "align": {
158
- "type": {
159
- "name": "enum",
160
- "value": [{
161
- "value": "\"left\"",
162
- "computed": false
163
- }, {
164
- "value": "\"center\"",
165
- "computed": false
166
- }, {
167
- "value": "\"right\"",
168
- "computed": false
169
- }]
170
- },
171
- "required": false,
172
- "description": ""
173
- },
174
- "tag": {
175
- "type": {
176
- "name": "string"
177
- },
178
- "required": false,
179
- "description": ""
180
- },
181
- "hasEllipsis": {
182
- "type": {
183
- "name": "bool"
184
- },
185
- "required": false,
186
- "description": ""
187
- },
188
- "ellipsisLines": {
189
- "type": {
190
- "name": "number"
191
- },
192
- "required": false,
193
- "description": ""
194
- }
195
- }
62
+ Text.propTypes = {
63
+ size: types.textSize,
64
+ weight: types.weight,
65
+ color: types.color,
66
+ align: types.textAlign,
67
+ tag: PropTypes.string,
68
+ hasEllipsis: PropTypes.bool,
69
+ ellipsisLines: PropTypes.number
196
70
  };
@@ -1,27 +1,13 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.define-property.js");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.ClearButtonBox = exports.transitions = void 0;
11
-
12
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _styled = _interopRequireDefault(require("@emotion/styled"));
15
-
16
- var _react = require("@emotion/react");
17
-
18
- var _utilities = require("../utilities");
1
+ import "core-js/modules/es.array.slice.js";
2
+ import "core-js/modules/es.object.freeze.js";
3
+ import "core-js/modules/es.object.define-properties.js";
19
4
 
20
5
  var _templateObject, _templateObject2;
21
6
 
22
- var transitions = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n transition: ", ";\n \n &:hover {\n transition: ", ";\n }\n\n &:active {\n transition: 0s;\n }\n"])), (0, _utilities.getTransition)('slow'), (0, _utilities.getTransition)('fast'));
23
- exports.transitions = transitions;
24
-
25
- var ClearButtonBox = _styled.default.button(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n --grn-borderColor-active: var(--grn-color-fade5);\n \n appearance: none;\n border: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n font-weight: ", ";\n border-radius: ", ";\n height: var(--grn-clearButtonHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--grn-color-overlay);\n }\n\n &:active {\n border-color: var(--grn-borderColor-active);\n outline-color: var(--grn-borderColor-active);\n background-color: transparent;\n }\n\n &:disabled {\n color: ", ";\n cursor: default;\n border-color: transparent;\n\n &:hover {\n background-color: transparent;\n }\n }\n"])), transitions, (0, _utilities.getWeight)("medium"), (0, _utilities.getRadius)('s'), (0, _utilities.getColor)('disabledContent'));
7
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
26
8
 
27
- exports.ClearButtonBox = ClearButtonBox;
9
+ import styled from "@emotion/styled";
10
+ import { css } from '@emotion/react';
11
+ import { getColor, getRadius, getTransition, getWeight } from "../utilities";
12
+ export var transitions = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: ", ";\n \n &:hover {\n transition: ", ";\n }\n\n &:active {\n transition: 0s;\n }\n"])), getTransition('slow'), getTransition('fast'));
13
+ export var ClearButtonBox = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n --grn-borderColor-active: var(--grn-color-fade5);\n \n appearance: none;\n border: 1px solid transparent;\n padding: 0;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n font-weight: ", ";\n border-radius: ", ";\n height: var(--grn-clearButtonHeight-m);\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--grn-color-overlay);\n }\n\n &:active {\n border-color: var(--grn-borderColor-active);\n outline-color: var(--grn-borderColor-active);\n background-color: transparent;\n }\n\n &:disabled {\n color: ", ";\n cursor: default;\n border-color: transparent;\n\n &:hover {\n background-color: transparent;\n }\n }\n"])), transitions, getWeight("medium"), getRadius('s'), getColor('disabledContent'));
package/es/hooks/index.js CHANGED
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.object.define-property.js");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "useMedia", {
9
- enumerable: true,
10
- get: function get() {
11
- return _useMedia.useMedia;
12
- }
13
- });
14
-
15
- var _useMedia = require("./useMedia");
1
+ export { useMedia } from "./useMedia";
@@ -1,25 +1,29 @@
1
- "use strict";
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
2
 
3
- require("core-js/modules/es.object.define-property.js");
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
4
 
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
6
 
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.useMedia = useMedia;
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
8
 
12
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
13
10
 
14
- require("core-js/modules/es.array.map.js");
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
12
 
16
- require("core-js/modules/es.array.find-index.js");
17
-
18
- require("core-js/modules/es.object.to-string.js");
19
-
20
- require("core-js/modules/web.dom-collections.for-each.js");
21
-
22
- function useMedia(queries, values, defaultValue) {
13
+ import "core-js/modules/es.array.map.js";
14
+ import "core-js/modules/es.array.find-index.js";
15
+ import "core-js/modules/es.object.to-string.js";
16
+ import "core-js/modules/web.dom-collections.for-each.js";
17
+ import "core-js/modules/es.symbol.js";
18
+ import "core-js/modules/es.symbol.description.js";
19
+ import "core-js/modules/es.symbol.iterator.js";
20
+ import "core-js/modules/es.array.iterator.js";
21
+ import "core-js/modules/es.string.iterator.js";
22
+ import "core-js/modules/web.dom-collections.iterator.js";
23
+ import "core-js/modules/es.array.slice.js";
24
+ import "core-js/modules/es.array.from.js";
25
+ import "core-js/modules/es.regexp.exec.js";
26
+ export function useMedia(queries, values, defaultValue) {
23
27
  var mediaQueryLists = queries.map(function (q) {
24
28
  return window.matchMedia(q);
25
29
  });
@@ -32,7 +36,7 @@ function useMedia(queries, values, defaultValue) {
32
36
  };
33
37
 
34
38
  var _useState = useState(getValue),
35
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
39
+ _useState2 = _slicedToArray(_useState, 2),
36
40
  value = _useState2[0],
37
41
  setValue = _useState2[1];
38
42
 
@@ -1,44 +1,12 @@
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;
1
+ import "core-js/modules/es.object.assign.js";
2
+ import * as React from "react";
35
3
 
36
4
  var IconAlignCenter = function IconAlignCenter(props) {
37
- return __jsx("svg", (0, _extends2.default)({
5
+ return /*#__PURE__*/React.createElement("svg", Object.assign({
38
6
  viewBox: "0 0 20 32",
39
7
  fill: "none",
40
8
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("path", {
9
+ }, props), /*#__PURE__*/React.createElement("path", {
42
10
  fillRule: "evenodd",
43
11
  clipRule: "evenodd",
44
12
  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",
@@ -46,10 +14,4 @@ var IconAlignCenter = function IconAlignCenter(props) {
46
14
  }));
47
15
  };
48
16
 
49
- IconAlignCenter.__docgenInfo = {
50
- "description": "",
51
- "methods": [],
52
- "displayName": "IconAlignCenter"
53
- };
54
- var _default = IconAlignCenter;
55
- exports.default = _default;
17
+ export default IconAlignCenter;
@@ -1,44 +1,12 @@
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;
1
+ import "core-js/modules/es.object.assign.js";
2
+ import * as React from "react";
35
3
 
36
4
  var IconAlignLeft = function IconAlignLeft(props) {
37
- return __jsx("svg", (0, _extends2.default)({
5
+ return /*#__PURE__*/React.createElement("svg", Object.assign({
38
6
  viewBox: "0 0 24 32",
39
7
  fill: "none",
40
8
  xmlns: "http://www.w3.org/2000/svg"
41
- }, props), __jsx("rect", {
9
+ }, props), /*#__PURE__*/React.createElement("rect", {
42
10
  x: 5,
43
11
  y: 7,
44
12
  width: 18,
@@ -47,16 +15,10 @@ var IconAlignLeft = function IconAlignLeft(props) {
47
15
  stroke: "currentColor",
48
16
  strokeWidth: 2,
49
17
  strokeLinecap: "square"
50
- }), __jsx("path", {
18
+ }), /*#__PURE__*/React.createElement("path", {
51
19
  fill: "currentColor",
52
20
  d: "M0 4h2v24H0z"
53
21
  }));
54
22
  };
55
23
 
56
- IconAlignLeft.__docgenInfo = {
57
- "description": "",
58
- "methods": [],
59
- "displayName": "IconAlignLeft"
60
- };
61
- var _default = IconAlignLeft;
62
- exports.default = _default;
24
+ export default IconAlignLeft;