@zohodesk/components 1.0.0-temp-134 → 1.0.0-temp-136
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 +6 -0
- package/es/DateTime/DateTimePopupHeader.js +1 -1
- package/es/DateTime/DateWidget.js +1 -1
- package/es/DateTime/YearView.js +1 -1
- package/es/DateTime/index.js +1 -1
- package/es/DropBox/DropBox.module.css +0 -1
- package/es/DropDown/index.js +7 -0
- package/es/Layout/index.js +9 -9
- package/es/ListItem/ListItem.js +4 -3
- package/es/ListItem/ListItem.module.css +4 -0
- package/es/ListItem/ListItemWithAvatar.js +4 -3
- package/es/ListItem/ListItemWithCheckBox.js +3 -2
- package/es/ListItem/ListItemWithIcon.js +4 -3
- package/es/ListItem/ListItemWithRadio.js +3 -2
- package/es/ListItem/index.js +6 -0
- package/es/ListItem/props/defaultProps.js +12 -6
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
- package/es/MultiSelect/AdvancedMultiSelect.js +1 -1
- package/es/MultiSelect/MultiSelect.js +6 -19
- package/es/MultiSelect/MultiSelectWithAvatar.js +6 -19
- package/es/MultiSelect/index.js +4 -0
- package/es/MultiSelect/props/defaultProps.js +2 -5
- package/es/MultiSelect/props/propTypes.js +1 -7
- package/es/PopOver/index.js +3 -0
- package/es/Provider/IdProvider.js +8 -7
- package/es/Provider/index.js +4 -0
- package/es/Responsive/index.js +11 -8
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectWithIcon.js +1 -1
- package/es/Select/index.js +4 -0
- package/es/Tab/Tab.module.css +0 -1
- package/es/Tab/Tabs.js +1 -1
- package/es/Tab/Tabs.module.css +0 -1
- package/es/Tag/Tag.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.js +1 -1
- package/es/VelocityAnimation/index.js +2 -0
- package/es/index.js +30 -40
- package/es/semantic/index.js +1 -0
- package/es/utils/css/compileClassNames.js +23 -0
- package/es/utils/css/mergeStyle.js +42 -0
- package/es/utils/css/utils.js +23 -0
- package/es/utils/dropDownUtils.js +2 -3
- package/es/utils/index.js +3 -0
- package/lib/DateTime/DateTimePopupHeader.js +4 -4
- package/lib/DateTime/DateWidget.js +2 -2
- package/lib/DateTime/YearView.js +2 -2
- package/lib/DateTime/index.js +1 -1
- package/lib/DropBox/DropBox.module.css +0 -1
- package/lib/DropDown/index.js +56 -0
- package/lib/Layout/index.js +1 -11
- package/lib/ListItem/ListItem.js +5 -4
- package/lib/ListItem/ListItem.module.css +4 -0
- package/lib/ListItem/ListItemWithAvatar.js +5 -4
- package/lib/ListItem/ListItemWithCheckBox.js +3 -2
- package/lib/ListItem/ListItemWithIcon.js +6 -5
- package/lib/ListItem/ListItemWithRadio.js +3 -2
- package/lib/ListItem/index.js +48 -0
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
- package/lib/MultiSelect/AdvancedMultiSelect.js +2 -2
- package/lib/MultiSelect/MultiSelect.js +7 -20
- package/lib/MultiSelect/MultiSelectWithAvatar.js +7 -20
- package/lib/MultiSelect/index.js +34 -0
- package/lib/MultiSelect/props/defaultProps.js +2 -5
- package/lib/MultiSelect/props/propTypes.js +1 -7
- package/lib/PopOver/index.js +27 -0
- package/lib/Provider/IdProvider.js +8 -8
- package/lib/Provider/index.js +76 -0
- package/lib/Responsive/index.js +45 -22
- package/lib/Select/GroupSelect.js +2 -2
- package/lib/Select/Select.js +2 -2
- package/lib/Select/SelectWithIcon.js +3 -3
- package/lib/Select/index.js +34 -0
- package/lib/Tab/Tab.module.css +0 -1
- package/lib/Tab/Tabs.js +2 -2
- package/lib/Tab/Tabs.module.css +0 -1
- package/lib/Tag/Tag.js +3 -3
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -2
- package/lib/VelocityAnimation/index.js +20 -0
- package/lib/index.js +164 -212
- package/lib/semantic/index.js +13 -0
- package/lib/utils/css/compileClassNames.js +31 -0
- package/lib/utils/css/mergeStyle.js +52 -0
- package/lib/utils/css/utils.js +33 -0
- package/lib/utils/dropDownUtils.js +2 -5
- package/lib/utils/index.js +117 -0
- package/package.json +3 -3
- package/css_error.log +0 -0
package/es/index.js
CHANGED
|
@@ -1,51 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
export { _Layout as Layout };
|
|
3
|
-
export { default as AppContainer } from './AppContainer/AppContainer';
|
|
4
|
-
export { default as Accordion } from './Accordion/Accordion';
|
|
1
|
+
export * from './Accordion';
|
|
5
2
|
export { default as Animation } from './Animation/Animation';
|
|
6
|
-
export { default as
|
|
3
|
+
export { default as AppContainer } from './AppContainer/AppContainer';
|
|
7
4
|
export { default as Avatar } from './Avatar/Avatar';
|
|
8
5
|
export { default as AvatarTeam } from './AvatarTeam/AvatarTeam';
|
|
9
6
|
export { default as Button } from './Button/Button';
|
|
10
7
|
export { default as Buttongroup } from './Buttongroup/Buttongroup';
|
|
11
|
-
export
|
|
12
|
-
export { default as Radio } from './Radio/Radio';
|
|
13
|
-
export { default as Textarea } from './Textarea/Textarea';
|
|
14
|
-
export { default as Label } from './Label/Label';
|
|
15
|
-
export { default as DropDownHeading } from './DropDown/DropDownHeading';
|
|
8
|
+
export * from './Card';
|
|
16
9
|
export { default as CheckBox } from './CheckBox/CheckBox';
|
|
10
|
+
export * from './DateTime';
|
|
11
|
+
export { default as DropBox } from './DropBox/DropBox';
|
|
12
|
+
export * from './DropDown';
|
|
13
|
+
export { default as Heading } from './Heading/Heading';
|
|
14
|
+
export { default as Label } from './Label/Label';
|
|
15
|
+
export * from './Layout';
|
|
16
|
+
export * from './ListItem';
|
|
17
|
+
export { default as Modal } from './Modal/Modal';
|
|
18
|
+
export * from './MultiSelect';
|
|
19
|
+
import * as _PopOver from './PopOver';
|
|
20
|
+
export { _PopOver as PopOver };
|
|
21
|
+
export { default as Popup } from './Popup/Popup';
|
|
22
|
+
import * as _Providers from './Provider';
|
|
23
|
+
export { _Providers as Providers };
|
|
24
|
+
export { default as Radio } from './Radio/Radio';
|
|
25
|
+
export * from './Responsive';
|
|
26
|
+
export { default as ResponsiveDropBox } from './ResponsiveDropBox/ResponsiveDropBox';
|
|
17
27
|
export { default as Ribbon } from './Ribbon/Ribbon';
|
|
18
|
-
export { default as
|
|
28
|
+
export { default as RippleEffect } from './RippleEffect/RippleEffect';
|
|
29
|
+
export * from './Select';
|
|
30
|
+
export { default as Stencils } from './Stencils/Stencils';
|
|
31
|
+
export { default as Switch } from './Switch/Switch';
|
|
19
32
|
export * from './Tab';
|
|
33
|
+
export { default as Tag } from './Tag/Tag';
|
|
34
|
+
export { default as Textarea } from './Textarea/Textarea';
|
|
20
35
|
export { default as TextBox } from './TextBox/TextBox';
|
|
21
36
|
export { default as TextBoxIcon } from './TextBoxIcon/TextBoxIcon';
|
|
22
37
|
export { default as Tooltip } from './Tooltip/Tooltip';
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export { default as MultiSelect } from './MultiSelect/MultiSelect';
|
|
28
|
-
export { default as AdvancedMultiSelect } from './MultiSelect/AdvancedMultiSelect';
|
|
29
|
-
export { default as AdvancedGroupMultiSelect } from './MultiSelect/AdvancedGroupMultiSelect';
|
|
30
|
-
export { default as MultiSelectWithAvatar } from './MultiSelect/MultiSelectWithAvatar';
|
|
31
|
-
export { default as DateWidget } from './DateTime/DateWidget';
|
|
32
|
-
export { default as ListItem } from './ListItem/ListItem';
|
|
33
|
-
export { default as ListItemWithIcon } from './ListItem/ListItemWithIcon';
|
|
34
|
-
export { default as ListItemWithCheckBox } from './ListItem/ListItemWithCheckBox';
|
|
35
|
-
export { default as ListItemWithRadio } from './ListItem/ListItemWithRadio';
|
|
36
|
-
export { default as ListItemWithAvatar } from './ListItem/ListItemWithAvatar';
|
|
37
|
-
export { default as DropBox } from './DropBox/DropBox';
|
|
38
|
-
export { default as PopOver } from './PopOver/PopOver';
|
|
39
|
-
export { default as Stencils } from './Stencils/Stencils';
|
|
40
|
-
export { default as Modal } from './Modal/Modal';
|
|
41
|
-
export * from './Responsive';
|
|
42
|
-
export { default as RippleEffect } from './RippleEffect/RippleEffect';
|
|
43
|
-
export { default as PortalLayer } from './deprecated/PortalLayer/PortalLayer';
|
|
44
|
-
export { default as VelocityAnimation } from './VelocityAnimation/VelocityAnimation/VelocityAnimation';
|
|
45
|
-
export { default as VelocityAnimationGroup } from './VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
|
|
46
|
-
export { Provider } from './Provider/IdProvider';
|
|
47
|
-
|
|
48
|
-
//semantic//
|
|
49
|
-
export { default as SemanticButton } from './semantic/Button/Button';
|
|
50
|
-
export { default as ResponsiveDropBox } from './ResponsiveDropBox/ResponsiveDropBox';
|
|
51
|
-
export { default as Heading } from './Heading/Heading';
|
|
38
|
+
import * as _utils from './utils';
|
|
39
|
+
export { _utils as utils };
|
|
40
|
+
export * from './VelocityAnimation';
|
|
41
|
+
export * from './semantic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SemanticButton } from './Button/Button';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { dataTypes, isDataTypeOf } from './utils';
|
|
2
|
+
const collectClassNames = function (processedClassNameList) {
|
|
3
|
+
for (let index = 0; index < (arguments.length <= 1 ? 0 : arguments.length - 1); index++) {
|
|
4
|
+
let classInfo = index + 1 < 1 || arguments.length <= index + 1 ? undefined : arguments[index + 1];
|
|
5
|
+
if (!classInfo) {
|
|
6
|
+
continue;
|
|
7
|
+
} else if (isDataTypeOf(classInfo, dataTypes.object)) {
|
|
8
|
+
for (let property in classInfo) {
|
|
9
|
+
if (Object.hasOwnProperty.call(classInfo, property) && property !== 'undefined' && property !== 'null' && classInfo[property] && !processedClassNameList.includes(property)) {
|
|
10
|
+
processedClassNameList.push(property);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export default function compileClassNames() {
|
|
17
|
+
let resultClassNameList = [];
|
|
18
|
+
for (var _len = arguments.length, classinfoList = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19
|
+
classinfoList[_key] = arguments[_key];
|
|
20
|
+
}
|
|
21
|
+
collectClassNames(resultClassNameList, ...classinfoList);
|
|
22
|
+
return resultClassNameList.filter(a => a !== '').join(' ');
|
|
23
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const REPLACER_SYMBOL = '$';
|
|
2
|
+
|
|
3
|
+
// $ startWith is used for replace the existing style.
|
|
4
|
+
// all other will be append
|
|
5
|
+
|
|
6
|
+
export default function mergeStyle(defaultStyle, customStyle) {
|
|
7
|
+
let additionalStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
8
|
+
// if(!Object.keys(defaultStyle).includes('base')) {
|
|
9
|
+
// throw new Error(`STYLE CUSTOMIZATION RULE - Your style sheet should have "base" class name for customization`);
|
|
10
|
+
// }
|
|
11
|
+
|
|
12
|
+
return Object.keys(customStyle).reduce((res, next) => {
|
|
13
|
+
if (next.startsWith(REPLACER_SYMBOL)) {
|
|
14
|
+
let styleValue = customStyle[next];
|
|
15
|
+
let styleName = next.replace(REPLACER_SYMBOL, '');
|
|
16
|
+
if (!defaultStyle[styleName] && !additionalStyle.includes(styleName)) {
|
|
17
|
+
// return res;
|
|
18
|
+
throw new Error(`UNKNOWN CLASSNAME DETECTED - Given customStyle's key "${styleName}" is not available in that component style`);
|
|
19
|
+
}
|
|
20
|
+
let val = defaultStyle[styleName];
|
|
21
|
+
Object.keys(res).map(keyName => {
|
|
22
|
+
let styleKey = res[keyName];
|
|
23
|
+
if (styleKey.includes(val)) {
|
|
24
|
+
res[keyName] = styleKey.replace(val, styleValue);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
} else if (defaultStyle[next] || additionalStyle.includes(next)) {
|
|
28
|
+
let val = defaultStyle[next];
|
|
29
|
+
Object.keys(res).map(keyName => {
|
|
30
|
+
if (res[keyName].includes(val)) {
|
|
31
|
+
res[keyName] = res[keyName] + ' ' + customStyle[next];
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
} else if (!defaultStyle[next] && !additionalStyle.includes(next)) {
|
|
35
|
+
// res[next] = customStyle[next];
|
|
36
|
+
`UNKNOWN CLASSNAME DETECTED - Given customStyle's key "${next}" is not available in that component style`;
|
|
37
|
+
}
|
|
38
|
+
return res;
|
|
39
|
+
}, {
|
|
40
|
+
...defaultStyle
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const dataTypes = {
|
|
2
|
+
number: 'number',
|
|
3
|
+
array: 'array',
|
|
4
|
+
string: 'string',
|
|
5
|
+
object: 'object',
|
|
6
|
+
bigint: 'bigint',
|
|
7
|
+
symbol: 'symbol',
|
|
8
|
+
undefined: 'undefined',
|
|
9
|
+
function: 'function',
|
|
10
|
+
boolean: 'boolean'
|
|
11
|
+
};
|
|
12
|
+
export const getDataType = data => {
|
|
13
|
+
let typeofData = typeof data;
|
|
14
|
+
let isArrayDataType = Array.isArray(data);
|
|
15
|
+
if (isArrayDataType) {
|
|
16
|
+
return dataTypes.array;
|
|
17
|
+
} else {
|
|
18
|
+
return dataTypes[typeofData];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const isDataTypeOf = (data, type) => {
|
|
22
|
+
return getDataType(data) === type;
|
|
23
|
+
};
|
|
@@ -21,10 +21,9 @@ const getSelectedValue = props => getIsEmptyValue(props.selectedValue) ? '' : pr
|
|
|
21
21
|
const getSelectedFormatOptions = props => props.selectedFormatOptions || dummyObj;
|
|
22
22
|
export const getPrefixText = props => props.prefixText || '';
|
|
23
23
|
const getIsStartWithSearch = props => props.isStartsWithSearch;
|
|
24
|
-
const getIsNeedTick = props => props.isNeedTick;
|
|
25
24
|
const getDisabledOptions = props => props.disabledOptions || dummyArray;
|
|
26
25
|
const getListItemProps = props => props.listItemProps || '';
|
|
27
|
-
export const makeGetMultiSelectFilterSuggestions = () => createSelector([getOptions, getSelectedOptionsSel, getSearchStr, getNeedSearch, getIsStartWithSearch
|
|
26
|
+
export const makeGetMultiSelectFilterSuggestions = () => createSelector([getOptions, getSelectedOptionsSel, getSearchStr, getNeedSearch, getIsStartWithSearch], (options, selectedOptions, searchStr, needSearch, isStartsWithSearch) => {
|
|
28
27
|
const suggestions = [];
|
|
29
28
|
const suggestionIds = [];
|
|
30
29
|
options.forEach(option => {
|
|
@@ -35,7 +34,7 @@ export const makeGetMultiSelectFilterSuggestions = () => createSelector([getOpti
|
|
|
35
34
|
const valueString = getSearchString(value);
|
|
36
35
|
const searchString = getSearchString(searchStr);
|
|
37
36
|
const isMatch = needSearch ? isStartsWithSearch ? valueString.startsWith(searchString) : valueString.indexOf(searchString) !== -1 : true;
|
|
38
|
-
if (selectedOptions.indexOf(id) === -1 && isMatch
|
|
37
|
+
if (selectedOptions.indexOf(id) === -1 && isMatch) {
|
|
39
38
|
suggestions.push(option);
|
|
40
39
|
suggestionIds.push(id);
|
|
41
40
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as compileClassNames } from './css/compileClassNames';
|
|
2
|
+
export { default as mergeStyle } from './css/mergeStyle';
|
|
3
|
+
export { stopAllEventPropagation, capitalize, getFullName, bytesToSize, getMemSize, checkIsImageFile, getFullDateString, format12Hour, getDateOnly, doAfterScrollEnd, debounce, throttle, getElementSpace, getSearchString, findScrollEnd, isTextSelected } from './Common';
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _Layout = require("../Layout");
|
|
10
|
-
var
|
|
10
|
+
var _icons = require("@zohodesk/icons");
|
|
11
11
|
var _Heading = _interopRequireDefault(require("../Heading/Heading"));
|
|
12
12
|
var _DateTimeModule = _interopRequireDefault(require("./DateTime.module.css"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -97,7 +97,7 @@ var DateTimePopupHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
97
97
|
a11y: {
|
|
98
98
|
tabindex: '0'
|
|
99
99
|
}
|
|
100
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(
|
|
100
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
101
101
|
name: "ZD-GN-dropdown",
|
|
102
102
|
size: "12",
|
|
103
103
|
iconClass: _DateTimeModule["default"].downArrow
|
|
@@ -110,7 +110,7 @@ var DateTimePopupHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
110
110
|
type: "previousMonth",
|
|
111
111
|
ariaLabel: "prevMonth",
|
|
112
112
|
tabindex: "0"
|
|
113
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
114
114
|
name: "ZD-arrowLeft3",
|
|
115
115
|
isBold: true
|
|
116
116
|
})), /*#__PURE__*/_react["default"].createElement(Span, {
|
|
@@ -121,7 +121,7 @@ var DateTimePopupHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
121
121
|
className: _DateTimeModule["default"].navigation,
|
|
122
122
|
ariaLabel: "nextMonth",
|
|
123
123
|
tabindex: "0"
|
|
124
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
124
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
125
125
|
name: "ZD-arrowRight3",
|
|
126
126
|
isBold: true
|
|
127
127
|
}))) : null);
|
|
@@ -11,7 +11,7 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
11
11
|
var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
|
|
12
12
|
var _DateTime = _interopRequireDefault(require("./DateTime"));
|
|
13
13
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
14
|
-
var
|
|
14
|
+
var _icons = require("@zohodesk/icons");
|
|
15
15
|
var _Layout = require("../Layout");
|
|
16
16
|
var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
|
|
17
17
|
var _DateWidgetModule = _interopRequireDefault(require("./DateWidget.module.css"));
|
|
@@ -962,7 +962,7 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
962
962
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
963
963
|
align: "both",
|
|
964
964
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
|
965
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
965
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
966
966
|
name: "ZD-datepicker",
|
|
967
967
|
size: "12"
|
|
968
968
|
})))), isReadOnly || isDisabled ? null : /*#__PURE__*/_react["default"].createElement(_DateTime["default"], {
|
package/lib/DateTime/YearView.js
CHANGED
|
@@ -10,7 +10,7 @@ var _propTypes = require("./props/propTypes");
|
|
|
10
10
|
var _defaultProps = require("./props/defaultProps");
|
|
11
11
|
var _virtualizer = require("@zohodesk/virtualizer");
|
|
12
12
|
var _Layout = require("../Layout");
|
|
13
|
-
var
|
|
13
|
+
var _icons = require("@zohodesk/icons");
|
|
14
14
|
var _Heading = _interopRequireDefault(require("../Heading/Heading"));
|
|
15
15
|
var _YearViewModule = _interopRequireDefault(require("./YearView.module.css"));
|
|
16
16
|
var _dateFormatUtils = require("./dateFormatUtils");
|
|
@@ -79,7 +79,7 @@ var Year = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
79
79
|
tabindex: '0'
|
|
80
80
|
},
|
|
81
81
|
tagName: "h4"
|
|
82
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
82
|
+
})), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
83
83
|
name: "ZD-arrowDownSingle",
|
|
84
84
|
size: "7",
|
|
85
85
|
isBold: true,
|
package/lib/DateTime/index.js
CHANGED
|
@@ -9,5 +9,5 @@ Object.defineProperty(exports, "DateWidget", {
|
|
|
9
9
|
return _DateWidget["default"];
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var _DateWidget = _interopRequireDefault(require("./DateWidget
|
|
12
|
+
var _DateWidget = _interopRequireDefault(require("./DateWidget"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "DropDown", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _DropDown["default"];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "DropDownHeading", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _DropDownHeading["default"];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "DropDownItem", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _DropDownItem["default"];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "DropDownItemContainer", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _DropDown.DropDownItemContainer;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "DropDownSearch", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function get() {
|
|
34
|
+
return _DropDownSearch["default"];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "DropDownSeparator", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function get() {
|
|
40
|
+
return _DropDownSeparator["default"];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "DropDownTarget", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _DropDown.DropDownTarget;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
var _DropDown = _interopRequireWildcard(require("./DropDown"));
|
|
50
|
+
var _DropDownHeading = _interopRequireDefault(require("./DropDownHeading"));
|
|
51
|
+
var _DropDownItem = _interopRequireDefault(require("./DropDownItem"));
|
|
52
|
+
var _DropDownSearch = _interopRequireDefault(require("./DropDownSearch"));
|
|
53
|
+
var _DropDownSeparator = _interopRequireDefault(require("./DropDownSeparator"));
|
|
54
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
55
|
+
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); }
|
|
56
|
+
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; }
|
package/lib/Layout/index.js
CHANGED
|
@@ -15,16 +15,6 @@ Object.defineProperty(exports, "Container", {
|
|
|
15
15
|
return _Container["default"];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
exports.Layout = void 0;
|
|
19
18
|
var _Container = _interopRequireDefault(require("./Container"));
|
|
20
19
|
var _Box = _interopRequireDefault(require("./Box"));
|
|
21
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
22
|
-
var Layout = {
|
|
23
|
-
docs: {
|
|
24
|
-
componentGroup: 'Layout',
|
|
25
|
-
folderName: 'Style Guide',
|
|
26
|
-
external: true,
|
|
27
|
-
description: ' '
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.Layout = Layout;
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
package/lib/ListItem/ListItem.js
CHANGED
|
@@ -10,7 +10,7 @@ var _Layout = require("../Layout");
|
|
|
10
10
|
var _ListContainer = _interopRequireDefault(require("./ListContainer"));
|
|
11
11
|
var _defaultProps = require("./props/defaultProps");
|
|
12
12
|
var _propTypes = require("./props/propTypes");
|
|
13
|
-
var
|
|
13
|
+
var _icons = require("@zohodesk/icons");
|
|
14
14
|
var _ListItemModule = _interopRequireDefault(require("./ListItem.module.css"));
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
16
|
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); }
|
|
@@ -91,7 +91,8 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
91
91
|
dataSelectorId = _this$props4.dataSelectorId,
|
|
92
92
|
a11y = _this$props4.a11y,
|
|
93
93
|
customClass = _this$props4.customClass,
|
|
94
|
-
customProps = _this$props4.customProps
|
|
94
|
+
customProps = _this$props4.customProps,
|
|
95
|
+
isMultiLineNeeded = _this$props4.isMultiLineNeeded;
|
|
95
96
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
96
97
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
97
98
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -129,7 +130,7 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
129
130
|
}, ContainerProps), value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
130
131
|
shrink: true,
|
|
131
132
|
adjust: true,
|
|
132
|
-
className: _ListItemModule["default"].value
|
|
133
|
+
className: isMultiLineNeeded ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
133
134
|
}, value) : null, children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
134
135
|
shrink: true,
|
|
135
136
|
adjust: true,
|
|
@@ -139,7 +140,7 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
139
140
|
"aria-hidden": ariaHidden,
|
|
140
141
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
141
142
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
142
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
143
144
|
name: "ZD-ticknew",
|
|
144
145
|
size: "8"
|
|
145
146
|
})) : null);
|
|
@@ -12,7 +12,7 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
12
12
|
var _propTypes = require("./props/propTypes");
|
|
13
13
|
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
14
14
|
var _AvatarTeam = _interopRequireDefault(require("../AvatarTeam/AvatarTeam"));
|
|
15
|
-
var
|
|
15
|
+
var _icons = require("@zohodesk/icons");
|
|
16
16
|
var _ListItemModule = _interopRequireDefault(require("./ListItem.module.css"));
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
18
|
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); }
|
|
@@ -95,7 +95,8 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
95
95
|
avatarPalette = _this$props4.avatarPalette,
|
|
96
96
|
a11y = _this$props4.a11y,
|
|
97
97
|
customClass = _this$props4.customClass,
|
|
98
|
-
customProps = _this$props4.customProps
|
|
98
|
+
customProps = _this$props4.customProps,
|
|
99
|
+
isMultiLineNeeded = _this$props4.isMultiLineNeeded;
|
|
99
100
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
100
101
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
101
102
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -155,13 +156,13 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
155
156
|
flexible: true,
|
|
156
157
|
shrink: true,
|
|
157
158
|
"data-title": isDisabled ? null : title,
|
|
158
|
-
className: _ListItemModule["default"].value
|
|
159
|
+
className: isMultiLineNeeded ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
159
160
|
}, value) : null, needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
160
161
|
className: _ListItemModule["default"].tickIcon,
|
|
161
162
|
"aria-hidden": ariaHidden,
|
|
162
163
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
163
164
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
164
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
165
166
|
name: "ZD-ticknew",
|
|
166
167
|
size: "8"
|
|
167
168
|
})) : null);
|
|
@@ -85,7 +85,8 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
85
85
|
disableTitle = _this$props4.disableTitle,
|
|
86
86
|
a11y = _this$props4.a11y,
|
|
87
87
|
customClass = _this$props4.customClass,
|
|
88
|
-
customProps = _this$props4.customProps
|
|
88
|
+
customProps = _this$props4.customProps,
|
|
89
|
+
isMultiLineNeeded = _this$props4.isMultiLineNeeded;
|
|
89
90
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
90
91
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
91
92
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -128,7 +129,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
128
129
|
flexible: true,
|
|
129
130
|
shrink: true,
|
|
130
131
|
"data-title": isDisabled ? null : title,
|
|
131
|
-
className: _ListItemModule["default"].value
|
|
132
|
+
className: isMultiLineNeeded ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
132
133
|
}, value));
|
|
133
134
|
}
|
|
134
135
|
}]);
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _Layout = require("../Layout");
|
|
10
|
-
var
|
|
10
|
+
var _icons = require("@zohodesk/icons");
|
|
11
11
|
var _ListContainer = _interopRequireDefault(require("./ListContainer"));
|
|
12
12
|
var _defaultProps = require("./props/defaultProps");
|
|
13
13
|
var _propTypes = require("./props/propTypes");
|
|
@@ -93,7 +93,8 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
disableTitle = _this$props4.disableTitle,
|
|
94
94
|
a11y = _this$props4.a11y,
|
|
95
95
|
customClass = _this$props4.customClass,
|
|
96
|
-
customProps = _this$props4.customProps
|
|
96
|
+
customProps = _this$props4.customProps,
|
|
97
|
+
isMultiLineNeeded = _this$props4.isMultiLineNeeded;
|
|
97
98
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
98
99
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
99
100
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -127,7 +128,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
127
128
|
"aria-hidden": true,
|
|
128
129
|
className: _ListItemModule["default"].iconBox,
|
|
129
130
|
dataId: dataId ? "".concat(dataId, "_Icon") : "".concat(value.toLowerCase().replace("'", '_'), "_Icon")
|
|
130
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
131
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
131
132
|
iconClass: iconClass,
|
|
132
133
|
name: iconName,
|
|
133
134
|
size: iconSize
|
|
@@ -136,7 +137,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
136
137
|
}) : null, value && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
137
138
|
flexible: true,
|
|
138
139
|
shrink: true,
|
|
139
|
-
className: _ListItemModule["default"].value,
|
|
140
|
+
className: isMultiLineNeeded ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value,
|
|
140
141
|
"data-title": isDisabled ? null : title,
|
|
141
142
|
dataId: "".concat(dataIdString, "_Text")
|
|
142
143
|
}, value), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -144,7 +145,7 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
144
145
|
"aria-hidden": ariaHidden,
|
|
145
146
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
146
147
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|
|
147
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
148
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
148
149
|
name: "ZD-ticknew",
|
|
149
150
|
size: "8"
|
|
150
151
|
})) : null);
|
|
@@ -86,7 +86,8 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
86
86
|
disableTitle = _this$props4.disableTitle,
|
|
87
87
|
a11y = _this$props4.a11y,
|
|
88
88
|
customClass = _this$props4.customClass,
|
|
89
|
-
customProps = _this$props4.customProps
|
|
89
|
+
customProps = _this$props4.customProps,
|
|
90
|
+
isMultiLineNeeded = _this$props4.isMultiLineNeeded;
|
|
90
91
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
91
92
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
92
93
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -130,7 +131,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
130
131
|
flexible: true,
|
|
131
132
|
shrink: true,
|
|
132
133
|
"data-title": disableTitle ? null : title,
|
|
133
|
-
className: _ListItemModule["default"].value
|
|
134
|
+
className: isMultiLineNeeded ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
134
135
|
}, value));
|
|
135
136
|
}
|
|
136
137
|
}]);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ListContainer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ListContainer["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ListItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _ListItem["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ListItemWithAvatar", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _ListItemWithAvatar["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "ListItemWithCheckBox", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _ListItemWithCheckBox["default"];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "ListItemWithIcon", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _ListItemWithIcon["default"];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "ListItemWithRadio", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _ListItemWithRadio["default"];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var _ListContainer = _interopRequireDefault(require("./ListContainer"));
|
|
43
|
+
var _ListItem = _interopRequireDefault(require("./ListItem"));
|
|
44
|
+
var _ListItemWithAvatar = _interopRequireDefault(require("./ListItemWithAvatar"));
|
|
45
|
+
var _ListItemWithCheckBox = _interopRequireDefault(require("./ListItemWithCheckBox"));
|
|
46
|
+
var _ListItemWithIcon = _interopRequireDefault(require("./ListItemWithIcon"));
|
|
47
|
+
var _ListItemWithRadio = _interopRequireDefault(require("./ListItemWithRadio"));
|
|
48
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|