@aic-kits/react 0.19.0 → 0.21.0
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/__tests__/setup.d.ts +0 -0
- package/dist/__tests__/utils.d.ts +84 -0
- package/dist/components/Avatar/types.d.ts +1 -2
- package/dist/components/Box/__tests__/index.test.d.ts +1 -0
- package/dist/components/Button/__tests__/index.test.d.ts +1 -0
- package/dist/components/Header/NavDropdownMenu.d.ts +15 -0
- package/dist/components/Header/types.d.ts +4 -0
- package/dist/components/Text/__tests__/index.test.d.ts +1 -0
- package/dist/index.cjs +109 -79
- package/dist/index.js +1957 -1836
- package/dist/theme/common/colors.d.ts +1 -1
- package/dist/theme/components/header.d.ts +6 -0
- package/package.json +7 -2
|
File without changes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { RenderOptions } from '@testing-library/react';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { vi } from 'vitest';
|
|
4
|
+
/**
|
|
5
|
+
* Custom render function that includes ThemeProvider wrapper for testing components
|
|
6
|
+
* @param ui - React element to render
|
|
7
|
+
* @param options - Additional render options
|
|
8
|
+
* @returns Render result with theme context
|
|
9
|
+
*/
|
|
10
|
+
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, "wrapper">) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
11
|
+
export * from '@testing-library/react';
|
|
12
|
+
export { customRender as render };
|
|
13
|
+
export { vi };
|
|
14
|
+
/**
|
|
15
|
+
* Helper function for testing responsive props
|
|
16
|
+
* @param value - Responsive value (string, object, or array)
|
|
17
|
+
* @param breakpoint - Breakpoint to get value for
|
|
18
|
+
* @returns Resolved value for the breakpoint
|
|
19
|
+
*/
|
|
20
|
+
export declare const getResponsiveValue: (value: any, breakpoint?: string) => any;
|
|
21
|
+
/**
|
|
22
|
+
* Helper to get theme values by path
|
|
23
|
+
* @param path - Dot-separated path to theme value
|
|
24
|
+
* @returns Theme value at the specified path
|
|
25
|
+
*/
|
|
26
|
+
export declare const getThemeValue: (path: string) => any;
|
|
27
|
+
/**
|
|
28
|
+
* Helper to create mock props for testing
|
|
29
|
+
* @param overrides - Props to override defaults
|
|
30
|
+
* @returns Mock props object
|
|
31
|
+
*/
|
|
32
|
+
export declare const createMockProps: (overrides?: Record<string, any>) => {
|
|
33
|
+
'data-testid': string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Helper to test styled-components CSS output
|
|
37
|
+
* @param element - HTML element to test
|
|
38
|
+
* @param property - CSS property name
|
|
39
|
+
* @param value - Expected CSS value
|
|
40
|
+
*/
|
|
41
|
+
export declare const expectStyledComponentToHaveStyle: (element: HTMLElement, property: string, value: string | RegExp) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Helper for testing accessibility
|
|
44
|
+
* @param element - HTML element to test
|
|
45
|
+
*/
|
|
46
|
+
export declare const expectToBeAccessible: (element: HTMLElement) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Helper for testing responsive behavior
|
|
49
|
+
* @param component - React component to test
|
|
50
|
+
*/
|
|
51
|
+
export declare const testResponsiveProps: (component: ReactElement) => void;
|
|
52
|
+
export declare const mockTheme: import('..').Theme;
|
|
53
|
+
export declare const mockBreakpoints: {
|
|
54
|
+
base: string;
|
|
55
|
+
sm: string;
|
|
56
|
+
md: string;
|
|
57
|
+
lg: string;
|
|
58
|
+
xl: string;
|
|
59
|
+
};
|
|
60
|
+
export declare const commonTestScenarios: {
|
|
61
|
+
responsiveValues: {
|
|
62
|
+
string: string;
|
|
63
|
+
object: {
|
|
64
|
+
base: string;
|
|
65
|
+
md: string;
|
|
66
|
+
lg: string;
|
|
67
|
+
};
|
|
68
|
+
array: string[];
|
|
69
|
+
};
|
|
70
|
+
colors: {
|
|
71
|
+
primary: string;
|
|
72
|
+
secondary: string;
|
|
73
|
+
success: string;
|
|
74
|
+
warning: string;
|
|
75
|
+
error: string;
|
|
76
|
+
};
|
|
77
|
+
sizes: {
|
|
78
|
+
xs: string;
|
|
79
|
+
sm: string;
|
|
80
|
+
md: string;
|
|
81
|
+
lg: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Color, BorderWidth } from '../../theme';
|
|
3
|
+
import { NavItemProps } from './types';
|
|
4
|
+
interface NavDropdownMenuProps {
|
|
5
|
+
items: NavItemProps[];
|
|
6
|
+
onClick?: (item: NavItemProps, index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface StyledDropdownMenuContainerProps {
|
|
9
|
+
$themeBackgroundColor: Color;
|
|
10
|
+
$themeRadius: number;
|
|
11
|
+
$themeBorderColor: Color;
|
|
12
|
+
$themeBorderWidth: BorderWidth;
|
|
13
|
+
}
|
|
14
|
+
export declare const NavDropdownMenu: React.FC<NavDropdownMenuProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|