npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cloud-ru/ds-input-private

v1.0.23

Published

Базовая обёртка `<input>` с состояниями, иконками, кнопкой очистки и счётчиком — фундамент для публичных полей ввода (Search, FieldText и пр.).

Readme

InputPrivate

@cloud-ru/ds-input-private — Базовая обёртка <input> с состояниями, иконками, кнопкой очистки и счётчиком — фундамент для публичных полей ввода (Search, FieldText и пр.).

@cloud-ru/ds-input-private — внутренний строительный блок для полей ввода. Реализует общую визуальную обвязку: рамка по состоянию (focus / disabled / readonly / error), слоты под иконку, prefix/suffix, кнопку очистки и счётчик символов. Прямого применения в продуктовом коде не имеет — используйте публичные пакеты (@cloud-ru/ds-search, доменные поля), которые композируются поверх него.

Когда использовать

  • Создаёте новый публичный input-компонент и хотите получить готовое поведение состояний и слотов.
  • Реализуете кастомный фильтр / автокомплит и нужна та же обвязка, что у Search.

В продуктовом коде не импортируйте напрямую — берите публичный компонент.

Установка

pnpm add @cloud-ru/ds-input-private
import { InputPrivate, useClearButton, useButtonNavigation } from '@cloud-ru/ds-input-private'

Props

InputPrivate

InputPrivateProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | autoComplete | string \| boolean | false | Включен ли автокомплит для поля | | autoFocus | boolean | false | Включен ли авто-фокус для поля | | className | string | — | CSS-класс | | data-test-id | string | — | | | disabled | boolean | false | Является ли поле деактивированным | | id | string | — | Значение html-атрибута id | | inputMode | "decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | text | Режим работы экранной клавиатуры | | max | number | — | Максимальное значение поля | | maxLength | number | — | Максимальная длина вводимого значения | | min | number | — | Минимальное значение поля | | name | string | — | Значение html-атрибута name | | onBlur | FocusEventHandler<HTMLInputElement> | — | Колбек обработки потери фокуса | | onChange | ((value: string, e?: ChangeEvent<HTMLInputElement>) => void) | — | Колбек смены значения | | onClick | MouseEventHandler<HTMLInputElement> | — | Колбек обработки клика | | onFocus | FocusEventHandler<HTMLInputElement> | — | Колбек обработки получения фокуса | | onKeyDown | KeyboardEventHandler<HTMLInputElement> | — | Колбек обработки начала нажатия клавиши клавиатуры | | onMouseDown | MouseEventHandler<HTMLInputElement> | — | Колбек обработки нажатия кнопки мыши | | onPaste | ClipboardEventHandler<HTMLInputElement> | — | Колбек обработки вставки значения | | pattern | string | — | Регулярное выражение валидного инпута | | placeholder | string | — | Значение плейсхолдера | | readonly | boolean | false | Является ли поле доступным только для чтения | | spellCheck | boolean | true | Значение атрибута spellcheck (проверка орфографии) | | step | string \| number | — | Максимальное значение поля | | tabIndex | number | 0 | Значение атрибута tab-index | | type | "email" | "number" | "password" | "tel" | "text" | "url" | text | Тип инпута | | value | string | `` | Значение input |

Related types

  • InputMode = "decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"

  • Type = "email" | "number" | "password" | "tel" | "text" | "url"

useButtonNavigation

UseButtonNavigationProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | inputRef | RefObject<T \| null> | — | | | onButtonKeyDown | KeyboardEventHandler<HTMLButtonElement> | () => {} | | | postfixButtons | ActiveItem | ButtonProps | InactiveItem | — | | | prefixButtons | ActiveItem | ButtonProps | InactiveItem | [] | | | readonly | boolean | — | | | setInputFocus | (() => void) | () => focusWithoutScroll(inputRef.current) | | | submitKeys | string[] | — | |

Related types

ActiveItem

| Prop | Type | Default | Description | |------|------|---------|-------------| | active | true | — | | | id | string | — | | | ref | ButtonRef | — | | | render | (props: RenderActiveButtonProps) => ReactElement | — | | | show | boolean | — | |

  • ButtonProps = InactiveItem | ActiveItem

  • ButtonRef = RefObject<HTMLButtonElement | null>

InactiveItem

| Prop | Type | Default | Description | |------|------|---------|-------------| | active | false | — | | | id | string | — | | | render | (props: RenderInactiveButtonProps) => ReactElement | — | | | show | boolean | — | |

useClearButton

UseClearButtonProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | clearButtonRef | RefObject<HTMLButtonElement \| null> | — | | | dataTestId | string | button-clear-value | data-test-id кнопки. Переопределяется полем, когда у него свой публичный id слота. | | disabled | boolean | — | | | onClear | MouseEventHandler<HTMLButtonElement> | — | | | onDown | MouseEventHandler<HTMLButtonElement> | — | | | showClearButton | boolean | — | | | size | "l" | "m" | "s" | — | |

Related types

  • Size = "l" | "m" | "s"

Смотри также

  • Search, SearchPrivate — публичные потребители.