mimir-ui-kit 0.0.12 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{index4.css → assets/Button.css} +1 -1
- package/dist/assets/Input.css +1 -0
- package/dist/assets/InputPassword.css +1 -0
- package/dist/assets/OtpInput.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/components/Button/Button.d.ts +84 -0
- package/dist/components/Button/Button.js +86 -0
- package/dist/components/Button/constants.js +33 -5
- package/dist/components/Button/index.d.ts +2 -84
- package/dist/components/Button/index.js +7 -51
- package/dist/components/Button/types.d.ts +2 -2
- package/dist/components/Input/Input.d.ts +63 -0
- package/dist/components/Input/Input.js +109 -0
- package/dist/components/Input/constants.js +16 -3
- package/dist/components/Input/index.d.ts +3 -29
- package/dist/components/Input/index.js +5 -59
- package/dist/components/Input/types.d.ts +11 -0
- package/dist/components/Input/types.js +1 -0
- package/dist/components/InputPassword/InputPassword.d.ts +12 -0
- package/dist/components/InputPassword/InputPassword.js +38 -0
- package/dist/components/InputPassword/index.d.ts +2 -306
- package/dist/components/InputPassword/index.js +2 -20
- package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +12 -0
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +38 -0
- package/dist/components/InputPhoneNumber/index.d.ts +1 -306
- package/dist/components/InputPhoneNumber/index.js +2 -26
- package/dist/components/InputPhoneNumber/utils.js +24 -7
- package/dist/components/OtpInput/OtpInput.d.ts +28 -0
- package/dist/components/OtpInput/OtpInput.js +133 -0
- package/dist/components/OtpInput/constants.d.ts +1 -0
- package/dist/components/OtpInput/constants.js +6 -3
- package/dist/components/OtpInput/index.d.ts +1 -18
- package/dist/components/OtpInput/index.js +2 -85
- package/dist/components/icons/Eye.js +31 -20
- package/dist/components/icons/index.js +2 -2
- package/dist/components/index.d.ts +4 -4
- package/dist/components/index.js +18 -18
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/useMediaQuery/constants.js +9 -2
- package/dist/hooks/useMediaQuery/index.js +4 -4
- package/dist/hooks/useMediaQuery/useMediaQuery.js +13 -10
- package/dist/index-CweZ_OcN.js +65 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +23 -21
- package/package.json +91 -91
- package/dist/assets/styles/index.css +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -67
- package/dist/components/Input/Input.stories.d.ts +0 -13
- package/dist/components/InputPassword/Input.stories.d.ts +0 -7
- package/dist/components/InputPhoneNumber/Input.stories.d.ts +0 -335
- package/dist/components/OtpInput/Input.stories.d.ts +0 -26
- package/dist/index-DIxK0V-G.js +0 -44
- package/dist/index.css +0 -1
- package/dist/index2.css +0 -1
- package/dist/index3.css +0 -1
- package/dist/utils/getLog.d.ts +0 -1
- package/dist/utils/getLog.js +0 -4
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -4
@@ -1,29 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
type HTMLInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'readOnly' | 'size'>;
|
5
|
-
export type TProps = HTMLInputProps & {
|
6
|
-
className?: string;
|
7
|
-
/**
|
8
|
-
* Метка для ввода.
|
9
|
-
*/
|
10
|
-
label?: string;
|
11
|
-
/**
|
12
|
-
* Статус ввода. Может быть 'alert', 'success' или 'default'.
|
13
|
-
*/
|
14
|
-
variant?: `${EInputVariant}` | EInputVariant;
|
15
|
-
/**
|
16
|
-
* Автоматически фокусировать ввод при монтировании.
|
17
|
-
*/
|
18
|
-
autofocus?: boolean;
|
19
|
-
/**
|
20
|
-
* Сделать ввод только для чтения.
|
21
|
-
*/
|
22
|
-
readonly?: boolean;
|
23
|
-
/**
|
24
|
-
* Размер ввода.
|
25
|
-
*/
|
26
|
-
size?: `${EInputSize}` | EInputSize;
|
27
|
-
};
|
28
|
-
export declare const Input: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<HTMLInputProps & import('react').RefAttributes<HTMLInputElement>>>;
|
29
|
-
export {};
|
1
|
+
export { Input, type TProps as TInputProps } from './Input';
|
2
|
+
export type { TSize, TVariant } from './types';
|
3
|
+
export { EInputSize, EInputVariant } from './constants';
|
@@ -1,61 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { c as E } from "../../index-DIxK0V-G.js";
|
4
|
-
import { EInputVariant as j } from "./constants.js";
|
5
|
-
import '../../index3.css';const v = "_input_uy10d_1", z = "_s_uy10d_25", B = "_m_uy10d_32", D = "_l_uy10d_39", G = "_success_uy10d_74", O = "_alarm_uy10d_91", P = "_error_uy10d_108", R = "_disabled_uy10d_136", s = {
|
6
|
-
input: v,
|
7
|
-
s: z,
|
8
|
-
m: B,
|
9
|
-
l: D,
|
10
|
-
"default-gray": "_default-gray_uy10d_46",
|
11
|
-
"default-white": "_default-white_uy10d_57",
|
12
|
-
success: G,
|
13
|
-
alarm: O,
|
14
|
-
error: P,
|
15
|
-
disabled: R
|
16
|
-
}, S = w(
|
17
|
-
x((c, n) => {
|
18
|
-
const {
|
19
|
-
className: l,
|
20
|
-
variant: _ = j.DefaultGray,
|
21
|
-
type: i = "text",
|
22
|
-
placeholder: m,
|
23
|
-
autofocus: t,
|
24
|
-
readonly: e,
|
25
|
-
onFocus: a,
|
26
|
-
onBlur: o,
|
27
|
-
disabled: d,
|
28
|
-
size: y = "m",
|
29
|
-
...f
|
30
|
-
} = c, [p, r] = F(t);
|
31
|
-
g(() => {
|
32
|
-
t && r(!0);
|
33
|
-
}, [t]);
|
34
|
-
const h = (u) => {
|
35
|
-
r(!1), o == null || o(u);
|
36
|
-
}, b = (u) => {
|
37
|
-
r(!0), a == null || a(u);
|
38
|
-
}, I = {
|
39
|
-
[s.readonly]: d || e,
|
40
|
-
[s.focused]: p,
|
41
|
-
[s.disabled]: d || e
|
42
|
-
};
|
43
|
-
return /* @__PURE__ */ N(
|
44
|
-
"input",
|
45
|
-
{
|
46
|
-
...f,
|
47
|
-
ref: n,
|
48
|
-
type: i,
|
49
|
-
className: E(s.input, I, l, [s[_], s[y]]),
|
50
|
-
onFocus: b,
|
51
|
-
onBlur: h,
|
52
|
-
readOnly: e,
|
53
|
-
placeholder: m
|
54
|
-
}
|
55
|
-
);
|
56
|
-
})
|
57
|
-
);
|
58
|
-
S.displayName = "Input";
|
1
|
+
import { Input } from "./Input.js";
|
2
|
+
import { EInputSize, EInputVariant } from "./constants.js";
|
59
3
|
export {
|
60
|
-
|
4
|
+
EInputSize,
|
5
|
+
EInputVariant,
|
6
|
+
Input
|
61
7
|
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
2
|
+
import { EInputSize, EInputVariant } from './constants';
|
3
|
+
|
4
|
+
export type TSize = `${EInputSize}` | EInputSize;
|
5
|
+
export type TVariant = `${EInputVariant}` | EInputVariant;
|
6
|
+
export type TCommonCompoundInputProps = {
|
7
|
+
size?: TSize;
|
8
|
+
variant?: TVariant;
|
9
|
+
className?: string;
|
10
|
+
};
|
11
|
+
export type TInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'readOnly' | 'size' | 'placeholder'>;
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TInputProps } from '../Input';
|
2
|
+
|
3
|
+
export type TProps = TInputProps;
|
4
|
+
export declare const InputPassword: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<import('../Input/types').TInputProps & {
|
5
|
+
size?: import('../Input').TSize;
|
6
|
+
variant?: import('../Input').TVariant;
|
7
|
+
className?: string;
|
8
|
+
wrapperClassName?: string;
|
9
|
+
label?: import('react').ReactNode;
|
10
|
+
autofocus?: boolean;
|
11
|
+
readonly?: boolean;
|
12
|
+
} & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { memo, forwardRef, useState } from "react";
|
3
|
+
import { Input } from "../Input/Input.js";
|
4
|
+
import { Eye } from "../icons/Eye.js";
|
5
|
+
import '../../assets/InputPassword.css';const input = "_input_1eiiw_1";
|
6
|
+
const wrapper = "_wrapper_1eiiw_5";
|
7
|
+
const button = "_button_1eiiw_16";
|
8
|
+
const cls = {
|
9
|
+
input,
|
10
|
+
wrapper,
|
11
|
+
"button-wrapper": "_button-wrapper_1eiiw_16",
|
12
|
+
button
|
13
|
+
};
|
14
|
+
const InputPassword = memo(
|
15
|
+
forwardRef(
|
16
|
+
({ size, ...props }, ref) => {
|
17
|
+
const [showPassword, setShowPassword] = useState(false);
|
18
|
+
const handleClick = () => setShowPassword(!showPassword);
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: cls.wrapper, children: [
|
20
|
+
/* @__PURE__ */ jsx(
|
21
|
+
Input,
|
22
|
+
{
|
23
|
+
ref,
|
24
|
+
className: cls.input,
|
25
|
+
size,
|
26
|
+
type: showPassword ? "text" : "password",
|
27
|
+
...props
|
28
|
+
}
|
29
|
+
),
|
30
|
+
/* @__PURE__ */ jsx("div", { className: cls["button-wrapper"], children: /* @__PURE__ */ jsx("button", { className: cls.button, onClick: handleClick, children: /* @__PURE__ */ jsx(Eye, {}) }) })
|
31
|
+
] });
|
32
|
+
}
|
33
|
+
)
|
34
|
+
);
|
35
|
+
InputPassword.displayName = "InputPassword";
|
36
|
+
export {
|
37
|
+
InputPassword
|
38
|
+
};
|
@@ -1,306 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export type TProps = TInputProps;
|
4
|
-
export declare const InputPassword: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<{
|
5
|
-
form?: string | undefined;
|
6
|
-
slot?: string | undefined;
|
7
|
-
style?: import('react').CSSProperties | undefined;
|
8
|
-
title?: string | undefined;
|
9
|
-
pattern?: string | undefined;
|
10
|
-
disabled?: boolean | undefined;
|
11
|
-
formAction?: string | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
|
12
|
-
formEncType?: string | undefined;
|
13
|
-
formMethod?: string | undefined;
|
14
|
-
formNoValidate?: boolean | undefined;
|
15
|
-
formTarget?: string | undefined;
|
16
|
-
name?: string | undefined;
|
17
|
-
type?: import('react').HTMLInputTypeAttribute | undefined;
|
18
|
-
value?: string | readonly string[] | number | undefined;
|
19
|
-
defaultChecked?: boolean | undefined;
|
20
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
21
|
-
suppressContentEditableWarning?: boolean | undefined;
|
22
|
-
suppressHydrationWarning?: boolean | undefined;
|
23
|
-
accessKey?: string | undefined;
|
24
|
-
autoFocus?: boolean | undefined;
|
25
|
-
className?: string | undefined;
|
26
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
27
|
-
contextMenu?: string | undefined;
|
28
|
-
dir?: string | undefined;
|
29
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
30
|
-
hidden?: boolean | undefined;
|
31
|
-
id?: string | undefined;
|
32
|
-
lang?: string | undefined;
|
33
|
-
nonce?: string | undefined;
|
34
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
35
|
-
tabIndex?: number | undefined;
|
36
|
-
translate?: "yes" | "no" | undefined;
|
37
|
-
radioGroup?: string | undefined;
|
38
|
-
role?: import('react').AriaRole | undefined;
|
39
|
-
about?: string | undefined;
|
40
|
-
content?: string | undefined;
|
41
|
-
datatype?: string | undefined;
|
42
|
-
inlist?: any;
|
43
|
-
prefix?: string | undefined;
|
44
|
-
property?: string | undefined;
|
45
|
-
rel?: string | undefined;
|
46
|
-
resource?: string | undefined;
|
47
|
-
rev?: string | undefined;
|
48
|
-
typeof?: string | undefined;
|
49
|
-
vocab?: string | undefined;
|
50
|
-
autoCapitalize?: string | undefined;
|
51
|
-
autoCorrect?: string | undefined;
|
52
|
-
autoSave?: string | undefined;
|
53
|
-
color?: string | undefined;
|
54
|
-
itemProp?: string | undefined;
|
55
|
-
itemScope?: boolean | undefined;
|
56
|
-
itemType?: string | undefined;
|
57
|
-
itemID?: string | undefined;
|
58
|
-
itemRef?: string | undefined;
|
59
|
-
results?: number | undefined;
|
60
|
-
security?: string | undefined;
|
61
|
-
unselectable?: "on" | "off" | undefined;
|
62
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
63
|
-
is?: string | undefined;
|
64
|
-
"aria-activedescendant"?: string | undefined;
|
65
|
-
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
66
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
67
|
-
"aria-braillelabel"?: string | undefined;
|
68
|
-
"aria-brailleroledescription"?: string | undefined;
|
69
|
-
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
70
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
71
|
-
"aria-colcount"?: number | undefined;
|
72
|
-
"aria-colindex"?: number | undefined;
|
73
|
-
"aria-colindextext"?: string | undefined;
|
74
|
-
"aria-colspan"?: number | undefined;
|
75
|
-
"aria-controls"?: string | undefined;
|
76
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
77
|
-
"aria-describedby"?: string | undefined;
|
78
|
-
"aria-description"?: string | undefined;
|
79
|
-
"aria-details"?: string | undefined;
|
80
|
-
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
81
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
82
|
-
"aria-errormessage"?: string | undefined;
|
83
|
-
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
84
|
-
"aria-flowto"?: string | undefined;
|
85
|
-
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
86
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
87
|
-
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
88
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
89
|
-
"aria-keyshortcuts"?: string | undefined;
|
90
|
-
"aria-label"?: string | undefined;
|
91
|
-
"aria-labelledby"?: string | undefined;
|
92
|
-
"aria-level"?: number | undefined;
|
93
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
94
|
-
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
95
|
-
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
96
|
-
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
97
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
98
|
-
"aria-owns"?: string | undefined;
|
99
|
-
"aria-placeholder"?: string | undefined;
|
100
|
-
"aria-posinset"?: number | undefined;
|
101
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
102
|
-
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
103
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
104
|
-
"aria-required"?: (boolean | "true" | "false") | undefined;
|
105
|
-
"aria-roledescription"?: string | undefined;
|
106
|
-
"aria-rowcount"?: number | undefined;
|
107
|
-
"aria-rowindex"?: number | undefined;
|
108
|
-
"aria-rowindextext"?: string | undefined;
|
109
|
-
"aria-rowspan"?: number | undefined;
|
110
|
-
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
111
|
-
"aria-setsize"?: number | undefined;
|
112
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
113
|
-
"aria-valuemax"?: number | undefined;
|
114
|
-
"aria-valuemin"?: number | undefined;
|
115
|
-
"aria-valuenow"?: number | undefined;
|
116
|
-
"aria-valuetext"?: string | undefined;
|
117
|
-
children?: import('react').ReactNode | undefined;
|
118
|
-
dangerouslySetInnerHTML?: {
|
119
|
-
__html: string | TrustedHTML;
|
120
|
-
} | undefined;
|
121
|
-
onCopy?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
122
|
-
onCopyCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
123
|
-
onCut?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
124
|
-
onCutCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
125
|
-
onPaste?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
126
|
-
onPasteCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
127
|
-
onCompositionEnd?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
128
|
-
onCompositionEndCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
129
|
-
onCompositionStart?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
130
|
-
onCompositionStartCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
131
|
-
onCompositionUpdate?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
132
|
-
onCompositionUpdateCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
133
|
-
onFocus?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
134
|
-
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
135
|
-
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
136
|
-
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
137
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
138
|
-
onChangeCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
139
|
-
onBeforeInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
140
|
-
onBeforeInputCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
141
|
-
onInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
142
|
-
onInputCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
143
|
-
onReset?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
144
|
-
onResetCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
145
|
-
onSubmit?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
146
|
-
onSubmitCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
147
|
-
onInvalid?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
148
|
-
onInvalidCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
149
|
-
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
150
|
-
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
151
|
-
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
152
|
-
onErrorCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
153
|
-
onKeyDown?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
154
|
-
onKeyDownCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
155
|
-
onKeyPress?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
156
|
-
onKeyPressCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
157
|
-
onKeyUp?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
158
|
-
onKeyUpCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
159
|
-
onAbort?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
160
|
-
onAbortCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
161
|
-
onCanPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
162
|
-
onCanPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
163
|
-
onCanPlayThrough?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
164
|
-
onCanPlayThroughCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
165
|
-
onDurationChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
166
|
-
onDurationChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
167
|
-
onEmptied?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
168
|
-
onEmptiedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
169
|
-
onEncrypted?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
170
|
-
onEncryptedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
171
|
-
onEnded?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
172
|
-
onEndedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
173
|
-
onLoadedData?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
174
|
-
onLoadedDataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
175
|
-
onLoadedMetadata?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
176
|
-
onLoadedMetadataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
177
|
-
onLoadStart?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
178
|
-
onLoadStartCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
179
|
-
onPause?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
180
|
-
onPauseCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
181
|
-
onPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
182
|
-
onPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
183
|
-
onPlaying?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
184
|
-
onPlayingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
185
|
-
onProgress?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
186
|
-
onProgressCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
187
|
-
onRateChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
188
|
-
onRateChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
189
|
-
onResize?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
190
|
-
onResizeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
191
|
-
onSeeked?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
192
|
-
onSeekedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
193
|
-
onSeeking?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
194
|
-
onSeekingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
195
|
-
onStalled?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
196
|
-
onStalledCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
197
|
-
onSuspend?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
198
|
-
onSuspendCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
199
|
-
onTimeUpdate?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
200
|
-
onTimeUpdateCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
201
|
-
onVolumeChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
202
|
-
onVolumeChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
203
|
-
onWaiting?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
204
|
-
onWaitingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
205
|
-
onAuxClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
206
|
-
onAuxClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
207
|
-
onClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
208
|
-
onClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
209
|
-
onContextMenu?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
210
|
-
onContextMenuCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
211
|
-
onDoubleClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
212
|
-
onDoubleClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
213
|
-
onDrag?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
214
|
-
onDragCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
215
|
-
onDragEnd?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
216
|
-
onDragEndCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
217
|
-
onDragEnter?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
218
|
-
onDragEnterCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
219
|
-
onDragExit?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
220
|
-
onDragExitCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
221
|
-
onDragLeave?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
222
|
-
onDragLeaveCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
223
|
-
onDragOver?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
224
|
-
onDragOverCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
225
|
-
onDragStart?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
226
|
-
onDragStartCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
227
|
-
onDrop?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
228
|
-
onDropCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
229
|
-
onMouseDown?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
230
|
-
onMouseDownCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
231
|
-
onMouseEnter?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
232
|
-
onMouseLeave?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
233
|
-
onMouseMove?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
234
|
-
onMouseMoveCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
235
|
-
onMouseOut?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
236
|
-
onMouseOutCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
237
|
-
onMouseOver?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
238
|
-
onMouseOverCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
239
|
-
onMouseUp?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
240
|
-
onMouseUpCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
241
|
-
onSelect?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
242
|
-
onSelectCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
243
|
-
onTouchCancel?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
244
|
-
onTouchCancelCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
245
|
-
onTouchEnd?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
246
|
-
onTouchEndCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
247
|
-
onTouchMove?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
248
|
-
onTouchMoveCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
249
|
-
onTouchStart?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
250
|
-
onTouchStartCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
251
|
-
onPointerDown?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
252
|
-
onPointerDownCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
253
|
-
onPointerMove?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
254
|
-
onPointerMoveCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
255
|
-
onPointerUp?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
256
|
-
onPointerUpCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
257
|
-
onPointerCancel?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
258
|
-
onPointerCancelCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
259
|
-
onPointerEnter?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
260
|
-
onPointerLeave?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
261
|
-
onPointerOver?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
262
|
-
onPointerOverCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
263
|
-
onPointerOut?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
264
|
-
onPointerOutCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
265
|
-
onGotPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
266
|
-
onGotPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
267
|
-
onLostPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
268
|
-
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
269
|
-
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
270
|
-
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
271
|
-
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
272
|
-
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
273
|
-
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
274
|
-
onAnimationStartCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
275
|
-
onAnimationEnd?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
276
|
-
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
277
|
-
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
278
|
-
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
279
|
-
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
280
|
-
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
281
|
-
list?: string | undefined;
|
282
|
-
accept?: string | undefined;
|
283
|
-
alt?: string | undefined;
|
284
|
-
autoComplete?: import('react').HTMLInputAutoCompleteAttribute | undefined;
|
285
|
-
capture?: boolean | "user" | "environment" | undefined;
|
286
|
-
checked?: boolean | undefined;
|
287
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
288
|
-
height?: number | string | undefined;
|
289
|
-
max?: number | string | undefined;
|
290
|
-
maxLength?: number | undefined;
|
291
|
-
min?: number | string | undefined;
|
292
|
-
minLength?: number | undefined;
|
293
|
-
multiple?: boolean | undefined;
|
294
|
-
placeholder?: string | undefined;
|
295
|
-
required?: boolean | undefined;
|
296
|
-
src?: string | undefined;
|
297
|
-
step?: number | string | undefined;
|
298
|
-
width?: number | string | undefined;
|
299
|
-
} & {
|
300
|
-
className?: string;
|
301
|
-
label?: string;
|
302
|
-
variant?: `${import('..').EInputVariant}` | import('..').EInputVariant;
|
303
|
-
autofocus?: boolean;
|
304
|
-
readonly?: boolean;
|
305
|
-
size?: `${import('..').EInputSize}` | import('..').EInputSize;
|
306
|
-
} & import('react').RefAttributes<HTMLInputElement>>>;
|
1
|
+
export { InputPassword } from './InputPassword';
|
2
|
+
export type { TProps as TInputPasswordProps } from './InputPassword';
|
@@ -1,22 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { memo as w, forwardRef as c, useState as u } from "react";
|
3
|
-
import { Input as i } from "../Input/index.js";
|
4
|
-
import { Eye as m } from "../icons/Eye.js";
|
5
|
-
import '../../index2.css';const d = "_input_578w4_1", l = "_wrapper_578w4_5", _ = "_button_578w4_16", r = {
|
6
|
-
input: d,
|
7
|
-
wrapper: l,
|
8
|
-
"button-wrapper": "_button-wrapper_578w4_16",
|
9
|
-
button: _
|
10
|
-
}, b = w(
|
11
|
-
c(({ ...s }, p) => {
|
12
|
-
const [o, n] = u(!1), e = () => n(!o);
|
13
|
-
return /* @__PURE__ */ a("div", { className: r.wrapper, children: [
|
14
|
-
/* @__PURE__ */ t(i, { ref: p, className: r.input, type: o ? "text" : "password", ...s }),
|
15
|
-
/* @__PURE__ */ t("div", { className: r["button-wrapper"], children: /* @__PURE__ */ t("button", { className: r.button, onClick: e, children: /* @__PURE__ */ t(m, {}) }) })
|
16
|
-
] });
|
17
|
-
})
|
18
|
-
);
|
19
|
-
b.displayName = "InputPassword";
|
1
|
+
import { InputPassword } from "./InputPassword.js";
|
20
2
|
export {
|
21
|
-
|
3
|
+
InputPassword
|
22
4
|
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export type ImperativeHandle = Partial<HTMLInputElement> & {
|
2
|
+
getPhoneNumber: () => string;
|
3
|
+
};
|
4
|
+
export declare const InputPhoneNumber: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<import('../Input/types').TInputProps & {
|
5
|
+
size?: import('../Input').TSize;
|
6
|
+
variant?: import('../Input').TVariant;
|
7
|
+
className?: string;
|
8
|
+
wrapperClassName?: string;
|
9
|
+
label?: import('react').ReactNode;
|
10
|
+
autofocus?: boolean;
|
11
|
+
readonly?: boolean;
|
12
|
+
} & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
2
|
+
import { memo, forwardRef, useState, useCallback, useImperativeHandle } from "react";
|
3
|
+
import { Input } from "../Input/Input.js";
|
4
|
+
import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./utils.js";
|
5
|
+
const InputPhoneNumber = memo(
|
6
|
+
forwardRef(
|
7
|
+
({ value = "", onChange, ...props }, ref) => {
|
8
|
+
const [phone, setPhone] = useState(
|
9
|
+
() => getMaskedInputPhoneValue(value)
|
10
|
+
);
|
11
|
+
const handleChange = useCallback(
|
12
|
+
(event) => {
|
13
|
+
const maskedValue = getMaskedInputPhoneValue(event.target.value);
|
14
|
+
setPhone(maskedValue);
|
15
|
+
onChange == null ? void 0 : onChange({
|
16
|
+
...event,
|
17
|
+
target: {
|
18
|
+
...event.target,
|
19
|
+
value: getUnmaskedInputValue(maskedValue)
|
20
|
+
}
|
21
|
+
});
|
22
|
+
},
|
23
|
+
[onChange]
|
24
|
+
);
|
25
|
+
useImperativeHandle(
|
26
|
+
ref,
|
27
|
+
() => ({
|
28
|
+
getPhoneNumber: () => getUnmaskedInputValue(phone)
|
29
|
+
})
|
30
|
+
);
|
31
|
+
return /* @__PURE__ */ jsx(Input, { ref, value: phone, onChange: handleChange, ...props });
|
32
|
+
}
|
33
|
+
)
|
34
|
+
);
|
35
|
+
InputPhoneNumber.displayName = "InputPhoneNumber";
|
36
|
+
export {
|
37
|
+
InputPhoneNumber
|
38
|
+
};
|