kamotive_ui 1.2.0 → 1.2.2
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/Icons/ChevronDown/ChevronDown10.d.ts +6 -0
- package/dist/Icons/ChevronDown/ChevronDown10.js +5 -0
- package/dist/Icons/ChevronUp/ChevronUp10.d.ts +6 -0
- package/dist/Icons/ChevronUp/ChevronUp10.js +5 -0
- package/dist/Icons/IconAccount/IconAccount10.d.ts +6 -0
- package/dist/Icons/IconAccount/IconAccount10.js +5 -0
- package/dist/Icons/IconAlarm/IconAlarm10.d.ts +6 -0
- package/dist/Icons/IconAlarm/IconAlarm10.js +5 -0
- package/dist/Icons/IconBank/IconBank10.d.ts +6 -0
- package/dist/Icons/IconBank/IconBank10.js +5 -0
- package/dist/Icons/IconBell/IconBell10.d.ts +6 -0
- package/dist/Icons/IconBell/IconBell10.js +5 -0
- package/dist/Icons/IconBriefcase/IconBriefcase10.d.ts +6 -0
- package/dist/Icons/IconBriefcase/IconBriefcase10.js +5 -0
- package/dist/Icons/IconCalendar/IconCalendar10.d.ts +6 -0
- package/dist/Icons/IconCalendar/IconCalendar10.js +5 -0
- package/dist/Icons/IconCheck/IconCheck10.d.ts +6 -0
- package/dist/Icons/IconCheck/IconCheck10.js +5 -0
- package/dist/Icons/IconClose/IconClose10.d.ts +6 -0
- package/dist/Icons/IconClose/IconClose10.js +5 -0
- package/dist/Icons/IconColorPicker/IconColorPicker10.d.ts +7 -0
- package/dist/Icons/IconColorPicker/IconColorPicker10.js +5 -0
- package/dist/Icons/IconError/IconError10.d.ts +6 -0
- package/dist/Icons/IconError/IconError10.js +5 -0
- package/dist/Icons/IconEyeOff/IconEyeOff10.d.ts +6 -0
- package/dist/Icons/IconEyeOff/IconEyeOff10.js +5 -0
- package/dist/Icons/IconInfo/IconInfo10.d.ts +6 -0
- package/dist/Icons/IconInfo/IconInfo10.js +5 -0
- package/dist/Icons/IconSuccess/IconSuccess10.d.ts +6 -0
- package/dist/Icons/IconSuccess/IconSuccess10.js +5 -0
- package/dist/Icons/IconWarning/IconWarning10.d.ts +6 -0
- package/dist/Icons/IconWarning/IconWarning10.js +5 -0
- package/dist/Icons/index.d.ts +16 -0
- package/dist/Icons/index.js +16 -0
- package/dist/Intro/Welcome.d.ts +2 -0
- package/dist/Intro/Welcome.js +7 -0
- package/dist/Intro/Welcome.module.css +19 -0
- package/dist/colors.css +78 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Button/Button.js +49 -0
- package/dist/components/Button/Button.module.css +343 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +13 -0
- package/dist/components/Checkbox/Checkbox.module.css +78 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +7 -0
- package/dist/components/ColorPicker/ColorPicker.js +115 -0
- package/dist/components/ColorPicker/ColorPicker.module.css +266 -0
- package/dist/components/Dropdown/Dropdown.d.ts +14 -0
- package/dist/components/Dropdown/Dropdown.js +114 -0
- package/dist/components/Dropdown/Dropdown.module.css +207 -0
- package/dist/components/Input/Input.d.ts +6 -0
- package/dist/components/Input/Input.js +37 -0
- package/dist/components/Input/Input.module.css +176 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +6 -0
- package/dist/components/ProgressBar/ProgressBar.js +41 -0
- package/dist/components/ProgressBar/ProgressBar.module.css +56 -0
- package/dist/components/ProgressLoader/ProgressLoader.d.ts +3 -0
- package/dist/components/ProgressLoader/ProgressLoader.js +71 -0
- package/dist/components/ProgressLoader/ProgressLoader.module.css +26 -0
- package/dist/components/RadioButton/RadioButton.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.js +13 -0
- package/dist/components/RadioButton/RadioButton.module.css +80 -0
- package/dist/components/SettingTag/SettingTag.d.ts +3 -0
- package/dist/components/SettingTag/SettingTag.js +15 -0
- package/dist/components/SettingTag/SettingTag.module.css +16 -0
- package/dist/components/Snackbar/Snackbar.d.ts +26 -0
- package/dist/components/Snackbar/Snackbar.js +55 -0
- package/dist/components/Snackbar/Snackbar.module.css +61 -0
- package/dist/components/Snackbar/enums.d.ts +9 -0
- package/dist/components/Snackbar/enums.js +10 -0
- package/dist/components/Tab/Tab.d.ts +3 -0
- package/dist/components/Tab/Tab.js +14 -0
- package/dist/components/Tab/Tab.module.css +45 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.js +19 -0
- package/dist/components/Tabs/Tabs.module.css +55 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.js +23 -0
- package/dist/components/Tag/Tag.module.css +145 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +3 -0
- package/dist/components/ToggleButton/ToggleButton.js +13 -0
- package/dist/components/ToggleButton/ToggleButton.module.css +75 -0
- package/dist/components/Typography/Typography.d.ts +6 -0
- package/dist/components/Typography/Typography.js +25 -0
- package/dist/components/Typography/Typography.module.css +264 -0
- package/dist/components/Typography/enums.d.ts +24 -0
- package/dist/components/Typography/enums.js +25 -0
- package/dist/fonts.css +35 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {enum} ESnackbarTypes
|
|
3
|
+
*/
|
|
4
|
+
export var ESnackbarTypes;
|
|
5
|
+
(function (ESnackbarTypes) {
|
|
6
|
+
ESnackbarTypes["success"] = "success";
|
|
7
|
+
ESnackbarTypes["error"] = "error";
|
|
8
|
+
ESnackbarTypes["warning"] = "warning";
|
|
9
|
+
ESnackbarTypes["info"] = "info";
|
|
10
|
+
})(ESnackbarTypes || (ESnackbarTypes = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './Tab.module.css';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
export const Tab = ({ value, onClick, label, selected, disabled = false }) => {
|
|
5
|
+
const handleClick = (e) => {
|
|
6
|
+
if (onClick && value && !disabled) {
|
|
7
|
+
onClick(value);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
return (React.createElement("button", { role: "tab", "aria-selected": selected, "aria-disabled": disabled, value: value, className: classNames(styles['tab'], {
|
|
11
|
+
'selected': selected,
|
|
12
|
+
'disabled': disabled,
|
|
13
|
+
}), onClick: handleClick }, label));
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.story--wrapper-tab {
|
|
2
|
+
background-color: var(--white);
|
|
3
|
+
padding: 30px;
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tab {
|
|
8
|
+
width: 126px;
|
|
9
|
+
height: 24px;
|
|
10
|
+
padding: 3px 10px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
background-color: var(--tab-extraLight);
|
|
15
|
+
border: none;
|
|
16
|
+
|
|
17
|
+
font-family: 'Raleway';
|
|
18
|
+
font-style: normal;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
font-size: 13px;
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tab:hover {
|
|
25
|
+
background-color: var(--tab-medium);
|
|
26
|
+
border-radius: 7px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.selected {
|
|
30
|
+
border: 0.5px solid var(--tab-medium);
|
|
31
|
+
border-radius: 7px;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
background-color: var(--white);
|
|
34
|
+
box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.04);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.selected:hover {
|
|
38
|
+
background-color: var(--tab-light);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tab.disabled {
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
color: var(--text-btn);
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './Tabs.module.css';
|
|
3
|
+
export const Tabs = ({ value, onChange, children }) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const selectedTabContent = (_a = children === null || children === void 0 ? void 0 : children.find((child) => child.props.value === value)) === null || _a === void 0 ? void 0 : _a.props.children;
|
|
6
|
+
const handleTabChange = (newValue) => {
|
|
7
|
+
if (onChange && newValue) {
|
|
8
|
+
onChange(newValue);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
return (React.createElement(React.Fragment, null,
|
|
12
|
+
React.createElement("div", { role: "tablist", className: styles['tabs'] }, children === null || children === void 0 ? void 0 : children.map((child, index) => React.cloneElement(child, {
|
|
13
|
+
key: index,
|
|
14
|
+
selected: child.props.value === value,
|
|
15
|
+
disabled: child.props.disabled,
|
|
16
|
+
onClick: () => handleTabChange(child.props.value),
|
|
17
|
+
}))),
|
|
18
|
+
React.createElement("div", { role: "tabpanel", "aria-labelledby": value }, selectedTabContent)));
|
|
19
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.story--wrapper-tabs {
|
|
2
|
+
background-color: var(--white);
|
|
3
|
+
padding: 30px;
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tabs {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
gap: 3px;
|
|
11
|
+
padding: 2px;
|
|
12
|
+
border-radius: 9px;
|
|
13
|
+
background-color: var(--tab-extraLight);
|
|
14
|
+
width: fit-content;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tab {
|
|
18
|
+
width: 126px;
|
|
19
|
+
height: 24px;
|
|
20
|
+
padding: 3px 10px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
background-color: var(--tab-extraLight);
|
|
25
|
+
border: none;
|
|
26
|
+
|
|
27
|
+
font-family: 'Raleway';
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
line-height: 18px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tab:hover {
|
|
35
|
+
background-color: var(--tab-medium);
|
|
36
|
+
border-radius: 7px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.selected {
|
|
40
|
+
border: 0.5px solid var(--tab-medium);
|
|
41
|
+
border-radius: 7px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
background-color: var(--white);
|
|
44
|
+
box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.04);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.selected:hover {
|
|
48
|
+
background-color: var(--tab-light);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tab.disabled {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
color: var(--text-btn);
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './Tag.module.css';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
export const Tag = ({ label, color = 'red', closeButton = false, onClick }) => {
|
|
5
|
+
const hexToRgba = (hex, alpha) => {
|
|
6
|
+
//преобразуем в rgba для заднего фона
|
|
7
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
8
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
9
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
10
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
11
|
+
};
|
|
12
|
+
return (React.createElement("span", { className: classNames(styles['tag'], !color.startsWith('#') ? `${color}` : ''), style: color.startsWith('#')
|
|
13
|
+
? {
|
|
14
|
+
color: color,
|
|
15
|
+
border: `1px solid ${color}`,
|
|
16
|
+
backgroundColor: hexToRgba(color, 0.2),
|
|
17
|
+
}
|
|
18
|
+
: {} },
|
|
19
|
+
label,
|
|
20
|
+
closeButton && (React.createElement("button", { type: "button", "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", style: color.startsWith('#')
|
|
21
|
+
? { '--close-color': color }
|
|
22
|
+
: { '--close-color': `var(--${color})` }, onClick: onClick }))));
|
|
23
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
.story--wrapper-tag {
|
|
2
|
+
background-color: var(--white);
|
|
3
|
+
padding: 30px;
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
width: 300px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.tag {
|
|
9
|
+
padding: 4px 10px;
|
|
10
|
+
border-radius: 8px;
|
|
11
|
+
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 10px;
|
|
16
|
+
|
|
17
|
+
font-family: 'Raleway';
|
|
18
|
+
font-style: normal;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
line-height: 14px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tag .circle {
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: transform 0.2s ease;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tag button[aria-label="Закрыть"] {
|
|
32
|
+
background: none;
|
|
33
|
+
border: none;
|
|
34
|
+
padding: 0;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
position: relative;
|
|
37
|
+
width: 8px;
|
|
38
|
+
height: 8px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tag button[aria-label="Закрыть"]::before,
|
|
42
|
+
.tag button[aria-label="Закрыть"]::after {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 50%;
|
|
46
|
+
left: 50%;
|
|
47
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
48
|
+
height: 1px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
background-color: var(--close-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tag button[aria-label="Закрыть"]::after {
|
|
54
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tag.red {
|
|
58
|
+
color: var(--red);
|
|
59
|
+
background-color: var(--redBackground);
|
|
60
|
+
border: 1px solid var(--red)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tag.red:hover {
|
|
64
|
+
background-color: var(--redHover);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tag.orange {
|
|
68
|
+
color: var(--orange);
|
|
69
|
+
background-color: var(--orangeBackground);
|
|
70
|
+
border: 1px solid var(--orange)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.tag.orange:hover {
|
|
74
|
+
background-color: var(--orangeHover);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tag.yellow {
|
|
78
|
+
color: var(--yellowText);
|
|
79
|
+
background-color: var(--yellowBackground);
|
|
80
|
+
border: 1px solid var(--yellow)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tag.yellow:hover {
|
|
84
|
+
background-color: var(--yellowHover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tag.green {
|
|
88
|
+
color: var(--green);
|
|
89
|
+
background-color: var(--greenBackground);
|
|
90
|
+
border: 1px solid var(--green)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tag.green:hover {
|
|
94
|
+
background-color: var(--greenHover);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.tag.purple {
|
|
98
|
+
color: var(--purple);
|
|
99
|
+
background-color: var(--purpleBackground);
|
|
100
|
+
border: 1px solid var(--purple)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.tag.purple:hover {
|
|
104
|
+
background-color: var(--purpleHover);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.tag.indigo {
|
|
108
|
+
color: var(--indigo);
|
|
109
|
+
background-color: var(--indigoBackground);
|
|
110
|
+
border: 1px solid var(--indigo)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tag.indigo:hover {
|
|
114
|
+
background-color: var(--indigoHover);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.tag.blue {
|
|
118
|
+
color: var(--blue);
|
|
119
|
+
background-color: var(--blueBackground);
|
|
120
|
+
border: 1px solid var(--blue)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.tag.blue:hover {
|
|
124
|
+
background-color: var(--blueHover);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.tag.teal {
|
|
128
|
+
color: var(--teal);
|
|
129
|
+
background-color: var(--tealBackground);
|
|
130
|
+
border: 1px solid var(--teal)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.tag.teal:hover {
|
|
134
|
+
background-color: var(--tealHover);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.tag.pink {
|
|
138
|
+
color: var(--pink);
|
|
139
|
+
background-color: var(--pinkBackground);
|
|
140
|
+
border: 1px solid var(--pink)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.tag.pink:hover {
|
|
144
|
+
background-color: var(--pinkHover);
|
|
145
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './ToggleButton.module.css';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
export const ToggleButton = ({ value, onChange, disabled = false, size = 'sm', label }) => {
|
|
5
|
+
const handleChange = (e) => {
|
|
6
|
+
if (onChange) {
|
|
7
|
+
onChange(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
return (React.createElement("label", { className: styles['toggle'] },
|
|
11
|
+
React.createElement("input", { type: "checkbox", checked: value, onChange: handleChange, disabled: disabled, className: classNames(styles['toggleInput'], `${size}`) }),
|
|
12
|
+
label));
|
|
13
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.story--wrapper-toggle {
|
|
2
|
+
background-color: var(--white);
|
|
3
|
+
padding: 30px;
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
}
|
|
6
|
+
.toggle {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: left;
|
|
10
|
+
gap: 5px;
|
|
11
|
+
|
|
12
|
+
font-family: 'Raleway';
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 16px;
|
|
17
|
+
color: var(--text-dark);
|
|
18
|
+
}
|
|
19
|
+
.toggleInput.sm {
|
|
20
|
+
width: 22px;
|
|
21
|
+
height: 12px;
|
|
22
|
+
}
|
|
23
|
+
.toggleInput.md {
|
|
24
|
+
width: 28px;
|
|
25
|
+
height: 16px;
|
|
26
|
+
}
|
|
27
|
+
.toggleInput {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
appearance: none;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
background-color: var(--grey-medium);
|
|
33
|
+
background-clip: content-box;
|
|
34
|
+
position: relative;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.toggleInput:checked {
|
|
38
|
+
background-color: var(--blue-main);
|
|
39
|
+
}
|
|
40
|
+
.toggleInput:disabled:checked {
|
|
41
|
+
background-color: var(--blue-disabled);
|
|
42
|
+
}
|
|
43
|
+
/* Круг слева */
|
|
44
|
+
.toggleInput::after {
|
|
45
|
+
content: '';
|
|
46
|
+
position: absolute;
|
|
47
|
+
left: 50%;
|
|
48
|
+
top: 50%;
|
|
49
|
+
transform: translate(-100%, -50%);
|
|
50
|
+
width: 45%;
|
|
51
|
+
height: 85%;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
background-color: var(--white);
|
|
54
|
+
}
|
|
55
|
+
.toggleInput:hover::after {
|
|
56
|
+
box-shadow: 0 0 2px var(--blue-main);
|
|
57
|
+
}
|
|
58
|
+
.toggleInput:disabled::after {
|
|
59
|
+
background-color: var(--grey-extraLight);
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
box-shadow: none;
|
|
62
|
+
}
|
|
63
|
+
/* Круг справа */
|
|
64
|
+
.toggleInput:checked::after {
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
left: 50%;
|
|
68
|
+
top: 50%;
|
|
69
|
+
transform: translate(0%, -50%);
|
|
70
|
+
width: 45%;
|
|
71
|
+
height: 85%;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
background-color: var(--white);
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
;
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import { ETypographyVariants } from './enums';
|
|
16
|
+
import styles from './Typography.module.css';
|
|
17
|
+
/**
|
|
18
|
+
* Компонент Typography для стилизованного отображения текста.
|
|
19
|
+
*/
|
|
20
|
+
export const Typography = (_a) => {
|
|
21
|
+
var { variant = ETypographyVariants.Body1, children, className, color, style } = _a, props = __rest(_a, ["variant", "children", "className", "color", "style"]);
|
|
22
|
+
const variantClass = classNames([`typography--variant-${variant}`], className);
|
|
23
|
+
const combinedStyle = Object.assign({ color }, style);
|
|
24
|
+
return (React.createElement("span", Object.assign({ className: styles[`${variantClass} ${className}`], style: combinedStyle }, props), children));
|
|
25
|
+
};
|