@steroidsjs/bootstrap 2.1.0-beta.2 → 2.1.0-beta.7
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/README.md +7 -0
- package/content/Alert/AlertView.d.ts +3 -0
- package/content/Alert/AlertView.js +33 -0
- package/content/Alert/AlertView.scss +120 -0
- package/content/Avatar/AvatarGroupView.d.ts +0 -1
- package/content/Avatar/AvatarGroupView.js +20 -21
- package/content/Avatar/AvatarGroupView.scss +5 -1
- package/content/Avatar/AvatarView.d.ts +0 -1
- package/content/Avatar/AvatarView.js +14 -47
- package/content/Avatar/AvatarView.scss +93 -34
- package/content/Calendar/CalendarView.d.ts +0 -1
- package/content/Calendar/CalendarView.js +0 -1
- package/content/Calendar/CalendarView.scss +24 -24
- package/content/Calendar/CaptionElement.d.ts +0 -1
- package/content/Calendar/CaptionElement.js +2 -3
- package/content/Calendar/CaptionElement.scss +22 -17
- package/content/Card/CardView.d.ts +0 -1
- package/content/Card/CardView.js +15 -12
- package/content/Card/CardView.scss +138 -26
- package/content/Collapse/CollapseItemView.d.ts +3 -0
- package/content/Collapse/CollapseItemView.js +60 -0
- package/content/Collapse/CollapseItemView.scss +88 -0
- package/content/Collapse/CollapseView.d.ts +3 -0
- package/content/Collapse/CollapseView.js +28 -0
- package/content/Collapse/CollapseView.scss +15 -0
- package/content/Detail/DetailView.d.ts +3 -0
- package/content/Detail/DetailView.js +37 -0
- package/content/Detail/DetailView.scss +66 -0
- package/content/DropDown/DropDownView.scss +1 -2
- package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +1 -0
- package/form/AutoCompleteField/AutoCompleteFieldView.js +1 -0
- package/form/AutoCompleteField/AutoCompleteFieldView.scss +31 -20
- package/form/Button/ButtonView.js +15 -11
- package/form/Button/ButtonView.scss +63 -2
- package/form/CheckboxField/CheckboxFieldView.js +1 -1
- package/form/CheckboxField/CheckboxFieldView.scss +40 -6
- package/form/CheckboxListField/CheckboxListFieldView.js +4 -5
- package/form/CheckboxListField/CheckboxListFieldView.scss +45 -1
- package/form/DateField/DateFieldView.d.ts +0 -1
- package/form/DateField/DateFieldView.js +1 -1
- package/form/DateField/DateFieldView.scss +8 -9
- package/form/DateRangeField/DateRangeFieldView.d.ts +0 -1
- package/form/DateRangeField/DateRangeFieldView.js +0 -1
- package/form/DateRangeField/DateRangeFieldView.scss +8 -9
- package/form/DateTimeField/DateTimeFieldView.js +4 -1
- package/form/DateTimeField/DateTimeFieldView.scss +11 -11
- package/form/DateTimeRangeField/DateTimeRangeFieldView.d.ts +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +10 -10
- package/form/DropDownField/DropDownFieldView.js +1 -1
- package/form/DropDownField/DropDownFieldView.scss +28 -18
- package/form/FileField/FileFieldView.js +1 -1
- package/form/Form/FormView.js +4 -1
- package/form/Form/FormView.scss +16 -2
- package/form/HtmlField/HtmlFieldView.d.ts +4 -0
- package/form/HtmlField/HtmlFieldView.js +37 -0
- package/form/ImageField/ImageFieldModalView.d.ts +4 -0
- package/form/ImageField/ImageFieldModalView.js +55 -0
- package/form/ImageField/ImageFieldModalView.scss +7 -0
- package/form/ImageField/ImageFieldView.d.ts +3 -0
- package/form/ImageField/ImageFieldView.js +43 -0
- package/form/ImageField/ImageFieldView.scss +108 -0
- package/form/InputField/InputFieldView.js +8 -3
- package/form/InputField/InputFieldView.scss +77 -14
- package/form/NumberField/NumberFieldView.js +2 -2
- package/form/NumberField/NumberFieldView.scss +30 -12
- package/form/PasswordField/PasswordFieldView.scss +5 -5
- package/form/RateField/RateFieldView.d.ts +0 -1
- package/form/RateField/RateFieldView.js +0 -1
- package/form/RateField/RateFieldView.scss +5 -5
- package/form/SliderField/SliderFieldView.js +29 -9
- package/form/SliderField/SliderFieldView.scss +39 -20
- package/form/TextField/TextFieldView.scss +3 -2
- package/form/TimeField/TimeFieldView.d.ts +0 -1
- package/form/TimeField/TimeFieldView.js +0 -1
- package/form/TimeField/TimeFieldView.scss +8 -9
- package/form/TimeField/TimePanelView.d.ts +0 -1
- package/form/TimeField/TimePanelView.js +0 -1
- package/form/TimeField/TimePanelView.scss +11 -11
- package/icon/Icon/IconView.d.ts +0 -1
- package/icon/Icon/IconView.js +0 -1
- package/icon/Icon/IconView.scss +6 -6
- package/icon/fontawesome.js +5 -1
- package/index.d.ts +33 -0
- package/index.js +217 -67
- package/index.scss +22 -2
- package/layout/ProgressBar/CircleProgressBarView.d.ts +4 -0
- package/layout/ProgressBar/CircleProgressBarView.js +40 -0
- package/layout/ProgressBar/CircleProgressBarView.scss +150 -0
- package/layout/ProgressBar/LineProgressBarView.d.ts +4 -0
- package/layout/ProgressBar/LineProgressBarView.js +31 -0
- package/layout/ProgressBar/LineProgressBarView.scss +115 -0
- package/layout/Skeleton/SkeletonView.d.ts +3 -0
- package/layout/Skeleton/SkeletonView.js +31 -0
- package/layout/Skeleton/SkeletonView.scss +71 -0
- package/list/List/ListView.js +3 -0
- package/list/Steps/StepItemView.d.ts +3 -0
- package/list/Steps/StepItemView.js +41 -0
- package/list/Steps/StepItemView.scss +144 -0
- package/list/Steps/StepsView.d.ts +3 -0
- package/list/Steps/StepsView.js +28 -0
- package/list/Steps/StepsView.scss +16 -0
- package/modal/Modal/ModalView.js +13 -14
- package/modal/Modal/ModalView.scss +34 -30
- package/nav/Breadcrubms/BreadcrumbsView.js +4 -4
- package/nav/Breadcrubms/BreadcrumbsView.scss +14 -0
- package/nav/Controls/ControlsView.scss +1 -1
- package/nav/Nav/NavButtonView.js +1 -1
- package/nav/Nav/NavIconView.js +1 -1
- package/package.json +4 -3
- package/scss/mixins/button.scss +33 -0
- package/scss/mixins/card.scss +26 -0
- package/scss/mixins/index.scss +2 -0
- package/scss/variables/colors.scss +74 -0
- package/scss/variables/components/alert.scss +9 -0
- package/scss/variables/components/avatar.scss +17 -0
- package/scss/variables/components/button.scss +14 -0
- package/scss/variables/components/calendar.scss +15 -0
- package/scss/variables/components/card.scss +20 -0
- package/scss/variables/components/icon.scss +3 -0
- package/scss/variables/components/input.scss +11 -0
- package/scss/variables/components/ratefield.scss +2 -0
- package/scss/variables/index.scss +9 -0
- package/list/Accordion/AccordionView.scss +0 -10
- package/list/Detail/DetailView.scss +0 -5
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
min-width: 100px;
|
|
15
15
|
//height: 38px;
|
|
16
16
|
cursor: pointer;
|
|
17
|
-
background-color:
|
|
18
|
-
background-clip:
|
|
19
|
-
border: 1px solid
|
|
17
|
+
background-color: black; //changed
|
|
18
|
+
background-clip: blue; //changed
|
|
19
|
+
border: 1px solid red; //changed
|
|
20
20
|
border-radius: 0.25rem;
|
|
21
21
|
line-height: 1.5;
|
|
22
|
-
color:
|
|
22
|
+
color: red; //changed
|
|
23
23
|
white-space: nowrap;
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
text-overflow: ellipsis;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&_is-invalid {
|
|
47
|
-
border-color:
|
|
47
|
+
border-color: black; //changed
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
&_size_sm &__selected-items {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
left: 50%;
|
|
80
80
|
width: 1px;
|
|
81
81
|
height: 10px;
|
|
82
|
-
background-color:
|
|
82
|
+
background-color: yellow; //
|
|
83
83
|
content: '';
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -94,21 +94,21 @@
|
|
|
94
94
|
|
|
95
95
|
&__drop-down {
|
|
96
96
|
position: absolute;
|
|
97
|
-
top: calc(100% +
|
|
97
|
+
top: calc(100% + 8px);
|
|
98
98
|
left: 0;
|
|
99
|
-
padding: 0.375rem 0;
|
|
100
99
|
width: 100%;
|
|
101
|
-
z-index:
|
|
102
|
-
background-color:
|
|
103
|
-
background-clip: padding-box;
|
|
104
|
-
border: $dropdown-border-width solid $dropdown-border-width;
|
|
105
|
-
border-radius: $dropdown-border-radius;
|
|
106
|
-
box-shadow: $dropdown-box-shadow;
|
|
100
|
+
z-index: 10; //changed
|
|
101
|
+
background-color: #fff; //changed
|
|
107
102
|
line-height: 1.5;
|
|
108
|
-
|
|
103
|
+
padding: 5.5px 0;
|
|
104
|
+
border: 1px solid #CCCCCC;
|
|
105
|
+
filter: drop-shadow(0px 0px 30px rgba(0, 0, 0, 0.1));
|
|
106
|
+
border-radius: 10px;
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
&__drop-down-list {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
112
|
max-height: 273px;
|
|
113
113
|
overflow: auto;
|
|
114
114
|
}
|
|
@@ -125,16 +125,21 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
&__drop-down-item {
|
|
128
|
-
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: flex-start;
|
|
130
|
+
padding: 10px 34px;
|
|
129
131
|
cursor: pointer;
|
|
130
|
-
|
|
132
|
+
border: unset;
|
|
133
|
+
background-color: #fff;
|
|
134
|
+
font-size: 14px;
|
|
135
|
+
line-height: 140%;
|
|
131
136
|
&_hover {
|
|
132
|
-
background-color:
|
|
137
|
+
background-color: #F8F8F8; //
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
&_select {
|
|
136
|
-
background-color:
|
|
137
|
-
color:
|
|
141
|
+
background-color: #F8F8F8; //
|
|
142
|
+
color: #152536; //
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
145
|
&_size_sm &__drop-down-item {
|
|
@@ -144,3 +149,9 @@
|
|
|
144
149
|
padding: 0.5rem 1rem;
|
|
145
150
|
}
|
|
146
151
|
}
|
|
152
|
+
|
|
153
|
+
.form-control:focus{
|
|
154
|
+
box-shadow: unset;
|
|
155
|
+
border: 4px solid #A7EFFF;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
}
|
|
@@ -27,6 +27,7 @@ var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
|
27
27
|
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/icon/Icon"));
|
|
28
28
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
29
29
|
function ButtonView(props) {
|
|
30
|
+
var _a;
|
|
30
31
|
var bem = hooks_1.useBem('ButtonView');
|
|
31
32
|
var renderLabel = function () {
|
|
32
33
|
var title = props.label && isString_1["default"](props.label)
|
|
@@ -45,22 +46,25 @@ function ButtonView(props) {
|
|
|
45
46
|
}
|
|
46
47
|
return (React.createElement("span", { className: bem('badge', props.badge.color && "badge-" + props.badge.color, bem.element('badge'), props.badge.className) }, props.badge.value));
|
|
47
48
|
};
|
|
48
|
-
var className = bem(bem.block({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
var className = bem(bem.block((_a = {
|
|
50
|
+
button: !props.link
|
|
51
|
+
},
|
|
52
|
+
_a["color_" + props.color] = props.color && !props.outline,
|
|
53
|
+
_a["outline_" + props.color] = props.outline,
|
|
54
|
+
_a.outline = props.outline,
|
|
55
|
+
_a.size = props.size,
|
|
56
|
+
_a.disabled = props.disabled,
|
|
57
|
+
_a.submitting = props.submitting,
|
|
58
|
+
_a.loading = props.isLoading,
|
|
59
|
+
_a.failed = props.isFailed,
|
|
60
|
+
_a.link = props.tag === 'a',
|
|
61
|
+
_a)), props.block && 'btn-block', props.link && 'btn-link', props.className);
|
|
58
62
|
if (props.tag === 'a') {
|
|
59
63
|
return (React.createElement("a", { className: className, href: props.url, onClick: props.onClick, style: props.style, target: props.target },
|
|
60
64
|
renderLabel(),
|
|
61
65
|
renderBadge()));
|
|
62
66
|
}
|
|
63
|
-
return (React.createElement("button", { type: props.type, disabled: props.disabled, onClick: props.onClick, style: props.style, className: className },
|
|
67
|
+
return (React.createElement("button", { title: props.hint, type: props.type, disabled: props.disabled, onClick: props.onClick, style: props.style, className: className },
|
|
64
68
|
renderLabel(),
|
|
65
69
|
renderBadge()));
|
|
66
70
|
}
|
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
.ButtonView {
|
|
2
|
-
|
|
2
|
+
$root: &;
|
|
3
|
+
|
|
4
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
5
|
+
transition-duration: .15s;
|
|
6
|
+
transition-timing-function: ease-in-out;
|
|
7
|
+
|
|
8
|
+
&_button {
|
|
9
|
+
position: relative;
|
|
10
|
+
border-radius: $button-border-radius;
|
|
11
|
+
user-select: none;
|
|
12
|
+
border: $button-border;
|
|
13
|
+
|
|
14
|
+
padding: $button-padding-y $button-padding-x;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
|
|
19
|
+
font-weight: $button-font-weight;
|
|
20
|
+
font-size: $button-font-size;
|
|
21
|
+
|
|
22
|
+
@each $color, $value in $color-themes {
|
|
23
|
+
&#{$root}_color_#{$color} {
|
|
24
|
+
@include button-theme($value)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@each $color, $value in $color-themes {
|
|
29
|
+
&#{$root}_outline_#{$color} {
|
|
30
|
+
@include button-outline-theme($value)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&_disabled {
|
|
37
|
+
opacity: .5;
|
|
38
|
+
color: rgba(0, 0, 0, .25);
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
input {
|
|
41
|
+
cursor: inherit;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&_size {
|
|
46
|
+
&_sm {
|
|
47
|
+
height: $button-height-sm;
|
|
48
|
+
font-size: $button-font-size-sm;
|
|
49
|
+
}
|
|
50
|
+
&_md {
|
|
51
|
+
height: $button-height-md;
|
|
52
|
+
font-size: $button-font-size-md;
|
|
53
|
+
}
|
|
54
|
+
&_lg {
|
|
55
|
+
height: $button-height-lg;
|
|
56
|
+
font-size: $button-font-size-lg;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&_link {
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
}
|
|
3
64
|
|
|
4
65
|
&__icon {
|
|
5
66
|
margin-right: 3px;
|
|
@@ -32,4 +93,4 @@
|
|
|
32
93
|
top: -1px;
|
|
33
94
|
margin-left: 4px;
|
|
34
95
|
}
|
|
35
|
-
}
|
|
96
|
+
}
|
|
@@ -39,7 +39,7 @@ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"
|
|
|
39
39
|
function CheckboxFieldView(props) {
|
|
40
40
|
var bem = hooks_1.useBem('CheckboxFieldView');
|
|
41
41
|
var id = useUniqueId_1["default"]('checkbox');
|
|
42
|
-
return (React.createElement("div", { className: bem(bem.block(), 'custom-control', 'custom-checkbox') },
|
|
42
|
+
return (React.createElement("div", { className: bem(bem.block({ 'is-invalid': !!props.errors }), 'custom-control', 'custom-checkbox') },
|
|
43
43
|
React.createElement("input", __assign({ className: bem(bem.element('input'), 'custom-control-input', !!props.errors && 'is-invalid', props.className), id: id }, props.inputProps, { disabled: props.disabled, required: props.required })),
|
|
44
44
|
React.createElement("label", { className: bem(bem.element('label'), 'custom-control-label'), htmlFor: id },
|
|
45
45
|
React.createElement("span", { className: bem.element('label-text', { required: props.required }) }, props.label))));
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
.CheckboxFieldView {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
|
|
4
|
-
&__label
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
&__label {
|
|
5
|
+
&-text {
|
|
6
|
+
&_required:after {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
content: '*';
|
|
9
|
+
color: $danger;
|
|
10
|
+
margin: 0 0 0 3px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
.custom-control-label {
|
|
15
|
+
&::before, &::after {
|
|
16
|
+
top: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.custom-control-input {
|
|
21
|
+
&:checked ~ .custom-control-label {
|
|
22
|
+
&::before {
|
|
23
|
+
border-color: $primary;
|
|
24
|
+
background: $primary;
|
|
25
|
+
}
|
|
26
|
+
&:hover {
|
|
27
|
+
&::before {
|
|
28
|
+
background: $primary-dark;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&:active {
|
|
32
|
+
&::before {
|
|
33
|
+
background: $primary-light;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:disabled ~ .custom-control-label {
|
|
38
|
+
color: $border-default;
|
|
39
|
+
|
|
40
|
+
&::before {
|
|
41
|
+
border: unset;
|
|
42
|
+
background-color: $back-disabled;
|
|
43
|
+
}
|
|
10
44
|
}
|
|
11
45
|
}
|
|
12
46
|
}
|
|
@@ -39,10 +39,9 @@ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"
|
|
|
39
39
|
function CheckboxListFieldView(props) {
|
|
40
40
|
var bem = hooks_1.useBem('CheckboxListFieldView');
|
|
41
41
|
var prefix = useUniqueId_1["default"]('checkbox');
|
|
42
|
-
return (React.createElement("div", { className: bem(bem.block(), props.className) }, props.items.map(function (item) { return (React.createElement("div", { key: item.id, className: "custom-control custom-checkbox" },
|
|
43
|
-
React.createElement("input", __assign({}, props.inputProps, { id: prefix + "_" + item.id, className: bem(bem.element('input'), 'custom-control-input', !!props.errors && 'is-invalid'), checked: props.selectedIds.includes(item.id),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
React.createElement("label", { className: "custom-control-label", htmlFor: prefix + "_" + item.id }, item.label))); })));
|
|
42
|
+
return (React.createElement("div", { className: bem(bem.block({ 'is-invalid': !!props.errors }), props.className) }, props.items.map(function (item) { return (React.createElement("div", { key: item.id, className: "custom-control custom-checkbox" },
|
|
43
|
+
React.createElement("input", __assign({}, props.inputProps, { disabled: props.disabled, required: props.required, id: prefix + "_" + item.id, className: bem(bem.element('input'), 'custom-control-input', !!props.errors && 'is-invalid'), checked: props.selectedIds.includes(item.id), onChange: function () { return props.onItemSelect(item.id); }, onMouseOver: function () { return props.onItemHover(item.id); } })),
|
|
44
|
+
React.createElement("label", { className: bem(bem.element('label'), 'custom-control-label'), htmlFor: prefix + "_" + item.id },
|
|
45
|
+
React.createElement("span", { className: bem.element('label-text', { required: props.required }) }, item.label)))); })));
|
|
47
46
|
}
|
|
48
47
|
exports["default"] = CheckboxListFieldView;
|
|
@@ -1,3 +1,47 @@
|
|
|
1
1
|
.CheckboxListFieldView {
|
|
2
|
+
&__label {
|
|
3
|
+
&-text {
|
|
4
|
+
&_required:after {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
content: '*';
|
|
7
|
+
color: $danger;
|
|
8
|
+
margin: 0 0 0 3px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
2
12
|
|
|
3
|
-
|
|
13
|
+
.custom-control-label {
|
|
14
|
+
&::before, &::after {
|
|
15
|
+
border-color: $border-default;
|
|
16
|
+
top: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.custom-control-input {
|
|
21
|
+
&:checked ~ .custom-control-label {
|
|
22
|
+
&::before {
|
|
23
|
+
border-color: $primary;
|
|
24
|
+
background: $primary;
|
|
25
|
+
}
|
|
26
|
+
&:hover {
|
|
27
|
+
&::before {
|
|
28
|
+
background: $primary-dark;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&:active {
|
|
32
|
+
&::before {
|
|
33
|
+
background: $primary-light;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&:disabled ~ .custom-control-label {
|
|
38
|
+
color: $border-default;
|
|
39
|
+
|
|
40
|
+
&::before {
|
|
41
|
+
border: unset;
|
|
42
|
+
background-color: $back-disabled;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
@@ -39,13 +39,13 @@ var Icon_1 = __importDefault(require("@steroidsjs/core/ui/icon/Icon"));
|
|
|
39
39
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
40
40
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
41
41
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
42
|
-
require("./DateFieldView.scss");
|
|
43
42
|
function DateFieldView(props) {
|
|
44
43
|
var bem = hooks_1.useBem('DateFieldView');
|
|
45
44
|
var renderCalendar = react_1.useCallback(function () { return (React.createElement(Calendar_1["default"], __assign({}, props.calendarProps))); }, [props.calendarProps]);
|
|
46
45
|
return (React.createElement(DropDown_1["default"], { content: renderCalendar, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose },
|
|
47
46
|
React.createElement("div", { className: bem(bem.block({
|
|
48
47
|
size: props.size,
|
|
48
|
+
disabled: props.disabled,
|
|
49
49
|
'has-icon': !!props.icon,
|
|
50
50
|
'is-invalid': !!props.errors
|
|
51
51
|
}), props.className), style: props.style },
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
padding: 0 8px;
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
-
background-color:
|
|
8
|
-
border: 1px solid
|
|
7
|
+
background-color: $white;
|
|
8
|
+
border: 1px solid $border-default;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
|
|
11
11
|
&:focus-within{
|
|
12
12
|
outline: 0;
|
|
13
|
-
border-color:
|
|
14
|
-
box-shadow: 0 0 0 1px
|
|
13
|
+
border-color: $border-action;
|
|
14
|
+
box-shadow: 0 0 0 1px $border-typing;
|
|
15
15
|
}
|
|
16
16
|
*:focus {
|
|
17
17
|
outline: none;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
&_disabled {
|
|
21
21
|
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color:
|
|
22
|
+
background-color: $grey-disabled;
|
|
23
23
|
cursor: not-allowed;
|
|
24
24
|
input {
|
|
25
25
|
cursor: inherit;
|
|
@@ -61,21 +61,20 @@
|
|
|
61
61
|
height: 16px;
|
|
62
62
|
|
|
63
63
|
path {
|
|
64
|
-
fill:
|
|
64
|
+
fill: $grey-light;
|
|
65
65
|
transition: fill .1s ease-in;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&_close{
|
|
69
69
|
position: absolute;
|
|
70
|
-
background-color:
|
|
70
|
+
background-color: $white;
|
|
71
71
|
|
|
72
72
|
opacity: 0;
|
|
73
73
|
transition: opacity .2s ease-in;
|
|
74
74
|
|
|
75
75
|
&:hover {
|
|
76
76
|
path {
|
|
77
|
-
fill:
|
|
78
|
-
|
|
77
|
+
fill: $grey-dark;
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -40,7 +40,6 @@ var Icon_1 = __importDefault(require("@steroidsjs/core/ui/icon/Icon"));
|
|
|
40
40
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
41
41
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
42
42
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
43
|
-
require("./DateRangeFieldView.scss");
|
|
44
43
|
function DateRangeFieldView(props) {
|
|
45
44
|
var bem = hooks_1.useBem('DateRangeFieldView');
|
|
46
45
|
var renderCalendar = react_1.useCallback(function () { return (React.createElement(Calendar_1["default"], __assign({}, props.calendarProps))); }, [props.calendarProps]);
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
padding: 0 8px;
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
-
background-color:
|
|
8
|
-
border: 1px solid
|
|
7
|
+
background-color: $white;
|
|
8
|
+
border: 1px solid $border-default;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
|
|
11
11
|
&:focus-within{
|
|
12
12
|
outline: 0;
|
|
13
|
-
border-color:
|
|
14
|
-
box-shadow: 0 0 0 1px
|
|
13
|
+
border-color: $border-action;
|
|
14
|
+
box-shadow: 0 0 0 1px $border-typing;
|
|
15
15
|
}
|
|
16
16
|
*:focus {
|
|
17
17
|
outline: none;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
&_disabled {
|
|
21
21
|
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color:
|
|
22
|
+
background-color: $back-disabled;
|
|
23
23
|
cursor: not-allowed;
|
|
24
24
|
input {
|
|
25
25
|
cursor: inherit;
|
|
@@ -61,21 +61,20 @@
|
|
|
61
61
|
height: 16px;
|
|
62
62
|
|
|
63
63
|
path {
|
|
64
|
-
fill:
|
|
64
|
+
fill: $grey-light;
|
|
65
65
|
transition: fill .1s ease-in;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&_close{
|
|
69
69
|
position: absolute;
|
|
70
|
-
background-color:
|
|
70
|
+
background-color: $white;
|
|
71
71
|
|
|
72
72
|
opacity: 0;
|
|
73
73
|
transition: opacity .2s ease-in;
|
|
74
74
|
|
|
75
75
|
&:hover {
|
|
76
76
|
path {
|
|
77
|
-
fill:
|
|
78
|
-
|
|
77
|
+
fill: $grey-dark;
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -48,11 +48,14 @@ function DateTimeFieldView(props) {
|
|
|
48
48
|
return (React.createElement(DropDown_1["default"], { content: renderContent, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose },
|
|
49
49
|
React.createElement("div", { className: bem(bem.block({
|
|
50
50
|
size: props.size,
|
|
51
|
+
disabled: props.disabled,
|
|
51
52
|
'has-icon': !!props.icon,
|
|
52
53
|
'is-invalid': !!props.isInvalid
|
|
53
54
|
}), props.className), style: props.style },
|
|
54
55
|
React.createElement("div", { className: bem.element('body') },
|
|
55
|
-
React.createElement("input", __assign({}, props.inputProps, {
|
|
56
|
+
React.createElement("input", __assign({}, props.inputProps, { placeholder: props.placeholder
|
|
57
|
+
? props.placeholder
|
|
58
|
+
: props.inputProps.placeholder, className: bem(bem.element('input', {
|
|
56
59
|
size: props.size
|
|
57
60
|
}), props.isInvalid && 'is-invalid'), onChange: function (e) { return props.inputProps.onChange(e.target.value); } })),
|
|
58
61
|
React.createElement("div", { className: bem.element('icon-container') },
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
padding: 0 8px;
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
-
background-color:
|
|
8
|
-
border: 1px solid
|
|
7
|
+
background-color: $white;
|
|
8
|
+
border: 1px solid $border-default;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
|
|
11
11
|
&:focus-within{
|
|
12
12
|
outline: 0;
|
|
13
|
-
border-color:
|
|
14
|
-
box-shadow: 0 0 0 1px
|
|
13
|
+
border-color: $border-action;
|
|
14
|
+
box-shadow: 0 0 0 1px $border-typing;
|
|
15
15
|
}
|
|
16
16
|
*:focus {
|
|
17
17
|
outline: none;
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
&_disabled {
|
|
21
21
|
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color:
|
|
22
|
+
background-color: $back-disabled;
|
|
23
23
|
cursor: not-allowed;
|
|
24
|
+
|
|
24
25
|
input {
|
|
25
26
|
cursor: inherit;
|
|
26
27
|
}
|
|
@@ -66,21 +67,20 @@
|
|
|
66
67
|
height: 16px;
|
|
67
68
|
|
|
68
69
|
path {
|
|
69
|
-
fill:
|
|
70
|
+
fill: $border-default;
|
|
70
71
|
transition: fill .1s ease-in;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
&_close{
|
|
74
75
|
position: absolute;
|
|
75
|
-
background-color:
|
|
76
|
+
background-color: $white;
|
|
76
77
|
|
|
77
78
|
opacity: 0;
|
|
78
79
|
transition: opacity .2s ease-in;
|
|
79
80
|
|
|
80
81
|
&:hover {
|
|
81
82
|
path {
|
|
82
|
-
fill:
|
|
83
|
-
|
|
83
|
+
fill: $grey-dark;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
height: 291px;
|
|
98
98
|
|
|
99
99
|
&:first-child {
|
|
100
|
-
border-left: 1px solid
|
|
100
|
+
border-left: 1px solid $border-default;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
&__time {
|
|
112
112
|
.TimePanelView__column {
|
|
113
113
|
height: 291px;
|
|
114
|
-
border-left: 1px solid
|
|
114
|
+
border-left: 1px solid $border-default;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IDateTimeRangeFieldViewProps } from '@steroidsjs/core/ui/form/DateTimeRangeField/DateTimeRangeField';
|
|
3
|
-
import './DateTimeRangeFieldView.scss';
|
|
4
3
|
export default function DateTimeRangeFieldView(props: IDateTimeRangeFieldViewProps): JSX.Element;
|
|
@@ -40,7 +40,6 @@ var Icon_1 = __importDefault(require("@steroidsjs/core/ui/icon/Icon"));
|
|
|
40
40
|
var DropDown_1 = __importDefault(require("@steroidsjs/core/ui/content/DropDown"));
|
|
41
41
|
var Calendar_1 = __importDefault(require("@steroidsjs/core/ui/content/Calendar"));
|
|
42
42
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
43
|
-
require("./DateTimeRangeFieldView.scss");
|
|
44
43
|
var TimePanelView_1 = __importDefault(require("../TimeField/TimePanelView"));
|
|
45
44
|
function DateTimeRangeFieldView(props) {
|
|
46
45
|
var bem = hooks_1.useBem('DateTimeRangeFieldView');
|
|
@@ -4,22 +4,23 @@
|
|
|
4
4
|
padding: 0 8px;
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
-
background-color:
|
|
8
|
-
border: 1px solid
|
|
7
|
+
background-color: $white;
|
|
8
|
+
border: 1px solid $border-default;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
|
|
11
11
|
&:focus-within{
|
|
12
12
|
outline: 0;
|
|
13
|
-
border-color:
|
|
14
|
-
box-shadow: 0 0 0 1px
|
|
13
|
+
border-color: $border-action;
|
|
14
|
+
box-shadow: 0 0 0 1px $border-typing;
|
|
15
15
|
}
|
|
16
16
|
*:focus {
|
|
17
17
|
outline: none;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&_disabled {
|
|
21
|
+
opacity: .7;
|
|
21
22
|
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color:
|
|
23
|
+
background-color: $back-disabled;
|
|
23
24
|
cursor: not-allowed;
|
|
24
25
|
input {
|
|
25
26
|
cursor: inherit;
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
height: 291px;
|
|
44
45
|
|
|
45
46
|
&:first-child {
|
|
46
|
-
border-left: 1px solid
|
|
47
|
+
border-left: 1px solid $border-default;
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -80,21 +81,20 @@
|
|
|
80
81
|
height: 16px;
|
|
81
82
|
|
|
82
83
|
path {
|
|
83
|
-
fill:
|
|
84
|
+
fill: $grey-light;
|
|
84
85
|
transition: fill .1s ease-in;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
&_close{
|
|
88
89
|
position: absolute;
|
|
89
|
-
background-color:
|
|
90
|
+
background-color: $white;
|
|
90
91
|
|
|
91
92
|
opacity: 0;
|
|
92
93
|
transition: opacity .2s ease-in;
|
|
93
94
|
|
|
94
95
|
&:hover {
|
|
95
96
|
path {
|
|
96
|
-
fill:
|
|
97
|
-
|
|
97
|
+
fill: $grey-dark;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -54,7 +54,7 @@ function DropDownFieldView(props) {
|
|
|
54
54
|
reset: props.showReset,
|
|
55
55
|
'no-border': props.noBorder,
|
|
56
56
|
'is-invalid': !!props.errors,
|
|
57
|
-
|
|
57
|
+
disabled: props.disabled
|
|
58
58
|
}), onClick: props.onOpen, onKeyPress: props.onOpen, tabIndex: 0, role: 'button' }, props.multiple
|
|
59
59
|
? props.selectedIds
|
|
60
60
|
.map(function (id) { return props.items.find(function (item) { return item[props.primaryKey] === id; }); })
|