@alfalab/core-components-with-suffix 4.0.9 → 4.0.11

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/Component.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
3
+ import { FC, ReactNode, RefAttributes } from "react";
4
4
  import { InputProps } from "@alfalab/core-components-input";
5
5
  type withSuffixProps = InputProps & {
6
6
  /**
@@ -13,7 +13,7 @@ type withSuffixProps = InputProps & {
13
13
  */
14
14
  suffixContainerClassName?: string;
15
15
  };
16
- declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
16
+ declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
17
17
  value?: string | undefined;
18
18
  defaultValue?: string | undefined;
19
19
  block?: boolean | undefined;
@@ -26,39 +26,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
26
26
  label?: React.ReactNode;
27
27
  labelView?: "inner" | "outer" | undefined;
28
28
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
29
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
30
- leftAddons?: React.ReactNode;
31
- rightAddons?: React.ReactNode;
32
- bottomAddons?: React.ReactNode;
33
- className?: string | undefined;
34
- fieldClassName?: string | undefined;
35
- inputClassName?: string | undefined;
36
- labelClassName?: string | undefined;
37
- addonsClassName?: string | undefined;
38
- focusedClassName?: string | undefined;
39
- filledClassName?: string | undefined;
40
- onChange?: ((event: React.ChangeEvent<HTMLInputElement>, payload: {
41
- value: string;
42
- }) => void) | undefined;
43
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
44
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
45
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
46
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
47
- dataTestId?: string | undefined;
48
- } & React.RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
49
- value?: string | undefined;
50
- defaultValue?: string | undefined;
51
- block?: boolean | undefined;
52
- clear?: boolean | undefined;
53
- size?: "s" | "m" | "l" | "xl" | undefined;
54
- colors?: "default" | "inverted" | undefined;
55
- error?: React.ReactNode;
56
- success?: boolean | undefined;
57
- hint?: React.ReactNode;
58
- label?: React.ReactNode;
59
- labelView?: "inner" | "outer" | undefined;
60
- type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
61
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
29
+ wrapperRef?: React.Ref<HTMLDivElement> | undefined;
62
30
  leftAddons?: React.ReactNode;
63
31
  rightAddons?: React.ReactNode;
64
32
  bottomAddons?: React.ReactNode;
@@ -82,7 +50,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
82
50
  * Дополнительный закрепленный текст справа от основного значения.
83
51
  * Например: value='85' suffix=' мес' -> 85 мес
84
52
  */
85
- suffix?: React.ReactNode;
53
+ suffix?: ReactNode;
86
54
  /**
87
55
  * Дополнительный класс для контейнера с суффиксом
88
56
  */
package/Component.js CHANGED
@@ -3,17 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var cn = require('classnames');
7
6
  var mergeRefs = require('react-merge-refs');
7
+ var cn = require('classnames');
8
8
  var coreComponentsPortal = require('@alfalab/core-components-portal');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
12
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
13
  var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
14
+ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
15
15
 
16
- /*! *****************************************************************************
16
+ /******************************************************************************
17
17
  Copyright (c) Microsoft Corporation.
18
18
 
19
19
  Permission to use, copy, modify, and/or distribute this software for any
@@ -52,7 +52,7 @@ function __rest(s, e) {
52
52
  return t;
53
53
  }
54
54
 
55
- var styles = {"suffixContainer":"with-suffix__suffixContainer_bj2cv","suffixVisible":"with-suffix__suffixVisible_bj2cv","hasSuffix":"with-suffix__hasSuffix_bj2cv","spacer":"with-suffix__spacer_bj2cv","suffix":"with-suffix__suffix_bj2cv","disabled":"with-suffix__disabled_bj2cv","readOnly":"with-suffix__readOnly_bj2cv"};
55
+ var styles = {"suffixContainer":"with-suffix__suffixContainer_d860h","suffixVisible":"with-suffix__suffixVisible_d860h","hasSuffix":"with-suffix__hasSuffix_d860h","spacer":"with-suffix__spacer_d860h","suffix":"with-suffix__suffix_d860h","disabled":"with-suffix__disabled_d860h","readOnly":"with-suffix__readOnly_d860h"};
56
56
  require('./index.css')
57
57
 
58
58
  var withSuffix = function (Input) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
3
+ import { FC, ReactNode, RefAttributes } from "react";
4
4
  import { InputProps } from "@alfalab/core-components-input";
5
5
  type withSuffixProps = InputProps & {
6
6
  /**
@@ -13,7 +13,7 @@ type withSuffixProps = InputProps & {
13
13
  */
