@sima-land/ui-nucleons 44.2.0 → 44.2.3

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.
@@ -4,15 +4,25 @@
4
4
 
5
5
  .inner {
6
6
  display: flex;
7
+ padding: 0;
7
8
  flex-wrap: wrap;
9
+ margin: 0 calc(var(--expandable-gap) * -1) calc(var(--expandable-gap) * -1) 0;
8
10
  }
9
11
 
10
12
  .item {
13
+ display: block;
14
+ padding: 0;
11
15
  max-width: 100%;
16
+ height: var(--expandable-item-height);
17
+ margin: 0 (var(--expandable-gap)) var(--expandable-gap) 0;
12
18
  &.hidden {
13
19
  display: none;
14
20
  }
15
21
  &.invisible {
16
22
  opacity: 0;
23
+ pointer-events: none;
24
+ }
25
+ &.opener {
26
+ width: var(--expandable-opener-width);
17
27
  }
18
28
  }
@@ -22,6 +22,7 @@ export interface ExpandableGroupProps {
22
22
  style?: CSSProperties;
23
23
  /** Нужно ли выводить список развернутым. */
24
24
  expanded?: boolean;
25
+ openerWidth?: number;
25
26
  }
26
27
  export interface GroupItemProps {
27
28
  children?: ReactNode;
@@ -33,8 +34,8 @@ export interface GroupItemProps {
33
34
  * @param props Свойства.
34
35
  * @return Элемент.
35
36
  */
36
- export declare function ExpandableGroup({ gap, itemHeight, lineLimit, defaultExpanded, children, onExpand, opener, className, style, expanded: expandedProp, }: ExpandableGroupProps): JSX.Element;
37
+ export declare function ExpandableGroup({ gap, itemHeight, lineLimit, defaultExpanded, children, onExpand, opener, className, style, expanded: expandedProp, openerWidth, }: ExpandableGroupProps): JSX.Element;
37
38
  export declare const Expandable: {
38
39
  readonly Group: typeof ExpandableGroup;
39
- readonly Item: React.ForwardRefExoticComponent<GroupItemProps & React.RefAttributes<HTMLDivElement>>;
40
+ readonly Item: React.ForwardRefExoticComponent<GroupItemProps & React.RefAttributes<HTMLLIElement>>;
40
41
  };
@@ -32,7 +32,6 @@ const utils_1 = require("./utils");
32
32
  const bind_1 = __importDefault(require("classnames/bind"));
33
33
  const expandable_group_module_scss_1 = __importDefault(require("./expandable-group.module.scss"));
34
34
  const cx = bind_1.default.bind(expandable_group_module_scss_1.default);
35
- const GroupContext = (0, react_1.createContext)({ gap: 8, itemHeight: 32 });
36
35
  const ItemContext = (0, react_1.createContext)({});
37
36
  /**
38
37
  * Группа элементов с ограничением на число выводимых строк и возможностью показать все.
@@ -41,40 +40,44 @@ const ItemContext = (0, react_1.createContext)({});
41
40
  */
42
41
  function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpanded = false, children, onExpand, opener = data => react_1.default.createElement(react_1.default.Fragment, null,
43
42
  "\u0415\u0449\u0451 ",
44
- data.hiddenCount), className, style, expanded: expandedProp, }) {
43
+ data.hiddenCount), className, style, expanded: expandedProp, openerWidth = 72, }) {
44
+ const wrapperRef = (0, react_1.useRef)(null);
45
45
  const containerRef = (0, react_1.useRef)(null);
46
46
  const openerRef = (0, react_1.useRef)(null);
47
+ const [mounted, setMounted] = (0, react_1.useState)(false);
47
48
  const [expanded, setExpanded] = (0, react_1.useState)(defaultExpanded);
48
- const viewState = (0, utils_1.useViewState)(containerRef, openerRef);
49
- const needHideItems = viewState.lastVisibleIndex !== -1 && !expanded;
50
- const items = react_1.Children.toArray(children).reduce((result, child, index) => {
51
- const isDisplayed = !needHideItems || index < viewState.lastVisibleIndex;
49
+ const items = react_1.Children.toArray(children).reduce((result, child) => {
52
50
  if ((0, react_1.isValidElement)(child) && child.type === ExpandableItem) {
53
- result.push(react_1.default.createElement(ItemContext.Provider, { key: index, value: { hidden: !isDisplayed } }, (0, react_1.cloneElement)(child, { hidden: !isDisplayed })));
51
+ result.push(child);
54
52
  }
55
53
  return result;
56
54
  }, []);
55
+ (0, react_1.useEffect)(() => {
56
+ setMounted(true);
57
+ }, []);
57
58
  (0, react_1.useEffect)(() => {
58
59
  expandedProp !== undefined && setExpanded(expandedProp);
59
60
  }, [expandedProp]);
60
- return (react_1.default.createElement(GroupContext.Provider, { value: { gap, itemHeight } },
61
- react_1.default.createElement("div", { ref: containerRef, className: cx('root', className), style: Object.assign(Object.assign({}, style), { maxHeight: expanded ? undefined : `${itemHeight * lineLimit + gap * (lineLimit - 1)}px` }) },
62
- react_1.default.createElement("div", { className: expandable_group_module_scss_1.default.inner, style: { marginRight: `${-gap}px`, marginBottom: `${-gap}px` } },
63
- items,
64
- !expanded && (react_1.default.createElement(ItemContext.Provider, { value: { invisible: false } },
65
- react_1.default.createElement(ExpandableItem, { ref: openerRef, onClick: () => {
66
- setExpanded(true);
67
- onExpand === null || onExpand === void 0 ? void 0 : onExpand();
68
- }, "data-testid": 'expandable:opener' }, opener({ hiddenCount: items.length - viewState.lastVisibleIndex }))))))));
61
+ const { hiddenCount } = (0, utils_1.useExpandable)({
62
+ expanded,
63
+ wrapperRef,
64
+ containerRef,
65
+ openerRef,
66
+ gap,
67
+ });
68
+ return (react_1.default.createElement("div", { ref: wrapperRef, className: cx('root', className), style: Object.assign(Object.assign({}, style), { maxHeight: expanded ? undefined : `${itemHeight * lineLimit + gap * (lineLimit - 1)}px`, '--expandable-item-height': `${itemHeight}px`, '--expandable-opener-width': `${openerWidth}px`, '--expandable-gap': `${gap}px` }) },
69
+ react_1.default.createElement("ul", { ref: containerRef, className: expandable_group_module_scss_1.default.inner },
70
+ items,
71
+ mounted && !expanded && (react_1.default.createElement(ItemContext.Provider, { value: { invisible: hiddenCount === 0, opener: true } },
72
+ react_1.default.createElement(ExpandableItem, { ref: openerRef, onClick: () => {
73
+ setExpanded(true);
74
+ onExpand === null || onExpand === void 0 ? void 0 : onExpand();
75
+ }, "data-testid": 'expandable:opener' }, opener({ hiddenCount })))))));
69
76
  }
70
77
  exports.ExpandableGroup = ExpandableGroup;
71
78
  const ExpandableItem = (0, react_1.forwardRef)(({ children, onClick, 'data-testid': testId = 'expandable:item' }, ref) => {
72
- const { gap, itemHeight } = (0, react_1.useContext)(GroupContext);
73
- const { invisible, hidden } = (0, react_1.useContext)(ItemContext);
74
- return (react_1.default.createElement("div", { ref: ref, className: cx('item', { hidden, invisible }), "data-testid": testId, onClick: onClick, style: {
75
- height: `${itemHeight}px`,
76
- margin: `0 ${gap}px ${gap}px 0`,
77
- } }, children));
79
+ const context = (0, react_1.useContext)(ItemContext);
80
+ return (react_1.default.createElement("li", { ref: ref, className: cx('item', context), "data-testid": testId, onClick: onClick }, children));
78
81
  });
79
82
  exports.Expandable = {
80
83
  Group: ExpandableGroup,
@@ -1,20 +1,31 @@
1
1
  import { RefObject } from 'react';
2
2
  export interface ViewState {
3
- phase: 'default' | 'ready';
4
3
  lastVisibleIndex: number;
5
4
  }
6
- export declare const initialViewState: ViewState;
7
5
  /**
8
6
  * Хук состояния группы элементов ограниченных несколькими строками с возможностью показать все.
9
- * @param containerRef Ref элемента-контейнера.
10
- * @param openerRef Ref элемента кнопки, показывающей всю группу.
11
- * @return Состояние.
7
+ * @param options.expanded Развернут ли список.
8
+ * @param options.wrapperRef Реф элемента, формирующего ограничение по высоте.
9
+ * @param options.containerRef Реф элемента, содержащего список.
10
+ * @param options.openerRef Реф элемента "открывашки".
11
+ * @param options.gap Расстояние между элементами списка.
12
+ * @return Рассчитанные данные: кол-во скрытых элементов.
12
13
  */
13
- export declare function useViewState(containerRef: RefObject<HTMLElement>, openerRef: RefObject<HTMLElement>): ViewState;
14
+ export declare function useExpandable({ expanded, wrapperRef, containerRef, openerRef, gap, }: {
15
+ expanded: boolean;
16
+ wrapperRef: RefObject<HTMLElement>;
17
+ containerRef: RefObject<HTMLElement>;
18
+ openerRef: RefObject<HTMLElement>;
19
+ gap: number;
20
+ }): {
21
+ hiddenCount: number;
22
+ };
14
23
  /**
15
24
  * Определяет индекс последнего видимого элемента для свернутого списка.
16
- * @param containerRef Ref элемента-контейнера.
17
- * @param openerRef Ref элемента кнопки, показывающей весь список.
25
+ * @param wrapper Элемент, формирующий ограничение по высоте.
26
+ * @param items Элементы, все кроме "закрывашки".
27
+ * @param opener Элемент "закрывашки".
28
+ * @param gap Расстояние между элементами списка.
18
29
  * @return Состояние.
19
30
  */
20
- export declare function defineViewState(containerRef: RefObject<HTMLElement>, openerRef: RefObject<HTMLElement>): ViewState;
31
+ export declare function defineViewState(wrapper: HTMLElement, items: Element[], opener: HTMLElement, gap: number): ViewState;
@@ -3,78 +3,87 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.defineViewState = exports.useViewState = exports.initialViewState = void 0;
6
+ exports.defineViewState = exports.useExpandable = void 0;
7
7
  const react_1 = require("react");
8
8
  const hooks_1 = require("../hooks");
9
9
  const on_1 = __importDefault(require("../helpers/on"));
10
- exports.initialViewState = {
11
- phase: 'default',
12
- lastVisibleIndex: -1,
13
- };
10
+ const expandable_group_module_scss_1 = __importDefault(require("./expandable-group.module.scss"));
14
11
  /**
15
12
  * Хук состояния группы элементов ограниченных несколькими строками с возможностью показать все.
16
- * @param containerRef Ref элемента-контейнера.
17
- * @param openerRef Ref элемента кнопки, показывающей всю группу.
18
- * @return Состояние.
13
+ * @param options.expanded Развернут ли список.
14
+ * @param options.wrapperRef Реф элемента, формирующего ограничение по высоте.
15
+ * @param options.containerRef Реф элемента, содержащего список.
16
+ * @param options.openerRef Реф элемента "открывашки".
17
+ * @param options.gap Расстояние между элементами списка.
18
+ * @return Рассчитанные данные: кол-во скрытых элементов.
19
19
  */
20
- function useViewState(containerRef, openerRef) {
21
- const prevPhaseRef = (0, react_1.useRef)(null);
22
- const [viewState, setViewState] = (0, react_1.useState)(exports.initialViewState);
23
- (0, react_1.useEffect)(() => {
24
- const off = (0, on_1.default)(window, 'resize', () => {
25
- setViewState(exports.initialViewState);
26
- });
27
- return off;
28
- }, []);
29
- (0, hooks_1.useIsomorphicLayoutEffect)(() => {
30
- if (viewState.phase === 'default') {
31
- setViewState(defineViewState(containerRef, openerRef));
20
+ function useExpandable({ expanded, wrapperRef, containerRef, openerRef, gap, }) {
21
+ const [hiddenCount, setHiddenCount] = (0, react_1.useState)(0);
22
+ const calc = (0, react_1.useCallback)(() => {
23
+ const wrapperEl = wrapperRef.current;
24
+ const containerEl = containerRef.current;
25
+ const openerEl = openerRef.current;
26
+ if (expanded) {
27
+ if (containerEl) {
28
+ for (const item of containerEl.children) {
29
+ item.classList.remove(expandable_group_module_scss_1.default.hidden);
30
+ }
31
+ }
32
32
  }
33
- // если произошел рендер и на предыдущем рендере уже все было готово - сбрасываем состояние
34
- if (viewState.phase === 'ready' && prevPhaseRef.current === 'ready') {
35
- setViewState({
36
- phase: 'default',
37
- lastVisibleIndex: -1,
38
- });
33
+ else {
34
+ if (wrapperEl && containerEl && openerEl) {
35
+ const items = [...containerEl.children].filter(child => child !== openerEl);
36
+ // делаем все элементы списка видимыми чтобы правильно считать размеры
37
+ for (const item of items) {
38
+ item.classList.remove(expandable_group_module_scss_1.default.hidden);
39
+ }
40
+ // определяем какие элементы не влезли в ограничение по высоте
41
+ const state = defineViewState(wrapperEl, items, openerEl, gap);
42
+ if (state.lastVisibleIndex !== -1) {
43
+ // делаем невидимыми элементы списка которые не влезли
44
+ for (const [index, item] of items.entries()) {
45
+ if (item !== openerEl && index >= state.lastVisibleIndex) {
46
+ item.classList.add(expandable_group_module_scss_1.default.hidden);
47
+ }
48
+ }
49
+ }
50
+ setHiddenCount(state.lastVisibleIndex !== -1 ? items.length - state.lastVisibleIndex : 0);
51
+ }
39
52
  }
40
- prevPhaseRef.current = viewState.phase;
41
- });
42
- return viewState;
53
+ }, [expanded, gap]);
54
+ // пересчитываем после каждого rerender'а
55
+ (0, hooks_1.useIsomorphicLayoutEffect)(calc);
56
+ // пересчитываем при resize
57
+ (0, react_1.useEffect)(() => (0, on_1.default)(window, 'resize', calc), [calc]);
58
+ return { hiddenCount };
43
59
  }
44
- exports.useViewState = useViewState;
60
+ exports.useExpandable = useExpandable;
45
61
  /**
46
62
  * Определяет индекс последнего видимого элемента для свернутого списка.
47
- * @param containerRef Ref элемента-контейнера.
48
- * @param openerRef Ref элемента кнопки, показывающей весь список.
63
+ * @param wrapper Элемент, формирующий ограничение по высоте.
64
+ * @param items Элементы, все кроме "закрывашки".
65
+ * @param opener Элемент "закрывашки".
66
+ * @param gap Расстояние между элементами списка.
49
67
  * @return Состояние.
50
68
  */
51
- function defineViewState(containerRef, openerRef) {
52
- const state = {
53
- phase: 'ready',
54
- lastVisibleIndex: -1,
55
- };
56
- const container = containerRef.current;
57
- const opener = openerRef.current;
58
- if (container && opener && opener.parentNode) {
59
- const parentRect = container.getBoundingClientRect();
60
- const childList = [...opener.parentNode.children];
61
- const firstHiddenNodeIndex = childList
62
- .filter(child => child !== opener)
63
- .findIndex(child => {
64
- const childRect = child.getBoundingClientRect();
65
- return childRect.top - parentRect.top >= parentRect.height;
66
- });
67
- if (firstHiddenNodeIndex !== -1) {
68
- const lastVisibleIndex = firstHiddenNodeIndex - 1;
69
- const lastVisible = childList[lastVisibleIndex];
70
- if (lastVisible) {
71
- const rightBound = lastVisible.getBoundingClientRect().right;
72
- const rightContainerBound = container.getBoundingClientRect().right;
73
- // проверяем, хватает ли кнопке места (с запасом в половину) после последнего видимого дочернего элемента
74
- const isOpenerFit = rightContainerBound - rightBound >= opener.clientWidth * 1.5;
75
- // если хватает места - ставим кнопку после последнего, иначе - вместо
76
- state.lastVisibleIndex = lastVisibleIndex + Number(isOpenerFit);
77
- }
69
+ function defineViewState(wrapper, items, opener, gap) {
70
+ const state = { lastVisibleIndex: -1 };
71
+ const parentRect = wrapper.getBoundingClientRect();
72
+ const firstHiddenNodeIndex = items.findIndex(child => {
73
+ const childRect = child.getBoundingClientRect();
74
+ return childRect.top - parentRect.top >= parentRect.height;
75
+ });
76
+ if (firstHiddenNodeIndex !== -1) {
77
+ const lastVisibleIndex = firstHiddenNodeIndex - 1;
78
+ const lastVisible = items[lastVisibleIndex];
79
+ if (lastVisible) {
80
+ const rightBound = lastVisible.getBoundingClientRect().right;
81
+ const rightContainerBound = wrapper.getBoundingClientRect().right;
82
+ // хватает ли кнопке места после последнего видимого дочернего элемента с учетом отступа между элементами
83
+ const isOpenerFit = rightContainerBound - rightBound - gap >= opener.clientWidth;
84
+ // если хватает места - ставим кнопку после последнего, иначе - вместо
85
+ // @todo возможна ситуация когда нужно будет удалить N элементов чтобы влезла кнопка
86
+ state.lastVisibleIndex = lastVisibleIndex + Number(isOpenerFit);
78
87
  }
79
88
  }
80
89
  return state;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sima-land/ui-nucleons",
3
- "version": "44.2.0",
3
+ "version": "44.2.3",
4
4
  "repository": "ssh://git@github.com:sima-land/ui-nucleons.git",
5
5
  "author": "www.sima-land.ru team",
6
6
  "license": "Apache-2.0",
@@ -9,9 +9,9 @@ export interface StepperProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
9
9
  /** Нужно ли выводить кнопку вычитания. */
10
10
  canSubtract?: boolean;
11
11
  /** Сработает при добавлении. */
12
- onAdd?: React.MouseEventHandler<SVGSVGElement>;
12
+ onAdd?: React.MouseEventHandler;
13
13
  /** Сработает при вычитании. */
14
- onSubtract?: React.MouseEventHandler<SVGSVGElement>;
14
+ onSubtract?: React.MouseEventHandler;
15
15
  /** Размер. */
16
16
  size?: Size;
17
17
  /** Идентификатор для систем автоматизированного тестирования. */
package/stepper/index.js CHANGED
@@ -53,7 +53,8 @@ exports.Stepper = (0, react_1.forwardRef)((_a, ref) => {
53
53
  var { canAdd = true, canSubtract = true, className, disabled, readOnly, onAdd, onBlur, onChange, onFocus, onSubtract, size = 'm', style, value, failed, 'data-testid': testId = 'stepper' } = _a, inputProps = __rest(_a, ["canAdd", "canSubtract", "className", "disabled", "readOnly", "onAdd", "onBlur", "onChange", "onFocus", "onSubtract", "size", "style", "value", "failed", 'data-testid']);
54
54
  const [focused, setFocused] = (0, react_1.useState)(false);
55
55
  return (react_1.default.createElement("div", { "data-testid": testId, style: style, className: cx('root', `size-${size}`, { disabled, focused, readonly: readOnly, failed }, className) },
56
- react_1.default.createElement(minus_1.default, { "data-testid": 'stepper:minus', className: cx('button', { hidden: !canSubtract }), onClick: canSubtract && !disabled && !readOnly ? onSubtract : undefined }),
56
+ react_1.default.createElement("button", { className: cx('button', { hidden: !canSubtract }), "data-testid": 'stepper:minus', onClick: canSubtract && !disabled && !readOnly ? onSubtract : undefined },
57
+ react_1.default.createElement(minus_1.default, null)),
57
58
  react_1.default.createElement("input", Object.assign({}, inputProps, { ref: ref, readOnly: readOnly, "data-testid": 'stepper:input', className: cx('input'), value: value, disabled: disabled, onChange: onChange, onFocus: e => {
58
59
  setFocused(true);
59
60
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
@@ -61,5 +62,6 @@ exports.Stepper = (0, react_1.forwardRef)((_a, ref) => {
61
62
  setFocused(false);
62
63
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
63
64
  } })),
64
- react_1.default.createElement(plus_1.default, { "data-testid": 'stepper:plus', className: cx('button', { hidden: !canAdd }), onClick: canAdd && !disabled && !readOnly ? onAdd : undefined })));
65
+ react_1.default.createElement("button", { className: cx('button', { hidden: !canAdd }), "data-testid": 'stepper:plus', onClick: canAdd && !disabled && !readOnly ? onAdd : undefined },
66
+ react_1.default.createElement(plus_1.default, null))));
65
67
  });
@@ -3,18 +3,19 @@
3
3
  .root {
4
4
  display: flex;
5
5
  align-items: center;
6
- border: 1px solid colors.$basic-gray12;
6
+ border: 1px solid transparent;
7
7
  border-radius: 4px;
8
8
  color: colors.$basic-gray87;
9
- background: #fff;
9
+ background: colors.$basic-gray8;
10
10
  &.focused:not(.disabled) {
11
11
  border-color: colors.$basic-blue;
12
12
  }
13
13
  &.disabled {
14
14
  color: colors.$basic-gray24;
15
- border-color: colors.$basic-gray12;
15
+ border-color: colors.$basic-gray4;
16
+ background: colors.$basic-gray4;
16
17
  .button {
17
- fill: colors.$basic-gray12;
18
+ fill: colors.$basic-gray24;
18
19
  }
19
20
  }
20
21
  &.readonly {
@@ -23,17 +24,18 @@
23
24
  }
24
25
  }
25
26
  &.failed:not(.disabled):not(.focused) {
26
- border-color: colors.$additional-deep-red;
27
+ border-color: transparent;
28
+ color: colors.$additional-deep-red;
27
29
  }
28
30
  &.size-s {
31
+ --stepper-button-width: 24px;
29
32
  width: var(--stepper-width, 122px);
30
33
  height: 40px;
31
- padding: 0 8px;
32
34
  }
33
35
  &.size-m {
36
+ --stepper-button-width: 32px;
34
37
  width: var(--stepper-width, 160px);
35
38
  height: 48px;
36
- padding: 0 16px;
37
39
  }
38
40
  }
39
41
 
@@ -42,7 +44,7 @@
42
44
  padding: 0;
43
45
 
44
46
  // не надо делать transparent: https://stackoverflow.com/q/43483363/13166471
45
- background: #fff;
47
+ background: inherit;
46
48
  outline: 0;
47
49
  width: 0;
48
50
  flex-grow: 1;
@@ -56,8 +58,21 @@
56
58
  }
57
59
 
58
60
  .button {
59
- fill: colors.$basic-gray38;
61
+ display: flex;
62
+ align-items: center;
63
+ border: 0;
64
+ padding: 0;
65
+ background: transparent;
66
+ width: var(--stepper-button-width);
67
+ height: 100%;
68
+ fill: colors.$basic-gray87;
60
69
  flex-shrink: 0;
70
+ &:first-child {
71
+ justify-content: flex-end;
72
+ }
73
+ &:last-child {
74
+ justify-content: flex-start;
75
+ }
61
76
  &:not(.hidden) {
62
77
  cursor: pointer;
63
78
  }
@@ -91,7 +91,7 @@ input.reset {
91
91
  box-shadow: inset 0 -1px colors.$basic-blue;
92
92
  }
93
93
  &.failed:not(:disabled) {
94
- box-shadow: inset 0 -1px colors.$additional-red;
94
+ box-shadow: inset 0 -1px colors.$additional-deep-red;
95
95
  }
96
96
  &:not(.multiline) {
97
97
  height: 48px;
@@ -158,12 +158,12 @@ input.reset {
158
158
  }
159
159
  &.failed.focused,
160
160
  &.failed.filled {
161
- color: colors.$additional-red;
161
+ color: colors.$additional-deep-red;
162
162
  }
163
163
  }
164
164
  &.variant-desktop {
165
165
  &.failed:not(.focused):not(.filled) {
166
- color: colors.$additional-red;
166
+ color: colors.$additional-deep-red;
167
167
  }
168
168
  }
169
169
  }
@@ -190,7 +190,7 @@ input.reset {
190
190
  text-overflow: ellipsis;
191
191
  }
192
192
  &.variant-desktop.failed {
193
- color: colors.$additional-red;
193
+ color: colors.$additional-deep-red;
194
194
  --placeholder-color: #{colors.$additional-deep-red};
195
195
  }
196
196
  }
@@ -200,6 +200,6 @@ input.reset {
200
200
  line-height: 16px;
201
201
  color: colors.$basic-gray38;
202
202
  &.failed {
203
- color: colors.$additional-red;
203
+ color: colors.$additional-deep-red;
204
204
  }
205
205
  }