@cfx-dev/ui-components 4.2.24 → 4.3.1

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 (176) hide show
  1. package/dist/Combination-CSgOhzm-.js +2198 -0
  2. package/dist/Combination-N-vN9BB-.js +823 -0
  3. package/dist/Table.module-DHI1mXN2.js +17 -0
  4. package/dist/assets/all_css.css +1 -0
  5. package/dist/assets/css/Checkbox.css +1 -1
  6. package/dist/assets/css/DataTable.css +1 -0
  7. package/dist/assets/css/Table.css +1 -1
  8. package/dist/assets/general/global.css +1 -1
  9. package/dist/cfxIcons-B9nzO6TW.js +98 -0
  10. package/dist/components/Accordion/Accordion.js +25 -26
  11. package/dist/components/Accordion/AccordionShowcase.js +1 -1
  12. package/dist/components/Avatar/Avatar.d.ts +2 -1
  13. package/dist/components/Avatar/Avatar.js +21 -20
  14. package/dist/components/Avatar/AvatarShowcase.js +1 -1
  15. package/dist/components/Badge/Badge.d.ts +2 -1
  16. package/dist/components/Badge/Badge.js +29 -29
  17. package/dist/components/Badge/BadgeShowcase.js +1 -1
  18. package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
  19. package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
  20. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
  21. package/dist/components/Button/Button.d.ts +5 -2
  22. package/dist/components/Button/Button.js +83 -81
  23. package/dist/components/Button/ButtonShowcase.js +2 -2
  24. package/dist/components/Button/LinkButton.d.ts +1 -1
  25. package/dist/components/Button/LinkButton.js +18 -17
  26. package/dist/components/Button/index.d.ts +1 -1
  27. package/dist/components/Button/index.js +7 -7
  28. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  29. package/dist/components/Checkbox/Checkbox.js +154 -242
  30. package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
  31. package/dist/components/ControlBox/ControlBox.d.ts +3 -2
  32. package/dist/components/ControlBox/ControlBox.js +13 -10
  33. package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
  34. package/dist/components/CountryFlag/CountryFlag.js +14 -11
  35. package/dist/components/DataTable/DataTable.d.ts +40 -0
  36. package/dist/components/DataTable/DataTable.js +163 -0
  37. package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
  38. package/dist/components/DataTable/DataTableShowcase.js +60 -0
  39. package/dist/components/DataTable/index.d.ts +2 -0
  40. package/dist/components/DataTable/index.js +6 -0
  41. package/dist/components/Decorate/Decorate.d.ts +3 -2
  42. package/dist/components/Decorate/Decorate.js +19 -15
  43. package/dist/components/Dot/Dot.d.ts +2 -1
  44. package/dist/components/Dot/Dot.js +15 -13
  45. package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
  46. package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
  47. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
  48. package/dist/components/Flyout/Flyout.d.ts +2 -1
  49. package/dist/components/Flyout/Flyout.js +22 -20
  50. package/dist/components/Icon/Icon.d.ts +2 -1
  51. package/dist/components/Icon/Icon.js +19 -17
  52. package/dist/components/IconBig/IconBig.d.ts +2 -1
  53. package/dist/components/IconBig/IconBig.js +16 -14
  54. package/dist/components/Icons/IconsShowcase.js +1 -1
  55. package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
  56. package/dist/components/Icons/cfx-icons/Radio.js +36 -0
  57. package/dist/components/Icons/cfx-icons/Square.js +15 -9
  58. package/dist/components/Icons/cfxIcons.d.ts +1 -0
  59. package/dist/components/Icons/cfxIcons.js +62 -60
  60. package/dist/components/Icons/index.js +1 -1
  61. package/dist/components/Indicator/Indicator.js +9 -10
  62. package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
  63. package/dist/components/Input/Input.d.ts +4 -1
  64. package/dist/components/Input/Input.js +101 -88
  65. package/dist/components/Input/InputShowcase.js +1 -1
  66. package/dist/components/Input/RichInput.d.ts +2 -1
  67. package/dist/components/Input/RichInput.js +37 -34
  68. package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
  69. package/dist/components/InputDropzone/InputDropzone.js +1723 -625
  70. package/dist/components/Interactive/Interactive.d.ts +2 -1
  71. package/dist/components/Interactive/Interactive.js +14 -12
  72. package/dist/components/Island/Island.d.ts +2 -1
  73. package/dist/components/Island/Island.js +24 -24
  74. package/dist/components/Layout/Box/Box.d.ts +8 -2
  75. package/dist/components/Layout/Box/Box.js +53 -51
  76. package/dist/components/Layout/Box/Box.types.d.ts +22 -0
  77. package/dist/components/Layout/Box/Box.types.js +4 -0
  78. package/dist/components/Layout/Box/index.d.ts +1 -1
  79. package/dist/components/Layout/Box/index.js +3 -3
  80. package/dist/components/Layout/Center/Center.d.ts +2 -1
  81. package/dist/components/Layout/Center/Center.js +19 -18
  82. package/dist/components/Layout/Flex/Flex.d.ts +6 -10
  83. package/dist/components/Layout/Flex/Flex.js +53 -64
  84. package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
  85. package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
  86. package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
  87. package/dist/components/Layout/Flex/index.d.ts +2 -2
  88. package/dist/components/Layout/Flex/index.js +8 -8
  89. package/dist/components/Layout/Page/Page.js +11 -12
  90. package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
  91. package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
  92. package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
  93. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
  94. package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
  95. package/dist/components/Link/LinkShowcase.js +1 -1
  96. package/dist/components/Loaf/Loaf.d.ts +2 -1
  97. package/dist/components/Loaf/Loaf.js +17 -16
  98. package/dist/components/Logos/LogosShowcase.js +1 -1
  99. package/dist/components/Modal/Modal.js +16 -17
  100. package/dist/components/Modal/ModalShowcase.js +14 -11
  101. package/dist/components/NavList/NavList.d.ts +2 -1
  102. package/dist/components/NavList/NavList.js +19 -18
  103. package/dist/components/OnScreenSensor.js +1 -1
  104. package/dist/components/Overlay/Overlay.d.ts +4 -2
  105. package/dist/components/Overlay/Overlay.js +31 -23
  106. package/dist/components/Popover/Popover.d.ts +3 -2
  107. package/dist/components/Popover/Popover.js +31 -30
  108. package/dist/components/Popover/PopoverShowcase.js +4 -4
  109. package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
  110. package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
  111. package/dist/components/Select/Select.d.ts +1 -1
  112. package/dist/components/Select/Select.js +666 -1617
  113. package/dist/components/Select/SelectShowcase.js +1 -1
  114. package/dist/components/Shroud/Shroud.d.ts +2 -1
  115. package/dist/components/Shroud/Shroud.js +16 -14
  116. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  117. package/dist/components/Skeleton/Skeleton.js +26 -27
  118. package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
  119. package/dist/components/Slider/Slider.d.ts +2 -1
  120. package/dist/components/Slider/Slider.js +326 -377
  121. package/dist/components/Slider/SliderShowcase.js +1 -1
  122. package/dist/components/Switch/Switch.js +109 -155
  123. package/dist/components/Table/TableBody.d.ts +8 -0
  124. package/dist/components/Table/TableBody.js +14 -0
  125. package/dist/components/Table/TableCell.d.ts +11 -0
  126. package/dist/components/Table/TableCell.js +54 -0
  127. package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
  128. package/dist/components/Table/TableCellCheckbox.js +20 -0
  129. package/dist/components/Table/TableHeader.d.ts +9 -0
  130. package/dist/components/Table/TableHeader.js +24 -0
  131. package/dist/components/Table/TableIconButton.d.ts +6 -0
  132. package/dist/components/Table/TableIconButton.js +16 -0
  133. package/dist/components/Table/TableRoot.d.ts +8 -0
  134. package/dist/components/Table/TableRoot.js +23 -0
  135. package/dist/components/Table/TableRow.d.ts +13 -0
  136. package/dist/components/Table/TableRow.js +46 -0
  137. package/dist/components/Table/TableShowcase.js +56 -57
  138. package/dist/components/Table/index.d.ts +21 -2
  139. package/dist/components/Table/index.js +18 -5
  140. package/dist/components/Tabular/TabularShowcase.js +1 -1
  141. package/dist/components/Text/Text.d.ts +6 -3
  142. package/dist/components/Text/Text.js +67 -63
  143. package/dist/components/Text/TextShowcase.js +40 -33
  144. package/dist/components/Title/Title.d.ts +3 -1
  145. package/dist/components/Title/TitleShowcase.js +1 -1
  146. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
  147. package/dist/index-BHuChyf5.js +238 -0
  148. package/dist/index-Cl_RnsqN.js +386 -0
  149. package/dist/index-DZEAOJqB.js +53 -0
  150. package/dist/index-HDl8nGsm.js +70 -0
  151. package/dist/main.d.ts +6 -4
  152. package/dist/main.js +73 -70
  153. package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
  154. package/dist/styles-scss/global.scss +1 -0
  155. package/dist/tslib.es6-CtHwNPxX.js +72 -0
  156. package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
  157. package/dist/utils/hooks/useOutlet.js +1 -1
  158. package/dist/utils/hooks/usePopoverController.d.ts +1 -1
  159. package/dist/utils/links.js +1 -1
  160. package/dist/utils/mergeRefs.d.ts +1 -1
  161. package/dist/utils/mergeRefs.js +1 -1
  162. package/dist/utils/ui/ui.d.ts +1 -0
  163. package/dist/utils/ui/ui.js +45 -36
  164. package/dist/utils/ui/ui.types.d.ts +4 -0
  165. package/package.json +6 -5
  166. package/dist/Combination-Cbiw1XRb.js +0 -792
  167. package/dist/cfxIcons-BNd1WgpX.js +0 -96
  168. package/dist/components/Table/Table.d.ts +0 -42
  169. package/dist/components/Table/Table.js +0 -170
  170. package/dist/index-2hJuj4UN.js +0 -19069
  171. package/dist/index-AweK2ufS.js +0 -171
  172. package/dist/index-BlbvKsmN.js +0 -82
  173. package/dist/index-ByaXH_ih.js +0 -10
  174. package/dist/index-Bz27DCHt.js +0 -1342
  175. package/dist/index-Cf5Yu9oD.js +0 -67
  176. package/dist/tslib.es6-CBKHJX9H.js +0 -151
