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