@zohodesk/components 1.3.3 → 1.3.4
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 +7 -0
- package/es/MultiSelect/MultiSelect.js +15 -2
- package/es/MultiSelect/props/propTypes.js +3 -1
- package/es/Select/Select.js +15 -6
- package/es/Select/props/propTypes.js +3 -1
- package/es/TextBoxIcon/TextBoxIcon.js +6 -2
- package/es/TextBoxIcon/props/propTypes.js +2 -1
- package/lib/MultiSelect/MultiSelect.js +16 -3
- package/lib/MultiSelect/props/propTypes.js +3 -1
- package/lib/Select/Select.js +16 -7
- package/lib/Select/props/propTypes.js +3 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +6 -2
- package/lib/TextBoxIcon/props/propTypes.js +2 -1
- package/package.json +1 -1
- package/result.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
# 1.3.4
|
|
7
|
+
|
|
8
|
+
- **MultiSelect** - `renderCustomClearComponent` and `renderCustomToggleIndicator` props supported to customize the clear and toggle indicatior icon.
|
|
9
|
+
- **Select** - `renderCustomSearchClearComponent` and `renderCustomToggleIndicator` props supported to customize the search input clear and toggle indicatior icon.
|
|
10
|
+
- **TextBoxIcon** - `renderCustomClearComponent` prop supported to customize the input clear.
|
|
11
|
+
|
|
5
12
|
# 1.3.3
|
|
6
13
|
|
|
7
14
|
- **Stencils**
|
|
@@ -882,7 +882,10 @@ export class MultiSelectComponent extends React.Component {
|
|
|
882
882
|
isPopupOpen,
|
|
883
883
|
ariaErrorId,
|
|
884
884
|
customProps,
|
|
885
|
-
isFocus
|
|
885
|
+
isFocus,
|
|
886
|
+
isPopupReady,
|
|
887
|
+
renderCustomClearComponent,
|
|
888
|
+
renderCustomToggleIndicator
|
|
886
889
|
} = this.props;
|
|
887
890
|
let {
|
|
888
891
|
isActive,
|
|
@@ -964,6 +967,12 @@ export class MultiSelectComponent extends React.Component {
|
|
|
964
967
|
ariaLabelledby: ariaLabelledby
|
|
965
968
|
},
|
|
966
969
|
autoComplete: autoComplete,
|
|
970
|
+
renderRightPlaceholderNode: typeof renderCustomToggleIndicator == 'function' ? renderCustomToggleIndicator({
|
|
971
|
+
togglePopup: this.togglePopup,
|
|
972
|
+
isPopupOpened: isPopupReady,
|
|
973
|
+
isReadOnly: isReadOnly,
|
|
974
|
+
isDisabled: isDisabled
|
|
975
|
+
}) : renderCustomToggleIndicator,
|
|
967
976
|
...TextBoxIconProps
|
|
968
977
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
969
978
|
isInline: true,
|
|
@@ -971,7 +980,11 @@ export class MultiSelectComponent extends React.Component {
|
|
|
971
980
|
alignBox: "row",
|
|
972
981
|
align: "vertical",
|
|
973
982
|
className: style.rightPlaceholder
|
|
974
|
-
}, isShowClearIcon ?
|
|
983
|
+
}, isShowClearIcon ? typeof renderCustomClearComponent === 'function' ? renderCustomClearComponent({
|
|
984
|
+
clearText,
|
|
985
|
+
isPopupOpened: isPopupReady,
|
|
986
|
+
handleClearAll: this.handleDeselectAll
|
|
987
|
+
}) : /*#__PURE__*/React.createElement(Box, {
|
|
975
988
|
className: `${style.delete} ${style[`${palette}Delete`]}`,
|
|
976
989
|
dataId: `${dataId}_clearIcon`,
|
|
977
990
|
"data-title": clearText,
|
|
@@ -114,7 +114,9 @@ export const MultiSelect_propTypes = {
|
|
|
114
114
|
TextBoxIconProps: PropTypes.object
|
|
115
115
|
}),
|
|
116
116
|
isFocus: PropTypes.bool,
|
|
117
|
-
allowValueFallback: PropTypes.bool
|
|
117
|
+
allowValueFallback: PropTypes.bool,
|
|
118
|
+
renderCustomClearComponent: PropTypes.func,
|
|
119
|
+
renderCustomToggleIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.node])
|
|
118
120
|
};
|
|
119
121
|
export const MultiSelectHeader_propTypes = {
|
|
120
122
|
dataId: PropTypes.string,
|
package/es/Select/Select.js
CHANGED
|
@@ -727,7 +727,9 @@ export class SelectComponent extends Component {
|
|
|
727
727
|
positionsOffset,
|
|
728
728
|
targetOffset,
|
|
729
729
|
isRestrictScroll,
|
|
730
|
-
dropBoxPortalId
|
|
730
|
+
dropBoxPortalId,
|
|
731
|
+
renderCustomToggleIndicator,
|
|
732
|
+
renderCustomSearchClearComponent
|
|
731
733
|
} = this.props;
|
|
732
734
|
let {
|
|
733
735
|
TextBoxIcon_i18n,
|
|
@@ -807,14 +809,20 @@ export class SelectComponent extends Component {
|
|
|
807
809
|
...TextBoxProps
|
|
808
810
|
}
|
|
809
811
|
},
|
|
812
|
+
renderRightPlaceholderNode: typeof renderCustomToggleIndicator == 'function' ? renderCustomToggleIndicator({
|
|
813
|
+
togglePopup: this.togglePopup,
|
|
814
|
+
isPopupOpened: isPopupReady,
|
|
815
|
+
isReadOnly: isReadOnly,
|
|
816
|
+
isDisabled: isDisabled
|
|
817
|
+
}) : renderCustomToggleIndicator,
|
|
810
818
|
...TextBoxIconProps
|
|
811
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
819
|
+
}, !renderCustomToggleIndicator || children ? /*#__PURE__*/React.createElement(Container, {
|
|
812
820
|
isInline: true,
|
|
813
821
|
isCover: false,
|
|
814
822
|
alignBox: "row",
|
|
815
823
|
align: "both",
|
|
816
824
|
className: style.rightPlaceholder
|
|
817
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
825
|
+
}, !renderCustomToggleIndicator ? /*#__PURE__*/React.createElement(Container, {
|
|
818
826
|
align: "both",
|
|
819
827
|
dataId: `${dataId}_downIcon`,
|
|
820
828
|
"aria-hidden": true,
|
|
@@ -822,10 +830,10 @@ export class SelectComponent extends Component {
|
|
|
822
830
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
823
831
|
name: "ZD-down",
|
|
824
832
|
size: "7"
|
|
825
|
-
})), children ? /*#__PURE__*/React.createElement(Box, {
|
|
833
|
+
})) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
826
834
|
className: isPopupOpen ? style.rotate : '',
|
|
827
835
|
dataId: `${dataId}_children`
|
|
828
|
-
}, children) : null)) : /*#__PURE__*/React.createElement(Textbox, {
|
|
836
|
+
}, children) : null) : null) : /*#__PURE__*/React.createElement(Textbox, {
|
|
829
837
|
a11y: {
|
|
830
838
|
role: 'Menuitem',
|
|
831
839
|
ariaLabel: TextBox_ally_label,
|
|
@@ -916,7 +924,8 @@ export class SelectComponent extends Component {
|
|
|
916
924
|
autoComplete: autoComplete,
|
|
917
925
|
customProps: {
|
|
918
926
|
TextBoxProps: DropdownSearchTextBoxProps
|
|
919
|
-
}
|
|
927
|
+
},
|
|
928
|
+
renderCustomClearComponent: renderCustomSearchClearComponent
|
|
920
929
|
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
921
930
|
shrink: true,
|
|
922
931
|
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
|
|
@@ -94,7 +94,9 @@ export const Select_propTypes = {
|
|
|
94
94
|
targetOffset: PropTypes.object,
|
|
95
95
|
isRestrictScroll: PropTypes.bool,
|
|
96
96
|
dropBoxPortalId: PropTypes.string,
|
|
97
|
-
allowValueFallback: PropTypes.bool
|
|
97
|
+
allowValueFallback: PropTypes.bool,
|
|
98
|
+
renderCustomToggleIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
99
|
+
renderCustomSearchClearComponent: PropTypes.func
|
|
98
100
|
};
|
|
99
101
|
export const GroupSelect_propTypes = {
|
|
100
102
|
groupedOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -109,7 +109,8 @@ export default class TextBoxIcon extends React.Component {
|
|
|
109
109
|
isScrollPrevent,
|
|
110
110
|
customProps,
|
|
111
111
|
needInputFocusOnWrapperClick,
|
|
112
|
-
renderRightPlaceholderNode
|
|
112
|
+
renderRightPlaceholderNode,
|
|
113
|
+
renderCustomClearComponent
|
|
113
114
|
} = this.props;
|
|
114
115
|
const {
|
|
115
116
|
isActive
|
|
@@ -167,7 +168,10 @@ export default class TextBoxIcon extends React.Component {
|
|
|
167
168
|
className: `${style.iconContainer} ${customTBoxIcon}`
|
|
168
169
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
169
170
|
alignBox: "row"
|
|
170
|
-
}, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ?
|
|
171
|
+
}, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ? typeof renderCustomClearComponent == 'function' ? renderCustomClearComponent({
|
|
172
|
+
clearText,
|
|
173
|
+
handleClear: this.handleClear
|
|
174
|
+
}) : /*#__PURE__*/React.createElement(Box, {
|
|
171
175
|
className: `${btnStyle.buttonReset} ${style.icon}`,
|
|
172
176
|
onClick: this.handleClear,
|
|
173
177
|
dataId: `${dataId}_ClearIcon`,
|
|
@@ -50,5 +50,6 @@ export const propTypes = { ...TextBox_propTypes,
|
|
|
50
50
|
customProps: PropTypes.shape({
|
|
51
51
|
TextBoxProps: PropTypes.object
|
|
52
52
|
}),
|
|
53
|
-
renderRightPlaceholderNode: PropTypes.node
|
|
53
|
+
renderRightPlaceholderNode: PropTypes.node,
|
|
54
|
+
renderCustomClearComponent: PropTypes.func
|
|
54
55
|
};
|
|
@@ -963,7 +963,10 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
963
963
|
isPopupOpen = _this$props14.isPopupOpen,
|
|
964
964
|
ariaErrorId = _this$props14.ariaErrorId,
|
|
965
965
|
customProps = _this$props14.customProps,
|
|
966
|
-
isFocus = _this$props14.isFocus
|
|
966
|
+
isFocus = _this$props14.isFocus,
|
|
967
|
+
isPopupReady = _this$props14.isPopupReady,
|
|
968
|
+
renderCustomClearComponent = _this$props14.renderCustomClearComponent,
|
|
969
|
+
renderCustomToggleIndicator = _this$props14.renderCustomToggleIndicator;
|
|
967
970
|
var _this$state8 = this.state,
|
|
968
971
|
isActive = _this$state8.isActive,
|
|
969
972
|
selectedOptions = _this$state8.selectedOptions,
|
|
@@ -1039,14 +1042,24 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1039
1042
|
ariaDescribedby: ariaErrorId,
|
|
1040
1043
|
ariaLabelledby: ariaLabelledby
|
|
1041
1044
|
},
|
|
1042
|
-
autoComplete: autoComplete
|
|
1045
|
+
autoComplete: autoComplete,
|
|
1046
|
+
renderRightPlaceholderNode: typeof renderCustomToggleIndicator == 'function' ? renderCustomToggleIndicator({
|
|
1047
|
+
togglePopup: this.togglePopup,
|
|
1048
|
+
isPopupOpened: isPopupReady,
|
|
1049
|
+
isReadOnly: isReadOnly,
|
|
1050
|
+
isDisabled: isDisabled
|
|
1051
|
+
}) : renderCustomToggleIndicator
|
|
1043
1052
|
}, TextBoxIconProps), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1044
1053
|
isInline: true,
|
|
1045
1054
|
isCover: false,
|
|
1046
1055
|
alignBox: "row",
|
|
1047
1056
|
align: "vertical",
|
|
1048
1057
|
className: _MultiSelectModule["default"].rightPlaceholder
|
|
1049
|
-
}, isShowClearIcon ?
|
|
1058
|
+
}, isShowClearIcon ? typeof renderCustomClearComponent === 'function' ? renderCustomClearComponent({
|
|
1059
|
+
clearText: clearText,
|
|
1060
|
+
isPopupOpened: isPopupReady,
|
|
1061
|
+
handleClearAll: this.handleDeselectAll
|
|
1062
|
+
}) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
1050
1063
|
className: "".concat(_MultiSelectModule["default"]["delete"], " ").concat(_MultiSelectModule["default"]["".concat(palette, "Delete")]),
|
|
1051
1064
|
dataId: "".concat(dataId, "_clearIcon"),
|
|
1052
1065
|
"data-title": clearText,
|
|
@@ -133,7 +133,9 @@ var MultiSelect_propTypes = {
|
|
|
133
133
|
TextBoxIconProps: _propTypes["default"].object
|
|
134
134
|
}),
|
|
135
135
|
isFocus: _propTypes["default"].bool,
|
|
136
|
-
allowValueFallback: _propTypes["default"].bool
|
|
136
|
+
allowValueFallback: _propTypes["default"].bool,
|
|
137
|
+
renderCustomClearComponent: _propTypes["default"].func,
|
|
138
|
+
renderCustomToggleIndicator: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node])
|
|
137
139
|
};
|
|
138
140
|
exports.MultiSelect_propTypes = MultiSelect_propTypes;
|
|
139
141
|
var MultiSelectHeader_propTypes = {
|
package/lib/Select/Select.js
CHANGED
|
@@ -776,7 +776,9 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
776
776
|
positionsOffset = _this$props11.positionsOffset,
|
|
777
777
|
targetOffset = _this$props11.targetOffset,
|
|
778
778
|
isRestrictScroll = _this$props11.isRestrictScroll,
|
|
779
|
-
dropBoxPortalId = _this$props11.dropBoxPortalId
|
|
779
|
+
dropBoxPortalId = _this$props11.dropBoxPortalId,
|
|
780
|
+
renderCustomToggleIndicator = _this$props11.renderCustomToggleIndicator,
|
|
781
|
+
renderCustomSearchClearComponent = _this$props11.renderCustomSearchClearComponent;
|
|
780
782
|
var _i18nKeys = i18nKeys,
|
|
781
783
|
TextBoxIcon_i18n = _i18nKeys.TextBoxIcon_i18n,
|
|
782
784
|
_i18nKeys$TextBox_all = _i18nKeys.TextBox_ally_label,
|
|
@@ -854,14 +856,20 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
854
856
|
TextBoxProps: _objectSpread({
|
|
855
857
|
'data-title': title || selected
|
|
856
858
|
}, TextBoxProps)
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
+
},
|
|
860
|
+
renderRightPlaceholderNode: typeof renderCustomToggleIndicator == 'function' ? renderCustomToggleIndicator({
|
|
861
|
+
togglePopup: this.togglePopup,
|
|
862
|
+
isPopupOpened: isPopupReady,
|
|
863
|
+
isReadOnly: isReadOnly,
|
|
864
|
+
isDisabled: isDisabled
|
|
865
|
+
}) : renderCustomToggleIndicator
|
|
866
|
+
}, TextBoxIconProps), !renderCustomToggleIndicator || children ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
859
867
|
isInline: true,
|
|
860
868
|
isCover: false,
|
|
861
869
|
alignBox: "row",
|
|
862
870
|
align: "both",
|
|
863
871
|
className: _SelectModule["default"].rightPlaceholder
|
|
864
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
872
|
+
}, !renderCustomToggleIndicator ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
865
873
|
align: "both",
|
|
866
874
|
dataId: "".concat(dataId, "_downIcon"),
|
|
867
875
|
"aria-hidden": true,
|
|
@@ -869,10 +877,10 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
869
877
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
870
878
|
name: "ZD-down",
|
|
871
879
|
size: "7"
|
|
872
|
-
})), children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
880
|
+
})) : null, children ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
873
881
|
className: isPopupOpen ? _SelectModule["default"].rotate : '',
|
|
874
882
|
dataId: "".concat(dataId, "_children")
|
|
875
|
-
}, children) : null)) : /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
|
|
883
|
+
}, children) : null) : null) : /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
|
|
876
884
|
a11y: {
|
|
877
885
|
role: 'Menuitem',
|
|
878
886
|
ariaLabel: TextBox_ally_label,
|
|
@@ -960,7 +968,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
960
968
|
autoComplete: autoComplete,
|
|
961
969
|
customProps: {
|
|
962
970
|
TextBoxProps: DropdownSearchTextBoxProps
|
|
963
|
-
}
|
|
971
|
+
},
|
|
972
|
+
renderCustomClearComponent: renderCustomSearchClearComponent
|
|
964
973
|
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
965
974
|
shrink: true,
|
|
966
975
|
customClass: !tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : '',
|
|
@@ -110,7 +110,9 @@ var Select_propTypes = {
|
|
|
110
110
|
targetOffset: _propTypes["default"].object,
|
|
111
111
|
isRestrictScroll: _propTypes["default"].bool,
|
|
112
112
|
dropBoxPortalId: _propTypes["default"].string,
|
|
113
|
-
allowValueFallback: _propTypes["default"].bool
|
|
113
|
+
allowValueFallback: _propTypes["default"].bool,
|
|
114
|
+
renderCustomToggleIndicator: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
|
|
115
|
+
renderCustomSearchClearComponent: _propTypes["default"].func
|
|
114
116
|
};
|
|
115
117
|
exports.Select_propTypes = Select_propTypes;
|
|
116
118
|
var GroupSelect_propTypes = {
|
|
@@ -158,7 +158,8 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
158
158
|
isScrollPrevent = _this$props2.isScrollPrevent,
|
|
159
159
|
customProps = _this$props2.customProps,
|
|
160
160
|
needInputFocusOnWrapperClick = _this$props2.needInputFocusOnWrapperClick,
|
|
161
|
-
renderRightPlaceholderNode = _this$props2.renderRightPlaceholderNode
|
|
161
|
+
renderRightPlaceholderNode = _this$props2.renderRightPlaceholderNode,
|
|
162
|
+
renderCustomClearComponent = _this$props2.renderCustomClearComponent;
|
|
162
163
|
var isActive = this.state.isActive;
|
|
163
164
|
var _customClass$customTB = customClass.customTBoxWrap,
|
|
164
165
|
customTBoxWrap = _customClass$customTB === void 0 ? '' : _customClass$customTB,
|
|
@@ -213,7 +214,10 @@ var TextBoxIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
213
214
|
className: "".concat(_TextBoxIconModule["default"].iconContainer, " ").concat(customTBoxIcon)
|
|
214
215
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
215
216
|
alignBox: "row"
|
|
216
|
-
}, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ?
|
|
217
|
+
}, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ? typeof renderCustomClearComponent == 'function' ? renderCustomClearComponent({
|
|
218
|
+
clearText: clearText,
|
|
219
|
+
handleClear: this.handleClear
|
|
220
|
+
}) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
217
221
|
className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_TextBoxIconModule["default"].icon),
|
|
218
222
|
onClick: this.handleClear,
|
|
219
223
|
dataId: "".concat(dataId, "_ClearIcon"),
|
|
@@ -67,7 +67,8 @@ var propTypes = _objectSpread(_objectSpread({}, _propTypes2.propTypes), {}, {
|
|
|
67
67
|
customProps: _propTypes["default"].shape({
|
|
68
68
|
TextBoxProps: _propTypes["default"].object
|
|
69
69
|
}),
|
|
70
|
-
renderRightPlaceholderNode: _propTypes["default"].node
|
|
70
|
+
renderRightPlaceholderNode: _propTypes["default"].node,
|
|
71
|
+
renderCustomClearComponent: _propTypes["default"].func
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
exports.propTypes = propTypes;
|