@lzzjokerzzl/react-ui-components 1.3.3 → 1.3.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.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +265 -8
- package/dist/index.js +3131 -2791
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1205,11 +1205,68 @@ export declare type ButtonVariant = "solid" | "outline" | "ghost" | "link" | "gr
|
|
|
1205
1205
|
*/
|
|
1206
1206
|
export declare const Card: ({ children, className, size, variant, color, radius, isClickable, isDisabled, isHoverable, onClick, "data-testid": dataTestId, }: CardProps) => JSX.Element;
|
|
1207
1207
|
|
|
1208
|
+
/**
|
|
1209
|
+
* Card Body component for main content area
|
|
1210
|
+
* @param props - CardBody component properties
|
|
1211
|
+
* @returns JSX element representing a card body
|
|
1212
|
+
*/
|
|
1213
|
+
export declare const CardBody: ({ children, className, "data-testid": dataTestId, }: CardBodyProps) => JSX.Element;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Props interface for CardBody component
|
|
1217
|
+
*/
|
|
1218
|
+
export declare interface CardBodyProps {
|
|
1219
|
+
/** Content to render inside the body */
|
|
1220
|
+
children: ReactNode;
|
|
1221
|
+
/** Additional CSS classes to apply */
|
|
1222
|
+
className?: string;
|
|
1223
|
+
/** Test ID for testing frameworks */
|
|
1224
|
+
"data-testid"?: string;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1208
1227
|
/**
|
|
1209
1228
|
* Color variants for Card component
|
|
1210
1229
|
*/
|
|
1211
1230
|
declare type CardColor = "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
1212
1231
|
|
|
1232
|
+
/**
|
|
1233
|
+
* Card Footer component for consistent footer styling
|
|
1234
|
+
* @param props - CardFooter component properties
|
|
1235
|
+
* @returns JSX element representing a card footer
|
|
1236
|
+
*/
|
|
1237
|
+
export declare const CardFooter: ({ children, className, "data-testid": dataTestId, }: CardFooterProps) => JSX.Element;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Props interface for CardFooter component
|
|
1241
|
+
*/
|
|
1242
|
+
export declare interface CardFooterProps {
|
|
1243
|
+
/** Content to render inside the footer */
|
|
1244
|
+
children: ReactNode;
|
|
1245
|
+
/** Additional CSS classes to apply */
|
|
1246
|
+
className?: string;
|
|
1247
|
+
/** Test ID for testing frameworks */
|
|
1248
|
+
"data-testid"?: string;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* Card Header component for consistent header styling
|
|
1253
|
+
* @param props - CardHeader component properties
|
|
1254
|
+
* @returns JSX element representing a card header
|
|
1255
|
+
*/
|
|
1256
|
+
export declare const CardHeader: ({ children, className, "data-testid": dataTestId, }: CardHeaderProps) => JSX.Element;
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* Props interface for CardHeader component
|
|
1260
|
+
*/
|
|
1261
|
+
export declare interface CardHeaderProps {
|
|
1262
|
+
/** Content to render inside the header */
|
|
1263
|
+
children: ReactNode;
|
|
1264
|
+
/** Additional CSS classes to apply */
|
|
1265
|
+
className?: string;
|
|
1266
|
+
/** Test ID for testing frameworks */
|
|
1267
|
+
"data-testid"?: string;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1213
1270
|
/**
|
|
1214
1271
|
* Props interface for the main Card component
|
|
1215
1272
|
*/
|
|
@@ -1446,7 +1503,7 @@ declare type ColumnAlign = "start" | "center" | "end";
|
|
|
1446
1503
|
/**
|
|
1447
1504
|
* Column definition interface
|
|
1448
1505
|
*/
|
|
1449
|
-
declare interface ColumnDef<T = any> {
|
|
1506
|
+
export declare interface ColumnDef<T = any> {
|
|
1450
1507
|
key: Key;
|
|
1451
1508
|
label: ReactNode;
|
|
1452
1509
|
align?: ColumnAlign;
|
|
@@ -1923,6 +1980,19 @@ export declare interface LibraryRouterProps {
|
|
|
1923
1980
|
onRouteChange?: (path: string) => void;
|
|
1924
1981
|
}
|
|
1925
1982
|
|
|
1983
|
+
export declare const LibraryRouterProvider: default_2.FC<LibraryRouterProviderProps>;
|
|
1984
|
+
|
|
1985
|
+
declare interface LibraryRouterProviderProps {
|
|
1986
|
+
children: default_2.ReactNode;
|
|
1987
|
+
initialRoutes?: Route[];
|
|
1988
|
+
onRouteChange?: (path: string) => void;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* Loading state types
|
|
1993
|
+
*/
|
|
1994
|
+
declare type LoadingState = "loading" | "filtering" | "sorting" | "loadingMore" | "error" | "idle";
|
|
1995
|
+
|
|
1926
1996
|
/**
|
|
1927
1997
|
* Menu trigger behavior
|
|
1928
1998
|
*/
|
|
@@ -1932,7 +2002,35 @@ export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes
|
|
|
1932
2002
|
|
|
1933
2003
|
declare type ModalBackdrop = 'transparent' | 'opaque' | 'blur';
|
|
1934
2004
|
|
|
1935
|
-
declare
|
|
2005
|
+
export declare const ModalBody: ForwardRefExoticComponent<ModalBodyProps & RefAttributes<HTMLDivElement>>;
|
|
2006
|
+
|
|
2007
|
+
export declare interface ModalBodyProps {
|
|
2008
|
+
children?: ReactNode;
|
|
2009
|
+
className?: string;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
export declare const ModalContent: ForwardRefExoticComponent<ModalContentProps & RefAttributes<HTMLDivElement>>;
|
|
2013
|
+
|
|
2014
|
+
export declare interface ModalContentProps {
|
|
2015
|
+
children?: ReactNode;
|
|
2016
|
+
className?: string;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
export declare const ModalFooter: ForwardRefExoticComponent<ModalFooterProps & RefAttributes<HTMLDivElement>>;
|
|
2020
|
+
|
|
2021
|
+
export declare interface ModalFooterProps {
|
|
2022
|
+
children?: ReactNode;
|
|
2023
|
+
className?: string;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
export declare const ModalHeader: ForwardRefExoticComponent<ModalHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
2027
|
+
|
|
2028
|
+
export declare interface ModalHeaderProps {
|
|
2029
|
+
children?: ReactNode;
|
|
2030
|
+
className?: string;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
export declare type ModalPlacement = 'auto' | 'top' | 'top-center' | 'center' | 'bottom' | 'bottom-center';
|
|
1936
2034
|
|
|
1937
2035
|
export declare interface ModalProps {
|
|
1938
2036
|
children?: ReactNode;
|
|
@@ -1966,7 +2064,7 @@ declare type ModalScrollBehavior = 'normal' | 'inside' | 'outside';
|
|
|
1966
2064
|
|
|
1967
2065
|
declare type ModalShadow = 'none' | 'sm' | 'md' | 'lg';
|
|
1968
2066
|
|
|
1969
|
-
declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | 'full';
|
|
2067
|
+
export declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | 'full';
|
|
1970
2068
|
|
|
1971
2069
|
declare interface ModalSlots {
|
|
1972
2070
|
wrapper?: string;
|
|
@@ -2029,9 +2127,75 @@ export declare interface MorphingTextProps extends Omit<BaseTextProps, 'text'> {
|
|
|
2029
2127
|
|
|
2030
2128
|
export declare const Navbar: ForwardRefExoticComponent<NavbarProps & RefAttributes<HTMLElement>>;
|
|
2031
2129
|
|
|
2032
|
-
declare
|
|
2130
|
+
export declare const NavbarBrand: ForwardRefExoticComponent<NavbarBrandProps & RefAttributes<HTMLDivElement>>;
|
|
2131
|
+
|
|
2132
|
+
export declare interface NavbarBrandProps {
|
|
2133
|
+
children?: ReactNode;
|
|
2134
|
+
className?: string;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
export declare const NavbarContent: ForwardRefExoticComponent<NavbarContentProps & RefAttributes<HTMLUListElement>>;
|
|
2138
|
+
|
|
2139
|
+
export declare interface NavbarContentProps {
|
|
2140
|
+
children?: ReactNode;
|
|
2141
|
+
justify?: NavbarJustify;
|
|
2142
|
+
className?: string;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
export declare interface NavbarContextType {
|
|
2146
|
+
isMenuOpen: boolean;
|
|
2147
|
+
position: NavbarPosition;
|
|
2148
|
+
maxWidth: NavbarMaxWidth;
|
|
2149
|
+
height: string | number;
|
|
2150
|
+
isBordered: boolean;
|
|
2151
|
+
isBlurred: boolean;
|
|
2152
|
+
shouldHideOnScroll: boolean;
|
|
2153
|
+
disableAnimation: boolean;
|
|
2154
|
+
classNames?: Partial<NavbarSlots>;
|
|
2155
|
+
onMenuOpenChange: (isOpen: boolean) => void;
|
|
2156
|
+
onScrollPositionChange?: (position: number) => void;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
export declare const NavbarItem: ForwardRefExoticComponent<NavbarItemProps & RefAttributes<HTMLLIElement>>;
|
|
2160
|
+
|
|
2161
|
+
export declare interface NavbarItemProps {
|
|
2162
|
+
children?: ReactNode;
|
|
2163
|
+
isActive?: boolean;
|
|
2164
|
+
className?: string;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
export declare type NavbarJustify = 'start' | 'center' | 'end';
|
|
2168
|
+
|
|
2169
|
+
export declare type NavbarMaxWidth = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
2170
|
+
|
|
2171
|
+
export declare const NavbarMenu: ForwardRefExoticComponent<NavbarMenuProps & RefAttributes<HTMLDivElement>>;
|
|
2172
|
+
|
|
2173
|
+
export declare const NavbarMenuItem: ForwardRefExoticComponent<NavbarMenuItemProps & RefAttributes<HTMLLIElement>>;
|
|
2174
|
+
|
|
2175
|
+
export declare interface NavbarMenuItemProps {
|
|
2176
|
+
children?: ReactNode;
|
|
2177
|
+
isActive?: boolean;
|
|
2178
|
+
className?: string;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
export declare interface NavbarMenuProps {
|
|
2182
|
+
children?: ReactNode;
|
|
2183
|
+
portalContainer?: HTMLElement;
|
|
2184
|
+
className?: string;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
export declare const NavbarMenuToggle: ForwardRefExoticComponent<NavbarMenuToggleProps & RefAttributes<HTMLButtonElement>>;
|
|
2188
|
+
|
|
2189
|
+
export declare interface NavbarMenuToggleProps {
|
|
2190
|
+
icon?: ReactNode | ((isOpen: boolean | undefined) => ReactNode);
|
|
2191
|
+
isSelected?: boolean;
|
|
2192
|
+
defaultSelected?: boolean;
|
|
2193
|
+
srOnlyText?: string;
|
|
2194
|
+
className?: string;
|
|
2195
|
+
onChange?: (isOpen: boolean) => void;
|
|
2196
|
+
}
|
|
2033
2197
|
|
|
2034
|
-
declare type NavbarPosition = 'static' | 'sticky';
|
|
2198
|
+
export declare type NavbarPosition = 'static' | 'sticky';
|
|
2035
2199
|
|
|
2036
2200
|
export declare interface NavbarProps {
|
|
2037
2201
|
children?: ReactNode;
|
|
@@ -2509,7 +2673,7 @@ export declare interface RouterContextType {
|
|
|
2509
2673
|
/**
|
|
2510
2674
|
* Row data interface
|
|
2511
2675
|
*/
|
|
2512
|
-
declare interface RowData {
|
|
2676
|
+
export declare interface RowData {
|
|
2513
2677
|
key: Key;
|
|
2514
2678
|
[key: string]: any;
|
|
2515
2679
|
}
|
|
@@ -2546,6 +2710,7 @@ export declare interface ScrollConfig {
|
|
|
2546
2710
|
* Selection type - can be "all" or a Set of keys
|
|
2547
2711
|
*/
|
|
2548
2712
|
declare type Selection_2 = "all" | Set<Key>;
|
|
2713
|
+
export { Selection_2 as Selection }
|
|
2549
2714
|
|
|
2550
2715
|
/**
|
|
2551
2716
|
* Selection behavior types
|
|
@@ -2556,6 +2721,7 @@ declare type SelectionBehavior = "toggle" | "replace";
|
|
|
2556
2721
|
* Selection modes for table rows
|
|
2557
2722
|
*/
|
|
2558
2723
|
declare type SelectionMode_2 = "none" | "single" | "multiple";
|
|
2724
|
+
export { SelectionMode_2 as SelectionMode }
|
|
2559
2725
|
|
|
2560
2726
|
declare type SeparatorType = 'slash' | 'chevron' | 'arrow' | 'dot' | 'custom';
|
|
2561
2727
|
|
|
@@ -2661,7 +2827,7 @@ export declare interface SlideInProps extends BaseAnimationProps {
|
|
|
2661
2827
|
/**
|
|
2662
2828
|
* Sort descriptor interface
|
|
2663
2829
|
*/
|
|
2664
|
-
declare interface SortDescriptor {
|
|
2830
|
+
export declare interface SortDescriptor {
|
|
2665
2831
|
column?: Key;
|
|
2666
2832
|
direction?: "ascending" | "descending";
|
|
2667
2833
|
}
|
|
@@ -2782,11 +2948,98 @@ declare type SwitchSize = "sm" | "md" | "lg";
|
|
|
2782
2948
|
|
|
2783
2949
|
export declare const Table: <T extends Record<string, any> = any>({ children, className, color, customColor, layout, radius, shadow, maxTableHeight, rowHeight, isVirtualized, hideHeader, isStriped, isCompact, isHeaderSticky, fullWidth, removeWrapper, topContent, bottomContent, topContentPlacement, bottomContentPlacement, showSelectionCheckboxes, sortDescriptor, selectedKeys, defaultSelectedKeys, disabledKeys, disallowEmptySelection, selectionMode, selectionBehavior, disabledBehavior, allowDuplicateSelectionEvents, disableAnimation, isKeyboardNavigationDisabled, loading, emptyContent, centerHeaderText, centerCellText, onRowAction, onCellAction, onSelectionChange, onSortChange, columns, items, "data-testid": testId, ...props }: TableProps<T>) => JSX.Element;
|
|
2784
2950
|
|
|
2951
|
+
export declare const TableBody: <T extends Record<string, any> = any>({ children, className, items, isLoading, loadingState, loadingContent, emptyContent, "data-testid": testId, }: TableBodyProps<T>) => JSX.Element;
|
|
2952
|
+
|
|
2953
|
+
/**
|
|
2954
|
+
* Table body props
|
|
2955
|
+
*/
|
|
2956
|
+
export declare interface TableBodyProps<T = any> {
|
|
2957
|
+
children?: ReactNode | ((item: T) => ReactNode);
|
|
2958
|
+
className?: string;
|
|
2959
|
+
items?: T[];
|
|
2960
|
+
isLoading?: boolean;
|
|
2961
|
+
loadingState?: LoadingState;
|
|
2962
|
+
loadingContent?: ReactNode;
|
|
2963
|
+
emptyContent?: ReactNode;
|
|
2964
|
+
onLoadMore?: () => void;
|
|
2965
|
+
"data-testid"?: string;
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
export declare const TableCell: React.FC<TableCellProps>;
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* Table cell props
|
|
2972
|
+
*/
|
|
2973
|
+
export declare interface TableCellProps {
|
|
2974
|
+
children: ReactNode;
|
|
2975
|
+
className?: string;
|
|
2976
|
+
align?: ColumnAlign;
|
|
2977
|
+
textValue?: string;
|
|
2978
|
+
"data-testid"?: string;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2785
2981
|
/**
|
|
2786
2982
|
* Table color variants
|
|
2787
2983
|
*/
|
|
2788
2984
|
declare type TableColor = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "custom";
|
|
2789
2985
|
|
|
2986
|
+
export declare const TableColumn: default_2.FC<TableColumnProps>;
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* Table column props
|
|
2990
|
+
*/
|
|
2991
|
+
export declare interface TableColumnProps {
|
|
2992
|
+
children: ReactNode;
|
|
2993
|
+
className?: string;
|
|
2994
|
+
align?: ColumnAlign;
|
|
2995
|
+
hideHeader?: boolean;
|
|
2996
|
+
allowsSorting?: boolean;
|
|
2997
|
+
sortIcon?: ReactNode;
|
|
2998
|
+
isRowHeader?: boolean;
|
|
2999
|
+
textValue?: string;
|
|
3000
|
+
width?: string | number;
|
|
3001
|
+
minWidth?: string | number;
|
|
3002
|
+
maxWidth?: string | number;
|
|
3003
|
+
"data-testid"?: string;
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* Table context interface for sharing state between components
|
|
3008
|
+
*/
|
|
3009
|
+
export declare interface TableContextType<T = any> {
|
|
3010
|
+
color: TableColor;
|
|
3011
|
+
customColor?: CustomTableColor;
|
|
3012
|
+
selectionMode: SelectionMode_2;
|
|
3013
|
+
selectionBehavior: SelectionBehavior;
|
|
3014
|
+
selectedKeys: Selection_2;
|
|
3015
|
+
disabledKeys: Selection_2;
|
|
3016
|
+
sortDescriptor?: SortDescriptor;
|
|
3017
|
+
isStriped: boolean;
|
|
3018
|
+
isCompact: boolean;
|
|
3019
|
+
disableAnimation: boolean;
|
|
3020
|
+
showSelectionCheckboxes: boolean;
|
|
3021
|
+
onRowAction?: (key: Key) => void;
|
|
3022
|
+
onCellAction?: (key: Key) => void;
|
|
3023
|
+
onSelectionChange?: (keys: Selection_2) => void;
|
|
3024
|
+
onSortChange?: (descriptor: SortDescriptor) => void;
|
|
3025
|
+
columns?: ColumnDef<T>[];
|
|
3026
|
+
items?: T[];
|
|
3027
|
+
centerHeaderText: boolean;
|
|
3028
|
+
centerCellText: boolean;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
export declare const TableHeader: <T extends Record<string, any> = any>({ children, className, columns, "data-testid": testId, }: TableHeaderProps<T>) => JSX.Element;
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* Table header props
|
|
3035
|
+
*/
|
|
3036
|
+
export declare interface TableHeaderProps<T = any> {
|
|
3037
|
+
children?: ReactNode;
|
|
3038
|
+
className?: string;
|
|
3039
|
+
columns?: ColumnDef<T>[];
|
|
3040
|
+
"data-testid"?: string;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
2790
3043
|
/**
|
|
2791
3044
|
* Table layout types
|
|
2792
3045
|
*/
|
|
@@ -2851,7 +3104,7 @@ export declare const TableRow: <T extends Record<string, any> = any>({ children,
|
|
|
2851
3104
|
/**
|
|
2852
3105
|
* Table row props
|
|
2853
3106
|
*/
|
|
2854
|
-
declare interface TableRowProps<T = any> {
|
|
3107
|
+
export declare interface TableRowProps<T = any> {
|
|
2855
3108
|
children?: ReactNode;
|
|
2856
3109
|
className?: string;
|
|
2857
3110
|
textValue?: string;
|
|
@@ -3322,6 +3575,8 @@ export declare const useLibraryNavigation: () => {
|
|
|
3322
3575
|
routes: Route[];
|
|
3323
3576
|
};
|
|
3324
3577
|
|
|
3578
|
+
export declare const useLibraryRouter: () => RouterContextType;
|
|
3579
|
+
|
|
3325
3580
|
export declare function useModal(props?: UseModalProps): UseModalReturn;
|
|
3326
3581
|
|
|
3327
3582
|
declare interface UseModalProps {
|
|
@@ -3470,6 +3725,8 @@ export declare interface UserProps {
|
|
|
3470
3725
|
|
|
3471
3726
|
export declare const useSidebar: () => SidebarContextType;
|
|
3472
3727
|
|
|
3728
|
+
export declare const useTableContext: () => TableContextType<any>;
|
|
3729
|
+
|
|
3473
3730
|
/**
|
|
3474
3731
|
* Custom hook for easy toast management
|
|
3475
3732
|
* Provides convenient methods for showing different types of toasts
|