mimir-ui-kit 1.36.5 → 1.36.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Input-CxcCZOIp.js → Input-WnjLXNpw.js} +84 -82
- 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/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.js +58 -58
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import { jsxs as B, jsx as
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
1
|
+
import { jsxs as B, jsx as c, Fragment as Y } from "react/jsx-runtime";
|
2
|
+
import { c as o } from "./index-DIxK0V-G.js";
|
3
|
+
import { memo as Z, forwardRef as $, useState as R, useRef as ee, useEffect as z } from "react";
|
4
4
|
import { EInputVariant as te } from "./components/Input/constants.js";
|
5
5
|
import { useMergeRefs as se } from "./hooks/useMergeRefs/useMergeRefs.js";
|
6
6
|
import { Icon as ae } from "./icons/Icon.js";
|
@@ -29,20 +29,20 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
|
|
29
29
|
success: pe,
|
30
30
|
alarm: me,
|
31
31
|
error: be
|
32
|
-
},
|
33
|
-
var p,
|
32
|
+
}, L = (t) => {
|
33
|
+
var p, a;
|
34
34
|
if (!t)
|
35
35
|
return null;
|
36
36
|
switch (t.addonType) {
|
37
37
|
case "icon": {
|
38
|
-
const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"),
|
39
|
-
return /* @__PURE__ */
|
38
|
+
const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
|
39
|
+
return /* @__PURE__ */ c(
|
40
40
|
ae,
|
41
41
|
{
|
42
42
|
style: {
|
43
|
-
"--icon-size":
|
43
|
+
"--icon-size": o({
|
44
44
|
"16px": m,
|
45
|
-
"24px":
|
45
|
+
"24px": g
|
46
46
|
})
|
47
47
|
},
|
48
48
|
className: e["addon-icon"],
|
@@ -53,88 +53,90 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
|
|
53
53
|
case "text":
|
54
54
|
return t.addonContent;
|
55
55
|
case "react-node":
|
56
|
-
return /* @__PURE__ */
|
56
|
+
return /* @__PURE__ */ c(Y, { children: t.addonContent });
|
57
57
|
default:
|
58
58
|
return null;
|
59
59
|
}
|
60
|
-
}, fe =
|
61
|
-
|
60
|
+
}, fe = Z(
|
61
|
+
$(
|
62
62
|
(t, p) => {
|
63
63
|
const {
|
64
|
-
value:
|
64
|
+
value: a,
|
65
65
|
className: m,
|
66
|
-
wrapperClassName:
|
67
|
-
rightSlotClassName:
|
68
|
-
requiredMarkClassName:
|
66
|
+
wrapperClassName: g,
|
67
|
+
rightSlotClassName: j,
|
68
|
+
requiredMarkClassName: D,
|
69
69
|
variant: A = te.DefaultGray,
|
70
|
-
type:
|
71
|
-
autofocus:
|
72
|
-
readonly:
|
70
|
+
type: E = "text",
|
71
|
+
autofocus: N,
|
72
|
+
readonly: n,
|
73
73
|
id: F,
|
74
|
-
onFocus:
|
75
|
-
onBlur:
|
74
|
+
onFocus: x,
|
75
|
+
onBlur: y,
|
76
76
|
label: u,
|
77
|
-
withClearButton:
|
77
|
+
withClearButton: M,
|
78
78
|
disabled: s,
|
79
79
|
onChange: i,
|
80
|
-
rightAddon:
|
80
|
+
rightAddon: O,
|
81
81
|
status: V,
|
82
|
-
leftAddon:
|
83
|
-
size:
|
84
|
-
numbersOnly:
|
85
|
-
required:
|
86
|
-
maxLength:
|
87
|
-
...
|
88
|
-
} = t, [_,
|
89
|
-
|
90
|
-
|
91
|
-
}, [
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
}, H = () => {
|
98
|
-
|
82
|
+
leftAddon: S,
|
83
|
+
size: C = "m",
|
84
|
+
numbersOnly: T,
|
85
|
+
required: v,
|
86
|
+
maxLength: w,
|
87
|
+
...G
|
88
|
+
} = t, [_, I] = R(N), [b, f] = R(!!a), d = ee(null), P = se(d, p);
|
89
|
+
z(() => {
|
90
|
+
N && I(!0);
|
91
|
+
}, [N]), z(() => {
|
92
|
+
f(!!a);
|
93
|
+
}, [a]);
|
94
|
+
const W = (l) => {
|
95
|
+
const r = l.currentTarget.value;
|
96
|
+
y == null || y(l), I(!1), f(!!r);
|
97
|
+
}, H = (l) => {
|
98
|
+
n || (I(!0), x == null || x(l));
|
99
|
+
}, J = () => {
|
100
|
+
d != null && d.current && (d.current.value = "", d.current.focus(), f(!1), i == null || i({
|
99
101
|
target: { value: "" }
|
100
102
|
}));
|
101
|
-
},
|
102
|
-
let
|
103
|
-
|
104
|
-
},
|
105
|
-
[e.readonly]: s ||
|
103
|
+
}, K = (l) => {
|
104
|
+
let r = l.target.value;
|
105
|
+
T && (r = r.replace(/\D/g, "")), w !== void 0 && (r = r.slice(0, w)), l.target.value = r, i == null || i(l), f(!!r);
|
106
|
+
}, h = L(S), k = L(O), Q = {
|
107
|
+
[e.readonly]: s || n,
|
106
108
|
[e.focused]: _,
|
107
|
-
[e.disabled]: s ||
|
109
|
+
[e.disabled]: s || n,
|
108
110
|
[e["has-label"]]: !!u,
|
109
|
-
[e["has-left-slot"]]: !!
|
111
|
+
[e["has-left-slot"]]: !!h,
|
110
112
|
[e["has-right-slot"]]: !!k
|
111
|
-
}, q = _ || b || !!
|
113
|
+
}, q = _ || b || !!a, U = o(e.label, m, e[C], {
|
112
114
|
[e["active-label"]]: q,
|
113
|
-
[e.disabled]: s ||
|
114
|
-
[e["has-left-slot"]]: !!
|
115
|
-
}),
|
115
|
+
[e.disabled]: s || n,
|
116
|
+
[e["has-left-slot"]]: !!h
|
117
|
+
}), X = o(e.input, Q, m, [
|
116
118
|
e[A],
|
117
119
|
e[V ?? ""],
|
118
|
-
e[
|
120
|
+
e[C]
|
119
121
|
]);
|
120
122
|
return /* @__PURE__ */ B(
|
121
123
|
"div",
|
122
124
|
{
|
123
|
-
className:
|
125
|
+
className: o(
|
124
126
|
e["input-wrapper"],
|
125
127
|
e[A],
|
126
128
|
e[V ?? ""],
|
127
|
-
e[
|
129
|
+
e[C],
|
128
130
|
{
|
129
|
-
[e.disabled]: s ||
|
131
|
+
[e.disabled]: s || n,
|
130
132
|
[e.focused]: _
|
131
133
|
},
|
132
|
-
|
134
|
+
g
|
133
135
|
),
|
134
136
|
children: [
|
135
|
-
u && /* @__PURE__ */ B("label", { htmlFor: F, className:
|
137
|
+
u && /* @__PURE__ */ B("label", { htmlFor: F, className: U, children: [
|
136
138
|
u,
|
137
|
-
|
139
|
+
v && (b || _) && /* @__PURE__ */ c(
|
138
140
|
"span",
|
139
141
|
{
|
140
142
|
className: e["required-mark"],
|
@@ -142,39 +144,39 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
|
|
142
144
|
}
|
143
145
|
)
|
144
146
|
] }),
|
145
|
-
|
147
|
+
h && /* @__PURE__ */ c(
|
146
148
|
"span",
|
147
149
|
{
|
148
|
-
className:
|
150
|
+
className: o(e["left-slot"], {
|
149
151
|
[e.focused]: q,
|
150
152
|
[e["has-label"]]: !!u,
|
151
153
|
[e.disabled]: s
|
152
154
|
}),
|
153
|
-
children:
|
155
|
+
children: h
|
154
156
|
}
|
155
157
|
),
|
156
|
-
/* @__PURE__ */
|
158
|
+
/* @__PURE__ */ c(
|
157
159
|
"input",
|
158
160
|
{
|
159
|
-
ref:
|
160
|
-
type:
|
161
|
+
ref: P,
|
162
|
+
type: E,
|
161
163
|
id: F,
|
162
|
-
className:
|
163
|
-
onFocus:
|
164
|
-
onBlur:
|
165
|
-
readOnly:
|
166
|
-
value:
|
167
|
-
onChange:
|
168
|
-
maxLength:
|
164
|
+
className: X,
|
165
|
+
onFocus: H,
|
166
|
+
onBlur: W,
|
167
|
+
readOnly: n,
|
168
|
+
value: a,
|
169
|
+
onChange: K,
|
170
|
+
maxLength: w,
|
169
171
|
disabled: s,
|
170
|
-
required:
|
171
|
-
...
|
172
|
+
required: v,
|
173
|
+
...G
|
172
174
|
}
|
173
175
|
),
|
174
|
-
k && /* @__PURE__ */
|
176
|
+
k && /* @__PURE__ */ c(
|
175
177
|
"span",
|
176
178
|
{
|
177
|
-
className:
|
179
|
+
className: o(e["right-slot"], j, {
|
178
180
|
[e.focused]: q,
|
179
181
|
[e["has-label"]]: !!u,
|
180
182
|
[e.disabled]: s
|
@@ -182,30 +184,30 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
|
|
182
184
|
children: k
|
183
185
|
}
|
184
186
|
),
|
185
|
-
|
187
|
+
v && !b && !_ && /* @__PURE__ */ c(
|
186
188
|
"span",
|
187
189
|
{
|
188
|
-
className:
|
190
|
+
className: o(
|
189
191
|
e["required-mark"],
|
190
|
-
|
192
|
+
D
|
191
193
|
),
|
192
194
|
"data-testid": "required-mark"
|
193
195
|
}
|
194
196
|
),
|
195
|
-
|
197
|
+
M && b && /* @__PURE__ */ c(
|
196
198
|
le,
|
197
199
|
{
|
198
200
|
tabIndex: -1,
|
199
|
-
className:
|
201
|
+
className: o(e.clear, {
|
200
202
|
[e.disabled]: s
|
201
203
|
}),
|
202
204
|
isIconButton: !0,
|
203
205
|
iconName: "Close16px",
|
204
206
|
size: "m-s",
|
205
207
|
clear: !0,
|
206
|
-
disabled: s ||
|
208
|
+
disabled: s || n,
|
207
209
|
variant: "secondary-gray",
|
208
|
-
onClick:
|
210
|
+
onClick: J,
|
209
211
|
"data-testid": "clear-button"
|
210
212
|
}
|
211
213
|
)
|
package/dist/assets/TextArea.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._textarea-
|
1
|
+
._textarea-wrapper_rmhew_2 ._textarea_rmhew_2{min-height:var(--textarea-height);padding-top:var(--textarea-space)!important;padding-bottom:var(--textarea-space);resize:none}._textarea-wrapper_rmhew_2 ._textarea_rmhew_2._has-label_rmhew_8{padding-top:var(--textarea-top-space)!important}._textarea-wrapper_rmhew_2 ._required-mark_rmhew_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(--textarea-space);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._textarea-wrapper_rmhew_2 ._label_rmhew_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,left .15s ease-out,color .15s ease-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}._textarea-wrapper_rmhew_2 ._label_rmhew_22._has-left-slot_rmhew_37{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40{font-size:var(--label-font-size-active);transform:translateY(calc(var(--label-font-size-active) * -1))}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40._has-left-slot_rmhew_37{left:var(--mimir-space-m)}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40 ._required-mark_rmhew_11{align-self:center;margin-top:0;margin-left:0}._s_rmhew_53{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 76px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._m_rmhew_60{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 88px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._l_rmhew_22{--textarea-space: var(--mimir-space-2m);--textarea-top-space: 25px;--textarea-height: 120px;--textarea-padding: var(--mimir-space-2m)}
|
@@ -9,7 +9,7 @@ import { formatDatePart as Y } from "./utils.js";
|
|
9
9
|
import { YearPickerModal as et } from "./YearPickerModal.js";
|
10
10
|
import { useClickOutside as it } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
11
|
import { formating as d } from "../../utils/index.js";
|
12
|
-
import { I as at } from "../../Input-
|
12
|
+
import { I as at } from "../../Input-WnjLXNpw.js";
|
13
13
|
import { EInputStatus as rt } from "../Input/constants.js";
|
14
14
|
const mt = {
|
15
15
|
days: tt,
|
@@ -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-WnjLXNpw.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-WnjLXNpw.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-WnjLXNpw.js";
|
5
5
|
const h = I(
|
6
6
|
i(
|
7
7
|
({ value: s = "", onChange: e, ...p }, a) => {
|
@@ -7,7 +7,7 @@ import { Icon as re } from "../../icons/Icon.js";
|
|
7
7
|
import { Button as ce } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as ae } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as ue } from "../Chip/Chip.js";
|
10
|
-
import { I as j } from "../../Input-
|
10
|
+
import { I as j } from "../../Input-WnjLXNpw.js";
|
11
11
|
import { EInputVariant as de } from "../Input/constants.js";
|
12
12
|
import { H as pe, U as G, G as W, K as me, W as _e } from "../../combobox-CDU06zJj.js";
|
13
13
|
import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe = "_container_17kql_9", ke = "_full_17kql_27", qe = "_button_17kql_39", ge = "_options_17kql_53", be = "_top_17kql_64", ve = "_bottom_17kql_69", Ne = "_m_17kql_2", Ie = "_l_17kql_111", we = "_focused_17kql_129", Ce = "_option_17kql_53", Se = "_chip_17kql_158", Me = "_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-WnjLXNpw.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",
|
@@ -5,7 +5,7 @@ import { ESelectSearchSize as v } from "./constants.js";
|
|
5
5
|
import { mapSizeToInputSize as D, getDropdownArrowIcon as R } from "./utils.js";
|
6
6
|
import { Icon as q } from "../../icons/Icon.js";
|
7
7
|
import { Button as $ } from "../Button/Button.js";
|
8
|
-
import { I as A } from "../../Input-
|
8
|
+
import { I as A } from "../../Input-WnjLXNpw.js";
|
9
9
|
import { EInputVariant as J } from "../Input/constants.js";
|
10
10
|
import { H as Q, U as B, G as M, K as X, W as Y } from "../../combobox-CDU06zJj.js";
|
11
11
|
import '../../assets/SelectSearch.css';const Z = "_disabled_rphak_5", ee = "_container_rphak_9", te = "_full_rphak_22", oe = "_button_rphak_34", ae = "_options_rphak_48", ne = "_top_rphak_59", se = "_bottom_rphak_64", re = "_m_rphak_91", ie = "_l_rphak_106", le = "_option_rphak_48", ce = "_clear_rphak_160", e = {
|
@@ -1,36 +1,36 @@
|
|
1
|
-
import { jsxs as V, jsx as
|
1
|
+
import { jsxs as V, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { c as i } from "../../index-DIxK0V-G.js";
|
3
3
|
import { memo as K, forwardRef as Q, useState as B, useRef as U, useEffect as X } from "react";
|
4
4
|
import { useAutoResizeTextArea as Y } from "./hooks.js";
|
5
5
|
import { useMergeRefs as Z } from "../../hooks/useMergeRefs/useMergeRefs.js";
|
6
6
|
import { Icon as $ } from "../../icons/Icon.js";
|
7
7
|
import { Button as ee } from "../Button/Button.js";
|
8
|
-
import { c as e } from "../../Input-
|
8
|
+
import { c as e } from "../../Input-WnjLXNpw.js";
|
9
9
|
import { EInputVariant as ae } from "../Input/constants.js";
|
10
|
-
import '../../assets/TextArea.css';const te = "
|
11
|
-
"textarea-wrapper": "_textarea-
|
10
|
+
import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_rmhew_22", re = "_s_rmhew_53", le = "_m_rmhew_60", oe = "_l_rmhew_22", a = {
|
11
|
+
"textarea-wrapper": "_textarea-wrapper_rmhew_2",
|
12
12
|
textarea: te,
|
13
|
-
"has-label": "_has-
|
14
|
-
"required-mark": "_required-
|
13
|
+
"has-label": "_has-label_rmhew_8",
|
14
|
+
"required-mark": "_required-mark_rmhew_11",
|
15
15
|
label: se,
|
16
|
-
"has-left-slot": "_has-left-
|
17
|
-
"active-label": "_active-
|
16
|
+
"has-left-slot": "_has-left-slot_rmhew_37",
|
17
|
+
"active-label": "_active-label_rmhew_40",
|
18
18
|
s: re,
|
19
19
|
m: le,
|
20
|
-
l:
|
20
|
+
l: oe
|
21
21
|
}, F = (t) => {
|
22
|
-
var
|
22
|
+
var f, n;
|
23
23
|
if (!t)
|
24
24
|
return null;
|
25
25
|
switch (t.addonType) {
|
26
26
|
case "icon": {
|
27
|
-
const
|
28
|
-
return /* @__PURE__ */
|
27
|
+
const p = (f = t.addonContent) == null ? void 0 : f.includes("16px"), b = (n = t.addonContent) == null ? void 0 : n.includes("24px");
|
28
|
+
return /* @__PURE__ */ o(
|
29
29
|
$,
|
30
30
|
{
|
31
31
|
style: {
|
32
32
|
"--icon-size": i({
|
33
|
-
"16px":
|
33
|
+
"16px": p,
|
34
34
|
"24px": b
|
35
35
|
})
|
36
36
|
},
|
@@ -44,20 +44,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
44
44
|
default:
|
45
45
|
return null;
|
46
46
|
}
|
47
|
-
},
|
47
|
+
}, ne = K(
|
48
48
|
Q(
|
49
|
-
(t,
|
49
|
+
(t, f) => {
|
50
50
|
const {
|
51
|
-
value:
|
52
|
-
className:
|
51
|
+
value: n,
|
52
|
+
className: p,
|
53
53
|
wrapperClassName: b,
|
54
|
-
variant:
|
55
|
-
autofocus:
|
54
|
+
variant: R = ae.DefaultGray,
|
55
|
+
autofocus: w,
|
56
56
|
readonly: s,
|
57
|
-
status:
|
58
|
-
id:
|
57
|
+
status: T,
|
58
|
+
id: z,
|
59
59
|
onFocus: N,
|
60
|
-
onBlur:
|
60
|
+
onBlur: g,
|
61
61
|
label: d,
|
62
62
|
onChange: c,
|
63
63
|
withClearButton: j,
|
@@ -65,47 +65,47 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
65
65
|
rightAddon: E,
|
66
66
|
leftAddon: L,
|
67
67
|
size: m = "m",
|
68
|
-
required:
|
68
|
+
required: C,
|
69
69
|
...D
|
70
|
-
} = t, [
|
70
|
+
} = t, [h, v] = B(w), [_, A] = B(!!n), r = U(null), G = Z(r, f);
|
71
71
|
X(() => {
|
72
|
-
|
73
|
-
}, [
|
72
|
+
w && v(!0);
|
73
|
+
}, [w]);
|
74
74
|
const I = Y(r.current), M = (l) => {
|
75
|
-
const
|
76
|
-
|
75
|
+
const q = l.currentTarget.value;
|
76
|
+
g == null || g(l), v(!1), A(!!q);
|
77
77
|
}, O = (l) => {
|
78
|
-
s || (
|
78
|
+
s || (v(!0), N == null || N(l));
|
79
79
|
}, P = () => {
|
80
|
-
r != null && r.current && (r.current.value = "", r.current.focus(),
|
80
|
+
r != null && r.current && (r.current.value = "", r.current.focus(), A(!1), I(), c == null || c({
|
81
81
|
target: { value: "" }
|
82
82
|
}));
|
83
83
|
}, S = (l) => {
|
84
|
-
const
|
85
|
-
|
86
|
-
}, x = F(L),
|
84
|
+
const q = l.target.value;
|
85
|
+
A(!!q), I(), c == null || c(l);
|
86
|
+
}, x = F(L), y = F(E), W = {
|
87
87
|
[e.readonly]: u || s,
|
88
|
-
[e.focused]:
|
88
|
+
[e.focused]: h,
|
89
89
|
[e.disabled]: u || s,
|
90
90
|
[e["has-left-slot"]]: !!x,
|
91
|
-
[e["has-right-slot"]]: !!
|
91
|
+
[e["has-right-slot"]]: !!y,
|
92
92
|
[a["has-label"]]: !!d
|
93
|
-
},
|
93
|
+
}, k = h || _ || !!n, H = i(
|
94
94
|
e.label,
|
95
95
|
a.label,
|
96
96
|
{
|
97
|
-
[a["active-label"]]:
|
97
|
+
[a["active-label"]]: k,
|
98
98
|
[e.disabled]: u || s,
|
99
99
|
[a["has-left-slot"]]: !!x
|
100
100
|
},
|
101
|
-
|
101
|
+
p,
|
102
102
|
e[m]
|
103
103
|
), J = i(
|
104
104
|
a.textarea,
|
105
105
|
e.input,
|
106
106
|
W,
|
107
|
-
|
108
|
-
[e[
|
107
|
+
p,
|
108
|
+
[e[R], a[m], e[m], e[T ?? ""]]
|
109
109
|
);
|
110
110
|
return /* @__PURE__ */ V(
|
111
111
|
"div",
|
@@ -113,20 +113,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
113
113
|
className: i(
|
114
114
|
e["input-wrapper"],
|
115
115
|
a["textarea-wrapper"],
|
116
|
-
e[
|
117
|
-
e[
|
116
|
+
e[R],
|
117
|
+
e[T ?? ""],
|
118
118
|
a[m],
|
119
119
|
e[m],
|
120
120
|
{
|
121
121
|
[e.disabled]: u || s,
|
122
|
-
[e.focused]:
|
122
|
+
[e.focused]: h
|
123
123
|
},
|
124
124
|
b
|
125
125
|
),
|
126
126
|
children: [
|
127
|
-
d && /* @__PURE__ */ V("label", { htmlFor:
|
127
|
+
d && /* @__PURE__ */ V("label", { htmlFor: z, className: H, children: [
|
128
128
|
d,
|
129
|
-
|
129
|
+
C && (_ || h) && /* @__PURE__ */ o(
|
130
130
|
"span",
|
131
131
|
{
|
132
132
|
className: a["required-mark"],
|
@@ -134,51 +134,51 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
134
134
|
}
|
135
135
|
)
|
136
136
|
] }),
|
137
|
-
x && /* @__PURE__ */
|
137
|
+
x && /* @__PURE__ */ o(
|
138
138
|
"span",
|
139
139
|
{
|
140
140
|
className: i(e["left-slot"], {
|
141
|
-
[e.focused]:
|
141
|
+
[e.focused]: k,
|
142
142
|
[e["has-label"]]: !!d
|
143
143
|
}),
|
144
144
|
"data-testid": "left-addon",
|
145
145
|
children: x
|
146
146
|
}
|
147
147
|
),
|
148
|
-
/* @__PURE__ */
|
148
|
+
/* @__PURE__ */ o(
|
149
149
|
"textarea",
|
150
150
|
{
|
151
151
|
ref: G,
|
152
|
-
id:
|
152
|
+
id: z,
|
153
153
|
className: J,
|
154
154
|
onFocus: O,
|
155
155
|
onBlur: M,
|
156
156
|
readOnly: s,
|
157
|
-
value:
|
157
|
+
value: n,
|
158
158
|
onChange: S,
|
159
|
-
required:
|
159
|
+
required: C,
|
160
160
|
...D
|
161
161
|
}
|
162
162
|
),
|
163
|
-
|
163
|
+
y && /* @__PURE__ */ o(
|
164
164
|
"span",
|
165
165
|
{
|
166
166
|
className: i(e["right-slot"], {
|
167
|
-
[e.focused]:
|
167
|
+
[e.focused]: k,
|
168
168
|
[e["has-label"]]: !!d
|
169
169
|
}),
|
170
170
|
"data-testid": "right-addon",
|
171
|
-
children:
|
171
|
+
children: y
|
172
172
|
}
|
173
173
|
),
|
174
|
-
|
174
|
+
C && !_ && !h && /* @__PURE__ */ o(
|
175
175
|
"span",
|
176
176
|
{
|
177
177
|
className: a["required-mark"],
|
178
178
|
"data-testid": "required-mark"
|
179
179
|
}
|
180
180
|
),
|
181
|
-
j &&
|
181
|
+
j && _ && /* @__PURE__ */ o(
|
182
182
|
ee,
|
183
183
|
{
|
184
184
|
tabIndex: -1,
|
@@ -198,7 +198,7 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
|
|
198
198
|
}
|
199
199
|
)
|
200
200
|
);
|
201
|
-
|
201
|
+
ne.displayName = "TextArea";
|
202
202
|
export {
|
203
|
-
|
203
|
+
ne as TextArea
|
204
204
|
};
|
package/dist/components/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Button as e } from "./Button/Button.js";
|
2
2
|
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as i, EButtonVariantDefault as m, EButtonVariantOutline as f, EButtonVariantRound as x } from "./Button/constants.js";
|
3
|
-
import { I as S } from "../Input-
|
3
|
+
import { I as S } from "../Input-WnjLXNpw.js";
|
4
4
|
import { EInputSize as u, EInputStatus as l, EInputVariant as s } from "./Input/constants.js";
|
5
5
|
import { TextArea as c } from "./TextArea/TextArea.js";
|
6
6
|
import { InputPassword as I } from "./InputPassword/InputPassword.js";
|
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Button as e } from "./components/Button/Button.js";
|
2
2
|
import { EButtonForm as p, EButtonSize as a, EButtonVariantBorderless as m, EButtonVariantDefault as f, EButtonVariantOutline as i, EButtonVariantRound as x } from "./components/Button/constants.js";
|
3
|
-
import { I as u } from "./Input-
|
3
|
+
import { I as u } from "./Input-WnjLXNpw.js";
|
4
4
|
import { EInputSize as S, EInputStatus as E, EInputVariant as l } from "./components/Input/constants.js";
|
5
5
|
import { TextArea as c } from "./components/TextArea/TextArea.js";
|
6
6
|
import { InputPassword as I } from "./components/InputPassword/InputPassword.js";
|