welcome-ui 8.1.0 → 8.2.0-alpha.0
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/Alert.mjs +28 -28
- package/dist/Avatar.mjs +47 -44
- package/dist/Breadcrumb.mjs +169 -167
- package/dist/ButtonGroup.mjs +14 -14
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomPopper-B2Cqfph4.mjs → CustomPopper-DezjKb9n.mjs} +12 -17
- package/dist/DatePicker.mjs +74 -74
- package/dist/DateTimePicker.mjs +60 -59
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +51 -55
- package/dist/DropdownMenu.mjs +183 -183
- package/dist/Field.mjs +9 -10
- package/dist/FileDrop.mjs +455 -465
- package/dist/FileUpload.mjs +74 -81
- package/dist/Files.mjs +15 -15
- package/dist/InputText.mjs +42 -42
- package/dist/Label.mjs +1 -1
- package/dist/Modal.mjs +115 -119
- package/dist/Pagination.mjs +31 -29
- package/dist/PasswordInput.mjs +9 -9
- package/dist/Picker.mjs +23 -23
- package/dist/Radio.mjs +35 -35
- package/dist/RadioTab.mjs +1 -1
- package/dist/Search.mjs +123 -127
- package/dist/Select.mjs +301 -318
- package/dist/Slider.mjs +228 -224
- package/dist/Stack.mjs +15 -12
- package/dist/Swiper.mjs +126 -127
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +19 -19
- package/dist/Text.mjs +35 -37
- package/dist/Textarea.mjs +1 -1
- package/dist/TimePicker.mjs +61 -61
- package/dist/Toast.mjs +3 -3
- package/dist/Toggle.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/VariantIcon.mjs +14 -5
- package/dist/WuiProvider.mjs +35 -38
- package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
- package/dist/{index-5HBq1O6Z.mjs → index-62h-enZF.mjs} +31 -31
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/theme.mjs +23 -23
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Accordion/theme.d.ts +1 -1
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +3 -3
- package/dist/types/components/AspectRatio/styles.d.ts +2 -3
- package/dist/types/components/Avatar/index.d.ts +2 -1
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +2 -2
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/styles.d.ts +4 -4
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/ButtonGroup/index.d.ts +2 -2
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/styles.d.ts +1 -1
- package/dist/types/components/Checkbox/theme.d.ts +1 -1
- package/dist/types/components/ClearButton/index.d.ts +4 -4
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +5 -5
- package/dist/types/components/Drawer/styles.d.ts +4 -4
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +4 -4
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +2 -2
- package/dist/types/components/Files/index.d.ts +3 -3
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/theme.d.ts +2 -2
- package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +2 -2
- package/dist/types/components/Link/styles.d.ts +4 -4
- package/dist/types/components/Link/theme.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -4
- package/dist/types/components/Modal/Assets/index.d.ts +8 -8
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +2 -2
- package/dist/types/components/Modal/Content.d.ts +5 -3
- package/dist/types/components/Modal/index.d.ts +10 -10
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Picker/index.d.ts +1 -1
- package/dist/types/components/Picker/styles.d.ts +1 -1
- package/dist/types/components/Popover/styles.d.ts +4 -4
- package/dist/types/components/Popover/theme.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +2 -2
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/RadioTab/styles.d.ts +10 -4
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +4 -4
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -8
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +1 -1
- package/dist/types/components/Swiper/styles.d.ts +16 -16
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +6 -6
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +2 -2
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +14 -14
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/styles.d.ts +4 -5
- package/dist/types/components/Toggle/theme.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/Tooltip/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/components/WuiProvider/font.d.ts +5 -3
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +9 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
- package/dist/utils.mjs +29 -102
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +2 -2
- package/dist/throttle-CW18pWlW.mjs +0 -13
- package/dist/wrap-children-DBSD-X5-.mjs +0 -9
package/dist/FileUpload.mjs
CHANGED
|
@@ -1,109 +1,102 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { getFileIcon as
|
|
7
|
-
import { shouldForwardProp as
|
|
8
|
-
import { Tag as
|
|
9
|
-
import { c as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
2
|
+
import { j as r } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { useState as T, useRef as b, useEffect as U } from "react";
|
|
4
|
+
import { Box as z } from "./Box.mjs";
|
|
5
|
+
import { Button as D } from "./Button.mjs";
|
|
6
|
+
import { getFileIcon as C, getFileName as N, getFileSize as O } from "./Files.mjs";
|
|
7
|
+
import { shouldForwardProp as P, forwardRef as K } from "./System.mjs";
|
|
8
|
+
import { Tag as M } from "./Tag.mjs";
|
|
9
|
+
import { c as L } from "./create-event-rXDe5aCQ.mjs";
|
|
10
|
+
import X from "@xstyled/styled-components";
|
|
11
|
+
const Y = X.inputBox.withConfig({ shouldForwardProp: P })`
|
|
12
12
|
display: none;
|
|
13
|
-
`,
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
u ? /* @__PURE__ */
|
|
13
|
+
`, Z = 2e6, q = "*/*", h = (e) => Array.isArray(e) ? e : e ? [e] : [], G = ({ file: e, onRemove: p }) => {
|
|
14
|
+
const l = C(e), n = N(e), u = O(e);
|
|
15
|
+
return /* @__PURE__ */ r.jsxs(M, { "data-id": n, mr: "sm", mt: "sm", onRemove: p, children: [
|
|
16
|
+
/* @__PURE__ */ r.jsx(l, { size: "md" }),
|
|
17
|
+
n,
|
|
18
|
+
u ? /* @__PURE__ */ r.jsxs(z, { color: "beige-60", children: [
|
|
19
19
|
"(",
|
|
20
20
|
u,
|
|
21
21
|
")"
|
|
22
22
|
] }) : null
|
|
23
|
-
] },
|
|
24
|
-
},
|
|
23
|
+
] }, n);
|
|
24
|
+
}, H = K(
|
|
25
25
|
({
|
|
26
|
-
accept:
|
|
27
|
-
children:
|
|
28
|
-
dataTestId:
|
|
29
|
-
disabled:
|
|
26
|
+
accept: e = q,
|
|
27
|
+
children: p,
|
|
28
|
+
dataTestId: l,
|
|
29
|
+
disabled: n,
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
31
|
draggable: u,
|
|
32
|
-
handleAddFile:
|
|
33
|
-
handleRemoveFile:
|
|
34
|
-
maxSize:
|
|
35
|
-
multiple:
|
|
36
|
-
name:
|
|
37
|
-
onBlur:
|
|
38
|
-
onChange:
|
|
32
|
+
handleAddFile: x,
|
|
33
|
+
handleRemoveFile: g,
|
|
34
|
+
maxSize: A = Z,
|
|
35
|
+
multiple: y,
|
|
36
|
+
name: f,
|
|
37
|
+
onBlur: c,
|
|
38
|
+
onChange: a,
|
|
39
39
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
onError:
|
|
41
|
-
preview:
|
|
42
|
-
value:
|
|
43
|
-
...
|
|
44
|
-
},
|
|
45
|
-
const [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const S = (t) => {
|
|
54
|
-
let s = Array.from(t.target.files || []).map(
|
|
40
|
+
onError: J,
|
|
41
|
+
preview: E = G,
|
|
42
|
+
value: F = [],
|
|
43
|
+
...I
|
|
44
|
+
}, i) => {
|
|
45
|
+
const [s, d] = T(h(F)), R = b();
|
|
46
|
+
U(() => {
|
|
47
|
+
d(h(F));
|
|
48
|
+
}, [F]), U(() => () => {
|
|
49
|
+
s && s.map((t) => t instanceof File ? URL.revokeObjectURL(t.preview) : t);
|
|
50
|
+
}, [s]);
|
|
51
|
+
const _ = (t) => {
|
|
52
|
+
let o = Array.from(t.target.files).map(
|
|
55
53
|
(m) => (m.preview = URL.createObjectURL(m), m)
|
|
56
54
|
);
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
const m =
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
openFile: I
|
|
74
|
-
}) : /* @__PURE__ */ e.jsx(N, { disabled: o, onClick: I, children: "Upload file" }),
|
|
75
|
-
/* @__PURE__ */ e.jsx("br", {}),
|
|
76
|
-
/* @__PURE__ */ e.jsx(
|
|
77
|
-
q,
|
|
55
|
+
d(o), o.length === 1 && (o = o[0]);
|
|
56
|
+
const j = L({ name: f, value: o });
|
|
57
|
+
a && a(j), x && x(o), c && c();
|
|
58
|
+
}, v = (t) => {
|
|
59
|
+
const o = s.filter((S) => S !== t), j = y ? o : void 0;
|
|
60
|
+
d(o);
|
|
61
|
+
const m = L({ name: f, value: j });
|
|
62
|
+
a && a(m), g && g(t), c && c();
|
|
63
|
+
}, w = () => {
|
|
64
|
+
R.current.click();
|
|
65
|
+
}, k = s.map((t) => t instanceof File ? t.preview : void 0).join("");
|
|
66
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
67
|
+
p ? p({ disabled: n, files: s, onRemoveFile: v, openFile: w }) : /* @__PURE__ */ r.jsx(D, { disabled: n, onClick: w, children: "Upload file" }),
|
|
68
|
+
/* @__PURE__ */ r.jsx("br", {}),
|
|
69
|
+
/* @__PURE__ */ r.jsx(
|
|
70
|
+
Y,
|
|
78
71
|
{
|
|
79
|
-
accept:
|
|
80
|
-
"data-testid":
|
|
81
|
-
disabled:
|
|
82
|
-
maxSize:
|
|
83
|
-
multiple:
|
|
84
|
-
name:
|
|
85
|
-
onBlur:
|
|
86
|
-
onChange:
|
|
72
|
+
accept: e,
|
|
73
|
+
"data-testid": l,
|
|
74
|
+
disabled: n,
|
|
75
|
+
maxSize: A,
|
|
76
|
+
multiple: y,
|
|
77
|
+
name: f,
|
|
78
|
+
onBlur: c,
|
|
79
|
+
onChange: _,
|
|
87
80
|
ref: (t) => {
|
|
88
|
-
|
|
81
|
+
R.current = t, typeof i == "function" ? i(t) : i != null && i.current && (i.current = t);
|
|
89
82
|
},
|
|
90
|
-
...
|
|
83
|
+
...I,
|
|
91
84
|
type: "file"
|
|
92
85
|
},
|
|
93
|
-
|
|
86
|
+
k
|
|
94
87
|
),
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
E ? s.map((t) => /* @__PURE__ */ r.jsx(
|
|
89
|
+
E,
|
|
97
90
|
{
|
|
98
91
|
file: t,
|
|
99
|
-
onRemove: () =>
|
|
92
|
+
onRemove: () => v(t)
|
|
100
93
|
},
|
|
101
94
|
t instanceof File ? t.name : t
|
|
102
95
|
)) : null
|
|
103
96
|
] });
|
|
104
97
|
}
|
|
105
98
|
);
|
|
106
|
-
|
|
99
|
+
H.displayName = "FileUpload";
|
|
107
100
|
export {
|
|
108
|
-
|
|
101
|
+
H as FileUpload
|
|
109
102
|
};
|
package/dist/Files.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
3
|
import "./Icon.mjs";
|
|
4
|
-
import { A as
|
|
5
|
-
import { f
|
|
6
|
-
const
|
|
4
|
+
import { A as e, C as o, M as t, V as n, a as m, D as c, X as s, P as r, b as d, c as l, d as g, Z as u } from "./index-i_anpNhw.mjs";
|
|
5
|
+
import { f } from "./format-bytes-gST0dTWd.mjs";
|
|
6
|
+
const x = {
|
|
7
7
|
"7z": "application/x-7z-compressed",
|
|
8
8
|
aac: "audio/aac",
|
|
9
9
|
aif: "audio/x-aiff",
|
|
@@ -69,15 +69,15 @@ const f = {
|
|
|
69
69
|
xwd: "image/x-xwindowdump",
|
|
70
70
|
zip: "application/zip"
|
|
71
71
|
};
|
|
72
|
-
function j(i,
|
|
72
|
+
function j(i, p) {
|
|
73
73
|
const a = b(i);
|
|
74
|
-
if (!
|
|
75
|
-
return
|
|
76
|
-
if (
|
|
74
|
+
if (!p && !a)
|
|
75
|
+
return e;
|
|
76
|
+
if (p === "image" || a && a.startsWith("image/"))
|
|
77
77
|
return o;
|
|
78
|
-
if (
|
|
78
|
+
if (p === "audio" || a && a.startsWith("audio/"))
|
|
79
79
|
return t;
|
|
80
|
-
if (
|
|
80
|
+
if (p === "video" || a && a.startsWith("video/"))
|
|
81
81
|
return n;
|
|
82
82
|
switch (a) {
|
|
83
83
|
case "application/gzip":
|
|
@@ -97,25 +97,25 @@ function j(i, e) {
|
|
|
97
97
|
case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
|
|
98
98
|
return r;
|
|
99
99
|
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
|
|
100
|
-
return c;
|
|
101
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
|
|
102
100
|
return s;
|
|
101
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
|
|
102
|
+
return c;
|
|
103
103
|
case "text/csv":
|
|
104
104
|
return m;
|
|
105
105
|
default:
|
|
106
|
-
return
|
|
106
|
+
return e;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function v(i) {
|
|
110
110
|
return typeof i == "string" ? w(i).split("/").pop() : i.name;
|
|
111
111
|
}
|
|
112
112
|
function q(i) {
|
|
113
|
-
return i instanceof File && i.size ?
|
|
113
|
+
return i instanceof File && i.size ? f(i.size, 0) : null;
|
|
114
114
|
}
|
|
115
115
|
function b(i) {
|
|
116
116
|
if (typeof i == "string") {
|
|
117
|
-
const
|
|
118
|
-
return
|
|
117
|
+
const p = v(i).split(".").pop();
|
|
118
|
+
return x[p] || null;
|
|
119
119
|
} else
|
|
120
120
|
return i.type;
|
|
121
121
|
}
|
package/dist/InputText.mjs
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as o } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import
|
|
3
|
+
import u from "react";
|
|
4
4
|
import { Box as _ } from "./Box.mjs";
|
|
5
5
|
import { ClearButton as y } from "./ClearButton.mjs";
|
|
6
6
|
import { IconWrapper as S, IconGroupWrapper as T } from "./Field.mjs";
|
|
7
|
-
import { shouldForwardProp as
|
|
8
|
-
import { c as
|
|
9
|
-
import { d as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
({ iconPlacement:
|
|
13
|
-
${
|
|
14
|
-
iconPlacement:
|
|
15
|
-
isClearable:
|
|
7
|
+
import { shouldForwardProp as g, forwardRef as N } from "./System.mjs";
|
|
8
|
+
import { c as W } from "./create-event-rXDe5aCQ.mjs";
|
|
9
|
+
import { d as $, F as k } from "./field-styles-CfVLcVQp.mjs";
|
|
10
|
+
import A, { css as C } from "@xstyled/styled-components";
|
|
11
|
+
const D = A.inputBox.withConfig({ shouldForwardProp: g })(
|
|
12
|
+
({ iconPlacement: e, isClearable: p, size: i, transparent: t, variant: r }) => C`
|
|
13
|
+
${$({
|
|
14
|
+
iconPlacement: e,
|
|
15
|
+
isClearable: p,
|
|
16
16
|
size: i,
|
|
17
17
|
transparent: t,
|
|
18
18
|
variant: r
|
|
19
19
|
})};
|
|
20
20
|
text-overflow: ellipsis;
|
|
21
21
|
`
|
|
22
|
-
),
|
|
22
|
+
), G = N(
|
|
23
23
|
({
|
|
24
|
-
autoFocus:
|
|
25
|
-
dataTestId:
|
|
24
|
+
autoFocus: e,
|
|
25
|
+
dataTestId: p,
|
|
26
26
|
disabled: i,
|
|
27
27
|
icon: t,
|
|
28
28
|
iconPlacement: r = "left",
|
|
29
|
-
isClearable:
|
|
30
|
-
name:
|
|
29
|
+
isClearable: l,
|
|
30
|
+
name: n,
|
|
31
31
|
onBlur: x,
|
|
32
|
-
onChange:
|
|
32
|
+
onChange: d,
|
|
33
33
|
onFocus: c,
|
|
34
|
-
onKeyDown:
|
|
35
|
-
placeholder:
|
|
36
|
-
size:
|
|
37
|
-
transparent:
|
|
38
|
-
type:
|
|
34
|
+
onKeyDown: a,
|
|
35
|
+
placeholder: I,
|
|
36
|
+
size: m = "md",
|
|
37
|
+
transparent: h,
|
|
38
|
+
type: j = "text",
|
|
39
39
|
value: f,
|
|
40
40
|
variant: E,
|
|
41
41
|
...v
|
|
42
42
|
}, w) => {
|
|
43
|
-
const z =
|
|
44
|
-
const R =
|
|
45
|
-
name:
|
|
43
|
+
const z = l && r === "right", B = t && r, s = k[m], F = () => {
|
|
44
|
+
const R = W({
|
|
45
|
+
name: n,
|
|
46
46
|
value: ""
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
d && d(R);
|
|
49
49
|
};
|
|
50
50
|
return /* @__PURE__ */ o.jsxs(_, { position: "relative", children: [
|
|
51
51
|
/* @__PURE__ */ o.jsx(
|
|
52
|
-
|
|
52
|
+
D,
|
|
53
53
|
{
|
|
54
|
-
autoFocus:
|
|
55
|
-
"data-testid":
|
|
54
|
+
autoFocus: e,
|
|
55
|
+
"data-testid": p,
|
|
56
56
|
disabled: i,
|
|
57
57
|
iconPlacement: !!t && r,
|
|
58
|
-
id:
|
|
59
|
-
isClearable:
|
|
60
|
-
name:
|
|
58
|
+
id: n,
|
|
59
|
+
isClearable: l,
|
|
60
|
+
name: n,
|
|
61
61
|
onBlur: x,
|
|
62
|
-
onChange:
|
|
62
|
+
onChange: d,
|
|
63
63
|
onFocus: c,
|
|
64
|
-
onKeyDown:
|
|
65
|
-
placeholder:
|
|
64
|
+
onKeyDown: a,
|
|
65
|
+
placeholder: I,
|
|
66
66
|
ref: w,
|
|
67
|
-
size:
|
|
68
|
-
transparent:
|
|
69
|
-
type:
|
|
67
|
+
size: m,
|
|
68
|
+
transparent: h,
|
|
69
|
+
type: j,
|
|
70
70
|
value: f,
|
|
71
71
|
variant: E,
|
|
72
72
|
...v
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
B && !z ? /* @__PURE__ */ o.jsx(S, { iconPlacement: r, size:
|
|
76
|
-
|
|
75
|
+
B && !z ? /* @__PURE__ */ o.jsx(S, { iconPlacement: r, size: s, children: u.cloneElement(t, { ...t.props, size: s }) }) : null,
|
|
76
|
+
l ? /* @__PURE__ */ o.jsxs(T, { size: s, children: [
|
|
77
77
|
f ? /* @__PURE__ */ o.jsx(y, { onClick: F }) : null,
|
|
78
|
-
r === "right" &&
|
|
78
|
+
r === "right" && u.cloneElement(t, { ...t.props, size: s })
|
|
79
79
|
] }) : null
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
|
|
83
|
+
G.displayName = "InputText";
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
G as InputText
|
|
86
86
|
};
|
package/dist/Label.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import "./Icon.mjs";
|
|
|
4
4
|
import { L as u } from "./index-SQQQ4dEE.mjs";
|
|
5
5
|
import { shouldForwardProp as x, forwardRef as g } from "./System.mjs";
|
|
6
6
|
import { VariantIcon as w } from "./VariantIcon.mjs";
|
|
7
|
-
import { w as y } from "./wrap-children-
|
|
7
|
+
import { w as y } from "./wrap-children-CzmhoRzd.mjs";
|
|
8
8
|
import o, { th as b, css as l } from "@xstyled/styled-components";
|
|
9
9
|
const n = o.labelBox.withConfig({ shouldForwardProp: x })(
|
|
10
10
|
({ required: e }) => l`
|