@steroidsjs/bootstrap 3.0.0-beta.2 → 3.0.0-beta.20
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/Accordion/AccordionItemView.d.ts +2 -0
- package/content/Accordion/AccordionItemView.js +96 -0
- package/content/Accordion/AccordionItemView.scss +195 -0
- package/content/Accordion/AccordionView.d.ts +2 -0
- package/content/{Collapse/CollapseView.js → Accordion/AccordionView.js} +3 -3
- package/content/Accordion/AccordionView.scss +14 -0
- package/content/Alert/AlertView.d.ts +0 -1
- package/content/Alert/AlertView.js +12 -16
- package/content/Alert/AlertView.scss +46 -81
- package/content/Avatar/AvatarGroupView.d.ts +0 -1
- package/content/Avatar/AvatarView.d.ts +0 -1
- package/content/Avatar/AvatarView.js +4 -2
- package/content/Avatar/AvatarView.scss +139 -85
- package/content/Badge/BadgeView.d.ts +3 -0
- package/content/Badge/BadgeView.js +25 -0
- package/content/Badge/BadgeView.scss +107 -0
- package/content/Calendar/CalendarView.d.ts +0 -1
- package/content/Calendar/CaptionElement.d.ts +0 -1
- package/content/Calendar/CaptionElement.js +1 -1
- package/content/Card/CardView.d.ts +0 -1
- package/content/Detail/DetailView.d.ts +0 -1
- package/content/DropDown/DropDownView.d.ts +0 -1
- package/content/DropDown/DropDownView.js +6 -3
- package/content/DropDown/DropDownView.scss +196 -27
- package/{icon → content}/Icon/IconView.d.ts +1 -2
- package/crud/Crud/CrudView.d.ts +0 -1
- package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +0 -1
- package/form/Button/ButtonView.d.ts +0 -1
- package/form/Button/ButtonView.js +8 -9
- package/form/Button/ButtonView.scss +116 -78
- package/form/CheckboxField/CheckboxFieldView.d.ts +0 -1
- package/form/CheckboxField/CheckboxFieldView.js +3 -3
- package/form/CheckboxField/CheckboxFieldView.scss +121 -36
- package/form/CheckboxListField/CheckboxListFieldView.d.ts +0 -1
- package/form/DateField/DateFieldView.d.ts +0 -1
- package/form/DateField/DateFieldView.js +1 -1
- package/form/DateRangeField/DateRangeFieldView.d.ts +0 -1
- package/form/DateRangeField/DateRangeFieldView.js +1 -1
- package/form/DateTimeField/DateTimeFieldView.d.ts +0 -1
- package/form/DateTimeField/DateTimeFieldView.js +1 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.d.ts +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +1 -1
- package/form/DropDownField/DropDownFieldView.d.ts +0 -1
- package/form/DropDownField/DropDownFieldView.js +1 -1
- package/form/FieldLayout/FieldLayoutView.d.ts +0 -1
- package/form/FieldList/FieldListView.d.ts +0 -1
- package/form/FieldSet/FieldSetView.d.ts +0 -1
- package/form/FileField/FileFieldItemView.d.ts +0 -1
- package/form/FileField/FileFieldItemView.js +1 -1
- package/form/FileField/FileFieldView.d.ts +0 -1
- package/form/FileField/FileFieldView.js +1 -1
- package/form/HtmlField/HtmlFieldView.d.ts +0 -1
- package/form/ImageField/ImageFieldModalView.d.ts +0 -1
- package/form/ImageField/ImageFieldView.d.ts +1 -2
- package/form/ImageField/ImageFieldView.js +9 -9
- package/form/InputField/InputFieldView.d.ts +0 -1
- package/form/NumberField/NumberFieldView.d.ts +0 -1
- package/form/PasswordField/PasswordFieldView.d.ts +0 -1
- package/form/PasswordField/PasswordFieldView.js +1 -1
- package/form/RadioListField/RadioListFieldView.d.ts +0 -1
- package/form/RateField/RateFieldView.d.ts +0 -1
- package/form/RateField/RateFieldView.js +1 -1
- package/form/ReCaptchaField/ReCaptchaFieldView.d.ts +0 -1
- package/form/SliderField/SliderFieldView.d.ts +0 -1
- package/form/SwitcherField/SwitcherFieldView.d.ts +0 -1
- package/form/TextField/TextFieldView.d.ts +0 -1
- package/form/TimeField/TimeFieldView.d.ts +0 -1
- package/form/TimeField/TimeFieldView.js +1 -1
- package/form/TimeField/TimePanelView.d.ts +0 -1
- package/{icon/fontawesome.js → icons/index.js} +17 -6
- package/icons/svgs/accordion-chevron.svg +4 -0
- package/icons/svgs/badge-close.svg +3 -0
- package/icons/svgs/close.svg +4 -0
- package/icons/svgs/default.svg +11 -0
- package/icons/svgs/error.svg +12 -0
- package/icons/svgs/info.svg +12 -0
- package/icons/svgs/loader.svg +3 -0
- package/icons/svgs/success.svg +4 -0
- package/icons/svgs/warning.svg +12 -0
- package/index.d.ts +14 -5
- package/index.js +16 -7
- package/index.scss +5 -3
- package/layout/Header/HeaderView.d.ts +0 -1
- package/layout/Header/HeaderView.js +1 -1
- package/layout/Loader/LoaderView.d.ts +0 -1
- package/layout/Notifications/NotificationsItemView.d.ts +0 -1
- package/layout/Notifications/NotificationsView.d.ts +0 -1
- package/layout/ProgressBar/CircleProgressBarView.d.ts +0 -1
- package/layout/ProgressBar/CircleProgressBarView.js +5 -2
- package/layout/ProgressBar/LineProgressBarView.d.ts +0 -1
- package/layout/Skeleton/SkeletonView.d.ts +0 -1
- package/layout/Tooltip/TooltipView.d.ts +0 -1
- package/list/CheckboxColumn/CheckboxColumnView.d.ts +0 -1
- package/list/ControlsColumnView/ControlsColumnView.d.ts +0 -1
- package/list/Empty/EmptyView.d.ts +0 -1
- package/list/Grid/GridView.js +4 -4
- package/list/List/ListItemView.d.ts +0 -1
- package/list/Pagination/PaginationButtonView.d.ts +0 -1
- package/list/Pagination/PaginationMoreView.d.ts +0 -1
- package/list/PaginationSize/PaginationSizeView.d.ts +0 -1
- package/list/Steps/StepItemView.d.ts +1 -2
- package/list/Steps/StepItemView.js +3 -3
- package/list/Steps/StepsView.d.ts +0 -1
- package/list/Steps/StepsView.js +1 -1
- package/modal/Modal/ModalView.d.ts +0 -1
- package/modal/TwoFactorModal/TwoFactorModalView.d.ts +0 -1
- package/nav/Breadcrubms/BreadcrumbsView.d.ts +0 -1
- package/nav/Controls/ControlsView.d.ts +0 -1
- package/nav/Nav/NavBarView.d.ts +0 -1
- package/nav/Nav/NavButtonView.d.ts +0 -1
- package/nav/Nav/NavIconView.d.ts +0 -1
- package/nav/Nav/NavLinkView.d.ts +0 -1
- package/nav/Nav/NavListView.d.ts +0 -1
- package/nav/Nav/NavTabsView.d.ts +0 -1
- package/nav/Tree/TreeView.d.ts +0 -1
- package/package.json +56 -52
- package/scss/mixins/button.scss +50 -24
- package/scss/mixins/index.scss +2 -1
- package/scss/mixins/typography.scss +26 -0
- package/scss/variables/common/colors.scss +154 -0
- package/scss/variables/common/media.scss +2 -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 +107 -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/typography/Text/TextView.d.ts +3 -0
- package/typography/Text/TextView.js +46 -0
- package/typography/Text/TextView.scss +15 -0
- package/typography/Title/TitleView.d.ts +3 -0
- package/typography/Title/TitleView.js +50 -0
- package/typography/Title/TitleView.scss +15 -0
- package/content/Collapse/CollapseItemView.d.ts +0 -3
- package/content/Collapse/CollapseItemView.js +0 -64
- package/content/Collapse/CollapseItemView.scss +0 -88
- package/content/Collapse/CollapseView.d.ts +0 -3
- package/content/Collapse/CollapseView.scss +0 -15
- package/icon/Icon/IconView.scss +0 -25
- package/icon/Icon/index.d.ts +0 -1
- package/icon/Icon/index.js +0 -16
- package/scss/variables/colors.scss +0 -74
- package/scss/variables/components/alert.scss +0 -9
- package/scss/variables/components/avatar.scss +0 -17
- /package/{icon → content}/Icon/IconView.js +0 -0
- /package/{icon/fontawesome.d.ts → icons/index.d.ts} +0 -0
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
exports.__esModule = true;
|
|
29
29
|
var React = __importStar(require("react"));
|
|
30
30
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
31
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
31
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
32
32
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
33
33
|
function ButtonView(props) {
|
|
34
34
|
var _a;
|
|
@@ -38,16 +38,14 @@ function ButtonView(props) {
|
|
|
38
38
|
? props.label
|
|
39
39
|
: (props.hint || null);
|
|
40
40
|
return (React.createElement(React.Fragment, null,
|
|
41
|
-
props.isLoading && (React.createElement("
|
|
42
|
-
|
|
43
|
-
(props.showLabelOnLoading || !props.isLoading) && (React.createElement("span", { className: bem.element('label') },
|
|
41
|
+
props.isLoading && (React.createElement(Icon_1["default"], { className: bem.element('loader'), name: 'loader' })),
|
|
42
|
+
!props.isLoading && (React.createElement("span", { className: bem.element('label') },
|
|
44
43
|
props.icon && (React.createElement(Icon_1["default"], { name: props.icon, title: title, className: bem.element('icon', !props.label && 'without-label') })),
|
|
45
44
|
props.children))));
|
|
46
45
|
};
|
|
47
46
|
var renderBadge = function () {
|
|
48
|
-
if (!props.badge.enable)
|
|
47
|
+
if (!props.badge || !props.badge.enable)
|
|
49
48
|
return null;
|
|
50
|
-
}
|
|
51
49
|
return (React.createElement("span", { className: bem('badge', props.badge.color && "badge-".concat(props.badge.color), bem.element('badge'), props.badge.className) }, props.badge.value));
|
|
52
50
|
};
|
|
53
51
|
var className = bem(bem.block((_a = {
|
|
@@ -61,14 +59,15 @@ function ButtonView(props) {
|
|
|
61
59
|
_a.submitting = props.submitting,
|
|
62
60
|
_a.loading = props.isLoading,
|
|
63
61
|
_a.failed = props.isFailed,
|
|
64
|
-
_a.link = props.
|
|
65
|
-
_a
|
|
62
|
+
_a.link = props.link,
|
|
63
|
+
_a.block = props.block,
|
|
64
|
+
_a)), props.className);
|
|
66
65
|
if (props.tag === 'a') {
|
|
67
66
|
return (React.createElement("a", { className: className, href: props.url, onClick: props.onClick, style: props.style, target: props.target },
|
|
68
67
|
renderLabel(),
|
|
69
68
|
renderBadge()));
|
|
70
69
|
}
|
|
71
|
-
return (React.createElement("button", { title: props.hint, type: props.type, disabled: props.disabled, onClick: props.onClick, style: props.style, className: className },
|
|
70
|
+
return (React.createElement("button", { title: props.hint, type: props.type, disabled: props.disabled || props.isLoading, onClick: props.onClick, style: props.style, className: className },
|
|
72
71
|
renderLabel(),
|
|
73
72
|
renderBadge()));
|
|
74
73
|
}
|
|
@@ -1,96 +1,134 @@
|
|
|
1
|
+
$btn-font-weight-sm: 400;
|
|
2
|
+
$btn-font-weight-lg: 800;
|
|
3
|
+
$btn-line-height: 24px;
|
|
4
|
+
$btn-letter-spacing: 0.1em;
|
|
5
|
+
|
|
1
6
|
.ButtonView {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
$root: &;
|
|
8
|
+
|
|
9
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
10
|
+
transition-duration: 0.15s;
|
|
11
|
+
transition-timing-function: ease-in-out;
|
|
12
|
+
|
|
13
|
+
width: 160px;
|
|
14
|
+
|
|
15
|
+
&_button {
|
|
16
|
+
position: relative;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
user-select: none;
|
|
19
|
+
border: 3px solid transparent;
|
|
20
|
+
|
|
21
|
+
padding: 0 20px;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
|
|
26
|
+
font-family: $font-family-nunito;
|
|
27
|
+
font-weight: $btn-font-weight-sm;
|
|
28
|
+
font-size: $font-size-sm;
|
|
29
|
+
line-height: $btn-line-height;
|
|
30
|
+
outline: none;
|
|
31
|
+
|
|
32
|
+
@each $colorName, $colorMap in $color-themes {
|
|
33
|
+
&#{$root}_color_#{$colorName} {
|
|
34
|
+
@include button-theme($colorMap, $colorName, $root);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@each $colorName, $colorMap in $color-themes {
|
|
39
|
+
&#{$root}_outline_#{$colorName} {
|
|
40
|
+
@include button-outline-theme($colorMap, $colorName, $root);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
26
43
|
}
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
&_block {
|
|
46
|
+
display: block;
|
|
47
|
+
width: 100%;
|
|
48
|
+
|
|
49
|
+
#{$root}__label {
|
|
50
|
+
justify-content: center;
|
|
51
|
+
}
|
|
32
52
|
}
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
&_link {
|
|
55
|
+
display: inline;
|
|
56
|
+
width: auto;
|
|
57
|
+
#{$root}__label {
|
|
58
|
+
display: inline;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&_disabled {
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
color: rgba(0, 0, 0, 0.25);
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
input {
|
|
67
|
+
cursor: inherit;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
35
70
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
71
|
+
&_size {
|
|
72
|
+
&_sm {
|
|
73
|
+
height: 34px;
|
|
74
|
+
font-size: $font-size-sm;
|
|
75
|
+
border-radius: $radius-small;
|
|
76
|
+
}
|
|
77
|
+
&_md {
|
|
78
|
+
height: 46px;
|
|
79
|
+
font-size: $font-size-base;
|
|
80
|
+
border-radius: $radius-large;
|
|
81
|
+
}
|
|
82
|
+
&_lg {
|
|
83
|
+
height: 56px;
|
|
84
|
+
font-size: $font-size-lg;
|
|
85
|
+
border-radius: $radius-large;
|
|
86
|
+
}
|
|
42
87
|
}
|
|
43
|
-
}
|
|
44
88
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
89
|
+
&__label {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
column-gap: 10px;
|
|
49
93
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
94
|
+
|
|
95
|
+
&__icon {
|
|
96
|
+
&_without-label {
|
|
97
|
+
margin: 0;
|
|
98
|
+
}
|
|
53
99
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
100
|
+
|
|
101
|
+
&_failed {
|
|
102
|
+
&,
|
|
103
|
+
&:hover {
|
|
104
|
+
border-color: $danger;
|
|
105
|
+
box-shadow: 0 0 1rem rgba($danger, 0.2);
|
|
106
|
+
}
|
|
57
107
|
}
|
|
58
|
-
}
|
|
59
108
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
109
|
+
&__preloader {
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: 50%;
|
|
112
|
+
left: 50%;
|
|
113
|
+
transform: translate(-50%, -50%);
|
|
114
|
+
}
|
|
64
115
|
|
|
65
|
-
|
|
66
|
-
|
|
116
|
+
&__badge {
|
|
117
|
+
position: relative;
|
|
118
|
+
top: -1px;
|
|
119
|
+
margin-left: 4px;
|
|
120
|
+
}
|
|
67
121
|
|
|
68
|
-
&
|
|
69
|
-
|
|
122
|
+
&__loader {
|
|
123
|
+
svg {
|
|
124
|
+
transform-origin: center;
|
|
125
|
+
animation: rotate 1.45s linear infinite;
|
|
126
|
+
}
|
|
70
127
|
}
|
|
71
|
-
|
|
128
|
+
}
|
|
72
129
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
box-shadow: 0 0 1rem rgba($danger, .2);
|
|
130
|
+
@keyframes rotate {
|
|
131
|
+
100% {
|
|
132
|
+
transform: rotate(360deg);
|
|
77
133
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&_loading &__label {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&__preloader {
|
|
85
|
-
position: absolute;
|
|
86
|
-
top: 50%;
|
|
87
|
-
left: 50%;
|
|
88
|
-
transform: translate(-50%, -50%);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&__badge {
|
|
92
|
-
position: relative;
|
|
93
|
-
top: -1px;
|
|
94
|
-
margin-left: 4px;
|
|
95
|
-
}
|
|
96
134
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { ICheckboxFieldViewProps } from '@steroidsjs/core/ui/form/CheckboxField/CheckboxField';
|
|
4
3
|
export default function CheckboxFieldView(props: ICheckboxFieldViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -43,9 +43,9 @@ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"
|
|
|
43
43
|
function CheckboxFieldView(props) {
|
|
44
44
|
var bem = (0, hooks_1.useBem)('CheckboxFieldView');
|
|
45
45
|
var id = (0, useUniqueId_1["default"])('checkbox');
|
|
46
|
-
return (React.createElement("div", { className:
|
|
47
|
-
React.createElement("input", __assign({ className: bem(bem.element('input')
|
|
48
|
-
React.createElement("label", { className: bem(bem.element('label')
|
|
46
|
+
return (React.createElement("div", { className: "".concat(bem.block(), " \n ").concat(bem(props.className), "\n ").concat(props.errors ? 'has-errors' : ''), style: props.style, onClick: props.onChange },
|
|
47
|
+
React.createElement("input", __assign({ className: bem(bem.element('input')), id: id }, props.inputProps, { disabled: props.disabled, required: props.required })),
|
|
48
|
+
React.createElement("label", { className: bem(bem.element('label')), htmlFor: id },
|
|
49
49
|
React.createElement("span", { className: bem.element('label-text', { required: props.required }) }, props.label))));
|
|
50
50
|
}
|
|
51
51
|
exports["default"] = CheckboxFieldView;
|
|
@@ -1,46 +1,131 @@
|
|
|
1
1
|
.CheckboxFieldView {
|
|
2
|
-
|
|
2
|
+
$root: &;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
.custom-control-label {
|
|
15
|
-
&::before, &::after {
|
|
16
|
-
top: 0;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
|
|
6
|
+
font-family: $font-family-nunito;
|
|
7
|
+
|
|
8
|
+
&__input + &__label {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
user-select: none;
|
|
17
12
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
background: $primary;
|
|
25
|
-
}
|
|
26
|
-
&:hover {
|
|
13
|
+
|
|
14
|
+
&__label {
|
|
15
|
+
position: relative;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
//Сам кастомный checkbox
|
|
27
19
|
&::before {
|
|
28
|
-
|
|
20
|
+
content: "";
|
|
21
|
+
display: inline-block;
|
|
22
|
+
width: 24px;
|
|
23
|
+
height: 24px;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
flex-grow: 0;
|
|
26
|
+
|
|
27
|
+
border: 1px solid $gray;
|
|
28
|
+
border-radius: $radius-small;
|
|
29
|
+
margin-right: 8px;
|
|
30
|
+
|
|
31
|
+
background-repeat: no-repeat;
|
|
32
|
+
background-position: center center;
|
|
33
|
+
background-size: 50% 50%;
|
|
29
34
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
&::
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
//Псевдоэлемент который служит для применения эффектов на чекбокс
|
|
37
|
+
&::after {
|
|
38
|
+
content: "";
|
|
39
|
+
display: inline-block;
|
|
40
|
+
position: absolute;
|
|
41
|
+
transform: translateX(-7.5%);
|
|
42
|
+
|
|
43
|
+
width: 28px;
|
|
44
|
+
height: 28px;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
flex-grow: 0;
|
|
47
|
+
|
|
48
|
+
border-radius: $radius-small;
|
|
49
|
+
border: 4px solid $primary-light;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
|
|
52
|
+
background: transparent;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-text {
|
|
56
|
+
color: $text-color;
|
|
57
|
+
font-size: $font-size-sm;
|
|
58
|
+
font-weight: $font-weight-md;
|
|
59
|
+
transform: translateY(1px);
|
|
34
60
|
}
|
|
35
|
-
}
|
|
36
61
|
}
|
|
37
|
-
&:disabled ~ .custom-control-label {
|
|
38
|
-
color: $border-default;
|
|
39
62
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
63
|
+
&__input {
|
|
64
|
+
position: absolute;
|
|
65
|
+
z-index: -1;
|
|
66
|
+
opacity: 0;
|
|
67
|
+
|
|
68
|
+
//HOVER
|
|
69
|
+
&:not(:disabled):not(:checked):not(:active) + #{$root}__label:hover::before {
|
|
70
|
+
border-color: #d0d0d0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//ACTIVE
|
|
74
|
+
&:not(:disabled):not(:checked):active + #{$root}__label::before {
|
|
75
|
+
border-color: $primary;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:active:checked + #{$root}__label::after {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:checked:active + #{$root}__label::before {
|
|
83
|
+
background-color: $primary-light;
|
|
84
|
+
border: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//FOCUS
|
|
88
|
+
&:focus + #{$root}__label::after {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//CHECKED
|
|
93
|
+
&:checked + #{$root}__label::before {
|
|
94
|
+
border-color: $primary;
|
|
95
|
+
background-color: $primary;
|
|
96
|
+
background-image: url("data:image/svg+xml,%3Csvg width='11' height='8' viewBox='0 0 11 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.20898 1L3.70898 7L1.20898 4.27273' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//DISABLED
|
|
100
|
+
&:disabled + #{$root}__label {
|
|
101
|
+
cursor: not-allowed;
|
|
102
|
+
color: $gray;
|
|
103
|
+
|
|
104
|
+
span {
|
|
105
|
+
color: currentColor;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&::before {
|
|
109
|
+
background: currentColor;
|
|
110
|
+
border: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:disabled:checked #{$root}__label::before {
|
|
115
|
+
background-color: $gray;
|
|
116
|
+
border-color: none;
|
|
117
|
+
background-image: url("data:image/svg+xml,%3Csvg width='11' height='9' viewBox='0 0 11 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.8584 1.48401L4.3584 7.48401L1.8584 4.75674' stroke='black' stroke-opacity='0.1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
//ERROR
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.has-errors label {
|
|
124
|
+
&::before {
|
|
125
|
+
border-color: $danger;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
span {
|
|
129
|
+
color: $danger;
|
|
44
130
|
}
|
|
45
|
-
}
|
|
46
131
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { ICheckboxListFieldViewProps } from '@steroidsjs/core/ui/form/CheckboxListField/CheckboxListField';
|
|
4
3
|
export default function CheckboxListFieldView(props: ICheckboxListFieldViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
exports.__esModule = true;
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var react_1 = require("react");
|
|
42
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
42
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
43
43
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
44
44
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
45
45
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
@@ -40,7 +40,7 @@ exports.__esModule = true;
|
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var react_1 = require("react");
|
|
42
42
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
43
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
44
44
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
45
45
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
46
46
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { IDateTimeFieldViewProps } from '@steroidsjs/core/ui/form/DateTimeField/DateTimeField';
|
|
4
3
|
export default function DateTimeFieldView(props: IDateTimeFieldViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -40,7 +40,7 @@ exports.__esModule = true;
|
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
42
42
|
var react_1 = require("react");
|
|
43
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
43
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
44
44
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
45
45
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
46
46
|
var TimePanelView_1 = __importDefault(require("../TimeField/TimePanelView"));
|
|
@@ -40,7 +40,7 @@ exports.__esModule = true;
|
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var react_1 = require("react");
|
|
42
42
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
43
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
44
44
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
45
45
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
46
46
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
@@ -47,6 +47,7 @@ var React = __importStar(require("react"));
|
|
|
47
47
|
var react_1 = require("react");
|
|
48
48
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
49
49
|
function DropDownFieldView(props) {
|
|
50
|
+
var bem = (0, hooks_1.useBem)('DropDownFieldView');
|
|
50
51
|
var inputRef = (0, react_1.useRef)(null);
|
|
51
52
|
// Auto focus on search
|
|
52
53
|
(0, react_1.useEffect)(function () {
|
|
@@ -70,7 +71,6 @@ function DropDownFieldView(props) {
|
|
|
70
71
|
props.onItemSelect(item[props.primaryKey]);
|
|
71
72
|
}, onFocus: function () { return props.onItemHover(item[props.primaryKey]); }, onMouseOver: function () { return props.onItemHover(item[props.primaryKey]); } }, item.label));
|
|
72
73
|
};
|
|
73
|
-
var bem = (0, hooks_1.useBem)('DropDownFieldView');
|
|
74
74
|
return (React.createElement("div", { ref: props.forwardedRef, className: bem(bem.block({ size: props.size }), props.className), style: props.style },
|
|
75
75
|
React.createElement("div", { className: bem.element('selected-items', {
|
|
76
76
|
reset: props.showReset,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { IFieldLayoutViewProps } from '@steroidsjs/core/ui/form/FieldLayout/FieldLayout';
|
|
4
3
|
export default function FieldLayoutView(props: IFieldLayoutViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { IFileFieldItemViewProps } from '@steroidsjs/core/ui/form/FileField/FileField';
|
|
4
3
|
export default function FileFieldItemView(props: IFileFieldItemViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
exports.__esModule = true;
|
|
29
29
|
var React = __importStar(require("react"));
|
|
30
30
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
31
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
31
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
32
32
|
function FileFieldItemView(props) {
|
|
33
33
|
var bem = (0, hooks_1.useBem)('FileFieldItemView');
|
|
34
34
|
return (React.createElement("div", { className: bem(bem.block(), 'card mb-1 mr-1', props.error && 'border-danger') },
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { IFileFieldViewProps } from '@steroidsjs/core/ui/form/FileField/FileField';
|
|
4
3
|
export default function FileFieldView(props: IFileFieldViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
exports.__esModule = true;
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
42
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
42
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
43
43
|
var Button_1 = __importDefault(require("@steroidsjs/core/ui/form/Button"));
|
|
44
44
|
function FileFieldView(props) {
|
|
45
45
|
var bem = (0, hooks_1.useBem)('FileFieldView');
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
3
2
|
import { IHtmlFieldViewProps } from '@steroidsjs/core/ui/form/HtmlField/HtmlField';
|
|
4
3
|
export default function HtmlFieldView(props: IHtmlFieldViewProps & IBemHocOutput): JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { IImageFieldViewProps } from "@steroidsjs/core/ui/form/ImageField/ImageField";
|
|
1
|
+
import { IImageFieldViewProps } from '@steroidsjs/core/ui/form/ImageField/ImageField';
|
|
3
2
|
export default function ImageFieldView(props: IImageFieldViewProps): JSX.Element;
|
|
@@ -28,20 +28,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
exports.__esModule = true;
|
|
29
29
|
var React = __importStar(require("react"));
|
|
30
30
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
31
|
-
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/
|
|
31
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
32
32
|
function ImageFieldView(props) {
|
|
33
|
-
var bem = (0, hooks_1.useBem)(
|
|
33
|
+
var bem = (0, hooks_1.useBem)('ImageFieldView');
|
|
34
34
|
var item = props.item;
|
|
35
|
-
return (React.createElement("div", { className: bem.block() }, !item || !item.image ? (React.createElement("button", { className: bem.element(
|
|
35
|
+
return (React.createElement("div", { className: bem.block() }, !item || !item.image ? (React.createElement("button", { className: bem.element('button', {
|
|
36
36
|
loading: item ? item.progress : false
|
|
37
37
|
}), onClick: props.onClick },
|
|
38
|
-
!item || !item.progress ? (React.createElement(Icon_1["default"], { className: bem.element(
|
|
39
|
-
React.createElement("div", { className: bem.element(
|
|
38
|
+
!item || !item.progress ? (React.createElement(Icon_1["default"], { className: bem.element('button-icon'), name: 'plus' })) : (React.createElement("div", { className: bem.element('progress-bar') },
|
|
39
|
+
React.createElement("div", { className: bem.element('progress-slider'), style: {
|
|
40
40
|
width: "".concat(item ? item.progress.percent : 0, "%")
|
|
41
41
|
} }))),
|
|
42
|
-
React.createElement("span", { className: bem.element(
|
|
43
|
-
React.createElement("img", { className: bem.element(
|
|
44
|
-
React.createElement("div", { className: bem.element(
|
|
45
|
-
React.createElement(Icon_1["default"], { className: bem.element(
|
|
42
|
+
React.createElement("span", { className: bem.element('button-label') }, !item || !item.progress ? props.label : 'Uploading...'))) : (React.createElement("div", { className: bem.element('content') },
|
|
43
|
+
React.createElement("img", { className: bem.element('image'), src: item.image.url, width: item.image.width, height: item.image.height, alt: item.title }),
|
|
44
|
+
React.createElement("div", { className: bem.element('image-controls') },
|
|
45
|
+
React.createElement(Icon_1["default"], { className: bem.element('delete-icon'), name: 'trash', onClick: item.onRemove }))))));
|
|
46
46
|
}
|
|
47
47
|
exports["default"] = ImageFieldView;
|