@tap-payments/os-micro-frontend-shared 0.0.16-OTP-fix → 0.0.16-OTP-fix-v3

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.
@@ -5,6 +5,6 @@ interface OTPInputProps extends Omit<OtpInputProps, 'numInputs' | 'onChange'> {
5
5
  onChange?: (otp: string) => void;
6
6
  onSubmitOtp?: (otp: string) => void;
7
7
  }
8
- declare function OTPInputField({ numInputs, separateAfter, isInputSecure, isInputNum, onSubmitOtp, ...props }: OTPInputProps): import("react/jsx-runtime").JSX.Element;
9
- declare const _default: import("react").MemoExoticComponent<typeof OTPInputField>;
8
+ declare function OtpInputField({ numInputs, separateAfter, isInputSecure, isInputNum, onSubmitOtp, ...props }: OTPInputProps): import("react/jsx-runtime").JSX.Element;
9
+ declare const _default: import("react").MemoExoticComponent<typeof OtpInputField>;
10
10
  export default _default;
@@ -12,9 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { useState, memo } from 'react';
14
14
  import Box from '@mui/material/Box';
15
- import OtpInput from 'react18-input-otp';
16
- import { inputFocusStyle, inputStyle, inputErrorStyle, Separator } from './style';
17
- function OTPInputField(_a) {
15
+ function OtpInputField(_a) {
18
16
  var { numInputs = 6, separateAfter = 3, isInputSecure = true, isInputNum = true, onSubmitOtp } = _a, props = __rest(_a, ["numInputs", "separateAfter", "isInputSecure", "isInputNum", "onSubmitOtp"]);
19
17
  const [otp, setOtp] = useState('');
20
18
  const handleChange = (enteredOtp) => {
@@ -27,6 +25,6 @@ function OTPInputField(_a) {
27
25
  '::selection': {
28
26
  background: 'transparent',
29
27
  },
30
- } }, { children: _jsx(OtpInput, Object.assign({ inputStyle: Object.assign(Object.assign({}, inputStyle), props.inputProps), focusStyle: inputFocusStyle, errorStyle: inputErrorStyle, value: otp, separator: _jsx(Separator, { children: "-" }), isInputNum: isInputNum, isInputSecure: isInputSecure, numInputs: numInputs, separateAfter: separateAfter, shouldAutoFocus: true, onChange: handleChange }, props)) })));
28
+ } }, { children: "Test" })));
31
29
  }
32
- export default memo(OTPInputField);
30
+ export default memo(OtpInputField);
@@ -0,0 +1,2 @@
1
+ import OTPInputField from './OtpInputField';
2
+ export default OTPInputField;
@@ -0,0 +1,2 @@
1
+ import OTPInputField from './OtpInputField';
2
+ export default OTPInputField;
@@ -80,4 +80,4 @@ export { default as ConfirmDialog, type ConfirmDialogFunction, type ConfirmDialo
80
80
  export { default as ControlPanelContainer } from './ControlPanelContainer';
81
81
  export { default as CopyImage } from './CopyImage';
82
82
  export { default as AccountDropdown } from './AccountDropdown';
83
- export { default as OTPInputField } from './OTPInputField';
83
+ export { default as OtpInputField } from './OtpInputField';
@@ -80,4 +80,4 @@ export { default as ConfirmDialog } from './ConfirmDialog';
80
80
  export { default as ControlPanelContainer } from './ControlPanelContainer';
81
81
  export { default as CopyImage } from './CopyImage';
82
82
  export { default as AccountDropdown } from './AccountDropdown';
83
- export { default as OTPInputField } from './OTPInputField';
83
+ export { default as OtpInputField } from './OtpInputField';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.16-OTP-fix",
4
+ "version": "0.0.16-OTP-fix-v3",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",
@@ -1,2 +0,0 @@
1
- import OTPInputField from './OTPInputField';
2
- export default OTPInputField;
@@ -1,2 +0,0 @@
1
- import OTPInputField from './OTPInputField';
2
- export default OTPInputField;