@vtx-ui/react 0.0.1-beta.1 → 0.0.1-beta.10
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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/AdminHeader/AdminHeader.d.ts +179 -0
- package/dist/types/components/AdminHeader/AdminHeader.examples.d.ts +44 -0
- package/dist/types/components/AdminHeader/AdminHeader.stories.d.ts +53 -0
- package/dist/types/components/AdminHeader/AdminHeader.widgets.stories.d.ts +86 -0
- package/dist/types/components/AdminHeader/index.d.ts +2 -0
- package/dist/types/components/Alert/Alert.d.ts +7 -54
- package/dist/types/components/Avatar/Avatar.d.ts +5 -2
- package/dist/types/components/Badge/Badge.d.ts +8 -34
- package/dist/types/components/Button/Button.d.ts +7 -43
- package/dist/types/components/Card/Card.d.ts +7 -64
- package/dist/types/components/Checkbox/Checkbox.d.ts +5 -59
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +5 -53
- package/dist/types/components/Chip/Chip.d.ts +7 -33
- package/dist/types/components/DataGrid/DataGrid.d.ts +97 -0
- package/dist/types/components/DataGrid/index.d.ts +2 -0
- package/dist/types/components/Divider/Divider.d.ts +5 -72
- package/dist/types/components/Flex/Flex.d.ts +5 -26
- package/dist/types/components/Grid/Grid.d.ts +5 -77
- package/dist/types/components/Header/Header.d.ts +5 -33
- package/dist/types/components/Input/Input.d.ts +8 -54
- package/dist/types/components/Menu/Menu.d.ts +5 -32
- package/dist/types/components/Modal/Modal.d.ts +7 -73
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +5 -41
- package/dist/types/components/Radio/Radio.d.ts +8 -57
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +8 -59
- package/dist/types/components/Select/Select.d.ts +8 -60
- package/dist/types/components/SideMenu/SideMenu.d.ts +15 -34
- package/dist/types/components/SideMenu/SideMenu.examples.d.ts +18 -0
- package/dist/types/components/SideMenu/index.d.ts +1 -3
- package/dist/types/components/Table/Table.d.ts +108 -60
- package/dist/types/components/Text/Text.d.ts +5 -51
- package/dist/types/components/Timeline/Timeline.d.ts +34 -0
- package/dist/types/components/Timeline/index.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +5 -51
- package/dist/types/hoc/withParsedClasses.d.ts +7 -0
- package/dist/types/hooks/useTheme.d.ts +1 -244
- package/dist/types/icons/IconComponents.d.ts +55 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/dist/types/index.d.ts +28 -5
- package/dist/types/stories/components/Accordion.stories.d.ts +11 -0
- package/dist/types/stories/components/Alert.stories.d.ts +9 -0
- package/dist/types/stories/components/Avatar.stories.d.ts +13 -0
- package/dist/types/stories/components/Badge.stories.d.ts +8 -0
- package/dist/types/stories/components/Button.stories.d.ts +9 -0
- package/dist/types/stories/components/Card.stories.d.ts +8 -0
- package/dist/types/stories/components/Checkbox.stories.d.ts +17 -0
- package/dist/types/stories/components/CheckboxGroup.stories.d.ts +13 -0
- package/dist/types/stories/components/Chip.stories.d.ts +22 -0
- package/dist/types/stories/components/DataGrid.stories.d.ts +20 -0
- package/dist/types/stories/components/Divider.stories.d.ts +15 -0
- package/dist/types/stories/components/Flex.stories.d.ts +14 -0
- package/dist/types/stories/components/Grid.stories.d.ts +11 -0
- package/dist/types/stories/components/Header.stories.d.ts +14 -0
- package/dist/types/stories/components/Input.stories.d.ts +9 -0
- package/dist/types/stories/components/Menu.stories.d.ts +13 -0
- package/dist/types/stories/components/Modal.stories.d.ts +12 -0
- package/dist/types/stories/components/MultiSelect.stories.d.ts +19 -0
- package/dist/types/stories/components/Radio.stories.d.ts +16 -0
- package/dist/types/stories/components/RadioGroup.stories.d.ts +15 -0
- package/dist/types/stories/components/Select.stories.d.ts +17 -0
- package/dist/types/stories/components/SideMenu.stories.d.ts +62 -0
- package/dist/types/stories/components/Table.stories.d.ts +25 -0
- package/dist/types/stories/components/Text.stories.d.ts +18 -0
- package/dist/types/stories/components/Timeline.stories.d.ts +20 -0
- package/dist/types/stories/components/Toast.stories.d.ts +17 -0
- package/dist/types/stories/components/Tooltip.stories.d.ts +20 -0
- package/dist/types/stories/widgets/InfoCard.stories.d.ts +12 -0
- package/dist/types/stories/widgets/InfoListCard.stories.d.ts +19 -0
- package/dist/types/stories/widgets/InfoText.stories.d.ts +30 -0
- package/dist/types/stories/widgets/OrderCard.stories.d.ts +13 -0
- package/dist/types/stories/widgets/OrderConfirmation.stories.d.ts +36 -0
- package/dist/types/stories/widgets/OrderDetails.stories.d.ts +11 -0
- package/dist/types/stories/widgets/ProductCard.stories.d.ts +25 -0
- package/dist/types/theme/ThemeProvider.d.ts +2 -2
- package/dist/types/theme/cssVariables.d.ts +5 -2
- package/dist/types/theme/index.d.ts +3 -3
- package/dist/types/theme/tokens.d.ts +271 -216
- package/dist/types/utils/parseClass.d.ts +1 -0
- package/dist/types/widgets/Header/Header.d.ts +252 -0
- package/dist/types/widgets/Header/Header.stories.d.ts +30 -0
- package/dist/types/widgets/Header/index.d.ts +2 -0
- package/dist/types/widgets/InfoCard/InfoCard.d.ts +40 -0
- package/dist/types/widgets/InfoCard/index.d.ts +1 -0
- package/dist/types/widgets/InfoListCard/InfoListCard.d.ts +43 -0
- package/dist/types/widgets/InfoListCard/index.d.ts +2 -0
- package/dist/types/widgets/InfoText/InfoText.d.ts +144 -0
- package/dist/types/widgets/InfoText/InfoText.examples.d.ts +33 -0
- package/dist/types/widgets/InfoText/index.d.ts +1 -0
- package/dist/types/widgets/OrderCard/OrderCard.d.ts +71 -0
- package/dist/types/widgets/OrderCard/index.d.ts +2 -0
- package/dist/types/widgets/OrderConfirmation/OrderConfirmation.d.ts +85 -0
- package/dist/types/widgets/OrderConfirmation/index.d.ts +3 -0
- package/dist/types/widgets/OrderDetails/OrderDetails.d.ts +91 -0
- package/dist/types/widgets/OrderDetails/index.d.ts +3 -0
- package/dist/types/widgets/ProductCard/ProductCard.d.ts +42 -0
- package/dist/types/widgets/ProductCard/index.d.ts +1 -0
- package/package.json +113 -59
- package/dist/components/Accordion/Accordion.d.ts +0 -31
- package/dist/components/Accordion/Accordion.examples.d.ts +0 -3
- package/dist/components/Accordion/AccordionItem.d.ts +0 -5
- package/dist/components/Accordion/index.d.ts +0 -4
- package/dist/components/Accordion/types.d.ts +0 -98
- package/dist/components/Alert/Alert.d.ts +0 -119
- package/dist/components/Alert/index.d.ts +0 -3
- package/dist/components/Avatar/Avatar.d.ts +0 -63
- package/dist/components/Avatar/index.d.ts +0 -3
- package/dist/components/Badge/Badge.d.ts +0 -81
- package/dist/components/Badge/index.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -117
- package/dist/components/Button/index.d.ts +0 -3
- package/dist/components/Card/Card.d.ts +0 -120
- package/dist/components/Card/index.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.d.ts +0 -114
- package/dist/components/Checkbox/index.d.ts +0 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +0 -121
- package/dist/components/CheckboxGroup/index.d.ts +0 -3
- package/dist/components/Chip/Chip.d.ts +0 -91
- package/dist/components/Chip/index.d.ts +0 -3
- package/dist/components/Divider/Divider.d.ts +0 -118
- package/dist/components/Divider/index.d.ts +0 -3
- package/dist/components/Flex/Flex.d.ts +0 -66
- package/dist/components/Flex/index.d.ts +0 -3
- package/dist/components/Grid/Grid.d.ts +0 -156
- package/dist/components/Grid/index.d.ts +0 -3
- package/dist/components/Header/Header.d.ts +0 -138
- package/dist/components/Header/index.d.ts +0 -3
- package/dist/components/Input/Input.d.ts +0 -129
- package/dist/components/Input/index.d.ts +0 -3
- package/dist/components/Menu/Menu.d.ts +0 -114
- package/dist/components/Menu/index.d.ts +0 -4
- package/dist/components/Modal/Modal.d.ts +0 -201
- package/dist/components/Modal/index.d.ts +0 -3
- package/dist/components/MultiSelect/MultiSelect.d.ts +0 -190
- package/dist/components/MultiSelect/index.d.ts +0 -3
- package/dist/components/Radio/Radio.d.ts +0 -105
- package/dist/components/Radio/index.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -134
- package/dist/components/RadioGroup/index.d.ts +0 -3
- package/dist/components/Select/Select.d.ts +0 -169
- package/dist/components/Select/index.d.ts +0 -3
- package/dist/components/SideMenu/SideMenu.d.ts +0 -118
- package/dist/components/SideMenu/index.d.ts +0 -4
- package/dist/components/Table/Table.d.ts +0 -211
- package/dist/components/Table/index.d.ts +0 -3
- package/dist/components/Text/Text.d.ts +0 -160
- package/dist/components/Text/index.d.ts +0 -3
- package/dist/components/Toast/Toast.d.ts +0 -56
- package/dist/components/Toast/ToastContainer.d.ts +0 -6
- package/dist/components/Toast/index.d.ts +0 -5
- package/dist/components/Toast/types.d.ts +0 -148
- package/dist/components/Toast/useToast.d.ts +0 -34
- package/dist/components/Tooltip/Tooltip.d.ts +0 -108
- package/dist/components/Tooltip/index.d.ts +0 -3
- package/dist/hooks/index.d.ts +0 -85
- package/dist/hooks/useTheme.d.ts +0 -268
- package/dist/index.d.ts +0 -55
- package/dist/theme/ThemeProvider.d.ts +0 -39
- package/dist/theme/cssVariables.d.ts +0 -9
- package/dist/theme/index.d.ts +0 -6
- package/dist/theme/tokens.d.ts +0 -258
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HTMLAttributes, ImgHTMLAttributes } from "react";
|
|
3
|
-
import './Avatar.css';
|
|
4
|
-
/**
|
|
5
|
-
* Avatar component - Displays user profile image, initials, or fallback
|
|
6
|
-
*
|
|
7
|
-
* The Avatar component supports images, fallback text, different sizes, shapes, and status indicators.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* Basic avatar with image
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <Avatar src="https://randomuser.me/api/portraits/men/1.jpg" alt="John Doe" />
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* Avatar with fallback text
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <Avatar fallback="JD" />
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* Different sizes
|
|
23
|
-
* ```tsx
|
|
24
|
-
* <Avatar src="..." size="small" />
|
|
25
|
-
* <Avatar src="..." size="large" />
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* Square shape
|
|
30
|
-
* ```tsx
|
|
31
|
-
* <Avatar src="..." shape="square" />
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* Status indicator
|
|
36
|
-
* ```tsx
|
|
37
|
-
* <Avatar
|
|
38
|
-
* src="..."
|
|
39
|
-
* statusIndicator={<span style={{ background: 'green', borderRadius: '50%', width: 12, height: 12, display: 'inline-block' }} />}
|
|
40
|
-
* statusPosition="top-right"
|
|
41
|
-
* />
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export interface AvatarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
45
|
-
src?: string;
|
|
46
|
-
alt?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Size of the avatar
|
|
49
|
-
* @default theme.defaultSize or 'md'
|
|
50
|
-
*/
|
|
51
|
-
size?: 'sm' | 'md' | 'lg';
|
|
52
|
-
shape?: 'circle' | 'square';
|
|
53
|
-
fallback?: string;
|
|
54
|
-
onImageError?: (error: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
55
|
-
onImageLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
56
|
-
imgProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'className' | 'onError' | 'onLoad'>;
|
|
57
|
-
statusIndicator?: React.ReactNode;
|
|
58
|
-
statusPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
59
|
-
}
|
|
60
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
declare const _default: React.FC<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
-
export default _default;
|
|
63
|
-
export { Avatar };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import './Badge.css';
|
|
3
|
-
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Visual variant of the badge
|
|
6
|
-
* @default 'neutral'
|
|
7
|
-
*/
|
|
8
|
-
variant?: 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
9
|
-
/**
|
|
10
|
-
* Size of the badge
|
|
11
|
-
* @default 'medium'
|
|
12
|
-
*/
|
|
13
|
-
size?: 'small' | 'medium' | 'large';
|
|
14
|
-
/**
|
|
15
|
-
* If true, badge will be pill-shaped with rounded ends
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
pill?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* If true, displays a dot indicator before the content
|
|
21
|
-
* Useful for status indicators
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
dot?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* If true, displays the badge with an outline style instead of filled
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
outline?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Maximum content length before truncation
|
|
32
|
-
* Useful for limiting badge text length
|
|
33
|
-
*/
|
|
34
|
-
maxLength?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Icon to display before the badge content
|
|
37
|
-
*/
|
|
38
|
-
icon?: React.ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Badge content - text, numbers, or custom elements
|
|
41
|
-
*/
|
|
42
|
-
children: React.ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Callback fired when badge is clicked
|
|
45
|
-
*/
|
|
46
|
-
onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Badge component - Small labels and indicators for status, counts, or categories
|
|
50
|
-
*
|
|
51
|
-
* A versatile badge component that can display status indicators, counts, tags, or any short text
|
|
52
|
-
* with various visual styles and customization options.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* Basic status badges
|
|
56
|
-
* ```tsx
|
|
57
|
-
* <Badge variant="success">Active</Badge>
|
|
58
|
-
* <Badge variant="error" dot>Error</Badge>
|
|
59
|
-
* <Badge variant="primary" pill>NEW</Badge>
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* With icon and outline
|
|
64
|
-
* ```tsx
|
|
65
|
-
* <Badge variant="info" icon={<InfoIcon />} outline>
|
|
66
|
-
* Information
|
|
67
|
-
* </Badge>
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* Removable badge
|
|
72
|
-
* ```tsx
|
|
73
|
-
* <Badge variant="primary" onRemove={(e) => handleRemove()}>
|
|
74
|
-
* Tag 1
|
|
75
|
-
* </Badge>
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
79
|
-
declare const _default: React.FC<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
80
|
-
export default _default;
|
|
81
|
-
export { Badge };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import './Button.css';
|
|
3
|
-
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Visual style variant of the button
|
|
6
|
-
* @default 'primary'
|
|
7
|
-
*/
|
|
8
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'warning';
|
|
9
|
-
/**
|
|
10
|
-
* Size of the button
|
|
11
|
-
* @default 'md'
|
|
12
|
-
*/
|
|
13
|
-
size?: 'sm' | 'md' | 'lg';
|
|
14
|
-
/**
|
|
15
|
-
* If true, button will take full width of its container
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
fullWidth?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Loading state - shows loading indicator and disables interaction
|
|
21
|
-
* When true, the button becomes unclickable and shows a spinner
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Icon to display before button text
|
|
27
|
-
* Pass any React node (icon component, emoji, etc.)
|
|
28
|
-
*/
|
|
29
|
-
leftIcon?: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Icon to display after button text
|
|
32
|
-
* Pass any React node (icon component, emoji, etc.)
|
|
33
|
-
*/
|
|
34
|
-
rightIcon?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* If true, renders the button as an icon-only button (no text padding)
|
|
37
|
-
* Content should be an icon element
|
|
38
|
-
* @default false
|
|
39
|
-
*/
|
|
40
|
-
iconOnly?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Custom loading text to display when loading is true
|
|
43
|
-
* @default undefined (uses children content)
|
|
44
|
-
*/
|
|
45
|
-
loadingText?: string;
|
|
46
|
-
/**
|
|
47
|
-
* If true, renders button as a link element with button styling
|
|
48
|
-
* Requires href prop when true
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
asLink?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* URL when rendering as link (requires asLink=true)
|
|
54
|
-
*/
|
|
55
|
-
href?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Target attribute when rendering as link
|
|
58
|
-
*/
|
|
59
|
-
target?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Rel attribute when rendering as link
|
|
62
|
-
*/
|
|
63
|
-
rel?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Optional text color for the button
|
|
66
|
-
*/
|
|
67
|
-
textColor?: string;
|
|
68
|
-
/**
|
|
69
|
-
* If true/false, applies dark or light text color class
|
|
70
|
-
*/
|
|
71
|
-
darkText?: boolean;
|
|
72
|
-
children?: React.ReactNode;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Button component - Primary interactive element for user actions
|
|
76
|
-
*
|
|
77
|
-
* A comprehensive button component with multiple variants, sizes, loading states,
|
|
78
|
-
* and icon support. Can also render as a link with button styling.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* Basic usage
|
|
82
|
-
* ```tsx
|
|
83
|
-
* <Button variant="primary" size="medium" onClick={() => console.log('clicked')}>
|
|
84
|
-
* Click me
|
|
85
|
-
* </Button>
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* With icons
|
|
90
|
-
* ```tsx
|
|
91
|
-
* <Button variant="primary" leftIcon={<SaveIcon />}>
|
|
92
|
-
* Save Changes
|
|
93
|
-
* </Button>
|
|
94
|
-
* <Button variant="secondary" rightIcon={<ArrowIcon />}>
|
|
95
|
-
* Next
|
|
96
|
-
* </Button>
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* Loading state
|
|
101
|
-
* ```tsx
|
|
102
|
-
* <Button loading loadingText="Saving...">
|
|
103
|
-
* Save
|
|
104
|
-
* </Button>
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* As link
|
|
109
|
-
* ```tsx
|
|
110
|
-
* <Button asLink href="/dashboard" variant="primary">
|
|
111
|
-
* Go to Dashboard
|
|
112
|
-
* </Button>
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
116
|
-
declare const _default: React.FC<ButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
117
|
-
export default _default;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './Card.css';
|
|
3
|
-
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/**
|
|
5
|
-
* The content of the card
|
|
6
|
-
*/
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* The variant of the card
|
|
10
|
-
* @default 'elevated'
|
|
11
|
-
*/
|
|
12
|
-
variant?: 'elevated' | 'outlined' | 'filled';
|
|
13
|
-
/**
|
|
14
|
-
* Size of the card
|
|
15
|
-
* @default 'md'
|
|
16
|
-
*/
|
|
17
|
-
size?: 'sm' | 'md' | 'lg';
|
|
18
|
-
/**
|
|
19
|
-
* If true, removes padding from the card
|
|
20
|
-
* @default false
|
|
21
|
-
*/
|
|
22
|
-
noPadding?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Custom padding value (e.g., '16px', '1rem', '0')
|
|
25
|
-
* Overrides noPadding when provided
|
|
26
|
-
*/
|
|
27
|
-
padding?: string;
|
|
28
|
-
/**
|
|
29
|
-
* If true, makes the card hoverable with interaction effects
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
hoverable?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* If true, makes the card clickable (adds cursor pointer)
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
clickable?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Additional CSS class name
|
|
40
|
-
*/
|
|
41
|
-
className?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Header content for the card
|
|
44
|
-
*/
|
|
45
|
-
header?: React.ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Footer content for the card
|
|
48
|
-
*/
|
|
49
|
-
footer?: React.ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* If true, adds dividers between header, content, and footer
|
|
52
|
-
* @default false
|
|
53
|
-
*/
|
|
54
|
-
divider?: boolean;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Card component - Container for grouping related content
|
|
58
|
-
*
|
|
59
|
-
* A versatile card component with support for variants, padding control,
|
|
60
|
-
* headers, footers, and interactive states.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* Basic card
|
|
64
|
-
* ```tsx
|
|
65
|
-
* <Card>
|
|
66
|
-
* <h3>Card Title</h3>
|
|
67
|
-
* <p>Card content goes here</p>
|
|
68
|
-
* </Card>
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* Card without padding
|
|
73
|
-
* ```tsx
|
|
74
|
-
* <Card noPadding>
|
|
75
|
-
* <img src="image.jpg" alt="Full bleed image" />
|
|
76
|
-
* </Card>
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* Card with custom padding
|
|
81
|
-
* ```tsx
|
|
82
|
-
* <Card padding="32px">
|
|
83
|
-
* <p>Card with custom padding</p>
|
|
84
|
-
* </Card>
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* Card with header and footer
|
|
89
|
-
* ```tsx
|
|
90
|
-
* <Card
|
|
91
|
-
* header={<h3>Card Header</h3>}
|
|
92
|
-
* footer={<button>Action</button>}
|
|
93
|
-
* divider
|
|
94
|
-
* >
|
|
95
|
-
* <p>Card content</p>
|
|
96
|
-
* </Card>
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* Interactive card
|
|
101
|
-
* ```tsx
|
|
102
|
-
* <Card hoverable clickable onClick={() => console.log('clicked')}>
|
|
103
|
-
* <p>Click me!</p>
|
|
104
|
-
* </Card>
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* Customize appearance with CSS
|
|
109
|
-
* ```css
|
|
110
|
-
* .vtx-card {
|
|
111
|
-
* --vtx-card-bg: #ffffff;
|
|
112
|
-
* --vtx-card-border-radius: 8px;
|
|
113
|
-
* --vtx-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
114
|
-
* --vtx-card-padding: 16px;
|
|
115
|
-
* }
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
119
|
-
declare const _default: React.FC<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
120
|
-
export default _default;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './Checkbox.css';
|
|
3
|
-
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
|
-
/**
|
|
5
|
-
* If true, the checkbox is checked
|
|
6
|
-
*/
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* If true, the checkbox appears indeterminate
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
indeterminate?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the checkbox is disabled
|
|
15
|
-
* @default false
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* The label for the checkbox
|
|
20
|
-
*/
|
|
21
|
-
label?: React.ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* The size of the checkbox
|
|
24
|
-
* @default 'md'
|
|
25
|
-
*/
|
|
26
|
-
size?: 'sm' | 'md' | 'lg';
|
|
27
|
-
/**
|
|
28
|
-
* The variant of the checkbox
|
|
29
|
-
* @default 'primary'
|
|
30
|
-
*/
|
|
31
|
-
variant?: 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info';
|
|
32
|
-
/**
|
|
33
|
-
* If true, displays error styling
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
error?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Helper text displayed below the checkbox
|
|
39
|
-
*/
|
|
40
|
-
helperText?: React.ReactNode;
|
|
41
|
-
/**
|
|
42
|
-
* Callback fired when the state is changed
|
|
43
|
-
*/
|
|
44
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
45
|
-
/**
|
|
46
|
-
* Additional CSS class name for the container
|
|
47
|
-
*/
|
|
48
|
-
className?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Additional CSS class name for the input element
|
|
51
|
-
*/
|
|
52
|
-
inputClassName?: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Checkbox component - Allows users to select one or more items from a set
|
|
56
|
-
*
|
|
57
|
-
* The Checkbox component provides a customizable checkbox input with support
|
|
58
|
-
* for labels, error states, indeterminate state, and three sizes.
|
|
59
|
-
*
|
|
60
|
-
* ## CSS Customization
|
|
61
|
-
*
|
|
62
|
-
* You can customize the checkbox appearance using CSS custom properties:
|
|
63
|
-
*
|
|
64
|
-
* ```css
|
|
65
|
-
* :root {
|
|
66
|
-
* --vtx-checkbox-color: #1976d2;
|
|
67
|
-
* --vtx-checkbox-size: 20px;
|
|
68
|
-
* --vtx-checkbox-border-width: 2px;
|
|
69
|
-
* --vtx-checkbox-border-radius: 4px;
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* Basic checkbox
|
|
75
|
-
* ```tsx
|
|
76
|
-
* <Checkbox label="Accept terms and conditions" />
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* Controlled checkbox with size
|
|
81
|
-
* ```tsx
|
|
82
|
-
* const [checked, setChecked] = useState(false);
|
|
83
|
-
* <Checkbox
|
|
84
|
-
* checked={checked}
|
|
85
|
-
* onChange={(e) => setChecked(e.target.checked)}
|
|
86
|
-
* label="Subscribe to newsletter"
|
|
87
|
-
* size="lg"
|
|
88
|
-
* variant="secondary"
|
|
89
|
-
* />
|
|
90
|
-
* ```
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* With error state
|
|
94
|
-
* ```tsx
|
|
95
|
-
* <Checkbox
|
|
96
|
-
* label="I agree"
|
|
97
|
-
* error
|
|
98
|
-
* helperText="You must agree to continue"
|
|
99
|
-
* />
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* Indeterminate state
|
|
104
|
-
* ```tsx
|
|
105
|
-
* <Checkbox
|
|
106
|
-
* label="Select all"
|
|
107
|
-
* indeterminate
|
|
108
|
-
* />
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
112
|
-
declare const _default: React.FC<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
113
|
-
export default _default;
|
|
114
|
-
export { Checkbox };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './CheckboxGroup.css';
|
|
3
|
-
export interface CheckboxOption {
|
|
4
|
-
/**
|
|
5
|
-
* The value of the checkbox
|
|
6
|
-
*/
|
|
7
|
-
value: string;
|
|
8
|
-
/**
|
|
9
|
-
* The label for the checkbox
|
|
10
|
-
*/
|
|
11
|
-
label: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* If true, the checkbox is disabled
|
|
14
|
-
*/
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface CheckboxGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
18
|
-
/**
|
|
19
|
-
* The label for the checkbox group
|
|
20
|
-
*/
|
|
21
|
-
label?: React.ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Array of checkbox options
|
|
24
|
-
*/
|
|
25
|
-
options: CheckboxOption[];
|
|
26
|
-
/**
|
|
27
|
-
* Array of selected values
|
|
28
|
-
*/
|
|
29
|
-
value?: string[];
|
|
30
|
-
/**
|
|
31
|
-
* Default selected values for uncontrolled mode
|
|
32
|
-
*/
|
|
33
|
-
defaultValue?: string[];
|
|
34
|
-
/**
|
|
35
|
-
* Callback fired when the selection changes
|
|
36
|
-
*/
|
|
37
|
-
onChange?: (value: string[]) => void;
|
|
38
|
-
/**
|
|
39
|
-
* If true, all checkboxes are disabled
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
disabled?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* If true, displays error styling
|
|
45
|
-
* @default false
|
|
46
|
-
*/
|
|
47
|
-
error?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Helper text displayed below the group
|
|
50
|
-
*/
|
|
51
|
-
helperText?: React.ReactNode;
|
|
52
|
-
/**
|
|
53
|
-
* The layout orientation of the checkboxes
|
|
54
|
-
* @default 'vertical'
|
|
55
|
-
*/
|
|
56
|
-
orientation?: 'horizontal' | 'vertical';
|
|
57
|
-
/**
|
|
58
|
-
* The size of the checkboxes
|
|
59
|
-
* @default 'md'
|
|
60
|
-
*/
|
|
61
|
-
size?: 'sm' | 'md' | 'lg';
|
|
62
|
-
/**
|
|
63
|
-
* Additional CSS class name
|
|
64
|
-
*/
|
|
65
|
-
className?: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* CheckboxGroup component - Manages a group of related checkboxes
|
|
69
|
-
*
|
|
70
|
-
* The CheckboxGroup component provides a convenient way to manage multiple
|
|
71
|
-
* checkboxes with shared state, labels, and error handling.
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* Basic usage
|
|
75
|
-
* ```tsx
|
|
76
|
-
* <CheckboxGroup
|
|
77
|
-
* label="Select your interests"
|
|
78
|
-
* options={[
|
|
79
|
-
* { value: 'sports', label: 'Sports' },
|
|
80
|
-
* { value: 'music', label: 'Music' },
|
|
81
|
-
* { value: 'travel', label: 'Travel' },
|
|
82
|
-
* ]}
|
|
83
|
-
* />
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* Controlled mode
|
|
88
|
-
* ```tsx
|
|
89
|
-
* const [selected, setSelected] = useState(['sports']);
|
|
90
|
-
* <CheckboxGroup
|
|
91
|
-
* label="Interests"
|
|
92
|
-
* options={options}
|
|
93
|
-
* value={selected}
|
|
94
|
-
* onChange={setSelected}
|
|
95
|
-
* />
|
|
96
|
-
* ```
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* Horizontal layout
|
|
100
|
-
* ```tsx
|
|
101
|
-
* <CheckboxGroup
|
|
102
|
-
* label="Preferences"
|
|
103
|
-
* options={options}
|
|
104
|
-
* orientation="horizontal"
|
|
105
|
-
* />
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* With error state
|
|
110
|
-
* ```tsx
|
|
111
|
-
* <CheckboxGroup
|
|
112
|
-
* label="Required selection"
|
|
113
|
-
* options={options}
|
|
114
|
-
* error
|
|
115
|
-
* helperText="Please select at least one option"
|
|
116
|
-
* />
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
120
|
-
declare const _default: React.FC<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
|
-
export default _default;
|