@algorithm-shift/design-system 1.2.91 → 1.2.93

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/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default from 'react';
4
+ import * as axios from 'axios';
4
5
  import { ToasterProps } from 'sonner';
5
6
  import { ClassValue } from 'clsx';
6
7
 
@@ -46,7 +47,7 @@ type InputProperties = {
46
47
  text?: string;
47
48
  hasFormContainer?: boolean;
48
49
  defaultValue?: string | boolean;
49
- onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
50
+ onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>, name: string) => void;
50
51
  };
51
52
 
52
53
  type InputSourceProperties = {
@@ -70,19 +71,19 @@ interface TextInputGroupProps extends ElementProps, InputProperties {
70
71
  }
71
72
  interface CheckboxInputProps extends ElementProps, InputProperties {
72
73
  value?: boolean | any;
73
- onChange?: (value: boolean) => void;
74
+ onChange?: (value: boolean, name: string) => void;
74
75
  }
75
76
  interface RadioInputProps extends ElementProps, InputSourceProperties, InputProperties {
76
77
  value?: string | any;
77
- onChange?: (value: string) => void;
78
+ onChange?: (value: string, name: string) => void;
78
79
  }
79
80
  interface MultiCheckboxInputProps extends ElementProps, InputSourceProperties, InputProperties {
80
81
  value?: Record<string, boolean> | any;
81
- onChange?: (value: Record<string, boolean>) => void;
82
+ onChange?: (value: Record<string, boolean>, name: string) => void;
82
83
  }
83
84
  interface RichTextInputProps extends ElementProps, InputProperties {
84
85
  value?: string | any;
85
- onChange?: (value: string) => void;
86
+ onChange?: (value: string, name: string) => void;
86
87
  }
87
88
  interface SelectDropdownInputProps extends ElementProps, InputProperties, InputSourceProperties {
88
89
  source?: string;
@@ -90,16 +91,18 @@ interface SelectDropdownInputProps extends ElementProps, InputProperties, InputS
90
91
  apiUrl?: string;
91
92
  pageSize?: number;
92
93
  value?: string | any;
93
- onChange?: (value: string) => void;
94
+ onChange?: (value: string, name: string) => void;
95
+ axiosInstance?: typeof axios.default;
94
96
  }
95
97
  interface SwitchToggleInputProps extends ElementProps, InputProperties {
96
98
  value?: boolean | any;
97
- onChange?: (value: boolean) => void;
99
+ onChange?: (value: boolean, name: string) => void;
98
100
  }
99
101
  interface PhoneInputProps extends ElementProps, InputProperties { }
100
102
  interface DateRangeInputProps extends ElementProps {
103
+ name?: string;
101
104
  value?: { from?: Date; to?: Date } | undefined;
102
- onChange?: (value: { from?: Date; to?: Date } | undefined) => void;
105
+ onChange?: (value: { from?: Date; to?: Date } | undefined, name: string) => void;
103
106
  errorMessage?: string;
104
107
  validateOnMount?: boolean;
105
108
  }
@@ -298,7 +301,7 @@ declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps
298
301
 
299
302
  declare const RadioInput: ({ className, style, defaultValue, onChange, data, dataKey, dataLabel, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
300
303
 
301
- declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
304
+ declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, ...props }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
302
305
 
303
306
  declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
304
307
 
@@ -324,7 +327,7 @@ interface Option {
324
327
  }
325
328
  interface MultiSelectProps {
326
329
  value: string[];
327
- onChange: (value: string[]) => void;
330
+ onChange: (value: string[], name: string) => void;
328
331
  data: Option[];
329
332
  placeholder?: string;
330
333
  disabled?: boolean;
@@ -333,6 +336,7 @@ interface MultiSelectProps {
333
336
  errorMessage?: string;
334
337
  dataKey?: string;
335
338
  dataLabel?: string;
339
+ name: string;
336
340
  }
337
341
  declare const MultiSelect: React$1.FC<MultiSelectProps>;
338
342
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default from 'react';
4
+ import * as axios from 'axios';
4
5
  import { ToasterProps } from 'sonner';
5
6
  import { ClassValue } from 'clsx';
6
7
 
@@ -46,7 +47,7 @@ type InputProperties = {
46
47
  text?: string;
47
48
  hasFormContainer?: boolean;
48
49
  defaultValue?: string | boolean;
49
- onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
50
+ onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>, name: string) => void;
50
51
  };
51
52
 
52
53
  type InputSourceProperties = {
@@ -70,19 +71,19 @@ interface TextInputGroupProps extends ElementProps, InputProperties {
70
71
  }
71
72
  interface CheckboxInputProps extends ElementProps, InputProperties {
72
73
  value?: boolean | any;
73
- onChange?: (value: boolean) => void;
74
+ onChange?: (value: boolean, name: string) => void;
74
75
  }
75
76
  interface RadioInputProps extends ElementProps, InputSourceProperties, InputProperties {
76
77
  value?: string | any;
77
- onChange?: (value: string) => void;
78
+ onChange?: (value: string, name: string) => void;
78
79
  }
79
80
  interface MultiCheckboxInputProps extends ElementProps, InputSourceProperties, InputProperties {
80
81
  value?: Record<string, boolean> | any;
81
- onChange?: (value: Record<string, boolean>) => void;
82
+ onChange?: (value: Record<string, boolean>, name: string) => void;
82
83
  }
83
84
  interface RichTextInputProps extends ElementProps, InputProperties {
84
85
  value?: string | any;
85
- onChange?: (value: string) => void;
86
+ onChange?: (value: string, name: string) => void;
86
87
  }
87
88
  interface SelectDropdownInputProps extends ElementProps, InputProperties, InputSourceProperties {
88
89
  source?: string;
@@ -90,16 +91,18 @@ interface SelectDropdownInputProps extends ElementProps, InputProperties, InputS
90
91
  apiUrl?: string;
91
92
  pageSize?: number;
92
93
  value?: string | any;
93
- onChange?: (value: string) => void;
94
+ onChange?: (value: string, name: string) => void;
95
+ axiosInstance?: typeof axios.default;
94
96
  }
95
97
  interface SwitchToggleInputProps extends ElementProps, InputProperties {
96
98
  value?: boolean | any;
97
- onChange?: (value: boolean) => void;
99
+ onChange?: (value: boolean, name: string) => void;
98
100
  }
99
101
  interface PhoneInputProps extends ElementProps, InputProperties { }
100
102
  interface DateRangeInputProps extends ElementProps {
103
+ name?: string;
101
104
  value?: { from?: Date; to?: Date } | undefined;
102
- onChange?: (value: { from?: Date; to?: Date } | undefined) => void;
105
+ onChange?: (value: { from?: Date; to?: Date } | undefined, name: string) => void;
103
106
  errorMessage?: string;
104
107
  validateOnMount?: boolean;
105
108
  }
@@ -298,7 +301,7 @@ declare const CheckboxInput: ({ className, style, ...props }: CheckboxInputProps
298
301
 
299
302
  declare const RadioInput: ({ className, style, defaultValue, onChange, data, dataKey, dataLabel, ...props }: RadioInputProps) => react_jsx_runtime.JSX.Element;
300
303
 
301
- declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
304
+ declare const MultiCheckbox: ({ className, style, data, dataKey, dataLabel, value: propValue, onChange, isEditable, isDisabled, ...props }: MultiCheckboxInputProps) => react_jsx_runtime.JSX.Element;
302
305
 
303
306
  declare function RichText({ className, style, ...props }: RichTextInputProps): react_jsx_runtime.JSX.Element;
304
307
 
@@ -324,7 +327,7 @@ interface Option {
324
327
  }
325
328
  interface MultiSelectProps {
326
329
  value: string[];
327
- onChange: (value: string[]) => void;
330
+ onChange: (value: string[], name: string) => void;
328
331
  data: Option[];
329
332
  placeholder?: string;
330
333
  disabled?: boolean;
@@ -333,6 +336,7 @@ interface MultiSelectProps {
333
336
  errorMessage?: string;
334
337
  dataKey?: string;
335
338
  dataLabel?: string;
339
+ name: string;
336
340
  }
337
341
  declare const MultiSelect: React$1.FC<MultiSelectProps>;
338
342