@steroidsjs/bootstrap 3.0.0-beta.6 → 3.0.0-beta.60
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 +1 -2
- package/content/Accordion/AccordionItemView.d.ts +2 -0
- package/content/{Collapse/CollapseItemView.js → Accordion/AccordionItemView.js} +47 -22
- package/content/Accordion/AccordionItemView.scss +209 -0
- package/content/Accordion/AccordionView.d.ts +2 -0
- package/content/{Collapse/CollapseView.js → Accordion/AccordionView.js} +3 -3
- package/content/{Collapse/CollapseView.scss → Accordion/AccordionView.scss} +3 -4
- package/content/Alert/AlertView.js +3 -2
- package/content/Alert/AlertView.scss +19 -4
- package/content/Avatar/AvatarView.js +2 -3
- package/content/Avatar/AvatarView.scss +32 -39
- package/content/Badge/BadgeView.d.ts +3 -0
- package/content/Badge/BadgeView.js +25 -0
- package/content/Badge/BadgeView.scss +135 -0
- package/content/Calendar/CalendarView.js +1 -1
- package/content/Calendar/CalendarView.scss +240 -161
- package/content/Calendar/CaptionElement.js +23 -15
- package/content/Calendar/CaptionElement.scss +164 -106
- package/content/Card/CardView.js +37 -14
- package/content/Card/CardView.scss +139 -107
- package/content/CopyToClipboard/CopyToClipboardView.d.ts +3 -0
- package/content/CopyToClipboard/CopyToClipboardView.js +19 -0
- package/content/CopyToClipboard/CopyToClipboardView.scss +41 -0
- package/content/Detail/DetailView.scss +75 -52
- package/content/DropDown/DropDownView.d.ts +0 -1
- package/content/DropDown/DropDownView.js +6 -4
- package/content/DropDown/DropDownView.scss +196 -27
- package/content/Icon/IconView.d.ts +1 -2
- package/content/Icon/IconView.js +2 -2
- package/content/Icon/IconView.scss +1 -23
- package/content/Menu/MenuItemView.d.ts +2 -0
- package/content/Menu/MenuItemView.js +15 -0
- package/content/Menu/MenuItemView.scss +63 -0
- package/content/Menu/MenuView.d.ts +2 -0
- package/content/Menu/MenuView.js +30 -0
- package/content/Menu/MenuView.scss +43 -0
- package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +1 -2
- package/form/AutoCompleteField/AutoCompleteFieldView.js +62 -8
- package/form/AutoCompleteField/AutoCompleteFieldView.scss +199 -142
- package/form/Button/ButtonView.d.ts +1 -2
- package/form/Button/ButtonView.js +13 -9
- package/form/Button/ButtonView.scss +168 -68
- package/form/CheckboxField/CheckboxFieldView.d.ts +1 -2
- package/form/CheckboxField/CheckboxFieldView.js +6 -4
- package/form/CheckboxField/CheckboxFieldView.scss +195 -36
- package/form/CheckboxListField/CheckboxListFieldView.d.ts +1 -2
- package/form/CheckboxListField/CheckboxListFieldView.js +18 -15
- package/form/CheckboxListField/CheckboxListFieldView.scss +7 -41
- package/form/DateField/DateFieldView.js +7 -6
- package/form/DateField/DateFieldView.scss +7 -74
- package/form/DateRangeField/DateRangeFieldView.js +10 -13
- package/form/DateRangeField/DateRangeFieldView.scss +29 -78
- package/form/DateTimeField/DateTimeFieldView.d.ts +1 -2
- 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.js +31 -47
- package/form/DropDownField/DropDownFieldView.scss +388 -182
- package/form/DropDownField/utils.d.ts +2 -0
- package/form/DropDownField/utils.js +15 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.d.ts +2 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.js +78 -0
- package/form/DropDownFieldItem/DropDownFieldItemView.scss +218 -0
- package/form/FieldLayout/FieldLayoutView.d.ts +1 -2
- package/form/FieldLayout/FieldLayoutView.js +13 -9
- package/form/FieldLayout/FieldLayoutView.scss +114 -19
- package/form/FieldList/FieldListItemView.js +6 -4
- package/form/FieldList/FieldListItemView.scss +17 -39
- package/form/FieldList/FieldListView.js +9 -8
- package/form/FieldList/FieldListView.scss +58 -18
- package/form/FieldSet/FieldSetView.js +4 -2
- package/form/FieldSet/FieldSetView.scss +39 -0
- package/form/FileField/FileFieldItemView.d.ts +1 -2
- package/form/FileField/FileFieldItemView.js +31 -6
- package/form/FileField/FileFieldItemView.scss +254 -13
- package/form/FileField/FileFieldView.d.ts +1 -2
- package/form/FileField/FileFieldView.js +6 -8
- package/form/FileField/FileFieldView.scss +34 -4
- package/form/Form/FormView.js +1 -4
- package/form/Form/FormView.scss +1 -14
- package/form/HtmlField/HtmlFieldView.d.ts +1 -2
- package/form/HtmlField/HtmlFieldView.scss +6 -3
- package/form/ImageField/ImageFieldView.js +1 -1
- package/form/InputField/InputFieldView.d.ts +1 -2
- package/form/InputField/InputFieldView.js +30 -13
- package/form/InputField/InputFieldView.scss +265 -99
- package/form/NumberField/NumberFieldView.d.ts +1 -2
- package/form/NumberField/NumberFieldView.js +19 -13
- package/form/NumberField/NumberFieldView.scss +195 -89
- package/form/PasswordField/PasswordFieldView.d.ts +1 -2
- package/form/PasswordField/PasswordFieldView.js +11 -9
- package/form/PasswordField/PasswordFieldView.scss +231 -63
- package/form/RadioField/RadioFieldView.d.ts +2 -0
- package/form/RadioField/RadioFieldView.js +57 -0
- package/form/RadioField/RadioFieldView.scss +226 -0
- package/form/RadioListField/RadioListFieldView.d.ts +1 -2
- package/form/RadioListField/RadioListFieldView.js +20 -16
- package/form/RadioListField/RadioListFieldView.scss +11 -1
- package/form/ReCaptchaField/ReCaptchaFieldView.d.ts +1 -2
- package/form/ReCaptchaField/ReCaptchaFieldView.js +2 -2
- package/form/SliderField/SliderFieldView.d.ts +1 -2
- package/form/SwitcherField/SwitcherFieldView.d.ts +1 -2
- package/form/SwitcherField/SwitcherFieldView.js +12 -7
- package/form/SwitcherField/SwitcherFieldView.scss +188 -1
- package/form/TextField/TextFieldView.d.ts +1 -2
- package/form/TextField/TextFieldView.js +10 -2
- package/form/TextField/TextFieldView.scss +144 -2
- package/form/TimeField/TimeFieldView.d.ts +1 -2
- package/icons/index.d.ts +2 -0
- package/icons/index.js +103 -0
- package/icons/svgs/add.svg +4 -0
- package/icons/svgs/add_square.svg +5 -0
- package/icons/svgs/arrow_down_18x18.svg +4 -0
- package/icons/svgs/arrow_down_24x24.svg +4 -0
- package/icons/svgs/arrow_drop_down_10x10.svg +3 -0
- package/icons/svgs/arrow_left_18x18.svg +4 -0
- package/icons/svgs/arrow_left_24x24.svg +4 -0
- package/icons/svgs/arrow_right_18x18.svg +4 -0
- package/icons/svgs/arrow_right_24x24.svg +4 -0
- package/icons/svgs/arrow_up_18x18.svg +4 -0
- package/icons/svgs/arrow_up_24x24.svg +4 -0
- package/icons/svgs/blank.svg +4 -0
- package/icons/svgs/calendar_check.svg +5 -0
- package/icons/svgs/calendar_range.svg +8 -0
- package/icons/svgs/cancel_ellips.svg +4 -0
- package/icons/svgs/chart.svg +6 -0
- package/icons/svgs/checkmark_12x12.svg +4 -0
- package/icons/svgs/checkmark_8x8.svg +4 -0
- package/icons/svgs/circle_cross_12x12.svg +4 -0
- package/icons/svgs/circle_cross_16x16.svg +4 -0
- package/icons/svgs/circle_cross_18x18.svg +4 -0
- package/icons/svgs/clip.svg +3 -0
- package/icons/svgs/copy.svg +5 -0
- package/icons/svgs/cross_12x12.svg +4 -0
- package/icons/svgs/cross_4x4.svg +3 -0
- package/icons/svgs/cross_8x8.svg +4 -0
- package/icons/svgs/cut.svg +3 -0
- package/icons/svgs/date_range.svg +8 -0
- package/icons/svgs/default_16x16.svg +4 -0
- package/icons/svgs/default_24x24.svg +11 -0
- package/icons/svgs/double_arrow_down.svg +5 -0
- package/icons/svgs/double_arrow_left.svg +5 -0
- package/icons/svgs/double_arrow_right.svg +5 -0
- package/icons/svgs/double_arrow_up.svg +5 -0
- package/icons/svgs/doughnut_chart.svg +5 -0
- package/icons/svgs/edit.svg +4 -0
- package/icons/svgs/error_16x16.svg +5 -0
- package/icons/svgs/error_24x24.svg +12 -0
- package/icons/svgs/expand_down.svg +3 -0
- package/icons/svgs/expand_left.svg +3 -0
- package/icons/svgs/expand_left_double.svg +4 -0
- package/icons/svgs/expand_right.svg +3 -0
- package/icons/svgs/expand_right_double.svg +4 -0
- package/icons/svgs/expand_up.svg +3 -0
- package/icons/svgs/file_dock.svg +6 -0
- package/icons/svgs/filter.svg +3 -0
- package/icons/svgs/fluid.svg +4 -0
- package/icons/svgs/folder.svg +3 -0
- package/icons/svgs/group.svg +8 -0
- package/icons/svgs/home.svg +4 -0
- package/icons/svgs/img_box.svg +5 -0
- package/icons/svgs/import.svg +4 -0
- package/icons/svgs/info_16x16.svg +5 -0
- package/icons/svgs/info_24x24.svg +12 -0
- package/icons/svgs/left_12x12.svg +3 -0
- package/icons/svgs/loading_default.svg +3 -0
- package/icons/svgs/loading_icon_thick.svg +3 -0
- package/icons/svgs/loading_purple.svg +9 -0
- package/icons/svgs/map.svg +7 -0
- package/icons/svgs/menu_dots.svg +5 -0
- package/icons/svgs/menu_left.svg +5 -0
- package/icons/svgs/minis_sq.svg +4 -0
- package/icons/svgs/paste.svg +8 -0
- package/icons/svgs/pie_chart.svg +5 -0
- package/icons/svgs/pin.svg +4 -0
- package/icons/svgs/sad.svg +6 -0
- package/icons/svgs/search.svg +4 -0
- package/icons/svgs/setting_line.svg +3 -0
- package/icons/svgs/share.svg +7 -0
- package/icons/svgs/star.svg +3 -0
- package/icons/svgs/success_16x16.svg +4 -0
- package/icons/svgs/success_24x24.svg +11 -0
- package/icons/svgs/support.svg +3 -0
- package/icons/svgs/trash.svg +6 -0
- package/icons/svgs/upload.svg +4 -0
- package/icons/svgs/user.svg +4 -0
- package/icons/svgs/view.svg +4 -0
- package/icons/svgs/view_hide.svg +5 -0
- package/icons/svgs/warning_16x16.svg +5 -0
- package/icons/svgs/warning_24x24.svg +12 -0
- package/index.d.ts +26 -2
- package/index.js +28 -4
- package/index.scss +16 -3
- package/layout/Header/HeaderView.scss +3 -3
- package/layout/Loader/LoaderView.d.ts +2 -2
- package/layout/Loader/LoaderView.js +6 -2
- package/layout/Loader/LoaderView.scss +67 -22
- package/layout/Notifications/NotificationsItemView.d.ts +1 -2
- package/layout/Notifications/NotificationsView.d.ts +1 -2
- package/layout/ProgressBar/CircleProgressBarView.d.ts +1 -2
- package/layout/ProgressBar/LineProgressBarView.d.ts +1 -2
- package/layout/Tooltip/TooltipView.d.ts +1 -2
- package/layout/Tooltip/TooltipView.js +6 -6
- package/layout/Tooltip/TooltipView.scss +45 -37
- package/list/CheckboxColumn/CheckboxColumnView.d.ts +1 -2
- package/list/CheckboxColumn/CheckboxColumnView.js +2 -1
- package/list/ControlsColumnView/ControlsColumnView.d.ts +1 -2
- package/list/Grid/GridView.js +8 -4
- package/list/Grid/GridView.scss +148 -37
- package/list/Grid/views/ContentColumnView/ContentColumnView.d.ts +3 -0
- package/list/Grid/views/ContentColumnView/ContentColumnView.js +51 -0
- package/list/Grid/views/ContentColumnView/ContentColumnView.scss +88 -0
- package/list/Grid/views/ContentColumnView/index.d.ts +2 -0
- package/list/Grid/views/ContentColumnView/index.js +7 -0
- package/list/List/ListItemView.d.ts +1 -2
- package/list/List/ListView.js +5 -7
- package/list/List/ListView.scss +32 -1
- package/list/Pagination/PaginationButtonView.js +34 -5
- package/list/Pagination/PaginationButtonView.scss +265 -1
- package/list/Pagination/PaginationMoreView.js +1 -1
- package/list/Pagination/PaginationMoreView.scss +4 -1
- package/modal/Modal/ModalView.d.ts +1 -2
- package/modal/Modal/ModalView.js +4 -7
- package/modal/Modal/ModalView.scss +129 -93
- package/modal/TwoFactorModal/TwoFactorModalView.d.ts +1 -2
- package/nav/Breadcrubms/BreadcrumbsView.js +9 -1
- package/nav/Breadcrubms/BreadcrumbsView.scss +49 -0
- package/nav/ButtonGroup/ButtonGroupView.d.ts +2 -0
- package/nav/ButtonGroup/ButtonGroupView.js +32 -0
- package/nav/ButtonGroup/ButtonGroupView.scss +83 -0
- package/nav/Controls/ControlsView.d.ts +1 -2
- package/nav/Controls/ControlsView.scss +9 -3
- package/nav/Nav/NavBarView.d.ts +1 -2
- package/nav/Nav/NavButtonView.d.ts +1 -2
- package/nav/Nav/NavIconView.d.ts +1 -2
- package/nav/Nav/NavIconView.js +1 -1
- package/nav/Nav/NavLinkView.d.ts +1 -2
- package/nav/Nav/NavListView.d.ts +1 -2
- package/nav/Nav/NavListView.js +1 -1
- package/nav/Nav/NavTabsView.d.ts +1 -2
- package/nav/Nav/NavTabsView.js +1 -1
- package/nav/Tree/TreeView.d.ts +1 -2
- package/nav/Tree/TreeView.scss +14 -11
- package/package.json +56 -56
- package/scss/animations/index.scss +1 -0
- package/scss/animations/loading.scss +13 -0
- package/scss/fonts.scss +6 -0
- package/scss/mixins/button.scss +80 -24
- package/scss/mixins/customMixins.scss +5 -0
- package/scss/mixins/date.scss +397 -0
- package/scss/mixins/index.scss +4 -1
- package/scss/mixins/scroll.scss +31 -0
- package/scss/mixins/typography.scss +26 -0
- package/scss/variables/common/colors.scss +119 -69
- package/scss/variables/common/media.scss +2 -0
- package/scss/variables/common/typography.scss +96 -28
- package/scss/variables/common/variables.scss +1 -0
- package/scss/variables/components/input.scss +7 -6
- package/scss/variables/index.scss +3 -2
- package/scss/variables/normalize.scss +25 -0
- package/typography/Text/TextView.d.ts +3 -0
- package/typography/Text/TextView.js +46 -0
- package/typography/Text/TextView.scss +16 -0
- package/typography/Title/TitleView.d.ts +3 -0
- package/typography/Title/TitleView.js +50 -0
- package/typography/Title/TitleView.scss +16 -0
- package/utils/renderIcon.d.ts +9 -0
- package/utils/renderIcon.js +27 -0
- package/content/Collapse/CollapseItemView.d.ts +0 -2
- package/content/Collapse/CollapseItemView.scss +0 -88
- package/content/Collapse/CollapseView.d.ts +0 -2
- package/icons/fontawesome.d.ts +0 -2
- package/icons/fontawesome.js +0 -254
- package/list/List/ListItemView.scss +0 -3
- package/scss/mixins/card.scss +0 -26
- package/scss/variables/components/card.scss +0 -20
|
@@ -1,81 +1,14 @@
|
|
|
1
1
|
.DateFieldView {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
padding-right: 8px;
|
|
5
|
-
position: relative;
|
|
6
|
-
|
|
7
|
-
background-color: $white;
|
|
8
|
-
border: 1px solid $border-default;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
|
|
11
|
-
&:focus-within{
|
|
12
|
-
outline: 0;
|
|
13
|
-
border-color: $border-action;
|
|
14
|
-
box-shadow: 0 0 0 1px $border-typing;
|
|
15
|
-
}
|
|
16
|
-
*:focus {
|
|
17
|
-
outline: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&_disabled {
|
|
21
|
-
color: rgba(0, 0, 0, .25);
|
|
22
|
-
background-color: $grey-disabled;
|
|
23
|
-
cursor: not-allowed;
|
|
24
|
-
input {
|
|
25
|
-
cursor: inherit;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
&_no-border {
|
|
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
|
-
padding: $input-padding-y $input-padding-x;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&__icon-container {
|
|
2
|
+
$root: &;
|
|
53
3
|
position: relative;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
}
|
|
58
|
-
&__icon {
|
|
59
|
-
display: flex;
|
|
60
|
-
height: 16px;
|
|
61
4
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
5
|
+
@include date-default-input();
|
|
6
|
+
|
|
7
|
+
@include date-default-body();
|
|
66
8
|
|
|
67
|
-
|
|
68
|
-
position: absolute;
|
|
69
|
-
background-color: $white;
|
|
9
|
+
@include icon-container($root);
|
|
70
10
|
|
|
71
|
-
|
|
72
|
-
transition: opacity .2s ease-in;
|
|
11
|
+
@include date-default-sizes($root);
|
|
73
12
|
|
|
74
|
-
|
|
75
|
-
path {
|
|
76
|
-
fill: $grey-dark;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
13
|
+
@include date-default-effects($root);
|
|
81
14
|
}
|
|
@@ -43,28 +43,25 @@ 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
|
function DateRangeFieldView(props) {
|
|
48
47
|
var bem = (0, hooks_1.useBem)('DateRangeFieldView');
|
|
48
|
+
var hasValue = props.inputPropsFrom.value || props.inputPropsTo.value;
|
|
49
49
|
var renderCalendar = (0, react_1.useCallback)(function () { return (React.createElement(Calendar_1["default"], __assign({}, props.calendarProps))); }, [props.calendarProps]);
|
|
50
|
-
return (React.createElement(DropDown_1["default"], { content: renderCalendar, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose },
|
|
50
|
+
return (React.createElement(DropDown_1["default"], { content: renderCalendar, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose, className: bem.element('split') },
|
|
51
51
|
React.createElement("div", { className: bem(bem.block({
|
|
52
52
|
disabled: props.disabled,
|
|
53
|
-
|
|
53
|
+
size: props.size,
|
|
54
|
+
'is-invalid': !!props.errors
|
|
54
55
|
}), props.className), style: props.style },
|
|
55
56
|
React.createElement("div", { className: bem.element('body') },
|
|
56
|
-
React.createElement("input", __assign({}, props.inputPropsFrom, { className: bem(bem.element('input', {
|
|
57
|
-
|
|
58
|
-
}), !!props.errorsFrom && 'is-invalid'), onChange: function (e) { return props.inputPropsFrom.onChange(e.target.value); } })),
|
|
59
|
-
React.createElement("span", { className: bem.element('divider') }, "-"),
|
|
60
|
-
React.createElement("input", __assign({}, props.inputPropsTo, { className: bem(bem.element('input', {
|
|
61
|
-
size: props.size
|
|
62
|
-
}), !!props.errorsTo && 'is-invalid'), onChange: function (e) { return props.inputPropsTo.onChange(e.target.value); } })),
|
|
57
|
+
React.createElement("input", __assign({}, props.inputPropsFrom, { className: bem(bem.element('input', {})), onChange: function (e) { return props.inputPropsFrom.onChange(e.target.value); } })),
|
|
58
|
+
React.createElement("input", __assign({}, props.inputPropsTo, { className: bem.element('input'), onChange: function (e) { return props.inputPropsTo.onChange(e.target.value); } })),
|
|
63
59
|
React.createElement("div", { className: bem.element('icon-container') },
|
|
64
|
-
props.icon && (React.createElement(Icon_1["default"], { className: bem.element('icon'), name:
|
|
65
|
-
props.showRemove &&
|
|
60
|
+
props.icon && !hasValue && (React.createElement(Icon_1["default"], { className: bem.element('date-icon'), name: typeof props.icon === 'string' ? props.icon : 'calendar_range', tabIndex: -1 })),
|
|
61
|
+
props.showRemove && hasValue && (React.createElement(Icon_1["default"], { className: bem.element('close-icon'), onClick: function (e) {
|
|
66
62
|
e.preventDefault();
|
|
67
63
|
props.onClear();
|
|
68
|
-
}, name: '
|
|
64
|
+
}, name: 'cross_8x8' }))),
|
|
65
|
+
React.createElement("span", { className: bem.element('effect') })))));
|
|
69
66
|
}
|
|
70
67
|
exports["default"] = DateRangeFieldView;
|
|
@@ -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
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
2
1
|
import { IDateTimeFieldViewProps } from '@steroidsjs/core/ui/form/DateTimeField/DateTimeField';
|
|
3
|
-
export default function DateTimeFieldView(props: IDateTimeFieldViewProps
|
|
2
|
+
export default function DateTimeFieldView(props: IDateTimeFieldViewProps): JSX.Element;
|
|
@@ -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
|
}
|