@candy.thieves/ui-kit-lumos 0.0.15 → 0.0.17

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.
Files changed (30) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +3021 -1913
  3. package/dist/index.js.map +1 -1
  4. package/dist/types/components/Alert/Alert.d.ts +14 -0
  5. package/dist/types/components/Alert/index.d.ts +1 -0
  6. package/dist/types/components/Carousel/Carousel.d.ts +5 -0
  7. package/dist/types/components/Carousel/index.d.ts +1 -0
  8. package/dist/types/components/Input/index.d.ts +0 -1
  9. package/dist/types/components/Menu/Menu.d.ts +14 -0
  10. package/dist/types/components/Menu/index.d.ts +1 -0
  11. package/dist/types/components/PasswordInput/index.d.ts +0 -1
  12. package/dist/types/components/Recaptcha/Recaptcha.d.ts +12 -0
  13. package/dist/types/components/Recaptcha/index.d.ts +1 -0
  14. package/dist/types/components/Scroll/Scroll.d.ts +2 -2
  15. package/dist/types/components/Sidebar/Sidebar.d.ts +2 -2
  16. package/dist/types/components/Slider/Slider.d.ts +4 -0
  17. package/dist/types/components/Slider/index.d.ts +1 -0
  18. package/dist/types/components/TextArea/index.d.ts +0 -1
  19. package/dist/types/components/index.d.ts +6 -0
  20. package/dist/types/components/types/index.d.ts +1 -0
  21. package/dist/types/components/types/scroll.types.d.ts +10 -0
  22. package/dist/types/constants/constants.d.ts +4 -0
  23. package/dist/types/types/types.d.ts +0 -10
  24. package/dist/types/utils/getHorizontalMetrics.d.ts +1 -1
  25. package/dist/types/utils/getNavItemClickHandler.d.ts +5 -0
  26. package/dist/types/utils/getVerticalMetrics.d.ts +1 -1
  27. package/package.json +9 -7
  28. package/dist/types/components/Input/FormInput.d.ts +0 -7
  29. package/dist/types/components/PasswordInput/FormPasswordInput.d.ts +0 -7
  30. package/dist/types/components/TextArea/FormTextArea.d.ts +0 -8
@@ -0,0 +1,14 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export type FieldError = {
3
+ field: string;
4
+ message: string;
5
+ };
6
+ export type AlertMessage = FieldError[] | string;
7
+ export type AlertVariant = 'error' | 'success' | 'warning';
8
+ export type AlertProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
9
+ children?: AlertMessage;
10
+ onClose?: () => void;
11
+ title?: string;
12
+ variant?: AlertVariant;
13
+ };
14
+ export declare const Alert: ({ className, onClose, title, children, variant, ...props }: AlertProps) => import("react").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './Alert';
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CarouselProps = {
3
+ slides: ReactNode[];
4
+ };
5
+ export declare const Carousel: ({ slides }: CarouselProps) => import("react").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './Carousel';
@@ -1,2 +1 @@
1
1
  export * from './Input';
2
- export * from './FormInput';
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from 'react';
2
+ export type MenuItem = {
3
+ activeIcon?: ReactNode;
4
+ href?: string;
5
+ icon: ReactNode;
6
+ id: string;
7
+ };
8
+ type MenuProps = {
9
+ activeId: string;
10
+ items: MenuItem[];
11
+ onValueChange?: (id: string) => void;
12
+ };
13
+ export declare const Menu: ({ items, activeId, onValueChange }: MenuProps) => import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Menu';
@@ -1,2 +1 @@
1
1
  export * from './PasswordInput';
2
- export * from './FormPasswordInput';
@@ -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,6 +1,6 @@
1
- type Props = {
1
+ type ScrollProps = {
2
2
  orientation?: 'both' | 'horizontal' | 'vertical';
3
3
  children?: React.ReactNode;
4
4
  };
5
- export declare const Scroll: ({ orientation, children }: Props) => import("react").JSX.Element;
5
+ export declare const Scroll: ({ orientation, children }: ScrollProps) => import("react").JSX.Element;
6
6
  export {};
@@ -7,12 +7,12 @@ export type SidebarItem = {
7
7
  id: string;
8
8
  label: string;
9
9
  };
10
- type Props = {
10
+ type SidebarProps = {
11
11
  activeId: string;
12
12
  items: SidebarItem[];
13
13
  logOutIcon: ReactNode;
14
14
  onLogout: () => void;
15
15
  onValueChange?: (id: string) => void;
16
16
  };
17
- export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: Props) => import("react").JSX.Element;
17
+ export declare const Sidebar: ({ items, activeId, onValueChange, onLogout, logOutIcon }: SidebarProps) => import("react").JSX.Element;
18
18
  export {};
@@ -0,0 +1,4 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import * as SliderPrimitive from '@radix-ui/react-slider';
3
+ export type SliderProps = Omit<ComponentPropsWithoutRef<typeof SliderPrimitive.Root>, 'children' | 'orientation'>;
4
+ export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ export * from './Slider';
@@ -1,2 +1 @@
1
1
  export * from './TextArea';
2
- export * from './FormTextArea';
@@ -1,19 +1,25 @@
1
+ export * from './Alert';
1
2
  export * from './AudioPlayer';
2
3
  export * from './Avatar';
3
4
  export * from './Button';
4
5
  export * from './Cards';
6
+ export * from './Carousel';
5
7
  export * from './Checkbox';
6
8
  export * from './CircularProgress';
7
9
  export * from './Input';
8
10
  export * from './LinearProgress';
11
+ export * from './Menu';
9
12
  export * from './Message';
10
13
  export * from './Modal';
11
14
  export * from './PasswordInput';
12
15
  export * from './RadioGroup';
13
16
  export * from './ReadMore';
17
+ export * from './Recaptcha';
14
18
  export * from './Scroll';
15
19
  export * from './SearchInput';
16
20
  export * from './Select';
21
+ export * from './Sidebar';
22
+ export * from './Slider';
17
23
  export * from './Table';
18
24
  export * from './Tabs';
19
25
  export * from './TextArea';
@@ -0,0 +1 @@
1
+ export type { VerticalMetrics, HorizontalMetrics } from './scroll.types.ts';
@@ -0,0 +1,10 @@
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
+ };
@@ -1,3 +1,7 @@
1
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 TAB_INDEX: {
5
+ readonly ENABLED: 0;
6
+ readonly DISABLED: -1;
7
+ };
@@ -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;
@@ -0,0 +1,5 @@
1
+ import type { MouseEvent } from 'react';
2
+ export declare const getNavItemClickHandler: (href: string | undefined, onSelect: () => void) => {
3
+ handleClick: (event: MouseEvent<HTMLAnchorElement>) => void;
4
+ resolvedHref: string;
5
+ };
@@ -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.15",
4
+ "version": "0.0.17",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -31,11 +31,15 @@
31
31
  "@radix-ui/react-checkbox": "^1.3.8",
