magneto365.ui 2.48.1 → 2.48.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.
@@ -14,4 +14,13 @@ export interface ICheckbox extends Omit<React.InputHTMLAttributes<HTMLInputEleme
14
14
  * change display behavior for checkbox.
15
15
  */
16
16
  display?: 'inline' | 'block';
17
+ /**
18
+ * renderProp to create check component.
19
+ * @param props
20
+ * @returns
21
+ */
22
+ renderCheck?: (props: {
23
+ checked: ICheckbox['checked'];
24
+ type: ICheckbox['type'];
25
+ }) => React.ReactNode;
17
26
  }
@@ -5,13 +5,14 @@ import { ISelectInput } from './children/SelectInput/SelectInput.interface';
5
5
  * @experimental this component is early, so that the interface component and behavrior could change.
6
6
  * @deprecated this function will change soon.
7
7
  */
8
- export declare const Select: (<T>({ children, renderSelect, placeholder, options, value, onChange, inputReadonly }: ISelect<T>) => JSX.Element) & {
8
+ export declare const Select: (<T>({ children, renderSelect, placeholder, options, value, onChange, inputReadonly, className, getLabel }: ISelect<T>) => JSX.Element) & {
9
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<{
10
+ Input: <T_2>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, disabled, placeholder, type, ...rest }: ISelectInput<T_2>) => JSX.Element;
11
+ Clickout: React.FC<Omit<{
12
12
  clickOut: boolean;
13
13
  setClickOut: (value: boolean) => void;
14
- }>;
14
+ children?: React.ReactNode;
15
+ }, "clickOut" | "setClickOut">>;
15
16
  Drawer: React.FC<import("./children/SelectDrawer").ISelectDrawer>;
16
17
  ListCheck: <T_3>({ className, renderItem, filter }: import("./children/SelectListCheck").ISelect2ListCheck<T_3>) => JSX.Element;
17
18
  };
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ISelectInput } from './children/SelectInput/SelectInput.interface';
3
3
  export interface ISelect<T> {
4
+ className?: string;
5
+ getLabel?: ISelectInput<T>['getLabel'];
4
6
  value: IValueSelect<T>[];
5
7
  onChange?: (value: IValueSelect<T>[]) => void;
6
8
  options: IOption<T>[];
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  declare type Props = {
3
3
  clickOut: boolean;
4
4
  setClickOut: (value: boolean) => void;
5
+ children?: React.ReactNode;
5
6
  };
6
- declare const _default: React.FC<Props>;
7
+ declare const _default: React.FC<Omit<Props, "clickOut" | "setClickOut">>;
7
8
  export default _default;
@@ -1,2 +1,2 @@
1
1
  import { ISelectInput } from './SelectInput.interface';
2
- export declare const SelectInput: <T>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, ...rest }: ISelectInput<T>) => JSX.Element;
2
+ export declare const SelectInput: <T>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, disabled, placeholder, type, ...rest }: ISelectInput<T>) => JSX.Element;
@@ -1,14 +1,22 @@
1
- import { IInput } from '@components/UI/molecules/Input/Input.interface';
1
+ import { IInput } from '../../../../molecules/Input/Input.interface';
2
2
  import { ISelect, IValueSelect } from '../../Select.interface';
