@willphan1712000/frontend 1.9.1 → 1.9.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/index.d.mts CHANGED
@@ -1,6 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1, { ReactNode } from 'react';
3
3
 
4
+ /**
5
+ * Represents the structure of options available in the dropdown selection.
6
+ *
7
+ * Each item in the array contains:
8
+ * @property {string} label - The user-friendly text displayed in the dropdown list.
9
+ * @property {string} value - The actual value associated with the option.
10
+ */
4
11
  type Options$2 = {
5
12
  label: string;
6
13
  value: string;
@@ -12,10 +19,11 @@ interface Props$d {
12
19
  }
13
20
  /**
14
21
  * Dropdown Select component, allowing users to select options from dropdown menu
15
- * @param options - list of options, which is an array of object [{ label: string, value: string }]
16
- * @param value - a chosen value
17
- * @param onChange - a function to set a value
18
- * @returns
22
+ *
23
+ * @param options - List of select options of type {@link Options}
24
+ * @param value - The currently selected value
25
+ * @param onChange - Callback function triggered when a new value is selected
26
+ * @returns React Element rendering the dropdown select input
19
27
  */
20
28
  declare const DropdownSelect: ({ options, value, onChange }: Props$d) => react_jsx_runtime.JSX.Element;
21
29
 
@@ -46,7 +54,6 @@ type Options$1 = {
46
54
  interface Props$b {
47
55
  value: string;
48
56
  onChange: (value: string) => void;
49
- width?: string;
50
57
  options: Options$1;
51
58
  color?: string;
52
59
  }
@@ -54,10 +61,9 @@ interface Props$b {
54
61
  * Option Slider component, allowing users to select a value they want with the help of element representaion. Label is a React Node jsx that represents the option. For example, if a value was a font, the label would be a React Node jsx that represents a character using the font
55
62
  * @param value - a chosen value
56
63
  * @param onChange - to set a value
57
- * @options - list of options, format [{ label: React Node Syntax, value: string }]
58
- * @returns
64
+ * @options - list of options, format Options {@link Options}
59
65
  */
60
- declare const OptionSlider: ({ value, onChange, width, options, color, }: Props$b) => react_jsx_runtime.JSX.Element;
66
+ declare const OptionSlider: ({ value, onChange, options, color, }: Props$b) => react_jsx_runtime.JSX.Element;
61
67
 
62
68
  interface Props$a {
63
69
  value: string;
@@ -81,17 +87,14 @@ interface Props$9 {
81
87
  options: Options;
82
88
  value: string[];
83
89
  onChange: React.Dispatch<React.SetStateAction<string[]>>;
84
- width?: string;
85
90
  }
86
91
  /**
87
92
  * MultiSelect component, allowing users to select multiple options from dropdown menu with search
88
- * @param options - list of options, which is an array of object [{ label: string, value: string }]
93
+ * @param options - list of options, which is an array of object Options {@link Options}
89
94
  * @param value - an array of chosen values
90
95
  * @param onChange - a function to set an array of values
91
- * @param width - specify the width of the component
92
- * @returns
93
96
  */
94
- declare const MultiSelect: ({ options, value, onChange, width }: Props$9) => react_jsx_runtime.JSX.Element;
97
+ declare const MultiSelect: ({ options, value, onChange }: Props$9) => react_jsx_runtime.JSX.Element;
95
98
 
96
99
  interface Props$8 {
97
100
  buttonType?: 'gradient' | 'solid' | 'normal';
@@ -189,14 +192,24 @@ interface Props$5 {
189
192
  * @param value value of input
190
193
  * @param setValue set value function
191
194
  * @param label set label
192
- * @param options options object containing focusColor property -> color when input is focused
195
+ * @param options options object containing styling properties (focusColor, backgroundColor, textColor, borderColor)
193
196
  *
194
197
  * @example
195
198
  * ... component declaration
196
199
  * const [value, setValue] = useState<string|undefined>('')
197
200
  *
198
201
  * return (
199
- * <InputGoogle value={value} setValue={setValue} label="Input Google Component Label" options={{ focusColor: "yellow" }}/>
202
+ * <InputGoogle
203
+ * value={value}
204
+ * setValue={setValue}
205
+ * label="Input Google Component Label"
206
+ * options={{
207
+ * focusColor: "yellow",
208
+ * backgroundColor: "white",
209
+ * textColor: "black",
210
+ * borderColor: "gray"
211
+ * }}
212
+ * />
200
213
  * )
201
214
  */
202
215
  declare const InputGoogle: ({ value, setValue, label, options, ...props }: Props$5 & React.ComponentProps<"input">) => react_jsx_runtime.JSX.Element;
@@ -218,14 +231,24 @@ interface Props$4 {
218
231
  * @param value value of input
219
232
  * @param setValue set value function
220
233
  * @param label set label
221
- * @param options options object containing focusColor property -> color when input is focused
234
+ * @param options options object containing styling properties (focusColor, backgroundColor, textColor, borderColor)
222
235
  *
223
236
  * @example
224
237
  * ... component declaration
225
238
  * const [value, setValue] = useState<string|undefined>('')
226
239
  *
227
240
  * return (
228
- * <TextArea value={value} setValue={setValue} label="Text Component Label" options={{ focusColor: "yellow" }}/>
241
+ * <TextArea
242
+ * value={value}
243
+ * setValue={setValue}
244
+ * label="Text Component Label"
245
+ * options={{
246
+ * focusColor: "yellow",
247
+ * backgroundColor: "white",
248
+ * textColor: "black",
249
+ * borderColor: "gray"
250
+ * }}
251
+ * />
229
252
  * )
230
253
  */
231
254
  declare const TextArea: ({ value, setValue, label, options, ...props }: Props$4 & React.ComponentProps<"textarea">) => react_jsx_runtime.JSX.Element;
@@ -800,4 +823,4 @@ interface UseThemeState {
800
823
  */
801
824
  declare function useThemeState(): UseThemeState;
802
825
 
803
- export { type AuthInterface, Avatar, Button, Canvas, ColorPickerSlider, DropdownSelect, Image$1 as Image, ImageEditor, Image as ImageUtilities, InputFile, InputGoogle, LinearAlgebra, Modern as ModernButton, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, SessionProvider, type SessionType, type Options$1 as SliderOptions, type StorageInterface, TextArea, Transform, UploadImage, tools, useAuthClient, useSession, useThemeState };
826
+ export { type AuthInterface, Avatar, Button, Canvas, ColorPickerSlider, DropdownSelect, Image$1 as Image, ImageEditor, Image as ImageUtilities, InputFile, InputGoogle, LinearAlgebra, Modern as ModernButton, MultiSelect, OptionSlider, RangeSlider, SessionProvider, type SessionType, type StorageInterface, TextArea, Transform, UploadImage, tools, useAuthClient, useSession, useThemeState };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1, { ReactNode } from 'react';
3
3
 
4
+ /**
5
+ * Represents the structure of options available in the dropdown selection.
6
+ *
7
+ * Each item in the array contains:
8
+ * @property {string} label - The user-friendly text displayed in the dropdown list.
9
+ * @property {string} value - The actual value associated with the option.
10
+ */
4
11
  type Options$2 = {
5
12
  label: string;
6
13
  value: string;
@@ -12,10 +19,11 @@ interface Props$d {
12
19
  }
13
20
  /**
14
21
  * Dropdown Select component, allowing users to select options from dropdown menu
15
- * @param options - list of options, which is an array of object [{ label: string, value: string }]
16
- * @param value - a chosen value
17
- * @param onChange - a function to set a value
18
- * @returns
22
+ *
23
+ * @param options - List of select options of type {@link Options}
24
+ * @param value - The currently selected value
25
+ * @param onChange - Callback function triggered when a new value is selected
26
+ * @returns React Element rendering the dropdown select input
19
27
  */
20
28
  declare const DropdownSelect: ({ options, value, onChange }: Props$d) => react_jsx_runtime.JSX.Element;
21
29
 
@@ -46,7 +54,6 @@ type Options$1 = {
46
54
  interface Props$b {
47
55
  value: string;
48
56
  onChange: (value: string) => void;
49
- width?: string;
50
57
  options: Options$1;
51
58
  color?: string;
52
59
  }
@@ -54,10 +61,9 @@ interface Props$b {
54
61
  * Option Slider component, allowing users to select a value they want with the help of element representaion. Label is a React Node jsx that represents the option. For example, if a value was a font, the label would be a React Node jsx that represents a character using the font
55
62
  * @param value - a chosen value
56
63
  * @param onChange - to set a value
57
- * @options - list of options, format [{ label: React Node Syntax, value: string }]
58
- * @returns
64
+ * @options - list of options, format Options {@link Options}
59
65
  */
60
- declare const OptionSlider: ({ value, onChange, width, options, color, }: Props$b) => react_jsx_runtime.JSX.Element;
66
+ declare const OptionSlider: ({ value, onChange, options, color, }: Props$b) => react_jsx_runtime.JSX.Element;
61
67
 
62
68
  interface Props$a {
63
69
  value: string;
@@ -81,17 +87,14 @@ interface Props$9 {
81
87
  options: Options;
82
88
  value: string[];
83
89
  onChange: React.Dispatch<React.SetStateAction<string[]>>;
84
- width?: string;
85
90
  }
86
91
  /**
87
92
  * MultiSelect component, allowing users to select multiple options from dropdown menu with search
88
- * @param options - list of options, which is an array of object [{ label: string, value: string }]
93
+ * @param options - list of options, which is an array of object Options {@link Options}
89
94
  * @param value - an array of chosen values
90
95
  * @param onChange - a function to set an array of values
91
- * @param width - specify the width of the component
92
- * @returns
93
96
  */
94
- declare const MultiSelect: ({ options, value, onChange, width }: Props$9) => react_jsx_runtime.JSX.Element;
97
+ declare const MultiSelect: ({ options, value, onChange }: Props$9) => react_jsx_runtime.JSX.Element;
95
98
 
96
99
  interface Props$8 {
97
100
  buttonType?: 'gradient' | 'solid' | 'normal';
@@ -189,14 +192,24 @@ interface Props$5 {
189
192
  * @param value value of input
190
193
  * @param setValue set value function
191
194
  * @param label set label
192
- * @param options options object containing focusColor property -> color when input is focused
195
+ * @param options options object containing styling properties (focusColor, backgroundColor, textColor, borderColor)
193
196
  *
194
197
  * @example
195
198
  * ... component declaration
196
199
  * const [value, setValue] = useState<string|undefined>('')
197
200
  *
198
201
  * return (
199
- * <InputGoogle value={value} setValue={setValue} label="Input Google Component Label" options={{ focusColor: "yellow" }}/>
202
+ * <InputGoogle
203
+ * value={value}
204
+ * setValue={setValue}
205
+ * label="Input Google Component Label"
206
+ * options={{
207
+ * focusColor: "yellow",
208
+ * backgroundColor: "white",
209
+ * textColor: "black",
210
+ * borderColor: "gray"
211
+ * }}
212
+ * />
200
213
  * )
201
214
  */
202
215
  declare const InputGoogle: ({ value, setValue, label, options, ...props }: Props$5 & React.ComponentProps<"input">) => react_jsx_runtime.JSX.Element;
@@ -218,14 +231,24 @@ interface Props$4 {
218
231
  * @param value value of input
219
232
  * @param setValue set value function
220
233
  * @param label set label
221
- * @param options options object containing focusColor property -> color when input is focused
234
+ * @param options options object containing styling properties (focusColor, backgroundColor, textColor, borderColor)
222
235
  *
223
236
  * @example
224
237
  * ... component declaration
225
238
  * const [value, setValue] = useState<string|undefined>('')
226
239
  *
227
240
  * return (
228
- * <TextArea value={value} setValue={setValue} label="Text Component Label" options={{ focusColor: "yellow" }}/>
241
+ * <TextArea
242
+ * value={value}
243
+ * setValue={setValue}
244
+ * label="Text Component Label"
245
+ * options={{
246
+ * focusColor: "yellow",
247
+ * backgroundColor: "white",
248
+ * textColor: "black",
249
+ * borderColor: "gray"
250
+ * }}
251
+ * />
229
252
  * )
230
253
  */
231
254
  declare const TextArea: ({ value, setValue, label, options, ...props }: Props$4 & React.ComponentProps<"textarea">) => react_jsx_runtime.JSX.Element;
@@ -800,4 +823,4 @@ interface UseThemeState {
800
823
  */
801
824
  declare function useThemeState(): UseThemeState;
802
825
 
803
- export { type AuthInterface, Avatar, Button, Canvas, ColorPickerSlider, DropdownSelect, Image$1 as Image, ImageEditor, Image as ImageUtilities, InputFile, InputGoogle, LinearAlgebra, Modern as ModernButton, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, SessionProvider, type SessionType, type Options$1 as SliderOptions, type StorageInterface, TextArea, Transform, UploadImage, tools, useAuthClient, useSession, useThemeState };
826
+ export { type AuthInterface, Avatar, Button, Canvas, ColorPickerSlider, DropdownSelect, Image$1 as Image, ImageEditor, Image as ImageUtilities, InputFile, InputGoogle, LinearAlgebra, Modern as ModernButton, MultiSelect, OptionSlider, RangeSlider, SessionProvider, type SessionType, type StorageInterface, TextArea, Transform, UploadImage, tools, useAuthClient, useSession, useThemeState };