welcome-ui 10.0.0-alpha.5 → 10.0.0-alpha.6
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/Button.css +1 -1
- package/dist/Button.js +41 -41
- package/dist/Drawer.js +132 -111
- package/dist/DropdownMenu.js +251 -238
- package/dist/Icon.js +16 -12
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +48 -48
- package/dist/Link.css +1 -1
- package/dist/Link.js +48 -48
- package/dist/Search.css +1 -1
- package/dist/Search.js +137 -132
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +24 -18
- package/dist/Toast.js +163 -126
- package/dist/types/components/Icon/icons.d.ts +4 -3
- package/dist/types/components/Textarea/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/Search.js
CHANGED
|
@@ -1,217 +1,222 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Search.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { D as
|
|
5
|
-
import { forwardRef as le, useState as
|
|
6
|
-
import { CloseButton as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { c as
|
|
9
|
-
import { c as
|
|
10
|
-
import { t as
|
|
11
|
-
const
|
|
12
|
-
wrapper:
|
|
13
|
-
indicators:
|
|
14
|
-
"dropdown-indicator": "_dropdown-
|
|
15
|
-
"input-wrapper": "_input-
|
|
16
|
-
"icon-placement-right": "_icon-placement-
|
|
17
|
-
root:
|
|
18
|
-
"icon-placement-left": "_icon-placement-
|
|
19
|
-
|
|
20
|
-
"variant-
|
|
21
|
-
"variant-success": "_variant-
|
|
22
|
-
|
|
23
|
-
"size-lg": "_size-
|
|
24
|
-
"size-md": "_size-
|
|
25
|
-
"size-sm": "_size-
|
|
26
|
-
"
|
|
27
|
-
|
|
3
|
+
import { jsx as a, jsxs as w } from "react/jsx-runtime";
|
|
4
|
+
import { D as y } from "./downshift.esm-xtYanIDi.js";
|
|
5
|
+
import { forwardRef as le, useState as de, useCallback as _e, useMemo as me, Fragment as pe } from "react";
|
|
6
|
+
import { CloseButton as he } from "./CloseButton.js";
|
|
7
|
+
import { Icon as ue } from "./Icon.js";
|
|
8
|
+
import { c as fe } from "./index-PAaZGbyz.js";
|
|
9
|
+
import { c as je } from "./create-event-rXDe5aCQ.js";
|
|
10
|
+
import { t as ge } from "./throttle-BDBzFeFj.js";
|
|
11
|
+
const qe = "_wrapper_qaadj_2", we = "_indicators_qaadj_5", Ne = "_root_qaadj_33", ve = "_transparent_qaadj_95", Re = "_disabled_qaadj_136", Se = "_menu_qaadj_151", Ie = "_item_qaadj_184", xe = "_highlighted_qaadj_198", ze = "_selected_qaadj_201", ke = {
|
|
12
|
+
wrapper: qe,
|
|
13
|
+
indicators: we,
|
|
14
|
+
"dropdown-indicator": "_dropdown-indicator_qaadj_14",
|
|
15
|
+
"input-wrapper": "_input-wrapper_qaadj_27",
|
|
16
|
+
"icon-placement-right": "_icon-placement-right_qaadj_30",
|
|
17
|
+
root: Ne,
|
|
18
|
+
"icon-placement-left": "_icon-placement-left_qaadj_59",
|
|
19
|
+
"variant-danger": "_variant-danger_qaadj_86",
|
|
20
|
+
"variant-warning": "_variant-warning_qaadj_89",
|
|
21
|
+
"variant-success": "_variant-success_qaadj_92",
|
|
22
|
+
transparent: ve,
|
|
23
|
+
"size-lg": "_size-lg_qaadj_100",
|
|
24
|
+
"size-md": "_size-md_qaadj_105",
|
|
25
|
+
"size-sm": "_size-sm_qaadj_110",
|
|
26
|
+
"icon-wrapper": "_icon-wrapper_qaadj_115",
|
|
27
|
+
disabled: Re,
|
|
28
|
+
"icon-placement-left-sm": "_icon-placement-left-sm_qaadj_139",
|
|
29
|
+
"icon-placement-left-md": "_icon-placement-left-md_qaadj_142",
|
|
30
|
+
"icon-placement-right-sm": "_icon-placement-right-sm_qaadj_145",
|
|
31
|
+
"icon-placement-right-md": "_icon-placement-right-md_qaadj_148",
|
|
28
32
|
menu: Se,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
"menu-scroller": "_menu-scroller_qaadj_177",
|
|
34
|
+
item: Ie,
|
|
35
|
+
highlighted: xe,
|
|
36
|
+
selected: ze
|
|
37
|
+
}, E = "", t = fe(ke), Ce = y.default || y, $e = le(
|
|
33
38
|
({
|
|
34
|
-
autoComplete:
|
|
35
|
-
autoFocus:
|
|
36
|
-
className:
|
|
37
|
-
dataTestId:
|
|
38
|
-
disabled:
|
|
39
|
-
groupsEnabled:
|
|
40
|
-
icon:
|
|
41
|
-
iconPlacement:
|
|
42
|
-
id:
|
|
43
|
-
itemToString:
|
|
39
|
+
autoComplete: M = "off",
|
|
40
|
+
autoFocus: O,
|
|
41
|
+
className: P,
|
|
42
|
+
dataTestId: V,
|
|
43
|
+
disabled: B,
|
|
44
|
+
groupsEnabled: G,
|
|
45
|
+
icon: m,
|
|
46
|
+
iconPlacement: N = "left",
|
|
47
|
+
id: H,
|
|
48
|
+
itemToString: n,
|
|
44
49
|
minChars: p = 3,
|
|
45
|
-
name:
|
|
46
|
-
onBlur:
|
|
47
|
-
onChange:
|
|
50
|
+
name: v,
|
|
51
|
+
onBlur: Y,
|
|
52
|
+
onChange: h,
|
|
48
53
|
onClick: A,
|
|
49
|
-
onFocus:
|
|
54
|
+
onFocus: u,
|
|
50
55
|
placeholder: J = "Search…",
|
|
51
56
|
renderGroupHeader: K,
|
|
52
|
-
renderItem:
|
|
53
|
-
search:
|
|
57
|
+
renderItem: R,
|
|
58
|
+
search: S,
|
|
54
59
|
size: l = "lg",
|
|
55
60
|
throttle: I = 500,
|
|
56
61
|
transparent: L,
|
|
57
|
-
value:
|
|
58
|
-
variant:
|
|
59
|
-
...
|
|
62
|
+
value: d = E,
|
|
63
|
+
variant: f,
|
|
64
|
+
...j
|
|
60
65
|
}, Q) => {
|
|
61
|
-
const U =
|
|
66
|
+
const U = d ? n(d) : E, [x, c] = de([]), z = _e(
|
|
62
67
|
async (e) => {
|
|
63
68
|
if (p === 0 || (e == null ? void 0 : e.length) >= p) {
|
|
64
|
-
const
|
|
65
|
-
r
|
|
69
|
+
const r = await S(e);
|
|
70
|
+
c(r || []);
|
|
66
71
|
} else
|
|
67
|
-
|
|
72
|
+
c([]);
|
|
68
73
|
},
|
|
69
|
-
[p,
|
|
70
|
-
),
|
|
71
|
-
() =>
|
|
72
|
-
[
|
|
73
|
-
),
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
e ?
|
|
74
|
+
[p, S]
|
|
75
|
+
), k = me(
|
|
76
|
+
() => ge(z, I, !1),
|
|
77
|
+
[z, I]
|
|
78
|
+
), g = (e) => {
|
|
79
|
+
const r = je({ name: v, value: e });
|
|
80
|
+
h == null || h(e, r);
|
|
81
|
+
}, C = (e) => {
|
|
82
|
+
e ? g(e) : (g(), c([]));
|
|
78
83
|
};
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
84
|
+
return /* @__PURE__ */ a(
|
|
85
|
+
Ce,
|
|
81
86
|
{
|
|
82
87
|
initialInputValue: U,
|
|
83
|
-
itemToString: (e) =>
|
|
84
|
-
onInputValueChange:
|
|
88
|
+
itemToString: (e) => n(e) || "",
|
|
89
|
+
onInputValueChange: k,
|
|
85
90
|
onOuterClick: () => {
|
|
86
|
-
|
|
91
|
+
d || C(), c([]);
|
|
87
92
|
},
|
|
88
|
-
onSelect:
|
|
89
|
-
selectedItem:
|
|
90
|
-
...
|
|
93
|
+
onSelect: C,
|
|
94
|
+
selectedItem: d,
|
|
95
|
+
...j,
|
|
91
96
|
children: ({
|
|
92
97
|
clearSelection: e,
|
|
93
|
-
getInputProps:
|
|
94
|
-
getItemProps:
|
|
98
|
+
getInputProps: r,
|
|
99
|
+
getItemProps: $,
|
|
95
100
|
getMenuProps: W,
|
|
96
101
|
getRootProps: X,
|
|
97
102
|
highlightedIndex: Z,
|
|
98
103
|
inputValue: F,
|
|
99
|
-
isOpen:
|
|
100
|
-
selectedItem:
|
|
104
|
+
isOpen: b,
|
|
105
|
+
selectedItem: _,
|
|
101
106
|
toggleMenu: ee
|
|
102
107
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
autoComplete:
|
|
109
|
-
autoFocus:
|
|
110
|
-
"data-testid":
|
|
111
|
-
disabled:
|
|
112
|
-
id:
|
|
113
|
-
name:
|
|
114
|
-
onBlur:
|
|
108
|
+
const ae = () => {
|
|
109
|
+
c([]), g(), e();
|
|
110
|
+
}, te = b && x.length > 0, ne = /* @__PURE__ */ a("div", { className: t("dropdown-indicator"), children: /* @__PURE__ */ a(he, { animatePresence: !0, onClick: ae, title: "Clear" }) }), ie = (i) => {
|
|
111
|
+
u == null || u(i), k(""), ee();
|
|
112
|
+
}, se = X(j, { suppressRefError: !0 }), ce = r({
|
|
113
|
+
autoComplete: M,
|
|
114
|
+
autoFocus: O,
|
|
115
|
+
"data-testid": V,
|
|
116
|
+
disabled: B,
|
|
117
|
+
id: H,
|
|
118
|
+
name: v,
|
|
119
|
+
onBlur: Y,
|
|
115
120
|
onClick: A,
|
|
116
121
|
onFocus: ie,
|
|
117
122
|
placeholder: J,
|
|
118
123
|
ref: Q,
|
|
119
124
|
size: l,
|
|
120
125
|
tabIndex: 0,
|
|
121
|
-
variant:
|
|
122
|
-
...
|
|
126
|
+
variant: b ? "focused" : f,
|
|
127
|
+
...j
|
|
123
128
|
});
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ w("div", { ...se, className: t("wrapper"), children: [
|
|
130
|
+
/* @__PURE__ */ w("div", { className: t("input-wrapper"), children: [
|
|
131
|
+
/* @__PURE__ */ a(
|
|
127
132
|
"input",
|
|
128
133
|
{
|
|
129
|
-
className:
|
|
134
|
+
className: t(
|
|
130
135
|
"root",
|
|
131
136
|
`size-${l}`,
|
|
132
|
-
|
|
137
|
+
f && `variant-${f}`,
|
|
133
138
|
L && "transparent",
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
m && `icon-placement-${N}`,
|
|
140
|
+
P
|
|
136
141
|
),
|
|
137
|
-
...
|
|
142
|
+
...ce
|
|
138
143
|
}
|
|
139
144
|
),
|
|
140
|
-
|
|
145
|
+
m ? /* @__PURE__ */ a(
|
|
141
146
|
"div",
|
|
142
147
|
{
|
|
143
|
-
className:
|
|
148
|
+
className: t(
|
|
144
149
|
"icon-wrapper",
|
|
145
|
-
`icon-placement-${
|
|
150
|
+
`icon-placement-${N}`,
|
|
146
151
|
`size-${l}`
|
|
147
152
|
),
|
|
148
|
-
children: /* @__PURE__ */
|
|
153
|
+
children: /* @__PURE__ */ a(ue, { ...m.props, size: "lg" })
|
|
149
154
|
}
|
|
150
155
|
) : null,
|
|
151
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ a("div", { className: t("indicators", `size-${l}`), children: F ? ne : null })
|
|
152
157
|
] }),
|
|
153
|
-
|
|
154
|
-
(i,
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
158
|
+
te ? /* @__PURE__ */ a("div", { className: t("menu"), children: /* @__PURE__ */ a("ul", { className: t("menu-scroller"), ...W(), children: x.reduce(
|
|
159
|
+
(i, s, q) => {
|
|
160
|
+
const D = i.itemIndex++, T = Z === D;
|
|
161
|
+
if (G)
|
|
157
162
|
i.itemsToRender.push(
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
K(
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
const
|
|
163
|
-
return /* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ w(pe, { children: [
|
|
164
|
+
K(s),
|
|
165
|
+
s.options ? s.options.map(
|
|
166
|
+
(o, re) => {
|
|
167
|
+
const oe = _ && n(_) === n(o);
|
|
168
|
+
return /* @__PURE__ */ a(
|
|
164
169
|
"li",
|
|
165
170
|
{
|
|
166
|
-
className:
|
|
171
|
+
className: t(
|
|
167
172
|
"item",
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
T && "highlighted",
|
|
174
|
+
oe && "selected"
|
|
170
175
|
),
|
|
171
|
-
|
|
172
|
-
index:
|
|
173
|
-
item:
|
|
176
|
+
...$({
|
|
177
|
+
index: D,
|
|
178
|
+
item: o
|
|
174
179
|
}),
|
|
175
|
-
children:
|
|
180
|
+
children: R(o)
|
|
176
181
|
},
|
|
177
|
-
|
|
182
|
+
re
|
|
178
183
|
);
|
|
179
184
|
}
|
|
180
185
|
) : null
|
|
181
|
-
] },
|
|
186
|
+
] }, q)
|
|
182
187
|
);
|
|
183
188
|
else {
|
|
184
|
-
const
|
|
189
|
+
const o = _ && n(_) === n(s);
|
|
185
190
|
i.itemsToRender.push(
|
|
186
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ a(
|
|
187
192
|
"li",
|
|
188
193
|
{
|
|
189
|
-
className:
|
|
194
|
+
className: t(
|
|
190
195
|
"item",
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
T && "highlighted",
|
|
197
|
+
o && "selected"
|
|
193
198
|
),
|
|
194
|
-
|
|
195
|
-
index:
|
|
196
|
-
item:
|
|
199
|
+
...$({
|
|
200
|
+
index: q,
|
|
201
|
+
item: s
|
|
197
202
|
}),
|
|
198
|
-
children:
|
|
203
|
+
children: R(s)
|
|
199
204
|
},
|
|
200
|
-
|
|
205
|
+
q
|
|
201
206
|
)
|
|
202
207
|
);
|
|
203
208
|
}
|
|
204
209
|
return i;
|
|
205
210
|
},
|
|
206
211
|
{ itemIndex: 0, itemsToRender: [] }
|
|
207
|
-
).itemsToRender }) : null
|
|
212
|
+
).itemsToRender }) }) : null
|
|
208
213
|
] });
|
|
209
214
|
}
|
|
210
215
|
}
|
|
211
216
|
);
|
|
212
217
|
}
|
|
213
218
|
);
|
|
214
|
-
|
|
219
|
+
$e.displayName = "Search";
|
|
215
220
|
export {
|
|
216
|
-
|
|
221
|
+
$e as Search
|
|
217
222
|
};
|
package/dist/Textarea.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_161f5_2{border-radius:var(--components-dimensions-input-border-radius);border-style:solid;border-width:var(--components-dimensions-input-border-width-default);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-md);width:100%;transition:var(--duration-medium);padding:var(--spacing-md);outline:none;background-color:var(--textAreaBackgroundColor, var(--components-colors-input-color-background-default));color:var(--textAreaColor, var(--components-colors-input-color-text-default));border-color:var(--textAreaBorderColor, var(--components-colors-input-color-border-default));box-shadow:var(--textAreaBoxShadow, var(--inset-10)) inset;field-sizing:var(--textAreaFieldSizing, fixed);min-height:var(--textAreaMinHeight, 8.125rem)}._root_161f5_2:disabled,._root_161f5_2[aria-disabled]{--textAreaBackgroundColor: var(--components-colors-input-color-background-disabled);--textAreaColor: var(--components-colors-input-color-text-disabled);cursor:not-allowed}._root_161f5_2:hover{--textAreaBorderColor: var(--components-colors-input-color-border-hover);--textAreaBoxShadow: var(--inset-20)}._root_161f5_2:active,._root_161f5_2:focus{--textAreaBorderColor: var(--components-colors-input-color-border-active)}._root_161f5_2::placeholder{color:var(--components-colors-input-color-text-placeholder)}._variant-danger_161f5_36{--textAreaBorderColor: var(--components-colors-input-color-border-error)}._variant-warning_161f5_39{--textAreaBorderColor: var(--components-colors-input-color-border-warning)}._variant-success_161f5_42{--textAreaBorderColor: var(--components-colors-input-color-border-success)}._adaptative_161f5_45{--textAreaFieldSizing: content;--textAreaMinHeight: auto}}
|
package/dist/Textarea.js
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Textarea.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { useField as
|
|
6
|
-
import { c as
|
|
7
|
-
const
|
|
8
|
-
root:
|
|
9
|
-
"variant-danger": "_variant-
|
|
10
|
-
"variant-warning": "_variant-
|
|
11
|
-
"variant-success": "_variant-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as f } from "react";
|
|
5
|
+
import { useField as v } from "./Field.js";
|
|
6
|
+
import { c as p } from "./index-PAaZGbyz.js";
|
|
7
|
+
const m = "_root_161f5_2", d = "_adaptative_161f5_45", l = {
|
|
8
|
+
root: m,
|
|
9
|
+
"variant-danger": "_variant-danger_161f5_36",
|
|
10
|
+
"variant-warning": "_variant-warning_161f5_39",
|
|
11
|
+
"variant-success": "_variant-success_161f5_42",
|
|
12
|
+
adaptative: d
|
|
13
|
+
}, x = p(l), u = f(
|
|
14
|
+
({ className: t, isAdaptative: r = !1, minRows: e = 5, variant: o, ...s }, n) => {
|
|
15
|
+
const { getInputProps: i, variant: c } = v(), a = c || o;
|
|
16
|
+
return /* @__PURE__ */ _(
|
|
16
17
|
"textarea",
|
|
17
18
|
{
|
|
18
|
-
className:
|
|
19
|
+
className: x(
|
|
20
|
+
"root",
|
|
21
|
+
a && `variant-${a}`,
|
|
22
|
+
r && "adaptative",
|
|
23
|
+
t
|
|
24
|
+
),
|
|
19
25
|
ref: n,
|
|
20
|
-
rows:
|
|
21
|
-
...s
|
|
26
|
+
rows: e,
|
|
27
|
+
...i(s)
|
|
22
28
|
}
|
|
23
29
|
);
|
|
24
30
|
}
|
|
25
31
|
);
|
|
26
|
-
|
|
32
|
+
u.displayName = "Textarea";
|
|
27
33
|
export {
|
|
28
|
-
|
|
34
|
+
u as Textarea
|
|
29
35
|
};
|