kamotive_ui 1.2.2 → 1.2.3

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 (54) hide show
  1. package/dist/Icons/IconClose/IconClose10.d.ts +2 -1
  2. package/dist/Icons/IconClose/IconClose10.js +2 -2
  3. package/dist/components/Button/Button.d.ts +1 -1
  4. package/dist/components/Button/Button.js +3 -6
  5. package/dist/components/Button/Button.module.css +0 -11
  6. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  7. package/dist/components/Checkbox/Checkbox.js +5 -3
  8. package/dist/components/Checkbox/Checkbox.module.css +0 -11
  9. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  10. package/dist/components/ColorPicker/ColorPicker.js +12 -11
  11. package/dist/components/ColorPicker/ColorPicker.module.css +25 -42
  12. package/dist/components/Dropdown/Dropdown.d.ts +12 -8
  13. package/dist/components/Dropdown/Dropdown.js +230 -77
  14. package/dist/components/Dropdown/Dropdown.module.css +152 -89
  15. package/dist/components/Input/Input.d.ts +1 -1
  16. package/dist/components/Input/Input.js +26 -25
  17. package/dist/components/Input/Input.module.css +92 -45
  18. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
  19. package/dist/components/ProgressBar/ProgressBar.js +4 -3
  20. package/dist/components/ProgressBar/ProgressBar.module.css +4 -11
  21. package/dist/components/ProgressLoader/ProgressLoader.d.ts +1 -1
  22. package/dist/components/ProgressLoader/ProgressLoader.js +3 -2
  23. package/dist/components/ProgressLoader/ProgressLoader.module.css +2 -11
  24. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  25. package/dist/components/RadioButton/RadioButton.js +5 -3
  26. package/dist/components/RadioButton/RadioButton.module.css +2 -15
  27. package/dist/components/SettingTag/SettingTag.d.ts +1 -1
  28. package/dist/components/SettingTag/SettingTag.js +2 -1
  29. package/dist/components/SettingTag/SettingTag.module.css +0 -9
  30. package/dist/components/Snackbar/Snackbar.d.ts +1 -1
  31. package/dist/components/Snackbar/Snackbar.js +3 -2
  32. package/dist/components/Snackbar/Snackbar.module.css +1 -9
  33. package/dist/components/Tab/Tab.d.ts +1 -1
  34. package/dist/components/Tab/Tab.js +7 -4
  35. package/dist/components/Tab/Tab.module.css +4 -17
  36. package/dist/components/Tabs/Tabs.d.ts +1 -1
  37. package/dist/components/Tabs/Tabs.js +2 -1
  38. package/dist/components/Tabs/Tabs.module.css +0 -6
  39. package/dist/components/Tag/Tag.d.ts +1 -1
  40. package/dist/components/Tag/Tag.js +2 -1
  41. package/dist/components/Tag/Tag.module.css +68 -74
  42. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
  43. package/dist/components/ToggleButton/ToggleButton.js +6 -4
  44. package/dist/components/ToggleButton/ToggleButton.module.css +0 -5
  45. package/dist/components/Typography/Typography.d.ts +1 -1
  46. package/dist/components/Typography/Typography.js +3 -2
  47. package/dist/components/Typography/Typography.module.css +8 -13
  48. package/dist/components/Typography/enums.d.ts +2 -0
  49. package/dist/components/Typography/enums.js +2 -0
  50. package/dist/index.d.ts +8 -7
  51. package/dist/index.js +7 -7
  52. package/dist/types/index.d.ts +261 -0
  53. package/dist/types/index.js +1 -0
  54. package/package.json +2 -1
@@ -12,9 +12,11 @@ export var ETypographyVariants;
12
12
  ETypographyVariants["Body-Bold"] = "Body-Bold";
13
13
  ETypographyVariants["Body1"] = "Body1";
14
14
  ETypographyVariants["Body1-Medium"] = "Body1-Medium";
15
+ ETypographyVariants["Body1-SemiBold"] = "Body1-SemiBold";
15
16
  ETypographyVariants["Body1-Bold"] = "Body1-Bold";
16
17
  ETypographyVariants["Body2"] = "Body2";
17
18
  ETypographyVariants["Body2-Medium"] = "Body2-Medium";
19
+ ETypographyVariants["Body2-SemiBold"] = "Body2-SemiBold";
18
20
  ETypographyVariants["Body2-Bold"] = "Body2-Bold";
19
21
  ETypographyVariants["Caption"] = "Caption";
20
22
  ETypographyVariants["Caption-Medium"] = "Caption-Medium";
package/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
1
  export { Button as Button } from './components/Button/Button';
