@candy.thieves/ui-kit-lumos 0.0.38 → 0.0.39
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 +974 -1129
- package/dist/index.js.map +1 -1
- package/dist/types/components/Carousel/Carousel.d.ts +1 -2
- package/dist/types/components/Sidebar/Sidebar.d.ts +3 -2
- package/dist/types/components/Typography/Typography.d.ts +1 -1
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/types/index.d.ts +1 -0
- package/dist/types/components/types/scroll.types.d.ts +10 -0
- package/dist/types/constants/constants.d.ts +1 -2
- package/dist/types/types/types.d.ts +0 -17
- package/dist/types/utils/getHorizontalMetrics.d.ts +1 -1
- package/dist/types/utils/getVerticalMetrics.d.ts +1 -1
- package/package.json +3 -2
- package/dist/types/components/ActionMenu/ActionMenu.d.ts +0 -23
- package/dist/types/components/ActionMenu/index.d.ts +0 -2
- package/dist/types/components/Header/Header.d.ts +0 -21
- package/dist/types/components/Header/index.d.ts +0 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export type CarouselProps = {
|
|
3
3
|
slides: ReactNode[];
|
|
4
|
-
controlsSize?: 'l' | 's';
|
|
5
4
|
};
|
|
6
|
-
export declare const Carousel: ({ slides
|
|
5
|
+
export declare const Carousel: ({ slides }: CarouselProps) => import("react").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ElementType, ReactNode } from 'react';
|
|
2
2
|
export type SidebarItem = {
|
|
3
3
|
activeIcon?: ReactNode;
|
|
4
4
|
disabled?: boolean;
|
|
@@ -13,6 +13,7 @@ type SidebarProps = {
|
|
|
13
13
|
logOutIcon: ReactNode;
|
|
14
14
|
onLogout: () => void;
|
|
15
15
|
onValueChange?: (id: string) => void;
|
|
16
|
+
linkTag?: ElementType;
|
|
16
17
|
};
|
|
17
|
-
export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: SidebarProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon, linkTag: LinkTag, }: SidebarProps) => import("react").JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
|
-
export type TypographyVariant = 'body1' | 'body2' | 'body3' | 'caption1' | 'caption2' | 'caution' | 'caution-error' | '
|
|
2
|
+
export type TypographyVariant = 'body1' | 'body2' | 'body3' | 'caption1' | 'caption2' | 'caution' | 'caution-error' | 'h1' | 'h2' | 'h3' | 'large' | 'link' | 'signature' | 'signature-legal' | 'subtitle1' | 'subtitle2' | 'subtitle-link';
|
|
3
3
|
export type TypographyAlign = 'center' | 'justify' | 'left' | 'right';
|
|
4
4
|
export type MarginProps = {
|
|
5
5
|
mt?: CSSProperties['marginTop'];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './Alert';
|
|
2
|
-
export * from './ActionMenu';
|
|
3
2
|
export * from './AudioPlayer';
|
|
4
3
|
export * from './Avatar';
|
|
5
4
|
export * from './Button';
|
|
@@ -7,7 +6,6 @@ export * from './Cards';
|
|
|
7
6
|
export * from './Carousel';
|
|
8
7
|
export * from './Checkbox';
|
|
9
8
|
export * from './CircularProgress';
|
|
10
|
-
export * from './Header';
|
|
11
9
|
export * from './Input';
|
|
12
10
|
export * from './LinearProgress';
|
|
13
11
|
export * from './Menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { 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[];
|
|
5
4
|
export declare const TAB_INDEX: {
|
|
6
5
|
readonly ENABLED: 0;
|
|
7
6
|
readonly DISABLED: -1;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
1
|
export type ProgressThemeColor = 'error' | 'inherit' | 'primary' | 'success' | 'warning';
|
|
3
2
|
export type ProgressSizeVariant = 'lg' | 'md' | 'sm';
|
|
4
3
|
export type AvatarSize = 'l' | 'm' | 's' | 'xs';
|
|
5
4
|
export type MainAvatarSize = 'xl' | 'xxl';
|
|
6
5
|
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
|
-
};
|
|
13
|
-
export type VerticalMetrics = {
|
|
14
|
-
thumbHeight: number;
|
|
15
|
-
maxThumbOffsetY: number;
|
|
16
|
-
maxScrollOffsetY: number;
|
|
17
|
-
};
|
|
18
|
-
export type HorizontalMetrics = {
|
|
19
|
-
thumbWidth: number;
|
|
20
|
-
maxThumbOffsetX: number;
|
|
21
|
-
maxScrollOffsetX: number;
|
|
22
|
-
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { HorizontalMetrics } from '@/types';
|
|
1
|
+
import type { HorizontalMetrics } from '@/components/types';
|
|
2
2
|
export declare const getHorizontalMetrics: (viewport: HTMLDivElement) => HorizontalMetrics | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { VerticalMetrics } from '@/types';
|
|
1
|
+
import type { VerticalMetrics } from '@/components/types';
|
|
2
2
|
export declare const getVerticalMetrics: (viewport: HTMLDivElement) => null | VerticalMetrics;
|
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.39",
|
|
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 \"**/*.{css,scss}\"",
|
|
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",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@radix-ui/themes": "^3.3.0",
|
|
38
38
|
"@storybook/addon-actions": "^9.0.8",
|
|
39
39
|
"@storybook/react": "^10.5.7",
|
|
40
|
+
"@storybook/test": "^8.6.15",
|
|
40
41
|
"clsx": "^2.1.1",
|
|
41
42
|
"eslint-plugin-perfectionist": "^5.10.0",
|
|
42
43
|
"radix-ui": "^1.6.2"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
3
|
-
export type ActionMenuItem = {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
icon?: ReactNode;
|
|
6
|
-
id: string;
|
|
7
|
-
itemProps?: Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, 'children' | 'disabled' | 'onSelect' | 'textValue'>;
|
|
8
|
-
label: ReactNode;
|
|
9
|
-
onSelect?: () => void;
|
|
10
|
-
textValue?: string;
|
|
11
|
-
};
|
|
12
|
-
export type ActionMenuProps = Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>, 'children'> & {
|
|
13
|
-
ariaLabel: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
contentClassName?: string;
|
|
16
|
-
contentProps?: Omit<ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>, 'children'>;
|
|
17
|
-
itemClassName?: string;
|
|
18
|
-
items: ActionMenuItem[];
|
|
19
|
-
portalProps?: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>;
|
|
20
|
-
trigger?: ReactNode;
|
|
21
|
-
triggerClassName?: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const ActionMenu: ({ ariaLabel, className, contentClassName, contentProps, itemClassName, items, modal, portalProps, trigger, triggerClassName, ...props }: ActionMenuProps) => import("react").JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import type { HeaderLanguage, HeaderLanguageOption } from '@/types';
|
|
3
|
-
import { type ActionMenuItem } from '@/components/ActionMenu';
|
|
4
|
-
export type HeaderProps = {
|
|
5
|
-
brandName?: string;
|
|
6
|
-
defaultLanguage?: HeaderLanguage;
|
|
7
|
-
isAuthenticated?: boolean;
|
|
8
|
-
language?: HeaderLanguage;
|
|
9
|
-
languageOptions?: HeaderLanguageOption[];
|
|
10
|
-
logInLabel?: string;
|
|
11
|
-
mobileAuthenticatedMenuItems?: ActionMenuItem[];
|
|
12
|
-
mobileMenuLabel?: string;
|
|
13
|
-
notificationCount?: number;
|
|
14
|
-
notificationLabel?: string;
|
|
15
|
-
onLanguageChange?: (value: HeaderLanguage) => void;
|
|
16
|
-
onLogInClick?: () => void;
|
|
17
|
-
onNotificationClick?: () => void;
|
|
18
|
-
onSignUpClick?: () => void;
|
|
19
|
-
signUpLabel?: string;
|
|
20
|
-
} & Omit<ComponentPropsWithoutRef<'header'>, 'children'>;
|
|
21
|
-
export declare const Header: ({ brandName, className, defaultLanguage, isAuthenticated, language, languageOptions, logInLabel, mobileAuthenticatedMenuItems, mobileMenuLabel, notificationCount, notificationLabel, onLanguageChange, onLogInClick, onNotificationClick, onSignUpClick, signUpLabel, ...props }: HeaderProps) => import("react").JSX.Element;
|