@candy.thieves/ui-kit-lumos 0.0.29 → 0.0.30
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.css +1 -1
- package/dist/index.js +718 -589
- package/dist/index.js.map +1 -1
- package/dist/types/components/Header/Header.d.ts +19 -0
- package/dist/types/components/Header/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/constants/constants.d.ts +2 -1
- package/dist/types/types/types.d.ts +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { HeaderLanguage, HeaderLanguageOption } from '@/types';
|
|
3
|
+
export type HeaderProps = {
|
|
4
|
+
brandName?: string;
|
|
5
|
+
defaultLanguage?: HeaderLanguage;
|
|
6
|
+
isAuthenticated?: boolean;
|
|
7
|
+
language?: HeaderLanguage;
|
|
8
|
+
languageOptions?: HeaderLanguageOption[];
|
|
9
|
+
logInLabel?: string;
|
|
10
|
+
mobileMenuLabel?: string;
|
|
11
|
+
notificationCount?: number;
|
|
12
|
+
notificationLabel?: string;
|
|
13
|
+
onLanguageChange?: (value: HeaderLanguage) => void;
|
|
14
|
+
onLogInClick?: () => void;
|
|
15
|
+
onNotificationClick?: () => void;
|
|
16
|
+
onSignUpClick?: () => void;
|
|
17
|
+
signUpLabel?: string;
|
|
18
|
+
} & Omit<ComponentPropsWithoutRef<'header'>, 'children'>;
|
|
19
|
+
export declare const Header: ({ brandName, className, defaultLanguage, isAuthenticated, language, languageOptions, logInLabel, mobileMenuLabel, notificationCount, notificationLabel, onLanguageChange, onLogInClick, onNotificationClick, onSignUpClick, signUpLabel, ...props }: HeaderProps) => import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ProgressThemeColor } from '@/types';
|
|
1
|
+
import type { HeaderLanguageOption, ProgressThemeColor } from '@/types';
|
|
2
2
|
export declare const COLOR_MAP: Record<ProgressThemeColor, string>;
|
|
3
3
|
export declare const WAVE_FORM: number[];
|
|
4
|
+
export declare const DEFAULT_HEADER_LANGUAGE_OPTIONS: HeaderLanguageOption[];
|
|
4
5
|
export declare const TAB_INDEX: {
|
|
5
6
|
readonly ENABLED: 0;
|
|
6
7
|
readonly DISABLED: -1;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
export type ProgressThemeColor = 'error' | 'inherit' | 'primary' | 'success' | 'warning';
|
|
2
3
|
export type ProgressSizeVariant = 'lg' | 'md' | 'sm';
|
|
3
4
|
export type AvatarSize = 'l' | 'm' | 's' | 'xs';
|
|
4
5
|
export type MainAvatarSize = 'xl' | 'xxl';
|
|
5
6
|
export type ModalSize = 'l' | 'm' | 's' | 'xl' | 'xs';
|
|
7
|
+
export type HeaderLanguage = 'english' | 'russian';
|
|
8
|
+
export type HeaderLanguageOption = {
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
label: string;
|
|
11
|
+
value: HeaderLanguage;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@candy.thieves/ui-kit-lumos",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.30",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dev": "vite",
|
|
16
16
|
"build": "vite build && tsc --build tsconfig.build.json",
|
|
17
17
|
"type:check": "tsc -b --noEmit",
|
|
18
|
-
"stylelint:check": "npx stylelint \"
|
|
18
|
+
"stylelint:check": "npx stylelint \"src/**/*.{css,scss}\" \".storybook/**/*.{css,scss}\" --allow-empty-input",
|
|
19
19
|
"stylelint:fix": "stylelint --fix src/{,*/}*.{scss,css} --allow-empty-input",
|
|
20
20
|
"format": "prettier --write src",
|
|
21
21
|
"lint": "eslint src --ext .jsx,.js,.tsx,.ts --no-error-on-unmatched-pattern --fix",
|