@apexcura/ui-components 0.0.16-Beta13 → 0.0.16-Beta14
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.js +4 -11
- package/dist/index.mjs +4 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100,29 +100,22 @@ var import_icons = require("@ant-design/icons");
|
|
|
100
100
|
var import_antd2 = require("antd");
|
|
101
101
|
var PasswordElement = (props) => {
|
|
102
102
|
const [passwordVisible, setPasswordVisible] = (0, import_react2.useState)(false);
|
|
103
|
-
|
|
104
|
-
setPasswordVisible((prev) => !prev);
|
|
105
|
-
};
|
|
103
|
+
setPasswordVisible(true);
|
|
106
104
|
const handleChange = (e) => {
|
|
107
105
|
if (props.onChange) {
|
|
108
106
|
props.onChange(e.target.value);
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeTwoTone, null) : /* @__PURE__ */ import_react2.default.createElement(import_icons.EyeInvisibleOutlined, null);
|
|
112
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ import_react2.default.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react2.default.createElement(
|
|
110
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react2.default.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react2.default.createElement(
|
|
113
111
|
import_antd2.Input.Password,
|
|
114
112
|
{
|
|
115
113
|
placeholder: props.placeholder,
|
|
116
114
|
className: props.className,
|
|
117
115
|
type: props.type,
|
|
118
|
-
onChange:
|
|
119
|
-
handleChange(e);
|
|
120
|
-
},
|
|
116
|
+
onChange: handleChange,
|
|
121
117
|
iconRender: renderVisibilityIcon,
|
|
122
|
-
visibilityToggle:
|
|
123
|
-
visible: passwordVisible && passwordVisible,
|
|
124
|
-
onVisibleChange: handleVisibilityToggle
|
|
125
|
-
}
|
|
118
|
+
visibilityToggle: passwordVisible
|
|
126
119
|
}
|
|
127
120
|
));
|
|
128
121
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -31,29 +31,22 @@ import { EyeInvisibleOutlined, EyeTwoTone } from "@ant-design/icons";
|
|
|
31
31
|
import { Input } from "antd";
|
|
32
32
|
var PasswordElement = (props) => {
|
|
33
33
|
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
34
|
-
|
|
35
|
-
setPasswordVisible((prev) => !prev);
|
|
36
|
-
};
|
|
34
|
+
setPasswordVisible(true);
|
|
37
35
|
const handleChange = (e) => {
|
|
38
36
|
if (props.onChange) {
|
|
39
37
|
props.onChange(e.target.value);
|
|
40
38
|
}
|
|
41
39
|
};
|
|
42
40
|
const renderVisibilityIcon = (visible) => visible ? /* @__PURE__ */ React2.createElement(EyeTwoTone, null) : /* @__PURE__ */ React2.createElement(EyeInvisibleOutlined, null);
|
|
43
|
-
return /* @__PURE__ */ React2.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React2.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ React2.createElement(
|
|
41
|
+
return /* @__PURE__ */ React2.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React2.createElement("label", { className: props.labelClassName }, props.label), /* @__PURE__ */ React2.createElement(
|
|
44
42
|
Input.Password,
|
|
45
43
|
{
|
|
46
44
|
placeholder: props.placeholder,
|
|
47
45
|
className: props.className,
|
|
48
46
|
type: props.type,
|
|
49
|
-
onChange:
|
|
50
|
-
handleChange(e);
|
|
51
|
-
},
|
|
47
|
+
onChange: handleChange,
|
|
52
48
|
iconRender: renderVisibilityIcon,
|
|
53
|
-
visibilityToggle:
|
|
54
|
-
visible: passwordVisible && passwordVisible,
|
|
55
|
-
onVisibleChange: handleVisibilityToggle
|
|
56
|
-
}
|
|
49
|
+
visibilityToggle: passwordVisible
|
|
57
50
|
}
|
|
58
51
|
));
|
|
59
52
|
};
|