@candy.thieves/ui-kit-lumos 0.0.50 → 0.0.51
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 +937 -1151
- package/dist/index.js.map +1 -1
- package/dist/types/assets/index.d.ts +0 -3
- package/dist/types/components/Carousel/Carousel.d.ts +3 -3
- package/dist/types/components/Menu/Menu.d.ts +3 -5
- package/dist/types/components/ReadMore/ReadMore.d.ts +1 -2
- package/dist/types/components/Recaptcha/Recaptcha.d.ts +12 -0
- package/dist/types/components/Recaptcha/index.d.ts +1 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +3 -5
- package/dist/types/components/Tabs/Tabs.d.ts +0 -1
- 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/types/types.d.ts +0 -10
- package/dist/types/utils/getHorizontalMetrics.d.ts +1 -1
- package/dist/types/utils/getVerticalMetrics.d.ts +1 -1
- package/package.json +6 -3
- package/dist/types/assets/icons/Clock.d.ts +0 -3
- package/dist/types/assets/icons/List.d.ts +0 -3
- package/dist/types/assets/icons/RecycleBin.d.ts +0 -3
- 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 -18
- package/dist/types/components/Header/index.d.ts +0 -1
|
@@ -100,7 +100,4 @@ export { Yandex } from './icons/Yandex';
|
|
|
100
100
|
export { Sending } from './icons/Sending';
|
|
101
101
|
export { ErrorIcon } from './icons/ErrorIcon';
|
|
102
102
|
export { FileIcon } from './icons/FileIcon';
|
|
103
|
-
export { List } from './icons/List';
|
|
104
|
-
export { RecycleBin } from './icons/RecycleBin';
|
|
105
|
-
export { Clock } from './icons/Clock';
|
|
106
103
|
export { Logo } from './logo/Logo';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
export type CarouselProps = {
|
|
2
|
-
slides:
|
|
3
|
-
controlsSize?: 'l' | 's';
|
|
3
|
+
slides: ReactNode[];
|
|
4
4
|
};
|
|
5
|
-
export declare const Carousel: ({ slides
|
|
5
|
+
export declare const Carousel: ({ slides }: CarouselProps) => import("react").JSX.Element | null;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
export type MenuItem = {
|
|
3
3
|
activeIcon?: ReactNode;
|
|
4
|
-
href?:
|
|
4
|
+
href?: string;
|
|
5
5
|
icon: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
};
|
|
8
8
|
type MenuProps = {
|
|
9
|
-
userId?: string;
|
|
10
9
|
activeId: string;
|
|
11
10
|
items: MenuItem[];
|
|
12
11
|
onValueChange?: (id: string) => void;
|
|
13
|
-
linkTag?: ElementType;
|
|
14
12
|
};
|
|
15
|
-
export declare const Menu: ({
|
|
13
|
+
export declare const Menu: ({ items, activeId, onValueChange }: MenuProps) => import("react").JSX.Element;
|
|
16
14
|
export {};
|
|
@@ -4,6 +4,5 @@ export type ReadMoreProps = {
|
|
|
4
4
|
expandLabel?: string;
|
|
5
5
|
collapseLabel?: string;
|
|
6
6
|
className?: string;
|
|
7
|
-
onExpandedChange?: (expanded: boolean) => void;
|
|
8
7
|
};
|
|
9
|
-
export declare const ReadMore: ({ text, maxLength, expandLabel, collapseLabel, className,
|
|
8
|
+
export declare const ReadMore: ({ text, maxLength, expandLabel, collapseLabel, className, }: ReadMoreProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import ReCAPTCHA from 'react-google-recaptcha';
|
|
2
|
+
export type RecaptchaProps = {
|
|
3
|
+
siteKey: string;
|
|
4
|
+
onChange?: (token: null | string) => void;
|
|
5
|
+
onExpired?: () => void;
|
|
6
|
+
onError?: () => void;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
expiredMessage?: string;
|
|
9
|
+
theme?: 'dark' | 'light';
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Recaptcha: import("react").ForwardRefExoticComponent<RecaptchaProps & import("react").RefAttributes<ReCAPTCHA>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Recaptcha';
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
export type SidebarItem = {
|
|
3
3
|
activeIcon?: ReactNode;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
href?:
|
|
5
|
+
href?: string;
|
|
6
6
|
icon: ReactNode;
|
|
7
7
|
id: string;
|
|
8
8
|
label: string;
|
|
9
9
|
};
|
|
10
10
|
type SidebarProps = {
|
|
11
|
-
userId?: string;
|
|
12
11
|
activeId: string;
|
|
13
12
|
items: SidebarItem[];
|
|
14
13
|
logOutIcon: ReactNode;
|
|
15
14
|
onLogout: () => void;
|
|
16
15
|
onValueChange?: (id: string) => void;
|
|
17
|
-
linkTag?: ElementType;
|
|
18
16
|
};
|
|
19
|
-
export declare const Sidebar: ({ items,
|
|
17
|
+
export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: SidebarProps) => import("react").JSX.Element;
|
|
20
18
|
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';
|
|
@@ -3,13 +3,3 @@ export type ProgressSizeVariant = 'lg' | 'md' | 'sm';
|
|
|
3
3
|
export type AvatarSize = 'l' | 'm' | 's' | 'xs';
|
|
4
4
|
export type MainAvatarSize = 'xl' | 'xxl';
|
|
5
5
|
export type ModalSize = 'l' | 'm' | 's' | 'xl' | 'xs';
|
|
6
|
-
export type VerticalMetrics = {
|
|
7
|
-
thumbHeight: number;
|
|
8
|
-
maxThumbOffsetY: number;
|
|
9
|
-
maxScrollOffsetY: number;
|
|
10
|
-
};
|
|
11
|
-
export type HorizontalMetrics = {
|
|
12
|
-
thumbWidth: number;
|
|
13
|
-
maxThumbOffsetX: number;
|
|
14
|
-
maxScrollOffsetX: number;
|
|
15
|
-
};
|
|
@@ -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.51",
|
|
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,9 +37,11 @@
|
|
|
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
|
-
"radix-ui": "^1.6.2"
|
|
43
|
+
"radix-ui": "^1.6.2",
|
|
44
|
+
"react-google-recaptcha": "^3.1.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@babel/core": "^7.29.7",
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
"@types/node": "^24.13.2",
|
|
61
63
|
"@types/react": "^19.2.17",
|
|
62
64
|
"@types/react-dom": "^19.2.3",
|
|
65
|
+
"@types/react-google-recaptcha": "^2.1.9",
|
|
63
66
|
"@vitejs/plugin-react": "^6.0.3",
|
|
64
67
|
"@vitejs/plugin-react-swc": "^4.3.1",
|
|
65
68
|
"@vitest/browser-playwright": "^4.1.10",
|
|
@@ -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,18 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
|
-
import { type ActionMenuItem } from '@/components/ActionMenu';
|
|
3
|
-
export type HeaderProps = {
|
|
4
|
-
brandName?: string;
|
|
5
|
-
isAuthenticated?: boolean;
|
|
6
|
-
logoHref?: string;
|
|
7
|
-
logInLabel?: string;
|
|
8
|
-
mobileAuthenticatedMenuItems?: ActionMenuItem[];
|
|
9
|
-
mobileMenuLabel?: string;
|
|
10
|
-
notificationCount?: number;
|
|
11
|
-
notificationLabel?: string;
|
|
12
|
-
onLogInClick?: () => void;
|
|
13
|
-
onNotificationClick?: () => void;
|
|
14
|
-
onSignUpClick?: () => void;
|
|
15
|
-
signUpLabel?: string;
|
|
16
|
-
linkTag?: ElementType;
|
|
17
|
-
} & Omit<ComponentPropsWithoutRef<'header'>, 'children'>;
|
|
18
|
-
export declare const Header: ({ brandName, className, isAuthenticated, logoHref, logInLabel, mobileAuthenticatedMenuItems, mobileMenuLabel, notificationCount, notificationLabel, onLogInClick, onNotificationClick, onSignUpClick, signUpLabel, linkTag: LinkTag, ...props }: HeaderProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Header';
|