krl-alfred 1.28.0 → 1.30.0

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.
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
28
28
  var jsx_runtime_1 = require("react/jsx-runtime");
29
29
  var react_1 = require("react");
30
30
  var Input_styled_1 = require("./Input.styled");
31
+ var react_input_mask_1 = __importDefault(require("react-input-mask"));
31
32
  var classnames_1 = __importDefault(require("classnames"));
32
33
  var Icon_1 = __importDefault(require("../Icon/Icon"));
33
34
  var Input = function (props) {
@@ -41,12 +42,14 @@ var Input = function (props) {
41
42
  var newType = inputType === 'password' ? 'text' : 'password';
42
43
  setInputType(newType);
43
44
  };
44
- return (0, jsx_runtime_1.jsxs)(Input_styled_1.Container, { width: props.width, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)("top caption-bold-12-15", (_a = {}, _a["justify-between"] = props === null || props === void 0 ? void 0 : props.customLinkText, _a)), children: [(0, jsx_runtime_1.jsx)("p", { children: props === null || props === void 0 ? void 0 : props.label }), (props === null || props === void 0 ? void 0 : props.customLinkText) && (0, jsx_runtime_1.jsx)("a", __assign({}, (props.customLinkHref && { href: props.customLinkHref }), { onClick: props.onCustomLinkClick, children: props === null || props === void 0 ? void 0 : props.customLinkText }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "input", children: [(0, jsx_runtime_1.jsx)(Input_styled_1.InputStyled, __assign({ type: inputType }, other)), (props === null || props === void 0 ? void 0 : props.type) === 'password' && (0, jsx_runtime_1.jsx)("div", { onClick: toggleInputType, className: "showHide", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: inputType === 'password' ? 'Show' : 'Hide' }) })] }), (props === null || props === void 0 ? void 0 : props.hasError) && (0, jsx_runtime_1.jsxs)("div", { className: "error", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), (0, jsx_runtime_1.jsx)("p", { className: "caption-semi-bold-11-13", children: props === null || props === void 0 ? void 0 : props.errorMessage })] })] });
45
+ return (0, jsx_runtime_1.jsxs)(Input_styled_1.Container, { width: props.width, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)("top caption-bold-12-15", (_a = {}, _a["justify-between"] = props === null || props === void 0 ? void 0 : props.customLinkText, _a)), children: [(0, jsx_runtime_1.jsx)("p", { children: props === null || props === void 0 ? void 0 : props.label }), (props === null || props === void 0 ? void 0 : props.customLinkText) && (0, jsx_runtime_1.jsx)("a", __assign({}, (props.customLinkHref && { href: props.customLinkHref }), { onClick: props.onCustomLinkClick, children: props === null || props === void 0 ? void 0 : props.customLinkText }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "input", children: [props.mask ? (0, jsx_runtime_1.jsx)(react_input_mask_1.default, __assign({ alwaysShowMask: props.alwaysShowMask, maskChar: props.maskChar, mask: props.mask }, props, { children: function (inputProps) { return (0, jsx_runtime_1.jsx)(Input_styled_1.InputStyled, __assign({}, inputProps, { type: inputType })); } })) : (0, jsx_runtime_1.jsx)(Input_styled_1.InputStyled, __assign({ type: inputType }, other)), (props === null || props === void 0 ? void 0 : props.type) === 'password' && (0, jsx_runtime_1.jsx)("div", { onClick: toggleInputType, className: "showHide", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: inputType === 'password' ? 'Show' : 'Hide' }) })] }), (props === null || props === void 0 ? void 0 : props.hasError) && (0, jsx_runtime_1.jsxs)("div", { className: "error", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { name: "ErrorIcon" }), (0, jsx_runtime_1.jsx)("p", { className: "caption-semi-bold-11-13", children: props === null || props === void 0 ? void 0 : props.errorMessage })] })] });
45
46
  };
46
47
  Input.defaultValues = {
47
48
  hasError: false,
48
49
  label: "Label",
49
50
  type: "text",
50
- width: "370px"
51
+ width: "370px",
52
+ maskChar: "_",
53
+ alwaysShowMask: false
51
54
  };
52
55
  exports.default = Input;
@@ -21,7 +21,7 @@ exports.ModalStyled = styled_components_1.default.div(templateObject_1 || (templ
21
21
  default:
22
22
  return "462px";
23
23
  }
24
- }, function (props) { return props.onMobileFixed && "\n @media only screen and ".concat(devices_1.devices.sm, " {\n display: grid;\n height: 100dvh;\n align-content: space-between;\n border-radius: 0;\n width: 100%;\n max-height: initial;\n }\n "); }, function (props) { return props.showHeaderBorder ? '1px solid var(--dark-opacity-10)' : 'none'; }, function (props) { return props.showHeaderBorder ? '24px' : '0'; }, function (props) { return props.buttonsAlignment === 'horizontal' ? 'flex-start' : 'space-between'; }, function (props) { return props.showFooterBorder ? '1px solid var(--dark-opacity-10)' : 'none'; }, function (props) { return props.showFooterBorder ? '24px' : '0'; }, function (props) {
24
+ }, function (props) { return !props.autoHeight && "\n @media only screen and ".concat(devices_1.devices.sm, " {\n display: grid;\n height: 100dvh;\n align-content: space-between;\n border-radius: 0;\n width: 100%;\n max-height: initial;\n }\n "); }, function (props) { return props.showHeaderBorder ? '1px solid var(--dark-opacity-10)' : 'none'; }, function (props) { return props.showHeaderBorder ? '24px' : '0'; }, function (props) { return props.buttonsAlignment === 'horizontal' ? 'flex-start' : 'space-between'; }, function (props) { return props.showFooterBorder ? '1px solid var(--dark-opacity-10)' : 'none'; }, function (props) { return props.showFooterBorder ? '24px' : '0'; }, function (props) {
25
25
  switch (props.buttonsAlignment) {
26
26
  case 'vertical':
27
27
  return 'column';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "krl-alfred",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -28,6 +28,7 @@
28
28
  "react-circular-progressbar": "^2.1.0",
29
29
  "react-device-detect": "^2.2.3",
30
30
  "react-dom": "^18.2.0",
31
+ "react-input-mask": "^2.0.4",
31
32
  "react-otp-input": "^3.0.2",
32
33
  "react-router-dom": "^6.10.0",
33
34
  "react-scripts": "^5.0.1",