welcome-ui 0.0.0-dev.1759252708223 → 0.0.0-dev.1759392523253
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/AspectRatio.css +1 -1
- package/dist/AspectRatio.js +13 -12
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +101 -124
- package/dist/Button.css +1 -1
- package/dist/Button.js +49 -49
- package/dist/Modal.css +1 -1
- package/dist/Modal.js +132 -174
- package/dist/Search.js +118 -125
- package/dist/Swiper.js +113 -119
- package/dist/theme.css +1 -1
- package/dist/throttle-BDBzFeFj.js +13 -0
- package/dist/types/components/AspectRatio/index.d.ts +1 -2
- package/dist/types/components/AspectRatio/types.d.ts +12 -3
- package/dist/types/components/Icon/index.d.ts +305 -0
- package/dist/types/components/Modal/components/Close.d.ts +2 -2
- package/dist/types/components/Modal/components/Content.d.ts +3 -5
- package/dist/types/components/Modal/index.d.ts +0 -1
- package/dist/types/components/Modal/types.d.ts +0 -5
- package/dist/types/old/components/Alert/styles.d.ts +4 -4
- package/dist/types/old/components/Avatar/styles.d.ts +4 -4
- package/dist/types/old/components/Card/Cover.styles.d.ts +2 -2
- package/dist/types/old/components/ClearButton/index.d.ts +2 -2
- package/dist/types/old/components/ClearButton/styles.d.ts +2 -2
- package/dist/types/old/components/CloseButton/styles.d.ts +2 -2
- package/dist/types/old/components/Drawer/styles.d.ts +2 -2
- package/dist/types/old/components/InputText/styles.d.ts +1 -1
- package/dist/types/old/components/Link/styles.d.ts +2 -2
- package/dist/types/old/components/Loader/styles.d.ts +2 -2
- package/dist/types/old/components/Modal/Assets/Backdrop.d.ts +2 -2
- package/dist/types/old/components/Modal/Assets/index.d.ts +4 -4
- package/dist/types/old/components/Modal/Assets/styles.d.ts +4 -4
- package/dist/types/old/components/Modal/index.d.ts +4 -4
- package/dist/types/old/components/Modal/styles.d.ts +4 -4
- package/dist/types/old/components/Radio/styles.d.ts +2 -2
- package/dist/types/old/components/Select/index.d.ts +2 -2
- package/dist/types/old/components/Select/styles.d.ts +2 -2
- package/dist/types/old/components/Shape/styles.d.ts +2 -2
- package/dist/types/old/components/Slider/styles.d.ts +10 -10
- package/dist/types/old/components/Swiper/styles.d.ts +2 -2
- package/dist/types/old/components/Toast/styles.d.ts +8 -8
- package/dist/types/theme/tokens.json.d.ts +378 -0
- package/dist/types/theme/types.d.ts +0 -10
- package/dist/types/theme/utils/parseTokens.d.ts +15 -0
- package/dist/types/theme/utils/parseTokens.test.d.ts +1 -0
- package/dist/types/utils/clamp.d.ts +1 -0
- package/dist/types/utils/use-screens.d.ts +2 -2
- package/package.json +4 -2
- package/dist/types/theme/tokens.d.ts +0 -307
package/dist/Search.js
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
3
|
-
import { D as
|
|
2
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
3
|
+
import { D as b, F as pe } from "./field-icon-size-Ch1t6GUH.js";
|
|
4
4
|
import _e, { forwardRef as de, useState as me, useCallback as he, useMemo as ue, Fragment as ze } from "react";
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (...k) => {
|
|
11
|
-
const s = () => {
|
|
12
|
-
u(...d), c = null;
|
|
13
|
-
};
|
|
14
|
-
d = k, c || (f && s(), c = setTimeout(s, z));
|
|
15
|
-
};
|
|
16
|
-
}, Ne = "_wrapper_1pzk6_2", xe = "_indicators_1pzk6_5", Ie = "_root_1pzk6_33", Re = "_transparent_1pzk6_81", Se = "_menu_1pzk6_170", ve = "_item_1pzk6_198", Ce = "_highlighted_1pzk6_212", Ee = "_selected_1pzk6_215", $e = {
|
|
5
|
+
import { CloseButton as ke } from "./CloseButton.js";
|
|
6
|
+
import { c as fe } from "./classNames-qiokGROM.js";
|
|
7
|
+
import { c as we } from "./create-event-rXDe5aCQ.js";
|
|
8
|
+
import { t as ge } from "./throttle-BDBzFeFj.js";
|
|
9
|
+
const Ne = "_wrapper_1pzk6_2", Ie = "_indicators_1pzk6_5", Re = "_root_1pzk6_33", Se = "_transparent_1pzk6_81", xe = "_menu_1pzk6_170", ve = "_item_1pzk6_198", Ce = "_highlighted_1pzk6_212", Ee = "_selected_1pzk6_215", $e = {
|
|
17
10
|
wrapper: Ne,
|
|
18
|
-
indicators:
|
|
11
|
+
indicators: Ie,
|
|
19
12
|
"dropdown-indicator": "_dropdown-indicator_1pzk6_14",
|
|
20
13
|
"input-wrapper": "_input-wrapper_1pzk6_27",
|
|
21
14
|
"icon-placement-right": "_icon-placement-right_1pzk6_30",
|
|
22
|
-
root:
|
|
15
|
+
root: Re,
|
|
23
16
|
"icon-placement-left": "_icon-placement-left_1pzk6_63",
|
|
24
|
-
transparent:
|
|
17
|
+
transparent: Se,
|
|
25
18
|
"variant-danger": "_variant-danger_1pzk6_94",
|
|
26
19
|
"variant-success": "_variant-success_1pzk6_98",
|
|
27
20
|
"variant-warning": "_variant-warning_1pzk6_102",
|
|
@@ -30,183 +23,183 @@ const we = (u, z, f = !0) => {
|
|
|
30
23
|
"size-sm": "_size-sm_1pzk6_122",
|
|
31
24
|
"size-xs": "_size-xs_1pzk6_130",
|
|
32
25
|
"icon-wrapper": "_icon-wrapper_1pzk6_139",
|
|
33
|
-
menu:
|
|
26
|
+
menu: xe,
|
|
34
27
|
item: ve,
|
|
35
28
|
highlighted: Ce,
|
|
36
29
|
selected: Ee
|
|
37
|
-
},
|
|
30
|
+
}, j = "", n = fe($e), De = b.default || b, Fe = de(
|
|
38
31
|
({
|
|
39
|
-
autoComplete:
|
|
40
|
-
autoFocus:
|
|
41
|
-
className:
|
|
42
|
-
dataTestId:
|
|
43
|
-
disabled:
|
|
44
|
-
groupsEnabled:
|
|
45
|
-
icon:
|
|
46
|
-
iconPlacement:
|
|
47
|
-
id:
|
|
48
|
-
itemToString:
|
|
49
|
-
minChars:
|
|
50
|
-
name:
|
|
51
|
-
onBlur:
|
|
52
|
-
onChange:
|
|
53
|
-
onClick:
|
|
54
|
-
onFocus:
|
|
55
|
-
placeholder:
|
|
56
|
-
renderGroupHeader:
|
|
57
|
-
renderItem:
|
|
58
|
-
search:
|
|
59
|
-
size:
|
|
60
|
-
throttle:
|
|
61
|
-
transparent:
|
|
62
|
-
value:
|
|
63
|
-
variant:
|
|
64
|
-
...
|
|
32
|
+
autoComplete: y = "off",
|
|
33
|
+
autoFocus: P,
|
|
34
|
+
className: V,
|
|
35
|
+
dataTestId: B,
|
|
36
|
+
disabled: F,
|
|
37
|
+
groupsEnabled: G,
|
|
38
|
+
icon: p,
|
|
39
|
+
iconPlacement: N = "left",
|
|
40
|
+
id: H,
|
|
41
|
+
itemToString: s,
|
|
42
|
+
minChars: m = 3,
|
|
43
|
+
name: I,
|
|
44
|
+
onBlur: L,
|
|
45
|
+
onChange: h,
|
|
46
|
+
onClick: Y,
|
|
47
|
+
onFocus: u,
|
|
48
|
+
placeholder: Z = "Search…",
|
|
49
|
+
renderGroupHeader: q,
|
|
50
|
+
renderItem: R,
|
|
51
|
+
search: S,
|
|
52
|
+
size: a = "md",
|
|
53
|
+
throttle: x = 500,
|
|
54
|
+
transparent: A,
|
|
55
|
+
value: _ = j,
|
|
56
|
+
variant: z,
|
|
57
|
+
...k
|
|
65
58
|
}, J) => {
|
|
66
|
-
const K =
|
|
59
|
+
const K = _ ? s(_) : j, [v, c] = me([]), C = he(
|
|
67
60
|
async (e) => {
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
|
|
61
|
+
if (m === 0 || (e == null ? void 0 : e.length) >= m) {
|
|
62
|
+
const o = await S(e);
|
|
63
|
+
c(o || []);
|
|
71
64
|
} else
|
|
72
|
-
|
|
65
|
+
c([]);
|
|
73
66
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
() =>
|
|
77
|
-
[
|
|
78
|
-
),
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
e ?
|
|
67
|
+
[m, S]
|
|
68
|
+
), E = ue(
|
|
69
|
+
() => ge(C, x, !1),
|
|
70
|
+
[C, x]
|
|
71
|
+
), f = (e) => {
|
|
72
|
+
const o = we({ name: I, value: e });
|
|
73
|
+
h == null || h(e, o);
|
|
74
|
+
}, $ = (e) => {
|
|
75
|
+
e ? f(e) : (f(), c([]));
|
|
83
76
|
};
|
|
84
77
|
return /* @__PURE__ */ t(
|
|
85
78
|
De,
|
|
86
79
|
{
|
|
87
80
|
initialInputValue: K,
|
|
88
|
-
itemToString: (e) =>
|
|
89
|
-
onInputValueChange:
|
|
81
|
+
itemToString: (e) => s(e) || "",
|
|
82
|
+
onInputValueChange: E,
|
|
90
83
|
onOuterClick: () => {
|
|
91
|
-
|
|
84
|
+
_ || $(), c([]);
|
|
92
85
|
},
|
|
93
|
-
onSelect:
|
|
94
|
-
selectedItem:
|
|
95
|
-
...
|
|
86
|
+
onSelect: $,
|
|
87
|
+
selectedItem: _,
|
|
88
|
+
...k,
|
|
96
89
|
children: ({
|
|
97
90
|
clearSelection: e,
|
|
98
|
-
getInputProps:
|
|
99
|
-
getItemProps:
|
|
91
|
+
getInputProps: o,
|
|
92
|
+
getItemProps: D,
|
|
100
93
|
getMenuProps: Q,
|
|
101
94
|
getRootProps: U,
|
|
102
95
|
highlightedIndex: W,
|
|
103
96
|
inputValue: X,
|
|
104
|
-
isOpen:
|
|
105
|
-
selectedItem:
|
|
97
|
+
isOpen: T,
|
|
98
|
+
selectedItem: d,
|
|
106
99
|
toggleMenu: ee
|
|
107
100
|
}) => {
|
|
108
101
|
const te = () => {
|
|
109
|
-
|
|
110
|
-
}, ne =
|
|
111
|
-
|
|
112
|
-
}, re = U(
|
|
113
|
-
autoComplete:
|
|
114
|
-
autoFocus:
|
|
115
|
-
"data-testid":
|
|
116
|
-
disabled:
|
|
117
|
-
id:
|
|
118
|
-
name:
|
|
119
|
-
onBlur:
|
|
120
|
-
onClick:
|
|
102
|
+
c([]), f(), e();
|
|
103
|
+
}, ne = T && v.length > 0, se = /* @__PURE__ */ t("div", { className: n("dropdown-indicator"), children: /* @__PURE__ */ t(ke, { animatePresence: !0, onClick: te, title: "Clear" }) }), ie = (i) => {
|
|
104
|
+
u == null || u(i), E(""), ee();
|
|
105
|
+
}, re = U(k, { suppressRefError: !0 }), ae = o({
|
|
106
|
+
autoComplete: y,
|
|
107
|
+
autoFocus: P,
|
|
108
|
+
"data-testid": B,
|
|
109
|
+
disabled: F,
|
|
110
|
+
id: H,
|
|
111
|
+
name: I,
|
|
112
|
+
onBlur: L,
|
|
113
|
+
onClick: Y,
|
|
121
114
|
onFocus: ie,
|
|
122
|
-
placeholder:
|
|
115
|
+
placeholder: Z,
|
|
123
116
|
ref: J,
|
|
124
|
-
size:
|
|
117
|
+
size: a,
|
|
125
118
|
tabIndex: 0,
|
|
126
|
-
variant:
|
|
127
|
-
...
|
|
128
|
-
}), ce = pe[
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
119
|
+
variant: T ? "focused" : z,
|
|
120
|
+
...k
|
|
121
|
+
}), ce = pe[a];
|
|
122
|
+
return /* @__PURE__ */ g("div", { ...re, className: n("wrapper"), children: [
|
|
123
|
+
/* @__PURE__ */ g("div", { className: n("input-wrapper"), children: [
|
|
131
124
|
/* @__PURE__ */ t(
|
|
132
125
|
"input",
|
|
133
126
|
{
|
|
134
127
|
className: n(
|
|
135
128
|
"root",
|
|
136
|
-
`size-${
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
`size-${a}`,
|
|
130
|
+
z && `variant-${z}`,
|
|
131
|
+
A && "transparent",
|
|
132
|
+
p && `icon-placement-${N}`,
|
|
133
|
+
V
|
|
141
134
|
),
|
|
142
135
|
...ae
|
|
143
136
|
}
|
|
144
137
|
),
|
|
145
|
-
|
|
138
|
+
p ? /* @__PURE__ */ t(
|
|
146
139
|
"div",
|
|
147
140
|
{
|
|
148
141
|
className: n(
|
|
149
142
|
"icon-wrapper",
|
|
150
|
-
`icon-placement-${
|
|
151
|
-
`size-${
|
|
143
|
+
`icon-placement-${N}`,
|
|
144
|
+
`size-${a}`
|
|
152
145
|
),
|
|
153
|
-
children: _e.cloneElement(
|
|
146
|
+
children: _e.cloneElement(p, { ...p.props, size: ce })
|
|
154
147
|
}
|
|
155
148
|
) : null,
|
|
156
|
-
/* @__PURE__ */ t("div", { className: n("indicators", `size-${
|
|
149
|
+
/* @__PURE__ */ t("div", { className: n("indicators", `size-${a}`), children: X ? se : null })
|
|
157
150
|
] }),
|
|
158
|
-
ne ? /* @__PURE__ */ t("ul", { className: n("menu"), ...Q(), children:
|
|
159
|
-
(
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
(
|
|
167
|
-
const le =
|
|
151
|
+
ne ? /* @__PURE__ */ t("ul", { className: n("menu"), ...Q(), children: v.reduce(
|
|
152
|
+
(i, r, w) => {
|
|
153
|
+
const M = i.itemIndex++, O = W === M;
|
|
154
|
+
if (G)
|
|
155
|
+
i.itemsToRender.push(
|
|
156
|
+
/* @__PURE__ */ g(ze, { children: [
|
|
157
|
+
q(r),
|
|
158
|
+
r.options ? r.options.map(
|
|
159
|
+
(l, oe) => {
|
|
160
|
+
const le = d && s(d) === s(l);
|
|
168
161
|
return /* @__PURE__ */ t(
|
|
169
162
|
"li",
|
|
170
163
|
{
|
|
171
164
|
className: n(
|
|
172
165
|
"item",
|
|
173
|
-
|
|
166
|
+
O && "highlighted",
|
|
174
167
|
le && "selected"
|
|
175
168
|
),
|
|
176
|
-
...
|
|
177
|
-
index:
|
|
178
|
-
item:
|
|
169
|
+
...D({
|
|
170
|
+
index: M,
|
|
171
|
+
item: l
|
|
179
172
|
}),
|
|
180
|
-
children:
|
|
173
|
+
children: R(l)
|
|
181
174
|
},
|
|
182
175
|
oe
|
|
183
176
|
);
|
|
184
177
|
}
|
|
185
178
|
) : null
|
|
186
|
-
] },
|
|
179
|
+
] }, w)
|
|
187
180
|
);
|
|
188
181
|
else {
|
|
189
|
-
const
|
|
190
|
-
|
|
182
|
+
const l = d && s(d) === s(r);
|
|
183
|
+
i.itemsToRender.push(
|
|
191
184
|
/* @__PURE__ */ t(
|
|
192
185
|
"li",
|
|
193
186
|
{
|
|
194
187
|
className: n(
|
|
195
188
|
"item",
|
|
196
|
-
|
|
197
|
-
|
|
189
|
+
O && "highlighted",
|
|
190
|
+
l && "selected"
|
|
198
191
|
),
|
|
199
|
-
...
|
|
200
|
-
index:
|
|
201
|
-
item:
|
|
192
|
+
...D({
|
|
193
|
+
index: w,
|
|
194
|
+
item: r
|
|
202
195
|
}),
|
|
203
|
-
children:
|
|
196
|
+
children: R(r)
|
|
204
197
|
},
|
|
205
|
-
|
|
198
|
+
w
|
|
206
199
|
)
|
|
207
200
|
);
|
|
208
201
|
}
|
|
209
|
-
return
|
|
202
|
+
return i;
|
|
210
203
|
},
|
|
211
204
|
{ itemIndex: 0, itemsToRender: [] }
|
|
212
205
|
).itemsToRender }) : null
|
|
@@ -217,5 +210,5 @@ const we = (u, z, f = !0) => {
|
|
|
217
210
|
}
|
|
218
211
|
);
|
|
219
212
|
export {
|
|
220
|
-
|
|
213
|
+
Fe as Search
|
|
221
214
|
};
|