welcome-ui 7.2.0 → 7.4.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.
Files changed (67) hide show
  1. package/dist/Breadcrumb.mjs +3 -2
  2. package/dist/Swiper.mjs +47 -45
  3. package/dist/Text.mjs +38 -27
  4. package/dist/types/components/Accordion/styles.d.ts +2 -2
  5. package/dist/types/components/Avatar/index.d.ts +2 -5
  6. package/dist/types/components/Avatar/theme.d.ts +4 -3
  7. package/dist/types/components/Avatar/utils.d.ts +2 -2
  8. package/dist/types/components/Badge/styles.d.ts +1 -1
  9. package/dist/types/components/Breadcrumb/index.d.ts +2 -4
  10. package/dist/types/components/ButtonGroup/styles.d.ts +1 -1
  11. package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +1 -1
  12. package/dist/types/components/DateTimePickerCommon/styles.d.ts +2 -2
  13. package/dist/types/components/Drawer/styles.d.ts +1 -1
  14. package/dist/types/components/DropdownMenu/Item.styled.d.ts +1 -1
  15. package/dist/types/components/DropdownMenu/Separator.styled.d.ts +1 -1
  16. package/dist/types/components/Field/styles.d.ts +2 -2
  17. package/dist/types/components/FileDrop/styles.d.ts +2 -2
  18. package/dist/types/components/Hint/index.d.ts +1 -1
  19. package/dist/types/components/Hint/styles.d.ts +1 -1
  20. package/dist/types/components/Icon/index.d.ts +1 -1
  21. package/dist/types/components/Icon/theme.d.ts +5 -8
  22. package/dist/types/components/IconsFont/index.d.ts +1 -1
  23. package/dist/types/components/IconsFont/styles.d.ts +1 -1
  24. package/dist/types/components/InputText/styles.d.ts +2 -2
  25. package/dist/types/components/Label/styles.d.ts +1 -1
  26. package/dist/types/components/Loader/index.d.ts +2 -3
  27. package/dist/types/components/Loader/theme.d.ts +5 -6
  28. package/dist/types/components/Logo/styles.d.ts +1 -1
  29. package/dist/types/components/Modal/Assets/Iframe.d.ts +2 -1
  30. package/dist/types/components/Modal/Assets/index.d.ts +3 -3
  31. package/dist/types/components/Modal/Assets/styles.d.ts +3 -3
  32. package/dist/types/components/Modal/Close.d.ts +2 -1
  33. package/dist/types/components/Modal/index.d.ts +4 -4
  34. package/dist/types/components/Modal/theme.d.ts +2 -3
  35. package/dist/types/components/Pagination/styles.d.ts +3 -3
  36. package/dist/types/components/Popover/Arrow.d.ts +2 -1
  37. package/dist/types/components/Popover/Content.d.ts +2 -1
  38. package/dist/types/components/Popover/Popover.d.ts +2 -2
  39. package/dist/types/components/Popover/PopoverHover.d.ts +2 -2
  40. package/dist/types/components/Popover/styles.d.ts +2 -2
  41. package/dist/types/components/Radio/styles.d.ts +2 -2
  42. package/dist/types/components/RadioTab/styles.d.ts +3 -3
  43. package/dist/types/components/Search/styles.d.ts +5 -5
  44. package/dist/types/components/Select/styles.d.ts +4 -4
  45. package/dist/types/components/Slider/styles.d.ts +2 -2
  46. package/dist/types/components/Swiper/index.d.ts +2 -2
  47. package/dist/types/components/Swiper/styles.d.ts +2 -2
  48. package/dist/types/components/System/index.d.ts +2 -3
  49. package/dist/types/components/Table/index.d.ts +1 -1
  50. package/dist/types/components/Table/styles.d.ts +1 -1
  51. package/dist/types/components/Tabs/styles.d.ts +2 -2
  52. package/dist/types/components/Tag/index.d.ts +1 -1
  53. package/dist/types/components/Tag/styles.d.ts +1 -1
  54. package/dist/types/components/Text/index.d.ts +2 -0
  55. package/dist/types/components/Text/styles.d.ts +1 -1
  56. package/dist/types/components/TimePicker/styles.d.ts +1 -1
  57. package/dist/types/components/Toast/Growl.d.ts +2 -1
  58. package/dist/types/components/Toast/Snackbar.d.ts +2 -1
  59. package/dist/types/components/Toast/theme.d.ts +1 -0
  60. package/dist/types/components/Toggle/index.d.ts +1 -2
  61. package/dist/types/components/Toggle/styles.d.ts +1 -2
  62. package/dist/types/components/Toggle/theme.d.ts +4 -3
  63. package/dist/types/components/Tooltip/styles.d.ts +1 -1
  64. package/dist/types/theme/index.d.ts +1 -0
  65. package/dist/types/utils/index.d.ts +1 -0
  66. package/dist/types/utils/ts-utils.d.ts +19 -0
  67. package/package.json +6 -6
