@steroidsjs/bootstrap 3.0.0-beta.55 → 3.0.0-beta.57
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 -2
- package/content/Accordion/AccordionView.d.ts +2 -2
- package/content/Calendar/CalendarView.js +1 -1
- package/content/Calendar/CalendarView.scss +66 -20
- package/content/Calendar/CaptionElement.scss +54 -17
- package/content/CopyToClipboard/CopyToClipboard.d.ts +3 -0
- package/content/CopyToClipboard/CopyToClipboard.js +19 -0
- package/content/CopyToClipboard/CopyToClipboard.scss +41 -0
- package/content/Menu/MenuItemView.d.ts +2 -2
- package/form/DateField/DateFieldView.js +3 -2
- package/form/DateField/DateFieldView.scss +5 -156
- package/form/DateRangeField/DateRangeFieldView.js +10 -13
- package/form/DateRangeField/DateRangeFieldView.scss +29 -78
- package/form/DateTimeField/DateTimeFieldView.js +5 -5
- package/form/DateTimeField/DateTimeFieldView.scss +7 -109
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +9 -7
- package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +25 -90
- package/form/DropDownField/DropDownFieldView.scss +1 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/index.scss +1 -0
- package/package.json +3 -3
- package/scss/mixins/date.scss +397 -0
- package/scss/mixins/index.scss +2 -1
|
@@ -1,82 +1,33 @@
|
|
|
1
1
|
.DateRangeFieldView {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
border: unset;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&__body {
|
|
33
|
-
height: 100%;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-flow: row nowrap;
|
|
36
|
-
align-items: center;
|
|
37
|
-
|
|
38
|
-
&:hover #{$root}__icon_close {
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&__input {
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex-grow: 1;
|
|
46
|
-
border: none;
|
|
47
|
-
outline: none;
|
|
48
|
-
background-color: transparent;
|
|
49
|
-
|
|
50
|
-
padding: 10px 5px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&__icon-container {
|
|
54
|
-
position: relative;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
}
|
|
59
|
-
&__icon {
|
|
60
|
-
display: flex;
|
|
61
|
-
height: 16px;
|
|
62
|
-
|
|
63
|
-
path {
|
|
64
|
-
fill: $grey-light;
|
|
65
|
-
transition: fill .1s ease-in;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&_close{
|
|
69
|
-
position: absolute;
|
|
70
|
-
background-color: $white;
|
|
71
|
-
|
|
72
|
-
opacity: 0;
|
|
73
|
-
transition: opacity .2s ease-in;
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
path {
|
|
77
|
-
fill: $grey-dark;
|
|
2
|
+
$root: &;
|
|
3
|
+
|
|
4
|
+
@include date-range-body($root);
|
|
5
|
+
@include icon-container($root);
|
|
6
|
+
@include date-range-input();
|
|
7
|
+
|
|
8
|
+
@include date-range-sizes($root);
|
|
9
|
+
|
|
10
|
+
&__split {
|
|
11
|
+
.DayPicker-Months {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-flow: row nowrap;
|
|
15
|
+
align-items: center;
|
|
16
|
+
column-gap: 47px;
|
|
17
|
+
|
|
18
|
+
&::before {
|
|
19
|
+
content: "";
|
|
20
|
+
position: absolute;
|
|
21
|
+
display: block;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 50%;
|
|
24
|
+
transform: translateX(-50%);
|
|
25
|
+
height: 100%;
|
|
26
|
+
width: 1px;
|
|
27
|
+
background-color: $date-range-separator-color;
|
|
28
|
+
}
|
|
78
29
|
}
|
|
79
|
-
}
|
|
80
30
|
}
|
|
81
|
-
|
|
31
|
+
|
|
32
|
+
@include date-range-effects($root);
|
|
82
33
|
}
|
|
@@ -48,13 +48,13 @@ function DateTimeFieldView(props) {
|
|
|
48
48
|
var bem = (0, hooks_1.useBem)('DateTimeFieldView');
|
|
49
49
|
var renderContent = (0, react_1.useCallback)(function () { return (React.createElement("div", { className: bem.element('panel-container') },
|
|
50
50
|
React.createElement(Calendar_1["default"], __assign({}, props.calendarProps, { className: bem.element('calendar') })),
|
|
51
|
+
React.createElement("div", { className: bem.element('separator') }),
|
|
51
52
|
React.createElement(TimePanelView_1["default"], __assign({}, props.timePanelViewProps, { className: bem.element('time-panel') })))); }, [bem, props.calendarProps, props.timePanelViewProps]);
|
|
52
53
|
return (React.createElement(DropDown_1["default"], { content: renderContent, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose },
|
|
53
54
|
React.createElement("div", { className: bem(bem.block({
|
|
54
55
|
size: props.size,
|
|
55
56
|
disabled: props.disabled,
|
|
56
|
-
'
|
|
57
|
-
'is-invalid': !!props.isInvalid
|
|
57
|
+
'is-invalid': !!props.errors
|
|
58
58
|
}), props.className), style: props.style },
|
|
59
59
|
React.createElement("div", { className: bem.element('body') },
|
|
60
60
|
React.createElement("input", __assign({}, props.inputProps, { placeholder: props.placeholder
|
|
@@ -63,10 +63,10 @@ function DateTimeFieldView(props) {
|
|
|
63
63
|
size: props.size
|
|
64
64
|
}), props.isInvalid && 'is-invalid'), onChange: function (e) { return props.inputProps.onChange(e.target.value); } })),
|
|
65
65
|
React.createElement("div", { className: bem.element('icon-container') },
|
|
66
|
-
props.icon && (React.createElement(Icon_1["default"], { className: bem.element('icon'), name: props.icon
|
|
67
|
-
props.showRemove && props.inputProps.value &&
|
|
66
|
+
!props.inputProps.value && props.icon && (React.createElement(Icon_1["default"], { className: bem.element('date-icon'), name: typeof props.icon === 'string' ? props.icon : 'calendar_range', tabIndex: -1 })),
|
|
67
|
+
props.showRemove && props.inputProps.value && (React.createElement(Icon_1["default"], { className: bem.element('close-icon'), onClick: function (e) {
|
|
68
68
|
e.preventDefault();
|
|
69
69
|
props.onClear();
|
|
70
|
-
}, name: typeof props.icon === 'string' ? props.icon : '
|
|
70
|
+
}, name: typeof props.icon === 'string' ? props.icon : 'cross_8x8' })))))));
|
|
71
71
|
}
|
|
72
72
|
exports["default"] = DateTimeFieldView;
|
|
@@ -1,117 +1,15 @@
|
|
|
1
1
|
.DateTimeFieldView {
|
|
2
|
-
|
|
2
|
+
$root: &;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
position: relative;
|
|
4
|
+
@include date-default-input();
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
border: 1px solid $border-default;
|
|
9
|
-
border-radius: 4px;
|
|
6
|
+
@include date-default-body();
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
outline: 0;
|
|
13
|
-
border-color: $border-action;
|
|
14
|
-
box-shadow: 0 0 0 1px $border-typing;
|
|
15
|
-
}
|
|
16
|
-
*:focus {
|
|
17
|
-
outline: none;
|
|
18
|
-
}
|
|
8
|
+
@include date-default-sizes($root);
|
|
19
9
|
|
|
20
|
-
|
|
21
|
-
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color: $back-disabled;
|
|
23
|
-
cursor: not-allowed;
|
|
10
|
+
@include icon-container($root);
|
|
24
11
|
|
|
25
|
-
|
|
26
|
-
cursor: inherit;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
&_no-border {
|
|
30
|
-
border: unset;
|
|
31
|
-
}
|
|
12
|
+
@include date-time-panel($root);
|
|
32
13
|
|
|
33
|
-
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-flow: row nowrap;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__body {
|
|
39
|
-
height: 100%;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-flow: row nowrap;
|
|
42
|
-
align-items: center;
|
|
43
|
-
|
|
44
|
-
&:hover #{$root}__icon_close {
|
|
45
|
-
opacity: 1;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&__input {
|
|
50
|
-
width: 100%;
|
|
51
|
-
flex-grow: 1;
|
|
52
|
-
border: none;
|
|
53
|
-
outline: none;
|
|
54
|
-
background-color: transparent;
|
|
55
|
-
|
|
56
|
-
padding: $input-padding-y $input-padding-x;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&__icon-container {
|
|
60
|
-
position: relative;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
}
|
|
65
|
-
&__icon {
|
|
66
|
-
display: flex;
|
|
67
|
-
height: 16px;
|
|
68
|
-
|
|
69
|
-
path {
|
|
70
|
-
fill: $border-default;
|
|
71
|
-
transition: fill .1s ease-in;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&_close{
|
|
75
|
-
position: absolute;
|
|
76
|
-
background-color: $white;
|
|
77
|
-
|
|
78
|
-
opacity: 0;
|
|
79
|
-
transition: opacity .2s ease-in;
|
|
80
|
-
|
|
81
|
-
&:hover {
|
|
82
|
-
path {
|
|
83
|
-
fill: $grey-dark;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&__calendar {
|
|
90
|
-
.DayPicker-Footer {
|
|
91
|
-
justify-content: flex-start !important;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&__time-panel {
|
|
96
|
-
.TimePanelView__column {
|
|
97
|
-
height: 291px;
|
|
98
|
-
|
|
99
|
-
&:first-child {
|
|
100
|
-
border-left: 1px solid $border-default;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&__calendar {
|
|
106
|
-
.DayPicker-Footer {
|
|
107
|
-
justify-content: flex-start !important;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&__time {
|
|
112
|
-
.TimePanelView__column {
|
|
113
|
-
height: 291px;
|
|
114
|
-
border-left: 1px solid $border-default;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
14
|
+
@include date-default-effects($root);
|
|
117
15
|
}
|
|
@@ -43,31 +43,33 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
43
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
|
-
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
47
46
|
var TimePanelView_1 = __importDefault(require("../TimeField/TimePanelView"));
|
|
48
47
|
function DateTimeRangeFieldView(props) {
|
|
49
48
|
var bem = (0, hooks_1.useBem)('DateTimeRangeFieldView');
|
|
49
|
+
var hasValue = props.inputPropsFrom.value || props.inputPropsTo.value;
|
|
50
50
|
var renderCalendar = (0, react_1.useCallback)(function () { return (React.createElement("div", { className: bem.element('panel-container') },
|
|
51
51
|
React.createElement(Calendar_1["default"], __assign({}, props.calendarProps, { className: bem.element('calendar') })),
|
|
52
|
+
React.createElement("div", { className: bem.element('separator') }),
|
|
52
53
|
React.createElement(TimePanelView_1["default"], __assign({}, props.timePanelViewProps, { className: bem.element('time-panel') })))); }, [bem, props.calendarProps, props.timePanelViewProps]);
|
|
53
54
|
return (React.createElement(DropDown_1["default"], { content: renderCalendar, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose },
|
|
54
55
|
React.createElement("div", { className: bem(bem.block({
|
|
55
56
|
disabled: props.disabled,
|
|
56
|
-
|
|
57
|
+
size: props.size,
|
|
58
|
+
'is-invalid': !!props.errors
|
|
57
59
|
}), props.className), style: props.style },
|
|
58
60
|
React.createElement("div", { className: bem.element('body') },
|
|
59
61
|
React.createElement("input", __assign({}, props.inputPropsFrom, { className: bem(bem.element('input', {
|
|
60
62
|
size: props.size
|
|
61
|
-
})
|
|
62
|
-
React.createElement("span", { className: bem.element('divider') }, "-"),
|
|
63
|
+
})), onChange: function (e) { return props.inputPropsFrom.onChange(e.target.value); } })),
|
|
63
64
|
React.createElement("input", __assign({}, props.inputPropsTo, { className: bem(bem.element('input', {
|
|
64
65
|
size: props.size
|
|
65
66
|
}), !!props.errorsTo && 'is-invalid'), onChange: function (e) { return props.inputPropsTo.onChange(e.target.value); } })),
|
|
66
67
|
React.createElement("div", { className: bem.element('icon-container') },
|
|
67
|
-
props.icon && (React.createElement(Icon_1["default"], { className: bem.element('icon'), name:
|
|
68
|
-
props.showRemove &&
|
|
68
|
+
props.icon && !hasValue && (React.createElement(Icon_1["default"], { className: bem.element('date-icon'), name: typeof props.icon === 'string' ? props.icon : 'calendar_range', tabIndex: -1 })),
|
|
69
|
+
props.showRemove && hasValue && (React.createElement(Icon_1["default"], { className: bem.element('close-icon'), onClick: function (e) {
|
|
69
70
|
e.preventDefault();
|
|
70
71
|
props.onClear();
|
|
71
|
-
}, name: '
|
|
72
|
+
}, name: 'cross_8x8' }))),
|
|
73
|
+
React.createElement("span", { className: bem.element('effect') })))));
|
|
72
74
|
}
|
|
73
75
|
exports["default"] = DateTimeRangeFieldView;
|
|
@@ -1,102 +1,37 @@
|
|
|
1
1
|
.DateTimeRangeFieldView {
|
|
2
|
-
|
|
2
|
+
$root: &;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
position: relative;
|
|
4
|
+
@include icon-container($root);
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
border: 1px solid $border-default;
|
|
9
|
-
border-radius: 4px;
|
|
6
|
+
@include date-range-body($root);
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
outline: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&_disabled {
|
|
21
|
-
opacity: .7;
|
|
22
|
-
color: rgba(0, 0, 0, .25);
|
|
23
|
-
background-color: $back-disabled;
|
|
24
|
-
cursor: not-allowed;
|
|
25
|
-
input {
|
|
26
|
-
cursor: inherit;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
&_no-border {
|
|
30
|
-
border: unset;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&__panel-container {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-flow: row nowrap;
|
|
36
|
-
}
|
|
37
|
-
&__calendar {
|
|
38
|
-
.DayPicker-Footer {
|
|
39
|
-
justify-content: flex-start !important;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
&__time-panel {
|
|
43
|
-
.TimePanelView__column {
|
|
44
|
-
height: 291px;
|
|
45
|
-
|
|
46
|
-
&:first-child {
|
|
47
|
-
border-left: 1px solid $border-default;
|
|
48
|
-
}
|
|
8
|
+
&__body {
|
|
9
|
+
> * {
|
|
10
|
+
&:nth-child(1) {
|
|
11
|
+
width: 140px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
49
14
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&__body {
|
|
53
|
-
height: 100%;
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-flow: row nowrap;
|
|
56
|
-
align-items: center;
|
|
57
15
|
|
|
58
|
-
|
|
59
|
-
|
|
16
|
+
&_size {
|
|
17
|
+
@each $size, $size-map in $date-sizes {
|
|
18
|
+
&_#{$size} {
|
|
19
|
+
#{$root}__body {
|
|
20
|
+
#{$root}__input {
|
|
21
|
+
&:nth-child(1) {
|
|
22
|
+
width: calc(map-get($size-map, first-input-width) + 60px);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
60
28
|
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__input {
|
|
64
|
-
width: 100%;
|
|
65
|
-
flex-grow: 1;
|
|
66
|
-
border: none;
|
|
67
|
-
outline: none;
|
|
68
|
-
background-color: transparent;
|
|
69
29
|
|
|
70
|
-
|
|
71
|
-
}
|
|
30
|
+
@include date-range-input();
|
|
72
31
|
|
|
73
|
-
|
|
74
|
-
position: relative;
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
}
|
|
79
|
-
&__icon {
|
|
80
|
-
display: flex;
|
|
81
|
-
height: 16px;
|
|
82
|
-
|
|
83
|
-
path {
|
|
84
|
-
fill: $grey-light;
|
|
85
|
-
transition: fill .1s ease-in;
|
|
86
|
-
}
|
|
32
|
+
@include date-range-sizes($root);
|
|
87
33
|
|
|
88
|
-
|
|
89
|
-
position: absolute;
|
|
90
|
-
background-color: $white;
|
|
34
|
+
@include date-range-effects($root);
|
|
91
35
|
|
|
92
|
-
|
|
93
|
-
transition: opacity .2s ease-in;
|
|
94
|
-
|
|
95
|
-
&:hover {
|
|
96
|
-
path {
|
|
97
|
-
fill: $grey-dark;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
36
|
+
@include date-time-panel($root);
|
|
102
37
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -35,6 +35,9 @@ exports["default"] = {
|
|
|
35
35
|
'content.BadgeView': {
|
|
36
36
|
lazy: function () { return require('./content/Badge/BadgeView')["default"]; }
|
|
37
37
|
},
|
|
38
|
+
'content.CopyToClipboardView': {
|
|
39
|
+
lazy: function () { return require('./content/CopyToClipBoard/CopyToClipboardView')["default"]; }
|
|
40
|
+
},
|
|
38
41
|
'form.AutoCompleteFieldView': {
|
|
39
42
|
lazy: function () { return require('./form/AutoCompleteField/AutoCompleteFieldView')["default"]; }
|
|
40
43
|
},
|
package/index.scss
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
@import './content/Menu/MenuItemView';
|
|
19
19
|
@import './content/Menu/MenuView';
|
|
20
20
|
@import './content/Icon/IconView';
|
|
21
|
+
@import './content/CopyToClipBoard/CopyToClipboardView';
|
|
21
22
|
@import './form/AutoCompleteField/AutoCompleteFieldView';
|
|
22
23
|
@import './form/Button/ButtonView';
|
|
23
24
|
@import './form/CheckboxField/CheckboxFieldView';
|
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.57",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-use": "^17.4.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
38
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.40",
|
|
39
39
|
"@steroidsjs/eslint-config": "^2.1.4",
|
|
40
40
|
"@types/enzyme": "^3.10.8",
|
|
41
41
|
"@types/googlemaps": "^3.43.3",
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"typescript": "^4.9.5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
56
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.40"
|
|
57
57
|
}
|
|
58
58
|
}
|