@cfx-dev/ui-components 0.0.5

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 (188) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/dist/Button.module-Z6njvP9Z.js +17 -0
  4. package/dist/Combination-AG9vHdSx.js +1478 -0
  5. package/dist/Icons-B26SczGZ.js +162 -0
  6. package/dist/Rail-DoYzqKk4.js +89 -0
  7. package/dist/assets/Avatar.css +1 -0
  8. package/dist/assets/Badge.css +1 -0
  9. package/dist/assets/Box.css +1 -0
  10. package/dist/assets/Button.css +1 -0
  11. package/dist/assets/Center.css +1 -0
  12. package/dist/assets/Checkbox.css +1 -0
  13. package/dist/assets/ControlBox.css +1 -0
  14. package/dist/assets/CountryFlag.css +1 -0
  15. package/dist/assets/Decorate.css +1 -0
  16. package/dist/assets/Dot.css +1 -0
  17. package/dist/assets/Flex.css +1 -0
  18. package/dist/assets/FlexRestricter.css +1 -0
  19. package/dist/assets/Flyout.css +1 -0
  20. package/dist/assets/Icon.css +1 -0
  21. package/dist/assets/Indicator.css +1 -0
  22. package/dist/assets/InfoPanel.css +1 -0
  23. package/dist/assets/Input.css +1 -0
  24. package/dist/assets/Interactive.css +1 -0
  25. package/dist/assets/Island.css +1 -0
  26. package/dist/assets/Loaf.css +1 -0
  27. package/dist/assets/Modal.css +1 -0
  28. package/dist/assets/NavList.css +1 -0
  29. package/dist/assets/Overlay.css +1 -0
  30. package/dist/assets/Pad.css +1 -0
  31. package/dist/assets/Page.css +1 -0
  32. package/dist/assets/Popover.css +1 -0
  33. package/dist/assets/PremiumBadge.css +1 -0
  34. package/dist/assets/Prose.css +1 -0
  35. package/dist/assets/Radio.css +1 -0
  36. package/dist/assets/Rail.css +1 -0
  37. package/dist/assets/RichInput.css +1 -0
  38. package/dist/assets/Select.css +1 -0
  39. package/dist/assets/Separator.css +1 -0
  40. package/dist/assets/Shroud.css +1 -0
  41. package/dist/assets/Spacer.css +1 -0
  42. package/dist/assets/Switch.css +1 -0
  43. package/dist/assets/Tabular.css +1 -0
  44. package/dist/assets/Text.css +1 -0
  45. package/dist/assets/Textarea.css +1 -0
  46. package/dist/assets/Title.css +1 -0
  47. package/dist/assets/global.css +1 -0
  48. package/dist/assets/themes.css +1 -0
  49. package/dist/components/Avatar/Avatar.d.ts +8 -0
  50. package/dist/components/Avatar/Avatar.js +22 -0
  51. package/dist/components/BackdropPortal/BackdropPortal.d.ts +6 -0
  52. package/dist/components/BackdropPortal/BackdropPortal.js +11 -0
  53. package/dist/components/Badge/Badge.d.ts +9 -0
  54. package/dist/components/Badge/Badge.js +18 -0
  55. package/dist/components/Button/Button.d.ts +22 -0
  56. package/dist/components/Button/Button.js +56 -0
  57. package/dist/components/Button/ButtonBar.d.ts +6 -0
  58. package/dist/components/Button/ButtonBar.js +13 -0
  59. package/dist/components/Checkbox/Checkbox.d.ts +12 -0
  60. package/dist/components/Checkbox/Checkbox.js +42 -0
  61. package/dist/components/ControlBox/ControlBox.d.ts +9 -0
  62. package/dist/components/ControlBox/ControlBox.js +19 -0
  63. package/dist/components/CountryFlag/CountryFlag.d.ts +9 -0
  64. package/dist/components/CountryFlag/CountryFlag.js +21 -0
  65. package/dist/components/Decorate/Decorate.d.ts +9 -0
  66. package/dist/components/Decorate/Decorate.js +20 -0
  67. package/dist/components/Dot/Dot.d.ts +6 -0
  68. package/dist/components/Dot/Dot.js +14 -0
  69. package/dist/components/Flyout/Flyout.d.ts +17 -0
  70. package/dist/components/Flyout/Flyout.js +60 -0
  71. package/dist/components/Icon/Icon.d.ts +11 -0
  72. package/dist/components/Icon/Icon.js +24 -0
  73. package/dist/components/Icons.d.ts +38 -0
  74. package/dist/components/Icons.js +6 -0
  75. package/dist/components/Indicator/Indicator.d.ts +6 -0
  76. package/dist/components/Indicator/Indicator.js +19 -0
  77. package/dist/components/InfoPanel/InfoPanel.d.ts +13 -0
  78. package/dist/components/InfoPanel/InfoPanel.js +34 -0
  79. package/dist/components/Input/Input.d.ts +37 -0
  80. package/dist/components/Input/Input.js +96 -0
  81. package/dist/components/Input/RichInput.d.ts +18 -0
  82. package/dist/components/Input/RichInput.js +63 -0
  83. package/dist/components/Interactive/Interactive.d.ts +6 -0
  84. package/dist/components/Interactive/Interactive.js +18 -0
  85. package/dist/components/Island/Island.d.ts +26 -0
  86. package/dist/components/Island/Island.js +34 -0
  87. package/dist/components/Layout/Box/Box.d.ts +21 -0
  88. package/dist/components/Layout/Box/Box.js +38 -0
  89. package/dist/components/Layout/Center/Center.d.ts +9 -0
  90. package/dist/components/Layout/Center/Center.js +22 -0
  91. package/dist/components/Layout/Flex/Flex.d.ts +26 -0
  92. package/dist/components/Layout/Flex/Flex.js +75 -0
  93. package/dist/components/Layout/Flex/FlexRestricter.d.ts +12 -0
  94. package/dist/components/Layout/Flex/FlexRestricter.js +20 -0
  95. package/dist/components/Layout/Pad/Pad.d.ts +15 -0
  96. package/dist/components/Layout/Pad/Pad.js +36 -0
  97. package/dist/components/Layout/Page/Page.d.ts +8 -0
  98. package/dist/components/Layout/Page/Page.js +21 -0
  99. package/dist/components/Layout/Scrollable/Rail.d.ts +13 -0
  100. package/dist/components/Layout/Scrollable/Rail.js +10 -0
  101. package/dist/components/Layout/Scrollable/Scrollable.d.ts +14 -0
  102. package/dist/components/Layout/Scrollable/Scrollable.js +89 -0
  103. package/dist/components/Layout/Scrollable/VirtualScrollable.d.ts +11 -0
  104. package/dist/components/Layout/Scrollable/VirtualScrollable.js +426 -0
  105. package/dist/components/Loaf/Loaf.d.ts +12 -0
  106. package/dist/components/Loaf/Loaf.js +27 -0
  107. package/dist/components/Modal/Modal.d.ts +18 -0
  108. package/dist/components/Modal/Modal.js +42 -0
  109. package/dist/components/NavList/NavList.d.ts +14 -0
  110. package/dist/components/NavList/NavList.js +33 -0
  111. package/dist/components/OnScreenSensor.d.ts +5 -0
  112. package/dist/components/OnScreenSensor.js +26 -0
  113. package/dist/components/Overlay/Overlay.d.ts +20 -0
  114. package/dist/components/Overlay/Overlay.js +28 -0
  115. package/dist/components/Popover/Popover.d.ts +12 -0
  116. package/dist/components/Popover/Popover.js +40 -0
  117. package/dist/components/PremiumBadge/PremiumBadge.d.ts +15 -0
  118. package/dist/components/PremiumBadge/PremiumBadge.js +38 -0
  119. package/dist/components/Prose/Prose.d.ts +6 -0
  120. package/dist/components/Prose/Prose.js +12 -0
  121. package/dist/components/Radio/Radio.d.ts +12 -0
  122. package/dist/components/Radio/Radio.js +45 -0
  123. package/dist/components/Select/Select.d.ts +16 -0
  124. package/dist/components/Select/Select.js +3293 -0
  125. package/dist/components/Separator/Separator.d.ts +8 -0
  126. package/dist/components/Separator/Separator.js +29 -0
  127. package/dist/components/Shroud/Shroud.d.ts +6 -0
  128. package/dist/components/Shroud/Shroud.js +41 -0
  129. package/dist/components/Spacer/Spacer.d.ts +5 -0
  130. package/dist/components/Spacer/Spacer.js +26 -0
  131. package/dist/components/Style/Style.d.ts +12 -0
  132. package/dist/components/Style/Style.js +23 -0
  133. package/dist/components/Switch/Switch.d.ts +17 -0
  134. package/dist/components/Switch/Switch.js +65 -0
  135. package/dist/components/Symbols.d.ts +5 -0
  136. package/dist/components/Symbols.js +7 -0
  137. package/dist/components/Tabular/Tabular.d.ts +30 -0
  138. package/dist/components/Tabular/Tabular.js +64 -0
  139. package/dist/components/Text/Text.d.ts +8 -0
  140. package/dist/components/Text/Text.js +61 -0
  141. package/dist/components/Text/Text.types.d.ts +33 -0
  142. package/dist/components/Text/Text.types.js +1 -0
  143. package/dist/components/Textarea/Textarea.d.ts +15 -0
  144. package/dist/components/Textarea/Textarea.js +57 -0
  145. package/dist/components/Title/Title.d.ts +13 -0
  146. package/dist/components/Title/Title.js +113 -0
  147. package/dist/components/outlets.d.ts +10 -0
  148. package/dist/components/outlets.js +7 -0
  149. package/dist/components/ui.d.ts +28 -0
  150. package/dist/components/ui.js +29 -0
  151. package/dist/functional-C0pE183N.js +30 -0
  152. package/dist/hooks-Bv1kQUpO.js +65 -0
  153. package/dist/index-C75OpfGQ.js +19577 -0
  154. package/dist/links-CgOD-Vfj.js +1142 -0
  155. package/dist/main.d.ts +68 -0
  156. package/dist/main.js +118 -0
  157. package/dist/math-i2ceybzU.js +16 -0
  158. package/dist/medium-Dc7QRuE0.js +118 -0
  159. package/dist/outlet-C4wpavcH.js +25 -0
  160. package/dist/outlets-BsMV5obW.js +13 -0
  161. package/dist/string-NVxCUbqk.js +54 -0
  162. package/dist/styles-scss/_colors.scss +211 -0
  163. package/dist/styles-scss/_ui.scss +195 -0
  164. package/dist/styles-scss/global.scss +71 -0
  165. package/dist/styles-scss/themes/dark.scss +24 -0
  166. package/dist/styles-scss/themes/light.scss +54 -0
  167. package/dist/styles-scss/themes.scss +2 -0
  168. package/dist/styles-scss/tokens.scss +274 -0
  169. package/dist/tslib.es6-Dd_EkEfR.js +48 -0
  170. package/dist/utils/clsx.d.ts +7 -0
  171. package/dist/utils/clsx.js +14 -0
  172. package/dist/utils/functional.d.ts +5 -0
  173. package/dist/utils/functional.js +8 -0
  174. package/dist/utils/getValue.d.ts +2 -0
  175. package/dist/utils/getValue.js +6 -0
  176. package/dist/utils/hooks.d.ts +13 -0
  177. package/dist/utils/hooks.js +9 -0
  178. package/dist/utils/links.d.ts +27 -0
  179. package/dist/utils/links.js +14 -0
  180. package/dist/utils/math.d.ts +2 -0
  181. package/dist/utils/math.js +5 -0
  182. package/dist/utils/mergeRefs.d.ts +3 -0
  183. package/dist/utils/mergeRefs.js +10 -0
  184. package/dist/utils/outlet.d.ts +4 -0
  185. package/dist/utils/outlet.js +6 -0
  186. package/dist/utils/string.d.ts +6 -0
  187. package/dist/utils/string.js +9 -0
  188. package/package.json +82 -0
