@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
|
@@ -78,10 +78,38 @@ export interface MenuProps {
|
|
|
78
78
|
* MenuItem component - Individual menu item with submenu support
|
|
79
79
|
*/
|
|
80
80
|
export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
/**
|
|
82
|
+
* Menu component - Navigation or action menu with responsive support
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* Basic menu with items array
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <Menu
|
|
88
|
+
* items={[
|
|
89
|
+
* { label: 'Profile', icon: <UserIcon />, onClick: () => {} },
|
|
90
|
+
* { label: 'Settings', icon: <SettingsIcon />, onClick: () => {} },
|
|
91
|
+
* { label: 'Logout', icon: <LogoutIcon />, onClick: () => {}, variant: 'danger' }
|
|
92
|
+
* ]}
|
|
93
|
+
* />
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* Horizontal menu with custom children
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <Menu orientation="horizontal">
|
|
100
|
+
* <MenuItem label="Home" active />
|
|
101
|
+
* <MenuItem label="Products" />
|
|
102
|
+
* <MenuItem label="About" />
|
|
103
|
+
* </Menu>
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* Responsive menu (hamburger on mobile)
|
|
108
|
+
* ```tsx
|
|
109
|
+
* <Menu responsive items={menuItems} />
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
85
113
|
declare const _default: React.FC<MenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
86
114
|
export default _default;
|
|
87
|
-
export {
|
|
115
|
+
export { Menu };
|
|
@@ -126,10 +126,78 @@ export interface ModalProps {
|
|
|
126
126
|
*/
|
|
127
127
|
centered?: boolean;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Modal component - Overlay dialog for focused user interactions
|
|
131
|
+
*
|
|
132
|
+
* A feature-rich modal component with accessibility features including focus trap,
|
|
133
|
+
* body scroll lock, keyboard navigation, and customizable animations.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* Basic confirmation modal with footerButtons array
|
|
137
|
+
* ```tsx
|
|
138
|
+
* const [isOpen, setIsOpen] = useState(false);
|
|
139
|
+
*
|
|
140
|
+
* <Modal
|
|
141
|
+
* isOpen={isOpen}
|
|
142
|
+
* onClose={() => setIsOpen(false)}
|
|
143
|
+
* title="Confirm Action"
|
|
144
|
+
* description="Are you sure you want to proceed with this action?"
|
|
145
|
+
* footerButtons={[
|
|
146
|
+
* { label: 'Cancel', onClick: () => setIsOpen(false), variant: 'outline' },
|
|
147
|
+
* { label: 'Confirm', onClick: handleConfirm, variant: 'primary' }
|
|
148
|
+
* ]}
|
|
149
|
+
* >
|
|
150
|
+
* <p>This action cannot be undone.</p>
|
|
151
|
+
* </Modal>
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* Custom footer with ReactNode
|
|
156
|
+
* ```tsx
|
|
157
|
+
* <Modal
|
|
158
|
+
* isOpen={isOpen}
|
|
159
|
+
* onClose={() => setIsOpen(false)}
|
|
160
|
+
* title="Custom Footer"
|
|
161
|
+
* footer={
|
|
162
|
+
* <>
|
|
163
|
+
* <Button onClick={() => setIsOpen(false)}>Cancel</Button>
|
|
164
|
+
* <Button variant="primary">Save</Button>
|
|
165
|
+
* </>
|
|
166
|
+
* }
|
|
167
|
+
* >
|
|
168
|
+
* <p>Custom content here.</p>
|
|
169
|
+
* </Modal>
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* Form modal with custom header
|
|
174
|
+
* ```tsx
|
|
175
|
+
* <Modal
|
|
176
|
+
* isOpen={isOpen}
|
|
177
|
+
* onClose={() => setIsOpen(false)}
|
|
178
|
+
* size="large"
|
|
179
|
+
* header={<CustomHeader />}
|
|
180
|
+
* scrollable
|
|
181
|
+
* >
|
|
182
|
+
* <FormContent />
|
|
183
|
+
* </Modal>
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* Fullscreen modal without backdrop close
|
|
188
|
+
* ```tsx
|
|
189
|
+
* <Modal
|
|
190
|
+
* isOpen={isOpen}
|
|
191
|
+
* onClose={() => setIsOpen(false)}
|
|
192
|
+
* size="fullscreen"
|
|
193
|
+
* closeOnBackdropClick={false}
|
|
194
|
+
* animation="slide-up"
|
|
195
|
+
* >
|
|
196
|
+
* <FullscreenContent />
|
|
197
|
+
* </Modal>
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
133
201
|
declare const _default: React.FC<ModalProps>;
|
|
134
202
|
export default _default;
|
|
135
|
-
export {
|
|
203
|
+
export { Modal };
|
|
@@ -145,10 +145,47 @@ export interface MultiSelectProps {
|
|
|
145
145
|
*/
|
|
146
146
|
loading?: boolean;
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
/**
|
|
149
|
+
* MultiSelect component - Multi-selection dropdown with chips display
|
|
150
|
+
*
|
|
151
|
+
* A professional multi-select component supporting checkbox or checkmark styles,
|
|
152
|
+
* with chips display, search functionality, and group support.
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* Basic usage with checkbox style
|
|
156
|
+
* ```tsx
|
|
157
|
+
* <MultiSelect
|
|
158
|
+
* label="Select Technologies"
|
|
159
|
+
* placeholder="Choose technologies"
|
|
160
|
+
* options={technologies}
|
|
161
|
+
* onChange={(values) => console.log(values)}
|
|
162
|
+
* />
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* With checkmark style
|
|
167
|
+
* ```tsx
|
|
168
|
+
* <MultiSelect
|
|
169
|
+
* label="Select Skills"
|
|
170
|
+
* options={skills}
|
|
171
|
+
* selectionStyle="checkmark"
|
|
172
|
+
* searchable
|
|
173
|
+
* showSelectAll
|
|
174
|
+
* />
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* Customize loading spinner via CSS
|
|
179
|
+
* ```css
|
|
180
|
+
* .vtx-multiselect-icon-spinner {
|
|
181
|
+
* --vtx-multiselect-loader-color: #10b981;
|
|
182
|
+
* --vtx-multiselect-loader-speed: 1.2s;
|
|
183
|
+
* --vtx-multiselect-loader-track-opacity: 0.15;
|
|
184
|
+
* --vtx-multiselect-loader-path-opacity: 0.85;
|
|
185
|
+
* }
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
152
189
|
declare const _default: React.FC<MultiSelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
153
190
|
export default _default;
|
|
154
|
-
export {
|
|
191
|
+
export { MultiSelect };
|
|
@@ -233,4 +233,5 @@ export declare const Navbar: React.FC<NavbarResponsiveProps> & {
|
|
|
233
233
|
Mobile: React.FC<NavbarMobileProps>;
|
|
234
234
|
Responsive: React.FC<NavbarResponsiveProps>;
|
|
235
235
|
};
|
|
236
|
-
|
|
236
|
+
declare const _default: React.FC<NavbarResponsiveProps & React.RefAttributes<HTMLDivElement>>;
|
|
237
|
+
export default _default;
|
|
@@ -47,10 +47,61 @@ export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
47
47
|
*/
|
|
48
48
|
inputClassName?: string;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Radio component - Allows users to select a single option from a set
|
|
52
|
+
*
|
|
53
|
+
* The Radio component provides a customizable radio input with support
|
|
54
|
+
* for labels, error states, variants, and three sizes.
|
|
55
|
+
*
|
|
56
|
+
* ## CSS Customization
|
|
57
|
+
*
|
|
58
|
+
* You can customize the radio appearance using CSS custom properties:
|
|
59
|
+
*
|
|
60
|
+
* ```css
|
|
61
|
+
* :root {
|
|
62
|
+
* --vtx-radio-color: #1976d2;
|
|
63
|
+
* --vtx-radio-size: 20px;
|
|
64
|
+
* --vtx-radio-border-width: 2px;
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* Basic radio
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <Radio label="Option 1" name="options" value="1" />
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* Controlled radio
|
|
76
|
+
* ```tsx
|
|
77
|
+
* const [selected, setSelected] = useState('1');
|
|
78
|
+
* <Radio
|
|
79
|
+
* checked={selected === '1'}
|
|
80
|
+
* onChange={(e) => setSelected(e.target.value)}
|
|
81
|
+
* label="Option 1"
|
|
82
|
+
* value="1"
|
|
83
|
+
* />
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* With error state
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <Radio
|
|
90
|
+
* label="Required option"
|
|
91
|
+
* error
|
|
92
|
+
* helperText="Please select an option"
|
|
93
|
+
* />
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* Different variants
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <Radio label="Primary" variant="primary" />
|
|
100
|
+
* <Radio label="Success" variant="success" />
|
|
101
|
+
* <Radio label="Error" variant="error" />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
54
105
|
declare const _default: React.FC<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
106
|
export default _default;
|
|
56
|
-
export {
|
|
107
|
+
export { Radio };
|
|
@@ -74,10 +74,63 @@ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
74
74
|
*/
|
|
75
75
|
className?: string;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
/**
|
|
78
|
+
* RadioGroup component - Manages a group of related radio buttons
|
|
79
|
+
*
|
|
80
|
+
* The RadioGroup component provides a convenient way to manage multiple
|
|
81
|
+
* radio buttons with shared state, labels, and error handling.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* Basic usage
|
|
85
|
+
* ```tsx
|
|
86
|
+
* <RadioGroup
|
|
87
|
+
* name="plan"
|
|
88
|
+
* label="Select your plan"
|
|
89
|
+
* options={[
|
|
90
|
+
* { value: 'basic', label: 'Basic' },
|
|
91
|
+
* { value: 'pro', label: 'Pro' },
|
|
92
|
+
* { value: 'enterprise', label: 'Enterprise' },
|
|
93
|
+
* ]}
|
|
94
|
+
* />
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* Controlled mode
|
|
99
|
+
* ```tsx
|
|
100
|
+
* const [selected, setSelected] = useState('basic');
|
|
101
|
+
* <RadioGroup
|
|
102
|
+
* name="plan"
|
|
103
|
+
* label="Plan"
|
|
104
|
+
* options={options}
|
|
105
|
+
* value={selected}
|
|
106
|
+
* onChange={setSelected}
|
|
107
|
+
* />
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* Horizontal layout
|
|
112
|
+
* ```tsx
|
|
113
|
+
* <RadioGroup
|
|
114
|
+
* name="answer"
|
|
115
|
+
* label="Your answer"
|
|
116
|
+
* options={options}
|
|
117
|
+
* orientation="horizontal"
|
|
118
|
+
* />
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* With error state
|
|
123
|
+
* ```tsx
|
|
124
|
+
* <RadioGroup
|
|
125
|
+
* name="required"
|
|
126
|
+
* label="Required selection"
|
|
127
|
+
* options={options}
|
|
128
|
+
* error
|
|
129
|
+
* helperText="Please select an option"
|
|
130
|
+
* />
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
81
134
|
declare const _default: React.FC<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
135
|
export default _default;
|
|
83
|
-
export {
|
|
136
|
+
export { RadioGroup };
|
|
@@ -150,4 +150,6 @@ export type ToolbarButton = 'bold' | 'italic' | 'underline' | 'strikethrough' |
|
|
|
150
150
|
* ```
|
|
151
151
|
*/
|
|
152
152
|
declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
|
|
153
|
-
|
|
153
|
+
declare const _default: React.FC<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
|
|
154
|
+
export default _default;
|
|
155
|
+
export { RichTextEditor };
|
|
@@ -108,10 +108,64 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
|
|
|
108
108
|
*/
|
|
109
109
|
loading?: boolean;
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Select component - Dropdown selection control with label, validation states, and grouping support
|
|
113
|
+
*
|
|
114
|
+
* A comprehensive select component with support for grouped options, validation states,
|
|
115
|
+
* and enhanced accessibility features.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* Basic usage
|
|
119
|
+
* ```tsx
|
|
120
|
+
* <Select
|
|
121
|
+
* label="Country"
|
|
122
|
+
* placeholder="Select a country"
|
|
123
|
+
* options={[
|
|
124
|
+
* { value: 'us', label: 'United States' },
|
|
125
|
+
* { value: 'uk', label: 'United Kingdom' },
|
|
126
|
+
* ]}
|
|
127
|
+
* />
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* With grouped options
|
|
132
|
+
* ```tsx
|
|
133
|
+
* <Select
|
|
134
|
+
* label="Framework"
|
|
135
|
+
* grouped
|
|
136
|
+
* options={[
|
|
137
|
+
* { value: 'react', label: 'React', group: 'Frontend' },
|
|
138
|
+
* { value: 'vue', label: 'Vue', group: 'Frontend' },
|
|
139
|
+
* { value: 'node', label: 'Node.js', group: 'Backend' },
|
|
140
|
+
* { value: 'django', label: 'Django', group: 'Backend' },
|
|
141
|
+
* ]}
|
|
142
|
+
* />
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* With change callback
|
|
147
|
+
* ```tsx
|
|
148
|
+
* <Select
|
|
149
|
+
* label="Status"
|
|
150
|
+
* options={statusOptions}
|
|
151
|
+
* onSelectChange={(value, option) => {
|
|
152
|
+
* console.log('Selected:', value, option);
|
|
153
|
+
* }}
|
|
154
|
+
* />
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* Customize loading spinner via CSS
|
|
159
|
+
* ```css
|
|
160
|
+
* .vtx-select-icon-spinner {
|
|
161
|
+
* --vtx-select-loader-color: #10b981;
|
|
162
|
+
* --vtx-select-loader-speed: 1.2s;
|
|
163
|
+
* --vtx-select-loader-track-opacity: 0.15;
|
|
164
|
+
* --vtx-select-loader-path-opacity: 0.85;
|
|
165
|
+
* }
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
116
169
|
declare const _default: React.FC<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
117
170
|
export default _default;
|
|
171
|
+
export { Select };
|
|
@@ -90,10 +90,40 @@ export declare const SideMenuItem: React.ForwardRefExoticComponent<SideMenuItemP
|
|
|
90
90
|
collapsed?: boolean;
|
|
91
91
|
level?: number;
|
|
92
92
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
/**
|
|
94
|
+
* SideMenu component - Professional sidebar navigation for admin panels
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* Basic sidebar menu
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <SideMenu
|
|
100
|
+
* items={[
|
|
101
|
+
* { label: 'Dashboard', icon: <DashboardIcon />, active: true },
|
|
102
|
+
* {
|
|
103
|
+
* label: 'Products',
|
|
104
|
+
* icon: <ProductIcon />,
|
|
105
|
+
* items: [
|
|
106
|
+
* { label: 'All Products', onClick: () => {} },
|
|
107
|
+
* { label: 'Categories', onClick: () => {} }
|
|
108
|
+
* ]
|
|
109
|
+
* },
|
|
110
|
+
* { label: 'Settings', icon: <SettingsIcon />, onClick: () => {} }
|
|
111
|
+
* ]}
|
|
112
|
+
* />
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* Collapsible sidebar with header
|
|
117
|
+
* ```tsx
|
|
118
|
+
* <SideMenu
|
|
119
|
+
* collapsed={isCollapsed}
|
|
120
|
+
* onCollapseToggle={setIsCollapsed}
|
|
121
|
+
* header={<Logo />}
|
|
122
|
+
* items={menuItems}
|
|
123
|
+
* />
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
declare const SideMenu: React.ForwardRefExoticComponent<SideMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
97
127
|
declare const _default: React.FC<SideMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
128
|
export default _default;
|
|
99
|
-
export {
|
|
129
|
+
export { SideMenu };
|
|
@@ -268,10 +268,64 @@ export interface TableProps<T = unknown> extends Omit<TableHTMLAttributes<HTMLTa
|
|
|
268
268
|
*/
|
|
269
269
|
onFiltersChange?: (filters: Record<string, string>) => void;
|
|
270
270
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Table component - Displays data in rows and columns with advanced features
|
|
273
|
+
*
|
|
274
|
+
* A comprehensive table component with support for sorting, selection, loading states,
|
|
275
|
+
* sticky columns, and customizable rendering.
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* Basic usage
|
|
279
|
+
* ```tsx
|
|
280
|
+
* const columns = [
|
|
281
|
+
* { key: 'name', header: 'Name' },
|
|
282
|
+
* { key: 'email', header: 'Email' },
|
|
283
|
+
* { key: 'role', header: 'Role', align: 'center' },
|
|
284
|
+
* ];
|
|
285
|
+
*
|
|
286
|
+
* const data = [
|
|
287
|
+
* { id: 1, name: 'John Doe', email: 'john@example.com', role: 'Admin' },
|
|
288
|
+
* ];
|
|
289
|
+
*
|
|
290
|
+
* <Table
|
|
291
|
+
* columns={columns}
|
|
292
|
+
* data={data}
|
|
293
|
+
* getRowKey={(row) => row.id}
|
|
294
|
+
* striped
|
|
295
|
+
* />
|
|
296
|
+
* ```
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* With sorting and row click
|
|
300
|
+
* ```tsx
|
|
301
|
+
* <Table
|
|
302
|
+
* columns={columns}
|
|
303
|
+
* data={data}
|
|
304
|
+
* getRowKey={(row) => row.id}
|
|
305
|
+
* sortable
|
|
306
|
+
* onRowClick={(row) => console.log('Clicked:', row)}
|
|
307
|
+
* />
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* With loading state and custom rendering
|
|
312
|
+
* ```tsx
|
|
313
|
+
* <Table
|
|
314
|
+
* columns={[
|
|
315
|
+
* { key: 'name', header: 'Name', sticky: 'left' },
|
|
316
|
+
* { key: 'status', header: 'Status', render: (row) => <Badge>{row.status}</Badge> }
|
|
317
|
+
* ]}
|
|
318
|
+
* data={data}
|
|
319
|
+
* getRowKey={(row) => row.id}
|
|
320
|
+
* loading={isLoading}
|
|
321
|
+
* maxHeight="400px"
|
|
322
|
+
* />
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
declare function Table<T = unknown>({ columns, data, getRowKey, striped, hoverable, bordered, size, caption, emptyMessage, emptyStateIcon, emptyStateDescription, loading, loadingContent, skeletonLoader, skeletonRows, scrollable, maxHeight, onRowClick, isRowSelected, onRowSelect, sortable, sortConfig, onSortChange, className, containerClassName, selectable, selectedRows, onSelectionChange, pagination, page, rowsPerPage, rowsPerPageOptions, onPageChange, onRowsPerPageChange, dense, expandableRows, renderExpandedRow, expandedRows, onExpandRow, stickyHeader, toolbar, filterable, filters, onFiltersChange, ...props }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
326
|
+
declare namespace Table {
|
|
327
|
+
var displayName: string;
|
|
328
|
+
}
|
|
275
329
|
declare const _default: React.FC<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
276
330
|
export default _default;
|
|
277
|
-
export {
|
|
331
|
+
export { Table };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './Tabs.css';
|
|
4
|
+
export type TabsVariant = 'line' | 'enclosed' | 'soft-rounded' | 'solid-rounded' | 'segmented';
|
|
5
|
+
export type TabsOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
7
|
+
/**
|
|
8
|
+
* The initial active tab value (uncontrolled mode)
|
|
9
|
+
*/
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The active tab value (controlled mode)
|
|
13
|
+
*/
|
|
14
|
+
value?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback when the active tab changes
|
|
17
|
+
*/
|
|
18
|
+
onChange?: (value: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Visual style of the tabs
|
|
21
|
+
* @default 'line'
|
|
22
|
+
*/
|
|
23
|
+
variant?: TabsVariant;
|
|
24
|
+
/**
|
|
25
|
+
* Orientation of the tabs
|
|
26
|
+
* @default 'horizontal'
|
|
27
|
+
*/
|
|
28
|
+
orientation?: TabsOrientation;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the tabs
|
|
31
|
+
* @default 'md'
|
|
32
|
+
*/
|
|
33
|
+
size?: Size;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to lazy mount tab panels
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
isLazy?: boolean;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
declare const TabsWithParsedClasses: {
|
|
42
|
+
(props: TabsProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
45
|
+
export { TabsWithParsedClasses as Tabs };
|
|
46
|
+
export interface TabListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* If true, shows scroll buttons when tabs overflow (horizontal only)
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
showScrollControls?: boolean;
|
|
53
|
+
}
|
|
54
|
+
declare const TabListWithParsedClasses: {
|
|
55
|
+
(props: TabListProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
export { TabListWithParsedClasses as TabList };
|
|
59
|
+
export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
60
|
+
/**
|
|
61
|
+
* The value of the tab. Must be unique within the Tabs component.
|
|
62
|
+
*/
|
|
63
|
+
value: string;
|
|
64
|
+
/**
|
|
65
|
+
* Icon to display before the label
|
|
66
|
+
*/
|
|
67
|
+
icon?: ReactNode;
|
|
68
|
+
children?: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
declare const TabWithParsedClasses: {
|
|
71
|
+
(props: TabProps & React.RefAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
displayName: string;
|
|
73
|
+
};
|
|
74
|
+
export { TabWithParsedClasses as Tab };
|
|
75
|
+
export interface TabPanelsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
76
|
+
children: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
declare const TabPanelsWithParsedClasses: {
|
|
79
|
+
(props: TabPanelsProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
displayName: string;
|
|
81
|
+
};
|
|
82
|
+
export { TabPanelsWithParsedClasses as TabPanels };
|
|
83
|
+
export interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
84
|
+
/**
|
|
85
|
+
* The value corresponding to the Tab value
|
|
86
|
+
*/
|
|
87
|
+
value: string;
|
|
88
|
+
children: ReactNode;
|
|
89
|
+
}
|
|
90
|
+
declare const TabPanelWithParsedClasses: {
|
|
91
|
+
(props: TabPanelProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
displayName: string;
|
|
93
|
+
};
|
|
94
|
+
export { TabPanelWithParsedClasses as TabPanel };
|
|
@@ -111,10 +111,56 @@ export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'colo
|
|
|
111
111
|
*/
|
|
112
112
|
children?: React.ReactNode;
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Text component - Versatile typography component with theme integration
|
|
116
|
+
*
|
|
117
|
+
* A comprehensive text component that provides consistent typography across your application
|
|
118
|
+
* with full theming support and extensive customization options.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* Basic usage with variants
|
|
122
|
+
* ```tsx
|
|
123
|
+
* <Text variant="h1">Heading 1</Text>
|
|
124
|
+
* <Text variant="body1">Regular body text</Text>
|
|
125
|
+
* <Text variant="caption" color="neutral.500">Small caption text</Text>
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* Custom styling
|
|
130
|
+
* ```tsx
|
|
131
|
+
* <Text
|
|
132
|
+
* variant="body1"
|
|
133
|
+
* weight="bold"
|
|
134
|
+
* align="center"
|
|
135
|
+
* color="primary.600"
|
|
136
|
+
* >
|
|
137
|
+
* Centered bold text
|
|
138
|
+
* </Text>
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* Truncation and line clamping
|
|
143
|
+
* ```tsx
|
|
144
|
+
* <Text truncate>This text will be truncated with ellipsis...</Text>
|
|
145
|
+
* <Text lineClamp={3}>This text will show only 3 lines before truncating...</Text>
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* Gradient text
|
|
150
|
+
* ```tsx
|
|
151
|
+
* <Text variant="h2" gradient={['#667eea', '#764ba2']}>
|
|
152
|
+
* Gradient Heading
|
|
153
|
+
* </Text>
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* Semantic HTML control
|
|
158
|
+
* ```tsx
|
|
159
|
+
* <Text variant="h1" as="h2">Visually h1, semantically h2</Text>
|
|
160
|
+
* <Text variant="body1" as="label" htmlFor="input">Label with body style</Text>
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
119
164
|
declare const _default: React.FC<TextProps & React.RefAttributes<HTMLElement>>;
|
|
120
165
|
export default _default;
|
|
166
|
+
export { Text };
|