kamotive_ui 1.0.2 → 1.1.0

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 (2) hide show
  1. package/dist/index.d.ts +45 -23
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,24 +1,46 @@
1
+ import { ReactNode } from 'react';
2
+ import { ChangeEventHandler } from 'react';
3
+
1
4
  declare module 'kamotive_ui' {
2
- import * as React from 'react';
3
-
4
- // Типы для Button
5
- export interface ButtonProps {
6
- label: string;
7
- variant?: 'primary' | 'secondary' | 'danger';
8
- size?: 'small' | 'medium' | 'large';
9
- onClick?: () => void;
10
- backgroundColor?: string;
11
- primary?: boolean;
12
- }
13
-
14
- export const Button: React.FC<ButtonProps>;
15
-
16
- // Типы для Input
17
- export interface InputProps {
18
- value: string;
19
- onChange: (value: string) => void;
20
- placeholder?: string;
21
- }
22
-
23
- export const Input: React.FC<InputProps>;
24
- }
5
+ import * as React from 'react';
6
+
7
+ // Типы для Button
8
+ export interface ButtonProps {
9
+ // Текст кнопки
10
+ label?: string;
11
+ //Вид кнопки (заполненный/обводка/ссылка)
12
+ variant?: 'fill' | 'outline' | 'link';
13
+ //Размер кнопки
14
+ size?: 'sm' | 'md' | 'lg';
15
+ //Стиль кнопки(текст+иконка, текст, иконка)
16
+ style?: 'default' | 'text' | 'icon';
17
+ //Состояние кнопки
18
+ condition?: 'default' | 'error' | 'success' | 'warning' | 'info';
19
+ icon?: React.ReactNode;
20
+ disabled?: boolean;
21
+ onClick?: () => void;
22
+ }
23
+
24
+ export const Button: React.FC<ButtonProps>;
25
+
26
+ // Типы для Input
27
+ export interface InputProps {
28
+ id?: string;
29
+ className?: string;
30
+ value?: string;
31
+ label?: string;
32
+ placeholder?: string;
33
+ size?: 'sm' | 'md' | 'lg';
34
+ onChange?: ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
35
+ icon?: ReactNode;
36
+ hasError?: boolean;
37
+ helperText?: ReactNode;
38
+ disabled?: boolean;
39
+ readOnly?: boolean;
40
+ isLeftLabel?: boolean;
41
+ multiline?: boolean;
42
+ resize?: boolean;
43
+ }
44
+
45
+ export const Input: React.FC<InputProps>;
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kamotive_ui",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -17,6 +17,7 @@
17
17
  "license": "ISC",
18
18
  "description": "Библиотека UI-компонентов для использования в приложении",
19
19
  "dependencies": {
20
+ "classnames": "^2.5.1",
20
21
  "clsx": "^2.1.1",
21
22
  "react": "^18.3.1",
22
23
  "react-dom": "^18.3.1"