mimir-ui-kit 0.0.7 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/fonts/11d5bc9f0cad36d1.woff2 +0 -0
- package/dist/assets/fonts/1a738bfdbc1e4d9d.woff +0 -0
- package/dist/assets/fonts/242d04bef81519ae.woff2 +0 -0
- package/dist/assets/fonts/3b9f59412b17ff93.woff +0 -0
- package/dist/assets/fonts/3cdd7fabbe89d2b9.woff +0 -0
- package/dist/assets/fonts/43b748f250df0f08.woff +0 -0
- package/dist/assets/fonts/585d10920d676fcd.woff2 +0 -0
- package/dist/assets/fonts/63611593e008a77c.woff2 +0 -0
- package/dist/assets/fonts/badaa6d1837432de.woff +0 -0
- package/dist/assets/fonts/cac2ba46e8c8adc9.woff2 +0 -0
- package/dist/assets/fonts/d080ae18fd04e52c.woff2 +0 -0
- package/dist/assets/fonts/e51d2feb30084bc2.woff2 +0 -0
- package/dist/assets/fonts/ee3db32f0aadef5d.woff2 +0 -0
- package/dist/assets/fonts/f4d681a788c6d497.woff2 +0 -0
- package/dist/assets/styles/index.css +1 -0
- package/dist/components/Button/Button.stories.d.ts +3 -24
- package/dist/components/Button/index.d.ts +14 -7
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Input/Input.stories.d.ts +6 -323
- package/dist/components/Input/index.d.ts +10 -50
- package/dist/components/Input/index.js +58 -44
- package/dist/components/InputPhoneNumber/Input.stories.d.ts +3 -321
- package/dist/components/InputPhoneNumber/index.d.ts +5 -3
- package/dist/components/InputPhoneNumber/index.js +15 -15
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +12 -6
- package/dist/index.css +1 -0
- package/dist/index.js +14 -8
- package/package.json +91 -90
- package/dist/assets/index.css +0 -2
- package/dist/assets/scss/index.css +0 -1
- /package/dist/{assets/index2.css → index2.css} +0 -0
@@ -1,70 +1,84 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as g, forwardRef as y, useState as N, useEffect as A } from "react";
|
3
3
|
import { c as _ } from "../../index-DIxK0V-G.js";
|
4
|
-
import '../../
|
5
|
-
inputWrapper:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
import '../../index.css';const x = "_inputWrapper_1cv22_1", B = "_withOutLabel_1cv22_11", O = "_label_1cv22_15", W = "_inputBody_1cv22_24", F = "_xs_1cv22_36", I = "_s_1cv22_44", j = "_m_1cv22_52", z = "_l_1cv22_15", E = "_addonLeft_1cv22_68", P = "_addonRight_1cv22_69", S = "_withAddonLeft_1cv22_73", k = "_withAddonRight_1cv22_77", q = "_input_1cv22_1", t = {
|
5
|
+
inputWrapper: x,
|
6
|
+
withOutLabel: B,
|
7
|
+
label: O,
|
8
|
+
inputBody: W,
|
9
|
+
xs: F,
|
10
|
+
s: I,
|
11
|
+
m: j,
|
11
12
|
l: z,
|
12
13
|
addonLeft: E,
|
13
|
-
addonRight:
|
14
|
-
withAddonLeft:
|
15
|
-
withAddonRight:
|
16
|
-
input:
|
17
|
-
},
|
18
|
-
|
14
|
+
addonRight: P,
|
15
|
+
withAddonLeft: S,
|
16
|
+
withAddonRight: k,
|
17
|
+
input: q
|
18
|
+
}, C = g(
|
19
|
+
y((p, r) => {
|
19
20
|
const {
|
20
21
|
className: u,
|
21
22
|
status: h = "default",
|
22
23
|
type: m = "text",
|
23
24
|
placeholder: f,
|
24
25
|
autofocus: o,
|
25
|
-
readonly:
|
26
|
+
readonly: c,
|
26
27
|
addonLeft: s,
|
27
28
|
addonRight: e,
|
28
|
-
label:
|
29
|
+
label: a,
|
29
30
|
size: i = "m",
|
30
|
-
...
|
31
|
-
} = p, [w, d] =
|
32
|
-
|
31
|
+
...v
|
32
|
+
} = p, [w, d] = N(o);
|
33
|
+
A(() => {
|
33
34
|
o && d(!0);
|
34
35
|
}, [o]);
|
35
|
-
const
|
36
|
+
const L = () => {
|
36
37
|
d(!1);
|
37
|
-
},
|
38
|
+
}, b = () => {
|
38
39
|
d(!0);
|
39
|
-
},
|
40
|
-
[t.readonly]:
|
40
|
+
}, R = {
|
41
|
+
[t.readonly]: c,
|
41
42
|
[t.focused]: w,
|
42
43
|
[t.withAddonLeft]: !!s,
|
43
44
|
[t.withAddonRight]: !!e
|
44
45
|
};
|
45
|
-
return /* @__PURE__ */
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
return /* @__PURE__ */ l(
|
47
|
+
"label",
|
48
|
+
{
|
49
|
+
className: _(
|
50
|
+
t.inputWrapper,
|
51
|
+
u,
|
51
52
|
{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
className: t.input,
|
56
|
-
onFocus: R,
|
57
|
-
onBlur: y,
|
58
|
-
readOnly: a,
|
59
|
-
placeholder: f
|
60
|
-
}
|
53
|
+
[t.withOutLabel]: !a
|
54
|
+
},
|
55
|
+
[t[i]]
|
61
56
|
),
|
62
|
-
|
63
|
-
|
64
|
-
|
57
|
+
children: [
|
58
|
+
a && /* @__PURE__ */ n("span", { className: t.label, children: a }),
|
59
|
+
/* @__PURE__ */ l("div", { className: _(t.inputBody, R, [t[h], t[i]]), children: [
|
60
|
+
s && /* @__PURE__ */ n("span", { className: t.addonLeft, children: s }),
|
61
|
+
/* @__PURE__ */ n(
|
62
|
+
"input",
|
63
|
+
{
|
64
|
+
...v,
|
65
|
+
ref: r,
|
66
|
+
type: m,
|
67
|
+
className: t.input,
|
68
|
+
onFocus: b,
|
69
|
+
onBlur: L,
|
70
|
+
readOnly: c,
|
71
|
+
placeholder: f
|
72
|
+
}
|
73
|
+
),
|
74
|
+
e && /* @__PURE__ */ n("span", { className: t.addonRight, children: e })
|
75
|
+
] })
|
76
|
+
]
|
77
|
+
}
|
78
|
+
);
|
65
79
|
})
|
66
80
|
);
|
67
|
-
|
81
|
+
C.displayName = "Input";
|
68
82
|
export {
|
69
|
-
|
83
|
+
C as Input
|
70
84
|
};
|
@@ -1,325 +1,7 @@
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
2
|
-
import {
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import { TProps as TInputPhoneNumberProps } from '.';
|
3
3
|
|
4
|
-
declare const meta:
|
5
|
-
title: string;
|
6
|
-
component: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<{
|
7
|
-
form?: string | undefined;
|
8
|
-
slot?: string | undefined;
|
9
|
-
style?: import('react').CSSProperties | undefined;
|
10
|
-
title?: string | undefined;
|
11
|
-
pattern?: string | undefined;
|
12
|
-
disabled?: boolean | undefined;
|
13
|
-
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;
|
14
|
-
formEncType?: string | undefined;
|
15
|
-
formMethod?: string | undefined;
|
16
|
-
formNoValidate?: boolean | undefined;
|
17
|
-
formTarget?: string | undefined;
|
18
|
-
name?: string | undefined;
|
19
|
-
type?: import('react').HTMLInputTypeAttribute | undefined;
|
20
|
-
value?: string | readonly string[] | number | undefined;
|
21
|
-
defaultChecked?: boolean | undefined;
|
22
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
23
|
-
suppressContentEditableWarning?: boolean | undefined;
|
24
|
-
suppressHydrationWarning?: boolean | undefined;
|
25
|
-
accessKey?: string | undefined;
|
26
|
-
autoFocus?: boolean | undefined;
|
27
|
-
className?: string | undefined;
|
28
|
-
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
29
|
-
contextMenu?: string | undefined;
|
30
|
-
dir?: string | undefined;
|
31
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
32
|
-
hidden?: boolean | undefined;
|
33
|
-
id?: string | undefined;
|
34
|
-
lang?: string | undefined;
|
35
|
-
nonce?: string | undefined;
|
36
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
37
|
-
tabIndex?: number | undefined;
|
38
|
-
translate?: "yes" | "no" | undefined;
|
39
|
-
radioGroup?: string | undefined;
|
40
|
-
role?: import('react').AriaRole | undefined;
|
41
|
-
about?: string | undefined;
|
42
|
-
content?: string | undefined;
|
43
|
-
datatype?: string | undefined;
|
44
|
-
inlist?: any;
|
45
|
-
prefix?: string | undefined;
|
46
|
-
property?: string | undefined;
|
47
|
-
rel?: string | undefined;
|
48
|
-
resource?: string | undefined;
|
49
|
-
rev?: string | undefined;
|
50
|
-
typeof?: string | undefined;
|
51
|
-
vocab?: string | undefined;
|
52
|
-
autoCapitalize?: string | undefined;
|
53
|
-
autoCorrect?: string | undefined;
|
54
|
-
autoSave?: string | undefined;
|
55
|
-
color?: string | undefined;
|
56
|
-
itemProp?: string | undefined;
|
57
|
-
itemScope?: boolean | undefined;
|
58
|
-
itemType?: string | undefined;
|
59
|
-
itemID?: string | undefined;
|
60
|
-
itemRef?: string | undefined;
|
61
|
-
results?: number | undefined;
|
62
|
-
security?: string | undefined;
|
63
|
-
unselectable?: "on" | "off" | undefined;
|
64
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
65
|
-
is?: string | undefined;
|
66
|
-
"aria-activedescendant"?: string | undefined;
|
67
|
-
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
68
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
69
|
-
"aria-braillelabel"?: string | undefined;
|
70
|
-
"aria-brailleroledescription"?: string | undefined;
|
71
|
-
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
72
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
73
|
-
"aria-colcount"?: number | undefined;
|
74
|
-
"aria-colindex"?: number | undefined;
|
75
|
-
"aria-colindextext"?: string | undefined;
|
76
|
-
"aria-colspan"?: number | undefined;
|
77
|
-
"aria-controls"?: string | undefined;
|
78
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
79
|
-
"aria-describedby"?: string | undefined;
|
80
|
-
"aria-description"?: string | undefined;
|
81
|
-
"aria-details"?: string | undefined;
|
82
|
-
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
83
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
84
|
-
"aria-errormessage"?: string | undefined;
|
85
|
-
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
86
|
-
"aria-flowto"?: string | undefined;
|
87
|
-
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
88
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
89
|
-
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
90
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
91
|
-
"aria-keyshortcuts"?: string | undefined;
|
92
|
-
"aria-label"?: string | undefined;
|
93
|
-
"aria-labelledby"?: string | undefined;
|
94
|
-
"aria-level"?: number | undefined;
|
95
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
96
|
-
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
97
|
-
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
98
|
-
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
99
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
100
|
-
"aria-owns"?: string | undefined;
|
101
|
-
"aria-placeholder"?: string | undefined;
|
102
|
-
"aria-posinset"?: number | undefined;
|
103
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
104
|
-
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
105
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
106
|
-
"aria-required"?: (boolean | "true" | "false") | undefined;
|
107
|
-
"aria-roledescription"?: string | undefined;
|
108
|
-
"aria-rowcount"?: number | undefined;
|
109
|
-
"aria-rowindex"?: number | undefined;
|
110
|
-
"aria-rowindextext"?: string | undefined;
|
111
|
-
"aria-rowspan"?: number | undefined;
|
112
|
-
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
113
|
-
"aria-setsize"?: number | undefined;
|
114
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
115
|
-
"aria-valuemax"?: number | undefined;
|
116
|
-
"aria-valuemin"?: number | undefined;
|
117
|
-
"aria-valuenow"?: number | undefined;
|
118
|
-
"aria-valuetext"?: string | undefined;
|
119
|
-
children?: import('react').ReactNode | undefined;
|
120
|
-
dangerouslySetInnerHTML?: {
|
121
|
-
__html: string | TrustedHTML;
|
122
|
-
} | undefined;
|
123
|
-
onCopy?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
124
|
-
onCopyCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
125
|
-
onCut?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
126
|
-
onCutCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
127
|
-
onPaste?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
128
|
-
onPasteCapture?: import('react').ClipboardEventHandler<HTMLInputElement> | undefined;
|
129
|
-
onCompositionEnd?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
130
|
-
onCompositionEndCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
131
|
-
onCompositionStart?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
132
|
-
onCompositionStartCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
133
|
-
onCompositionUpdate?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
134
|
-
onCompositionUpdateCapture?: import('react').CompositionEventHandler<HTMLInputElement> | undefined;
|
135
|
-
onFocus?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
136
|
-
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
137
|
-
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
138
|
-
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
139
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
140
|
-
onChangeCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
141
|
-
onBeforeInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
142
|
-
onBeforeInputCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
143
|
-
onInput?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
144
|
-
onInputCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
145
|
-
onReset?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
146
|
-
onResetCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
147
|
-
onSubmit?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
148
|
-
onSubmitCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
149
|
-
onInvalid?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
150
|
-
onInvalidCapture?: import('react').FormEventHandler<HTMLInputElement> | undefined;
|
151
|
-
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
152
|
-
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
153
|
-
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
154
|
-
onErrorCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
155
|
-
onKeyDown?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
156
|
-
onKeyDownCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
157
|
-
onKeyPress?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
158
|
-
onKeyPressCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
159
|
-
onKeyUp?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
160
|
-
onKeyUpCapture?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
161
|
-
onAbort?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
162
|
-
onAbortCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
163
|
-
onCanPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
164
|
-
onCanPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
165
|
-
onCanPlayThrough?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
166
|
-
onCanPlayThroughCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
167
|
-
onDurationChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
168
|
-
onDurationChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
169
|
-
onEmptied?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
170
|
-
onEmptiedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
171
|
-
onEncrypted?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
172
|
-
onEncryptedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
173
|
-
onEnded?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
174
|
-
onEndedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
175
|
-
onLoadedData?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
176
|
-
onLoadedDataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
177
|
-
onLoadedMetadata?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
178
|
-
onLoadedMetadataCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
179
|
-
onLoadStart?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
180
|
-
onLoadStartCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
181
|
-
onPause?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
182
|
-
onPauseCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
183
|
-
onPlay?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
184
|
-
onPlayCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
185
|
-
onPlaying?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
186
|
-
onPlayingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
187
|
-
onProgress?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
188
|
-
onProgressCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
189
|
-
onRateChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
190
|
-
onRateChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
191
|
-
onResize?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
192
|
-
onResizeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
193
|
-
onSeeked?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
194
|
-
onSeekedCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
195
|
-
onSeeking?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
196
|
-
onSeekingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
197
|
-
onStalled?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
198
|
-
onStalledCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
199
|
-
onSuspend?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
200
|
-
onSuspendCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
201
|
-
onTimeUpdate?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
202
|
-
onTimeUpdateCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
203
|
-
onVolumeChange?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
204
|
-
onVolumeChangeCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
205
|
-
onWaiting?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
206
|
-
onWaitingCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
207
|
-
onAuxClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
208
|
-
onAuxClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
209
|
-
onClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
210
|
-
onClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
211
|
-
onContextMenu?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
212
|
-
onContextMenuCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
213
|
-
onDoubleClick?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
214
|
-
onDoubleClickCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
215
|
-
onDrag?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
216
|
-
onDragCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
217
|
-
onDragEnd?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
218
|
-
onDragEndCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
219
|
-
onDragEnter?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
220
|
-
onDragEnterCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
221
|
-
onDragExit?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
222
|
-
onDragExitCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
223
|
-
onDragLeave?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
224
|
-
onDragLeaveCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
225
|
-
onDragOver?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
226
|
-
onDragOverCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
227
|
-
onDragStart?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
228
|
-
onDragStartCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
229
|
-
onDrop?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
230
|
-
onDropCapture?: import('react').DragEventHandler<HTMLInputElement> | undefined;
|
231
|
-
onMouseDown?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
232
|
-
onMouseDownCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
233
|
-
onMouseEnter?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
234
|
-
onMouseLeave?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
235
|
-
onMouseMove?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
236
|
-
onMouseMoveCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
237
|
-
onMouseOut?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
238
|
-
onMouseOutCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
239
|
-
onMouseOver?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
240
|
-
onMouseOverCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
241
|
-
onMouseUp?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
242
|
-
onMouseUpCapture?: import('react').MouseEventHandler<HTMLInputElement> | undefined;
|
243
|
-
onSelect?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
244
|
-
onSelectCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
245
|
-
onTouchCancel?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
246
|
-
onTouchCancelCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
247
|
-
onTouchEnd?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
248
|
-
onTouchEndCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
249
|
-
onTouchMove?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
250
|
-
onTouchMoveCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
251
|
-
onTouchStart?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
252
|
-
onTouchStartCapture?: import('react').TouchEventHandler<HTMLInputElement> | undefined;
|
253
|
-
onPointerDown?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
254
|
-
onPointerDownCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
255
|
-
onPointerMove?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
256
|
-
onPointerMoveCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
257
|
-
onPointerUp?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
258
|
-
onPointerUpCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
259
|
-
onPointerCancel?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
260
|
-
onPointerCancelCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
261
|
-
onPointerEnter?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
262
|
-
onPointerLeave?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
263
|
-
onPointerOver?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
264
|
-
onPointerOverCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
265
|
-
onPointerOut?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
266
|
-
onPointerOutCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
267
|
-
onGotPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
268
|
-
onGotPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
269
|
-
onLostPointerCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
270
|
-
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
271
|
-
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
272
|
-
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
273
|
-
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
274
|
-
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
275
|
-
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
276
|
-
onAnimationStartCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
277
|
-
onAnimationEnd?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
278
|
-
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
279
|
-
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
280
|
-
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
281
|
-
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
282
|
-
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
283
|
-
list?: string | undefined;
|
284
|
-
accept?: string | undefined;
|
285
|
-
alt?: string | undefined;
|
286
|
-
autoComplete?: import('react').HTMLInputAutoCompleteAttribute | undefined;
|
287
|
-
capture?: boolean | "user" | "environment" | undefined;
|
288
|
-
checked?: boolean | undefined;
|
289
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
290
|
-
height?: number | string | undefined;
|
291
|
-
max?: number | string | undefined;
|
292
|
-
maxLength?: number | undefined;
|
293
|
-
min?: number | string | undefined;
|
294
|
-
minLength?: number | undefined;
|
295
|
-
multiple?: boolean | undefined;
|
296
|
-
placeholder?: string | undefined;
|
297
|
-
required?: boolean | undefined;
|
298
|
-
src?: string | undefined;
|
299
|
-
step?: number | string | undefined;
|
300
|
-
width?: number | string | undefined;
|
301
|
-
} & {
|
302
|
-
className?: string;
|
303
|
-
label?: string;
|
304
|
-
status?: EInputStatus | `${EInputStatus}`;
|
305
|
-
caption?: string;
|
306
|
-
autofocus?: boolean;
|
307
|
-
readonly?: boolean;
|
308
|
-
addonLeft?: import('react').ReactNode;
|
309
|
-
addonRight?: import('react').ReactNode;
|
310
|
-
size?: EInputSize | `${EInputSize}`;
|
311
|
-
} & import('react').RefAttributes<HTMLInputElement>>>;
|
312
|
-
parameters: {
|
313
|
-
layout: string;
|
314
|
-
};
|
315
|
-
tags: string[];
|
316
|
-
argTypes: {};
|
317
|
-
args: {
|
318
|
-
onClick: import('@vitest/spy').Mock<[event: import('react').MouseEvent<HTMLInputElement, MouseEvent>], void>;
|
319
|
-
size: EInputSize.L;
|
320
|
-
status: EInputStatus.Alert;
|
321
|
-
};
|
322
|
-
};
|
4
|
+
declare const meta: Meta<TInputPhoneNumberProps>;
|
323
5
|
export default meta;
|
324
6
|
type Story = StoryObj<typeof meta>;
|
325
7
|
export declare const Primary: Story;
|
@@ -1,3 +1,6 @@
|
|
1
|
+
import { TProps as TInputProps } from '../Input';
|
2
|
+
|
3
|
+
export type TProps = TInputProps;
|
1
4
|
export type ImperativeHandle = Partial<HTMLInputElement> & {
|
2
5
|
getPhoneNumber: () => string;
|
3
6
|
};
|
@@ -299,11 +302,10 @@ export declare const InputPhoneNumber: import('react').MemoExoticComponent<impor
|
|
299
302
|
} & {
|
300
303
|
className?: string;
|
301
304
|
label?: string;
|
302
|
-
status?: import('
|
303
|
-
caption?: string;
|
305
|
+
status?: `${import('..').EInputStatus}` | import('..').EInputStatus;
|
304
306
|
autofocus?: boolean;
|
305
307
|
readonly?: boolean;
|
306
308
|
addonLeft?: import('react').ReactNode;
|
307
309
|
addonRight?: import('react').ReactNode;
|
308
|
-
size?: import('
|
310
|
+
size?: `${import('..').EInputSize}` | import('..').EInputSize;
|
309
311
|
} & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -1,28 +1,28 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { Input as
|
4
|
-
import { getMaskedInputPhoneValue as
|
5
|
-
const
|
6
|
-
|
7
|
-
const [a,
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as d, forwardRef as i, useState as I, useCallback as c, useImperativeHandle as f } from "react";
|
3
|
+
import { Input as P } from "../Input/index.js";
|
4
|
+
import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as b } from "./utils.js";
|
5
|
+
const h = d(
|
6
|
+
i(({ value: o = "", onChange: e, ...p }, r) => {
|
7
|
+
const [a, s] = I(m(o)), l = c(
|
8
8
|
(t) => {
|
9
|
-
const u =
|
10
|
-
|
9
|
+
const u = m(t.target.value);
|
10
|
+
s(u), e == null || e({
|
11
11
|
...t,
|
12
12
|
target: {
|
13
13
|
...t.target,
|
14
|
-
value:
|
14
|
+
value: u
|
15
15
|
}
|
16
16
|
});
|
17
17
|
},
|
18
18
|
[e]
|
19
19
|
);
|
20
|
-
return
|
21
|
-
getPhoneNumber: () =>
|
22
|
-
})), /* @__PURE__ */
|
20
|
+
return f(r, () => ({
|
21
|
+
getPhoneNumber: () => b(a)
|
22
|
+
})), /* @__PURE__ */ n(P, { ref: r, ...p, value: a, onChange: l });
|
23
23
|
})
|
24
24
|
);
|
25
|
-
|
25
|
+
h.displayName = "InputPhoneNumber";
|
26
26
|
export {
|
27
|
-
|
27
|
+
h as InputPhoneNumber
|
28
28
|
};
|
package/dist/components/index.js
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
-
import { Button as
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { Button as r } from "./Button/index.js";
|
2
|
+
import { EButtonSize as n, EButtonVariant as p } from "./Button/constants.js";
|
3
|
+
import { Input as m } from "./Input/index.js";
|
4
|
+
import { EInputSize as x, EInputStatus as E } from "./Input/constants.js";
|
5
|
+
import { InputPhoneNumber as a } from "./InputPhoneNumber/index.js";
|
4
6
|
export {
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
r as Button,
|
8
|
+
n as EButtonSize,
|
9
|
+
p as EButtonVariant,
|
10
|
+
x as EInputSize,
|
11
|
+
E as EInputStatus,
|
12
|
+
m as Input,
|
13
|
+
a as InputPhoneNumber
|
8
14
|
};
|
package/dist/index.css
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
._inputWrapper_1cv22_1{display:inline-flex;flex-direction:column;width:100%;height:var(--input-height);padding:var(--input-space);background-color:var(--black-5);border-radius:6px}._withOutLabel_1cv22_11{justify-content:center}._label_1cv22_15{margin-bottom:2px;color:var(--black-60);font-size:var(--size-text-s)}._label_1cv22_15:first-letter{text-transform:uppercase}._inputBody_1cv22_24{--caption-margin-left: calc(var(--input-space) + var(--control-border-width));--counter-button-icon-color: var(--color-control-typo-ghost);--counter-button-background: transparent;--counter-offset: 0;--clear-button-color: var(--color-control-typo-clear);display:flex;align-items:center;border-radius:var(--control-input-radius);outline:var(--control-border-width) solid var(--container-border-color)}._xs_1cv22_36{--label-offset: var(--space-2xs);--caption-offset: var(--space-2xs);--input-height: var(--control-height-xs);--input-font-size: var(--control-text-size-xs);--input-space: calc(var(--control-space-xs) * .5)}._s_1cv22_44{--label-offset: var(--space-2xs);--caption-offset: var(--space-2xs);--input-height: var(--control-height-s);--input-font-size: var(--control-text-size-s);--input-space: calc(var(--control-space-s) * .5)}._m_1cv22_52{--label-offset: var(--space-xs);--caption-offset: var(--space-xs);--input-height: var(--space-4xl);--input-font-size: var(--control-text-size-m);--input-space: calc(var(--control-space-m) * .5)}._l_1cv22_15{--label-offset: var(--space-xs);--caption-offset: var(--space-xs);--input-height: var(--space-4xxl);--input-font-size: var(--control-text-size-2xl);--input-space: calc(var(--control-space-l) * .5)}._addonLeft_1cv22_68,._addonRight_1cv22_69{display:flex}._withAddonLeft_1cv22_73{padding-left:8px}._withAddonRight_1cv22_77{padding-right:8px}._input_1cv22_1{width:100%;color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--font-inter);letter-spacing:-.42px;background:none;border:none;outline:none;font-feature-settings:"zero"}
|
package/dist/index.js
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
import { Button as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
import { Button as r } from "./components/Button/index.js";
|
2
|
+
import { EButtonSize as p, EButtonVariant as n } from "./components/Button/constants.js";
|
3
|
+
import { Input as m } from "./components/Input/index.js";
|
4
|
+
import { EInputSize as x, EInputStatus as E } from "./components/Input/constants.js";
|
5
|
+
import { InputPhoneNumber as a } from "./components/InputPhoneNumber/index.js";
|
6
|
+
import { getLog as B } from "./utils/getLog.js";
|
5
7
|
export {
|
6
|
-
|
7
|
-
p as
|
8
|
-
|
9
|
-
|
8
|
+
r as Button,
|
9
|
+
p as EButtonSize,
|
10
|
+
n as EButtonVariant,
|
11
|
+
x as EInputSize,
|
12
|
+
E as EInputStatus,
|
13
|
+
m as Input,
|
14
|
+
a as InputPhoneNumber,
|
15
|
+
B as getLog
|
10
16
|
};
|