@neuctra/ui 0.2.5 → 0.2.7
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/components/basic/Accordation.d.ts +9 -13
- package/dist/components/basic/Alert.d.ts +10 -23
- package/dist/components/basic/Avatar.d.ts +7 -16
- package/dist/components/basic/Badge.d.ts +9 -14
- package/dist/components/basic/Button.d.ts +9 -19
- package/dist/components/basic/CheckboxGroup.d.ts +1 -0
- package/dist/components/basic/Container.d.ts +2 -19
- package/dist/components/basic/Drawer.d.ts +7 -18
- package/dist/components/basic/DropDown.d.ts +20 -40
- package/dist/components/basic/FlexView.d.ts +16 -0
- package/dist/components/basic/GridView.d.ts +4 -9
- package/dist/components/basic/Image.d.ts +10 -31
- package/dist/components/basic/Input.d.ts +22 -35
- package/dist/components/basic/List.d.ts +6 -20
- package/dist/components/basic/Modal.d.ts +8 -8
- package/dist/components/basic/RadioGroup.d.ts +1 -0
- package/dist/components/basic/Stack.d.ts +4 -14
- package/dist/components/basic/SwitchGroup.d.ts +1 -0
- package/dist/components/basic/Table.d.ts +6 -1
- package/dist/components/basic/Text.d.ts +1109 -14
- package/dist/index.cjs.js +82 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.es.js +2004 -2914
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/basic/Accordation.js +25 -26
- package/dist/src/components/basic/Alert.js +33 -138
- package/dist/src/components/basic/AudioPlayer.js +54 -40
- package/dist/src/components/basic/Avatar.js +41 -154
- package/dist/src/components/basic/Badge.js +23 -62
- package/dist/src/components/basic/Button.js +24 -97
- package/dist/src/components/basic/CheckboxGroup.js +36 -13
- package/dist/src/components/basic/Container.js +19 -38
- package/dist/src/components/basic/Drawer.js +22 -73
- package/dist/src/components/basic/DropDown.js +94 -158
- package/dist/src/components/basic/FlexView.js +19 -0
- package/dist/src/components/basic/GridView.js +15 -48
- package/dist/src/components/basic/Image.js +39 -79
- package/dist/src/components/basic/Input.js +68 -109
- package/dist/src/components/basic/List.js +20 -62
- package/dist/src/components/basic/Modal.js +6 -58
- package/dist/src/components/basic/RadioGroup.js +35 -18
- package/dist/src/components/basic/Stack.js +19 -72
- package/dist/src/components/basic/SwitchGroup.js +42 -16
- package/dist/src/components/basic/Table.js +15 -36
- package/dist/src/components/basic/Tabs.js +3 -12
- package/dist/src/components/basic/Text.js +20 -112
- package/dist/src/index.js +3 -5
- package/dist/types/src/components/basic/Accordation.d.ts +9 -13
- package/dist/types/src/components/basic/Alert.d.ts +10 -23
- package/dist/types/src/components/basic/Avatar.d.ts +7 -16
- package/dist/types/src/components/basic/Badge.d.ts +9 -14
- package/dist/types/src/components/basic/Button.d.ts +9 -19
- package/dist/types/src/components/basic/CheckboxGroup.d.ts +1 -0
- package/dist/types/src/components/basic/Container.d.ts +2 -19
- package/dist/types/src/components/basic/Drawer.d.ts +7 -18
- package/dist/types/src/components/basic/DropDown.d.ts +20 -40
- package/dist/types/src/components/basic/FlexView.d.ts +16 -0
- package/dist/types/src/components/basic/GridView.d.ts +4 -9
- package/dist/types/src/components/basic/Image.d.ts +10 -31
- package/dist/types/src/components/basic/Input.d.ts +22 -35
- package/dist/types/src/components/basic/List.d.ts +6 -20
- package/dist/types/src/components/basic/Modal.d.ts +8 -8
- package/dist/types/src/components/basic/RadioGroup.d.ts +1 -0
- package/dist/types/src/components/basic/Stack.d.ts +4 -14
- package/dist/types/src/components/basic/SwitchGroup.d.ts +1 -0
- package/dist/types/src/components/basic/Table.d.ts +6 -1
- package/dist/types/src/components/basic/Text.d.ts +1109 -14
- package/dist/types/src/index.d.ts +3 -4
- package/dist/ui.css +1 -1
- package/package.json +2 -1
- package/dist/components/basic/Card.d.ts +0 -28
- package/dist/components/basic/Flexbox.d.ts +0 -25
- package/dist/components/basic/Section.d.ts +0 -36
- package/dist/src/components/basic/Card.js +0 -47
- package/dist/src/components/basic/Flexbox.js +0 -67
- package/dist/src/components/basic/Section.js +0 -100
- package/dist/types/src/components/basic/Card.d.ts +0 -28
- package/dist/types/src/components/basic/Flexbox.d.ts +0 -25
- package/dist/types/src/components/basic/Section.d.ts +0 -36
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type ScreenSize = "sm" | "md" | "lg";
|
|
3
|
+
type ResponsiveValue<T> = T | Partial<Record<ScreenSize, T>>;
|
|
3
4
|
export interface GridProps {
|
|
4
|
-
columns?:
|
|
5
|
-
gap?:
|
|
6
|
-
padding?:
|
|
5
|
+
columns?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6>;
|
|
6
|
+
gap?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12>;
|
|
7
|
+
padding?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12>;
|
|
7
8
|
alignItems?: "start" | "center" | "end" | "stretch";
|
|
8
9
|
justifyItems?: "start" | "center" | "end" | "stretch";
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
width?: string;
|
|
11
|
-
maxWidth?: string;
|
|
12
|
-
height?: string;
|
|
13
|
-
margin?: number | string;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
10
|
className?: string;
|
|
16
11
|
children: React.ReactNode;
|
|
17
12
|
}
|
|
@@ -1,58 +1,37 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface ImageProps {
|
|
3
|
-
/** Image source URL */
|
|
4
3
|
src?: string;
|
|
5
|
-
/** Alternative text (for SEO + accessibility) */
|
|
6
4
|
alt?: string;
|
|
7
|
-
/** Optional title attribute (SEO hint tooltip) */
|
|
8
5
|
title?: string;
|
|
9
|
-
/**
|
|
6
|
+
/** Tailwind width/height classes or numbers */
|
|
10
7
|
width?: string | number;
|
|
11
8
|
height?: string | number;
|
|
12
|
-
/**
|
|
13
|
-
|
|
9
|
+
/** Tailwind rounded classes */
|
|
10
|
+
rounded?: string;
|
|
14
11
|
borderColor?: string;
|
|
15
|
-
borderStyle?: "solid" | "dashed" | "dotted" | "double" | "none";
|
|
16
12
|
borderWidth?: string | number;
|
|
17
|
-
/** Shadow customization */
|
|
18
13
|
shadow?: boolean;
|
|
19
|
-
boxShadow?: string;
|
|
20
|
-
/** Opacity and fit options */
|
|
21
14
|
opacity?: number;
|
|
22
15
|
objectFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
23
|
-
/** Overlay and icon layers */
|
|
24
16
|
overlayText?: string;
|
|
25
17
|
overlayColor?: string;
|
|
26
18
|
svgIcon?: React.ReactNode;
|
|
27
|
-
/** Layout and responsiveness */
|
|
28
19
|
responsive?: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
lazyLoad?: boolean;
|
|
33
|
-
/** Hover interactivity */
|
|
34
|
-
hoverOpacity?: number;
|
|
35
|
-
hoverShadow?: boolean;
|
|
20
|
+
p?: string;
|
|
21
|
+
m?: string;
|
|
22
|
+
/** Hover Effects */
|
|
36
23
|
hoverScale?: number;
|
|
37
24
|
hoverRotate?: number;
|
|
25
|
+
hoverOpacity?: number;
|
|
26
|
+
hoverShadow?: boolean;
|
|
38
27
|
transitionDuration?: string;
|
|
39
|
-
/** Overflow handling */
|
|
40
28
|
overflow?: "hidden" | "scroll" | "auto" | "visible" | "x" | "y";
|
|
41
|
-
/**
|
|
29
|
+
/** Custom Tailwind classes */
|
|
42
30
|
className?: string;
|
|
43
31
|
style?: React.CSSProperties;
|
|
44
|
-
|
|
45
|
-
onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLImageElement>) => void;
|
|
32
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement | HTMLImageElement>) => void;
|
|
46
33
|
onLoad?: () => void;
|
|
47
34
|
onError?: () => void;
|
|
48
35
|
}
|
|
49
|
-
/**
|
|
50
|
-
* ✅ Industry-Standard Image Component
|
|
51
|
-
* - SEO & accessibility optimized
|
|
52
|
-
* - Lazy loading & responsive
|
|
53
|
-
* - Fully customizable styling
|
|
54
|
-
* - Smooth hover transitions
|
|
55
|
-
* - Overlay and SVG support
|
|
56
|
-
*/
|
|
57
36
|
export declare const Image: React.FC<ImageProps>;
|
|
58
37
|
export {};
|
|
@@ -1,46 +1,33 @@
|
|
|
1
|
-
import React
|
|
2
|
-
export interface
|
|
3
|
-
type?: "text" | "password" | "email" | "number" | "search" | "tel" | "url" | "textarea";
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface InputFieldProps {
|
|
4
3
|
label?: string;
|
|
5
|
-
placeholder?: string;
|
|
6
4
|
name?: string;
|
|
5
|
+
type?: "text" | "password" | "email" | "number" | "textarea";
|
|
6
|
+
placeholder?: string;
|
|
7
7
|
value?: string;
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
onChange?: (name: string, value: string) => void;
|
|
10
|
+
required?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
readOnly?: boolean;
|
|
12
|
-
|
|
13
|
-
error?: string;
|
|
13
|
+
error?: string | boolean;
|
|
14
14
|
success?: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
errorColor?: string;
|
|
27
|
-
successColor?: string;
|
|
28
|
-
iconColor?: string;
|
|
29
|
-
shadow?: string;
|
|
30
|
-
/** 🧩 Layout + Style Customization */
|
|
31
|
-
fontSize?: string;
|
|
32
|
-
fontFamily?: string;
|
|
33
|
-
radius?: string;
|
|
34
|
-
size?: "sm" | "md" | "lg";
|
|
15
|
+
helperText?: string;
|
|
16
|
+
/** Icons */
|
|
17
|
+
icon?: React.ElementType;
|
|
18
|
+
prefix?: string;
|
|
19
|
+
prefixIcon?: React.ElementType;
|
|
20
|
+
suffixIcon?: React.ReactNode;
|
|
21
|
+
/** Number props */
|
|
22
|
+
min?: number;
|
|
23
|
+
max?: number;
|
|
24
|
+
step?: number;
|
|
25
|
+
/** Textarea */
|
|
35
26
|
rows?: number;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
paddingX?: string;
|
|
41
|
-
paddingY?: string;
|
|
42
|
-
/** 🧱 External customization */
|
|
27
|
+
/** 🔥 Theme */
|
|
28
|
+
primaryTheme?: boolean;
|
|
29
|
+
primaryColor?: string;
|
|
30
|
+
/** Styling */
|
|
43
31
|
className?: string;
|
|
44
|
-
style?: CSSProperties;
|
|
45
32
|
}
|
|
46
|
-
export declare const Input: React.ForwardRefExoticComponent<
|
|
33
|
+
export declare const Input: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
export interface ListItemType {
|
|
3
3
|
text: string;
|
|
4
4
|
icon?: ReactNode;
|
|
@@ -10,25 +10,11 @@ export interface ListProps {
|
|
|
10
10
|
titleIcon?: ReactNode;
|
|
11
11
|
items: ListItemType[];
|
|
12
12
|
type?: "unordered" | "ordered" | "inline";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
backgroundColor?: string;
|
|
16
|
-
borderColor?: string;
|
|
17
|
-
fontSize?: string;
|
|
18
|
-
fontWeight?: string | number;
|
|
19
|
-
borderRadius?: string;
|
|
20
|
-
padding?: string;
|
|
21
|
-
spacing?: string;
|
|
13
|
+
primaryTheme?: boolean;
|
|
14
|
+
primaryColor?: string;
|
|
22
15
|
className?: string;
|
|
23
|
-
|
|
16
|
+
itemClassName?: string;
|
|
17
|
+
titleClassName?: string;
|
|
18
|
+
bulletClassName?: string;
|
|
24
19
|
}
|
|
25
|
-
export interface ListItemProps extends ListItemType {
|
|
26
|
-
bulletColor?: string;
|
|
27
|
-
textColor?: string;
|
|
28
|
-
fontSize?: string;
|
|
29
|
-
fontWeight?: string | number;
|
|
30
|
-
spacing?: string;
|
|
31
|
-
isInline?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare const ListItem: React.FC<ListItemProps>;
|
|
34
20
|
export declare const List: React.FC<ListProps>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React, { ReactNode
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
export interface ModalProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
ariaLabel?: string;
|
|
7
6
|
title?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
closeButtonStyle?: CSSProperties;
|
|
11
|
-
disableOverlayClose?: boolean;
|
|
12
|
-
transitionDuration?: number;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
ariaLabel?: string;
|
|
13
9
|
className?: string;
|
|
14
|
-
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
contentClassName?: string;
|
|
12
|
+
closeButtonClassName?: string;
|
|
13
|
+
disableOverlayClose?: boolean;
|
|
15
14
|
darkMode?: boolean;
|
|
15
|
+
transitionDuration?: number;
|
|
16
16
|
}
|
|
17
17
|
export declare const Modal: React.FC<ModalProps>;
|
|
@@ -3,25 +3,15 @@ type ScreenSize = "sm" | "md" | "lg";
|
|
|
3
3
|
type ResponsiveValue<T> = T | Partial<Record<ScreenSize, T>>;
|
|
4
4
|
interface StackProps {
|
|
5
5
|
direction?: ResponsiveValue<"vertical" | "horizontal">;
|
|
6
|
-
gap?: ResponsiveValue<
|
|
7
|
-
align?: ResponsiveValue<"
|
|
8
|
-
justify?: ResponsiveValue<"
|
|
6
|
+
gap?: ResponsiveValue<1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12>;
|
|
7
|
+
align?: ResponsiveValue<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
8
|
+
justify?: ResponsiveValue<"start" | "center" | "end" | "between" | "around" | "evenly">;
|
|
9
9
|
wrap?: ResponsiveValue<"nowrap" | "wrap" | "wrap-reverse">;
|
|
10
|
-
padding?: ResponsiveValue<number | string>;
|
|
11
|
-
margin?: ResponsiveValue<number | string>;
|
|
12
|
-
width?: ResponsiveValue<string>;
|
|
13
|
-
maxWidth?: ResponsiveValue<string>;
|
|
14
|
-
height?: ResponsiveValue<string>;
|
|
15
|
-
backgroundColor?: ResponsiveValue<string>;
|
|
16
|
-
borderRadius?: ResponsiveValue<string>;
|
|
17
|
-
border?: ResponsiveValue<string>;
|
|
18
|
-
boxShadow?: ResponsiveValue<string>;
|
|
19
|
-
overflow?: ResponsiveValue<"visible" | "hidden" | "auto" | "scroll">;
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
10
|
className?: string;
|
|
22
11
|
children: React.ReactNode;
|
|
23
12
|
}
|
|
24
13
|
export declare const Stack: React.FC<StackProps>;
|
|
14
|
+
/** Shortcuts for horizontal & vertical stacks */
|
|
25
15
|
export declare const HStack: React.FC<StackProps>;
|
|
26
16
|
export declare const VStack: React.FC<StackProps>;
|
|
27
17
|
export {};
|
|
@@ -17,7 +17,12 @@ interface TableCellProps {
|
|
|
17
17
|
export declare const Table: React.FC<TableProps>;
|
|
18
18
|
export declare const THead: React.FC<TableSectionProps>;
|
|
19
19
|
export declare const TBody: React.FC<TableSectionProps>;
|
|
20
|
-
|
|
20
|
+
interface TRowProps extends TableSectionProps {
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
hoverBgColor?: string;
|
|
23
|
+
darkMode?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const TRow: React.FC<TRowProps>;
|
|
21
26
|
export declare const TH: React.FC<TableCellProps>;
|
|
22
27
|
export declare const TD: React.FC<TableCellProps>;
|
|
23
28
|
export {};
|