New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@snack-uikit/input-private

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-uikit/input-private - npm Package Compare versions

Comparing version 3.0.4 to 3.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# 3.1.0 (2024-02-08)
### Features
* **FF-4211:** add min/max properties, add type number ([7f78157](https://github.com/cloud-ru-tech/snack-uikit/commit/7f78157e10afa4276fd3a389fda7879862748b22))
## 3.0.4 (2024-02-05)

@@ -8,0 +19,0 @@

1

dist/components/InputPrivate/constants.d.ts
export declare const TYPE: {
readonly Text: "text";
readonly Password: "password";
readonly Number: "number";
};
export const TYPE = {
Text: 'text',
Password: 'password',
Number: 'number',
};

4

dist/components/InputPrivate/InputPrivate.js

@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {

export const InputPrivate = forwardRef((_a, ref) => {
var { name, value = '', onChange, placeholder, id, className, type = TYPE.Text, disabled = false, readonly = false, autoComplete = false, maxLength, onFocus, onBlur, onKeyDown, tabIndex = 0, onClick, onMouseDown } = _a, rest = __rest(_a, ["name", "value", "onChange", "placeholder", "id", "className", "type", "disabled", "readonly", "autoComplete", "maxLength", "onFocus", "onBlur", "onKeyDown", "tabIndex", "onClick", "onMouseDown"]);
var { name, value = '', onChange, placeholder, id, className, type = TYPE.Text, disabled = false, readonly = false, autoComplete = false, maxLength, min, max, onFocus, onBlur, onKeyDown, tabIndex = 0, onClick, onMouseDown } = _a, rest = __rest(_a, ["name", "value", "onChange", "placeholder", "id", "className", "type", "disabled", "readonly", "autoComplete", "maxLength", "min", "max", "onFocus", "onBlur", "onKeyDown", "tabIndex", "onClick", "onMouseDown"]);
const onChangeHandler = e => {
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value, e);
};
return (_jsx("input", Object.assign({ name: name, maxLength: maxLength, id: id, className: cn(className, styles.inputPrivate), autoComplete: autoComplete ? 'on' : 'off', ref: ref, value: value, onChange: onChangeHandler, placeholder: placeholder, type: type, disabled: disabled, readOnly: readonly, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, tabIndex: tabIndex, onClick: onClick, onMouseDown: onMouseDown }, extractSupportProps(rest))));
return (_jsx("input", Object.assign({ name: name, maxLength: maxLength, id: id, className: cn(className, styles.inputPrivate), autoComplete: autoComplete ? 'on' : 'off', ref: ref, value: value, onChange: onChangeHandler, placeholder: placeholder, type: type, disabled: disabled, readOnly: readonly, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, tabIndex: tabIndex, onClick: onClick, onMouseDown: onMouseDown, min: min, max: max, title: '' }, extractSupportProps(rest))));
});

@@ -35,4 +35,8 @@ import { ChangeEvent, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, RefAttributes } from 'react';

autoComplete?: boolean;
/** */
/** Максимальная длина вводимого значения */
maxLength?: number;
/** Минимальное значение поля */
min?: number;
/** Максимальное значение поля */
max?: number;
/**

@@ -39,0 +43,0 @@ * Значение атрибута tab-index

@@ -7,3 +7,3 @@ {

"title": "Input Private",
"version": "3.0.4",
"version": "3.1.0",
"sideEffects": [

@@ -40,3 +40,3 @@ "*.css",

},
"gitHead": "b1acc8128bdab6f23b534d7c464208069e59ed8c"
"gitHead": "eb20092ecd05743f00831dfa51a3f5db2416be8f"
}

@@ -45,7 +45,9 @@ # Input Private

| className | `string` | - | CSS-класс |
| type | enum Type: `"text"`, `"password"` | text | Тип инпута |
| type | enum Type: `"number"`, `"text"`, `"password"` | text | Тип инпута |
| disabled | `boolean` | - | Является ли поле деактивированным |
| readonly | `boolean` | - | Является ли поле доступным только для чтения |
| autoComplete | `boolean` | - | Включен ли автокомплит для поля |
| maxLength | `number` | - | |
| maxLength | `number` | - | Максимальная длина вводимого значения |
| min | `number` | - | Минимальное значение поля |
| max | `number` | - | Максимальное значение поля |
| onFocus | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки получения фокуса |

@@ -52,0 +54,0 @@ | onBlur | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки потери фокуса |

export const TYPE = {
Text: 'text',
Password: 'password',
Number: 'number',
} as const;

@@ -40,4 +40,8 @@ import { ChangeEvent, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, RefAttributes } from 'react';

autoComplete?: boolean;
/** */
/** Максимальная длина вводимого значения */
maxLength?: number;
/** Минимальное значение поля */
min?: number;
/** Максимальное значение поля */
max?: number;
/**

@@ -44,0 +48,0 @@ * Значение атрибута tab-index

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc