@steroidsjs/bootstrap 3.0.29 → 3.0.32

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.
Files changed (55) hide show
  1. package/content/Accordion/AccordionItemView.js +0 -1
  2. package/content/Accordion/AccordionItemView.scss +56 -7
  3. package/content/Accordion/AccordionView.scss +2 -0
  4. package/content/Calendar/CalendarView.js +8 -3
  5. package/content/Calendar/CalendarView.scss +2 -10
  6. package/form/AutoCompleteField/AutoCompleteFieldView.scss +10 -4
  7. package/form/Button/ButtonView.scss +4 -3
  8. package/form/DateField/DateFieldView.js +1 -1
  9. package/form/DateRangeField/DateRangeFieldView.js +11 -2
  10. package/form/DateRangeField/DateRangeFieldView.scss +54 -0
  11. package/form/DateRangeField/views/RangeButtons/RangeButtons.d.ts +11 -0
  12. package/form/DateRangeField/views/RangeButtons/RangeButtons.js +60 -0
  13. package/form/DateRangeField/views/RangeButtons/RangeButtons.scss +126 -0
  14. package/form/DateRangeField/views/RangeButtons/consts.d.ts +34 -0
  15. package/form/DateRangeField/views/RangeButtons/consts.js +71 -0
  16. package/form/DateRangeField/views/RangeButtons/index.d.ts +2 -0
  17. package/form/DateRangeField/views/RangeButtons/index.js +7 -0
  18. package/form/DateRangeField/views/RangeButtons/utils.d.ts +14 -0
  19. package/form/DateRangeField/views/RangeButtons/utils.js +36 -0
  20. package/form/DateTimeField/DateTimeFieldView.js +1 -1
  21. package/form/DateTimeRangeField/DateTimeRangeFieldView.js +13 -4
  22. package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +54 -0
  23. package/form/DropDownField/DropDownFieldView.js +3 -2
  24. package/form/DropDownField/DropDownFieldView.scss +12 -0
  25. package/form/InputField/InputFieldView.js +4 -4
  26. package/form/InputField/InputFieldView.scss +128 -174
  27. package/form/PasswordField/PasswordFieldView.scss +12 -3
  28. package/form/TimeField/TimeFieldView.js +1 -1
  29. package/form/TimeField/TimeFieldView.scss +19 -1
  30. package/form/TimeField/TimePanelView.d.ts +5 -0
  31. package/form/TimeField/TimePanelView.js +20 -22
  32. package/form/TimeField/TimePanelView.scss +0 -23
  33. package/form/TimeField/views/TimePanelColumn/TimePanelColumn.d.ts +8 -0
  34. package/form/TimeField/views/TimePanelColumn/TimePanelColumn.js +20 -0
  35. package/form/TimeField/views/TimePanelColumn/TimePanelColumn.scss +53 -0
  36. package/form/TimeField/views/TimePanelColumn/index.d.ts +2 -0
  37. package/form/TimeField/views/TimePanelColumn/index.js +7 -0
  38. package/form/TimeRangeField/TimeRangeFieldView.js +1 -1
  39. package/form/TimeRangeField/TimeRangeFieldView.scss +6 -0
  40. package/hooks/index.d.ts +2 -0
  41. package/hooks/index.js +8 -0
  42. package/hooks/useHideScroll.d.ts +1 -0
  43. package/hooks/useHideScroll.js +37 -0
  44. package/icons/index.js +2 -0
  45. package/icons/svgs/long-arrow-alt-down.svg +3 -0
  46. package/icons/svgs/long-arrow-alt-up.svg +3 -0
  47. package/list/Grid/GridView.js +2 -3
  48. package/list/Grid/GridView.scss +46 -0
  49. package/list/Grid/views/DiagramColumnView/DiagramColumnView.scss +6 -5
  50. package/modal/Modal/ModalView.js +3 -1
  51. package/modal/Modal/ModalView.scss +0 -5
  52. package/package.json +2 -2
  53. package/scss/mixins/button.scss +5 -5
  54. package/scss/mixins/date.scss +2 -2
  55. package/scss/normalize.scss +5 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ exports.__esModule = true;
6
+ var RangeButtons_1 = __importDefault(require("./RangeButtons"));
7
+ exports["default"] = RangeButtons_1["default"];
@@ -0,0 +1,14 @@
1
+ import { ILocaleComponent } from '@steroidsjs/core/components/LocaleComponent';
2
+ export declare const getEndOfDay: (date: ReturnType<ILocaleComponent['dayjs']>) => import("dayjs").Dayjs;
3
+ export declare const getCurrentWeek: (locale: ILocaleComponent) => {
4
+ start: import("dayjs").Dayjs;
5
+ finish: import("dayjs").Dayjs;
6
+ };
7
+ export declare const getCurrentMonth: (locale: ILocaleComponent) => {
8
+ start: import("dayjs").Dayjs;
9
+ finish: import("dayjs").Dayjs;
10
+ };
11
+ export declare const getCurrentYear: (locale: ILocaleComponent) => {
12
+ start: import("dayjs").Dayjs;
13
+ finish: import("dayjs").Dayjs;
14
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.getCurrentYear = exports.getCurrentMonth = exports.getCurrentWeek = exports.getEndOfDay = void 0;
4
+ var getEndOfDay = function (date) { return date.hour(23).minute(59).second(59); };
5
+ exports.getEndOfDay = getEndOfDay;
6
+ var getCurrentWeek = function (locale) {
7
+ var today = locale.dayjs(new Date().toDateString());
8
+ var dayOfWeek = today.day();
9
+ var startDate = today.subtract(dayOfWeek === 0 ? 6 : dayOfWeek - 1, 'day');
10
+ var finishDate = startDate.add(6, 'day');
11
+ return {
12
+ start: startDate,
13
+ finish: (0, exports.getEndOfDay)(finishDate)
14
+ };
15
+ };
16
+ exports.getCurrentWeek = getCurrentWeek;
17
+ var getCurrentMonth = function (locale) {
18
+ var today = locale.dayjs(new Date().toDateString());
19
+ var startDate = today.startOf('month');
20
+ var finishDate = today.endOf('month');
21
+ return {
22
+ start: startDate,
23
+ finish: (0, exports.getEndOfDay)(finishDate)
24
+ };
25
+ };
26
+ exports.getCurrentMonth = getCurrentMonth;
27
+ var getCurrentYear = function (locale) {
28
+ var today = locale.dayjs(new Date().toDateString());
29
+ var startDate = today.startOf('year');
30
+ var finishDate = today.endOf('year');
31
+ return {
32
+ start: startDate,
33
+ finish: (0, exports.getEndOfDay)(finishDate)
34
+ };
35
+ };
36
+ exports.getCurrentYear = getCurrentYear;
@@ -57,7 +57,7 @@ function DateTimeFieldView(props) {
57
57
  'is-invalid': !!props.errors
58
58
  }), props.className), style: props.style },
59
59
  React.createElement("div", { className: bem.element('body') },
60
- React.createElement("input", __assign({}, props.inputProps, { placeholder: props.placeholder
60
+ React.createElement("input", __assign({}, props.inputProps, { id: props.id, placeholder: props.placeholder
61
61
  ? props.placeholder
62
62
  : props.inputProps.placeholder, className: bem(bem.element('input', {
63
63
  size: props.size
@@ -44,13 +44,22 @@ 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 TimePanelView_1 = __importDefault(require("../TimeField/TimePanelView"));
47
+ var RangeButtons_1 = __importDefault(require("../DateRangeField/views/RangeButtons"));
47
48
  function DateTimeRangeFieldView(props) {
48
49
  var bem = (0, hooks_1.useBem)('DateTimeRangeFieldView');
49
50
  var hasValue = props.inputPropsFrom.value || props.inputPropsTo.value;
50
- var renderCalendar = (0, react_1.useCallback)(function () { return (React.createElement("div", { className: bem.element('panel-container') },
51
- React.createElement(Calendar_1["default"], __assign({}, props.calendarProps, { className: bem.element('calendar') })),
51
+ var calendarComponent = React.useMemo(function () { return (React.createElement("div", { className: bem.element('panel-container') },
52
+ React.createElement(Calendar_1["default"], __assign({}, props.calendarProps, { className: bem.element('calendar'), showTodayButton: !props.withRangeButtons })),
52
53
  React.createElement("div", { className: bem.element('separator') }),
53
- React.createElement(TimePanelView_1["default"], __assign({}, props.timePanelViewProps, { className: bem.element('time-panel') })))); }, [bem, props.calendarProps, props.timePanelViewProps]);
54
+ React.createElement(TimePanelView_1["default"], __assign({}, props.timePanelViewProps, { className: bem.element('time-panel') })))); }, [bem, props.calendarProps, props.timePanelViewProps, props.withRangeButtons]);
55
+ var renderCalendar = (0, react_1.useCallback)(function () { return (props.withRangeButtons ? (React.createElement("div", { className: bem.element('calendar-wrapper', {
56
+ position: props.rangeButtonsPosition
57
+ }) },
58
+ React.createElement("div", { className: bem.element('additional-buttons') },
59
+ React.createElement(RangeButtons_1["default"], { config: props.withRangeButtons, changeTo: props.inputPropsTo.onChange, changeFrom: props.inputPropsFrom.onChange, position: props.rangeButtonsPosition, format: props.displayFormat })),
60
+ React.createElement("div", { className: bem.element('calendar') }, calendarComponent)))
61
+ : calendarComponent); }, [bem, calendarComponent, props.inputPropsFrom.onChange, props.inputPropsTo.onChange,
62
+ props.rangeButtonsPosition, props.displayFormat, props.withRangeButtons]);
54
63
  return (React.createElement(DropDown_1["default"], { content: renderCalendar, position: 'bottomLeft', visible: props.isOpened, onClose: props.onClose, hasArrow: false, className: bem.element('dropdown') },
55
64
  React.createElement("div", { className: bem(bem.block({
56
65
  disabled: props.disabled,
@@ -58,7 +67,7 @@ function DateTimeRangeFieldView(props) {
58
67
  'is-invalid': !!props.errors
59
68
  }), props.className), style: props.style },
60
69
  React.createElement("div", { className: bem.element('body') },
61
- React.createElement("input", __assign({}, props.inputPropsFrom, { className: bem(bem.element('input', {
70
+ React.createElement("input", __assign({}, props.inputPropsFrom, { id: props.id, className: bem(bem.element('input', {
62
71
  size: props.size
63
72
  })), onInput: function (e) { return props.inputPropsFrom.onChange(e.currentTarget.value); } })),
64
73
  React.createElement("input", __assign({}, props.inputPropsTo, { className: bem(bem.element('input', {
@@ -2,6 +2,26 @@
2
2
  @use "../../scss/variables";
3
3
  @use '../../scss/mixins';
4
4
 
5
+ $positions: (
6
+ top: (
7
+ direction: column,
8
+ responsive: top
9
+ ),
10
+ bottom: (
11
+ direction: column-reverse,
12
+ responsive: bottom
13
+ ),
14
+ left: (
15
+ direction: row,
16
+ responsive: left
17
+ ),
18
+ right: (
19
+ direction: row-reverse,
20
+ responsive: right
21
+ )
22
+ );
23
+
24
+ $all-directions: top, bottom, left, right;
5
25
 
6
26
  .DateTimeRangeFieldView {
7
27
  $root: &;
@@ -44,4 +64,38 @@
44
64
  @include mixins.calendar-border();
45
65
  background-color: variables.$element-background-color;
46
66
  }
67
+
68
+ &__calendar-wrapper {
69
+ display: flex;
70
+ width: min-content;
71
+
72
+ &_position {
73
+ @each $pos, $config in $positions {
74
+ &_#{$pos} {
75
+ flex-direction: map-get($config, direction);
76
+ align-items: center;
77
+
78
+ @media (max-width: variables.$tablet-width) {
79
+ flex-direction: map-get($config, responsive);
80
+ align-items: center;
81
+ }
82
+ }
83
+ }
84
+ @each $dir1 in $all-directions {
85
+ @each $dir2 in $all-directions {
86
+ @if $dir1 != $dir2 {
87
+ &_#{$dir1}-#{$dir2} {
88
+ flex-direction: map-get(map-get($positions, $dir1), direction);
89
+ align-items: center;
90
+
91
+ @media (max-width: variables.$tablet-width) {
92
+ flex-direction: map-get(map-get($positions, $dir2), direction);
93
+ align-items: center;
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
47
101
  }
@@ -73,7 +73,8 @@ function DropDownFieldView(props) {
73
73
  renderPlaceholder(),
74
74
  React.createElement("span", { className: bem.element('selected-items') }, props.showEllipses
75
75
  ? (0, utils_1.getSelectedItemsLabel)(props.selectedItems)
76
- : (0, utils_1.getSelectedItemsCount)(props.selectedItems))),
76
+ : (0, utils_1.getSelectedItemsCount)(props.selectedItems)),
77
+ React.createElement("input", { className: bem.element('input'), ref: props.inputRef })),
77
78
  props.showReset && props.selectedIds.length > 0 && (React.createElement(Icon_1["default"], { name: "cross_8x8", className: bem.element('icon-close'), tabIndex: -1, onClick: props.onReset, "aria-label": __('Сбросить') })),
78
79
  React.createElement(Icon_1["default"], { name: 'arrow_down_24x24', className: bem.element('icon-chevron'), tabIndex: -1, onClick: props.onOpen }),
79
80
  props.isOpened && (React.createElement("div", { className: bem.element('drop-down') },
@@ -81,7 +82,7 @@ function DropDownFieldView(props) {
81
82
  size: props.size
82
83
  }) },
83
84
  React.createElement(Icon_1["default"], { name: 'search', className: bem.element('search-icon') }),
84
- React.createElement("input", __assign({}, props.searchInputProps, { ref: props.forwardedInputRef, onChange: function (e) { return props.searchInputProps.onChange(e.target.value); }, className: bem(bem.element('search-input'), props.searchInputProps.className) })))),
85
+ React.createElement("input", __assign({}, props.searchInputProps, { ref: props.autoCompleteInputForwardedRef, onChange: function (e) { return props.searchInputProps.onChange(e.target.value); }, className: bem(bem.element('search-input'), props.searchInputProps.className) })))),
85
86
  React.createElement("div", { className: bem.element('drop-down-list') },
86
87
  props.multiple
87
88
  && props.itemToSelectAll
@@ -435,4 +435,16 @@ $drop-down-color-themes: map.merge(
435
435
  border-color: transparent;
436
436
  pointer-events: none;
437
437
  }
438
+
439
+ &__input {
440
+ position: absolute;
441
+ width: 100%;
442
+ height: 100%;
443
+ top: 0;
444
+ left: 0;
445
+ opacity: 0;
446
+ cursor: default;
447
+ pointer-events: none;
448
+ user-select: none;
449
+ }
438
450
  }
@@ -58,9 +58,9 @@ function InputFieldView(props) {
58
58
  hasTextAddonBefore: !!props.textBefore,
59
59
  hasTextAddonAfter: !!props.textAfter
60
60
  }), props.className), style: props.style },
61
- props.addonBefore && (React.createElement("span", { className: bem.element('addon-before') }, props.addonBefore)),
62
61
  props.textBefore && (React.createElement("span", { className: bem.element('text-before') }, props.textBefore)),
63
62
  React.createElement("div", { className: bem.element('input-wrapper') },
63
+ props.addonBefore && (React.createElement("span", { className: bem.element('addon-before') }, props.addonBefore)),
64
64
  props.leadIcon && (0, renderIcon_1["default"])(props.leadIcon, {
65
65
  className: bem.element('lead-icon'),
66
66
  tabIndex: -1
@@ -72,8 +72,8 @@ function InputFieldView(props) {
72
72
  : (React.createElement("input", __assign({ className: bem(bem.element('input', {
73
73
  size: props.size
74
74
  })) }, props.inputProps, { type: props.inputProps.type, placeholder: props.placeholder, disabled: props.disabled, required: props.required, id: props.id, ref: props.inputRef }))),
75
- !props.disabled && props.showClear && !props.maskProps && !!props.inputProps.value && (React.createElement(Icon_1["default"], { name: 'cross_8x8', className: bem.element('icon-clear'), tabIndex: -1, onClick: props.onClear }))),
76
- props.textAfter && (React.createElement("span", { className: bem.element('text-after') }, props.textAfter)),
77
- props.addonAfter && (React.createElement("span", { className: bem.element('addon-after') }, props.addonAfter))));
75
+ !props.disabled && props.showClear && !props.maskProps && !!props.inputProps.value && (React.createElement(Icon_1["default"], { name: 'cross_8x8', className: bem.element('icon-clear'), tabIndex: -1, onClick: props.onClear })),
76
+ props.addonAfter && (React.createElement("span", { className: bem.element('addon-after') }, props.addonAfter))),
77
+ props.textAfter && (React.createElement("span", { className: bem.element('text-after') }, props.textAfter))));
78
78
  }
79
79
  exports["default"] = InputFieldView;
@@ -24,16 +24,74 @@ $lead-icon-disabled-color: var(--lead-icon-disabled-color);
24
24
  flex-flow: row nowrap;
25
25
  align-items: center;
26
26
 
27
- height: 34px;
27
+ height: var(--input-height);
28
+
28
29
 
29
30
  font-family: variables.$font-family-nunito;
30
31
  font-weight: variables.$font-weight-sm;
31
32
  line-height: 24px;
32
33
 
34
+ color: variables.$text-color;
35
+ border-radius: var(--border-radius);
36
+
37
+
38
+ --input-height: #{variables.$input-height-sm};
39
+
40
+ --border-radius: #{variables.$radius-small};
41
+
42
+ --colored-border-radius: 12px;
43
+
44
+ --addon-padding: 5px 8px;
45
+
46
+ --input-font-size: #{variables.$font-size-sm};
47
+
48
+ //Sizes
49
+ &_size {
50
+ &_lg {
51
+ --input-height: #{variables.$input-height-lg};
52
+ --border-radius: #{variables.$radius-large};
53
+ --colored-border-radius: 16px;
54
+ --addon-padding: 16px;
55
+ --input-font-size: #{variables.$font-size-lg};
56
+ --input-border-radius: #{variables.$radius-large};
57
+ }
58
+
59
+ &_md {
60
+ --input-height: #{variables.$input-height-md};
61
+ --border-radius: #{variables.$radius-large};
62
+ --colored-border-radius: 16px;
63
+ --addon-padding: 11px 12px;
64
+ --input-font-size: #{variables.$font-size-base};
65
+ --input-border-radius: #{variables.$radius-large};
66
+ }
67
+ }
68
+
33
69
  &__input-wrapper {
70
+ display: flex;
71
+
34
72
  position: relative;
35
73
  width: 100%;
36
74
  height: 100%;
75
+
76
+ &::before {
77
+ content: '';
78
+ position: absolute;
79
+ z-index: 2;
80
+ top: 0;
81
+ left: 0;
82
+ width: 100%;
83
+ height: 100%;
84
+
85
+ pointer-events: none;
86
+ transform: translate(calc(var(--input-wrapper-border-width) * -1), calc(var(--input-wrapper-border-width) * -1));
87
+ opacity: var(--input-wrapper-border-opacity);
88
+ transition: opacity 150ms ease-in-out;
89
+
90
+ border-radius: var(--colored-border-radius);
91
+ border-width: var(--input-wrapper-border-width);
92
+ border-color: var(--input-wrapper-border-color);
93
+ border-style: solid;
94
+ }
37
95
  }
38
96
 
39
97
  &__input {
@@ -47,170 +105,34 @@ $lead-icon-disabled-color: var(--lead-icon-disabled-color);
47
105
  outline: none;
48
106
 
49
107
  background-color: variables.$element-field-background-color;
50
- border: 1px solid variables.$element-border-color;
51
- border-radius: inherit;
108
+ border-width: var(--input-border-width);
109
+ border-color: var(--input-border-color);
110
+ border-top-left-radius: var(--input-left-border-radius);
111
+ border-bottom-left-radius: var(--input-left-border-radius);
112
+ border-top-right-radius: var(--input-right-border-radius);
113
+ border-bottom-right-radius: var(--input-right-border-radius);
114
+ border-style: solid;
52
115
 
53
116
  white-space: nowrap; /* Запретить перенос текста */
54
117
  overflow: hidden; /* Скрыть содержимое, выходящее за границы ячейки */
55
118
  text-overflow: ellipsis; /* Добавить многоточие, если текст обрезается */
56
119
 
120
+ font-size: var(--input-font-size);
121
+
57
122
  &::placeholder {
58
123
  color: variables.$element-placeholder-color;
59
124
  font-size: inherit;
60
125
  }
61
126
 
62
- &:not(:disabled):focus {
63
- border-color: transparent;
64
- }
65
- }
66
-
67
- //Statements
68
- &::before {
69
- content: '';
70
- position: absolute;
71
- z-index: 2;
72
- top: 0;
73
- left: 0;
74
- width: 100%;
75
- height: 100%;
76
-
77
- pointer-events: none;
78
- transform: translate(-1px, -1px);
79
- opacity: 0;
80
- transition: opacity 150ms ease-in-out;
81
- }
82
-
83
- &:not(#{$root}_disabled):focus-within::before {
84
- border: 4px solid variables.$primary-light;
85
- transform: translateX(-4px) translateY(-4px);
86
- opacity: 1;
87
- }
88
-
89
- &:not(#{$root}_disabled):active {
90
- #{$root}__input {
91
- border-color: transparent;
92
- }
93
-
94
- &::before {
95
- transform: translate(-1px, -1px);
96
- border: 1px solid variables.$primary;
97
- opacity: 1;
98
- }
99
127
  }
100
128
 
101
129
  &_disabled {
102
130
  #{$root}__input {
103
131
  background-color: variables.$element-background-color-disabled;
104
- border-color: transparent;
105
132
  cursor: not-allowed;
106
133
  }
107
134
  }
108
135
 
109
- &_hasError {
110
- #{$root}__input {
111
- border-color: transparent;
112
- }
113
-
114
-
115
- &::before {
116
- border: 1px solid variables.$danger;
117
- border-radius: 16px;
118
- transform: translateX(-1px) translateY(-1px);
119
- opacity: 1;
120
- }
121
- }
122
-
123
- //Sizes
124
- &_size {
125
- &_lg {
126
- color: variables.$text-color;
127
- height: variables.$input-height-lg;
128
- border-radius: variables.$radius-large;
129
-
130
- #{$root}__input {
131
- font-size: variables.$font-size-lg;
132
- border-radius: variables.$radius-large;
133
- }
134
-
135
- #{$root}__addon-before,
136
- #{$root}__addon-after {
137
- padding: 16px;
138
- }
139
- #{$root}__text-before,
140
- #{$root}__text-after {
141
- padding: 16px 3px;
142
- }
143
-
144
- &::before {
145
- border-radius: variables.$radius-large;
146
- }
147
-
148
- &:focus-within::before {
149
- border-radius: 16px;
150
- }
151
- }
152
-
153
- &_md {
154
- color: variables.$text-color;
155
- height: variables.$input-height-md;
156
- border-radius: variables.$radius-large;
157
-
158
- #{$root}__input {
159
- border-radius: variables.$radius-large;
160
- font-size: variables.$font-size-base;
161
- }
162
-
163
- #{$root}__addon-before,
164
- #{$root}__addon-after,
165
- #{$root}__text-before,
166
- #{$root}__text-after {
167
- padding: 11px 12px;
168
- }
169
-
170
- #{$root}__text-before,
171
- #{$root}__text-after {
172
- padding: 11px 3px;
173
- }
174
-
175
- &::before {
176
- border-radius: variables.$radius-medium;
177
- }
178
-
179
- &:focus-within::before {
180
- border-radius: 16px;
181
- }
182
- }
183
-
184
- &_sm {
185
- color: variables.$text-color;
186
- height: variables.$input-height-sm;
187
- border-radius: variables.$radius-small;
188
-
189
- #{$root}__input {
190
- font-size: variables.$font-size-sm;
191
- border-radius: variables.$radius-small;
192
- }
193
-
194
- #{$root}__addon-before,
195
- #{$root}__addon-after {
196
- padding: 5px 8px;
197
- }
198
-
199
- #{$root}__text-before,
200
- #{$root}__text-after {
201
- padding: 5px 3px;
202
- }
203
-
204
- &::before {
205
- border-radius: variables.$radius-small;
206
- }
207
-
208
- &:focus-within::before {
209
- border-radius: 12px;
210
- }
211
- }
212
- }
213
-
214
136
  //LEAD ICON
215
137
  &_hasLeadIcon {
216
138
  #{$root}__input {
@@ -279,49 +201,81 @@ $lead-icon-disabled-color: var(--lead-icon-disabled-color);
279
201
  }
280
202
  }
281
203
 
282
- &_hasAddonBefore {
283
- #{$root}__input {
284
- border-top-left-radius: 0;
285
- border-bottom-left-radius: 0;
286
- border: none;
287
- }
288
- &::before {
289
- border: 1px solid variables.$element-border-color;
290
- opacity: 1;
291
- }
292
- }
293
-
294
- &_hasAddonAfter {
295
- #{$root}__input {
296
- border-top-right-radius: 0;
297
- border-bottom-right-radius: 0;
298
- }
299
- &::before {
300
- border: 1px solid variables.$element-border-color;
301
- opacity: 1;
302
- }
303
- }
304
-
305
204
  &__text-before,
306
205
  &__text-after {
307
206
  flex-shrink: 0;
207
+ padding: 0 6px;
308
208
  }
309
209
 
310
210
  &__addon-before,
311
211
  &__addon-after {
312
212
  flex-shrink: 0;
313
- padding: 11px 12px;
213
+ padding: var(--addon-padding);
314
214
  background-color: variables.$element-background-color-disabled;
315
215
  color: variables.$text-color;
316
216
  }
317
217
 
218
+ // BORDERS
219
+ --input-border-radius: #{variables.$radius-small};
220
+ --input-border-width: 1px;
221
+ --input-border-color: #{variables.$element-border-color};
222
+ --input-left-border-radius: var(--input-border-radius);
223
+ --input-right-border-radius: var(--input-border-radius);
224
+
225
+ --input-wrapper-border-width: 1px;
226
+ --input-wrapper-border-color: transparent;
227
+ --input-wrapper-border-opacity: 0;
228
+
229
+ &_hasError {
230
+ --input-wrapper-border-width: 1px;
231
+ --input-wrapper-border-color: #{variables.$danger};
232
+ --input-wrapper-border-opacity: 1;
233
+
234
+ --input-border-color: transparent;
235
+ }
236
+
237
+ &_hasAddon {
238
+ --input-wrapper-border-width: 1px;
239
+ --input-wrapper-border-color: #{variables.$element-border-color};
240
+ --input-wrapper-border-opacity: 1;
241
+
242
+ --input-border-width: 0px;
243
+ }
244
+ &_hasAddonBefore {
245
+ --input-left-border-radius: 0;
246
+ }
247
+ &_hasAddonAfter {
248
+ --input-right-border-radius: 0;
249
+ }
250
+
251
+ &:not(&_disabled) {
252
+ &:focus-within {
253
+ --input-wrapper-border-width: 4px;
254
+ --input-wrapper-border-color: #{variables.$primary-light};
255
+ --input-wrapper-border-opacity: 1;
256
+
257
+ --input-border-color: transparent;
258
+ }
259
+ &:active {
260
+ --input-wrapper-border-width: 1px;
261
+ --input-wrapper-border-color: #{variables.$primary};
262
+ --input-wrapper-border-opacity: 1;
263
+
264
+ --input-border-color: transparent;
265
+ }
266
+ }
267
+
268
+ &_disabled {
269
+ --input-border-color: transparent;
270
+ }
271
+
318
272
  &__addon-before {
319
- border-top-left-radius: inherit;
320
- border-bottom-left-radius: inherit;
273
+ border-top-left-radius: var(--input-border-radius);
274
+ border-bottom-left-radius: var(--input-border-radius);
321
275
  }
322
276
 
323
277
  &__addon-after {
324
- border-top-right-radius: inherit;
325
- border-bottom-right-radius: inherit;
278
+ border-top-right-radius: var(--input-border-radius);
279
+ border-bottom-right-radius: var(--input-border-radius);
326
280
  }
327
281
  }
@@ -152,19 +152,23 @@ $eye-filled-color: var(--eye-filled-color);
152
152
  }
153
153
 
154
154
  &__security-bar {
155
- position: relative;
155
+ position: absolute;
156
156
  width: 100%;
157
157
  height: 4px;
158
158
  border-radius: 4px;
159
- margin-top: 8px;
159
+
160
+ bottom: -12px;
160
161
 
161
162
  background-color: $security-bar-background;
162
163
 
164
+ opacity: 0;
165
+ transition: 0.15s ease opacity;
166
+
163
167
  &::before {
164
168
  content: "";
165
169
  position: absolute;
166
170
  width: 0%;
167
- height: 4px;
171
+ height: 100%;
168
172
  border-radius: 4px;
169
173
  transition: width 1s ease-in-out;
170
174
  }
@@ -184,6 +188,11 @@ $eye-filled-color: var(--eye-filled-color);
184
188
  background-color: variables.$success;
185
189
  }
186
190
  }
191
+ &:focus-within {
192
+ #{$root}__security-bar {
193
+ opacity: 1;
194
+ }
195
+ }
187
196
 
188
197
  &__icon-eye {
189
198
  outline: none;
@@ -54,7 +54,7 @@ function TimeFieldView(props) {
54
54
  'is-invalid': !!props.errors
55
55
  }), props.className), style: props.style },
56
56
  React.createElement("div", { className: bem.element('body') },
57
- React.createElement("input", __assign({}, props.inputProps, { className: bem(bem.element('input'), props.inputProps.className), onChange: function (e) { return props.inputProps.onChange(e.target.value); } })),
57
+ React.createElement("input", __assign({}, props.inputProps, { id: props.id, className: bem(bem.element('input'), props.inputProps.className), onChange: function (e) { return props.inputProps.onChange(e.target.value); } })),
58
58
  React.createElement("div", { className: bem.element('icon-container') },
59
59
  !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 })),
60
60
  props.showRemove && props.inputProps.value && props.icon !== false && (React.createElement(Icon_1["default"], { className: bem.element('close-icon'), onClick: function (e) {
@@ -18,6 +18,8 @@
18
18
  &__dropdown {
19
19
  background: variables.$element-background-color;
20
20
 
21
+ min-width: unset;
22
+
21
23
  @include mixins.calendar-border();
22
24
  }
23
25
 
@@ -30,7 +32,23 @@
30
32
  padding-top: 10px;
31
33
  display: flex;
32
34
  flex-flow: row nowrap;
33
- column-gap: 10px;
35
+ column-gap: 10px;
36
+ }
37
+
38
+ &:has(.TimePanelView__button_now) {
39
+ .TimePanelView {
40
+ display: flex;
41
+ flex-direction: column;
42
+ align-items: center;
43
+
44
+ &__button_now {
45
+ margin-bottom: 6px;
46
+ }
47
+ }
48
+ .TimePanelView__footer {
49
+ flex-direction: column;
50
+ }
51
+
34
52
  }
35
53
  }
36
54
  }