2
- export { Input as Input } from './components/Input/Input';
3
- export { Tag as Tag } from './components/Tag/Tag';
2
+ export { Checkbox as Checkbox } from './components/Checkbox/Checkbox';
3
+ export { ColorPicker as ColorPicker } from './components/ColorPicker/ColorPicker';
4
4
  export { Dropdown as Dropdown } from './components/Dropdown/Dropdown';
5
+ export { Input as Input } from './components/Input/Input';
5
6
  export { ProgressBar as ProgressBar } from './components/ProgressBar/ProgressBar';
6
7
  export { ProgressLoader as ProgressLoader } from './components/ProgressLoader/ProgressLoader';
7
- export { Typography as Typography } from './components/Typography/Typography';
8
- export { Checkbox as Checkbox } from './components/Checkbox/Checkbox';
9
8
  export { RadioButton as RadioButton } from './components/RadioButton/RadioButton';
10
- export { Tab as Tab } from './components/Tab/Tab';
11
- export { Tabs as Tabs } from './components/Tabs/Tabs';
12
9
  export { SettingTag as SettingTag } from './components/SettingTag/SettingTag';
13
- export { ColorPicker as ColorPicker } from './components/ColorPicker/ColorPicker';
14
10
  export { Snackbar as Snackbar } from './components/Snackbar/Snackbar';
11
+ export { Tab as Tab } from './components/Tab/Tab';
12
+ export { Tabs as Tabs } from './components/Tabs/Tabs';
13
+ export { Tag as Tag } from './components/Tag/Tag';
15
14
  export { ToggleButton as ToggleButton } from './components/ToggleButton/ToggleButton';
15
+ export { Typography as Typography } from './components/Typography/Typography';
16
+ export type { ButtonProps, InputProps, TagProps, SettingTagProps, ToggleButtonProps, BaseOptions, TOptions, DropdownProps, TypographyProps, ProgressBarProps, ProgressLoaderProps, RadioProps, TabsProps, ColorPickerProps, SnackbarProps } from './types';
16
17
  import './fonts.css';
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  export { Button as Button } from './components/Button/Button';
2
- export { Input as Input } from './components/Input/Input';
3
- export { Tag as Tag } from './components/Tag/Tag';
2
+ export { Checkbox as Checkbox } from './components/Checkbox/Checkbox';
3
+ export { ColorPicker as ColorPicker } from './components/ColorPicker/ColorPicker';
4
4
  export { Dropdown as Dropdown } from './components/Dropdown/Dropdown';
5
+ export { Input as Input } from './components/Input/Input';
5
6
  export { ProgressBar as ProgressBar } from './components/ProgressBar/ProgressBar';
6
7
  export { ProgressLoader as ProgressLoader } from './components/ProgressLoader/ProgressLoader';
7
- export { Typography as Typography } from './components/Typography/Typography';
8
- export { Checkbox as Checkbox } from './components/Checkbox/Checkbox';
9
8
  export { RadioButton as RadioButton } from './components/RadioButton/RadioButton';
10
- export { Tab as Tab } from './components/Tab/Tab';
11
- export { Tabs as Tabs } from './components/Tabs/Tabs';
12
9
  export { SettingTag as SettingTag } from './components/SettingTag/SettingTag';
13
- export { ColorPicker as ColorPicker } from './components/ColorPicker/ColorPicker';
14
10
  export { Snackbar as Snackbar } from './components/Snackbar/Snackbar';
11
+ export { Tab as Tab } from './components/Tab/Tab';
12
+ export { Tabs as Tabs } from './components/Tabs/Tabs';
13
+ export { Tag as Tag } from './components/Tag/Tag';
15
14
  export { ToggleButton as ToggleButton } from './components/ToggleButton/ToggleButton';
15
+ export { Typography as Typography } from './components/Typography/Typography';
16
16
  import './fonts.css';
