@zohodesk/components 1.0.0-temp-196 → 1.0.0-temp-198
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/propValidation_report.html +1 -1
- package/README.md +0 -5
- package/es/MultiSelect/MultiSelect.js +2 -1
- package/es/Provider/LibraryContext.js +3 -15
- package/es/Tag/Tag.js +1 -3
- package/es/Tag/props/defaultProps.js +0 -1
- package/es/Tag/props/propTypes.js +0 -1
- package/es/v1/MultiSelect/MultiSelect.js +2 -1
- package/es/v1/Tag/Tag.js +1 -3
- package/es/v1/Tag/props/defaultProps.js +0 -1
- package/es/v1/Tag/props/propTypes.js +0 -1
- package/lib/MultiSelect/MultiSelect.js +2 -1
- package/lib/Provider/LibraryContext.js +5 -15
- package/lib/Tag/Tag.js +2 -5
- package/lib/Tag/props/defaultProps.js +0 -1
- package/lib/Tag/props/propTypes.js +0 -1
- package/lib/v1/MultiSelect/MultiSelect.js +2 -1
- package/lib/v1/Tag/Tag.js +2 -5
- package/lib/v1/Tag/props/defaultProps.js +0 -1
- package/lib/v1/Tag/props/propTypes.js +0 -1
- package/package.json +1 -1
- package/result.json +1 -1
|
@@ -1038,7 +1038,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1038
1038
|
},
|
|
1039
1039
|
size: boxSize,
|
|
1040
1040
|
alignBox: "row",
|
|
1041
|
-
isResponsivePadding: getFooter ? false : true
|
|
1041
|
+
isResponsivePadding: getFooter ? false : true,
|
|
1042
|
+
dataId: `${dataId}_dropbox`
|
|
1042
1043
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1043
1044
|
flexible: true
|
|
1044
1045
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -5,17 +5,13 @@ import { getLibraryConfig } from './Config';
|
|
|
5
5
|
|
|
6
6
|
const LibraryContextProvider = _ref => {
|
|
7
7
|
let {
|
|
8
|
-
isReducedMotion,
|
|
9
|
-
direction,
|
|
10
|
-
coloredTagVariant,
|
|
11
|
-
isTagTextDefaultColor,
|
|
8
|
+
isReducedMotion = getLibraryConfig('isReducedMotion'),
|
|
9
|
+
direction = getLibraryConfig('direction'),
|
|
12
10
|
children
|
|
13
11
|
} = _ref;
|
|
14
12
|
const [value, setValue] = useState({
|
|
15
13
|
isReducedMotion,
|
|
16
|
-
direction
|
|
17
|
-
coloredTagVariant,
|
|
18
|
-
isTagTextDefaultColor
|
|
14
|
+
direction
|
|
19
15
|
});
|
|
20
16
|
|
|
21
17
|
function setGlobalContext(key, data) {
|
|
@@ -36,14 +32,6 @@ const LibraryContextProvider = _ref => {
|
|
|
36
32
|
LibraryContextProvider.propTypes = {
|
|
37
33
|
children: PropTypes.node.isRequired,
|
|
38
34
|
isReducedMotion: PropTypes.bool,
|
|
39
|
-
coloredTagVariant: PropTypes.oneOf(['bold', 'subtle', 'minimal']),
|
|
40
|
-
isTagTextDefaultColor: PropTypes.bool,
|
|
41
35
|
direction: PropTypes.string
|
|
42
36
|
};
|
|
43
|
-
LibraryContextProvider.defaultProps = {
|
|
44
|
-
isReducedMotion: getLibraryConfig('isReducedMotion'),
|
|
45
|
-
direction: getLibraryConfig('direction'),
|
|
46
|
-
coloredTagVariant: 'bold',
|
|
47
|
-
isTagTextDefaultColor: false
|
|
48
|
-
};
|
|
49
37
|
export default LibraryContextProvider;
|
package/es/Tag/Tag.js
CHANGED
|
@@ -80,7 +80,6 @@ export default class Tag extends PureComponent {
|
|
|
80
80
|
tooltip,
|
|
81
81
|
avatarPalette,
|
|
82
82
|
customClass,
|
|
83
|
-
customAttributes,
|
|
84
83
|
a11y,
|
|
85
84
|
needEffect,
|
|
86
85
|
isReadOnly
|
|
@@ -106,8 +105,7 @@ export default class Tag extends PureComponent {
|
|
|
106
105
|
"data-title": tooltip ? tooltip : text,
|
|
107
106
|
tabIndex: disabled ? '-1' : '0',
|
|
108
107
|
"aria-labelledby": getAriaId,
|
|
109
|
-
"data-selector-id": dataSelectorId
|
|
110
|
-
...customAttributes
|
|
108
|
+
"data-selector-id": dataSelectorId
|
|
111
109
|
}, hasAvatar ? /*#__PURE__*/React.createElement("div", {
|
|
112
110
|
className: style.avatar
|
|
113
111
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
@@ -1039,7 +1039,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
size: boxSize,
|
|
1041
1041
|
alignBox: "row",
|
|
1042
|
-
isResponsivePadding: getFooter ? false : true
|
|
1042
|
+
isResponsivePadding: getFooter ? false : true,
|
|
1043
|
+
dataId: `${dataId}_dropbox`
|
|
1043
1044
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1044
1045
|
flexible: true
|
|
1045
1046
|
}, /*#__PURE__*/React.createElement(Card, {
|
package/es/v1/Tag/Tag.js
CHANGED
|
@@ -41,7 +41,6 @@ function Tag(props) {
|
|
|
41
41
|
tooltip,
|
|
42
42
|
avatarPalette,
|
|
43
43
|
customClass,
|
|
44
|
-
customAttributes,
|
|
45
44
|
a11y,
|
|
46
45
|
needEffect,
|
|
47
46
|
isReadOnly,
|
|
@@ -91,8 +90,7 @@ function Tag(props) {
|
|
|
91
90
|
"data-title": tooltip ? tooltip : text,
|
|
92
91
|
tabIndex: disabled ? '-1' : '0',
|
|
93
92
|
"aria-labelledby": getAriaId,
|
|
94
|
-
"data-selector-id": dataSelectorId
|
|
95
|
-
...customAttributes
|
|
93
|
+
"data-selector-id": dataSelectorId
|
|
96
94
|
}, hasAvatar ? /*#__PURE__*/React.createElement("div", {
|
|
97
95
|
className: style.avatar
|
|
98
96
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
@@ -1114,7 +1114,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1114
1114
|
},
|
|
1115
1115
|
size: boxSize,
|
|
1116
1116
|
alignBox: "row",
|
|
1117
|
-
isResponsivePadding: getFooter ? false : true
|
|
1117
|
+
isResponsivePadding: getFooter ? false : true,
|
|
1118
|
+
dataId: "".concat(dataId, "_dropbox")
|
|
1118
1119
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
1119
1120
|
flexible: true
|
|
1120
1121
|
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
@@ -40,17 +40,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
42
|
var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
43
|
-
var isReducedMotion = _ref.isReducedMotion,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var _ref$isReducedMotion = _ref.isReducedMotion,
|
|
44
|
+
isReducedMotion = _ref$isReducedMotion === void 0 ? (0, _Config.getLibraryConfig)('isReducedMotion') : _ref$isReducedMotion,
|
|
45
|
+
_ref$direction = _ref.direction,
|
|
46
|
+
direction = _ref$direction === void 0 ? (0, _Config.getLibraryConfig)('direction') : _ref$direction,
|
|
47
47
|
children = _ref.children;
|
|
48
48
|
|
|
49
49
|
var _useState = (0, _react.useState)({
|
|
50
50
|
isReducedMotion: isReducedMotion,
|
|
51
|
-
direction: direction
|
|
52
|
-
coloredTagVariant: coloredTagVariant,
|
|
53
|
-
isTagTextDefaultColor: isTagTextDefaultColor
|
|
51
|
+
direction: direction
|
|
54
52
|
}),
|
|
55
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
56
54
|
value = _useState2[0],
|
|
@@ -72,15 +70,7 @@ var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
|
72
70
|
LibraryContextProvider.propTypes = {
|
|
73
71
|
children: _propTypes["default"].node.isRequired,
|
|
74
72
|
isReducedMotion: _propTypes["default"].bool,
|
|
75
|
-
coloredTagVariant: _propTypes["default"].oneOf(['bold', 'subtle', 'minimal']),
|
|
76
|
-
isTagTextDefaultColor: _propTypes["default"].bool,
|
|
77
73
|
direction: _propTypes["default"].string
|
|
78
74
|
};
|
|
79
|
-
LibraryContextProvider.defaultProps = {
|
|
80
|
-
isReducedMotion: (0, _Config.getLibraryConfig)('isReducedMotion'),
|
|
81
|
-
direction: (0, _Config.getLibraryConfig)('direction'),
|
|
82
|
-
coloredTagVariant: 'bold',
|
|
83
|
-
isTagTextDefaultColor: false
|
|
84
|
-
};
|
|
85
75
|
var _default = LibraryContextProvider;
|
|
86
76
|
exports["default"] = _default;
|
package/lib/Tag/Tag.js
CHANGED
|
@@ -31,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
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
33
|
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
35
|
|
|
38
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); } }
|
|
@@ -137,7 +135,6 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
|
|
|
137
135
|
tooltip = _this$props4.tooltip,
|
|
138
136
|
avatarPalette = _this$props4.avatarPalette,
|
|
139
137
|
customClass = _this$props4.customClass,
|
|
140
|
-
customAttributes = _this$props4.customAttributes,
|
|
141
138
|
a11y = _this$props4.a11y,
|
|
142
139
|
needEffect = _this$props4.needEffect,
|
|
143
140
|
isReadOnly = _this$props4.isReadOnly;
|
|
@@ -154,7 +151,7 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
|
|
|
154
151
|
var _a11y$clearLabel = a11y.clearLabel,
|
|
155
152
|
clearLabel = _a11y$clearLabel === void 0 ? 'Delete' : _a11y$clearLabel;
|
|
156
153
|
var isDarkPalette = palette === 'dark';
|
|
157
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
154
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
155
|
className: "".concat(_TagModule["default"].container, " ").concat(needEffect && !isReadOnly ? _TagModule["default"].effect : _TagModule["default"].readonly, " ").concat(active ? "".concat(_TagModule["default"].selected, " ").concat(_TagModule["default"]["active".concat(palette)]) : '', " ").concat(onRemove ? active ? "".concat(_TagModule["default"]["active".concat(size, "Effect")]) : '' : '', " ").concat(_TagModule["default"][size], " ").concat(rounded ? _TagModule["default"].lgRadius : _TagModule["default"].smRadius, " ").concat(_TagModule["default"][palette], " ").concat(disabled ? _TagModule["default"].disabled : '', " ").concat(onSelectTag ? _TagModule["default"].pointer : '', " ").concat(customTag),
|
|
159
156
|
"data-id": active ? "".concat(dataId, "_TagSelected") : "".concat(dataId, "_Tag"),
|
|
160
157
|
"data-test-id": active ? "".concat(dataId, "_TagSelected") : "".concat(dataId, "_Tag"),
|
|
@@ -164,7 +161,7 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
|
|
|
164
161
|
tabIndex: disabled ? '-1' : '0',
|
|
165
162
|
"aria-labelledby": getAriaId,
|
|
166
163
|
"data-selector-id": dataSelectorId
|
|
167
|
-
},
|
|
164
|
+
}, hasAvatar ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
168
165
|
className: _TagModule["default"].avatar
|
|
169
166
|
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
170
167
|
palette: isDarkPalette ? 'info' : avatarPalette,
|
|
@@ -1117,7 +1117,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1117
1117
|
},
|
|
1118
1118
|
size: boxSize,
|
|
1119
1119
|
alignBox: "row",
|
|
1120
|
-
isResponsivePadding: getFooter ? false : true
|
|
1120
|
+
isResponsivePadding: getFooter ? false : true,
|
|
1121
|
+
dataId: "".concat(dataId, "_dropbox")
|
|
1121
1122
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
1122
1123
|
flexible: true
|
|
1123
1124
|
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
package/lib/v1/Tag/Tag.js
CHANGED
|
@@ -31,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
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
33
|
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
34
|
/*
|
|
37
35
|
* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium',
|
|
38
36
|
* 'closedanger', 'closeprimary', 'default', 'danger', 'secondary',
|
|
@@ -65,7 +63,6 @@ function Tag(props) {
|
|
|
65
63
|
tooltip = props.tooltip,
|
|
66
64
|
avatarPalette = props.avatarPalette,
|
|
67
65
|
customClass = props.customClass,
|
|
68
|
-
customAttributes = props.customAttributes,
|
|
69
66
|
a11y = props.a11y,
|
|
70
67
|
needEffect = props.needEffect,
|
|
71
68
|
isReadOnly = props.isReadOnly,
|
|
@@ -104,7 +101,7 @@ function Tag(props) {
|
|
|
104
101
|
var _a11y$clearLabel = a11y.clearLabel,
|
|
105
102
|
clearLabel = _a11y$clearLabel === void 0 ? 'Delete' : _a11y$clearLabel;
|
|
106
103
|
var isDarkPalette = palette === 'dark';
|
|
107
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
104
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
105
|
className: "".concat(_TagModule["default"].container, " ").concat(needEffect && !isReadOnly ? _TagModule["default"].effect : _TagModule["default"].readonly, " ").concat(active ? "".concat(_TagModule["default"].selected, " ").concat(_TagModule["default"]["active".concat(palette)]) : '', " ").concat(onRemove ? active ? "".concat(_TagModule["default"]["active".concat(size, "Effect")]) : '' : '', " ").concat(_TagModule["default"][size], " ").concat(rounded ? _TagModule["default"].lgRadius : _TagModule["default"].smRadius, " ").concat(_TagModule["default"][palette], " ").concat(disabled ? _TagModule["default"].disabled : '', " ").concat(onSelectTag ? _TagModule["default"].pointer : '', " ").concat(customTag),
|
|
109
106
|
"data-id": active ? "".concat(dataId, "_TagSelected") : "".concat(dataId, "_Tag"),
|
|
110
107
|
"data-test-id": active ? "".concat(dataId, "_TagSelected") : "".concat(dataId, "_Tag"),
|
|
@@ -114,7 +111,7 @@ function Tag(props) {
|
|
|
114
111
|
tabIndex: disabled ? '-1' : '0',
|
|
115
112
|
"aria-labelledby": getAriaId,
|
|
116
113
|
"data-selector-id": dataSelectorId
|
|
117
|
-
},
|
|
114
|
+
}, hasAvatar ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
115
|
className: _TagModule["default"].avatar
|
|
119
116
|
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
120
117
|
palette: isDarkPalette ? 'info' : avatarPalette,
|