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,41 +1,54 @@
1
- .story--wrapper-iput {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 900px;
6
- }
7
-
8
- .wrapper {
9
- font-family: 'Raleway';
10
- font-style: normal;
11
- /* font-weight: 400; */
1
+ .wrapper--input {
12
2
  position: relative;
3
+ max-width: 260px;
4
+ width: 100%;
5
+ }
6
+ .wrapper--input-label {
7
+ margin-top: 20px;
8
+ }
9
+ .wrapper--input-helperText {
10
+ margin-bottom: 15px;
13
11
  }
14
12
  .wrapper--left {
15
- display: flex;
13
+ display: inline-flex;
16
14
  flex-direction: row;
17
15
  gap: 20px;
18
16
  align-items: center;
17
+ width: fit-content;
18
+ max-width: none;
19
19
  }
20
20
 
21
- .wrapper--input {
22
- position: relative;
23
- }
24
- .inputText {
25
- font-family: 'Raleway';
21
+ .input {
22
+ font-family: var(--font-family-main);
26
23
  font-style: normal;
27
24
  font-weight: 400;
28
25
  position: relative;
29
- font-size: 12px;
30
- line-height: 14px;
26
+
31
27
  color: var(--text-dark);
32
- width: 203px;
33
- /* width: 20%; */
34
- padding: 10px;
28
+ background-color: transparent;
29
+ padding: 10px 15px;
35
30
  outline: none;
36
31
  border: 1px solid var(--grey-light);
32
+ mix-blend-mode: multiply;
37
33
  border-radius: 10px;
38
- /* width: fit-content; */
34
+ display: inline-flex;
35
+ width: 100%;
36
+ }
37
+
38
+ .input--left {
39
+ min-width: 260px;
40
+ }
41
+ .input.lg {
42
+ font-size: 14px;
43
+ line-height: 20px;
44
+ }
45
+ .input.md {
46
+ font-size: 12px;
47
+ line-height: 16px;
48
+ }
49
+ .input.sm {
50
+ font-size: 10px;
51
+ line-height: 14px;
39
52
  }
40
53
  /* Стили при наведении мыши */
41
54
  .input:hover {
@@ -62,18 +75,6 @@
62
75
  .resize {
63
76
  resize: both;
64
77
  }
65
- .inputText.lg {
66
- height: 40px;
67
- /* height: 25px; */
68
- }
69
- .inputText.md {
70
- height: 35px;
71
- /* height: 20px; */
72
- }
73
- .inputText.sm {
74
- /* height: 30px; */
75
- height: 25px;
76
- }
77
78
 
78
79
  .filled {
79
80
  border-color: var(--blue-main);
@@ -84,9 +85,18 @@
84
85
  /* Стили для placeholder */
85
86
  .input::placeholder {
86
87
  color: var(--text-grey);
87
- font-size: 12px;
88
+ /* font-size: 12px; */
88
89
  line-height: 14px;
89
90
  }
91
+ .input::placeholder.sm {
92
+ font-size: 10px;
93
+ }
94
+ .input::placeholder.md {
95
+ font-size: 12px;
96
+ }
97
+ .input::placeholder.lg {
98
+ font-size: 14px;
99
+ }
90
100
  .input:focus::placeholder {
91
101
  color: var(--text-light);
92
102
  }
@@ -98,9 +108,8 @@
98
108
  /* color: var(--text-grey); */
99
109
  }
100
110
  .label--default {
101
- font-size: 12px;
102
111
  position: absolute;
103
- top: -20px;
112
+ top: -18px;
104
113
  cursor: text;
105
114
  white-space: nowrap;
106
115
  overflow: hidden;
@@ -108,9 +117,42 @@
108
117
  max-width: calc(100% - 32px);
109
118
  color: var(--text-grey);
110
119
  }
120
+ .label--default .lg {
121
+ font-size: 12px;
122
+ }
123
+ .label--default.md {
124
+ font-size: 10px;
125
+ }
126
+ .label--default .sm {
127
+ font-size: 16px;
128
+ }
111
129
  .label--left {
112
130
  font-size: 13px;
113
131
  color: var(--text-dark);
132
+ text-wrap-mode: nowrap;
133
+ }
134
+ .label--left.lg {
135
+ font-size: 14px;
136
+ }
137
+ .label--left .md {
138
+ font-size: 12px;
139
+ }
140
+ .label--left .sm {
141
+ font-size: 10px;
142
+ }
143
+
144
+ /* Стили для обязательного input */
145
+ .label--default.label--required {
146
+ position: relative;
147
+ top: 0;
148
+ }
149
+ .label--required::after {
150
+ content: '*';
151
+ color: var(--error-main);
152
+ position: absolute;
153
+ margin-left: 2px;
154
+ top: 2px;
155
+ font-size: 22px;
114
156
  }
115
157
 
116
158
  /* Стили для input с ошибкой */
@@ -125,16 +167,22 @@
125
167
  color: var(--error-secondary);
126
168
  }
127
169
 
128
- .helperText {
170
+ .helperText.md {
171
+ font-size: 10px;
172
+ }
173
+ .helperText.sm {
174
+ font-size: 8px;
175
+ }
176
+ .helperText.lg {
129
177
  font-size: 12px;
130
- line-height: 14px;
178
+ }
179
+ .helperText {
131
180
  position: absolute;
132
181
  left: 0px;
133
- /* top: 110%; */
134
- bottom: -20px;
182
+ bottom: -15px;
135
183
  cursor: text;
136
184
  transition: 0.3ms ease-out;
137
- max-width: calc(100% - 32px);
185
+ /* max-width: calc(100% - 32px); */
138
186
  white-space: nowrap;
139
187
  overflow: hidden;
140
188
  text-overflow: ellipsis;
@@ -170,7 +218,6 @@
170
218
  .icon {
171
219
  position: absolute;
172
220
  z-index: 1;
173
- top: 25%;;
221
+ top: 25%;
174
222
  left: 10px;
175
223
  }
176
-
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { LoaderProps } from '../../types';
3
+ export declare const Loader: FC<LoaderProps>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import styles from './Loader.module.css';
3
+ import { Typography } from '../Typography/Typography';
4
+ import { IconFile } from '../../Icons/IconFile/IconFile';
5
+ import { ProgressBar } from '../ProgressBar/ProgressBar';
6
+ export const Loader = ({ name, size = 0, loading = false, error = '', onClick }) => {
7
+ return (React.createElement("div", { className: `${styles['loader']} ${error ? styles['error'] : ''}` },
8
+ React.createElement("div", { className: styles['loaderFile'] },
9
+ React.createElement("div", { className: styles['loaderInfo'] },
10
+ React.createElement("div", { className: styles['loaderIcon'] },
11
+ React.createElement(IconFile, { htmlColor: "var(--icons-grey)" })),
12
+ React.createElement("div", { className: styles['loaderName'] },
13
+ React.createElement(Typography, { variant: "Body2-Medium", color: "var(--text-dark)" }, name),
14
+ size !== 0 && React.createElement(Typography, { variant: "Caption", color: "var(--grey-medium)" }, `${(size / (1024)).toFixed(1)} кБ`))),
15
+ React.createElement("button", { type: "button", "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0444\u0430\u0439\u043B", onClick: onClick })),
16
+ loading && React.createElement(ProgressBar, { animated: true, size: "sm", value: 100 }),
17
+ error && (React.createElement(Typography, { variant: "Caption", color: "var(--error-main)" }, error))));
18
+ };
@@ -0,0 +1,75 @@
1
+
2
+ .loader {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 5px;
6
+ justify-content: space-between;
7
+
8
+ padding: 10px 15px;
9
+ border: 1px solid var(--info-secondary);
10
+ border-radius: 10px;
11
+
12
+ }
13
+ .error {
14
+ border-color: var(--error-main);
15
+ }
16
+
17
+ .loaderFile{
18
+ display: flex;
19
+ flex-direction: row;
20
+ align-items: center;
21
+ gap: 5px;
22
+ }
23
+ .loaderInfo {
24
+ display: flex;
25
+ flex-direction: row;
26
+ gap: 5px;
27
+ flex-grow: 1;
28
+ align-items: flex-start;
29
+ overflow: hidden;
30
+ }
31
+
32
+ .loaderIcon {
33
+ flex-shrink: 0
34
+ }
35
+
36
+ .loaderName {
37
+ display: flex;
38
+ flex-direction: column;
39
+ flex-grow: 1;
40
+ align-items: flex-start;
41
+ overflow: auto;
42
+ }
43
+
44
+ .loaderButton{
45
+ position: absolute;
46
+ left: 50%;
47
+ }
48
+
49
+ .loader button[aria-label="Закрыть"] {
50
+ background: none;
51
+ border: none;
52
+ padding: 0;
53
+ cursor: pointer;
54
+ position: relative;
55
+ width: 10px;
56
+ height: 10px;
57
+ flex-shrink: 0
58
+ }
59
+
60
+ .loader button[aria-label="Закрыть"]::before,
61
+ .loader button[aria-label="Закрыть"]::after {
62
+ content: '';
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ transform: translate(-50%, -50%) rotate(45deg);
67
+ height: 1px;
68
+ width: 100%;
69
+ background-color: var(--icons-grey);
70
+ }
71
+
72
+ .loader button[aria-label="Закрыть"]::after {
73
+ transform: translate(-50%, -50%) rotate(-45deg);
74
+ }
75
+
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { ProgressBarProps } from 'kamotive_ui';
2
+ import { ProgressBarProps } from '../../types';
3
3
  /**
4
4
  * Компонент ProgressBar отображает прогресс в виде заполненной полосы.
5
5
  */
@@ -2,15 +2,16 @@ import React, { useEffect, useState } from 'react';
2
2
  import { Typography } from '../Typography/Typography';
3
3
  import styles from './ProgressBar.module.css';
4
4
  import classNames from 'classnames';
5
+ ;
5
6
  /**
6
7
  * Компонент ProgressBar отображает прогресс в виде заполненной полосы.
7
8
  */
8
9
  export const ProgressBar = ({ value = 0, max = 100, size = 'md', showValue = true, animated = false, }) => {
9
10
  const [percent, setPercent] = useState(value);
10
11
  const validPercentage = Math.min(Math.max(value, 0), max);
11
- const progressBarClasses = classNames(styles['progress-bar'], size, {
12
- 'progress-bar--animated': animated,
13
- 'progress-bar--static': !animated,
12
+ const progressBarClasses = classNames(styles['progress-bar'], styles[size], {
13
+ [styles['progress-bar--animated']]: animated,
14
+ [styles['progress-bar--static']]: !animated,
14
15
  });
15
16
  useEffect(() => {
16
17
  if (animated) {
@@ -35,7 +36,7 @@ export const ProgressBar = ({ value = 0, max = 100, size = 'md', showValue = tru
35
36
  }, [animated, validPercentage]);
36
37
  return (React.createElement("div", { className: styles["progress-bar--wrapper"] },
37
38
  React.createElement("progress", { id: "linear-progress", className: progressBarClasses, value: percent, max: max }),
38
- React.createElement("label", { htmlFor: "progress", className: styles["progress-bar-percentage"] }, showValue && (React.createElement(Typography, { variant: "Subheading3", color: '#9CA0A7', style: { fontWeight: '300' }, className: styles["progress-bar-percentage"] },
39
+ React.createElement("label", { htmlFor: "progress", className: styles['progress-bar-percentage'] }, showValue && (React.createElement(Typography, { variant: "Caption", color: '#9CA0A7', style: { fontWeight: '300' }, className: styles["progress-bar-percentage"] },
39
40
  percent,
40
41
  "%")))));
41
42
  };
@@ -1,14 +1,3 @@
1
- .story--wrapper-progressbar {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 900px;
6
- }
7
- .progress-bar--default-story {
8
- display: flex;
9
- flex-direction: column;
10
- gap: 30px;
11
- }
12
1
  .progress-bar--wrapper {
13
2
  display: flex;
14
3
  gap: 40px;
@@ -50,6 +39,10 @@
50
39
  .progress-bar-percentage {
51
40
  /* position: absolute; */
52
41
  /* top: 50%; */
42
+ /* font-family: var(--font-family-main);
43
+ font-weight: 300;
44
+ font-size: 11px;
45
+ line-height: 13; */
53
46
  left: 50%;
54
47
  transform: translate(-50%, -50%);
55
48
  }
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { ProgressLoaderProps } from 'kamotive_ui';
2
+ import { ProgressLoaderProps } from '../../types';
3
3
  export declare const ProgressLoader: FC<ProgressLoaderProps>;
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
2
2
  import { Typography } from '../Typography/Typography';
3
3
  import styles from './ProgressLoader.module.css';
4
4
  import classNames from 'classnames';
5
+ ;
5
6
  /**
6
7
  * Компонент ProgressLoader отображает прогресс загрузки.
7
8
  */
@@ -23,7 +24,7 @@ export const ProgressLoader = ({ value = 0, size = 'xl', showValue = true, anima
23
24
  const circumference = 2 * Math.PI * radius;
24
25
  const dashArray = circumference;
25
26
  const dashOffset = circumference * (1 - fillPercentage);
26
- const progressLoaderWrapperClasses = classNames(styles['progress-loader-wrapper'], size);
27
+ const progressLoaderWrapperClasses = classNames(styles['progress-loader-wrapper'], styles[size]);
27
28
  const getTypographySize = () => {
28
29
  switch (size) {
29
30
  case 'md':
@@ -65,7 +66,7 @@ export const ProgressLoader = ({ value = 0, size = 'xl', showValue = true, anima
65
66
  //transition: animated ? 'stroke-dashoffset 0.5s ease-in-out' : 'none',
66
67
  } }, animated && (React.createElement("animate", { attributeName: "stroke-dashoffset", dur: `${animationDuration / 1000}`, values: `${circumference}; ${percent / 100}`, fill: "freeze" })))),
67
68
  showValue && size !== 'sm' && (React.createElement("div", { className: styles["progress-percentage"] },
68
- React.createElement(Typography, { variant: "Subheading2", color: '#9CA0A7', style: { fontSize: getTypographySize(), fontWeight: '300' }, className: styles["progress-percentage"] },
69
+ React.createElement(Typography, { variant: "Subheading2", color: '#9CA0A7', style: { fontSize: getTypographySize(), fontWeight: '300' } },
69
70
  percent,
70
71
  "%")))));
71
72
  };
@@ -1,26 +1,17 @@
1
- .story--wrapper-progress-loader {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 900px;
6
- }
7
1
  .progress-loader-wrapper {
8
2
  display: flex;
9
3
  align-items: center;
10
4
  justify-content: center;
11
5
  position: relative;
12
6
  }
13
- .progress-loader--default-story {
14
- display: flex;
15
- gap: 30px;
16
- }
7
+
17
8
  .progress-loader {
18
9
  width: 100px;
19
10
  height: 100px;
20
11
  }
21
12
  .progress-percentage {
22
13
  position: absolute;
23
- /* top: 50%; */
14
+ top: 50%;
24
15
  left: 50%;
25
16
  transform: translate(-50%, -50%);
26
17
  }
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { RadioProps } from 'kamotive_ui';
2
+ import { RadioProps } from '../../types';
3
3
  export declare const RadioButton: FC<RadioProps>;
@@ -1,13 +1,15 @@
1
1
  import React from 'react';
2
2
  import styles from './RadioButton.module.css';
3
3
  import classNames from 'classnames';
4
+ ;
5
+ import { Typography } from '../Typography/Typography';
4
6
  export const RadioButton = ({ value, label, checked, onChange, disabled = false, size = 'sm' }) => {
5
7
  const handleChange = (e) => {
6
8
  if (onChange) {
7
9
  onChange(e);
8
10
  }
9
11
  };
10
- return (React.createElement("label", { className: styles["radio"] },
11
- React.createElement("input", { type: "radio", checked: checked, value: value, onChange: handleChange, disabled: disabled, className: classNames(styles['input'], size) }),
12
- label));
12
+ return (React.createElement("label", { className: styles.radio },
13
+ React.createElement("input", { type: "radio", checked: checked, value: value, onChange: handleChange, disabled: disabled, className: classNames(styles.input, styles[size]) }),
14
+ React.createElement(Typography, { variant: 'Body2' }, label)));
13
15
  };
@@ -1,29 +1,17 @@
1
- .story--wrapper-radio {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- }
6
1
 
7
2
  .radio {
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
- color: var(--text-dark);
19
7
  }
20
8
 
21
- .radio.sm {
9
+ .input[type="radio"].sm {
22
10
  width: 12px;
23
11
  height: 12px;
24
12
  }
25
13
 
26
- .radio.md {
14
+ .input[type="radio"].md {
27
15
  width: 16px;
28
16
  height: 16px;
29
17
  }
@@ -33,7 +21,6 @@
33
21
  appearance: none;
34
22
  display: inline-block;
35
23
  padding: 6px;
36
-
37
24
  border: 1px solid var(--icons-active);
38
25
  border-radius: 50%;
39
26
  background-color: var(--white);
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { SettingTagProps } from 'kamotive_ui';
2
+ import { SettingTagProps } from '../../types';
3
3
  export declare const SettingTag: React.FC<SettingTagProps>;
@@ -4,12 +4,13 @@ import ColorPicker from '../ColorPicker/ColorPicker';
4
4
  import styles from './SettingTag.module.css';
5
5
  export const SettingTag = ({ label, color, onChange }) => {
6
6
  const [isHovered, setIsHovered] = useState(false);
7
- const colorsOptions = ['red', 'orange', 'yellow', 'green', 'purple', 'indigo', 'blue', 'teal', 'pink'];
8
- return (React.createElement("div", { style: { display: 'flex', gap: '10px', flexDirection: 'row', alignItems: 'center' } },
9
- React.createElement(Tag, { label: label, color: color }),
10
- !isHovered ? (React.createElement("div", { className: styles['circle'], onMouseEnter: () => setIsHovered(true), style: {
7
+ const [currentColor, setCurrentColor] = useState(color);
8
+ const colorsOptions = ['red', 'orange', 'yellow', 'green', 'teal', 'blue', 'indigo', 'purple', 'pink'];
9
+ return (React.createElement("div", { style: { display: 'flex', gap: `${isHovered ? '5px' : '10px'}`, flexDirection: 'row', alignItems: 'center' } },
10
+ React.createElement(Tag, { label: label, color: currentColor, editable: true, onChange: onChange }),
11
+ !isHovered ? (React.createElement("div", { className: styles.circle, onMouseEnter: () => setIsHovered(true), style: {
11
12
  width: 10,
12
13
  height: 10,
13
- backgroundColor: (color === null || color === void 0 ? void 0 : color.startsWith('#')) ? color : `var(--${color})`,
14
- } })) : (React.createElement(ColorPicker, { mainColor: color, onChange: onChange, recentColors: isHovered ? colorsOptions : [], setIsHovered: setIsHovered }))));
14
+ backgroundColor: (currentColor === null || currentColor === void 0 ? void 0 : currentColor.startsWith('#')) ? currentColor : `var(--${currentColor})`,
15
+ } })) : (React.createElement(ColorPicker, { mainColor: currentColor, recentColors: isHovered ? colorsOptions : [], setIsHovered: setIsHovered, onChange: onChange, onColorChange: setCurrentColor }))));
15
16
  };
@@ -1,12 +1,3 @@
1
- .story--wrapper-tag {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 300px;
6
- height: 300px;
7
- }
8
-
9
-
10
1
  .circle {
11
2
  border-radius: 50%;
12
3
  cursor: pointer;
@@ -1,5 +1,5 @@
1
1
  import React, { FC } from 'react';
2
- import { SnackbarProps } from 'kamotive_ui';
2
+ import { SnackbarProps } from '../../types';
3
3
  /**
4
4
  * @description Snackbar компонент для отображения всплывающих уведомлений
5
5
  * @component
@@ -3,6 +3,7 @@ import { IconClose10, IconError10, IconInfo10, IconSuccess10, IconWarning10 } fr
3
3
  import { Typography } from '../Typography/Typography';
4
4
  import styles from './Snackbar.module.css';
5
5
  import classNames from 'classnames';
6
+ ;
6
7
  /**
7
8
  * @description Snackbar компонент для отображения всплывающих уведомлений
8
9
  * @component
@@ -43,13 +44,13 @@ export const Snackbar = ({ children, type, duration = 10000, icon = true, onClos
43
44
  };
44
45
  if (!isVisible)
45
46
  return null;
46
- const snackbarClasses = classNames(styles['snackbar-wrapper'], type ? `snackbar--${type}` : '');
47
+ const snackbarClasses = classNames(styles['snackbar-wrapper'], styles[`snackbar--${type}`]);
47
48
  return (React.createElement("div", { className: snackbarClasses },
48
49
  React.createElement("div", { className: styles['snackbar-textAndIcon'] },
49
50
  icon && icons[type],
50
51
  React.createElement("div", { className: styles['snackbar-text'] },
51
52
  React.createElement(Typography, { variant: "Body2-Medium", color: 'var(--text-dark)' }, title[type]),
52
53
  React.createElement(Typography, { variant: "Caption", color: 'var(--text-btn-light)' }, children))),
53
- React.createElement("button", { className: styles['button'], onClick: handleClose },
54
+ React.createElement("button", { className: styles.button, onClick: handleClose },
54
55
  React.createElement(IconClose10, { htmlColor: 'var(--text-btn-light)' }))));
55
56
  };
@@ -1,10 +1,3 @@
1
- .story--wrapper-snackbar {
2
- background-color: var(--white);
3
- padding: 30px;
4
- border-radius: 10px;
5
- width: 300px;
6
- height: 300px;
7
- }
8
1
  .snackbar-wrapper {
9
2
  display: flex;
10
3
  justify-content: space-between;
@@ -17,8 +10,7 @@
17
10
  max-width: 500px;
18
11
 
19
12
  border-radius: 15px;
20
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
21
- min-height: 48px;
13
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1)
22
14
  }
23
15
  .snackbar-textAndIcon {
24
16
  gap: 10px;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { SpinnerProps } from '../../types';
3
+ export declare const Spinner: FC<SpinnerProps>;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import styles from './Spinner.module.css';
3
+ ;
4
+ /**
5
+ * Компонент Spinner отображает индикатор загрузки.
6
+ */
7
+ const spinnerSizes = { lg: 54, md: 34, sm: 24, xs: 8 };
8
+ export const Spinner = ({ size = 'md', }) => {
9
+ const spinnerSize = typeof size === 'string' ? spinnerSizes[size] : size;
10
+ const viewBoxSize = 100;
11
+ const strokeWidth = size === 'lg' || size === 'md' ? 12 : 10;
12
+ const adjustedSize = spinnerSize + strokeWidth * 5;
13
+ return (React.createElement("div", { className: styles['spinner-wrapper'], style: {
14
+ width: adjustedSize,
15
+ height: adjustedSize,
16
+ padding: strokeWidth
17
+ } },
18
+ React.createElement("svg", { id: "spinner", viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`, className: styles["spinner"], fill: "none", color: 'var(--blue-main)' },
19
+ React.createElement("defs", null,
20
+ React.createElement("linearGradient", { id: "spinner-secondHalf" },
21
+ React.createElement("stop", { offset: "0%", stopOpacity: "0", stopColor: "currentColor" }),
22
+ React.createElement("stop", { offset: "100%", stopOpacity: "0.9", stopColor: "currentColor" })),
23
+ React.createElement("linearGradient", { id: "spinner-firstHalf" },
24
+ React.createElement("stop", { offset: "0%", stopOpacity: "1", stopColor: "currentColor" }),
25
+ React.createElement("stop", { offset: "100%", stopOpacity: "0.9", stopColor: "currentColor" }))),
26
+ React.createElement("g", { strokeWidth: strokeWidth, className: styles.spinnerRotate },
27
+ React.createElement("path", { stroke: "url(#spinner-secondHalf)", d: "M 15 50 A 35 35 0 0 1 85 50" }),
28
+ React.createElement("path", { stroke: "url(#spinner-firstHalf)", d: "M 85 50 A 35 35 0 0 1 15 50" }),
29
+ React.createElement("path", { stroke: "currentColor", strokeLinecap: "round", d: "M 15 50 A 35 35 0 0 1 15 48" })))));
30
+ };
@@ -0,0 +1,20 @@
1
+ .spinner-wrapper{
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ /* height: 100vh; */
6
+ /* background-color: #f5f5f5; */
7
+ }
8
+ .spinnerRotate {
9
+ transform-origin: center;
10
+ animation: rotate 1300ms linear infinite;
11
+ }
12
+
13
+ @keyframes rotate {
14
+ from {
15
+ transform: rotate(0deg);
16
+ }
17
+ to {
18
+ transform: rotate(360deg);
19
+ }
20
+ }
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { TabProps } from 'kamotive_ui';
2
+ import { TabProps } from '../../types';
3
3
  export declare const Tab: FC<TabProps>;