magneto365.ui 2.45.2 → 2.47.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/assets/360b8d098be3a53b.svg +7 -0
- package/dist/assets/bdaa69e0d22124aa.svg +6 -0
- package/dist/cjs/css/magneto.ui.lib.min.css +1 -1
- package/dist/cjs/index.js +1365 -854
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/UI/atoms/Checkbox/Checkbox.component.d.ts +3 -0
- package/dist/cjs/types/components/UI/atoms/Checkbox/Checkbox.interface.d.ts +17 -0
- package/dist/cjs/types/components/UI/atoms/Checkbox/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/ExpandableInfo.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/ExpandableInfo.interface.d.ts +54 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.constants.d.ts +3 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.interface.d.ts +38 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/ExpandableInfoDetails.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/ExpandableInfoDetails.interface.d.ts +32 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.constants.d.ts +3 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.interface.d.ts +16 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/ExpandableInfoModal.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/ExpandableInfoModal.interface.d.ts +11 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/ExpandableInfoPopover.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/ExpandableInfoPopover.interface.d.ts +20 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.component.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.constants.d.ts +3 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.interface.d.ts +16 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/children/index.d.ts +6 -0
- package/dist/cjs/types/components/UI/molecules/ExpandableInfo/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/molecules/MobileDrawer/MobileDrawer.interface.d.ts +2 -1
- package/dist/cjs/types/components/UI/molecules/index.d.ts +1 -0
- package/dist/cjs/types/components/UI/organism/Select/Select.component.d.ts +17 -0
- package/dist/cjs/types/components/UI/organism/Select/Select.context.d.ts +33 -0
- package/dist/cjs/types/components/UI/organism/Select/Select.interface.d.ts +18 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectClickout/SelectClickout.component.d.ts +7 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectClickout/index.d.ts +1 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectDrawer/SelectDrawer.d.ts +4 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectDrawer/SelectDrawer.interface.d.ts +5 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectDrawer/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectInput/SelectInput.component.d.ts +2 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectInput/SelectInput.interface.d.ts +36 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectListCheck/SelectListCheck.component.d.ts +2 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectListCheck/SelectListCheck.interface.d.ts +8 -0
- package/dist/cjs/types/components/UI/organism/Select/children/SelectListCheck/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/organism/Select/index.d.ts +2 -0
- package/dist/cjs/types/components/UI/organism/index.d.ts +1 -0
- package/dist/cjs/types/constants/icons.constants.d.ts +15 -13
- package/dist/cjs/types/constants/stories/Select2Multiple.constants.d.ts +5 -0
- package/dist/cjs/types/constants/stories/expandableInfo.constants.d.ts +5 -0
- package/dist/cjs/types/constants/stories/index.d.ts +1 -0
- package/dist/cjs/types/shared/utils/common/classNames.util.d.ts +3 -0
- package/dist/cjs/types/shared/utils/common/index.d.ts +2 -0
- package/dist/cjs/types/shared/utils/common/stub.util.d.ts +2 -0
- package/dist/cjs/types/shared/utils/storybook/withControlField.hoc.d.ts +6 -3
- package/dist/cjs/types/utils/classNameManager/classNameManager.util.d.ts +1 -1
- package/dist/esm/css/magneto.ui.lib.min.css +1 -1
- package/dist/esm/index.js +1364 -855
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/UI/atoms/Checkbox/Checkbox.component.d.ts +3 -0
- package/dist/esm/types/components/UI/atoms/Checkbox/Checkbox.interface.d.ts +17 -0
- package/dist/esm/types/components/UI/atoms/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/ExpandableInfo.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/ExpandableInfo.interface.d.ts +54 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.constants.d.ts +3 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/ExpandableInfoAction.interface.d.ts +38 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoAction/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/ExpandableInfoDetails.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/ExpandableInfoDetails.interface.d.ts +32 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoDetails/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.constants.d.ts +3 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/ExpandableInfoMessage.interface.d.ts +16 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoMessage/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/ExpandableInfoModal.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/ExpandableInfoModal.interface.d.ts +11 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoModal/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/ExpandableInfoPopover.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/ExpandableInfoPopover.interface.d.ts +20 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoPopover/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.component.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.constants.d.ts +3 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/ExpandableInfoToggler.interface.d.ts +16 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/ExpandableInfoToggler/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/children/index.d.ts +6 -0
- package/dist/esm/types/components/UI/molecules/ExpandableInfo/index.d.ts +2 -0
- package/dist/esm/types/components/UI/molecules/MobileDrawer/MobileDrawer.interface.d.ts +2 -1
- package/dist/esm/types/components/UI/molecules/index.d.ts +1 -0
- package/dist/esm/types/components/UI/organism/Select/Select.component.d.ts +17 -0
- package/dist/esm/types/components/UI/organism/Select/Select.context.d.ts +33 -0
- package/dist/esm/types/components/UI/organism/Select/Select.interface.d.ts +18 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectClickout/SelectClickout.component.d.ts +7 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectClickout/index.d.ts +1 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectDrawer/SelectDrawer.d.ts +4 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectDrawer/SelectDrawer.interface.d.ts +5 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectDrawer/index.d.ts +2 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectInput/SelectInput.component.d.ts +2 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectInput/SelectInput.interface.d.ts +36 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectListCheck/SelectListCheck.component.d.ts +2 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectListCheck/SelectListCheck.interface.d.ts +8 -0
- package/dist/esm/types/components/UI/organism/Select/children/SelectListCheck/index.d.ts +2 -0
- package/dist/esm/types/components/UI/organism/Select/index.d.ts +2 -0
- package/dist/esm/types/components/UI/organism/index.d.ts +1 -0
- package/dist/esm/types/constants/icons.constants.d.ts +15 -13
- package/dist/esm/types/constants/stories/Select2Multiple.constants.d.ts +5 -0
- package/dist/esm/types/constants/stories/expandableInfo.constants.d.ts +5 -0
- package/dist/esm/types/constants/stories/index.d.ts +1 -0
- package/dist/esm/types/shared/utils/common/classNames.util.d.ts +3 -0
- package/dist/esm/types/shared/utils/common/index.d.ts +2 -0
- package/dist/esm/types/shared/utils/common/stub.util.d.ts +2 -0
- package/dist/esm/types/shared/utils/storybook/withControlField.hoc.d.ts +6 -3
- package/dist/esm/types/utils/classNameManager/classNameManager.util.d.ts +1 -1
- package/dist/index.d.ts +256 -2
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ICheckbox extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
|
+
/**
|
|
4
|
+
* event to controll the change value component.
|
|
5
|
+
* @param checked
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
9
|
+
/**
|
|
10
|
+
* change UI behavior with this prop.
|
|
11
|
+
*/
|
|
12
|
+
type?: 'box' | 'background';
|
|
13
|
+
/**
|
|
14
|
+
* change display behavior for checkbox.
|
|
15
|
+
*/
|
|
16
|
+
display?: 'inline' | 'block';
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IExpandableInfoActionProps, IExpandableInfoDetailsProps, IExpandableInfoMessageProps } from './children';
|
|
2
|
+
import { IconProps } from '@components/UI/atoms';
|
|
3
|
+
export interface IExpandableInfoProps {
|
|
4
|
+
/**
|
|
5
|
+
* Main action
|
|
6
|
+
*/
|
|
7
|
+
actions?: IExpandableInfoActionProps[];
|
|
8
|
+
/**
|
|
9
|
+
* Details list
|
|
10
|
+
*/
|
|
11
|
+
details?: IExpandableInfoDetailsProps;
|
|
12
|
+
/**
|
|
13
|
+
* Floating component or not
|
|
14
|
+
*/
|
|
15
|
+
floating?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Footer message
|
|
18
|
+
*/
|
|
19
|
+
message?: IExpandableInfoMessageProps;
|
|
20
|
+
/**
|
|
21
|
+
* Left icon of the dropdown
|
|
22
|
+
*/
|
|
23
|
+
prefixIcon?: IconProps;
|
|
24
|
+
/**
|
|
25
|
+
* Size of component
|
|
26
|
+
*/
|
|
27
|
+
size?: TExpandableInfoSize;
|
|
28
|
+
/**
|
|
29
|
+
* Right icon of the dropdown
|
|
30
|
+
*/
|
|
31
|
+
suffixIcon?: IconProps;
|
|
32
|
+
/**
|
|
33
|
+
* Main summary
|
|
34
|
+
*/
|
|
35
|
+
summary?: string | number;
|
|
36
|
+
/**
|
|
37
|
+
* Main title
|
|
38
|
+
*/
|
|
39
|
+
title?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Type of component theme
|
|
42
|
+
*/
|
|
43
|
+
variant?: TExpandableInfoVariant;
|
|
44
|
+
}
|
|
45
|
+
export declare type TExpandableInfoVariant = `${EExpandableInfoVariant}`;
|
|
46
|
+
export declare enum EExpandableInfoVariant {
|
|
47
|
+
BLUE = "blue",
|
|
48
|
+
WHITE = "white"
|
|
49
|
+
}
|
|
50
|
+
export declare type TExpandableInfoSize = `${EExpandableInfoSize}`;
|
|
51
|
+
export declare enum EExpandableInfoSize {
|
|
52
|
+
SMALL = "small",
|
|
53
|
+
LARGE = "large"
|
|
54
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IconProps } from '@components/UI/atoms';
|
|
2
|
+
export interface IExpandableInfoActionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Custom class name
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Loading state
|
|
9
|
+
*/
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Function or URL
|
|
13
|
+
*/
|
|
14
|
+
onAction?: (() => void) | string;
|
|
15
|
+
/**
|
|
16
|
+
* Left icon of the action
|
|
17
|
+
*/
|
|
18
|
+
prefixIcon?: IconProps;
|
|
19
|
+
/**
|
|
20
|
+
* Right icon of the action
|
|
21
|
+
*/
|
|
22
|
+
suffixIcon?: IconProps;
|
|
23
|
+
/**
|
|
24
|
+
* Action title
|
|
25
|
+
*/
|
|
26
|
+
title?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Action variant
|
|
29
|
+
*/
|
|
30
|
+
variant?: TExpandableInfoActionVariant;
|
|
31
|
+
}
|
|
32
|
+
export declare type TExpandableInfoActionVariant = `${EExpandableInfoActionVariant}`;
|
|
33
|
+
export declare enum EExpandableInfoActionVariant {
|
|
34
|
+
DARK_BLUE = "dark-blue",
|
|
35
|
+
LIGHT_BLUE = "light-blue",
|
|
36
|
+
WHITE = "white",
|
|
37
|
+
GREEN = "green"
|
|
38
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IExpandableInfoActionProps } from '../ExpandableInfoAction';
|
|
2
|
+
export interface IExpandableInfoDetailsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Details sections
|
|
5
|
+
*/
|
|
6
|
+
sections?: IExpandableInfoDetailsSection[];
|
|
7
|
+
/**
|
|
8
|
+
* Details footer action
|
|
9
|
+
*/
|
|
10
|
+
footer?: TExpandableInfoDetailsFooter;
|
|
11
|
+
}
|
|
12
|
+
export declare type TExpandableInfoDetailsFooter = Pick<IExpandableInfoActionProps, 'title' | 'onAction'>;
|
|
13
|
+
export interface IExpandableInfoDetailsSection {
|
|
14
|
+
/**
|
|
15
|
+
* Section children
|
|
16
|
+
*/
|
|
17
|
+
children: IExpandableInfoDetailsContent[];
|
|
18
|
+
}
|
|
19
|
+
export interface IExpandableInfoDetailsContent {
|
|
20
|
+
/**
|
|
21
|
+
* Section title
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
/**
|
|
25
|
+
* Section summary
|
|
26
|
+
*/
|
|
27
|
+
summary: string;
|
|
28
|
+
/**
|
|
29
|
+
* Section sub content
|
|
30
|
+
*/
|
|
31
|
+
content?: IExpandableInfoDetailsContent[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IconProps } from '@components/UI/atoms';
|
|
2
|
+
import { IExpandableInfoProps } from '../../ExpandableInfo.interface';
|
|
3
|
+
export interface IExpandableInfoMessageProps extends Pick<IExpandableInfoProps, 'variant'> {
|
|
4
|
+
/**
|
|
5
|
+
* Class name
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Message title
|
|
10
|
+
*/
|
|
11
|
+
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Left icon of the dropdown
|
|
14
|
+
*/
|
|
15
|
+
prefixIcon?: IconProps;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IExpandableInfoDetailsProps, IExpandableInfoTogglerProps } from '../index';
|
|
2
|
+
export interface IExpandableInfoModalProps {
|
|
3
|
+
/**
|
|
4
|
+
* Details props
|
|
5
|
+
*/
|
|
6
|
+
details?: IExpandableInfoDetailsProps;
|
|
7
|
+
/**
|
|
8
|
+
* Toggler props
|
|
9
|
+
*/
|
|
10
|
+
toggler: Omit<IExpandableInfoTogglerProps, 'onToggle'>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IExpandableInfoTogglerProps, IExpandableInfoDetailsProps } from '../index';
|
|
3
|
+
export interface IExpandableInfoPopoverProps {
|
|
4
|
+
/**
|
|
5
|
+
* Details props
|
|
6
|
+
*/
|
|
7
|
+
details?: IExpandableInfoDetailsProps;
|
|
8
|
+
/**
|
|
9
|
+
* Toggler props
|
|
10
|
+
*/
|
|
11
|
+
toggler: Omit<IExpandableInfoTogglerProps, 'onToggle'>;
|
|
12
|
+
/**
|
|
13
|
+
* Click out
|
|
14
|
+
*/
|
|
15
|
+
clickOut?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Set click out
|
|
18
|
+
*/
|
|
19
|
+
setClickOut?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IExpandableInfoProps } from '../../ExpandableInfo.interface';
|
|
2
|
+
import { IconProps } from '@components/UI/atoms';
|
|
3
|
+
export interface IExpandableInfoTogglerProps extends Omit<IExpandableInfoProps, 'actionButton' | 'message' | 'clickOut' | 'setClickOut' | 'floating'> {
|
|
4
|
+
/**
|
|
5
|
+
* Function to be called when the toggler is clicked
|
|
6
|
+
*/
|
|
7
|
+
onToggle: (value?: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Left icon of the dropdown
|
|
10
|
+
*/
|
|
11
|
+
prefixIcon?: IconProps;
|
|
12
|
+
/**
|
|
13
|
+
* Right icon of the dropdown
|
|
14
|
+
*/
|
|
15
|
+
suffixIcon?: IconProps;
|
|
16
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface IMoblieDrawer {
|
|
2
3
|
className?: string;
|
|
3
4
|
/**
|
|
@@ -11,7 +12,7 @@ export interface IMoblieDrawer {
|
|
|
11
12
|
/**
|
|
12
13
|
* can receive components inside the drawer
|
|
13
14
|
*/
|
|
14
|
-
children: JSX.Element | JSX.Element[];
|
|
15
|
+
children: JSX.Element | JSX.Element[] | React.ReactNode;
|
|
15
16
|
/**
|
|
16
17
|
* this property blocks fn onClose from background
|
|
17
18
|
*/
|
|
@@ -8,6 +8,7 @@ export * from './CitiesDetailDrawer';
|
|
|
8
8
|
export * from './DatePicker';
|
|
9
9
|
export * from './Drawer';
|
|
10
10
|
export * from './EmptyResults';
|
|
11
|
+
export * from './ExpandableInfo';
|
|
11
12
|
export * from './FilterContainerMenu';
|
|
12
13
|
export * from './FilterMenuItem';
|
|
13
14
|
export * from './FilterSearchItem';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISelect } from './Select.interface';
|
|
3
|
+
import { ISelectInput } from './children/SelectInput/SelectInput.interface';
|
|
4
|
+
/**
|
|
5
|
+
* @experimental this component is early, so that the interface component and behavrior could change.
|
|
6
|
+
* @deprecated this function will change soon.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Select: (<T>({ children, renderSelect, placeholder, options, value, onChange, inputReadonly }: ISelect<T>) => JSX.Element) & {
|
|
9
|
+
useContext: <T_1>() => import("./Select.context").ISelectContext<T_1>;
|
|
10
|
+
Input: <T_2>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, ...rest }: ISelectInput<T_2>) => JSX.Element;
|
|
11
|
+
Clickout: React.FC<{
|
|
12
|
+
clickOut: boolean;
|
|
13
|
+
setClickOut: (value: boolean) => void;
|
|
14
|
+
}>;
|
|
15
|
+
Drawer: React.FC<import("./children/SelectDrawer").ISelectDrawer>;
|
|
16
|
+
ListCheck: <T_3>({ className, renderItem, filter }: import("./children/SelectListCheck").ISelect2ListCheck<T_3>) => JSX.Element;
|
|
17
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISelect } from './Select.interface';
|
|
3
|
+
export interface ISelectContext<T> {
|
|
4
|
+
value: ISelect<T>['value'];
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param value
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
onChange: (value: ISelectContext<T>['value']) => void;
|
|
11
|
+
/**
|
|
12
|
+
* current options to display in select list components.
|
|
13
|
+
*/
|
|
14
|
+
options: ISelect<T>['options'];
|
|
15
|
+
/**
|
|
16
|
+
* input search values, it works for make filters.
|
|
17
|
+
*/
|
|
18
|
+
search: string;
|
|
19
|
+
/**
|
|
20
|
+
* @param search current search input value.
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
onSearch: (search: string | ((current: string) => string)) => void;
|
|
24
|
+
open: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param value current state from Drawer (open/close).
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
onSwitch: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare const SelectContext: React.Context<ISelectContext<any>>;
|
|
33
|
+
export declare const useSelectContext: <T>() => ISelectContext<T>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISelectInput } from './children/SelectInput/SelectInput.interface';
|
|
3
|
+
export interface ISelect<T> {
|
|
4
|
+
value: IValueSelect<T>[];
|
|
5
|
+
onChange?: (value: IValueSelect<T>[]) => void;
|
|
6
|
+
options: IOption<T>[];
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
renderSelect?: <T>(props: ISelectInput<T>) => React.ReactNode;
|
|
9
|
+
inputReadonly?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface IValueSelect<T> {
|
|
13
|
+
id: number | string;
|
|
14
|
+
value: T;
|
|
15
|
+
}
|
|
16
|
+
export interface IOption<T> extends IValueSelect<T> {
|
|
17
|
+
label?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SelectClickout } from './SelectClickout.component';
|
package/dist/esm/types/components/UI/organism/Select/children/SelectInput/SelectInput.interface.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IInput } from '@components/UI/molecules/Input/Input.interface';
|
|
2
|
+
import { ISelect, IValueSelect } from '../../Select.interface';
|
|
3
|
+
export interface ISelectInput<T> extends IInput {
|
|
4
|
+
/**
|
|
5
|
+
* placeholder for input.
|
|
6
|
+
*/
|
|
7
|
+
placeholder: IInput['placeholder'];
|
|
8
|
+
/**
|
|
9
|
+
* type for input.
|
|
10
|
+
*/
|
|
11
|
+
type: IInput['type'];
|
|
12
|
+
/**
|
|
13
|
+
* to know if the select is open.
|
|
14
|
+
*/
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* select value.
|
|
18
|
+
*/
|
|
19
|
+
selected: ISelect<T>['value'];
|
|
20
|
+
/**
|
|
21
|
+
* onClick on input container.
|
|
22
|
+
*/
|
|
23
|
+
onClick: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* display values selected in input.
|
|
26
|
+
*/
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The select value is generic, so for display correctly the label in input
|
|
30
|
+
* use this function.
|
|
31
|
+
* @param value current values selected
|
|
32
|
+
* @default (value) => value.map(select => select.value).join(', ')
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
getLabel?: (value: IValueSelect<T>[]) => string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IOption } from '../../Select.interface';
|
|
2
|
+
export interface ISelect2ListCheck<T> {
|
|
3
|
+
className?: string;
|
|
4
|
+
filter?: (option: IOption<T>, searchValue: string, value?: IOption<T> | IOption<T>[] | undefined) => boolean;
|
|
5
|
+
renderItem?: (option: IOption<T>) => JSX.Element;
|
|
6
|
+
clickOut?: boolean;
|
|
7
|
+
setClickOut?: (clickOut: boolean) => void;
|
|
8
|
+
}
|
|
@@ -2,6 +2,10 @@ export { default as Add } from '../assets/Add.svg';
|
|
|
2
2
|
export { default as Add2 } from '../assets/Add2.svg';
|
|
3
3
|
export { default as AddSquareBlackOutline } from '../assets/addSquareBlackOutline.svg';
|
|
4
4
|
export { default as AllJobs } from '../assets/all-jobs.svg';
|
|
5
|
+
export { default as AnimatedSpinnerBlack } from '../assets/gif/spinnerBlack.gif';
|
|
6
|
+
export { default as AnimatedSpinnerBlue } from '../assets/gif/spinnerBlue.gif';
|
|
7
|
+
export { default as AnimatedSpinnerGreen } from '../assets/gif/spinnerGreen.gif';
|
|
8
|
+
export { default as AnimatedSpinnerWhite } from '../assets/gif/spinnerWhite.gif';
|
|
5
9
|
export { default as AppGallery } from '../assets/app-galery.svg';
|
|
6
10
|
export { default as AppStore } from '../assets/app-store.svg';
|
|
7
11
|
export { default as ArchiveAdd } from '../assets/ArchiveAdd.svg';
|
|
@@ -13,6 +17,7 @@ export { default as ArrowDownBlue } from '../assets/arrowDownBlue.svg';
|
|
|
13
17
|
export { default as ArrowDownWhite } from '../assets/arrowDownWhite.svg';
|
|
14
18
|
export { default as ArrowLeft2 } from '../assets/ArrowLeft2.svg';
|
|
15
19
|
export { default as ArrowRight2 } from '../assets/ArrowRight2.svg';
|
|
20
|
+
export { default as ArrowRightWhite } from '../assets/ArrowRightWhite.svg';
|
|
16
21
|
export { default as ArrowSwapVertical } from '../assets/ArrowSwapVertical.svg';
|
|
17
22
|
export { default as BookBlueBold } from '../assets/bookBlueBold.svg';
|
|
18
23
|
export { default as BookWhiteOutline } from '../assets/bookWhiteOutline.svg';
|
|
@@ -29,6 +34,9 @@ export { default as Checked } from '../assets/Checked.svg';
|
|
|
29
34
|
export { default as ClipboardClose } from '../assets/ClipboardClose.svg';
|
|
30
35
|
export { default as Clock } from '../assets/Clock.svg';
|
|
31
36
|
export { default as Close } from '../assets/Close.svg';
|
|
37
|
+
export { default as CloseCircle } from '../assets/closeCircle.svg';
|
|
38
|
+
export { default as CoinBlackOutline } from '../assets/coinBlackOutline.svg';
|
|
39
|
+
export { default as Danger } from '../assets/danger.svg';
|
|
32
40
|
export { default as DocTextBlueBold } from '../assets/docTextBlueBold.svg';
|
|
33
41
|
export { default as DocTextWhiteOutline } from '../assets/docTextWhiteOutline.svg';
|
|
34
42
|
export { default as DocumentText } from '../assets/DocumentText.svg';
|
|
@@ -39,11 +47,12 @@ export { default as DollarCircleWhiteOutline } from '../assets/dollarCircleWhite
|
|
|
39
47
|
export { default as Ellipsis } from '../assets/Ellipsis-h.svg';
|
|
40
48
|
export { default as Email } from '../assets/Email.svg';
|
|
41
49
|
export { default as Error } from '../assets/error.svg';
|
|
42
|
-
export { default as EyeSlash } from '../assets/eye-slash.svg';
|
|
43
50
|
export { default as Export3 } from '../assets/Export3.svg';
|
|
51
|
+
export { default as EyeSlash } from '../assets/eye-slash.svg';
|
|
44
52
|
export { default as Facebook } from '../assets/Facebook.svg';
|
|
45
53
|
export { default as FacebookBlue } from '../assets/Facebook2.svg';
|
|
46
54
|
export { default as FacebookDark } from '../assets/Facebook1.svg';
|
|
55
|
+
export { default as FacebookSolid } from '../assets/FacebookSolid.svg';
|
|
47
56
|
export { default as GooglePlay } from '../assets/google-play.svg';
|
|
48
57
|
export { default as GridBlueBold } from '../assets/gridBlueBold.svg';
|
|
49
58
|
export { default as GridWhiteOutline } from '../assets/gridWhiteOutline.svg';
|
|
@@ -58,6 +67,7 @@ export { default as ImageBlueBold } from '../assets/imageBlueBold.svg';
|
|
|
58
67
|
export { default as ImageWhiteOutline } from '../assets/imageWhiteOutline.svg';
|
|
59
68
|
export { default as Info } from '../assets/info.svg';
|
|
60
69
|
export { default as Instagram } from '../assets/Instagram.svg';
|
|
70
|
+
export { default as InstagramSolid } from '../assets/InstagramSolid.svg';
|
|
61
71
|
export { default as IsoLogoMagneto } from '../assets/favicon-m.svg';
|
|
62
72
|
export { default as IsoLogoMagnetoDark } from '../assets/logoMagnetoDarkMobile.svg';
|
|
63
73
|
export { default as Link } from '../assets/Link.svg';
|
|
@@ -66,6 +76,7 @@ export { default as LinkDark } from '../assets/Link21.svg';
|
|
|
66
76
|
export { default as Linkedin } from '../assets/Linkedin.svg';
|
|
67
77
|
export { default as LinkedInBlue } from '../assets/Linkedin2.svg';
|
|
68
78
|
export { default as LinkedInDark } from '../assets/Linkedin1.svg';
|
|
79
|
+
export { default as LinkedinSolid } from '../assets/LinkedinSolid.svg';
|
|
69
80
|
export { default as Location } from '../assets/Location.svg';
|
|
70
81
|
export { default as Lock } from '../assets/Lock.svg';
|
|
71
82
|
export { default as Login } from '../assets/Login.svg';
|
|
@@ -89,6 +100,7 @@ export { default as People } from '../assets/People.svg';
|
|
|
89
100
|
export { default as PeopleBlueBold } from '../assets/peopleBlueBold.svg';
|
|
90
101
|
export { default as PeopleWhiteOutline } from '../assets/peopleWhiteOutline.svg';
|
|
91
102
|
export { default as ProfileAdd } from '../assets/ProfileAdd.svg';
|
|
103
|
+
export { default as QuestionCircle } from '../assets/question-cirlce.svg';
|
|
92
104
|
export { default as RedoDarkBlue } from '../assets/redoDarkBlue.svg';
|
|
93
105
|
export { default as Refresh } from '../assets/Refresh.svg';
|
|
94
106
|
export { default as SearchIcon } from '../assets/SearchNormal1Gray.svg';
|
|
@@ -99,6 +111,7 @@ export { default as SettingBlueBold } from '../assets/settingBlueBold.svg';
|
|
|
99
111
|
export { default as SettingWhiteOutline } from '../assets/settingWhiteOutline.svg';
|
|
100
112
|
export { default as Share } from '../assets/Share.svg';
|
|
101
113
|
export { default as ShareBlue } from '../assets/Share1.svg';
|
|
114
|
+
export { default as ShoppingCartBlueOutline } from '../assets/shoppingCartBlueOutline.svg';
|
|
102
115
|
export { default as SmallClose } from '../assets/SmallClose.svg';
|
|
103
116
|
export { default as SMSBlue } from '../assets/SMS.svg';
|
|
104
117
|
export { default as SpinnerWhite } from '../assets/SpinnerWhite.svg';
|
|
@@ -109,6 +122,7 @@ export { default as TaskBlueBold } from '../assets/taskBlueBold.svg';
|
|
|
109
122
|
export { default as TaskSquare } from '../assets/TaskSquare.svg';
|
|
110
123
|
export { default as TaskWhiteOutline } from '../assets/taskWhiteOutline.svg';
|
|
111
124
|
export { default as Tiktok } from '../assets/Tiktok.svg';
|
|
125
|
+
export { default as TiktokSolid } from '../assets/TiktokSolid.svg';
|
|
112
126
|
export { default as Trash } from '../assets/trash.svg';
|
|
113
127
|
export { default as TwitterBlue } from '../assets/Twitter2.svg';
|
|
114
128
|
export { default as TwitterDark } from '../assets/Twitter1.svg';
|
|
@@ -123,16 +137,4 @@ export { default as WhatsAppColor } from '../assets/Whatsapp1.svg';
|
|
|
123
137
|
export { default as WhatsAppDark } from '../assets/Whatsapp.svg';
|
|
124
138
|
export { default as X } from '../assets/X.svg';
|
|
125
139
|
export { default as Youtube } from '../assets/Youtube.svg';
|
|
126
|
-
export { default as AnimatedSpinnerWhite } from '../assets/gif/spinnerWhite.gif';
|
|
127
|
-
export { default as AnimatedSpinnerBlack } from '../assets/gif/spinnerBlack.gif';
|
|
128
|
-
export { default as AnimatedSpinnerBlue } from '../assets/gif/spinnerBlue.gif';
|
|
129
|
-
export { default as AnimatedSpinnerGreen } from '../assets/gif/spinnerGreen.gif';
|
|
130
|
-
export { default as CloseCircle } from '../assets/closeCircle.svg';
|
|
131
|
-
export { default as Danger } from '../assets/danger.svg';
|
|
132
|
-
export { default as InstagramSolid } from '../assets/InstagramSolid.svg';
|
|
133
|
-
export { default as FacebookSolid } from '../assets/FacebookSolid.svg';
|
|
134
|
-
export { default as LinkedinSolid } from '../assets/LinkedinSolid.svg';
|
|
135
|
-
export { default as TiktokSolid } from '../assets/TiktokSolid.svg';
|
|
136
140
|
export { default as YoutubeSolid } from '../assets/YoutubeSolid.svg';
|
|
137
|
-
export { default as QuestionCircle } from '../assets/question-cirlce.svg';
|
|
138
|
-
export { default as ArrowRightWhite } from '../assets/ArrowRightWhite.svg';
|