@yomologic/react-ui 0.5.4 → 0.5.5
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 +54 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +390 -200
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +389 -200
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +20 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
@@ -281,6 +281,58 @@ interface SelectProps {
|
|
|
281
281
|
}
|
|
282
282
|
declare function Select({ name, label, placeholder, options, value: externalValue, onChange, children, disabled, error, helperText, required, size, className, validate, onValidationError: _onValidationError, errorMessage, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
283
283
|
|
|
284
|
+
interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size" | "onChange"> {
|
|
285
|
+
/**
|
|
286
|
+
* Field name - required when used inside Form
|
|
287
|
+
*/
|
|
288
|
+
name?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Label text displayed above the select
|
|
291
|
+
*/
|
|
292
|
+
label?: string;
|
|
293
|
+
/**
|
|
294
|
+
* Current selected value
|
|
295
|
+
*/
|
|
296
|
+
value?: string | number;
|
|
297
|
+
/**
|
|
298
|
+
* Callback when selection changes
|
|
299
|
+
*/
|
|
300
|
+
onChange?: (value: string) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Select options as children (<option> elements)
|
|
303
|
+
*/
|
|
304
|
+
children?: ReactNode;
|
|
305
|
+
/**
|
|
306
|
+
* Error message to display
|
|
307
|
+
*/
|
|
308
|
+
error?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Helper text to display below the select
|
|
311
|
+
*/
|
|
312
|
+
helperText?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Mark the field as required
|
|
315
|
+
*/
|
|
316
|
+
required?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Size of the select
|
|
319
|
+
*/
|
|
320
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
321
|
+
/**
|
|
322
|
+
* Additional CSS classes
|
|
323
|
+
*/
|
|
324
|
+
className?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Custom validation function
|
|
327
|
+
*/
|
|
328
|
+
validate?: ValidationFunction;
|
|
329
|
+
/**
|
|
330
|
+
* Custom error message for required validation
|
|
331
|
+
*/
|
|
332
|
+
errorMessage?: string;
|
|
333
|
+
}
|
|
334
|
+
declare function NativeSelect({ name, label, value: externalValue, onChange, children, error, helperText, required, size, className, validate, errorMessage, disabled, ...htmlProps }: NativeSelectProps): react_jsx_runtime.JSX.Element;
|
|
335
|
+
|
|
284
336
|
interface FormControlState {
|
|
285
337
|
/** Whether the field has been modified from its initial value */
|
|
286
338
|
isDirty: boolean;
|
|
@@ -1055,4 +1107,4 @@ type ThemeId = keyof typeof themes;
|
|
|
1055
1107
|
|
|
1056
1108
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1057
1109
|
|
|
1058
|
-
export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
|
|
1110
|
+
export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, NativeSelect, type NativeSelectProps, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
@@ -281,6 +281,58 @@ interface SelectProps {
|
|
|
281
281
|
}
|
|
282
282
|
declare function Select({ name, label, placeholder, options, value: externalValue, onChange, children, disabled, error, helperText, required, size, className, validate, onValidationError: _onValidationError, errorMessage, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
283
283
|
|
|
284
|
+
interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size" | "onChange"> {
|
|
285
|
+
/**
|
|
286
|
+
* Field name - required when used inside Form
|
|
287
|
+
*/
|
|
288
|
+
name?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Label text displayed above the select
|
|
291
|
+
*/
|
|
292
|
+
label?: string;
|
|
293
|
+
/**
|
|
294
|
+
* Current selected value
|
|
295
|
+
*/
|
|
296
|
+
value?: string | number;
|
|
297
|
+
/**
|
|
298
|
+
* Callback when selection changes
|
|
299
|
+
*/
|
|
300
|
+
onChange?: (value: string) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Select options as children (<option> elements)
|
|
303
|
+
*/
|
|
304
|
+
children?: ReactNode;
|
|
305
|
+
/**
|
|
306
|
+
* Error message to display
|
|
307
|
+
*/
|
|
308
|
+
error?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Helper text to display below the select
|
|
311
|
+
*/
|
|
312
|
+
helperText?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Mark the field as required
|
|
315
|
+
*/
|
|
316
|
+
required?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Size of the select
|
|
319
|
+
*/
|
|
320
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
321
|
+
/**
|
|
322
|
+
* Additional CSS classes
|
|
323
|
+
*/
|
|
324
|
+
className?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Custom validation function
|
|
327
|
+
*/
|
|
328
|
+
validate?: ValidationFunction;
|
|
329
|
+
/**
|
|
330
|
+
* Custom error message for required validation
|
|
331
|
+
*/
|
|
332
|
+
errorMessage?: string;
|
|
333
|
+
}
|
|
334
|
+
declare function NativeSelect({ name, label, value: externalValue, onChange, children, error, helperText, required, size, className, validate, errorMessage, disabled, ...htmlProps }: NativeSelectProps): react_jsx_runtime.JSX.Element;
|
|
335
|
+
|
|
284
336
|
interface FormControlState {
|
|
285
337
|
/** Whether the field has been modified from its initial value */
|
|
286
338
|
isDirty: boolean;
|
|
@@ -1055,4 +1107,4 @@ type ThemeId = keyof typeof themes;
|
|
|
1055
1107
|
|
|
1056
1108
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1057
1109
|
|
|
1058
|
-
export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
|
|
1110
|
+
export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, NativeSelect, type NativeSelectProps, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
|