@widergy/energy-ui 1.136.1 → 1.136.2
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/dist/components/UTAvatar/index.js +2 -2
- package/dist/components/UTCheckbox/index.js +1 -1
- package/dist/components/UTDatePicker/index.js +1 -2
- package/dist/components/UTEmojiPicker/constants.js +9 -13
- package/dist/components/UTFileInput/layout.js +4 -0
- package/dist/components/UTRating/components/Faces/constants.js +5 -10
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +2 -6
- package/dist/components/UTTable/components/TableHeader/index.js +0 -1
- package/dist/components/UTTextArea/constants.js +3 -2
- package/dist/components/UTTextArea/index.js +18 -2
- package/dist/components/UTTextArea/styles.module.scss +20 -1
- package/dist/scss/variables/colors.module.scss +1 -0
- package/package.json +1 -1
|
@@ -35,10 +35,10 @@ const UTAvatar = _ref => {
|
|
|
35
35
|
UTAvatar.propTypes = {
|
|
36
36
|
className: _propTypes.string,
|
|
37
37
|
manualColors: _propTypes.bool,
|
|
38
|
-
palette: (0, _propTypes.shape)({
|
|
38
|
+
palette: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
39
39
|
color: _propTypes.string,
|
|
40
40
|
backgroundColor: _propTypes.string
|
|
41
|
-
}),
|
|
41
|
+
})),
|
|
42
42
|
userName: _propTypes.string
|
|
43
43
|
};
|
|
44
44
|
var _default = exports.default = UTAvatar;
|
|
@@ -23,7 +23,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
24
|
var Checked = function Checked(props) {
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
26
|
-
d: "M10
|
|
26
|
+
d: "M10 14Zm0 3-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z"
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
29
|
Checked.defaultProps = {
|
|
@@ -30,7 +30,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
30
30
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
31
31
|
var CalendarIcon = function CalendarIcon(props) {
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("path", {
|
|
33
|
-
d: "M8 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-
|
|
33
|
+
d: "M8 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1Zm8 0c.55 0 1 .45 1 1s-.45 1-1 1h-4c-.55 0-1-.45-1-1s.45-1 1-1Zm2 5H6c-.551 0-1-.449-1-1v-6h14v6c0 .551-.449 1-1 1M6 6h1v1c0 .55.45 1 1 1s1-.45 1-1V6h6v1c0 .55.45 1 1 1s1-.45 1-1V6h1c.551 0 1 .449 1 1v4H5V7c0-.551.449-1 1-1m12-2h-1V3c0-.55-.45-1-1-1s-1 .45-1 1v1H9V3c0-.55-.45-1-1-1s-1 .45-1 1v1H6C4.346 4 3 5.346 3 7v12c0 1.654 1.346 3 3 3h12c1.654 0 3-1.346 3-3V7c0-1.654-1.346-3-3-3",
|
|
34
34
|
id: "a"
|
|
35
35
|
})), /*#__PURE__*/_react.default.createElement("use", {
|
|
36
36
|
fillRule: "nonzero",
|
|
@@ -42,7 +42,6 @@ var CalendarIcon = function CalendarIcon(props) {
|
|
|
42
42
|
CalendarIcon.defaultProps = {
|
|
43
43
|
width: "18",
|
|
44
44
|
height: "20",
|
|
45
|
-
viewBox: "0 0 18 20",
|
|
46
45
|
xmlns: "http://www.w3.org/2000/svg",
|
|
47
46
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
48
47
|
};
|
|
@@ -20,7 +20,6 @@ Faces.defaultProps = {
|
|
|
20
20
|
className: "icon icon-tabler icon-tabler-mood-smile",
|
|
21
21
|
width: "24",
|
|
22
22
|
height: "24",
|
|
23
|
-
viewBox: "0 0 24 24",
|
|
24
23
|
strokeWidth: "2",
|
|
25
24
|
stroke: "#677489",
|
|
26
25
|
fill: "none",
|
|
@@ -29,7 +28,9 @@ Faces.defaultProps = {
|
|
|
29
28
|
};
|
|
30
29
|
var Nature = function Nature(props) {
|
|
31
30
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
32
|
-
d: "M5 21c.5-4.5 2.5-8 7-
|
|
31
|
+
d: "M5 21c.5-4.5 2.5-8 7-10"
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
33
|
+
d: "M9 18c6.218 0 10.5-3.288 11-12V4h-4.014c-9 0-11.986 4-12 9 0 1 0 3 2 5h3z"
|
|
33
34
|
}));
|
|
34
35
|
};
|
|
35
36
|
Nature.defaultProps = {
|
|
@@ -37,7 +38,6 @@ Nature.defaultProps = {
|
|
|
37
38
|
className: "icon icon-tabler icon-tabler-leaf",
|
|
38
39
|
width: "24",
|
|
39
40
|
height: "24",
|
|
40
|
-
viewBox: "0 0 24 24",
|
|
41
41
|
strokeWidth: "2",
|
|
42
42
|
stroke: "#677489",
|
|
43
43
|
fill: "none",
|
|
@@ -46,7 +46,7 @@ Nature.defaultProps = {
|
|
|
46
46
|
};
|
|
47
47
|
var Language = function Language(props) {
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
49
|
-
d: "M19.5 13.
|
|
49
|
+
d: "M19.5 13.572 12 21l-7.5-7.428m0 0A5 5 0 1 1 12 7.006a5 5 0 1 1 7.5 6.572"
|
|
50
50
|
}));
|
|
51
51
|
};
|
|
52
52
|
Language.defaultProps = {
|
|
@@ -54,7 +54,6 @@ Language.defaultProps = {
|
|
|
54
54
|
className: "icon icon-tabler icon-tabler-heart",
|
|
55
55
|
width: "24",
|
|
56
56
|
height: "24",
|
|
57
|
-
viewBox: "0 0 24 24",
|
|
58
57
|
strokeWidth: "2",
|
|
59
58
|
stroke: "#677489",
|
|
60
59
|
fill: "none",
|
|
@@ -63,9 +62,11 @@ Language.defaultProps = {
|
|
|
63
62
|
};
|
|
64
63
|
var Sports = function Sports(props) {
|
|
65
64
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
66
|
-
d: "
|
|
65
|
+
d: "m15 9-6 6M10 12l2 2M12 10l2 2M8 21a5 5 0 0 0-5-5"
|
|
66
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
67
|
+
d: "M16 3C8.82 3 3 8.82 3 16a5 5 0 0 0 5 5c7.18 0 13-5.82 13-13a5 5 0 0 0-5-5"
|
|
67
68
|
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
68
|
-
d: "M16
|
|
69
|
+
d: "M16 3a5 5 0 0 0 5 5"
|
|
69
70
|
}));
|
|
70
71
|
};
|
|
71
72
|
Sports.defaultProps = {
|
|
@@ -73,7 +74,6 @@ Sports.defaultProps = {
|
|
|
73
74
|
className: "icon icon-tabler icon-tabler-ball-american-football",
|
|
74
75
|
width: "24",
|
|
75
76
|
height: "24",
|
|
76
|
-
viewBox: "0 0 24 24",
|
|
77
77
|
strokeWidth: "2",
|
|
78
78
|
stroke: "#677489",
|
|
79
79
|
fill: "none",
|
|
@@ -92,7 +92,6 @@ Food.defaultProps = {
|
|
|
92
92
|
className: "icon icon-tabler icon-tabler-pizza",
|
|
93
93
|
width: "24",
|
|
94
94
|
height: "24",
|
|
95
|
-
viewBox: "0 0 24 24",
|
|
96
95
|
strokeWidth: "2",
|
|
97
96
|
stroke: "#677489",
|
|
98
97
|
fill: "none",
|
|
@@ -109,7 +108,6 @@ Travel.defaultProps = {
|
|
|
109
108
|
className: "icon icon-tabler icon-tabler-plane",
|
|
110
109
|
width: "24",
|
|
111
110
|
height: "24",
|
|
112
|
-
viewBox: "0 0 24 24",
|
|
113
111
|
strokeWidth: "2",
|
|
114
112
|
stroke: "#677489",
|
|
115
113
|
fill: "none",
|
|
@@ -118,7 +116,7 @@ Travel.defaultProps = {
|
|
|
118
116
|
};
|
|
119
117
|
var Creative = function Creative(props) {
|
|
120
118
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
121
|
-
d: "M3 12h1m8-9v1m8 8h1M5.6 5.6l.7.7m12.1-.
|
|
119
|
+
d: "M3 12h1m8-9v1m8 8h1M5.6 5.6l.7.7m12.1-.7-.7.7M9 16a5 5 0 1 1 6 0 3.5 3.5 0 0 0-1 3 2 2 0 0 1-4 0 3.5 3.5 0 0 0-1-3M9.7 17h4.6"
|
|
122
120
|
}));
|
|
123
121
|
};
|
|
124
122
|
Creative.defaultProps = {
|
|
@@ -126,7 +124,6 @@ Creative.defaultProps = {
|
|
|
126
124
|
className: "icon icon-tabler icon-tabler-bulb",
|
|
127
125
|
width: "24",
|
|
128
126
|
height: "24",
|
|
129
|
-
viewBox: "0 0 24 24",
|
|
130
127
|
strokeWidth: "2",
|
|
131
128
|
stroke: "#677489",
|
|
132
129
|
fill: "none",
|
|
@@ -143,7 +140,6 @@ Flags.defaultProps = {
|
|
|
143
140
|
className: "icon icon-tabler icon-tabler-flag",
|
|
144
141
|
width: "24",
|
|
145
142
|
height: "24",
|
|
146
|
-
viewBox: "0 0 24 24",
|
|
147
143
|
strokeWidth: "2",
|
|
148
144
|
stroke: "#677489",
|
|
149
145
|
fill: "none",
|
|
@@ -25,6 +25,10 @@ var uploadIcon = function uploadIcon(props) {
|
|
|
25
25
|
uploadIcon.defaultProps = {
|
|
26
26
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27
27
|
viewBox: "0 0 414.165 414.165",
|
|
28
|
+
style: {
|
|
29
|
+
enableBackground: "new 0 0 414.165 414.165"
|
|
30
|
+
},
|
|
31
|
+
xmlSpace: "preserve",
|
|
28
32
|
width: "512",
|
|
29
33
|
height: "512"
|
|
30
34
|
};
|
|
@@ -10,14 +10,13 @@ var MoodConfuzed = function MoodConfuzed(props) {
|
|
|
10
10
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
11
11
|
fillRule: "evenodd",
|
|
12
12
|
clipRule: "evenodd",
|
|
13
|
-
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-
|
|
13
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm6-2a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Zm6 0a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H15a1 1 0 0 1-1-1Zm1.43 5.498a9 9 0 0 0-5.4 1.35 1 1 0 0 1-1.06-1.695 11 11 0 0 1 6.6-1.65 1 1 0 1 1-.14 1.995Z",
|
|
14
14
|
fill: "#091E42"
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
17
|
MoodConfuzed.defaultProps = {
|
|
18
18
|
width: "24",
|
|
19
19
|
height: "24",
|
|
20
|
-
viewBox: "0 0 24 24",
|
|
21
20
|
fill: "none",
|
|
22
21
|
xmlns: "http://www.w3.org/2000/svg"
|
|
23
22
|
};
|
|
@@ -25,14 +24,13 @@ var MoodEmpty = function MoodEmpty(props) {
|
|
|
25
24
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
26
25
|
fillRule: "evenodd",
|
|
27
26
|
clipRule: "evenodd",
|
|
28
|
-
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-
|
|
27
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm6-2a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Zm6 0a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H15a1 1 0 0 1-1-1Zm-6 5a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z",
|
|
29
28
|
fill: "#091E42"
|
|
30
29
|
}));
|
|
31
30
|
};
|
|
32
31
|
MoodEmpty.defaultProps = {
|
|
33
32
|
width: "24",
|
|
34
33
|
height: "24",
|
|
35
|
-
viewBox: "0 0 24 24",
|
|
36
34
|
fill: "none",
|
|
37
35
|
xmlns: "http://www.w3.org/2000/svg"
|
|
38
36
|
};
|
|
@@ -40,14 +38,13 @@ var MoodHappy = function MoodHappy(props) {
|
|
|
40
38
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
41
39
|
fillRule: "evenodd",
|
|
42
40
|
clipRule: "evenodd",
|
|
43
|
-
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-
|
|
41
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm6-3a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Zm6 0a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H15a1 1 0 0 1-1-1Zm-6.707 3.293A1 1 0 0 1 8 12h8a1 1 0 0 1 1 1 5 5 0 1 1-10 0 1 1 0 0 1 .293-.707ZM9.172 14a3 3 0 0 0 5.656 0H9.172Z",
|
|
44
42
|
fill: "#091E42"
|
|
45
43
|
}));
|
|
46
44
|
};
|
|
47
45
|
MoodHappy.defaultProps = {
|
|
48
46
|
width: "24",
|
|
49
47
|
height: "24",
|
|
50
|
-
viewBox: "0 0 24 24",
|
|
51
48
|
fill: "none",
|
|
52
49
|
xmlns: "http://www.w3.org/2000/svg"
|
|
53
50
|
};
|
|
@@ -55,14 +52,13 @@ var MoodSad = function MoodSad(props) {
|
|
|
55
52
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
56
53
|
fillRule: "evenodd",
|
|
57
54
|
clipRule: "evenodd",
|
|
58
|
-
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-
|
|
55
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm6-2a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Zm6 0a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H15a1 1 0 0 1-1-1Zm-2 5.2a2.5 2.5 0 0 0-1.786.75 1 1 0 0 1-1.428-1.4 4.499 4.499 0 0 1 6.428 0 1 1 0 0 1-1.428 1.4A2.501 2.501 0 0 0 12 15.2Z",
|
|
59
56
|
fill: "#091E42"
|
|
60
57
|
}));
|
|
61
58
|
};
|
|
62
59
|
MoodSad.defaultProps = {
|
|
63
60
|
width: "24",
|
|
64
61
|
height: "24",
|
|
65
|
-
viewBox: "0 0 24 24",
|
|
66
62
|
fill: "none",
|
|
67
63
|
xmlns: "http://www.w3.org/2000/svg"
|
|
68
64
|
};
|
|
@@ -70,14 +66,13 @@ var MoodSmile = function MoodSmile(props) {
|
|
|
70
66
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
71
67
|
fillRule: "evenodd",
|
|
72
68
|
clipRule: "evenodd",
|
|
73
|
-
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-
|
|
69
|
+
d: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm6-2a1 1 0 0 1 1-1h.01a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Zm6 0a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H15a1 1 0 0 1-1-1Zm-5.2 4.286a1 1 0 0 1 1.414.014 2.5 2.5 0 0 0 3.572 0 1 1 0 0 1 1.428 1.4 4.5 4.5 0 0 1-6.428 0 1 1 0 0 1 .014-1.414Z",
|
|
74
70
|
fill: "#091E42"
|
|
75
71
|
}));
|
|
76
72
|
};
|
|
77
73
|
MoodSmile.defaultProps = {
|
|
78
74
|
width: "24",
|
|
79
75
|
height: "24",
|
|
80
|
-
viewBox: "0 0 24 24",
|
|
81
76
|
fill: "none",
|
|
82
77
|
xmlns: "http://www.w3.org/2000/svg"
|
|
83
78
|
};
|
|
@@ -23,7 +23,6 @@ var NavigateBeforeIcon = function NavigateBeforeIcon(props) {
|
|
|
23
23
|
NavigateBeforeIcon.defaultProps = {
|
|
24
24
|
width: "7",
|
|
25
25
|
height: "14",
|
|
26
|
-
viewBox: "0 0 7 14",
|
|
27
26
|
xmlns: "http://www.w3.org/2000/svg"
|
|
28
27
|
};
|
|
29
28
|
var NavigateNextIcon = function NavigateNextIcon(props) {
|
|
@@ -36,33 +35,30 @@ var NavigateNextIcon = function NavigateNextIcon(props) {
|
|
|
36
35
|
NavigateNextIcon.defaultProps = {
|
|
37
36
|
width: "7",
|
|
38
37
|
height: "14",
|
|
39
|
-
viewBox: "0 0 7 14",
|
|
40
38
|
xmlns: "http://www.w3.org/2000/svg"
|
|
41
39
|
};
|
|
42
40
|
var NavigateHeaderBeforeIcon = function NavigateHeaderBeforeIcon(props) {
|
|
43
41
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
44
42
|
fill: "#FFF",
|
|
45
|
-
d: "M5.232.36a1 1 0 0 1 1.536 1.28L2.292 7.01l4.315 5.363a1 1 0 0 1-1.558 1.254l-4.828-6A1 1 0 0 1 .232 6.
|
|
43
|
+
d: "M5.232.36a1 1 0 0 1 1.536 1.28L2.292 7.01l4.315 5.363a1 1 0 0 1-1.558 1.254l-4.828-6A1 1 0 0 1 .232 6.36Zm7 0a1 1 0 0 1 1.537 1.28L9.293 7.011l4.315 5.362a1 1 0 0 1-1.56 1.254l-4.828-6a1 1 0 0 1 .012-1.267Z",
|
|
46
44
|
fillRule: "evenodd"
|
|
47
45
|
}));
|
|
48
46
|
};
|
|
49
47
|
NavigateHeaderBeforeIcon.defaultProps = {
|
|
50
48
|
width: "14",
|
|
51
49
|
height: "14",
|
|
52
|
-
viewBox: "0 0 14 14",
|
|
53
50
|
xmlns: "http://www.w3.org/2000/svg"
|
|
54
51
|
};
|
|
55
52
|
var NavigateHeaderNextIcon = function NavigateHeaderNextIcon(props) {
|
|
56
53
|
return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
|
|
57
54
|
fill: "#FFF",
|
|
58
|
-
d: "M7.545.221a1 1 0 0 1 1.406.152l4.828 6a1 1 0 0 1-.01 1.267l-5 6a1 1 0 1 1-1.537-1.28l4.476-5.371-4.316-5.362A1 1 0 0 1 7.545.
|
|
55
|
+
d: "M7.545.221a1 1 0 0 1 1.406.152l4.828 6a1 1 0 0 1-.01 1.267l-5 6a1 1 0 1 1-1.537-1.28l4.476-5.371-4.316-5.362A1 1 0 0 1 7.545.221Zm-7 0a1 1 0 0 1 1.406.152l4.828 6a1 1 0 0 1-.01 1.267l-5 6a1 1 0 1 1-1.537-1.28l4.475-5.371L.392 1.627A1 1 0 0 1 .545.221Z",
|
|
59
56
|
fillRule: "evenodd"
|
|
60
57
|
}));
|
|
61
58
|
};
|
|
62
59
|
NavigateHeaderNextIcon.defaultProps = {
|
|
63
60
|
width: "14",
|
|
64
61
|
height: "14",
|
|
65
|
-
viewBox: "0 0 14 14",
|
|
66
62
|
xmlns: "http://www.w3.org/2000/svg"
|
|
67
63
|
};
|
|
68
64
|
const Pagination = _ref => {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tippyProps = void 0;
|
|
6
|
+
exports.tippyProps = exports.limitWarningFactor = void 0;
|
|
7
7
|
const tippyProps = exports.tippyProps = {
|
|
8
8
|
appendTo: () => document.body,
|
|
9
9
|
interactive: false
|
|
10
|
-
};
|
|
10
|
+
};
|
|
11
|
+
const limitWarningFactor = exports.limitWarningFactor = 0.9;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
|
+
var _normalize = require("@widergy/web-utils/lib/normalize");
|
|
9
10
|
var _HelpOutline = _interopRequireDefault(require("@material-ui/icons/HelpOutline"));
|
|
10
11
|
var _UTTooltip = _interopRequireDefault(require("../UTTooltip"));
|
|
11
12
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
@@ -20,6 +21,7 @@ const UTTextArea = _ref => {
|
|
|
20
21
|
let {
|
|
21
22
|
classes,
|
|
22
23
|
classNames = {},
|
|
24
|
+
field,
|
|
23
25
|
disabled,
|
|
24
26
|
HelpIcon,
|
|
25
27
|
inputProps = {},
|
|
@@ -37,6 +39,15 @@ const UTTextArea = _ref => {
|
|
|
37
39
|
textarea,
|
|
38
40
|
label
|
|
39
41
|
} = classNames;
|
|
42
|
+
const {
|
|
43
|
+
character_count_limit: characterCountLimit
|
|
44
|
+
} = (field === null || field === void 0 ? void 0 : field.configuration) || {};
|
|
45
|
+
const handleOnChange = _ref2 => {
|
|
46
|
+
let {
|
|
47
|
+
target
|
|
48
|
+
} = _ref2;
|
|
49
|
+
return onChange(characterCountLimit ? (0, _normalize.maxLength)(characterCountLimit)(target.value) : target.value);
|
|
50
|
+
};
|
|
40
51
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
52
|
className: container
|
|
42
53
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -44,16 +55,20 @@ const UTTextArea = _ref => {
|
|
|
44
55
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
45
56
|
className: "".concat(label, " ").concat(_stylesModule.default.label)
|
|
46
57
|
}, title)), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: _stylesModule.default.content
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
47
60
|
className: _stylesModule.default.textAreaContainer
|
|
48
61
|
}, /*#__PURE__*/_react.default.createElement("textarea", _extends({}, inputProps, {
|
|
49
62
|
className: "".concat(_stylesModule.default.textarea, " ").concat(textarea, " ").concat(classes.textarea),
|
|
50
|
-
onChange:
|
|
63
|
+
onChange: handleOnChange,
|
|
51
64
|
onBlur: onBlur,
|
|
52
65
|
onFocus: onFocus,
|
|
53
66
|
value: value,
|
|
54
67
|
disabled: disabled,
|
|
55
68
|
placeholder: placeholder
|
|
56
|
-
})),
|
|
69
|
+
})), characterCountLimit && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
70
|
+
className: "\n ".concat(_stylesModule.default.characterCount, "\n ").concat(value.length === characterCountLimit ? _stylesModule.default.characterLimitReached : value.length >= characterCountLimit * _constants.limitWarningFactor ? _stylesModule.default.characterLimitWarning : '', "\n ")
|
|
71
|
+
}, "".concat(value.length, "/").concat(characterCountLimit))), tooltip && /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
57
72
|
content: tooltip,
|
|
58
73
|
tippyProps: _constants.tippyProps
|
|
59
74
|
}, /*#__PURE__*/_react.default.createElement("div", null, HelpIcon || /*#__PURE__*/_react.default.createElement(_HelpOutline.default, {
|
|
@@ -69,6 +84,7 @@ UTTextArea.propTypes = {
|
|
|
69
84
|
textarea: _propTypes.string
|
|
70
85
|
}),
|
|
71
86
|
disabled: _propTypes.bool,
|
|
87
|
+
field: _formTypes.fieldType,
|
|
72
88
|
HelpIcon: _propTypes.elementType,
|
|
73
89
|
inputProps: _formTypes.inputPropTypes,
|
|
74
90
|
onBlur: _propTypes.func,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../../scss/variables/colors.module.scss';
|
|
2
|
+
|
|
1
3
|
.textarea {
|
|
2
4
|
height: 100px;
|
|
3
5
|
width: 100%;
|
|
@@ -13,8 +15,25 @@
|
|
|
13
15
|
padding-right: 5px;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
.
|
|
18
|
+
.content {
|
|
17
19
|
column-gap: 8px;
|
|
18
20
|
display: flex;
|
|
19
21
|
margin: 10px 0;
|
|
20
22
|
}
|
|
23
|
+
|
|
24
|
+
.textAreaContainer {
|
|
25
|
+
height: 100px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.characterCount {
|
|
30
|
+
text-align: right;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.characterLimitWarning {
|
|
34
|
+
color: $warning;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.characterLimitReached {
|
|
38
|
+
color: $error;
|
|
39
|
+
}
|