advi-ui 0.1.7 → 0.1.9
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/advi-ui.cjs.js +12 -12
- package/dist/advi-ui.cjs.js.map +1 -1
- package/dist/advi-ui.css +1 -1
- package/dist/advi-ui.es.js +2509 -1788
- package/dist/advi-ui.es.js.map +1 -1
- package/dist/src/components/SearchInput.d.ts +17 -0
- package/dist/src/components/ui/accordion.d.ts +3 -3
- package/dist/src/components/ui/button.d.ts +1 -1
- package/dist/src/components/ui/table.d.ts +10 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/lib/utils.d.ts +9 -1
- package/package.json +2 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
interface SearchInputProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
debounce?: number;
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
showButton?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
onSearch?: (value: string) => void;
|
|
13
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
onClear?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const SearchInput: ({ value: controlledValue, defaultValue, placeholder, disabled, loading, debounce: debounceMs, shortcut, showButton, className, onSearch, onChange, onClear, }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -7,13 +7,13 @@ export interface AccordionItem {
|
|
|
7
7
|
}
|
|
8
8
|
export interface AccordionProps {
|
|
9
9
|
items: AccordionItem[];
|
|
10
|
-
|
|
10
|
+
multiple?: boolean;
|
|
11
11
|
defaultValue?: string | string[];
|
|
12
|
+
value?: string | string[];
|
|
12
13
|
onChange?: (value: string | string[]) => void;
|
|
13
|
-
multiple?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
16
|
export declare const Accordion: {
|
|
17
|
-
({ items,
|
|
17
|
+
({ items, multiple, defaultValue, value, onChange, className, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
displayName: string;
|
|
19
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { default as React, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
declare const Table: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & import('react').RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: import('react').ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: import('react').ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './lib/utils';
|
|
2
|
+
export * from './components/ui/accordion';
|
|
3
|
+
export * from './components/ui/badge';
|
|
2
4
|
export * from './components/ui/button';
|
|
3
5
|
export * from './components/ui/card';
|
|
6
|
+
export * from './components/ui/checkbox';
|
|
4
7
|
export * from './components/ui/dialog';
|
|
5
8
|
export * from './components/ui/form-field';
|
|
6
9
|
export * from './components/ui/input';
|
|
@@ -10,9 +13,13 @@ export * from './components/ui/modal';
|
|
|
10
13
|
export * from './components/ui/multi-select';
|
|
11
14
|
export * from './components/ui/radio';
|
|
12
15
|
export * from './components/ui/select';
|
|
16
|
+
export * from './components/ui/switch';
|
|
17
|
+
export * from './components/ui/table';
|
|
18
|
+
export * from './components/ui/tabs';
|
|
13
19
|
export * from './components/ui/textarea';
|
|
14
20
|
export * from './components/ui/toast';
|
|
15
21
|
export * from './components/CircularProgressBar';
|
|
22
|
+
export * from './components/SearchInput';
|
|
16
23
|
export * from './components/Footer';
|
|
17
24
|
export * from './components/Header';
|
|
18
25
|
export * from './components/HoverPopup';
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const cn: (...inputs: ClassValue[]) => string;
|
|
3
|
+
export declare const round: (value: number, decimal: number) => number;
|
|
4
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
5
|
+
export declare const truncate: (str: string, maxLength: number, suffix?: string) => string;
|
|
6
|
+
export declare const throttle: <T extends (...args: any[]) => void>(func: T, limit: number) => (...args: Parameters<T>) => void;
|
|
7
|
+
export declare const debounce: <T extends (...args: any[]) => void>(func: T, delay: number) => {
|
|
8
|
+
(...args: Parameters<T>): void;
|
|
9
|
+
cancel(): void;
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "advi-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Personal React component library built on shadcn/ui + Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/advi-ui.cjs.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@fontsource/raleway": "^5.2.8",
|
|
43
43
|
"@fontsource/rubik": "^5.2.8",
|
|
44
44
|
"@fontsource/unbounded": "^5.2.8",
|
|
45
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
45
46
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
46
47
|
"@radix-ui/react-slot": "^1.2.4",
|
|
47
48
|
"class-variance-authority": "^0.7.1",
|