@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.
- package/LICENSE +21 -0
- package/README.md +228 -0
- package/dist/components/Accordion/Accordion.d.ts +31 -0
- package/dist/components/Accordion/Accordion.examples.d.ts +3 -0
- package/dist/components/Accordion/AccordionItem.d.ts +5 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/types.d.ts +98 -0
- package/dist/components/Alert/Alert.d.ts +119 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Avatar/Avatar.d.ts +63 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Badge/Badge.d.ts +81 -0
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +117 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Card/Card.d.ts +120 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.d.ts +114 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +121 -0
- package/dist/components/CheckboxGroup/index.d.ts +3 -0
- package/dist/components/Chip/Chip.d.ts +91 -0
- package/dist/components/Chip/index.d.ts +3 -0
- package/dist/components/Divider/Divider.d.ts +118 -0
- package/dist/components/Divider/index.d.ts +3 -0
- package/dist/components/Flex/Flex.d.ts +66 -0
- package/dist/components/Flex/index.d.ts +3 -0
- package/dist/components/Grid/Grid.d.ts +156 -0
- package/dist/components/Grid/index.d.ts +3 -0
- package/dist/components/Header/Header.d.ts +138 -0
- package/dist/components/Header/index.d.ts +3 -0
- package/dist/components/Input/Input.d.ts +129 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Menu/Menu.d.ts +114 -0
- package/dist/components/Menu/index.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts +201 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +190 -0
- package/dist/components/MultiSelect/index.d.ts +3 -0
- package/dist/components/Radio/Radio.d.ts +105 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +134 -0
- package/dist/components/RadioGroup/index.d.ts +3 -0
- package/dist/components/Select/Select.d.ts +169 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/SideMenu/SideMenu.d.ts +118 -0
- package/dist/components/SideMenu/index.d.ts +4 -0
- package/dist/components/Table/Table.d.ts +211 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Text/Text.d.ts +160 -0
- package/dist/components/Text/index.d.ts +3 -0
- package/dist/components/Toast/Toast.d.ts +56 -0
- package/dist/components/Toast/ToastContainer.d.ts +6 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/types.d.ts +148 -0
- package/dist/components/Toast/useToast.d.ts +34 -0
- package/dist/components/Tooltip/Tooltip.d.ts +108 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/hooks/index.d.ts +85 -0
- package/dist/hooks/useTheme.d.ts +268 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +39 -0
- package/dist/theme/cssVariables.d.ts +9 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/tokens.d.ts +258 -0
- package/dist/types/components/Accordion/Accordion.d.ts +31 -0
- package/dist/types/components/Accordion/Accordion.examples.d.ts +3 -0
- package/dist/types/components/Accordion/AccordionItem.d.ts +5 -0
- package/dist/types/components/Accordion/index.d.ts +4 -0
- package/dist/types/components/Accordion/types.d.ts +98 -0
- package/dist/types/components/Alert/Alert.d.ts +119 -0
- package/dist/types/components/Alert/index.d.ts +3 -0
- package/dist/types/components/Avatar/Avatar.d.ts +63 -0
- package/dist/types/components/Avatar/index.d.ts +3 -0
- package/dist/types/components/Badge/Badge.d.ts +81 -0
- package/dist/types/components/Badge/index.d.ts +3 -0
- package/dist/types/components/Button/Button.d.ts +117 -0
- package/dist/types/components/Button/index.d.ts +3 -0
- package/dist/types/components/Card/Card.d.ts +120 -0
- package/dist/types/components/Card/index.d.ts +3 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +114 -0
- package/dist/types/components/Checkbox/index.d.ts +3 -0
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +121 -0
- package/dist/types/components/CheckboxGroup/index.d.ts +3 -0
- package/dist/types/components/Chip/Chip.d.ts +91 -0
- package/dist/types/components/Chip/index.d.ts +3 -0
- package/dist/types/components/Divider/Divider.d.ts +118 -0
- package/dist/types/components/Divider/index.d.ts +3 -0
- package/dist/types/components/Flex/Flex.d.ts +66 -0
- package/dist/types/components/Flex/index.d.ts +3 -0
- package/dist/types/components/Grid/Grid.d.ts +156 -0
- package/dist/types/components/Grid/index.d.ts +3 -0
- package/dist/types/components/Header/Header.d.ts +138 -0
- package/dist/types/components/Header/index.d.ts +3 -0
- package/dist/types/components/Input/Input.d.ts +129 -0
- package/dist/types/components/Input/index.d.ts +3 -0
- package/dist/types/components/Menu/Menu.d.ts +114 -0
- package/dist/types/components/Menu/index.d.ts +4 -0
- package/dist/types/components/Modal/Modal.d.ts +201 -0
- package/dist/types/components/Modal/index.d.ts +3 -0
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +190 -0
- package/dist/types/components/MultiSelect/index.d.ts +3 -0
- package/dist/types/components/Radio/Radio.d.ts +105 -0
- package/dist/types/components/Radio/index.d.ts +3 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +134 -0
- package/dist/types/components/RadioGroup/index.d.ts +3 -0
- package/dist/types/components/Select/Select.d.ts +169 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/SideMenu/SideMenu.d.ts +118 -0
- package/dist/types/components/SideMenu/index.d.ts +4 -0
- package/dist/types/components/Table/Table.d.ts +211 -0
- package/dist/types/components/Table/index.d.ts +3 -0
- package/dist/types/components/Text/Text.d.ts +160 -0
- package/dist/types/components/Text/index.d.ts +3 -0
- package/dist/types/components/Toast/Toast.d.ts +56 -0
- package/dist/types/components/Toast/ToastContainer.d.ts +6 -0
- package/dist/types/components/Toast/index.d.ts +5 -0
- package/dist/types/components/Toast/types.d.ts +148 -0
- package/dist/types/components/Toast/useToast.d.ts +34 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +108 -0
- package/dist/types/components/Tooltip/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts +85 -0
- package/dist/types/hooks/useTheme.d.ts +268 -0
- package/dist/types/index.d.ts +55 -0
- package/dist/types/theme/ThemeProvider.d.ts +39 -0
- package/dist/types/theme/cssVariables.d.ts +9 -0
- package/dist/types/theme/index.d.ts +6 -0
- package/dist/types/theme/tokens.d.ts +258 -0
- package/package.json +59 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export { Button } from './components/Button';
|
|
2
|
+
export type { ButtonProps } from './components/Button';
|
|
3
|
+
export { Checkbox } from './components/Checkbox';
|
|
4
|
+
export type { CheckboxProps } from './components/Checkbox';
|
|
5
|
+
export { CheckboxGroup } from './components/CheckboxGroup';
|
|
6
|
+
export type { CheckboxGroupProps } from './components/CheckboxGroup';
|
|
7
|
+
export { Input } from './components/Input';
|
|
8
|
+
export type { InputProps } from './components/Input';
|
|
9
|
+
export { MultiSelect } from './components/MultiSelect';
|
|
10
|
+
export type { MultiSelectOption, MultiSelectProps } from './components/MultiSelect';
|
|
11
|
+
export { Radio } from './components/Radio';
|
|
12
|
+
export type { RadioProps } from './components/Radio';
|
|
13
|
+
export { RadioGroup } from './components/RadioGroup';
|
|
14
|
+
export type { RadioGroupProps } from './components/RadioGroup';
|
|
15
|
+
export { Select } from './components/Select';
|
|
16
|
+
export type { SelectOption, SelectProps } from './components/Select';
|
|
17
|
+
export { Accordion, AccordionItem } from './components/Accordion';
|
|
18
|
+
export type { AccordionItemProps, AccordionProps } from './components/Accordion/types';
|
|
19
|
+
export { Alert } from './components/Alert';
|
|
20
|
+
export type { AlertProps } from './components/Alert';
|
|
21
|
+
export { Chip } from './components/Chip';
|
|
22
|
+
export type { ChipProps } from './components/Chip';
|
|
23
|
+
export { Menu, MenuItem } from './components/Menu';
|
|
24
|
+
export type { MenuItemProps, MenuProps } from './components/Menu';
|
|
25
|
+
export { Modal } from './components/Modal';
|
|
26
|
+
export type { ModalProps } from './components/Modal';
|
|
27
|
+
export { Toast, toast, ToastContainer, useToast } from './components/Toast';
|
|
28
|
+
export type { ToastContainerProps, ToastOptions, ToastProps } from './components/Toast/types';
|
|
29
|
+
export { Tooltip } from './components/Tooltip';
|
|
30
|
+
export type { TooltipProps } from './components/Tooltip';
|
|
31
|
+
export { Avatar } from './components/Avatar';
|
|
32
|
+
export type { AvatarProps } from './components/Avatar';
|
|
33
|
+
export { Badge } from './components/Badge';
|
|
34
|
+
export type { BadgeProps } from './components/Badge';
|
|
35
|
+
export { Card } from './components/Card';
|
|
36
|
+
export type { CardProps } from './components/Card';
|
|
37
|
+
export { Divider } from './components/Divider';
|
|
38
|
+
export type { DividerProps } from './components/Divider';
|
|
39
|
+
export { Header } from './components/Header';
|
|
40
|
+
export type { HeaderProps, NotificationItem } from './components/Header';
|
|
41
|
+
export { SideMenu, SideMenuItem } from './components/SideMenu';
|
|
42
|
+
export type { SideMenuItemProps, SideMenuProps } from './components/SideMenu';
|
|
43
|
+
export { Table } from './components/Table';
|
|
44
|
+
export type { TableColumn, TableProps } from './components/Table';
|
|
45
|
+
export { Text } from './components/Text';
|
|
46
|
+
export type { TextProps } from './components/Text';
|
|
47
|
+
export { Flex } from './components/Flex';
|
|
48
|
+
export type { FlexProps } from './components/Flex';
|
|
49
|
+
export { Grid } from './components/Grid';
|
|
50
|
+
export type { GridProps } from './components/Grid';
|
|
51
|
+
export { ThemeProvider, useThemeContext } from './theme';
|
|
52
|
+
export type { Theme, ThemeProviderProps } from './theme';
|
|
53
|
+
export { tokens, generateCSSVariables, injectCSSVariables } from './theme';
|
|
54
|
+
export type { Tokens, ColorScale, ColorShade } from './theme';
|
|
55
|
+
export { useBodyScrollLock, useClickOutside, useDebounce, useEscapeKey, useFocusTrap, useId, } from './hooks';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tokens } from './tokens';
|
|
3
|
+
export type Size = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface Theme {
|
|
5
|
+
tokens: Tokens;
|
|
6
|
+
mode: 'light' | 'dark';
|
|
7
|
+
defaultSize: Size;
|
|
8
|
+
}
|
|
9
|
+
export interface ThemeContextValue {
|
|
10
|
+
theme: Theme;
|
|
11
|
+
setMode: (mode: 'light' | 'dark') => void;
|
|
12
|
+
setDefaultSize: (size: Size) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ThemeProviderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
/** Child components that will have access to the theme */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** Initial theme mode, defaults to 'light' */
|
|
18
|
+
initialMode?: 'light' | 'dark';
|
|
19
|
+
/** Custom theme tokens to override defaults */
|
|
20
|
+
customTokens?: Partial<Tokens>;
|
|
21
|
+
/** Global default size for components (e.g., 'md', 'sm', 'lg') */
|
|
22
|
+
defaultSize?: Size;
|
|
23
|
+
}
|
|
24
|
+
declare const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { ThemeProvider };
|
|
26
|
+
declare const _default: React.FC<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export default _default;
|
|
28
|
+
/**
|
|
29
|
+
* Hook to access the current theme and theme utilities
|
|
30
|
+
*
|
|
31
|
+
* @throws {Error} If used outside of ThemeProvider
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* function MyComponent() {
|
|
35
|
+
* const { theme, setMode } = useThemeContext();
|
|
36
|
+
* return <div style={{ color: theme.tokens.colors.primary[500] }}>Hello</div>;
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export declare const useThemeContext: () => ThemeContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates CSS variables from design tokens
|
|
3
|
+
* @returns CSS variable declarations as a string
|
|
4
|
+
*/
|
|
5
|
+
export declare function generateCSSVariables(): string;
|
|
6
|
+
/**
|
|
7
|
+
* Injects CSS variables into the document
|
|
8
|
+
*/
|
|
9
|
+
export declare function injectCSSVariables(): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ThemeProvider, useThemeContext } from './ThemeProvider';
|
|
2
|
+
export { tokens } from './tokens';
|
|
3
|
+
export { generateCSSVariables, injectCSSVariables } from './cssVariables';
|
|
4
|
+
export type { Theme, ThemeProviderProps } from './ThemeProvider';
|
|
5
|
+
export type { Tokens, ColorScale, ColorShade } from './tokens';
|
|
6
|
+
import './base.css';
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for the VTX UI library
|
|
3
|
+
* These tokens define the core visual language of the design system
|
|
4
|
+
*/
|
|
5
|
+
export declare const COLOR_KEYS: number[];
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes a colors object so that any string value (e.g., primary: "#fff")
|
|
8
|
+
* is expanded to an object with all color keys, while objects are left as-is.
|
|
9
|
+
* Direct object keys (e.g., primary: { 100: "#fff" }) are preserved.
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeColors(colors: Record<string, any>): Record<string, any>;
|
|
12
|
+
export declare const tokens: {
|
|
13
|
+
readonly colors: {
|
|
14
|
+
readonly primary: {
|
|
15
|
+
readonly 50: "#eff6ff";
|
|
16
|
+
readonly 100: "#dbeafe";
|
|
17
|
+
readonly 200: "#bfdbfe";
|
|
18
|
+
readonly 300: "#93c5fd";
|
|
19
|
+
readonly 400: "#60a5fa";
|
|
20
|
+
readonly 500: "#3b82f6";
|
|
21
|
+
readonly 600: "#2563eb";
|
|
22
|
+
readonly 700: "#1d4ed8";
|
|
23
|
+
readonly 800: "#1e40af";
|
|
24
|
+
readonly 900: "#1e3a8a";
|
|
25
|
+
};
|
|
26
|
+
readonly secondary: {
|
|
27
|
+
readonly 50: "#f5f3ff";
|
|
28
|
+
readonly 100: "#ede9fe";
|
|
29
|
+
readonly 200: "#ddd6fe";
|
|
30
|
+
readonly 300: "#c4b5fd";
|
|
31
|
+
readonly 400: "#a78bfa";
|
|
32
|
+
readonly 500: "#8b5cf6";
|
|
33
|
+
readonly 600: "#7c3aed";
|
|
34
|
+
readonly 700: "#6d28d9";
|
|
35
|
+
readonly 800: "#5b21b6";
|
|
36
|
+
readonly 900: "#4c1d95";
|
|
37
|
+
};
|
|
38
|
+
readonly neutral: {
|
|
39
|
+
readonly 50: "#fafafa";
|
|
40
|
+
readonly 100: "#f5f5f5";
|
|
41
|
+
readonly 200: "#e5e5e5";
|
|
42
|
+
readonly 300: "#d4d4d4";
|
|
43
|
+
readonly 400: "#a3a3a3";
|
|
44
|
+
readonly 500: "#737373";
|
|
45
|
+
readonly 600: "#525252";
|
|
46
|
+
readonly 700: "#404040";
|
|
47
|
+
readonly 800: "#262626";
|
|
48
|
+
readonly 900: "#171717";
|
|
49
|
+
};
|
|
50
|
+
readonly success: {
|
|
51
|
+
readonly 50: "#f0fdf4";
|
|
52
|
+
readonly 500: "#22c55e";
|
|
53
|
+
readonly 600: "#16a34a";
|
|
54
|
+
readonly 700: "#15803d";
|
|
55
|
+
};
|
|
56
|
+
readonly warning: {
|
|
57
|
+
readonly 50: "#fffbeb";
|
|
58
|
+
readonly 500: "#f59e0b";
|
|
59
|
+
readonly 600: "#d97706";
|
|
60
|
+
readonly 700: "#b45309";
|
|
61
|
+
};
|
|
62
|
+
readonly error: {
|
|
63
|
+
readonly 50: "#fef2f2";
|
|
64
|
+
readonly 500: "#ef4444";
|
|
65
|
+
readonly 600: "#dc2626";
|
|
66
|
+
readonly 700: "#b91c1c";
|
|
67
|
+
};
|
|
68
|
+
readonly info: {
|
|
69
|
+
readonly 50: "#eff6ff";
|
|
70
|
+
readonly 500: "#3b82f6";
|
|
71
|
+
readonly 600: "#2563eb";
|
|
72
|
+
readonly 700: "#1d4ed8";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
readonly spacing: {
|
|
76
|
+
readonly 0: "0";
|
|
77
|
+
readonly 1: "0.25rem";
|
|
78
|
+
readonly 2: "0.5rem";
|
|
79
|
+
readonly 3: "0.75rem";
|
|
80
|
+
readonly 4: "1rem";
|
|
81
|
+
readonly 5: "1.25rem";
|
|
82
|
+
readonly 6: "1.5rem";
|
|
83
|
+
readonly 8: "2rem";
|
|
84
|
+
readonly 10: "2.5rem";
|
|
85
|
+
readonly 12: "3rem";
|
|
86
|
+
readonly 16: "4rem";
|
|
87
|
+
readonly 20: "5rem";
|
|
88
|
+
readonly 24: "6rem";
|
|
89
|
+
};
|
|
90
|
+
readonly typography: {
|
|
91
|
+
readonly fontFamily: {
|
|
92
|
+
readonly sans: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
|
|
93
|
+
readonly mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace";
|
|
94
|
+
};
|
|
95
|
+
readonly fontSize: {
|
|
96
|
+
readonly xs: "0.75rem";
|
|
97
|
+
readonly sm: "0.875rem";
|
|
98
|
+
readonly base: "1rem";
|
|
99
|
+
readonly lg: "1.125rem";
|
|
100
|
+
readonly xl: "1.25rem";
|
|
101
|
+
readonly '2xl': "1.5rem";
|
|
102
|
+
readonly '3xl': "1.875rem";
|
|
103
|
+
readonly '4xl': "2.25rem";
|
|
104
|
+
readonly '5xl': "3rem";
|
|
105
|
+
readonly '6xl': "3.75rem";
|
|
106
|
+
readonly '7xl': "4.5rem";
|
|
107
|
+
readonly '8xl': "6rem";
|
|
108
|
+
readonly '9xl': "8rem";
|
|
109
|
+
};
|
|
110
|
+
readonly fontWeight: {
|
|
111
|
+
readonly thin: "100";
|
|
112
|
+
readonly extralight: "200";
|
|
113
|
+
readonly light: "300";
|
|
114
|
+
readonly normal: "400";
|
|
115
|
+
readonly medium: "500";
|
|
116
|
+
readonly semibold: "600";
|
|
117
|
+
readonly bold: "700";
|
|
118
|
+
readonly extrabold: "800";
|
|
119
|
+
readonly black: "900";
|
|
120
|
+
};
|
|
121
|
+
readonly lineHeight: {
|
|
122
|
+
readonly none: "1";
|
|
123
|
+
readonly tight: "1.25";
|
|
124
|
+
readonly snug: "1.375";
|
|
125
|
+
readonly normal: "1.5";
|
|
126
|
+
readonly relaxed: "1.625";
|
|
127
|
+
readonly loose: "2";
|
|
128
|
+
};
|
|
129
|
+
readonly letterSpacing: {
|
|
130
|
+
readonly tighter: "-0.05em";
|
|
131
|
+
readonly tight: "-0.025em";
|
|
132
|
+
readonly normal: "0";
|
|
133
|
+
readonly wide: "0.025em";
|
|
134
|
+
readonly wider: "0.05em";
|
|
135
|
+
readonly widest: "0.1em";
|
|
136
|
+
};
|
|
137
|
+
readonly textVariants: {
|
|
138
|
+
readonly h1: {
|
|
139
|
+
readonly fontSize: "3.75rem";
|
|
140
|
+
readonly fontWeight: "700";
|
|
141
|
+
readonly lineHeight: "1.2";
|
|
142
|
+
readonly letterSpacing: "-0.025em";
|
|
143
|
+
};
|
|
144
|
+
readonly h2: {
|
|
145
|
+
readonly fontSize: "3rem";
|
|
146
|
+
readonly fontWeight: "700";
|
|
147
|
+
readonly lineHeight: "1.25";
|
|
148
|
+
readonly letterSpacing: "-0.025em";
|
|
149
|
+
};
|
|
150
|
+
readonly h3: {
|
|
151
|
+
readonly fontSize: "2.25rem";
|
|
152
|
+
readonly fontWeight: "600";
|
|
153
|
+
readonly lineHeight: "1.3";
|
|
154
|
+
readonly letterSpacing: "-0.025em";
|
|
155
|
+
};
|
|
156
|
+
readonly h4: {
|
|
157
|
+
readonly fontSize: "1.875rem";
|
|
158
|
+
readonly fontWeight: "600";
|
|
159
|
+
readonly lineHeight: "1.35";
|
|
160
|
+
readonly letterSpacing: "0";
|
|
161
|
+
};
|
|
162
|
+
readonly h5: {
|
|
163
|
+
readonly fontSize: "1.5rem";
|
|
164
|
+
readonly fontWeight: "600";
|
|
165
|
+
readonly lineHeight: "1.4";
|
|
166
|
+
readonly letterSpacing: "0";
|
|
167
|
+
};
|
|
168
|
+
readonly h6: {
|
|
169
|
+
readonly fontSize: "1.25rem";
|
|
170
|
+
readonly fontWeight: "600";
|
|
171
|
+
readonly lineHeight: "1.5";
|
|
172
|
+
readonly letterSpacing: "0";
|
|
173
|
+
};
|
|
174
|
+
readonly body1: {
|
|
175
|
+
readonly fontSize: "1rem";
|
|
176
|
+
readonly fontWeight: "400";
|
|
177
|
+
readonly lineHeight: "1.5";
|
|
178
|
+
readonly letterSpacing: "0";
|
|
179
|
+
};
|
|
180
|
+
readonly body2: {
|
|
181
|
+
readonly fontSize: "0.875rem";
|
|
182
|
+
readonly fontWeight: "400";
|
|
183
|
+
readonly lineHeight: "1.5";
|
|
184
|
+
readonly letterSpacing: "0";
|
|
185
|
+
};
|
|
186
|
+
readonly subtitle1: {
|
|
187
|
+
readonly fontSize: "1.125rem";
|
|
188
|
+
readonly fontWeight: "500";
|
|
189
|
+
readonly lineHeight: "1.5";
|
|
190
|
+
readonly letterSpacing: "0";
|
|
191
|
+
};
|
|
192
|
+
readonly subtitle2: {
|
|
193
|
+
readonly fontSize: "1rem";
|
|
194
|
+
readonly fontWeight: "500";
|
|
195
|
+
readonly lineHeight: "1.5";
|
|
196
|
+
readonly letterSpacing: "0";
|
|
197
|
+
};
|
|
198
|
+
readonly caption: {
|
|
199
|
+
readonly fontSize: "0.75rem";
|
|
200
|
+
readonly fontWeight: "400";
|
|
201
|
+
readonly lineHeight: "1.5";
|
|
202
|
+
readonly letterSpacing: "0.025em";
|
|
203
|
+
};
|
|
204
|
+
readonly overline: {
|
|
205
|
+
readonly fontSize: "0.75rem";
|
|
206
|
+
readonly fontWeight: "600";
|
|
207
|
+
readonly lineHeight: "1.5";
|
|
208
|
+
readonly letterSpacing: "0.1em";
|
|
209
|
+
readonly textTransform: "uppercase";
|
|
210
|
+
};
|
|
211
|
+
readonly button: {
|
|
212
|
+
readonly fontSize: "0.875rem";
|
|
213
|
+
readonly fontWeight: "600";
|
|
214
|
+
readonly lineHeight: "1.5";
|
|
215
|
+
readonly letterSpacing: "0.025em";
|
|
216
|
+
};
|
|
217
|
+
readonly label: {
|
|
218
|
+
readonly fontSize: "0.875rem";
|
|
219
|
+
readonly fontWeight: "500";
|
|
220
|
+
readonly lineHeight: "1.5";
|
|
221
|
+
readonly letterSpacing: "0";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly borderRadius: {
|
|
226
|
+
readonly none: "0";
|
|
227
|
+
readonly sm: "0.125rem";
|
|
228
|
+
readonly base: "0.25rem";
|
|
229
|
+
readonly md: "0.375rem";
|
|
230
|
+
readonly lg: "0.5rem";
|
|
231
|
+
readonly xl: "0.75rem";
|
|
232
|
+
readonly '2xl': "1rem";
|
|
233
|
+
readonly full: "9999px";
|
|
234
|
+
};
|
|
235
|
+
readonly shadows: {
|
|
236
|
+
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
237
|
+
readonly base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
238
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
239
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
240
|
+
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
241
|
+
readonly none: "none";
|
|
242
|
+
};
|
|
243
|
+
readonly transitions: {
|
|
244
|
+
readonly fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
245
|
+
readonly base: "200ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
246
|
+
readonly slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
247
|
+
};
|
|
248
|
+
readonly zIndex: {
|
|
249
|
+
readonly dropdown: 1000;
|
|
250
|
+
readonly sticky: 1100;
|
|
251
|
+
readonly modal: 1200;
|
|
252
|
+
readonly tooltip: 1300;
|
|
253
|
+
readonly notification: 1400;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export type Tokens = typeof tokens;
|
|
257
|
+
export type ColorScale = keyof typeof tokens.colors;
|
|
258
|
+
export type ColorShade = keyof typeof tokens.colors.primary;
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vtx-ui/react",
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
|
+
"description": "A production-ready React + TypeScript UI library with enterprise-grade components",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"*.css"
|
|
16
|
+
],
|
|
17
|
+
"author": "Innostes Solutions Pvt Ltd <contact@innostes.com>",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/vertex-ui/react"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://innostes.com/",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/vertex-ui/react/issues"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "rollup -c",
|
|
29
|
+
"test": "jest",
|
|
30
|
+
"test:watch": "jest --watch",
|
|
31
|
+
"test:coverage": "jest --coverage"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": ">=17",
|
|
35
|
+
"react-dom": ">=17"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
|
|
39
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
40
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
41
|
+
"@testing-library/react": "^16.3.0",
|
|
42
|
+
"@testing-library/user-event": "^14.6.1",
|
|
43
|
+
"@types/jest": "^30.0.0",
|
|
44
|
+
"@types/react": "^19.2.7",
|
|
45
|
+
"@types/react-dom": "^19.2.3",
|
|
46
|
+
"identity-obj-proxy": "^3.0.0",
|
|
47
|
+
"jest": "^30.2.0",
|
|
48
|
+
"jest-axe": "^7.0.0",
|
|
49
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
50
|
+
"rollup": "^2.79.2",
|
|
51
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
52
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
54
|
+
"ts-jest": "^29.4.6"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"tslib": "^2.8.1"
|
|
58
|
+
}
|
|
59
|
+
}
|