ywana-core8 0.0.364 → 0.0.367
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/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +10 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +13 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/textfield.css +5 -0
- package/src/html/textfield.js +13 -3
- package/src/html/textfield.test.js +4 -1
- package/src/site/site.test.js +22 -3
package/dist/index.cjs
CHANGED
@@ -962,6 +962,15 @@ var TextField = function TextField(props) {
|
|
962
962
|
}
|
963
963
|
}
|
964
964
|
|
965
|
+
function focusOut() {
|
966
|
+
if (site && site.changeFocus) {
|
967
|
+
site.changeFocus({
|
968
|
+
lose: function lose() {// DO NOTHING
|
969
|
+
}
|
970
|
+
});
|
971
|
+
}
|
972
|
+
}
|
973
|
+
|
965
974
|
function clear() {
|
966
975
|
if (onChange) onChange(id, "");
|
967
976
|
}
|
@@ -982,8 +991,9 @@ var TextField = function TextField(props) {
|
|
982
991
|
onChange: change,
|
983
992
|
onKeyDown: onKeyPress,
|
984
993
|
onFocus: focus,
|
994
|
+
onBlur: focusOut,
|
985
995
|
readOnly: readOnly
|
986
|
-
}),
|
996
|
+
}), canClear && value && value.length > 0 ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
987
997
|
icon: "close",
|
988
998
|
clickable: true,
|
989
999
|
size: "small",
|
@@ -1158,7 +1168,8 @@ var DropDown = function DropDown(props) {
|
|
1158
1168
|
}, /*#__PURE__*/React__default["default"].createElement(TextField, _extends({}, props, {
|
1159
1169
|
onClick: toggle,
|
1160
1170
|
value: label,
|
1161
|
-
onChange: change
|
1171
|
+
onChange: change,
|
1172
|
+
readOnly: !predictive
|
1162
1173
|
})), !readOnly ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
1163
1174
|
icon: "expand_more",
|
1164
1175
|
clickable: true,
|