tenjin-ui-kit 0.1.0-dev.3 → 0.1.0-dev.5
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.
|
@@ -103,7 +103,9 @@ function BreadCrumbs(props) {
|
|
|
103
103
|
title: (_crumbInfo$3 = crumbInfo[0]) === null || _crumbInfo$3 === void 0 ? void 0 : _crumbInfo$3.title,
|
|
104
104
|
arrow: true,
|
|
105
105
|
placement: "top"
|
|
106
|
-
}, /*#__PURE__*/React.createElement("span", null, ((_crumbInfo$4 = crumbInfo[0]) === null || _crumbInfo$4 === void 0 ? void 0 : (_crumbInfo$4$title = _crumbInfo$4.title) === null || _crumbInfo$4$title === void 0 ? void 0 : _crumbInfo$4$title.slice(0, 20)) + "...")) : /*#__PURE__*/React.createElement(_text.default,
|
|
106
|
+
}, /*#__PURE__*/React.createElement("span", null, ((_crumbInfo$4 = crumbInfo[0]) === null || _crumbInfo$4 === void 0 ? void 0 : (_crumbInfo$4$title = _crumbInfo$4.title) === null || _crumbInfo$4$title === void 0 ? void 0 : _crumbInfo$4$title.slice(0, 20)) + "...")) : /*#__PURE__*/React.createElement(_text.default, {
|
|
107
|
+
component: "span"
|
|
108
|
+
}, (_crumbInfo$5 = crumbInfo[0]) === null || _crumbInfo$5 === void 0 ? void 0 : _crumbInfo$5.title)), crumbInfo.length > maxItems && crumbInfo.length - 1 !== maxItems && /*#__PURE__*/React.createElement(_button.default, {
|
|
107
109
|
color: "inherit",
|
|
108
110
|
variant: "text",
|
|
109
111
|
onClick: handleMenuClick,
|
|
@@ -141,7 +143,11 @@ function BreadCrumbs(props) {
|
|
|
141
143
|
title: breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.title,
|
|
142
144
|
arrow: true,
|
|
143
145
|
placement: "top"
|
|
144
|
-
}, /*#__PURE__*/React.createElement(
|
|
146
|
+
}, /*#__PURE__*/React.createElement(_text.default, {
|
|
147
|
+
component: "span"
|
|
148
|
+
}, (breadcrumb === null || breadcrumb === void 0 ? void 0 : (_breadcrumb$title2 = breadcrumb.title) === null || _breadcrumb$title2 === void 0 ? void 0 : _breadcrumb$title2.slice(0, 20)) + "...")) : /*#__PURE__*/React.createElement(_text.default, {
|
|
149
|
+
component: "span"
|
|
150
|
+
}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.title));
|
|
145
151
|
})), /*#__PURE__*/React.createElement(_material.Menu, {
|
|
146
152
|
anchorEl: anchorEl,
|
|
147
153
|
open: menuOpen,
|
|
@@ -167,6 +173,8 @@ function BreadCrumbs(props) {
|
|
|
167
173
|
display: "flex",
|
|
168
174
|
marginRight: "3px"
|
|
169
175
|
}
|
|
170
|
-
}, breadcrumb.icon), /*#__PURE__*/React.createElement(_text.default,
|
|
176
|
+
}, breadcrumb.icon), /*#__PURE__*/React.createElement(_text.default, {
|
|
177
|
+
component: "span"
|
|
178
|
+
}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.title));
|
|
171
179
|
})));
|
|
172
180
|
}
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.ButtonLoader = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _material = require("@mui/material");
|
|
9
8
|
var _styles = require("@mui/material/styles");
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
11
|
var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
|
|
13
12
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
13
|
+
var _excluded = ["loading"];
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
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); }
|
|
16
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -19,6 +19,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
19
19
|
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; }
|
|
20
20
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
22
24
|
var Button = function Button(props) {
|
|
23
25
|
var loading = props.loading,
|
|
24
26
|
loadingText = props.loadingText,
|
|
@@ -28,6 +30,8 @@ var Button = function Button(props) {
|
|
|
28
30
|
color = props.color,
|
|
29
31
|
fixedWidth = props.fixedWidth,
|
|
30
32
|
type = props.type;
|
|
33
|
+
var _ = props.loading,
|
|
34
|
+
propsSansLoading = _objectWithoutProperties(props, _excluded);
|
|
31
35
|
var handleClick = function handleClick(e) {
|
|
32
36
|
if (loading) {
|
|
33
37
|
e.preventDefault();
|
|
@@ -65,7 +69,7 @@ var Button = function Button(props) {
|
|
|
65
69
|
"aria-haspopup": "true",
|
|
66
70
|
"aria-expanded": open ? "true" : undefined,
|
|
67
71
|
onClick: handleMenuClick
|
|
68
|
-
},
|
|
72
|
+
}, propsSansLoading), children), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
69
73
|
id: "basic-menu",
|
|
70
74
|
anchorEl: anchorEl,
|
|
71
75
|
open: open,
|
|
@@ -130,8 +130,9 @@ var Input = function Input(_ref) {
|
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
startAdornment: startIcon,
|
|
133
|
-
endAdornment: endIcon
|
|
134
|
-
helperText
|
|
133
|
+
endAdornment: endIcon
|
|
134
|
+
// helperText={errorMessage || localErrorMessage}
|
|
135
|
+
,
|
|
135
136
|
disabled: isDisabled,
|
|
136
137
|
error: !!error || !!localErrorMessage,
|
|
137
138
|
onChange: validateRestrictiveCharacters,
|
|
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactFinalForm = require("react-final-form");
|
|
9
7
|
var _material = require("@mui/material");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _text = _interopRequireDefault(require("../text"));
|
|
11
|
-
var _Search = _interopRequireDefault(require("@mui/icons-material/Search"));
|
|
12
|
-
var _iconsMaterial = require("@mui/icons-material");
|
|
13
10
|
var _excluded = ["options", "errorMessage", "error", "fullWidth", "isDisabled", "label", "isRequired", "helperText", "isSearch", "isClearOption", "loading", "isSort", "placeholder"];
|
|
14
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
12
|
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); }
|
|
@@ -25,9 +22,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
25
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
23
|
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
24
|
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; }
|
|
28
|
-
// import { Form } from "react-final-form";
|
|
29
|
-
// import { Input } from "tenjin-ui-kit";
|
|
30
|
-
|
|
31
25
|
var SimpleSelect = function SimpleSelect(_ref) {
|
|
32
26
|
var _isSort, _isSearch, _isClearOption;
|
|
33
27
|
var options = _ref.options,
|
|
@@ -119,6 +113,7 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
119
113
|
value: option === null || option === void 0 ? void 0 : option.value
|
|
120
114
|
};
|
|
121
115
|
});
|
|
116
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
117
|
}, [options, searchText, isSearch]);
|
|
123
118
|
var recommendedOptions = isSearch ? displayedOptions : options;
|
|
124
119
|
var typingTimer;
|
|
@@ -155,14 +150,6 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
155
150
|
color: "red"
|
|
156
151
|
}
|
|
157
152
|
}, " * ") : "")), /*#__PURE__*/_react.default.createElement(_material.Select, _extends({}, rest, {
|
|
158
|
-
// displayEmpty // To display the placeholder
|
|
159
|
-
// renderValue={(selected) => {
|
|
160
|
-
// if (!selected) {
|
|
161
|
-
// return <span style={{ color: "#acacac" }}>{placeholder || "Select an option"}</span>;
|
|
162
|
-
// }
|
|
163
|
-
// const selectedOption = options?.find((option) => option?.value === selected);
|
|
164
|
-
// return selectedOption?.label;
|
|
165
|
-
// }}
|
|
166
153
|
fullWidth: true,
|
|
167
154
|
onClose: function onClose() {
|
|
168
155
|
return setSearchText("");
|
|
@@ -174,7 +161,7 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
174
161
|
}
|
|
175
162
|
}
|
|
176
163
|
}
|
|
177
|
-
}), isSearch && /*#__PURE__*/_react.default.createElement(
|
|
164
|
+
}), isSearch && /*#__PURE__*/_react.default.createElement("input", {
|
|
178
165
|
id: "search-box",
|
|
179
166
|
type: "text",
|
|
180
167
|
autoFocus: true,
|
|
@@ -192,26 +179,13 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
192
179
|
width: "100%",
|
|
193
180
|
border: "1px solid #949494",
|
|
194
181
|
borderRadius: "4px"
|
|
195
|
-
// paddingLeft: "2.5rem",
|
|
196
|
-
// background:
|
|
197
|
-
// "white url('https://static.thenounproject.com/png/101791-200.png') no-repeat left center",
|
|
198
|
-
// backgroundSize: "1.125rem",
|
|
199
|
-
// position: "sticky",
|
|
200
|
-
// top: 0,
|
|
201
|
-
// zIndex: 9999,
|
|
202
|
-
// height: "2.188rem",
|
|
203
|
-
// margin: 0,
|
|
204
|
-
// width: "100%",
|
|
205
|
-
// border: "1px solid #949494",
|
|
206
|
-
// borderRadius: "4px",
|
|
207
182
|
},
|
|
208
|
-
|
|
209
183
|
placeholder: "Type to search...",
|
|
210
184
|
onChange: function onChange(e) {
|
|
211
185
|
return setSearchText(e.target.value);
|
|
212
186
|
},
|
|
213
187
|
onKeyDown: handleKeyDown
|
|
214
|
-
})
|
|
188
|
+
}), isClearOption && !loading && /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
215
189
|
value: ""
|
|
216
190
|
}, /*#__PURE__*/_react.default.createElement("em", {
|
|
217
191
|
style: {
|
|
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactFinalForm = require("react-final-form");
|
|
9
7
|
var _material = require("@mui/material");
|
|
10
8
|
var _text = _interopRequireDefault(require("../text"));
|
|
11
9
|
var _excluded = ["options", "errorMessage", "error", "fullWidth", "isDisabled", "label", "isRequired"];
|
|
@@ -13,9 +11,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
11
|
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); }
|
|
14
12
|
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
13
|
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; }
|
|
16
|
-
// import { Form } from "react-final-form";
|
|
17
|
-
// import { Input } from "tenjin-ui-kit";
|
|
18
|
-
|
|
19
14
|
var SimpleSelect = function SimpleSelect(_ref) {
|
|
20
15
|
var options = _ref.options,
|
|
21
16
|
errorMessage = _ref.errorMessage,
|
|
@@ -26,7 +21,7 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
26
21
|
isRequired = _ref.isRequired,
|
|
27
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
23
|
console.log(errorMessage, error, "error");
|
|
29
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_material.FormControl, {
|
|
30
25
|
sx: {
|
|
31
26
|
m: 1,
|
|
32
27
|
minWidth: 120
|
|
@@ -37,86 +32,25 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
37
32
|
style: {
|
|
38
33
|
margin: "0rem !important"
|
|
39
34
|
}
|
|
40
|
-
}, label && /*#__PURE__*/
|
|
35
|
+
}, label && /*#__PURE__*/React.createElement(_material.FormLabel, {
|
|
41
36
|
htmlFor: "my-input",
|
|
42
37
|
sx: {
|
|
43
38
|
fontSize: "0.8rem",
|
|
44
39
|
fontWeight: 500,
|
|
45
40
|
paddingBottom: "0.2rem"
|
|
46
41
|
}
|
|
47
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, /*#__PURE__*/React.createElement(_text.default, null, label, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
48
43
|
style: {
|
|
49
44
|
color: "red"
|
|
50
45
|
}
|
|
51
|
-
}, " * ") : "")), /*#__PURE__*/
|
|
46
|
+
}, " * ") : "")), /*#__PURE__*/React.createElement(_material.Select, _extends({}, rest, {
|
|
52
47
|
fullWidth: true
|
|
53
48
|
}), options.map(function (option) {
|
|
54
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/React.createElement(_material.MenuItem, {
|
|
55
50
|
key: option.value,
|
|
56
51
|
value: option.value
|
|
57
52
|
}, option.label);
|
|
58
|
-
})), error && /*#__PURE__*/
|
|
53
|
+
})), error && /*#__PURE__*/React.createElement(_material.FormHelperText, null, errorMessage)));
|
|
59
54
|
};
|
|
60
|
-
var _default = SimpleSelect;
|
|
61
|
-
// { value: "option1", label: "Option 1" },
|
|
62
|
-
// { value: "option2", label: "Option 2" },
|
|
63
|
-
// // ... other options
|
|
64
|
-
// ];
|
|
65
|
-
// export const MyForm = () => {
|
|
66
|
-
// const validateForm = (values, mandatoryFields) => {
|
|
67
|
-
// let errors = {};
|
|
68
|
-
// if (mandatoryFields) {
|
|
69
|
-
// mandatoryFields.forEach((field) => {
|
|
70
|
-
// if (!values[field]) errors[field] = "Required";
|
|
71
|
-
// });
|
|
72
|
-
// }
|
|
73
|
-
// return errors;
|
|
74
|
-
// };
|
|
75
|
-
// const validate = (values) => {
|
|
76
|
-
// const errors = validateForm(values, ["text", "select"]);
|
|
77
|
-
// return errors;
|
|
78
|
-
// };
|
|
79
|
-
// const Submit = (values) => {
|
|
80
|
-
// console.log(values, "values");
|
|
81
|
-
// };
|
|
82
|
-
// return (
|
|
83
|
-
// <Form onSubmit={Submit} validate={validate}>
|
|
84
|
-
// {({ handleSubmit }) => (
|
|
85
|
-
// <form onSubmit={handleSubmit}>
|
|
86
|
-
// {/* Other form fields */}
|
|
87
|
-
// <Field
|
|
88
|
-
// name="text"
|
|
89
|
-
// render={({ input, meta }) => (
|
|
90
|
-
// <Input
|
|
91
|
-
// autoFocus="autofocus"
|
|
92
|
-
// isRequired
|
|
93
|
-
// {...input}
|
|
94
|
-
// // isDisabled={props.type === 'edit' && true}
|
|
95
|
-
// size="normal"
|
|
96
|
-
// placeholder="Test Cycle Name"
|
|
97
|
-
// fullWidth
|
|
98
|
-
// label="Name"
|
|
99
|
-
// error={meta.touched && meta.error ? true : false}
|
|
100
|
-
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
101
|
-
// />
|
|
102
|
-
// )}
|
|
103
|
-
// />
|
|
104
|
-
// <Field
|
|
105
|
-
// name="select"
|
|
106
|
-
// render={({ input, meta }) => (
|
|
107
|
-
// <MUISelectField
|
|
108
|
-
// {...input}
|
|
109
|
-
// // isDisabled={props.type === 'edit' && true}
|
|
110
|
-
// options={options}
|
|
111
|
-
// error={meta.touched && meta.error}
|
|
112
|
-
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
113
|
-
// />
|
|
114
|
-
// )}
|
|
115
|
-
// />
|
|
116
|
-
// <button type="submit">Submit</button>
|
|
117
|
-
// </form>
|
|
118
|
-
// )}
|
|
119
|
-
// </Form>
|
|
120
|
-
// );
|
|
121
|
-
// };
|
|
55
|
+
var _default = SimpleSelect;
|
|
122
56
|
exports.default = _default;
|
package/components/text/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
|
-
var _excluded = ["children", "bold", "semibold", "color", "variant", "link", "fontWeight", "sx"];
|
|
11
|
+
var _excluded = ["children", "bold", "semibold", "color", "variant", "link", "fontWeight", "sx", "component"];
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
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); }
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -43,9 +43,12 @@ var Text = function Text(_ref) {
|
|
|
43
43
|
link = _ref.link,
|
|
44
44
|
fontWeight = _ref.fontWeight,
|
|
45
45
|
sx = _ref.sx,
|
|
46
|
+
_ref$component = _ref.component,
|
|
47
|
+
component = _ref$component === void 0 ? "p" : _ref$component,
|
|
46
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
49
|
var theme = (0, _material.useTheme)();
|
|
48
50
|
return /*#__PURE__*/_react.default.createElement(_material.Typography, _extends({
|
|
51
|
+
component: component,
|
|
49
52
|
variant: variant === "title" ? "h6" : variant === "subtitle" ? "body2" : variant,
|
|
50
53
|
fontWeight: bold ? "bold" : semibold || variant === "title" ? 600 : fontWeight,
|
|
51
54
|
color: link ? "primary" : getColor(color, theme)
|
|
@@ -58,7 +61,7 @@ var Text = function Text(_ref) {
|
|
|
58
61
|
Text.propTypes = {
|
|
59
62
|
bold: _propTypes.default.bool,
|
|
60
63
|
semibold: _propTypes.default.bool,
|
|
61
|
-
variant: _propTypes.default.oneOf(["
|
|
64
|
+
variant: _propTypes.default.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2", "subtitle", "title"])
|
|
62
65
|
};
|
|
63
66
|
var _default = Text;
|
|
64
67
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-ui-kit",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.5",
|
|
4
4
|
"repository": {
|
|
5
|
-
"url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
5
|
+
"url": "git+https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@floating-ui/dom": "^1.2.1",
|