@neuctra/ui 0.2.2 → 0.2.3
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 +27 -18
- package/dist/components/basic/Alert.d.ts +15 -2
- package/dist/components/basic/Avatar.d.ts +5 -3
- package/dist/components/basic/Badge.d.ts +3 -3
- package/dist/components/basic/Button.d.ts +15 -17
- package/dist/components/basic/Card.d.ts +7 -49
- package/dist/components/basic/CheckRadioInput.d.ts +3 -1
- package/dist/components/basic/Container.d.ts +28 -26
- package/dist/components/basic/Drawer.d.ts +20 -11
- package/dist/components/basic/Flexbox.d.ts +18 -10
- package/dist/components/basic/GridView.d.ts +7 -5
- package/dist/components/basic/Image.d.ts +31 -6
- package/dist/components/basic/Input.d.ts +18 -10
- package/dist/components/basic/List.d.ts +11 -3
- package/dist/components/basic/Modal.d.ts +15 -2
- package/dist/components/basic/Section.d.ts +36 -0
- package/dist/components/basic/Stack.d.ts +27 -0
- package/dist/components/basic/Table.d.ts +18 -54
- package/dist/components/basic/Tabs.d.ts +28 -28
- package/dist/components/basic/Text.d.ts +19 -32
- package/dist/index.cjs.js +68 -178
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +17 -18
- package/dist/index.es.js +3542 -4766
- package/dist/index.es.js.map +1 -0
- package/dist/src/components/avatar/AvatarGroup.js +9 -0
- package/dist/src/components/avatar/AvatarWithStatus.js +18 -0
- package/dist/src/components/basic/Accordation.js +74 -0
- package/dist/src/components/basic/Alert.js +126 -0
- package/dist/src/components/basic/AudioGallery.js +425 -0
- package/dist/src/components/basic/AudioPlayer.js +116 -0
- package/dist/src/components/basic/Avatar.js +181 -0
- package/dist/src/components/basic/Badge.js +66 -0
- package/dist/src/components/basic/Button.js +101 -0
- package/dist/src/components/basic/Card.js +45 -0
- package/dist/src/components/basic/CheckRadioInput.js +83 -0
- package/dist/src/components/basic/Container.js +45 -0
- package/dist/src/components/basic/Drawer.js +94 -0
- package/dist/src/components/basic/DropDown.js +316 -0
- package/dist/src/components/basic/Flexbox.js +67 -0
- package/dist/src/components/basic/GridView.js +51 -0
- package/dist/src/components/basic/Image.js +95 -0
- package/dist/src/components/basic/Input.js +123 -0
- package/dist/src/components/basic/List.js +71 -0
- package/dist/src/components/basic/Modal.js +88 -0
- package/dist/src/components/basic/Section.js +100 -0
- package/dist/src/components/basic/Stack.js +75 -0
- package/dist/src/components/basic/Table.js +32 -0
- package/dist/src/components/basic/Tabs.js +149 -0
- package/dist/src/components/basic/Text.js +117 -0
- package/dist/src/index.js +44 -0
- package/dist/types/src/components/basic/Accordation.d.ts +44 -0
- package/dist/types/{components → src/components}/basic/Alert.d.ts +15 -2
- package/dist/types/{components → src/components}/basic/Avatar.d.ts +5 -3
- package/dist/types/{components → src/components}/basic/Badge.d.ts +3 -3
- package/dist/types/src/components/basic/Button.d.ts +26 -0
- package/dist/types/src/components/basic/Card.d.ts +28 -0
- package/dist/types/{components → src/components}/basic/CheckRadioInput.d.ts +3 -1
- package/dist/types/src/components/basic/Container.d.ts +32 -0
- package/dist/types/src/components/basic/Drawer.d.ts +33 -0
- package/dist/types/src/components/basic/Flexbox.d.ts +25 -0
- package/dist/types/{components → src/components}/basic/GridView.d.ts +7 -5
- package/dist/types/src/components/basic/Image.d.ts +58 -0
- package/dist/types/{components → src/components}/basic/Input.d.ts +18 -10
- package/dist/types/{components → src/components}/basic/List.d.ts +11 -3
- package/dist/types/src/components/basic/Modal.d.ts +24 -0
- package/dist/types/src/components/basic/Section.d.ts +36 -0
- package/dist/types/src/components/basic/Stack.d.ts +27 -0
- package/dist/types/src/components/basic/Table.d.ts +23 -0
- package/dist/types/src/components/basic/Tabs.d.ts +47 -0
- package/dist/types/src/components/basic/Text.d.ts +26 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +17 -18
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/ui.css +1 -1
- package/dist/vite.config.js +34 -0
- package/package.json +2 -1
- package/dist/components/basic/ImageGallery.d.ts +0 -21
- package/dist/components/basic/VideoGallery.d.ts +0 -136
- package/dist/components/basic/VideoPlayer.d.ts +0 -36
- package/dist/types/components/basic/Accordation.d.ts +0 -35
- package/dist/types/components/basic/Button.d.ts +0 -28
- package/dist/types/components/basic/Card.d.ts +0 -70
- package/dist/types/components/basic/Container.d.ts +0 -30
- package/dist/types/components/basic/Drawer.d.ts +0 -24
- package/dist/types/components/basic/Flexbox.d.ts +0 -17
- package/dist/types/components/basic/Image.d.ts +0 -33
- package/dist/types/components/basic/ImageGallery.d.ts +0 -21
- package/dist/types/components/basic/Modal.d.ts +0 -11
- package/dist/types/components/basic/Table.d.ts +0 -59
- package/dist/types/components/basic/Tabs.d.ts +0 -47
- package/dist/types/components/basic/Text.d.ts +0 -39
- package/dist/types/components/basic/VideoGallery.d.ts +0 -136
- package/dist/types/components/basic/VideoPlayer.d.ts +0 -36
- /package/dist/types/{components → src/components}/avatar/AvatarGroup.d.ts +0 -0
- /package/dist/types/{components → src/components}/avatar/AvatarWithStatus.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioGallery.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioPlayer.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/DropDown.d.ts +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
/** 🎨 Utility: generate lighter/darker shades */
|
|
3
|
+
function adjustColor(color, amount) {
|
|
4
|
+
return ("#" +
|
|
5
|
+
color
|
|
6
|
+
.replace(/^#/, "")
|
|
7
|
+
.replace(/../g, (hex) => ("0" +
|
|
8
|
+
Math.min(255, Math.max(0, parseInt(hex, 16) + amount)).toString(16)).slice(-2)));
|
|
9
|
+
}
|
|
10
|
+
/** 🌈 Default color palettes */
|
|
11
|
+
const defaultColors = {
|
|
12
|
+
light: {
|
|
13
|
+
default: "#111",
|
|
14
|
+
primary: "#2563eb",
|
|
15
|
+
secondary: "#64748b",
|
|
16
|
+
success: "#16a34a",
|
|
17
|
+
danger: "#dc2626",
|
|
18
|
+
white: "#ffffff",
|
|
19
|
+
muted: "#6b7280",
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
default: "#f8fafc",
|
|
23
|
+
primary: "#60a5fa",
|
|
24
|
+
secondary: "#94a3b8",
|
|
25
|
+
success: "#22c55e",
|
|
26
|
+
danger: "#f87171",
|
|
27
|
+
white: "#ffffff",
|
|
28
|
+
muted: "#9ca3af",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
/** 💬 Main Component (HTML-only tags) */
|
|
32
|
+
export function Text({ as, children, color = "default", size = "md", weight = "normal", align = "left", transform = "none", italic = false, underline = false, strikethrough = false, truncate = false, selectable = true, hoverable = false, onClick, darkMode = false, baseColor, className = "", style = {}, ...rest }) {
|
|
33
|
+
// element type as provided (constrained to HTML tags)
|
|
34
|
+
const Element = (as || "p");
|
|
35
|
+
/** 🎨 Dynamic color palette generation */
|
|
36
|
+
const theme = useMemo(() => {
|
|
37
|
+
if (!baseColor)
|
|
38
|
+
return defaultColors[darkMode ? "dark" : "light"];
|
|
39
|
+
const lightMode = {
|
|
40
|
+
default: "#111",
|
|
41
|
+
primary: baseColor,
|
|
42
|
+
secondary: adjustColor(baseColor, -50),
|
|
43
|
+
success: adjustColor(baseColor, -30),
|
|
44
|
+
danger: "#dc2626",
|
|
45
|
+
white: "#ffffff",
|
|
46
|
+
muted: "#6b7280",
|
|
47
|
+
};
|
|
48
|
+
const darkModeTheme = {
|
|
49
|
+
default: "#f8fafc",
|
|
50
|
+
primary: adjustColor(baseColor, 80),
|
|
51
|
+
secondary: adjustColor(baseColor, 120),
|
|
52
|
+
success: adjustColor(baseColor, 100),
|
|
53
|
+
danger: "#f87171",
|
|
54
|
+
white: "#ffffff",
|
|
55
|
+
muted: "#9ca3af",
|
|
56
|
+
};
|
|
57
|
+
return darkMode ? darkModeTheme : lightMode;
|
|
58
|
+
}, [baseColor, darkMode]);
|
|
59
|
+
/** 📏 Font sizes */
|
|
60
|
+
const sizes = {
|
|
61
|
+
xs: "0.75rem",
|
|
62
|
+
sm: "0.875rem",
|
|
63
|
+
md: "1rem",
|
|
64
|
+
lg: "1.25rem",
|
|
65
|
+
xl: "1.5rem",
|
|
66
|
+
"2xl": "2rem",
|
|
67
|
+
};
|
|
68
|
+
/** 💅 Computed styles */
|
|
69
|
+
const computedStyle = {
|
|
70
|
+
color: theme[color] || color,
|
|
71
|
+
fontSize: sizes[size] || size,
|
|
72
|
+
fontWeight: weight,
|
|
73
|
+
textAlign: align,
|
|
74
|
+
textTransform: transform,
|
|
75
|
+
fontStyle: italic ? "italic" : "normal",
|
|
76
|
+
textDecoration: underline ? "underline" : strikethrough ? "line-through" : "none",
|
|
77
|
+
userSelect: selectable ? "text" : "none",
|
|
78
|
+
overflow: truncate ? "hidden" : undefined,
|
|
79
|
+
whiteSpace: truncate ? "nowrap" : undefined,
|
|
80
|
+
textOverflow: truncate ? "ellipsis" : undefined,
|
|
81
|
+
cursor: onClick ? "pointer" : "default",
|
|
82
|
+
transition: "all 0.25s ease-in-out",
|
|
83
|
+
...style,
|
|
84
|
+
};
|
|
85
|
+
/** 🧠 Hover events (narrow to HTMLElement at runtime) */
|
|
86
|
+
const handleMouseEnter = (e) => {
|
|
87
|
+
if (!hoverable)
|
|
88
|
+
return;
|
|
89
|
+
const target = e.currentTarget;
|
|
90
|
+
if (target instanceof HTMLElement) {
|
|
91
|
+
target.style.opacity = "0.8";
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const handleMouseLeave = (e) => {
|
|
95
|
+
if (!hoverable)
|
|
96
|
+
return;
|
|
97
|
+
const target = e.currentTarget;
|
|
98
|
+
if (target instanceof HTMLElement) {
|
|
99
|
+
target.style.opacity = "1";
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Build props object. We cast only once to the correct intrinsic props type.
|
|
104
|
+
* This prevents TypeScript from having to compute giant unions for event types.
|
|
105
|
+
*/
|
|
106
|
+
const props = {
|
|
107
|
+
className,
|
|
108
|
+
style: computedStyle,
|
|
109
|
+
onClick,
|
|
110
|
+
onMouseEnter: handleMouseEnter,
|
|
111
|
+
onMouseLeave: handleMouseLeave,
|
|
112
|
+
...rest,
|
|
113
|
+
};
|
|
114
|
+
// Use React.createElement to avoid JSX generic complexity
|
|
115
|
+
return React.createElement(Element, props, children);
|
|
116
|
+
}
|
|
117
|
+
export default Text;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "./style.css"; // 🔹 Global styles import (keep this as the only CSS import)
|
|
2
|
+
// ==============================
|
|
3
|
+
// ✅ BASIC COMPONENT EXPORTS
|
|
4
|
+
// ==============================
|
|
5
|
+
// Alerts & Notifications
|
|
6
|
+
export { Alert } from "./components/basic/Alert"; // ✅ Finalized
|
|
7
|
+
// Accordions
|
|
8
|
+
export { Accordion } from "./components/basic/Accordation"; // ✅ Finalized
|
|
9
|
+
// Avatars
|
|
10
|
+
export { Avatar, AvatarGroup } from "./components/basic/Avatar"; // ✅ Finalized
|
|
11
|
+
// Audio Components
|
|
12
|
+
export { AudioPlayer } from "./components/basic/AudioPlayer"; // ✅ Finalized
|
|
13
|
+
export { AudioGallery } from "./components/basic/AudioGallery"; // ✅ Finalized
|
|
14
|
+
// Badges
|
|
15
|
+
export { Badge } from "./components/basic/Badge"; // ✅ Finalized
|
|
16
|
+
// Buttons
|
|
17
|
+
export { Button } from "./components/basic/Button"; // ✅ Finalized
|
|
18
|
+
// Cards
|
|
19
|
+
export { Card } from "./components/basic/Card"; // ✅ Finalized
|
|
20
|
+
// Checkboxes & Radios
|
|
21
|
+
export { CheckRadio } from "./components/basic/CheckRadioInput"; // ✅ Finalized
|
|
22
|
+
// Containers & Layout
|
|
23
|
+
export { Container } from "./components/basic/Container"; // ✅ Finalized
|
|
24
|
+
export { Flexbox } from "./components/basic/Flexbox"; // ✅ Finalized
|
|
25
|
+
export { Stack, HStack, VStack } from "./components/basic/Stack"; // ✅ Finalized
|
|
26
|
+
export { GridView } from "./components/basic/GridView"; // ✅ Finalized
|
|
27
|
+
// Drawers
|
|
28
|
+
export { Drawer, DrawerButton } from "./components/basic/Drawer"; // ✅ Finalized
|
|
29
|
+
// Dropdowns
|
|
30
|
+
export { Dropdown } from "./components/basic/DropDown"; // ✅ Finalized
|
|
31
|
+
// Forms & Inputs
|
|
32
|
+
export { Input } from "./components/basic/Input"; // ✅ Finalized
|
|
33
|
+
// Images
|
|
34
|
+
export { Image } from "./components/basic/Image"; // ✅ Finalized
|
|
35
|
+
// Lists
|
|
36
|
+
export { List } from "./components/basic/List"; // ✅ Finalized
|
|
37
|
+
// Modals
|
|
38
|
+
export { Modal } from "./components/basic/Modal"; // ✅ Finalized
|
|
39
|
+
// Tables
|
|
40
|
+
export { Table, TBody, TD, THead, TH, TRow } from "./components/basic/Table"; // ✅ Finalized
|
|
41
|
+
// Tabs
|
|
42
|
+
export { Tabs } from "./components/basic/Tabs"; // ✅ Finalized
|
|
43
|
+
// Text
|
|
44
|
+
export { Text } from "./components/basic/Text"; // ✅ Finalized
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AccordionItem {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface AccordionProps {
|
|
7
|
+
items: AccordionItem[];
|
|
8
|
+
/** Allow multiple open items */
|
|
9
|
+
allowMultiple?: boolean;
|
|
10
|
+
/** Default open indexes */
|
|
11
|
+
defaultOpen?: number[];
|
|
12
|
+
/** Appearance */
|
|
13
|
+
borderColor?: string;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
hoverBgColor?: string;
|
|
17
|
+
hoverTextColor?: string;
|
|
18
|
+
contentBgColor?: string;
|
|
19
|
+
contentTextColor?: string;
|
|
20
|
+
/** Layout & spacing */
|
|
21
|
+
paddingY?: string | number;
|
|
22
|
+
paddingX?: string | number;
|
|
23
|
+
marginY?: string | number;
|
|
24
|
+
borderRadius?: string | number;
|
|
25
|
+
contentPadding?: string | number;
|
|
26
|
+
/** Typography */
|
|
27
|
+
fontSize?: string | number;
|
|
28
|
+
fontWeight?: string | number;
|
|
29
|
+
contentFontSize?: string | number;
|
|
30
|
+
contentFontWeight?: string | number;
|
|
31
|
+
/** Icon customization */
|
|
32
|
+
iconOpen?: React.ReactNode;
|
|
33
|
+
iconClose?: React.ReactNode;
|
|
34
|
+
iconSize?: string | number;
|
|
35
|
+
/** Motion & style */
|
|
36
|
+
transitionDuration?: string;
|
|
37
|
+
shadow?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: React.CSSProperties;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 🧠 Industry-standard, minimal, and fully customizable Accordion
|
|
43
|
+
*/
|
|
44
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type AlertType = "success" | "error" | "warning" | "info";
|
|
3
3
|
type AlertPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
4
|
-
interface AlertProps {
|
|
4
|
+
export interface AlertProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
type?: AlertType;
|
|
8
8
|
dismissible?: boolean;
|
|
9
|
-
onClose?: () => void;
|
|
10
9
|
duration?: number;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/** Customization */
|
|
11
12
|
icon?: React.ReactNode;
|
|
12
13
|
actionButton?: React.ReactNode;
|
|
13
14
|
position?: AlertPosition;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
borderRadius?: string | number;
|
|
19
|
+
shadow?: string;
|
|
20
|
+
padding?: string | number;
|
|
21
|
+
fontSize?: string | number;
|
|
22
|
+
fontWeight?: number | string;
|
|
23
|
+
descriptionColor?: string;
|
|
24
|
+
animationDuration?: string;
|
|
25
|
+
maxWidth?: string;
|
|
14
26
|
className?: string;
|
|
15
27
|
style?: React.CSSProperties;
|
|
16
28
|
}
|
|
29
|
+
/** 🎯 Production-grade Alert Component */
|
|
17
30
|
export declare const Alert: React.FC<AlertProps>;
|
|
18
31
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "responsive";
|
|
3
|
+
type AvatarVariant = "circular" | "rounded" | "square";
|
|
2
4
|
interface AvatarProps {
|
|
3
5
|
src?: string;
|
|
4
6
|
alt?: string;
|
|
5
|
-
size?:
|
|
6
|
-
variant?:
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
variant?: AvatarVariant;
|
|
7
9
|
isOnline?: boolean;
|
|
8
10
|
isOffline?: boolean;
|
|
9
11
|
className?: string;
|
|
@@ -19,7 +21,7 @@ interface AvatarProps {
|
|
|
19
21
|
interface AvatarGroupProps {
|
|
20
22
|
avatars: AvatarProps[];
|
|
21
23
|
max?: number;
|
|
22
|
-
size?:
|
|
24
|
+
size?: AvatarSize;
|
|
23
25
|
className?: string;
|
|
24
26
|
style?: React.CSSProperties;
|
|
25
27
|
spacing?: "tight" | "normal" | "loose";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
-
interface BadgeProps {
|
|
2
|
+
export interface BadgeProps {
|
|
3
3
|
text?: string;
|
|
4
4
|
color?: string;
|
|
5
5
|
textColor?: string;
|
|
6
6
|
borderColor?: string;
|
|
7
|
+
borderWidth?: string;
|
|
7
8
|
icon?: ReactNode;
|
|
8
9
|
iconPosition?: "left" | "right";
|
|
9
10
|
rounded?: boolean;
|
|
10
11
|
borderRadius?: string;
|
|
11
|
-
borderWidth?: string;
|
|
12
12
|
fontSize?: string;
|
|
13
13
|
fontWeight?: number | string;
|
|
14
14
|
horizontalPadding?: string;
|
|
@@ -20,7 +20,7 @@ interface BadgeProps {
|
|
|
20
20
|
count?: number | string;
|
|
21
21
|
pulse?: boolean;
|
|
22
22
|
style?: CSSProperties;
|
|
23
|
+
className?: string;
|
|
23
24
|
onClick?: () => void;
|
|
24
25
|
}
|
|
25
26
|
export declare const Badge: React.FC<BadgeProps>;
|
|
26
|
-
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { CSSProperties, FC } from "react";
|
|
2
|
+
/** ⚙️ Props */
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
type?: "button" | "submit" | "reset";
|
|
6
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
7
|
+
iconBefore?: React.ReactNode;
|
|
8
|
+
iconAfter?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
/** 🎨 Theme options */
|
|
16
|
+
darkMode?: boolean;
|
|
17
|
+
baseColor?: string;
|
|
18
|
+
/** 🧩 Optional design tweaks */
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
rounded?: boolean;
|
|
21
|
+
/** 🧱 Border visibility */
|
|
22
|
+
showBorder?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** 💎 Minimal customizable Button */
|
|
25
|
+
export declare const Button: FC<ButtonProps>;
|
|
26
|
+
export default Button;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode, ElementType, ForwardedRef, ReactElement, ComponentPropsWithoutRef } from "react";
|
|
2
|
+
type CardVariant = "elevated" | "outline" | "flat";
|
|
3
|
+
type CardOwnProps = {
|
|
4
|
+
as?: ElementType;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
variant?: CardVariant;
|
|
8
|
+
background?: string;
|
|
9
|
+
textColor?: string;
|
|
10
|
+
borderRadius?: string | number;
|
|
11
|
+
border?: string;
|
|
12
|
+
boxShadow?: string;
|
|
13
|
+
hoverShadow?: string;
|
|
14
|
+
padding?: string | number;
|
|
15
|
+
margin?: string | number;
|
|
16
|
+
width?: string | number;
|
|
17
|
+
height?: string | number;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
hoverStyle?: CSSProperties;
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
};
|
|
22
|
+
type CardProps<T extends ElementType = "div"> = CardOwnProps & Omit<ComponentPropsWithoutRef<T>, keyof CardOwnProps>;
|
|
23
|
+
declare const Card: (<T extends ElementType = "div">(props: CardProps<T> & {
|
|
24
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
25
|
+
}) => ReactElement) & {
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
export { Card };
|
|
@@ -3,8 +3,9 @@ interface Option {
|
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}
|
|
6
|
+
type CheckRadioType = "checkbox" | "radio" | "switch";
|
|
6
7
|
interface CheckRadioProps {
|
|
7
|
-
type
|
|
8
|
+
type?: CheckRadioType;
|
|
8
9
|
name?: string;
|
|
9
10
|
options: Option[];
|
|
10
11
|
selectedValues?: string[] | string;
|
|
@@ -20,6 +21,7 @@ interface CheckRadioProps {
|
|
|
20
21
|
iconSize?: number;
|
|
21
22
|
iconCheckedBgColor?: string;
|
|
22
23
|
iconUncheckedBorderColor?: string;
|
|
24
|
+
switchBgColor?: string;
|
|
23
25
|
textColor?: string;
|
|
24
26
|
errorStyle?: React.CSSProperties;
|
|
25
27
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ContainerSize = "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
3
|
+
export interface ContainerProps {
|
|
4
|
+
/** Predefined max-width based on common breakpoints */
|
|
5
|
+
size?: ContainerSize;
|
|
6
|
+
/** Padding (accepts number in px or CSS string, e.g., '2rem') */
|
|
7
|
+
padding?: number | string;
|
|
8
|
+
/** Margin (accepts number in px or CSS string, e.g., 'auto' or '16px 8px') */
|
|
9
|
+
margin?: number | string;
|
|
10
|
+
/** Background color (any valid CSS color) */
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
/** Center the container horizontally (adds `margin: 0 auto`) */
|
|
13
|
+
center?: boolean;
|
|
14
|
+
/** Custom width override (defaults to container max width) */
|
|
15
|
+
width?: string;
|
|
16
|
+
/** Optional height */
|
|
17
|
+
height?: string;
|
|
18
|
+
/** Border radius (accepts number in px or CSS string) */
|
|
19
|
+
borderRadius?: number | string;
|
|
20
|
+
/** Additional inline styles */
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
/** Tailwind or custom class names */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Container content */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 🧱 Container Component
|
|
29
|
+
* A flexible, responsive layout wrapper inspired by Tailwind's container.
|
|
30
|
+
*/
|
|
31
|
+
export declare const Container: React.FC<ContainerProps>;
|
|
32
|
+
export default Container;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
+
export interface DrawerButtonProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
iconPosition?: "left" | "right";
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
color?: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
borderRadius?: string;
|
|
10
|
+
padding?: string;
|
|
11
|
+
fontSize?: string;
|
|
12
|
+
gap?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const DrawerButton: React.FC<DrawerButtonProps>;
|
|
17
|
+
export interface DrawerProps {
|
|
18
|
+
open: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
21
|
+
width?: string;
|
|
22
|
+
height?: string;
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
backdropColor?: string;
|
|
25
|
+
transitionDuration?: number;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
className?: string;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
showCloseButton?: boolean;
|
|
30
|
+
closeIconColor?: string;
|
|
31
|
+
closeButtonStyle?: CSSProperties;
|
|
32
|
+
}
|
|
33
|
+
export declare const Drawer: React.FC<DrawerProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ScreenSize = "sm" | "md" | "lg";
|
|
3
|
+
type ResponsiveValue<T> = T | Partial<Record<ScreenSize, T>>;
|
|
4
|
+
interface FlexboxProps {
|
|
5
|
+
direction?: ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
6
|
+
align?: ResponsiveValue<"flex-start" | "flex-end" | "center" | "stretch" | "baseline">;
|
|
7
|
+
justify?: ResponsiveValue<"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly">;
|
|
8
|
+
wrap?: ResponsiveValue<"nowrap" | "wrap" | "wrap-reverse">;
|
|
9
|
+
gap?: ResponsiveValue<number | string>;
|
|
10
|
+
padding?: ResponsiveValue<number | string>;
|
|
11
|
+
margin?: ResponsiveValue<number | string>;
|
|
12
|
+
backgroundColor?: ResponsiveValue<string>;
|
|
13
|
+
width?: ResponsiveValue<string>;
|
|
14
|
+
maxWidth?: ResponsiveValue<string>;
|
|
15
|
+
height?: ResponsiveValue<string>;
|
|
16
|
+
borderRadius?: ResponsiveValue<string>;
|
|
17
|
+
border?: ResponsiveValue<string>;
|
|
18
|
+
boxShadow?: ResponsiveValue<string>;
|
|
19
|
+
overflow?: ResponsiveValue<"visible" | "hidden" | "auto" | "scroll">;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Flexbox: React.FC<FlexboxProps>;
|
|
25
|
+
export {};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type ScreenSize = "sm" | "md" | "lg";
|
|
3
|
-
interface
|
|
3
|
+
export interface GridProps {
|
|
4
4
|
columns?: number | Partial<Record<ScreenSize, number>>;
|
|
5
|
-
gap?: string;
|
|
6
|
-
padding?: string;
|
|
5
|
+
gap?: number | string;
|
|
6
|
+
padding?: number | string;
|
|
7
7
|
alignItems?: "start" | "center" | "end" | "stretch";
|
|
8
8
|
justifyItems?: "start" | "center" | "end" | "stretch";
|
|
9
9
|
backgroundColor?: string;
|
|
10
10
|
width?: string;
|
|
11
11
|
maxWidth?: string;
|
|
12
12
|
height?: string;
|
|
13
|
-
|
|
13
|
+
margin?: number | string;
|
|
14
14
|
style?: React.CSSProperties;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: React.ReactNode;
|
|
15
17
|
}
|
|
16
|
-
export declare const GridView: React.FC<
|
|
18
|
+
export declare const GridView: React.FC<GridProps>;
|
|
17
19
|
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ImageProps {
|
|
3
|
+
/** Image source URL */
|
|
4
|
+
src?: string;
|
|
5
|
+
/** Alternative text (for SEO + accessibility) */
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** Optional title attribute (SEO hint tooltip) */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Custom width and height */
|
|
10
|
+
width?: string | number;
|
|
11
|
+
height?: string | number;
|
|
12
|
+
/** Border customization */
|
|
13
|
+
borderRadius?: string | number;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
borderStyle?: "solid" | "dashed" | "dotted" | "double" | "none";
|
|
16
|
+
borderWidth?: string | number;
|
|
17
|
+
/** Shadow customization */
|
|
18
|
+
shadow?: boolean;
|
|
19
|
+
boxShadow?: string;
|
|
20
|
+
/** Opacity and fit options */
|
|
21
|
+
opacity?: number;
|
|
22
|
+
objectFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
23
|
+
/** Overlay and icon layers */
|
|
24
|
+
overlayText?: string;
|
|
25
|
+
overlayColor?: string;
|
|
26
|
+
svgIcon?: React.ReactNode;
|
|
27
|
+
/** Layout and responsiveness */
|
|
28
|
+
responsive?: boolean;
|
|
29
|
+
padding?: string | number;
|
|
30
|
+
margin?: string | number;
|
|
31
|
+
/** Performance */
|
|
32
|
+
lazyLoad?: boolean;
|
|
33
|
+
/** Hover interactivity */
|
|
34
|
+
hoverOpacity?: number;
|
|
35
|
+
hoverShadow?: boolean;
|
|
36
|
+
hoverScale?: number;
|
|
37
|
+
hoverRotate?: number;
|
|
38
|
+
transitionDuration?: string;
|
|
39
|
+
/** Overflow handling */
|
|
40
|
+
overflow?: "hidden" | "scroll" | "auto" | "visible" | "x" | "y";
|
|
41
|
+
/** Class and style overrides */
|
|
42
|
+
className?: string;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
/** Event handlers */
|
|
45
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLImageElement>) => void;
|
|
46
|
+
onLoad?: () => void;
|
|
47
|
+
onError?: () => void;
|
|
48
|
+
}
|
|
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
|
+
export declare const Image: React.FC<ImageProps>;
|
|
58
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
|
-
interface InputProps {
|
|
2
|
+
export interface InputProps {
|
|
3
3
|
type?: "text" | "password" | "email" | "number" | "search" | "tel" | "url" | "textarea";
|
|
4
|
-
placeholder?: string;
|
|
5
4
|
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
6
|
name?: string;
|
|
7
7
|
value?: string;
|
|
8
8
|
defaultValue?: string;
|
|
@@ -15,24 +15,32 @@ interface InputProps {
|
|
|
15
15
|
autoFocus?: boolean;
|
|
16
16
|
iconLeft?: React.ReactNode;
|
|
17
17
|
iconRight?: React.ReactNode;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
/** 🎨 Full Customization Options */
|
|
19
|
+
labelColor?: string;
|
|
20
|
+
placeholderColor?: string;
|
|
21
21
|
backgroundColor?: string;
|
|
22
22
|
textColor?: string;
|
|
23
|
+
borderColor?: string;
|
|
24
|
+
hoverBorderColor?: string;
|
|
25
|
+
focusBorderColor?: string;
|
|
23
26
|
errorColor?: string;
|
|
24
27
|
successColor?: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
iconColor?: string;
|
|
29
|
+
shadow?: string;
|
|
30
|
+
/** 🧩 Layout + Style Customization */
|
|
28
31
|
fontSize?: string;
|
|
32
|
+
fontFamily?: string;
|
|
33
|
+
radius?: string;
|
|
34
|
+
size?: "sm" | "md" | "lg";
|
|
29
35
|
rows?: number;
|
|
30
36
|
cols?: number;
|
|
31
37
|
maxLength?: number;
|
|
32
38
|
resize?: boolean;
|
|
33
39
|
showCharacterCount?: boolean;
|
|
40
|
+
paddingX?: string;
|
|
41
|
+
paddingY?: string;
|
|
42
|
+
/** 🧱 External customization */
|
|
34
43
|
className?: string;
|
|
35
44
|
style?: CSSProperties;
|
|
36
45
|
}
|
|
37
|
-
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<
|
|
38
|
-
export {};
|
|
46
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
-
interface ListItemType {
|
|
2
|
+
export interface ListItemType {
|
|
3
3
|
text: string;
|
|
4
4
|
icon?: ReactNode;
|
|
5
5
|
onClick?: () => void;
|
|
6
6
|
subItems?: ListItemType[];
|
|
7
7
|
}
|
|
8
|
-
interface ListProps {
|
|
8
|
+
export interface ListProps {
|
|
9
9
|
title?: string;
|
|
10
10
|
titleIcon?: ReactNode;
|
|
11
11
|
items: ListItemType[];
|
|
@@ -22,5 +22,13 @@ interface ListProps {
|
|
|
22
22
|
className?: string;
|
|
23
23
|
style?: CSSProperties;
|
|
24
24
|
}
|
|
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>;
|
|
25
34
|
export declare const List: React.FC<ListProps>;
|
|
26
|
-
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ReactNode, CSSProperties } from "react";
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
/** Controls whether the modal is visible */
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
/** Callback fired when modal requests to close */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Modal content */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Optional ARIA label for accessibility */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
/** Optional title for screen readers */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Custom styles */
|
|
14
|
+
overlayStyle?: CSSProperties;
|
|
15
|
+
modalStyle?: CSSProperties;
|
|
16
|
+
closeButtonStyle?: CSSProperties;
|
|
17
|
+
/** Enable/disable overlay click to close */
|
|
18
|
+
disableOverlayClose?: boolean;
|
|
19
|
+
/** Animation duration (ms) */
|
|
20
|
+
transitionDuration?: number;
|
|
21
|
+
/** Optional classNames for CSS frameworks like Tailwind */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Modal: React.FC<ModalProps>;
|