@alfalab/core-components-input-autocomplete 8.1.1 → 8.2.1

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 (52) hide show
  1. package/Component.d.ts +5 -3
  2. package/Component.js +1 -1
  3. package/Component.mobile.d.ts +10 -2
  4. package/Component.mobile.js +5 -4
  5. package/autocomplete-field/Component.d.ts +1 -1
  6. package/autocomplete-field/Component.js +4 -4
  7. package/autocomplete-field/index.css +2 -2
  8. package/autocomplete-field/index.js +1 -1
  9. package/autocomplete-mobile-field/Component.d.ts +1 -1
  10. package/autocomplete-mobile-field/Component.js +6 -6
  11. package/autocomplete-mobile-field/index.css +8 -8
  12. package/autocomplete-mobile-field/index.js +1 -1
  13. package/cssm/Component.d.ts +3 -1
  14. package/cssm/Component.mobile.d.ts +10 -2
  15. package/cssm/Component.mobile.js +3 -2
  16. package/cssm/autocomplete-field/Component.d.ts +1 -1
  17. package/cssm/autocomplete-field/Component.js +2 -2
  18. package/cssm/autocomplete-mobile-field/Component.d.ts +1 -1
  19. package/cssm/autocomplete-mobile-field/Component.js +4 -4
  20. package/esm/Component.d.ts +3 -1
  21. package/esm/Component.js +1 -1
  22. package/esm/Component.mobile.d.ts +10 -2
  23. package/esm/Component.mobile.js +5 -4
  24. package/esm/autocomplete-field/Component.d.ts +1 -1
  25. package/esm/autocomplete-field/Component.js +4 -4
  26. package/esm/autocomplete-field/index.css +2 -2
  27. package/esm/autocomplete-field/index.js +1 -1
  28. package/esm/autocomplete-mobile-field/Component.d.ts +1 -1
  29. package/esm/autocomplete-mobile-field/Component.js +6 -6
  30. package/esm/autocomplete-mobile-field/index.css +8 -8
  31. package/esm/autocomplete-mobile-field/index.js +1 -1
  32. package/esm/index.js +1 -1
  33. package/esm/mobile.css +4 -4
  34. package/esm/mobile.js +1 -1
  35. package/esm/{tslib.es6-c06c53d3.d.ts → tslib.es6-0351ba9b.d.ts} +0 -0
  36. package/esm/{tslib.es6-c06c53d3.js → tslib.es6-0351ba9b.js} +0 -0
  37. package/index.js +1 -1
  38. package/mobile.css +4 -4
  39. package/mobile.js +1 -1
  40. package/modern/Component.d.ts +3 -1
  41. package/modern/Component.mobile.d.ts +10 -2
  42. package/modern/Component.mobile.js +4 -3
  43. package/modern/autocomplete-field/Component.d.ts +1 -1
  44. package/modern/autocomplete-field/Component.js +3 -3
  45. package/modern/autocomplete-field/index.css +2 -2
  46. package/modern/autocomplete-mobile-field/Component.d.ts +1 -1
  47. package/modern/autocomplete-mobile-field/Component.js +4 -4
  48. package/modern/autocomplete-mobile-field/index.css +8 -8
  49. package/modern/mobile.css +4 -4
  50. package/package.json +5 -5
  51. /package/{tslib.es6-3a57502a.d.ts → tslib.es6-5ba7273e.d.ts} +0 -0
  52. /package/{tslib.es6-3a57502a.js → tslib.es6-5ba7273e.js} +0 -0
package/Component.d.ts CHANGED
@@ -33,11 +33,11 @@ type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSelect'> &
33
33
  */
34
34
  updatePopover?: BaseSelectProps['updatePopover'];
35
35
  };
36
- declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "className" | "dataTestId" | "label" | "size" | "block" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "disabled" | "name" | "fieldClassName" | "error" | "hint" | "multiple" | "preventFlip" | "popperClassName" | "open" | "options" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
36
+ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
37
37
  /**
38
38
  * Компонент ввода значения
39
39
  */
