welcome-ui 8.1.0 → 8.2.0-alpha.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 (156) hide show
  1. package/dist/Alert.mjs +28 -28
  2. package/dist/Avatar.mjs +47 -44
  3. package/dist/Breadcrumb.mjs +169 -167
  4. package/dist/ButtonGroup.mjs +14 -14
  5. package/dist/Checkbox.mjs +1 -1
  6. package/dist/{CustomPopper-B2Cqfph4.mjs → CustomPopper-DezjKb9n.mjs} +12 -17
  7. package/dist/DatePicker.mjs +74 -74
  8. package/dist/DateTimePicker.mjs +60 -59
  9. package/dist/DateTimePickerCommon.mjs +1 -1
  10. package/dist/Drawer.mjs +51 -55
  11. package/dist/DropdownMenu.mjs +183 -183
  12. package/dist/Field.mjs +9 -10
  13. package/dist/FileDrop.mjs +455 -465
  14. package/dist/FileUpload.mjs +74 -81
  15. package/dist/Files.mjs +15 -15
  16. package/dist/InputText.mjs +42 -42
  17. package/dist/Label.mjs +1 -1
  18. package/dist/Modal.mjs +115 -119
  19. package/dist/Pagination.mjs +31 -29
  20. package/dist/PasswordInput.mjs +9 -9
  21. package/dist/Picker.mjs +23 -23
  22. package/dist/Radio.mjs +35 -35
  23. package/dist/RadioTab.mjs +1 -1
  24. package/dist/Search.mjs +123 -127
  25. package/dist/Select.mjs +301 -318
  26. package/dist/Slider.mjs +228 -224
  27. package/dist/Stack.mjs +15 -12
  28. package/dist/Swiper.mjs +126 -127
  29. package/dist/Tabs.mjs +1 -1
  30. package/dist/Tag.mjs +19 -19
  31. package/dist/Text.mjs +35 -37
  32. package/dist/Textarea.mjs +1 -1
  33. package/dist/TimePicker.mjs +61 -61
  34. package/dist/Toast.mjs +3 -3
  35. package/dist/Toggle.mjs +1 -1
  36. package/dist/Tooltip.mjs +1 -1
  37. package/dist/VariantIcon.mjs +14 -5
  38. package/dist/WuiProvider.mjs +35 -38
  39. package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  40. package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
  41. package/dist/{index-5HBq1O6Z.mjs → index-62h-enZF.mjs} +31 -31
  42. package/dist/index-BhcLigYU.mjs +77 -0
  43. package/dist/theme.mjs +23 -23
  44. package/dist/throttle-BDBzFeFj.mjs +13 -0
  45. package/dist/types/components/Accordion/styles.d.ts +2 -2
  46. package/dist/types/components/Accordion/theme.d.ts +1 -1
  47. package/dist/types/components/Alert/styles.d.ts +9 -9
  48. package/dist/types/components/Alert/theme.d.ts +3 -3
  49. package/dist/types/components/AspectRatio/styles.d.ts +2 -3
  50. package/dist/types/components/Avatar/index.d.ts +2 -1
  51. package/dist/types/components/Avatar/styles.d.ts +8 -8
  52. package/dist/types/components/Avatar/theme.d.ts +2 -2
  53. package/dist/types/components/Avatar/utils.d.ts +1 -1
  54. package/dist/types/components/Badge/styles.d.ts +4 -4
  55. package/dist/types/components/Badge/theme.d.ts +1 -1
  56. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  57. package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
  58. package/dist/types/components/Button/index.d.ts +1 -1
  59. package/dist/types/components/Button/styles.d.ts +1 -1
  60. package/dist/types/components/Button/theme.d.ts +3 -3
  61. package/dist/types/components/ButtonGroup/index.d.ts +2 -2
  62. package/dist/types/components/Card/Cover.styles.d.ts +4 -4
  63. package/dist/types/components/Card/theme.d.ts +1 -1
  64. package/dist/types/components/Checkbox/styles.d.ts +1 -1
  65. package/dist/types/components/Checkbox/theme.d.ts +1 -1
  66. package/dist/types/components/ClearButton/index.d.ts +4 -4
  67. package/dist/types/components/ClearButton/styles.d.ts +4 -4
  68. package/dist/types/components/CloseButton/styles.d.ts +4 -4
  69. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
  70. package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
  71. package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
  72. package/dist/types/components/Drawer/index.d.ts +5 -5
  73. package/dist/types/components/Drawer/styles.d.ts +4 -4
  74. package/dist/types/components/Drawer/theme.d.ts +2 -2
  75. package/dist/types/components/DropdownMenu/index.d.ts +1 -1
  76. package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
  77. package/dist/types/components/Field/utils.d.ts +1 -1
  78. package/dist/types/components/FileDrop/index.d.ts +4 -4
  79. package/dist/types/components/FileDrop/theme.d.ts +1 -1
  80. package/dist/types/components/FileUpload/index.d.ts +2 -2
  81. package/dist/types/components/Files/index.d.ts +3 -3
  82. package/dist/types/components/Files/types.d.ts +1 -1
  83. package/dist/types/components/Hint/theme.d.ts +1 -1
  84. package/dist/types/components/Icon/theme.d.ts +2 -2
  85. package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
  86. package/dist/types/components/Label/theme.d.ts +1 -1
  87. package/dist/types/components/Link/index.d.ts +2 -2
  88. package/dist/types/components/Link/styles.d.ts +4 -4
  89. package/dist/types/components/Link/theme.d.ts +1 -1
  90. package/dist/types/components/Loader/styles.d.ts +4 -4
  91. package/dist/types/components/Loader/theme.d.ts +2 -2
  92. package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -4
  93. package/dist/types/components/Modal/Assets/index.d.ts +8 -8
  94. package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
  95. package/dist/types/components/Modal/Close.d.ts +2 -2
  96. package/dist/types/components/Modal/Content.d.ts +5 -3
  97. package/dist/types/components/Modal/index.d.ts +10 -10
  98. package/dist/types/components/Modal/styles.d.ts +7 -7
  99. package/dist/types/components/Modal/theme.d.ts +1 -1
  100. package/dist/types/components/Pagination/theme.d.ts +1 -1
  101. package/dist/types/components/Picker/index.d.ts +1 -1
  102. package/dist/types/components/Picker/styles.d.ts +1 -1
  103. package/dist/types/components/Popover/styles.d.ts +4 -4
  104. package/dist/types/components/Popover/theme.d.ts +1 -1
  105. package/dist/types/components/Radio/index.d.ts +2 -2
  106. package/dist/types/components/Radio/styles.d.ts +5 -5
  107. package/dist/types/components/Radio/theme.d.ts +1 -1
  108. package/dist/types/components/RadioTab/index.d.ts +1 -1
  109. package/dist/types/components/RadioTab/styles.d.ts +10 -4
  110. package/dist/types/components/RadioTab/theme.d.ts +1 -1
  111. package/dist/types/components/Search/index.d.ts +1 -1
  112. package/dist/types/components/Select/index.d.ts +4 -4
  113. package/dist/types/components/Select/styles.d.ts +4 -4
  114. package/dist/types/components/Select/utils.d.ts +4 -8
  115. package/dist/types/components/Shape/styles.d.ts +3 -3
  116. package/dist/types/components/Slider/styles.d.ts +16 -16
  117. package/dist/types/components/Slider/theme.d.ts +1 -1
  118. package/dist/types/components/Swiper/index.d.ts +1 -1
  119. package/dist/types/components/Swiper/styles.d.ts +16 -16
  120. package/dist/types/components/Swiper/theme.d.ts +1 -1
  121. package/dist/types/components/System/index.d.ts +6 -6
  122. package/dist/types/components/Table/theme.d.ts +1 -1
  123. package/dist/types/components/Tabs/ActiveBar.d.ts +2 -2
  124. package/dist/types/components/Tabs/TabList.d.ts +2 -2
  125. package/dist/types/components/Tabs/styles.d.ts +2 -2
  126. package/dist/types/components/Tabs/theme.d.ts +1 -1
  127. package/dist/types/components/Tag/theme.d.ts +1 -1
  128. package/dist/types/components/Textarea/theme.d.ts +1 -1
  129. package/dist/types/components/Toast/ToastWrapper.d.ts +1 -1
  130. package/dist/types/components/Toast/index.d.ts +1 -1
  131. package/dist/types/components/Toast/styles.d.ts +14 -14
  132. package/dist/types/components/Toast/theme.d.ts +1 -1
  133. package/dist/types/components/Toggle/index.d.ts +2 -2
  134. package/dist/types/components/Toggle/styles.d.ts +4 -5
  135. package/dist/types/components/Toggle/theme.d.ts +1 -1
  136. package/dist/types/components/Tooltip/index.d.ts +2 -2
  137. package/dist/types/components/Tooltip/styles.d.ts +1 -1
  138. package/dist/types/components/Tooltip/theme.d.ts +1 -1
  139. package/dist/types/components/VariantIcon/theme.d.ts +1 -1
  140. package/dist/types/components/WuiProvider/font.d.ts +5 -3
  141. package/dist/types/components/WuiProvider/index.d.ts +1 -1
  142. package/dist/types/theme/colors.d.ts +9 -1
  143. package/dist/types/theme/defaultFields.d.ts +5 -5
  144. package/dist/types/theme/index.d.ts +2 -2
  145. package/dist/types/theme/screens.d.ts +7 -7
  146. package/dist/types/theme/space.d.ts +9 -9
  147. package/dist/types/theme/typography.d.ts +1 -1
  148. package/dist/types/utils/field-styles.d.ts +6 -6
  149. package/dist/types/utils/use-create-portal.d.ts +1 -1
  150. package/dist/types/utils/use-viewport.d.ts +2 -2
  151. package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
  152. package/dist/utils.mjs +29 -102
  153. package/dist/wrap-children-CzmhoRzd.mjs +13 -0
  154. package/package.json +2 -2
  155. package/dist/throttle-CW18pWlW.mjs +0 -13
  156. package/dist/wrap-children-DBSD-X5-.mjs +0 -9