@@ -1,21 +1,20 @@
1
- import { jsxs as _, jsx as c } from "react/jsx-runtime";
2
- import { clsx as l } from "../../../utils/clsx.js";
3
- const d = "cfxui__Page__root__3b40d", f = "cfxui__Page__loader__df597", n = "cfxui__Page__wtf__c1620", o = {
1
+ import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
+ import { clsx as _ } from "../../../utils/clsx.js";
3
+ const d = "cfxui__Page__root__3b40d", n = "cfxui__Page__loader__df597", o = {
4
4
  root: d,
5
- loader: f,
6
- wtf: n
5
+ loader: n
7
6
  };
8
- function x(s) {
7
+ function f(s) {
9
8
  const {
10
9
  children: r,
11
- className: t,
12
- showLoader: a = !1
13
- } = s, e = l(o.root, t);
14
- return /* @__PURE__ */ _("div", { className: e, children: [
10
+ className: a,
11
+ showLoader: e = !1
12
+ } = s, t = _(o.root, a);
13
+ return /* @__PURE__ */ c("div", { className: t, children: [
15
14
  r,
16
- a && /* @__PURE__ */ c("div", { className: o.loader })
15
+ e && /* @__PURE__ */ l("div", { className: o.loader })
17
16
  ] });
18
17
  }
19
18
  export {
20
- x as Page
19
+ f as Page
21
20
  };
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  export interface RailProps {
4
4
  axis: 'x' | 'y';
5
5
  pos: number;
6
- rootRef: React.RefObject<HTMLDivElement>;
6
+ rootRef: React.RefObject<HTMLDivElement | null>;
7
7
  size: number;
8
8
  scrollSize: number;
9
9
  minThumbSize: number;
@@ -4,6 +4,7 @@ export interface ScrollableProps {
4
4
  minThumbSize?: number;
5
5
  className?: string;
6
6
  children?: React.ReactNode;
7
+ ref?: React.Ref<HTMLDivElement>;
7
8
  onScroll?: (event: WheelEvent | React.UIEvent<HTMLDivElement, UIEvent>) => void;
8
9
  scrollerRef?: React.Ref<HTMLDivElement>;
9
10
  /**
@@ -11,4 +12,4 @@ export interface ScrollableProps {
11
12
  */
12
13
  verticalAsHorizontal?: boolean;
13
14
  }
14
- export declare const Scrollable: React.ForwardRefExoticComponent<ScrollableProps & React.RefAttributes<HTMLDivElement>>;
15
+ export declare function Scrollable(props: ScrollableProps): import("react/jsx-runtime").JSX.Element;
@@ -1,48 +1,50 @@
1
- import { jsxs as j, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as W, jsx as i } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { useContextualStyle as W } from "../../Style/Style.js";
4
- import { clsx as b } from "../../../utils/clsx.js";
3
+ import { clsx as x } from "../../../utils/clsx.js";
5
4
  import { mergeRefs as k } from "../../../utils/mergeRefs.js";
6
- import { s as o, R as w } from "../../../Rail-DcVowhML.js";
7
- const N = {
5
+ import { s as o, R as N } from "../../../Rail-DcVowhML.js";
6
+ const P = {
8
7
  size: 0,
9
8
  scrollPos: 0,
10
9
  scrollSize: 0
11
- }, K = r.forwardRef(function(u, P) {
10
+ };
11
+ function G(b) {
12
12
  const {
13
- children: y,
13
+ children: w,
14
14
  className: A,
15
15
  onScroll: l,
16
- minThumbSize: f = 20,
17
- verticalAsHorizontal: S = !1
18
- } = u, e = r.useRef(null), a = r.useRef(null), [L, m] = r.useState(!1), [c, E] = r.useState(N), [T, g] = r.useState(0), [n, C] = r.useState(N), [I, X] = r.useState(0), Y = b(o.root, A, {
19
- [o.active]: L
16
+ minThumbSize: u = 20,
17
+ verticalAsHorizontal: f = !1,
18
+ ref: L,
19
+ scrollerRef: E
20
+ } = b, e = r.useRef(null), a = r.useRef(null), [T, S] = r.useState(!1), [c, y] = r.useState(P), [g, I] = r.useState(0), [n, X] = r.useState(P), [Y, _] = r.useState(0), C = x(o.root, A, {
21
+ [o.active]: T
20
22
  });
21
23
  r.useLayoutEffect(() => {
22
24
  if (!a.current)
23
25
  throw new Error("No scrollable content ref");
24
26
  const s = new ResizeObserver(() => {
25
- var t, d, h, v, p, x;
26
- C({
27
+ var t, R, d, h, v, p;
28
+ X({
27
29
  size: ((t = e.current) == null ? void 0 : t.clientHeight) || 0,
28
- scrollPos: ((d = e.current) == null ? void 0 : d.scrollTop) || 0,
29
- scrollSize: ((h = e.current) == null ? void 0 : h.scrollHeight) || 0
30
- }), E({
31
- size: ((v = e.current) == null ? void 0 : v.clientWidth) || 0,
32
- scrollPos: ((p = e.current) == null ? void 0 : p.scrollLeft) || 0,
33
- scrollSize: ((x = e.current) == null ? void 0 : x.scrollWidth) || 0
30
+ scrollPos: ((R = e.current) == null ? void 0 : R.scrollTop) || 0,
31
+ scrollSize: ((d = e.current) == null ? void 0 : d.scrollHeight) || 0
32
+ }), y({
33
+ size: ((h = e.current) == null ? void 0 : h.clientWidth) || 0,
34
+ scrollPos: ((v = e.current) == null ? void 0 : v.scrollLeft) || 0,
35
+ scrollSize: ((p = e.current) == null ? void 0 : p.scrollWidth) || 0
34
36
  });
35
37
  });
36
38
  return s.observe(a.current), () => s.disconnect();
37
39
  }, []);
38
- const _ = r.useCallback(
40
+ const H = r.useCallback(
39
41
  (s) => {
40
- e.current && (l == null || l(s), X(e.current.scrollTop), g(e.current.scrollLeft));
42
+ e.current && (l == null || l(s), _(e.current.scrollTop), I(e.current.scrollLeft));
41
43
  },
42
44
  [l]
43
45
  );
44
46
  r.useEffect(() => {
45
- if (!S || !e.current)
47
+ if (!f || !e.current)
46
48
  return;
47
49
  const s = (t) => {
48
50
  t.preventDefault(), t.stopPropagation(), e.current && (e.current.scrollLeft += t.deltaY);
@@ -51,39 +53,39 @@ const N = {
51
53
  var t;
52
54
  return (t = e.current) == null ? void 0 : t.removeEventListener("wheel", s);
53
55
  };
54
- }, [S]);
55
- const z = c.scrollSize - c.size > 1, R = n.scrollSize - n.size > 1, H = b(o.scroller, {
56
+ }, [f]);
57
+ const z = c.scrollSize - c.size > 1, m = n.scrollSize - n.size > 1, j = x(o.scroller, {
56
58
  [o["no-x-scroll"]]: !z,
57
- [o["no-y-scroll"]]: !R
59
+ [o["no-y-scroll"]]: !m
58
60
  });
59
- return /* @__PURE__ */ j("div", { ref: P, style: W(), className: Y, children: [
60
- /* @__PURE__ */ i("div", { ref: k(e, u.scrollerRef), className: H, onScroll: _, children: /* @__PURE__ */ i("div", { ref: a, className: o.content, children: y }) }),
61
- R && /* @__PURE__ */ i(
62
- w,
61
+ return /* @__PURE__ */ W("div", { ref: L, className: C, children: [
62
+ /* @__PURE__ */ i("div", { ref: k(e, E), className: j, onScroll: H, children: /* @__PURE__ */ i("div", { ref: a, className: o.content, children: w }) }),
63
+ m && /* @__PURE__ */ i(
64
+ N,
63
65
  {
64
66
  rootRef: e,
65
67
  axis: "y",
66
68
  size: n.size,
67
- pos: I,
69
+ pos: Y,
68
70
  scrollSize: n.scrollSize,
69
- setRootActive: m,
70
- minThumbSize: f
71
+ setRootActive: S,
72
+ minThumbSize: u
71
73
  }
72
74
  ),
73
75
  z && /* @__PURE__ */ i(
74
- w,
76
+ N,
75
77
  {
76
78
  rootRef: e,
77
79
  axis: "x",
78
80
  size: c.size,
79
- pos: T,
81
+ pos: g,
80
82
  scrollSize: c.scrollSize,
81
- setRootActive: m,
82
- minThumbSize: f
83
+ setRootActive: S,
84
+ minThumbSize: u
83
85
  }
84
86
  )
85
87
  ] });
86
- });
88
+ }
87
89
  export {
88
- K as Scrollable
90
+ G as Scrollable
89
91
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import d from "react";
3
- import { Flex as i } from "../Flex/Flex.js";
3
+ import i from "../Flex/Flex.js";
4
4
  import { Text as t } from "../../Text/Text.js";
5
5
  import "../../../utils/ui/ui.js";
6
6
  import { LOREM_IPSUM as e } from "../../../utils/loremipsum.js";
@@ -1,5 +1,5 @@
1
- import { jsx as R } from "react/jsx-runtime";
2
- import N, { createElement as k, PureComponent as re } from "react";
1
+ import { jsx as N } from "react/jsx-runtime";
2
+ import W, { createElement as k, PureComponent as re } from "react";
3
3
  import { _ as ie, a as ne } from "../../../inheritsLoose-CyjgKRgL.js";
4
4
  import { clsx as oe } from "../../../utils/clsx.js";
5
5
  import { Scrollable as le } from "./Scrollable.js";
@@ -17,18 +17,18 @@ function ae(r, t) {
17
17
  function ce(r, t) {
18
18
  if (r.length !== t.length)
19
19
  return !1;
20
- for (var i = 0; i < r.length; i++)
21
- if (!ae(r[i], t[i]))
20
+ for (var o = 0; o < r.length; o++)
21
+ if (!ae(r[o], t[o]))
22
22
  return !1;
23
23
  return !0;
24
24
  }
25
25
  function D(r, t) {
26
26
  t === void 0 && (t = ce);
27
- var i, l = [], a, I = !1;
27
+ var o, l = [], a, I = !1;
28
28
  function m() {
29
29
  for (var v = [], S = 0; S < arguments.length; S++)
30
30
  v[S] = arguments[S];
31
- return I && i === this && t(v, l) || (a = r.apply(this, v), I = !0, i = this, l = v), a;
31
+ return I && o === this && t(v, l) || (a = r.apply(this, v), I = !0, o = this, l = v), a;
32
32
  }
33
33
  return m;
34
34
  }
@@ -41,9 +41,9 @@ function K(r) {
41
41
  cancelAnimationFrame(r.id);
42
42
  }
43
43
  function de(r, t) {
44
- var i = H();
44
+ var o = H();
45
45
  function l() {
46
- H() - i >= t ? r.call(null) : a.id = requestAnimationFrame(l);
46
+ H() - o >= t ? r.call(null) : a.id = requestAnimationFrame(l);
47
47
  }
48
48
  var a = {
49
49
  id: requestAnimationFrame(l)
@@ -53,28 +53,28 @@ function de(r, t) {
53
53
  var L = -1;
54
54
  function j(r) {
55
55
  if (r === void 0 && (r = !1), L === -1 || r) {
56
- var t = document.createElement("div"), i = t.style;
57
- i.width = "50px", i.height = "50px", i.overflow = "scroll", document.body.appendChild(t), L = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
56
+ var t = document.createElement("div"), o = t.style;
57
+ o.width = "50px", o.height = "50px", o.overflow = "scroll", document.body.appendChild(t), L = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
58
58
  }
59
59
  return L;
60
60
  }
61
61
  var _ = null;
62
62
  function B(r) {
63
63
  if (r === void 0 && (r = !1), _ === null || r) {
64
- var t = document.createElement("div"), i = t.style;
65
- i.width = "50px", i.height = "50px", i.overflow = "scroll", i.direction = "rtl";
64
+ var t = document.createElement("div"), o = t.style;
65
+ o.width = "50px", o.height = "50px", o.overflow = "scroll", o.direction = "rtl";
66
66
  var l = document.createElement("div"), a = l.style;
67
67
  return a.width = "100px", a.height = "100px", t.appendChild(l), document.body.appendChild(t), t.scrollLeft > 0 ? _ = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? _ = "negative" : _ = "positive-ascending"), document.body.removeChild(t), _;
68
68
  }
69
69
  return _;
70
70
  }
71
71
  process.env.NODE_ENV;
72
- var fe = 150, he = function(t, i) {
72
+ var fe = 150, he = function(t, o) {
73
73
  return t;
74
- }, P = null, M = null;
75
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (P = /* @__PURE__ */ new WeakSet(), M = /* @__PURE__ */ new WeakSet());
74
+ }, R = null, P = null;
75
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (R = /* @__PURE__ */ new WeakSet(), P = /* @__PURE__ */ new WeakSet());
76
76
  function pe(r) {
77
- var t, i = r.getItemOffset, l = r.getEstimatedTotalSize, a = r.getItemSize, I = r.getOffsetForIndexAndAlignment, m = r.getStartIndexForOffset, v = r.getStopIndexForStartIndex, S = r.initInstanceProps, y = r.shouldResetStyleCacheOnItemSizeChange, g = r.validateProps;
77
+ var t, o = r.getItemOffset, l = r.getEstimatedTotalSize, a = r.getItemSize, I = r.getOffsetForIndexAndAlignment, m = r.getStartIndexForOffset, v = r.getStopIndexForStartIndex, S = r.initInstanceProps, y = r.shouldResetStyleCacheOnItemSizeChange, g = r.validateProps;
78
78
  return t = /* @__PURE__ */ function(w) {
79
79
  ie(b, w);
80
80
  function b(p) {
@@ -85,26 +85,26 @@ function pe(r) {
85
85
  scrollDirection: "forward",
86
86
  scrollOffset: typeof e.props.initialScrollOffset == "number" ? e.props.initialScrollOffset : 0,
87
87
  scrollUpdateWasRequested: !1
88
- }, e._callOnItemsRendered = void 0, e._callOnItemsRendered = D(function(n, o, s, u) {
88
+ }, e._callOnItemsRendered = void 0, e._callOnItemsRendered = D(function(i, n, s, u) {
89
89
  return e.props.onItemsRendered({
90
- overscanStartIndex: n,
91
- overscanStopIndex: o,
90
+ overscanStartIndex: i,
91
+ overscanStopIndex: n,
92
92
  visibleStartIndex: s,
93
93
  visibleStopIndex: u
94
94
  });
95
- }), e._callOnScroll = void 0, e._callOnScroll = D(function(n, o, s) {
95
+ }), e._callOnScroll = void 0, e._callOnScroll = D(function(i, n, s) {
96
96
  return e.props.onScroll({
97
- scrollDirection: n,
98
- scrollOffset: o,
97
+ scrollDirection: i,
98
+ scrollOffset: n,
99
99
  scrollUpdateWasRequested: s
100
100
  });
101
- }), e._getItemStyle = void 0, e._getItemStyle = function(n) {
102
- var o = e.props, s = o.direction, u = o.itemSize, f = o.layout, c = e._getItemStyleCache(y && u, y && f, y && s), d;
103
- if (c.hasOwnProperty(n))
104
- d = c[n];
101
+ }), e._getItemStyle = void 0, e._getItemStyle = function(i) {
102
+ var n = e.props, s = n.direction, u = n.itemSize, f = n.layout, c = e._getItemStyleCache(y && u, y && f, y && s), d;
103
+ if (c.hasOwnProperty(i))
104
+ d = c[i];
105
105
  else {
106
- var h = i(e.props, n, e._instanceProps), T = a(e.props, n, e._instanceProps), O = s === "horizontal" || f === "horizontal", x = s === "rtl", E = O ? h : 0;
107
- c[n] = d = {
106
+ var h = o(e.props, i, e._instanceProps), T = a(e.props, i, e._instanceProps), O = s === "horizontal" || f === "horizontal", x = s === "rtl", E = O ? h : 0;
107
+ c[i] = d = {
108
108
  position: "absolute",
109
109
  left: x ? void 0 : E,
110
110
  right: x ? E : void 0,
@@ -114,10 +114,10 @@ function pe(r) {
114
114
  };
115
115
  }
116
116
  return d;
117
- }, e._getItemStyleCache = void 0, e._getItemStyleCache = D(function(n, o, s) {
117
+ }, e._getItemStyleCache = void 0, e._getItemStyleCache = D(function(i, n, s) {
118
118
  return {};
119
- }), e._onScrollHorizontal = function(n) {
120
- var o = n.currentTarget, s = o.clientWidth, u = o.scrollLeft, f = o.scrollWidth;
119
+ }), e._onScrollHorizontal = function(i) {
120
+ var n = i.currentTarget, s = n.clientWidth, u = n.scrollLeft, f = n.scrollWidth;
121
121
  e.setState(function(c) {
122
122
  if (c.scrollOffset === u)
123
123
  return null;
@@ -138,8 +138,8 @@ function pe(r) {
138
138
  scrollUpdateWasRequested: !1
139
139
  };
140
140
  }, e._resetIsScrollingDebounced);
141
- }, e._onScrollVertical = function(n) {
142
- var o = n.currentTarget, s = o.clientHeight, u = o.scrollHeight, f = o.scrollTop;
141
+ }, e._onScrollVertical = function(i) {
142
+ var n = i.currentTarget, s = n.clientHeight, u = n.scrollHeight, f = n.scrollTop;
143
143
  e.setState(function(c) {
144
144
  if (c.scrollOffset === f)
145
145
  return null;
@@ -151,9 +151,9 @@ function pe(r) {
151
151
  scrollUpdateWasRequested: !1
152
152
  };
153
153
  }, e._resetIsScrollingDebounced);
154
- }, e._outerRefSetter = function(n) {
155
- var o = e.props.outerRef;
156
- e._outerRef = n, typeof o == "function" ? o(n) : o != null && typeof o == "object" && o.hasOwnProperty("current") && (o.current = n);
154
+ }, e._outerRefSetter = function(i) {
155
+ var n = e.props.outerRef;
156
+ e._outerRef = i, typeof n == "function" ? n(i) : n != null && typeof n == "object" && n.hasOwnProperty("current") && (n.current = i);
157
157
  }, e._resetIsScrollingDebounced = function() {
158
158
  e._resetIsScrollingTimeoutId !== null && K(e._resetIsScrollingTimeoutId), e._resetIsScrollingTimeoutId = de(e._resetIsScrolling, fe);
159
159
  }, e._resetIsScrolling = function() {
@@ -164,41 +164,41 @@ function pe(r) {
164
164
  });
165
165
  }, e;
166
166
  }
167
- b.getDerivedStateFromProps = function(e, n) {
168
- return me(e, n), g(e), null;
167
+ b.getDerivedStateFromProps = function(e, i) {
168
+ return me(e, i), g(e), null;
169
169
  };
170
170
  var z = b.prototype;
171
171
  return z.scrollTo = function(e) {
172
- e = Math.max(0, e), this.setState(function(n) {
173
- return n.scrollOffset === e ? null : {
174
- scrollDirection: n.scrollOffset < e ? "forward" : "backward",
172
+ e = Math.max(0, e), this.setState(function(i) {
173
+ return i.scrollOffset === e ? null : {
174
+ scrollDirection: i.scrollOffset < e ? "forward" : "backward",
175
175
  scrollOffset: e,
176
176
  scrollUpdateWasRequested: !0
177
177
  };
178
178
  }, this._resetIsScrollingDebounced);
179
- }, z.scrollToItem = function(e, n) {
180
- n === void 0 && (n = "auto");
181
- var o = this.props, s = o.itemCount, u = o.layout, f = this.state.scrollOffset;
179
+ }, z.scrollToItem = function(e, i) {
180
+ i === void 0 && (i = "auto");
181
+ var n = this.props, s = n.itemCount, u = n.layout, f = this.state.scrollOffset;
182
182
  e = Math.max(0, Math.min(e, s - 1));
183
183
  var c = 0;
184
184
  if (this._outerRef) {
185
185
  var d = this._outerRef;
186
186
  u === "vertical" ? c = d.scrollWidth > d.clientWidth ? j() : 0 : c = d.scrollHeight > d.clientHeight ? j() : 0;
187
187
  }
188
- this.scrollTo(I(this.props, e, n, f, this._instanceProps, c));
188
+ this.scrollTo(I(this.props, e, i, f, this._instanceProps, c));
189
189
  }, z.componentDidMount = function() {
190
- var e = this.props, n = e.direction, o = e.initialScrollOffset, s = e.layout;
191
- if (typeof o == "number" && this._outerRef != null) {
190
+ var e = this.props, i = e.direction, n = e.initialScrollOffset, s = e.layout;
191
+ if (typeof n == "number" && this._outerRef != null) {
192
192
  var u = this._outerRef;
193
- n === "horizontal" || s === "horizontal" ? u.scrollLeft = o : u.scrollTop = o;
193
+ i === "horizontal" || s === "horizontal" ? u.scrollLeft = n : u.scrollTop = n;
194
194
  }
195
195
  this._callPropsCallbacks();
196
196
  }, z.componentDidUpdate = function() {
197
- var e = this.props, n = e.direction, o = e.layout, s = this.state, u = s.scrollOffset, f = s.scrollUpdateWasRequested;
197
+ var e = this.props, i = e.direction, n = e.layout, s = this.state, u = s.scrollOffset, f = s.scrollUpdateWasRequested;
198
198
  if (f && this._outerRef != null) {
199
199
  var c = this._outerRef;
200
- if (n === "horizontal" || o === "horizontal")
201
- if (n === "rtl")
200
+ if (i === "horizontal" || n === "horizontal")
201
+ if (i === "rtl")
202
202
  switch (B()) {
203
203
  case "negative":
204
204
  c.scrollLeft = -u;
@@ -220,10 +220,10 @@ function pe(r) {
220
220
  }, z.componentWillUnmount = function() {
221
221
  this._resetIsScrollingTimeoutId !== null && K(this._resetIsScrollingTimeoutId);
222
222
  }, z.render = function() {
223
- var e = this.props, n = e.children, o = e.className, s = e.direction, u = e.height, f = e.innerRef, c = e.innerElementType, d = e.innerTagName, h = e.itemCount, T = e.itemData, O = e.itemKey, x = O === void 0 ? he : O, E = e.layout, G = e.outerElementType, J = e.outerTagName, Q = e.style, X = e.useIsScrolling, Y = e.width, A = this.state.isScrolling, W = s === "horizontal" || E === "horizontal", Z = W ? this._onScrollHorizontal : this._onScrollVertical, F = this._getRangeToRender(), ee = F[0], te = F[1], V = [];
223
+ var e = this.props, i = e.children, n = e.className, s = e.direction, u = e.height, f = e.innerRef, c = e.innerElementType, d = e.innerTagName, h = e.itemCount, T = e.itemData, O = e.itemKey, x = O === void 0 ? he : O, E = e.layout, G = e.outerElementType, J = e.outerTagName, Q = e.style, X = e.useIsScrolling, Y = e.width, A = this.state.isScrolling, M = s === "horizontal" || E === "horizontal", Z = M ? this._onScrollHorizontal : this._onScrollVertical, F = this._getRangeToRender(), ee = F[0], te = F[1], V = [];
224
224
  if (h > 0)
225
225
  for (var C = ee; C <= te; C++)
226
- V.push(k(n, {
226
+ V.push(k(i, {
227
227
  data: T,
228
228
  key: x(C, T),
229
229
  index: C,
@@ -232,7 +232,7 @@ function pe(r) {
232
232
  }));
233
233
  var U = l(this.props, this._instanceProps);
234
234
  return k(G || J || "div", {
235
- className: o,
235
+ className: n,
236
236
  onScroll: Z,
237
237
  ref: this._outerRefSetter,
238
238
  style: ne({
@@ -248,17 +248,17 @@ function pe(r) {
248
248
  children: V,
249
249
  ref: f,
250
250
  style: {
251
- height: W ? "100%" : U,
251
+ height: M ? "100%" : U,
252
252
  pointerEvents: A ? "none" : void 0,
253
- width: W ? U : "100%"
253
+ width: M ? U : "100%"
254
254
  }
255
255
  }));
256
256
  }, z._callPropsCallbacks = function() {
257
257
  if (typeof this.props.onItemsRendered == "function") {
258
258
  var e = this.props.itemCount;
259
259
  if (e > 0) {
260
- var n = this._getRangeToRender(), o = n[0], s = n[1], u = n[2], f = n[3];
261
- this._callOnItemsRendered(o, s, u, f);
260
+ var i = this._getRangeToRender(), n = i[0], s = i[1], u = i[2], f = i[3];
261
+ this._callOnItemsRendered(n, s, u, f);
262
262
  }
263
263
  }
264
264
  if (typeof this.props.onScroll == "function") {
@@ -266,11 +266,11 @@ function pe(r) {
266
266
  this._callOnScroll(d, h, T);
267
267
  }
268
268
  }, z._getRangeToRender = function() {
269
- var e = this.props, n = e.itemCount, o = e.overscanCount, s = this.state, u = s.isScrolling, f = s.scrollDirection, c = s.scrollOffset;
270
- if (n === 0)
269
+ var e = this.props, i = e.itemCount, n = e.overscanCount, s = this.state, u = s.isScrolling, f = s.scrollDirection, c = s.scrollOffset;
270
+ if (i === 0)
271
271
  return [0, 0, 0, 0];
272
- var d = m(this.props, c, this._instanceProps), h = v(this.props, d, c, this._instanceProps), T = !u || f === "backward" ? Math.max(1, o) : 1, O = !u || f === "forward" ? Math.max(1, o) : 1;
273
- return [Math.max(0, d - T), Math.max(0, Math.min(n - 1, h + O)), d, h];
272
+ var d = m(this.props, c, this._instanceProps), h = v(this.props, d, c, this._instanceProps), T = !u || f === "backward" ? Math.max(1, n) : 1, O = !u || f === "forward" ? Math.max(1, n) : 1;
273
+ return [Math.max(0, d - T), Math.max(0, Math.min(i - 1, h + O)), d, h];
274
274
  }, b;
275
275
  }(re), t.defaultProps = {
276
276
  direction: "ltr",
@@ -280,15 +280,15 @@ function pe(r) {
280
280
  useIsScrolling: !1
281
281
  }, t;
282
282
  }
283
- var me = function(t, i) {
284
- var l = t.children, a = t.direction, I = t.height, m = t.layout, v = t.innerTagName, S = t.outerTagName, y = t.width, g = i.instance;
283
+ var me = function(t, o) {
284
+ var l = t.children, a = t.direction, I = t.height, m = t.layout, v = t.innerTagName, S = t.outerTagName, y = t.width, g = o.instance;
285
285
  if (process.env.NODE_ENV !== "production") {
286
- (v != null || S != null) && M && !M.has(g) && (M.add(g), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
286
+ (v != null || S != null) && P && !P.has(g) && (P.add(g), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
287
287
  var w = a === "horizontal" || m === "horizontal";
288
288
  switch (a) {
289
289
  case "horizontal":
290
290
  case "vertical":
291
- P && !P.has(g) && (P.add(g), console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));
291
+ R && !R.has(g) && (R.add(g), console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));
292
292
  break;
293
293
  case "ltr":
294
294
  case "rtl":
@@ -311,43 +311,43 @@ var me = function(t, i) {
311
311
  throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
312
312
  }
313
313
  }, ve = /* @__PURE__ */ pe({
314
- getItemOffset: function(t, i) {
314
+ getItemOffset: function(t, o) {
315
315
  var l = t.itemSize;
316
- return i * l;
316
+ return o * l;
317
317
  },
318
- getItemSize: function(t, i) {
318
+ getItemSize: function(t, o) {
319
319
  var l = t.itemSize;
320
320
  return l;
321
321
  },
322
322
  getEstimatedTotalSize: function(t) {
323
- var i = t.itemCount, l = t.itemSize;
324
- return l * i;
323
+ var o = t.itemCount, l = t.itemSize;
324
+ return l * o;
325
325
  },
326
- getOffsetForIndexAndAlignment: function(t, i, l, a, I, m) {
327
- var v = t.direction, S = t.height, y = t.itemCount, g = t.itemSize, w = t.layout, b = t.width, z = v === "horizontal" || w === "horizontal", p = z ? b : S, e = Math.max(0, y * g - p), n = Math.min(e, i * g), o = Math.max(0, i * g - p + g + m);
328
- switch (l === "smart" && (a >= o - p && a <= n + p ? l = "auto" : l = "center"), l) {
326
+ getOffsetForIndexAndAlignment: function(t, o, l, a, I, m) {
327
+ var v = t.direction, S = t.height, y = t.itemCount, g = t.itemSize, w = t.layout, b = t.width, z = v === "horizontal" || w === "horizontal", p = z ? b : S, e = Math.max(0, y * g - p), i = Math.min(e, o * g), n = Math.max(0, o * g - p + g + m);
328
+ switch (l === "smart" && (a >= n - p && a <= i + p ? l = "auto" : l = "center"), l) {
329
329
  case "start":
330
- return n;
330
+ return i;
331
331
  case "end":
332
- return o;
332
+ return n;
333
333
  case "center": {
334
- var s = Math.round(o + (n - o) / 2);
334
+ var s = Math.round(n + (i - n) / 2);
335
335
  return s < Math.ceil(p / 2) ? 0 : s > e + Math.floor(p / 2) ? e : s;
336
336
  }
337
337
  case "auto":
338
338
  default:
339
- return a >= o && a <= n ? a : a < o ? o : n;
339
+ return a >= n && a <= i ? a : a < n ? n : i;
340
340
  }
341
341
  },
342
- getStartIndexForOffset: function(t, i) {
342
+ getStartIndexForOffset: function(t, o) {
343
343
  var l = t.itemCount, a = t.itemSize;
344
- return Math.max(0, Math.min(l - 1, Math.floor(i / a)));
344
+ return Math.max(0, Math.min(l - 1, Math.floor(o / a)));
345
345
  },
346
- getStopIndexForStartIndex: function(t, i, l) {
347
- var a = t.direction, I = t.height, m = t.itemCount, v = t.itemSize, S = t.layout, y = t.width, g = a === "horizontal" || S === "horizontal", w = i * v, b = g ? y : I, z = Math.ceil((b + l - w) / v);
346
+ getStopIndexForStartIndex: function(t, o, l) {
347
+ var a = t.direction, I = t.height, m = t.itemCount, v = t.itemSize, S = t.layout, y = t.width, g = a === "horizontal" || S === "horizontal", w = o * v, b = g ? y : I, z = Math.ceil((b + l - w) / v);
348
348
  return Math.max(0, Math.min(
349
349
  m - 1,
350
- i + z - 1
350
+ o + z - 1
351
351
  // -1 is because stop index is inclusive
352
352
  ));
353
353
  },
@@ -355,51 +355,51 @@ var me = function(t, i) {
355
355
  },
356
356
  shouldResetStyleCacheOnItemSizeChange: !0,
357
357
  validateProps: function(t) {
358
- var i = t.itemSize;
359
- if (process.env.NODE_ENV !== "production" && typeof i != "number")
360
- throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
358
+ var o = t.itemSize;
359
+ if (process.env.NODE_ENV !== "production" && typeof o != "number")
360
+ throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
361
361
  }
362
362
  });
363
363
  function ge() {
364
- const [r, t] = N.useState([500, 500]), i = N.useRef(null);
365
- return N.useEffect(() => {
364
+ const [r, t] = W.useState([500, 500]), o = W.useRef(null);
365
+ return W.useEffect(() => {
366
366
  const l = () => {
367
- if (i.current) {
368
- const a = i.current.getBoundingClientRect();
367
+ if (o.current) {
368
+ const a = o.current.getBoundingClientRect();
369
369
  t([a.width, a.height]);
370
370
  }
371
371
  };
372
372
  return l(), window.addEventListener("resize", l), () => {
373
373
  window.removeEventListener("resize", l);
374
374
  };
375
- }, []), [i, ...r];
375
+ }, []), [o, ...r];
376
+ }
377
+ function Se(r) {
378
+ return /* @__PURE__ */ N(le, { ...r });
376
379
  }
377
- const Se = N.forwardRef(function(t, i) {
378
- return /* @__PURE__ */ R(le, { scrollerRef: i, ...t });
379
- });
380
380
  function Oe(r) {
381
381
  const {
382
382
  className: t,
383
- itemCount: i,
383
+ itemCount: o,
384
384
  itemHeight: l,
385
385
  renderItem: a,
386
386
  initialScrollOffset: I,
387
387
  onScrollUpdate: m
388
388
  } = r, v = m ? (w) => m == null ? void 0 : m(w.scrollOffset) : void 0, [S, y, g] = ge();
389
- return /* @__PURE__ */ R("div", { ref: S, className: oe(se.virtual, t), children: /* @__PURE__ */ R(
389
+ return /* @__PURE__ */ N("div", { ref: S, className: oe(se.virtual, t), children: /* @__PURE__ */ N(
390
390
  ve,
391
391
  {
392
392
  outerElementType: Se,
393
393
  width: y,
394
394
  height: g,
395
- itemCount: i,
395
+ itemCount: o,
396
396
  itemSize: l,
397
397
  initialScrollOffset: I,
398
398
  onScroll: v,
399
399
  children: ({
400
400
  index: w,
401
401
  style: b
402
- }) => /* @__PURE__ */ R("div", { style: b, children: a(w) })
402
+ }) => /* @__PURE__ */ N("div", { style: b, children: a(w) })
403
403
  }
404
404
  ) });
405
405
  }
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import d from "react";
3
- import { Flex as l } from "../Layout/Flex/Flex.js";
3
+ import l from "../Layout/Flex/Flex.js";
4
4
  import { Text as i } from "../Text/Text.js";
5
5
  import "../../utils/ui/ui.js";
6
6
  import t from "./ButtonLink.js";
@@ -8,5 +8,6 @@ export interface LoafProps {
8
8
  bright?: boolean;
9
9
  className?: string;
10
10
  children: React.ReactNode;
11
+ ref?: React.Ref<HTMLDivElement>;
11
12
  }
12
- export declare const Loaf: React.ForwardRefExoticComponent<LoafProps & React.RefAttributes<HTMLDivElement>>;
13
+ export declare function Loaf(props: LoafProps): import("react/jsx-runtime").JSX.Element;