@candy.thieves/ui-kit-lumos 0.0.15 → 0.0.16
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 +897 -692
- package/dist/index.js.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts +14 -0
- package/dist/types/components/Alert/index.d.ts +1 -0
- package/dist/types/components/Carousel/Carousel.d.ts +5 -0
- package/dist/types/components/Carousel/index.d.ts +1 -0
- package/dist/types/components/Input/index.d.ts +0 -1
- package/dist/types/components/Menu/Menu.d.ts +14 -0
- package/dist/types/components/Menu/index.d.ts +1 -0
- package/dist/types/components/PasswordInput/index.d.ts +0 -1
- package/dist/types/components/Recaptcha/Recaptcha.d.ts +12 -0
- package/dist/types/components/Recaptcha/index.d.ts +1 -0
- package/dist/types/components/Scroll/Scroll.d.ts +2 -2
- package/dist/types/components/Sidebar/Sidebar.d.ts +2 -2
- package/dist/types/components/Slider/Slider.d.ts +4 -0
- package/dist/types/components/Slider/index.d.ts +1 -0
- package/dist/types/components/TextArea/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +6 -0
- 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 +4 -0
- package/dist/types/types/types.d.ts +0 -10
- package/dist/types/utils/getHorizontalMetrics.d.ts +1 -1
- package/dist/types/utils/getNavItemClickHandler.d.ts +5 -0
- package/dist/types/utils/getVerticalMetrics.d.ts +1 -1
- package/package.json +14 -11
- package/dist/types/components/Input/FormInput.d.ts +0 -7
- package/dist/types/components/PasswordInput/FormPasswordInput.d.ts +0 -7
- 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 @@
|
|
|
1
|
+
export * from './Carousel';
|
|
@@ -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';
|
|
@@ -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
|
|
1
|
+
type ScrollProps = {
|
|
2
2
|
orientation?: 'both' | 'horizontal' | 'vertical';
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const Scroll: ({ orientation, children }:
|
|
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
|
|
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 }:
|
|
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,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';
|
|
@@ -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.16",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -31,11 +31,17 @@
|
|
|
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
|
-
"
|
|
40
|
+
"eslint-plugin-perfectionist": "^5.10.0",
|
|
41
|
+
"radix-ui": "^1.6.2",
|
|
42
|
+
"react": "^19.2.7",
|
|
43
|
+
"react-dom": "^19.2.7",
|
|
44
|
+
"react-google-recaptcha": "^3.1.0"
|
|
39
45
|
},
|
|
40
46
|
"devDependencies": {
|
|
41
47
|
"@babel/core": "^7.29.7",
|
|
@@ -43,7 +49,6 @@
|
|
|
43
49
|
"@commitlint/cli": "^21.2.1",
|
|
44
50
|
"@commitlint/config-conventional": "^21.2.0",
|
|
45
51
|
"@eslint/js": "^10.0.1",
|
|
46
|
-
"eslint-plugin-perfectionist": "^5.10.0",
|
|
47
52
|
"@it-incubator/prettier-config": "^0.1.2",
|
|
48
53
|
"@it-incubator/stylelint-config": "^2.0.0",
|
|
49
54
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
@@ -52,10 +57,12 @@
|
|
|
52
57
|
"@storybook/addon-mcp": "^0.7.0",
|
|
53
58
|
"@storybook/addon-vitest": "^10.5.2",
|
|
54
59
|
"@storybook/react-vite": "^10.5.2",
|
|
60
|
+
"@storybook/test": "^8.6.15",
|
|
55
61
|
"@types/babel__core": "^7.20.5",
|
|
56
62
|
"@types/node": "^24.13.2",
|
|
57
63
|
"@types/react": "^19.2.17",
|
|
58
64
|
"@types/react-dom": "^19.2.3",
|
|
65
|
+
"@types/react-google-recaptcha": "^2.1.9",
|
|
59
66
|
"@vitejs/plugin-react": "^6.0.3",
|
|
60
67
|
"@vitejs/plugin-react-swc": "^4.3.1",
|
|
61
68
|
"@vitest/browser-playwright": "^4.1.10",
|
|
@@ -80,14 +87,7 @@
|
|
|
80
87
|
"typescript": "~6.0.2",
|
|
81
88
|
"typescript-eslint": "^8.62.0",
|
|
82
89
|
"vite": "^8.1.1",
|
|
83
|
-
"vitest": "^4.1.10"
|
|
84
|
-
"react": "^19.2.7",
|
|
85
|
-
"react-dom": "^19.2.7"
|
|
86
|
-
},
|
|
87
|
-
"peerDependencies": {
|
|
88
|
-
"react-hook-form": ">=7",
|
|
89
|
-
"react": ">=18",
|
|
90
|
-
"react-dom": ">=18"
|
|
90
|
+
"vitest": "^4.1.10"
|
|
91
91
|
},
|
|
92
92
|
"lint-staged": {
|
|
93
93
|
"**/*.{jsx,js,tsx,ts}": [
|
|
@@ -99,5 +99,8 @@
|
|
|
99
99
|
"**/*": [
|
|
100
100
|
"prettier --write --ignore-unknown"
|
|
101
101
|
]
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"react-hook-form": "^7.82.0"
|
|
102
105
|
}
|
|
103
106
|
}
|
|
@@ -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 {};
|