@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
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import './Tooltip.css';
|
|
3
|
-
export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
4
|
-
/**
|
|
5
|
-
* Content to display in the tooltip
|
|
6
|
-
* Can be text, JSX, or any React node
|
|
7
|
-
*/
|
|
8
|
-
content: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Placement of the tooltip relative to the trigger element
|
|
11
|
-
* @default 'top'
|
|
12
|
-
*/
|
|
13
|
-
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
14
|
-
/**
|
|
15
|
-
* Delay before showing tooltip in milliseconds
|
|
16
|
-
* @default 200
|
|
17
|
-
*/
|
|
18
|
-
delay?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Delay before hiding tooltip in milliseconds
|
|
21
|
-
* @default 0
|
|
22
|
-
*/
|
|
23
|
-
hideDelay?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Element that triggers the tooltip
|
|
26
|
-
*/
|
|
27
|
-
children: React.ReactElement<any>;
|
|
28
|
-
/**
|
|
29
|
-
* If true, tooltip is always visible
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
open?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* If true, tooltip is disabled and won't show
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* If true, shows an arrow pointing to the trigger element
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
arrow?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Maximum width of the tooltip
|
|
45
|
-
* @default '300px'
|
|
46
|
-
*/
|
|
47
|
-
maxWidth?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Tooltip variant for different visual styles
|
|
50
|
-
* @default 'dark'
|
|
51
|
-
*/
|
|
52
|
-
variant?: 'dark' | 'light' | 'error' | 'warning' | 'success' | 'info';
|
|
53
|
-
/**
|
|
54
|
-
* If true, shows a close button to manually dismiss the tooltip
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
dismissible?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Callback fired when tooltip is shown
|
|
60
|
-
*/
|
|
61
|
-
onShow?: () => void;
|
|
62
|
-
/**
|
|
63
|
-
* Callback fired when tooltip is hidden
|
|
64
|
-
*/
|
|
65
|
-
onHide?: () => void;
|
|
66
|
-
/**
|
|
67
|
-
* Callback fired when dismiss button is clicked
|
|
68
|
-
*/
|
|
69
|
-
onDismiss?: () => void;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Tooltip component - Displays helpful information on hover or focus
|
|
73
|
-
*
|
|
74
|
-
* A feature-rich tooltip component with multiple placement options, variants,
|
|
75
|
-
* customizable delays, and arrow indicators.
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* Basic usage
|
|
79
|
-
* ```tsx
|
|
80
|
-
* <Tooltip content="Click to save changes" placement="top">
|
|
81
|
-
* <Button>Save</Button>
|
|
82
|
-
* </Tooltip>
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* With arrow and variant
|
|
87
|
-
* ```tsx
|
|
88
|
-
* <Tooltip
|
|
89
|
-
* content="This action cannot be undone"
|
|
90
|
-
* placement="right"
|
|
91
|
-
* variant="warning"
|
|
92
|
-
* arrow
|
|
93
|
-
* >
|
|
94
|
-
* <Button variant="danger">Delete</Button>
|
|
95
|
-
* </Tooltip>
|
|
96
|
-
* ```
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* Always visible
|
|
100
|
-
* ```tsx
|
|
101
|
-
* <Tooltip content="Important information" open>
|
|
102
|
-
* <span>Hover target</span>
|
|
103
|
-
* </Tooltip>
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
-
declare const _default: React.FC<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
-
export default _default;
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to handle click events outside of a specified element
|
|
4
|
-
*
|
|
5
|
-
* @param ref - Reference to the element to detect clicks outside of
|
|
6
|
-
* @param handler - Callback function to execute when clicking outside
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function Dropdown() {
|
|
11
|
-
* const ref = useRef<HTMLDivElement>(null);
|
|
12
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
13
|
-
*
|
|
14
|
-
* useClickOutside(ref, () => setIsOpen(false));
|
|
15
|
-
*
|
|
16
|
-
* return <div ref={ref}>Dropdown content</div>;
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare const useClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (event: MouseEvent | TouchEvent) => void) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Hook to manage focus trap within a component (useful for modals, dialogs)
|
|
23
|
-
*
|
|
24
|
-
* @param ref - Reference to the container element
|
|
25
|
-
* @param isActive - Whether the focus trap is active
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* function Modal({ isOpen }) {
|
|
30
|
-
* const ref = useRef<HTMLDivElement>(null);
|
|
31
|
-
* useFocusTrap(ref, isOpen);
|
|
32
|
-
* return <div ref={ref}>Modal content</div>;
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export declare const useFocusTrap: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, isActive: boolean) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Hook to handle escape key press
|
|
39
|
-
*
|
|
40
|
-
* @param handler - Callback function to execute when escape is pressed
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* function Modal({ onClose }) {
|
|
45
|
-
* useEscapeKey(onClose);
|
|
46
|
-
* return <div>Modal content</div>;
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
export declare const useEscapeKey: (handler: () => void) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Hook to manage body scroll lock (useful for modals)
|
|
53
|
-
*
|
|
54
|
-
* @param isLocked - Whether to lock the body scroll
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* function Modal({ isOpen }) {
|
|
59
|
-
* useBodyScrollLock(isOpen);
|
|
60
|
-
* return <div>Modal content</div>;
|
|
61
|
-
* }
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare const useBodyScrollLock: (isLocked: boolean) => void;
|
|
65
|
-
export declare const useId: (prefix?: string) => string;
|
|
66
|
-
/**
|
|
67
|
-
* Hook to debounce a value
|
|
68
|
-
*
|
|
69
|
-
* @param value - Value to debounce
|
|
70
|
-
* @param delay - Delay in milliseconds
|
|
71
|
-
* @returns Debounced value
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```tsx
|
|
75
|
-
* function SearchInput() {
|
|
76
|
-
* const [search, setSearch] = useState('');
|
|
77
|
-
* const debouncedSearch = useDebounce(search, 300);
|
|
78
|
-
*
|
|
79
|
-
* useEffect(() => {
|
|
80
|
-
* // API call with debouncedSearch
|
|
81
|
-
* }, [debouncedSearch]);
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
export declare const useDebounce: <T>(value: T, delay: number) => T;
|
package/dist/hooks/useTheme.d.ts
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook to access theme tokens and utilities
|
|
3
|
-
*
|
|
4
|
-
* @returns Theme tokens and theme mode setter
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* function MyComponent() {
|
|
9
|
-
* const { tokens, mode, setMode } = useTheme();
|
|
10
|
-
* return (
|
|
11
|
-
* <button
|
|
12
|
-
* style={{ background: tokens.colors.primary[500] }}
|
|
13
|
-
* onClick={() => setMode(mode === 'light' ? 'dark' : 'light')}
|
|
14
|
-
* >
|
|
15
|
-
* Toggle Theme
|
|
16
|
-
* </button>
|
|
17
|
-
* );
|
|
18
|
-
* }
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare const useTheme: () => {
|
|
22
|
-
tokens: {
|
|
23
|
-
readonly colors: {
|
|
24
|
-
readonly primary: {
|
|
25
|
-
readonly 50: "#eff6ff";
|
|
26
|
-
readonly 100: "#dbeafe";
|
|
27
|
-
readonly 200: "#bfdbfe";
|
|
28
|
-
readonly 300: "#93c5fd";
|
|
29
|
-
readonly 400: "#60a5fa";
|
|
30
|
-
readonly 500: "#3b82f6";
|
|
31
|
-
readonly 600: "#2563eb";
|
|
32
|
-
readonly 700: "#1d4ed8";
|
|
33
|
-
readonly 800: "#1e40af";
|
|
34
|
-
readonly 900: "#1e3a8a";
|
|
35
|
-
};
|
|
36
|
-
readonly secondary: {
|
|
37
|
-
readonly 50: "#f5f3ff";
|
|
38
|
-
readonly 100: "#ede9fe";
|
|
39
|
-
readonly 200: "#ddd6fe";
|
|
40
|
-
readonly 300: "#c4b5fd";
|
|
41
|
-
readonly 400: "#a78bfa";
|
|
42
|
-
readonly 500: "#8b5cf6";
|
|
43
|
-
readonly 600: "#7c3aed";
|
|
44
|
-
readonly 700: "#6d28d9";
|
|
45
|
-
readonly 800: "#5b21b6";
|
|
46
|
-
readonly 900: "#4c1d95";
|
|
47
|
-
};
|
|
48
|
-
readonly neutral: {
|
|
49
|
-
readonly 50: "#fafafa";
|
|
50
|
-
readonly 100: "#f5f5f5";
|
|
51
|
-
readonly 200: "#e5e5e5";
|
|
52
|
-
readonly 300: "#d4d4d4";
|
|
53
|
-
readonly 400: "#a3a3a3";
|
|
54
|
-
readonly 500: "#737373";
|
|
55
|
-
readonly 600: "#525252";
|
|
56
|
-
readonly 700: "#404040";
|
|
57
|
-
readonly 800: "#262626";
|
|
58
|
-
readonly 900: "#171717";
|
|
59
|
-
};
|
|
60
|
-
readonly success: {
|
|
61
|
-
readonly 50: "#f0fdf4";
|
|
62
|
-
readonly 500: "#22c55e";
|
|
63
|
-
readonly 600: "#16a34a";
|
|
64
|
-
readonly 700: "#15803d";
|
|
65
|
-
};
|
|
66
|
-
readonly warning: {
|
|
67
|
-
readonly 50: "#fffbeb";
|
|
68
|
-
readonly 500: "#f59e0b";
|
|
69
|
-
readonly 600: "#d97706";
|
|
70
|
-
readonly 700: "#b45309";
|
|
71
|
-
};
|
|
72
|
-
readonly error: {
|
|
73
|
-
readonly 50: "#fef2f2";
|
|
74
|
-
readonly 500: "#ef4444";
|
|
75
|
-
readonly 600: "#dc2626";
|
|
76
|
-
readonly 700: "#b91c1c";
|
|
77
|
-
};
|
|
78
|
-
readonly info: {
|
|
79
|
-
readonly 50: "#eff6ff";
|
|
80
|
-
readonly 500: "#3b82f6";
|
|
81
|
-
readonly 600: "#2563eb";
|
|
82
|
-
readonly 700: "#1d4ed8";
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
readonly spacing: {
|
|
86
|
-
readonly 0: "0";
|
|
87
|
-
readonly 1: "0.25rem";
|
|
88
|
-
readonly 2: "0.5rem";
|
|
89
|
-
readonly 3: "0.75rem";
|
|
90
|
-
readonly 4: "1rem";
|
|
91
|
-
readonly 5: "1.25rem";
|
|
92
|
-
readonly 6: "1.5rem";
|
|
93
|
-
readonly 8: "2rem";
|
|
94
|
-
readonly 10: "2.5rem";
|
|
95
|
-
readonly 12: "3rem";
|
|
96
|
-
readonly 16: "4rem";
|
|
97
|
-
readonly 20: "5rem";
|
|
98
|
-
readonly 24: "6rem";
|
|
99
|
-
};
|
|
100
|
-
readonly typography: {
|
|
101
|
-
readonly fontFamily: {
|
|
102
|
-
readonly sans: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
|
|
103
|
-
readonly mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace";
|
|
104
|
-
};
|
|
105
|
-
readonly fontSize: {
|
|
106
|
-
readonly xs: "0.75rem";
|
|
107
|
-
readonly sm: "0.875rem";
|
|
108
|
-
readonly base: "1rem";
|
|
109
|
-
readonly lg: "1.125rem";
|
|
110
|
-
readonly xl: "1.25rem";
|
|
111
|
-
readonly '2xl': "1.5rem";
|
|
112
|
-
readonly '3xl': "1.875rem";
|
|
113
|
-
readonly '4xl': "2.25rem";
|
|
114
|
-
readonly '5xl': "3rem";
|
|
115
|
-
readonly '6xl': "3.75rem";
|
|
116
|
-
readonly '7xl': "4.5rem";
|
|
117
|
-
readonly '8xl': "6rem";
|
|
118
|
-
readonly '9xl': "8rem";
|
|
119
|
-
};
|
|
120
|
-
readonly fontWeight: {
|
|
121
|
-
readonly thin: "100";
|
|
122
|
-
readonly extralight: "200";
|
|
123
|
-
readonly light: "300";
|
|
124
|
-
readonly normal: "400";
|
|
125
|
-
readonly medium: "500";
|
|
126
|
-
readonly semibold: "600";
|
|
127
|
-
readonly bold: "700";
|
|
128
|
-
readonly extrabold: "800";
|
|
129
|
-
readonly black: "900";
|
|
130
|
-
};
|
|
131
|
-
readonly lineHeight: {
|
|
132
|
-
readonly none: "1";
|
|
133
|
-
readonly tight: "1.25";
|
|
134
|
-
readonly snug: "1.375";
|
|
135
|
-
readonly normal: "1.5";
|
|
136
|
-
readonly relaxed: "1.625";
|
|
137
|
-
readonly loose: "2";
|
|
138
|
-
};
|
|
139
|
-
readonly letterSpacing: {
|
|
140
|
-
readonly tighter: "-0.05em";
|
|
141
|
-
readonly tight: "-0.025em";
|
|
142
|
-
readonly normal: "0";
|
|
143
|
-
readonly wide: "0.025em";
|
|
144
|
-
readonly wider: "0.05em";
|
|
145
|
-
readonly widest: "0.1em";
|
|
146
|
-
};
|
|
147
|
-
readonly textVariants: {
|
|
148
|
-
readonly h1: {
|
|
149
|
-
readonly fontSize: "3.75rem";
|
|
150
|
-
readonly fontWeight: "700";
|
|
151
|
-
readonly lineHeight: "1.2";
|
|
152
|
-
readonly letterSpacing: "-0.025em";
|
|
153
|
-
};
|
|
154
|
-
readonly h2: {
|
|
155
|
-
readonly fontSize: "3rem";
|
|
156
|
-
readonly fontWeight: "700";
|
|
157
|
-
readonly lineHeight: "1.25";
|
|
158
|
-
readonly letterSpacing: "-0.025em";
|
|
159
|
-
};
|
|
160
|
-
readonly h3: {
|
|
161
|
-
readonly fontSize: "2.25rem";
|
|
162
|
-
readonly fontWeight: "600";
|
|
163
|
-
readonly lineHeight: "1.3";
|
|
164
|
-
readonly letterSpacing: "-0.025em";
|
|
165
|
-
};
|
|
166
|
-
readonly h4: {
|
|
167
|
-
readonly fontSize: "1.875rem";
|
|
168
|
-
readonly fontWeight: "600";
|
|
169
|
-
readonly lineHeight: "1.35";
|
|
170
|
-
readonly letterSpacing: "0";
|
|
171
|
-
};
|
|
172
|
-
readonly h5: {
|
|
173
|
-
readonly fontSize: "1.5rem";
|
|
174
|
-
readonly fontWeight: "600";
|
|
175
|
-
readonly lineHeight: "1.4";
|
|
176
|
-
readonly letterSpacing: "0";
|
|
177
|
-
};
|
|
178
|
-
readonly h6: {
|
|
179
|
-
readonly fontSize: "1.25rem";
|
|
180
|
-
readonly fontWeight: "600";
|
|
181
|
-
readonly lineHeight: "1.5";
|
|
182
|
-
readonly letterSpacing: "0";
|
|
183
|
-
};
|
|
184
|
-
readonly body1: {
|
|
185
|
-
readonly fontSize: "1rem";
|
|
186
|
-
readonly fontWeight: "400";
|
|
187
|
-
readonly lineHeight: "1.5";
|
|
188
|
-
readonly letterSpacing: "0";
|
|
189
|
-
};
|
|
190
|
-
readonly body2: {
|
|
191
|
-
readonly fontSize: "0.875rem";
|
|
192
|
-
readonly fontWeight: "400";
|
|
193
|
-
readonly lineHeight: "1.5";
|
|
194
|
-
readonly letterSpacing: "0";
|
|
195
|
-
};
|
|
196
|
-
readonly subtitle1: {
|
|
197
|
-
readonly fontSize: "1.125rem";
|
|
198
|
-
readonly fontWeight: "500";
|
|
199
|
-
readonly lineHeight: "1.5";
|
|
200
|
-
readonly letterSpacing: "0";
|
|
201
|
-
};
|
|
202
|
-
readonly subtitle2: {
|
|
203
|
-
readonly fontSize: "1rem";
|
|
204
|
-
readonly fontWeight: "500";
|
|
205
|
-
readonly lineHeight: "1.5";
|
|
206
|
-
readonly letterSpacing: "0";
|
|
207
|
-
};
|
|
208
|
-
readonly caption: {
|
|
209
|
-
readonly fontSize: "0.75rem";
|
|
210
|
-
readonly fontWeight: "400";
|
|
211
|
-
readonly lineHeight: "1.5";
|
|
212
|
-
readonly letterSpacing: "0.025em";
|
|
213
|
-
};
|
|
214
|
-
readonly overline: {
|
|
215
|
-
readonly fontSize: "0.75rem";
|
|
216
|
-
readonly fontWeight: "600";
|
|
217
|
-
readonly lineHeight: "1.5";
|
|
218
|
-
readonly letterSpacing: "0.1em";
|
|
219
|
-
readonly textTransform: "uppercase";
|
|
220
|
-
};
|
|
221
|
-
readonly button: {
|
|
222
|
-
readonly fontSize: "0.875rem";
|
|
223
|
-
readonly fontWeight: "600";
|
|
224
|
-
readonly lineHeight: "1.5";
|
|
225
|
-
readonly letterSpacing: "0.025em";
|
|
226
|
-
};
|
|
227
|
-
readonly label: {
|
|
228
|
-
readonly fontSize: "0.875rem";
|
|
229
|
-
readonly fontWeight: "500";
|
|
230
|
-
readonly lineHeight: "1.5";
|
|
231
|
-
readonly letterSpacing: "0";
|
|
232
|
-
};
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
readonly borderRadius: {
|
|
236
|
-
readonly none: "0";
|
|
237
|
-
readonly sm: "0.125rem";
|
|
238
|
-
readonly base: "0.25rem";
|
|
239
|
-
readonly md: "0.375rem";
|
|
240
|
-
readonly lg: "0.5rem";
|
|
241
|
-
readonly xl: "0.75rem";
|
|
242
|
-
readonly '2xl': "1rem";
|
|
243
|
-
readonly full: "9999px";
|
|
244
|
-
};
|
|
245
|
-
readonly shadows: {
|
|
246
|
-
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
247
|
-
readonly base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
248
|
-
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
249
|
-
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
250
|
-
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
251
|
-
readonly none: "none";
|
|
252
|
-
};
|
|
253
|
-
readonly transitions: {
|
|
254
|
-
readonly fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
255
|
-
readonly base: "200ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
256
|
-
readonly slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
257
|
-
};
|
|
258
|
-
readonly zIndex: {
|
|
259
|
-
readonly dropdown: 1000;
|
|
260
|
-
readonly sticky: 1100;
|
|
261
|
-
readonly modal: 1200;
|
|
262
|
-
readonly tooltip: 1300;
|
|
263
|
-
readonly notification: 1400;
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
mode: "light" | "dark";
|
|
267
|
-
setMode: (mode: "light" | "dark") => void;
|
|
268
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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';
|
|
@@ -1,39 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
package/dist/theme/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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';
|