@neuctra/ui 0.1.0 → 0.2.0
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/README.md +96 -0
- package/dist/components/{gallery → basic}/AudioGallery.d.ts +5 -8
- package/dist/components/basic/Avatar.d.ts +20 -0
- package/dist/components/basic/Card.d.ts +25 -0
- package/dist/components/basic/CheckRadioInput.d.ts +7 -0
- package/dist/components/basic/Container.d.ts +25 -27
- package/dist/components/basic/Flexbox.d.ts +12 -16
- package/dist/components/basic/GridView.d.ts +12 -19
- package/dist/components/basic/Image.d.ts +1 -1
- package/dist/components/basic/Modal.d.ts +11 -0
- package/dist/components/{gallery → basic}/VideoGallery.d.ts +11 -4
- package/dist/components/basic/VideoPlayer.d.ts +1 -0
- package/dist/index.cjs.js +38 -28
- package/dist/index.d.ts +9 -6
- package/dist/index.es.js +2623 -1340
- package/dist/types/components/{gallery → basic}/AudioGallery.d.ts +5 -8
- package/dist/types/components/basic/Avatar.d.ts +20 -0
- package/dist/types/components/basic/Card.d.ts +25 -0
- package/dist/types/components/basic/CheckRadioInput.d.ts +7 -0
- package/dist/types/components/basic/Container.d.ts +25 -27
- package/dist/types/components/basic/Flexbox.d.ts +12 -16
- package/dist/types/components/basic/GridView.d.ts +12 -19
- package/dist/types/components/basic/Image.d.ts +1 -1
- package/dist/types/components/basic/Modal.d.ts +11 -0
- package/dist/types/components/{gallery → basic}/VideoGallery.d.ts +11 -4
- package/dist/types/components/basic/VideoPlayer.d.ts +1 -0
- package/dist/types/index.d.ts +9 -6
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/components/avatar/Avatar.d.ts +0 -9
- package/dist/components/button/ToggleButton.d.ts +0 -15
- package/dist/components/card/Card.d.ts +0 -26
- package/dist/components/card/ImageCard.d.ts +0 -14
- package/dist/components/card/InteractiveCard.d.ts +0 -7
- package/dist/components/modal/FullScreenModal.d.ts +0 -9
- package/dist/components/modal/Modal.d.ts +0 -11
- package/dist/components/modal/ModalBody.d.ts +0 -6
- package/dist/components/modal/ModalFooter.d.ts +0 -6
- package/dist/components/modal/ModalHeader.d.ts +0 -7
- package/dist/components/table/CustomTable.d.ts +0 -7
- package/dist/components/table/SortableTableHeader.d.ts +0 -7
- package/dist/components/table/TableBody.d.ts +0 -7
- package/dist/components/table/TableColumn.d.ts +0 -7
- package/dist/components/table/TableHead.d.ts +0 -7
- package/dist/components/table/TableHeader.d.ts +0 -7
- package/dist/components/table/TableRow.d.ts +0 -7
- package/dist/components/tabs/CustomTabs.d.ts +0 -8
- package/dist/components/tabs/Tab.d.ts +0 -10
- package/dist/components/tabs/TabList.d.ts +0 -7
- package/dist/components/tabs/TabPanel.d.ts +0 -7
- package/dist/components/tabs/TabPanels.d.ts +0 -8
- package/dist/components/video/CustomVideoPlayer.d.ts +0 -11
- package/dist/components/video/EmbedVideo.d.ts +0 -6
- package/dist/components/video/PiPVideo.d.ts +0 -4
- package/dist/types/components/avatar/Avatar.d.ts +0 -9
- package/dist/types/components/button/ToggleButton.d.ts +0 -15
- package/dist/types/components/card/Card.d.ts +0 -26
- package/dist/types/components/card/ImageCard.d.ts +0 -14
- package/dist/types/components/card/InteractiveCard.d.ts +0 -7
- package/dist/types/components/modal/FullScreenModal.d.ts +0 -9
- package/dist/types/components/modal/Modal.d.ts +0 -11
- package/dist/types/components/modal/ModalBody.d.ts +0 -6
- package/dist/types/components/modal/ModalFooter.d.ts +0 -6
- package/dist/types/components/modal/ModalHeader.d.ts +0 -7
- package/dist/types/components/table/CustomTable.d.ts +0 -7
- package/dist/types/components/table/SortableTableHeader.d.ts +0 -7
- package/dist/types/components/table/TableBody.d.ts +0 -7
- package/dist/types/components/table/TableColumn.d.ts +0 -7
- package/dist/types/components/table/TableHead.d.ts +0 -7
- package/dist/types/components/table/TableHeader.d.ts +0 -7
- package/dist/types/components/table/TableRow.d.ts +0 -7
- package/dist/types/components/tabs/CustomTabs.d.ts +0 -8
- package/dist/types/components/tabs/Tab.d.ts +0 -10
- package/dist/types/components/tabs/TabList.d.ts +0 -7
- package/dist/types/components/tabs/TabPanel.d.ts +0 -7
- package/dist/types/components/tabs/TabPanels.d.ts +0 -8
- package/dist/types/components/video/CustomVideoPlayer.d.ts +0 -11
- package/dist/types/components/video/EmbedVideo.d.ts +0 -6
- package/dist/types/components/video/PiPVideo.d.ts +0 -4
- /package/dist/components/{gallery → basic}/ImageGallery.d.ts +0 -0
- /package/dist/types/components/{gallery → basic}/ImageGallery.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
# @neuctra/ui
|
|
3
|
+
|
|
4
|
+
A modern, customizable, and fully responsive React UI component library built with Tailwind CSS, TypeScript, and Vite.
|
|
5
|
+
|
|
6
|
+
> ⚡ Rapidly build accessible and beautiful interfaces using clean, developer-friendly components.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 📦 Installation
|
|
11
|
+
|
|
12
|
+
### Using npm
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @neuctra/ui
|
|
16
|
+
````
|
|
17
|
+
|
|
18
|
+
### Using yarn
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
yarn add @neuctra/ui
|
|
22
|
+
````
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 🧱 Usage
|
|
27
|
+
|
|
28
|
+
Import and use any component:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Button, Dropdown, Input } from '@neuctra/ui';
|
|
32
|
+
|
|
33
|
+
export default function App() {
|
|
34
|
+
return (
|
|
35
|
+
<div className="p-4">
|
|
36
|
+
<Button>Click Me</Button>
|
|
37
|
+
|
|
38
|
+
<Dropdown
|
|
39
|
+
options={[
|
|
40
|
+
{ label: 'Option 1', value: '1' },
|
|
41
|
+
{ label: 'Option 2', value: '2' },
|
|
42
|
+
]}
|
|
43
|
+
placeholder="Select an option"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
<Input placeholder="Type here..." />
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🎨 Customization
|
|
55
|
+
|
|
56
|
+
Components support rich props like:
|
|
57
|
+
|
|
58
|
+
* `className` for Tailwind overrides
|
|
59
|
+
* Color, padding, margin, radius, shadow via props
|
|
60
|
+
* Icon support (via `lucide-react` or `react-icons`)
|
|
61
|
+
* Controlled or uncontrolled components
|
|
62
|
+
* Transition and animation props
|
|
63
|
+
|
|
64
|
+
Each component is designed with flexibility and accessibility in mind.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 📚 Components
|
|
69
|
+
|
|
70
|
+
> Full documentation coming soon
|
|
71
|
+
|
|
72
|
+
* `Button`
|
|
73
|
+
* `Input`
|
|
74
|
+
* `TextArea`
|
|
75
|
+
* `Dropdown`
|
|
76
|
+
* `AudioPlayer`
|
|
77
|
+
* `VideoPlayer`
|
|
78
|
+
* `Accordion`
|
|
79
|
+
* `Drawer`
|
|
80
|
+
* `Alert`
|
|
81
|
+
* More coming...
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 📄 License
|
|
87
|
+
|
|
88
|
+
MIT © [Taha Asif](https://github.com/Taha-Asif-313)
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 🌐 Links
|
|
93
|
+
|
|
94
|
+
* [GitHub Repository](https://github.com/Taha-Asif-313/neuctra-ui)
|
|
95
|
+
* [NPM Package](https://www.npmjs.com/package/@neuctra/ui)
|
|
96
|
+
* [Documentation (coming soon)](https://neuctra-ui.vercel.app)
|
|
@@ -2,18 +2,15 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface AudioTrack {
|
|
3
3
|
src: string;
|
|
4
4
|
title: string;
|
|
5
|
+
thumbnail?: string;
|
|
5
6
|
}
|
|
6
7
|
interface AudioGalleryProps {
|
|
7
8
|
tracks: AudioTrack[];
|
|
8
9
|
className?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
secondary?: string;
|
|
14
|
-
};
|
|
15
|
-
showProgress?: boolean;
|
|
16
|
-
showVolume?: boolean;
|
|
10
|
+
primaryColor?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
textColor?: string;
|
|
13
|
+
secondaryColor?: string;
|
|
17
14
|
autoplay?: boolean;
|
|
18
15
|
loop?: boolean;
|
|
19
16
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AvatarProps {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
isOnline?: boolean;
|
|
7
|
+
isOffline?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
interface AvatarGroupProps {
|
|
12
|
+
avatars: AvatarProps[];
|
|
13
|
+
max?: number;
|
|
14
|
+
size?: "small" | "medium" | "large";
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
19
|
+
export declare const AvatarGroup: React.FC<AvatarGroupProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
interface CardProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
background?: string;
|
|
7
|
+
backgroundImage?: string;
|
|
8
|
+
backgroundSize?: CSSProperties["backgroundSize"];
|
|
9
|
+
backgroundPosition?: CSSProperties["backgroundPosition"];
|
|
10
|
+
backgroundRepeat?: CSSProperties["backgroundRepeat"];
|
|
11
|
+
textColor?: string;
|
|
12
|
+
borderRadius?: string | number;
|
|
13
|
+
padding?: string | number;
|
|
14
|
+
margin?: string | number;
|
|
15
|
+
maxWidth?: string | number;
|
|
16
|
+
boxShadow?: string;
|
|
17
|
+
border?: string;
|
|
18
|
+
display?: CSSProperties["display"];
|
|
19
|
+
flexDirection?: CSSProperties["flexDirection"];
|
|
20
|
+
justifyContent?: CSSProperties["justifyContent"];
|
|
21
|
+
alignItems?: CSSProperties["alignItems"];
|
|
22
|
+
gap?: string | number;
|
|
23
|
+
}
|
|
24
|
+
export declare const Card: React.FC<CardProps>;
|
|
25
|
+
export {};
|
|
@@ -15,6 +15,13 @@ interface CheckRadioProps {
|
|
|
15
15
|
error?: string;
|
|
16
16
|
className?: string;
|
|
17
17
|
customIcon?: (checked: boolean) => React.ReactNode;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
labelStyle?: React.CSSProperties;
|
|
20
|
+
iconSize?: number;
|
|
21
|
+
iconCheckedBgColor?: string;
|
|
22
|
+
iconUncheckedBorderColor?: string;
|
|
23
|
+
textColor?: string;
|
|
24
|
+
errorStyle?: React.CSSProperties;
|
|
18
25
|
}
|
|
19
26
|
export declare const CheckRadio: React.FC<CheckRadioProps>;
|
|
20
27
|
export {};
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
md?: T;
|
|
5
|
-
lg?: T;
|
|
6
|
-
}
|
|
1
|
+
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
type ScreenSize = "sm" | "md" | "lg";
|
|
3
|
+
type ResponsiveProp<T> = T | Partial<Record<ScreenSize, T>>;
|
|
7
4
|
interface ContainerProps {
|
|
8
|
-
display?:
|
|
9
|
-
flexDirection?:
|
|
10
|
-
justifyContent?:
|
|
11
|
-
alignItems?:
|
|
12
|
-
gridTemplateColumns?:
|
|
13
|
-
gridTemplateRows?:
|
|
14
|
-
gap?:
|
|
15
|
-
rowGap?:
|
|
16
|
-
columnGap?:
|
|
17
|
-
width?:
|
|
18
|
-
maxWidth?:
|
|
19
|
-
height?:
|
|
20
|
-
padding?:
|
|
21
|
-
margin?:
|
|
22
|
-
textAlign?:
|
|
5
|
+
display?: ResponsiveProp<"block" | "flex" | "grid" | "inline-block">;
|
|
6
|
+
flexDirection?: ResponsiveProp<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
7
|
+
justifyContent?: ResponsiveProp<"flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly">;
|
|
8
|
+
alignItems?: ResponsiveProp<"flex-start" | "center" | "flex-end" | "stretch" | "baseline">;
|
|
9
|
+
gridTemplateColumns?: ResponsiveProp<string>;
|
|
10
|
+
gridTemplateRows?: ResponsiveProp<string>;
|
|
11
|
+
gap?: ResponsiveProp<string>;
|
|
12
|
+
rowGap?: ResponsiveProp<string>;
|
|
13
|
+
columnGap?: ResponsiveProp<string>;
|
|
14
|
+
width?: ResponsiveProp<string>;
|
|
15
|
+
maxWidth?: ResponsiveProp<string>;
|
|
16
|
+
height?: ResponsiveProp<string>;
|
|
17
|
+
padding?: ResponsiveProp<string>;
|
|
18
|
+
margin?: ResponsiveProp<string>;
|
|
19
|
+
textAlign?: ResponsiveProp<"left" | "center" | "right">;
|
|
23
20
|
backgroundColor?: string;
|
|
24
|
-
border?:
|
|
25
|
-
borderRadius?:
|
|
26
|
-
boxShadow?:
|
|
27
|
-
overflow?:
|
|
21
|
+
border?: ResponsiveProp<string>;
|
|
22
|
+
borderRadius?: ResponsiveProp<string>;
|
|
23
|
+
boxShadow?: ResponsiveProp<string>;
|
|
24
|
+
overflow?: ResponsiveProp<"visible" | "hidden" | "scroll" | "auto">;
|
|
28
25
|
children: React.ReactNode;
|
|
29
26
|
className?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
30
28
|
}
|
|
31
|
-
declare const Container: React.FC<ContainerProps>;
|
|
32
|
-
export
|
|
29
|
+
export declare const Container: React.FC<ContainerProps>;
|
|
30
|
+
export {};
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
sm?: T;
|
|
4
|
-
md?: T;
|
|
5
|
-
lg?: T;
|
|
6
|
-
}
|
|
2
|
+
type ScreenSize = "sm" | "md" | "lg";
|
|
7
3
|
interface FlexboxProps {
|
|
8
|
-
direction?:
|
|
9
|
-
align?:
|
|
10
|
-
justify?:
|
|
11
|
-
gap?:
|
|
12
|
-
padding?:
|
|
4
|
+
direction?: "row" | "column" | Partial<Record<ScreenSize, "row" | "column">>;
|
|
5
|
+
align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
6
|
+
justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
7
|
+
gap?: number | string;
|
|
8
|
+
padding?: number | string;
|
|
13
9
|
backgroundColor?: string;
|
|
10
|
+
width?: string;
|
|
11
|
+
maxWidth?: string;
|
|
12
|
+
height?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
14
|
children: React.ReactNode;
|
|
15
|
-
width?: ResponsiveProps<string>;
|
|
16
|
-
maxWidth?: ResponsiveProps<string>;
|
|
17
|
-
height?: ResponsiveProps<string>;
|
|
18
|
-
className?: string;
|
|
19
15
|
}
|
|
20
|
-
declare const Flexbox: React.FC<FlexboxProps>;
|
|
21
|
-
export
|
|
16
|
+
export declare const Flexbox: React.FC<FlexboxProps>;
|
|
17
|
+
export {};
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
sm?: T;
|
|
4
|
-
md?: T;
|
|
5
|
-
lg?: T;
|
|
6
|
-
}
|
|
2
|
+
type ScreenSize = "sm" | "md" | "lg";
|
|
7
3
|
interface GridViewProps {
|
|
8
|
-
columns?:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
padding?: ResponsiveProps<string>;
|
|
14
|
-
alignItems?: ResponsiveProps<"start" | "center" | "end" | "stretch">;
|
|
15
|
-
justifyItems?: ResponsiveProps<"start" | "center" | "end" | "stretch">;
|
|
4
|
+
columns?: number | Partial<Record<ScreenSize, number>>;
|
|
5
|
+
gap?: string;
|
|
6
|
+
padding?: string;
|
|
7
|
+
alignItems?: "start" | "center" | "end" | "stretch";
|
|
8
|
+
justifyItems?: "start" | "center" | "end" | "stretch";
|
|
16
9
|
backgroundColor?: string;
|
|
10
|
+
width?: string;
|
|
11
|
+
maxWidth?: string;
|
|
12
|
+
height?: string;
|
|
17
13
|
children: React.ReactNode;
|
|
18
|
-
|
|
19
|
-
width?: ResponsiveProps<string>;
|
|
20
|
-
maxWidth?: ResponsiveProps<string>;
|
|
21
|
-
height?: ResponsiveProps<string>;
|
|
14
|
+
style?: React.CSSProperties;
|
|
22
15
|
}
|
|
23
|
-
declare const GridView: React.FC<GridViewProps>;
|
|
24
|
-
export
|
|
16
|
+
export declare const GridView: React.FC<GridViewProps>;
|
|
17
|
+
export {};
|
|
@@ -27,7 +27,7 @@ interface ImageProps {
|
|
|
27
27
|
overflow?: "hidden" | "scroll" | "auto" | "visible" | "x" | "y";
|
|
28
28
|
className?: string;
|
|
29
29
|
style?: React.CSSProperties;
|
|
30
|
-
onClick?: () => void;
|
|
30
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLImageElement>) => void;
|
|
31
31
|
}
|
|
32
32
|
export declare const Image: React.FC<ImageProps>;
|
|
33
33
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ReactNode, CSSProperties } from 'react';
|
|
2
|
+
interface ModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
overlayStyle?: CSSProperties;
|
|
7
|
+
modalStyle?: CSSProperties;
|
|
8
|
+
closeButtonStyle?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
11
|
+
export {};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
interface Video {
|
|
3
|
+
src: string;
|
|
4
|
+
poster?: string;
|
|
5
|
+
}
|
|
6
|
+
interface ResponsiveColumns {
|
|
7
|
+
mobile?: number;
|
|
8
|
+
tablet?: number;
|
|
9
|
+
desktop?: number;
|
|
10
|
+
}
|
|
2
11
|
interface VideoGalleryProps {
|
|
3
|
-
videos:
|
|
4
|
-
src: string;
|
|
5
|
-
poster?: string;
|
|
6
|
-
}[];
|
|
12
|
+
videos: Video[];
|
|
7
13
|
columns?: number;
|
|
14
|
+
responsiveColumns?: ResponsiveColumns;
|
|
8
15
|
gap?: string;
|
|
9
16
|
layout?: "grid" | "masonry";
|
|
10
17
|
lightbox?: boolean;
|