@zohodesk/components 1.0.0-alpha-256 → 1.0.0-alpha-258
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/README.md +11 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +1 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +1 -1
- package/es/Accordion/Accordion.js +13 -8
- package/es/Accordion/AccordionItem.js +9 -7
- package/es/Accordion/props/defaultProps.js +6 -2
- package/es/Accordion/props/propTypes.js +3 -0
- package/es/Animation/Animation.js +9 -8
- package/es/AppContainer/AppContainer.js +11 -7
- package/es/AppContainer/props/defaultProps.js +2 -1
- package/es/AppContainer/props/propTypes.js +1 -0
- package/es/Avatar/Avatar.js +15 -11
- package/es/Avatar/props/defaultProps.js +2 -1
- package/es/Avatar/props/propTypes.js +1 -0
- package/es/AvatarTeam/AvatarTeam.js +11 -8
- package/es/AvatarTeam/props/defaultProps.js +1 -0
- package/es/AvatarTeam/props/propTypes.js +1 -0
- package/es/Button/Button.js +10 -7
- package/es/Button/props/defaultProps.js +1 -0
- package/es/Button/props/propTypes.js +1 -0
- package/es/Buttongroup/Buttongroup.js +21 -14
- package/es/Buttongroup/props/defaultProps.js +3 -1
- package/es/Buttongroup/props/propTypes.js +3 -1
- package/es/Card/Card.js +29 -18
- package/es/Card/props/defaultProps.js +12 -1
- package/es/CheckBox/CheckBox.js +10 -8
- package/es/CheckBox/props/propTypes.js +1 -0
- package/es/DateTime/DateWidget.js +17 -12
- package/es/DateTime/props/propTypes.js +3 -1
- package/es/DropBox/DropBox.js +13 -9
- package/es/DropBox/props/defaultProps.js +1 -0
- package/es/DropBox/props/propTypes.js +1 -0
- package/es/DropDown/DropDown.js +8 -6
- package/es/DropDown/DropDownHeading.js +13 -8
- package/es/DropDown/props/defaultProps.js +3 -1
- package/es/Heading/Heading.js +7 -6
- package/es/Label/Label.js +9 -6
- package/es/Label/props/defaultProps.js +2 -1
- package/es/Label/props/propTypes.js +1 -0
- package/es/Layout/Box.js +2 -1
- package/es/Layout/Container.js +2 -1
- package/es/Layout/props/defaultProps.js +4 -2
- package/es/Layout/props/propTypes.js +2 -0
- package/es/ListItem/ListContainer.js +9 -6
- package/es/ListItem/ListItem.js +11 -7
- package/es/ListItem/ListItemWithAvatar.js +10 -7
- package/es/ListItem/ListItemWithCheckBox.js +8 -6
- package/es/ListItem/ListItemWithIcon.js +11 -7
- package/es/ListItem/ListItemWithRadio.js +9 -6
- package/es/ListItem/props/defaultProps.js +12 -6
- package/es/ListItem/props/propTypes.js +6 -0
- package/es/Modal/Modal.js +9 -8
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +10 -7
- package/es/MultiSelect/AdvancedMultiSelect.js +14 -10
- package/es/MultiSelect/MultiSelect.js +10 -7
- package/es/MultiSelect/MultiSelectWithAvatar.js +13 -9
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +8 -4
- package/es/PopOver/PopOver.js +8 -8
- package/es/Radio/Radio.js +6 -6
- package/es/Ribbon/Ribbon.js +18 -14
- package/es/Ribbon/props/defaultProps.js +2 -1
- package/es/Ribbon/props/propTypes.js +2 -1
- package/es/RippleEffect/RippleEffect.js +7 -6
- package/es/Select/GroupSelect.js +13 -10
- package/es/Select/Select.js +15 -12
- package/es/Select/SelectWithAvatar.js +14 -10
- package/es/Select/SelectWithIcon.js +11 -8
- package/es/Select/props/defaultProps.js +4 -0
- package/es/Select/props/propTypes.js +8 -4
- package/es/Stencils/Stencils.js +9 -8
- package/es/Switch/Switch.js +10 -7
- package/es/Switch/props/defaultProps.js +2 -1
- package/es/Switch/props/propTypes.js +1 -0
- package/es/Tab/Tab.js +10 -7
- package/es/Tab/TabContent.js +4 -2
- package/es/Tab/TabContentWrapper.js +4 -2
- package/es/Tab/TabWrapper.js +4 -2
- package/es/Tab/Tabs.js +8 -4
- package/es/Tab/props/defaultProps.js +10 -5
- package/es/Tab/props/propTypes.js +10 -5
- package/es/Tag/Tag.js +9 -7
- package/es/Tag/props/defaultProps.js +2 -1
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +12 -9
- package/es/TextBox/props/defaultProps.js +2 -1
- package/es/TextBox/props/propTypes.js +2 -1
- package/es/TextBoxIcon/TextBoxIcon.js +10 -8
- package/es/TextBoxIcon/props/defaultProps.js +2 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -0
- package/es/Textarea/Textarea.js +12 -9
- package/es/Textarea/props/defaultProps.js +2 -1
- package/es/Textarea/props/propTypes.js +1 -0
- package/es/Tooltip/Tooltip.js +9 -8
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +5 -5
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -5
- package/es/deprecated/PortalLayer/PortalLayer.js +7 -6
- package/es/semantic/Button/Button.js +6 -6
- package/install.md +10 -0
- package/lib/Accordion/Accordion.js +16 -9
- package/lib/Accordion/AccordionItem.js +12 -8
- package/lib/Accordion/props/defaultProps.js +6 -2
- package/lib/Accordion/props/propTypes.js +3 -0
- package/lib/Animation/Animation.js +12 -9
- package/lib/AppContainer/AppContainer.js +14 -8
- package/lib/AppContainer/props/defaultProps.js +2 -1
- package/lib/AppContainer/props/propTypes.js +1 -0
- package/lib/Avatar/Avatar.js +19 -13
- package/lib/Avatar/props/defaultProps.js +2 -1
- package/lib/Avatar/props/propTypes.js +1 -0
- package/lib/AvatarTeam/AvatarTeam.js +14 -9
- package/lib/AvatarTeam/props/defaultProps.js +1 -0
- package/lib/AvatarTeam/props/propTypes.js +1 -0
- package/lib/Button/Button.js +13 -8
- package/lib/Button/props/defaultProps.js +1 -0
- package/lib/Button/props/propTypes.js +1 -0
- package/lib/Buttongroup/Buttongroup.js +26 -16
- package/lib/Buttongroup/props/defaultProps.js +3 -1
- package/lib/Buttongroup/props/propTypes.js +3 -1
- package/lib/Card/Card.js +30 -22
- package/lib/Card/props/defaultProps.js +16 -3
- package/lib/CheckBox/CheckBox.js +13 -9
- package/lib/CheckBox/props/propTypes.js +1 -0
- package/lib/DateTime/CalendarView.js +5 -2
- package/lib/DateTime/DateTime.js +5 -3
- package/lib/DateTime/DateTimePopupFooter.js +3 -1
- package/lib/DateTime/DateTimePopupHeader.js +3 -1
- package/lib/DateTime/DateWidget.js +19 -13
- package/lib/DateTime/DaysRow.js +3 -1
- package/lib/DateTime/Time.js +3 -1
- package/lib/DateTime/YearView.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/lib/DateTime/props/propTypes.js +3 -1
- package/lib/DateTime/validator.js +3 -3
- package/lib/DropBox/DropBox.js +16 -10
- package/lib/DropBox/props/defaultProps.js +1 -0
- package/lib/DropBox/props/propTypes.js +1 -0
- package/lib/DropDown/DropDown.js +12 -8
- package/lib/DropDown/DropDownHeading.js +16 -9
- package/lib/DropDown/DropDownItem.js +3 -1
- package/lib/DropDown/DropDownSearch.js +5 -2
- package/lib/DropDown/DropDownSeparator.js +3 -1
- package/lib/DropDown/props/defaultProps.js +3 -1
- package/lib/DropDown/props/propTypes.js +4 -1
- package/lib/Heading/Heading.js +11 -8
- package/lib/Label/Label.js +12 -7
- package/lib/Label/props/defaultProps.js +2 -1
- package/lib/Label/props/propTypes.js +1 -0
- package/lib/Layout/Box.js +2 -1
- package/lib/Layout/Container.js +2 -1
- package/lib/Layout/props/defaultProps.js +4 -2
- package/lib/Layout/props/propTypes.js +2 -0
- package/lib/ListItem/ListContainer.js +9 -8
- package/lib/ListItem/ListItem.js +14 -8
- package/lib/ListItem/ListItemWithAvatar.js +13 -8
- package/lib/ListItem/ListItemWithCheckBox.js +11 -7
- package/lib/ListItem/ListItemWithIcon.js +14 -8
- package/lib/ListItem/ListItemWithRadio.js +12 -7
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/ListItem/props/propTypes.js +10 -2
- package/lib/Modal/Modal.js +12 -9
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +15 -11
- package/lib/MultiSelect/AdvancedMultiSelect.js +17 -12
- package/lib/MultiSelect/EmptyState.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +15 -10
- package/lib/MultiSelect/MultiSelectHeader.js +3 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +15 -10
- package/lib/MultiSelect/SelectedOptions.js +5 -2
- package/lib/MultiSelect/Suggestions.js +4 -2
- package/lib/MultiSelect/props/defaultProps.js +8 -4
- package/lib/MultiSelect/props/propTypes.js +8 -4
- package/lib/PopOver/PopOver.js +11 -9
- package/lib/Popup/Popup.js +4 -2
- package/lib/Popup/__tests__/Popup.spec.js +3 -1
- package/lib/Provider/LibraryContext.js +5 -3
- package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
- package/lib/Radio/Radio.js +9 -7
- package/lib/Responsive/CustomResponsive.js +6 -4
- package/lib/Responsive/RefWrapper.js +4 -2
- package/lib/Responsive/ResizeComponent.js +9 -4
- package/lib/Responsive/ResizeObserver.js +4 -1
- package/lib/Responsive/Responsive.js +6 -4
- package/lib/Responsive/sizeObservers.js +4 -2
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +3 -1
- package/lib/Ribbon/Ribbon.js +21 -15
- package/lib/Ribbon/props/defaultProps.js +2 -1
- package/lib/Ribbon/props/propTypes.js +2 -1
- package/lib/RippleEffect/RippleEffect.js +7 -6
- package/lib/Select/GroupSelect.js +18 -15
- package/lib/Select/Select.js +18 -15
- package/lib/Select/SelectWithAvatar.js +16 -11
- package/lib/Select/SelectWithIcon.js +14 -9
- package/lib/Select/__tests__/Select.spec.js +2 -2
- package/lib/Select/props/defaultProps.js +8 -2
- package/lib/Select/props/propTypes.js +8 -4
- package/lib/Stencils/Stencils.js +12 -9
- package/lib/Switch/Switch.js +13 -8
- package/lib/Switch/props/defaultProps.js +2 -1
- package/lib/Switch/props/propTypes.js +1 -0
- package/lib/Tab/Tab.js +10 -7
- package/lib/Tab/TabContent.js +4 -2
- package/lib/Tab/TabContentWrapper.js +4 -2
- package/lib/Tab/TabWrapper.js +6 -4
- package/lib/Tab/Tabs.js +12 -6
- package/lib/Tab/props/defaultProps.js +10 -5
- package/lib/Tab/props/propTypes.js +10 -5
- package/lib/Tag/Tag.js +12 -8
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +15 -10
- package/lib/TextBox/props/defaultProps.js +2 -1
- package/lib/TextBox/props/propTypes.js +5 -2
- package/lib/TextBoxIcon/TextBoxIcon.js +15 -10
- package/lib/TextBoxIcon/props/defaultProps.js +2 -1
- package/lib/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/Textarea/Textarea.js +15 -10
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +1 -0
- package/lib/Tooltip/Tooltip.js +12 -9
- package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +8 -6
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +10 -7
- package/lib/deprecated/PortalLayer/PortalLayer.js +10 -7
- package/lib/semantic/Button/Button.js +9 -7
- package/lib/utils/constructFullName.js +2 -2
- package/lib/utils/dropDownUtils.js +5 -3
- package/package.json +11 -6
|
@@ -12,8 +12,10 @@ var _VelocityAnimation = _interopRequireDefault(require("../VelocityAnimation/Ve
|
|
|
12
12
|
var _VelocityAnimationGroup = _interopRequireDefault(require("../VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
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, descriptor.key, descriptor); } }
|
|
15
|
+
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); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
17
19
|
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); }
|
|
18
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
21
|
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); }; }
|
|
@@ -49,6 +51,7 @@ var AccordionItem = /*#__PURE__*/function (_React$Component) {
|
|
|
49
51
|
className = _this$props2.className,
|
|
50
52
|
children = _this$props2.children,
|
|
51
53
|
dataId = _this$props2.dataId,
|
|
54
|
+
dataSelectorId = _this$props2.dataSelectorId,
|
|
52
55
|
unMount = _this$props2.unMount,
|
|
53
56
|
unMountItem = _this$props2.unMountItem,
|
|
54
57
|
a11y = _this$props2.a11y,
|
|
@@ -58,7 +61,8 @@ var AccordionItem = /*#__PURE__*/function (_React$Component) {
|
|
|
58
61
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
62
|
className: className ? className : '',
|
|
60
63
|
"data-id": dataId,
|
|
61
|
-
role: role
|
|
64
|
+
role: role,
|
|
65
|
+
"data-selector-id": dataSelectorId
|
|
62
66
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
67
|
className: innerClass ? innerClass : '',
|
|
64
68
|
onClick: selectMenu.bind(this, id)
|
|
@@ -76,9 +80,9 @@ var AccordionItem = /*#__PURE__*/function (_React$Component) {
|
|
|
76
80
|
exports["default"] = AccordionItem;
|
|
77
81
|
AccordionItem.propTypes = _propTypes.AccordionItem_propTypes;
|
|
78
82
|
AccordionItem.defaultProps = _defaultProps.AccordionItem_defaultProps;
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
83
|
+
// if (__DOCS__) {
|
|
84
|
+
// AccordionItem.docs = {
|
|
85
|
+
// componentGroup: 'Animation',
|
|
86
|
+
// folderName: 'Style Guide'
|
|
87
|
+
// };
|
|
88
|
+
// }
|
|
@@ -7,10 +7,14 @@ exports.Accordion_defaultProps = exports.AccordionItem_defaultProps = void 0;
|
|
|
7
7
|
var Accordion_defaultProps = {
|
|
8
8
|
unMount: true,
|
|
9
9
|
disableInternalState: false,
|
|
10
|
-
a11y: {}
|
|
10
|
+
a11y: {},
|
|
11
|
+
dataId: 'Accordion',
|
|
12
|
+
dataSelectorId: 'accordion'
|
|
11
13
|
};
|
|
12
14
|
exports.Accordion_defaultProps = Accordion_defaultProps;
|
|
13
15
|
var AccordionItem_defaultProps = {
|
|
14
|
-
a11y: {}
|
|
16
|
+
a11y: {},
|
|
17
|
+
dataId: 'AccordionItem',
|
|
18
|
+
dataSelectorId: 'accordionItem'
|
|
15
19
|
};
|
|
16
20
|
exports.AccordionItem_defaultProps = AccordionItem_defaultProps;
|
|
@@ -9,6 +9,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
9
9
|
var Accordion_propTypes = {
|
|
10
10
|
children: _propTypes["default"].node,
|
|
11
11
|
className: _propTypes["default"].string,
|
|
12
|
+
dataId: _propTypes["default"].string,
|
|
13
|
+
dataSelectorId: _propTypes["default"].string,
|
|
12
14
|
disableInternalState: _propTypes["default"].bool,
|
|
13
15
|
height: _propTypes["default"].string,
|
|
14
16
|
onSelect: _propTypes["default"].func,
|
|
@@ -25,6 +27,7 @@ var AccordionItem_propTypes = {
|
|
|
25
27
|
children: _propTypes["default"].node,
|
|
26
28
|
className: _propTypes["default"].string,
|
|
27
29
|
dataId: _propTypes["default"].string,
|
|
30
|
+
dataSelectorId: _propTypes["default"].string,
|
|
28
31
|
equalityCheck: _propTypes["default"].func,
|
|
29
32
|
id: _propTypes["default"].string,
|
|
30
33
|
selectMenu: _propTypes["default"].func,
|
|
@@ -12,8 +12,10 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
12
12
|
var _transitionModule = _interopRequireDefault(require("../common/transition.module.css"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
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, descriptor.key, descriptor); } }
|
|
15
|
+
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); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
17
19
|
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); }
|
|
18
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
21
|
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); }; }
|
|
@@ -151,11 +153,12 @@ var Animation = /*#__PURE__*/function (_React$Component) {
|
|
|
151
153
|
exports["default"] = Animation;
|
|
152
154
|
Animation.propTypes = _propTypes.propTypes;
|
|
153
155
|
Animation.defaultProps = _defaultProps.defaultProps;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
156
|
+
|
|
157
|
+
// if (__DOCS__) {
|
|
158
|
+
// Animation.docs = {
|
|
159
|
+
// componentGroup: 'Animation',
|
|
160
|
+
// folderName: 'Style Guide',
|
|
161
|
+
// external: true,
|
|
162
|
+
// description: ' '
|
|
163
|
+
// };
|
|
164
|
+
// }
|
|
@@ -24,8 +24,10 @@ var _Config = require("../Provider/Config");
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
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); }
|
|
26
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
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, descriptor.key, descriptor); } }
|
|
27
|
+
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); } }
|
|
28
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
29
31
|
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); }
|
|
30
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
33
|
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); }; }
|
|
@@ -117,6 +119,7 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
117
119
|
children = _this$props.children,
|
|
118
120
|
tagName = _this$props.tagName,
|
|
119
121
|
dataId = _this$props.dataId,
|
|
122
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
120
123
|
tooltipClass = _this$props.tooltipClass,
|
|
121
124
|
tooltipParentClass = _this$props.tooltipParentClass,
|
|
122
125
|
customProps = _this$props.customProps;
|
|
@@ -131,13 +134,15 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
131
134
|
//onMouseOver={this.handleOver}
|
|
132
135
|
,
|
|
133
136
|
dataId: dataId,
|
|
137
|
+
dataSelectorId: dataSelectorId,
|
|
134
138
|
tagName: tagName,
|
|
135
139
|
eleRef: this.getContainerRef
|
|
136
140
|
}, ContainerProps, ExtraProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
137
141
|
flexible: true
|
|
138
142
|
}, children)), /*#__PURE__*/_react["default"].createElement("div", _extends({}, ExtraProps, {
|
|
139
143
|
className: "".concat(_AppContainerModule["default"].container, " ").concat(_AppContainerModule["default"].tooltip, " ").concat(tooltipParentClass),
|
|
140
|
-
"data-id": "".concat(dataId, "_tooltip")
|
|
144
|
+
"data-id": "".concat(dataId, "_tooltip"),
|
|
145
|
+
"data-selector-id": "".concat(dataSelectorId, "_tooltip")
|
|
141
146
|
}), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], _extends({
|
|
142
147
|
ref: this.setTooltipRef,
|
|
143
148
|
customClass: tooltipClass
|
|
@@ -149,9 +154,10 @@ var AppContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
149
154
|
exports["default"] = AppContainer;
|
|
150
155
|
AppContainer.propTypes = _propTypes.propTypes;
|
|
151
156
|
AppContainer.defaultProps = _defaultProps.defaultProps;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
157
|
+
|
|
158
|
+
// if (__DOCS__) {
|
|
159
|
+
// AppContainer.docs = {
|
|
160
|
+
// componentGroup: 'Template',
|
|
161
|
+
// folderName: 'Style Guide'
|
|
162
|
+
// };
|
|
163
|
+
// }
|
|
@@ -9,6 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
9
9
|
var propTypes = {
|
|
10
10
|
children: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].arrayOf(_propTypes["default"].element)]),
|
|
11
11
|
dataId: _propTypes["default"].string,
|
|
12
|
+
dataSelectorId: _propTypes["default"].string,
|
|
12
13
|
eleRef: _propTypes["default"].func,
|
|
13
14
|
tagName: _propTypes["default"].string,
|
|
14
15
|
className: _propTypes["default"].string,
|
package/lib/Avatar/Avatar.js
CHANGED
|
@@ -18,10 +18,12 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
18
18
|
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); }
|
|
19
19
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
20
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
21
|
+
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; }
|
|
22
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
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, descriptor.key, descriptor); } }
|
|
23
|
+
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); } }
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
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); }
|
|
25
27
|
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); }
|
|
26
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
29
|
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); }; }
|
|
@@ -150,6 +152,7 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
150
152
|
customClass = _this$props2.customClass,
|
|
151
153
|
alternateSrc = _this$props2.alternateSrc,
|
|
152
154
|
isAnimate = _this$props2.isAnimate,
|
|
155
|
+
dataSelectorId = _this$props2.dataSelectorId,
|
|
153
156
|
customProps = _this$props2.customProps;
|
|
154
157
|
var _customProps$AvatarPr = customProps.AvatarProps,
|
|
155
158
|
AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
|
|
@@ -158,23 +161,26 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
158
161
|
initial = initial || this.getInitialByFullName(name);
|
|
159
162
|
var isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
160
163
|
var isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
161
|
-
var border = borderOnHover || onClick;
|
|
162
|
-
var borderStyle = (!src || src && isInvalidImageList || !isValidImageList) && needBorder ? "".concat(_AvatarModule["default"].border, " ").concat(borderOnActive ? _AvatarModule["default"].borderOnActive : border ? _AvatarModule["default"].borderOnHover : '', " ") : '';
|
|
163
164
|
var showAvatar = src && !isInvalidImageList;
|
|
164
|
-
var showInitial = !showAvatar || showAvatar &&
|
|
165
|
+
var showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
165
166
|
var showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
167
|
+
var border = borderOnHover || onClick;
|
|
168
|
+
var borderStyle = (!src || !showAvatar || showInitial) && needBorder ? "".concat(_AvatarModule["default"].border, " ").concat(borderOnActive ? _AvatarModule["default"].borderOnActive : border ? _AvatarModule["default"].borderOnHover : '', " ") : '';
|
|
166
169
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
167
170
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
168
171
|
className: "".concat(_AvatarModule["default"].avatar, " ").concat(_AvatarModule["default"][size], " ").concat((0, _AvatarSize["default"])(size), " ").concat(_AvatarModule["default"][shapeStyle], " ").concat(_AvatarModule["default"][palette], " ").concat(textStyle, " ").concat(borderStyle, " ").concat(customClass ? customClass : ''),
|
|
169
172
|
"data-title": needTitle ? title ? title : name : null,
|
|
170
173
|
"data-id": dataId,
|
|
171
|
-
onClick: onClick
|
|
174
|
+
onClick: onClick,
|
|
175
|
+
"data-selector-id": dataSelectorId
|
|
172
176
|
}, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
177
|
className: "".concat(_AvatarModule["default"].initial),
|
|
174
|
-
"data-id": "".concat(dataId, "_AvatarInitial")
|
|
178
|
+
"data-id": "".concat(dataId, "_AvatarInitial"),
|
|
179
|
+
"data-selector-id": "".concat(dataSelectorId, "_AvatarInitial")
|
|
175
180
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
176
181
|
className: "".concat(_AvatarModule["default"].image, " ").concat(isAnimate ? _AvatarModule["default"].animate : ''),
|
|
177
182
|
"data-id": "".concat(dataId, "_AvatarImg"),
|
|
183
|
+
"data-selector-id": "".concat(dataSelectorId, "_AvatarImg"),
|
|
178
184
|
name: name,
|
|
179
185
|
onError: this.putInvalidImageURLJSON,
|
|
180
186
|
onLoad: this.putValidImageURLJSON,
|
|
@@ -192,9 +198,9 @@ Avatar.defaultProps = _defaultProps.defaultProps;
|
|
|
192
198
|
Avatar.propTypes = _propTypes.propTypes;
|
|
193
199
|
Avatar.invalidImageURLs = [];
|
|
194
200
|
Avatar.validImageURLs = [];
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
+
// if (__DOCS__) {
|
|
202
|
+
// Avatar.docs = {
|
|
203
|
+
// componentGroup: 'Avatar Group',
|
|
204
|
+
// folderName: 'Style Guide'
|
|
205
|
+
// };
|
|
206
|
+
// }
|
|
@@ -8,6 +8,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
var propTypes = {
|
|
10
10
|
dataId: _propTypes["default"].string,
|
|
11
|
+
dataSelectorId: _propTypes["default"].string,
|
|
11
12
|
initial: _propTypes["default"].string,
|
|
12
13
|
name: _propTypes["default"].string.isRequired,
|
|
13
14
|
needBorder: _propTypes["default"].bool,
|
|
@@ -13,8 +13,10 @@ var _AvatarTeamModule = _interopRequireDefault(require("./AvatarTeam.module.css"
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
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
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
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, descriptor.key, descriptor); } }
|
|
16
|
+
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); } }
|
|
17
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
18
20
|
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); }
|
|
19
21
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
22
|
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); }; }
|
|
@@ -55,6 +57,7 @@ var AvatarTeam = /*#__PURE__*/function (_React$Component) {
|
|
|
55
57
|
customClass = _this$props.customClass,
|
|
56
58
|
borderOnActive = _this$props.borderOnActive,
|
|
57
59
|
borderOnHover = _this$props.borderOnHover,
|
|
60
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
58
61
|
customProps = _this$props.customProps;
|
|
59
62
|
var _customProps$AvatarTe = customProps.AvatarTeamProps,
|
|
60
63
|
AvatarTeamProps = _customProps$AvatarTe === void 0 ? {} : _customProps$AvatarTe,
|
|
@@ -67,7 +70,8 @@ var AvatarTeam = /*#__PURE__*/function (_React$Component) {
|
|
|
67
70
|
var border = borderOnHover || onClick;
|
|
68
71
|
return /*#__PURE__*/_react["default"].createElement("span", _extends({
|
|
69
72
|
className: "".concat(_AvatarTeamModule["default"].container, " ").concat(borderOnActive ? _AvatarTeamModule["default"].borderOnActive : border ? _AvatarTeamModule["default"].borderOnHover : '', " "),
|
|
70
|
-
"data-id": dataId
|
|
73
|
+
"data-id": dataId,
|
|
74
|
+
"data-selector-id": dataSelectorId
|
|
71
75
|
}, AvatarTeamProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
|
|
72
76
|
name: name,
|
|
73
77
|
onClick: onClick,
|
|
@@ -90,10 +94,11 @@ var AvatarTeam = /*#__PURE__*/function (_React$Component) {
|
|
|
90
94
|
exports["default"] = AvatarTeam;
|
|
91
95
|
AvatarTeam.defaultProps = _defaultProps.defaultProps;
|
|
92
96
|
AvatarTeam.propTypes = _propTypes.propTypes;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
97
|
+
|
|
98
|
+
// if (__DOCS__) {
|
|
99
|
+
// AvatarTeam.docs = {
|
|
100
|
+
// componentGroup: 'Avatar Group',
|
|
101
|
+
// folderName: 'Style Guide',
|
|
102
|
+
// external: true
|
|
103
|
+
// };
|
|
104
|
+
// }
|
|
@@ -8,6 +8,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
var propTypes = {
|
|
10
10
|
dataId: _propTypes["default"].string,
|
|
11
|
+
dataSelectorId: _propTypes["default"].string,
|
|
11
12
|
isFilled: _propTypes["default"].bool,
|
|
12
13
|
name: _propTypes["default"].string.isRequired,
|
|
13
14
|
needTitle: _propTypes["default"].bool,
|
package/lib/Button/Button.js
CHANGED
|
@@ -12,8 +12,10 @@ var _ButtonModule = _interopRequireDefault(require("./Button.module.css"));
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
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, descriptor.key, descriptor); } }
|
|
15
|
+
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); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
17
19
|
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); }
|
|
18
20
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
21
|
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); }; }
|
|
@@ -51,6 +53,7 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
|
51
53
|
needAppearance = _this$props.needAppearance,
|
|
52
54
|
getRef = _this$props.getRef,
|
|
53
55
|
title = _this$props.title,
|
|
56
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
54
57
|
customClass = _this$props.customClass,
|
|
55
58
|
customProps = _this$props.customProps;
|
|
56
59
|
var _customClass$customBu = customClass.customButton,
|
|
@@ -69,7 +72,8 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
|
69
72
|
onClick: onClick,
|
|
70
73
|
"data-title": title,
|
|
71
74
|
type: "button",
|
|
72
|
-
ref: getRef
|
|
75
|
+
ref: getRef,
|
|
76
|
+
"data-selector-id": dataSelectorId
|
|
73
77
|
}, customProps), children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
78
|
className: _ButtonModule["default"].overlay
|
|
75
79
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -84,9 +88,10 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
|
84
88
|
exports["default"] = Button;
|
|
85
89
|
Button.defaultProps = _defaultProps.defaultProps;
|
|
86
90
|
Button.propTypes = _propTypes.propTypes;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
91
|
+
|
|
92
|
+
// if (__DOCS__) {
|
|
93
|
+
// Button.docs = {
|
|
94
|
+
// componentGroup: 'Form Elements',
|
|
95
|
+
// folderName: 'Style Guide'
|
|
96
|
+
// };
|
|
97
|
+
// }
|
|
@@ -10,6 +10,7 @@ var propTypes = {
|
|
|
10
10
|
children: _propTypes["default"].node,
|
|
11
11
|
className: _propTypes["default"].string,
|
|
12
12
|
dataId: _propTypes["default"].string,
|
|
13
|
+
dataSelectorId: _propTypes["default"].string,
|
|
13
14
|
disabled: _propTypes["default"].bool,
|
|
14
15
|
getRef: _propTypes["default"].func,
|
|
15
16
|
isBold: _propTypes["default"].bool,
|
|
@@ -11,8 +11,10 @@ var _propTypes = require("./props/propTypes");
|
|
|
11
11
|
var _ButtongroupModule = _interopRequireDefault(require("./Buttongroup.module.css"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
-
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, descriptor.key, descriptor); } }
|
|
14
|
+
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); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
16
18
|
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); }
|
|
17
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
20
|
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); }; }
|
|
@@ -21,7 +23,8 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
21
23
|
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; } }
|
|
22
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
25
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['footer','header',
|
|
24
|
-
'tab','alignleft','alignright','aligncenter' ] }] */
|
|
26
|
+
'tab','alignleft','alignright','aligncenter' ] }] */
|
|
27
|
+
var Buttongroup = /*#__PURE__*/function (_React$Component) {
|
|
25
28
|
_inherits(Buttongroup, _React$Component);
|
|
26
29
|
var _super = _createSuper(Buttongroup);
|
|
27
30
|
function Buttongroup() {
|
|
@@ -35,7 +38,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
35
38
|
children = _this$props.children,
|
|
36
39
|
type = _this$props.type,
|
|
37
40
|
buttonPosition = _this$props.buttonPosition,
|
|
38
|
-
customClass = _this$props.customClass
|
|
41
|
+
customClass = _this$props.customClass,
|
|
42
|
+
dataId = _this$props.dataId,
|
|
43
|
+
dataSelectorId = _this$props.dataSelectorId;
|
|
39
44
|
var btnGroup = [];
|
|
40
45
|
children.forEach(function (child) {
|
|
41
46
|
var btnRight = /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -44,7 +49,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
44
49
|
btnGroup.push(btnRight);
|
|
45
50
|
});
|
|
46
51
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
47
|
-
className: "".concat(_ButtongroupModule["default"].buttonGroup, " ").concat(_ButtongroupModule["default"][type], " ").concat(customClass ? customClass : '')
|
|
52
|
+
className: "".concat(_ButtongroupModule["default"].buttonGroup, " ").concat(_ButtongroupModule["default"][type], " ").concat(customClass ? customClass : ''),
|
|
53
|
+
"data-id": dataId,
|
|
54
|
+
"data-selector-id": dataSelectorId
|
|
48
55
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
56
|
className: _ButtongroupModule["default"]["align".concat(buttonPosition)]
|
|
50
57
|
}, children));
|
|
@@ -55,15 +62,18 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
55
62
|
exports["default"] = Buttongroup;
|
|
56
63
|
Buttongroup.defaultProps = _defaultProps.defaultProps;
|
|
57
64
|
Buttongroup.propTypes = _propTypes.propTypes;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
65
|
+
|
|
66
|
+
// if (__DOCS__) {
|
|
67
|
+
// Buttongroup.docs = {
|
|
68
|
+
// componentGroup: 'Molecule',
|
|
69
|
+
// folderName: 'Style Guide',
|
|
70
|
+
// external: false,
|
|
71
|
+
// description: ' ',
|
|
72
|
+
// images: [
|
|
73
|
+
// {
|
|
74
|
+
// view: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.png',
|
|
75
|
+
// psd: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.psd'
|
|
76
|
+
// }
|
|
77
|
+
// ]
|
|
78
|
+
// };
|
|
79
|
+
// }
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.defaultProps = void 0;
|
|
7
7
|
var defaultProps = {
|
|
8
8
|
buttonPosition: 'left',
|
|
9
|
-
children: null
|
|
9
|
+
children: null,
|
|
10
|
+
dataId: 'ButtonGroup',
|
|
11
|
+
dataSelectorId: 'buttonGroup'
|
|
10
12
|
};
|
|
11
13
|
exports.defaultProps = defaultProps;
|
|
@@ -10,6 +10,8 @@ var propTypes = {
|
|
|
10
10
|
buttonPosition: _propTypes["default"].oneOf(['left', 'right', 'center']),
|
|
11
11
|
children: _propTypes["default"].node,
|
|
12
12
|
type: _propTypes["default"].string.isRequired,
|
|
13
|
-
customClass: _propTypes["default"].string
|
|
13
|
+
customClass: _propTypes["default"].string,
|
|
14
|
+
dataId: _propTypes["default"].string,
|
|
15
|
+
dataSelectorId: _propTypes["default"].string
|
|
14
16
|
};
|
|
15
17
|
exports.propTypes = propTypes;
|