kamotive_ui 1.2.2 → 1.2.4

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 (70) hide show
  1. package/dist/Icons/IconClose/IconClose10.d.ts +2 -1
  2. package/dist/Icons/IconClose/IconClose10.js +2 -2
  3. package/dist/Icons/IconFile/IconFile.d.ts +6 -0
  4. package/dist/Icons/IconFile/IconFile.js +5 -0
  5. package/dist/Icons/IconUpload/IconUpload.d.ts +6 -0
  6. package/dist/Icons/IconUpload/IconUpload.js +5 -0
  7. package/dist/Icons/index.d.ts +2 -0
  8. package/dist/Icons/index.js +2 -0
  9. package/dist/colors.css +5 -1
  10. package/dist/components/Button/Button.d.ts +1 -1
  11. package/dist/components/Button/Button.js +87 -35
  12. package/dist/components/Button/Button.module.css +101 -49
  13. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +5 -3
  15. package/dist/components/Checkbox/Checkbox.module.css +0 -11
  16. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  17. package/dist/components/ColorPicker/ColorPicker.js +89 -44
  18. package/dist/components/ColorPicker/ColorPicker.module.css +25 -42
  19. package/dist/components/Dropdown/Dropdown.d.ts +12 -8
  20. package/dist/components/Dropdown/Dropdown.js +239 -77
  21. package/dist/components/Dropdown/Dropdown.module.css +152 -89
  22. package/dist/components/FileAttach/FileAttach.d.ts +3 -0
  23. package/dist/components/FileAttach/FileAttach.js +79 -0
  24. package/dist/components/FileAttach/FileAttach.module.css +36 -0
  25. package/dist/components/Input/Input.d.ts +1 -1
  26. package/dist/components/Input/Input.js +36 -25
  27. package/dist/components/Input/Input.module.css +92 -45
  28. package/dist/components/Loader/Loader.d.ts +3 -0
  29. package/dist/components/Loader/Loader.js +18 -0
  30. package/dist/components/Loader/Loader.module.css +75 -0
  31. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
  32. package/dist/components/ProgressBar/ProgressBar.js +5 -4
  33. package/dist/components/ProgressBar/ProgressBar.module.css +4 -11
  34. package/dist/components/ProgressLoader/ProgressLoader.d.ts +1 -1
  35. package/dist/components/ProgressLoader/ProgressLoader.js +3 -2
  36. package/dist/components/ProgressLoader/ProgressLoader.module.css +2 -11
  37. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  38. package/dist/components/RadioButton/RadioButton.js +5 -3
  39. package/dist/components/RadioButton/RadioButton.module.css +2 -15
  40. package/dist/components/SettingTag/SettingTag.d.ts +1 -1
  41. package/dist/components/SettingTag/SettingTag.js +7 -6
  42. package/dist/components/SettingTag/SettingTag.module.css +0 -9
  43. package/dist/components/Snackbar/Snackbar.d.ts +1 -1
  44. package/dist/components/Snackbar/Snackbar.js +3 -2
  45. package/dist/components/Snackbar/Snackbar.module.css +1 -9
  46. package/dist/components/Spinner/Spinner.d.ts +3 -0
  47. package/dist/components/Spinner/Spinner.js +30 -0
  48. package/dist/components/Spinner/Spinner.module.css +20 -0
  49. package/dist/components/Tab/Tab.d.ts +1 -1
  50. package/dist/components/Tab/Tab.js +7 -4
  51. package/dist/components/Tab/Tab.module.css +4 -17
  52. package/dist/components/Tabs/Tabs.d.ts +1 -1
  53. package/dist/components/Tabs/Tabs.js +2 -1
  54. package/dist/components/Tabs/Tabs.module.css +0 -6
  55. package/dist/components/Tag/Tag.d.ts +1 -1
  56. package/dist/components/Tag/Tag.js +74 -13
  57. package/dist/components/Tag/Tag.module.css +89 -74
  58. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
  59. package/dist/components/ToggleButton/ToggleButton.js +6 -4
  60. package/dist/components/ToggleButton/ToggleButton.module.css +0 -5
  61. package/dist/components/Typography/Typography.d.ts +1 -1
  62. package/dist/components/Typography/Typography.js +3 -2
  63. package/dist/components/Typography/Typography.module.css +8 -13
  64. package/dist/components/Typography/enums.d.ts +2 -0
  65. package/dist/components/Typography/enums.js +2 -0
  66. package/dist/index.d.ts +11 -7
  67. package/dist/index.js +10 -7
  68. package/dist/types/index.d.ts +310 -0
  69. package/dist/types/index.js +1 -0
  70. package/package.json +4 -2