14
14
  suffixContainerClassName?: string;
15
15
  };
16
- declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
16
+ declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
17
17
  value?: string | undefined;
18
18
  defaultValue?: string | undefined;
19
19
  block?: boolean | undefined;
@@ -26,39 +26,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
26
26
  label?: React.ReactNode;
27
27
  labelView?: "inner" | "outer" | undefined;
28
28
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
29
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
30
- leftAddons?: React.ReactNode;
31
- rightAddons?: React.ReactNode;
32
- bottomAddons?: React.ReactNode;
33
- className?: string | undefined;
34
- fieldClassName?: string | undefined;
35
- inputClassName?: string | undefined;
36
- labelClassName?: string | undefined;
37
- addonsClassName?: string | undefined;
38
- focusedClassName?: string | undefined;
39
- filledClassName?: string | undefined;
40
- onChange?: ((event: React.ChangeEvent<HTMLInputElement>, payload: {
41
- value: string;
42
- }) => void) | undefined;
43
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
44
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
45
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
46
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
47
- dataTestId?: string | undefined;
48
- } & React.RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
49
- value?: string | undefined;
50
- defaultValue?: string | undefined;
51
- block?: boolean | undefined;
52
- clear?: boolean | undefined;
53
- size?: "s" | "m" | "l" | "xl" | undefined;
54
- colors?: "default" | "inverted" | undefined;
55
- error?: React.ReactNode;
56
- success?: boolean | undefined;
57
- hint?: React.ReactNode;
58
- label?: React.ReactNode;
59
- labelView?: "inner" | "outer" | undefined;
60
- type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
61
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
29
+ wrapperRef?: React.Ref<HTMLDivElement> | undefined;
62
30
  leftAddons?: React.ReactNode;
63
31
  rightAddons?: React.ReactNode;
64
32
  bottomAddons?: React.ReactNode;
@@ -82,7 +50,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
82
50
  * Дополнительный закрепленный текст справа от основного значения.
83
51
  * Например: value='85' suffix=' мес' -> 85 мес
84
52
  */
85
- suffix?: React.ReactNode;
53
+ suffix?: ReactNode;
86
54
  /**
87
55
  * Дополнительный класс для контейнера с суффиксом
88
56
  */
package/cssm/Component.js CHANGED
@@ -3,19 +3,19 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var cn = require('classnames');
7
6
  var mergeRefs = require('react-merge-refs');
7
+ var cn = require('classnames');
8
8
  var coreComponentsPortal = require('@alfalab/core-components-portal/cssm');
9
9
  var styles = require('./index.module.css');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
15
14
  var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
15
+ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
16
16
  var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
17
17
 
18
- /*! *****************************************************************************
18
+ /******************************************************************************
19
19
  Copyright (c) Microsoft Corporation.
20
20
 
21
21
  Permission to use, copy, modify, and/or distribute this software for any
package/cssm/index.js CHANGED
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Component = require('./Component.js');
6
6
  require('react');
7
- require('classnames');
8
7
  require('react-merge-refs');
8
+ require('classnames');
9
9
  require('@alfalab/core-components-portal/cssm');
10
10
  require('./index.module.css');
11
11
 
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
3
+ import { FC, ReactNode, RefAttributes } from "react";
4
4
  import { InputProps } from "@alfalab/core-components-input";
5
5
  type withSuffixProps = InputProps & {
6
6
  /**
@@ -13,7 +13,7 @@ type withSuffixProps = InputProps & {
13
13
  */
14
14
  suffixContainerClassName?: string;
15
15
  };
16
- declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
16
+ declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
17
17
  value?: string | undefined;
18
18
  defaultValue?: string | undefined;
19
19
  block?: boolean | undefined;
@@ -26,39 +26,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
26
26
  label?: React.ReactNode;
