@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.
Files changed (81) hide show
  1. package/README.md +96 -0
  2. package/dist/components/{gallery → basic}/AudioGallery.d.ts +5 -8
  3. package/dist/components/basic/Avatar.d.ts +20 -0
  4. package/dist/components/basic/Card.d.ts +25 -0
  5. package/dist/components/basic/CheckRadioInput.d.ts +7 -0
  6. package/dist/components/basic/Container.d.ts +25 -27
  7. package/dist/components/basic/Flexbox.d.ts +12 -16
  8. package/dist/components/basic/GridView.d.ts +12 -19
  9. package/dist/components/basic/Image.d.ts +1 -1
  10. package/dist/components/basic/Modal.d.ts +11 -0
  11. package/dist/components/{gallery → basic}/VideoGallery.d.ts +11 -4
  12. package/dist/components/basic/VideoPlayer.d.ts +1 -0
  13. package/dist/index.cjs.js +38 -28
  14. package/dist/index.d.ts +9 -6
  15. package/dist/index.es.js +2623 -1340
  16. package/dist/types/components/{gallery → basic}/AudioGallery.d.ts +5 -8
  17. package/dist/types/components/basic/Avatar.d.ts +20 -0
  18. package/dist/types/components/basic/Card.d.ts +25 -0
  19. package/dist/types/components/basic/CheckRadioInput.d.ts +7 -0
  20. package/dist/types/components/basic/Container.d.ts +25 -27
  21. package/dist/types/components/basic/Flexbox.d.ts +12 -16
  22. package/dist/types/components/basic/GridView.d.ts +12 -19
  23. package/dist/types/components/basic/Image.d.ts +1 -1
  24. package/dist/types/components/basic/Modal.d.ts +11 -0
  25. package/dist/types/components/{gallery → basic}/VideoGallery.d.ts +11 -4
  26. package/dist/types/components/basic/VideoPlayer.d.ts +1 -0
  27. package/dist/types/index.d.ts +9 -6
  28. package/dist/ui.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/components/avatar/Avatar.d.ts +0 -9
  31. package/dist/components/button/ToggleButton.d.ts +0 -15
  32. package/dist/components/card/Card.d.ts +0 -26
  33. package/dist/components/card/ImageCard.d.ts +0 -14
  34. package/dist/components/card/InteractiveCard.d.ts +0 -7
  35. package/dist/components/modal/FullScreenModal.d.ts +0 -9
  36. package/dist/components/modal/Modal.d.ts +0 -11
  37. package/dist/components/modal/ModalBody.d.ts +0 -6
  38. package/dist/components/modal/ModalFooter.d.ts +0 -6
  39. package/dist/components/modal/ModalHeader.d.ts +0 -7
  40. package/dist/components/table/CustomTable.d.ts +0 -7
  41. package/dist/components/table/SortableTableHeader.d.ts +0 -7
  42. package/dist/components/table/TableBody.d.ts +0 -7
  43. package/dist/components/table/TableColumn.d.ts +0 -7
  44. package/dist/components/table/TableHead.d.ts +0 -7
  45. package/dist/components/table/TableHeader.d.ts +0 -7
  46. package/dist/components/table/TableRow.d.ts +0 -7
  47. package/dist/components/tabs/CustomTabs.d.ts +0 -8
  48. package/dist/components/tabs/Tab.d.ts +0 -10
  49. package/dist/components/tabs/TabList.d.ts +0 -7
  50. package/dist/components/tabs/TabPanel.d.ts +0 -7
  51. package/dist/components/tabs/TabPanels.d.ts +0 -8
  52. package/dist/components/video/CustomVideoPlayer.d.ts +0 -11
  53. package/dist/components/video/EmbedVideo.d.ts +0 -6
  54. package/dist/components/video/PiPVideo.d.ts +0 -4
  55. package/dist/types/components/avatar/Avatar.d.ts +0 -9
  56. package/dist/types/components/button/ToggleButton.d.ts +0 -15
  57. package/dist/types/components/card/Card.d.ts +0 -26
  58. package/dist/types/components/card/ImageCard.d.ts +0 -14
  59. package/dist/types/components/card/InteractiveCard.d.ts +0 -7
  60. package/dist/types/components/modal/FullScreenModal.d.ts +0 -9
  61. package/dist/types/components/modal/Modal.d.ts +0 -11
  62. package/dist/types/components/modal/ModalBody.d.ts +0 -6
  63. package/dist/types/components/modal/ModalFooter.d.ts +0 -6
  64. package/dist/types/components/modal/ModalHeader.d.ts +0 -7
  65. package/dist/types/components/table/CustomTable.d.ts +0 -7
  66. package/dist/types/components/table/SortableTableHeader.d.ts +0 -7
  67. package/dist/types/components/table/TableBody.d.ts +0 -7
  68. package/dist/types/components/table/TableColumn.d.ts +0 -7
  69. package/dist/types/components/table/TableHead.d.ts +0 -7
  70. package/dist/types/components/table/TableHeader.d.ts +0 -7
  71. package/dist/types/components/table/TableRow.d.ts +0 -7
  72. package/dist/types/components/tabs/CustomTabs.d.ts +0 -8
  73. package/dist/types/components/tabs/Tab.d.ts +0 -10
  74. package/dist/types/components/tabs/TabList.d.ts +0 -7
  75. package/dist/types/components/tabs/TabPanel.d.ts +0 -7
  76. package/dist/types/components/tabs/TabPanels.d.ts +0 -8
  77. package/dist/types/components/video/CustomVideoPlayer.d.ts +0 -11
  78. package/dist/types/components/video/EmbedVideo.d.ts +0 -6
  79. package/dist/types/components/video/PiPVideo.d.ts +0 -4
  80. /package/dist/components/{gallery → basic}/ImageGallery.d.ts +0 -0
  81. /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
