@zohodesk/components 1.0.0-temp-168 → 1.0.0-temp-169
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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +13 -3
- package/.cli/propValidation_report.html +1 -1
- package/README.md +48 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +3 -6
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +9 -3
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +10 -10
- package/coverage/coverage-summary.json +10 -10
- package/coverage/index.html +1 -1
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/index.html +1 -1
- package/es/AppContainer/AppContainer.js +3 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/es/Button/props/defaultProps.js +1 -2
- package/es/Button/props/propTypes.js +3 -1
- package/es/DateTime/DateTime.module.css +2 -0
- package/es/DateTime/DateWidget.js +2 -1
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
- package/es/DateTime/dateFormatUtils/index.js +1 -1
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
- package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
- package/es/DropBox/DropBox.js +10 -10
- package/es/DropDown/DropDown.js +1 -7
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -5
- package/es/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/MultiSelect/MultiSelect.js +112 -91
- package/es/MultiSelect/MultiSelect.module.css +2 -5
- package/es/MultiSelect/MultiSelectHeader.js +1 -2
- package/es/MultiSelect/MultiSelectWithAvatar.js +15 -112
- package/es/MultiSelect/props/defaultProps.js +3 -1
- package/es/MultiSelect/props/propTypes.js +9 -57
- package/es/Responsive/RefWrapper.js +2 -1
- package/es/Select/GroupSelect.js +3 -5
- package/es/Select/Select.js +2 -5
- package/es/Select/SelectWithAvatar.js +2 -1
- package/es/Select/SelectWithIcon.js +5 -2
- package/es/TextBox/TextBox.js +3 -3
- package/es/TextBox/TextBox.module.css +5 -4
- package/es/Textarea/Textarea.module.css +3 -4
- package/es/deprecated/PortalLayer/props/propTypes.js +3 -1
- package/es/index.js +2 -1
- package/es/utils/Common.js +3 -0
- package/es/v1/Accordion/Accordion.js +66 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Animation/Animation.js +127 -0
- package/es/v1/AppContainer/AppContainer.js +137 -0
- package/es/v1/Avatar/Avatar.js +139 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/Button/Button.js +68 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Card/Card.js +271 -0
- package/es/v1/CheckBox/CheckBox.js +155 -0
- package/es/v1/DateTime/CalendarView.js +218 -0
- package/es/v1/DateTime/DateTime.js +783 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1098 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DropBox/DropBox.js +91 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
- package/es/v1/DropDown/DropDown.js +73 -0
- package/es/v1/DropDown/DropDownHeading.js +44 -0
- package/es/v1/DropDown/DropDownItem.js +76 -0
- package/es/v1/DropDown/DropDownSearch.js +63 -0
- package/es/v1/DropDown/DropDownSeparator.js +15 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/ListItem/ListContainer.js +102 -0
- package/es/v1/ListItem/ListItem.js +124 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
- package/es/v1/ListItem/ListItemWithIcon.js +127 -0
- package/es/v1/ListItem/ListItemWithRadio.js +105 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/Modal/Modal.js +154 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MultiSelect.js +1120 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
- package/es/v1/MultiSelect/SelectedOptions.js +82 -0
- package/es/v1/MultiSelect/Suggestions.js +142 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/PopOver/PopOver.js +176 -0
- package/es/v1/Popup/Popup.js +645 -0
- package/es/v1/Radio/Radio.js +115 -0
- package/es/v1/Responsive/CustomResponsive.js +195 -0
- package/es/v1/Responsive/RefWrapper.js +39 -0
- package/es/v1/Responsive/ResizeComponent.js +197 -0
- package/es/v1/Responsive/ResizeObserver.js +140 -0
- package/es/v1/Responsive/Responsive.js +194 -0
- package/es/v1/Responsive/index.js +9 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/RippleEffect/RippleEffect.js +24 -0
- package/es/v1/Select/GroupSelect.js +800 -0
- package/es/v1/Select/Select.js +966 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Tab/Tab.js +108 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +29 -0
- package/es/v1/Tab/TabWrapper.js +57 -0
- package/es/v1/Tab/Tabs.js +612 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tag/Tag.js +134 -0
- package/es/v1/TextBox/TextBox.js +154 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/Textarea/Textarea.js +102 -0
- package/es/v1/Tooltip/Tooltip.js +518 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +376 -0
- package/es/v1/Typography/css/cssJSLogic.js +46 -0
- package/es/v1/Typography/css/letterSpacingMap.js +12 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +24 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/index.js +1 -0
- package/lib/AppContainer/AppContainer.js +5 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/lib/Button/props/defaultProps.js +1 -2
- package/lib/Button/props/propTypes.js +3 -1
- package/lib/DateTime/DateTime.module.css +2 -0
- package/lib/DateTime/DateWidget.js +2 -1
- package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/index.js +1 -1
- package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
- package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
- package/lib/DropBox/DropBox.js +15 -15
- package/lib/DropDown/DropDown.js +1 -6
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -6
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/MultiSelect/MultiSelect.js +116 -96
- package/lib/MultiSelect/MultiSelect.module.css +2 -5
- package/lib/MultiSelect/MultiSelectHeader.js +1 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +18 -113
- package/lib/MultiSelect/props/defaultProps.js +3 -1
- package/lib/MultiSelect/props/propTypes.js +19 -60
- package/lib/Responsive/RefWrapper.js +2 -1
- package/lib/Select/GroupSelect.js +2 -2
- package/lib/Select/Select.js +1 -2
- package/lib/Select/SelectWithAvatar.js +2 -1
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/TextBox/TextBox.js +10 -10
- package/lib/TextBox/TextBox.module.css +5 -4
- package/lib/Textarea/Textarea.module.css +3 -4
- package/lib/deprecated/PortalLayer/props/propTypes.js +3 -1
- package/lib/index.js +10 -1
- package/lib/utils/Common.js +5 -0
- package/lib/v1/Accordion/Accordion.js +98 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Animation/Animation.js +143 -0
- package/lib/v1/AppContainer/AppContainer.js +209 -0
- package/lib/v1/Avatar/Avatar.js +190 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Card/Card.js +365 -0
- package/lib/v1/CheckBox/CheckBox.js +166 -0
- package/lib/v1/DateTime/CalendarView.js +285 -0
- package/lib/v1/DateTime/DateTime.js +872 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1125 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DropBox/DropBox.js +119 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
- package/lib/v1/DropDown/DropDown.js +170 -0
- package/lib/v1/DropDown/DropDownHeading.js +93 -0
- package/lib/v1/DropDown/DropDownItem.js +127 -0
- package/lib/v1/DropDown/DropDownSearch.js +113 -0
- package/lib/v1/DropDown/DropDownSeparator.js +64 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/ListItem/ListContainer.js +120 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/Modal/Modal.js +212 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +195 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/PopOver/PopOver.js +197 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +126 -0
- package/lib/v1/Responsive/CustomResponsive.js +242 -0
- package/lib/v1/Responsive/RefWrapper.js +57 -0
- package/lib/v1/Responsive/ResizeComponent.js +268 -0
- package/lib/v1/Responsive/ResizeObserver.js +168 -0
- package/lib/v1/Responsive/Responsive.js +274 -0
- package/lib/v1/Responsive/index.js +55 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/RippleEffect/RippleEffect.js +39 -0
- package/lib/v1/Select/GroupSelect.js +876 -0
- package/lib/v1/Select/Select.js +1012 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +42 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +680 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tag/Tag.js +154 -0
- package/lib/v1/TextBox/TextBox.js +168 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Tooltip/Tooltip.js +586 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +376 -0
- package/lib/v1/Typography/css/cssJSLogic.js +41 -0
- package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +35 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +10 -10
- package/result.json +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("../../MultiSelect/props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _defaultProps = require("../../MultiSelect/props/defaultProps");
|
|
15
|
+
|
|
16
|
+
var _ListItem = _interopRequireDefault(require("../ListItem/ListItem"));
|
|
17
|
+
|
|
18
|
+
var _ListItemWithAvatar = _interopRequireDefault(require("../ListItem/ListItemWithAvatar"));
|
|
19
|
+
|
|
20
|
+
var _ListItemWithIcon = _interopRequireDefault(require("../ListItem/ListItemWithIcon"));
|
|
21
|
+
|
|
22
|
+
var _Layout = require("../Layout");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
34
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
|
+
|
|
36
|
+
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
|
+
|
|
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
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
43
|
+
|
|
44
|
+
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); }; }
|
|
45
|
+
|
|
46
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
47
|
+
|
|
48
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
49
|
+
|
|
50
|
+
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; } }
|
|
51
|
+
|
|
52
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
|
+
|
|
54
|
+
var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
55
|
+
_inherits(Suggestions, _React$PureComponent);
|
|
56
|
+
|
|
57
|
+
var _super = _createSuper(Suggestions);
|
|
58
|
+
|
|
59
|
+
function Suggestions() {
|
|
60
|
+
_classCallCheck(this, Suggestions);
|
|
61
|
+
|
|
62
|
+
return _super.apply(this, arguments);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
_createClass(Suggestions, [{
|
|
66
|
+
key: "render",
|
|
67
|
+
value: function render() {
|
|
68
|
+
var _this$props = this.props,
|
|
69
|
+
suggestions = _this$props.suggestions,
|
|
70
|
+
getRef = _this$props.getRef,
|
|
71
|
+
hoverOption = _this$props.hoverOption,
|
|
72
|
+
onClick = _this$props.onClick,
|
|
73
|
+
onMouseEnter = _this$props.onMouseEnter,
|
|
74
|
+
needTick = _this$props.needTick,
|
|
75
|
+
needBorder = _this$props.needBorder,
|
|
76
|
+
_this$props$selectedO = _this$props.selectedOptions,
|
|
77
|
+
selectedOptions = _this$props$selectedO === void 0 ? [] : _this$props$selectedO,
|
|
78
|
+
activeId = _this$props.activeId,
|
|
79
|
+
hoverId = _this$props.hoverId,
|
|
80
|
+
dataId = _this$props.dataId,
|
|
81
|
+
listItemSize = _this$props.listItemSize,
|
|
82
|
+
className = _this$props.className,
|
|
83
|
+
avatarPalette = _this$props.avatarPalette,
|
|
84
|
+
palette = _this$props.palette,
|
|
85
|
+
htmlId = _this$props.htmlId,
|
|
86
|
+
a11y = _this$props.a11y;
|
|
87
|
+
var ariaParentRole = a11y.ariaParentRole,
|
|
88
|
+
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
89
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
90
|
+
isCover: false,
|
|
91
|
+
role: ariaParentRole,
|
|
92
|
+
id: htmlId,
|
|
93
|
+
tabindex: "0",
|
|
94
|
+
"aria-multiselectable": ariaMultiselectable
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
96
|
+
dataId: "".concat(dataId),
|
|
97
|
+
className: className ? className : ''
|
|
98
|
+
}, suggestions.map(function (suggestion, index) {
|
|
99
|
+
var id = suggestion.id,
|
|
100
|
+
value = suggestion.value,
|
|
101
|
+
photoURL = suggestion.photoURL,
|
|
102
|
+
icon = suggestion.icon,
|
|
103
|
+
optionType = suggestion.optionType,
|
|
104
|
+
iconSize = suggestion.iconSize,
|
|
105
|
+
isDisabled = suggestion.isDisabled,
|
|
106
|
+
listItemProps = suggestion.listItemProps,
|
|
107
|
+
_suggestion$listItemC = suggestion.listItemCustomProps,
|
|
108
|
+
listItemCustomProps = _suggestion$listItemC === void 0 ? {} : _suggestion$listItemC;
|
|
109
|
+
var isActive = activeId === id || selectedOptions.indexOf(id) >= 0;
|
|
110
|
+
var isHighlight = hoverOption === index || id === hoverId ? true : false;
|
|
111
|
+
var list_a11y = Object.assign({}, a11y, {
|
|
112
|
+
ariaSelected: isActive,
|
|
113
|
+
ariaLabel: value
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
var commonProps = _objectSpread({
|
|
117
|
+
isDisabled: isDisabled
|
|
118
|
+
}, listItemCustomProps);
|
|
119
|
+
|
|
120
|
+
if (listItemProps) {
|
|
121
|
+
commonProps.customProps = {
|
|
122
|
+
ListItemProps: _objectSpread({}, listItemProps)
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (optionType === 'avatar') {
|
|
127
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemWithAvatar["default"], _extends({}, commonProps, {
|
|
128
|
+
autoHover: false,
|
|
129
|
+
getRef: getRef,
|
|
130
|
+
highlight: isHighlight,
|
|
131
|
+
id: id,
|
|
132
|
+
imgSrc: photoURL,
|
|
133
|
+
key: "".concat(id, "avatarListItem"),
|
|
134
|
+
name: value,
|
|
135
|
+
onClick: onClick,
|
|
136
|
+
onMouseEnter: onMouseEnter,
|
|
137
|
+
value: value,
|
|
138
|
+
title: value,
|
|
139
|
+
needTick: needTick,
|
|
140
|
+
needBorder: needBorder,
|
|
141
|
+
active: isActive,
|
|
142
|
+
size: listItemSize,
|
|
143
|
+
avatarPalette: avatarPalette,
|
|
144
|
+
palette: palette,
|
|
145
|
+
a11y: list_a11y
|
|
146
|
+
}));
|
|
147
|
+
} else if (optionType === 'icon') {
|
|
148
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
|
|
149
|
+
autoHover: false,
|
|
150
|
+
getRef: getRef,
|
|
151
|
+
highlight: isHighlight,
|
|
152
|
+
id: id,
|
|
153
|
+
key: "".concat(id, "iconListItem"),
|
|
154
|
+
onClick: onClick,
|
|
155
|
+
onMouseEnter: onMouseEnter,
|
|
156
|
+
value: value,
|
|
157
|
+
title: value,
|
|
158
|
+
iconName: icon,
|
|
159
|
+
needTick: needTick,
|
|
160
|
+
needBorder: needBorder,
|
|
161
|
+
active: isActive,
|
|
162
|
+
iconSize: iconSize,
|
|
163
|
+
size: listItemSize,
|
|
164
|
+
palette: palette,
|
|
165
|
+
a11y: list_a11y
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({}, commonProps, {
|
|
170
|
+
autoHover: false,
|
|
171
|
+
getRef: getRef,
|
|
172
|
+
highlight: isHighlight,
|
|
173
|
+
id: id,
|
|
174
|
+
key: "".concat(id, "listItem"),
|
|
175
|
+
onClick: onClick,
|
|
176
|
+
onMouseEnter: onMouseEnter,
|
|
177
|
+
value: value,
|
|
178
|
+
title: value,
|
|
179
|
+
needTick: needTick,
|
|
180
|
+
needBorder: needBorder,
|
|
181
|
+
active: isActive,
|
|
182
|
+
size: listItemSize,
|
|
183
|
+
palette: palette,
|
|
184
|
+
a11y: list_a11y
|
|
185
|
+
}));
|
|
186
|
+
})));
|
|
187
|
+
}
|
|
188
|
+
}]);
|
|
189
|
+
|
|
190
|
+
return Suggestions;
|
|
191
|
+
}(_react["default"].PureComponent);
|
|
192
|
+
|
|
193
|
+
exports["default"] = Suggestions;
|
|
194
|
+
Suggestions.propTypes = _propTypes.Suggestions_propTypes;
|
|
195
|
+
Suggestions.defaultProps = _defaultProps.Suggestions_defaultProps;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AdvancedGroupMultiSelect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _AdvancedGroupMultiSelect["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "AdvancedMultiSelect", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _AdvancedMultiSelect["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "MultiSelect", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _MultiSelect["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "MultiSelectWithAvatar", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _MultiSelectWithAvatar["default"];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _MultiSelect = _interopRequireDefault(require("./MultiSelect"));
|
|
32
|
+
|
|
33
|
+
var _MultiSelectWithAvatar = _interopRequireDefault(require("./MultiSelectWithAvatar"));
|
|
34
|
+
|
|
35
|
+
var _AdvancedMultiSelect = _interopRequireDefault(require("./AdvancedMultiSelect"));
|
|
36
|
+
|
|
37
|
+
var _AdvancedGroupMultiSelect = _interopRequireDefault(require("./AdvancedGroupMultiSelect"));
|
|
38
|
+
|
|
39
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.PopOverContainer = PopOverContainer;
|
|
9
|
+
exports.PopOverTarget = PopOverTarget;
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _hooks = require("@zohodesk/hooks");
|
|
15
|
+
|
|
16
|
+
var _defaultProps = require("../../PopOver/props/defaultProps");
|
|
17
|
+
|
|
18
|
+
var _propTypes = require("../../PopOver/props/propTypes");
|
|
19
|
+
|
|
20
|
+
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
21
|
+
|
|
22
|
+
var _Layout = require("../Layout");
|
|
23
|
+
|
|
24
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
25
|
+
|
|
26
|
+
var _PopOverModule = _interopRequireDefault(require("../../PopOver/PopOver.module.css"));
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function PopOver(props) {
|
|
35
|
+
var children = props.children,
|
|
36
|
+
isPopupOpen = props.isPopupOpen,
|
|
37
|
+
removeClose = props.removeClose,
|
|
38
|
+
right = props.right,
|
|
39
|
+
left = props.left,
|
|
40
|
+
top = props.top,
|
|
41
|
+
bottom = props.bottom,
|
|
42
|
+
arrowRight = props.arrowRight,
|
|
43
|
+
arrowLeft = props.arrowLeft,
|
|
44
|
+
arrowTop = props.arrowTop,
|
|
45
|
+
arrowBottom = props.arrowBottom,
|
|
46
|
+
isAnimate = props.isAnimate,
|
|
47
|
+
isArrow = props.isArrow,
|
|
48
|
+
arrowPosition = props.arrowPosition,
|
|
49
|
+
position = props.position,
|
|
50
|
+
size = props.size,
|
|
51
|
+
onClick = props.onClick,
|
|
52
|
+
isPopupReady = props.isPopupReady,
|
|
53
|
+
getTargetRef = props.getTargetRef,
|
|
54
|
+
getContainerRef = props.getContainerRef,
|
|
55
|
+
boxPosition = props.boxPosition,
|
|
56
|
+
onPopupOpen = props.onPopupOpen,
|
|
57
|
+
onPopupClose = props.onPopupClose;
|
|
58
|
+
var popOverTarget = (0, _react.useRef)(null);
|
|
59
|
+
var popOverContainer = (0, _react.useRef)(null);
|
|
60
|
+
|
|
61
|
+
var popOverTargetRef = function popOverTargetRef(el) {
|
|
62
|
+
popOverTarget.current = el;
|
|
63
|
+
getTargetRef(el);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var popOverContainerRef = function popOverContainerRef(el) {
|
|
67
|
+
popOverContainer.current = el;
|
|
68
|
+
getContainerRef(el);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var togglePopup = function togglePopup(e) {
|
|
72
|
+
var togglePopup = props.togglePopup;
|
|
73
|
+
togglePopup(e, boxPosition);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
(0, _hooks.useEffectCallOnlyAfterState)(function () {
|
|
77
|
+
isPopupOpen && onPopupOpen && onPopupOpen();
|
|
78
|
+
!isPopupOpen && onPopupClose && onPopupClose();
|
|
79
|
+
}, [isPopupOpen]);
|
|
80
|
+
|
|
81
|
+
var childrens = _react["default"].Children.map(children, function (child, index) {
|
|
82
|
+
var element = index === 1 ? /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
83
|
+
isPopupOpen: isPopupOpen,
|
|
84
|
+
togglePopup: togglePopup,
|
|
85
|
+
removeClose: removeClose,
|
|
86
|
+
right: right,
|
|
87
|
+
left: left,
|
|
88
|
+
top: top,
|
|
89
|
+
bottom: bottom,
|
|
90
|
+
arrowRight: arrowRight,
|
|
91
|
+
arrowLeft: arrowLeft,
|
|
92
|
+
arrowTop: arrowTop,
|
|
93
|
+
arrowBottom: arrowBottom,
|
|
94
|
+
boxPosition: position,
|
|
95
|
+
isAnimate: isAnimate,
|
|
96
|
+
isArrow: isArrow,
|
|
97
|
+
arrowPosition: arrowPosition,
|
|
98
|
+
size: size,
|
|
99
|
+
onClick: onClick,
|
|
100
|
+
getRef: popOverContainerRef,
|
|
101
|
+
isPopupReady: isPopupReady
|
|
102
|
+
}) : /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
103
|
+
isPopupOpen: isPopupOpen,
|
|
104
|
+
togglePopup: togglePopup,
|
|
105
|
+
removeClose: removeClose,
|
|
106
|
+
getRef: popOverTargetRef
|
|
107
|
+
});
|
|
108
|
+
return element;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: _PopOverModule["default"].popup
|
|
113
|
+
}, childrens);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
PopOver.defaultProps = _defaultProps.PopOver_defaultProps;
|
|
117
|
+
PopOver.propTypes = _propTypes.PopOver_propTypes;
|
|
118
|
+
|
|
119
|
+
var _default = (0, _Popup["default"])(PopOver);
|
|
120
|
+
|
|
121
|
+
exports["default"] = _default;
|
|
122
|
+
|
|
123
|
+
function PopOverTarget(props) {
|
|
124
|
+
var children = props.children,
|
|
125
|
+
togglePopup = props.togglePopup;
|
|
126
|
+
|
|
127
|
+
var getRef = function getRef(el) {
|
|
128
|
+
var getRef = props.getRef;
|
|
129
|
+
getRef(el);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
+
className: _PopOverModule["default"].target,
|
|
134
|
+
onClick: togglePopup,
|
|
135
|
+
ref: getRef
|
|
136
|
+
}, children);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
PopOverTarget.propTypes = _propTypes.PopOverTarget_propTypes;
|
|
140
|
+
|
|
141
|
+
function PopOverContainer(props) {
|
|
142
|
+
var children = props.children,
|
|
143
|
+
isPopupOpen = props.isPopupOpen,
|
|
144
|
+
isAnimate = props.isAnimate,
|
|
145
|
+
isArrow = props.isArrow,
|
|
146
|
+
size = props.size,
|
|
147
|
+
arrowPosition = props.arrowPosition,
|
|
148
|
+
boxPosition = props.boxPosition,
|
|
149
|
+
right = props.right,
|
|
150
|
+
left = props.left,
|
|
151
|
+
top = props.top,
|
|
152
|
+
bottom = props.bottom,
|
|
153
|
+
arrowRight = props.arrowRight,
|
|
154
|
+
arrowLeft = props.arrowLeft,
|
|
155
|
+
arrowTop = props.arrowTop,
|
|
156
|
+
arrowBottom = props.arrowBottom,
|
|
157
|
+
animationStyle = props.animationStyle,
|
|
158
|
+
onClick = props.onClick,
|
|
159
|
+
removeClose = props.removeClose;
|
|
160
|
+
|
|
161
|
+
var getRef = function getRef(el) {
|
|
162
|
+
var getRef = props.getRef;
|
|
163
|
+
getRef && getRef(el);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
var handleClick = function handleClick(e) {
|
|
167
|
+
removeClose && removeClose(e);
|
|
168
|
+
onClick && onClick();
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
172
|
+
animationStyle: animationStyle,
|
|
173
|
+
arrowBottom: arrowBottom,
|
|
174
|
+
arrowLeft: arrowLeft,
|
|
175
|
+
arrowPosition: arrowPosition,
|
|
176
|
+
arrowRight: arrowRight,
|
|
177
|
+
arrowTop: arrowTop,
|
|
178
|
+
bottom: bottom,
|
|
179
|
+
boxPosition: boxPosition,
|
|
180
|
+
getRef: getRef,
|
|
181
|
+
isActive: isPopupOpen,
|
|
182
|
+
isAnimate: isAnimate,
|
|
183
|
+
isArrow: isArrow,
|
|
184
|
+
left: left,
|
|
185
|
+
right: right,
|
|
186
|
+
size: size,
|
|
187
|
+
top: top,
|
|
188
|
+
alignBox: "row"
|
|
189
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
190
|
+
flexible: true,
|
|
191
|
+
shrink: true,
|
|
192
|
+
scroll: "vertical"
|
|
193
|
+
}, children));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
PopOverContainer.defaultProps = _defaultProps.PopOverContainer_defaultProps;
|
|
197
|
+
PopOverContainer.propTypes = _propTypes.PopOverContainer_propTypes;
|