@@ -1,6 +1,7 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  export declare const IconClose10: FC<{
3
3
  color?: string;
4
4
  htmlColor?: string;
5
5
  strokeWidth?: string;
6
+ onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;
6
7
  }>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export const IconClose10 = ({ color = 'inherit', htmlColor, strokeWidth, }) => {
3
- return (React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color },
2
+ export const IconClose10 = ({ color = 'inherit', htmlColor, strokeWidth, onClick }) => {
3
+ return (React.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: color, onClick: onClick },
4
4
  React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', strokeWidth: strokeWidth || '0', d: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" })));
5
5
  };
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ export declare const IconFile: FC<{
3
+ color?: string;
4
+ htmlColor?: string;
5
+ strokeWidth?: string;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export const IconFile = ({ color = 'inherit', htmlColor, strokeWidth, }) => {
3
+ return (React.createElement("svg", { width: "25", height: "30", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: color },
4
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', strokeWidth: strokeWidth || '0', strokeLinejoin: "round", d: "M14,11C12.34,11 11,9.66 11,8V4H7C5.9,4 5,4.9 5,6V19C5,20.1 5.9,21 7,21H16C17.1,21 18,20.1 18,19V11H14M12,8C12,9.1 12.9,10 14,10H17.59L12,4.41V8M7,3H12L19,10V19C19,20.66 17.66,22 16,22H7C5.34,22 4,20.66 4,19V6C4,4.34 5.34,3 7,3Z" })));
5
+ };
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ export declare const IconUpload: FC<{
3
+ color?: string;
4
+ htmlColor?: string;
5
+ strokeWidth?: string;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export const IconUpload = ({ color = 'inherit', htmlColor, strokeWidth, }) => {
3
+ return (React.createElement("svg", { width: "45", height: "45", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: color },
4
+ React.createElement("path", { fill: htmlColor || 'currentColor', stroke: htmlColor || 'currentColor', strokeWidth: strokeWidth || '0', strokeLinejoin: "round", d: "M5.5,20C2.46,20 0,17.54 0,14.5C0,11.46 2.46,9 5.5,9C6.5,6.65 8.8,5 11.5,5C14.93,5 17.74,7.66 18,11.03L18.5,11C21,11 23,13 23,15.5C23,18 21,20 18.5,20H5.5M5.5,10C3,10 1,12 1,14.5C1,17 3,19 5.5,19H18.5C20.43,19 22,17.43 22,15.5C22,13.57 20.43,12 18.5,12C17.94,12 17.4,12.13 16.93,12.37L17,11.5C17,8.46 14.54,6 11.5,6C8.96,6 6.83,7.72 6.19,10.05L5.5,10M12,17V11.75L14.25,14L15,13.34L11.5,9.84L8,13.34L8.75,14L11,11.75V17H12Z" })));
5
+ };
@@ -14,3 +14,5 @@ export { IconWarning10 } from './IconWarning/IconWarning10';
14
14
  export { IconError10 } from './IconError/IconError10';
15
15
  export { IconClose10 } from './IconClose/IconClose10';
16
16
  export { IconColorPicker10 } from './IconColorPicker/IconColorPicker10';
17
+ export { IconFile } from './IconFile/IconFile';
18
+ export { IconUpload } from './IconUpload/IconUpload';
@@ -14,3 +14,5 @@ export { IconWarning10 } from './IconWarning/IconWarning10';
14
14
  export { IconError10 } from './IconError/IconError10';
15
15
  export { IconClose10 } from './IconClose/IconClose10';
16
16
  export { IconColorPicker10 } from './IconColorPicker/IconColorPicker10';
17
+ export { IconFile } from './IconFile/IconFile';
18
+ export { IconUpload } from './IconUpload/IconUpload';
package/dist/colors.css CHANGED
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  --white: #ffffff;
3
3
 
4
- --grey-medium: #d1d1d6;
4
+ --grey-medium: #aeaeb2;
5
5
  --grey-light: #e5e5ea;
6
6
  --grey-extraLight: #f2f2f7;
7
7
 
@@ -10,6 +10,7 @@
10
10
  --text-dark: #2a3336;
11
11
  --text-btn: #6f6f6f;
12
12
  --text-btn-light: #9ca0a7;
13
+ --icons-grey: #828286;
13
14
  --icons-medium: #5a5d61;
14
15
  --icons-light: #dce4f0;
15
16
  --icons-active: #bfd0eb;
@@ -32,6 +33,9 @@
32
33
  --info-main: #f2f2f7;
33
34
  --info-secondary: #e5e5ea;
34
35
 
36
+ --fills-active: #eef8ff;
37
+ --fills-disabled: #f5f5f5;
38
+
35
39
  --info-dark: rgb(209, 209, 214);
36
40
 
37
41
  --green:#34c759;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ButtonProps } from 'kamotive_ui';
2
+ import { ButtonProps } from '../../types';
3
3
  /**
4
4
  * Компонент Button представляет собой кнопку, которую можно настроить с помощью различных параметров (размер, иконки, стили, состояние).
5
5
  */
@@ -1,49 +1,101 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import styles from './Button.module.css';
3
3
  import classNames from 'classnames';
4
+ import { Typography } from '../Typography/Typography';
4
5
  /**
5
6
  * Компонент Button представляет собой кнопку, которую можно настроить с помощью различных параметров (размер, иконки, стили, состояние).
6
7
  */
7
- export const Button = ({ label, variant = 'fill', size = 'md', style = 'text', condition = 'default', icon, disabled = false, onClick, }) => {
8
- const buttonClasses = classNames(styles['button'], styles[`button--${variant}-${condition}`], styles[`button--${size}`], styles[`button--${style}`]
9
- // {
10
- // ['button--disabled']: disabled,
11
- // }
12
- );
8
+ export const Button = ({ label, variant = 'fill', size = 'md', style, condition, icon, disabled = false, onClick, children, error, color, name, type = 'button', form }) => {
9
+ const [buttonStyle, setButtonStyle] = useState('');
10
+ const [buttonCondition, setButtonCondition] = useState(condition);
11
+ const buttonClasses = classNames(styles['button'], styles[`button--${size}`], styles[`button--${buttonStyle}`], {
12
+ [styles[`button--${variant}-${buttonCondition}`]]: buttonCondition && !color,
13
+ [styles[`button--${variant}-custom`]]: color && !error
14
+ });
13
15
  const iconColorFn = () => {
14
- switch (condition) {
15
- case 'default':
16
- if (variant === 'outline') {
17
- return disabled ? '#8dc6ef' : '#0d99ff';
18
- }
19
- return disabled ? 'var(--blue-disabled)' : '#FFFFFF';
20
- case 'error':
21
- if (variant === 'outline') {
22
- return disabled ? '#ff8d87' : '#ff3b30';
23
- }
24
- return disabled ? 'var(--red-disabled)' : '#FFFFFF';
25
- case 'success':
26
- if (variant === 'outline') {
27
- return disabled ? '#8ac99a' : '#34c759';
16
+ if (buttonCondition && !color) {
17
+ switch (buttonCondition) {
18
+ case 'default':
19
+ if (variant === 'outline') {
20
+ return disabled ? '#8dc6ef' : '#0d99ff';
21
+ }
22
+ return '#FFFFFF';
23
+ case 'error':
24
+ if (variant === 'outline') {
25
+ return disabled ? '#ff8d87' : '#ff3b30';
26
+ }
27
+ return '#FFFFFF';
28
+ case 'success':
29
+ if (variant === 'outline') {
30
+ return disabled ? '#8ac99a' : '#34c759';
31
+ }
32
+ return '#FFFFFF';
33
+ case 'warning':
34
+ if (variant === 'outline') {
35
+ return disabled ? '#ffb44a' : '#ff9500';
36
+ }
37
+ return '#FFFFFF';
38
+ case 'info':
39
+ return disabled ? 'var(--gray-disabled)' : '#6F6F6F';
40
+ default:
41
+ return '#FFFFFF';
42
+ }
43
+ }
44
+ else if (color && !error) {
45
+ if (variant === 'outline') {
46
+ return disabled ? `color-mix(in srgb, ${color} 50%, white)` : color;
47
+ }
48
+ return '#FFFFFF';
49
+ }
50
+ };
51
+ const btnIcon = icon || typeof children === 'object' && children;
52
+ useEffect(() => {
53
+ if (!buttonStyle && style) {
54
+ setButtonStyle(style);
55
+ }
56
+ else {
57
+ if (btnIcon && variant !== 'link') {
58
+ if (!label && !(typeof children === 'string' && children)) {
59
+ setButtonStyle('icon');
28
60
  }
29
- return disabled ? 'var(--green-disabled)' : '#FFFFFF';
30
- case 'warning':
31
- if (variant === 'outline') {
32
- return disabled ? '#ffb44a' : '#ff9500';
61
+ else {
62
+ setButtonStyle('default');
33
63
  }
34
- return disabled ? 'var(--orange-disabled)' : '#FFFFFF';
35
- case 'info':
36
- return disabled ? 'var(--gray-disabled)' : '#6F6F6F';
37
- default:
38
- return disabled ? 'var(--blue-disabled)' : '#FFFFFF';
64
+ }
65
+ else {
66
+ setButtonStyle('text');
67
+ }
39
68
  }
40
- };
69
+ }, [style, btnIcon, label, children]);
70
+ useEffect(() => {
71
+ if (!condition) {
72
+ if (error) {
73
+ setButtonCondition('error');
74
+ }
75
+ else {
76
+ setButtonCondition('default');
77
+ }
78
+ }
79
+ else {
80
+ error ? setButtonCondition('error') : setButtonCondition(condition);
81
+ }
82
+ }, [condition, error]);
41
83
  const iconColorStyle = iconColorFn();
42
- return (React.createElement("button", { className: buttonClasses, onClick: onClick, disabled: disabled },
43
- icon &&
44
- React.cloneElement(icon, {
84
+ if (!buttonStyle) {
85
+ return React.createElement("button", { className: buttonClasses },
86
+ React.createElement(Typography, { variant: 'Body2' }, "\u041A\u043D\u043E\u043F\u043A\u0430"));
87
+ }
88
+ return (React.createElement("button", { className: buttonClasses, style: color && !error ? {
89
+ '--button-color': color,
90
+ '--button-hover-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 90%, black)` : `color-mix(in srgb, ${color} 10%, transparent)`,
91
+ '--button-active-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 80%, black)` : `color-mix(in srgb, ${color} 20%, transparent)`,
92
+ '--button-disabled-color': variant === 'fill' || variant === 'link' ? `color-mix(in srgb, ${color} 80%, white)` : `color-mix(in srgb, ${color} 10%, transparent)`,
93
+ '--button-disabled-textColor': variant === 'fill' ? `color-mix(in srgb, ${color} 80%, white)` : `color-mix(in srgb, ${color} 50%, transparent)`,
94
+ } : {}, onClick: onClick, disabled: disabled, "aria-disabled": disabled, type: type, name: name ? name : label ? `button-${label}` : 'button', form: form },
95
+ btnIcon && (buttonStyle === 'icon' || buttonStyle === 'default') &&
96
+ React.cloneElement(btnIcon, {
45
97
  htmlColor: iconColorStyle,
46
98
  strokeWidth: size === 'lg' ? '0.5' : size === 'md' ? '0.3' : '0.0',
47
99
  }),
48
- label));
100
+ (buttonStyle === 'text' || buttonStyle === 'default') && React.createElement(Typography, { variant: 'Body2' }, label ? label : (typeof children === 'string' && children))));
49
101
  };
@@ -1,21 +1,26 @@
1
- .story--wrapper-btn {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 900px;
6
- }
7
-
8
1
  .button {
9
- font-family: 'Raleway';
10
- font-style: normal;
11
- font-weight: 400;
12
- line-height: 16.5px;
13
2
  border-radius: 10px;
14
- padding: 5px 10px;
15
3
  cursor: pointer;
16
- padding: 0.5em 1.5em;
17
4
  width: fit-content;
18
-
5
+ box-sizing: border-box;
6
+ }
7
+
8
+
9
+ /* Общие стили для всех типов кнопок */
10
+ .button--default,
11
+ .button--text,
12
+ .button--icon {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ padding: calc(0.5em - 1px) calc(0.7em - 1px);
17
+ height: 2.5em;
18
+ box-sizing: border-box;
19
+ vertical-align: middle;
20
+ }
21
+
22
+ .button--default {
23
+ gap: 5px;
19
24
  }
20
25
 
21
26
  /* Стили для дефолтных кнопок */
@@ -23,111 +28,169 @@
23
28
  .button--fill-default {
24
29
  background-color: var(--blue-main);
25
30
  color: var(--white);
26
- border: none;
31
+ border: 1px solid transparent;
27
32
  }
28
33
  .button--fill-default:hover {
29
34
  background-color: var(--blue-secondary);
30
35
  color: var(--white);
31
- border: none;
32
36
  }
33
37
  .button--fill-default:active {
34
38
  background-color: var(--blue-dark);
35
39
  color: var(--white);
36
- border: none;
37
40
  }
38
41
  .button--fill-default:disabled {
39
42
  background-color: var(--blue-disabled);
40
43
  color: var(--white);
41
- border: none;
42
44
  cursor: not-allowed;
43
45
  }
44
46
  /* ошибка */
45
47
  .button--fill-error {
46
48
  background-color: var(--error-main);
47
49
  color: var(--white);
48
- border: none;
50
+ border: 1px solid transparent;
51
+
49
52
  }
50
53
  .button--fill-error:hover {
51
54
  background-color: var(--error-secondary);
52
55
  color: var(--white);
53
- border: none;
54
56
  }
55
57
  .button--fill-error:active {
56
58
  background-color: var(--error-dark);
57
59
  color: var(--white);
58
- border: none;
59
60
  }
60
61
  .button--fill-error:disabled {
61
62
  background-color: var(--error-disabled);
62
63
  color: var(--white);
63
- border: none;
64
64
  cursor: not-allowed;
65
65
  }
66
66
  /* success */
67
67
  .button--fill-success {
68
68
  background-color: var(--success-main);
69
69
  color: var(--white);
70
- border: none;
70
+ border: 1px solid transparent;
71
71
  }
72
72
  .button--fill-success:hover {
73
73
  background-color: var(--success-secondary);
74
74
  color: var(--white);
75
- border: none;
76
75
  }
77
76
  .button--fill-success:active {
78
77
  background-color: var(--success-dark);
79
78
  color: var(--white);
80
- border: none;
81
79
  }
82
80
  .button--fill-success:disabled {
83
81
  background-color: var(--success-disabled);
84
82
  color: var(--white);
85
- border: none;
86
83
  cursor: not-allowed;
87
84
  }
88
85
  /* warning */
89
86
  .button--fill-warning {
90
87
  background-color: var(--warning-main);
91
88
  color: var(--white);
92
- border: none;
89
+ border: 1px solid transparent;
93
90
  }
94
91
  .button--fill-warning:hover {
95
92
  background-color: var(--warning-secondary);
96
93
  color: var(--white);
97
- border: none;
98
94
  }
99
95
  .button--fill-warning:active {
100
96
  background-color: var(--warning-dark);
101
97
  color: var(--white);
102
- border: none;
103
98
  }
104
99
  .button--fill-warning:disabled {
105
100
  background-color: var(--warning-disabled);
106
101
  color: var(--white);
107
- border: none;
108
102
  cursor: not-allowed;
109
103
  }
110
104
  /* info */
111
105
  .button--fill-info {
112
106
  background-color: var(--info-main);
113
107
  color: var(--text-btn);
114
- border: none;
108
+ border: 1px solid transparent;
115
109
  }
116
110
  .button--fill-info:hover {
117
111
  background-color: var(--info-secondary);
118
112
  color: var(--text-btn);
119
- border: none;
120
113
  }
121
114
  .button--fill-info:active {
122
115
  background-color: var(--info-dark);
123
116
  color: var(--text-btn);
124
- border: none;
125
117
  }
126
118
  .button--fill-info:disabled {
127
119
  background-color: var(--info-main);
128
120
  color: var(--text-btn-light);
121
+ cursor: not-allowed;
122
+ }
123
+
124
+ /*--Для пользовательского цвета--*/
125
+ .button--fill-custom {
126
+ background-color: var(--button-color);
127
+ color: var(--white);
128
+ border: 1px solid transparent;
129
+ }
130
+
131
+ .button--fill-custom:hover {
132
+ background-color: var(--button-hover-color);
133
+ }
134
+
135
+ .button--fill-custom:active {
136
+ background-color: var(--button-active-color);
137
+ }
138
+
139
+ .button--fill-custom:disabled {
140
+ background-color: var(--button-disabled-color);
141
+ cursor: not-allowed;
142
+ }
143
+
144
+ .button--outline-custom {
145
+ background-color: transparent;
146
+ color: var(--button-color);
147
+ border: 1px solid var(--button-color);
148
+ }
149
+
150
+ .button--outline-custom:hover {
151
+ background-color: var(--button-hover-color);
152
+ color: var(--button-color);
153
+ border: 1px solid var(--button-color);
154
+ }
155
+
156
+ .button--outline-custom:active {
157
+ background-color: var(--button-active-color);
158
+ color: var(--button-color);
159
+ border: 1px solid var(--button-color);
160
+ }
161
+
162
+ .button--outline-custom:disabled {
163
+ background-color: var(--button-disabled-color);
164
+ color: var(--button-disabled-textColor);
165
+ border: 1px solid var(--button-disabled-textColor);
166
+ cursor: not-allowed;
167
+ }
168
+
169
+ .button--link-custom {
170
+ background-color: rgba(255, 255, 255, 0);
171
+ color: var(--button-color);
172
+ border: none;
173
+ }
174
+
175
+ .button--link-custom:hover {
176
+ background-color: rgba(255, 255, 255, 0);
177
+ color: var(--button-hover-color);
178
+ border: none;
179
+ text-decoration: underline;
180
+ }
181
+
182
+ .button--link-custom:active {
183
+ background-color: rgba(255, 255, 255, 0);
184
+ color: var(--button-active-color);
185
+ border: none;
186
+ }
187
+
188
+ .button--link-custom:disabled {
189
+ background-color: rgba(255, 255, 255, 0);
190
+ color: var(--button-disabled-color);
129
191
  border: none;
130
192
  cursor: not-allowed;
193
+ text-decoration: none;
131
194
  }
132
195
 
133
196
  /* Стили для outline кнопок */
@@ -256,6 +319,7 @@
256
319
  border: none;
257
320
  background-color: rgba(255, 255, 255, 0);
258
321
  cursor: not-allowed;
322
+ text-decoration: none;
259
323
  }
260
324
  .button--link-error {
261
325
  color: var(--error-main);
@@ -284,6 +348,7 @@
284
348
  border: none;
285
349
  background-color: rgba(255, 255, 255, 0);
286
350
  cursor: not-allowed;
351
+ text-decoration: none;
287
352
  }
288
353
  .button--link-warning {
289
354
  color: var(--warning-main);
@@ -298,6 +363,7 @@
298
363
  border: none;
299
364
  background-color: rgba(255, 255, 255, 0);
300
365
  cursor: not-allowed;
366
+ text-decoration: none;
301
367
  }
302
368
  .button--link-info {
303
369
  color: var(--text-btn);
@@ -312,32 +378,18 @@
312
378
  border: none;
313
379
  background-color: rgba(255, 255, 255, 0);
314
380
  cursor: not-allowed;
381
+ text-decoration: none;
315
382
  }
316
383
 
317
384
  /* Размеры кнопок */
318
385
  .button--sm {
319
- /* font-size: 0.8rem; */
320
386
  font-size: 12px;
321
387
  }
322
388
  .button--md {
323
- /* font-size: 1rem; */
324
389
  font-size: 14px;
325
390
  }
326
391
  .button--lg {
327
- /* font-size: 1.2rem; */
328
392
  font-size: 16px;
329
393
  }
330
394
 
331
- /* Стили кнопок иконка/без иконки/ссылка */
332
- .button--default {
333
- display: flex;
334
- align-items: center;
335
- gap: 5px;
336
- padding: 0.5em 1em 0.5em 0.7em;
337
- }
338
- .button--text {
339
- padding: 0.5em 1em;
340
- }
341
- .button--icon {
342
- padding: 0.5em 0.7em;
343
- }
395
+
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { CheckboxProps } from 'kamotive_ui';
2
+ import { CheckboxProps } from '../../types';
3
3
  export declare const Checkbox: FC<CheckboxProps>;
@@ -1,13 +1,15 @@
1
1
  import React from 'react';
2
2
  import styles from './Checkbox.module.css';
3
3
  import classNames from 'classnames';
4
+ ;
5
+ import { Typography } from '../Typography/Typography';
4
6
  export const Checkbox = ({ checked, onChange, disabled = false, size = 'sm', label }) => {
5
7
  const handleChange = (e) => {
6
8
  if (onChange) {
7
9
  onChange(e);
8
10
  }
9
11
  };
10
- return (React.createElement("label", { className: styles["checkbox"] },
11
- React.createElement("input", { type: "checkbox", checked: checked, onChange: handleChange, disabled: disabled, className: classNames('input', size) }),
12
- label));
12
+ return (React.createElement("label", { className: styles.checkbox },
13
+ React.createElement("input", { type: "checkbox", checked: checked, onChange: handleChange, disabled: disabled, className: classNames(styles.input, styles[size]) }),
14
+ React.createElement(Typography, { variant: 'Body2' }, label)));
13
15
  };
@@ -1,20 +1,9 @@
1
- .story--wrapper-checkbox {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- }
6
1
 
7
2
  .checkbox {
8
3
  display: flex;
9
4
  align-items: center;
10
5
  justify-content: left;
11
6
  gap: 5px;
12
-
13
- font-family: 'Raleway';
14
- font-style: normal;
15
- font-weight: 400;
16
- font-size: 14px;
17
- line-height: 16px;
18
7
  color: var(--text-dark);
19
8
  }
20
9
 
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { ColorPickerProps } from 'kamotive_ui';
2
+ import { ColorPickerProps } from '../../types';
3
3
  /**
4
4
  * Компонент ColorPicker представляет собой элемент управления для выбора цвета.
5
5
  */