- theme?: {
10
- bg?: string;
11
- text?: string;
12
- primary?: string;
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
- interface ResponsiveProps<T> {
3
- sm?: T;
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?: ResponsiveProps<"block" | "flex" | "grid" | "inline-block">;
9
- flexDirection?: ResponsiveProps<"row" | "column" | "row-reverse" | "column-reverse">;
10
- justifyContent?: ResponsiveProps<"flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly">;
11
- alignItems?: ResponsiveProps<"flex-start" | "center" | "flex-end" | "stretch" | "baseline">;
12
- gridTemplateColumns?: ResponsiveProps<string>;
13
- gridTemplateRows?: ResponsiveProps<string>;
14
- gap?: ResponsiveProps<string>;
15
- rowGap?: ResponsiveProps<string>;
16
- columnGap?: ResponsiveProps<string>;
17
- width?: ResponsiveProps<string>;
18
- maxWidth?: ResponsiveProps<string>;
19
- height?: ResponsiveProps<string>;
20
- padding?: ResponsiveProps<string>;
21
- margin?: ResponsiveProps<string>;
22
- textAlign?: ResponsiveProps<"left" | "center" | "right">;
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?: ResponsiveProps<string>;
25
- borderRadius?: ResponsiveProps<string>;
26
- boxShadow?: ResponsiveProps<string>;
27
- overflow?: ResponsiveProps<"visible" | "hidden" | "scroll" | "auto">;
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 default Container;
29
+ export declare const Container: React.FC<ContainerProps>;
30
+ export {};
@@ -1,21 +1,17 @@
1
1
  import { default as React } from 'react';
2
- interface ResponsiveProps<T> {
3
- sm?: T;
4
- md?: T;
5
- lg?: T;
6
- }
2
+ type ScreenSize = "sm" | "md" | "lg";
7
3
  interface FlexboxProps {
8
- direction?: ResponsiveProps<"row" | "column">;
9
- align?: ResponsiveProps<"flex-start" | "flex-end" | "center" | "stretch" | "baseline">;
10
- justify?: ResponsiveProps<"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly">;
11
- gap?: ResponsiveProps<string>;
12
- padding?: ResponsiveProps<string>;
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 default Flexbox;
16
+ export declare const Flexbox: React.FC<FlexboxProps>;
17
+ export {};
@@ -1,24 +1,17 @@
1
1
  import { default as React } from 'react';
2
- interface ResponsiveProps<T> {
3
- sm?: T;
4
- md?: T;
5
- lg?: T;
6
- }
2
+ type ScreenSize = "sm" | "md" | "lg";
7
3
  interface GridViewProps {
8
- columns?: ResponsiveProps<number>;
9
- rows?: ResponsiveProps<number>;
10
- gap?: ResponsiveProps<string>;
11
- rowGap?: ResponsiveProps<string>;
12
- columnGap?: ResponsiveProps<string>;
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
- className?: string;
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 default GridView;
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;
@@ -5,6 +5,7 @@ interface VideoPlayerProps {
5
5
  autoPlay?: boolean;
6
6
  loop?: boolean;
7
7
  controls?: boolean;
8
+ muted?: boolean;
8
9
  width?: string;
9
10
  height?: string;
10
11
  borderRadius?: string;