@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
|
@@ -51,64 +51,10 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
51
51
|
*/
|
|
52
52
|
inputClassName?: string;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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>>;
|
|
54
|
+
declare const CheckboxWithParsedClasses: {
|
|
55
|
+
(props: CheckboxProps & React.RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
112
58
|
declare const _default: React.FC<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
113
59
|
export default _default;
|
|
114
|
-
export { Checkbox };
|
|
60
|
+
export { CheckboxWithParsedClasses as Checkbox };
|
|
@@ -64,58 +64,10 @@ export interface CheckboxGroupProps extends Omit<React.HTMLAttributes<HTMLDivEle
|
|
|
64
64
|
*/
|
|
65
65
|
className?: string;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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>>;
|
|
67
|
+
declare const CheckboxGroupWithParsedClasses: {
|
|
68
|
+
(props: CheckboxGroupProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
120
71
|
declare const _default: React.FC<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
72
|
export default _default;
|
|
73
|
+
export { CheckboxGroupWithParsedClasses as CheckboxGroup };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, MouseEvent } from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
2
3
|
import './Chip.css';
|
|
3
4
|
export interface ChipProps {
|
|
4
5
|
/**
|
|
@@ -9,7 +10,7 @@ export interface ChipProps {
|
|
|
9
10
|
* Size of the chip
|
|
10
11
|
* @default 'md'
|
|
11
12
|
*/
|
|
12
|
-
size?:
|
|
13
|
+
size?: Size;
|
|
13
14
|
/**
|
|
14
15
|
* Visual style variant
|
|
15
16
|
* @default 'filled'
|
|
@@ -55,37 +56,10 @@ export interface ChipProps {
|
|
|
55
56
|
*/
|
|
56
57
|
'data-testid'?: string;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* filters, selections, or categories with optional delete functionality.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* Basic usage
|
|
66
|
-
* ```tsx
|
|
67
|
-
* <Chip label="React" />
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* With delete functionality
|
|
72
|
-
* ```tsx
|
|
73
|
-
* <Chip
|
|
74
|
-
* label="JavaScript"
|
|
75
|
-
* onDelete={() => handleRemove('js')}
|
|
76
|
-
* />
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* With avatar
|
|
81
|
-
* ```tsx
|
|
82
|
-
* <Chip
|
|
83
|
-
* label="John Doe"
|
|
84
|
-
* avatar="https://avatar.url/john.jpg"
|
|
85
|
-
* variant="outlined"
|
|
86
|
-
* />
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
declare const ChipWithParsedClasses: {
|
|
60
|
+
(props: ChipProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
90
63
|
declare const _default: React.FC<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
91
64
|
export default _default;
|
|
65
|
+
export { ChipWithParsedClasses as Chip };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React, { TableHTMLAttributes } from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
3
|
+
import './DataGrid.css';
|
|
4
|
+
export interface GridFilterOperator {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => (value: any) => boolean;
|
|
8
|
+
InputComponent?: React.ComponentType<FilterInputComponentProps>;
|
|
9
|
+
}
|
|
10
|
+
export interface FilterInputComponentProps {
|
|
11
|
+
item: GridFilterItem;
|
|
12
|
+
applyValue: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface GridFilterItem {
|
|
15
|
+
id?: number;
|
|
16
|
+
field: string;
|
|
17
|
+
operator: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GridFilterModel {
|
|
21
|
+
items: GridFilterItem[];
|
|
22
|
+
logicOperator?: 'and' | 'or';
|
|
23
|
+
}
|
|
24
|
+
export interface DataGridColumn<T = any> {
|
|
25
|
+
field: string;
|
|
26
|
+
headerName: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
minWidth?: number;
|
|
29
|
+
maxWidth?: number;
|
|
30
|
+
flex?: number;
|
|
31
|
+
sortable?: boolean;
|
|
32
|
+
filterable?: boolean;
|
|
33
|
+
type?: 'string' | 'number' | 'date' | 'boolean' | 'singleSelect';
|
|
34
|
+
valueGetter?: (row: T) => any;
|
|
35
|
+
valueFormatter?: (value: any) => string;
|
|
36
|
+
renderCell?: (params: {
|
|
37
|
+
row: T;
|
|
38
|
+
value: any;
|
|
39
|
+
field: string;
|
|
40
|
+
}) => React.ReactNode;
|
|
41
|
+
filterOperators?: GridFilterOperator[];
|
|
42
|
+
align?: 'left' | 'center' | 'right';
|
|
43
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
44
|
+
/**
|
|
45
|
+
* Pin/freeze column to left or right side
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
pinned?: 'left' | 'right' | false;
|
|
49
|
+
}
|
|
50
|
+
export type GridRowSelectionModel = (string | number)[];
|
|
51
|
+
export interface DataGridProps<T = any> extends Omit<TableHTMLAttributes<HTMLDivElement>, 'children'> {
|
|
52
|
+
columns: DataGridColumn<T>[];
|
|
53
|
+
rows: T[];
|
|
54
|
+
getRowId?: (row: T, index?: number) => string | number;
|
|
55
|
+
filterModel?: GridFilterModel;
|
|
56
|
+
onFilterModelChange?: (model: GridFilterModel) => void;
|
|
57
|
+
initialState?: {
|
|
58
|
+
filter?: {
|
|
59
|
+
filterModel?: GridFilterModel;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
disableColumnFilter?: boolean;
|
|
63
|
+
ignoreDiacritics?: boolean;
|
|
64
|
+
sortModel?: {
|
|
65
|
+
field: string;
|
|
66
|
+
sort: 'asc' | 'desc';
|
|
67
|
+
}[];
|
|
68
|
+
onSortModelChange?: (model: {
|
|
69
|
+
field: string;
|
|
70
|
+
sort: 'asc' | 'desc';
|
|
71
|
+
}[]) => void;
|
|
72
|
+
checkboxSelection?: boolean;
|
|
73
|
+
rowSelectionModel?: GridRowSelectionModel;
|
|
74
|
+
onRowSelectionModelChange?: (model: GridRowSelectionModel) => void;
|
|
75
|
+
pagination?: boolean;
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
pageSizeOptions?: number[];
|
|
78
|
+
loading?: boolean;
|
|
79
|
+
autoHeight?: boolean;
|
|
80
|
+
density?: 'compact' | 'standard' | 'comfortable';
|
|
81
|
+
disableColumnMenu?: boolean;
|
|
82
|
+
hideFooter?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Size of the data grid
|
|
85
|
+
* @default theme.defaultSize
|
|
86
|
+
*/
|
|
87
|
+
size?: Size;
|
|
88
|
+
className?: string;
|
|
89
|
+
sx?: Record<string, any>;
|
|
90
|
+
}
|
|
91
|
+
declare const DataGridWithParsedClasses: {
|
|
92
|
+
(props: DataGridProps<any>): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
declare const _default: React.FC<DataGridProps>;
|
|
96
|
+
export default _default;
|
|
97
|
+
export { DataGridWithParsedClasses as DataGrid };
|
|
@@ -42,77 +42,10 @@ export interface DividerProps extends React.HTMLAttributes<HTMLHRElement | HTMLD
|
|
|
42
42
|
*/
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>>;
|
|
45
|
+
declare const DividerWithParsedClasses: {
|
|
46
|
+
(props: DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
|
117
49
|
declare const _default: React.FC<DividerProps & React.RefAttributes<HTMLHRElement | HTMLDivElement>>;
|
|
118
50
|
export default _default;
|
|
51
|
+
export { DividerWithParsedClasses as Divider };
|
|
@@ -36,31 +36,10 @@ 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
|
-
|
|
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
|
-
export declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
declare const FlexWithParsedClasses: {
|
|
40
|
+
(props: FlexProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
65
43
|
declare const _default: React.FC<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
44
|
export default _default;
|
|
45
|
+
export { FlexWithParsedClasses as Flex };
|
|
@@ -75,82 +75,10 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
75
75
|
*/
|
|
76
76
|
children?: React.ReactNode;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
declare const GridWithParsedClasses: {
|
|
79
|
+
(props: GridProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
displayName: string;
|
|
81
|
+
};
|
|
155
82
|
declare const _default: React.FC<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
156
83
|
export default _default;
|
|
84
|
+
export { GridWithParsedClasses as Grid };
|
|
@@ -101,38 +101,10 @@ export interface HeaderProps {
|
|
|
101
101
|
*/
|
|
102
102
|
sticky?: boolean;
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
export declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
declare const HeaderWithParsedClasses: {
|
|
105
|
+
(props: HeaderProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
displayName: string;
|
|
107
|
+
};
|
|
137
108
|
declare const _default: React.FC<HeaderProps & React.RefAttributes<HTMLElement>>;
|
|
138
109
|
export default _default;
|
|
110
|
+
export { HeaderWithParsedClasses as Header };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { Size } from '../../theme';
|
|
2
3
|
import './Input.css';
|
|
3
4
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
5
|
/**
|
|
@@ -21,9 +22,9 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
21
22
|
success?: string;
|
|
22
23
|
/**
|
|
23
24
|
* Size of the input
|
|
24
|
-
* @default
|
|
25
|
+
* @default theme.defaultSize
|
|
25
26
|
*/
|
|
26
|
-
size?:
|
|
27
|
+
size?: Size;
|
|
27
28
|
/**
|
|
28
29
|
* If true, input will take full width of its container
|
|
29
30
|
* @default false
|
|
@@ -73,57 +74,10 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
73
74
|
*/
|
|
74
75
|
suffix?: string;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
* clear functionality, and various validation states.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* Basic usage
|
|
84
|
-
* ```tsx
|
|
85
|
-
* <Input
|
|
86
|
-
* label="Email"
|
|
87
|
-
* type="email"
|
|
88
|
-
* placeholder="Enter your email"
|
|
89
|
-
* helperText="We'll never share your email"
|
|
90
|
-
* />
|
|
91
|
-
* ```
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* With error state
|
|
95
|
-
* ```tsx
|
|
96
|
-
* <Input
|
|
97
|
-
* label="Username"
|
|
98
|
-
* error="Username is already taken"
|
|
99
|
-
* value={username}
|
|
100
|
-
* onChange={(e) => setUsername(e.target.value)}
|
|
101
|
-
* />
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* With icons and clear button
|
|
106
|
-
* ```tsx
|
|
107
|
-
* <Input
|
|
108
|
-
* label="Search"
|
|
109
|
-
* leftIcon={<SearchIcon />}
|
|
110
|
-
* clearable
|
|
111
|
-
* onClear={() => setSearch('')}
|
|
112
|
-
* />
|
|
113
|
-
* ```
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* With character counter
|
|
117
|
-
* ```tsx
|
|
118
|
-
* <Input
|
|
119
|
-
* label="Bio"
|
|
120
|
-
* maxLength={100}
|
|
121
|
-
* showCount
|
|
122
|
-
* value={bio}
|
|
123
|
-
* onChange={(e) => setBio(e.target.value)}
|
|
124
|
-
* />
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
77
|
+
declare const InputWithParsedClasses: {
|
|
78
|
+
(props: InputProps & React.RefAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
128
81
|
declare const _default: React.FC<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
129
82
|
export default _default;
|
|
83
|
+
export { InputWithParsedClasses as Input };
|
|
@@ -78,37 +78,10 @@ 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
|
-
|
|
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
|
-
export declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
declare const MenuWithParsedClasses: {
|
|
82
|
+
(props: MenuProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
113
85
|
declare const _default: React.FC<MenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
114
86
|
export default _default;
|
|
87
|
+
export { MenuWithParsedClasses as Menu };
|