magneto365.ui 2.74.0 → 2.75.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.
- package/dist/cjs/css/magneto.ui.lib.min.css +1 -1
- package/dist/cjs/index.js +899 -729
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/UI/atoms/InlineDetails/InlineDetails.component.d.ts +3 -0
- package/dist/cjs/types/components/UI/atoms/InlineDetails/InlineDetails.interface.d.ts +13 -0
- package/dist/cjs/types/components/UI/atoms/InlineDetails/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/atoms/index.d.ts +1 -0
- package/dist/cjs/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +10 -0
- package/dist/cjs/types/components/UI/molecules/PortalTooltip/PortalTooltip.component.d.ts +3 -0
- package/dist/cjs/types/components/UI/molecules/PortalTooltip/PortalTooltip.interface.d.ts +45 -0
- package/dist/cjs/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltip.hook.d.ts +7 -0
- package/dist/cjs/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltipPosition.hook.d.ts +10 -0
- package/dist/cjs/types/components/UI/molecules/PortalTooltip/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ScrollableTab/ScrollableTab.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ScrollableTab/ScrollableTab.interface.d.ts +13 -0
- package/dist/cjs/types/components/UI/molecules/ScrollableTab/hooks/useScrollableTab.hook.d.ts +8 -0
- package/dist/cjs/types/components/UI/molecules/ScrollableTab/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.component.d.ts +3 -0
- package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.interface.d.ts +24 -0
- package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.stories.d.ts +8 -0
- package/dist/cjs/types/components/UI/molecules/TabItem/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/Tooltip/Tooltip.interface.d.ts +1 -2
- package/dist/cjs/types/components/UI/molecules/index.d.ts +3 -0
- package/dist/cjs/types/components/UI/organism/HeaderAnalyst/HeaderAnalyst.interface.d.ts +4 -3
- package/dist/cjs/types/constants/stories/InlineDetails.contants.d.ts +2 -0
- package/dist/cjs/types/constants/stories/analyst.constants.d.ts +0 -2
- package/dist/esm/css/magneto.ui.lib.min.css +1 -1
- package/dist/esm/index.js +896 -730
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/UI/atoms/InlineDetails/InlineDetails.component.d.ts +3 -0
- package/dist/esm/types/components/UI/atoms/InlineDetails/InlineDetails.interface.d.ts +13 -0
- package/dist/esm/types/components/UI/atoms/InlineDetails/index.d.ts +2 -0
- package/dist/esm/types/components/UI/atoms/index.d.ts +1 -0
- package/dist/esm/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +10 -0
- package/dist/esm/types/components/UI/molecules/PortalTooltip/PortalTooltip.component.d.ts +3 -0
- package/dist/esm/types/components/UI/molecules/PortalTooltip/PortalTooltip.interface.d.ts +45 -0
- package/dist/esm/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltip.hook.d.ts +7 -0
- package/dist/esm/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltipPosition.hook.d.ts +10 -0
- package/dist/esm/types/components/UI/molecules/PortalTooltip/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ScrollableTab/ScrollableTab.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ScrollableTab/ScrollableTab.interface.d.ts +13 -0
- package/dist/esm/types/components/UI/molecules/ScrollableTab/hooks/useScrollableTab.hook.d.ts +8 -0
- package/dist/esm/types/components/UI/molecules/ScrollableTab/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/TabItem/TabItem.component.d.ts +3 -0
- package/dist/esm/types/components/UI/molecules/TabItem/TabItem.interface.d.ts +24 -0
- package/dist/esm/types/components/UI/molecules/TabItem/TabItem.stories.d.ts +8 -0
- package/dist/esm/types/components/UI/molecules/TabItem/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/Tooltip/Tooltip.interface.d.ts +1 -2
- package/dist/esm/types/components/UI/molecules/index.d.ts +3 -0
- package/dist/esm/types/components/UI/organism/HeaderAnalyst/HeaderAnalyst.interface.d.ts +4 -3
- package/dist/esm/types/constants/stories/InlineDetails.contants.d.ts +2 -0
- package/dist/esm/types/constants/stories/analyst.constants.d.ts +0 -2
- package/dist/index.d.ts +121 -4
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for the InLineDetails component
|
|
3
|
+
*/
|
|
4
|
+
export interface IInlineDetails {
|
|
5
|
+
/**
|
|
6
|
+
* Array of strings that will be displayed in a single line, separated by " | "
|
|
7
|
+
*/
|
|
8
|
+
details: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Optional className to apply custom styles to the wrapper element
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -46,6 +46,11 @@ export interface IDrawer {
|
|
|
46
46
|
* this property sets custom styles into background drawer
|
|
47
47
|
*/
|
|
48
48
|
backGroundClassName?: string;
|
|
49
|
+
/**
|
|
50
|
+
* An optional custom container where the Drawer Portal will be rendered.
|
|
51
|
+
* If not provided, it will use the body.
|
|
52
|
+
*/
|
|
53
|
+
customContainer?: IDrawerPortal['customContainer'];
|
|
49
54
|
}
|
|
50
55
|
/**
|
|
51
56
|
* This interface represents a Portal for the Drawer component.
|
|
@@ -56,4 +61,9 @@ export interface IDrawerPortal {
|
|
|
56
61
|
* It can be a single JSX element, an array of JSX elements, or `false` to indicate no content.
|
|
57
62
|
*/
|
|
58
63
|
children: false | JSX.Element | JSX.Element[];
|
|
64
|
+
/**
|
|
65
|
+
* An optional custom container where the Drawer Portal will be rendered.
|
|
66
|
+
* If not provided, it will use the body.
|
|
67
|
+
*/
|
|
68
|
+
customContainer?: HTMLElement | ShadowRoot;
|
|
59
69
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TPosition } from '../Tooltip/Tooltip.interface';
|
|
3
|
+
export interface IPortalTooltipProps {
|
|
4
|
+
/**
|
|
5
|
+
* this property set the tooltip title
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* this property set the tooltip position
|
|
10
|
+
* @default 'bottom'
|
|
11
|
+
*/
|
|
12
|
+
position?: TPosition;
|
|
13
|
+
/**
|
|
14
|
+
* the tooltip component must wrap a component. This needs to be able to hold a ref
|
|
15
|
+
*/
|
|
16
|
+
children: React.ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* this property set the tooltip visibility
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
visible?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* this property set the tooltip width
|
|
24
|
+
* @default 'fit-content'
|
|
25
|
+
*/
|
|
26
|
+
width?: string;
|
|
27
|
+
/**
|
|
28
|
+
* this property sets delay in milliseconds before the tooltip appears
|
|
29
|
+
*/
|
|
30
|
+
enterDelay?: number;
|
|
31
|
+
/**
|
|
32
|
+
* this property sets delay in milliseconds before the tooltip disappears
|
|
33
|
+
*/
|
|
34
|
+
leaveDelay?: number;
|
|
35
|
+
/**
|
|
36
|
+
* this property sets the offset in pixels for the tooltip position relative to the target element
|
|
37
|
+
* @default 8
|
|
38
|
+
*/
|
|
39
|
+
offset?: number;
|
|
40
|
+
/**
|
|
41
|
+
* this property set the tooltip arrow visibility
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
hasArrow?: boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const usePortalTooltip: (visible: boolean, enterDelay?: number | undefined, leaveDelay?: number | undefined) => {
|
|
2
|
+
open: boolean;
|
|
3
|
+
tooltipContainer: HTMLElement | ShadowRoot;
|
|
4
|
+
showTooltip: () => void;
|
|
5
|
+
hideTooltip: () => void;
|
|
6
|
+
};
|
|
7
|
+
export default usePortalTooltip;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const usePortalTooltipPosition: (open: boolean, offset: number, position: string) => {
|
|
3
|
+
coords: {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
};
|
|
7
|
+
triggerRef: import("react").RefObject<HTMLDivElement>;
|
|
8
|
+
tooltipRef: import("react").RefObject<HTMLDivElement>;
|
|
9
|
+
};
|
|
10
|
+
export default usePortalTooltipPosition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IScrollableTab {
|
|
3
|
+
children: React.ReactNode | React.ReactNode[];
|
|
4
|
+
/**
|
|
5
|
+
* Optional prop to set the scroll amount when clicking the arrows
|
|
6
|
+
* @default 100
|
|
7
|
+
*/
|
|
8
|
+
scrollAmount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Optional prop to add custom className
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const useScrollableTab: () => {
|
|
3
|
+
showLeftArrow: boolean;
|
|
4
|
+
showRightArrow: boolean;
|
|
5
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
handleScrollByAmount: (amount: number) => void | undefined;
|
|
7
|
+
};
|
|
8
|
+
export default useScrollableTab;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ITabItem {
|
|
2
|
+
/**
|
|
3
|
+
* Tab item text
|
|
4
|
+
*/
|
|
5
|
+
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* Tab item action
|
|
8
|
+
*/
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Tab item styles
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Tab item disabled state
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Tab item selected state
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
isSelected?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TabItem } from './TabItem.component';
|
|
3
|
+
declare const meta: Meta<typeof TabItem>;
|
|
4
|
+
declare type Story = StoryObj<typeof TabItem>;
|
|
5
|
+
export declare const Default: Story;
|
|
6
|
+
export declare const Disabled: Story;
|
|
7
|
+
export declare const Selected: Story;
|
|
8
|
+
export default meta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare type TPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
2
|
+
export declare type TPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
3
3
|
export interface ITooltipProps {
|
|
4
4
|
/**
|
|
5
5
|
* this property set the tooltip title
|
|
@@ -22,4 +22,3 @@ export interface ITooltipProps {
|
|
|
22
22
|
*/
|
|
23
23
|
visible?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export {};
|
|
@@ -81,5 +81,8 @@ export * from './Tooltip';
|
|
|
81
81
|
export * from './UserMenu';
|
|
82
82
|
export * from './UserMenuAnalyst';
|
|
83
83
|
export * from './UserMenuWrapperAnalyst';
|
|
84
|
+
export * from './ScrollableTab';
|
|
85
|
+
export * from './TabItem';
|
|
86
|
+
export * from './PortalTooltip';
|
|
84
87
|
export * from './ImageCard';
|
|
85
88
|
export * from './CompanyCard';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IBreadcrumbs, IUserMenuWrapperAnalystProps } from '@components/UI/molecules';
|
|
2
|
-
import { ILogoComponent
|
|
2
|
+
import { ILogoComponent } from '@components/UI/atoms';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
export interface IHeaderAnalyst {
|
|
4
5
|
/**
|
|
5
6
|
* Breadcrumbs props
|
|
@@ -30,9 +31,9 @@ export interface IHeaderAnalyst {
|
|
|
30
31
|
*/
|
|
31
32
|
userMenuProps: IUserMenuWrapperAnalystProps;
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Component to display a custom notification bell
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
notificationBell?: React.ReactNode;
|
|
36
37
|
}
|
|
37
38
|
export interface ILogoAnalyst extends ILogoComponent {
|
|
38
39
|
/**
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { IBreadcrumbs, IUserAnalyst, IUserMenuWrapperAnalystProps } from '@components/UI/molecules';
|
|
2
2
|
import { IHeaderAnalyst, INavMenuAnalystProps, IModalAnalystProps } from '@components/UI/organism';
|
|
3
|
-
import { ILinkProps } from '@components/UI/atoms';
|
|
4
3
|
import { IAnalystTemplateProps } from '@components/UI/template';
|
|
5
4
|
export declare const BreadCrumbAnalystProps: IBreadcrumbs;
|
|
6
5
|
export declare const UserAnalystProps: IUserAnalyst;
|
|
7
|
-
export declare const UserNotificationProps: ILinkProps;
|
|
8
6
|
export declare const UserMenuAnalystProps: IUserMenuWrapperAnalystProps;
|
|
9
7
|
export declare const HeaderAnalystProps: IHeaderAnalyst;
|
|
10
8
|
export declare const NavMenuAnalystProps: INavMenuAnalystProps;
|