magneto365.ui 2.74.1-beta → 2.74.1-beta.2
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 +1026 -835
- 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/MegaMenuEmpty/MegaMenuEmpty.interface.d.ts +15 -1
- package/dist/cjs/types/components/UI/molecules/MegaMenuSearchBar/MegaMenuSearchBar.interface.d.ts +7 -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/SimilarCard/SimilarCard.component.d.ts +1 -1
- package/dist/cjs/types/components/UI/molecules/SimilarCard/SimilarCard.interface.d.ts +19 -2
- package/dist/cjs/types/components/UI/molecules/SimilarCard/children/SimilarCardText/SimilarCardText.component.d.ts +3 -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/cjs/types/constants/stories/select2.constants.d.ts +17 -0
- package/dist/cjs/types/utils/string/normalizeString.util.d.ts +1 -0
- package/dist/esm/css/magneto.ui.lib.min.css +1 -1
- package/dist/esm/index.js +1023 -836
- 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/MegaMenuEmpty/MegaMenuEmpty.interface.d.ts +15 -1
- package/dist/esm/types/components/UI/molecules/MegaMenuSearchBar/MegaMenuSearchBar.interface.d.ts +7 -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/SimilarCard/SimilarCard.component.d.ts +1 -1
- package/dist/esm/types/components/UI/molecules/SimilarCard/SimilarCard.interface.d.ts +19 -2
- package/dist/esm/types/components/UI/molecules/SimilarCard/children/SimilarCardText/SimilarCardText.component.d.ts +3 -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/esm/types/constants/stories/select2.constants.d.ts +17 -0
- package/dist/esm/types/utils/string/normalizeString.util.d.ts +1 -0
- package/dist/index.d.ts +155 -7
- 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
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface IMegaMenuEmpty {
|
|
2
3
|
/**
|
|
3
4
|
* Empty Title
|
|
@@ -10,5 +11,18 @@ export interface IMegaMenuEmpty {
|
|
|
10
11
|
/**
|
|
11
12
|
* Image Data
|
|
12
13
|
*/
|
|
13
|
-
imageData
|
|
14
|
+
imageData?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Image heigth
|
|
17
|
+
*/
|
|
18
|
+
imageHeight?: number;
|
|
19
|
+
/**
|
|
20
|
+
* CustomStyles
|
|
21
|
+
*/
|
|
22
|
+
customStyle?: {
|
|
23
|
+
content?: React.CSSProperties;
|
|
24
|
+
title?: React.CSSProperties;
|
|
25
|
+
subtitle?: React.CSSProperties;
|
|
26
|
+
image?: React.CSSProperties;
|
|
27
|
+
};
|
|
14
28
|
}
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ISimilarCard } from './SimilarCard.interface';
|
|
3
3
|
export declare const SimilarCard: React.FC<ISimilarCard> & {
|
|
4
|
-
Text: React.FC<
|
|
4
|
+
Text: React.FC<ISimilarCard.Text>;
|
|
5
5
|
Logo: React.FC<ISimilarCard.Logo>;
|
|
6
6
|
Icon: React.FC<ISimilarCard.Icon>;
|
|
7
7
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ICustomText } from '@components/UI/atoms/Text/Text.interface';
|
|
3
2
|
export interface ISimilarCard {
|
|
4
3
|
/**
|
|
5
4
|
* this property sets the url title
|
|
@@ -101,11 +100,29 @@ export declare namespace ISimilarCard {
|
|
|
101
100
|
/**
|
|
102
101
|
* If the text must show more than one line, use customText instead text
|
|
103
102
|
* */
|
|
104
|
-
customText?:
|
|
103
|
+
customText?: CustomText[];
|
|
105
104
|
/**
|
|
106
105
|
* this property sets custom styles
|
|
107
106
|
*/
|
|
108
107
|
className?: string;
|
|
108
|
+
/**
|
|
109
|
+
* This property allows you to set the tag for the first text.
|
|
110
|
+
*/
|
|
111
|
+
headingType?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
112
|
+
}
|
|
113
|
+
interface CustomText {
|
|
114
|
+
/**
|
|
115
|
+
* This is the value to the custom text
|
|
116
|
+
* */
|
|
117
|
+
value: string | React.ReactNode;
|
|
118
|
+
/**
|
|
119
|
+
* This is the custom font weight to text
|
|
120
|
+
* */
|
|
121
|
+
fontWeight: 'normal' | 'bold' | 'lighter';
|
|
122
|
+
/**
|
|
123
|
+
* This is the custom line break to text
|
|
124
|
+
* */
|
|
125
|
+
lineBreak?: boolean;
|
|
109
126
|
}
|
|
110
127
|
interface Icon {
|
|
111
128
|
/**
|
|
@@ -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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SELECT2_PROPS: {
|
|
2
|
+
className: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
isMultiple: boolean;
|
|
6
|
+
haveTags: boolean;
|
|
7
|
+
limitSelections: number;
|
|
8
|
+
currentFields: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
icon: any;
|
|
13
|
+
selectList: {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeString: (str: string) => string;
|