hazo_ui
Version:
Set of UI components for common interaction elements in a SaaS app
115 lines (106 loc) • 3.62 kB
TypeScript
import * as React from 'react';
import React__default from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
/**
* Example component demonstrating the structure for hazo_ui components
* @param props - Component props
* @returns React component
*/
declare const ExampleComponent: React__default.FC<{
children?: React__default.ReactNode;
className?: string;
}>;
interface FilterField {
value: string;
label: string;
type: 'text' | 'number' | 'combobox' | 'boolean' | 'date';
textConfig?: {
minLength?: number;
maxLength?: number;
};
numberConfig?: {
min?: number;
max?: number;
allowDecimal?: boolean;
decimalLength?: number;
};
comboboxOptions?: Array<{
label: string;
value: string;
}>;
booleanLabels?: {
trueLabel?: string;
falseLabel?: string;
};
}
interface FilterConfig {
field: string;
operator?: string;
value: any;
}
interface HazoUiMultiFilterDialogProps {
availableFields: FilterField[];
onFilterChange: (filterConfig: FilterConfig[]) => void;
initialFilters?: FilterConfig[];
}
declare function HazoUiMultiFilterDialog({ availableFields, onFilterChange, initialFilters, }: HazoUiMultiFilterDialogProps): react_jsx_runtime.JSX.Element;
interface SortField {
value: string;
label: string;
}
interface SortConfig {
field: string;
direction: 'asc' | 'desc';
}
interface HazoUiMultiSortDialogProps {
availableFields: SortField[];
onSortChange: (sortConfig: SortConfig[]) => void;
initialSortFields?: SortConfig[];
}
declare function HazoUiMultiSortDialog({ availableFields, onSortChange, initialSortFields, }: HazoUiMultiSortDialogProps): react_jsx_runtime.JSX.Element;
interface HazoUiFlexRadioItem {
label: string;
value: string;
icon_selected?: string;
icon_unselected?: string;
fgcolor?: string;
bgcolor?: string;
}
interface HazoUiFlexRadioProps {
layout?: "horizontal" | "vertical";
style?: "radio" | "icons";
display_label?: boolean;
icon_set?: string;
data: HazoUiFlexRadioItem[];
selection: "single" | "multi";
value: string | string[];
onChange: (value: string | string[]) => void;
className?: string;
compressed?: boolean;
}
/**
* Hazo UI Flex Radio Component
* Supports single and multi-selection with radio buttons or icons
*/
declare function HazoUiFlexRadio({ layout, style, display_label, icon_set, data, selection, value, onChange, className, compressed, }: HazoUiFlexRadioProps): react_jsx_runtime.JSX.Element;
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
}
/**
* Hazo UI Flex Input Component
*
* Enhanced input component with type validation, character restrictions, and error messaging.
* Extends shadcn Input component with additional validation props.
*/
interface HazoUiFlexInputProps extends Omit<InputProps, "type"> {
input_type?: "mixed" | "numeric" | "email" | "alpha";
text_len_min?: number;
text_len_max?: number;
num_min?: number;
num_max?: number;
regex?: string | RegExp;
num_decimals?: number;
format_guide?: string;
format_guide_info?: boolean;
}
declare const HazoUiFlexInput: React.ForwardRefExoticComponent<HazoUiFlexInputProps & React.RefAttributes<HTMLInputElement>>;
export { ExampleComponent, type FilterConfig, type FilterField, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, type SortConfig, type SortField };