@steroidsjs/bootstrap 2.1.21 → 3.0.0-beta.10
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/Alert/AlertView.d.ts +0 -1
- package/content/Alert/AlertView.js +13 -17
- package/content/Alert/AlertView.scss +43 -82
- package/content/Avatar/AvatarGroupView.d.ts +0 -1
- package/content/Avatar/AvatarGroupView.js +6 -2
- package/content/Avatar/AvatarView.d.ts +5 -2
- package/content/Avatar/AvatarView.js +9 -5
- package/content/Avatar/AvatarView.scss +153 -85
- package/content/Badge/BadgeView.d.ts +3 -0
- package/content/Badge/BadgeView.js +23 -0
- package/content/Calendar/CalendarView.d.ts +0 -1
- package/content/Calendar/CalendarView.js +8 -4
- package/content/Calendar/CaptionElement.d.ts +0 -1
- package/content/Calendar/CaptionElement.js +10 -6
- package/content/Card/CardView.d.ts +0 -1
- package/content/Card/CardView.js +4 -3
- package/content/Collapse/CollapseItemView.d.ts +0 -1
- package/content/Collapse/CollapseItemView.js +8 -3
- package/content/Collapse/CollapseView.d.ts +0 -1
- package/content/Collapse/CollapseView.js +6 -2
- package/content/Detail/DetailView.d.ts +0 -1
- package/content/Detail/DetailView.js +1 -1
- package/content/DropDown/DropDownView.d.ts +0 -1
- package/content/DropDown/DropDownView.js +11 -7
- package/{icon → content}/Icon/IconView.d.ts +1 -2
- package/{icon → content}/Icon/IconView.js +6 -2
- package/{icon → content}/Icon/IconView.scss +0 -0
- package/crud/Crud/CrudView.d.ts +0 -1
- package/crud/Crud/CrudView.js +6 -2
- package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +0 -1
- package/form/AutoCompleteField/AutoCompleteFieldView.js +6 -2
- package/form/Button/ButtonView.d.ts +0 -1
- package/form/Button/ButtonView.js +11 -7
- package/form/CheckboxField/CheckboxFieldView.d.ts +0 -1
- package/form/CheckboxField/CheckboxFieldView.js +7 -3
- package/form/CheckboxListField/CheckboxListFieldView.d.ts +0 -1
- package/form/CheckboxListField/CheckboxListFieldView.js +9 -5
- package/form/DateField/DateFieldView.d.ts +0 -1
- package/form/DateField/DateFieldView.js +8 -4
- package/form/DateRangeField/DateRangeFieldView.d.ts +0 -1
- package/form/DateRangeField/DateRangeFieldView.js +9 -5
- package/form/DateTimeField/DateTimeFieldView.d.ts +0 -1
- package/form/DateTimeField/DateTimeFieldView.js +8 -4
- package/form/DateTimeRangeField/DateTimeRangeFieldView.d.ts +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +9 -5
- package/form/DropDownField/DropDownFieldView.d.ts +0 -1
- package/form/DropDownField/DropDownFieldView.js +30 -21
- package/form/FieldLayout/FieldLayoutView.d.ts +0 -1
- package/form/FieldLayout/FieldLayoutView.js +8 -4
- package/form/FieldList/FieldListItemView.js +6 -2
- package/form/FieldList/FieldListView.d.ts +0 -1
- package/form/FieldList/FieldListView.js +6 -2
- package/form/FieldSet/FieldSetView.d.ts +0 -1
- package/form/FieldSet/FieldSetView.js +5 -1
- package/form/FileField/FileFieldItemView.d.ts +0 -1
- package/form/FileField/FileFieldItemView.js +7 -3
- package/form/FileField/FileFieldView.d.ts +0 -1
- package/form/FileField/FileFieldView.js +7 -3
- package/form/Form/FormView.js +9 -5
- package/form/HtmlField/HtmlFieldView.d.ts +0 -1
- package/form/HtmlField/HtmlFieldView.js +6 -2
- package/form/ImageField/ImageFieldModalView.d.ts +0 -1
- package/form/ImageField/ImageFieldModalView.js +7 -3
- package/form/ImageField/ImageFieldView.d.ts +1 -2
- package/form/ImageField/ImageFieldView.js +15 -11
- package/form/InputField/InputFieldView.d.ts +0 -1
- package/form/InputField/InputFieldView.js +6 -2
- package/form/NumberField/NumberFieldView.d.ts +0 -1
- package/form/NumberField/NumberFieldView.js +9 -5
- package/form/PasswordField/PasswordFieldView.d.ts +0 -1
- package/form/PasswordField/PasswordFieldView.js +7 -3
- package/form/RadioListField/RadioListFieldView.d.ts +0 -1
- package/form/RadioListField/RadioListFieldView.js +9 -5
- package/form/RateField/RateFieldView.d.ts +0 -1
- package/form/RateField/RateFieldView.js +7 -3
- package/form/ReCaptchaField/ReCaptchaFieldView.d.ts +0 -1
- package/form/ReCaptchaField/ReCaptchaFieldView.js +6 -2
- package/form/SliderField/SliderFieldView.d.ts +0 -1
- package/form/SliderField/SliderFieldView.js +8 -4
- package/form/SwitcherField/SwitcherFieldView.d.ts +0 -1
- package/form/SwitcherField/SwitcherFieldView.js +7 -3
- package/form/TextField/TextFieldView.d.ts +0 -1
- package/form/TextField/TextFieldView.js +6 -2
- package/form/TimeField/TimeFieldView.d.ts +0 -1
- package/form/TimeField/TimeFieldView.js +8 -4
- package/form/TimeField/TimePanelView.d.ts +0 -1
- package/form/TimeField/TimePanelView.js +9 -5
- package/format/DefaultFormatter/DefaultFormatterView.d.ts +2 -1
- package/{icon → icons}/fontawesome.d.ts +0 -0
- package/{icon → icons}/fontawesome.js +15 -7
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/index.scss +1 -1
- package/layout/Header/HeaderView.d.ts +0 -1
- package/layout/Header/HeaderView.js +7 -3
- package/layout/Loader/LoaderView.d.ts +0 -1
- package/layout/Loader/LoaderView.js +6 -2
- package/layout/Notifications/NotificationsItemView.d.ts +0 -1
- package/layout/Notifications/NotificationsItemView.js +8 -4
- package/layout/Notifications/NotificationsView.d.ts +0 -1
- package/layout/Notifications/NotificationsView.js +6 -2
- package/layout/ProgressBar/CircleProgressBarView.d.ts +0 -1
- package/layout/ProgressBar/CircleProgressBarView.js +11 -4
- package/layout/ProgressBar/LineProgressBarView.d.ts +0 -1
- package/layout/ProgressBar/LineProgressBarView.js +7 -3
- package/layout/Skeleton/SkeletonView.d.ts +0 -1
- package/layout/Skeleton/SkeletonView.js +6 -2
- package/layout/Tooltip/TooltipView.d.ts +0 -1
- package/layout/Tooltip/TooltipView.js +9 -5
- package/list/CheckboxColumn/CheckboxColumnView.d.ts +0 -1
- package/list/CheckboxColumn/CheckboxColumnView.js +6 -2
- package/list/ControlsColumnView/ControlsColumnView.d.ts +0 -1
- package/list/ControlsColumnView/ControlsColumnView.js +6 -2
- package/list/Empty/EmptyView.d.ts +0 -1
- package/list/Empty/EmptyView.js +6 -2
- package/list/Grid/GridView.js +15 -11
- package/list/List/ListItemView.d.ts +0 -1
- package/list/List/ListItemView.js +6 -2
- package/list/List/ListView.js +6 -2
- package/list/Pagination/PaginationButtonView.d.ts +0 -1
- package/list/Pagination/PaginationButtonView.js +7 -3
- package/list/Pagination/PaginationMoreView.d.ts +0 -1
- package/list/Pagination/PaginationMoreView.js +6 -2
- package/list/PaginationSize/PaginationSizeView.d.ts +0 -1
- package/list/PaginationSize/PaginationSizeView.js +7 -3
- package/list/Steps/StepItemView.d.ts +1 -2
- package/list/Steps/StepItemView.js +8 -4
- package/list/Steps/StepsView.d.ts +0 -1
- package/list/Steps/StepsView.js +6 -2
- package/modal/Modal/ModalView.d.ts +0 -1
- package/modal/Modal/ModalView.js +6 -2
- package/modal/TwoFactorModal/TwoFactorModalView.d.ts +0 -1
- package/modal/TwoFactorModal/TwoFactorModalView.js +1 -1
- package/nav/Breadcrubms/BreadcrumbsView.d.ts +0 -1
- package/nav/Breadcrubms/BreadcrumbsView.js +6 -2
- package/nav/Controls/ControlsView.d.ts +0 -1
- package/nav/Controls/ControlsView.js +6 -2
- package/nav/Nav/NavBarView.d.ts +0 -1
- package/nav/Nav/NavBarView.js +6 -2
- package/nav/Nav/NavButtonView.d.ts +0 -1
- package/nav/Nav/NavButtonView.js +6 -2
- package/nav/Nav/NavIconView.d.ts +0 -1
- package/nav/Nav/NavIconView.js +6 -2
- package/nav/Nav/NavLinkView.d.ts +0 -1
- package/nav/Nav/NavLinkView.js +6 -2
- package/nav/Nav/NavListView.d.ts +0 -1
- package/nav/Nav/NavListView.js +6 -2
- package/nav/Nav/NavTabsView.d.ts +0 -1
- package/nav/Nav/NavTabsView.js +6 -2
- package/nav/Tree/TreeView.d.ts +0 -1
- package/nav/Tree/TreeView.js +6 -2
- package/package.json +56 -48
- package/scss/mixins/button.scss +1 -1
- package/scss/mixins/index.scss +1 -1
- package/scss/variables/common/colors.scss +153 -0
- package/scss/variables/common/old-variables.scss +24 -0
- package/scss/variables/common/radiuses.scss +5 -0
- package/scss/variables/common/spacing.scss +12 -0
- package/scss/variables/common/typography.scss +39 -0
- package/scss/variables/components/calendar.scss +1 -1
- package/scss/variables/components/card.scss +1 -1
- package/scss/variables/components/icon.scss +1 -1
- package/scss/variables/components/input.scss +56 -1
- package/scss/variables/components/ratefield.scss +1 -1
- package/scss/variables/index.scss +6 -3
- package/icon/Icon/index.d.ts +0 -1
- package/icon/Icon/index.js +0 -12
- package/scss/variables/colors.scss +0 -74
- package/scss/variables/components/alert.scss +0 -9
- package/scss/variables/components/avatar.scss +0 -17
|
@@ -5,29 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
7
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
8
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
8
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
9
9
|
function Alert(props) {
|
|
10
10
|
var _a, _b;
|
|
11
|
-
var bem = hooks_1.useBem('AlertView');
|
|
11
|
+
var bem = (0, hooks_1.useBem)('AlertView');
|
|
12
12
|
return (props.isExist && (react_1["default"].createElement("div", { className: bem(bem.block((_a = {},
|
|
13
13
|
_a[props.type] = !!props.type,
|
|
14
|
-
_a['has-description'] = !!props.description,
|
|
15
14
|
_a['close-animation'] = !props.isVisible,
|
|
16
15
|
_a)), props.className), style: props.style },
|
|
17
|
-
|
|
18
|
-
_b[props.type] = !!props.type,
|
|
19
|
-
_b)) })),
|
|
20
|
-
typeof props.showIcon === 'string' && (react_1["default"].createElement(Icon_1["default"], { name: props.showIcon, className: bem.element('icon') })),
|
|
21
|
-
react_1["default"].createElement("div", { className: bem.element('content-wrapper') },
|
|
16
|
+
react_1["default"].createElement("div", { className: bem.element('wrapper') },
|
|
22
17
|
react_1["default"].createElement("div", { className: bem.element('content') },
|
|
23
|
-
props.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
props.showIcon && (react_1["default"].createElement(Icon_1["default"], { name: props.type, className: bem.element('icon', (_b = {},
|
|
19
|
+
_b[props.type] = !!props.type,
|
|
20
|
+
_b)) })),
|
|
21
|
+
react_1["default"].createElement("div", { className: bem.element('text-block') },
|
|
22
|
+
props.message && (react_1["default"].createElement("div", { className: bem.element('message') }, props.message)),
|
|
23
|
+
props.description && (react_1["default"].createElement("div", { className: bem.element('description') }, props.description))),
|
|
24
|
+
react_1["default"].createElement("div", null, props.showClose && (react_1["default"].createElement(Icon_1["default"], { className: bem.element('icon-close', {
|
|
25
|
+
large: !!props.description
|
|
26
|
+
}), name: 'close', onClick: props.onClose })))),
|
|
27
|
+
props.children || null))));
|
|
32
28
|
}
|
|
33
29
|
exports["default"] = Alert;
|
|
@@ -2,119 +2,80 @@
|
|
|
2
2
|
$root: &;
|
|
3
3
|
|
|
4
4
|
position: relative;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding: $alert-padding-y $alert-padding-x;
|
|
10
|
-
|
|
11
|
-
border-radius: $alert-border-radius;
|
|
12
|
-
border: 1px solid transparent;
|
|
5
|
+
padding: $spacing-16;
|
|
6
|
+
border-radius: $radius-large;
|
|
7
|
+
font-family: $font-family-nunito;
|
|
13
8
|
|
|
14
9
|
&_close-animation {
|
|
15
|
-
animation: hide_slide .4s ease-in;
|
|
10
|
+
animation: hide_slide 0.4s ease-in;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
@keyframes hide_slide {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&_has-description {
|
|
34
|
-
align-items: flex-start;
|
|
35
|
-
|
|
36
|
-
#{$root}__message {
|
|
37
|
-
font-size: $alert-description-font-size;
|
|
14
|
+
0% {
|
|
15
|
+
transform: translateX(-10px);
|
|
16
|
+
}
|
|
17
|
+
40% {
|
|
18
|
+
transform: translateX(0%);
|
|
19
|
+
}
|
|
20
|
+
80% {
|
|
21
|
+
transform: translateX(-10%);
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
transform: translateX(100%);
|
|
38
25
|
}
|
|
39
26
|
}
|
|
40
27
|
|
|
41
|
-
&
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
&__icon.IconView {
|
|
29
|
+
width: 24px;
|
|
30
|
+
margin-right: 12px;
|
|
31
|
+
}
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
33
|
+
&__icon-close.IconView {
|
|
34
|
+
width: 10px;
|
|
48
35
|
}
|
|
49
|
-
&_info {
|
|
50
|
-
background: $back-info;
|
|
51
|
-
border-color: $info;
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
&__text-block {
|
|
38
|
+
display: grid;
|
|
39
|
+
row-gap: 12px;
|
|
40
|
+
max-width: 444px;
|
|
41
|
+
margin-right: auto;
|
|
56
42
|
}
|
|
57
|
-
&_warning {
|
|
58
|
-
background: $back-warning;
|
|
59
|
-
border-color: $warning;
|
|
60
43
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
44
|
+
&_success {
|
|
45
|
+
background: $success-light;
|
|
64
46
|
}
|
|
65
|
-
&_error {
|
|
66
|
-
background: $back-error;
|
|
67
|
-
border-color: $danger;
|
|
68
47
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
48
|
+
&_info {
|
|
49
|
+
background: $info-light;
|
|
72
50
|
}
|
|
73
51
|
|
|
74
|
-
&
|
|
75
|
-
|
|
76
|
-
height: $alert-icon-size;
|
|
77
|
-
margin-right: 12px;
|
|
52
|
+
&_warning {
|
|
53
|
+
background: $warning-light;
|
|
78
54
|
}
|
|
79
55
|
|
|
80
|
-
&
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
56
|
+
&_error {
|
|
57
|
+
background: $danger-light;
|
|
58
|
+
}
|
|
59
|
+
&_default {
|
|
60
|
+
background: $light-gray;
|
|
84
61
|
}
|
|
85
62
|
|
|
86
63
|
&__message {
|
|
87
|
-
|
|
88
|
-
font-size: $alert-message-font-size;
|
|
64
|
+
font-size: $font-size-lg;
|
|
89
65
|
}
|
|
90
66
|
|
|
91
|
-
&
|
|
67
|
+
&__wrapper {
|
|
92
68
|
display: flex;
|
|
93
69
|
justify-content: space-between;
|
|
94
70
|
}
|
|
95
71
|
|
|
96
72
|
&__content {
|
|
97
|
-
|
|
98
|
-
|
|
73
|
+
width: 100%;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
99
76
|
}
|
|
100
77
|
|
|
101
78
|
&__description {
|
|
102
|
-
font-size: $
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&__icon-close.IconView {
|
|
106
|
-
position: absolute;
|
|
107
|
-
right: 20px;
|
|
108
|
-
|
|
109
|
-
svg {
|
|
110
|
-
width: $alert-close-icon-size;
|
|
111
|
-
height: $alert-close-icon-size;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
fill: rgba($heading, .6);
|
|
115
|
-
transition: fill .1s ease-in;
|
|
116
|
-
&:hover {
|
|
117
|
-
fill: $heading;
|
|
118
|
-
}
|
|
79
|
+
font-size: $font-size-base;
|
|
119
80
|
}
|
|
120
81
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -22,7 +26,7 @@ exports.__esModule = true;
|
|
|
22
26
|
var React = __importStar(require("react"));
|
|
23
27
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
24
28
|
function Avatar(props) {
|
|
25
|
-
var bem = hooks_1.useBem('AvatarGroupView');
|
|
29
|
+
var bem = (0, hooks_1.useBem)('AvatarGroupView');
|
|
26
30
|
return (React.createElement("div", { className: bem.block() }, props.children));
|
|
27
31
|
}
|
|
28
32
|
exports["default"] = Avatar;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IAvatarViewProps } from '@steroidsjs/core/ui/content/Avatar/Avatar';
|
|
3
|
-
|
|
2
|
+
interface IAvatarProps extends IAvatarViewProps {
|
|
3
|
+
formattedTitle: any;
|
|
4
|
+
}
|
|
5
|
+
export default function Avatar(props: IAvatarProps): JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -17,12 +17,12 @@ exports.__esModule = true;
|
|
|
17
17
|
var react_1 = __importDefault(require("react"));
|
|
18
18
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
19
19
|
function Avatar(props) {
|
|
20
|
-
var bem = hooks_1.useBem('AvatarView');
|
|
20
|
+
var bem = (0, hooks_1.useBem)('AvatarView');
|
|
21
21
|
var customSize = typeof props.size === 'number'
|
|
22
22
|
? {
|
|
23
23
|
width: props.size,
|
|
24
24
|
height: props.size,
|
|
25
|
-
lineHeight: props.size
|
|
25
|
+
lineHeight: "".concat(props.size, "px"),
|
|
26
26
|
fontSize: props.size / 2
|
|
27
27
|
}
|
|
28
28
|
: {};
|
|
@@ -31,10 +31,14 @@ function Avatar(props) {
|
|
|
31
31
|
size: props.size,
|
|
32
32
|
shape: props.shape,
|
|
33
33
|
'has-image': !!props.src && !props.isError,
|
|
34
|
-
'has-status': props.status
|
|
34
|
+
'has-status': props.status,
|
|
35
|
+
'has-border-avatar': props.hasBorder && !!props.src,
|
|
36
|
+
'has-border-without-avatar': props.hasBorder && !props.src,
|
|
37
|
+
'has-custom-status': props.status && !!customSize.width
|
|
35
38
|
}), props.className) },
|
|
36
39
|
react_1["default"].createElement("span", { className: bem.element('body'), style: __assign(__assign({}, props.style), customSize) },
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
react_1["default"].createElement(react_1["default"].Fragment, null,
|
|
41
|
+
(props.src && renderImage()) || (react_1["default"].createElement("span", null, props.formattedTitle)),
|
|
42
|
+
props.children))));
|
|
39
43
|
}
|
|
40
44
|
exports["default"] = Avatar;
|
|
@@ -1,103 +1,171 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--border-width-small: 1px;
|
|
3
|
+
--border-width-medium: 1.5px;
|
|
4
|
+
--border-width-large: 2px;
|
|
5
|
+
--border-width: var(--border-width-large);
|
|
6
|
+
|
|
7
|
+
--status-border-width-small: 2px;
|
|
8
|
+
--status-border-width-medium: 3px;
|
|
9
|
+
--status-border-width-large: 4px;
|
|
10
|
+
--status-border-width: var(--status-border-width-large);
|
|
11
|
+
|
|
12
|
+
--status-size-small: 8px;
|
|
13
|
+
--status-size-medium: 10px;
|
|
14
|
+
--status-size-large: 12px;
|
|
15
|
+
--status-size-x-large: 14px;
|
|
16
|
+
--status-size: var(--status-size-x-large);
|
|
17
|
+
}
|
|
1
18
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
@mixin border($background) {
|
|
20
|
+
&::before {
|
|
21
|
+
content: "";
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
top: 50%;
|
|
25
|
+
left: 50%;
|
|
26
|
+
transform: translate(-50%, -50%);
|
|
27
|
+
padding: 55%;
|
|
28
|
+
border-radius: 100%;
|
|
29
|
+
border: var(--border-width) solid transparent;
|
|
30
|
+
background: $background border-box;
|
|
31
|
+
-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
|
32
|
+
-webkit-mask-composite: xor;
|
|
33
|
+
mask-composite: exclude;
|
|
16
34
|
}
|
|
35
|
+
}
|
|
17
36
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
height: $avatar-large-size;
|
|
21
|
-
width: $avatar-large-size;
|
|
22
|
-
line-height: $avatar-large-size;
|
|
23
|
-
font-size: $avatar-large-font-size;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
37
|
+
.AvatarView {
|
|
38
|
+
$root: &;
|
|
26
39
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
width: $avatar-middle-size;
|
|
31
|
-
line-height: $avatar-middle-size;
|
|
32
|
-
font-size: $avatar-middle-font-size;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
40
|
+
display: inline-block;
|
|
41
|
+
position: relative;
|
|
42
|
+
aspect-ratio: 1;
|
|
35
43
|
|
|
36
|
-
&
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
width: $avatar-small-size;
|
|
40
|
-
line-height: $avatar-small-size;
|
|
41
|
-
font-size: $avatar-small-font-size;
|
|
42
|
-
}
|
|
44
|
+
&_has-custom-status {
|
|
45
|
+
--status-size: 25%;
|
|
46
|
+
--status-border-width: 2px;
|
|
43
47
|
}
|
|
44
|
-
}
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
&_size {
|
|
50
|
+
&_x-large {
|
|
51
|
+
#{$root}__body {
|
|
52
|
+
height: 64px;
|
|
53
|
+
width: 64px;
|
|
54
|
+
line-height: 64px;
|
|
55
|
+
font-size: 20px;
|
|
56
|
+
}
|
|
57
|
+
--border-width: var(--border-width-large);
|
|
58
|
+
--status-border-width: var(--status-border-width-large);
|
|
59
|
+
--status-size: var(--status-size-x-large);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&_large {
|
|
63
|
+
#{$root}__body {
|
|
64
|
+
height: 46px;
|
|
65
|
+
width: 46px;
|
|
66
|
+
line-height: 46px;
|
|
67
|
+
font-size: $font-size-base;
|
|
68
|
+
}
|
|
69
|
+
--border-width: var(--border-width-large);
|
|
70
|
+
--status-border-width: var(--status-border-width-medium);
|
|
71
|
+
--status-size: var(--status-size-large);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&_middle {
|
|
75
|
+
#{$root}__body {
|
|
76
|
+
height: 36px;
|
|
77
|
+
width: 36px;
|
|
78
|
+
line-height: 36px;
|
|
79
|
+
font-size: $font-size-sm;
|
|
80
|
+
}
|
|
81
|
+
--border-width: var(--border-width-medium);
|
|
82
|
+
--status-border-width: var(--status-border-width-small);
|
|
83
|
+
--status-size: var(--status-size-medium);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&_small {
|
|
87
|
+
#{$root}__body {
|
|
88
|
+
height: 28px;
|
|
89
|
+
width: 28px;
|
|
90
|
+
line-height: 28px;
|
|
91
|
+
font-size: $font-size-xs;
|
|
92
|
+
}
|
|
93
|
+
--border-width: var(--border-width-small);
|
|
94
|
+
--status-border-width: var(--status-border-width-small);
|
|
95
|
+
--status-size: var(--status-size-small);
|
|
96
|
+
}
|
|
51
97
|
}
|
|
52
98
|
|
|
53
|
-
&
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
99
|
+
&_shape {
|
|
100
|
+
&_square {
|
|
101
|
+
#{$root}__body {
|
|
102
|
+
border-radius: unset;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&_circle {
|
|
107
|
+
#{$root}__body {
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
57
111
|
}
|
|
58
|
-
}
|
|
59
112
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&_has-status {
|
|
67
|
-
::after {
|
|
68
|
-
content: '';
|
|
69
|
-
position: absolute;
|
|
70
|
-
right: 0;
|
|
71
|
-
bottom: 0;
|
|
72
|
-
width: 25%;
|
|
73
|
-
height: 25%;
|
|
74
|
-
z-index: 10;
|
|
75
|
-
|
|
76
|
-
color: $avatar-status-color;
|
|
77
|
-
font-size: 6px;
|
|
78
|
-
|
|
79
|
-
border-radius: 50%;
|
|
80
|
-
background-color: $avatar-status-color;
|
|
81
|
-
border: $avatar-status-border;
|
|
113
|
+
&_has-image {
|
|
114
|
+
#{$root}__body {
|
|
115
|
+
background-color: unset;
|
|
116
|
+
}
|
|
82
117
|
}
|
|
83
|
-
}
|
|
84
118
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
119
|
+
&_has-status {
|
|
120
|
+
&::after {
|
|
121
|
+
content: "";
|
|
122
|
+
position: absolute;
|
|
123
|
+
box-sizing: content-box;
|
|
124
|
+
right: -7%;
|
|
125
|
+
bottom: -7%;
|
|
126
|
+
width: var(--status-size);
|
|
127
|
+
height: var(--status-size);
|
|
128
|
+
z-index: 10;
|
|
129
|
+
|
|
130
|
+
color: $success;
|
|
88
131
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
132
|
+
border-radius: $radius-circle;
|
|
133
|
+
background-color: $success;
|
|
134
|
+
|
|
135
|
+
border: var(--status-border-width) solid $white;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
92
138
|
|
|
93
|
-
|
|
94
|
-
|
|
139
|
+
&_has-border-avatar {
|
|
140
|
+
@include border($gradient-purple);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&_has-border-without-avatar {
|
|
144
|
+
@include border($gradient-red);
|
|
145
|
+
}
|
|
95
146
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
147
|
+
&__body {
|
|
148
|
+
display: inline-block;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
|
|
151
|
+
text-align: center;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
vertical-align: middle;
|
|
154
|
+
|
|
155
|
+
color: $white;
|
|
156
|
+
background: $gradient-purple border-box;
|
|
157
|
+
border: 1px solid #fff;
|
|
158
|
+
|
|
159
|
+
span {
|
|
160
|
+
display: block;
|
|
161
|
+
transform: translateY(-2px);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
img {
|
|
165
|
+
display: block;
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 100%;
|
|
168
|
+
object-fit: cover;
|
|
169
|
+
}
|
|
101
170
|
}
|
|
102
|
-
}
|
|
103
171
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var useBem_1 = __importDefault(require("@steroidsjs/core/hooks/useBem"));
|
|
8
|
+
require("./BadgeView.scss");
|
|
9
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
10
|
+
function BadgeView(props) {
|
|
11
|
+
var _a;
|
|
12
|
+
var bem = (0, useBem_1["default"])('BadgeView');
|
|
13
|
+
return (props.isExist && (react_1["default"].createElement("div", { className: bem(bem.block((_a = {},
|
|
14
|
+
_a[props.type] = !!props.type,
|
|
15
|
+
_a)), props.className), style: props.style },
|
|
16
|
+
react_1["default"].createElement("div", { className: bem.element('content-wrapper') },
|
|
17
|
+
react_1["default"].createElement("span", { className: bem.element('content') }, props.message),
|
|
18
|
+
props.showClose && (react_1["default"].createElement(Icon_1["default"], { name: 'close', onClick: props.onClose })),
|
|
19
|
+
props.counter
|
|
20
|
+
&& (react_1["default"].createElement("div", { className: bem.element('chip') }, typeof props.counter === 'object'
|
|
21
|
+
&& props.counter.content))))));
|
|
22
|
+
}
|
|
23
|
+
exports["default"] = BadgeView;
|
|
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
14
|
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
16
20
|
}) : (function(o, m, k, k2) {
|
|
17
21
|
if (k2 === undefined) k2 = k;
|
|
18
22
|
o[k2] = m[k];
|
|
@@ -40,10 +44,10 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
40
44
|
var react_day_picker_1 = __importStar(require("react-day-picker"));
|
|
41
45
|
var CaptionElement_1 = __importDefault(require("./CaptionElement"));
|
|
42
46
|
function CalendarView(props) {
|
|
43
|
-
var bem = hooks_1.useBem('CalendarView');
|
|
47
|
+
var bem = (0, hooks_1.useBem)('CalendarView');
|
|
44
48
|
var month = props.month, toYear = props.toYear, fromYear = props.fromYear, showFooter = props.showFooter, onDaySelect = props.onDaySelect, selectedDates = props.selectedDates, onMonthSelect = props.onMonthSelect, numberOfMonths = props.numberOfMonths, toggleCaptionPanel = props.toggleCaptionPanel, isCaptionPanelVisible = props.isCaptionPanelVisible;
|
|
45
49
|
var isRange = !!selectedDates[1];
|
|
46
|
-
var _a = react_1.useMemo(function () {
|
|
50
|
+
var _a = (0, react_1.useMemo)(function () {
|
|
47
51
|
var from = selectedDates[0];
|
|
48
52
|
var to = selectedDates[1];
|
|
49
53
|
var inRange = function (day) { return react_day_picker_1.DateUtils.isDayAfter(day, from) && react_day_picker_1.DateUtils.isDayBefore(day, to); };
|
|
@@ -61,7 +65,7 @@ function CalendarView(props) {
|
|
|
61
65
|
: undefined
|
|
62
66
|
};
|
|
63
67
|
}, [isRange, selectedDates]), selectedDays = _a.selectedDays, modifiers = _a.modifiers;
|
|
64
|
-
return (React.createElement(react_day_picker_1["default"], __assign({}, props, { className: bem(bem.block({ ranged: isRange }), props.className), captionElement: react_1.useCallback(function (_a) {
|
|
68
|
+
return (React.createElement(react_day_picker_1["default"], __assign({}, props, { className: bem(bem.block({ ranged: isRange }), props.className), captionElement: (0, react_1.useCallback)(function (_a) {
|
|
65
69
|
var classNames = _a.classNames, date = _a.date, localeUtils = _a.localeUtils, locale = _a.locale;
|
|
66
70
|
return (React.createElement(CaptionElement_1["default"], { date: date, locale: locale, toYear: toYear, fromYear: fromYear, classNames: classNames, onChange: onMonthSelect, localeUtils: localeUtils, showCalendarFooter: showFooter, toggleCaptionPanel: toggleCaptionPanel, isCaptionPanelVisible: isCaptionPanelVisible }));
|
|
67
71
|
}, [fromYear, isCaptionPanelVisible, onMonthSelect, showFooter, toYear, toggleCaptionPanel]), renderDay: function (day) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CaptionElementProps } from 'react-day-picker/types/Props';
|
|
3
2
|
import { ICalendarViewProps } from '@steroidsjs/core/ui/content/Calendar/Calendar';
|
|
4
3
|
interface ICaptionElementProps extends CaptionElementProps, Pick<ICalendarViewProps, 'fromYear' | 'toYear' | 'isCaptionPanelVisible' | 'toggleCaptionPanel'> {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -25,10 +29,10 @@ exports.__esModule = true;
|
|
|
25
29
|
var React = __importStar(require("react"));
|
|
26
30
|
var react_1 = require("react");
|
|
27
31
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
28
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
32
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
29
33
|
var upperFirst_1 = __importDefault(require("lodash-es/upperFirst"));
|
|
30
34
|
function CaptionElement(props) {
|
|
31
|
-
var bem = hooks_1.useBem('CaptionElement');
|
|
35
|
+
var bem = (0, hooks_1.useBem)('CaptionElement');
|
|
32
36
|
var localeUtils = props.localeUtils, locale = props.locale, fromYear = props.fromYear, toYear = props.toYear, date = props.date, isCaptionPanelVisible = props.isCaptionPanelVisible, toggleCaptionPanel = props.toggleCaptionPanel;
|
|
33
37
|
var currentMonth = date.getMonth();
|
|
34
38
|
var currentYear = date.getFullYear();
|
|
@@ -42,11 +46,11 @@ function CaptionElement(props) {
|
|
|
42
46
|
props.onChange(new Date(currentYear, newMonth));
|
|
43
47
|
}
|
|
44
48
|
};
|
|
45
|
-
var months = react_1.useMemo(function () { return (localeUtils.getMonths(locale).map(function (item, index) { return ({
|
|
49
|
+
var months = (0, react_1.useMemo)(function () { return (localeUtils.getMonths(locale).map(function (item, index) { return ({
|
|
46
50
|
id: index,
|
|
47
|
-
label: upperFirst_1["default"](item)
|
|
51
|
+
label: (0, upperFirst_1["default"])(item)
|
|
48
52
|
}); })); }, [localeUtils, locale]);
|
|
49
|
-
var years = react_1.useMemo(function () {
|
|
53
|
+
var years = (0, react_1.useMemo)(function () {
|
|
50
54
|
var result = [];
|
|
51
55
|
for (var i = fromYear.getFullYear(); i <= toYear.getFullYear(); i += 1) {
|
|
52
56
|
result.push(i);
|