@@ -0,0 +1,426 @@
1
+ import { jsx as R } from "react/jsx-runtime";
2
+ import N, { createElement as k, PureComponent as ne } from "react";
3
+ import { clsx as oe } from "../../../utils/clsx.js";
4
+ import { Scrollable as le } from "./Scrollable.js";
5
+ import { s as se } from "../../../Rail-DoYzqKk4.js";
6
+ function A() {
7
+ return A = Object.assign ? Object.assign.bind() : function(r) {
8
+ for (var t = 1; t < arguments.length; t++) {
9
+ var i = arguments[t];
10
+ for (var l in i)
11
+ ({}).hasOwnProperty.call(i, l) && (r[l] = i[l]);
12
+ }
13
+ return r;
14
+ }, A.apply(null, arguments);
15
+ }
16
+ function H(r) {
17
+ if (r === void 0)
18
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
19
+ return r;
20
+ }
21
+ function F(r, t) {
22
+ return F = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, l) {
23
+ return i.__proto__ = l, i;
24
+ }, F(r, t);
25
+ }
26
+ function ae(r, t) {
27
+ r.prototype = Object.create(t.prototype), r.prototype.constructor = r, F(r, t);
28
+ }
29
+ var j = Number.isNaN || function(t) {
30
+ return typeof t == "number" && t !== t;
31
+ };
32
+ function ce(r, t) {
33
+ return !!(r === t || j(r) && j(t));
34
+ }
35
+ function ue(r, t) {
36
+ if (r.length !== t.length)
37
+ return !1;
38
+ for (var i = 0; i < r.length; i++)
39
+ if (!ce(r[i], t[i]))
40
+ return !1;
41
+ return !0;
42
+ }
43
+ function D(r, t) {
44
+ t === void 0 && (t = ue);
45
+ var i, l = [], a, y = !1;
46
+ function m() {
47
+ for (var v = [], S = 0; S < arguments.length; S++)
48
+ v[S] = arguments[S];
49
+ return y && i === this && t(v, l) || (a = r.apply(this, v), y = !0, i = this, l = v), a;
50
+ }
51
+ return m;
52
+ }
53
+ var de = typeof performance == "object" && typeof performance.now == "function", K = de ? function() {
54
+ return performance.now();
55
+ } : function() {
56
+ return Date.now();
57
+ };
58
+ function B(r) {
59
+ cancelAnimationFrame(r.id);
60
+ }
61
+ function fe(r, t) {
62
+ var i = K();
63
+ function l() {
64
+ K() - i >= t ? r.call(null) : a.id = requestAnimationFrame(l);
65
+ }
66
+ var a = {
67
+ id: requestAnimationFrame(l)
68
+ };
69
+ return a;
70
+ }
71
+ var L = -1;
72
+ function G(r) {
73
+ if (r === void 0 && (r = !1), L === -1 || r) {
74
+ var t = document.createElement("div"), i = t.style;
75
+ i.width = "50px", i.height = "50px", i.overflow = "scroll", document.body.appendChild(t), L = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
76
+ }
77
+ return L;
78
+ }
79
+ var _ = null;
80
+ function J(r) {
81
+ if (r === void 0 && (r = !1), _ === null || r) {
82
+ var t = document.createElement("div"), i = t.style;
83
+ i.width = "50px", i.height = "50px", i.overflow = "scroll", i.direction = "rtl";
84
+ var l = document.createElement("div"), a = l.style;
85
+ 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), _;
86
+ }
87
+ return _;
88
+ }
89
+ process.env.NODE_ENV;
90
+ var he = 150, pe = function(t, i) {
91
+ return t;
92
+ }, P = null, M = null;
93
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (P = /* @__PURE__ */ new WeakSet(), M = /* @__PURE__ */ new WeakSet());
94
+ function me(r) {
95
+ var t, i = r.getItemOffset, l = r.getEstimatedTotalSize, a = r.getItemSize, y = r.getOffsetForIndexAndAlignment, m = r.getStartIndexForOffset, v = r.getStopIndexForStartIndex, S = r.initInstanceProps, I = r.shouldResetStyleCacheOnItemSizeChange, g = r.validateProps;
96
+ return t = /* @__PURE__ */ function(w) {
97
+ ae(z, w);
98
+ function z(p) {
99
+ var e;
100
+ return e = w.call(this, p) || this, e._instanceProps = S(e.props, H(e)), e._outerRef = void 0, e._resetIsScrollingTimeoutId = null, e.state = {
101
+ instance: H(e),
102
+ isScrolling: !1,
103
+ scrollDirection: "forward",
104
+ scrollOffset: typeof e.props.initialScrollOffset == "number" ? e.props.initialScrollOffset : 0,
105
+ scrollUpdateWasRequested: !1
106
+ }, e._callOnItemsRendered = void 0, e._callOnItemsRendered = D(function(n, o, s, u) {
107
+ return e.props.onItemsRendered({
108
+ overscanStartIndex: n,
109
+ overscanStopIndex: o,
110
+ visibleStartIndex: s,
111
+ visibleStopIndex: u
112
+ });
113
+ }), e._callOnScroll = void 0, e._callOnScroll = D(function(n, o, s) {
114
+ return e.props.onScroll({
115
+ scrollDirection: n,
116
+ scrollOffset: o,
117
+ scrollUpdateWasRequested: s
118
+ });
119
+ }), e._getItemStyle = void 0, e._getItemStyle = function(n) {
120
+ var o = e.props, s = o.direction, u = o.itemSize, f = o.layout, c = e._getItemStyleCache(I && u, I && f, I && s), d;
121
+ if (c.hasOwnProperty(n))
122
+ d = c[n];
123
+ else {
124
+ var h = i(e.props, n, e._instanceProps), O = a(e.props, n, e._instanceProps), T = s === "horizontal" || f === "horizontal", x = s === "rtl", E = T ? h : 0;
125
+ c[n] = d = {
126
+ position: "absolute",
127
+ left: x ? void 0 : E,
128
+ right: x ? E : void 0,
129
+ top: T ? 0 : h,
130
+ height: T ? "100%" : O,
131
+ width: T ? O : "100%"
132
+ };
133
+ }
134
+ return d;
135
+ }, e._getItemStyleCache = void 0, e._getItemStyleCache = D(function(n, o, s) {
136
+ return {};
137
+ }), e._onScrollHorizontal = function(n) {
138
+ var o = n.currentTarget, s = o.clientWidth, u = o.scrollLeft, f = o.scrollWidth;
139
+ e.setState(function(c) {
140
+ if (c.scrollOffset === u)
141
+ return null;
142
+ var d = e.props.direction, h = u;
143
+ if (d === "rtl")
144
+ switch (J()) {
145
+ case "negative":
146
+ h = -u;
147
+ break;
148
+ case "positive-descending":
149
+ h = f - s - u;
150
+ break;
151
+ }
152
+ return h = Math.max(0, Math.min(h, f - s)), {
153
+ isScrolling: !0,
154
+ scrollDirection: c.scrollOffset < h ? "forward" : "backward",
155
+ scrollOffset: h,
156
+ scrollUpdateWasRequested: !1
157
+ };
158
+ }, e._resetIsScrollingDebounced);
159
+ }, e._onScrollVertical = function(n) {
160
+ var o = n.currentTarget, s = o.clientHeight, u = o.scrollHeight, f = o.scrollTop;
161
+ e.setState(function(c) {
162
+ if (c.scrollOffset === f)
163
+ return null;
164
+ var d = Math.max(0, Math.min(f, u - s));
165
+ return {
166
+ isScrolling: !0,
167
+ scrollDirection: c.scrollOffset < d ? "forward" : "backward",
168
+ scrollOffset: d,
169
+ scrollUpdateWasRequested: !1
170
+ };
171
+ }, e._resetIsScrollingDebounced);
172
+ }, e._outerRefSetter = function(n) {
173
+ var o = e.props.outerRef;
174
+ e._outerRef = n, typeof o == "function" ? o(n) : o != null && typeof o == "object" && o.hasOwnProperty("current") && (o.current = n);
175
+ }, e._resetIsScrollingDebounced = function() {
176
+ e._resetIsScrollingTimeoutId !== null && B(e._resetIsScrollingTimeoutId), e._resetIsScrollingTimeoutId = fe(e._resetIsScrolling, he);
177
+ }, e._resetIsScrolling = function() {
178
+ e._resetIsScrollingTimeoutId = null, e.setState({
179
+ isScrolling: !1
180
+ }, function() {
181
+ e._getItemStyleCache(-1, null);
182
+ });
183
+ }, e;
184
+ }
185
+ z.getDerivedStateFromProps = function(e, n) {
186
+ return ve(e, n), g(e), null;
187
+ };
188
+ var b = z.prototype;
189
+ return b.scrollTo = function(e) {
190
+ e = Math.max(0, e), this.setState(function(n) {
191
+ return n.scrollOffset === e ? null : {
192
+ scrollDirection: n.scrollOffset < e ? "forward" : "backward",
193
+ scrollOffset: e,
194
+ scrollUpdateWasRequested: !0
195
+ };
196
+ }, this._resetIsScrollingDebounced);
197
+ }, b.scrollToItem = function(e, n) {
198
+ n === void 0 && (n = "auto");
199
+ var o = this.props, s = o.itemCount, u = o.layout, f = this.state.scrollOffset;
200
+ e = Math.max(0, Math.min(e, s - 1));
201
+ var c = 0;
202
+ if (this._outerRef) {
203
+ var d = this._outerRef;
204
+ u === "vertical" ? c = d.scrollWidth > d.clientWidth ? G() : 0 : c = d.scrollHeight > d.clientHeight ? G() : 0;
205
+ }
206
+ this.scrollTo(y(this.props, e, n, f, this._instanceProps, c));
207
+ }, b.componentDidMount = function() {
208
+ var e = this.props, n = e.direction, o = e.initialScrollOffset, s = e.layout;
209
+ if (typeof o == "number" && this._outerRef != null) {
210
+ var u = this._outerRef;
211
+ n === "horizontal" || s === "horizontal" ? u.scrollLeft = o : u.scrollTop = o;
212
+ }
213
+ this._callPropsCallbacks();
214
+ }, b.componentDidUpdate = function() {
215
+ var e = this.props, n = e.direction, o = e.layout, s = this.state, u = s.scrollOffset, f = s.scrollUpdateWasRequested;
216
+ if (f && this._outerRef != null) {
217
+ var c = this._outerRef;
218
+ if (n === "horizontal" || o === "horizontal")
219
+ if (n === "rtl")
220
+ switch (J()) {
221
+ case "negative":
222
+ c.scrollLeft = -u;
223
+ break;
224
+ case "positive-ascending":
225
+ c.scrollLeft = u;
226
+ break;
227
+ default:
228
+ var d = c.clientWidth, h = c.scrollWidth;
229
+ c.scrollLeft = h - d - u;
230
+ break;
231
+ }
232
+ else
233
+ c.scrollLeft = u;
234
+ else
235
+ c.scrollTop = u;
236
+ }
237
+ this._callPropsCallbacks();
238
+ }, b.componentWillUnmount = function() {
239
+ this._resetIsScrollingTimeoutId !== null && B(this._resetIsScrollingTimeoutId);
240
+ }, b.render = function() {
241
+ 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, O = e.itemData, T = e.itemKey, x = T === void 0 ? pe : T, E = e.layout, Q = e.outerElementType, X = e.outerTagName, Y = e.style, Z = e.useIsScrolling, ee = e.width, V = this.state.isScrolling, W = s === "horizontal" || E === "horizontal", te = W ? this._onScrollHorizontal : this._onScrollVertical, U = this._getRangeToRender(), re = U[0], ie = U[1], $ = [];
242
+ if (h > 0)
243
+ for (var C = re; C <= ie; C++)
244
+ $.push(k(n, {
245
+ data: O,
246
+ key: x(C, O),
247
+ index: C,
248
+ isScrolling: Z ? V : void 0,
249
+ style: this._getItemStyle(C)
250
+ }));
251
+ var q = l(this.props, this._instanceProps);
252
+ return k(Q || X || "div", {
253
+ className: o,
254
+ onScroll: te,
255
+ ref: this._outerRefSetter,
256
+ style: A({
257
+ position: "relative",
258
+ height: u,
259
+ width: ee,
260
+ overflow: "auto",
261
+ WebkitOverflowScrolling: "touch",
262
+ willChange: "transform",
263
+ direction: s
264
+ }, Y)
265
+ }, k(c || d || "div", {
266
+ children: $,
267
+ ref: f,
268
+ style: {
269
+ height: W ? "100%" : q,
270
+ pointerEvents: V ? "none" : void 0,
271
+ width: W ? q : "100%"
272
+ }
273
+ }));
274
+ }, b._callPropsCallbacks = function() {
275
+ if (typeof this.props.onItemsRendered == "function") {
276
+ var e = this.props.itemCount;
277
+ if (e > 0) {
278
+ var n = this._getRangeToRender(), o = n[0], s = n[1], u = n[2], f = n[3];
279
+ this._callOnItemsRendered(o, s, u, f);
280
+ }
281
+ }
282
+ if (typeof this.props.onScroll == "function") {
283
+ var c = this.state, d = c.scrollDirection, h = c.scrollOffset, O = c.scrollUpdateWasRequested;
284
+ this._callOnScroll(d, h, O);
285
+ }
286
+ }, b._getRangeToRender = function() {
287
+ var e = this.props, n = e.itemCount, o = e.overscanCount, s = this.state, u = s.isScrolling, f = s.scrollDirection, c = s.scrollOffset;
288
+ if (n === 0)
289
+ return [0, 0, 0, 0];
290
+ var d = m(this.props, c, this._instanceProps), h = v(this.props, d, c, this._instanceProps), O = !u || f === "backward" ? Math.max(1, o) : 1, T = !u || f === "forward" ? Math.max(1, o) : 1;
291
+ return [Math.max(0, d - O), Math.max(0, Math.min(n - 1, h + T)), d, h];
292
+ }, z;
293
+ }(ne), t.defaultProps = {
294
+ direction: "ltr",
295
+ itemData: void 0,
296
+ layout: "vertical",
297
+ overscanCount: 2,
298
+ useIsScrolling: !1
299
+ }, t;
300
+ }
301
+ var ve = function(t, i) {
302
+ var l = t.children, a = t.direction, y = t.height, m = t.layout, v = t.innerTagName, S = t.outerTagName, I = t.width, g = i.instance;
303
+ if (process.env.NODE_ENV !== "production") {
304
+ (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."));
305
+ var w = a === "horizontal" || m === "horizontal";
306
+ switch (a) {
307
+ case "horizontal":
308
+ case "vertical":
309
+ 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.'));
310
+ break;
311
+ case "ltr":
312
+ case "rtl":
313
+ break;
314
+ default:
315
+ throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + a + '" was specified.'));
316
+ }
317
+ switch (m) {
318
+ case "horizontal":
319
+ case "vertical":
320
+ break;
321
+ default:
322
+ throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + m + '" was specified.'));
323
+ }
324
+ if (l == null)
325
+ throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
326
+ if (w && typeof I != "number")
327
+ throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
328
+ if (!w && typeof y != "number")
329
+ throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (y === null ? "null" : typeof y) + '" was specified.'));
330
+ }
331
+ }, ge = /* @__PURE__ */ me({
332
+ getItemOffset: function(t, i) {
333
+ var l = t.itemSize;
334
+ return i * l;
335
+ },
336
+ getItemSize: function(t, i) {
337
+ var l = t.itemSize;
338
+ return l;
339
+ },
340
+ getEstimatedTotalSize: function(t) {
341
+ var i = t.itemCount, l = t.itemSize;
342
+ return l * i;
343
+ },
344
+ getOffsetForIndexAndAlignment: function(t, i, l, a, y, m) {
345
+ var v = t.direction, S = t.height, I = t.itemCount, g = t.itemSize, w = t.layout, z = t.width, b = v === "horizontal" || w === "horizontal", p = b ? z : S, e = Math.max(0, I * g - p), n = Math.min(e, i * g), o = Math.max(0, i * g - p + g + m);
346
+ switch (l === "smart" && (a >= o - p && a <= n + p ? l = "auto" : l = "center"), l) {
347
+ case "start":
348
+ return n;
349
+ case "end":
350
+ return o;
351
+ case "center": {
352
+ var s = Math.round(o + (n - o) / 2);
353
+ return s < Math.ceil(p / 2) ? 0 : s > e + Math.floor(p / 2) ? e : s;
354
+ }
355
+ case "auto":
356
+ default:
357
+ return a >= o && a <= n ? a : a < o ? o : n;
358
+ }
359
+ },
360
+ getStartIndexForOffset: function(t, i) {
361
+ var l = t.itemCount, a = t.itemSize;
362
+ return Math.max(0, Math.min(l - 1, Math.floor(i / a)));
363
+ },
364
+ getStopIndexForStartIndex: function(t, i, l) {
365
+ var a = t.direction, y = t.height, m = t.itemCount, v = t.itemSize, S = t.layout, I = t.width, g = a === "horizontal" || S === "horizontal", w = i * v, z = g ? I : y, b = Math.ceil((z + l - w) / v);
366
+ return Math.max(0, Math.min(
367
+ m - 1,
368
+ i + b - 1
369
+ // -1 is because stop index is inclusive
370
+ ));
371
+ },
372
+ initInstanceProps: function(t) {
373
+ },
374
+ shouldResetStyleCacheOnItemSizeChange: !0,
375
+ validateProps: function(t) {
376
+ var i = t.itemSize;
377
+ if (process.env.NODE_ENV !== "production" && typeof i != "number")
378
+ throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
379
+ }
380
+ });
381
+ function Se() {
382
+ const [r, t] = N.useState([500, 500]), i = N.useRef(null);
383
+ return N.useEffect(() => {
384
+ const l = () => {
385
+ if (i.current) {
386
+ const a = i.current.getBoundingClientRect();
387
+ t([a.width, a.height]);
388
+ }
389
+ };
390
+ return l(), window.addEventListener("resize", l), () => {
391
+ window.removeEventListener("resize", l);
392
+ };
393
+ }, []), [i, ...r];
394
+ }
395
+ const ye = N.forwardRef(function(t, i) {
396
+ return /* @__PURE__ */ R(le, { scrollerRef: i, ...t });
397
+ });
398
+ function Te(r) {
399
+ const {
400
+ className: t,
401
+ itemCount: i,
402
+ itemHeight: l,
403
+ renderItem: a,
404
+ initialScrollOffset: y,
405
+ onScrollUpdate: m
406
+ } = r, v = m ? (w) => m == null ? void 0 : m(w.scrollOffset) : void 0, [S, I, g] = Se();
407
+ return /* @__PURE__ */ R("div", { ref: S, className: oe(se.virtual, t), children: /* @__PURE__ */ R(
408
+ ge,
409
+ {
410
+ outerElementType: ye,
411
+ width: I,
412
+ height: g,
413
+ itemCount: i,
414
+ itemSize: l,
415
+ initialScrollOffset: y,
416
+ onScroll: v,
417
+ children: ({
418
+ index: w,
419
+ style: z
420
+ }) => /* @__PURE__ */ R("div", { style: z, children: a(w) })
421
+ }
422
+ ) });
423
+ }
424
+ export {
425
+ Te as VirtualScrollable
426
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type LoafSize = 'small' | 'normal' | 'large';
4
+ export type LoafColor = 'normal' | 'gold' | 'error';
5
+ export interface LoafProps {
6
+ size?: LoafSize;
7
+ color?: LoafColor;
8
+ bright?: boolean;
9
+ className?: string;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const Loaf: React.ForwardRefExoticComponent<LoafProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,27 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import { clsx as m } from "../../utils/clsx.js";
4
+ import '../../assets/Loaf.css';const n = "_root_gg27t_1", f = "_bright_gg27t_14", o = {
5
+ root: n,
6
+ "color-normal": "_color-normal_gg27t_10",
7
+ bright: f,
8
+ "color-gold": "_color-gold_gg27t_17",
9
+ "color-error": "_color-error_gg27t_24",
10
+ "size-small": "_size-small_gg27t_32",
11
+ "size-normal": "_size-normal_gg27t_39",
12
+ "size-large": "_size-large_gg27t_46"
13
+ }, p = i.forwardRef(function(r, t) {
14
+ const {
15
+ size: l = "normal",
16
+ color: s = "normal",
17
+ bright: _ = !1,
18
+ children: g,
19
+ className: a
20
+ } = r, e = m(o.root, o[`size-${l}`], o[`color-${s}`], a, {
21
+ [o.bright]: _
22
+ });
23
+ return /* @__PURE__ */ c("div", { ref: t, className: e, children: g });
24
+ });
25
+ export {
26
+ p as Loaf
27
+ };
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ModalProps {
4
+ children: React.ReactNode;
5
+ onClose?: () => void;
6
+ backdropClassName?: string;
7
+ contentClassName?: string;
8
+ disableBackdropClose?: boolean;
9
+ }
10
+ export declare function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare namespace Modal {
12
+ var Header: ({ children, }: {
13
+ children?: React.ReactNode;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ var Footer: ({ children, }: {
16
+ children?: React.ReactNode;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ }
@@ -0,0 +1,42 @@
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { Button as _ } from "../Button/Button.js";
3
+ import { I as f } from "../../Icons-B26SczGZ.js";
4
+ import { Overlay as s } from "../Overlay/Overlay.js";
5
+ import { n as c } from "../../functional-C0pE183N.js";
6
+ import { b as h } from "../../hooks-Bv1kQUpO.js";
7
+ import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27", u = "_header_1v8ee_37", N = "_footer_1v8ee_47", r = {
8
+ root: v,
9
+ "modal-appearance": "_modal-appearance_1v8ee_1",
10
+ close: C,
11
+ header: u,
12
+ footer: N
13
+ };
14
+ function l(a) {
15
+ const {
16
+ onClose: e = c,
17
+ children: d,
18
+ backdropClassName: i,
19
+ contentClassName: m,
20
+ disableBackdropClose: p = !1
21
+ } = a, t = p ? c : e;
22
+ return h(t), /* @__PURE__ */ n(s, { children: [
23
+ /* @__PURE__ */ o(s.Backdrop, { onClick: t, className: i }),
24
+ /* @__PURE__ */ o(s.Content, { className: m, children: /* @__PURE__ */ n("div", { className: r.root, children: [
25
+ !!e && /* @__PURE__ */ o("div", { className: r.close, children: /* @__PURE__ */ o(_, { size: "large", theme: "transparent", icon: f.exit, onClick: e }) }),
26
+ d
27
+ ] }) })
28
+ ] });
29
+ }
30
+ l.Header = function({
31
+ children: e
32
+ }) {
33
+ return /* @__PURE__ */ o("div", { className: r.header, children: e });
34
+ };
35
+ l.Footer = function({
36
+ children: e
37
+ }) {
38
+ return /* @__PURE__ */ o("div", { className: r.footer, children: e });
39
+ };
40
+ export {
41
+ l as Modal
42
+ };
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { ValueOrGetter } from '../../utils/getValue';
3
+
4
+ export interface NavListItem {
5
+ id: string;
6
+ icon?: ValueOrGetter<React.ReactNode>;
7
+ label: ValueOrGetter<React.ReactNode>;
8
+ }
9
+ export interface NavListProps {
10
+ items: NavListItem[];
11
+ activeItemId: string;
12
+ onActivate?(id: string): void;
13
+ }
14
+ export declare const NavList: React.ForwardRefExoticComponent<NavListProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,33 @@
1
+ import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
+ import d from "react";
3
+ import { Interactive as _ } from "../Interactive/Interactive.js";
4
+ import { clsx as v } from "../../utils/clsx.js";
5
+ import { n as f } from "../../functional-C0pE183N.js";
6
+ import { getValue as c } from "../../utils/getValue.js";
7
+ import '../../assets/NavList.css';const p = "_root_2ug76_1", u = "_item_2ug76_5", N = "_active_2ug76_23", g = "_icon_2ug76_33", t = {
8
+ root: p,
9
+ item: u,
10
+ active: N,
11
+ icon: g
12
+ }, k = d.forwardRef(function(e, n) {
13
+ const {
14
+ items: r,
15
+ activeItemId: s,
16
+ onActivate: a = f
17
+ } = e, m = r.map((o) => /* @__PURE__ */ l(
18
+ _,
19
+ {
20
+ className: v(t.item, { [t.active]: o.id === s }),
21
+ onClick: () => a(o.id),
22
+ children: [
23
+ !!o.icon && /* @__PURE__ */ i("div", { className: t.icon, children: c(o.icon) }),
24
+ /* @__PURE__ */ i("div", { className: t.label, children: c(o.label) })
25
+ ]
26
+ },
27
+ o.id
28
+ ));
29
+ return /* @__PURE__ */ i("div", { ref: n, className: t.root, children: m });
30
+ });
31
+ export {
32
+ k as NavList
33
+ };
@@ -0,0 +1,5 @@
1
+ export interface OnScreenSensorProps {
2
+ onEnter?(): void;
3
+ onLeave?(): void;
4
+ }
5
+ export declare function OnScreenSensor(props: OnScreenSensorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import t from "react";
3
+ import { n as o } from "../functional-C0pE183N.js";
4
+ import { u as s } from "../hooks-Bv1kQUpO.js";
5
+ const l = {
6
+ width: "0",
7
+ height: "0"
8
+ };
9
+ function h(c) {
10
+ const {
11
+ onEnter: f = o,
12
+ onLeave: i = o
13
+ } = c, u = s(f), m = s(i), e = t.useRef(null);
14
+ return t.useEffect(() => {
15
+ if (!e.current)
16
+ return;
17
+ const n = new IntersectionObserver((a) => {
18
+ const [r] = a;
19
+ r && (r.isIntersecting ? u.current() : m.current());
20
+ });
21
+ return n.observe(e.current), () => n.disconnect();
22
+ }, []), /* @__PURE__ */ p("span", { ref: e, style: l });
23
+ }
24
+ export {
25
+ h as OnScreenSensor
26
+ };
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface OverlayProps {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ export declare function Overlay(props: OverlayProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare namespace Overlay {
9
+ var Backdrop: React.ForwardRefExoticComponent<OverlayBackdropProps & React.RefAttributes<HTMLDivElement>>;
10
+ var Content: React.ForwardRefExoticComponent<OverlayContentProps & React.RefAttributes<HTMLDivElement>>;
11
+ }
12
+ export interface OverlayBackdropProps {
13
+ children?: React.ReactNode;
14
+ className?: string;
15
+ onClick?(): void;
16
+ }
17
+ export interface OverlayContentProps {
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ }
@@ -0,0 +1,28 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import n from "react";
3
+ import { F as s } from "../../Combination-AG9vHdSx.js";
4
+ import { Interactive as i } from "../Interactive/Interactive.js";
5
+ import { clsx as a } from "../../utils/clsx.js";
6
+ import { a as m } from "../../outlet-C4wpavcH.js";
7
+ import '../../assets/Overlay.css';const u = "_root_15udb_1", f = "_backdrop_15udb_9", _ = "_content_15udb_27", e = {
8
+ root: u,
9
+ backdrop: f,
10
+ "backdrop-appearance": "_backdrop-appearance_15udb_1",
11
+ content: _
12
+ }, p = m("overlay-outlet");
13
+ function l(c) {
14
+ const {
15
+ className: o,
16
+ children: t
17
+ } = c, d = a(e.root, o);
18
+ return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r("div", { className: d, children: t }) });
19
+ }
20
+ l.Backdrop = n.forwardRef(function(o, t) {
21
+ return /* @__PURE__ */ r(i, { ref: t, onClick: o.onClick, className: a(e.backdrop, o.className), children: o.children });
22
+ });
23
+ l.Content = n.forwardRef(function(o, t) {
24
+ return /* @__PURE__ */ r("div", { ref: t, className: a(e.content, o.className), children: /* @__PURE__ */ r(s, { children: o.children }) });
25
+ });
26
+ export {
27
+ l as Overlay
28
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { InteractiveProps } from '../Interactive/Interactive';
3
+
4
+ type PopoverPosition = 'top-right';
5
+ export interface PopoverProps extends Omit<InteractiveProps, 'children'> {
6
+ at: PopoverPosition;
7
+ popover: React.ReactNode;
8
+ children: (active: boolean) => React.ReactNode;
9
+ active?: boolean;
10
+ }
11
+ export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ export {};