32
32
  "@radix-ui/react-dialog": "^1.1.23",
33
33
  "@radix-ui/react-radio-group": "^1.4.5",
34
+ "@radix-ui/react-slider": "^1.4.7",
34
35
  "@radix-ui/react-tabs": "^1.1.18",
35
36
  "@radix-ui/react-tooltip": "^1.2.16",
36
37
  "@radix-ui/themes": "^3.3.0",
38
+ "@storybook/react": "^10.5.7",
37
39
  "clsx": "^2.1.1",
38
- "radix-ui": "^1.6.2"
40
+ "eslint-plugin-perfectionist": "^5.10.0",
41
+ "radix-ui": "^1.6.2",
42
+ "react-google-recaptcha": "^3.1.0"
39
43
  },
40
44
  "devDependencies": {
41
45
  "@babel/core": "^7.29.7",
@@ -43,7 +47,6 @@
43
47
  "@commitlint/cli": "^21.2.1",
44
48
  "@commitlint/config-conventional": "^21.2.0",
45
49
  "@eslint/js": "^10.0.1",
46
- "eslint-plugin-perfectionist": "^5.10.0",
47
50
  "@it-incubator/prettier-config": "^0.1.2",
48
51
  "@it-incubator/stylelint-config": "^2.0.0",
49
52
  "@rolldown/plugin-babel": "^0.2.3",
@@ -52,10 +55,12 @@
52
55
  "@storybook/addon-mcp": "^0.7.0",
53
56
  "@storybook/addon-vitest": "^10.5.2",
54
57
  "@storybook/react-vite": "^10.5.2",
58
+ "@storybook/test": "^8.6.15",
55
59
  "@types/babel__core": "^7.20.5",
56
60
  "@types/node": "^24.13.2",
57
61
  "@types/react": "^19.2.17",
58
62
  "@types/react-dom": "^19.2.3",
63
+ "@types/react-google-recaptcha": "^2.1.9",
59
64
  "@vitejs/plugin-react": "^6.0.3",
60
65
  "@vitejs/plugin-react-swc": "^4.3.1",
61
66
  "@vitest/browser-playwright": "^4.1.10",
@@ -80,12 +85,9 @@
80
85
  "typescript": "~6.0.2",
81
86
  "typescript-eslint": "^8.62.0",
82
87
  "vite": "^8.1.1",
83
- "vitest": "^4.1.10",
84
- "react": "^19.2.7",
85
- "react-dom": "^19.2.7"
88
+ "vitest": "^4.1.10"
86
89
  },
87
90
  "peerDependencies": {
88
- "react-hook-form": ">=7",
89
91
  "react": ">=18",
90
92
  "react-dom": ">=18"
91
93
  },
@@ -1,7 +0,0 @@
1
- import { type Control, type FieldPath, type FieldValues } from 'react-hook-form';
2
- import { type InputProps } from './Input';
3
- export type FormInputProps<T extends FieldValues> = {
4
- control: Control<T>;
5
- name: FieldPath<T>;
6
- } & Omit<InputProps, 'name' | 'onBlur' | 'onChange' | 'value'>;
7
- export declare const FormInput: <T extends FieldValues>({ control, name, ...props }: FormInputProps<T>) => import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type Control, type FieldPath, type FieldValues } from 'react-hook-form';
2
- import { type PasswordInputProps } from '@/components';
3
- export type FormPasswordInputProps<T extends FieldValues> = {
4
- control: Control<T>;
5
- name: FieldPath<T>;
6
- } & Omit<PasswordInputProps, 'name' | 'onBlur' | 'onChange' | 'value'>;
7
- export declare const FormPasswordInput: <T extends FieldValues>({ control, name, ...props }: FormPasswordInputProps<T>) => import("react").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { type Control, type FieldPath, type FieldValues } from 'react-hook-form';
2
- import { type TextAreaProps } from './TextArea';
3
- type FormTextAreaProps<T extends FieldValues> = {
4
- control: Control<T>;
5
- name: FieldPath<T>;
6
- } & Omit<TextAreaProps, 'defaultValue' | 'onBlur' | 'onChange' | 'value'>;
7
- export declare const FormTextArea: <T extends FieldValues>({ control, name, ...props }: FormTextAreaProps<T>) => import("react").JSX.Element;
8
- export {};