40
- Input?: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "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"> & {
40
+ Input?: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "disabled" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "form" | "pattern" | "list" | "step" | "height" | "name" | "width" | "multiple" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src"> & {
41
41
  value?: string | undefined;
42
42
  defaultValue?: string | undefined;
43
43
  block?: boolean | undefined;
@@ -48,6 +48,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
48
48
  success?: boolean | undefined;
49
49
  hint?: React.ReactNode;
50
50
  label?: React.ReactNode;
51
+ labelView?: "inner" | "outer" | undefined;
51
52
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
52
53
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
53
54
  leftAddons?: React.ReactNode;
@@ -72,7 +73,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
72
73
  /**
73
74
  * Пропсы, которые будут прокинуты в инпут
74
75
  */
75
- inputProps?: (Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "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"> & {
76
+ inputProps?: (Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "disabled" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "form" | "pattern" | "list" | "step" | "height" | "name" | "width" | "multiple" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src"> & {
76
77
  value?: string | undefined;
77
78
  defaultValue?: string | undefined;
78
79
  block?: boolean | undefined;
@@ -83,6 +84,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
83
84
  success?: boolean | undefined;
84
85
  hint?: React.ReactNode;
85
86
  label?: React.ReactNode;
87
+ labelView?: "inner" | "outer" | undefined;
86
88
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
87
89
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
88
90
  leftAddons?: React.ReactNode;
package/Component.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('./tslib.es6-3a57502a.js');
5
+ var tslib_es6 = require('./tslib.es6-5ba7273e.js');
6
6
  require('classnames');
7
7
  var React = require('react');
8
8
  require('react-merge-refs');
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ChangeEvent } from "react";
3
+ import { ChangeEvent, ElementType } from "react";
4
4
  import { BaseSelectProps, BaseSelectChangePayload } from "@alfalab/core-components-select";
5
5
  import { ButtonProps } from "@alfalab/core-components-button";
6
6
  import { BottomSheetProps } from "./index-7ca84eff";
@@ -45,8 +45,12 @@ type InputAutocompleteMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Check
45
45
  * Дополнительные пропсы на кнопку "отмена"
46
46
  */
47
47
  cancelButtonProps?: ButtonProps;
48
+ /**
49
+ * Кастомный инпут
50
+ */
51
+ Input?: ElementType;
48
52
  };
49
- declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "className" | "dataTestId" | "label" | "size" | "block" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabled" | "name" | "fieldClassName" | "error" | "hint" | "preventFlip" | "popperClassName" | "open" | "options" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
53
+ declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
50
54
  /**
51
55
  * Обработчик выбора
52
56
  */
@@ -87,5 +91,9 @@ declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<Base
87
91
  * Дополнительные пропсы на кнопку "отмена"
88
92
  */
89
93
  cancelButtonProps?: Partial<import("@alfalab/core-components-button").AnchorButtonProps> | Partial<import("@alfalab/core-components-button").NativeButtonProps> | undefined;
94
+ /**
95
+ * Кастомный инпут
96
+ */
97
+ Input?: "symbol" | "object" | "s" | "label" | "slot" | "style" | "title" | React.ComponentClass<any, any> | React.FunctionComponent<any> | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "samp" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | undefined;
90
98
  } & React.RefAttributes<unknown>>;
91
99
  export { InputAutocompleteMobileProps, InputAutocompleteMobile };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('./tslib.es6-3a57502a.js');
5
+ var tslib_es6 = require('./tslib.es6-5ba7273e.js');
6
6
  var cn = require('classnames');
7
7
  var React = require('react');
8
8
  var mergeRefs = require('react-merge-refs');
@@ -21,12 +21,12 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
21
  var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
22
22
  var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle);
23
23
 
24
- var styles = {"bottomSheetInput":"input-autocomplete__bottomSheetInput_fyd4p","footer":"input-autocomplete__footer_fyd4p"};
24
+ var styles = {"bottomSheetInput":"input-autocomplete__bottomSheetInput_oluh5","footer":"input-autocomplete__footer_oluh5"};
25
25
  require('./mobile.css')
26
26
 
27
27
  var SELECTED = [];