@@ -5,6 +5,7 @@ import R, { th as z, css as ne } from "@xstyled/styled-components";
5
5
  import { forwardRef as ie } from "./System.mjs";
6
6
  import { Box as we } from "./Box.mjs";
7
7
  import { h as ze } from "./hex-to-rgba-BIDK-3ab.mjs";
8
+ import "./overflow-ellipsis-DGV5Kgt-.mjs";
8
9
  import "./Icon.mjs";
9
10
  import { R as Oe } from "./index-BRDOakbf.mjs";
10
11
  var x = [], Re = function() {
@@ -432,10 +433,10 @@ const Xe = (e, t, r) => Math.min(Math.max(e, t), r), qe = R.aBox`
432
433
  }
433
434
  );
434
435
  he.displayName = "Breadcrumb";
435
- const ot = Object.assign(he, {
436
+ const st = Object.assign(he, {
436
437
  Item: Ue
437
438
  });
438
439
  export {
439
- ot as Breadcrumb,
440
+ st as Breadcrumb,
440
441
  he as BreadcrumbComponent
441
442
  };
package/dist/Swiper.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import A, { useRef as rt, useEffect as M, useState as K, useMemo as ft, Children as Y, cloneElement as ht, useCallback as D } from "react";
2
+ import A, { useRef as rt, useEffect as z, useState as K, useMemo as ft, Children as Y, cloneElement as ht, useCallback as D } from "react";
3
3
  import { c as V, g as gt } from "./_commonjsHelpers-CXJ7dpIk.mjs";
4
- import N, { system as ot, css as y, th as Z, useTheme as mt } from "@xstyled/styled-components";
4
+ import M, { system as ot, css as b, th as Z, useTheme as mt } from "@xstyled/styled-components";
5
5
  import { u as pt } from "./use-viewport-m3glsbna.mjs";
6
6
  import { Button as wt } from "./Button.mjs";
7
7
  import { IconsFont as tt } from "./IconsFont.mjs";
8
- var $t = "Expected a function", et = NaN, yt = "[object Symbol]", bt = /^\s+|\s+$/g, vt = /^[-+]0x[0-9a-f]+$/i, St = /^0b[01]+$/i, xt = /^0o[0-7]+$/i, Pt = parseInt, Rt = typeof V == "object" && V && V.Object === Object && V, Lt = typeof self == "object" && self && self.Object === Object && self, kt = Rt || Lt || Function("return this")(), Et = Object.prototype, At = Et.toString, jt = Math.max, Ct = Math.min, X = function() {
8
+ var $t = "Expected a function", et = NaN, bt = "[object Symbol]", yt = /^\s+|\s+$/g, vt = /^[-+]0x[0-9a-f]+$/i, St = /^0b[01]+$/i, xt = /^0o[0-7]+$/i, Pt = parseInt, Rt = typeof V == "object" && V && V.Object === Object && V, Lt = typeof self == "object" && self && self.Object === Object && self, kt = Rt || Lt || Function("return this")(), Et = Object.prototype, At = Et.toString, jt = Math.max, Ct = Math.min, X = function() {
9
9
  return kt.Date.now();
10
10
  };
11
11
  function Tt(t, e, n) {
12
- var o, r, s, c, a, w, h = 0, C = !1, b = !1, R = !0;
12
+ var o, r, s, c, a, w, h = 0, C = !1, y = !1, R = !0;
13
13
  if (typeof t != "function")
14
14
  throw new TypeError($t);
15
- e = nt(e) || 0, q(n) && (C = !!n.leading, b = "maxWait" in n, s = b ? jt(nt(n.maxWait) || 0, e) : s, R = "trailing" in n ? !!n.trailing : R);
15
+ e = nt(e) || 0, q(n) && (C = !!n.leading, y = "maxWait" in n, s = y ? jt(nt(n.maxWait) || 0, e) : s, R = "trailing" in n ? !!n.trailing : R);
16
16
  function d(i) {
17
17
  var f = o, x = r;
18
18
  return o = r = void 0, h = i, c = t.apply(x, f), c;
@@ -22,11 +22,11 @@ function Tt(t, e, n) {
22
22
  }
23
23
  function v(i) {
24
24
  var f = i - w, x = i - h, W = e - f;
25
- return b ? Ct(W, s - x) : W;
25
+ return y ? Ct(W, s - x) : W;
26
26
  }
27
27
  function L(i) {
28
28
  var f = i - w, x = i - h;
29
- return w === void 0 || f >= e || f < 0 || b && x >= s;
29
+ return w === void 0 || f >= e || f < 0 || y && x >= s;
30
30
  }
31
31
  function p() {
32
32
  var i = X();
@@ -40,7 +40,7 @@ function Tt(t, e, n) {
40
40
  function I() {
41
41
  a !== void 0 && clearTimeout(a), h = 0, o = w = r = a = void 0;
42
42
  }
43
- function z() {
43
+ function N() {
44
44
  return a === void 0 ? c : T(X());
45
45
  }
46
46
  function g() {
@@ -48,12 +48,12 @@ function Tt(t, e, n) {
48
48
  if (o = arguments, r = this, w = i, f) {
49
49
  if (a === void 0)
50
50
  return O(w);
51
- if (b)
51
+ if (y)
52
52
  return a = setTimeout(p, e), d(w);
53
53
  }
54
54
  return a === void 0 && (a = setTimeout(p, e)), c;
55
55
  }
56
- return g.cancel = I, g.flush = z, g;
56
+ return g.cancel = I, g.flush = N, g;
57
57
  }
58
58
  function q(t) {
59
59
  var e = typeof t;
@@ -63,7 +63,7 @@ function Wt(t) {
63
63
  return !!t && typeof t == "object";
64
64
  }
65
65
  function Ot(t) {
66
- return typeof t == "symbol" || Wt(t) && At.call(t) == yt;
66
+ return typeof t == "symbol" || Wt(t) && At.call(t) == bt;
67
67
  }
68
68
  function nt(t) {
69
69
  if (typeof t == "number")
@@ -76,16 +76,16 @@ function nt(t) {
76
76
  }
77
77
  if (typeof t != "string")
78
78
  return t === 0 ? t : +t;
79
- t = t.replace(bt, "");
79
+ t = t.replace(yt, "");
80
80
  var n = St.test(t);
81
81
  return n || xt.test(t) ? Pt(t.slice(2), n ? 2 : 8) : vt.test(t) ? et : +t;
82
82
  }
83
83
  var It = Tt;
84
- const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
84
+ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
85
85
  const n = rt();
86
- M(() => {
86
+ z(() => {
87
87
  n.current = t;
88
- }, [t]), M(() => {
88
+ }, [t]), z(() => {
89
89
  function o() {
90
90
  n.current();
91
91
  }
@@ -99,21 +99,21 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
99
99
  return `${100 / t}%`;
100
100
  const r = n(e * (t === 1 ? 4 : 2));
101
101
  return `calc(${100 / t}% - ${r})`;
102
- }, st = N.div`
102
+ }, st = M.div`
103
103
  overflow-y: hidden;
104
104
  position: relative;
105
105
  width: 100%;
106
106
  height: 100%;
107
107
 
108
108
  ${ot}
109
- `, it = N(wt)(
110
- ({ disabled: t, withDarkUI: e, withNavigation: { desktop: n, mobile: o } }) => y`
109
+ `, it = M(wt)(
110
+ ({ disabled: t, withDarkUI: e, withNavigation: { desktop: n, mobile: o } }) => b`
111
111
  top: 50%;
112
112
  transform: translate3d(0, -50%, 0);
113
113
  z-index: ${o ? 1 : -1};
114
114
  display: ${o ? "flex" : "none"};
115
115
 
116
- ${!e && y`
116
+ ${!e && b`
117
117
  background-color: neutral-10 !important;
118
118
 
119
119
  &:hover {
@@ -126,13 +126,13 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
126
126
  display: ${n ? "flex" : "none"};
127
127
  }
128
128
 
129
- ${t && y`
129
+ ${t && b`
130
130
  opacity: 0;
131
131
  z-index: -1;
132
132
  `};
133
133
  `
134
- ), Nt = N.divBox(
135
- ({ withPagination: { desktop: t, mobile: e } }) => y`
134
+ ), Mt = M.divBox(
135
+ ({ withPagination: { desktop: t, mobile: e } }) => b`
136
136
  justify-content: center;
137
137
  position: absolute;
138
138
  bottom: 0;
@@ -147,20 +147,20 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
147
147
  display: ${t ? "flex" : "none"};
148
148
  }
149
149
  `
150
- ), Ft = N.div(
151
- ({ active: t, withDarkUI: e }) => y`
150
+ ), Ft = M.div(
151
+ ({ active: t, withDarkUI: e }) => b`
152
152
  height: 10;
153
153
  width: 10;
154
154
  border-radius: 50%;
155
155
  cursor: pointer;
156
156
  margin: 0 xxs;
157
157
  ${t ? Z("swipers.navigation.bullet.active") : Z("swipers.navigation.bullet.default")}
158
- ${e && y`
158
+ ${e && b`
159
159
  background-color: ${t ? "neutral-90" : "neutral-50"};
160
160
  `}
161
161
  ${ot}
162
162
  `
163
- ), _t = N.ulBox(({ fullWidth: t, slidesPerView: { desktop: e, mobile: n, tablet: o }, spaceBetween: r, theme: s }) => y`
163
+ ), _t = M.ulBox(({ fullWidth: t, slidesPerView: { desktop: e, mobile: n, tablet: o }, spaceBetween: r, theme: s }) => b`
164
164
  scroll-snap-type: x mandatory;
165
165
  display: flex;
166
166
  -webkit-overflow-scrolling: touch;
@@ -193,7 +193,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
193
193
  }
194
194
 
195
195
  @media (min-width: sm) {
196
- ${n && y`
196
+ ${n && b`
197
197
  > * {
198
198
  min-width: ${S(n, r, s.toRem)};
199
199
  max-width: ${S(n, r, s.toRem)};
@@ -206,7 +206,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
206
206
  }
207
207
 
208
208
  @media (min-width: md) {
209
- ${o && y`
209
+ ${o && b`
210
210
  > * {
211
211
  min-width: ${S(o, r, s.toRem)};
212
212
  max-width: ${S(o, r, s.toRem)};
@@ -219,7 +219,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
219
219
  }
220
220
 
221
221
  @media (min-width: lg) {
222
- ${e && y`
222
+ ${e && b`
223
223
  > * {
224
224
  min-width: ${S(e, r, s.toRem)};
225
225
  max-width: ${S(e, r, s.toRem)};
@@ -238,7 +238,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
238
238
  }
239
239
 
240
240
  @media (min-width: xl) {
241
- ${e && t && y`
241
+ ${e && t && b`
242
242
  > * {
243
243
  min-width: ${S(e + 2, r, s.toRem)};
244
244
  max-width: ${S(e + 2, r, s.toRem)};
@@ -257,10 +257,10 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
257
257
  navigationSize: w = "md",
258
258
  slidesPerView: h = { mobile: 1, tablet: 1, desktop: 1 },
259
259
  spaceBetween: C = 20,
260
- withDarkUI: b = !1,
260
+ withDarkUI: y = !1,
261
261
  withNavigation: R = { mobile: !0, desktop: !0 },
262
262
  withPagination: d = { mobile: !1, desktop: !1 }
263
- } = t, O = a || e, { width: v } = pt(), [L, p] = K(0), [T, I] = K(!1), [z, g] = K(!1), i = rt(), { screens: f } = mt(), x = ft(() => v <= f.md ? h.mobile : v <= f.lg ? h.tablet : v >= f["4xl"] && s ? h.desktop + 2 : h.desktop, [s, v, f, h]);
263
+ } = t, O = a || e, { width: v } = pt(), [L, p] = K(0), [T, I] = K(!1), [N, g] = K(!1), i = rt(), { screens: f } = mt(), x = ft(() => v <= f.md ? h.mobile : v <= f.lg ? h.tablet : v >= f["4xl"] && s ? h.desktop + 2 : h.desktop, [s, v, f, h]);
264
264
  return {
265
265
  centeredSlides: n,
266
266
  firstSlideToShow: r,
@@ -277,12 +277,12 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
277
277
  autoplay: e,
278
278
  shouldLoop: O,
279
279
  duration: o,
280
- withDarkUI: b,
280
+ withDarkUI: y,
281
281
  ref: i,
282
282
  setShowLeftArrow: I,
283
283
  setShowRightArrow: g,
284
284
  showLeftArrow: T,
285
- showRightArrow: z
285
+ showRightArrow: N
286
286
  };
287
287
  }, Dt = ({ children: t, dataTestId: e, store: n, ...o }) => {
288
288
  const {
@@ -293,7 +293,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
293
293
  duration: w,
294
294
  firstSlideToShow: h,
295
295
  fullWidth: C,
296
- id: b,
296
+ id: y,
297
297
  navigationSize: R,
298
298
  ref: d,
299
299
  setCurrentPage: O,
@@ -302,13 +302,13 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
302
302
  shouldLoop: p,
303
303
  showLeftArrow: T,
304
304
  showRightArrow: I,
305
- slidesPerView: z,
305
+ slidesPerView: N,
306
306
  spaceBetween: g,
307
307
  withDarkUI: i,
308
308
  withNavigation: f,
309
309
  withPagination: x
310
310
  } = n, W = Y.toArray(t).length, B = Math.ceil(W / a), j = Array.from(Array(B).keys()), J = c === 0, H = c === j.length - 1, at = Y.map(t, (m, l) => {
311
- const u = `${b}-${l}`, $ = l + 1, E = Math.ceil($ / a) - 1, P = H ? W - $ >= a : E !== c;
311
+ const u = `${y}-${l}`, $ = l + 1, E = Math.ceil($ / a) - 1, P = H ? W - $ >= a : E !== c;
312
312
  return ht(m, {
313
313
  ...m.props,
314
314
  id: u,
@@ -337,7 +337,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
337
337
  const { children: $, offsetWidth: E, scrollLeft: P, scrollWidth: _ } = m, ut = (u = (l = $ == null ? void 0 : $[0]) == null ? void 0 : l.getBoundingClientRect()) == null ? void 0 : u.width, Q = !(_ - (P + E) > g) ? j.length - 1 : Math.round(P / ((ut + g) * a));
338
338
  Q !== c && O(Q);
339
339
  }
340
- }, dt = zt(() => {
340
+ }, dt = Nt(() => {
341
341
  U(), ct();
342
342
  }, 100), k = D(
343
343
  (m, l = !1) => {
@@ -356,19 +356,19 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
356
356
  }, [c, k, H, p]), G = D(() => {
357
357
  k(J && p ? j.length - 1 : c - 1);
358
358
  }, [j.length, c, k, J, p]);
359
- return Mt(
359
+ return zt(
360
360
  () => {
361
361
  r && F();
362
362
  },
363
363
  r ? w : null
364
- ), M(() => {
364
+ ), z(() => {
365
365
  const m = (l) => {
366
366
  l.code === "ArrowLeft" && G(), l.code === "ArrowRight" && F();
367
367
  };
368
368
  return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
369
- }, [G, F]), M(() => {
369
+ }, [G, F]), z(() => {
370
370
  k(lt, !0);
371
- }, []), M(() => {
371
+ }, []), z(() => {
372
372
  U();
373
373
  }, [U, t]), /* @__PURE__ */ A.createElement(st, { "data-testid": e, ...o }, /* @__PURE__ */ A.createElement(
374
374
  _t,
@@ -376,13 +376,14 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
376
376
  fullWidth: C,
377
377
  onScroll: dt,
378
378
  ref: d,
379
- slidesPerView: z,
379
+ slidesPerView: N,
380
380
  spaceBetween: g
381
381
  },
382
382
  at
383
383
  ), /* @__PURE__ */ A.createElement(
384
384
  it,
385
385
  {
386
+ "aria-label": "Previous slide",
386
387
  "data-testid": e && `${e}-prev-button`,
387
388
  disabled: !T,
388
389
  left: 10,
@@ -398,6 +399,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
398
399
  ), /* @__PURE__ */ A.createElement(
399
400
  it,
400
401
  {
402
+ "aria-label": "Next slide",
401
403
  "data-testid": e && `${e}-next-button`,
402
404
  disabled: !I,
403
405
  onClick: F,
@@ -411,7 +413,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
411
413
  },
412
414
  /* @__PURE__ */ A.createElement(tt.Right, null)
413
415
  ), /* @__PURE__ */ A.createElement(
414
- Nt,
416
+ Mt,
415
417
  {
416
418
  className: "swiper-pagination",
417
419
  "data-testid": e && `${e}-pagination`,
@@ -422,7 +424,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
422
424
  const u = {
423
425
  idx: l,
424
426
  role: "tab",
425
- "aria-controls": `${b}-${l}`,
427
+ "aria-controls": `${y}-${l}`,
426
428
  "aria-label": `${l + 1} of ${j.length}`,
427
429
  "aria-selected": l === c,
428
430
  onClick: () => k(l)
package/dist/Text.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import p from "react";
3
- import f, { css as n, th as r, system as d } from "@xstyled/styled-components";
4
- import { forwardRef as b } from "./System.mjs";
5
- const x = {
2
+ import f from "react";
3
+ import b, { css as i, th as d, system as a } from "@xstyled/styled-components";
4
+ import { forwardRef as x } from "./System.mjs";
5
+ const g = {
6
6
  h0: "h1",
7
7
  h1: "h2",
8
8
  h2: "h3",
@@ -10,7 +10,7 @@ const x = {
10
10
  h4: "h5",
11
11
  h5: "h6",
12
12
  h6: "h6"
13
- }, g = (e) => n`
13
+ }, k = (e) => i`
14
14
  /* stylelint-disable-next-line value-no-vendor-prefix */
15
15
  display: -webkit-box;
16
16
  /* stylelint-disable-next-line property-no-vendor-prefix */
@@ -20,17 +20,18 @@ const x = {
20
20
  line-height: normal;
21
21
  overflow: hidden;
22
22
  word-break: ${e === 1 ? "break-all" : null};
23
- `, y = f.p(({ lines: e, theme: o, variant: t, withDash: s }) => {
24
- const l = x[t], h = t == null ? void 0 : t.startsWith("h"), i = e && e !== 1 / 0 && t.startsWith("h") && o.fonts.headings.includes("welcome-font");
25
- return n`
26
- ${r(`texts.${l || t}`)};
23
+ `, y = b.p(({ lines: e, theme: n, variant: t, withDash: s, wordBreak: l }) => {
24
+ const h = g[t], r = t == null ? void 0 : t.startsWith("h"), o = e && e !== 1 / 0 && t.startsWith("h") && n.fonts.headings.includes("welcome-font");
25
+ return i`
26
+ ${d(`texts.${h || t}`)};
27
+ word-break: ${l};
27
28
 
28
29
  /* Start fallback for non-webkit */
29
30
  display: block;
30
- ${e && e !== 1 / 0 && g(e)};
31
+ ${e && e !== 1 / 0 && k(e)};
31
32
  /* End fallback for non-webkit */
32
33
 
33
- ${s && h && n`
34
+ ${s && r && i`
34
35
  display: flex;
35
36
 
36
37
  &:before {
@@ -46,19 +47,19 @@ const x = {
46
47
  `}
47
48
 
48
49
  @media (min-width: lg) {
49
- ${r(`texts.${t}`)};
50
- ${d};
50
+ ${d(`texts.${t}`)};
51
+ ${a};
51
52
  }
52
53
 
53
- ${i && n`
54
+ ${o && i`
54
55
  & {
55
56
  line-height: 1.4;
56
57
  }
57
58
  `}
58
59
 
59
- ${d};
60
+ ${a};
60
61
  `;
61
- }), k = {
62
+ }), w = {
62
63
  h0: "h1",
63
64
  h1: "h1",
64
65
  h2: "h2",
@@ -72,26 +73,36 @@ const x = {
72
73
  xs: "p",
73
74
  "subtitle-md": "span",
74
75
  "subtitle-sm": "span"
75
- }, u = b(
76
- ({ as: e, children: o, dataTestId: t, lines: s, variant: l = "md", withDash: h, ...i }, a) => {
77
- const c = e || k[l], m = i.className || "";
78
- return /* @__PURE__ */ p.createElement(
76
+ }, $ = x(
77
+ ({
78
+ as: e,
79
+ children: n,
80
+ dataTestId: t,
81
+ lines: s,
82
+ variant: l = "md",
83
+ withDash: h,
84
+ wordBreak: r = "break-word",
85
+ ...o
86
+ }, c) => {
87
+ const m = e || w[l], p = o.className || "";
88
+ return /* @__PURE__ */ f.createElement(
79
89
  y,
80
90
  {
81
- as: c,
91
+ as: m,
82
92
  "data-testid": t,
83
93
  lines: s,
84
- ref: a,
94
+ ref: c,
85
95
  variant: l,
86
96
  withDash: h,
87
- ...i,
88
- className: `${m} wui-text`
97
+ wordBreak: r,
98
+ ...o,
99
+ className: `${p} wui-text`
89
100
  },
90
- o
101
+ n
91
102
  );
92
103
  }
93
104
  );
94
- u.displayName = "Text";
105
+ $.displayName = "Text";
95
106
  export {
96
- u as Text
107
+ $ as Text
97
108
  };
@@ -1,6 +1,6 @@
1
1
  import * as Ariakit from '@ariakit/react';
2
- export declare const Accordion: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
2
+ export declare const Accordion: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
3
3
  export declare const Icon: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
4
4
  export declare const Disclosure: import('styled-components').StyledComponent<(props: Ariakit.DisclosureProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, import('@xstyled/system').Theme, {}, never>;
5
5
  export declare const Content: import('styled-components').StyledComponent<({ unmountOnHide, ...props }: Ariakit.DisclosureContentProps) => import("react/jsx-runtime").JSX.Element | null, import('@xstyled/system').Theme, {}, never>;
6
- export declare const ContentChild: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
6
+ export declare const ContentChild: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
@@ -1,11 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { Theme } from '@xstyled/styled-components';
2
+ import { AvatarColors, Size } from './theme';
3
3
  import { ShapeOptions } from '../Shape';
4
4
  import { CreateWuiProps } from '../System';
5
- type SubColor = Theme['colors'];
6
- type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
7
5
  export interface AvatarOptions {
8
- color?: string | SubColor;
6
+ color?: AvatarColors;
9
7
  getInitials?: (name: string) => string;
10
8
  name: string;
11
9
  size?: Size;
@@ -13,4 +11,3 @@ export interface AvatarOptions {
13
11
  }
14
12
  export type AvatarProps = CreateWuiProps<'div', AvatarOptions & ShapeOptions>;
15
13
  export declare const Avatar: React.FC<AvatarProps>;
16
- export {};
@@ -1,9 +1,10 @@
1
1
  import { CSSObject } from '@xstyled/styled-components';
2
- import { ThemeValues } from '../../theme';
3
- type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
2
+ import { ThemeColorTokens, ThemeValues } from '../../theme';
3
+ import { LiteralUnion } from '../../utils';
4
+ export type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ export type AvatarColors = LiteralUnion<ThemeColorTokens>;
4
6
  export type ThemeAvatars = {
5
7
  sizes: Record<Size, string>;
6
8
  text: CSSObject;
7
9
  };
8
10
  export declare const getAvatars: (theme: ThemeValues) => ThemeAvatars;
9
- export {};
@@ -1,3 +1,3 @@
1
- import { Theme } from '@xstyled/styled-components';
2
- export declare function getColorByLength(colors: Theme['colors'], text?: string): string;
1
+ import { ThemeColorTokens } from '../../theme';
2
+ export declare function getColorByLength(colors: ThemeColorTokens, text?: string): string;
3
3
  export declare function getInitials(name?: string): string;
@@ -3,6 +3,6 @@ import { WuiProps } from '../System';
3
3
  export type StyledBadgeProps = Pick<BadgeOptions, 'disabled' | 'size' | 'variant'> & {
4
4
  length: number;
5
5
  };
6
- export declare const Badge: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, Pick<BadgeOptions, "size" | "disabled" | "variant"> & {
6
+ export declare const Badge: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, Pick<BadgeOptions, "disabled" | "size" | "variant"> & {
7
7
  length: number;
8
8
  } & WuiProps, never>;
@@ -1,11 +1,10 @@
1
1
  import { default as React } from 'react';
2
- import { Theme } from '@xstyled/styled-components';
3
2
  import { CreateWuiProps } from '../System';
4
- type Colors = Theme['colors'];
3
+ import { ThemeColorTokens } from '../../theme';
5
4
  export interface BreadcrumbOptions {
6
5
  children: React.ReactNode | React.ReactNode[];
7
6
  /** color from theme, add for scroll gradient on mobile */
8
- gradientBackground?: Colors;
7
+ gradientBackground?: ThemeColorTokens;
9
8
  /** set clickable or not the last child */
10
9
  lastChildNotClickable?: boolean;
11
10
  separator?: string | React.ReactNode;
@@ -15,4 +14,3 @@ export declare const BreadcrumbComponent: import('../System').CreateWuiComponent
15
14
  export declare const Breadcrumb: import('../System').CreateWuiComponent<"div", BreadcrumbProps> & {
16
15
  Item: import('../System').CreateWuiComponent<"a", import('./Item').ItemProps>;
17
16
  };
18
- export {};
@@ -1 +1 @@
1
- export declare const ButtonGroup: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, import('@xstyled/util').Props<import('@xstyled/system').Theme> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
1
+ export declare const ButtonGroup: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/util').Props<import('@xstyled/system').Theme> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
@@ -14,4 +14,4 @@ export interface CustomInputOptions {
14
14
  value?: string | null;
15
15
  }
16
16
  export type CustomInputProps = Omit<React.ComponentProps<'input'>, keyof CustomInputOptions> & CustomInputOptions;
17
- export declare const CustomInput: React.ForwardRefExoticComponent<Pick<CustomInputProps, "form" | "slot" | "style" | "title" | "pattern" | "type" | "name" | "hidden" | "color" | "multiple" | "disabled" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "width" | "height" | "max" | "min" | "crossOrigin" | "alt" | "list" | "src" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "step" | keyof CustomInputOptions> & React.RefAttributes<HTMLInputElement>>;
17
+ export declare const CustomInput: React.ForwardRefExoticComponent<Omit<CustomInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -4,6 +4,6 @@ export declare const StyledTimePicker: import('styled-components').StyledCompone
4
4
  export declare const CustomInput: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
5
5
  focused: Focused;
6
6
  }, never>;
7
- export declare const CustomHeader: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
8
- export declare const Selects: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
7
+ export declare const CustomHeader: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
8
+ export declare const Selects: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
9
9
  export declare const fixAriaMessageStyle: import('styled-components').FlattenSimpleInterpolation;
@@ -1,7 +1,7 @@
1
1
  import { DrawerOptions } from '.';
2
2
  import * as Ariakit from '@ariakit/react';
3
3
  export declare const Drawer: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme> & Pick<DrawerOptions, "size" | "placement">, never>;
4
- export declare const Backdrop: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {
4
+ export declare const Backdrop: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
5
5
  hideOnInteractOutside: Ariakit.DialogProps["hideOnInteractOutside"];
6
6
  }, never>;
7
7
  export declare const Title: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
@@ -1 +1 @@
1
- export declare const Item: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
1
+ export declare const Item: import('styled-components').StyledComponent<"button", import('@xstyled/system').Theme, {}, never>;
@@ -1 +1 @@
1
- export declare const Separator: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
1
+ export declare const Separator: import('styled-components').StyledComponent<"hr", import('@xstyled/system').Theme, {}, never>;
@@ -8,8 +8,8 @@ type StyledFieldProps = {
8
8
  withHintText?: boolean;
9
9
  };
10
10
  export declare const Field: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, StyledFieldProps, never>;
11
- export declare const Label: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
12
- export declare const LabelWithHint: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
11
+ export declare const Label: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
12
+ export declare const LabelWithHint: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
13
13
  type IconWrapperProps = {
14
14
  iconPlacement: 'left' | 'right';
15
15
  size?: DefaultFieldIconSize;
@@ -4,6 +4,6 @@ export interface StyledFileDropProps {
4
4
  isDragReject?: boolean;
5
5
  }
6
6
  export declare const FileDrop: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, StyledFileDropProps, never>;
7
- export declare const FilePreview: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
7
+ export declare const FilePreview: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
8
8
  export declare const ImagePreview: import('styled-components').StyledComponent<"img", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
9
- export declare const Actions: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {}, never>;
9
+ export declare const Actions: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {}, never>;
@@ -5,6 +5,6 @@ export interface HintOptions {
5
5
  }
6
6
  export type HintProps = CreateWuiProps<'div', HintOptions>;
7
7
  export declare const Hint: import('../System').CreateWuiComponent<"div", HintProps>;
8
- export declare const StyledHint: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {
8
+ export declare const StyledHint: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
9
9
  variant: HintOptions["variant"];
10
10
  }, never>;
@@ -1,4 +1,4 @@
1
1
  import { HintOptions } from '.';
2
- export declare const Hint: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, {
2
+ export declare const Hint: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, {
3
3
  variant: HintOptions["variant"];
4
4
  }, never>;