mimir-ui-kit 1.36.13 → 1.36.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Input-BYrIS5GU.js +225 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/TextArea.css +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/ListFiles/ListFiles.d.ts +11 -1
- package/dist/components/ListFiles/ListFiles.js +59 -40
- package/dist/components/ListFiles/constants.d.ts +4 -0
- package/dist/components/ListFiles/constants.js +4 -2
- package/dist/components/ListFiles/index.d.ts +2 -1
- package/dist/components/ListFiles/index.js +4 -2
- package/dist/components/ListPhotos/ListPhotos.d.ts +5 -1
- package/dist/components/ListPhotos/ListPhotos.js +14 -13
- package/dist/components/ListPhotos/index.d.ts +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +3 -1
- package/dist/components/TextArea/TextArea.js +105 -91
- package/dist/components/TextArea/constants.d.ts +5 -0
- package/dist/components/TextArea/constants.js +4 -0
- package/dist/components/TextArea/hooks.d.ts +3 -1
- package/dist/components/TextArea/hooks.js +6 -6
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +4 -2
- package/dist/components/TextArea/types.d.ts +4 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +133 -125
- package/dist/index.js +159 -151
- package/package.json +1 -1
- package/dist/Input-CbgqYgLo.js +0 -226
@@ -0,0 +1,225 @@
|
|
1
|
+
import { jsxs as V, jsx as n, Fragment as Z } from "react/jsx-runtime";
|
2
|
+
import { c as o } from "./index-DIxK0V-G.js";
|
3
|
+
import { memo as $, forwardRef as ee, useState as B, useRef as se, useEffect as R } from "react";
|
4
|
+
import { EInputVariant as te } from "./components/Input/constants.js";
|
5
|
+
import { useMergeRefs as ae } from "./hooks/useMergeRefs/useMergeRefs.js";
|
6
|
+
import { Icon as le } from "./icons/Icon.js";
|
7
|
+
import { Button as re } from "./components/Button/Button.js";
|
8
|
+
import './assets/Input.css';const oe = "_label_zg2ds_27", ne = "_input_zg2ds_3", de = "_focused_zg2ds_82", ce = "_disabled_zg2ds_88", ie = "_clear_zg2ds_130", ue = "_s_zg2ds_181", _e = "_m_zg2ds_196", me = "_l_zg2ds_27", fe = "_success_zg2ds_252", pe = "_alarm_zg2ds_272", ge = "_error_zg2ds_292", e = {
|
9
|
+
"input-wrapper": "_input-wrapper_zg2ds_3",
|
10
|
+
"required-mark": "_required-mark_zg2ds_17",
|
11
|
+
label: oe,
|
12
|
+
"has-left-slot": "_has-left-slot_zg2ds_42",
|
13
|
+
"active-label": "_active-label_zg2ds_45",
|
14
|
+
input: ne,
|
15
|
+
"has-right-slot": "_has-right-slot_zg2ds_79",
|
16
|
+
focused: de,
|
17
|
+
"has-label": "_has-label_zg2ds_85",
|
18
|
+
disabled: ce,
|
19
|
+
"addon-icon": "_addon-icon_zg2ds_94",
|
20
|
+
"left-slot": "_left-slot_zg2ds_98",
|
21
|
+
"right-slot": "_right-slot_zg2ds_99",
|
22
|
+
clear: ie,
|
23
|
+
s: ue,
|
24
|
+
m: _e,
|
25
|
+
l: me,
|
26
|
+
"default-gray": "_default-gray_zg2ds_225",
|
27
|
+
"default-white": "_default-white_zg2ds_237",
|
28
|
+
success: fe,
|
29
|
+
alarm: pe,
|
30
|
+
error: ge
|
31
|
+
}, L = (s) => {
|
32
|
+
var m, a;
|
33
|
+
if (!s)
|
34
|
+
return null;
|
35
|
+
switch (s.addonType) {
|
36
|
+
case "icon": {
|
37
|
+
const f = (m = s.addonContent) == null ? void 0 : m.includes("16px"), b = (a = s.addonContent) == null ? void 0 : a.includes("24px");
|
38
|
+
return /* @__PURE__ */ n(
|
39
|
+
le,
|
40
|
+
{
|
41
|
+
style: {
|
42
|
+
"--icon-size": o({
|
43
|
+
"16px": f,
|
44
|
+
"24px": b
|
45
|
+
})
|
46
|
+
},
|
47
|
+
className: e["addon-icon"],
|
48
|
+
iconName: s.addonContent
|
49
|
+
}
|
50
|
+
);
|
51
|
+
}
|
52
|
+
case "text":
|
53
|
+
return s.addonContent;
|
54
|
+
case "react-node":
|
55
|
+
return /* @__PURE__ */ n(Z, { children: s.addonContent });
|
56
|
+
default:
|
57
|
+
return null;
|
58
|
+
}
|
59
|
+
}, he = $(
|
60
|
+
ee(
|
61
|
+
(s, m) => {
|
62
|
+
const {
|
63
|
+
value: a,
|
64
|
+
className: f,
|
65
|
+
wrapperClassName: b,
|
66
|
+
rightSlotClassName: j,
|
67
|
+
requiredMarkClassName: D,
|
68
|
+
variant: q = te.DefaultGray,
|
69
|
+
type: E = "text",
|
70
|
+
autofocus: z,
|
71
|
+
readonly: d,
|
72
|
+
id: A,
|
73
|
+
onFocus: N,
|
74
|
+
onBlur: x,
|
75
|
+
label: u,
|
76
|
+
withClearButton: M,
|
77
|
+
disabled: t,
|
78
|
+
onChange: c,
|
79
|
+
rightAddon: O,
|
80
|
+
status: F,
|
81
|
+
leftAddon: S,
|
82
|
+
size: C = "m",
|
83
|
+
numbersOnly: T,
|
84
|
+
required: y,
|
85
|
+
maxLength: v,
|
86
|
+
autocomplete: G = "on",
|
87
|
+
...P
|
88
|
+
} = s, [_, w] = B(z), [p, g] = B(!!a), i = se(null), W = ae(i, m);
|
89
|
+
R(() => {
|
90
|
+
z && w(!0);
|
91
|
+
}, [z]), R(() => {
|
92
|
+
g(!!a);
|
93
|
+
}, [a]);
|
94
|
+
const H = (l) => {
|
95
|
+
const r = l.currentTarget.value;
|
96
|
+
x == null || x(l), w(!1), g(!!r);
|
97
|
+
}, J = (l) => {
|
98
|
+
d || (w(!0), N == null || N(l));
|
99
|
+
}, K = () => {
|
100
|
+
i != null && i.current && (i.current.value = "", i.current.focus(), g(!1), c == null || c({
|
101
|
+
target: { value: "" }
|
102
|
+
}));
|
103
|
+
}, Q = (l) => {
|
104
|
+
let r = l.target.value;
|
105
|
+
T && (r = r.replace(/\D/g, "")), v !== void 0 && (r = r.slice(0, v)), l.target.value = r, c == null || c(l), g(!!r);
|
106
|
+
}, h = L(S), I = L(O), U = {
|
107
|
+
[e.readonly]: t || d,
|
108
|
+
[e.focused]: _,
|
109
|
+
[e.disabled]: t || d,
|
110
|
+
[e["has-label"]]: !!u,
|
111
|
+
[e["has-left-slot"]]: !!h,
|
112
|
+
[e["has-right-slot"]]: !!I
|
113
|
+
}, k = _ || p || !!a, X = o(e.label, f, e[C], {
|
114
|
+
[e["active-label"]]: k,
|
115
|
+
[e.disabled]: t || d,
|
116
|
+
[e["has-left-slot"]]: !!h
|
117
|
+
}), Y = o(e.input, U, f, [
|
118
|
+
e[q],
|
119
|
+
e[F ?? ""],
|
120
|
+
e[C]
|
121
|
+
]);
|
122
|
+
return /* @__PURE__ */ V(
|
123
|
+
"div",
|
124
|
+
{
|
125
|
+
className: o(
|
126
|
+
e["input-wrapper"],
|
127
|
+
e[q],
|
128
|
+
e[F ?? ""],
|
129
|
+
e[C],
|
130
|
+
{
|
131
|
+
[e.disabled]: t || d,
|
132
|
+
[e.focused]: _
|
133
|
+
},
|
134
|
+
b
|
135
|
+
),
|
136
|
+
children: [
|
137
|
+
u && /* @__PURE__ */ V("label", { htmlFor: A, className: X, children: [
|
138
|
+
u,
|
139
|
+
y && (p || _) && /* @__PURE__ */ n(
|
140
|
+
"span",
|
141
|
+
{
|
142
|
+
className: e["required-mark"],
|
143
|
+
"data-testid": "required-mark"
|
144
|
+
}
|
145
|
+
)
|
146
|
+
] }),
|
147
|
+
h && /* @__PURE__ */ n(
|
148
|
+
"span",
|
149
|
+
{
|
150
|
+
className: o(e["left-slot"], {
|
151
|
+
[e.focused]: k,
|
152
|
+
[e["has-label"]]: !!u,
|
153
|
+
[e.disabled]: t
|
154
|
+
}),
|
155
|
+
children: h
|
156
|
+
}
|
157
|
+
),
|
158
|
+
/* @__PURE__ */ n(
|
159
|
+
"input",
|
160
|
+
{
|
161
|
+
ref: W,
|
162
|
+
type: E,
|
163
|
+
id: A,
|
164
|
+
className: Y,
|
165
|
+
onFocus: J,
|
166
|
+
onBlur: H,
|
167
|
+
readOnly: d,
|
168
|
+
value: a,
|
169
|
+
onChange: Q,
|
170
|
+
maxLength: v,
|
171
|
+
disabled: t,
|
172
|
+
required: y,
|
173
|
+
autoComplete: G,
|
174
|
+
...P
|
175
|
+
}
|
176
|
+
),
|
177
|
+
I && /* @__PURE__ */ n(
|
178
|
+
"span",
|
179
|
+
{
|
180
|
+
className: o(e["right-slot"], j, {
|
181
|
+
[e.focused]: k,
|
182
|
+
[e["has-label"]]: !!u,
|
183
|
+
[e.disabled]: t
|
184
|
+
}),
|
185
|
+
children: I
|
186
|
+
}
|
187
|
+
),
|
188
|
+
y && !p && !_ && /* @__PURE__ */ n(
|
189
|
+
"span",
|
190
|
+
{
|
191
|
+
className: o(
|
192
|
+
e["required-mark"],
|
193
|
+
D
|
194
|
+
),
|
195
|
+
"data-testid": "required-mark"
|
196
|
+
}
|
197
|
+
),
|
198
|
+
M && p && /* @__PURE__ */ n(
|
199
|
+
re,
|
200
|
+
{
|
201
|
+
tabIndex: -1,
|
202
|
+
className: o(e.clear, {
|
203
|
+
[e.disabled]: t
|
204
|
+
}),
|
205
|
+
isIconButton: !0,
|
206
|
+
iconName: "Close16px",
|
207
|
+
size: "m-s",
|
208
|
+
clear: !0,
|
209
|
+
disabled: t || d,
|
210
|
+
variant: "secondary-gray",
|
211
|
+
onClick: K,
|
212
|
+
"data-testid": "clear-button"
|
213
|
+
}
|
214
|
+
)
|
215
|
+
]
|
216
|
+
}
|
217
|
+
);
|
218
|
+
}
|
219
|
+
)
|
220
|
+
);
|
221
|
+
he.displayName = "Input";
|
222
|
+
export {
|
223
|
+
he as I,
|
224
|
+
e as c
|
225
|
+
};
|
package/dist/assets/Input.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._input-wrapper_1bpoc_3{--input-border-radius-l: 8px;--input-border-radius-m: 6px;--input-border-radius-s: 6px;--input-required-mark-size: 8px;position:relative;display:flex;padding:0 var(--mimir-space-m);overflow:hidden;background-color:var(--input-bg-color);border-bottom:1px solid transparent;border-radius:var(--input-border-radius);transition:background-color .2s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease}._input-wrapper_1bpoc_3 ._required-mark_1bpoc_17{display:block;flex:0 0 var(--input-required-mark-size);align-self:center;width:var(--input-required-mark-size);height:var(--input-required-mark-size);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._input-wrapper_1bpoc_3 ._label_1bpoc_27{--input-required-mark-size: 6px;position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--mimir-space-m);z-index:1;display:flex;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs);transform-origin:left center;transition:transform .15s ease-out,font-size .15s ease-out,left .15s ease-out,color .15s ease-out;pointer-events:none}._input-wrapper_1bpoc_3 ._label_1bpoc_27._has-left-slot_1bpoc_42{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._input-wrapper_1bpoc_3 ._label_1bpoc_27._active-label_1bpoc_45{font-size:var(--label-font-size-active);transform:translateY(calc(var(--label-font-size-active) * -1))}._input-wrapper_1bpoc_3 ._label_1bpoc_27._active-label_1bpoc_45._has-left-slot_1bpoc_42{left:var(--mimir-space-m)}._input-wrapper_1bpoc_3 ._label_1bpoc_27._active-label_1bpoc_45 ._required-mark_1bpoc_17{margin-left:0}._input-wrapper_1bpoc_3 ._input_1bpoc_3{position:relative;display:block;flex:1;width:100%;min-width:0;height:var(--input-height);color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--mimir-font-inter);line-height:var(--input-line-height);letter-spacing:-.42px;text-overflow:ellipsis;background-color:inherit;border-radius:var(--input-border-radius);outline:none;cursor:var(--input-cursor);transition:border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-feature-settings:"zero"}._input-wrapper_1bpoc_3 ._input_1bpoc_3._has-left-slot_1bpoc_42{padding-left:0}._input-wrapper_1bpoc_3 ._input_1bpoc_3._has-right-slot_1bpoc_79{padding-right:0}._input-wrapper_1bpoc_3 ._input_1bpoc_3._focused_1bpoc_82{padding-top:0}._input-wrapper_1bpoc_3 ._input_1bpoc_3._has-label_1bpoc_85{padding-top:var(--input-padding-position)}._input-wrapper_1bpoc_3 ._input_1bpoc_3._disabled_1bpoc_88{color:var(--light-text)}._input-wrapper_1bpoc_3 ._input_1bpoc_3._disabled_1bpoc_88:hover,._input-wrapper_1bpoc_3 ._input_1bpoc_3._disabled_1bpoc_88:active,._input-wrapper_1bpoc_3 ._input_1bpoc_3._disabled_1bpoc_88:focus{color:var(--light-text)}._input-wrapper_1bpoc_3 ._input_1bpoc_3._auto-height_1bpoc_94{height:auto;min-height:var(--input-height);overflow:hidden!important;transition:height .2s ease;resize:none}._input-wrapper_1bpoc_3 ._addon-icon_1bpoc_101{width:var(--icon-size);height:var(--icon-size)}._input-wrapper_1bpoc_3 ._left-slot_1bpoc_105,._input-wrapper_1bpoc_3 ._right-slot_1bpoc_106{display:flex;align-items:center;height:var(--input-height);color:var(--black-60);font-size:var(--input-font-size);font-family:var(--mimir-font-inter);line-height:var(--input-line-height);background-color:inherit;transition:padding-top .15s ease-out}._input-wrapper_1bpoc_3 ._left-slot_1bpoc_105._focused_1bpoc_82._has-label_1bpoc_85,._input-wrapper_1bpoc_3 ._right-slot_1bpoc_106._focused_1bpoc_82._has-label_1bpoc_85{padding-top:var(--input-padding-position)}._input-wrapper_1bpoc_3 ._left-slot_1bpoc_105._disabled_1bpoc_88,._input-wrapper_1bpoc_3 ._right-slot_1bpoc_106._disabled_1bpoc_88{color:var(--white);cursor:not-allowed}._input-wrapper_1bpoc_3 ._left-slot_1bpoc_105._disabled_1bpoc_88 ._addon-icon_1bpoc_101 path,._input-wrapper_1bpoc_3 ._right-slot_1bpoc_106._disabled_1bpoc_88 ._addon-icon_1bpoc_101 path{fill:var(--white)}._input-wrapper_1bpoc_3 ._left-slot_1bpoc_105{justify-content:flex-end;margin-right:var(--clear-button-mg)}._input-wrapper_1bpoc_3 ._right-slot_1bpoc_106{margin-left:var(--clear-button-mg)}._input-wrapper_1bpoc_3 ._clear_1bpoc_137{align-self:center;width:16px;height:16px;margin-left:var(--clear-button-mg)}._input-wrapper_1bpoc_3 ._clear_1bpoc_137._disabled_1bpoc_88{cursor:not-allowed}._input-wrapper_1bpoc_3 svg{color:currentcolor;fill:currentcolor}._input-wrapper_1bpoc_3:hover ._label_1bpoc_27,._input-wrapper_1bpoc_3:focus-within ._label_1bpoc_27{color:var(--label-color)}._input-wrapper_1bpoc_3:hover{background-color:var(--input-bg-color-hover)}._input-wrapper_1bpoc_3:focus-within{background-color:var(--input-bg-color-active);border-bottom:1px solid var(--input-bottom-color-active)}._input-wrapper_1bpoc_3._focused_1bpoc_82{color:var(--input-color-active);background-color:var(--input-bg-color-active)}._input-wrapper_1bpoc_3._focused_1bpoc_82:hover{background-color:var(--input-bg-color-hover)}._input-wrapper_1bpoc_3._disabled_1bpoc_88{--input-cursor: not-allowed;--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border-bottom:1px solid transparent}._input-wrapper_1bpoc_3._disabled_1bpoc_88:hover,._input-wrapper_1bpoc_3._disabled_1bpoc_88:active,._input-wrapper_1bpoc_3._disabled_1bpoc_88:focus{--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border-bottom:1px solid transparent;box-shadow:none}._input-wrapper_1bpoc_3._disabled_1bpoc_88::-moz-placeholder{color:var(--light-text)}._input-wrapper_1bpoc_3._disabled_1bpoc_88::placeholder{color:var(--light-text)}._input-wrapper_1bpoc_3._disabled_1bpoc_88:hover::-moz-placeholder{color:var(--light-text)}._input-wrapper_1bpoc_3._disabled_1bpoc_88:hover::placeholder{color:var(--light-text)}._s_1bpoc_188{--input-height: var(--mimir-space-xxl);--input-font-size: var(--mimir-control-text-size-m);--input-line-height: var(--mimir-line-height-text-xs);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-1xs);--input-border-radius: var(--input-border-radius-s);--label-font-size-active: var(--mimir-size-text-xs);--label-spacing: var(--mimir-space-1xs);--input-required-mark-size: 6px;--clear-button-mg: var(--mimir-space-2xs);--icon-size: 16px;--left-addon-position: 0px}._m_1bpoc_203{--input-height: var(--mimir-space-4xl);--input-font-size: var(--mimir-control-text-size-l);--input-line-height: var(--mimir-line-height-text-s1);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-xs);--input-border-radius: var(--input-border-radius-m);--label-font-size-active: var(--mimir-size-text-s);--label-spacing: var(--mimir-space-xs);--input-required-mark-size: 6px;--clear-button-mg: var(--mimir-space-2xs);--icon-size: 16px;--left-addon-position: var(--mimir-space-3xs)}._l_1bpoc_27{--input-height: var(--mimir-space-4xxl);--input-font-size: var(--mimir-control-text-size-2xl);--input-line-height: var(--mimir-line-height-text-l);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-s);--input-border-radius: var(--input-border-radius-l);--label-font-size-active: var(--mimir-size-text-s);--label-spacing: var(--mimir-space-s);--clear-button-mg: var(--mimir-space-xs);--icon-size: 24px;--left-addon-position: var(--mimir-space-s)}._default-gray_1bpoc_232{--input-bg-color: var(--black-5);--input-bg-color-active: var(--black-10);--input-bg-color-hover: var(--black-10);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1bpoc_244{--input-bg-color: var(--white);--input-bg-color-hover: var(--black-10);--input-bg-color-active: var(--white);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_1bpoc_244:hover{--label-color: var(--dark-text)}._default-gray_1bpoc_232._success_1bpoc_259,._default-white_1bpoc_244._success_1bpoc_259{--input-bg-color: var(--success-bg-active);--input-bg-color-hover: var(--success-bg-hover);--input-bg-color-active: var(--success-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--success-normal);--label-color: var(--black-60)}._default-gray_1bpoc_232._success_1bpoc_259::-moz-placeholder,._default-white_1bpoc_244._success_1bpoc_259::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._success_1bpoc_259::placeholder,._default-white_1bpoc_244._success_1bpoc_259::placeholder{color:var(--input-color)}._default-gray_1bpoc_232._success_1bpoc_259:hover::-moz-placeholder,._default-white_1bpoc_244._success_1bpoc_259:hover::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._success_1bpoc_259:hover::placeholder,._default-white_1bpoc_244._success_1bpoc_259:hover::placeholder{color:var(--input-color)}._default-gray_1bpoc_232._alarm_1bpoc_279,._default-white_1bpoc_244._alarm_1bpoc_279{--input-bg-color: var(--alarm-bg-active);--input-bg-color-hover: var(--alarm-bg-hover);--input-bg-color-active: var(--alarm-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--alarm-normal);--label-color: var(--black-60)}._default-gray_1bpoc_232._alarm_1bpoc_279::-moz-placeholder,._default-white_1bpoc_244._alarm_1bpoc_279::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._alarm_1bpoc_279::placeholder,._default-white_1bpoc_244._alarm_1bpoc_279::placeholder{color:var(--input-color)}._default-gray_1bpoc_232._alarm_1bpoc_279:hover::-moz-placeholder,._default-white_1bpoc_244._alarm_1bpoc_279:hover::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._alarm_1bpoc_279:hover::placeholder,._default-white_1bpoc_244._alarm_1bpoc_279:hover::placeholder{color:var(--input-color)}._default-gray_1bpoc_232._error_1bpoc_299,._default-white_1bpoc_244._error_1bpoc_299{--input-bg-color: var(--error-bg-active);--input-bg-color-hover: var(--error-bg-hover);--input-bg-color-active: var(--error-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--error-normal);--label-color: var(--black-60)}._default-gray_1bpoc_232._error_1bpoc_299::-moz-placeholder,._default-white_1bpoc_244._error_1bpoc_299::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._error_1bpoc_299::placeholder,._default-white_1bpoc_244._error_1bpoc_299::placeholder{color:var(--input-color)}._default-gray_1bpoc_232._error_1bpoc_299:hover::-moz-placeholder,._default-white_1bpoc_244._error_1bpoc_299:hover::-moz-placeholder{color:var(--input-color)}._default-gray_1bpoc_232._error_1bpoc_299:hover::placeholder,._default-white_1bpoc_244._error_1bpoc_299:hover::placeholder{color:var(--input-color)}
|
1
|
+
._input-wrapper_zg2ds_3{--input-border-radius-l: 8px;--input-border-radius-m: 6px;--input-border-radius-s: 6px;--input-required-mark-size: 8px;position:relative;display:flex;padding:0 var(--mimir-space-m);overflow:hidden;background-color:var(--input-bg-color);border-bottom:1px solid transparent;border-radius:var(--input-border-radius);transition:background-color .2s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease}._input-wrapper_zg2ds_3 ._required-mark_zg2ds_17{display:block;flex:0 0 var(--input-required-mark-size);align-self:center;width:var(--input-required-mark-size);height:var(--input-required-mark-size);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._input-wrapper_zg2ds_3 ._label_zg2ds_27{--input-required-mark-size: 6px;position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--mimir-space-m);z-index:1;display:flex;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs);transform-origin:left center;transition:transform .15s ease-out,font-size .15s ease-out,left .15s ease-out,color .15s ease-out;pointer-events:none}._input-wrapper_zg2ds_3 ._label_zg2ds_27._has-left-slot_zg2ds_42{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._input-wrapper_zg2ds_3 ._label_zg2ds_27._active-label_zg2ds_45{font-size:var(--label-font-size-active);transform:translateY(calc(var(--label-font-size-active) * -1))}._input-wrapper_zg2ds_3 ._label_zg2ds_27._active-label_zg2ds_45._has-left-slot_zg2ds_42{left:var(--mimir-space-m)}._input-wrapper_zg2ds_3 ._label_zg2ds_27._active-label_zg2ds_45 ._required-mark_zg2ds_17{margin-left:0}._input-wrapper_zg2ds_3 ._input_zg2ds_3{position:relative;display:block;flex:1;width:100%;min-width:0;height:var(--input-height);color:var(--dark-text);font-size:var(--input-font-size);font-family:var(--mimir-font-inter);line-height:var(--input-line-height);letter-spacing:-.42px;text-overflow:ellipsis;background-color:inherit;border-radius:var(--input-border-radius);outline:none;cursor:var(--input-cursor);transition:border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-feature-settings:"zero"}._input-wrapper_zg2ds_3 ._input_zg2ds_3._has-left-slot_zg2ds_42{padding-left:0}._input-wrapper_zg2ds_3 ._input_zg2ds_3._has-right-slot_zg2ds_79{padding-right:0}._input-wrapper_zg2ds_3 ._input_zg2ds_3._focused_zg2ds_82{padding-top:0}._input-wrapper_zg2ds_3 ._input_zg2ds_3._has-label_zg2ds_85{padding-top:var(--input-padding-position)}._input-wrapper_zg2ds_3 ._input_zg2ds_3._disabled_zg2ds_88{color:var(--light-text)}._input-wrapper_zg2ds_3 ._input_zg2ds_3._disabled_zg2ds_88:hover,._input-wrapper_zg2ds_3 ._input_zg2ds_3._disabled_zg2ds_88:active,._input-wrapper_zg2ds_3 ._input_zg2ds_3._disabled_zg2ds_88:focus{color:var(--light-text)}._input-wrapper_zg2ds_3 ._addon-icon_zg2ds_94{width:var(--icon-size);height:var(--icon-size)}._input-wrapper_zg2ds_3 ._left-slot_zg2ds_98,._input-wrapper_zg2ds_3 ._right-slot_zg2ds_99{display:flex;align-items:center;height:var(--input-height);color:var(--black-60);font-size:var(--input-font-size);font-family:var(--mimir-font-inter);line-height:var(--input-line-height);background-color:inherit;transition:padding-top .15s ease-out}._input-wrapper_zg2ds_3 ._left-slot_zg2ds_98._focused_zg2ds_82._has-label_zg2ds_85,._input-wrapper_zg2ds_3 ._right-slot_zg2ds_99._focused_zg2ds_82._has-label_zg2ds_85{padding-top:var(--input-padding-position)}._input-wrapper_zg2ds_3 ._left-slot_zg2ds_98._disabled_zg2ds_88,._input-wrapper_zg2ds_3 ._right-slot_zg2ds_99._disabled_zg2ds_88{color:var(--white);cursor:not-allowed}._input-wrapper_zg2ds_3 ._left-slot_zg2ds_98._disabled_zg2ds_88 ._addon-icon_zg2ds_94 path,._input-wrapper_zg2ds_3 ._right-slot_zg2ds_99._disabled_zg2ds_88 ._addon-icon_zg2ds_94 path{fill:var(--white)}._input-wrapper_zg2ds_3 ._left-slot_zg2ds_98{justify-content:flex-end;margin-right:var(--clear-button-mg)}._input-wrapper_zg2ds_3 ._right-slot_zg2ds_99{margin-left:var(--clear-button-mg)}._input-wrapper_zg2ds_3 ._clear_zg2ds_130{align-self:center;width:16px;height:16px;margin-left:var(--clear-button-mg)}._input-wrapper_zg2ds_3 ._clear_zg2ds_130._disabled_zg2ds_88{cursor:not-allowed}._input-wrapper_zg2ds_3 svg{color:currentcolor;fill:currentcolor}._input-wrapper_zg2ds_3:hover ._label_zg2ds_27,._input-wrapper_zg2ds_3:focus-within ._label_zg2ds_27{color:var(--label-color)}._input-wrapper_zg2ds_3:hover{background-color:var(--input-bg-color-hover)}._input-wrapper_zg2ds_3:focus-within{background-color:var(--input-bg-color-active);border-bottom:1px solid var(--input-bottom-color-active)}._input-wrapper_zg2ds_3._focused_zg2ds_82{color:var(--input-color-active);background-color:var(--input-bg-color-active)}._input-wrapper_zg2ds_3._focused_zg2ds_82:hover{background-color:var(--input-bg-color-hover)}._input-wrapper_zg2ds_3._disabled_zg2ds_88{--input-cursor: not-allowed;--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border-bottom:1px solid transparent}._input-wrapper_zg2ds_3._disabled_zg2ds_88:hover,._input-wrapper_zg2ds_3._disabled_zg2ds_88:active,._input-wrapper_zg2ds_3._disabled_zg2ds_88:focus{--label-color: var(--light-text);color:var(--light-text);background-color:var(--black-20);border-bottom:1px solid transparent;box-shadow:none}._input-wrapper_zg2ds_3._disabled_zg2ds_88::-moz-placeholder{color:var(--light-text)}._input-wrapper_zg2ds_3._disabled_zg2ds_88::placeholder{color:var(--light-text)}._input-wrapper_zg2ds_3._disabled_zg2ds_88:hover::-moz-placeholder{color:var(--light-text)}._input-wrapper_zg2ds_3._disabled_zg2ds_88:hover::placeholder{color:var(--light-text)}._s_zg2ds_181{--input-height: var(--mimir-space-xxl);--input-font-size: var(--mimir-control-text-size-m);--input-line-height: var(--mimir-line-height-text-xs);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-1xs);--input-border-radius: var(--input-border-radius-s);--label-font-size-active: var(--mimir-size-text-xs);--label-spacing: var(--mimir-space-1xs);--input-required-mark-size: 6px;--clear-button-mg: var(--mimir-space-2xs);--icon-size: 16px;--left-addon-position: 0px}._m_zg2ds_196{--input-height: var(--mimir-space-4xl);--input-font-size: var(--mimir-control-text-size-l);--input-line-height: var(--mimir-line-height-text-s1);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-xs);--input-border-radius: var(--input-border-radius-m);--label-font-size-active: var(--mimir-size-text-s);--label-spacing: var(--mimir-space-xs);--input-required-mark-size: 6px;--clear-button-mg: var(--mimir-space-2xs);--icon-size: 16px;--left-addon-position: var(--mimir-space-3xs)}._l_zg2ds_27{--input-height: var(--mimir-space-4xxl);--input-font-size: var(--mimir-control-text-size-2xl);--input-line-height: var(--mimir-line-height-text-l);--input-padding: var(--mimir-space-m);--input-padding-position: var(--mimir-space-s);--input-border-radius: var(--input-border-radius-l);--label-font-size-active: var(--mimir-size-text-s);--label-spacing: var(--mimir-space-s);--clear-button-mg: var(--mimir-space-xs);--icon-size: 24px;--left-addon-position: var(--mimir-space-s)}._default-gray_zg2ds_225{--input-bg-color: var(--black-5);--input-bg-color-active: var(--black-10);--input-bg-color-hover: var(--black-10);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_zg2ds_237{--input-bg-color: var(--white);--input-bg-color-hover: var(--black-10);--input-bg-color-active: var(--white);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--citrine-normal);--label-color: var(--black-60)}._default-white_zg2ds_237:hover{--label-color: var(--dark-text)}._default-gray_zg2ds_225._success_zg2ds_252,._default-white_zg2ds_237._success_zg2ds_252{--input-bg-color: var(--success-bg-active);--input-bg-color-hover: var(--success-bg-hover);--input-bg-color-active: var(--success-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--success-normal);--label-color: var(--black-60)}._default-gray_zg2ds_225._success_zg2ds_252::-moz-placeholder,._default-white_zg2ds_237._success_zg2ds_252::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._success_zg2ds_252::placeholder,._default-white_zg2ds_237._success_zg2ds_252::placeholder{color:var(--input-color)}._default-gray_zg2ds_225._success_zg2ds_252:hover::-moz-placeholder,._default-white_zg2ds_237._success_zg2ds_252:hover::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._success_zg2ds_252:hover::placeholder,._default-white_zg2ds_237._success_zg2ds_252:hover::placeholder{color:var(--input-color)}._default-gray_zg2ds_225._alarm_zg2ds_272,._default-white_zg2ds_237._alarm_zg2ds_272{--input-bg-color: var(--alarm-bg-active);--input-bg-color-hover: var(--alarm-bg-hover);--input-bg-color-active: var(--alarm-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--alarm-normal);--label-color: var(--black-60)}._default-gray_zg2ds_225._alarm_zg2ds_272::-moz-placeholder,._default-white_zg2ds_237._alarm_zg2ds_272::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._alarm_zg2ds_272::placeholder,._default-white_zg2ds_237._alarm_zg2ds_272::placeholder{color:var(--input-color)}._default-gray_zg2ds_225._alarm_zg2ds_272:hover::-moz-placeholder,._default-white_zg2ds_237._alarm_zg2ds_272:hover::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._alarm_zg2ds_272:hover::placeholder,._default-white_zg2ds_237._alarm_zg2ds_272:hover::placeholder{color:var(--input-color)}._default-gray_zg2ds_225._error_zg2ds_292,._default-white_zg2ds_237._error_zg2ds_292{--input-bg-color: var(--error-bg-active);--input-bg-color-hover: var(--error-bg-hover);--input-bg-color-active: var(--error-bg-active);--input-color: var(--dark-text);--input-color-hover: var(--dark-text);--input-color-active: var(--dark-text);--input-border: transparent;--input-bottom-color-active: var(--error-normal);--label-color: var(--black-60)}._default-gray_zg2ds_225._error_zg2ds_292::-moz-placeholder,._default-white_zg2ds_237._error_zg2ds_292::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._error_zg2ds_292::placeholder,._default-white_zg2ds_237._error_zg2ds_292::placeholder{color:var(--input-color)}._default-gray_zg2ds_225._error_zg2ds_292:hover::-moz-placeholder,._default-white_zg2ds_237._error_zg2ds_292:hover::-moz-placeholder{color:var(--input-color)}._default-gray_zg2ds_225._error_zg2ds_292:hover::placeholder,._default-white_zg2ds_237._error_zg2ds_292:hover::placeholder{color:var(--input-color)}
|
@@ -1 +1 @@
|
|
1
|
-
._file-
|
1
|
+
._file-info_wnnpg_2{display:flex;flex-direction:column;gap:var(--mimir-space-xs);overflow:hidden}._file-info_wnnpg_2 ._file-info-size_wnnpg_8{color:var(--disabled-color);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-m);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xxs);text-align:left}._file-info_wnnpg_2 ._file-info-name-wrapper_wnnpg_16{display:table;width:100%;table-layout:fixed}._file-info_wnnpg_2 ._file-info-name-wrapper_wnnpg_16 ._file-info-name_wnnpg_16{display:table-cell;overflow:hidden;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);font-size:var(--mimir-size-text-l2);font-family:var(--mimir-font-inter),sans-serif;line-height:var(--mimir-line-height-text-xl);white-space:nowrap;text-align:left;text-overflow:ellipsis}._file-upload-container_wnnpg_34{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%;margin-bottom:0;padding-left:0}._file-upload-container_wnnpg_34 ._file-upload-container-item_wnnpg_42{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--mimir-space-xs) var(--mimir-space-m);background:var(--file-upload-container-background);border-radius:var(--mimir-control-radius)}._file-upload-container_wnnpg_34 ._file-upload-container-item_wnnpg_42 ._delete-button_wnnpg_51{position:absolute;top:var(--mimir-space-2xs);right:var(--mimir-space-2xs);background:var(--delete-button-background)}._white_wnnpg_58{--file-upload-container-background: var(--white);--delete-button-background: var(--black-5)}._gray_wnnpg_63{--file-upload-container-background: var(--black-5);--delete-button-background: var(--white)}
|
package/dist/assets/TextArea.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._textarea-
|
1
|
+
._textarea-wrapper_ta2xa_2 ._textarea_ta2xa_2{min-height:var(--textarea-height);padding-top:var(--textarea-space)!important;padding-bottom:var(--textarea-space);resize:none}._textarea-wrapper_ta2xa_2 ._textarea_ta2xa_2._has-label_ta2xa_8{padding-top:var(--textarea-top-space)!important}._textarea-wrapper_ta2xa_2 ._required-mark_ta2xa_11{display:block;flex:0 0 var(--input-required-mark-size);align-self:flex-start;width:var(--input-required-mark-size);height:var(--input-required-mark-size);margin-top:var(--required-mark-margin);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._textarea-wrapper_ta2xa_2 ._label_ta2xa_22{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--mimir-space-m);z-index:1;display:flex;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs);transform-origin:left center;transition:transform .15s ease-out,font-size .15s ease-out,left .15s ease-out,color .15s ease-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}._textarea-wrapper_ta2xa_2 ._label_ta2xa_22._has-left-slot_ta2xa_37{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._textarea-wrapper_ta2xa_2 ._label_ta2xa_22._active-label_ta2xa_40{font-size:var(--label-font-size-active);transform:var(--active-label-transform)}._textarea-wrapper_ta2xa_2 ._label_ta2xa_22._active-label_ta2xa_40._has-left-slot_ta2xa_37{left:var(--mimir-space-m)}._textarea-wrapper_ta2xa_2 ._label_ta2xa_22._active-label_ta2xa_40 ._required-mark_ta2xa_11{align-self:center;margin-top:0;margin-left:0}._s_ta2xa_53{--textarea-space: var(--mimir-space-2s);--required-mark-margin: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 76px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s);--active-label-transform: translate( 0, calc(var(--label-font-size-active) * -1) )}._m_ta2xa_65{--textarea-space: var(--mimir-space-2s);--required-mark-margin: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 88px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s);--active-label-transform: translate( 0, calc(var(--label-font-size-active) * -1) )}._l_ta2xa_22{--textarea-space: var(--mimir-space-2m);--required-mark-margin: var(--mimir-space-2m);--textarea-top-space: 25px;--textarea-height: 120px;--textarea-padding: var(--mimir-space-2m);--active-label-transform: translate( 0, calc(var(--label-font-size-active) * -1) )}._input-s_ta2xa_89{--textarea-height: var(--mimir-space-xxl) !important;--textarea-space: var(--mimir-space-1xs) !important;--textarea-top-space: calc(var(--mimir-space-l) - 1px) !important;--active-label-transform: translate(0, calc(var(--mimir-space-xs) * -1));--required-mark-margin: var(--mimir-space-2m)}._input-m_ta2xa_97{--textarea-height: var(--mimir-space-4xl) !important;--textarea-space: var(--mimir-space-2xs) !important;--textarea-top-space: calc(var(--mimir-space-l) + 1px) !important;--active-label-transform: translate(0, calc(var(--mimir-space-xss) * -1));--required-mark-margin: var(--mimir-space-l)}._input-l_ta2xa_105{--textarea-height: var(--mimir-space-4xxl) !important;--textarea-space: var(--mimir-space-2xs) !important;--required-mark-margin: var(--mimir-space-1xl)}
|
@@ -10,7 +10,7 @@ import { YearPickerModal as rt } from "./YearPickerModal.js";
|
|
10
10
|
import { useClickOutside as ct } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
11
|
import { Icon as H } from "../../icons/Icon.js";
|
12
12
|
import { formating as f } from "../../utils/index.js";
|
13
|
-
import { I as mt } from "../../Input-
|
13
|
+
import { I as mt } from "../../Input-BYrIS5GU.js";
|
14
14
|
import { EInputStatus as pt, EInputSize as L } from "../Input/constants.js";
|
15
15
|
const dt = {
|
16
16
|
days: it,
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
2
2
|
import "../../index-DIxK0V-G.js";
|
3
3
|
import "react";
|
4
4
|
import "./constants.js";
|
5
|
-
import { I as f } from "../../Input-
|
5
|
+
import { I as f } from "../../Input-BYrIS5GU.js";
|
6
6
|
import "../../hooks/useMergeRefs/useMergeRefs.js";
|
7
7
|
import "../../icons/Icon.js";
|
8
8
|
import "../Button/Button.js";
|
@@ -3,7 +3,7 @@ import { c } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { memo as w, forwardRef as u, useState as m } from "react";
|
4
4
|
import { Icon as d } from "../../icons/Icon.js";
|
5
5
|
import { Button as _ } from "../Button/Button.js";
|
6
|
-
import { I as l } from "../../Input-
|
6
|
+
import { I as l } from "../../Input-BYrIS5GU.js";
|
7
7
|
import '../../assets/InputPassword.css';const b = "_input_7b9x2_2", x = "_wrapper_7b9x2_6", h = "_button_7b9x2_17", f = "_icon_7b9x2_33", N = "_show_7b9x2_38", t = {
|
8
8
|
input: b,
|
9
9
|
wrapper: x,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
2
2
|
import { memo as I, forwardRef as i, useState as c, useCallback as f, useImperativeHandle as P } from "react";
|
3
3
|
import { getMaskedInputPhoneValue as m, getUnmaskedInputValue as o } from "./utils.js";
|
4
|
-
import { I as b } from "../../Input-
|
4
|
+
import { I as b } from "../../Input-BYrIS5GU.js";
|
5
5
|
const h = I(
|
6
6
|
i(
|
7
7
|
({ value: s = "", onChange: e, ...p }, a) => {
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { EFileItemVariant } from './constants';
|
2
|
+
|
1
3
|
export type TListFiles = {
|
2
4
|
/**
|
3
5
|
* Массив фото
|
@@ -7,6 +9,14 @@ export type TListFiles = {
|
|
7
9
|
* функция -callback, которая вызывается при изменении списка и передает обновленный список и deleteId,
|
8
10
|
*/
|
9
11
|
onChange?: (e: TFileValue) => void;
|
12
|
+
/**
|
13
|
+
* Класс для обертки списка файлов
|
14
|
+
*/
|
15
|
+
classNameWrapper?: string;
|
16
|
+
/**
|
17
|
+
* Вариант отображения файла
|
18
|
+
*/
|
19
|
+
variant?: EFileItemVariant | `${EFileItemVariant}`;
|
10
20
|
};
|
11
21
|
export type TFileItem = {
|
12
22
|
id: number;
|
@@ -23,4 +33,4 @@ export type TFilesDetail = {
|
|
23
33
|
size?: number;
|
24
34
|
type?: string;
|
25
35
|
};
|
26
|
-
export declare function ListFiles({ value, onChange }: TListFiles): import("react/jsx-runtime").JSX.Element | null;
|
36
|
+
export declare function ListFiles({ value, onChange, classNameWrapper, variant }: TListFiles): import("react/jsx-runtime").JSX.Element | null;
|
@@ -1,46 +1,65 @@
|
|
1
|
-
import { jsx as t, jsxs as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
|
7
|
-
|
8
|
-
"file-info
|
9
|
-
"file-info-
|
10
|
-
"file-
|
11
|
-
"file-
|
12
|
-
"
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
2
|
+
import { c as _ } from "../../index-DIxK0V-G.js";
|
3
|
+
import { useState as d, useEffect as u } from "react";
|
4
|
+
import { EFileItemVariant as w } from "./constants.js";
|
5
|
+
import { formating as g } from "../../utils/index.js";
|
6
|
+
import { Button as N } from "../Button/Button.js";
|
7
|
+
import '../../assets/ListFiles.css';const h = "_white_wnnpg_58", z = "_gray_wnnpg_63", e = {
|
8
|
+
"file-info": "_file-info_wnnpg_2",
|
9
|
+
"file-info-size": "_file-info-size_wnnpg_8",
|
10
|
+
"file-info-name-wrapper": "_file-info-name-wrapper_wnnpg_16",
|
11
|
+
"file-info-name": "_file-info-name_wnnpg_16",
|
12
|
+
"file-upload-container": "_file-upload-container_wnnpg_34",
|
13
|
+
"file-upload-container-item": "_file-upload-container-item_wnnpg_42",
|
14
|
+
"delete-button": "_delete-button_wnnpg_51",
|
15
|
+
white: h,
|
16
|
+
gray: z
|
13
17
|
};
|
14
|
-
function
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
function v({
|
19
|
+
value: o,
|
20
|
+
onChange: s,
|
21
|
+
classNameWrapper: f,
|
22
|
+
variant: c = w.white
|
23
|
+
}) {
|
24
|
+
const [a, l] = d(o);
|
25
|
+
u(() => {
|
26
|
+
l(o);
|
18
27
|
}, [o]);
|
19
|
-
const
|
20
|
-
const n = [...
|
21
|
-
|
28
|
+
const m = async (i) => {
|
29
|
+
const n = [...a.filter((p) => p.id !== i)];
|
30
|
+
l(n), s == null || s({ deleteId: i, list: n });
|
22
31
|
};
|
23
|
-
return
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
32
|
+
return a.length ? /* @__PURE__ */ t(
|
33
|
+
"ul",
|
34
|
+
{
|
35
|
+
className: _(
|
36
|
+
e["file-upload-container"],
|
37
|
+
f,
|
38
|
+
e[c]
|
39
|
+
),
|
40
|
+
children: a.map((i, n) => /* @__PURE__ */ r("li", { className: e["file-upload-container-item"], children: [
|
41
|
+
/* @__PURE__ */ r("div", { className: e["file-info"], children: [
|
42
|
+
(i == null ? void 0 : i.size) && /* @__PURE__ */ r("span", { className: e["file-info-size"], children: [
|
43
|
+
" ",
|
44
|
+
g.Size(i == null ? void 0 : i.size)
|
45
|
+
] }),
|
46
|
+
/* @__PURE__ */ t("div", { className: e["file-info-name-wrapper"], children: /* @__PURE__ */ t("div", { className: e["file-info-name"], children: i.name }) })
|
47
|
+
] }),
|
48
|
+
/* @__PURE__ */ t(
|
49
|
+
N,
|
50
|
+
{
|
51
|
+
isIconButton: !0,
|
52
|
+
iconName: "Close12px",
|
53
|
+
size: "m-s",
|
54
|
+
variant: "secondary-gray",
|
55
|
+
className: e["delete-button"],
|
56
|
+
onClick: () => m(i.id)
|
57
|
+
}
|
58
|
+
)
|
59
|
+
] }, n))
|
60
|
+
}
|
61
|
+
) : null;
|
43
62
|
}
|
44
63
|
export {
|
45
|
-
|
64
|
+
v as ListFiles
|
46
65
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const
|
1
|
+
const t = [
|
2
2
|
{
|
3
3
|
id: 111,
|
4
4
|
name: "ООО “КИЗ-СТРОЙ” - Свидетельство о регистрации (06.12.2003).xls",
|
@@ -28,6 +28,8 @@ const p = [
|
|
28
28
|
type: "image/png"
|
29
29
|
}
|
30
30
|
];
|
31
|
+
var p = /* @__PURE__ */ ((e) => (e.white = "white", e.gray = "gray", e))(p || {});
|
31
32
|
export {
|
32
|
-
p as
|
33
|
+
p as EFileItemVariant,
|
34
|
+
t as photos
|
33
35
|
};
|
@@ -7,6 +7,10 @@ export type TListPhotos = {
|
|
7
7
|
* функция -callback, которая вызывается при изменении списка и передает обновленный список и deleteId,
|
8
8
|
*/
|
9
9
|
onChange?: (e: TPhotoValue) => void;
|
10
|
+
/**
|
11
|
+
* Класс для обертки списка фотографий
|
12
|
+
*/
|
13
|
+
classNameWrapper?: string;
|
10
14
|
};
|
11
15
|
export type TPhotoItem = {
|
12
16
|
id: number;
|
@@ -21,4 +25,4 @@ export type TPhotosDetail = {
|
|
21
25
|
url: string;
|
22
26
|
file?: File;
|
23
27
|
};
|
24
|
-
export declare function ListPhotos({ value, onChange }: TListPhotos): import("react/jsx-runtime").JSX.Element | null;
|
28
|
+
export declare function ListPhotos({ value, onChange, classNameWrapper }: TListPhotos): import("react/jsx-runtime").JSX.Element | null;
|
@@ -1,22 +1,23 @@
|
|
1
1
|
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { c as u } from "../../index-DIxK0V-G.js";
|
3
|
+
import { useState as _, useEffect as f } from "react";
|
4
|
+
import { Button as d } from "../Button/Button.js";
|
4
5
|
import '../../assets/ListPhotos.css';const i = {
|
5
6
|
"list-photos": "_list-photos_1tpc1_2",
|
6
7
|
"list-photos-item": "_list-photos-item_1tpc1_11",
|
7
8
|
"list-photos-image": "_list-photos-image_1tpc1_20",
|
8
9
|
"delete-button": "_delete-button_1tpc1_25"
|
9
10
|
};
|
10
|
-
function
|
11
|
-
const [e, c] =
|
12
|
-
|
11
|
+
function x({ value: o, onChange: s, classNameWrapper: r }) {
|
12
|
+
const [e, c] = _(o);
|
13
|
+
f(() => {
|
13
14
|
c(o);
|
14
15
|
}, [o]);
|
15
|
-
const
|
16
|
-
const
|
17
|
-
c(
|
16
|
+
const p = async (t) => {
|
17
|
+
const m = [...e.filter((a) => a.id !== t)];
|
18
|
+
c(m), s == null || s({ deleteId: t, list: m });
|
18
19
|
};
|
19
|
-
return e.length
|
20
|
+
return e.length ? /* @__PURE__ */ l("ul", { className: u(i["list-photos"], r), children: e.map((t) => /* @__PURE__ */ n("li", { className: i["list-photos-item"], children: [
|
20
21
|
/* @__PURE__ */ l(
|
21
22
|
"img",
|
22
23
|
{
|
@@ -26,18 +27,18 @@ function L({ value: o, onChange: s }) {
|
|
26
27
|
}
|
27
28
|
),
|
28
29
|
s && /* @__PURE__ */ l(
|
29
|
-
|
30
|
+
d,
|
30
31
|
{
|
31
32
|
isIconButton: !0,
|
32
33
|
iconName: "Close12px",
|
33
34
|
size: "m-s",
|
34
35
|
variant: "secondary-gray",
|
35
36
|
className: i["delete-button"],
|
36
|
-
onClick: () =>
|
37
|
+
onClick: () => p(t.id)
|
37
38
|
}
|
38
39
|
)
|
39
|
-
] }, t.id)) });
|
40
|
+
] }, t.id)) }) : null;
|
40
41
|
}
|
41
42
|
export {
|
42
|
-
|
43
|
+
x as ListPhotos
|
43
44
|
};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { ListPhotos } from './ListPhotos';
|
2
|
-
export type { ListPhotos as TListPhotos } from './ListPhotos';
|
2
|
+
export type { ListPhotos as TListPhotos, TPhotosDetail, TPhotoValue, TPhotoItem } from './ListPhotos';
|
@@ -7,7 +7,7 @@ import { Icon as ce } from "../../icons/Icon.js";
|
|
7
7
|
import { Button as ae } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as ue } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as de } from "../Chip/Chip.js";
|
10
|
-
import { I as G } from "../../Input-
|
10
|
+
import { I as G } from "../../Input-BYrIS5GU.js";
|
11
11
|
import { EInputVariant as pe } from "../Input/constants.js";
|
12
12
|
import { H as me, U as H, G as J, K as _e, j as he } from "../../combobox-BpYucpxz.js";
|
13
13
|
import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke = "_container_17kql_9", qe = "_full_17kql_27", ge = "_button_17kql_39", be = "_options_17kql_53", ve = "_top_17kql_64", Ne = "_bottom_17kql_69", Ie = "_m_17kql_2", we = "_l_17kql_111", Ce = "_focused_17kql_129", Se = "_option_17kql_53", Me = "_chip_17kql_158", xe = "_clear_17kql_183", e = {
|
@@ -3,7 +3,7 @@ import { c as u } from "../../index-DIxK0V-G.js";
|
|
3
3
|
import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
|
4
4
|
import { ITEMS_PER_SEPARATOR as q, DEFAULT_VALUE_LENGTH as v } from "./constants.js";
|
5
5
|
import { useOTPInput as y } from "./hooks.js";
|
6
|
-
import { I as A } from "../../Input-
|
6
|
+
import { I as A } from "../../Input-BYrIS5GU.js";
|
7
7
|
import '../../assets/OtpInput.css';const C = "_otp_1shq3_3", F = "_input_1shq3_14", L = "_separator_1shq3_28", r = {
|
8
8
|
otp: C,
|
9
9
|
"input-wrapper": "_input-wrapper_1shq3_14",
|