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.
Files changed (68) hide show
  1. package/dist/cjs/css/magneto.ui.lib.min.css +1 -1
  2. package/dist/cjs/index.js +1026 -835
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/UI/atoms/InlineDetails/InlineDetails.component.d.ts +3 -0
  5. package/dist/cjs/types/components/UI/atoms/InlineDetails/InlineDetails.interface.d.ts +13 -0
  6. package/dist/cjs/types/components/UI/atoms/InlineDetails/index.d.ts +2 -0
  7. package/dist/cjs/types/components/UI/atoms/index.d.ts +1 -0
  8. package/dist/cjs/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +10 -0
  9. package/dist/cjs/types/components/UI/molecules/MegaMenuEmpty/MegaMenuEmpty.interface.d.ts +15 -1
  10. package/dist/cjs/types/components/UI/molecules/MegaMenuSearchBar/MegaMenuSearchBar.interface.d.ts +7 -0
  11. package/dist/cjs/types/components/UI/molecules/PortalTooltip/PortalTooltip.component.d.ts +3 -0
  12. package/dist/cjs/types/components/UI/molecules/PortalTooltip/PortalTooltip.interface.d.ts +45 -0
  13. package/dist/cjs/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltip.hook.d.ts +7 -0
  14. package/dist/cjs/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltipPosition.hook.d.ts +10 -0
  15. package/dist/cjs/types/components/UI/molecules/PortalTooltip/index.d.ts +2 -0
  16. package/dist/cjs/types/components/UI/molecules/ScrollableTab/ScrollableTab.component.d.ts +6 -0
  17. package/dist/cjs/types/components/UI/molecules/ScrollableTab/ScrollableTab.interface.d.ts +13 -0
  18. package/dist/cjs/types/components/UI/molecules/ScrollableTab/hooks/useScrollableTab.hook.d.ts +8 -0
  19. package/dist/cjs/types/components/UI/molecules/ScrollableTab/index.d.ts +2 -0
  20. package/dist/cjs/types/components/UI/molecules/SimilarCard/SimilarCard.component.d.ts +1 -1
  21. package/dist/cjs/types/components/UI/molecules/SimilarCard/SimilarCard.interface.d.ts +19 -2
  22. package/dist/cjs/types/components/UI/molecules/SimilarCard/children/SimilarCardText/SimilarCardText.component.d.ts +3 -0
  23. package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.component.d.ts +3 -0
  24. package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.interface.d.ts +24 -0
  25. package/dist/cjs/types/components/UI/molecules/TabItem/TabItem.stories.d.ts +8 -0
  26. package/dist/cjs/types/components/UI/molecules/TabItem/index.d.ts +2 -0
  27. package/dist/cjs/types/components/UI/molecules/Tooltip/Tooltip.interface.d.ts +1 -2
  28. package/dist/cjs/types/components/UI/molecules/index.d.ts +3 -0
  29. package/dist/cjs/types/components/UI/organism/HeaderAnalyst/HeaderAnalyst.interface.d.ts +4 -3
  30. package/dist/cjs/types/constants/stories/InlineDetails.contants.d.ts +2 -0
  31. package/dist/cjs/types/constants/stories/analyst.constants.d.ts +0 -2
  32. package/dist/cjs/types/constants/stories/select2.constants.d.ts +17 -0
  33. package/dist/cjs/types/utils/string/normalizeString.util.d.ts +1 -0
  34. package/dist/esm/css/magneto.ui.lib.min.css +1 -1
  35. package/dist/esm/index.js +1023 -836
  36. package/dist/esm/index.js.map +1 -1
  37. package/dist/esm/types/components/UI/atoms/InlineDetails/InlineDetails.component.d.ts +3 -0
  38. package/dist/esm/types/components/UI/atoms/InlineDetails/InlineDetails.interface.d.ts +13 -0
  39. package/dist/esm/types/components/UI/atoms/InlineDetails/index.d.ts +2 -0
  40. package/dist/esm/types/components/UI/atoms/index.d.ts +1 -0
  41. package/dist/esm/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +10 -0
  42. package/dist/esm/types/components/UI/molecules/MegaMenuEmpty/MegaMenuEmpty.interface.d.ts +15 -1
  43. package/dist/esm/types/components/UI/molecules/MegaMenuSearchBar/MegaMenuSearchBar.interface.d.ts +7 -0
  44. package/dist/esm/types/components/UI/molecules/PortalTooltip/PortalTooltip.component.d.ts +3 -0
  45. package/dist/esm/types/components/UI/molecules/PortalTooltip/PortalTooltip.interface.d.ts +45 -0
  46. package/dist/esm/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltip.hook.d.ts +7 -0
  47. package/dist/esm/types/components/UI/molecules/PortalTooltip/hooks/usePortalTooltipPosition.hook.d.ts +10 -0
  48. package/dist/esm/types/components/UI/molecules/PortalTooltip/index.d.ts +2 -0
  49. package/dist/esm/types/components/UI/molecules/ScrollableTab/ScrollableTab.component.d.ts +6 -0
  50. package/dist/esm/types/components/UI/molecules/ScrollableTab/ScrollableTab.interface.d.ts +13 -0
  51. package/dist/esm/types/components/UI/molecules/ScrollableTab/hooks/useScrollableTab.hook.d.ts +8 -0
  52. package/dist/esm/types/components/UI/molecules/ScrollableTab/index.d.ts +2 -0
  53. package/dist/esm/types/components/UI/molecules/SimilarCard/SimilarCard.component.d.ts +1 -1
  54. package/dist/esm/types/components/UI/molecules/SimilarCard/SimilarCard.interface.d.ts +19 -2
  55. package/dist/esm/types/components/UI/molecules/SimilarCard/children/SimilarCardText/SimilarCardText.component.d.ts +3 -0
  56. package/dist/esm/types/components/UI/molecules/TabItem/TabItem.component.d.ts +3 -0
  57. package/dist/esm/types/components/UI/molecules/TabItem/TabItem.interface.d.ts +24 -0
  58. package/dist/esm/types/components/UI/molecules/TabItem/TabItem.stories.d.ts +8 -0
  59. package/dist/esm/types/components/UI/molecules/TabItem/index.d.ts +2 -0
  60. package/dist/esm/types/components/UI/molecules/Tooltip/Tooltip.interface.d.ts +1 -2
  61. package/dist/esm/types/components/UI/molecules/index.d.ts +3 -0
  62. package/dist/esm/types/components/UI/organism/HeaderAnalyst/HeaderAnalyst.interface.d.ts +4 -3
  63. package/dist/esm/types/constants/stories/InlineDetails.contants.d.ts +2 -0
  64. package/dist/esm/types/constants/stories/analyst.constants.d.ts +0 -2
  65. package/dist/esm/types/constants/stories/select2.constants.d.ts +17 -0
  66. package/dist/esm/types/utils/string/normalizeString.util.d.ts +1 -0
  67. package/dist/index.d.ts +155 -7
  68. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { IInlineDetails } from './InlineDetails.interface';
