From e0360db8d686521d43e8eca5163e293c1fae705c Mon Sep 17 00:00:00 2001 From: DmitrySychugov Date: Wed, 19 Apr 2023 17:41:32 +0500 Subject: [PATCH] Web: Components: PasswordInput - added description --- packages/components/password-input/index.js | 12 ++++++++-- .../password-input/password-input.stories.js | 22 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/packages/components/password-input/index.js b/packages/components/password-input/index.js index 471941731e..a1bb5b8cac 100644 --- a/packages/components/password-input/index.js +++ b/packages/components/password-input/index.js @@ -466,14 +466,21 @@ PasswordInput.propTypes = { inputValue: PropTypes.string, /** Sets a callback function that is triggered on PasswordInput */ onChange: PropTypes.func, + /** Default event that is triggered when the button is already pressed but not released */ onKeyDown: PropTypes.func, + /** Event that is triggered when the focused item is lost */ onBlur: PropTypes.func, /** Sets the input width manually */ inputWidth: PropTypes.string, + /** Notifies if the error occurs */ hasError: PropTypes.bool, + /** Notifies if the warning occurs */ hasWarning: PropTypes.bool, + /** Default placeholder input */ placeholder: PropTypes.string, + /** Tab index input */ tabIndex: PropTypes.number, + /** Default maxLength input */ maxLength: PropTypes.number, /** Accepts class */ className: PropTypes.string, @@ -482,6 +489,7 @@ PasswordInput.propTypes = { /** Sets the input disabled */ isDisabled: PropTypes.bool, size: PropTypes.oneOf(["base", "middle", "big", "huge", "large"]), + /** Indicates that the input field has scale */ scale: PropTypes.bool, /** Allows to hide Tooltip */ isDisableTooltip: PropTypes.bool, @@ -507,17 +515,17 @@ PasswordInput.propTypes = { tooltipPasswordSpecial: PropTypes.string, /** Set of special characters for password generator and validator */ generatorSpecial: PropTypes.string, - NewPasswordButtonVisible: PropTypes.bool, /** Set of settings for password generator and validator */ passwordSettings: PropTypes.object, /** Sets a callback function that is triggered on PasswordInput. Returns bool value */ onValidateInput: PropTypes.func, /** Sets a callback function that is triggered when the copy button is clicked. Returns formatted value */ onCopyToClipboard: PropTypes.func, - + /** Sets the tooltip offset to the left */ tooltipOffsetLeft: PropTypes.number, /** Sets the password input view to simple (without tooltips, password progress bar and several additional buttons (copy and generate password) */ simpleView: PropTypes.bool, + /** Sets a title of the password generation button */ generatePasswordTitle: PropTypes.string, }; diff --git a/packages/components/password-input/password-input.stories.js b/packages/components/password-input/password-input.stories.js index cb405762e8..5c14aa1503 100644 --- a/packages/components/password-input/password-input.stories.js +++ b/packages/components/password-input/password-input.stories.js @@ -2,6 +2,24 @@ import React, { useState, useEffect } from "react"; import PasswordInput from "."; import TextInput from "../text-input"; +export default { + title: "Components/PasswordInput", + component: PasswordInput, + parameters: { + docs: { + description: { + component: "Paging is used to navigate med content pages", + }, + }, + }, + argTypes: { + settingMinLength: { description: "Property for story" }, + settingsUpperCase: { description: "Property for story" }, + settingsDigits: { description: "Property for story" }, + settingsSpecSymbols: { description: "Property for story" }, + }, +}; + const Template = ({ settingMinLength, settingsUpperCase, @@ -64,8 +82,8 @@ const Template = ({ ); }; -export const basic = Template.bind({}); -basic.args = { +export const Default = Template.bind({}); +Default.args = { isDisabled: false, settingMinLength: 6, settingsUpperCase: false,