@vtx-ui/react 0.0.1-beta.1

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.
Files changed (133) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +228 -0
  3. package/dist/components/Accordion/Accordion.d.ts +31 -0
  4. package/dist/components/Accordion/Accordion.examples.d.ts +3 -0
  5. package/dist/components/Accordion/AccordionItem.d.ts +5 -0
  6. package/dist/components/Accordion/index.d.ts +4 -0
  7. package/dist/components/Accordion/types.d.ts +98 -0
  8. package/dist/components/Alert/Alert.d.ts +119 -0
  9. package/dist/components/Alert/index.d.ts +3 -0
  10. package/dist/components/Avatar/Avatar.d.ts +63 -0
  11. package/dist/components/Avatar/index.d.ts +3 -0
  12. package/dist/components/Badge/Badge.d.ts +81 -0
  13. package/dist/components/Badge/index.d.ts +3 -0
  14. package/dist/components/Button/Button.d.ts +117 -0
  15. package/dist/components/Button/index.d.ts +3 -0
  16. package/dist/components/Card/Card.d.ts +120 -0
  17. package/dist/components/Card/index.d.ts +3 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts +114 -0
  19. package/dist/components/Checkbox/index.d.ts +3 -0
  20. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +121 -0
  21. package/dist/components/CheckboxGroup/index.d.ts +3 -0
  22. package/dist/components/Chip/Chip.d.ts +91 -0
  23. package/dist/components/Chip/index.d.ts +3 -0
  24. package/dist/components/Divider/Divider.d.ts +118 -0
  25. package/dist/components/Divider/index.d.ts +3 -0
  26. package/dist/components/Flex/Flex.d.ts +66 -0
  27. package/dist/components/Flex/index.d.ts +3 -0
  28. package/dist/components/Grid/Grid.d.ts +156 -0
  29. package/dist/components/Grid/index.d.ts +3 -0
  30. package/dist/components/Header/Header.d.ts +138 -0
  31. package/dist/components/Header/index.d.ts +3 -0
  32. package/dist/components/Input/Input.d.ts +129 -0
  33. package/dist/components/Input/index.d.ts +3 -0
  34. package/dist/components/Menu/Menu.d.ts +114 -0
  35. package/dist/components/Menu/index.d.ts +4 -0
  36. package/dist/components/Modal/Modal.d.ts +201 -0
  37. package/dist/components/Modal/index.d.ts +3 -0
  38. package/dist/components/MultiSelect/MultiSelect.d.ts +190 -0
  39. package/dist/components/MultiSelect/index.d.ts +3 -0
  40. package/dist/components/Radio/Radio.d.ts +105 -0
  41. package/dist/components/Radio/index.d.ts +3 -0
  42. package/dist/components/RadioGroup/RadioGroup.d.ts +134 -0
  43. package/dist/components/RadioGroup/index.d.ts +3 -0
  44. package/dist/components/Select/Select.d.ts +169 -0
  45. package/dist/components/Select/index.d.ts +3 -0
  46. package/dist/components/SideMenu/SideMenu.d.ts +118 -0
  47. package/dist/components/SideMenu/index.d.ts +4 -0
  48. package/dist/components/Table/Table.d.ts +211 -0
  49. package/dist/components/Table/index.d.ts +3 -0
  50. package/dist/components/Text/Text.d.ts +160 -0
  51. package/dist/components/Text/index.d.ts +3 -0
  52. package/dist/components/Toast/Toast.d.ts +56 -0
  53. package/dist/components/Toast/ToastContainer.d.ts +6 -0
  54. package/dist/components/Toast/index.d.ts +5 -0
  55. package/dist/components/Toast/types.d.ts +148 -0
  56. package/dist/components/Toast/useToast.d.ts +34 -0
  57. package/dist/components/Tooltip/Tooltip.d.ts +108 -0
  58. package/dist/components/Tooltip/index.d.ts +3 -0
  59. package/dist/hooks/index.d.ts +85 -0
  60. package/dist/hooks/useTheme.d.ts +268 -0
  61. package/dist/index.cjs.js +2 -0
  62. package/dist/index.cjs.js.map +1 -0
  63. package/dist/index.d.ts +55 -0
  64. package/dist/index.esm.js +2 -0
  65. package/dist/index.esm.js.map +1 -0
  66. package/dist/theme/ThemeProvider.d.ts +39 -0
  67. package/dist/theme/cssVariables.d.ts +9 -0
  68. package/dist/theme/index.d.ts +6 -0
  69. package/dist/theme/tokens.d.ts +258 -0
  70. package/dist/types/components/Accordion/Accordion.d.ts +31 -0
  71. package/dist/types/components/Accordion/Accordion.examples.d.ts +3 -0
  72. package/dist/types/components/Accordion/AccordionItem.d.ts +5 -0
  73. package/dist/types/components/Accordion/index.d.ts +4 -0
  74. package/dist/types/components/Accordion/types.d.ts +98 -0
  75. package/dist/types/components/Alert/Alert.d.ts +119 -0
  76. package/dist/types/components/Alert/index.d.ts +3 -0
  77. package/dist/types/components/Avatar/Avatar.d.ts +63 -0
  78. package/dist/types/components/Avatar/index.d.ts +3 -0
  79. package/dist/types/components/Badge/Badge.d.ts +81 -0
  80. package/dist/types/components/Badge/index.d.ts +3 -0
  81. package/dist/types/components/Button/Button.d.ts +117 -0
  82. package/dist/types/components/Button/index.d.ts +3 -0
  83. package/dist/types/components/Card/Card.d.ts +120 -0
  84. package/dist/types/components/Card/index.d.ts +3 -0
  85. package/dist/types/components/Checkbox/Checkbox.d.ts +114 -0
  86. package/dist/types/components/Checkbox/index.d.ts +3 -0
  87. package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +121 -0
  88. package/dist/types/components/CheckboxGroup/index.d.ts +3 -0
  89. package/dist/types/components/Chip/Chip.d.ts +91 -0
  90. package/dist/types/components/Chip/index.d.ts +3 -0
  91. package/dist/types/components/Divider/Divider.d.ts +118 -0
  92. package/dist/types/components/Divider/index.d.ts +3 -0
  93. package/dist/types/components/Flex/Flex.d.ts +66 -0
  94. package/dist/types/components/Flex/index.d.ts +3 -0
  95. package/dist/types/components/Grid/Grid.d.ts +156 -0
  96. package/dist/types/components/Grid/index.d.ts +3 -0
  97. package/dist/types/components/Header/Header.d.ts +138 -0
  98. package/dist/types/components/Header/index.d.ts +3 -0
  99. package/dist/types/components/Input/Input.d.ts +129 -0
  100. package/dist/types/components/Input/index.d.ts +3 -0
  101. package/dist/types/components/Menu/Menu.d.ts +114 -0
  102. package/dist/types/components/Menu/index.d.ts +4 -0
  103. package/dist/types/components/Modal/Modal.d.ts +201 -0
  104. package/dist/types/components/Modal/index.d.ts +3 -0
  105. package/dist/types/components/MultiSelect/MultiSelect.d.ts +190 -0
  106. package/dist/types/components/MultiSelect/index.d.ts +3 -0
  107. package/dist/types/components/Radio/Radio.d.ts +105 -0
  108. package/dist/types/components/Radio/index.d.ts +3 -0
  109. package/dist/types/components/RadioGroup/RadioGroup.d.ts +134 -0
  110. package/dist/types/components/RadioGroup/index.d.ts +3 -0
  111. package/dist/types/components/Select/Select.d.ts +169 -0
  112. package/dist/types/components/Select/index.d.ts +3 -0
  113. package/dist/types/components/SideMenu/SideMenu.d.ts +118 -0
  114. package/dist/types/components/SideMenu/index.d.ts +4 -0
  115. package/dist/types/components/Table/Table.d.ts +211 -0
  116. package/dist/types/components/Table/index.d.ts +3 -0
  117. package/dist/types/components/Text/Text.d.ts +160 -0
  118. package/dist/types/components/Text/index.d.ts +3 -0
  119. package/dist/types/components/Toast/Toast.d.ts +56 -0
  120. package/dist/types/components/Toast/ToastContainer.d.ts +6 -0
  121. package/dist/types/components/Toast/index.d.ts +5 -0
  122. package/dist/types/components/Toast/types.d.ts +148 -0
  123. package/dist/types/components/Toast/useToast.d.ts +34 -0
  124. package/dist/types/components/Tooltip/Tooltip.d.ts +108 -0
  125. package/dist/types/components/Tooltip/index.d.ts +3 -0
  126. package/dist/types/hooks/index.d.ts +85 -0
  127. package/dist/types/hooks/useTheme.d.ts +268 -0
  128. package/dist/types/index.d.ts +55 -0
  129. package/dist/types/theme/ThemeProvider.d.ts +39 -0
  130. package/dist/types/theme/cssVariables.d.ts +9 -0
  131. package/dist/types/theme/index.d.ts +6 -0
  132. package/dist/types/theme/tokens.d.ts +258 -0
  133. package/package.json +59 -0
@@ -0,0 +1,114 @@
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 };
@@ -0,0 +1,3 @@
1
+ export { default as Checkbox } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
3
+ export { Checkbox as CheckboxComponent } from './Checkbox';
@@ -0,0 +1,121 @@
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;
@@ -0,0 +1,3 @@
1
+ export { default as CheckboxGroup } from './CheckboxGroup';
2
+ export type { CheckboxGroupProps, CheckboxOption } from './CheckboxGroup';
3
+ export { CheckboxGroup as CheckboxGroupComponent } from './CheckboxGroup';
@@ -0,0 +1,91 @@
1
+ import React, { ReactNode, MouseEvent } from 'react';
2
+ import './Chip.css';
3
+ export interface ChipProps {
4
+ /**
5
+ * The label text to display inside the chip
6
+ */
7
+ label: string;
8
+ /**
9
+ * Size of the chip
10
+ * @default 'md'
11
+ */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /**
14
+ * Visual style variant
15
+ * @default 'filled'
16
+ */
17
+ variant?: 'filled' | 'outlined' | 'light';
18
+ /**
19
+ * Color theme of the chip
20
+ * @default 'default'
21
+ */
22
+ color?: 'default' | 'primary' | 'success' | 'error' | 'warning' | 'info';
23
+ /**
24
+ * Icon to display at the start of the chip
25
+ */
26
+ icon?: ReactNode;
27
+ /**
28
+ * Avatar image URL to display at the start
29
+ */
30
+ avatar?: string;
31
+ /**
32
+ * If true, shows a delete/close button
33
+ * @default false
34
+ */
35
+ onDelete?: (event: MouseEvent<HTMLButtonElement>) => void;
36
+ /**
37
+ * Callback when chip is clicked
38
+ */
39
+ onClick?: (event: MouseEvent<HTMLDivElement>) => void;
40
+ /**
41
+ * If true, chip cannot be interacted with
42
+ * @default false
43
+ */
44
+ disabled?: boolean;
45
+ /**
46
+ * Additional CSS class names
47
+ */
48
+ className?: string;
49
+ /**
50
+ * Custom aria-label for accessibility
51
+ */
52
+ 'aria-label'?: string;
53
+ /**
54
+ * Data attribute for testing
55
+ */
56
+ 'data-testid'?: string;
57
+ }
58
+ /**
59
+ * Chip component - Compact element for displaying tags, labels, or selections
60
+ *
61
+ * A versatile chip component for representing small pieces of information like tags,
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>>;
90
+ declare const _default: React.FC<ChipProps & React.RefAttributes<HTMLDivElement>>;
91
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as Chip } from './Chip';
2
+ export type { ChipProps } from './Chip';
3
+ export { Chip as ChipComponent } from './Chip';
@@ -0,0 +1,118 @@
1
+ import React from 'react';
2
+ import './Divider.css';
3
+ export interface DividerProps extends React.HTMLAttributes<HTMLHRElement | HTMLDivElement> {
4
+ /**
5
+ * Align the content within the divider
6
+ * Only works when children are provided
7
+ * @default 'center'
8
+ */
9
+ textAlign?: 'left' | 'center' | 'right';
10
+ /**
11
+ * The component orientation
12
+ * @default 'horizontal'
13
+ */
14
+ orientation?: 'horizontal' | 'vertical';
15
+ /**
16
+ * The variant to use
17
+ * @default 'fullWidth'
18
+ */
19
+ variant?: 'fullWidth' | 'inset' | 'middle';
20
+ /**
21
+ * If true, the divider will have a lighter color
22
+ * @default false
23
+ */
24
+ light?: boolean;
25
+ /**
26
+ * If true, the divider will be optimized for use in flex containers
27
+ * @default false
28
+ */
29
+ flexItem?: boolean;
30
+ /**
31
+ * The content of the divider
32
+ */
33
+ children?: React.ReactNode;
34
+ /**
35
+ * The component used for the root node
36
+ * Either a string to use a HTML element or a component
37
+ * @default 'hr'
38
+ */
39
+ component?: React.ElementType;
40
+ /**
41
+ * Additional CSS class name
42
+ */
43
+ className?: string;
44
+ }
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
+ export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement | HTMLHRElement>>;
117
+ declare const _default: React.FC<DividerProps & React.RefAttributes<HTMLHRElement | HTMLDivElement>>;
118
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as Divider } from './Divider';
2
+ export type { DividerProps } from './Divider';
3
+ export { Divider as DividerComponent } from './Divider';
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import './Flex.css';
3
+ export interface FlexProps {
4
+ /** Child elements */
5
+ children?: React.ReactNode;
6
+ /** Flex direction */
7
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
8
+ /** Flex wrap behavior */
9
+ wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
10
+ /** Justify content alignment */
11
+ justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
12
+ /** Align items alignment */
13
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
14
+ /** Align content alignment (multi-line) */
15
+ alignContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'stretch';
16
+ /** Gap between items */
17
+ gap?: number | string;
18
+ /** Row gap (overrides gap for rows) */
19
+ rowGap?: number | string;
20
+ /** Column gap (overrides gap for columns) */
21
+ columnGap?: number | string;
22
+ /** Whether the container is inline-flex */
23
+ inline?: boolean;
24
+ /** Whether the container takes full width (default: true) */
25
+ fullWidth?: boolean;
26
+ /** Flex grow value */
27
+ grow?: number;
28
+ /** Flex shrink value */
29
+ shrink?: number;
30
+ /** Flex basis value */
31
+ basis?: string | number;
32
+ /** Custom className */
33
+ className?: string;
34
+ /** Custom style */
35
+ style?: React.CSSProperties;
36
+ /** HTML element to render as */
37
+ as?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'main';
38
+ }
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
+ export declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
65
+ declare const _default: React.FC<FlexProps & React.RefAttributes<HTMLDivElement>>;
66
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as Flex } from './Flex';
2
+ export type { FlexProps } from './Flex';
3
+ export { Flex as FlexComponent } from './Flex';
@@ -0,0 +1,156 @@
1
+ import React from 'react';
2
+ import './Grid.css';
3
+ type GridSize = boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
+ type GridSpacing = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
5
+ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ /**
7
+ * If true, the component will have the flex container behavior
8
+ * @default false
9
+ */
10
+ container?: boolean;
11
+ /**
12
+ * If true, the component will have the flex item behavior
13
+ * @default false
14
+ */
15
+ item?: boolean;
16
+ /**
17
+ * Defines the space between items (applies to container)
18
+ * @default 0
19
+ */
20
+ spacing?: GridSpacing;
21
+ /**
22
+ * Defines the row gap between items (applies to container)
23
+ */
24
+ rowSpacing?: GridSpacing;
25
+ /**
26
+ * Defines the column gap between items (applies to container)
27
+ */
28
+ columnSpacing?: GridSpacing;
29
+ /**
30
+ * Number of columns (1-12) for all breakpoints
31
+ */
32
+ xs?: GridSize;
33
+ /**
34
+ * Number of columns (1-12) for small devices (≥600px)
35
+ */
36
+ sm?: GridSize;
37
+ /**
38
+ * Number of columns (1-12) for medium devices (≥960px)
39
+ */
40
+ md?: GridSize;
41
+ /**
42
+ * Number of columns (1-12) for large devices (≥1280px)
43
+ */
44
+ lg?: GridSize;
45
+ /**
46
+ * Number of columns (1-12) for extra large devices (≥1920px)
47
+ */
48
+ xl?: GridSize;
49
+ /**
50
+ * Defines the justify-content style property
51
+ */
52
+ justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
53
+ /**
54
+ * Defines the align-items style property
55
+ */
56
+ alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
57
+ /**
58
+ * Defines the align-content style property
59
+ */
60
+ alignContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'stretch';
61
+ /**
62
+ * Defines the flex-direction style property
63
+ */
64
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
65
+ /**
66
+ * Defines the flex-wrap style property
67
+ */
68
+ wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
69
+ /**
70
+ * Additional CSS class name
71
+ */
72
+ className?: string;
73
+ /**
74
+ * The content of the component
75
+ */
76
+ children?: React.ReactNode;
77
+ }
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
+ export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
155
+ declare const _default: React.FC<GridProps & React.RefAttributes<HTMLDivElement>>;
156
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as Grid } from './Grid';
2
+ export type { GridProps } from './Grid';
3
+ export { Grid as GridComponent } from './Grid';