28
28
  var InputAutocompleteMobile = React__default['default'].forwardRef(function (_a, ref) {
29
- var _b = _a.bottomSheetProps, bottomSheetProps = _b === void 0 ? {} : _b, _c = _a.bottomSheetHeaderAddonsProps, bottomSheetHeaderAddonsProps = _c === void 0 ? {} : _c, _d = _a.value, value = _d === void 0 ? '' : _d, _e = _a.filter, filter = _e === void 0 ? '' : _e, name = _a.name, _f = _a.Arrow, Arrow = _f === void 0 ? null : _f, label = _a.label, placeholder = _a.placeholder, _g = _a.size, size = _g === void 0 ? 's' : _g, openProp = _a.open, onFilter = _a.onFilter, onChange = _a.onChange, onOpen = _a.onOpen, onCancel = _a.onCancel, onClearFilter = _a.onClearFilter, continueButtonProps = _a.continueButtonProps, cancelButtonProps = _a.cancelButtonProps, restProps = tslib_es6.__rest(_a, ["bottomSheetProps", "bottomSheetHeaderAddonsProps", "value", "filter", "name", "Arrow", "label", "placeholder", "size", "open", "onFilter", "onChange", "onOpen", "onCancel", "onClearFilter", "continueButtonProps", "cancelButtonProps"]);
29
+ var Input = _a.Input, _b = _a.bottomSheetProps, bottomSheetProps = _b === void 0 ? {} : _b, _c = _a.bottomSheetHeaderAddonsProps, bottomSheetHeaderAddonsProps = _c === void 0 ? {} : _c, _d = _a.value, value = _d === void 0 ? '' : _d, _e = _a.filter, filter = _e === void 0 ? '' : _e, name = _a.name, _f = _a.Arrow, Arrow = _f === void 0 ? null : _f, label = _a.label, placeholder = _a.placeholder, _g = _a.size, size = _g === void 0 ? 's' : _g, openProp = _a.open, onFilter = _a.onFilter, onChange = _a.onChange, onOpen = _a.onOpen, onCancel = _a.onCancel, onClearFilter = _a.onClearFilter, continueButtonProps = _a.continueButtonProps, cancelButtonProps = _a.cancelButtonProps, restProps = tslib_es6.__rest(_a, ["Input", "bottomSheetProps", "bottomSheetHeaderAddonsProps", "value", "filter", "name", "Arrow", "label", "placeholder", "size", "open", "onFilter", "onChange", "onOpen", "onCancel", "onClearFilter", "continueButtonProps", "cancelButtonProps"]);
30
30
  var _h = React.useState(false), open = _h[0], setOpen = _h[1];
31
31
  var bottomSheetInputRef = React.useRef(null);
32
32
  var targetRef = React.useRef(null);
@@ -69,9 +69,10 @@ var InputAutocompleteMobile = React__default['default'].forwardRef(function (_a,
69
69
  }
70
70
  };
71
71
  var getBottomSheetProps = function () {
72
+ var Component = Input || coreComponentsInput.Input;
72
73
  return tslib_es6.__assign(tslib_es6.__assign({ actionButton: (React__default['default'].createElement("div", { className: styles.footer },
73
74
  React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'primary', size: 's', onClick: handleChange }, continueButtonProps), "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"),
74
- React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'secondary', size: 's', onClick: handleCancel }, cancelButtonProps), "\u041E\u0442\u043C\u0435\u043D\u0430"))), title: label || placeholder, bottomAddons: (React__default['default'].createElement(coreComponentsInput.Input, tslib_es6.__assign({ block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus }, bottomSheetHeaderAddonsProps, { className: cn__default['default'](styles.bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs__default['default']([
75
+ React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'secondary', size: 's', onClick: handleCancel }, cancelButtonProps), "\u041E\u0442\u043C\u0435\u043D\u0430"))), title: label || placeholder, bottomAddons: (React__default['default'].createElement(Component, tslib_es6.__assign({ block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus }, bottomSheetHeaderAddonsProps, { className: cn__default['default'](styles.bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs__default['default']([
75
76
  bottomSheetInputRef,
76
77
  bottomSheetHeaderAddonsProps.ref,
77
78
  ]) }))), initialHeight: 'full' }, bottomSheetProps), { containerProps: tslib_es6.__assign({ onTouchMove: handleOptionsListTouchMove }, bottomSheetProps.containerProps) });
@@ -2,5 +2,5 @@
2
2
  import { FieldProps } from "@alfalab/core-components-select";
3
3
  import { InputAutocompleteProps } from "../Component";
4
4
  type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
