@tap-payments/os-micro-frontend-shared 0.0.246-test.2 → 0.0.246-test.4
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.
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.js +2 -2
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +2 -2
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.d.ts +1 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.js +1 -0
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.d.ts +5 -12
- package/build/components/AppWindowWrapper/index.d.ts +2 -0
- package/build/components/AppWindowWrapper/index.js +2 -0
- package/build/components/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AppWindowHeaderProps } from './type';
|
|
3
|
-
declare function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize }: AppWindowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize, sx }: AppWindowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeader>;
|
|
5
5
|
export default _default;
|
|
@@ -5,7 +5,7 @@ import { useMouseState } from '../../../../hooks/index.js';
|
|
|
5
5
|
import { animationDuration } from '../../AppWindow/constant';
|
|
6
6
|
import AppWindowHeaderBase from './AppWindowHeaderBase';
|
|
7
7
|
import { CloseIcon, MaximizeIcon } from '../../../ToolbarIcon';
|
|
8
|
-
function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize }) {
|
|
8
|
+
function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize, sx }) {
|
|
9
9
|
const { isHovered, onMouseEnter, onMouseLeave } = useMouseState();
|
|
10
10
|
return (_jsx(motion.div, Object.assign({ style: Object.assign({}, (isMaximized && {
|
|
11
11
|
height: 0,
|
|
@@ -18,6 +18,6 @@ function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, l
|
|
|
18
18
|
width: '100%',
|
|
19
19
|
})), transition: Object.assign({ duration: animationDuration }, (isToolbarAnimationDisabled && {
|
|
20
20
|
duration: 0,
|
|
21
|
-
})) }, { children: _jsx(AppWindowHeaderBase, { title: title, maximized: isMaximized, id: id || 'draggable-dialog-title', isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave, leftActions: leftActions || (_jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: isMaximized, onClick: () => onMaximize === null || onMaximize === void 0 ? void 0 : onMaximize(!isMaximized) })] })) }) })));
|
|
21
|
+
})) }, { children: _jsx(AppWindowHeaderBase, { title: title, maximized: isMaximized, id: id || 'draggable-dialog-title', isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave, leftActions: leftActions || (_jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: isMaximized, onClick: () => onMaximize === null || onMaximize === void 0 ? void 0 : onMaximize(!isMaximized) })] })), sx: sx }) })));
|
|
22
22
|
}
|
|
23
23
|
export default memo(AppWindowHeader);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AppWindowHeaderBaseProps } from './type';
|
|
3
|
-
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions, sandboxMode, titleIconSrc, ...rootProps }: AppWindowHeaderBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions, sandboxMode, titleIconSrc, sx, ...rootProps }: AppWindowHeaderBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeaderBase>;
|
|
5
5
|
export default _default;
|
|
@@ -14,7 +14,7 @@ import { memo } from 'react';
|
|
|
14
14
|
import Toolbar from '../../../Toolbar';
|
|
15
15
|
import { StyledHeaderWrapperStyled } from '../../../Toolbar/style';
|
|
16
16
|
function AppWindowHeaderBase(_a) {
|
|
17
|
-
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions, sandboxMode = false, titleIconSrc } = _a, rootProps = __rest(_a, ["title", "maximized", "id", "isHovered", "onMouseHover", "onMouseLeave", "leftActions", "sandboxMode", "titleIconSrc"]);
|
|
18
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false, sandboxMode: sandboxMode }, rootProps, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title || '', icon: titleIconSrc, leftActions: leftActions }) })));
|
|
17
|
+
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions, sandboxMode = false, titleIconSrc, sx } = _a, rootProps = __rest(_a, ["title", "maximized", "id", "isHovered", "onMouseHover", "onMouseLeave", "leftActions", "sandboxMode", "titleIconSrc", "sx"]);
|
|
18
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ className: "header-wrapper", id: id, "data-testid": "UserTitleBar", maximized: maximized || false, sandboxMode: sandboxMode, sx: sx }, rootProps, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title || '', icon: titleIconSrc, leftActions: leftActions }) })));
|
|
19
19
|
}
|
|
20
20
|
export default memo(AppWindowHeaderBase);
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { StyledHeaderWrapperStyled, ToolbarProps } from '../../../Toolbar';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
isSidebarExpanded: boolean;
|
|
5
|
-
setIsSidebarExpanded: (value: boolean) => void;
|
|
6
|
-
isToolbarAnimationDisabled?: boolean;
|
|
7
|
-
setIsToolbarAnimationDisabled?: (value: boolean) => void;
|
|
8
|
-
isMaximized?: boolean;
|
|
9
|
-
setIsMaximized?: Dispatch<SetStateAction<boolean>>;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
title?: string;
|
|
12
|
-
showSectionsButton?: boolean;
|
|
13
|
-
}
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
14
4
|
export type AppWindowHeaderBaseProps = React.ComponentProps<typeof StyledHeaderWrapperStyled> & {
|
|
15
5
|
title?: string;
|
|
16
6
|
maximized?: boolean;
|
|
@@ -29,4 +19,7 @@ export type AppWindowHeaderProps = {
|
|
|
29
19
|
leftActions?: ReactNode;
|
|
30
20
|
onClose?: () => void;
|
|
31
21
|
onMaximize?: (isMaximized: boolean) => void;
|
|
22
|
+
headerBaseProps?: Partial<AppWindowHeaderBaseProps>;
|
|
23
|
+
headerBaseStyles?: SxProps<Theme>;
|
|
24
|
+
sx?: AppWindowHeaderBaseProps['sx'];
|
|
32
25
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import AppWindowWrapper from './AppWindowWrapper';
|
|
2
2
|
export { default as AppWindow, type WindowProps, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, FOOTER_HEIGHT, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindow';
|
|
3
3
|
export * from './headers/AccountHeader';
|
|
4
|
+
export * from './headers/AppWindowHeader';
|
|
5
|
+
export { default as AppWindowHeader } from './headers/AppWindowHeader';
|
|
4
6
|
export * from './context';
|
|
5
7
|
export type { AppWindowProps } from './type';
|
|
6
8
|
export default AppWindowWrapper;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import AppWindowWrapper from './AppWindowWrapper';
|
|
2
2
|
export { default as AppWindow, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, FOOTER_HEIGHT, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindow';
|
|
3
3
|
export * from './headers/AccountHeader';
|
|
4
|
+
export * from './headers/AppWindowHeader';
|
|
5
|
+
export { default as AppWindowHeader } from './headers/AppWindowHeader';
|
|
4
6
|
export * from './context';
|
|
5
7
|
export default AppWindowWrapper;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as AccordionAdapter } from './AccordionAdapter';
|
|
2
2
|
export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem, type ActionMenuProps } from './ActionMenu';
|
|
3
3
|
export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDataPoint, ChartTooltip, type ChartTooltipProps, LoadingChart, type PayloadItem, } from './ActivityAreaChart';
|
|
4
|
-
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
4
|
+
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, type AppWindowHeaderProps, type AppWindowHeaderBaseProps, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation, type BlobGradient, type Blob } from './BackgroundAnimation';
|
|
6
6
|
export { default as Button, PlusButton, StyledButton } from './Button';
|
|
7
7
|
export { default as Calender, type CalenderProps, type DateObject } from './Calender';
|
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.0.246-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.246-test.4",
|
|
5
|
+
"testVersion": 4,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|