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/Search.js CHANGED
@@ -1,217 +1,222 @@
1
1
  "use client";
2
2
  import './Search.css';
3
- import { jsx as t, jsxs as x } from "react/jsx-runtime";
4
- import { D as b } from "./downshift.esm-xtYanIDi.js";
5
- import { forwardRef as le, useState as he, useCallback as de, useMemo as _e, Fragment as pe } from "react";
6
- import { CloseButton as me } from "./CloseButton.js";
7
- import { Icon as fe } from "./Icon.js";
8
- import { c as ue } from "./index-PAaZGbyz.js";
9
- import { c as ge } from "./create-event-rXDe5aCQ.js";
10
- import { t as we } from "./throttle-BDBzFeFj.js";
11
- const Ne = "_wrapper_4fh7o_2", xe = "_indicators_4fh7o_5", ze = "_root_4fh7o_33", Re = "_transparent_4fh7o_81", Se = "_menu_4fh7o_170", ve = "_item_4fh7o_198", Ie = "_highlighted_4fh7o_212", ke = "_selected_4fh7o_215", Ce = {
12
- wrapper: Ne,
13
- indicators: xe,
14
- "dropdown-indicator": "_dropdown-indicator_4fh7o_14",
15
- "input-wrapper": "_input-wrapper_4fh7o_27",
16
- "icon-placement-right": "_icon-placement-right_4fh7o_30",
17
- root: ze,
18
- "icon-placement-left": "_icon-placement-left_4fh7o_63",
19
- transparent: Re,
20
- "variant-danger": "_variant-danger_4fh7o_94",
21
- "variant-success": "_variant-success_4fh7o_98",
22
- "variant-warning": "_variant-warning_4fh7o_102",
23
- "size-lg": "_size-lg_4fh7o_106",
24
- "size-md": "_size-md_4fh7o_114",
25
- "size-sm": "_size-sm_4fh7o_122",
26
- "size-xs": "_size-xs_4fh7o_130",
27
- "icon-wrapper": "_icon-wrapper_4fh7o_139",
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
- item: ve,
30
- highlighted: Ie,
31
- selected: ke
32
- }, j = "", n = ue(Ce), $e = b.default || b, De = le(
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: O = "off",
35
- autoFocus: P,
36
- className: V,
37
- dataTestId: B,
38
- disabled: G,
39
- groupsEnabled: H,
40
- icon: _,
41
- iconPlacement: z = "left",
42
- id: Y,
43
- itemToString: s,
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: R,
46
- onBlur: q,
47
- onChange: m,
50
+ name: v,
51
+ onBlur: Y,
52
+ onChange: h,
48
53
  onClick: A,
49
- onFocus: f,
54
+ onFocus: u,
50
55
  placeholder: J = "Search…",
51
56
  renderGroupHeader: K,
52
- renderItem: S,
53
- search: v,
57
+ renderItem: R,
58
+ search: S,
54
59
  size: l = "lg",
55
60
  throttle: I = 500,
56
61
  transparent: L,
57
- value: h = j,
58
- variant: u,
59
- ...g
62
+ value: d = E,
63
+ variant: f,
64
+ ...j
60
65
  }, Q) => {
61
- const U = h ? s(h) : j, [k, r] = he([]), C = de(
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 a = await v(e);
65
- r(a || []);
69
+ const r = await S(e);
70
+ c(r || []);
66
71
  } else
67
- r([]);
72
+ c([]);
68
73
  },
