intelicoreact 0.1.18 → 0.1.19
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/Atomic/FormElements/RangeInputs/RangeInputs.js +10 -16
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.scss +37 -7
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +5 -3
- package/dist/Atomic/FormElements/Switcher/Switcher.js +9 -7
- package/dist/Atomic/FormElements/Switcher/Switcher.scss +30 -6
- package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +4 -1
- package/dist/Atomic/FormElements/Switcher/partial/inner-class.scss +6 -0
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.scss +17 -9
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +5 -3
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +5 -5
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.scss +20 -2
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +4 -1
- package/dist/Atomic/FormElements/TextSwitcher/partial/inner-class.module.scss +4 -0
- package/dist/Atomic/FormElements/Textarea/Textarea.js +3 -13
- package/dist/Atomic/FormElements/Textarea/Textarea.scss +30 -28
- package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +1 -4
- package/dist/Molecular/FilterSelect/FilterSelect.js +140 -0
- package/dist/Molecular/FilterSelect/FilterSelect.scss +39 -0
- package/dist/Molecular/FilterSelect/FilterSelect.stories.js +81 -0
- package/dist/Molecular/SwitcherHide/SwitcherHide.js +58 -0
- package/dist/Molecular/SwitcherHide/SwitcherHide.scss +31 -0
- package/dist/Molecular/SwitcherHide/SwitcherHide.stories.js +54 -0
- package/dist/Molecular/SwitcherHide/partial/inner-class.scss +6 -0
- package/dist/Molecular/SwitcherRadio/SwitcherRadio.js +61 -0
- package/dist/Molecular/SwitcherRadio/SwitcherRadio.scss +27 -0
- package/dist/Molecular/SwitcherRadio/SwitcherRadio.stories.js +83 -0
- package/dist/Molecular/SwitcherRange/SwitcherRange.js +72 -0
- package/dist/Molecular/SwitcherRange/SwitcherRange.scss +24 -0
- package/dist/Molecular/SwitcherRange/SwitcherRange.stories.js +59 -0
- package/dist/Molecular/SwitcherTextarea/SwitcherTextarea.js +81 -0
- package/dist/Molecular/SwitcherTextarea/SwitcherTextarea.scss +23 -0
- package/dist/Molecular/SwitcherTextarea/SwitcherTextarea.stories.js +70 -0
- package/dist/Molecular/SwitcherTextarea/partial/inner-class.scss +20 -0
- package/package.json +1 -1
|
@@ -33,11 +33,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
33
33
|
|
|
34
34
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
35
|
|
|
36
|
+
var RC = 'range-inputs';
|
|
37
|
+
|
|
36
38
|
var RangeInputs = function RangeInputs(_ref) {
|
|
37
39
|
var _valueObj$from, _valueObj$to;
|
|
38
40
|
|
|
39
|
-
var
|
|
40
|
-
hint = _ref.hint,
|
|
41
|
+
var isColumnPosition = _ref.isColumnPosition,
|
|
41
42
|
_ref$value = _ref.value,
|
|
42
43
|
valueObj = _ref$value === void 0 ? {
|
|
43
44
|
from: '',
|
|
@@ -45,7 +46,6 @@ var RangeInputs = function RangeInputs(_ref) {
|
|
|
45
46
|
} : _ref$value,
|
|
46
47
|
className = _ref.className,
|
|
47
48
|
onChange = _ref.onChange,
|
|
48
|
-
isRequired = _ref.isRequired,
|
|
49
49
|
_ref$type = _ref.type,
|
|
50
50
|
type = _ref$type === void 0 ? 'int' : _ref$type,
|
|
51
51
|
setInnerError = _ref.setError;
|
|
@@ -97,22 +97,16 @@ var RangeInputs = function RangeInputs(_ref) {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
-
className: (0, _classnames.default)(
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
className: "range-inputs--label mb5",
|
|
104
|
-
label: label,
|
|
105
|
-
hint: hint
|
|
106
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
-
className: "j4"
|
|
100
|
+
className: (0, _classnames.default)(RC, className, (0, _defineProperty2.default)({}, "".concat(RC, "_column"), isColumnPosition))
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
className: "".concat(RC, "__wrapper")
|
|
108
103
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
-
className: "
|
|
104
|
+
className: "".concat(RC, "__input-from")
|
|
110
105
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
111
|
-
className: "
|
|
106
|
+
className: "".concat(RC, "__input-label")
|
|
112
107
|
}, "From"), /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
113
108
|
ref: inputFromRef,
|
|
114
109
|
value: (_valueObj$from = valueObj === null || valueObj === void 0 ? void 0 : valueObj.from) !== null && _valueObj$from !== void 0 ? _valueObj$from : '',
|
|
115
|
-
className: "mr15",
|
|
116
110
|
onChange: function onChange(val) {
|
|
117
111
|
return handleChange('from', val);
|
|
118
112
|
},
|
|
@@ -129,9 +123,9 @@ var RangeInputs = function RangeInputs(_ref) {
|
|
|
129
123
|
}
|
|
130
124
|
}
|
|
131
125
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
-
className: "
|
|
126
|
+
className: "".concat(RC, "__input-to")
|
|
133
127
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
134
|
-
className: "
|
|
128
|
+
className: "".concat(RC, "__input-label")
|
|
135
129
|
}, "To"), /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
136
130
|
ref: inputToRef,
|
|
137
131
|
value: (_valueObj$to = valueObj === null || valueObj === void 0 ? void 0 : valueObj.to) !== null && _valueObj$to !== void 0 ? _valueObj$to : '',
|
|
@@ -1,20 +1,50 @@
|
|
|
1
1
|
.range-inputs {
|
|
2
2
|
display: flex;
|
|
3
|
-
|
|
4
|
-
justify-content:
|
|
5
|
-
|
|
3
|
+
flex-flow: row nowrap;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
&__wrapper {
|
|
8
|
+
width: 100%;
|
|
6
9
|
|
|
7
|
-
&--label {
|
|
8
10
|
display: flex;
|
|
11
|
+
flex-flow: row nowrap;
|
|
12
|
+
justify-content: flex-start;
|
|
9
13
|
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__input-from,
|
|
17
|
+
&__input-to {
|
|
18
|
+
width: fit-content;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-flow: row nowrap;
|
|
10
21
|
justify-content: flex-start;
|
|
11
|
-
|
|
12
|
-
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__input-from {
|
|
26
|
+
margin-right: 15px;
|
|
13
27
|
}
|
|
14
28
|
|
|
15
29
|
&__input-label {
|
|
16
30
|
font-size: 12px;
|
|
17
31
|
line-height: 24px;
|
|
18
|
-
margin-right:
|
|
32
|
+
margin-right: 15px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&_column {
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
|
|
38
|
+
.range-inputs__wrapper {
|
|
39
|
+
width: fit-content;
|
|
40
|
+
flex-flow: column nowrap;
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.range-inputs__input-from {
|
|
46
|
+
margin-right: 0;
|
|
47
|
+
margin-bottom: 15px;
|
|
48
|
+
}
|
|
19
49
|
}
|
|
20
50
|
}
|
|
@@ -41,13 +41,15 @@ var Template = function Template(args) {
|
|
|
41
41
|
}, [state]);
|
|
42
42
|
return /*#__PURE__*/_react.default.createElement(_RangeInputs.default, (0, _extends2.default)({}, args, {
|
|
43
43
|
onChange: setState,
|
|
44
|
-
value: state
|
|
44
|
+
value: state,
|
|
45
|
+
setError: function setError() {}
|
|
45
46
|
}));
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
var RangeInputsTemplate = Template.bind({});
|
|
49
50
|
exports.RangeInputsTemplate = RangeInputsTemplate;
|
|
50
51
|
RangeInputsTemplate.args = {
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
isColumnPosition: true,
|
|
53
|
+
className: '',
|
|
54
|
+
type: 'int'
|
|
53
55
|
};
|
|
@@ -25,24 +25,26 @@ var Switcher = function Switcher(_ref) {
|
|
|
25
25
|
isActive = _ref.isActive,
|
|
26
26
|
disabled = _ref.disabled,
|
|
27
27
|
onChange = _ref.onChange,
|
|
28
|
-
|
|
29
|
-
hint = _ref.hint
|
|
28
|
+
isLabelBold = _ref.isLabelBold,
|
|
29
|
+
hint = _ref.hint,
|
|
30
|
+
hintSide = _ref.hintSide;
|
|
30
31
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
className: "".concat(RC, "
|
|
32
|
+
className: (0, _classnames.default)(RC, className, (0, _defineProperty2.default)({}, "".concat(RC, "_disabled"), disabled))
|
|
32
33
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
33
|
-
className: (0, _classnames.default)(
|
|
34
|
+
className: (0, _classnames.default)("".concat(RC, "__button")),
|
|
34
35
|
onClick: function onClick() {
|
|
35
36
|
return onChange(!isActive);
|
|
36
37
|
}
|
|
37
38
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
className: (0, _classnames.default)("".concat(RC, "__button"), (0, _defineProperty2.default)({}, "".concat(RC, "
|
|
39
|
+
className: (0, _classnames.default)("".concat(RC, "__button-content"), (0, _defineProperty2.default)({}, "".concat(RC, "__button-content_active"), isActive))
|
|
39
40
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
41
|
className: "".concat(RC, "__ball")
|
|
41
42
|
})), label && /*#__PURE__*/_react.default.createElement("span", {
|
|
42
|
-
className: (0, _classnames.default)("".concat(RC, "__label"), (0, _defineProperty2.default)({}, "".concat(RC, "__label_bold"),
|
|
43
|
+
className: (0, _classnames.default)("".concat(RC, "__label"), (0, _defineProperty2.default)({}, "".concat(RC, "__label_bold"), isLabelBold))
|
|
43
44
|
}, label)), hint && /*#__PURE__*/_react.default.createElement(_Hint.default, {
|
|
44
45
|
className: "".concat(RC, "__hint"),
|
|
45
|
-
hint: hint
|
|
46
|
+
hint: hint,
|
|
47
|
+
side: hintSide
|
|
46
48
|
}));
|
|
47
49
|
};
|
|
48
50
|
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
@import "../../../scss/vars";
|
|
2
2
|
|
|
3
3
|
.switcher {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
&__button {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
|
|
10
|
+
font-family: inherit;
|
|
11
|
+
font-style: inherit;
|
|
12
|
+
font-weight: inherit;
|
|
13
|
+
font-size: inherit;
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
&_disabled {
|
|
9
18
|
pointer-events: none;
|
|
10
19
|
opacity: 0.5;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
|
-
&__button {
|
|
22
|
+
&__button-content {
|
|
14
23
|
background-color: rgba($color--gray, 0.5);
|
|
15
24
|
border-radius: 8px;
|
|
25
|
+
min-width: 26px;
|
|
16
26
|
width: 26px;
|
|
17
27
|
height: 16px;
|
|
18
28
|
padding: 1px;
|
|
@@ -36,10 +46,17 @@
|
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
&__label {
|
|
39
|
-
font-
|
|
49
|
+
font-family: inherit;
|
|
50
|
+
font-style: inherit;
|
|
51
|
+
font-weight: inherit;
|
|
52
|
+
font-size: inherit;
|
|
53
|
+
color: inherit;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
|
|
40
56
|
margin-left: 4px;
|
|
41
57
|
user-select: none;
|
|
42
|
-
|
|
58
|
+
text-align: left;
|
|
59
|
+
|
|
43
60
|
&_bold {
|
|
44
61
|
font-weight: 500;
|
|
45
62
|
}
|
|
@@ -52,5 +69,12 @@
|
|
|
52
69
|
|
|
53
70
|
&__hint {
|
|
54
71
|
margin-left: 5px;
|
|
72
|
+
.hint__button {
|
|
73
|
+
svg {
|
|
74
|
+
min-width: 16px;
|
|
75
|
+
width: 16px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
55
78
|
}
|
|
56
79
|
}
|
|
80
|
+
|
|
@@ -17,6 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _Switcher = _interopRequireDefault(require("./Switcher"));
|
|
19
19
|
|
|
20
|
+
require("./partial/inner-class.scss");
|
|
21
|
+
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
23
|
|
|
22
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -45,5 +47,6 @@ exports.SwitcherTemplate = SwitcherTemplate;
|
|
|
45
47
|
SwitcherTemplate.args = {
|
|
46
48
|
label: 'Test label',
|
|
47
49
|
disabled: false,
|
|
48
|
-
|
|
50
|
+
isLabelBold: true,
|
|
51
|
+
className: 'inner-class__switcher'
|
|
49
52
|
};
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
height: fit-content;
|
|
24
24
|
min-height: 28px;
|
|
25
|
-
padding:
|
|
25
|
+
padding: 1px 24px 1px 5px;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
background: #ffffff;
|
|
28
28
|
border: 1px solid #e2e5ec;
|
|
@@ -93,14 +93,12 @@
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
&__arrow {
|
|
96
|
+
width: 16px;
|
|
97
|
+
height: 16px;
|
|
96
98
|
position: absolute;
|
|
97
|
-
top:
|
|
99
|
+
top: calc(50% - 8px);
|
|
98
100
|
right: 5px;
|
|
99
101
|
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
margin-right: 5px;
|
|
103
|
-
|
|
104
102
|
cursor: pointer;
|
|
105
103
|
|
|
106
104
|
&_active {
|
|
@@ -108,8 +106,8 @@
|
|
|
108
106
|
}
|
|
109
107
|
|
|
110
108
|
svg {
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
109
|
+
width: auto;
|
|
110
|
+
height: 100%;
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
113
|
|
|
@@ -141,7 +139,17 @@
|
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
.tag {
|
|
144
|
-
margin-
|
|
142
|
+
margin-top: 1px;
|
|
143
|
+
margin-bottom: 1px;
|
|
145
144
|
cursor: auto;
|
|
146
145
|
}
|
|
146
|
+
|
|
147
|
+
&_arrow-static {
|
|
148
|
+
.tags-dropdown__trigger {
|
|
149
|
+
position: static;
|
|
150
|
+
}
|
|
151
|
+
.tags-dropdown__arrow {
|
|
152
|
+
top: 6px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
147
155
|
}
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.TagsDropdownTemplate = exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
15
|
|
|
14
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -34,16 +36,16 @@ var Template = function Template(args) {
|
|
|
34
36
|
value = _useState2[0],
|
|
35
37
|
setValue = _useState2[1];
|
|
36
38
|
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_TagsDropdown.default, {
|
|
38
|
-
options: options,
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_TagsDropdown.default, (0, _extends2.default)({}, args, {
|
|
39
40
|
chosenOptions: value,
|
|
40
41
|
onChange: setValue
|
|
41
|
-
});
|
|
42
|
+
}));
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
var TagsDropdownTemplate = Template.bind({});
|
|
45
46
|
exports.TagsDropdownTemplate = TagsDropdownTemplate;
|
|
46
47
|
TagsDropdownTemplate.args = {
|
|
48
|
+
className: 'tags-dropdown_arrow-static',
|
|
47
49
|
options: [{
|
|
48
50
|
id: 1,
|
|
49
51
|
title: 'Tags Dropdown1',
|
|
@@ -18,25 +18,25 @@ require("./TextSwitcher.scss");
|
|
|
18
18
|
var RC = 'text-switcher';
|
|
19
19
|
|
|
20
20
|
var TextSwitcher = function TextSwitcher(_ref) {
|
|
21
|
-
var
|
|
21
|
+
var isActive = _ref.isActive,
|
|
22
22
|
_ref$activeText = _ref.activeText,
|
|
23
23
|
activeText = _ref$activeText === void 0 ? 'is' : _ref$activeText,
|
|
24
24
|
_ref$inactiveText = _ref.inactiveText,
|
|
25
25
|
inactiveText = _ref$inactiveText === void 0 ? 'is not' : _ref$inactiveText,
|
|
26
26
|
onChange = _ref.onChange,
|
|
27
27
|
className = _ref.className;
|
|
28
|
-
var isUndefined =
|
|
28
|
+
var isUndefined = isActive === undefined || isActive === null;
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
30
|
-
className: (0, _classnames.default)(RC, (0, _defineProperty2.default)({}, "".concat(RC, "_active"),
|
|
30
|
+
className: (0, _classnames.default)(RC, (0, _defineProperty2.default)({}, "".concat(RC, "_active"), isActive), className),
|
|
31
31
|
onClick: function onClick() {
|
|
32
|
-
return onChange(!
|
|
32
|
+
return onChange(!isActive);
|
|
33
33
|
}
|
|
34
34
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
35
35
|
className: "".concat(RC, "__btn")
|
|
36
36
|
}, activeText), inactiveText && /*#__PURE__*/_react.default.createElement("span", {
|
|
37
37
|
className: (0, _classnames.default)("".concat(RC, "__btn"), "".concat(RC, "__btn_off"))
|
|
38
38
|
}, inactiveText), !isUndefined && /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
className: (0, _classnames.default)("".concat(RC, "__slider"), (0, _defineProperty2.default)({}, "".concat(RC, "__slider_inactive"), !
|
|
39
|
+
className: (0, _classnames.default)("".concat(RC, "__slider"), (0, _defineProperty2.default)({}, "".concat(RC, "__slider_inactive"), !isActive))
|
|
40
40
|
}));
|
|
41
41
|
};
|
|
42
42
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import '../../../scss/vars';
|
|
2
2
|
|
|
3
3
|
.text-switcher {
|
|
4
|
+
box-sizing: border-box;
|
|
4
5
|
display: grid;
|
|
5
6
|
grid-template-columns: repeat(2, 1fr);
|
|
6
7
|
justify-content: center;
|
|
@@ -9,7 +10,11 @@
|
|
|
9
10
|
border-radius: 26px;
|
|
10
11
|
padding: 2px;
|
|
11
12
|
position: relative;
|
|
12
|
-
background: #fff;
|
|
13
|
+
background: #fff;
|
|
14
|
+
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-weight: 300;
|
|
17
|
+
font-size: 12px;
|
|
13
18
|
|
|
14
19
|
&__btn {
|
|
15
20
|
cursor: pointer;
|
|
@@ -18,7 +23,13 @@
|
|
|
18
23
|
padding: 0 14px;
|
|
19
24
|
height: 100%;
|
|
20
25
|
text-transform: uppercase;
|
|
21
|
-
|
|
26
|
+
|
|
27
|
+
font-family: inherit;
|
|
28
|
+
font-style: inherit;
|
|
29
|
+
font-weight:inherit;
|
|
30
|
+
font-size: inherit;
|
|
31
|
+
line-height: inherit;
|
|
32
|
+
|
|
22
33
|
color: $green;
|
|
23
34
|
position: relative;
|
|
24
35
|
z-index: 2;
|
|
@@ -48,3 +59,10 @@
|
|
|
48
59
|
border-color: $color--green-light;
|
|
49
60
|
}
|
|
50
61
|
}
|
|
62
|
+
|
|
63
|
+
.text-switcher_unsetted {
|
|
64
|
+
filter: grayscale(1);
|
|
65
|
+
.text-switcher__btn {
|
|
66
|
+
color: $color--gray !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -17,6 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _TextSwitcher = _interopRequireDefault(require("./TextSwitcher"));
|
|
19
19
|
|
|
20
|
+
var _innerClassModule = _interopRequireDefault(require("./partial/inner-class.module.scss"));
|
|
21
|
+
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
23
|
|
|
22
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -44,5 +46,6 @@ var TextSwitcherTemplate = Template.bind({});
|
|
|
44
46
|
exports.TextSwitcherTemplate = TextSwitcherTemplate;
|
|
45
47
|
TextSwitcherTemplate.args = {
|
|
46
48
|
activeText: 'is',
|
|
47
|
-
inactiveText: 'some long text'
|
|
49
|
+
inactiveText: 'some long text',
|
|
50
|
+
className: _innerClassModule.default['inner-class__text-switcher']
|
|
48
51
|
};
|
|
@@ -21,22 +21,12 @@ var Textarea = function Textarea(_ref) {
|
|
|
21
21
|
var value = _ref.value,
|
|
22
22
|
_onChange = _ref.onChange,
|
|
23
23
|
placeholder = _ref.placeholder,
|
|
24
|
-
label = _ref.label,
|
|
25
|
-
hint = _ref.hint,
|
|
26
|
-
hintSide = _ref.hintSide,
|
|
27
|
-
isBold = _ref.isBold,
|
|
28
24
|
disabled = _ref.disabled,
|
|
29
25
|
className = _ref.className;
|
|
30
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
className: (0, _classnames.default)("".concat(RC
|
|
32
|
-
},
|
|
33
|
-
className: "".concat(RC, "
|
|
34
|
-
label: label,
|
|
35
|
-
hint: hint,
|
|
36
|
-
hintSide: hintSide,
|
|
37
|
-
isBold: isBold
|
|
38
|
-
}), /*#__PURE__*/_react.default.createElement("textarea", {
|
|
39
|
-
className: RC,
|
|
27
|
+
className: (0, _classnames.default)("".concat(RC), className)
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement("textarea", {
|
|
29
|
+
className: "".concat(RC, "__textarea"),
|
|
40
30
|
value: value,
|
|
41
31
|
onChange: function onChange(e) {
|
|
42
32
|
return _onChange(e.target.value);
|
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
@import "../../../scss/mixins";
|
|
3
3
|
|
|
4
4
|
.textarea {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
5
|
+
&__textarea {
|
|
6
|
+
border: 1px solid #e2e5ec;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
min-height: 99px;
|
|
9
|
+
min-width: 223px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
outline: none;
|
|
12
|
+
resize: none;
|
|
13
|
+
padding: 5px 9px;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-family: Roboto, sans-serif;
|
|
18
|
+
|
|
19
|
+
&:focus {
|
|
20
|
+
border-color: $color--primary;
|
|
21
|
+
filter: drop-shadow(0px 0px 4px rgba(93, 120, 255, 0.5));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
background: #f7f8fa;
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
border-color: #a6acb1;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include custom-scroll;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
// &-label {
|
|
35
|
+
// margin-bottom: 5px;
|
|
36
|
+
// }
|
|
35
37
|
}
|
|
@@ -44,9 +44,6 @@ var TextareaTemplate = Template.bind({});
|
|
|
44
44
|
exports.TextareaTemplate = TextareaTemplate;
|
|
45
45
|
TextareaTemplate.args = {
|
|
46
46
|
disabled: false,
|
|
47
|
-
isBold: true,
|
|
48
47
|
placeholder: 'Placeholder',
|
|
49
|
-
|
|
50
|
-
hint: 'hint',
|
|
51
|
-
hintSide: 'bottom'
|
|
48
|
+
className: "any-class"
|
|
52
49
|
};
|