@particle-network/authkit
Version:
Auth Core provides MPC (Multi-Party Computation)-based threshold signatures.
75 lines (67 loc) • 3.88 kB
JavaScript
"use client";
import {
svg_icon_default
} from "./chunk-4JO427F5.mjs";
import {
isAutoFocusSupported,
isNullish
} from "./chunk-PD7RGPWB.mjs";
// src/components/input-password/index.tsx
import { Input } from "antd";
import React2 from "react";
// src/components/eyeIcon/index.tsx
import React from "react";
// src/components/eyeIcon/index.less
var eyeIcon_default = ".icon-eye {\n display: block;\n margin: auto;\n font-size: 23px;\n}\n";
// src/components/eyeIcon/index.tsx
var EyeOpen = () => {
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, eyeIcon_default), /* @__PURE__ */ React.createElement(svg_icon_default, { className: "icon-eye", name: "eye_open" }));
};
var EyeClose = () => {
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, eyeIcon_default), /* @__PURE__ */ React.createElement(svg_icon_default, { className: "icon-eye", name: "eye_close" }));
};
// src/components/input-password/index.less
var input_password_default = ".password-input {\n position: relative;\n width: 100%;\n height: 47px;\n min-height: 47px;\n padding: 0;\n border: none !important;\n border-radius: var(--primary-btn-border-radius);\n overflow: hidden;\n background: none;\n}\n.password-input input {\n width: 100%;\n height: 45px;\n padding: 0 8px;\n padding-left: 16px !important;\n font-weight: 500;\n font-size: 15px;\n color: var(--text-color);\n background-color: var(--input-background-color);\n}\n.password-input .ant-input-suffix {\n position: absolute;\n z-index: 1;\n top: 12px;\n right: 14px;\n cursor: pointer;\n}\n.password-input-0 {\n width: 0;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n";
// src/components/input-password/index.tsx
var InputPassword = (prop) => {
const inputRef = React2.useRef(null);
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("div", { className: "password-input-0" }, /* @__PURE__ */ React2.createElement(Input.Password, null)), /* @__PURE__ */ React2.createElement("style", null, `
${input_password_default}
.password-input .ant-input-password {
background-image: none !important;
}
.password-input .ant-input-password input {
-webkit-text-fill-color: inherit !important;
opacity: 1 !important;
}
`), /* @__PURE__ */ React2.createElement(
Input.Password,
{
ref: inputRef,
className: "password-input" + ((prop == null ? void 0 : prop.className) ? ` ${prop == null ? void 0 : prop.className}` : ""),
iconRender: (visible) => visible ? /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(EyeOpen, null)) : /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(EyeClose, null)),
onChange: (e) => {
var _a;
if (prop == null ? void 0 : prop.onChange) {
(_a = prop == null ? void 0 : prop.onChange) == null ? void 0 : _a.call(prop, e.target.value);
}
},
defaultValue: prop == null ? void 0 : prop.defaultValue,
maxLength: (prop == null ? void 0 : prop.maxLength) || 20,
onPressEnter: (e) => {
var _a;
return (_a = prop == null ? void 0 : prop.onPressEnter) == null ? void 0 : _a.call(prop, e);
},
onBlur: (e) => {
var _a;
return (_a = prop == null ? void 0 : prop.onBlur) == null ? void 0 : _a.call(prop, e);
},
autoFocus: isNullish(prop == null ? void 0 : prop.autoFocus) && isAutoFocusSupported() ? true : prop == null ? void 0 : prop.autoFocus
}
));
};
var input_password_default2 = InputPassword;
export {
input_password_default2 as input_password_default
};
//# sourceMappingURL=chunk-OWXESKIP.mjs.map