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

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.
@@ -3,7 +3,6 @@ import { memo } from 'react';
3
3
  import Box from '@mui/material/Box';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import Text from '../Text';
6
- import { OtpInputField } from '../index.js';
7
6
  const Wrapper = styled(Box)(({ theme }) => ({
8
7
  textAlign: 'center',
9
8
  color: theme.palette.text.primary,
@@ -11,6 +10,6 @@ const Wrapper = styled(Box)(({ theme }) => ({
11
10
  const HeadlineText = styled(Text)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.h3), { marginBottom: '7px', lineHeight: '48px', fontWeight: theme.typography.fontWeightMedium, textTransform: 'capitalize' })));
12
11
  const SubHeadlineText = styled(Text)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.h5), { lineHeight: '29px', opacity: 0.3, fontWeight: theme.typography.fontWeightMedium })));
13
12
  function CardHeadline({ headline, subHeadline }) {
14
- return (_jsxs(Wrapper, { children: [headline && _jsx(HeadlineText, { children: headline }), subHeadline && _jsx(SubHeadlineText, { children: subHeadline }), _jsx(OtpInputField, {})] }));
13
+ return (_jsxs(Wrapper, { children: [headline && _jsx(HeadlineText, { children: headline }), subHeadline && _jsx(SubHeadlineText, { children: subHeadline })] }));
15
14
  }
16
15
  export default memo(CardHeadline);
@@ -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 OTPInput({ numInputs, separateAfter, isInputSecure, isInputNum, onSubmitOtp, ...props }: OTPInputProps): import("react/jsx-runtime").JSX.Element;
9
+ declare const _default: import("react").MemoExoticComponent<typeof OTPInput>;
10
10
  export default _default;
@@ -11,9 +11,10 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { useState, memo } from 'react';
14
+ import Box from '@mui/material/Box';
14
15
  import OtpInput from 'react18-input-otp';
15
16
  import { inputFocusStyle, inputStyle, inputErrorStyle, Separator } from './style';
16
- function OtpInputField(_a) {
17
+ function OTPInput(_a) {
17
18
  var { numInputs = 6, separateAfter = 3, isInputSecure = true, isInputNum = true, onSubmitOtp } = _a, props = __rest(_a, ["numInputs", "separateAfter", "isInputSecure", "isInputNum", "onSubmitOtp"]);
18
19
  const [otp, setOtp] = useState('');
19
20
  const handleChange = (enteredOtp) => {
@@ -22,6 +23,10 @@ function OtpInputField(_a) {
22
23
  onSubmitOtp === null || onSubmitOtp === void 0 ? void 0 : onSubmitOtp(enteredOtp);
23
24
  }
24
25
  };
25
- return (_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)));
26
+ return (_jsx(Box, Object.assign({ sx: {
27
+ '::selection': {
28
+ background: 'transparent',
29
+ },
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)) })));
26
31
  }
27
- export default memo(OtpInputField);
32
+ export default memo(OTPInput);
@@ -0,0 +1,2 @@
1
+ import OTPInput from './OTPInput';
2
+ export default OTPInput;
@@ -0,0 +1,2 @@
1
+ import OTPInput from './OTPInput';
2
+ export default OTPInput;
@@ -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 OTPInput } from './OTPInput';
@@ -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 OTPInput } from './OTPInput';
@@ -36,6 +36,9 @@ export interface BusinessMerchant {
36
36
  entity: {
37
37
  id: string;
38
38
  status: VerificationStatus;
39
+ legal_name: {
40
+ en: string;
41
+ };
39
42
  merchant: {
40
43
  id: string;
41
44
  status: MerchantStatus;
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-v4",
4
+ "version": "0.0.17",
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;