@steroidsjs/bootstrap 3.0.0-beta.120 → 3.0.0-beta.122
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/content/CalendarSystem/CalendarSystemModalView.js +21 -5
- package/content/CalendarSystem/CalendarSystemModalView.scss +1 -1
- package/content/DropDown/DropDownView.js +12 -12
- package/content/DropDown/DropDownView.scss +34 -175
- package/form/DropDownField/DropDownFieldView.js +1 -0
- package/form/DropDownField/DropDownFieldView.scss +3 -0
- package/index.scss +1 -0
- package/layout/Tooltip/TooltipView.js +1 -1
- package/layout/Tooltip/TooltipView.scss +10 -77
- package/list/FlexGrid/FlexGridView.scss +6 -13
- package/package.json +2 -2
- package/scss/bootstrap-classes/flex.scss +42 -0
- package/scss/bootstrap-classes/index.scss +4 -0
- package/scss/bootstrap-classes/layout.scss +72 -0
- package/scss/bootstrap-classes/spacing.scss +97 -0
- package/scss/bootstrap-classes/typography.scss +25 -0
- package/scss/mixins/tooltip.scss +90 -0
- package/scss/variables/common/flex.scss +5 -0
- package/scss/variables/index.scss +1 -0
|
@@ -11,21 +11,37 @@ var form_1 = require("@steroidsjs/core/ui/form");
|
|
|
11
11
|
var Text_1 = __importDefault(require("@steroidsjs/core/ui/typography/Text/Text"));
|
|
12
12
|
var react_1 = __importDefault(require("react"));
|
|
13
13
|
var useBem_1 = __importDefault(require("@steroidsjs/core/hooks/useBem"));
|
|
14
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
15
|
+
var form_2 = require("@steroidsjs/core/actions/form");
|
|
16
|
+
var ADD_EVENT_FORM_ID = 'AddEventForm';
|
|
14
17
|
function CalendarSystemModalView(props) {
|
|
15
18
|
var bem = (0, useBem_1["default"])('CalendarSystemModalView');
|
|
19
|
+
var dispatch = (0, hooks_1.useDispatch)();
|
|
16
20
|
var eventInitialValues = react_1["default"].useMemo(function () { return props.eventInitialValues; }, [props.eventInitialValues]);
|
|
17
21
|
var callOnEventSubmit = function (fields) {
|
|
18
22
|
return eventInitialValues && !props.isCreate ? props.onEventSubmit(fields, eventInitialValues) : props.onEventSubmit(fields);
|
|
19
23
|
};
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
var onCloseModal = react_1["default"].useCallback(function () {
|
|
25
|
+
props.onClose();
|
|
26
|
+
dispatch((0, form_2.formSetErrors)(ADD_EVENT_FORM_ID, {}));
|
|
27
|
+
}, []);
|
|
28
|
+
return (react_1["default"].createElement(Modal_1["default"], { title: props.isCreate ? __('Новое событие') : __('Редактирование события'), onClose: onCloseModal, className: bem.block(), shouldCloseOnEsc: true, shouldCloseOnOverlayClick: true },
|
|
29
|
+
react_1["default"].createElement(form_1.Form, { className: bem.element('default-form'), formId: ADD_EVENT_FORM_ID, onBeforeSubmit: function (data) {
|
|
30
|
+
if (!data.eventGroupId) {
|
|
31
|
+
dispatch((0, form_2.formSetErrors)(ADD_EVENT_FORM_ID, {
|
|
32
|
+
eventGroupId: [__('Поле обязательно для заполнения')]
|
|
33
|
+
}));
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return data;
|
|
37
|
+
}, onSubmit: function (fields) {
|
|
22
38
|
callOnEventSubmit(fields);
|
|
23
|
-
|
|
24
|
-
}, initialValues: eventInitialValues !== null && eventInitialValues !== void 0 ? eventInitialValues : null, submitLabel: props.isCreate ? __('Создать') : __('Сохранить') },
|
|
39
|
+
onCloseModal();
|
|
40
|
+
}, initialValues: eventInitialValues !== null && eventInitialValues !== void 0 ? eventInitialValues : null, submitLabel: props.isCreate ? __('Создать') : __('Сохранить'), useRedux: true },
|
|
25
41
|
react_1["default"].createElement("div", null,
|
|
26
42
|
react_1["default"].createElement(Text_1["default"], { content: __('Наименование'), className: bem.element('label') }),
|
|
27
43
|
react_1["default"].createElement(form_1.InputField, { attribute: 'title', required: true, className: bem.element('name-field') }),
|
|
28
|
-
react_1["default"].createElement(form_1.DropDownField, { attribute: 'eventGroupId', items: props.eventGroups, outline: true, placeholder: '\u0413\u0440\u0443\u043F\u043F\u0430', color: "primary",
|
|
44
|
+
react_1["default"].createElement(form_1.DropDownField, { attribute: 'eventGroupId', items: props.eventGroups, outline: true, placeholder: '\u0413\u0440\u0443\u043F\u043F\u0430', color: "primary", itemsContent: {
|
|
29
45
|
type: 'checkbox'
|
|
30
46
|
} })),
|
|
31
47
|
react_1["default"].createElement("div", null,
|
|
@@ -26,18 +26,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
exports.__esModule = true;
|
|
29
|
-
var isFunction_1 = __importDefault(require("lodash-es/isFunction"));
|
|
30
29
|
var React = __importStar(require("react"));
|
|
31
|
-
var
|
|
30
|
+
var isFunction_1 = __importDefault(require("lodash-es/isFunction"));
|
|
32
31
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
33
32
|
var react_1 = require("react");
|
|
34
33
|
function DropDownView(props) {
|
|
35
|
-
var _a;
|
|
36
34
|
var bem = (0, hooks_1.useBem)('DropDownView');
|
|
37
35
|
var ui = (0, hooks_1.useComponents)().ui;
|
|
38
|
-
(0,
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
var arrowRef = (0, react_1.useRef)(null);
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
38
|
+
props.calculatePosition(props.forwardedRef.current.getBoundingClientRect(), props.hasArrow ? arrowRef.current.getBoundingClientRect() : null);
|
|
39
|
+
}, [props.calculatePosition]);
|
|
41
40
|
var contentProps = (0, react_1.useMemo)(function () { return ({
|
|
42
41
|
onClose: props.onClose
|
|
43
42
|
}); }, [props.onClose]);
|
|
@@ -48,11 +47,12 @@ function DropDownView(props) {
|
|
|
48
47
|
content = ui.renderView(content, contentProps);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
return (React.createElement("div", { ref: props.forwardedRef, className: bem(bem.block(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
return (React.createElement("div", { ref: props.forwardedRef, className: bem(bem.block({
|
|
51
|
+
show: props.isComponentVisible,
|
|
52
|
+
position: props.position
|
|
53
|
+
}), props.className), style: props.style },
|
|
54
|
+
props.hasArrow && (React.createElement("div", { ref: arrowRef, className: bem.element('arrow', { position: props.position }), style: props.arrowPosition })),
|
|
55
|
+
React.createElement("div", { className: bem.element('content') },
|
|
56
|
+
React.createElement("span", null, content))));
|
|
57
57
|
}
|
|
58
58
|
exports["default"] = DropDownView;
|
|
@@ -1,212 +1,71 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@use "../../scss/variables";
|
|
3
|
+
@use '../../scss/mixins';
|
|
2
4
|
|
|
3
5
|
:root {
|
|
4
|
-
--dropdown-background: #fff;
|
|
5
|
-
--dropdown-border: #dbe2e6;
|
|
6
|
-
--dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.0416 0.5L10.1719 10.2567L1.30215 0.499998L19.0416 0.5Z' fill='white' stroke='%23dbe2e6'/%3E%3C/svg%3E%0A");
|
|
6
|
+
--dropdown-background-color: #fff;
|
|
7
|
+
--dropdown-border-color: #dbe2e6;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
html[data-theme="dark"] {
|
|
10
|
-
--dropdown-background: var(--gray-dark);
|
|
11
|
-
--dropdown-border: transparent;
|
|
12
|
-
--dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5859 11.222L0.585938 0.222044L20.5859 0.222046L10.5859 11.222Z' fill='%23272A37'/%3E%3C/svg%3E");
|
|
11
|
+
--dropdown-background-color: var(--gray-dark);
|
|
12
|
+
--dropdown-border-color: transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
$dropdown-background: var(--dropdown-background);
|
|
16
|
-
$dropdown-border: var(--dropdown-border);
|
|
17
|
-
$dropdown-triangle-svg: var(--dropdown-triangle-svg);
|
|
15
|
+
$dropdown-background-color: var(--dropdown-background-color);
|
|
16
|
+
$dropdown-border-color: var(--dropdown-border-color);
|
|
18
17
|
|
|
18
|
+
$dropdown-arrow-width: 10px;
|
|
19
|
+
$dropdown-arrow-height: 10px;
|
|
20
|
+
$dropdown-arrow-border: math.div($dropdown-arrow-width, 2);
|
|
19
21
|
$gap: 12px;
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
width: 20px;
|
|
25
|
-
height: 11px;
|
|
26
|
-
z-index: 2;
|
|
27
|
-
background-image: $dropdown-triangle-svg;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
%borderShaper {
|
|
31
|
-
content: "";
|
|
32
|
-
position: absolute;
|
|
33
|
-
z-index: 3;
|
|
34
|
-
|
|
35
|
-
width: 16px;
|
|
36
|
-
height: 1px;
|
|
37
|
-
background-color: $dropdown-background;
|
|
38
|
-
border-left: 2px solid $dropdown-border;
|
|
39
|
-
border-right: 2px solid $dropdown-border;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@mixin drop($edge, $padding) {
|
|
43
|
-
@if ($edge == "top") {
|
|
44
|
-
&::before {
|
|
45
|
-
@extend %triangle;
|
|
46
|
-
|
|
47
|
-
top: 100%;
|
|
48
|
-
left: $padding;
|
|
49
|
-
transform: translateX(-50%);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&::after {
|
|
53
|
-
@extend %borderShaper;
|
|
54
|
-
|
|
55
|
-
top: 100%;
|
|
56
|
-
left: $padding;
|
|
57
|
-
transform: translateX(-50%);
|
|
58
|
-
}
|
|
59
|
-
} @else if ($edge == "bottom") {
|
|
60
|
-
&::before {
|
|
61
|
-
@extend %triangle;
|
|
62
|
-
|
|
63
|
-
top: 0;
|
|
64
|
-
left: $padding;
|
|
65
|
-
top: -11px;
|
|
66
|
-
transform: translateX(-50%) rotate(180deg);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&::after {
|
|
70
|
-
@extend %borderShaper;
|
|
71
|
-
|
|
72
|
-
transform: translateX(-50%);
|
|
73
|
-
top: -1px;
|
|
74
|
-
left: $padding;
|
|
75
|
-
}
|
|
76
|
-
} @else if($edge == "left") {
|
|
77
|
-
&::before {
|
|
78
|
-
@extend %triangle;
|
|
79
|
-
|
|
80
|
-
left: 100%;
|
|
81
|
-
top: $padding;
|
|
82
|
-
transform: translateX(-22.5%) rotate(-90deg);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&::after {
|
|
86
|
-
@extend %borderShaper;
|
|
87
|
-
|
|
88
|
-
left: 100%;
|
|
89
|
-
top: $padding;
|
|
90
|
-
transform: rotate(-90deg) translate(-30%, -7.5px);
|
|
91
|
-
}
|
|
92
|
-
} @else if($edge == "right") {
|
|
93
|
-
&::before {
|
|
94
|
-
@extend %triangle;
|
|
95
|
-
|
|
96
|
-
right: 100%;
|
|
97
|
-
top: $padding;
|
|
98
|
-
transform: translateX(22.5%) rotate(90deg);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&::after {
|
|
102
|
-
@extend %borderShaper;
|
|
103
|
-
|
|
104
|
-
right: 100%;
|
|
105
|
-
top: $padding;
|
|
106
|
-
transform: rotate(-90deg) translate(-30%, 7.5px);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
23
|
+
$dropdown-arrow-offset-horizontal: 20px;
|
|
24
|
+
$dropdown-arrow-offset-vertical-top: 15px;
|
|
25
|
+
$dropdown-arrow-offset-vertical-bottom: 7px;
|
|
110
26
|
|
|
111
27
|
.DropDownView {
|
|
112
|
-
$root: &;
|
|
113
|
-
|
|
114
|
-
z-index: 1000;
|
|
115
28
|
position: absolute;
|
|
116
29
|
color: variables.$text-color;
|
|
117
30
|
|
|
118
31
|
transform: translate(0, 0);
|
|
119
32
|
opacity: 0;
|
|
120
33
|
transition: opacity 0.15s ease-in, transform 0.15s ease-in;
|
|
121
|
-
|
|
122
34
|
z-index: 4;
|
|
35
|
+
|
|
123
36
|
min-width: 200px;
|
|
124
37
|
padding: 12px;
|
|
125
38
|
border-radius: variables.$radius-large;
|
|
126
|
-
background-color: $dropdown-background;
|
|
127
|
-
border: 1px solid $dropdown-border;
|
|
39
|
+
background-color: $dropdown-background-color;
|
|
40
|
+
border: 1px solid $dropdown-border-color;
|
|
128
41
|
|
|
129
42
|
&_show {
|
|
130
43
|
opacity: 1;
|
|
131
44
|
}
|
|
132
|
-
&_position-top,
|
|
133
|
-
&_position-topLeft,
|
|
134
|
-
&_position-topRight {
|
|
135
|
-
transform: translateY(-$gap);
|
|
136
|
-
}
|
|
137
|
-
&_position-bottom,
|
|
138
|
-
&_position-bottomLeft,
|
|
139
|
-
&_position-bottomRight {
|
|
140
|
-
transform: translateY($gap);
|
|
141
|
-
}
|
|
142
|
-
&_position-left,
|
|
143
|
-
&_position-leftTop,
|
|
144
|
-
&_position-leftBottom {
|
|
145
|
-
transform: translateX(-$gap);
|
|
146
|
-
}
|
|
147
|
-
&_position-right,
|
|
148
|
-
&_position-rightTop,
|
|
149
|
-
&_position-rightBottom {
|
|
150
|
-
transform: translateX($gap);
|
|
151
|
-
}
|
|
152
45
|
|
|
153
|
-
|
|
154
|
-
@include drop("top", 50%);
|
|
155
|
-
}
|
|
46
|
+
@include mixins.absolute-position($gap);
|
|
156
47
|
|
|
157
|
-
&
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
&_position-bottomLeft {
|
|
170
|
-
@include drop("bottom", 15%);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&_position-bottomRight {
|
|
174
|
-
@include drop("bottom", 85%);
|
|
175
|
-
}
|
|
48
|
+
&__arrow {
|
|
49
|
+
position: absolute;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
display: block;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
width: $dropdown-arrow-width;
|
|
54
|
+
height: $dropdown-arrow-height;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
border: 1px solid $dropdown-border-color;
|
|
57
|
+
background-color: $dropdown-background-color;
|
|
176
58
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&_position-leftBottom {
|
|
186
|
-
@include drop("left", 80%);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&_position-right {
|
|
190
|
-
@include drop("right", 46.5%);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&_position-rightTop {
|
|
194
|
-
@include drop("right", 12.5%);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&_position-rightBottom {
|
|
198
|
-
@include drop("right", 80%);
|
|
59
|
+
@include mixins.arrow-position(
|
|
60
|
+
$dropdown-arrow-border,
|
|
61
|
+
$dropdown-arrow-offset-horizontal,
|
|
62
|
+
$dropdown-arrow-offset-vertical-top,
|
|
63
|
+
$dropdown-arrow-offset-vertical-bottom
|
|
64
|
+
);
|
|
199
65
|
}
|
|
200
66
|
|
|
201
67
|
&::before,
|
|
202
68
|
&::after {
|
|
203
69
|
opacity: 0;
|
|
204
70
|
}
|
|
205
|
-
|
|
206
|
-
&_hasArrow {
|
|
207
|
-
&::before,
|
|
208
|
-
&::after {
|
|
209
|
-
opacity: 1;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
71
|
}
|
|
@@ -64,6 +64,7 @@ function DropDownFieldView(props) {
|
|
|
64
64
|
_a["".concat(props.color)] = !!props.color && !props.outline,
|
|
65
65
|
_a["outline_".concat(props.color)] = props.outline,
|
|
66
66
|
_a.opened = props.isOpened,
|
|
67
|
+
_a['is-invalid'] = !!props.errors,
|
|
67
68
|
_a)), props.className), onKeyPress: function (e) { return e.key === 'Enter' && props.onOpen(); }, style: props.style, role: "button", tabIndex: 0 },
|
|
68
69
|
React.createElement("div", { className: bem.element('selected-items', {
|
|
69
70
|
reset: props.showReset,
|
package/index.scss
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@include meta.load-css('scss/variables');
|
|
6
6
|
@include meta.load-css('scss/mixins');
|
|
7
7
|
@include meta.load-css('scss/fonts');
|
|
8
|
+
@include meta.load-css('scss/bootstrap-classes');
|
|
8
9
|
|
|
9
10
|
@include meta.load-css('content/Accordion/AccordionView');
|
|
10
11
|
@include meta.load-css('content/Accordion/AccordionItemView');
|
|
@@ -27,12 +27,12 @@ var React = __importStar(require("react"));
|
|
|
27
27
|
var react_1 = require("react");
|
|
28
28
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
29
29
|
function TooltipView(props) {
|
|
30
|
+
var bem = (0, hooks_1.useBem)('TooltipView');
|
|
30
31
|
var tooltipRef = (0, react_1.useRef)(null);
|
|
31
32
|
var arrowRef = (0, react_1.useRef)(null);
|
|
32
33
|
(0, react_1.useEffect)(function () {
|
|
33
34
|
props.calculatePosition(tooltipRef.current.getBoundingClientRect(), arrowRef.current.getBoundingClientRect());
|
|
34
35
|
}, [props.calculatePosition]);
|
|
35
|
-
var bem = (0, hooks_1.useBem)('TooltipView');
|
|
36
36
|
return (React.createElement("div", { ref: tooltipRef, className: bem(bem.block({
|
|
37
37
|
show: props.isTooltipVisible,
|
|
38
38
|
position: props.position
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use "../../scss/variables";
|
|
3
|
+
@use '../../scss/mixins';
|
|
3
4
|
|
|
4
5
|
$tooltip-arrow-width: 10px;
|
|
5
6
|
$tooltip-arrow-height: 10px;
|
|
@@ -17,6 +18,7 @@ $tooltip-background-color: rgba(65, 65, 65, 0.95);
|
|
|
17
18
|
top: 0;
|
|
18
19
|
left: 0;
|
|
19
20
|
max-width: 300px;
|
|
21
|
+
width: fit-content;
|
|
20
22
|
word-break: break-all;
|
|
21
23
|
padding: 8px 12px;
|
|
22
24
|
border-radius: 6px;
|
|
@@ -31,27 +33,11 @@ $tooltip-background-color: rgba(65, 65, 65, 0.95);
|
|
|
31
33
|
opacity: 1;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
&_top, &_topLeft, &_topRight {
|
|
36
|
-
transform: translateY(-$tooltip-gap);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&_bottom, &_bottomLeft, &_bottomRight {
|
|
40
|
-
transform: translateY($tooltip-gap);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&_left, &_leftTop, &_leftBottom {
|
|
44
|
-
transform: translateX(-$tooltip-gap);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&_right, &_rightTop, &_rightBottom {
|
|
48
|
-
transform: translateX($tooltip-gap);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
36
|
+
@include mixins.absolute-position($tooltip-gap);
|
|
51
37
|
|
|
52
38
|
&__arrow{
|
|
53
39
|
position: absolute;
|
|
54
|
-
|
|
40
|
+
|
|
55
41
|
width: $tooltip-arrow-width;
|
|
56
42
|
height: $tooltip-arrow-height;
|
|
57
43
|
|
|
@@ -60,65 +46,12 @@ $tooltip-background-color: rgba(65, 65, 65, 0.95);
|
|
|
60
46
|
border-color: $tooltip-background-color;
|
|
61
47
|
box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
&_position_topLeft{
|
|
71
|
-
left: $tooltip-arrow-offset-horizontal;
|
|
72
|
-
}
|
|
73
|
-
&_position_topRight{
|
|
74
|
-
left: unset;
|
|
75
|
-
right: $tooltip-arrow-offset-horizontal;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&_position_bottom, &_position_bottomLeft, &_position_bottomRight{
|
|
79
|
-
top: -$tooltip-arrow-border;
|
|
80
|
-
left: 50%;
|
|
81
|
-
border-right-color: transparent;
|
|
82
|
-
border-bottom-color: transparent;
|
|
83
|
-
transform: translateX(-50%) rotate(45deg);
|
|
84
|
-
}
|
|
85
|
-
&_position_bottomLeft{
|
|
86
|
-
left: $tooltip-arrow-offset-horizontal;
|
|
87
|
-
}
|
|
88
|
-
&_position_bottomRight{
|
|
89
|
-
left: unset;
|
|
90
|
-
right: $tooltip-arrow-offset-horizontal;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&_position_left, &_position_leftTop, &_position_leftBottom{
|
|
94
|
-
right: -$tooltip-arrow-border;
|
|
95
|
-
top: 50%;
|
|
96
|
-
border-left-color: transparent;
|
|
97
|
-
border-bottom-color: transparent;
|
|
98
|
-
transform: translateY(-50%) rotate(45deg);
|
|
99
|
-
}
|
|
100
|
-
&_position_leftTop{
|
|
101
|
-
top: $tooltip-arrow-offset-vertical-top;
|
|
102
|
-
}
|
|
103
|
-
&_position_leftBottom{
|
|
104
|
-
top: unset;
|
|
105
|
-
bottom: $tooltip-arrow-offset-vertical-bottom;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&_position_right, &_position_rightTop, &_position_rightBottom{
|
|
109
|
-
left: -$tooltip-arrow-border;
|
|
110
|
-
top: 50%;
|
|
111
|
-
border-top-color: transparent;
|
|
112
|
-
border-right-color: transparent;
|
|
113
|
-
transform: translateY(-50%) rotate(45deg);
|
|
114
|
-
}
|
|
115
|
-
&_position_rightTop{
|
|
116
|
-
top: $tooltip-arrow-offset-vertical-top;
|
|
117
|
-
}
|
|
118
|
-
&_position_rightBottom{
|
|
119
|
-
top: unset;
|
|
120
|
-
bottom: $tooltip-arrow-offset-vertical-bottom;
|
|
121
|
-
}
|
|
49
|
+
@include mixins.arrow-position(
|
|
50
|
+
$tooltip-arrow-border,
|
|
51
|
+
$tooltip-arrow-offset-horizontal,
|
|
52
|
+
$tooltip-arrow-offset-vertical-top,
|
|
53
|
+
$tooltip-arrow-offset-vertical-bottom
|
|
54
|
+
);
|
|
122
55
|
}
|
|
123
56
|
|
|
124
57
|
&__content{
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
@use "../../scss/variables";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
$justifyValues: center, end, start, stretch, flex-start, flex-end, left, right, space-between, space-around, space-evenly;
|
|
5
|
-
$alignValues: center, end, start, stretch, flex-start, flex-end;
|
|
6
|
-
$directionValues: column-reverse column row-reverse row;
|
|
7
|
-
$colValues: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
|
|
8
|
-
$colMaxValue: 12;
|
|
9
|
-
|
|
10
3
|
@mixin col($className, $root, $property: flex-basis) {
|
|
11
|
-
@each $colValue in
|
|
4
|
+
@each $colValue in variables.$colValues {
|
|
12
5
|
&_#{$className}_#{$colValue} {
|
|
13
|
-
#{$property}: calc((100% /
|
|
6
|
+
#{$property}: calc((100% / variables.$colMaxValue) * $colValue);
|
|
14
7
|
}
|
|
15
8
|
}
|
|
16
9
|
}
|
|
@@ -25,19 +18,19 @@ $colMaxValue: 12;
|
|
|
25
18
|
flex-wrap: wrap;
|
|
26
19
|
}
|
|
27
20
|
|
|
28
|
-
@each $alignValue in
|
|
21
|
+
@each $alignValue in variables.$alignValues {
|
|
29
22
|
&_align_#{$alignValue} {
|
|
30
23
|
align-items: $alignValue;
|
|
31
24
|
}
|
|
32
25
|
}
|
|
33
26
|
|
|
34
|
-
@each $justifyValue in
|
|
27
|
+
@each $justifyValue in variables.$justifyValues {
|
|
35
28
|
&_justify_#{$justifyValue} {
|
|
36
29
|
justify-content: $justifyValue;
|
|
37
30
|
}
|
|
38
31
|
}
|
|
39
32
|
|
|
40
|
-
@each $directionValue in
|
|
33
|
+
@each $directionValue in variables.$directionValues {
|
|
41
34
|
&_direction_#{$directionValue} {
|
|
42
35
|
flex-direction: $directionValue;
|
|
43
36
|
}
|
|
@@ -57,4 +50,4 @@ $colMaxValue: 12;
|
|
|
57
50
|
@include col(sm, $root);
|
|
58
51
|
}
|
|
59
52
|
}
|
|
60
|
-
}
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/bootstrap",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.122",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-use": "^17.4.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
40
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.104",
|
|
41
41
|
"@steroidsjs/eslint-config": "^2.1.4",
|
|
42
42
|
"@types/enzyme": "^3.10.8",
|
|
43
43
|
"@types/googlemaps": "^3.43.3",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@use "../variables";
|
|
2
|
+
|
|
3
|
+
.flex {
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.row {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.col {
|
|
13
|
+
@each $colValue in variables.$colValues {
|
|
14
|
+
&-#{$colValue} {
|
|
15
|
+
flex-basis: calc((100% / variables.$colMaxValue) * $colValue);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.justify-content {
|
|
21
|
+
@each $justifyValue in variables.$justifyValues {
|
|
22
|
+
&-#{$justifyValue} {
|
|
23
|
+
justify-content: $justifyValue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.align-items {
|
|
29
|
+
@each $alignValue in variables.$alignValues {
|
|
30
|
+
&-#{$alignValue} {
|
|
31
|
+
align-items: $alignValue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.flex-direction {
|
|
37
|
+
@each $directionValue in variables.$directionValues {
|
|
38
|
+
&-#{$directionValue} {
|
|
39
|
+
flex-direction: $directionValue;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@use "../variables/common/colors.scss";
|
|
2
|
+
|
|
3
|
+
$positions: absolute, sticky, relative, fixed, static;
|
|
4
|
+
$borders: right, left, top, bottom;
|
|
5
|
+
|
|
6
|
+
.border {
|
|
7
|
+
border: 1px solid colors.$element-border-color;
|
|
8
|
+
|
|
9
|
+
@each $border in $borders {
|
|
10
|
+
&-#{$border} {
|
|
11
|
+
border-#{$border}: 1px solid colors.$element-border-color;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// positions
|
|
17
|
+
.position {
|
|
18
|
+
@each $position in $positions {
|
|
19
|
+
&-#{$position} {
|
|
20
|
+
position: $position;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.top-0 {
|
|
26
|
+
top: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bottom-0 {
|
|
30
|
+
bottom: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.left-0 {
|
|
34
|
+
left: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.right-0 {
|
|
38
|
+
right: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// width and height in percents
|
|
42
|
+
.w-25 {
|
|
43
|
+
width: 25%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.w-50 {
|
|
47
|
+
width: 50%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.w-75 {
|
|
51
|
+
width: 75%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.w-100 {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.h-25 {
|
|
59
|
+
height: 25%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.h-50 {
|
|
63
|
+
height: 50%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.h-75 {
|
|
67
|
+
height: 75%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.h-100 {
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// margin
|
|
2
|
+
.mb-1 {
|
|
3
|
+
margin-bottom: 0.25rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.mb-2 {
|
|
7
|
+
margin-bottom: 0.5rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mb-3 {
|
|
11
|
+
margin-bottom: 1rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mt-1 {
|
|
15
|
+
margin-top: 0.25rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mt-2 {
|
|
19
|
+
margin-top: 0.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mt-3 {
|
|
23
|
+
margin-top: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mr-1 {
|
|
27
|
+
margin-right: 0.25rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mr-2 {
|
|
31
|
+
margin-right: 0.5rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mr-3 {
|
|
35
|
+
margin-right: 1rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ml-1 {
|
|
39
|
+
margin-left: 0.25rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ml-2 {
|
|
43
|
+
margin-left: 0.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ml-3 {
|
|
47
|
+
margin-left: 1rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// padding
|
|
51
|
+
.pb-1 {
|
|
52
|
+
padding-bottom: 0.25rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pb-2 {
|
|
56
|
+
padding-bottom: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pb-3 {
|
|
60
|
+
padding-bottom: 1rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pt-1 {
|
|
64
|
+
padding-top: 0.25rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pt-2 {
|
|
68
|
+
padding-top: 0.5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pt-3 {
|
|
72
|
+
padding-top: 1rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pr-1 {
|
|
76
|
+
padding-right: 0.25rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pr-2 {
|
|
80
|
+
padding-right: 0.5rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pr-3 {
|
|
84
|
+
padding-right: 1rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.pl-1 {
|
|
88
|
+
padding-left: 0.25rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.pl-2 {
|
|
92
|
+
padding-left: 0.5rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.pl-3 {
|
|
96
|
+
padding-left: 1rem;
|
|
97
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
$text-aligns: center, left, right, end, justify, start;
|
|
2
|
+
|
|
3
|
+
.text {
|
|
4
|
+
@each $text-align in $text-aligns {
|
|
5
|
+
&-#{$text-align} {
|
|
6
|
+
text-align: $text-align;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bold {
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.italic {
|
|
16
|
+
font-style: italic;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.underline {
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.uppercase {
|
|
24
|
+
text-transform: uppercase;
|
|
25
|
+
}
|
package/scss/mixins/tooltip.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
@use "../variables/index" as variables;
|
|
2
3
|
|
|
3
4
|
:root {
|
|
@@ -21,3 +22,92 @@ $tooltip-background-color: var(--tooltip-background-color);
|
|
|
21
22
|
color: variables.$text-color;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
@mixin absolute-position($gap) {
|
|
27
|
+
&_position{
|
|
28
|
+
&_top, &_topLeft, &_topRight {
|
|
29
|
+
transform: translateY(-$gap);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&_bottom, &_bottomLeft, &_bottomRight {
|
|
33
|
+
transform: translateY($gap);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&_left, &_leftTop, &_leftBottom {
|
|
37
|
+
transform: translateX(-$gap);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&_right, &_rightTop, &_rightBottom {
|
|
41
|
+
transform: translateX($gap);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin arrow-position(
|
|
47
|
+
$arrow-border,
|
|
48
|
+
$arrow-offset-horizontal,
|
|
49
|
+
$arrow-offset-vertical-top,
|
|
50
|
+
$arrow-offset-vertical-bottom
|
|
51
|
+
) {
|
|
52
|
+
&_position{
|
|
53
|
+
&_top, &_topLeft, &_topRight {
|
|
54
|
+
bottom: -$arrow-border;
|
|
55
|
+
left: 50%;
|
|
56
|
+
border-top-color: transparent;
|
|
57
|
+
border-left-color: transparent;
|
|
58
|
+
transform: translateX(-50%) rotate(45deg);
|
|
59
|
+
}
|
|
60
|
+
&_topLeft{
|
|
61
|
+
left: $arrow-offset-horizontal;
|
|
62
|
+
}
|
|
63
|
+
&_topRight{
|
|
64
|
+
left: unset;
|
|
65
|
+
right: $arrow-offset-horizontal;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&_bottom, &_bottomLeft, &_bottomRight {
|
|
69
|
+
top: -$arrow-border;
|
|
70
|
+
left: 50%;
|
|
71
|
+
border-right-color: transparent;
|
|
72
|
+
border-bottom-color: transparent;
|
|
73
|
+
transform: translateX(-50%) rotate(45deg);
|
|
74
|
+
}
|
|
75
|
+
&_bottomLeft{
|
|
76
|
+
left: $arrow-offset-horizontal;
|
|
77
|
+
}
|
|
78
|
+
&_bottomRight{
|
|
79
|
+
left: unset;
|
|
80
|
+
right: $arrow-offset-horizontal;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&_left, &_leftTop, &_leftBottom {
|
|
84
|
+
right: -$arrow-border;
|
|
85
|
+
top: 50%;
|
|
86
|
+
border-left-color: transparent;
|
|
87
|
+
border-bottom-color: transparent;
|
|
88
|
+
transform: translateY(-50%) rotate(45deg);
|
|
89
|
+
}
|
|
90
|
+
&_leftTop{
|
|
91
|
+
top: $arrow-offset-vertical-top;
|
|
92
|
+
}
|
|
93
|
+
&_leftBottom{
|
|
94
|
+
top: unset;
|
|
95
|
+
bottom: $arrow-offset-vertical-bottom;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&_right, &_rightTop, &_rightBottom {
|
|
99
|
+
left: -$arrow-border;
|
|
100
|
+
top: 50%;
|
|
101
|
+
border-top-color: transparent;
|
|
102
|
+
border-right-color: transparent;
|
|
103
|
+
transform: translateY(-50%) rotate(45deg);
|
|
104
|
+
}
|
|
105
|
+
&_rightTop{
|
|
106
|
+
top: $arrow-offset-vertical-top;
|
|
107
|
+
}
|
|
108
|
+
&_rightBottom{
|
|
109
|
+
top: unset;
|
|
110
|
+
bottom: $arrow-offset-vertical-bottom;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
$justifyValues: center, end, start, stretch, flex-start, flex-end, left, right, space-between, space-around, space-evenly;
|
|
2
|
+
$alignValues: center, end, start, stretch, flex-start, flex-end;
|
|
3
|
+
$directionValues: column-reverse column row-reverse row;
|
|
4
|
+
$colValues: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
|
|
5
|
+
$colMaxValue: 12;
|