cyberui-2045 1.3.0 → 1.3.2
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 +11 -4
- package/dist/components/Badge.d.ts +14 -0
- package/dist/components/Button.d.ts +9 -0
- package/dist/components/Card.d.ts +12 -0
- package/dist/components/Carousel.d.ts +71 -0
- package/dist/components/CircularProgress.d.ts +10 -0
- package/dist/components/Image.d.ts +73 -0
- package/dist/components/Input.d.ts +13 -0
- package/dist/components/LinearProgress.d.ts +9 -0
- package/dist/components/Modal.d.ts +34 -0
- package/dist/components/Notification.d.ts +11 -0
- package/dist/components/SegmentedProgress.d.ts +8 -0
- package/dist/components/Select.d.ts +19 -0
- package/dist/components/Skeleton.d.ts +13 -0
- package/dist/components/TabNavigation.d.ts +22 -0
- package/dist/components/Toggle.d.ts +12 -0
- package/dist/components/index.d.ts +42 -0
- package/dist/components/tabs/ElementsTab.d.ts +3 -0
- package/dist/components/tabs/FeedbackTab.d.ts +3 -0
- package/dist/components/tabs/HomeTab.d.ts +3 -0
- package/dist/components/tabs/InteractiveTab.d.ts +3 -0
- package/dist/contexts/NotificationContext.d.ts +7 -0
- package/dist/contexts/NotificationContextBase.d.ts +19 -0
- package/dist/cyberui-2045.css +1 -0
- package/dist/hooks/useAnimatedProgress.d.ts +7 -0
- package/dist/hooks/useCyberNotifications.d.ts +2 -0
- package/dist/hooks/useCyberScrollbar.d.ts +29 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +1506 -1217
- package/dist/index.js +33 -29
- package/dist/utils/responsive.d.ts +78 -0
- package/package.json +21 -12
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# CyberUI
|
|
1
|
+
# CyberUI
|
|
2
2
|
|
|
3
3
|
A cyberpunk-themed React UI library with neon-styled components and futuristic aesthetics.
|
|
4
4
|
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 🌐 Demo & Documentation
|
|
8
8
|
|
|
9
9
|
- 🔗 **[Live Demo](https://patrickkuei.github.io/CyberUI)** - Experience the cyberpunk theme in action
|
|
10
10
|
- 📚 **[Storybook Documentation](https://patrickkuei.github.io/CyberUI/storybook)** - Interactive component documentation
|
|
@@ -15,9 +15,12 @@ A cyberpunk-themed React UI library with neon-styled components and futuristic a
|
|
|
15
15
|
npm install cyberui-2045
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
Import the core stylesheet and components
|
|
19
|
+
|
|
18
20
|
```tsx
|
|
19
|
-
import React from
|
|
20
|
-
import
|
|
21
|
+
import React from "react";
|
|
22
|
+
import "cyberui-2045/styles.css";
|
|
23
|
+
import { CircularProgress, Notification } from "cyberui-2045";
|
|
21
24
|
|
|
22
25
|
function App() {
|
|
23
26
|
return (
|
|
@@ -36,6 +39,10 @@ function App() {
|
|
|
36
39
|
}
|
|
37
40
|
```
|
|
38
41
|
|
|
42
|
+
## Changelog
|
|
43
|
+
|
|
44
|
+
See the full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
45
|
+
|
|
39
46
|
## 🛠️ Development
|
|
40
47
|
|
|
41
48
|
```bash
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface BadgeProps {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning';
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
leftIcon?: React.ReactNode;
|
|
9
|
+
rightIcon?: React.ReactNode;
|
|
10
|
+
clickable?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const Badge: React.FC<BadgeProps>;
|
|
14
|
+
export default Badge;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Button: React.FC<ButtonProps>;
|
|
9
|
+
export default Button;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
variant?: 'default' | 'accent' | 'small';
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
title?: string;
|
|
7
|
+
titleBorder?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Card: React.FC<CardProps>;
|
|
12
|
+
export default Card;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
/**
|
|
4
|
+
* Size options for the Carousel component
|
|
5
|
+
*/
|
|
6
|
+
export type CarouselSize = "sm" | "md" | "lg";
|
|
7
|
+
/**
|
|
8
|
+
* Transition effects for the Carousel
|
|
9
|
+
*/
|
|
10
|
+
export type CarouselTransition = "slide" | "fade" | "matrix" | "signal-glitch";
|
|
11
|
+
/**
|
|
12
|
+
* Object fit options for images
|
|
13
|
+
*/
|
|
14
|
+
export type CarouselObjectFit = "cover" | "contain";
|
|
15
|
+
/**
|
|
16
|
+
* Image data structure for Carousel
|
|
17
|
+
*/
|
|
18
|
+
export interface CarouselImageData {
|
|
19
|
+
/** Image source URL */
|
|
20
|
+
src: string;
|
|
21
|
+
/** Alt text for accessibility */
|
|
22
|
+
alt: string;
|
|
23
|
+
/** Optional fallback image URL */
|
|
24
|
+
fallbackSrc?: string;
|
|
25
|
+
/** Optional caption */
|
|
26
|
+
caption?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Lifecycle callback functions for Carousel events
|
|
30
|
+
*/
|
|
31
|
+
export interface CarouselCallbacks {
|
|
32
|
+
/** Fired before slide change (fromIndex, toIndex) */
|
|
33
|
+
onBeforeChange?: (fromIndex: number, toIndex: number) => void;
|
|
34
|
+
/** Fired after slide change */
|
|
35
|
+
onAfterChange?: (index: number) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Props for the CyberUI Carousel component
|
|
39
|
+
*/
|
|
40
|
+
export interface CarouselProps extends CarouselCallbacks {
|
|
41
|
+
/** Array of images to display */
|
|
42
|
+
images: CarouselImageData[];
|
|
43
|
+
/** Current slide index (controlled) */
|
|
44
|
+
currentIndex: number;
|
|
45
|
+
/** Callback when slide changes */
|
|
46
|
+
onChange: (index: number) => void;
|
|
47
|
+
/** Size variant with responsive support */
|
|
48
|
+
size?: ResponsiveValue<CarouselSize>;
|
|
49
|
+
/** Enable auto-play functionality */
|
|
50
|
+
autoPlay?: boolean;
|
|
51
|
+
/** Auto-play interval in milliseconds */
|
|
52
|
+
interval?: number;
|
|
53
|
+
/** Enable infinite loop */
|
|
54
|
+
infinite?: boolean;
|
|
55
|
+
/** Transition effect */
|
|
56
|
+
transition?: CarouselTransition;
|
|
57
|
+
/** Image object fit behavior */
|
|
58
|
+
objectFit?: CarouselObjectFit;
|
|
59
|
+
/** Show navigation arrows */
|
|
60
|
+
showArrows?: boolean;
|
|
61
|
+
/** Show slide indicators */
|
|
62
|
+
showIndicators?: boolean;
|
|
63
|
+
/** Additional CSS classes */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Disable click-to-expand on images */
|
|
66
|
+
disableImagePreview?: boolean;
|
|
67
|
+
/** Control signal-glitch effect frequency. Float (0.0-1.0) for probability, boolean for on/off */
|
|
68
|
+
glitchRate?: number | boolean;
|
|
69
|
+
}
|
|
70
|
+
declare const _default: React.NamedExoticComponent<CarouselProps>;
|
|
71
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CircularProgressProps {
|
|
3
|
+
progress: number;
|
|
4
|
+
radius: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CircularProgress: React.FC<CircularProgressProps>;
|
|
10
|
+
export default CircularProgress;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
/**
|
|
4
|
+
* Size options for the Image component
|
|
5
|
+
*/
|
|
6
|
+
export type ImageSize = "sm" | "md" | "lg";
|
|
7
|
+
/**
|
|
8
|
+
* Animation configuration for preview transitions
|
|
9
|
+
*/
|
|
10
|
+
export interface ImageAnimationConfig {
|
|
11
|
+
/** Duration of opening animation in milliseconds */
|
|
12
|
+
openDuration?: number;
|
|
13
|
+
/** Duration of closing animation in milliseconds */
|
|
14
|
+
closeDuration?: number;
|
|
15
|
+
/** Enable/disable cyberpunk effects */
|
|
16
|
+
cyberpunkEffects?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Callback functions for Image component events
|
|
20
|
+
*/
|
|
21
|
+
export interface ImageCallbacks {
|
|
22
|
+
/** Fired when preview opens */
|
|
23
|
+
onPreviewOpen?: () => void;
|
|
24
|
+
/** Fired when preview closes */
|
|
25
|
+
onPreviewClose?: () => void;
|
|
26
|
+
/** Fired when image loads successfully */
|
|
27
|
+
onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
28
|
+
/** Fired when image fails to load */
|
|
29
|
+
onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Props for the CyberUI Image component
|
|
33
|
+
*/
|
|
34
|
+
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "size" | "onLoad" | "onError">, ImageCallbacks {
|
|
35
|
+
/** Image source URL (required) */
|
|
36
|
+
src: string;
|
|
37
|
+
/** Alternative text for accessibility (required) */
|
|
38
|
+
alt: string;
|
|
39
|
+
/** Size of the image container */
|
|
40
|
+
size?: ResponsiveValue<ImageSize>;
|
|
41
|
+
/** Enable click-to-expand preview functionality */
|
|
42
|
+
preview?: boolean;
|
|
43
|
+
/** Fallback image URL when main image fails to load */
|
|
44
|
+
fallback?: string;
|
|
45
|
+
/** Custom loading placeholder component */
|
|
46
|
+
placeholder?: React.ReactNode;
|
|
47
|
+
/** Additional CSS classes */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Animation configuration */
|
|
50
|
+
animation?: ImageAnimationConfig;
|
|
51
|
+
/** Disable lazy loading (images load immediately) */
|
|
52
|
+
eager?: boolean;
|
|
53
|
+
/** Custom preview container styles */
|
|
54
|
+
previewClassName?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* CyberUI Image Component
|
|
58
|
+
*
|
|
59
|
+
* A cyberpunk-themed image component with click-to-expand preview functionality,
|
|
60
|
+
* loading states, error handling, and smooth animations.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <Image
|
|
65
|
+
* src="/cyber-city.jpg"
|
|
66
|
+
* alt="Cyberpunk cityscape"
|
|
67
|
+
* size="lg"
|
|
68
|
+
* onPreviewOpen={() => console.log('Preview opened')}
|
|
69
|
+
* />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
declare const Image: React.FC<ImageProps>;
|
|
73
|
+
export default Image;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
leftIcon?: React.ReactNode;
|
|
10
|
+
rightIcon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Input: React.FC<InputProps>;
|
|
13
|
+
export default Input;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface LinearProgressProps {
|
|
4
|
+
progress: number;
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const LinearProgress: React.FC<LinearProgressProps>;
|
|
9
|
+
export default LinearProgress;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModalAnimationConfig {
|
|
3
|
+
openDuration?: number;
|
|
4
|
+
closeDuration?: number;
|
|
5
|
+
crtEffects?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ModalCallbacks {
|
|
8
|
+
onOpen?: () => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onCRTBootComplete?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface ModalProps extends ModalCallbacks {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
title?: string;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
footer?: React.ReactNode;
|
|
18
|
+
onCancel?: () => void;
|
|
19
|
+
onConfirm?: () => void;
|
|
20
|
+
cancelText?: string;
|
|
21
|
+
confirmText?: string;
|
|
22
|
+
confirmLoading?: boolean;
|
|
23
|
+
showCancel?: boolean;
|
|
24
|
+
showConfirm?: boolean;
|
|
25
|
+
size?: "sm" | "md" | "lg" | "xl" | "fullscreen";
|
|
26
|
+
closeOnOverlayClick?: boolean;
|
|
27
|
+
closeOnEscape?: boolean;
|
|
28
|
+
animation?: ModalAnimationConfig;
|
|
29
|
+
className?: string;
|
|
30
|
+
overlayClassName?: string;
|
|
31
|
+
showCloseButton?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare const Modal: React.FC<ModalProps>;
|
|
34
|
+
export default Modal;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface NotificationProps {
|
|
4
|
+
type: 'success' | 'warning' | 'error';
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const Notification: React.FC<NotificationProps>;
|
|
11
|
+
export default Notification;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SegmentedProgressProps {
|
|
3
|
+
progress: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const SegmentedProgress: React.FC<SegmentedProgressProps>;
|
|
8
|
+
export default SegmentedProgress;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
9
|
+
label?: string;
|
|
10
|
+
size?: ResponsiveValue<"sm" | "md" | "lg">;
|
|
11
|
+
variant?: "primary" | "secondary" | "danger" | "ghost";
|
|
12
|
+
options: SelectOption[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
helperText?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const Select: React.FC<SelectProps>;
|
|
19
|
+
export default Select;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface SkeletonProps {
|
|
4
|
+
variant?: "text" | "circular" | "rectangular" | "card" | "avatar-text" | "button-group";
|
|
5
|
+
size?: ResponsiveValue<"sm" | "md" | "lg">;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
className?: string;
|
|
9
|
+
lines?: number;
|
|
10
|
+
animate?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Skeleton: React.FC<SkeletonProps>;
|
|
13
|
+
export default Skeleton;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export type TabNavigationMode = "scroll" | "wrap" | "dropdown" | "collapsible";
|
|
4
|
+
export interface TabNavigationProps {
|
|
5
|
+
tabs: readonly string[];
|
|
6
|
+
activeTab: string;
|
|
7
|
+
onTabChange: (tab: string) => void;
|
|
8
|
+
size?: ResponsiveValue<"sm" | "md" | "lg">;
|
|
9
|
+
mode?: ResponsiveValue<TabNavigationMode>;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
tabsClassName?: string;
|
|
12
|
+
dropdownLabel?: React.ReactNode;
|
|
13
|
+
anchorIcon?: React.ReactNode;
|
|
14
|
+
showAnchorLabel?: boolean;
|
|
15
|
+
anchorAriaLabel?: string;
|
|
16
|
+
closeOnSelect?: boolean;
|
|
17
|
+
anchorClassName?: string;
|
|
18
|
+
menuClassName?: string;
|
|
19
|
+
menuItemClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const TabNavigation: React.FC<TabNavigationProps>;
|
|
22
|
+
export default TabNavigation;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ResponsiveValue } from '../utils/responsive';
|
|
3
|
+
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
|
|
6
|
+
variant?: 'primary' | 'secondary' | 'accent';
|
|
7
|
+
className?: string;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
onChange?: (checked: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Toggle: React.FC<ToggleProps>;
|
|
12
|
+
export default Toggle;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export { default as HomeTab } from './tabs/HomeTab';
|
|
2
|
+
export { default as InteractiveTab } from './tabs/InteractiveTab';
|
|
3
|
+
export { default as ElementsTab } from './tabs/ElementsTab';
|
|
4
|
+
export { default as FeedbackTab } from './tabs/FeedbackTab';
|
|
5
|
+
export { default as TabNavigation } from './TabNavigation';
|
|
6
|
+
export { default as CircularProgress } from './CircularProgress';
|
|
7
|
+
export { default as SegmentedProgress } from './SegmentedProgress';
|
|
8
|
+
export { default as LinearProgress } from './LinearProgress';
|
|
9
|
+
export { default as Notification } from './Notification';
|
|
10
|
+
export { default as Button } from './Button';
|
|
11
|
+
export { default as Input } from './Input';
|
|
12
|
+
export { default as Card } from './Card';
|
|
13
|
+
export { default as Badge } from './Badge';
|
|
14
|
+
export { default as Toggle } from './Toggle';
|
|
15
|
+
export { default as Select } from './Select';
|
|
16
|
+
export { default as Skeleton } from './Skeleton';
|
|
17
|
+
export { default as Image } from './Image';
|
|
18
|
+
export { default as Carousel } from './Carousel';
|
|
19
|
+
export { default as Modal } from './Modal';
|
|
20
|
+
export type { CircularProgressProps } from './CircularProgress';
|
|
21
|
+
export type { NotificationProps } from './Notification';
|
|
22
|
+
export type { SegmentedProgressProps } from './SegmentedProgress';
|
|
23
|
+
export type { LinearProgressProps } from './LinearProgress';
|
|
24
|
+
export type { TabNavigationProps } from './TabNavigation';
|
|
25
|
+
export type { ButtonProps } from './Button';
|
|
26
|
+
export type { InputProps } from './Input';
|
|
27
|
+
export type { CardProps } from './Card';
|
|
28
|
+
export type { BadgeProps } from './Badge';
|
|
29
|
+
export type { ToggleProps } from './Toggle';
|
|
30
|
+
export type { SelectProps, SelectOption } from './Select';
|
|
31
|
+
export type { SkeletonProps } from './Skeleton';
|
|
32
|
+
export type { ImageProps } from './Image';
|
|
33
|
+
export type { CarouselProps, CarouselImageData } from './Carousel';
|
|
34
|
+
export type { ModalProps, ModalAnimationConfig, ModalCallbacks } from './Modal';
|
|
35
|
+
export type { ResponsiveValue, Breakpoint } from '../utils/responsive';
|
|
36
|
+
export { getResponsiveClasses, combineResponsiveClasses, RESPONSIVE_SIZE_MAPS } from '../utils/responsive';
|
|
37
|
+
export { useCyberScrollbar } from '../hooks/useCyberScrollbar';
|
|
38
|
+
export type { UseCyberScrollbarOptions } from '../hooks/useCyberScrollbar';
|
|
39
|
+
export { useCyberNotifications } from '../hooks/useCyberNotifications';
|
|
40
|
+
export type { CyberNotification, NotificationOptions } from '../hooks/useCyberNotifications';
|
|
41
|
+
export { CyberNotificationProvider } from '../contexts/NotificationContext';
|
|
42
|
+
export type { CyberNotificationProviderProps } from '../contexts/NotificationContext';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface CyberNotificationProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
5
|
+
defaultDuration?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const CyberNotificationProvider: React.FC<CyberNotificationProviderProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CyberNotification {
|
|
2
|
+
id: string;
|
|
3
|
+
type: "success" | "warning" | "error";
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
width?: number;
|
|
7
|
+
isClosing?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface NotificationOptions {
|
|
10
|
+
autoHide?: boolean;
|
|
11
|
+
duration?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface NotificationContextType {
|
|
14
|
+
notifications: CyberNotification[];
|
|
15
|
+
showNotification: (type: "success" | "warning" | "error", title: string, message: string, options?: NotificationOptions) => string;
|
|
16
|
+
hideNotification: (id: string) => void;
|
|
17
|
+
clearAllNotifications: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const NotificationContext: import('react').Context<NotificationContextType | undefined>;
|