3
- export interface ISelectInput<T> extends IInput {
3
+ export interface ISelectInput<T> extends Omit<IInput, 'onChange' | 'value' | 'placeholder' | 'type'> {
4
+ /**
5
+ * input value.
6
+ */
7
+ value?: IInput['value'];
8
+ /**
9
+ * event to request change.
10
+ */
11
+ onChange?: IInput['onChange'];
4
12
  /**
5
13
  * placeholder for input.
6
14
  */
7
- placeholder: IInput['placeholder'];
15
+ placeholder?: IInput['placeholder'];
8
16
  /**
9
17
  * type for input.
10
18
  */
11
- type: IInput['type'];
19
+ type?: IInput['type'];
12
20
  /**
13
21
  * to know if the select is open.
14
22
  */
@@ -16,11 +24,11 @@ export interface ISelectInput<T> extends IInput {
16
24
  /**
17
25
  * select value.
18
26
  */
19
- selected: ISelect<T>['value'];
27
+ selected?: ISelect<T>['value'];
20
28
  /**
21
29
  * onClick on input container.
22
30
  */
23
- onClick: () => void;
31
+ onClick?: () => void;
24
32
  /**
25
33
  * display values selected in input.
26
34
  */
package/dist/index.d.ts CHANGED
@@ -17,7 +17,6 @@ import { IJobVideo as IJobVideo$1 } from '@components/UI/molecules/JobVideo';
17
17
  import { IMobileDatePicker as IMobileDatePicker$2 } from '@components/UI/organism/MobileDatePicker/MobileDatePicker.interface';
18
18
  import { IActions as IActions$1 } from '@components/UI/molecules/Actions';
19
19
  import { INavMenuAnalystProps as INavMenuAnalystProps$1 } from '@components/UI/organism/NavMenuAnalyst';
20
- import { IInput as IInput$1 } from '@components/UI/molecules/Input/Input.interface';
21
20
  import { IJobCard as IJobCard$1 } from '@components/UI/molecules/JobCard/JobCard.interface';
22
21
  import { ISortBar as ISortBar$1 } from '@components/UI/template/SortBar/SortBar.interface';
23
22
  import { ISideFilter as ISideFilter$1 } from '@components/UI/template';
@@ -3850,15 +3849,23 @@ declare type StepDetails = {
3850
3849
 
3851
3850
  declare const Timeline: React$1.FC<ITimelineProps>;
3852
3851
 
3853
- interface ISelectInput<T> extends IInput$1 {
3852
+ interface ISelectInput<T> extends Omit<IInput, 'onChange' | 'value' | 'placeholder' | 'type'> {
3853
+ /**
3854
+ * input value.
3855
+ */
3856
+ value?: IInput['value'];
3857
+ /**
3858
+ * event to request change.
3859
+ */
3860
+ onChange?: IInput['onChange'];
3854
3861
  /**
3855
3862
  * placeholder for input.
3856
3863
  */
3857
- placeholder: IInput$1['placeholder'];
3864
+ placeholder?: IInput['placeholder'];
3858
3865
  /**
3859
3866
  * type for input.
3860
3867
  */
3861
- type: IInput$1['type'];
3868
+ type?: IInput['type'];
3862
3869
  /**
3863
3870
  * to know if the select is open.
3864
3871
  */
@@ -3866,11 +3873,11 @@ interface ISelectInput<T> extends IInput$1 {
3866
3873
  /**
3867
3874
  * select value.
3868
3875
  */
3869
- selected: ISelect<T>['value'];
3876
+ selected?: ISelect<T>['value'];
3870
3877
  /**
3871
3878
  * onClick on input container.
3872
3879
  */
3873
- onClick: () => void;
3880
+ onClick?: () => void;
3874
3881
  /**
3875
3882
  * display values selected in input.
3876
3883
  */
@@ -3886,6 +3893,8 @@ interface ISelectInput<T> extends IInput$1 {
3886
3893
  }
3887
3894
 
3888
3895
  interface ISelect<T> {
3896
+ className?: string;
3897
+ getLabel?: ISelectInput<T>['getLabel'];
3889
3898
  value: IValueSelect<T>[];
3890
3899
  onChange?: (value: IValueSelect<T>[]) => void;
3891
3900
  options: IOption<T>[];
@@ -3949,13 +3958,14 @@ interface ISelectContext<T> {
3949
3958
  * @experimental this component is early, so that the interface component and behavrior could change.
3950
3959
  * @deprecated this function will change soon.
3951
3960
  */
3952
- declare const Select: (<T>({ children, renderSelect, placeholder, options, value, onChange, inputReadonly }: ISelect<T>) => JSX.Element) & {
3961
+ declare const Select: (<T>({ children, renderSelect, placeholder, options, value, onChange, inputReadonly, className, getLabel }: ISelect<T>) => JSX.Element) & {
3953
3962
  useContext: <T_1>() => ISelectContext<T_1>;
3954
- Input: <T_2>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, ...rest }: ISelectInput<T_2>) => JSX.Element;
3955
- Clickout: React$1.FC<{
3963
+ Input: <T_2>({ onChange, value, className, onClick, open, actionIcon, selected, getLabel, readOnly, disabled, placeholder, type, ...rest }: ISelectInput<T_2>) => JSX.Element;
3964
+ Clickout: React$1.FC<Omit<{
3956
3965
  clickOut: boolean;
3957
3966
  setClickOut: (value: boolean) => void;
3958
- }>;
3967
+ children?: React$1.ReactNode;
3968
+ }, "clickOut" | "setClickOut">>;
3959
3969
  Drawer: React$1.FC<ISelectDrawer>;
3960
3970
  ListCheck: <T_3>({ className, renderItem, filter }: ISelect2ListCheck<T_3>) => JSX.Element;
3961
3971
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/W170/talenta.magneto365.ui.git"
6
6
  },
7
- "version": "2.48.1",
7
+ "version": "2.48.4",
8
8
  "description": "Magneto365 UI common components",
9
9
  "scripts": {
10
10
  "lint": "eslint ./src --ext .js,.ts,.jsx,.tsx",