@candy.thieves/ui-kit-lumos 0.0.51 → 0.0.53

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.
@@ -0,0 +1,3 @@
1
+ import { type IconProps } from '@/utils';
2
+ declare const Clock: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export { Clock };
@@ -0,0 +1,3 @@
1
+ import { type IconProps } from '@/utils';
2
+ declare const List: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export { List };
@@ -0,0 +1,3 @@
1
+ import { type IconProps } from '@/utils';
2
+ declare const RecycleBin: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export { RecycleBin };
@@ -100,4 +100,7 @@ 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';
103
106
  export { Logo } from './logo/Logo';
@@ -0,0 +1,23 @@
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;
@@ -0,0 +1,2 @@
1
+ export { ActionMenu } from './ActionMenu';
2
+ export type { ActionMenuItem, ActionMenuProps } from './ActionMenu';
@@ -6,6 +6,7 @@ export type MainAvatarProps = {
6
6
  userName: string;
7
7
  delayMs?: number;
8
8
  showCloseButton?: boolean;
9
+ isScalable?: boolean;
9
10
  onClose?: () => void;
10
11
  size?: MainAvatarSize;
11
12
  } & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
@@ -15,6 +16,7 @@ export declare const MainAvatar: import("react").ForwardRefExoticComponent<{
15
16
  userName: string;
16
17
  delayMs?: number;
17
18
  showCloseButton?: boolean;
19
+ isScalable?: boolean;
18
20
  onClose?: () => void;
19
21
  size?: MainAvatarSize;
20
22
  } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  export type CarouselProps = {
3
- slides: ReactNode[];
2
+ slides: string[];
3
+ controlsSize?: 'l' | 's';
4
4
  };
5
- export declare const Carousel: ({ slides }: CarouselProps) => import("react").JSX.Element | null;
5
+ export declare const Carousel: ({ slides, controlsSize }: CarouselProps) => import("react").JSX.Element | null;
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1 @@
1
+ export * from './Header';
@@ -1,14 +1,16 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ElementType, ReactNode } from 'react';
2
2
  export type MenuItem = {
3
3
  activeIcon?: ReactNode;
4
- href?: string;
4
+ href?: ((userId: string) => string) | string;
5
5
  icon: ReactNode;
6
6
  id: string;
7
7
  };
8
8
  type MenuProps = {
9
+ userId?: string;
9
10
  activeId: string;
10
11
  items: MenuItem[];
11
12
  onValueChange?: (id: string) => void;
13
+ linkTag?: ElementType;
12
14
  };
13
- export declare const Menu: ({ items, activeId, onValueChange }: MenuProps) => import("react").JSX.Element;
15
+ export declare const Menu: ({ userId, items, activeId, onValueChange, linkTag: LinkTag, }: MenuProps) => import("react").JSX.Element;
14
16
  export {};
@@ -4,5 +4,6 @@ export type ReadMoreProps = {
4
4
  expandLabel?: string;
5
5
  collapseLabel?: string;
6
6
  className?: string;
7
+ onExpandedChange?: (expanded: boolean) => void;
7
8
  };
8
- export declare const ReadMore: ({ text, maxLength, expandLabel, collapseLabel, className, }: ReadMoreProps) => import("react").JSX.Element;
9
+ export declare const ReadMore: ({ text, maxLength, expandLabel, collapseLabel, className, onExpandedChange, }: ReadMoreProps) => import("react").JSX.Element;
@@ -1,18 +1,20 @@
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;
5
- href?: string;
5
+ href?: ((userId: string) => string) | string;
6
6
  icon: ReactNode;
7
7
  id: string;
8
8
  label: string;
9
9
  };
10
10
  type SidebarProps = {
11
+ userId?: string;
11
12
  activeId: string;
12
13
  items: SidebarItem[];
13
14
  logOutIcon: ReactNode;
14
15
  onLogout: () => void;
15
16
  onValueChange?: (id: string) => void;
17
+ linkTag?: ElementType;
16
18
  };
17
- export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: SidebarProps) => import("react").JSX.Element;
19
+ export declare const Sidebar: ({ items, userId, activeId, onValueChange, onLogout, logOutIcon, linkTag: LinkTag, }: SidebarProps) => import("react").JSX.Element;
18
20
  export {};
@@ -5,6 +5,7 @@ export type Tab = {
5
5
  label: string;
6
6
  content: ReactNode;
7
7
  disabled?: boolean;
8
+ icon?: ReactNode;
8
9
  };
9
10
  export type TabsProps = Omit<ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'defaultValue' | 'onValueChange'> & {
10
11
  tabs: Tab[];
@@ -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' | 'h1' | 'h2' | 'h3' | 'large' | 'link' | 'signature' | 'signature-legal' | 'subtitle1' | 'subtitle2' | 'subtitle-link';
2
+ export type TypographyVariant = 'body1' | 'body2' | 'body3' | 'caption1' | 'caption2' | 'caution' | 'caution-error' | 'form-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,4 +1,5 @@
1
1
  export * from './Alert';
2
+ export * from './ActionMenu';
2
3
  export * from './AudioPlayer';
3
4
  export * from './Avatar';
4
5
  export * from './Button';
@@ -6,6 +7,7 @@ export * from './Cards';
6
7
  export * from './Carousel';
7
8
  export * from './Checkbox';
8
9
  export * from './CircularProgress';
10
+ export * from './Header';
9
11
  export * from './Input';
10
12
  export * from './LinearProgress';
11
13
  export * from './Menu';
@@ -3,3 +3,13 @@ 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 '@/components/types';
1
+ import type { HorizontalMetrics } from '@/types';
2
2
  export declare const getHorizontalMetrics: (viewport: HTMLDivElement) => HorizontalMetrics | null;
@@ -1,2 +1,2 @@
1
- import type { VerticalMetrics } from '@/components/types';
1
+ import type { VerticalMetrics } from '@/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.51",
4
+ "version": "0.0.53",
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 \"**/*.{css,scss}\"",
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",
@@ -37,11 +37,9 @@
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",
41
40
  "clsx": "^2.1.1",
42
41
  "eslint-plugin-perfectionist": "^5.10.0",
43
- "radix-ui": "^1.6.2",
44
- "react-google-recaptcha": "^3.1.0"
42
+ "radix-ui": "^1.6.2"
45
43
  },
46
44
  "devDependencies": {
47
45
  "@babel/core": "^7.29.7",
@@ -62,7 +60,6 @@
62
60
  "@types/node": "^24.13.2",
63
61
  "@types/react": "^19.2.17",
64
62
  "@types/react-dom": "^19.2.3",
65
- "@types/react-google-recaptcha": "^2.1.9",
66
63
  "@vitejs/plugin-react": "^6.0.3",
67
64
  "@vitejs/plugin-react-swc": "^4.3.1",
68
65
  "@vitest/browser-playwright": "^4.1.10",
@@ -1,12 +0,0 @@
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>>;
@@ -1 +0,0 @@
1
- export * from './Recaptcha';
@@ -1 +0,0 @@
1
- export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts';
@@ -1,10 +0,0 @@
1
- export type VerticalMetrics = {
2
- thumbHeight: number;
3
- maxThumbOffsetY: number;
4
- maxScrollOffsetY: number;
5
- };
6
- export type HorizontalMetrics = {
7
- thumbWidth: number;
8
- maxThumbOffsetX: number;
9
- maxScrollOffsetX: number;
10
- };