skillgrid 0.0.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.md +129 -0
- package/README.md +211 -0
- package/dist/App.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +7 -0
- package/dist/components/Avatar/Avatar.type.d.ts +87 -0
- package/dist/components/Avatar/AvatarGroup/AvatarGroup.d.ts +12 -0
- package/dist/components/Avatar/assets/index.d.ts +7 -0
- package/dist/components/Avatar/assets/react-svg-icons.d.ts +4 -0
- package/dist/components/Avatar/index.d.ts +5 -0
- package/dist/components/Avatar/lib/get-avatar-border-radius-by-size-and-shape.d.ts +3 -0
- package/dist/components/Avatar/lib/get-initials-color.d.ts +4 -0
- package/dist/components/Avatar/lib/get-initials-color.test.d.ts +1 -0
- package/dist/components/Avatar/lib/get-initials.d.ts +1 -0
- package/dist/components/Avatar/lib/get-initials.test.d.ts +1 -0
- package/dist/components/Avatar/lib/get-overflow-count-text.d.ts +2 -0
- package/dist/components/Avatar/lib/get-overflow-count-text.test.d.ts +1 -0
- package/dist/components/Avatar/lib/index.d.ts +4 -0
- package/dist/components/Badge/Badge.d.ts +17 -0
- package/dist/components/Badge/Badge.type.d.ts +61 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.type.d.ts +105 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +13 -0
- package/dist/components/ConfigProvider/ConfigProvider.hook.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +23 -0
- package/dist/components/ConfigProvider/index.d.ts +3 -0
- package/dist/components/Image/Image.d.ts +11 -0
- package/dist/components/Image/Image.type.d.ts +36 -0
- package/dist/components/Image/assets/PlaceholderImageIcon.d.ts +9 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +14 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.type.d.ts +3 -0
- package/dist/components/LanguageSwitcher/index.d.ts +2 -0
- package/dist/components/Loader/Loader.d.ts +19 -0
- package/dist/components/Loader/Loader.type.d.ts +39 -0
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/Palette/Palette.constants.d.ts +13 -0
- package/dist/components/Palette/Palette.d.ts +4 -0
- package/dist/components/Palette/Palette.type.d.ts +4 -0
- package/dist/components/Palette/index.d.ts +2 -0
- package/dist/components/StoryComponents.d.ts +295 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useBackgroundColor.d.ts +20 -0
- package/dist/hooks/useCustomTranslations.d.ts +9 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.cjs10.js +1 -0
- package/dist/index.cjs11.js +1 -0
- package/dist/index.cjs12.js +1 -0
- package/dist/index.cjs13.js +1 -0
- package/dist/index.cjs14.js +1 -0
- package/dist/index.cjs15.js +1 -0
- package/dist/index.cjs16.js +1 -0
- package/dist/index.cjs17.js +1 -0
- package/dist/index.cjs18.js +1 -0
- package/dist/index.cjs19.js +1 -0
- package/dist/index.cjs2.js +1 -0
- package/dist/index.cjs20.js +1 -0
- package/dist/index.cjs21.js +1 -0
- package/dist/index.cjs22.js +1 -0
- package/dist/index.cjs23.js +1 -0
- package/dist/index.cjs24.js +1 -0
- package/dist/index.cjs25.js +1 -0
- package/dist/index.cjs26.js +1 -0
- package/dist/index.cjs27.js +1 -0
- package/dist/index.cjs28.js +1 -0
- package/dist/index.cjs29.js +1 -0
- package/dist/index.cjs3.js +1 -0
- package/dist/index.cjs30.js +1 -0
- package/dist/index.cjs31.js +1 -0
- package/dist/index.cjs32.js +1 -0
- package/dist/index.cjs33.js +1 -0
- package/dist/index.cjs34.js +1 -0
- package/dist/index.cjs35.js +9 -0
- package/dist/index.cjs36.js +22 -0
- package/dist/index.cjs37.js +5 -0
- package/dist/index.cjs38.js +1 -0
- package/dist/index.cjs39.js +1 -0
- package/dist/index.cjs4.js +1 -0
- package/dist/index.cjs40.js +1 -0
- package/dist/index.cjs41.js +1 -0
- package/dist/index.cjs42.js +1 -0
- package/dist/index.cjs43.js +1 -0
- package/dist/index.cjs44.js +1 -0
- package/dist/index.cjs45.js +1 -0
- package/dist/index.cjs5.js +1 -0
- package/dist/index.cjs6.js +1 -0
- package/dist/index.cjs7.js +1 -0
- package/dist/index.cjs8.js +1 -0
- package/dist/index.cjs9.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +21 -0
- package/dist/index.es10.js +4 -0
- package/dist/index.es11.js +61 -0
- package/dist/index.es12.js +82 -0
- package/dist/index.es13.js +5 -0
- package/dist/index.es14.js +32 -0
- package/dist/index.es15.js +7 -0
- package/dist/index.es16.js +5 -0
- package/dist/index.es17.js +73 -0
- package/dist/index.es18.js +48 -0
- package/dist/index.es19.js +22 -0
- package/dist/index.es2.js +8 -0
- package/dist/index.es20.js +7 -0
- package/dist/index.es21.js +11 -0
- package/dist/index.es22.js +26 -0
- package/dist/index.es23.js +7 -0
- package/dist/index.es24.js +6 -0
- package/dist/index.es25.js +12 -0
- package/dist/index.es26.js +6 -0
- package/dist/index.es27.js +4 -0
- package/dist/index.es28.js +22 -0
- package/dist/index.es29.js +42 -0
- package/dist/index.es3.js +66 -0
- package/dist/index.es30.js +17 -0
- package/dist/index.es31.js +7 -0
- package/dist/index.es32.js +14 -0
- package/dist/index.es33.js +10 -0
- package/dist/index.es34.js +4 -0
- package/dist/index.es35.js +28 -0
- package/dist/index.es36.js +604 -0
- package/dist/index.es37.js +42 -0
- package/dist/index.es38.js +4 -0
- package/dist/index.es39.js +4 -0
- package/dist/index.es4.js +180 -0
- package/dist/index.es40.js +4 -0
- package/dist/index.es41.js +4 -0
- package/dist/index.es42.js +4 -0
- package/dist/index.es43.js +4 -0
- package/dist/index.es44.js +4 -0
- package/dist/index.es45.js +6 -0
- package/dist/index.es5.js +75 -0
- package/dist/index.es6.js +67 -0
- package/dist/index.es7.js +24 -0
- package/dist/index.es8.js +18 -0
- package/dist/index.es9.js +4 -0
- package/dist/lib/create-rounded-cutout-rectangle-path.d.ts +18 -0
- package/dist/lib/create-rounded-cutout-rectangle-path.test.d.ts +1 -0
- package/dist/lib/generate-hash.d.ts +6 -0
- package/dist/lib/generate-hash.test.d.ts +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/locale/en_US.d.ts +6 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/ru_RU.d.ts +6 -0
- package/dist/locale/type.d.ts +10 -0
- package/dist/main.d.ts +0 -0
- package/dist/setupTests.d.ts +5 -0
- package/dist/src/components/Avatar/Avatar.module.css +1 -0
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.module.css +1 -0
- package/dist/src/components/Badge/Badge.module.css +1 -0
- package/dist/src/components/Button/Button.module.css +1 -0
- package/dist/src/components/ConfigProvider/ConfigProvider.module.css +1 -0
- package/dist/src/components/Image/Image.module.css +1 -0
- package/dist/src/components/Loader/Loader.module.css +1 -0
- package/dist/types/i18n.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +127 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export interface ButtonCommonProps {
|
|
2
|
+
/**
|
|
3
|
+
* Button variant
|
|
4
|
+
* @default 'primary'
|
|
5
|
+
*/
|
|
6
|
+
mode?: 'primary' | 'secondary' | 'tertiary';
|
|
7
|
+
/**
|
|
8
|
+
* Размер кнопки
|
|
9
|
+
* @default 'm'
|
|
10
|
+
*/
|
|
11
|
+
size?: 'l' | 'm' | 's' | 'xs';
|
|
12
|
+
/**
|
|
13
|
+
* Button style type
|
|
14
|
+
* @default 'neutral'
|
|
15
|
+
*/
|
|
16
|
+
buttonStyle?: 'neutral' | 'accent' | 'positive' | 'negative' | 'special' | 'contrast';
|
|
17
|
+
/**
|
|
18
|
+
* Показывает состояние загрузки
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Делает кнопку недоступной
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Show badge
|
|
29
|
+
*/
|
|
30
|
+
showBadge?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Badge size
|
|
33
|
+
*/
|
|
34
|
+
badgeSize?: 'small' | 'extra-small';
|
|
35
|
+
/**
|
|
36
|
+
* Badge value
|
|
37
|
+
*/
|
|
38
|
+
badgeValue?: number | string;
|
|
39
|
+
/**
|
|
40
|
+
* Show subcaption
|
|
41
|
+
*/
|
|
42
|
+
showSubcaption?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Subcaption text or node
|
|
45
|
+
*/
|
|
46
|
+
subcaption?: string | React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Stretch button to full width
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
stretched?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Distribute content to both edges
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
spaceBetween?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Button icon
|
|
59
|
+
*/
|
|
60
|
+
icon?: React.ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Button postfix
|
|
63
|
+
*/
|
|
64
|
+
postfix?: string | React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Additional CSS class
|
|
67
|
+
*/
|
|
68
|
+
className?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Tab index
|
|
71
|
+
*/
|
|
72
|
+
tabIndex?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Children content
|
|
75
|
+
*/
|
|
76
|
+
children?: React.ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* Test ID for testing
|
|
79
|
+
*/
|
|
80
|
+
'data-testid'?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Props when rendered as a native HTMLButtonElement (default behaviour).
|
|
84
|
+
*/
|
|
85
|
+
export type ButtonAsNativeButtonProps = ButtonCommonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
86
|
+
as?: 'button';
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Props when rendered as an anchor (HTMLAnchorElement).
|
|
90
|
+
*/
|
|
91
|
+
export type ButtonAsAnchorProps = Omit<ButtonCommonProps, 'type'> & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
92
|
+
as: 'a';
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Discriminated union tying `href` and `onClick` types to the `as` prop.
|
|
96
|
+
*/
|
|
97
|
+
export type ButtonProps = ButtonAsNativeButtonProps | ButtonAsAnchorProps;
|
|
98
|
+
/**
|
|
99
|
+
* Runtime type guard that checks if the provided props correspond to an anchor variant of the Button.
|
|
100
|
+
*/
|
|
101
|
+
export declare const isAsLink: (props: ButtonProps) => props is ButtonAsAnchorProps;
|
|
102
|
+
/**
|
|
103
|
+
* Runtime type guard that checks if the provided props correspond to a native button variant.
|
|
104
|
+
*/
|
|
105
|
+
export declare const isAsButton: (props: ButtonProps) => props is ButtonAsNativeButtonProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfigProviderProps } from './ConfigProvider.type.ts';
|
|
2
|
+
/**
|
|
3
|
+
* ConfigProvider позволяет централизованно переопределять CSS custom properties для всей библиотеки компонентов.
|
|
4
|
+
* Также он поддерживает настройку локалей для компонентов
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @example
|
|
8
|
+
* import enUS from 'skillgrid/locale/en_US';
|
|
9
|
+
* <ConfigProvider locale={enUS} theme={{ '--button-background-accent': '#FF0000' }}>
|
|
10
|
+
* <Button mode="primary" buttonStyle="accent">Primary</Button>
|
|
11
|
+
* </ConfigProvider>
|
|
12
|
+
*/
|
|
13
|
+
export declare const ConfigProvider: ({ locale, theme, children, className, }: ConfigProviderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConfigContextType } from './ConfigProvider.type';
|
|
2
|
+
export declare const ConfigContext: import('react').Context<ConfigContextType>;
|
|
3
|
+
export declare const useConfig: () => ConfigContextType;
|
|
4
|
+
export declare const useLocale: () => import('../../locale/type').ComponentLocale<unknown>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Locale } from '../../locale/type';
|
|
3
|
+
export interface ConfigProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* The locale object containing translations for components
|
|
6
|
+
*/
|
|
7
|
+
locale?: Locale;
|
|
8
|
+
/**
|
|
9
|
+
* Объект с CSS custom properties для темы
|
|
10
|
+
* Например: { '--button-background-accent': '#FF0000' }
|
|
11
|
+
*/
|
|
12
|
+
theme?: Record<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
*/
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Дополнительный className для wrapper
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ConfigContextType {
|
|
22
|
+
locale: Locale;
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ImageProps } from './Image.type';
|
|
2
|
+
/**
|
|
3
|
+
* Image компонент для отображения изображений
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <Image src="/path/to/image.jpg" alt="Description" />
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const Image: import('react').ForwardRefExoticComponent<ImageProps & import('react').RefAttributes<HTMLImageElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type ImageStatus = 'loading' | 'loaded' | 'error';
|
|
2
|
+
export type ImageRenderMap = Record<'loader' | 'error' | 'image', React.ReactElement>;
|
|
3
|
+
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'loading' | 'alt' | 'onLoad' | 'onError' | 'width' | 'height'> {
|
|
4
|
+
/**
|
|
5
|
+
* Тип подгрузки картинки
|
|
6
|
+
* @default 'lazy'
|
|
7
|
+
*/
|
|
8
|
+
loading?: React.ImgHTMLAttributes<HTMLImageElement>['loading'];
|
|
9
|
+
/**
|
|
10
|
+
* Альтернативный текст для изображения
|
|
11
|
+
* @default ''
|
|
12
|
+
*/
|
|
13
|
+
alt?: React.ImgHTMLAttributes<HTMLImageElement>['alt'];
|
|
14
|
+
/**
|
|
15
|
+
* Показывает состояние загрузки
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительный CSS класс
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Test ID для тестирования
|
|
25
|
+
* @default 'image'
|
|
26
|
+
*/
|
|
27
|
+
'data-testid'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Callback при успешной загрузке изображения
|
|
30
|
+
*/
|
|
31
|
+
onLoad?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Callback при ошибке загрузки изображения
|
|
34
|
+
*/
|
|
35
|
+
onError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LanguageSwitcherProps } from './LanguageSwitcher.type';
|
|
2
|
+
/**
|
|
3
|
+
* Language switcher component for changing the current language
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <LanguageSwitcher />
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @param {LanguageSwitcherProps} props - The component props
|
|
12
|
+
* @returns {JSX.Element} A React component
|
|
13
|
+
*/
|
|
14
|
+
export declare const LanguageSwitcher: ({ className }: LanguageSwitcherProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LoaderProps } from './Loader.type';
|
|
2
|
+
/**
|
|
3
|
+
* Компонент лоадера
|
|
4
|
+
* * Если есть children - работает как контейнер с оверлеем
|
|
5
|
+
* * Если нет children - работает как спиннер
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
* @example
|
|
9
|
+
* * Как спиннер
|
|
10
|
+
* <Loader size={48} variant="neutral" />
|
|
11
|
+
*
|
|
12
|
+
* * Как контейнер
|
|
13
|
+
* <Loader loading={isLoading} variant="neutral">
|
|
14
|
+
* <button>Click me</button>
|
|
15
|
+
* </Loader>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare const Loader: import('react').ForwardRefExoticComponent<LoaderProps & import('react').RefAttributes<HTMLDivElement | SVGSVGElement>>;
|
|
19
|
+
export { Loader };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface BaseLoaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Размер лоадера в пикселях
|
|
5
|
+
* @default 24
|
|
6
|
+
*/
|
|
7
|
+
size?: 16 | 24 | 48 | 64 | 96;
|
|
8
|
+
/**
|
|
9
|
+
* Вариант цвета лоадера
|
|
10
|
+
* @default 'accent'
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'accent' | 'neutral' | 'positive' | 'negative' | 'contrast' | 'gray' | 'special';
|
|
13
|
+
/**
|
|
14
|
+
* Дополнительный CSS класс
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* ID для тестирования
|
|
19
|
+
*/
|
|
20
|
+
'data-testid'?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Инлайн стили
|
|
23
|
+
*/
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
export interface LoaderSpinnerProps extends BaseLoaderProps, HTMLAttributes<SVGSVGElement> {
|
|
27
|
+
}
|
|
28
|
+
export interface LoaderContainerProps extends BaseLoaderProps, HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/**
|
|
30
|
+
* Показывать ли лоадер
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Дочерние элементы
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export type LoaderProps = LoaderSpinnerProps | LoaderContainerProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const PRIMARY_COLORS: {
|
|
2
|
+
pink: string;
|
|
3
|
+
red: string;
|
|
4
|
+
orange: string;
|
|
5
|
+
yellow: string;
|
|
6
|
+
green: string;
|
|
7
|
+
sky: string;
|
|
8
|
+
blue: string;
|
|
9
|
+
violet: string;
|
|
10
|
+
graphite: string;
|
|
11
|
+
gray: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const COLOR_VARIABLES: string[];
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const pageStyles: {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
color: string;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
padding: string;
|
|
7
|
+
maxWidth: string;
|
|
8
|
+
margin: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const headerStyles: {
|
|
11
|
+
display: string;
|
|
12
|
+
flexDirection: "column";
|
|
13
|
+
alignItems: string;
|
|
14
|
+
padding: string;
|
|
15
|
+
gap: string;
|
|
16
|
+
width: string;
|
|
17
|
+
marginBottom: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const headerTitleContainerStyles: {
|
|
20
|
+
display: string;
|
|
21
|
+
flexDirection: "column";
|
|
22
|
+
alignItems: string;
|
|
23
|
+
padding: string;
|
|
24
|
+
gap: string;
|
|
25
|
+
width: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const headerTitleStyles: {
|
|
28
|
+
width: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
fontStyle: string;
|
|
31
|
+
fontWeight: number;
|
|
32
|
+
fontSize: string;
|
|
33
|
+
lineHeight: string;
|
|
34
|
+
letterSpacing: string;
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const headerSubtitleStyles: {
|
|
38
|
+
width: string;
|
|
39
|
+
maxWidth: string;
|
|
40
|
+
fontFamily: string;
|
|
41
|
+
fontStyle: string;
|
|
42
|
+
fontWeight: number;
|
|
43
|
+
fontSize: string;
|
|
44
|
+
lineHeight: string;
|
|
45
|
+
color: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const headerDescriptionStyles: {
|
|
48
|
+
width: string;
|
|
49
|
+
maxWidth: string;
|
|
50
|
+
fontFamily: string;
|
|
51
|
+
fontStyle: string;
|
|
52
|
+
fontWeight: number;
|
|
53
|
+
fontSize: string;
|
|
54
|
+
lineHeight: string;
|
|
55
|
+
letterSpacing: string;
|
|
56
|
+
color: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const sectionStyles: {
|
|
59
|
+
marginBottom: string;
|
|
60
|
+
padding: string;
|
|
61
|
+
};
|
|
62
|
+
export declare const sectionTitleStyles: {
|
|
63
|
+
width: string;
|
|
64
|
+
fontFamily: string;
|
|
65
|
+
fontStyle: string;
|
|
66
|
+
fontWeight: number;
|
|
67
|
+
fontSize: string;
|
|
68
|
+
lineHeight: string;
|
|
69
|
+
color: string;
|
|
70
|
+
marginBottom: string;
|
|
71
|
+
};
|
|
72
|
+
export declare const subSectionTitleStyles: {
|
|
73
|
+
fontFamily: string;
|
|
74
|
+
fontSize: string;
|
|
75
|
+
fontWeight: number;
|
|
76
|
+
lineHeight: string;
|
|
77
|
+
marginBottom: string;
|
|
78
|
+
marginTop: string;
|
|
79
|
+
color: string;
|
|
80
|
+
};
|
|
81
|
+
export declare const paragraphStyles: {
|
|
82
|
+
fontFamily: string;
|
|
83
|
+
fontSize: string;
|
|
84
|
+
lineHeight: string;
|
|
85
|
+
color: string;
|
|
86
|
+
marginBottom: string;
|
|
87
|
+
};
|
|
88
|
+
export declare const listStyles: {
|
|
89
|
+
marginBottom: string;
|
|
90
|
+
paddingLeft: string;
|
|
91
|
+
};
|
|
92
|
+
export declare const listItemStyles: {
|
|
93
|
+
fontFamily: string;
|
|
94
|
+
fontSize: string;
|
|
95
|
+
lineHeight: string;
|
|
96
|
+
color: string;
|
|
97
|
+
marginBottom: string;
|
|
98
|
+
};
|
|
99
|
+
export declare const dividerStyles: {
|
|
100
|
+
borderBottom: string;
|
|
101
|
+
margin: string;
|
|
102
|
+
width: string;
|
|
103
|
+
};
|
|
104
|
+
export declare const codeBlockStyles: {
|
|
105
|
+
fontFamily: string;
|
|
106
|
+
fontSize: string;
|
|
107
|
+
lineHeight: string;
|
|
108
|
+
backgroundColor: string;
|
|
109
|
+
padding: string;
|
|
110
|
+
borderRadius: string;
|
|
111
|
+
marginBottom: string;
|
|
112
|
+
overflow: string;
|
|
113
|
+
width: string;
|
|
114
|
+
color: string;
|
|
115
|
+
};
|
|
116
|
+
export declare const gridStyles: {
|
|
117
|
+
display: string;
|
|
118
|
+
gridTemplateColumns: string;
|
|
119
|
+
gap: string;
|
|
120
|
+
width: string;
|
|
121
|
+
marginBottom: string;
|
|
122
|
+
};
|
|
123
|
+
export declare const rowStyles: {
|
|
124
|
+
display: string;
|
|
125
|
+
flexWrap: "wrap";
|
|
126
|
+
gap: string;
|
|
127
|
+
marginBottom: string;
|
|
128
|
+
};
|
|
129
|
+
export declare const variantContainerStyles: {
|
|
130
|
+
boxSizing: "border-box";
|
|
131
|
+
display: string;
|
|
132
|
+
flexDirection: "column";
|
|
133
|
+
alignItems: string;
|
|
134
|
+
padding: string;
|
|
135
|
+
width: string;
|
|
136
|
+
height: string;
|
|
137
|
+
background: string;
|
|
138
|
+
border: string;
|
|
139
|
+
boxShadow: string;
|
|
140
|
+
borderRadius: string;
|
|
141
|
+
marginBottom: string;
|
|
142
|
+
};
|
|
143
|
+
export declare const darkVariantContainerStyles: {
|
|
144
|
+
background: string;
|
|
145
|
+
border: string;
|
|
146
|
+
boxSizing: "border-box";
|
|
147
|
+
display: string;
|
|
148
|
+
flexDirection: "column";
|
|
149
|
+
alignItems: string;
|
|
150
|
+
padding: string;
|
|
151
|
+
width: string;
|
|
152
|
+
height: string;
|
|
153
|
+
boxShadow: string;
|
|
154
|
+
borderRadius: string;
|
|
155
|
+
marginBottom: string;
|
|
156
|
+
};
|
|
157
|
+
export declare const variantDemoStyles: {
|
|
158
|
+
boxSizing: "border-box";
|
|
159
|
+
display: string;
|
|
160
|
+
flexDirection: "column";
|
|
161
|
+
justifyContent: string;
|
|
162
|
+
alignItems: string;
|
|
163
|
+
padding: string;
|
|
164
|
+
gap: string;
|
|
165
|
+
width: string;
|
|
166
|
+
height: string;
|
|
167
|
+
borderBottom: string;
|
|
168
|
+
};
|
|
169
|
+
export declare const darkVariantDemoStyles: {
|
|
170
|
+
borderBottom: string;
|
|
171
|
+
boxSizing: "border-box";
|
|
172
|
+
display: string;
|
|
173
|
+
flexDirection: "column";
|
|
174
|
+
justifyContent: string;
|
|
175
|
+
alignItems: string;
|
|
176
|
+
padding: string;
|
|
177
|
+
gap: string;
|
|
178
|
+
width: string;
|
|
179
|
+
height: string;
|
|
180
|
+
};
|
|
181
|
+
export declare const variantInfoStyles: {
|
|
182
|
+
display: string;
|
|
183
|
+
flexDirection: "column";
|
|
184
|
+
alignItems: string;
|
|
185
|
+
padding: string;
|
|
186
|
+
gap: string;
|
|
187
|
+
width: string;
|
|
188
|
+
height: string;
|
|
189
|
+
};
|
|
190
|
+
export declare const variantTitleStyles: {
|
|
191
|
+
width: string;
|
|
192
|
+
fontFamily: string;
|
|
193
|
+
fontStyle: string;
|
|
194
|
+
fontWeight: string;
|
|
195
|
+
fontSize: string;
|
|
196
|
+
lineHeight: string;
|
|
197
|
+
color: string;
|
|
198
|
+
};
|
|
199
|
+
export declare const darkVariantTitleStyles: {
|
|
200
|
+
color: string;
|
|
201
|
+
width: string;
|
|
202
|
+
fontFamily: string;
|
|
203
|
+
fontStyle: string;
|
|
204
|
+
fontWeight: string;
|
|
205
|
+
fontSize: string;
|
|
206
|
+
lineHeight: string;
|
|
207
|
+
};
|
|
208
|
+
export declare const variantDescriptionStyles: {
|
|
209
|
+
width: string;
|
|
210
|
+
fontFamily: string;
|
|
211
|
+
fontStyle: string;
|
|
212
|
+
fontWeight: string;
|
|
213
|
+
fontSize: string;
|
|
214
|
+
lineHeight: string;
|
|
215
|
+
letterSpacing: string;
|
|
216
|
+
color: string;
|
|
217
|
+
};
|
|
218
|
+
export declare const darkVariantDescriptionStyles: {
|
|
219
|
+
color: string;
|
|
220
|
+
width: string;
|
|
221
|
+
fontFamily: string;
|
|
222
|
+
fontStyle: string;
|
|
223
|
+
fontWeight: string;
|
|
224
|
+
fontSize: string;
|
|
225
|
+
lineHeight: string;
|
|
226
|
+
letterSpacing: string;
|
|
227
|
+
};
|
|
228
|
+
export declare const tableStyles: {
|
|
229
|
+
width: string;
|
|
230
|
+
borderCollapse: "collapse";
|
|
231
|
+
marginBottom: string;
|
|
232
|
+
fontSize: string;
|
|
233
|
+
border: string;
|
|
234
|
+
borderRadius: string;
|
|
235
|
+
overflow: string;
|
|
236
|
+
};
|
|
237
|
+
export declare const tableCellStyles: {
|
|
238
|
+
padding: string;
|
|
239
|
+
textAlign: "left";
|
|
240
|
+
borderBottom: string;
|
|
241
|
+
color: string;
|
|
242
|
+
fontSize: string;
|
|
243
|
+
lineHeight: string;
|
|
244
|
+
fontFamily: string;
|
|
245
|
+
};
|
|
246
|
+
export declare const tableHeaderStyles: {
|
|
247
|
+
fontWeight: string;
|
|
248
|
+
background: string;
|
|
249
|
+
color: string;
|
|
250
|
+
padding: string;
|
|
251
|
+
textAlign: "left";
|
|
252
|
+
borderBottom: string;
|
|
253
|
+
fontSize: string;
|
|
254
|
+
lineHeight: string;
|
|
255
|
+
fontFamily: string;
|
|
256
|
+
};
|
|
257
|
+
export declare const Header: ({ title, subtitle, description, }: {
|
|
258
|
+
title: string;
|
|
259
|
+
subtitle?: string;
|
|
260
|
+
description?: string;
|
|
261
|
+
}) => React.JSX.Element;
|
|
262
|
+
export declare const Section: ({ title, children }: {
|
|
263
|
+
title: string;
|
|
264
|
+
children: React.ReactNode;
|
|
265
|
+
}) => React.JSX.Element;
|
|
266
|
+
export declare const SubSection: ({ title, children }: {
|
|
267
|
+
title: string;
|
|
268
|
+
children: React.ReactNode;
|
|
269
|
+
}) => React.JSX.Element;
|
|
270
|
+
export declare const Paragraph: ({ children }: {
|
|
271
|
+
children: React.ReactNode;
|
|
272
|
+
}) => React.JSX.Element;
|
|
273
|
+
export declare const List: ({ items }: {
|
|
274
|
+
items: React.ReactNode[];
|
|
275
|
+
}) => React.JSX.Element;
|
|
276
|
+
export declare const Divider: () => React.JSX.Element;
|
|
277
|
+
export declare const CodeBlock: ({ content }: {
|
|
278
|
+
content: string;
|
|
279
|
+
}) => React.JSX.Element;
|
|
280
|
+
export declare const Grid: ({ children }: {
|
|
281
|
+
children: React.ReactNode;
|
|
282
|
+
}) => React.JSX.Element;
|
|
283
|
+
export declare const Row: ({ children }: {
|
|
284
|
+
children: React.ReactNode;
|
|
285
|
+
}) => React.JSX.Element;
|
|
286
|
+
export declare const Variant: ({ title, paramText, dark, children, }: {
|
|
287
|
+
title: string;
|
|
288
|
+
paramText?: string;
|
|
289
|
+
dark?: boolean;
|
|
290
|
+
children: React.ReactNode;
|
|
291
|
+
}) => React.JSX.Element;
|
|
292
|
+
export declare const Table: ({ headers, rows }: {
|
|
293
|
+
headers: string[];
|
|
294
|
+
rows: React.ReactNode[][];
|
|
295
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Хук для определения фонового цвета элемента.
|
|
3
|
+
* @returns {Object} Объект с ref (для привязки к элементу) и bgColor (цвет фона или null).
|
|
4
|
+
* @property {React.RefObject<HTMLDivElement>} ref - Ref для привязки к целевому элементу.
|
|
5
|
+
* @property {string | null} bgColor - Цвет фона элемента или null, если фон прозрачный.
|
|
6
|
+
* @example:
|
|
7
|
+
* const Component = () => {
|
|
8
|
+
* const { ref, bgColor } = useBackgroundColor();
|
|
9
|
+
*
|
|
10
|
+
* return (
|
|
11
|
+
* <div ref={ref}>
|
|
12
|
+
* <p>Фон этого элемента: {bgColor || 'прозрачный'}</p>
|
|
13
|
+
* </div>
|
|
14
|
+
* );
|
|
15
|
+
* };
|
|
16
|
+
*/
|
|
17
|
+
export declare const useBackgroundColor: () => {
|
|
18
|
+
ref: import('react').RefObject<HTMLDivElement>;
|
|
19
|
+
bgColor: string | null;
|
|
20
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { I18nConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for handling custom translations in components
|
|
4
|
+
*
|
|
5
|
+
* @param {string} namespace - Translation namespace (usually component name in lowercase)
|
|
6
|
+
* @param {I18nConfig} [customTranslations] - Custom translations to override defaults
|
|
7
|
+
* @returns {(key: string, options?: any) => string} Translation function
|
|
8
|
+
*/
|
|
9
|
+
export declare const useCustomTranslations: (namespace: string, customTranslations?: I18nConfig) => import('i18next').TFunction<"translation", undefined>;
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs2.js"),o=require("./index.cjs3.js"),t=require("./index.cjs4.js"),i=require("./index.cjs5.js"),n=require("./index.cjs6.js"),u=require("./index.cjs7.js"),e=require("./index.cjs8.js"),a=require("./index.cjs9.js"),d=require("./index.cjs10.js");exports.Avatar=r.Avatar;exports.Badge=o.Badge;exports.Button=t.Button;exports.Image=i.Image;exports.Loader=n.Loader;exports.ConfigProvider=u.ConfigProvider;exports.useConfig=e.useConfig;exports.useLocale=e.useLocale;exports.enUS=a.default;exports.ruRU=d.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={};exports.default=e;
|