@vtx-ui/react 0.0.1-beta.15 → 0.0.1-beta.16
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/Accordion/AccordionItem.d.ts +11 -0
- package/dist/types/components/AdminHeader/AdminHeader.d.ts +36 -5
- package/dist/types/components/AdminHeader/index.d.ts +1 -1
- package/dist/types/components/Alert/Alert.d.ts +53 -5
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +43 -5
- package/dist/types/components/Avatar/Avatar.d.ts +2 -5
- package/dist/types/components/Badge/Badge.d.ts +32 -5
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +71 -5
- package/dist/types/components/Button/Button.d.ts +43 -5
- package/dist/types/components/Card/Card.d.ts +64 -5
- package/dist/types/components/Checkbox/Checkbox.d.ts +59 -5
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +54 -5
- package/dist/types/components/Chip/Chip.d.ts +33 -5
- package/dist/types/components/Container/Container.d.ts +41 -5
- package/dist/types/components/DataGrid/DataGrid.d.ts +3 -3
- package/dist/types/components/DatePicker/DatePicker.d.ts +35 -5
- package/dist/types/components/DatePicker/DateRangePicker.d.ts +39 -5
- package/dist/types/components/Divider/Divider.d.ts +73 -5
- package/dist/types/components/Flex/Flex.d.ts +27 -5
- package/dist/types/components/FormControl/FormControl.d.ts +48 -5
- package/dist/types/components/Grid/Grid.d.ts +78 -5
- package/dist/types/components/Header/Header.d.ts +34 -5
- package/dist/types/components/Input/Input.d.ts +53 -5
- package/dist/types/components/Link/Link.d.ts +48 -5
- package/dist/types/components/Menu/ActionMenu.d.ts +56 -5
- package/dist/types/components/Menu/Menu.d.ts +33 -5
- package/dist/types/components/Modal/Modal.d.ts +73 -5
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +42 -5
- package/dist/types/components/Navbar/Navbar.d.ts +2 -1
- package/dist/types/components/Radio/Radio.d.ts +56 -5
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +58 -5
- package/dist/types/components/RichTextEditor/RichTextEditor.d.ts +3 -1
- package/dist/types/components/Select/Select.d.ts +59 -5
- package/dist/types/components/SideMenu/SideMenu.d.ts +35 -5
- package/dist/types/components/Table/Table.d.ts +59 -5
- package/dist/types/components/Tabs/Tabs.d.ts +94 -0
- package/dist/types/components/Tabs/index.d.ts +2 -0
- package/dist/types/components/Text/Text.d.ts +51 -5
- package/dist/types/components/Textarea/Textarea.d.ts +54 -5
- package/dist/types/components/Timeline/Timeline.d.ts +3 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/types/components/Widget/IntelligentGrid.d.ts +4 -2
- package/dist/types/components/Widget/Widget.d.ts +3 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/stories/components/SideMenu.stories.d.ts +1 -4
- package/dist/types/stories/components/Tabs.stories.d.ts +10 -0
- package/dist/types/stories/widgets/DashboardCard.stories.d.ts +0 -46
- package/dist/types/stories/widgets/InfoCard.stories.d.ts +1 -1
- package/dist/types/stories/widgets/InfoText.stories.d.ts +1 -1
- package/dist/types/stories/widgets/OrderConfirmation.stories.d.ts +1 -1
- package/dist/types/stories/widgets/ProductCard.stories.d.ts +1 -1
- package/dist/types/widgets/DashboardCard/DashboardCard.d.ts +4 -197
- package/dist/types/widgets/DashboardCard/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -31,10 +31,46 @@ export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
31
31
|
*/
|
|
32
32
|
children?: React.ReactNode;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Container component - A responsive container that centers content
|
|
36
|
+
*
|
|
37
|
+
* Similar to Bootstrap's container, this component provides a responsive
|
|
38
|
+
* fixed-width container with automatic margins and padding.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* Basic usage
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <Container>
|
|
44
|
+
* <h1>Hello World</h1>
|
|
45
|
+
* <p>Content goes here...</p>
|
|
46
|
+
* </Container>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* Fluid container (full width)
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <Container fluid>
|
|
53
|
+
* <p>This spans the full width</p>
|
|
54
|
+
* </Container>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* Custom max width
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Container maxWidth="sm">
|
|
61
|
+
* <p>Smaller container for forms</p>
|
|
62
|
+
* </Container>
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* Without gutters
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Container disableGutters>
|
|
69
|
+
* <p>No horizontal padding</p>
|
|
70
|
+
* </Container>
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
74
|
declare const _default: React.FC<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
75
|
export default _default;
|
|
40
|
-
export {
|
|
76
|
+
export { Container };
|
|
@@ -115,10 +115,10 @@ export interface DataGridProps<T = any> extends Omit<TableHTMLAttributes<HTMLDiv
|
|
|
115
115
|
className?: string;
|
|
116
116
|
sx?: Record<string, any>;
|
|
117
117
|
}
|
|
118
|
-
declare const
|
|
119
|
-
(props: DataGridProps
|
|
118
|
+
declare const DataGridBase: {
|
|
119
|
+
({ columns, rows, getRowId, filterModel: controlledFilterModel, onFilterModelChange, initialState, disableColumnFilter, ignoreDiacritics, sortModel: controlledSortModel, onSortModelChange, checkboxSelection, rowSelectionModel: controlledSelectionModel, onRowSelectionModelChange, pagination, pageSize: initialPageSize, pageSizeOptions, loading, skeletonLoader, skeletonRows, loadingContent, emptyStateIcon, emptyStateTitle, emptyStateDescription, autoHeight, density, disableColumnMenu, hideFooter, size, className, ...props }: DataGridProps): import("react/jsx-runtime").JSX.Element;
|
|
120
120
|
displayName: string;
|
|
121
121
|
};
|
|
122
122
|
declare const _default: React.FC<DataGridProps>;
|
|
123
123
|
export default _default;
|
|
124
|
-
export {
|
|
124
|
+
export { DataGridBase as DataGrid };
|
|
@@ -90,10 +90,40 @@ export interface DatePickerProps {
|
|
|
90
90
|
*/
|
|
91
91
|
clearable?: boolean;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
/**
|
|
94
|
+
* DatePicker component - A professional date picker with calendar dropdown
|
|
95
|
+
*
|
|
96
|
+
* Features:
|
|
97
|
+
* - Calendar view with month navigation
|
|
98
|
+
* - Keyboard navigation support
|
|
99
|
+
* - Customizable date ranges and disabled dates
|
|
100
|
+
* - Professional design following modern UI patterns
|
|
101
|
+
* - Accessibility support
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* Basic usage
|
|
105
|
+
* ```tsx
|
|
106
|
+
* <DatePicker
|
|
107
|
+
* label="Birth Date"
|
|
108
|
+
* value={birthDate}
|
|
109
|
+
* onChange={setBirthDate}
|
|
110
|
+
* placeholder="Select date"
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* With constraints
|
|
116
|
+
* ```tsx
|
|
117
|
+
* <DatePicker
|
|
118
|
+
* label="Appointment Date"
|
|
119
|
+
* value={appointmentDate}
|
|
120
|
+
* onChange={setAppointmentDate}
|
|
121
|
+
* minDate={new Date()}
|
|
122
|
+
* maxDate={new Date(Date.now() + 30 * 24 * 60 * 60 * 1000)}
|
|
123
|
+
* />
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
97
127
|
declare const _default: React.FC<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
98
128
|
export default _default;
|
|
99
|
-
export {
|
|
129
|
+
export { DatePicker };
|
|
@@ -105,10 +105,44 @@ export interface DateRangePickerProps {
|
|
|
105
105
|
*/
|
|
106
106
|
clearable?: boolean;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
/**
|
|
109
|
+
* DateRangePicker component - A professional date range picker with calendar dropdown
|
|
110
|
+
*
|
|
111
|
+
* Features:
|
|
112
|
+
* - Calendar view with range selection
|
|
113
|
+
* - Preset date ranges (Today, Last 7 days, etc.)
|
|
114
|
+
* - Keyboard navigation support
|
|
115
|
+
* - Customizable date ranges and disabled dates
|
|
116
|
+
* - Professional design following modern UI patterns
|
|
117
|
+
* - Accessibility support
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* Basic usage
|
|
121
|
+
* ```tsx
|
|
122
|
+
* <DateRangePicker
|
|
123
|
+
* label="Date Range"
|
|
124
|
+
* value={dateRange}
|
|
125
|
+
* onChange={setDateRange}
|
|
126
|
+
* startPlaceholder="Start date"
|
|
127
|
+
* endPlaceholder="End date"
|
|
128
|
+
* />
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* With presets
|
|
133
|
+
* ```tsx
|
|
134
|
+
* <DateRangePicker
|
|
135
|
+
* label="Reporting Period"
|
|
136
|
+
* value={reportingRange}
|
|
137
|
+
* onChange={setReportingRange}
|
|
138
|
+
* presets={[
|
|
139
|
+
* { label: 'Last Quarter', range: { start: lastQuarterStart, end: lastQuarterEnd } },
|
|
140
|
+
* { label: 'This Year', range: { start: yearStart, end: new Date() } },
|
|
141
|
+
* ]}
|
|
142
|
+
* />
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
112
146
|
declare const _default: React.FC<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
113
147
|
export default _default;
|
|
114
|
-
export {
|
|
148
|
+
export { DateRangePicker };
|
|
@@ -42,10 +42,78 @@ export interface DividerProps extends React.HTMLAttributes<HTMLHRElement | HTMLD
|
|
|
42
42
|
*/
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Divider component - A thin line that groups content in lists and layouts
|
|
47
|
+
*
|
|
48
|
+
* The Divider component provides a thin, unobtrusive line for grouping elements
|
|
49
|
+
* to reinforce visual hierarchy. It supports horizontal and vertical orientations,
|
|
50
|
+
* multiple variants, and can wrap content like text or chips.
|
|
51
|
+
*
|
|
52
|
+
* ## CSS Customization
|
|
53
|
+
*
|
|
54
|
+
* You can customize the divider appearance using CSS custom properties:
|
|
55
|
+
*
|
|
56
|
+
* ```css
|
|
57
|
+
* .custom-divider {
|
|
58
|
+
* --vtx-divider-color: #e91e63;
|
|
59
|
+
* --vtx-divider-color-light: #fce4ec;
|
|
60
|
+
* --vtx-divider-text-color: #c2185b;
|
|
61
|
+
* --vtx-divider-text-color-light: #f48fb1;
|
|
62
|
+
* --vtx-divider-text-size: 14px;
|
|
63
|
+
* --vtx-divider-text-weight: 600;
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* Or set them globally on :root:
|
|
68
|
+
*
|
|
69
|
+
* ```css
|
|
70
|
+
* :root {
|
|
71
|
+
* --vtx-divider-color: #1976d2;
|
|
72
|
+
* --vtx-divider-text-color: #0d47a1;
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* Basic horizontal divider
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Divider />
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* Vertical divider in flex container
|
|
84
|
+
* ```tsx
|
|
85
|
+
* <Box display="flex" alignItems="center">
|
|
86
|
+
* <Chip label="Item 1" />
|
|
87
|
+
* <Divider orientation="vertical" flexItem />
|
|
88
|
+
* <Chip label="Item 2" />
|
|
89
|
+
* </Box>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* With text content
|
|
94
|
+
* ```tsx
|
|
95
|
+
* <div>
|
|
96
|
+
* <p>Content above</p>
|
|
97
|
+
* <Divider>OR</Divider>
|
|
98
|
+
* <p>Content below</p>
|
|
99
|
+
* </div>
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* With chip and custom alignment
|
|
104
|
+
* ```tsx
|
|
105
|
+
* <Divider textAlign="left">
|
|
106
|
+
* <Chip label="Section" size="small" />
|
|
107
|
+
* </Divider>
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* Custom colored divider
|
|
112
|
+
* ```tsx
|
|
113
|
+
* <Divider className="custom-divider">Custom</Divider>
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>>;
|
|
49
117
|
declare const _default: React.FC<DividerProps & React.RefAttributes<HTMLHRElement | HTMLDivElement>>;
|
|
50
118
|
export default _default;
|
|
51
|
-
export {
|
|
119
|
+
export { Divider };
|
|
@@ -36,10 +36,32 @@ export interface FlexProps {
|
|
|
36
36
|
/** HTML element to render as */
|
|
37
37
|
as?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'main';
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Flex component - A flexible container for flexbox layouts
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // Basic row with gap
|
|
45
|
+
* <Flex gap={16}>
|
|
46
|
+
* <div>Item 1</div>
|
|
47
|
+
* <div>Item 2</div>
|
|
48
|
+
* </Flex>
|
|
49
|
+
*
|
|
50
|
+
* // Centered column
|
|
51
|
+
* <Flex direction="column" align="center" justify="center">
|
|
52
|
+
* <h1>Title</h1>
|
|
53
|
+
* <p>Content</p>
|
|
54
|
+
* </Flex>
|
|
55
|
+
*
|
|
56
|
+
* // Space between with wrap
|
|
57
|
+
* <Flex justify="between" wrap="wrap" gap={8}>
|
|
58
|
+
* <button>Button 1</button>
|
|
59
|
+
* <button>Button 2</button>
|
|
60
|
+
* <button>Button 3</button>
|
|
61
|
+
* </Flex>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
43
65
|
declare const _default: React.FC<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
66
|
export default _default;
|
|
45
|
-
export {
|
|
67
|
+
export { Flex };
|
|
@@ -68,10 +68,53 @@ export interface FormControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
68
68
|
*/
|
|
69
69
|
labelPosition?: 'top' | 'left';
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
/**
|
|
72
|
+
* FormControl component - Wrapper for form inputs with consistent spacing and layout
|
|
73
|
+
*
|
|
74
|
+
* Provides consistent label, helper text, error handling, and spacing for all form inputs.
|
|
75
|
+
* Works with Input, Textarea, Select, RichTextEditor, and custom form components.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* Basic usage
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <FormControl label="Email" helperText="Enter your email address">
|
|
81
|
+
* <Input type="email" placeholder="you@example.com" />
|
|
82
|
+
* </FormControl>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* With error state
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <FormControl label="Password" error="Password is required" required>
|
|
89
|
+
* <Input type="password" />
|
|
90
|
+
* </FormControl>
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* Form with multiple fields
|
|
95
|
+
* ```tsx
|
|
96
|
+
* <div>
|
|
97
|
+
* <FormControl label="First Name" required>
|
|
98
|
+
* <Input />
|
|
99
|
+
* </FormControl>
|
|
100
|
+
* <FormControl label="Last Name" required>
|
|
101
|
+
* <Input />
|
|
102
|
+
* </FormControl>
|
|
103
|
+
* <FormControl label="Bio" helperText="Tell us about yourself">
|
|
104
|
+
* <Textarea />
|
|
105
|
+
* </FormControl>
|
|
106
|
+
* </div>
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* Horizontal label
|
|
111
|
+
* ```tsx
|
|
112
|
+
* <FormControl label="Email" labelPosition="left">
|
|
113
|
+
* <Input type="email" />
|
|
114
|
+
* </FormControl>
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
declare const FormControl: React.ForwardRefExoticComponent<FormControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
118
|
declare const _default: React.FC<FormControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
76
119
|
export default _default;
|
|
77
|
-
export {
|
|
120
|
+
export { FormControl };
|
|
@@ -75,10 +75,83 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
75
75
|
*/
|
|
76
76
|
children?: React.ReactNode;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Grid component - A responsive grid layout system
|
|
80
|
+
*
|
|
81
|
+
* The Grid component uses a 12-column responsive grid layout inspired by Material-UI.
|
|
82
|
+
* It supports five breakpoints (xs, sm, md, lg, xl) and provides flexible spacing,
|
|
83
|
+
* alignment, and direction options.
|
|
84
|
+
*
|
|
85
|
+
* ## Breakpoints
|
|
86
|
+
* - xs: 0px and up (extra small devices)
|
|
87
|
+
* - sm: 600px and up (small devices)
|
|
88
|
+
* - md: 960px and up (medium devices)
|
|
89
|
+
* - lg: 1280px and up (large devices)
|
|
90
|
+
* - xl: 1920px and up (extra large devices)
|
|
91
|
+
*
|
|
92
|
+
* ## CSS Customization
|
|
93
|
+
*
|
|
94
|
+
* You can customize the grid spacing using CSS custom properties:
|
|
95
|
+
*
|
|
96
|
+
* ```css
|
|
97
|
+
* :root {
|
|
98
|
+
* --vtx-grid-spacing-unit: 8px;
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* Basic grid with equal columns
|
|
104
|
+
* ```tsx
|
|
105
|
+
* <Grid container spacing={2}>
|
|
106
|
+
* <Grid item xs={12} sm={6} md={4}>
|
|
107
|
+
* <div>Column 1</div>
|
|
108
|
+
* </Grid>
|
|
109
|
+
* <Grid item xs={12} sm={6} md={4}>
|
|
110
|
+
* <div>Column 2</div>
|
|
111
|
+
* </Grid>
|
|
112
|
+
* <Grid item xs={12} sm={6} md={4}>
|
|
113
|
+
* <div>Column 3</div>
|
|
114
|
+
* </Grid>
|
|
115
|
+
* </Grid>
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* Responsive layout
|
|
120
|
+
* ```tsx
|
|
121
|
+
* <Grid container spacing={3}>
|
|
122
|
+
* <Grid item xs={12} md={8}>
|
|
123
|
+
* <div>Main content</div>
|
|
124
|
+
* </Grid>
|
|
125
|
+
* <Grid item xs={12} md={4}>
|
|
126
|
+
* <div>Sidebar</div>
|
|
127
|
+
* </Grid>
|
|
128
|
+
* </Grid>
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* Auto-width columns
|
|
133
|
+
* ```tsx
|
|
134
|
+
* <Grid container spacing={2}>
|
|
135
|
+
* <Grid item xs="auto">
|
|
136
|
+
* <div>Auto width</div>
|
|
137
|
+
* </Grid>
|
|
138
|
+
* <Grid item xs>
|
|
139
|
+
* <div>Fills remaining space</div>
|
|
140
|
+
* </Grid>
|
|
141
|
+
* </Grid>
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* With alignment
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <Grid container spacing={2} justifyContent="center" alignItems="center">
|
|
148
|
+
* <Grid item xs={6}>
|
|
149
|
+
* <div>Centered content</div>
|
|
150
|
+
* </Grid>
|
|
151
|
+
* </Grid>
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
155
|
declare const _default: React.FC<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
156
|
export default _default;
|
|
84
|
-
export {
|
|
157
|
+
export { Grid };
|
|
@@ -101,10 +101,39 @@ export interface HeaderProps {
|
|
|
101
101
|
*/
|
|
102
102
|
sticky?: boolean;
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Header component - Professional admin panel header with notifications and user menu
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* Basic header
|
|
109
|
+
* ```tsx
|
|
110
|
+
* <Header
|
|
111
|
+
* title="Admin Dashboard"
|
|
112
|
+
* userName="John Doe"
|
|
113
|
+
* userSubtitle="Admin"
|
|
114
|
+
* onToggleSidebar={() => setCollapsed(!collapsed)}
|
|
115
|
+
* />
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* With notifications
|
|
120
|
+
* ```tsx
|
|
121
|
+
* <Header
|
|
122
|
+
* title="Dashboard"
|
|
123
|
+
* notifications={[
|
|
124
|
+
* { id: '1', title: 'New order received', time: '2 min ago', read: false },
|
|
125
|
+
* { id: '2', title: 'User registered', time: '1 hour ago', read: true }
|
|
126
|
+
* ]}
|
|
127
|
+
* userName="John Doe"
|
|
128
|
+
* userMenuItems={[
|
|
129
|
+
* { label: 'Profile', icon: <UserIcon /> },
|
|
130
|
+
* { label: 'Settings', icon: <SettingsIcon /> },
|
|
131
|
+
* { label: 'Logout', icon: <LogoutIcon />, variant: 'danger' }
|
|
132
|
+
* ]}
|
|
133
|
+
* />
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
137
|
declare const _default: React.FC<HeaderProps & React.RefAttributes<HTMLElement>>;
|
|
109
138
|
export default _default;
|
|
110
|
-
export {
|
|
139
|
+
export { Header };
|
|
@@ -74,10 +74,58 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
74
74
|
*/
|
|
75
75
|
suffix?: string;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Input component - Text input field with label, helper text, validation states, and rich features
|
|
79
|
+
*
|
|
80
|
+
* A comprehensive input component with support for icons, prefixes, suffixes, character counting,
|
|
81
|
+
* clear functionality, and various validation states.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* Basic usage
|
|
85
|
+
* ```tsx
|
|
86
|
+
* <Input
|
|
87
|
+
* label="Email"
|
|
88
|
+
* type="email"
|
|
89
|
+
* placeholder="Enter your email"
|
|
90
|
+
* helperText="We'll never share your email"
|
|
91
|
+
* />
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* With error state
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <Input
|
|
98
|
+
* label="Username"
|
|
99
|
+
* error="Username is already taken"
|
|
100
|
+
* value={username}
|
|
101
|
+
* onChange={(e) => setUsername(e.target.value)}
|
|
102
|
+
* />
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* With icons and clear button
|
|
107
|
+
* ```tsx
|
|
108
|
+
* <Input
|
|
109
|
+
* label="Search"
|
|
110
|
+
* leftIcon={<SearchIcon />}
|
|
111
|
+
* clearable
|
|
112
|
+
* onClear={() => setSearch('')}
|
|
113
|
+
* />
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* With character counter
|
|
118
|
+
* ```tsx
|
|
119
|
+
* <Input
|
|
120
|
+
* label="Bio"
|
|
121
|
+
* maxLength={100}
|
|
122
|
+
* showCount
|
|
123
|
+
* value={bio}
|
|
124
|
+
* onChange={(e) => setBio(e.target.value)}
|
|
125
|
+
* />
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
81
129
|
declare const _default: React.FC<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
82
130
|
export default _default;
|
|
83
|
-
export {
|
|
131
|
+
export { Input };
|
|
@@ -59,10 +59,53 @@ export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
59
59
|
download?: boolean | string;
|
|
60
60
|
children?: React.ReactNode;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Link component - Hyperlink with routing library support
|
|
64
|
+
*
|
|
65
|
+
* A flexible link component that works with native anchors, React Router, Next.js,
|
|
66
|
+
* or any custom routing library. Supports text variants and theming.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* Basic usage (native link)
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <Link href="/about">About Us</Link>
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* With React Router
|
|
76
|
+
* ```tsx
|
|
77
|
+
* import { Link as RouterLink } from 'react-router-dom'
|
|
78
|
+
* <Link component={RouterLink} to="/dashboard">Dashboard</Link>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* With Next.js
|
|
83
|
+
* ```tsx
|
|
84
|
+
* import NextLink from 'next/link'
|
|
85
|
+
* <Link component={NextLink} href="/profile">Profile</Link>
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* With variants and icons
|
|
90
|
+
* ```tsx
|
|
91
|
+
* <Link
|
|
92
|
+
* href="/downloads"
|
|
93
|
+
* variant="h6"
|
|
94
|
+
* leftIcon={<DownloadIcon />}
|
|
95
|
+
* >
|
|
96
|
+
* Download
|
|
97
|
+
* </Link>
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* External link
|
|
102
|
+
* ```tsx
|
|
103
|
+
* <Link href="https://example.com" external>
|
|
104
|
+
* Visit Website
|
|
105
|
+
* </Link>
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
66
109
|
declare const _default: React.FC<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
67
110
|
export default _default;
|
|
68
|
-
export {
|
|
111
|
+
export { Link };
|
|
@@ -54,10 +54,61 @@ export interface ActionMenuProps {
|
|
|
54
54
|
*/
|
|
55
55
|
onClose?: () => void;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
/**
|
|
58
|
+
* ActionMenu component - Dropdown menu triggered by a button click
|
|
59
|
+
*
|
|
60
|
+
* A dropdown menu that opens below a trigger element. Perfect for actions menus,
|
|
61
|
+
* context menus, and dropdown options.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* Basic usage
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <ActionMenu
|
|
67
|
+
* triggerLabel="Actions"
|
|
68
|
+
* items={[
|
|
69
|
+
* { label: 'Edit', icon: <EditIcon />, onClick: () => {} },
|
|
70
|
+
* { label: 'Delete', icon: <DeleteIcon />, onClick: () => {}, variant: 'danger' }
|
|
71
|
+
* ]}
|
|
72
|
+
* />
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* Custom trigger element
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <ActionMenu
|
|
79
|
+
* trigger={<Button>Open Menu</Button>}
|
|
80
|
+
* items={menuItems}
|
|
81
|
+
* />
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* Custom trigger with render function (full control)
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <ActionMenu
|
|
88
|
+
* trigger={({ isOpen, toggle, disabled }) => (
|
|
89
|
+
* <Button onClick={toggle} disabled={disabled}>
|
|
90
|
+
* Menu {isOpen ? '▲' : '▼'}
|
|
91
|
+
* </Button>
|
|
92
|
+
* )}
|
|
93
|
+
* items={menuItems}
|
|
94
|
+
* />
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* With icon
|
|
99
|
+
* ```tsx
|
|
100
|
+
* <ActionMenu
|
|
101
|
+
* triggerLabel="More"
|
|
102
|
+
* triggerIcon={<MoreVerticalIcon />}
|
|
103
|
+
* position="bottom-end"
|
|
104
|
+
* items={[
|
|
105
|
+
* { label: 'Share', icon: <ShareIcon /> },
|
|
106
|
+
* { label: 'Download', icon: <DownloadIcon /> }
|
|
107
|
+
* ]}
|
|
108
|
+
* />
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare const ActionMenu: React.ForwardRefExoticComponent<ActionMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
112
|
declare const _default: React.FC<ActionMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
113
|
export default _default;
|
|
63
|
-
export {
|
|
114
|
+
export { ActionMenu };
|