2
+ export declare function InlineDetails({ details, className }: Readonly<IInlineDetails>): JSX.Element;
3
+ export default InlineDetails;
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export * from './InlineDetails.interface';
2
+ export { default as InlineDetails } from './InlineDetails.component';
@@ -42,3 +42,4 @@ export * from './Text';
42
42
  export * from './ToggleButton';
43
43
  export * from './Typography';
44
44
  export * from './UserMenuButtonAnalyst';
45
+ export * from './InlineDetails';
@@ -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: string;
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
  }
@@ -40,6 +40,13 @@ export interface ISearchBar {
40
40
  *
41
41
  */
42
42
  onSelectOption?: (option: ISearchOptions) => void;
43
+ /**
44
+ *
45
+ */
46
+ noContent?: {
47
+ title: string;
48
+ subtitle: string;
49
+ };
43
50
  }
44
51
  export interface ISectionTitle {
45
52
  title: string;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IPortalTooltipProps } from './PortalTooltip.interface';
3
+ export declare const PortalTooltip: React.FC<IPortalTooltipProps>;
@@ -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,2 @@
1
+ export * from './PortalTooltip.interface';
2
+ export { PortalTooltip } from './PortalTooltip.component';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { IScrollableTab } from './ScrollableTab.interface';
3
+ /**
4
+ * Molecule UI for ScrollableTab
5
+ */
6
+ export declare const ScrollableTab: React.FC<IScrollableTab>;
@@ -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,2 @@
1
+ export * from './ScrollableTab.interface';
2
+ export { ScrollableTab } from './ScrollableTab.component';
@@ -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<import("../../atoms/Text/Text.interface").IText>;
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?: ICustomText[];
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,3 @@
1
+ import React from 'react';
2
+ import { ISimilarCard } from '../../SimilarCard.interface';
3
+ export declare const SimilarCardText: React.FC<ISimilarCard.Text>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ITabItem } from './TabItem.interface';
3
+ export declare const TabItem: React.FC<ITabItem>;
@@ -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;
@@ -0,0 +1,2 @@
1
+ export * from './TabItem.interface';
2
+ export { TabItem } from './TabItem.component';
@@ -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, ILinkProps } from '@components/UI/atoms';
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
- * User notification link props
34
+ * Component to display a custom notification bell
34
35
  */
35
- userNotificationProps?: ILinkProps;
36
+ notificationBell?: React.ReactNode;
36
37
  }
37
38
  export interface ILogoAnalyst extends ILogoComponent {
38
39
  /**
@@ -0,0 +1,2 @@
1
+ import { IInlineDetails } from '@components/UI/atoms/InlineDetails';
2
+ export declare const inlineDetailsProps: IInlineDetails;
@@ -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;