5
- declare const AutocompleteField: ({ label, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
5
+ declare const AutocompleteField: ({ label, labelView, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
6
6
  export { AutocompleteFieldProps, AutocompleteField };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../tslib.es6-3a57502a.js');
5
+ var tslib_es6 = require('../tslib.es6-5ba7273e.js');
6
6
  var cn = require('classnames');
7
7
  var React = require('react');
8
8
  var mergeRefs = require('react-merge-refs');
@@ -14,12 +14,12 @@ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
15
  var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
16
16
 
17
- var styles = {"arrow":"input-autocomplete__arrow_dhoym","error":"input-autocomplete__error_dhoym"};
17
+ var styles = {"arrow":"input-autocomplete__arrow_m56b2","error":"input-autocomplete__error_m56b2"};
18
18
  require('./index.css')
19
19
 
20
20
  var AutocompleteField = function (_a) {
21
21
  var _b;
22
- var label = _a.label, placeholder = _a.placeholder, size = _a.size, Arrow = _a.Arrow, _c = _a.Input, Input = _c === void 0 ? coreComponentsInput.Input : _c, value = _a.value, error = _a.error, success = _a.success, hint = _a.hint, disabled = _a.disabled, readOnly = _a.readOnly, onInput = _a.onInput, _d = _a.inputProps, inputProps = _d === void 0 ? {} : _d, innerProps = _a.innerProps;
22
+ var label = _a.label, _c = _a.labelView, labelView = _c === void 0 ? 'inner' : _c, placeholder = _a.placeholder, size = _a.size, Arrow = _a.Arrow, _d = _a.Input, Input = _d === void 0 ? coreComponentsInput.Input : _d, value = _a.value, error = _a.error, success = _a.success, hint = _a.hint, disabled = _a.disabled, readOnly = _a.readOnly, onInput = _a.onInput, _e = _a.inputProps, inputProps = _e === void 0 ? {} : _e, innerProps = _a.innerProps;
23
23
  var inputRef = React.useRef(null);
24
24
  var onClick = innerProps.onClick, onFocus = innerProps.onFocus;
25
25
  var inputDisabled = disabled || readOnly;
@@ -36,7 +36,7 @@ var AutocompleteField = function (_a) {
36
36
  wrapperRef: mergeRefs__default['default']([innerProps.ref, inputProps.wrapperRef]),
37
37
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
38
38
  // @ts-ignore
39
- ref: mergeRefs__default['default']([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: onInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React__default['default'].createElement(React__default['default'].Fragment, null,
39
+ ref: mergeRefs__default['default']([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, labelView: labelView, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: onInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React__default['default'].createElement(React__default['default'].Fragment, null,
40
40
  inputProps.rightAddons,
41
41
  Arrow && (React__default['default'].createElement("span", { className: cn__default['default'](styles.arrow, (_b = {},
42
42
  _b[styles.error] = error,
@@ -1,4 +1,4 @@
1
- /* hash: 1m0nd */
2
- .input-autocomplete__arrow_dhoym.input-autocomplete__error_dhoym ~ * {
1
+ /* hash: 1pucs */
2
+ .input-autocomplete__arrow_m56b2.input-autocomplete__error_m56b2 ~ * {
3
3
  display: none;
4
4
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../tslib.es6-3a57502a.js');
5
+ require('../tslib.es6-5ba7273e.js');
6
6
  require('classnames');
7
7
  require('react');
8
8
  require('react-merge-refs');
@@ -3,5 +3,5 @@ import { FormControlProps } from "@alfalab/core-components-form-control";
3
3
  import { FieldProps as BaseFieldProps } from "@alfalab/core-components-select";
4
4
  import { InputAutocompleteProps } from "../index";
5
5
  type AutocompleteMobileFieldProps = FormControlProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & Pick<InputAutocompleteProps, 'value'>;
6
- declare const AutocompleteMobileField: ({ size, open, error, hint, disabled, label, placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => JSX.Element;
6
+ declare const AutocompleteMobileField: ({ size, open, error, hint, disabled, label, labelView, placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => JSX.Element;
7
7
  export { AutocompleteMobileFieldProps, AutocompleteMobileField };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../tslib.es6-3a57502a.js');
5
+ var tslib_es6 = require('../tslib.es6-5ba7273e.js');
6
6
  var cn = require('classnames');
7
7
  var React = require('react');
8
8
  var hooks = require('@alfalab/hooks');
@@ -13,22 +13,22 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
13
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
15
 
16
- var styles = {"component":"input-autocomplete__component_1ndam","field":"input-autocomplete__field_1ndam","disabled":"input-autocomplete__disabled_1ndam","placeholder":"input-autocomplete__placeholder_1ndam","contentWrapper":"input-autocomplete__contentWrapper_1ndam","value":"input-autocomplete__value_1ndam","focusVisible":"input-autocomplete__focusVisible_1ndam"};
16
+ var styles = {"component":"input-autocomplete__component_wegyt","field":"input-autocomplete__field_wegyt","disabled":"input-autocomplete__disabled_wegyt","placeholder":"input-autocomplete__placeholder_wegyt","contentWrapper":"input-autocomplete__contentWrapper_wegyt","value":"input-autocomplete__value_wegyt","focusVisible":"input-autocomplete__focusVisible_wegyt"};
17
17
  require('./index.css')
18
18
 
19
19
  var AutocompleteMobileField = function (_a) {
20
20
  var _b;
21
- var _c = _a.size, size = _c === void 0 ? 'm' : _c, open = _a.open, error = _a.error, hint = _a.hint, disabled = _a.disabled, label = _a.label, placeholder = _a.placeholder, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, Arrow = _a.Arrow, valueRenderer = _a.valueRenderer, toggleMenu = _a.toggleMenu, setSelectedItems = _a.setSelectedItems, selectedMultiple = _a.selectedMultiple, restProps = tslib_es6.__rest(_a, ["size", "open", "error", "hint", "disabled", "label", "placeholder", "value", "innerProps", "dataTestId", "fieldClassName", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
22
- var _d = React.useState(false), focused = _d[0], setFocused = _d[1];
21
+ var _c = _a.size, size = _c === void 0 ? 'm' : _c, open = _a.open, error = _a.error, hint = _a.hint, disabled = _a.disabled, label = _a.label, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, Arrow = _a.Arrow, valueRenderer = _a.valueRenderer, toggleMenu = _a.toggleMenu, setSelectedItems = _a.setSelectedItems, selectedMultiple = _a.selectedMultiple, restProps = tslib_es6.__rest(_a, ["size", "open", "error", "hint", "disabled", "label", "labelView", "placeholder", "value", "innerProps", "dataTestId", "fieldClassName", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
22
+ var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
23
23
  var wrapperRef = React.useRef(null);
24
24
  var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
25
25
  var filled = Boolean(value);
26
- var showLabel = !!label && (filled || !placeholder);
26
+ var showLabel = !!label && (filled || !placeholder || labelView === 'outer');
27
27
  return (React__default['default'].createElement("div", { className: styles.component, ref: wrapperRef, onFocus: function () { return setFocused(true); }, onBlur: function () { return setFocused(false); } },
28
28
  React__default['default'].createElement(coreComponentsFormControl.FormControl, tslib_es6.__assign({ fieldClassName: cn__default['default'](styles.field, fieldClassName, (_b = {},
29
29
  _b[styles.disabled] = disabled,
30
30
  _b[styles.focusVisible] = focusVisible,
31
- _b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, error: error, hint: hint, "data-test-id": dataTestId }, restProps, innerProps),
31
+ _b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, labelView: labelView, error: error, hint: hint, "data-test-id": dataTestId }, restProps, innerProps),
32
32
  React__default['default'].createElement("div", { className: styles.contentWrapper },
33
33
  placeholder && !filled && (React__default['default'].createElement("span", { className: styles.placeholder }, placeholder)),
34
34
  filled && React__default['default'].createElement("div", { className: styles.value }, value)))));
@@ -1,4 +1,4 @@
1
- /* hash: pfwr4 */
1
+ /* hash: n8v03 */
2
2
  :root {
3
3
  --color-light-border-link: #007aff;
4
4
  --color-light-text-secondary: #546272;
@@ -15,20 +15,20 @@
15
15
  --focus-color: var(--color-light-border-link);
16
16
  --disabled-cursor: not-allowed;
17
17
  }
18
- .input-autocomplete__component_1ndam {
18
+ .input-autocomplete__component_wegyt {
19
19
  width: 100%;
20
20
  outline: none;
21
21
  }
22
- .input-autocomplete__field_1ndam:not(.input-autocomplete__disabled_1ndam) {
22
+ .input-autocomplete__field_wegyt:not(.input-autocomplete__disabled_wegyt) {
23
23
  cursor: pointer;
24
24
  }
25
- .input-autocomplete__disabled_1ndam {
25
+ .input-autocomplete__disabled_wegyt {
26
26
  cursor: var(--disabled-cursor);
27
27
  }
28
- .input-autocomplete__placeholder_1ndam {
28
+ .input-autocomplete__placeholder_wegyt {
29
29
  color: var(--color-light-text-secondary);
30
30
  }
31
- .input-autocomplete__contentWrapper_1ndam {
31
+ .input-autocomplete__contentWrapper_wegyt {
32
32
  font-size: 16px;
33
33
  line-height: 20px;
34
34
  font-weight: 400;
@@ -38,12 +38,12 @@
38
38
  overflow: hidden;
39
39
  width: 100%;
40
40
  }
41
- .input-autocomplete__value_1ndam {
41
+ .input-autocomplete__value_wegyt {
42
42
  overflow: hidden;
43
43
  text-overflow: ellipsis;
44
44
  text-align: left;
45
45
  }
46
- .input-autocomplete__focusVisible_1ndam {
46
+ .input-autocomplete__focusVisible_wegyt {
47
47
  outline: 2px solid var(--focus-color);
48
48
  outline-offset: 2px;
49
49
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../tslib.es6-3a57502a.js');
5
+ require('../tslib.es6-5ba7273e.js');
6
6
  require('classnames');
7
7
  require('react');
8
8
  require('@alfalab/hooks');
@@ -33,7 +33,7 @@ type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSelect'> &
33
33
  */
34
34
  updatePopover?: BaseSelectProps['updatePopover'];
35
35
  };
36
- declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
36
+ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
37
37
  /**
38
38
  * Компонент ввода значения
39
39
  */
@@ -48,6 +48,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
48
48
  success?: boolean | undefined;
49
49
  hint?: React.ReactNode;
50
50
  label?: React.ReactNode;
51
+ labelView?: "inner" | "outer" | undefined;
51
52
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
52
53
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
53
54
  leftAddons?: React.ReactNode;
@@ -83,6 +84,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
83
84
  success?: boolean | undefined;
84
85
  hint?: React.ReactNode;
85
86
  label?: React.ReactNode;
87
+ labelView?: "inner" | "outer" | undefined;
86
88
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
87
89
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
88
90
  leftAddons?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ChangeEvent } from "react";
3
+ import { ChangeEvent, ElementType } from "react";
4
4
  import { BaseSelectProps, BaseSelectChangePayload } from "@alfalab/core-components-select";
5
5
  import { ButtonProps } from "@alfalab/core-components-button";
6
6
  import { BottomSheetProps } from "./index-7ca84eff";
@@ -45,8 +45,12 @@ type InputAutocompleteMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Check
45
45
  * Дополнительные пропсы на кнопку "отмена"
46
46
  */
47
47
  cancelButtonProps?: ButtonProps;
48
+ /**
49
+ * Кастомный инпут
50
+ */
51
+ Input?: ElementType;
48
52
  };
49
- declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
53
+ declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
50
54
  /**
51
55
  * Обработчик выбора
52
56
  */
@@ -87,5 +91,9 @@ declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<Base
87
91
  * Дополнительные пропсы на кнопку "отмена"
88
92
  */
89
93
  cancelButtonProps?: Partial<import("@alfalab/core-components-button").AnchorButtonProps> | Partial<import("@alfalab/core-components-button").NativeButtonProps> | undefined;
94
+ /**
95
+ * Кастомный инпут
96
+ */
97
+ Input?: "symbol" | "object" | "s" | "label" | "slot" | "style" | "title" | React.ComponentClass<any, any> | React.FunctionComponent<any> | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "samp" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | undefined;
90
98
  } & React.RefAttributes<unknown>>;
91
99
  export { InputAutocompleteMobileProps, InputAutocompleteMobile };
@@ -26,7 +26,7 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
26
26
 
27
27
  var SELECTED = [];
28
28
  var InputAutocompleteMobile = React__default['default'].forwardRef(function (_a, ref) {
29
- var _b = _a.bottomSheetProps, bottomSheetProps = _b === void 0 ? {} : _b, _c = _a.bottomSheetHeaderAddonsProps, bottomSheetHeaderAddonsProps = _c === void 0 ? {} : _c, _d = _a.value, value = _d === void 0 ? '' : _d, _e = _a.filter, filter = _e === void 0 ? '' : _e, name = _a.name, _f = _a.Arrow, Arrow = _f === void 0 ? null : _f, label = _a.label, placeholder = _a.placeholder, _g = _a.size, size = _g === void 0 ? 's' : _g, openProp = _a.open, onFilter = _a.onFilter, onChange = _a.onChange, onOpen = _a.onOpen, onCancel = _a.onCancel, onClearFilter = _a.onClearFilter, continueButtonProps = _a.continueButtonProps, cancelButtonProps = _a.cancelButtonProps, restProps = tslib_es6.__rest(_a, ["bottomSheetProps", "bottomSheetHeaderAddonsProps", "value", "filter", "name", "Arrow", "label", "placeholder", "size", "open", "onFilter", "onChange", "onOpen", "onCancel", "onClearFilter", "continueButtonProps", "cancelButtonProps"]);
29
+ var Input = _a.Input, _b = _a.bottomSheetProps, bottomSheetProps = _b === void 0 ? {} : _b, _c = _a.bottomSheetHeaderAddonsProps, bottomSheetHeaderAddonsProps = _c === void 0 ? {} : _c, _d = _a.value, value = _d === void 0 ? '' : _d, _e = _a.filter, filter = _e === void 0 ? '' : _e, name = _a.name, _f = _a.Arrow, Arrow = _f === void 0 ? null : _f, label = _a.label, placeholder = _a.placeholder, _g = _a.size, size = _g === void 0 ? 's' : _g, openProp = _a.open, onFilter = _a.onFilter, onChange = _a.onChange, onOpen = _a.onOpen, onCancel = _a.onCancel, onClearFilter = _a.onClearFilter, continueButtonProps = _a.continueButtonProps, cancelButtonProps = _a.cancelButtonProps, restProps = tslib_es6.__rest(_a, ["Input", "bottomSheetProps", "bottomSheetHeaderAddonsProps", "value", "filter", "name", "Arrow", "label", "placeholder", "size", "open", "onFilter", "onChange", "onOpen", "onCancel", "onClearFilter", "continueButtonProps", "cancelButtonProps"]);
30
30
  var _h = React.useState(false), open = _h[0], setOpen = _h[1];
31
31
  var bottomSheetInputRef = React.useRef(null);
32
32
  var targetRef = React.useRef(null);
@@ -69,9 +69,10 @@ var InputAutocompleteMobile = React__default['default'].forwardRef(function (_a,
69
69
  }
70
70
  };
71
71
  var getBottomSheetProps = function () {
72
+ var Component = Input || coreComponentsInput.Input;
72
73
  return tslib_es6.__assign(tslib_es6.__assign({ actionButton: (React__default['default'].createElement("div", { className: styles__default['default'].footer },
73
74
  React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'primary', size: 's', onClick: handleChange }, continueButtonProps), "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"),
74
- React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'secondary', size: 's', onClick: handleCancel }, cancelButtonProps), "\u041E\u0442\u043C\u0435\u043D\u0430"))), title: label || placeholder, bottomAddons: (React__default['default'].createElement(coreComponentsInput.Input, tslib_es6.__assign({ block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus }, bottomSheetHeaderAddonsProps, { className: cn__default['default'](styles__default['default'].bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs__default['default']([
75
+ React__default['default'].createElement(coreComponentsButton.Button, tslib_es6.__assign({ block: true, view: 'secondary', size: 's', onClick: handleCancel }, cancelButtonProps), "\u041E\u0442\u043C\u0435\u043D\u0430"))), title: label || placeholder, bottomAddons: (React__default['default'].createElement(Component, tslib_es6.__assign({ block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus }, bottomSheetHeaderAddonsProps, { className: cn__default['default'](styles__default['default'].bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs__default['default']([
75
76
  bottomSheetInputRef,
76
77
  bottomSheetHeaderAddonsProps.ref,
77
78
  ]) }))), initialHeight: 'full' }, bottomSheetProps), { containerProps: tslib_es6.__assign({ onTouchMove: handleOptionsListTouchMove }, bottomSheetProps.containerProps) });
@@ -2,5 +2,5 @@
2
2
  import { FieldProps } from "@alfalab/core-components-select";
3
3
  import { InputAutocompleteProps } from "../Component";
4
4
  type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
5
- declare const AutocompleteField: ({ label, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
5
+ declare const AutocompleteField: ({ label, labelView, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
6
6
  export { AutocompleteFieldProps, AutocompleteField };
@@ -18,7 +18,7 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
18
18
 
19
19
  var AutocompleteField = function (_a) {
20
20
  var _b;
21
- var label = _a.label, placeholder = _a.placeholder, size = _a.size, Arrow = _a.Arrow, _c = _a.Input, Input = _c === void 0 ? coreComponentsInput.Input : _c, value = _a.value, error = _a.error, success = _a.success, hint = _a.hint, disabled = _a.disabled, readOnly = _a.readOnly, onInput = _a.onInput, _d = _a.inputProps, inputProps = _d === void 0 ? {} : _d, innerProps = _a.innerProps;
21
+ var label = _a.label, _c = _a.labelView, labelView = _c === void 0 ? 'inner' : _c, placeholder = _a.placeholder, size = _a.size, Arrow = _a.Arrow, _d = _a.Input, Input = _d === void 0 ? coreComponentsInput.Input : _d, value = _a.value, error = _a.error, success = _a.success, hint = _a.hint, disabled = _a.disabled, readOnly = _a.readOnly, onInput = _a.onInput, _e = _a.inputProps, inputProps = _e === void 0 ? {} : _e, innerProps = _a.innerProps;
22
22
  var inputRef = React.useRef(null);
23
23
  var onClick = innerProps.onClick, onFocus = innerProps.onFocus;
24
24
  var inputDisabled = disabled || readOnly;
@@ -35,7 +35,7 @@ var AutocompleteField = function (_a) {
35
35
  wrapperRef: mergeRefs__default['default']([innerProps.ref, inputProps.wrapperRef]),
36
36
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
37
37
  // @ts-ignore
38
- ref: mergeRefs__default['default']([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: onInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React__default['default'].createElement(React__default['default'].Fragment, null,
38
+ ref: mergeRefs__default['default']([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, labelView: labelView, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: onInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React__default['default'].createElement(React__default['default'].Fragment, null,
39
39
  inputProps.rightAddons,
40
40
  Arrow && (React__default['default'].createElement("span", { className: cn__default['default'](styles__default['default'].arrow, (_b = {},
41
41
  _b[styles__default['default'].error] = error,
@@ -3,5 +3,5 @@ import { FormControlProps } from "@alfalab/core-components-form-control";
3
3
  import { FieldProps as BaseFieldProps } from "@alfalab/core-components-select";
4
4
  import { InputAutocompleteProps } from "../index";
5
5
  type AutocompleteMobileFieldProps = FormControlProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & Pick<InputAutocompleteProps, 'value'>;
6
- declare const AutocompleteMobileField: ({ size, open, error, hint, disabled, label, placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => JSX.Element;
6
+ declare const AutocompleteMobileField: ({ size, open, error, hint, disabled, label, labelView, placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => JSX.Element;
7
7
  export { AutocompleteMobileFieldProps, AutocompleteMobileField };
@@ -17,17 +17,17 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
17
17
 
18
18
  var AutocompleteMobileField = function (_a) {
19
19
  var _b;
20
- var _c = _a.size, size = _c === void 0 ? 'm' : _c, open = _a.open, error = _a.error, hint = _a.hint, disabled = _a.disabled, label = _a.label, placeholder = _a.placeholder, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, Arrow = _a.Arrow, valueRenderer = _a.valueRenderer, toggleMenu = _a.toggleMenu, setSelectedItems = _a.setSelectedItems, selectedMultiple = _a.selectedMultiple, restProps = tslib_es6.__rest(_a, ["size", "open", "error", "hint", "disabled", "label", "placeholder", "value", "innerProps", "dataTestId", "fieldClassName", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
21
- var _d = React.useState(false), focused = _d[0], setFocused = _d[1];
20
+ var _c = _a.size, size = _c === void 0 ? 'm' : _c, open = _a.open, error = _a.error, hint = _a.hint, disabled = _a.disabled, label = _a.label, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, Arrow = _a.Arrow, valueRenderer = _a.valueRenderer, toggleMenu = _a.toggleMenu, setSelectedItems = _a.setSelectedItems, selectedMultiple = _a.selectedMultiple, restProps = tslib_es6.__rest(_a, ["size", "open", "error", "hint", "disabled", "label", "labelView", "placeholder", "value", "innerProps", "dataTestId", "fieldClassName", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
21
+ var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
22
22
  var wrapperRef = React.useRef(null);
23
23
  var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
24
24
  var filled = Boolean(value);
25
- var showLabel = !!label && (filled || !placeholder);
25
+ var showLabel = !!label && (filled || !placeholder || labelView === 'outer');
26
26
  return (React__default['default'].createElement("div", { className: styles__default['default'].component, ref: wrapperRef, onFocus: function () { return setFocused(true); }, onBlur: function () { return setFocused(false); } },
27
27
  React__default['default'].createElement(coreComponentsFormControl.FormControl, tslib_es6.__assign({ fieldClassName: cn__default['default'](styles__default['default'].field, fieldClassName, (_b = {},
28
28
  _b[styles__default['default'].disabled] = disabled,
29
29
  _b[styles__default['default'].focusVisible] = focusVisible,
30
- _b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, error: error, hint: hint, "data-test-id": dataTestId }, restProps, innerProps),
30
+ _b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, labelView: labelView, error: error, hint: hint, "data-test-id": dataTestId }, restProps, innerProps),
31
31
  React__default['default'].createElement("div", { className: styles__default['default'].contentWrapper },
32
32
  placeholder && !filled && (React__default['default'].createElement("span", { className: styles__default['default'].placeholder }, placeholder)),
33
33
  filled && React__default['default'].createElement("div", { className: styles__default['default'].value }, value)))));
@@ -33,7 +33,7 @@ type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSelect'> &
33
33
  */
34
34
  updatePopover?: BaseSelectProps['updatePopover'];
35
35
  };
36
- declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
36
+ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
37
37
  /**
38
38
  * Компонент ввода значения
39
39
  */
@@ -48,6 +48,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
48
48
  success?: boolean | undefined;
49
49
  hint?: React.ReactNode;
50
50
  label?: React.ReactNode;
51
+ labelView?: "inner" | "outer" | undefined;
51
52
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
52
53
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
53
54
  leftAddons?: React.ReactNode;
@@ -83,6 +84,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
83
84
  success?: boolean | undefined;
84
85
  hint?: React.ReactNode;
85
86
  label?: React.ReactNode;
87
+ labelView?: "inner" | "outer" | undefined;
86
88
  type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
87
89
  wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
88
90
  leftAddons?: React.ReactNode;
package/esm/Component.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as __rest, a as __assign } from './tslib.es6-c06c53d3.js';
1
+ import { _ as __rest, a as __assign } from './tslib.es6-0351ba9b.js';
2
2
  import 'classnames';
3
3
  import React, { forwardRef } from 'react';
4
4
  import 'react-merge-refs';