@@ -1,63 +1,65 @@
1
1
  "use client";
2
- import { j as g } from "./jsx-runtime-B7I4PJ0H.mjs";
3
- import ge, { useRef as P, useState as j, Children as me, cloneElement as xe, useCallback as q, useMemo as we, useEffect as J } from "react";
2
+ import { j as b } from "./jsx-runtime-B7I4PJ0H.mjs";
3
+ import { useRef as P, useState as X, Children as ge, cloneElement as me, useCallback as j, useMemo as xe, useEffect as q } from "react";
4
4
  import "./Icon.mjs";
5
- import { R as ze } from "./index-CYmF7qCH.mjs";
6
- import { forwardRef as ie } from "./System.mjs";
7
- import { t as Oe } from "./throttle-CW18pWlW.mjs";
8
- import { Box as Re } from "./Box.mjs";
9
- import y, { th as O, css as oe } from "@xstyled/styled-components";
10
- import { h as ye } from "./hex-to-rgba-DU_XzKIK.mjs";
11
- var w = [], Ee = function() {
12
- return w.some(function(e) {
5
+ import { R as we } from "./index-CYmF7qCH.mjs";
6
+ import { forwardRef as ne } from "./System.mjs";
7
+ import { t as ze } from "./throttle-BDBzFeFj.mjs";
8
+ import { Box as Oe } from "./Box.mjs";
9
+ import y, { th as O, css as ie } from "@xstyled/styled-components";
10
+ import { h as Re } from "./hex-to-rgba-BIDK-3ab.mjs";
11
+ import "./overflow-ellipsis-DGV5Kgt-.mjs";
12
+ import "./index-BhcLigYU.mjs";
13
+ var x = [], ye = function() {
14
+ return x.some(function(e) {
13
15
  return e.activeTargets.length > 0;
14
16
  });
15
- }, Be = function() {
16
- return w.some(function(e) {
17
+ }, Ee = function() {
18
+ return x.some(function(e) {
17
19
  return e.skippedTargets.length > 0;
18
20
  });
19
- }, U = "ResizeObserver loop completed with undelivered notifications.", Te = function() {
21
+ }, J = "ResizeObserver loop completed with undelivered notifications.", Be = function() {
20
22
  var e;
21
23
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
22
- message: U
23
- }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = U), window.dispatchEvent(e);
24
+ message: J
25
+ }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = J), window.dispatchEvent(e);
24
26
  }, k;
25
27
  (function(e) {
26
28
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
27
29
  })(k || (k = {}));
28
- var z = function(e) {
30
+ var w = function(e) {
29
31
  return Object.freeze(e);
30
- }, Se = /* @__PURE__ */ function() {
32
+ }, Te = /* @__PURE__ */ function() {
31
33
  function e(t, r) {
32
- this.inlineSize = t, this.blockSize = r, z(this);
34
+ this.inlineSize = t, this.blockSize = r, w(this);
33
35
  }
34
36
  return e;
35
- }(), se = function() {
37
+ }(), oe = function() {
36
38
  function e(t, r, n, i) {
37
- return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, z(this);
39
+ return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, w(this);
38
40
  }
39
41
  return e.prototype.toJSON = function() {
40
- var t = this, r = t.x, n = t.y, i = t.top, a = t.right, o = t.bottom, l = t.left, v = t.width, c = t.height;
41
- return { x: r, y: n, top: i, right: a, bottom: o, left: l, width: v, height: c };
42
+ var t = this, r = t.x, n = t.y, i = t.top, s = t.right, o = t.bottom, v = t.left, l = t.width, c = t.height;
43
+ return { x: r, y: n, top: i, right: s, bottom: o, left: v, width: l, height: c };
42
44
  }, e.fromRect = function(t) {
43
45
  return new e(t.x, t.y, t.width, t.height);
44
46
  }, e;
45
- }(), V = function(e) {
47
+ }(), G = function(e) {
46
48
  return e instanceof SVGElement && "getBBox" in e;
47
- }, ae = function(e) {
48
- if (V(e)) {
49
+ }, se = function(e) {
50
+ if (G(e)) {
49
51
  var t = e.getBBox(), r = t.width, n = t.height;
50
52
  return !r && !n;
51
53
  }
52
- var i = e, a = i.offsetWidth, o = i.offsetHeight;
53
- return !(a || o || e.getClientRects().length);
54
- }, Y = function(e) {
54
+ var i = e, s = i.offsetWidth, o = i.offsetHeight;
55
+ return !(s || o || e.getClientRects().length);
56
+ }, U = function(e) {
55
57
  var t;
56
58
  if (e instanceof Element)
57
59
  return !0;
58
60
  var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
59
61
  return !!(r && e instanceof r.Element);
60
- }, Ce = function(e) {
62
+ }, Se = function(e) {
61
63
  switch (e.tagName) {
62
64
  case "INPUT":
63
65
  if (e.type !== "image")
@@ -72,59 +74,59 @@ var z = function(e) {
72
74
  return !0;
73
75
  }
74
76
  return !1;
75
- }, C = typeof window < "u" ? window : {}, M = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, ke = /^tb|vertical/, De = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
77
+ }, C = typeof window < "u" ? window : {}, I = /* @__PURE__ */ new WeakMap(), Y = /auto|scroll/, Ce = /^tb|vertical/, ke = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
76
78
  return parseFloat(e || "0");
77
79
  }, R = function(e, t, r) {
78
- return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Se((r ? t : e) || 0, (r ? e : t) || 0);
79
- }, Q = z({
80
+ return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Te((r ? t : e) || 0, (r ? e : t) || 0);
81
+ }, K = w({
80
82
  devicePixelContentBoxSize: R(),
81
83
  borderBoxSize: R(),
82
84
  contentBoxSize: R(),
83
- contentRect: new se(0, 0, 0, 0)
84
- }), ce = function(e, t) {
85
- if (t === void 0 && (t = !1), M.has(e) && !t)
86
- return M.get(e);
87
- if (ae(e))
88
- return M.set(e, Q), Q;
89
- var r = getComputedStyle(e), n = V(e) && e.ownerSVGElement && e.getBBox(), i = !De && r.boxSizing === "border-box", a = ke.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), v = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), E = n ? 0 : f(r.paddingBottom), d = n ? 0 : f(r.paddingLeft), W = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), I = n ? 0 : f(r.borderBottomWidth), $ = n ? 0 : f(r.borderLeftWidth), B = d + c, m = v + E, T = $ + D, S = W + I, s = l ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, p = i ? B + T : 0, x = i ? m + S : 0, h = n ? n.width : f(r.width) - p - u, b = n ? n.height : f(r.height) - x - s, _ = h + B + u + T, be = b + m + s + S, X = z({
90
- devicePixelContentBoxSize: R(Math.round(h * devicePixelRatio), Math.round(b * devicePixelRatio), a),
91
- borderBoxSize: R(_, be, a),
92
- contentBoxSize: R(h, b, a),
93
- contentRect: new se(d, v, h, b)
85
+ contentRect: new oe(0, 0, 0, 0)
86
+ }), ae = function(e, t) {
87
+ if (t === void 0 && (t = !1), I.has(e) && !t)
88
+ return I.get(e);
89
+ if (se(e))
90
+ return I.set(e, K), K;
91
+ var r = getComputedStyle(e), n = G(e) && e.ownerSVGElement && e.getBBox(), i = !ke && r.boxSizing === "border-box", s = Ce.test(r.writingMode || ""), o = !n && Y.test(r.overflowY || ""), v = !n && Y.test(r.overflowX || ""), l = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), E = n ? 0 : f(r.paddingBottom), d = n ? 0 : f(r.paddingLeft), W = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), A = n ? 0 : f(r.borderBottomWidth), $ = n ? 0 : f(r.borderLeftWidth), B = d + c, g = l + E, T = $ + D, S = W + A, a = v ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, h = i ? B + T : 0, m = i ? g + S : 0, p = n ? n.width : f(r.width) - h - u, z = n ? n.height : f(r.height) - m - a, pe = p + B + u + T, be = z + g + a + S, V = w({
92
+ devicePixelContentBoxSize: R(Math.round(p * devicePixelRatio), Math.round(z * devicePixelRatio), s),
93
+ borderBoxSize: R(pe, be, s),
94
+ contentBoxSize: R(p, z, s),
95
+ contentRect: new oe(d, l, p, z)
94
96
  });
