@tap-payments/os-micro-frontend-shared 0.1.127 → 0.1.128-test.1

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.
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from '@mui/material/Box';
2
+ type Props = BoxProps & {
3
+ value: string;
4
+ name: string;
5
+ placeholder: string;
6
+ onSearchChange: (value: string) => void;
7
+ onSearchReset: () => void;
8
+ };
9
+ declare const SearchListInput: ({ value, name, placeholder, onSearchChange, onSearchReset, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default SearchListInput;
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Box from '@mui/material/Box';
14
+ import { grayCloseIcon, searchIcon } from '../../constants/index.js';
15
+ import { InputsWrapper, InputStyled } from './style';
16
+ const SearchListInput = (_a) => {
17
+ var { value, name, placeholder, onSearchChange, onSearchReset } = _a, props = __rest(_a, ["value", "name", "placeholder", "onSearchChange", "onSearchReset"]);
18
+ return (_jsx(InputsWrapper, Object.assign({ component: "main" }, props, { children: _jsx(InputStyled, { className: "input", name: name, placeholder: placeholder, onChange: (e) => onSearchChange(e.target.value), value: value, inputProps: { autoComplete: 'off' }, endAdornment: _jsx(Box, { component: "img", "data-icon": value ? 'close' : 'search', src: value ? grayCloseIcon : searchIcon, alt: "search", className: "icon", sx: { cursor: value ? 'pointer' : 'default' }, onClick: onSearchReset }) }) })));
19
+ };
20
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,2 @@
1
+ import SearchListInput from './SearchListInput';
2
+ export default SearchListInput;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Readonly<import("@mui/material").InputProps & {
3
+ isError?: boolean | undefined;
4
+ }> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const InputsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,15 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import Input from '../Input';
3
+ import Box from '@mui/material/Box';
4
+ export const InputStyled = styled(Input)(({ theme }) => ({
5
+ border: `1px solid ${theme.palette.divider}`,
6
+ '.icon': {
7
+ width: 14,
8
+ },
9
+ }));
10
+ export const InputsWrapper = styled(Box)(() => ({
11
+ padding: '8px 16px',
12
+ '> div + div': {
13
+ marginTop: '8px',
14
+ },
15
+ }));
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip, type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as SearchListInput } from './SearchListInput';
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as SearchListInput } from './SearchListInput';
package/package.json CHANGED
@@ -1,8 +1,8 @@
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.1.127",
5
- "testVersion": 6,
4
+ "version": "0.1.128-test.1",
5
+ "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
@@ -136,4 +136,4 @@
136
136
  "publishConfig": {
137
137
  "registry": "https://registry.npmjs.org/"
138
138
  }
139
- }
139
+ }