@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
|
@@ -30,12 +30,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
30
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
31
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
32
32
|
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); }
|
|
33
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
34
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
33
|
+
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; }
|
|
34
|
+
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
|
-
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); } }
|
|
37
|
+
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); } }
|
|
38
38
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
39
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
40
|
+
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); }
|
|
39
41
|
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); }
|
|
40
42
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
43
|
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); }; }
|
|
@@ -565,7 +567,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
565
567
|
i18nKeys = _this$props9.i18nKeys,
|
|
566
568
|
htmlId = _this$props9.htmlId,
|
|
567
569
|
iconOnHover = _this$props9.iconOnHover,
|
|
568
|
-
isLoading = _this$props9.isLoading
|
|
570
|
+
isLoading = _this$props9.isLoading,
|
|
571
|
+
dataSelectorId = _this$props9.dataSelectorId;
|
|
569
572
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
570
573
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
571
574
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -588,7 +591,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
588
591
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
589
592
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : '', " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverStyle : ''),
|
|
590
593
|
"data-id": dataIdSlctComp,
|
|
591
|
-
"data-title": isDisabled ? title : null
|
|
594
|
+
"data-title": isDisabled ? title : null,
|
|
595
|
+
"data-selector-id": dataSelectorId
|
|
592
596
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
593
597
|
className: "".concat(className ? className : ''),
|
|
594
598
|
onClick: isDisabled || isReadOnly ? null : this.togglePopup,
|
|
@@ -759,13 +763,12 @@ GroupSelectComponent.defaultProps = _defaultProps.GroupSelect_defaultProps;
|
|
|
759
763
|
GroupSelectComponent.displayName = 'GroupSelect';
|
|
760
764
|
var GroupSelect = (0, _Popup["default"])(GroupSelectComponent);
|
|
761
765
|
GroupSelect.defaultProps = GroupSelectComponent.defaultProps;
|
|
762
|
-
var _default = GroupSelect;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
766
|
+
var _default = GroupSelect; // if (__DOCS__) {
|
|
767
|
+
// GroupSelect.docs = {
|
|
768
|
+
// componentGroup: 'Form Elements',
|
|
769
|
+
// folderName: 'Style Guide'
|
|
770
|
+
// };
|
|
771
|
+
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
772
|
+
// GroupSelect.propTypes = GroupSelectComponent.propTypes;
|
|
773
|
+
// }
|
|
774
|
+
exports["default"] = _default;
|
package/lib/Select/Select.js
CHANGED
|
@@ -29,8 +29,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
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; }
|
|
30
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
31
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
32
|
-
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); } }
|
|
32
|
+
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); } }
|
|
33
33
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
34
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
35
|
+
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); }
|
|
34
36
|
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); }
|
|
35
37
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
36
38
|
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); }; }
|
|
@@ -684,7 +686,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
684
686
|
customProps = _this$props11.customProps,
|
|
685
687
|
autoComplete = _this$props11.autoComplete,
|
|
686
688
|
ariaLabelledby = _this$props11.ariaLabelledby,
|
|
687
|
-
isLoading = _this$props11.isLoading
|
|
689
|
+
isLoading = _this$props11.isLoading,
|
|
690
|
+
dataSelectorId = _this$props11.dataSelectorId;
|
|
688
691
|
var _i18nKeys = i18nKeys,
|
|
689
692
|
TextBoxIcon_i18n = _i18nKeys.TextBoxIcon_i18n,
|
|
690
693
|
_i18nKeys$TextBox_all = _i18nKeys.TextBox_ally_label,
|
|
@@ -711,7 +714,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
711
714
|
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
712
715
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
713
716
|
className: "".concat(isParentBased || isReadOnly || isDisabled ? _SelectModule["default"].container : '', " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : '', " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _SelectModule["default"].iconOnHoverStyle : ''),
|
|
714
|
-
"data-title": isDisabled ? title : null
|
|
717
|
+
"data-title": isDisabled ? title : null,
|
|
718
|
+
"data-selector-id": dataSelectorId
|
|
715
719
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
716
720
|
className: "".concat(className ? className : ''),
|
|
717
721
|
onClick: isDisabled || isReadOnly ? null : this.togglePopup,
|
|
@@ -899,15 +903,14 @@ SelectComponent.defaultProps = _defaultProps.Select_defaultProps;
|
|
|
899
903
|
SelectComponent.displayName = 'Select';
|
|
900
904
|
var Select = (0, _Popup["default"])(SelectComponent);
|
|
901
905
|
Select.defaultProps = SelectComponent.defaultProps;
|
|
902
|
-
var _default = Select;
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}
|
|
906
|
+
var _default = Select; // if (__DOCS__) {
|
|
907
|
+
// Select.docs = {
|
|
908
|
+
// componentGroup: 'Form Elements',
|
|
909
|
+
// folderName: 'Style Guide',
|
|
910
|
+
// external: true,
|
|
911
|
+
// description: ' '
|
|
912
|
+
// };
|
|
913
|
+
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
914
|
+
// Select.propTypes = SelectComponent.propTypes;
|
|
915
|
+
// }
|
|
916
|
+
exports["default"] = _default;
|
|
@@ -28,8 +28,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
28
28
|
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; }
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
30
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
|
-
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); } }
|
|
31
|
+
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); } }
|
|
32
32
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
34
|
+
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); }
|
|
33
35
|
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); }
|
|
34
36
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
37
|
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); }; }
|
|
@@ -162,7 +164,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
162
164
|
i18nKeys = _this$props.i18nKeys,
|
|
163
165
|
htmlId = _this$props.htmlId,
|
|
164
166
|
needEffect = _this$props.needEffect,
|
|
165
|
-
isLoading = _this$props.isLoading
|
|
167
|
+
isLoading = _this$props.isLoading,
|
|
168
|
+
dataSelectorId = _this$props.dataSelectorId;
|
|
166
169
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
167
170
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
168
171
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -184,7 +187,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
184
187
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
188
|
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : '', " ").concat(className ? className : ''),
|
|
186
189
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
187
|
-
"data-title": isDisabled ? title : null
|
|
190
|
+
"data-title": isDisabled ? title : null,
|
|
191
|
+
"data-selector-id": dataSelectorId
|
|
188
192
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
189
193
|
align: "vertical",
|
|
190
194
|
alignBox: "row",
|
|
@@ -328,13 +332,14 @@ SelectWithAvatarComponent.defaultProps = _defaultProps.SelectWithAvatar_defaultP
|
|
|
328
332
|
SelectWithAvatarComponent.displayName = 'SelectWithAvatar';
|
|
329
333
|
var SelectWithAvatar = (0, _Popup["default"])(SelectWithAvatarComponent);
|
|
330
334
|
SelectWithAvatar.defaultProps = SelectWithAvatarComponent.defaultProps;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
|
|
336
|
+
// if (__DOCS__) {
|
|
337
|
+
// SelectWithAvatar.docs = {
|
|
338
|
+
// componentGroup: 'Form Elements',
|
|
339
|
+
// folderName: 'Style Guide'
|
|
340
|
+
// };
|
|
341
|
+
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
342
|
+
// SelectWithAvatar.propTypes = SelectWithAvatarComponent.propTypes;
|
|
343
|
+
// }
|
|
339
344
|
var _default = SelectWithAvatar;
|
|
340
345
|
exports["default"] = _default;
|
|
@@ -25,8 +25,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
25
25
|
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); }
|
|
26
26
|
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; }
|
|
27
27
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
-
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); } }
|
|
28
|
+
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); } }
|
|
29
29
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
30
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
31
|
+
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); }
|
|
30
32
|
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); }
|
|
31
33
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
34
|
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); }; }
|
|
@@ -353,7 +355,8 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
353
355
|
iconClass = _this$props7.iconClass,
|
|
354
356
|
i18nKeys = _this$props7.i18nKeys,
|
|
355
357
|
htmlId = _this$props7.htmlId,
|
|
356
|
-
isLoading = _this$props7.isLoading
|
|
358
|
+
isLoading = _this$props7.isLoading,
|
|
359
|
+
dataSelectorId = _this$props7.dataSelectorId;
|
|
357
360
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
358
361
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
359
362
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -367,7 +370,8 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
367
370
|
var ariaErrorId = this.getNextAriaId();
|
|
368
371
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
369
372
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : ''),
|
|
370
|
-
"data-title": isDisabled ? title : null
|
|
373
|
+
"data-title": isDisabled ? title : null,
|
|
374
|
+
"data-selector-id": dataSelectorId
|
|
371
375
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
372
376
|
className: "".concat(className ? className : ''),
|
|
373
377
|
onClick: isDisabled || isReadOnly ? null : this.togglePopup,
|
|
@@ -521,11 +525,12 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
521
525
|
}(_react.Component);
|
|
522
526
|
SelectWithIcon.propTypes = _propTypes.SelectWithIcon_propTypes;
|
|
523
527
|
SelectWithIcon.defaultProps = _defaultProps.SelectWithIcon_defaultProps;
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}
|
|
528
|
+
|
|
529
|
+
// if (__DOCS__) {
|
|
530
|
+
// SelectWithIcon.docs = {
|
|
531
|
+
// componentGroup: 'Form Elements',
|
|
532
|
+
// folderName: 'Style Guide'
|
|
533
|
+
// };
|
|
534
|
+
// }
|
|
530
535
|
var _default = (0, _Popup["default"])(SelectWithIcon);
|
|
531
536
|
exports["default"] = _default;
|
|
@@ -7,8 +7,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
7
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
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); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
describe('Select component conditions', function () {
|
|
14
14
|
it('Select component with down arrow', function () {
|
|
@@ -6,12 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Select_defaultProps = exports.SelectWithIcon_defaultProps = exports.SelectWithAvatar_defaultProps = exports.GroupSelect_defaultProps = void 0;
|
|
7
7
|
var _Config = require("../../Provider/Config");
|
|
8
8
|
var _SelectWithIcon_defau;
|
|
9
|
-
function
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
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); }
|
|
10
13
|
var Select_defaultProps = {
|
|
11
14
|
animationStyle: 'bounce',
|
|
12
15
|
autoComplete: (0, _Config.getLibraryConfig)('autoComplete'),
|
|
13
16
|
autoSelectOnType: true,
|
|
14
17
|
dataId: 'selectComponent',
|
|
18
|
+
dataSelectorId: 'select',
|
|
15
19
|
dropBoxSize: 'small',
|
|
16
20
|
isDefaultSelectValue: true,
|
|
17
21
|
isDisabled: false,
|
|
@@ -46,6 +50,7 @@ var GroupSelect_defaultProps = {
|
|
|
46
50
|
animationStyle: 'bounce',
|
|
47
51
|
defaultDropBoxPosition: 'bottom',
|
|
48
52
|
dropBoxSize: 'small',
|
|
53
|
+
dataSelectorId: 'groupSelect',
|
|
49
54
|
isDefaultSelectValue: true,
|
|
50
55
|
isDisabled: false,
|
|
51
56
|
isReadOnly: false,
|
|
@@ -92,6 +97,7 @@ var SelectWithAvatar_defaultProps = {
|
|
|
92
97
|
textField: 'text',
|
|
93
98
|
valueField: 'id',
|
|
94
99
|
dataId: 'selectWithAvatar',
|
|
100
|
+
dataSelectorId: 'selectWithAvatar',
|
|
95
101
|
borderColor: 'default',
|
|
96
102
|
isSearchClearOnClose: true,
|
|
97
103
|
i18nKeys: {},
|
|
@@ -108,5 +114,5 @@ var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
|
108
114
|
needListBorder: false,
|
|
109
115
|
needSearch: false,
|
|
110
116
|
boxSize: 'default'
|
|
111
|
-
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _SelectWithIcon_defau);
|
|
117
|
+
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _SelectWithIcon_defau);
|
|
112
118
|
exports.SelectWithIcon_defaultProps = SelectWithIcon_defaultProps;
|
|
@@ -91,7 +91,8 @@ var Select_propTypes = {
|
|
|
91
91
|
listItemProps: _propTypes["default"].object,
|
|
92
92
|
SuggestionsProps: _propTypes["default"].object
|
|
93
93
|
}),
|
|
94
|
-
isLoading: _propTypes["default"].bool
|
|
94
|
+
isLoading: _propTypes["default"].bool,
|
|
95
|
+
dataSelectorId: _propTypes["default"].string
|
|
95
96
|
};
|
|
96
97
|
exports.Select_propTypes = Select_propTypes;
|
|
97
98
|
var GroupSelect_propTypes = {
|
|
@@ -169,7 +170,8 @@ var GroupSelect_propTypes = {
|
|
|
169
170
|
noMoreText: _propTypes["default"].string,
|
|
170
171
|
searchEmptyText: _propTypes["default"].string
|
|
171
172
|
}),
|
|
172
|
-
isLoading: _propTypes["default"].bool
|
|
173
|
+
isLoading: _propTypes["default"].bool,
|
|
174
|
+
dataSelectorId: _propTypes["default"].string
|
|
173
175
|
};
|
|
174
176
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
175
177
|
var SelectWithAvatar_propTypes = {
|
|
@@ -228,7 +230,8 @@ var SelectWithAvatar_propTypes = {
|
|
|
228
230
|
valueField: _propTypes["default"].string,
|
|
229
231
|
htmlId: _propTypes["default"].string,
|
|
230
232
|
needEffect: _propTypes["default"].bool,
|
|
231
|
-
isLoading: _propTypes["default"].bool
|
|
233
|
+
isLoading: _propTypes["default"].bool,
|
|
234
|
+
dataSelectorId: _propTypes["default"].string
|
|
232
235
|
};
|
|
233
236
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
|
234
237
|
var SelectWithIcon_propTypes = {
|
|
@@ -275,6 +278,7 @@ var SelectWithIcon_propTypes = {
|
|
|
275
278
|
togglePopup: _propTypes["default"].func,
|
|
276
279
|
valueKey: _propTypes["default"].string,
|
|
277
280
|
htmlId: _propTypes["default"].string,
|
|
278
|
-
isLoading: _propTypes["default"].bool
|
|
281
|
+
isLoading: _propTypes["default"].bool,
|
|
282
|
+
dataSelectorId: _propTypes["default"].string
|
|
279
283
|
};
|
|
280
284
|
exports.SelectWithIcon_propTypes = SelectWithIcon_propTypes;
|
package/lib/Stencils/Stencils.js
CHANGED
|
@@ -11,8 +11,10 @@ var _propTypes = require("./props/propTypes");
|
|
|
11
11
|
var _StencilsModule = _interopRequireDefault(require("./Stencils.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); }; }
|
|
@@ -47,11 +49,12 @@ var Stencils = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
47
49
|
exports["default"] = Stencils;
|
|
48
50
|
Stencils.propTypes = _propTypes.propTypes;
|
|
49
51
|
Stencils.defaultProps = _defaultProps.defaultProps;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
52
|
+
|
|
53
|
+
// if (__DOCS__) {
|
|
54
|
+
// Stencils.docs = {
|
|
55
|
+
// componentGroup: 'Atom',
|
|
56
|
+
// folderName: 'Style Guide',
|
|
57
|
+
// description: ' ',
|
|
58
|
+
// external: true
|
|
59
|
+
// };
|
|
60
|
+
// }
|
package/lib/Switch/Switch.js
CHANGED
|
@@ -14,8 +14,10 @@ var _SwitchModule = _interopRequireDefault(require("./Switch.module.css"));
|
|
|
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 _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, descriptor.key, descriptor); } }
|
|
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
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); }
|
|
19
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); }
|
|
20
22
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
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); }; }
|
|
@@ -58,6 +60,7 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
58
60
|
title = _this$props2.title,
|
|
59
61
|
disableTitle = _this$props2.disableTitle,
|
|
60
62
|
dataId = _this$props2.dataId,
|
|
63
|
+
dataSelectorId = _this$props2.dataSelectorId,
|
|
61
64
|
customClass = _this$props2.customClass,
|
|
62
65
|
customProps = _this$props2.customProps;
|
|
63
66
|
var _customProps$SwitchPr = customProps.SwitchProps,
|
|
@@ -82,7 +85,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
82
85
|
"data-title": disabled ? disableTitle : title,
|
|
83
86
|
"aria-checked": checked,
|
|
84
87
|
role: "switch",
|
|
85
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
88
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0',
|
|
89
|
+
dataSelectorId: dataSelectorId
|
|
86
90
|
}, SwitchProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
87
91
|
className: "".concat(_SwitchModule["default"][size], " ").concat(customSwitchSize)
|
|
88
92
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
@@ -115,9 +119,10 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
115
119
|
exports["default"] = Switch;
|
|
116
120
|
Switch.defaultProps = _defaultProps.defaultProps;
|
|
117
121
|
Switch.propTypes = _propTypes.propTypes;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
122
|
+
|
|
123
|
+
// if (__DOCS__) {
|
|
124
|
+
// Switch.docs = {
|
|
125
|
+
// componentGroup: 'Form Elements',
|
|
126
|
+
// folderName: 'Style Guide'
|
|
127
|
+
// };
|
|
128
|
+
// }
|
|
@@ -9,6 +9,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
9
9
|
var propTypes = {
|
|
10
10
|
checked: _propTypes["default"].bool,
|
|
11
11
|
dataId: _propTypes["default"].string,
|
|
12
|
+
dataSelectorId: _propTypes["default"].string,
|
|
12
13
|
disableTitle: _propTypes["default"].string,
|
|
13
14
|
disabled: _propTypes["default"].bool,
|
|
14
15
|
id: _propTypes["default"].string.isRequired,
|
package/lib/Tab/Tab.js
CHANGED
|
@@ -36,6 +36,7 @@ function Tab(_ref) {
|
|
|
36
36
|
children = _ref.children,
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
dataId = _ref.dataId,
|
|
39
|
+
dataSelectorId = _ref.dataSelectorId,
|
|
39
40
|
title = _ref.title,
|
|
40
41
|
titlePosition = _ref.titlePosition,
|
|
41
42
|
activeClass = _ref.activeClass,
|
|
@@ -93,7 +94,8 @@ function Tab(_ref) {
|
|
|
93
94
|
"aria-controls": id,
|
|
94
95
|
"aria-selected": isActive ? true : false,
|
|
95
96
|
tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
|
|
96
|
-
"aria-label": text ? text : null
|
|
97
|
+
"aria-label": text ? text : null,
|
|
98
|
+
dataSelectorId: dataSelectorId
|
|
97
99
|
}, customProps), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
98
100
|
alignBox: "row",
|
|
99
101
|
align: "both",
|
|
@@ -108,9 +110,10 @@ function Tab(_ref) {
|
|
|
108
110
|
}
|
|
109
111
|
Tab.defaultProps = _defaultProps.Tab_defaultProps;
|
|
110
112
|
Tab.propTypes = _propTypes.Tab_propTypes;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
113
|
+
|
|
114
|
+
// if (__DOCS__) {
|
|
115
|
+
// Tab.docs = {
|
|
116
|
+
// componentGroup: 'Tab',
|
|
117
|
+
// folderName: 'Style Guide'
|
|
118
|
+
// };
|
|
119
|
+
// }
|
package/lib/Tab/TabContent.js
CHANGED
|
@@ -16,7 +16,8 @@ var TabContent = function TabContent(_ref) {
|
|
|
16
16
|
var children = _ref.children,
|
|
17
17
|
scroll = _ref.scroll,
|
|
18
18
|
dataId = _ref.dataId,
|
|
19
|
-
id = _ref.id
|
|
19
|
+
id = _ref.id,
|
|
20
|
+
dataSelectorId = _ref.dataSelectorId;
|
|
20
21
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
21
22
|
className: _TabContentModule["default"].container,
|
|
22
23
|
scroll: scroll,
|
|
@@ -24,7 +25,8 @@ var TabContent = function TabContent(_ref) {
|
|
|
24
25
|
isScrollAttribute: true,
|
|
25
26
|
"aria-labelledby": id,
|
|
26
27
|
tabindex: "-1",
|
|
27
|
-
role: "tabpanel"
|
|
28
|
+
role: "tabpanel",
|
|
29
|
+
dataSelectorId: dataSelectorId
|
|
28
30
|
}, children);
|
|
29
31
|
};
|
|
30
32
|
TabContent.defaultProps = _defaultProps.TabContent_defaultProps;
|
|
@@ -16,13 +16,15 @@ var TabContentWrapper = function TabContentWrapper(_ref) {
|
|
|
16
16
|
children = _ref.children,
|
|
17
17
|
dataId = _ref.dataId,
|
|
18
18
|
selectedTab = _ref.selectedTab,
|
|
19
|
-
onScroll = _ref.onScroll
|
|
19
|
+
onScroll = _ref.onScroll,
|
|
20
|
+
dataSelectorId = _ref.dataSelectorId;
|
|
20
21
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
21
22
|
flexible: true,
|
|
22
23
|
style: style,
|
|
23
24
|
dataId: dataId,
|
|
24
25
|
className: className,
|
|
25
|
-
onScroll: onScroll
|
|
26
|
+
onScroll: onScroll,
|
|
27
|
+
dataSelectorId: dataSelectorId
|
|
26
28
|
}, _react["default"].Children.map(children, function (child) {
|
|
27
29
|
return /*#__PURE__*/_react["default"].isValidElement(child) && child.props.id === selectedTab ? child : null;
|
|
28
30
|
}));
|
package/lib/Tab/TabWrapper.js
CHANGED
|
@@ -15,8 +15,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
16
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
17
|
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); }
|
|
18
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
19
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
18
|
+
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; }
|
|
19
|
+
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; } }
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
function TabWrapper(_ref) {
|
|
22
22
|
var defaultTab = _ref.defaultTab,
|
|
@@ -30,7 +30,8 @@ function TabWrapper(_ref) {
|
|
|
30
30
|
needAppearance = _ref.needAppearance,
|
|
31
31
|
align = _ref.align,
|
|
32
32
|
dataId = _ref.dataId,
|
|
33
|
-
children = _ref.children
|
|
33
|
+
children = _ref.children,
|
|
34
|
+
dataSelectorId = _ref.dataSelectorId;
|
|
34
35
|
var _useState = (0, _react.useState)(!hookToDisableInternalState ? defaultTab || 0 : null),
|
|
35
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
37
|
selectedTabInternal = _useState2[0],
|
|
@@ -43,7 +44,8 @@ function TabWrapper(_ref) {
|
|
|
43
44
|
}, [hookToDisableInternalState, onSelect]);
|
|
44
45
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
45
46
|
alignBox: align === 'vertical' ? 'column' : 'row',
|
|
46
|
-
dataId: dataId
|
|
47
|
+
dataId: dataId,
|
|
48
|
+
dataSelectorId: dataSelectorId
|
|
47
49
|
}, _react["default"].Children.map(children, function (child) {
|
|
48
50
|
var TabsChild = child.type;
|
|
49
51
|
var selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
|