27
27
  labelView?: "inner" | "outer" | undefined;
28
28
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
29
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
30
- leftAddons?: React.ReactNode;
31
- rightAddons?: React.ReactNode;
32
- bottomAddons?: React.ReactNode;
33
- className?: string | undefined;
34
- fieldClassName?: string | undefined;
35
- inputClassName?: string | undefined;
36
- labelClassName?: string | undefined;
37
- addonsClassName?: string | undefined;
38
- focusedClassName?: string | undefined;
39
- filledClassName?: string | undefined;
40
- onChange?: ((event: React.ChangeEvent<HTMLInputElement>, payload: {
41
- value: string;
42
- }) => void) | undefined;
43
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
44
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
45
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
46
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
47
- dataTestId?: string | undefined;
48
- } & React.RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
49
- value?: string | undefined;
50
- defaultValue?: string | undefined;
51
- block?: boolean | undefined;
52
- clear?: boolean | undefined;
53
- size?: "s" | "m" | "l" | "xl" | undefined;
54
- colors?: "default" | "inverted" | undefined;
55
- error?: React.ReactNode;
56
- success?: boolean | undefined;
57
- hint?: React.ReactNode;
58
- label?: React.ReactNode;
59
- labelView?: "inner" | "outer" | undefined;
60
- type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
61
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
29
+ wrapperRef?: React.Ref<HTMLDivElement> | undefined;
62
30
  leftAddons?: React.ReactNode;
63
31
  rightAddons?: React.ReactNode;
64
32
  bottomAddons?: React.ReactNode;
@@ -82,7 +50,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
82
50
  * Дополнительный закрепленный текст справа от основного значения.
83
51
  * Например: value='85' suffix=' мес' -> 85 мес
84
52
  */
85
- suffix?: React.ReactNode;
53
+ suffix?: ReactNode;
86
54
  /**
87
55
  * Дополнительный класс для контейнера с суффиксом
88
56
  */
package/esm/Component.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import React, { forwardRef, useRef, useState, useCallback, Fragment } from 'react';
2
- import cn from 'classnames';
3
2
  import mergeRefs from 'react-merge-refs';
3
+ import cn from 'classnames';
4
4
  import { Portal } from '@alfalab/core-components-portal/esm';
5
5
 
