@flodesk/grain 6.1.5 → 6.3.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/text-input.js +64 -18
- package/es/icons/icon-hide.js +21 -0
- package/es/icons/icon-show.js +21 -0
- package/es/icons/index.js +3 -1
- package/es/types.js +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "core-js/modules/es.object.keys.js";
|
|
2
2
|
import "core-js/modules/es.array.index-of.js";
|
|
3
3
|
import "core-js/modules/es.symbol.js";
|
|
4
|
+
import "core-js/modules/es.object.assign.js";
|
|
4
5
|
import "core-js/modules/es.symbol.description.js";
|
|
5
6
|
import "core-js/modules/es.object.to-string.js";
|
|
6
7
|
import "core-js/modules/es.symbol.iterator.js";
|
|
@@ -10,11 +11,9 @@ import "core-js/modules/web.dom-collections.iterator.js";
|
|
|
10
11
|
import "core-js/modules/es.array.slice.js";
|
|
11
12
|
import "core-js/modules/es.array.from.js";
|
|
12
13
|
import "core-js/modules/es.regexp.exec.js";
|
|
13
|
-
import "core-js/modules/es.object.assign.js";
|
|
14
14
|
import _styled from "@emotion/styled/base";
|
|
15
|
-
var _excluded = ["
|
|
16
|
-
|
|
17
|
-
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); }
|
|
15
|
+
var _excluded = ["children", "internalType", "setInternalType"],
|
|
16
|
+
_excluded2 = ["value", "placeholder", "label", "id", "icon", "hasError", "errorMessage", "isDisabled", "type"];
|
|
18
17
|
|
|
19
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
19
|
|
|
@@ -28,6 +27,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
28
27
|
|
|
29
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
29
|
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
import "core-js/modules/es.array.concat.js";
|
|
33
|
+
|
|
31
34
|
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; }
|
|
32
35
|
|
|
33
36
|
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; }
|
|
@@ -36,8 +39,10 @@ import PropTypes from 'prop-types';
|
|
|
36
39
|
import React from 'react';
|
|
37
40
|
import { Box, Text } from '.';
|
|
38
41
|
import { Icon } from './icon';
|
|
39
|
-
import {
|
|
42
|
+
import { IconButton } from './icon-button';
|
|
43
|
+
import { componentVars, FieldLabel, InputField } from '../foundational';
|
|
40
44
|
import { types } from '../types';
|
|
45
|
+
import { IconHide, IconShow } from '../icons';
|
|
41
46
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
42
47
|
var iconOffsetPx = 12;
|
|
43
48
|
var iconTextGapPx = 8;
|
|
@@ -47,19 +52,47 @@ var IconSection = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "producti
|
|
|
47
52
|
} : {
|
|
48
53
|
target: "e1o9e51y0",
|
|
49
54
|
label: "IconSection"
|
|
50
|
-
})("position:absolute;margin:auto;left:", iconOffsetPx, "px;top:0;bottom:0;height:fit-content;pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
id = _ref.id,
|
|
57
|
-
icon = _ref.icon,
|
|
58
|
-
hasError = _ref.hasError,
|
|
59
|
-
errorMessage = _ref.errorMessage,
|
|
60
|
-
isDisabled = _ref.isDisabled,
|
|
55
|
+
})("position:absolute;margin:auto;left:", iconOffsetPx, "px;top:0;bottom:0;height:fit-content;pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL3RleHQtaW5wdXQuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWE4QiIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy90ZXh0LWlucHV0LmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgQm94LCBUZXh0IH0gZnJvbSAnLic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi9pY29uJztcbmltcG9ydCB7IEljb25CdXR0b24gfSBmcm9tICcuL2ljb24tYnV0dG9uJztcbmltcG9ydCB7IGNvbXBvbmVudFZhcnMsIEZpZWxkTGFiZWwsIElucHV0RmllbGQgfSBmcm9tICcuLi9mb3VuZGF0aW9uYWwnO1xuaW1wb3J0IHs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gICA8L0JveD5cbiAgICAgICl9XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5UZXh0SW5wdXQucHJvcFR5cGVzID0ge1xuICBpZDogUHJvcFR5cGVzLnN0cmluZy5pc1JlcXVpcmVkLFxuICBwbGFjZWhvbGRlcjogUHJvcFR5cGVzLnN0cmluZyxcbiAgdmFsdWU6IFByb3BUeXBlcy5zdHJpbmcsXG4gIGxhYmVsOiB0eXBlcy5sYWJlbCxcbiAgaWNvbjogUHJvcFR5cGVzLm5vZGUsXG4gIGhhc0Vycm9yOiBQcm9wVHlwZXMuYm9vbCxcbiAgZXJyb3JNZXNzYWdlOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBpc0Rpc2FibGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgdHlwZTogdHlwZXMudGV4dElucHV0LFxufTtcbiJdfQ== */"));
|
|
56
|
+
|
|
57
|
+
var ShowButton = function ShowButton(_ref) {
|
|
58
|
+
var children = _ref.children,
|
|
59
|
+
internalType = _ref.internalType,
|
|
60
|
+
setInternalType = _ref.setInternalType,
|
|
61
61
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
62
62
|
|
|
63
|
+
var showRightOffset = "calc((".concat(componentVars.textBoxHeight, " - ").concat(componentVars.clearButtonHeight, ") / 2)");
|
|
64
|
+
var typeAndIconMap = {
|
|
65
|
+
password: ___EmotionJSX(IconShow, null),
|
|
66
|
+
text: ___EmotionJSX(IconHide, null)
|
|
67
|
+
};
|
|
68
|
+
return ___EmotionJSX(Box, {
|
|
69
|
+
position: "absolute",
|
|
70
|
+
right: showRightOffset,
|
|
71
|
+
top: "0",
|
|
72
|
+
bottom: "0",
|
|
73
|
+
margin: "auto",
|
|
74
|
+
height: "fit-content"
|
|
75
|
+
}, ___EmotionJSX(IconButton, _extends({}, props, {
|
|
76
|
+
icon: typeAndIconMap[internalType],
|
|
77
|
+
onClick: function onClick() {
|
|
78
|
+
return setInternalType(internalType === 'text' ? 'password' : 'text');
|
|
79
|
+
}
|
|
80
|
+
})));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export var TextInput = function TextInput(_ref2) {
|
|
84
|
+
var value = _ref2.value,
|
|
85
|
+
placeholder = _ref2.placeholder,
|
|
86
|
+
label = _ref2.label,
|
|
87
|
+
id = _ref2.id,
|
|
88
|
+
icon = _ref2.icon,
|
|
89
|
+
hasError = _ref2.hasError,
|
|
90
|
+
errorMessage = _ref2.errorMessage,
|
|
91
|
+
isDisabled = _ref2.isDisabled,
|
|
92
|
+
_ref2$type = _ref2.type,
|
|
93
|
+
type = _ref2$type === void 0 ? 'text' : _ref2$type,
|
|
94
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
95
|
+
|
|
63
96
|
var iconRef = React.useRef(null);
|
|
64
97
|
|
|
65
98
|
var _React$useState = React.useState(),
|
|
@@ -67,12 +100,19 @@ export var TextInput = function TextInput(_ref) {
|
|
|
67
100
|
iconWidth = _React$useState2[0],
|
|
68
101
|
setIconWidth = _React$useState2[1];
|
|
69
102
|
|
|
103
|
+
var _React$useState3 = React.useState(type),
|
|
104
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
105
|
+
internalType = _React$useState4[0],
|
|
106
|
+
setInternalType = _React$useState4[1];
|
|
107
|
+
|
|
70
108
|
React.useEffect(function () {
|
|
71
109
|
if (iconRef.current) {
|
|
72
110
|
setIconWidth(iconRef.current.getBoundingClientRect().width);
|
|
73
111
|
}
|
|
74
112
|
}, []);
|
|
113
|
+
var hasShowButton = type === 'password';
|
|
75
114
|
var paddingLeft = icon ? "".concat(iconOffsetPx + iconWidth + iconTextGapPx, "px") : undefined;
|
|
115
|
+
var paddingRight = hasShowButton ? componentVars.textBoxHeight : undefined;
|
|
76
116
|
return ___EmotionJSX("div", null, label && ___EmotionJSX(FieldLabel, {
|
|
77
117
|
htmlFor: id
|
|
78
118
|
}, label), ___EmotionJSX(Box, {
|
|
@@ -81,13 +121,18 @@ export var TextInput = function TextInput(_ref) {
|
|
|
81
121
|
ref: iconRef,
|
|
82
122
|
icon: icon
|
|
83
123
|
})), ___EmotionJSX(InputField, _extends({
|
|
124
|
+
type: internalType,
|
|
84
125
|
id: id,
|
|
85
126
|
value: value,
|
|
86
127
|
placeholder: placeholder,
|
|
87
128
|
paddingLeft: paddingLeft,
|
|
129
|
+
paddingRight: paddingRight,
|
|
88
130
|
hasError: hasError,
|
|
89
131
|
isDisabled: isDisabled
|
|
90
|
-
}, props))
|
|
132
|
+
}, props)), hasShowButton && ___EmotionJSX(ShowButton, {
|
|
133
|
+
setInternalType: setInternalType,
|
|
134
|
+
internalType: internalType
|
|
135
|
+
})), errorMessage && ___EmotionJSX(Box, {
|
|
91
136
|
marginTop: 0.5
|
|
92
137
|
}, ___EmotionJSX(Text, {
|
|
93
138
|
color: "danger"
|
|
@@ -101,5 +146,6 @@ TextInput.propTypes = {
|
|
|
101
146
|
icon: PropTypes.node,
|
|
102
147
|
hasError: PropTypes.bool,
|
|
103
148
|
errorMessage: PropTypes.string,
|
|
104
|
-
isDisabled: PropTypes.bool
|
|
149
|
+
isDisabled: PropTypes.bool,
|
|
150
|
+
type: types.textInput
|
|
105
151
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
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
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconHide = function IconHide(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("path", {
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
clipRule: "evenodd",
|
|
16
|
+
d: "M19.532 5.882l3.175-3.175-1.414-1.414-3.41 3.41C16.205 3.683 14.228 3 12 3 5.39 3 1 9 .033 12c.527 1.634 2.07 4.16 4.434 6.119l-3.174 3.174 1.414 1.414 3.409-3.409 1.464-1.463.951-.952 1.443-1.443 5.453-5.453 1.447-1.446 1.237-1.238 1.421-1.421zm-3.112.284C15.104 5.446 13.62 5 11.999 5 9.332 5 7.043 6.207 5.252 7.849c-1.523 1.397-2.564 3-3.077 4.151.513 1.15 1.554 2.754 3.077 4.151.206.188.418.371.636.547l1.237-1.237A5.996 5.996 0 016.033 12c0-3.314 2.671-6 5.966-6 1.293 0 2.491.414 3.469 1.118l.952-.952zm-2.395 2.395A3.924 3.924 0 0011.999 8c-2.18 0-3.966 1.78-3.966 4 0 .736.197 1.424.538 2.014l5.454-5.453zm5.545.111l1.416-1.415c1.546 1.663 2.57 3.472 2.978 4.743C23 15 18.607 21 12 21c-1.441 0-2.777-.285-3.994-.762l1.576-1.577A8.802 8.802 0 0012 19c2.666 0 4.956-1.207 6.747-2.85 1.524-1.396 2.565-3 3.077-4.15-.414-.93-1.173-2.155-2.253-3.328zM12 18a5.942 5.942 0 01-1.552-.205l1.804-1.803c1.97-.125 3.562-1.704 3.703-3.704l1.815-1.815c.128.488.195 1 .195 1.527 0 3.314-2.67 6-5.965 6z",
|
|
17
|
+
fill: "currentColor"
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default IconHide;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "core-js/modules/es.object.assign.js";
|
|
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
|
+
import * as React from 'react';
|
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
|
+
|
|
8
|
+
var IconShow = function IconShow(props) {
|
|
9
|
+
return ___EmotionJSX("svg", _extends({
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props), ___EmotionJSX("path", {
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
clipRule: "evenodd",
|
|
16
|
+
d: "M18.746 16.15c1.524-1.396 2.565-3 3.077-4.15-.512-1.15-1.553-2.754-3.077-4.15C16.956 6.206 14.666 5 12 5S7.043 6.207 5.252 7.849c-1.523 1.397-2.564 3-3.077 4.151.513 1.15 1.554 2.754 3.077 4.151C7.042 17.793 9.332 19 12 19c2.666 0 4.956-1.207 6.747-2.85zM23.964 12C23 15 18.607 21 12 21 5.39 21 1 15 .033 12 1 9 5.39 3 12 3 18.607 3 23 9 23.964 12zm-8 0c0 2.22-1.786 4-3.965 4-2.18 0-3.966-1.78-3.966-4 0-2.22 1.786-4 3.966-4 2.179 0 3.965 1.78 3.965 4zm2 0c0 3.314-2.67 6-5.965 6s-5.966-2.686-5.966-6S8.704 6 12 6c3.294 0 5.965 2.686 5.965 6z",
|
|
17
|
+
fill: "currentColor"
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default IconShow;
|
package/es/icons/index.js
CHANGED
|
@@ -48,4 +48,6 @@ export { default as IconTrash } from './icon-trash';
|
|
|
48
48
|
export { default as IconType } from './icon-type';
|
|
49
49
|
export { default as IconUndo } from './icon-undo';
|
|
50
50
|
export { default as IconUpload } from './icon-upload';
|
|
51
|
-
export { default as IconDownload } from './icon-download';
|
|
51
|
+
export { default as IconDownload } from './icon-download';
|
|
52
|
+
export { default as IconShow } from './icon-show';
|
|
53
|
+
export { default as IconHide } from './icon-hide';
|
package/es/types.js
CHANGED
|
@@ -33,5 +33,6 @@ export var types = {
|
|
|
33
33
|
buttonVariant: PropTypes.oneOf(['neutral', 'accent', 'danger']),
|
|
34
34
|
iconPosition: PropTypes.oneOf(['left', 'right']),
|
|
35
35
|
menuPlacement: PropTypes.oneOf(['bottomStart', 'bottomEnd', 'topStart', 'topEnd']),
|
|
36
|
-
placement: PropTypes.oneOf(placements)
|
|
36
|
+
placement: PropTypes.oneOf(placements),
|
|
37
|
+
textInput: PropTypes.oneOf(['text', 'password', 'email', 'date', 'datetime-local', 'email', 'month', 'number', 'password', 'search', 'tel', 'time', 'url', 'week'])
|
|
37
38
|
};
|