@@ -0,0 +1,261 @@
1
+ import * as React from 'react';
2
+ import { ChangeEventHandler, CSSProperties, ReactNode } from 'react';
3
+ import { ETypographyVariants } from '../components/Typography/enums';
4
+ /** @internal */
5
+ export interface ButtonProps {
6
+ /** Тест кнопки */
7
+ label?: string;
8
+ /** Вид кнопки (заполненный/обводка/ссылка) */
9
+ variant?: 'fill' | 'outline' | 'link';
10
+ /** Размер кнопки */
11
+ size?: 'sm' | 'md' | 'lg';
12
+ /** Стиль кнопки(текст+иконка, текст, иконка) */
13
+ style?: 'default' | 'text' | 'icon';
14
+ /** Состояние кнопки */
15
+ condition?: 'default' | 'error' | 'success' | 'warning' | 'info';
16
+ /** Иконка кнопки */
17
+ icon?: React.ReactNode;
18
+ /** Заблокированная кнопка */
19
+ disabled?: boolean;
20
+ /** Callback, который будет вызван при клике по кнопке */
21
+ onClick?: () => void;
22
+ }
23
+ /** @internal */
24
+ export interface InputProps {
25
+ /** Идентификатор элемента */
26
+ id?: string;
27
+ /** Лейбл */
28
+ label?: string;
29
+ /** Подсказка */
30
+ placeholder?: string;
31
+ /** Размер */
32
+ size?: 'sm' | 'md' | 'lg';
33
+ /** Знчение */
34
+ value?: string;
35
+ /** Дополнительный класс */
36
+ className?: string;
37
+ /** Многострочное поле */
38
+ multiline?: boolean;
39
+ /** Количество строк в многострочном поле */
40
+ rows?: number;
41
+ /** Изменение размера многострочного поля */
42
+ resize?: boolean;
43
+ /** Заблокированное поле */
44
+ disabled?: boolean;
45
+ /** Только для чтения */
46
+ readOnly?: boolean;
47
+ /** Метка слева */
48
+ isLeftLabel?: boolean;
49
+ /** Иконка слева */
50
+ icon?: React.ReactNode;
51
+ /** Ошибка */
52
+ error?: boolean;
53
+ /** Текст ошибки */
54
+ helperText?: string;
55
+ /** Callback при изменении значения */
56
+ onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
57
+ /** Обязательное поле */
58
+ required?: boolean;
59
+ }
60
+ /** @internal */
61
+ export interface TagProps {
62
+ /** Лейбл */
63
+ label?: string;
64
+ /** Цвет */
65
+ color?: string;
66
+ /**Наличие кнопки закрытия */
67
+ closeButton?: boolean;
68
+ /** Callback при изменении значения */
69
+ onClick?: () => void;
70
+ }
71
+ export interface SettingTagProps {
72
+ /** Лейбл */
73
+ label: string;
74
+ /** Цвет */
75
+ color?: string;
76
+ /** Callback при изменении значения */
77
+ onChange?: (color: string) => void;
78
+ }
79
+ export interface ToggleButtonProps {
80
+ /** Знчение */
81
+ value?: boolean;
82
+ /** Callback при изменении значения */
83
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
84
+ /** Заблокированная кнопка */
85
+ disabled?: boolean;
86
+ /** Размер кнопки */
87
+ size?: 'sm' | 'md';
88
+ /** Текст кнопки */
89
+ label?: string;
90
+ }
91
+ export type BaseOptions = {
92
+ id?: string;
93
+ key?: string | number;
94
+ name?: string;
95
+ description?: string;
96
+ value?: string | number;
97
+ icon?: React.JSX.Element;
98
+ disabled?: boolean;
99
+ isDivider?: boolean;
100
+ children?: TOptions[];
101
+ };
102
+ export type TOptions<T = {}> = BaseOptions & T;
103
+ export interface DropdownProps {
104
+ /** Идентификатор */
105
+ id?: string;
106
+ /** Лейбл */
107
+ label?: string;
108
+ /** Подсказик заполнения */
109
+ placeholder?: string;
110
+ /** Размер */
111
+ size?: 'md' | 'lg';
112
+ /** Массив элементов для выпадающего списка */
113
+ options: Array<string | number | TOptions>;
114
+ /** Функция для получения текста опции */
115
+ getOptionLabel?: (option: TOptions) => keyof TOptions;
116
+ /** Значение */
117
+ value?: string | number | TOptions | null;
118
+ /** Значение по умолчанию */
119
+ defaultValue?: string | number | TOptions | null;
120
+ /** Стиль выпадающего списка(текст+иконка, текст) */
121
+ style?: 'icons' | 'text';
122
+ /**Дополнительный класс */
123
+ className?: string;
124
+ /** Заблокированный */
125
+ disabled?: boolean;
126
+ /** Только для чтения */
127
+ readOnly?: boolean;
128
+ /** Открытый */
129
+ isOpened?: boolean;
130
+ /** Текст при отсутствии опций */
131
+ noOptionsText: string;
132
+ /** Отображение левой метки */
133
+ isLeftLabel?: boolean;
134
+ /** Ошибка */
135
+ error?: boolean;
136
+ /** Текст ошибки */
137
+ helperText?: string;
138
+ /** Callback, который будет вызван при изменении значения */
139
+ onChange?: (event: any, value: string | number | TOptions | null) => void;
140
+ /** Callback, который будет вызван при закрытии выпадающего списка */
141
+ onClose?: (event: any) => void;
142
+ /** Возможность сброса значения до первоначального */
143
+ clearable?: boolean;
144
+ /** Обязательное поле */
145
+ required?: boolean;
146
+ /** Отображение разделителя */
147
+ isDivider?: boolean;
148
+ }
149
+ /** @internal */
150
+ export interface TypographyProps {
151
+ /** Вариант шрифта */
152
+ variant?: `${ETypographyVariants}`;
153
+ /** Текст */
154
+ children: ReactNode;
155
+ /** Дополнительный класс */
156
+ className?: string;
157
+ /** Цвет текста */
158
+ color?: CSSProperties['color'];
159
+ /** Стиль текста */
160
+ style?: CSSProperties;
161
+ }
162
+ export interface ProgressBarProps {
163
+ /** Значение */
164
+ value?: number;
165
+ /** Максимальное значение */
166
+ max?: number;
167
+ /** Размер */
168
+ size?: 'sm' | 'md' | 'lg';
169
+ /** Показывать значение */
170
+ showValue?: boolean;
171
+ /** Анимация */
172
+ animated?: boolean;
173
+ }
174
+ export interface ProgressLoaderProps {
175
+ /** Значение */
176
+ value: number;
177
+ /** Размер */
178
+ size?: 'sm' | 'md' | 'lg' | 'xl';
179
+ /** Показывать значение */
180
+ showValue?: boolean;
181
+ /** Анимация */
182
+ animated?: boolean;
183
+ }
184
+ export interface CheckboxProps {
185
+ /** Идентификатор */
186
+ checked?: boolean;
187
+ /** Обработчик изменения состояния */
188
+ onChange?: ChangeEventHandler<HTMLInputElement>;
189
+ /** Заблокированный чекбокс */
190
+ disabled?: boolean;
191
+ /** Размер чекбокса */
192
+ size?: 'sm' | 'md';
193
+ /** Текст лейбла */
194
+ label?: string;
195
+ }
196
+ export interface RadioProps {
197
+ /** Значение */
198
+ value?: string;
199
+ /** Лейбл */
200
+ label?: string;
201
+ /** Выбраный */
202
+ checked?: boolean;
203
+ /** Обработчик изменения состояния */
204
+ onChange?: ChangeEventHandler<HTMLInputElement>;
205
+ /** Заблокированный чекбокс */
206
+ disabled?: boolean;
207
+ /** Размер чекбокса */
208
+ size?: 'sm' | 'md';
209
+ }
210
+ export interface TabProps {
211
+ /** Значение */
212
+ value?: string;
213
+ /** Обработчик клика */
214
+ onClick?: (value: string) => void;
215
+ /** Текст лейбла */
216
+ label?: string;
217
+ /** Размер */
218
+ selected?: boolean;
219
+ /** Заблокированный */
220
+ disabled?: boolean;
221
+ /** Табы */
222
+ children?: React.ReactNode;
223
+ }
224
+ export interface TabsProps {
225
+ /** Табы */
226
+ children: React.ReactElement<TabProps>[];
227
+ /** Значение */
228
+ value?: string;
229
+ /** Обработчик изменения значения */
230
+ onChange?: (value: string) => void;
231
+ }
232
+ export interface ColorPickerProps {
233
+ /** Цвет выбранный пользователем */
234
+ color?: string;
235
+ /** Основной цвет */
236
+ mainColor?: string;
237
+ /** Последние использованные цвета*/
238
+ recentColors?: string[];
239
+ /** Флаг наведения на меню*/
240
+ setIsHovered: (isHover: boolean) => void;
241
+ /** Ширина ColorPicker */
242
+ width?: number;
243
+ /** Высота ColorPicker*/
244
+ height?: number;
245
+ /** Автофокус ColorPicker*/
246
+ autoOpen?: boolean;
247
+ /** Функция обработки изменения цвета */
248
+ onChange?: (color: string) => void;
249
+ }
250
+ export type SnackbarProps = {
251
+ /** Сообщение */
252
+ children: ReactNode;
253
+ /** Тип сообщения */
254
+ type: 'success' | 'error' | 'warning' | 'info';
255
+ /** Иконка */
256
+ icon?: boolean;
257
+ /** Длительность показа сообщения */
258
+ duration: number;
259
+ /** Функция обработки закрытия сообщения */
260
+ onClose?: () => void;
261
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "kamotive_ui",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
5
6
  "files": [
6
7
  "dist"
7
8
  ],