6
- /*! *****************************************************************************
6
+ /******************************************************************************
7
7
  Copyright (c) Microsoft Corporation.
8
8
 
9
9
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,7 +42,7 @@ function __rest(s, e) {
42
42
  return t;
43
43
  }
44
44
 
45
- var styles = {"suffixContainer":"with-suffix__suffixContainer_bj2cv","suffixVisible":"with-suffix__suffixVisible_bj2cv","hasSuffix":"with-suffix__hasSuffix_bj2cv","spacer":"with-suffix__spacer_bj2cv","suffix":"with-suffix__suffix_bj2cv","disabled":"with-suffix__disabled_bj2cv","readOnly":"with-suffix__readOnly_bj2cv"};
45
+ var styles = {"suffixContainer":"with-suffix__suffixContainer_d860h","suffixVisible":"with-suffix__suffixVisible_d860h","hasSuffix":"with-suffix__hasSuffix_d860h","spacer":"with-suffix__spacer_d860h","suffix":"with-suffix__suffix_d860h","disabled":"with-suffix__disabled_d860h","readOnly":"with-suffix__readOnly_d860h"};
46
46
  require('./index.css')
47
47
 
48
48
  var withSuffix = function (Input) {
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: ii3cn */
1
+ /* hash: 7ia3p */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_bj2cv {
27
+ .with-suffix__suffixContainer_d860h {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_bj2cv,
41
- .with-suffix__suffixVisible_bj2cv .with-suffix__suffixContainer_bj2cv {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_d860h,
41
+ .with-suffix__suffixVisible_d860h .with-suffix__suffixContainer_d860h {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_bj2cv input:focus::placeholder {
44
+ .with-suffix__hasSuffix_d860h input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_bj2cv {
48
+ .with-suffix__spacer_d860h {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_bj2cv {
53
+ .with-suffix__suffix_d860h {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_bj2cv {
56
+ .with-suffix__disabled_d860h {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_bj2cv {
59
+ .with-suffix__readOnly_d860h {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { withSuffix } from './Component.js';
2
2
  import 'react';
3
- import 'classnames';
4
3
  import 'react-merge-refs';
4
+ import 'classnames';
5
5
  import '@alfalab/core-components-portal/esm';
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: ii3cn */
1
+ /* hash: 7ia3p */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_bj2cv {
27
+ .with-suffix__suffixContainer_d860h {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_bj2cv,
41
- .with-suffix__suffixVisible_bj2cv .with-suffix__suffixContainer_bj2cv {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_d860h,
41
+ .with-suffix__suffixVisible_d860h .with-suffix__suffixContainer_d860h {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_bj2cv input:focus::placeholder {
44
+ .with-suffix__hasSuffix_d860h input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_bj2cv {
48
+ .with-suffix__spacer_d860h {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_bj2cv {
53
+ .with-suffix__suffix_d860h {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_bj2cv {
56
+ .with-suffix__disabled_d860h {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_bj2cv {
59
+ .with-suffix__readOnly_d860h {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/index.js CHANGED
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Component = require('./Component.js');
6
6
  require('react');
7
- require('classnames');
8
7
  require('react-merge-refs');
8
+ require('classnames');
9
9
  require('@alfalab/core-components-portal');
10
10
 
11
11
 
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
3
+ import { FC, ReactNode, RefAttributes } from "react";
4
4
  import { InputProps } from "@alfalab/core-components-input";
5
5
  type withSuffixProps = InputProps & {
6
6
  /**
@@ -13,7 +13,7 @@ type withSuffixProps = InputProps & {
13
13
  */
14
14
  suffixContainerClassName?: string;
15
15
  };
16
- declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
16
+ declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
17
17
  value?: string | undefined;
18
18
  defaultValue?: string | undefined;
19
19
  block?: boolean | undefined;
@@ -26,39 +26,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
26
26
  label?: React.ReactNode;
27
27
  labelView?: "inner" | "outer" | undefined;
28
28
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
29
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
30
- leftAddons?: React.ReactNode;
31
- rightAddons?: React.ReactNode;
32
- bottomAddons?: React.ReactNode;
33
- className?: string | undefined;
34
- fieldClassName?: string | undefined;
35
- inputClassName?: string | undefined;
36
- labelClassName?: string | undefined;
37
- addonsClassName?: string | undefined;
38
- focusedClassName?: string | undefined;
39
- filledClassName?: string | undefined;
40
- onChange?: ((event: React.ChangeEvent<HTMLInputElement>, payload: {
41
- value: string;
42
- }) => void) | undefined;
43
- onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
44
- onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
45
- onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
46
- onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
47
- dataTestId?: string | undefined;
48
- } & React.RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "dir" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "className" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
49
- value?: string | undefined;
50
- defaultValue?: string | undefined;
51
- block?: boolean | undefined;
52
- clear?: boolean | undefined;
53
- size?: "s" | "m" | "l" | "xl" | undefined;
54
- colors?: "default" | "inverted" | undefined;
55
- error?: React.ReactNode;
56
- success?: boolean | undefined;
57
- hint?: React.ReactNode;
58
- label?: React.ReactNode;
59
- labelView?: "inner" | "outer" | undefined;
60
- type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
61
- wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
29
+ wrapperRef?: React.Ref<HTMLDivElement> | undefined;
62
30
  leftAddons?: React.ReactNode;
63
31
  rightAddons?: React.ReactNode;
64
32
  bottomAddons?: React.ReactNode;
@@ -82,7 +50,7 @@ declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLIn
82
50
  * Дополнительный закрепленный текст справа от основного значения.
83
51
  * Например: value='85' suffix=' мес' -> 85 мес
84
52
  */
85
- suffix?: React.ReactNode;
53
+ suffix?: ReactNode;
86
54
  /**
87
55
  * Дополнительный класс для контейнера с суффиксом
88
56
  */
@@ -1,9 +1,9 @@
1
1
  import React, { forwardRef, useRef, useState, useCallback, Fragment } from 'react';
2
- import cn from 'classnames';
3
2
  import mergeRefs from 'react-merge-refs';
3
+ import cn from 'classnames';
4
4
  import { Portal } from '@alfalab/core-components-portal/modern';
5
5
 
6
- var styles = {"suffixContainer":"with-suffix__suffixContainer_bj2cv","suffixVisible":"with-suffix__suffixVisible_bj2cv","hasSuffix":"with-suffix__hasSuffix_bj2cv","spacer":"with-suffix__spacer_bj2cv","suffix":"with-suffix__suffix_bj2cv","disabled":"with-suffix__disabled_bj2cv","readOnly":"with-suffix__readOnly_bj2cv"};
6
+ var styles = {"suffixContainer":"with-suffix__suffixContainer_d860h","suffixVisible":"with-suffix__suffixVisible_d860h","hasSuffix":"with-suffix__hasSuffix_d860h","spacer":"with-suffix__spacer_d860h","suffix":"with-suffix__suffix_d860h","disabled":"with-suffix__disabled_d860h","readOnly":"with-suffix__readOnly_d860h"};
7
7
  require('./index.css')
8
8
 
9
9
  const withSuffix = (Input) => forwardRef(({ value, defaultValue, onChange, onClear, suffix = '', placeholder, className, disabled, readOnly, suffixContainerClassName, ...restProps }, ref) => {
@@ -18,7 +18,7 @@ const withSuffix = (Input) => forwardRef(({ value, defaultValue, onChange, onCle
18
18
  setStateValue(payload.value);
19
19
  }
20
20
  }, [onChange, uncontrolled]);
21
- const handleClear = useCallback(event => {
21
+ const handleClear = useCallback((event) => {
22
22
  if (uncontrolled) {
23
23
  setStateValue('');
24
24
  }
@@ -31,10 +31,10 @@ const withSuffix = (Input) => forwardRef(({ value, defaultValue, onChange, onCle
31
31
  () => inputRef.current.parentElement, []);
32
32
  const visibleValue = uncontrolled ? stateValue : value;
33
33
  return (React.createElement(Fragment, null,
34
- React.createElement(Input, Object.assign({ ref: mergeRefs([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn(className, {
34
+ React.createElement(Input, { ref: mergeRefs([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn(className, {
35
35
  [styles.suffixVisible]: Boolean(visibleValue),
36
36
  [styles.hasSuffix]: suffix,
37
- }) }, restProps)),
37
+ }), ...restProps }),
38
38
  React.createElement(Portal, { getPortalContainer: getPortalContainer },
39
39
  React.createElement("div", { className: cn(styles.suffixContainer, suffixContainerClassName) },
40
40
  React.createElement("span", { className: styles.spacer }, visibleValue),
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: ii3cn */
1
+ /* hash: 7ia3p */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_bj2cv {
27
+ .with-suffix__suffixContainer_d860h {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_bj2cv,
41
- .with-suffix__suffixVisible_bj2cv .with-suffix__suffixContainer_bj2cv {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_d860h,
41
+ .with-suffix__suffixVisible_d860h .with-suffix__suffixContainer_d860h {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_bj2cv input:focus::placeholder {
44
+ .with-suffix__hasSuffix_d860h input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_bj2cv {
48
+ .with-suffix__spacer_d860h {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_bj2cv {
53
+ .with-suffix__suffix_d860h {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_bj2cv {
56
+ .with-suffix__disabled_d860h {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_bj2cv {
59
+ .with-suffix__readOnly_d860h {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import 'react';
2
- import 'classnames';
3
2
  import 'react-merge-refs';
3
+ import 'classnames';
4
4
  import '@alfalab/core-components-portal/modern';
5
5
  export { withSuffix } from './Component.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-with-suffix",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,8 +17,8 @@
17
17
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@alfalab/core-components-input": "^10.2.4",
21
- "@alfalab/core-components-portal": "^3.0.1",
20
+ "@alfalab/core-components-input": "^11.0.0",
21
+ "@alfalab/core-components-portal": "^3.1.0",
22
22
  "classnames": "^2.3.1",
23
23
  "react-merge-refs": "^1.1.0"
24
24
  }