95
- return M.set(e, X), X;
96
- }, ue = function(e, t, r) {
97
- var n = ce(e, r), i = n.borderBoxSize, a = n.contentBoxSize, o = n.devicePixelContentBoxSize;
97
+ return I.set(e, V), V;
98
+ }, ce = function(e, t, r) {
99
+ var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, o = n.devicePixelContentBoxSize;
98
100
  switch (t) {
99
101
  case k.DEVICE_PIXEL_CONTENT_BOX:
100
102
  return o;
101
103
  case k.BORDER_BOX:
102
104
  return i;
103
105
  default:
104
- return a;
106
+ return s;
105
107
  }
106
- }, Ie = /* @__PURE__ */ function() {
108
+ }, De = /* @__PURE__ */ function() {
107
109
  function e(t) {
108
- var r = ce(t);
109
- this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = z([r.borderBoxSize]), this.contentBoxSize = z([r.contentBoxSize]), this.devicePixelContentBoxSize = z([r.devicePixelContentBoxSize]);
110
+ var r = ae(t);
111
+ this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = w([r.borderBoxSize]), this.contentBoxSize = w([r.contentBoxSize]), this.devicePixelContentBoxSize = w([r.devicePixelContentBoxSize]);
110
112
  }
111
113
  return e;
112
- }(), le = function(e) {
113
- if (ae(e))
114
+ }(), ue = function(e) {
115
+ if (se(e))
114
116
  return 1 / 0;
115
117
  for (var t = 0, r = e.parentNode; r; )
116
118
  t += 1, r = r.parentNode;
117
119
  return t;
118
- }, Me = function() {
120
+ }, Ae = function() {
119
121
  var e = 1 / 0, t = [];
120
- w.forEach(function(o) {
122
+ x.forEach(function(o) {
121
123
  if (o.activeTargets.length !== 0) {
122
- var l = [];
124
+ var v = [];
123
125
  o.activeTargets.forEach(function(c) {
124
- var E = new Ie(c.target), d = le(c.target);
125
- l.push(E), c.lastReportedSize = ue(c.target, c.observedBox), d < e && (e = d);
126
+ var E = new De(c.target), d = ue(c.target);
127
+ v.push(E), c.lastReportedSize = ce(c.target, c.observedBox), d < e && (e = d);
126
128
  }), t.push(function() {
127
- o.callback.call(o.observer, l, o.observer);
129
+ o.callback.call(o.observer, v, o.observer);
128
130
  }), o.activeTargets.splice(0, o.activeTargets.length);
129
131
  }
130
132
  });
@@ -133,38 +135,38 @@ var z = function(e) {
133
135
  i();
134
136
  }
135
137
  return e;
136
- }, Z = function(e) {
137
- w.forEach(function(r) {
138
+ }, Q = function(e) {
139
+ x.forEach(function(r) {
138
140
  r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
139
- i.isActive() && (le(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
141
+ i.isActive() && (ue(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
140
142
  });
141
143
  });
142
- }, Ae = function() {
144
+ }, Ie = function() {
143
145
  var e = 0;
144
- for (Z(e); Ee(); )
145
- e = Me(), Z(e);
146
- return Be() && Te(), e > 0;
147
- }, F, ve = [], Le = function() {
146
+ for (Q(e); ye(); )
147
+ e = Ae(), Q(e);
148
+ return Ee() && Be(), e > 0;
149
+ }, _, ve = [], Me = function() {
148
150
  return ve.splice(0).forEach(function(e) {
149
151
  return e();
150
152
  });
151
- }, Ne = function(e) {
152
- if (!F) {
153
+ }, Le = function(e) {
154
+ if (!_) {
153
155
  var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
154
156
  new MutationObserver(function() {
155
- return Le();
156
- }).observe(r, n), F = function() {
157
+ return Me();
158
+ }).observe(r, n), _ = function() {
157
159
  r.textContent = "".concat(t ? t-- : t++);
158
160
  };
159
161
  }
160
- ve.push(e), F();
161
- }, We = function(e) {
162
- Ne(function() {
162
+ ve.push(e), _();
163
+ }, Ne = function(e) {
164
+ Le(function() {
163
165
  requestAnimationFrame(e);
164
166
  });
165
- }, N = 0, $e = function() {
167
+ }, N = 0, We = function() {
166
168
  return !!N;
167
- }, _e = 250, Pe = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, ee = [
169
+ }, $e = 250, Pe = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, Z = [
168
170
  "resize",
169
171
  "load",
170
172
  "transitionend",
@@ -179,9 +181,9 @@ var z = function(e) {
179
181
  "mouseout",
180
182
  "blur",
181
183
  "focus"
182
- ], te = function(e) {
184
+ ], ee = function(e) {
183
185
  return e === void 0 && (e = 0), Date.now() + e;
184
- }, H = !1, Fe = function() {
186
+ }, F = !1, _e = function() {
185
187
  function e() {
186
188
  var t = this;
187
189
  this.stopped = !0, this.listener = function() {
@@ -190,15 +192,15 @@ var z = function(e) {
190
192
  }
191
193
  return e.prototype.run = function(t) {
192
194
  var r = this;
193
- if (t === void 0 && (t = _e), !H) {
194
- H = !0;
195
- var n = te(t);
196
- We(function() {
195
+ if (t === void 0 && (t = $e), !F) {
196
+ F = !0;
197
+ var n = ee(t);
198
+ Ne(function() {
197
199
  var i = !1;
198
200
  try {
199
- i = Ae();
201
+ i = Ie();
200
202
  } finally {
201
- if (H = !1, t = n - te(), !$e())
203
+ if (F = !1, t = n - ee(), !We())
202
204
  return;
203
205
  i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
204
206
  }
@@ -213,20 +215,20 @@ var z = function(e) {
213
215
  document.body ? r() : C.addEventListener("DOMContentLoaded", r);
214
216
  }, e.prototype.start = function() {
215
217
  var t = this;
216
- this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), ee.forEach(function(r) {
218
+ this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), Z.forEach(function(r) {
217
219
  return C.addEventListener(r, t.listener, !0);
218
220
  }));
219
221
  }, e.prototype.stop = function() {
220
222
  var t = this;
221
- this.stopped || (this.observer && this.observer.disconnect(), ee.forEach(function(r) {
223
+ this.stopped || (this.observer && this.observer.disconnect(), Z.forEach(function(r) {
222
224
  return C.removeEventListener(r, t.listener, !0);
223
225
  }), this.stopped = !0);
224
226
  }, e;
225
- }(), G = new Fe(), re = function(e) {
226
- !N && e > 0 && G.start(), N += e, !N && G.stop();
227
- }, He = function(e) {
228
- return !V(e) && !Ce(e) && getComputedStyle(e).display === "inline";
229
- }, Ge = function() {
227
+ }(), H = new _e(), te = function(e) {
228
+ !N && e > 0 && H.start(), N += e, !N && H.stop();
229
+ }, Fe = function(e) {
230
+ return !G(e) && !Se(e) && getComputedStyle(e).display === "inline";
231
+ }, He = function() {
230
232
  function e(t, r) {
231
233
  this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
232
234
  inlineSize: 0,
@@ -234,15 +236,15 @@ var z = function(e) {
234
236
  };
235
237
  }
236
238
  return e.prototype.isActive = function() {
237
- var t = ue(this.target, this.observedBox, !0);
238
- return He(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
239
+ var t = ce(this.target, this.observedBox, !0);
240
+ return Fe(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
239
241
  }, e;
240
- }(), Ve = /* @__PURE__ */ function() {
242
+ }(), Ge = /* @__PURE__ */ function() {
241
243
  function e(t, r) {
242
244
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
243
245
  }
244
246
  return e;
245
- }(), A = /* @__PURE__ */ new WeakMap(), ne = function(e, t) {
247
+ }(), M = /* @__PURE__ */ new WeakMap(), re = function(e, t) {
246
248
  for (var r = 0; r < e.length; r += 1)
247
249
  if (e[r].target === t)
248
250
  return r;
@@ -251,21 +253,21 @@ var z = function(e) {
251
253
  function e() {
252
254
  }
253
255
  return e.connect = function(t, r) {
254
- var n = new Ve(t, r);
255
- A.set(t, n);
256
+ var n = new Ge(t, r);
257
+ M.set(t, n);
256
258
  }, e.observe = function(t, r, n) {
257
- var i = A.get(t), a = i.observationTargets.length === 0;
258
- ne(i.observationTargets, r) < 0 && (a && w.push(i), i.observationTargets.push(new Ge(r, n && n.box)), re(1), G.schedule());
259
+ var i = M.get(t), s = i.observationTargets.length === 0;
260
+ re(i.observationTargets, r) < 0 && (s && x.push(i), i.observationTargets.push(new He(r, n && n.box)), te(1), H.schedule());
259
261
  }, e.unobserve = function(t, r) {
260
- var n = A.get(t), i = ne(n.observationTargets, r), a = n.observationTargets.length === 1;
261
- i >= 0 && (a && w.splice(w.indexOf(n), 1), n.observationTargets.splice(i, 1), re(-1));
262
+ var n = M.get(t), i = re(n.observationTargets, r), s = n.observationTargets.length === 1;
263
+ i >= 0 && (s && x.splice(x.indexOf(n), 1), n.observationTargets.splice(i, 1), te(-1));
262
264
  }, e.disconnect = function(t) {
263
- var r = this, n = A.get(t);
265
+ var r = this, n = M.get(t);
264
266
  n.observationTargets.slice().forEach(function(i) {
265
267
  return r.unobserve(t, i.target);
266
268
  }), n.activeTargets.splice(0, n.activeTargets.length);
267
269
  }, e;
268
- }(), Xe = function() {
270
+ }(), Ve = function() {
269
271
  function e(t) {
270
272
  if (arguments.length === 0)
271
273
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
@@ -276,13 +278,13 @@ var z = function(e) {
276
278
  return e.prototype.observe = function(t, r) {
277
279
  if (arguments.length === 0)
278
280
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
279
- if (!Y(t))
281
+ if (!U(t))
280
282
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
281
283
  L.observe(this, t, r);
282
284
  }, e.prototype.unobserve = function(t) {
283
285
  if (arguments.length === 0)
284
286
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
285
- if (!Y(t))
287
+ if (!U(t))
286
288
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
287
289
  L.unobserve(this, t);
288
290
  }, e.prototype.disconnect = function() {
@@ -291,7 +293,7 @@ var z = function(e) {
291
293
  return "function ResizeObserver () { [polyfill code] }";
292
294
  }, e;
293
295
  }();
294
- const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
296
+ const Xe = (e, t, r) => Math.min(Math.max(e, t), r), je = y.aBox`
295
297
  ${O("breadcrumbs.item.default")};
296
298
  align-items: center;
297
299
  transition: medium;
@@ -309,15 +311,15 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
309
311
  pointer-events: none;
310
312
  cursor: default;
311
313
  }
312
- `, Je = y.spanBox`
314
+ `, qe = y.spanBox`
313
315
  ${O("breadcrumbs.separator")};
314
316
  display: flex;
315
317
  align-items: center;
316
- `, Ue = ie(
317
- ({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, a) => {
318
+ `, Je = ne(
319
+ ({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, s) => {
318
320
  const o = i.href || i.to;
319
- return /* @__PURE__ */ g.jsxs(
320
- Re,
321
+ return /* @__PURE__ */ b.jsxs(
322
+ Oe,
321
323
  {
322
324
  "aria-label": "breadcrumb",
323
325
  as: "li",
@@ -326,14 +328,14 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
326
328
  flex: "0 0 auto",
327
329
  lineHeight: "normal",
328
330
  children: [
329
- n ? /* @__PURE__ */ g.jsx(Je, { role: "presentation", children: n }) : null,
330
- /* @__PURE__ */ g.jsx(
331
- qe,
331
+ n ? /* @__PURE__ */ b.jsx(qe, { role: "presentation", children: n }) : null,
332
+ /* @__PURE__ */ b.jsx(
333
+ je,
332
334
  {
333
335
  "aria-current": r ? "page" : void 0,
334
336
  "aria-disabled": !o,
335
337
  ...i,
336
- ref: a,
338
+ ref: s,
337
339
  children: e
338
340
  }
339
341
  )
@@ -341,32 +343,32 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
341
343
  }
342
344
  );
343
345
  }
344
- ), de = y.spanBox(
345
- ({ gradientBackground: e, theme: t }) => oe`
346
+ ), le = y.spanBox(
347
+ ({ gradientBackground: e, theme: t }) => ie`
346
348
  left: 0;
347
- background-image: ${he(t, e)};
349
+ background-image: ${fe(t, e)};
348
350
  transform-origin: left;
349
351
  `
350
- ), fe = y.spanBox(
351
- ({ gradientBackground: e, theme: t }) => oe`
352
+ ), de = y.spanBox(
353
+ ({ gradientBackground: e, theme: t }) => ie`
352
354
  right: 0;
353
- background-image: ${he(t, e, "left")};
355
+ background-image: ${fe(t, e, "left")};
354
356
  transform-origin: right;
355
357
  `
356
- ), Ye = y.divBox`
358
+ ), Ue = y.divBox`
357
359
  ${O("breadcrumbs.list")};
358
360
  height: 100%;
359
361
  position: relative;
360
362
  overflow-x: hidden;
361
363
 
362
- ${de},
363
- ${fe} {
364
+ ${le},
365
+ ${de} {
364
366
  position: absolute;
365
367
  bottom: 0;
366
368
  top: 0;
367
369
  width: 30;
368
370
  }
369
- `, Ke = y.olBox`
371
+ `, Ye = y.olBox`
370
372
  display: inline-flex;
371
373
  align-items: center;
372
374
  max-width: 100%;
@@ -376,72 +378,72 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
376
378
  padding: 0;
377
379
  list-style: none;
378
380
  white-space: nowrap;
379
- `, he = (e, t, r = "right") => {
380
- const n = O(`colors.${t}`)({ theme: e }), i = ye(n, 0);
381
+ `, fe = (e, t, r = "right") => {
382
+ const n = O(`colors.${t}`)({ theme: e }), i = Re(n, 0);
381
383
  return `linear-gradient(to ${r}, ${n}, ${i} 100%)`;
382
- }, pe = ie(
384
+ }, he = ne(
383
385
  ({
384
386
  children: e,
385
387
  gradientBackground: t = "neutral-10",
386
388
  lastChildNotClickable: r = !0,
387
- separator: n = /* @__PURE__ */ g.jsx(ze, { size: "xs" }),
389
+ separator: n = /* @__PURE__ */ b.jsx(we, { size: "xs" }),
388
390
  ...i
389
- }, a) => {
390
- const o = P(null), l = P(null), v = P(null), [c, E] = j(!1), [d, W] = j(0), D = me.toArray(e).filter(Boolean), I = D.length, $ = D.map((s, u) => {
391
- const p = I === 1 || I === u + 1, x = p && r;
392
- return ge.isValidElement(s) ? xe(s, {
393
- isActive: x,
391
+ }, s) => {
392
+ const o = P(null), v = P(), l = P(), [c, E] = X(!1), [d, W] = X(0), D = ge.toArray(e).filter(Boolean), A = D.length, $ = D.map((a, u) => {
393
+ const h = A === 1 || A === u + 1;
394
+ return me(a, {
395
+ isActive: h && r,
394
396
  key: `breadcrumb-${u}`,
395
- separator: p ? void 0 : n,
396
- ...s.props
397
- }) : s;
397
+ separator: h ? void 0 : n,
398
+ ...a.props
399
+ });
398
400
  });
399
- function B(s, u) {
400
- s && (s.style.transform = `scale3d(${u}, 1, 1)`);
401
+ function B(a, u) {
402
+ a && (a.style.transform = `scale3d(${u}, 1, 1)`);
401
403
  }
402
- const m = q((s) => {
403
- const u = 1 - s;
404
- B(l.current, u), B(v.current, s);
405
- }, []), T = q(() => {
406
- const { current: s } = o;
407
- if (!s) return;
408
- const { offsetWidth: u, scrollLeft: p, scrollWidth: x } = s, h = x - u, _ = je(Math.abs(p - d), 0, h) / h;
409
- m(_);
410
- }, [d, m]), S = we(
411
- () => Oe(
412
- (...s) => {
413
- const u = s[0], [
404
+ const g = j((a) => {
405
+ const u = 1 - a;
406
+ B(v.current, u), B(l.current, a);
407
+ }, []), T = j(() => {
408
+ const {
409
+ current: { offsetWidth: a, scrollLeft: u, scrollWidth: h }
410
+ } = o, m = h - a, z = Xe(Math.abs(u - d), 0, m) / m;
411
+ g(z);
412
+ }, [d, g]), S = xe(
413
+ () => ze(
414
+ (a) => {
415
+ const [
414
416
  {
415
417
  // Is offsetWidth really needed ?
416
418
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
417
419
  // @ts-ignore
418
- target: { offsetWidth: p, scrollLeft: x, scrollWidth: h }
420
+ target: { offsetWidth: u, scrollLeft: h, scrollWidth: m }
419
421
  }
420
- ] = u, b = h - p;
421
- d || W(x === 0 ? 0 : b), E(b > 0);
422
+ ] = a, p = m - u;
423
+ d || W(h === 0 ? 0 : p), E(p > 0);
422
424
  },
423
425
  300,
424
426
  !1
425
427
  ),
426
428
  [d]
427
429
  );
428
- return J(() => {
429
- const s = new Xe(S);
430
- return o.current && s.observe(o.current), () => s.disconnect();
431
- }, []), J(() => {
432
- l.current && v.current && m(0);
433
- }, [c, m]), /* @__PURE__ */ g.jsxs(Ye, { as: "nav", ref: a, ...i, children: [
434
- c ? /* @__PURE__ */ g.jsx(de, { gradientBackground: t, ref: l }) : null,
435
- /* @__PURE__ */ g.jsx(Ke, { dir: "rtl", onScroll: T, ref: o, children: $.reverse() }),
436
- c ? /* @__PURE__ */ g.jsx(fe, { gradientBackground: t, ref: v }) : null
430
+ return q(() => {
431
+ const a = new Ve(S);
432
+ return a.observe(o.current), () => a.disconnect();
433
+ }, []), q(() => {
434
+ v.current && l.current && g(0);
435
+ }, [c, g]), /* @__PURE__ */ b.jsxs(Ue, { as: "nav", ref: s, ...i, children: [
436
+ c ? /* @__PURE__ */ b.jsx(le, { gradientBackground: t, ref: v }) : null,
437
+ /* @__PURE__ */ b.jsx(Ye, { dir: "rtl", onScroll: T, ref: o, children: $.reverse() }),
438
+ c ? /* @__PURE__ */ b.jsx(de, { gradientBackground: t, ref: l }) : null
437
439
  ] });
438
440
  }
439
441
  );
440
- pe.displayName = "Breadcrumb";
441
- const at = Object.assign(pe, {
442
- Item: Ue
442
+ he.displayName = "Breadcrumb";
443
+ const ct = Object.assign(he, {
444
+ Item: Je
443
445
  });
444
446
  export {
445
- at as Breadcrumb,
446
- pe as BreadcrumbComponent
447
+ ct as Breadcrumb,
448
+ he as BreadcrumbComponent
447
449
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { j as p } from "./jsx-runtime-B7I4PJ0H.mjs";
3
- import d, { Children as m, cloneElement as u } from "react";
4
- import { forwardRef as f } from "./System.mjs";
5
- import b from "@xstyled/styled-components";
6
- const x = b.divBox`
2
+ import { j as l } from "./jsx-runtime-B7I4PJ0H.mjs";
3
+ import { Children as d, cloneElement as m } from "react";
4
+ import { forwardRef as u } from "./System.mjs";
5
+ import f from "@xstyled/styled-components";
6
+ const b = f.divBox`
7
7
  display: inline-flex;
8
8
  flex-wrap: wrap;
9
9
  align-items: center;
@@ -32,19 +32,19 @@ const x = b.divBox`
32
32
  }
33
33
  }
34
34
  }
35
- `, B = f(
36
- ({ children: t, dataTestId: o, disabled: e, size: i, variant: s }, a) => {
37
- function n(l) {
38
- return m.toArray(l).filter(Boolean).map((r) => d.isValidElement(r) ? u(r, {
35
+ `, y = u(
36
+ ({ children: t, dataTestId: o, disabled: i, size: e, variant: s }, a) => {
37
+ function n(p) {
38
+ return d.toArray(p).filter(Boolean).map((r) => m(r, {
39
39
  ...r.props,
40
- disabled: e || r.props.disabled,
41
- size: i || r.props.size,
40
+ disabled: i || r.props.disabled,
41
+ size: e || r.props.size,
42
42
  variant: s || r.props.variant
43
- }) : r);
43
+ }));
44
44
  }
45
- return /* @__PURE__ */ p.jsx(x, { "data-testid": o, ref: a, children: n(t) });
45
+ return /* @__PURE__ */ l.jsx(b, { "data-testid": o, ref: a, children: n(t) });
46
46
  }
47
47
  );
48
48
  export {
49
- B as ButtonGroup
49
+ y as ButtonGroup
50
50
  };
package/dist/Checkbox.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./jsx-runtime-B7I4PJ0H.mjs";
2
2
  import "./System.mjs";
3
- import { a as t } from "./index-5HBq1O6Z.mjs";
3
+ import { a as t } from "./index-62h-enZF.mjs";
4
4
  export {
5
5
  t as Checkbox
6
6
  };