69
- [p, v]
70
- ), $ = _e(
71
- () => we(C, I, !1),
72
- [C, I]
73
- ), w = (e) => {
74
- const a = ge({ name: R, value: e });
75
- m == null || m(e, a);
76
- }, D = (e) => {
77
- e ? w(e) : (w(), r([]));
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__ */ t(
80
- $e,
84
+ return /* @__PURE__ */ a(
85
+ Ce,
81
86
  {
82
87
  initialInputValue: U,
83
- itemToString: (e) => s(e) || "",
84
- onInputValueChange: $,
88
+ itemToString: (e) => n(e) || "",
89
+ onInputValueChange: k,
85
90
  onOuterClick: () => {
86
- h || D(), r([]);
91
+ d || C(), c([]);
87
92
  },
88
- onSelect: D,
89
- selectedItem: h,
90
- ...g,
93
+ onSelect: C,
94
+ selectedItem: d,
95
+ ...j,
91
96
  children: ({
92
97
  clearSelection: e,
93
- getInputProps: a,
94
- getItemProps: T,
98
+ getInputProps: r,
99
+ getItemProps: $,
95
100
  getMenuProps: W,
96
101
  getRootProps: X,
97
102
  highlightedIndex: Z,
98
103
  inputValue: F,
99
- isOpen: y,
100
- selectedItem: d,
104
+ isOpen: b,
105
+ selectedItem: _,
101
106
  toggleMenu: ee
102
107
  }) => {
103
- const te = () => {
104
- r([]), w(), e();
105
- }, ne = y && k.length > 0, se = /* @__PURE__ */ t("div", { className: n("dropdown-indicator"), children: /* @__PURE__ */ t(me, { animatePresence: !0, onClick: te, title: "Clear" }) }), ie = (i) => {
106
- f == null || f(i), $(""), ee();
107
- }, oe = X(g, { suppressRefError: !0 }), re = a({
108
- autoComplete: O,
109
- autoFocus: P,
110
- "data-testid": B,
111
- disabled: G,
112
- id: Y,
113
- name: R,
114
- onBlur: q,
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: y ? "focused" : u,
122
- ...g
126
+ variant: b ? "focused" : f,
127
+ ...j
123
128
  });
124
- return /* @__PURE__ */ x("div", { ...oe, className: n("wrapper"), children: [
125
- /* @__PURE__ */ x("div", { className: n("input-wrapper"), children: [
126
- /* @__PURE__ */ t(
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: n(
134
+ className: t(
130
135
  "root",
131
136
  `size-${l}`,
132
- u && `variant-${u}`,
137
+ f && `variant-${f}`,
133
138
  L && "transparent",
134
- _ && `icon-placement-${z}`,
135
- V
139
+ m && `icon-placement-${N}`,
140
+ P
136
141
  ),
137
- ...re
142
+ ...ce
138
143
  }
139
144
  ),
140
- _ ? /* @__PURE__ */ t(
145
+ m ? /* @__PURE__ */ a(
141
146
  "div",
142
147
  {
143
- className: n(
148
+ className: t(
144
149
  "icon-wrapper",
145
- `icon-placement-${z}`,
150
+ `icon-placement-${N}`,
146
151
  `size-${l}`
147
152
  ),
148
- children: /* @__PURE__ */ t(fe, { ..._.props, size: "lg" })
153
+ children: /* @__PURE__ */ a(ue, { ...m.props, size: "lg" })
149
154
  }
150
155
  ) : null,
151
- /* @__PURE__ */ t("div", { className: n("indicators", `size-${l}`), children: F ? se : null })
156
+ /* @__PURE__ */ a("div", { className: t("indicators", `size-${l}`), children: F ? ne : null })
152
157
  ] }),
153
- ne ? /* @__PURE__ */ t("ul", { className: n("menu"), ...W(), children: k.reduce(
154
- (i, o, N) => {
155
- const E = i.itemIndex++, M = Z === E;
156
- if (H)
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__ */ x(pe, { children: [
159
- K(o),
160
- o.options ? o.options.map(
161
- (c, ae) => {
162
- const ce = d && s(d) === s(c);
163
- return /* @__PURE__ */ t(
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: n(
171
+ className: t(
167
172
  "item",
168
- M && "highlighted",
169
- ce && "selected"
173
+ T && "highlighted",
174
+ oe && "selected"
170
175
  ),
171
- ...T({
172
- index: E,
173
- item: c
176
+ ...$({
177
+ index: D,
178
+ item: o
174
179
  }),
175
- children: S(c)
180
+ children: R(o)
176
181
  },
177
- ae
182
+ re
178
183
  );
179
184
  }
180
185
  ) : null
181
- ] }, N)
186
+ ] }, q)
182
187
  );
183
188
  else {
184
- const c = d && s(d) === s(o);
189
+ const o = _ && n(_) === n(s);
185
190
  i.itemsToRender.push(
186
- /* @__PURE__ */ t(
191
+ /* @__PURE__ */ a(
187
192
  "li",
188
193
  {
189
- className: n(
194
+ className: t(
190
195
  "item",
191
- M && "highlighted",
192
- c && "selected"
196
+ T && "highlighted",
197
+ o && "selected"
193
198
  ),
194
- ...T({
195
- index: N,
196
- item: o
199
+ ...$({
200
+ index: q,
201
+ item: s
197
202
  }),
198
- children: S(o)
203
+ children: R(s)
199
204
  },
200
- N
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
- De.displayName = "Search";
219
+ $e.displayName = "Search";
215
220
  export {
216
- De as Search
221
+ $e as Search
217
222
  };
package/dist/Textarea.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_rh62g_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);min-height:8.125rem;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}._root_rh62g_2:disabled,._root_rh62g_2[aria-disabled]{--textAreaBackgroundColor: var(--components-colors-input-color-background-disabled);--textAreaColor: var(--components-colors-input-color-text-disabled);cursor:not-allowed}._root_rh62g_2:hover{--textAreaBorderColor: var(--components-colors-input-color-border-hover);--textAreaBoxShadow: var(--inset-20)}._root_rh62g_2:active,._root_rh62g_2:focus{--textAreaBorderColor: var(--components-colors-input-color-border-active)}._root_rh62g_2::placeholder{--textAreaColor: var(--components-colors-input-color-text-placeholder)}._variant-danger_rh62g_35{--textAreaBorderColor: var(--components-colors-input-color-border-error)}._variant-warning_rh62g_38{--textAreaBorderColor: var(--components-colors-input-color-border-warning)}._variant-success_rh62g_41{--textAreaBorderColor: var(--components-colors-input-color-border-success)}}
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 c } from "react/jsx-runtime";
4
- import { forwardRef as _ } from "react";
5
- import { useField as m } from "./Field.js";
6
- import { c as g } from "./index-PAaZGbyz.js";
7
- const v = "_root_rh62g_2", p = {
8
- root: v,
9
- "variant-danger": "_variant-danger_rh62g_35",
10
- "variant-warning": "_variant-warning_rh62g_38",
11
- "variant-success": "_variant-success_rh62g_41"
12
- }, f = g(p), l = _(
13
- ({ className: a, minRows: t = 5, variant: o, ...e }, n) => {
14
- const { getInputProps: s, variant: i } = m(), r = i || o;
15
- return /* @__PURE__ */ c(
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: f("root", r && `variant-${r}`, a),
19
+ className: x(
20
+ "root",
21
+ a && `variant-${a}`,
22
+ r && "adaptative",
23
+ t
24
+ ),
19
25
  ref: n,
20
- rows: t,
21
- ...s(e)
26
+ rows: e,
27
+ ...i(s)
22
28
  }
23
29
  );
24
30
  }
25
31
  );
26
- l.displayName = "Textarea";
32
+ u.displayName = "Textarea";
27
33
  export {
28
- l as Textarea
34
+ u as Textarea
29
35
  };