@rufous/ui 0.3.14 → 0.3.17
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/main.cjs +765 -434
- package/dist/main.css +24 -0
- package/dist/main.d.cts +123 -1
- package/dist/main.d.ts +123 -1
- package/dist/main.js +638 -309
- package/package.json +1 -1
package/dist/main.css
CHANGED
|
@@ -2879,6 +2879,7 @@ pre {
|
|
|
2879
2879
|
.rf-select__display {
|
|
2880
2880
|
display: flex;
|
|
2881
2881
|
align-items: center;
|
|
2882
|
+
gap: 8px;
|
|
2882
2883
|
flex: 1;
|
|
2883
2884
|
min-width: 0;
|
|
2884
2885
|
padding: 16.5px 14px;
|
|
@@ -3048,6 +3049,27 @@ pre {
|
|
|
3048
3049
|
cursor: default;
|
|
3049
3050
|
pointer-events: none;
|
|
3050
3051
|
}
|
|
3052
|
+
.rf-select__option-icon {
|
|
3053
|
+
display: flex;
|
|
3054
|
+
align-items: center;
|
|
3055
|
+
justify-content: center;
|
|
3056
|
+
flex-shrink: 0;
|
|
3057
|
+
max-width: 18px;
|
|
3058
|
+
max-height: 18px;
|
|
3059
|
+
overflow: hidden;
|
|
3060
|
+
color: inherit;
|
|
3061
|
+
}
|
|
3062
|
+
.rf-select__option-icon > * {
|
|
3063
|
+
max-width: 18px;
|
|
3064
|
+
max-height: 18px;
|
|
3065
|
+
}
|
|
3066
|
+
.rf-select__option-icon-img {
|
|
3067
|
+
width: 18px;
|
|
3068
|
+
height: 18px;
|
|
3069
|
+
object-fit: cover;
|
|
3070
|
+
border-radius: 3px;
|
|
3071
|
+
display: block;
|
|
3072
|
+
}
|
|
3051
3073
|
.rf-select__option-label {
|
|
3052
3074
|
flex: 1;
|
|
3053
3075
|
overflow: hidden;
|
|
@@ -6283,6 +6305,8 @@ pre {
|
|
|
6283
6305
|
font-size: 14px;
|
|
6284
6306
|
}
|
|
6285
6307
|
|
|
6308
|
+
/* lib/styles/smart-select.css */
|
|
6309
|
+
|
|
6286
6310
|
/* lib/styles/button.css */
|
|
6287
6311
|
.btn {
|
|
6288
6312
|
padding: 10px 20px;
|
package/dist/main.d.cts
CHANGED
|
@@ -943,6 +943,16 @@ type SelectOption = {
|
|
|
943
943
|
label: string;
|
|
944
944
|
disabled?: boolean;
|
|
945
945
|
group?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Optional icon rendered to the left of the label in both the dropdown and the trigger.
|
|
948
|
+
* Pass a React component (e.g. a Lucide icon) **or** an image URL string.
|
|
949
|
+
* Max size is capped to 18 × 18 px via CSS.
|
|
950
|
+
*/
|
|
951
|
+
icon?: React__default.ComponentType<{
|
|
952
|
+
size?: number;
|
|
953
|
+
className?: string;
|
|
954
|
+
style?: React__default.CSSProperties;
|
|
955
|
+
}> | string;
|
|
946
956
|
};
|
|
947
957
|
interface SelectProps {
|
|
948
958
|
options: SelectOption[] | string[];
|
|
@@ -1819,6 +1829,118 @@ interface TreeSelectProps {
|
|
|
1819
1829
|
}
|
|
1820
1830
|
declare function TreeSelect({ options, value, onChange, onNodeSelect, onNodeUnselect, selectionMode, placeholder, filter, filterInputAutoFocus, resetFilterOnHide, metaKeySelection: _metaKeySelection, disabled, label, variant, size, error, helperText, fullWidth, clearable, required, style, className, sx, }: TreeSelectProps): React__default.JSX.Element;
|
|
1821
1831
|
|
|
1832
|
+
interface UserOption {
|
|
1833
|
+
id?: string | number;
|
|
1834
|
+
_id?: string | number;
|
|
1835
|
+
userFirstName?: string;
|
|
1836
|
+
userLastName?: string;
|
|
1837
|
+
emailId?: string;
|
|
1838
|
+
}
|
|
1839
|
+
interface UserSelectionFieldProps {
|
|
1840
|
+
/** Selected user (single) or array of users (multiple) */
|
|
1841
|
+
value?: UserOption | UserOption[] | null;
|
|
1842
|
+
/** Called when selection changes */
|
|
1843
|
+
onChange: (value: UserOption | UserOption[] | null) => void;
|
|
1844
|
+
/** Available user options */
|
|
1845
|
+
options?: UserOption[];
|
|
1846
|
+
/** Show a loading spinner */
|
|
1847
|
+
loading?: boolean;
|
|
1848
|
+
/**
|
|
1849
|
+
* Called when the search text changes and no local match is found —
|
|
1850
|
+
* use this to trigger an API search.
|
|
1851
|
+
*/
|
|
1852
|
+
onSearchChange?: (value: string) => void;
|
|
1853
|
+
/** Label / placeholder text */
|
|
1854
|
+
label?: string;
|
|
1855
|
+
/** Allow selecting multiple users */
|
|
1856
|
+
multiple?: boolean;
|
|
1857
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1858
|
+
limitTags?: number;
|
|
1859
|
+
size?: 'small' | 'medium';
|
|
1860
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1861
|
+
disabled?: boolean;
|
|
1862
|
+
error?: boolean;
|
|
1863
|
+
helperText?: ReactNode;
|
|
1864
|
+
fullWidth?: boolean;
|
|
1865
|
+
required?: boolean;
|
|
1866
|
+
/**
|
|
1867
|
+
* Override the default name/email filter. Receives (options, inputValue).
|
|
1868
|
+
* Pass `(opts) => opts` to skip internal filtering when options are pre-filtered externally.
|
|
1869
|
+
*/
|
|
1870
|
+
filterOptions?: (options: UserOption[], inputValue: string) => UserOption[];
|
|
1871
|
+
className?: string;
|
|
1872
|
+
style?: CSSProperties;
|
|
1873
|
+
sx?: SxProp;
|
|
1874
|
+
}
|
|
1875
|
+
declare function UserSelectionField({ value, onChange, options, loading, onSearchChange, label, multiple, limitTags, size, variant, disabled, error, helperText, fullWidth, required, filterOptions: filterOptionsProp, className, style, sx, }: UserSelectionFieldProps): React__default.JSX.Element;
|
|
1876
|
+
|
|
1877
|
+
interface SmartSelectProps<T = any> {
|
|
1878
|
+
/** Options array — can be flat or hierarchical (via getOptionChildren) */
|
|
1879
|
+
options: T[];
|
|
1880
|
+
/** Controlled value. Single: T | null. Multiple: T[] */
|
|
1881
|
+
value?: T | T[] | null;
|
|
1882
|
+
/** Called when selection changes */
|
|
1883
|
+
onChange?: (value: T | T[] | null) => void;
|
|
1884
|
+
/**
|
|
1885
|
+
* Called when the typed text finds no local match —
|
|
1886
|
+
* use this to trigger an API / server search.
|
|
1887
|
+
*/
|
|
1888
|
+
onSearchChange?: (query: string) => void;
|
|
1889
|
+
/** Primary display label for an option (required) */
|
|
1890
|
+
getOptionLabel: (option: T) => string;
|
|
1891
|
+
/** Unique key for an option — defaults to the label string */
|
|
1892
|
+
getOptionValue?: (option: T) => string | number;
|
|
1893
|
+
/** Optional secondary line shown below the label */
|
|
1894
|
+
getOptionSubLabel?: (option: T) => string | undefined;
|
|
1895
|
+
/**
|
|
1896
|
+
* Return child options to create a hierarchical list.
|
|
1897
|
+
* The tree is flattened with indentation for display.
|
|
1898
|
+
*/
|
|
1899
|
+
getOptionChildren?: (option: T) => T[] | undefined;
|
|
1900
|
+
/** Allow selecting multiple options */
|
|
1901
|
+
multiple?: boolean;
|
|
1902
|
+
/**
|
|
1903
|
+
* When **true** (default) selecting a parent selects all its descendants.
|
|
1904
|
+
* When **false** every option is selected / deselected independently.
|
|
1905
|
+
* Only relevant when getOptionChildren is provided and multiple is true.
|
|
1906
|
+
*/
|
|
1907
|
+
allowChildNodesSelection?: boolean;
|
|
1908
|
+
/** Show a loading spinner in the dropdown */
|
|
1909
|
+
loading?: boolean;
|
|
1910
|
+
/** Content shown while loading */
|
|
1911
|
+
loadingText?: ReactNode;
|
|
1912
|
+
/**
|
|
1913
|
+
* Override the default label + sub-label filter.
|
|
1914
|
+
* Pass `(opts) => opts` to bypass when options are pre-filtered externally.
|
|
1915
|
+
*/
|
|
1916
|
+
filterOptions?: (options: T[], inputValue: string) => T[];
|
|
1917
|
+
/**
|
|
1918
|
+
* Custom option renderer. Receives the li props, option, and { selected } state.
|
|
1919
|
+
* When provided, overrides the default Select-style rendering.
|
|
1920
|
+
*/
|
|
1921
|
+
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement> & {
|
|
1922
|
+
key: React__default.Key;
|
|
1923
|
+
}, option: T, state: {
|
|
1924
|
+
selected: boolean;
|
|
1925
|
+
index: number;
|
|
1926
|
+
}) => ReactNode;
|
|
1927
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1928
|
+
limitTags?: number;
|
|
1929
|
+
label?: string;
|
|
1930
|
+
placeholder?: string;
|
|
1931
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1932
|
+
size?: 'small' | 'medium';
|
|
1933
|
+
disabled?: boolean;
|
|
1934
|
+
error?: boolean;
|
|
1935
|
+
helperText?: ReactNode;
|
|
1936
|
+
fullWidth?: boolean;
|
|
1937
|
+
required?: boolean;
|
|
1938
|
+
className?: string;
|
|
1939
|
+
style?: CSSProperties;
|
|
1940
|
+
sx?: SxProp;
|
|
1941
|
+
}
|
|
1942
|
+
declare function SmartSelect<T = any>({ options, value, onChange, onSearchChange, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
1943
|
+
|
|
1822
1944
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
1823
1945
|
type EditorVariant = 'default' | 'basic';
|
|
1824
1946
|
interface RufousTextEditorProps {
|
|
@@ -1905,4 +2027,4 @@ interface MentionItemData {
|
|
|
1905
2027
|
shortName?: string;
|
|
1906
2028
|
}
|
|
1907
2029
|
|
|
1908
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
|
2030
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, SmartSelect, type SmartSelectProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
package/dist/main.d.ts
CHANGED
|
@@ -943,6 +943,16 @@ type SelectOption = {
|
|
|
943
943
|
label: string;
|
|
944
944
|
disabled?: boolean;
|
|
945
945
|
group?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Optional icon rendered to the left of the label in both the dropdown and the trigger.
|
|
948
|
+
* Pass a React component (e.g. a Lucide icon) **or** an image URL string.
|
|
949
|
+
* Max size is capped to 18 × 18 px via CSS.
|
|
950
|
+
*/
|
|
951
|
+
icon?: React__default.ComponentType<{
|
|
952
|
+
size?: number;
|
|
953
|
+
className?: string;
|
|
954
|
+
style?: React__default.CSSProperties;
|
|
955
|
+
}> | string;
|
|
946
956
|
};
|
|
947
957
|
interface SelectProps {
|
|
948
958
|
options: SelectOption[] | string[];
|
|
@@ -1819,6 +1829,118 @@ interface TreeSelectProps {
|
|
|
1819
1829
|
}
|
|
1820
1830
|
declare function TreeSelect({ options, value, onChange, onNodeSelect, onNodeUnselect, selectionMode, placeholder, filter, filterInputAutoFocus, resetFilterOnHide, metaKeySelection: _metaKeySelection, disabled, label, variant, size, error, helperText, fullWidth, clearable, required, style, className, sx, }: TreeSelectProps): React__default.JSX.Element;
|
|
1821
1831
|
|
|
1832
|
+
interface UserOption {
|
|
1833
|
+
id?: string | number;
|
|
1834
|
+
_id?: string | number;
|
|
1835
|
+
userFirstName?: string;
|
|
1836
|
+
userLastName?: string;
|
|
1837
|
+
emailId?: string;
|
|
1838
|
+
}
|
|
1839
|
+
interface UserSelectionFieldProps {
|
|
1840
|
+
/** Selected user (single) or array of users (multiple) */
|
|
1841
|
+
value?: UserOption | UserOption[] | null;
|
|
1842
|
+
/** Called when selection changes */
|
|
1843
|
+
onChange: (value: UserOption | UserOption[] | null) => void;
|
|
1844
|
+
/** Available user options */
|
|
1845
|
+
options?: UserOption[];
|
|
1846
|
+
/** Show a loading spinner */
|
|
1847
|
+
loading?: boolean;
|
|
1848
|
+
/**
|
|
1849
|
+
* Called when the search text changes and no local match is found —
|
|
1850
|
+
* use this to trigger an API search.
|
|
1851
|
+
*/
|
|
1852
|
+
onSearchChange?: (value: string) => void;
|
|
1853
|
+
/** Label / placeholder text */
|
|
1854
|
+
label?: string;
|
|
1855
|
+
/** Allow selecting multiple users */
|
|
1856
|
+
multiple?: boolean;
|
|
1857
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1858
|
+
limitTags?: number;
|
|
1859
|
+
size?: 'small' | 'medium';
|
|
1860
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1861
|
+
disabled?: boolean;
|
|
1862
|
+
error?: boolean;
|
|
1863
|
+
helperText?: ReactNode;
|
|
1864
|
+
fullWidth?: boolean;
|
|
1865
|
+
required?: boolean;
|
|
1866
|
+
/**
|
|
1867
|
+
* Override the default name/email filter. Receives (options, inputValue).
|
|
1868
|
+
* Pass `(opts) => opts` to skip internal filtering when options are pre-filtered externally.
|
|
1869
|
+
*/
|
|
1870
|
+
filterOptions?: (options: UserOption[], inputValue: string) => UserOption[];
|
|
1871
|
+
className?: string;
|
|
1872
|
+
style?: CSSProperties;
|
|
1873
|
+
sx?: SxProp;
|
|
1874
|
+
}
|
|
1875
|
+
declare function UserSelectionField({ value, onChange, options, loading, onSearchChange, label, multiple, limitTags, size, variant, disabled, error, helperText, fullWidth, required, filterOptions: filterOptionsProp, className, style, sx, }: UserSelectionFieldProps): React__default.JSX.Element;
|
|
1876
|
+
|
|
1877
|
+
interface SmartSelectProps<T = any> {
|
|
1878
|
+
/** Options array — can be flat or hierarchical (via getOptionChildren) */
|
|
1879
|
+
options: T[];
|
|
1880
|
+
/** Controlled value. Single: T | null. Multiple: T[] */
|
|
1881
|
+
value?: T | T[] | null;
|
|
1882
|
+
/** Called when selection changes */
|
|
1883
|
+
onChange?: (value: T | T[] | null) => void;
|
|
1884
|
+
/**
|
|
1885
|
+
* Called when the typed text finds no local match —
|
|
1886
|
+
* use this to trigger an API / server search.
|
|
1887
|
+
*/
|
|
1888
|
+
onSearchChange?: (query: string) => void;
|
|
1889
|
+
/** Primary display label for an option (required) */
|
|
1890
|
+
getOptionLabel: (option: T) => string;
|
|
1891
|
+
/** Unique key for an option — defaults to the label string */
|
|
1892
|
+
getOptionValue?: (option: T) => string | number;
|
|
1893
|
+
/** Optional secondary line shown below the label */
|
|
1894
|
+
getOptionSubLabel?: (option: T) => string | undefined;
|
|
1895
|
+
/**
|
|
1896
|
+
* Return child options to create a hierarchical list.
|
|
1897
|
+
* The tree is flattened with indentation for display.
|
|
1898
|
+
*/
|
|
1899
|
+
getOptionChildren?: (option: T) => T[] | undefined;
|
|
1900
|
+
/** Allow selecting multiple options */
|
|
1901
|
+
multiple?: boolean;
|
|
1902
|
+
/**
|
|
1903
|
+
* When **true** (default) selecting a parent selects all its descendants.
|
|
1904
|
+
* When **false** every option is selected / deselected independently.
|
|
1905
|
+
* Only relevant when getOptionChildren is provided and multiple is true.
|
|
1906
|
+
*/
|
|
1907
|
+
allowChildNodesSelection?: boolean;
|
|
1908
|
+
/** Show a loading spinner in the dropdown */
|
|
1909
|
+
loading?: boolean;
|
|
1910
|
+
/** Content shown while loading */
|
|
1911
|
+
loadingText?: ReactNode;
|
|
1912
|
+
/**
|
|
1913
|
+
* Override the default label + sub-label filter.
|
|
1914
|
+
* Pass `(opts) => opts` to bypass when options are pre-filtered externally.
|
|
1915
|
+
*/
|
|
1916
|
+
filterOptions?: (options: T[], inputValue: string) => T[];
|
|
1917
|
+
/**
|
|
1918
|
+
* Custom option renderer. Receives the li props, option, and { selected } state.
|
|
1919
|
+
* When provided, overrides the default Select-style rendering.
|
|
1920
|
+
*/
|
|
1921
|
+
renderOption?: (props: React__default.HTMLAttributes<HTMLLIElement> & {
|
|
1922
|
+
key: React__default.Key;
|
|
1923
|
+
}, option: T, state: {
|
|
1924
|
+
selected: boolean;
|
|
1925
|
+
index: number;
|
|
1926
|
+
}) => ReactNode;
|
|
1927
|
+
/** In multiple mode, cap how many tag chips are shown before "+N more" */
|
|
1928
|
+
limitTags?: number;
|
|
1929
|
+
label?: string;
|
|
1930
|
+
placeholder?: string;
|
|
1931
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
1932
|
+
size?: 'small' | 'medium';
|
|
1933
|
+
disabled?: boolean;
|
|
1934
|
+
error?: boolean;
|
|
1935
|
+
helperText?: ReactNode;
|
|
1936
|
+
fullWidth?: boolean;
|
|
1937
|
+
required?: boolean;
|
|
1938
|
+
className?: string;
|
|
1939
|
+
style?: CSSProperties;
|
|
1940
|
+
sx?: SxProp;
|
|
1941
|
+
}
|
|
1942
|
+
declare function SmartSelect<T = any>({ options, value, onChange, onSearchChange, getOptionLabel, getOptionValue, getOptionSubLabel, getOptionChildren, multiple, allowChildNodesSelection, loading, loadingText, filterOptions: filterOptionsProp, renderOption: renderOptionProp, limitTags, label, placeholder, variant, size, disabled, error, helperText, fullWidth, required, className, style, sx, }: SmartSelectProps<T>): React__default.JSX.Element;
|
|
1943
|
+
|
|
1822
1944
|
type ToolbarButton = 'undo' | 'redo' | 'ai' | 'paragraph' | 'fontsize' | 'font' | 'color' | 'bold' | 'italic' | 'strike' | 'link' | 'lineheight' | 'ul' | 'ol' | 'align' | 'indent' | 'outdent' | 'table' | 'image' | 'video' | 'cut' | 'copy' | 'paste' | 'specialchars' | 'code' | 'fullscreen' | 'tts' | 'stt' | 'translate' | 'todo' | '|';
|
|
1823
1945
|
type EditorVariant = 'default' | 'basic';
|
|
1824
1946
|
interface RufousTextEditorProps {
|
|
@@ -1905,4 +2027,4 @@ interface MentionItemData {
|
|
|
1905
2027
|
shortName?: string;
|
|
1906
2028
|
}
|
|
1907
2029
|
|
|
1908
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|
|
2030
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, type NumberVariant, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, SmartSelect, type SmartSelectProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, type TreeNode, TreeSelect, type TreeSelectMultiValue, type TreeSelectProps, type TreeSelectValue, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, type UserOption, UserSelectionField, type UserSelectionFieldProps, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, transformLegacyTodos, useRufousTheme };
|