@zohodesk/components 1.0.0-alpha-226 → 1.0.0-alpha-229
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 +20 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +2 -0
- package/assets/Appearance/default/mode/defaultMode.module.css +2 -0
- package/es/Animation/Animation.js +7 -8
- package/es/Avatar/Avatar.js +10 -10
- package/es/Button/Button.js +15 -16
- package/es/Button/Button.module.css +6 -2
- package/es/Card/Card.js +4 -5
- package/es/DateTime/DateWidget.module.css +0 -4
- package/es/DropBox/DropBox.js +2 -2
- package/es/ListItem/ListContainer.js +3 -8
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -4
- package/es/MultiSelect/AdvancedMultiSelect.js +21 -7
- package/es/MultiSelect/AdvancedMultiSelect.module.css +8 -8
- package/es/MultiSelect/MultiSelect.js +18 -7
- package/es/MultiSelect/MultiSelect.module.css +8 -13
- package/es/MultiSelect/MultiSelectWithAvatar.js +6 -3
- package/es/MultiSelect/SelectedOptions.js +3 -2
- package/es/PopOver/PopOver.js +19 -20
- package/es/Popup/Popup.js +1 -1
- package/es/Radio/Radio.js +1 -2
- package/es/Radio/Radio.module.css +2 -2
- package/es/Ribbon/Ribbon.js +8 -8
- package/es/RippleEffect/RippleEffect.js +7 -4
- package/es/RippleEffect/RippleEffect.module.css +3 -0
- package/es/Select/Select.module.css +1 -1
- package/es/Select/SelectWithAvatar.js +7 -4
- package/es/Stencils/Stencils.js +5 -6
- package/es/Tag/Tag.js +10 -4
- package/es/Tag/Tag.module.css +14 -11
- package/es/TextBoxIcon/TextBoxIcon.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.module.css +5 -2
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +1 -1
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -1
- package/es/utils/dropDownUtils.js +39 -1
- package/lib/Animation/Animation.js +7 -8
- package/lib/Avatar/Avatar.js +10 -10
- package/lib/Button/Button.js +15 -16
- package/lib/Button/Button.module.css +6 -2
- package/lib/Card/Card.js +4 -5
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/DropBox/DropBox.js +6 -2
- package/lib/ListItem/ListContainer.js +3 -8
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -4
- package/lib/MultiSelect/AdvancedMultiSelect.js +21 -6
- package/lib/MultiSelect/AdvancedMultiSelect.module.css +8 -8
- package/lib/MultiSelect/MultiSelect.js +18 -6
- package/lib/MultiSelect/MultiSelect.module.css +8 -13
- package/lib/MultiSelect/MultiSelectWithAvatar.js +6 -3
- package/lib/MultiSelect/SelectedOptions.js +3 -2
- package/lib/PopOver/PopOver.js +19 -20
- package/lib/Popup/Popup.js +32 -29
- package/lib/Radio/Radio.js +1 -3
- package/lib/Radio/Radio.module.css +2 -2
- package/lib/Ribbon/Ribbon.js +8 -8
- package/lib/RippleEffect/RippleEffect.js +7 -4
- package/lib/RippleEffect/RippleEffect.module.css +3 -0
- package/lib/Select/Select.module.css +1 -1
- package/lib/Select/SelectWithAvatar.js +7 -4
- package/lib/Stencils/Stencils.js +5 -6
- package/lib/Tag/Tag.js +10 -4
- package/lib/Tag/Tag.module.css +14 -11
- package/lib/TextBoxIcon/TextBoxIcon.js +1 -1
- package/lib/TextBoxIcon/TextBoxIcon.module.css +5 -2
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +5 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -3
- package/lib/utils/dropDownUtils.js +45 -2
- package/package.json +4 -4
package/lib/Tag/Tag.module.css
CHANGED
|
@@ -50,9 +50,12 @@
|
|
|
50
50
|
}
|
|
51
51
|
.disabled {
|
|
52
52
|
pointer-events: none;
|
|
53
|
-
--tag_cursor: not-allowed;
|
|
54
53
|
--tag_text_color: var(--zdt_tag_disabled_text);
|
|
55
54
|
}
|
|
55
|
+
.readonly,
|
|
56
|
+
.disabled {
|
|
57
|
+
--tag_cursor: not-allowed;
|
|
58
|
+
}
|
|
56
59
|
.pointer {
|
|
57
60
|
--tag_cursor: pointer;
|
|
58
61
|
}
|
|
@@ -158,11 +161,11 @@
|
|
|
158
161
|
.danger {
|
|
159
162
|
--tag_bg_color: var(--zdt_tag_default_danger_bg);
|
|
160
163
|
}
|
|
161
|
-
.default:hover {
|
|
164
|
+
.effect.default:hover {
|
|
162
165
|
--tag_bg_color: var(--zdt_tag_default_hover_bg);
|
|
163
166
|
}
|
|
164
167
|
.activedefault,
|
|
165
|
-
.activedefault:hover {
|
|
168
|
+
.effect.activedefault:hover {
|
|
166
169
|
--tag_bg_color: var(--zdt_tag_active_default_bg);
|
|
167
170
|
}
|
|
168
171
|
.activeprimaryClose,
|
|
@@ -170,11 +173,11 @@
|
|
|
170
173
|
--tag_closeicon_bg_color: var(--zdt_tag_primary_bg);
|
|
171
174
|
}
|
|
172
175
|
|
|
173
|
-
.danger:hover {
|
|
176
|
+
.effect.danger:hover {
|
|
174
177
|
--tag_bg_color: var(--zdt_tag_danger_hover_bg);
|
|
175
178
|
}
|
|
176
179
|
.activedanger,
|
|
177
|
-
.activedanger:hover {
|
|
180
|
+
.effect.activedanger:hover {
|
|
178
181
|
--tag_bg_color: var(--zdt_tag_danger_hover_bg);
|
|
179
182
|
}
|
|
180
183
|
.activedangerClose,
|
|
@@ -187,7 +190,7 @@
|
|
|
187
190
|
--tag_text_color: var(--zdt_tag_secondary_text);
|
|
188
191
|
}
|
|
189
192
|
.activesecondary,
|
|
190
|
-
.secondary:hover {
|
|
193
|
+
.effect.secondary:hover {
|
|
191
194
|
--tag_bg_color: var(--zdt_tag_secondary_hover_bg);
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -196,12 +199,12 @@
|
|
|
196
199
|
--tag_border_width: 1px;
|
|
197
200
|
--tag_border_color: var(--zdt_tag_pure_border);
|
|
198
201
|
}
|
|
199
|
-
.pureDotted:hover {
|
|
202
|
+
.effect.pureDotted:hover {
|
|
200
203
|
--tag_bg_color: var(--zdt_tag_pure_hover_bg);
|
|
201
204
|
--tag_border_color: var(--zdt_tag_pure_hover_border);
|
|
202
205
|
}
|
|
203
206
|
.activepureDotted,
|
|
204
|
-
.activepureDotted:hover {
|
|
207
|
+
.effect.activepureDotted:hover {
|
|
205
208
|
--tag_bg_color: var(--zdt_tag_pure_bg);
|
|
206
209
|
}
|
|
207
210
|
|
|
@@ -210,10 +213,10 @@
|
|
|
210
213
|
--tag_border_width: 1px;
|
|
211
214
|
--tag_border_color: var(--zdt_tag_primary_border);
|
|
212
215
|
}
|
|
213
|
-
.primaryDotted:hover,
|
|
216
|
+
.effect.primaryDotted:hover,
|
|
214
217
|
.activeprimaryDotted,
|
|
215
218
|
.primary,
|
|
216
|
-
.primary:hover {
|
|
219
|
+
.effect.primary:hover {
|
|
217
220
|
--tag_bg_color: var(--zdt_tag_active_default_bg);
|
|
218
221
|
}
|
|
219
222
|
|
|
@@ -228,7 +231,7 @@
|
|
|
228
231
|
--tag_bg_color: var(--zdt_tag_dark_bg);
|
|
229
232
|
--tag_text_color: var(--zdt_tag_dark_text);
|
|
230
233
|
}
|
|
231
|
-
.dark:hover {
|
|
234
|
+
.effect.dark:hover {
|
|
232
235
|
--tag_bg_color: var(--zdt_tag_dark_hover_bg);
|
|
233
236
|
--tag_text_color: var(--zdt_tag_dark_hover_text);
|
|
234
237
|
}
|
|
@@ -144,7 +144,7 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
144
144
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
145
145
|
alignBox: "row",
|
|
146
146
|
isCover: false,
|
|
147
|
-
className: "".concat(_TextBoxIconModule["default"].container, " ").concat(isDisabled ? _TextBoxIconModule["default"].disabled : isReadOnly ? needEffect ? _TextBoxIconModule["default"].effect :
|
|
147
|
+
className: "".concat(_TextBoxIconModule["default"].container, " ").concat(isDisabled ? _TextBoxIconModule["default"].disabled : isReadOnly ? needEffect ? _TextBoxIconModule["default"].effect : _TextBoxIconModule["default"].readonly : _TextBoxIconModule["default"].effect, " ").concat(isActive || isFocus ? _TextBoxIconModule["default"].effectFocused : '', " ").concat(customTBoxWrap, " ").concat(iconOnHover && (isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? _TextBoxIconModule["default"].iconOnHoverStyle : ''),
|
|
148
148
|
"data-title": isDisabled ? title : ''
|
|
149
149
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
150
150
|
flexible: true
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
composes: varClass;
|
|
13
13
|
position: relative;
|
|
14
14
|
}
|
|
15
|
-
.disabled {
|
|
16
|
-
|
|
15
|
+
.disabled,.readonly {
|
|
16
|
+
--textboxicon_icon_cursor: not-allowed;
|
|
17
|
+
}
|
|
18
|
+
.disabled, .readonly {
|
|
19
|
+
cursor: not-allowed;
|
|
17
20
|
}
|
|
18
21
|
.icon {
|
|
19
22
|
composes: offSelection from '../common/common.module.css';
|
|
@@ -63,9 +63,11 @@ var VelocityAnimation = /*#__PURE__*/function (_React$Component) {
|
|
|
63
63
|
isCustomized = _this$props.isCustomized,
|
|
64
64
|
needUIPack = _this$props.needUIPack,
|
|
65
65
|
isFlex = _this$props.isFlex;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
|
|
67
|
+
var _ref = this.context || {},
|
|
68
|
+
direction = _ref.direction,
|
|
69
|
+
isReducedMotion = _ref.isReducedMotion;
|
|
70
|
+
|
|
69
71
|
var enterAnimationObj = {
|
|
70
72
|
fade: 'transition.fadeIn',
|
|
71
73
|
slideDown: 'slideDown',
|
|
@@ -80,9 +80,11 @@ var VelocityAnimationGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
80
80
|
isCustomized = _this$props.isCustomized,
|
|
81
81
|
name = _this$props.name,
|
|
82
82
|
needUIPack = _this$props.needUIPack;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
|
|
84
|
+
var _ref = this.context || {},
|
|
85
|
+
direction = _ref.direction,
|
|
86
|
+
isReducedMotion = _ref.isReducedMotion;
|
|
87
|
+
|
|
86
88
|
var childProps = clearProps(this.props);
|
|
87
89
|
var enterAnimationObj = {
|
|
88
90
|
fade: 'transition.fadeIn',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.optionIdGrouping = exports.makeObjectConcat = exports.makeGetSelectedValueText = exports.makeGetOptionIdChange = exports.makeGetMultiSelectSelectedOptions = exports.makeGetMultiSelectFilterSuggestions = exports.makeGetGroupSelectOptions = exports.makeGetGroupSelectFilterSuggestions = exports.makeFormatOptions = exports.getValueField = exports.getTextField = exports.getPrefixText = exports.getOptions = exports.getOptionType = exports.getImageField = exports.getIconSize = exports.getIconName = exports.filterSelectedOptions = exports.extractOptionId = exports.dummyObj = exports.dummyArray = void 0;
|
|
6
|
+
exports.optionIdGrouping = exports.makeObjectConcat = exports.makeGetSelectedValueText = exports.makeGetOptionIdChange = exports.makeGetMultiSelectSelectedOptions = exports.makeGetMultiSelectFilterSuggestions = exports.makeGetIsShowClearIcon = exports.makeGetGroupSelectOptions = exports.makeGetGroupSelectFilterSuggestions = exports.makeFormatOptions = exports.getValueField = exports.getTextField = exports.getPrefixText = exports.getOptions = exports.getOptionType = exports.getImageField = exports.getIconSize = exports.getIconName = exports.filterSelectedOptions = exports.extractOptionId = exports.dummyObj = exports.dummyArray = void 0;
|
|
7
7
|
|
|
8
8
|
var _reselect = require("reselect");
|
|
9
9
|
|
|
@@ -562,4 +562,47 @@ var filterSelectedOptions = function filterSelectedOptions() {
|
|
|
562
562
|
};
|
|
563
563
|
};
|
|
564
564
|
|
|
565
|
-
exports.filterSelectedOptions = filterSelectedOptions;
|
|
565
|
+
exports.filterSelectedOptions = filterSelectedOptions;
|
|
566
|
+
|
|
567
|
+
var makeGetIsShowClearIcon = function makeGetIsShowClearIcon() {
|
|
568
|
+
return (0, _reselect.createSelector)([getSelectedOptionsSel, getDisabledOptions], function (selectedOptions, disabledOptions) {
|
|
569
|
+
var countForShowClear = 2;
|
|
570
|
+
var enabledOptionsLength = 0;
|
|
571
|
+
var isShowClearIcon = selectedOptions.length >= countForShowClear;
|
|
572
|
+
|
|
573
|
+
if (disabledOptions.length) {
|
|
574
|
+
var isHaveEnabledOptions = false;
|
|
575
|
+
var isAllDisabled = disabledOptions.length === selectedOptions.length;
|
|
576
|
+
|
|
577
|
+
if (!isAllDisabled) {
|
|
578
|
+
isHaveEnabledOptions = selectedOptions.some(function (option) {
|
|
579
|
+
var _ref5 = option || {},
|
|
580
|
+
_ref5$isDisabled = _ref5.isDisabled,
|
|
581
|
+
isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled;
|
|
582
|
+
|
|
583
|
+
if (!isDisabled) {
|
|
584
|
+
enabledOptionsLength += 1;
|
|
585
|
+
|
|
586
|
+
if (enabledOptionsLength === countForShowClear) {
|
|
587
|
+
return true;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
return false;
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
return {
|
|
598
|
+
isShowClearIcon: isAllDisabled ? !isAllDisabled : isHaveEnabledOptions
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
return {
|
|
603
|
+
isShowClearIcon: isShowClearIcon
|
|
604
|
+
};
|
|
605
|
+
});
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
exports.makeGetIsShowClearIcon = makeGetIsShowClearIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-alpha-
|
|
3
|
+
"version": "1.0.0-alpha-229",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"selectn": "1.1.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@zohodesk/icons": "1.0.0-beta.92",
|
|
52
|
-
"@zohodesk/variables": "1.0.0-beta.29",
|
|
53
|
-
"@zohodesk/svg": "1.0.0-beta.41",
|
|
51
|
+
"@zohodesk/icons": "^1.0.0-beta.92",
|
|
52
|
+
"@zohodesk/variables": "^1.0.0-beta.29",
|
|
53
|
+
"@zohodesk/svg": "^1.0.0-beta.41",
|
|
54
54
|
"@zohodesk/virtualizer": "^1.0.3",
|
|
55
55
|
"velocity-react": "^1.4.1",
|
|
56
56
|
"react-sortable-hoc": "^0.8.3"
|