@zohodesk/components 1.0.0-temp-162 → 1.0.0-temp-163
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/Avatar/Avatar.js +3 -7
- package/es/DateTime/CalendarView.js +1 -4
- package/es/DateTime/DateTime.module.css +4 -4
- package/es/DateTime/DateTimePopupHeader.js +7 -4
- package/es/DateTime/DaysRow.js +2 -5
- package/es/DateTime/Time.js +2 -5
- package/es/DateTime/YearView.js +9 -9
- package/es/DateTime/YearView.module.css +4 -1
- package/es/Heading/Heading.js +7 -7
- package/es/Heading/Heading.module.css +1 -68
- package/es/Heading/props/defaultProps.js +1 -3
- package/es/Heading/props/propTypes.js +3 -4
- package/es/Label/Label.js +3 -6
- package/es/ListItem/ListItem.js +3 -7
- package/es/ListItem/ListItem.module.css +1 -0
- package/es/ListItem/ListItemWithAvatar.js +3 -7
- package/es/ListItem/ListItemWithCheckBox.js +3 -7
- package/es/ListItem/ListItemWithIcon.js +2 -6
- package/es/ListItem/ListItemWithRadio.js +3 -7
- package/es/Responsive/ResizeComponent.js +16 -4
- package/es/Tab/Tab.js +2 -4
- package/es/Tab/Tabs.js +21 -8
- package/es/Tag/Tag.js +3 -8
- package/es/index.js +1 -3
- package/lib/Avatar/Avatar.js +3 -7
- package/lib/DateTime/CalendarView.js +1 -4
- package/lib/DateTime/DateTime.module.css +4 -4
- package/lib/DateTime/DateTimePopupHeader.js +7 -4
- package/lib/DateTime/DaysRow.js +2 -5
- package/lib/DateTime/Time.js +2 -5
- package/lib/DateTime/YearView.js +9 -9
- package/lib/DateTime/YearView.module.css +4 -1
- package/lib/Heading/Heading.js +8 -7
- package/lib/Heading/Heading.module.css +1 -68
- package/lib/Heading/props/defaultProps.js +1 -3
- package/lib/Heading/props/propTypes.js +3 -4
- package/lib/Label/Label.js +2 -5
- package/lib/ListItem/ListItem.js +3 -7
- package/lib/ListItem/ListItem.module.css +1 -0
- package/lib/ListItem/ListItemWithAvatar.js +3 -7
- package/lib/ListItem/ListItemWithCheckBox.js +3 -7
- package/lib/ListItem/ListItemWithIcon.js +2 -6
- package/lib/ListItem/ListItemWithRadio.js +3 -7
- package/lib/Responsive/ResizeComponent.js +15 -3
- package/lib/Tab/Tab.js +2 -4
- package/lib/Tab/Tabs.js +29 -18
- package/lib/Tag/Tag.js +3 -8
- package/lib/index.js +1 -17
- package/package.json +1 -1
- package/es/Text/Text.js +0 -27
- package/es/Text/Text.module.css +0 -72
- package/es/Text/props/defaultProps.js +0 -7
- package/es/Text/props/propTypes.js +0 -12
- package/es/Typography/Typography.js +0 -28
- package/es/Typography/Typography.module.css +0 -72
- package/es/Typography/props/defaultProps.js +0 -8
- package/es/Typography/props/propTypes.js +0 -12
- package/lib/Text/Text.js +0 -58
- package/lib/Text/Text.module.css +0 -72
- package/lib/Text/props/defaultProps.js +0 -14
- package/lib/Text/props/propTypes.js +0 -20
- package/lib/Typography/Typography.js +0 -59
- package/lib/Typography/Typography.module.css +0 -72
- package/lib/Typography/props/defaultProps.js +0 -15
- package/lib/Typography/props/propTypes.js +0 -20
package/lib/Tab/Tabs.js
CHANGED
|
@@ -51,7 +51,19 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
tabKeys: []
|
|
52
52
|
};
|
|
53
53
|
_Common.bind.apply(_assertThisInitialized(_this), ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim']);
|
|
54
|
-
|
|
54
|
+
var debounce = function debounce(cb) {
|
|
55
|
+
var timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
56
|
+
var timeoutId = null;
|
|
57
|
+
return function () {
|
|
58
|
+
if (timeoutId) {
|
|
59
|
+
clearTimeout(timeoutId);
|
|
60
|
+
}
|
|
61
|
+
timeoutId = setTimeout(function () {
|
|
62
|
+
cb();
|
|
63
|
+
}, timer);
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
_this.tabsObserver = new _ResizeObserver["default"](debounce(_this.onResize));
|
|
55
67
|
_this.tabObserver = {};
|
|
56
68
|
return _this;
|
|
57
69
|
}
|
|
@@ -243,16 +255,15 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
243
255
|
}, {
|
|
244
256
|
key: "onResize",
|
|
245
257
|
value: function onResize(timer) {
|
|
246
|
-
var _this6 = this;
|
|
247
258
|
var isResponsive = this.props.isResponsive;
|
|
248
259
|
if (this.tabsEle && isResponsive) {
|
|
249
|
-
if (!timer) {
|
|
250
|
-
|
|
251
|
-
} else {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
260
|
+
// if (!timer) {
|
|
261
|
+
// this.onSizeChange();
|
|
262
|
+
// } else {
|
|
263
|
+
// setTimeout(() => {
|
|
264
|
+
this.onSizeChange();
|
|
265
|
+
// }, timer);
|
|
266
|
+
// }
|
|
256
267
|
}
|
|
257
268
|
}
|
|
258
269
|
}, {
|
|
@@ -265,14 +276,14 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
265
276
|
}, {
|
|
266
277
|
key: "getTabDimensions",
|
|
267
278
|
value: function getTabDimensions() {
|
|
268
|
-
var
|
|
279
|
+
var _this6 = this;
|
|
269
280
|
var _this$props4 = this.props,
|
|
270
281
|
children = _this$props4.children,
|
|
271
282
|
align = _this$props4.align,
|
|
272
283
|
childType = _this$props4.childType;
|
|
273
284
|
var tabDimensions = {};
|
|
274
285
|
_react["default"].Children.forEach(children, function (child) {
|
|
275
|
-
return /*#__PURE__*/_react["default"].isValidElement(child) && child.type === childType &&
|
|
286
|
+
return /*#__PURE__*/_react["default"].isValidElement(child) && child.type === childType && _this6[child.props.id] && Object.assign(tabDimensions, _defineProperty({}, child.props.id, _this6[child.props.id] && (0, _Common.getTotalDimension)(_this6[child.props.id], align)));
|
|
276
287
|
});
|
|
277
288
|
return tabDimensions;
|
|
278
289
|
}
|
|
@@ -406,7 +417,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
406
417
|
}, {
|
|
407
418
|
key: "renderTabs",
|
|
408
419
|
value: function renderTabs(mainTabs, moreTabs, isVirtual) {
|
|
409
|
-
var
|
|
420
|
+
var _this7 = this;
|
|
410
421
|
var _this$props8 = this.props,
|
|
411
422
|
selectedTab = _this$props8.selectedTab,
|
|
412
423
|
moreButtonClass = _this$props8.moreButtonClass,
|
|
@@ -454,9 +465,9 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
454
465
|
}
|
|
455
466
|
return /*#__PURE__*/_react["default"].isValidElement(child) && /*#__PURE__*/_react["default"].createElement(MainTab, _extends({}, child.props, {
|
|
456
467
|
key: child.props.id,
|
|
457
|
-
getTabRef:
|
|
468
|
+
getTabRef: _this7.getTabRef,
|
|
458
469
|
onSelect: onSelect,
|
|
459
|
-
recalculateDimension:
|
|
470
|
+
recalculateDimension: _this7.recalculateDimension,
|
|
460
471
|
isActive: child.props.id === selectedTab,
|
|
461
472
|
type: type,
|
|
462
473
|
isAnimate: isAnimate,
|
|
@@ -500,13 +511,13 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
500
511
|
}, DropBoxProps, {
|
|
501
512
|
isResponsivePadding: true,
|
|
502
513
|
needFocusScope: true,
|
|
503
|
-
onClose:
|
|
504
|
-
}), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(
|
|
514
|
+
onClose: _this7.togglePopup
|
|
515
|
+
}), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(_this7.props), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
505
516
|
flexible: true,
|
|
506
517
|
shrink: true,
|
|
507
518
|
scroll: "vertical",
|
|
508
519
|
className: "".concat(tabletMode ? '' : _TabsModule["default"].menuBox, " ").concat(moreBoxClass),
|
|
509
|
-
onScroll:
|
|
520
|
+
onScroll: _this7.onScroll
|
|
510
521
|
}, _react["default"].Children.map(moreTabs, function (child) {
|
|
511
522
|
if (!child) {
|
|
512
523
|
return null;
|
|
@@ -523,7 +534,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
523
534
|
return /*#__PURE__*/_react["default"].isValidElement(child) && /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
|
|
524
535
|
key: id,
|
|
525
536
|
value: value,
|
|
526
|
-
onClick:
|
|
537
|
+
onClick: _this7.moreTabSelect,
|
|
527
538
|
id: id,
|
|
528
539
|
title: title || text,
|
|
529
540
|
isLink: isLink,
|
package/lib/Tag/Tag.js
CHANGED
|
@@ -12,7 +12,6 @@ var _icons = require("@zohodesk/icons");
|
|
|
12
12
|
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
13
13
|
var _Layout = require("../Layout");
|
|
14
14
|
var _Button = _interopRequireDefault(require("../semantic/Button/Button"));
|
|
15
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
16
15
|
var _IdProvider = require("../Provider/IdProvider");
|
|
17
16
|
var _TagModule = _interopRequireDefault(require("./Tag.module.css"));
|
|
18
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -148,14 +147,10 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
|
|
|
148
147
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
149
148
|
name: iconName,
|
|
150
149
|
size: iconSize
|
|
151
|
-
})) : null, /*#__PURE__*/_react["default"].createElement(
|
|
150
|
+
})) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
151
|
className: "".concat(_TagModule["default"].text, " ").concat(textSizes),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
customProps: {
|
|
157
|
-
id: getAriaId
|
|
158
|
-
}
|
|
152
|
+
"aria-hidden": true,
|
|
153
|
+
id: getAriaId
|
|
159
154
|
}, text), onRemove && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
160
155
|
customClass: "".concat(_TagModule["default"].close, " ").concat(active ? _TagModule["default"]["active".concat(closePalette, "Close")] : '', "\n ").concat(rounded ? _TagModule["default"].lgRadiusClose : _TagModule["default"].smRadiusClose, " ").concat(isDarkPalette ? _TagModule["default"].darkTagClose : '', "\n ").concat(customTagClose, " ").concat(_TagModule["default"]["close".concat(closePalette)]),
|
|
161
156
|
dataId: "".concat(dataId, "_RemoveTag"),
|
package/lib/index.js
CHANGED
|
@@ -30,9 +30,7 @@ var _exportNames = {
|
|
|
30
30
|
TextBox: true,
|
|
31
31
|
TextBoxIcon: true,
|
|
32
32
|
Tooltip: true,
|
|
33
|
-
utils: true
|
|
34
|
-
Text: true,
|
|
35
|
-
Typography: true
|
|
33
|
+
utils: true
|
|
36
34
|
};
|
|
37
35
|
Object.defineProperty(exports, "Animation", {
|
|
38
36
|
enumerable: true,
|
|
@@ -150,12 +148,6 @@ Object.defineProperty(exports, "Tag", {
|
|
|
150
148
|
return _Tag["default"];
|
|
151
149
|
}
|
|
152
150
|
});
|
|
153
|
-
Object.defineProperty(exports, "Text", {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
get: function get() {
|
|
156
|
-
return _Text["default"];
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
151
|
Object.defineProperty(exports, "TextBox", {
|
|
160
152
|
enumerable: true,
|
|
161
153
|
get: function get() {
|
|
@@ -180,12 +172,6 @@ Object.defineProperty(exports, "Tooltip", {
|
|
|
180
172
|
return _Tooltip["default"];
|
|
181
173
|
}
|
|
182
174
|
});
|
|
183
|
-
Object.defineProperty(exports, "Typography", {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
get: function get() {
|
|
186
|
-
return _Typography["default"];
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
175
|
exports.utils = void 0;
|
|
190
176
|
var _Accordion = require("./Accordion");
|
|
191
177
|
Object.keys(_Accordion).forEach(function (key) {
|
|
@@ -360,8 +346,6 @@ Object.keys(_semantic).forEach(function (key) {
|
|
|
360
346
|
}
|
|
361
347
|
});
|
|
362
348
|
});
|
|
363
|
-
var _Text = _interopRequireDefault(require("./Text/Text"));
|
|
364
|
-
var _Typography = _interopRequireDefault(require("./Typography/Typography"));
|
|
365
349
|
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); }
|
|
366
350
|
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; }
|
|
367
351
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
package/package.json
CHANGED
package/es/Text/Text.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { defaultProps } from './props/defaultProps';
|
|
3
|
-
import { propTypes } from './props/propTypes';
|
|
4
|
-
import style from './Text.module.css';
|
|
5
|
-
export default class Text extends React.Component {
|
|
6
|
-
render() {
|
|
7
|
-
let {
|
|
8
|
-
tagName,
|
|
9
|
-
className,
|
|
10
|
-
dataTitle,
|
|
11
|
-
dataId,
|
|
12
|
-
a11y,
|
|
13
|
-
children,
|
|
14
|
-
customProps,
|
|
15
|
-
size
|
|
16
|
-
} = this.props;
|
|
17
|
-
return /*#__PURE__*/React.createElement(tagName, {
|
|
18
|
-
className: `${style[`size${size}`]} ${className}`,
|
|
19
|
-
'data-title': dataTitle,
|
|
20
|
-
'data-id': dataId,
|
|
21
|
-
...customProps,
|
|
22
|
-
...a11y
|
|
23
|
-
}, children);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
Text.propTypes = propTypes;
|
|
27
|
-
Text.defaultProps = defaultProps;
|
package/es/Text/Text.module.css
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
.reset {
|
|
2
|
-
font-weight: initial;
|
|
3
|
-
margin: initial;
|
|
4
|
-
padding: initial;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.size8{
|
|
8
|
-
font-size: 8px;
|
|
9
|
-
}
|
|
10
|
-
.size9{
|
|
11
|
-
font-size: 9px;
|
|
12
|
-
}
|
|
13
|
-
.size10{
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
.size11{
|
|
17
|
-
font-size: 11px;
|
|
18
|
-
}
|
|
19
|
-
.size12{
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
}
|
|
22
|
-
.size13{
|
|
23
|
-
font-size: 13px;
|
|
24
|
-
}
|
|
25
|
-
.size14{
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
}
|
|
28
|
-
.size15{
|
|
29
|
-
font-size: 15px;
|
|
30
|
-
}
|
|
31
|
-
.size16{
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
}
|
|
34
|
-
.size17{
|
|
35
|
-
font-size: 17px;
|
|
36
|
-
}
|
|
37
|
-
.size18{
|
|
38
|
-
font-size: 18px;
|
|
39
|
-
}
|
|
40
|
-
.size19{
|
|
41
|
-
font-size: 19px;
|
|
42
|
-
}
|
|
43
|
-
.size20{
|
|
44
|
-
font-size: 20px;
|
|
45
|
-
}
|
|
46
|
-
.size21{
|
|
47
|
-
font-size: 21px;
|
|
48
|
-
}
|
|
49
|
-
.size22{
|
|
50
|
-
font-size: 22px;
|
|
51
|
-
}
|
|
52
|
-
.size23{
|
|
53
|
-
font-size: 23px;
|
|
54
|
-
}
|
|
55
|
-
.size24{
|
|
56
|
-
font-size: 24px;
|
|
57
|
-
}
|
|
58
|
-
.size25{
|
|
59
|
-
font-size: 25px;
|
|
60
|
-
}
|
|
61
|
-
.size26{
|
|
62
|
-
font-size: 26px;
|
|
63
|
-
}
|
|
64
|
-
.size30{
|
|
65
|
-
font-size: 30px;
|
|
66
|
-
}
|
|
67
|
-
.size50{
|
|
68
|
-
font-size: 50px;
|
|
69
|
-
}
|
|
70
|
-
.sizeinherit{
|
|
71
|
-
font-size: inherit;
|
|
72
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
tagName: PropTypes.string,
|
|
4
|
-
className: PropTypes.string,
|
|
5
|
-
dataId: PropTypes.string,
|
|
6
|
-
dataTitle: PropTypes.string,
|
|
7
|
-
title: PropTypes.string,
|
|
8
|
-
a11y: PropTypes.object,
|
|
9
|
-
children: PropTypes.node,
|
|
10
|
-
customProps: PropTypes.object,
|
|
11
|
-
size: PropTypes.oneOf(['8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30', '50', 'inherit'])
|
|
12
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { defaultProps } from './props/defaultProps';
|
|
3
|
-
import { propTypes } from './props/propTypes';
|
|
4
|
-
import style from './Typography.module.css';
|
|
5
|
-
export default class Typography extends React.Component {
|
|
6
|
-
render() {
|
|
7
|
-
let {
|
|
8
|
-
tagName,
|
|
9
|
-
className,
|
|
10
|
-
dataTitle,
|
|
11
|
-
dataId,
|
|
12
|
-
a11y,
|
|
13
|
-
children,
|
|
14
|
-
customProps,
|
|
15
|
-
size,
|
|
16
|
-
needReset
|
|
17
|
-
} = this.props;
|
|
18
|
-
return /*#__PURE__*/React.createElement(tagName, {
|
|
19
|
-
className: `${needReset ? style.reset : ''} ${style[`size${size}`]} ${className}`,
|
|
20
|
-
'data-title': dataTitle,
|
|
21
|
-
'data-id': dataId,
|
|
22
|
-
...customProps,
|
|
23
|
-
...a11y
|
|
24
|
-
}, children);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
Typography.propTypes = propTypes;
|
|
28
|
-
Typography.defaultProps = defaultProps;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
.reset {
|
|
2
|
-
font-weight: initial;
|
|
3
|
-
margin: initial;
|
|
4
|
-
padding: initial;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.size8{
|
|
8
|
-
font-size: 8px;
|
|
9
|
-
}
|
|
10
|
-
.size9{
|
|
11
|
-
font-size: 9px;
|
|
12
|
-
}
|
|
13
|
-
.size10{
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
.size11{
|
|
17
|
-
font-size: 11px;
|
|
18
|
-
}
|
|
19
|
-
.size12{
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
}
|
|
22
|
-
.size13{
|
|
23
|
-
font-size: 13px;
|
|
24
|
-
}
|
|
25
|
-
.size14{
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
}
|
|
28
|
-
.size15{
|
|
29
|
-
font-size: 15px;
|
|
30
|
-
}
|
|
31
|
-
.size16{
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
}
|
|
34
|
-
.size17{
|
|
35
|
-
font-size: 17px;
|
|
36
|
-
}
|
|
37
|
-
.size18{
|
|
38
|
-
font-size: 18px;
|
|
39
|
-
}
|
|
40
|
-
.size19{
|
|
41
|
-
font-size: 19px;
|
|
42
|
-
}
|
|
43
|
-
.size20{
|
|
44
|
-
font-size: 20px;
|
|
45
|
-
}
|
|
46
|
-
.size21{
|
|
47
|
-
font-size: 21px;
|
|
48
|
-
}
|
|
49
|
-
.size22{
|
|
50
|
-
font-size: 22px;
|
|
51
|
-
}
|
|
52
|
-
.size23{
|
|
53
|
-
font-size: 23px;
|
|
54
|
-
}
|
|
55
|
-
.size24{
|
|
56
|
-
font-size: 24px;
|
|
57
|
-
}
|
|
58
|
-
.size25{
|
|
59
|
-
font-size: 25px;
|
|
60
|
-
}
|
|
61
|
-
.size26{
|
|
62
|
-
font-size: 26px;
|
|
63
|
-
}
|
|
64
|
-
.size30{
|
|
65
|
-
font-size: 30px;
|
|
66
|
-
}
|
|
67
|
-
.size50{
|
|
68
|
-
font-size: 50px;
|
|
69
|
-
}
|
|
70
|
-
.sizeinherit{
|
|
71
|
-
font-size: inherit;
|
|
72
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
tagName: PropTypes.string,
|
|
4
|
-
className: PropTypes.string,
|
|
5
|
-
dataId: PropTypes.string,
|
|
6
|
-
dataTitle: PropTypes.string,
|
|
7
|
-
a11y: PropTypes.object,
|
|
8
|
-
children: PropTypes.node,
|
|
9
|
-
customProps: PropTypes.object,
|
|
10
|
-
needReset: PropTypes.bool,
|
|
11
|
-
size: PropTypes.oneOf(['8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30', '50', 'inherit'])
|
|
12
|
-
};
|
package/lib/Text/Text.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _defaultProps = require("./props/defaultProps");
|
|
10
|
-
var _propTypes = require("./props/propTypes");
|
|
11
|
-
var _TextModule = _interopRequireDefault(require("./Text.module.css"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
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; }
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
-
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); }
|
|
21
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
24
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
-
var Text = /*#__PURE__*/function (_React$Component) {
|
|
29
|
-
_inherits(Text, _React$Component);
|
|
30
|
-
var _super = _createSuper(Text);
|
|
31
|
-
function Text() {
|
|
32
|
-
_classCallCheck(this, Text);
|
|
33
|
-
return _super.apply(this, arguments);
|
|
34
|
-
}
|
|
35
|
-
_createClass(Text, [{
|
|
36
|
-
key: "render",
|
|
37
|
-
value: function render() {
|
|
38
|
-
var _this$props = this.props,
|
|
39
|
-
tagName = _this$props.tagName,
|
|
40
|
-
className = _this$props.className,
|
|
41
|
-
dataTitle = _this$props.dataTitle,
|
|
42
|
-
dataId = _this$props.dataId,
|
|
43
|
-
a11y = _this$props.a11y,
|
|
44
|
-
children = _this$props.children,
|
|
45
|
-
customProps = _this$props.customProps,
|
|
46
|
-
size = _this$props.size;
|
|
47
|
-
return /*#__PURE__*/_react["default"].createElement(tagName, _objectSpread(_objectSpread({
|
|
48
|
-
className: "".concat(_TextModule["default"]["size".concat(size)], " ").concat(className),
|
|
49
|
-
'data-title': dataTitle,
|
|
50
|
-
'data-id': dataId
|
|
51
|
-
}, customProps), a11y), children);
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
return Text;
|
|
55
|
-
}(_react["default"].Component);
|
|
56
|
-
exports["default"] = Text;
|
|
57
|
-
Text.propTypes = _propTypes.propTypes;
|
|
58
|
-
Text.defaultProps = _defaultProps.defaultProps;
|
package/lib/Text/Text.module.css
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
.reset {
|
|
2
|
-
font-weight: initial;
|
|
3
|
-
margin: initial;
|
|
4
|
-
padding: initial;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.size8{
|
|
8
|
-
font-size: 8px;
|
|
9
|
-
}
|
|
10
|
-
.size9{
|
|
11
|
-
font-size: 9px;
|
|
12
|
-
}
|
|
13
|
-
.size10{
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
.size11{
|
|
17
|
-
font-size: 11px;
|
|
18
|
-
}
|
|
19
|
-
.size12{
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
}
|
|
22
|
-
.size13{
|
|
23
|
-
font-size: 13px;
|
|
24
|
-
}
|
|
25
|
-
.size14{
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
}
|
|
28
|
-
.size15{
|
|
29
|
-
font-size: 15px;
|
|
30
|
-
}
|
|
31
|
-
.size16{
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
}
|
|
34
|
-
.size17{
|
|
35
|
-
font-size: 17px;
|
|
36
|
-
}
|
|
37
|
-
.size18{
|
|
38
|
-
font-size: 18px;
|
|
39
|
-
}
|
|
40
|
-
.size19{
|
|
41
|
-
font-size: 19px;
|
|
42
|
-
}
|
|
43
|
-
.size20{
|
|
44
|
-
font-size: 20px;
|
|
45
|
-
}
|
|
46
|
-
.size21{
|
|
47
|
-
font-size: 21px;
|
|
48
|
-
}
|
|
49
|
-
.size22{
|
|
50
|
-
font-size: 22px;
|
|
51
|
-
}
|
|
52
|
-
.size23{
|
|
53
|
-
font-size: 23px;
|
|
54
|
-
}
|
|
55
|
-
.size24{
|
|
56
|
-
font-size: 24px;
|
|
57
|
-
}
|
|
58
|
-
.size25{
|
|
59
|
-
font-size: 25px;
|
|
60
|
-
}
|
|
61
|
-
.size26{
|
|
62
|
-
font-size: 26px;
|
|
63
|
-
}
|
|
64
|
-
.size30{
|
|
65
|
-
font-size: 30px;
|
|
66
|
-
}
|
|
67
|
-
.size50{
|
|
68
|
-
font-size: 50px;
|
|
69
|
-
}
|
|
70
|
-
.sizeinherit{
|
|
71
|
-
font-size: inherit;
|
|
72
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaultProps = void 0;
|
|
7
|
-
var defaultProps = {
|
|
8
|
-
tagName: 'div',
|
|
9
|
-
a11y: {},
|
|
10
|
-
className: '',
|
|
11
|
-
customProps: {},
|
|
12
|
-
size: 'inherit'
|
|
13
|
-
};
|
|
14
|
-
exports.defaultProps = defaultProps;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.propTypes = void 0;
|
|
7
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
var propTypes = {
|
|
10
|
-
tagName: _propTypes["default"].string,
|
|
11
|
-
className: _propTypes["default"].string,
|
|
12
|
-
dataId: _propTypes["default"].string,
|
|
13
|
-
dataTitle: _propTypes["default"].string,
|
|
14
|
-
title: _propTypes["default"].string,
|
|
15
|
-
a11y: _propTypes["default"].object,
|
|
16
|
-
children: _propTypes["default"].node,
|
|
17
|
-
customProps: _propTypes["default"].object,
|
|
18
|
-
size: _propTypes["default"].oneOf(['8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30', '50', 'inherit'])
|
|
19
|
-
};
|
|
20
|
-
exports.propTypes = propTypes;
|