tgui-core 1.1.3 → 1.1.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.
@@ -1,28 +1,28 @@
1
- import { jsx as $ } from "react/jsx-runtime";
2
- import { useState as R, useEffect as d } from "react";
3
- import { resolveAsset as j } from "../common/assets.js";
4
- import { fetchRetry as v } from "../common/http.js";
5
- import { Image as x } from "./Image.js";
6
- let e;
7
- function b(n) {
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { useState as R, useEffect as u } from "react";
3
+ import { resolveAsset as l } from "../common/assets.js";
4
+ import { fetchRetry as A } from "../common/http.js";
5
+ import { Image as N } from "./Image.js";
6
+ let s;
7
+ function x(t) {
8
8
  const {
9
- className: y,
10
- direction: f = 2,
11
- fallback: a,
12
- frame: c = 1,
13
- icon_state: m,
14
- icon: t,
15
- movement: i = !1,
16
- ...p
17
- } = n, [o, r] = R(""), u = `${o}?state=${m}&dir=${f}&movement=${i}&frame=${c}`;
18
- return d(() => {
19
- async function l() {
20
- const s = await (await v(j("icon_ref_map.json"))).json();
21
- e = s, r(s[t]);
9
+ className: c,
10
+ direction: m = 2,
11
+ fallback: r,
12
+ frame: S = 1,
13
+ icon_state: o,
14
+ icon: e,
15
+ movement: E = !1,
16
+ ...H
17
+ } = t, [T, f] = R(""), O = `${T}?state=${o}&dir=${m}&movement=${E}&frame=${S}`;
18
+ return u(() => {
19
+ async function n() {
20
+ const a = await (await A(l("icon_ref_map.json"))).json();
21
+ s = a, f(a[e]);
22
22
  }
23
- e ? r(e[t]) : l();
24
- }, []), o ? /* @__PURE__ */ $(x, { fixErrors: !0, src: u, ...p }) : a;
23
+ s ? f(s[e]) : n();
24
+ }, []), T ? /* @__PURE__ */ p(N, { fixErrors: !0, src: O, ...H }) : r;
25
25
  }
26
26
  export {
27
- b as DmIcon
27
+ x as DmIcon
28
28
  };
@@ -1,73 +1,73 @@
1
- import { jsx as o, jsxs as m, Fragment as W } from "react/jsx-runtime";
2
- import { useState as F, useRef as L, useEffect as q } from "react";
3
- import { classes as y } from "../common/react.js";
4
- import { unit as z } from "./Box.js";
5
- import { Button as D } from "./Button.js";
6
- import { Icon as b } from "./Icon.js";
7
- import { Popper as A } from "./Popper.js";
1
+ import { jsx as r, jsxs as m, Fragment as L } from "react/jsx-runtime";
2
+ import { useState as R, useRef as q, useEffect as z } from "react";
3
+ import { classes as N } from "../common/react.js";
4
+ import { unit as A } from "./Box.js";
5
+ import { Button as b } from "./Button.js";
6
+ import { Icon as D } from "./Icon.js";
7
+ import { Popper as E } from "./Popper.js";
8
8
  const G = -1;
9
9
  function f(d) {
10
10
  return typeof d == "string" ? d : d.value;
11
11
  }
12
12
  function Y(d) {
13
13
  const {
14
- autoScroll: w = !0,
15
- buttons: I,
16
- className: O,
17
- clipSelectedText: k = !0,
18
- color: B = "default",
14
+ autoScroll: x = !0,
15
+ buttons: k,
16
+ className: B,
17
+ clipSelectedText: C = !0,
18
+ color: O = "default",
19
19
  disabled: a,
20
- displayText: C,
21
- icon: x,
22
- iconRotation: T,
23
- iconSpin: j,
24
- menuWidth: R = "15rem",
25
- noChevron: S,
20
+ displayText: j,
21
+ icon: w,
22
+ iconRotation: I,
23
+ iconSpin: P,
24
+ menuWidth: S = "15rem",
25
+ noChevron: T,
26
26
  onClick: p,
27
27
  onSelected: i,
28
- options: r = [],
28
+ options: o = [],
29
29
  over: g,
30
- placeholder: E = "Select...",
30
+ placeholder: V = "Select...",
31
31
  selected: u,
32
- width: P = "15rem"
33
- } = d, [l, h] = F(!1), V = g ? !l : l, v = L(null), s = r.findIndex((e) => f(e) === u) || 0;
32
+ width: W = "15rem"
33
+ } = d, [s, h] = R(!1), F = g ? !s : s, v = q(null), l = o.findIndex((e) => f(e) === u) || 0;
34
34
  function _(e) {
35
35
  var c;
36
36
  let t = e;
37
- e < s ? t = e < 2 ? 0 : e - 2 : t = e > r.length - 3 ? r.length - 1 : e - 2;
37
+ e < l ? t = e < 2 ? 0 : e - 2 : t = e > o.length - 3 ? o.length - 1 : e - 2;
38
38
  const n = (c = v.current) == null ? void 0 : c.children[t];
39
39
  n == null || n.scrollIntoView({ block: "nearest" });
40
40
  }
41
- function N(e) {
42
- if (r.length < 1 || a)
41
+ function y(e) {
42
+ if (o.length < 1 || a)
43
43
  return;
44
- const t = 0, n = r.length - 1;
44
+ const t = 0, n = o.length - 1;
45
45
  let c;
46
- s < 0 ? c = e === "next" ? n : t : e === "next" ? c = s === n ? t : s + 1 : c = s === t ? n : s - 1, l && w && _(c), i == null || i(f(r[c]));
46
+ l < 0 ? c = e === "next" ? n : t : e === "next" ? c = l === n ? t : l + 1 : c = l === t ? n : l - 1, s && x && _(c), i == null || i(f(o[c]));
47
47
  }
48
- return q(() => {
48
+ return z(() => {
49
49
  var e;
50
- l && (w && s !== G && _(s), (e = v.current) == null || e.focus());
51
- }, [l]), /* @__PURE__ */ o(
52
- A,
50
+ s && (x && l !== G && _(l), (e = v.current) == null || e.focus());
51
+ }, [s]), /* @__PURE__ */ r(
52
+ E,
53
53
  {
54
- isOpen: l,
54
+ isOpen: s,
55
55
  onClickOutside: () => h(!1),
56
56
  placement: g ? "top-start" : "bottom-start",
57
57
  content: /* @__PURE__ */ m(
58
58
  "div",
59
59
  {
60
60
  className: "Layout Dropdown__menu",
61
- style: { minWidth: R },
61
+ style: { minWidth: S },
62
62
  ref: v,
63
63
  children: [
64
- r.length === 0 && /* @__PURE__ */ o("div", { className: "Dropdown__menuentry", children: "No options" }),
65
- r.map((e, t) => {
64
+ o.length === 0 && /* @__PURE__ */ r("div", { className: "Dropdown__menuentry", children: "No options" }),
65
+ o.map((e, t) => {
66
66
  const n = f(e);
67
- return /* @__PURE__ */ o(
67
+ return /* @__PURE__ */ r(
68
68
  "div",
69
69
  {
70
- className: y([
70
+ className: N([
71
71
  "Dropdown__menuentry",
72
72
  u === n && "selected"
73
73
  ]),
@@ -82,60 +82,60 @@ function Y(d) {
82
82
  ]
83
83
  }
84
84
  ),
85
- children: /* @__PURE__ */ m("div", { className: "Dropdown", style: { width: z(P) }, children: [
85
+ children: /* @__PURE__ */ m("div", { className: "Dropdown", style: { width: A(W) }, children: [
86
86
  /* @__PURE__ */ m(
87
87
  "div",
88
88
  {
89
- className: y([
89
+ className: N([
90
90
  "Dropdown__control",
91
91
  "Button",
92
92
  "Button--dropdown",
93
- "Button--color--" + B,
93
+ "Button--color--" + O,
94
94
  a && "Button--disabled",
95
- O
95
+ B
96
96
  ]),
97
97
  onClick: (e) => {
98
- a && !l || (h(!l), p == null || p(e));
98
+ a && !s || (h(!s), p == null || p(e));
99
99
  },
100
100
  children: [
101
- x && /* @__PURE__ */ o(b, { mr: 1, name: x, rotation: T, spin: j }),
102
- /* @__PURE__ */ o(
101
+ w && /* @__PURE__ */ r(D, { mr: 1, name: w, rotation: I, spin: P }),
102
+ /* @__PURE__ */ r(
103
103
  "span",
104
104
  {
105
105
  className: "Dropdown__selected-text",
106
106
  style: {
107
- overflow: k ? "hidden" : "visible"
107
+ overflow: C ? "hidden" : "visible"
108
108
  },
109
- children: C || u && f(u) || E
109
+ children: j || u && f(u) || V
110
110
  }
111
111
  ),
112
- !S && /* @__PURE__ */ o("span", { className: "Dropdown__arrow-button", children: /* @__PURE__ */ o(b, { name: V ? "chevron-up" : "chevron-down" }) })
112
+ !T && /* @__PURE__ */ r("span", { className: "Dropdown__arrow-button", children: /* @__PURE__ */ r(D, { name: F ? "chevron-up" : "chevron-down" }) })
113
113
  ]
114
114
  }
115
115
  ),
116
- I && /* @__PURE__ */ m(W, { children: [
117
- /* @__PURE__ */ o(
118
- D,
116
+ k && /* @__PURE__ */ m(L, { children: [
117
+ /* @__PURE__ */ r(
118
+ b,
119
119
  {
120
120
  disabled: a,
121
121
  height: 1.8,
122
122
  icon: "chevron-left",
123
123
  onClick: () => {
124
- N(
124
+ y(
125
125
  "previous"
126
126
  /* Previous */
127
127
  );
128
128
  }
129
129
  }
130
130
  ),
131
- /* @__PURE__ */ o(
132
- D,
131
+ /* @__PURE__ */ r(
132
+ b,
133
133
  {
134
134
  disabled: a,
135
135
  height: 1.8,
136
136
  icon: "chevron-right",
137
137
  onClick: () => {
138
- N(
138
+ y(
139
139
  "next"
140
140
  /* Next */
141
141
  );
@@ -1,5 +1,5 @@
1
1
  import { jsx as _, jsxs as j } from "react/jsx-runtime";
2
- import { keyOfMatchingRange as E, scale as s } from "../common/math.js";
2
+ import { scale as s, keyOfMatchingRange as E } from "../common/math.js";
3
3
  import { classes as e } from "../common/react.js";
4
4
  import { computeBoxClassName as K, computeBoxProps as I } from "./Box.js";
5
5
  import { DraggableControl as O } from "./DraggableControl.js";
@@ -1,85 +1,86 @@
1
- import { jsxs as M, Fragment as P, jsx as S } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { useState as E, useRef as g, useEffect as F } from "react";
4
- import * as _ from "react-dom";
5
- import { c as A } from "../popper-CiqSDJTE.js";
6
- var j = function(r) {
7
- return r.reduce(function(n, t) {
8
- var o = t[0], u = t[1];
9
- return n[o] = u, n;
1
+ import { jsxs as M, Fragment as j, jsx as E } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { useState as O, useRef as R, useEffect as N } from "react";
4
+ import * as x from "react-dom";
5
+ import { c as A } from "../index-jLZg_duJ.js";
6
+ var W = c.createContext(), Y = c.createContext();
7
+ var P = function(r) {
8
+ return r.reduce(function(n, e) {
9
+ var o = e[0], a = e[1];
10
+ return n[o] = a, n;
10
11
  }, {});
11
- }, R = typeof window < "u" && window.document && window.document.createElement ? l.useLayoutEffect : l.useEffect;
12
- function I(e) {
13
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
12
+ }, S = typeof window < "u" && window.document && window.document.createElement ? c.useLayoutEffect : c.useEffect;
13
+ function I(t) {
14
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
14
15
  }
15
- var U = typeof Element < "u", x = typeof Map == "function", z = typeof Set == "function", B = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
16
- function w(e, r) {
17
- if (e === r) return !0;
18
- if (e && r && typeof e == "object" && typeof r == "object") {
19
- if (e.constructor !== r.constructor) return !1;
20
- var n, t, o;
21
- if (Array.isArray(e)) {
22
- if (n = e.length, n != r.length) return !1;
23
- for (t = n; t-- !== 0; )
24
- if (!w(e[t], r[t])) return !1;
16
+ var _ = typeof Element < "u", F = typeof Map == "function", b = typeof Set == "function", D = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
17
+ function g(t, r) {
18
+ if (t === r) return !0;
19
+ if (t && r && typeof t == "object" && typeof r == "object") {
20
+ if (t.constructor !== r.constructor) return !1;
21
+ var n, e, o;
22
+ if (Array.isArray(t)) {
23
+ if (n = t.length, n != r.length) return !1;
24
+ for (e = n; e-- !== 0; )
25
+ if (!g(t[e], r[e])) return !1;
25
26
  return !0;
26
27
  }
27
- var u;
28
- if (x && e instanceof Map && r instanceof Map) {
29
- if (e.size !== r.size) return !1;
30
- for (u = e.entries(); !(t = u.next()).done; )
31
- if (!r.has(t.value[0])) return !1;
32
- for (u = e.entries(); !(t = u.next()).done; )
33
- if (!w(t.value[1], r.get(t.value[0]))) return !1;
28
+ var a;
29
+ if (F && t instanceof Map && r instanceof Map) {
30
+ if (t.size !== r.size) return !1;
31
+ for (a = t.entries(); !(e = a.next()).done; )
32
+ if (!r.has(e.value[0])) return !1;
33
+ for (a = t.entries(); !(e = a.next()).done; )
34
+ if (!g(e.value[1], r.get(e.value[0]))) return !1;
34
35
  return !0;
35
36
  }
36
- if (z && e instanceof Set && r instanceof Set) {
37
- if (e.size !== r.size) return !1;
38
- for (u = e.entries(); !(t = u.next()).done; )
39
- if (!r.has(t.value[0])) return !1;
37
+ if (b && t instanceof Set && r instanceof Set) {
38
+ if (t.size !== r.size) return !1;
39
+ for (a = t.entries(); !(e = a.next()).done; )
40
+ if (!r.has(e.value[0])) return !1;
40
41
  return !0;
41
42
  }
42
- if (B && ArrayBuffer.isView(e) && ArrayBuffer.isView(r)) {
43
- if (n = e.length, n != r.length) return !1;
44
- for (t = n; t-- !== 0; )
45
- if (e[t] !== r[t]) return !1;
43
+ if (D && ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {
44
+ if (n = t.length, n != r.length) return !1;
45
+ for (e = n; e-- !== 0; )
46
+ if (t[e] !== r[e]) return !1;
46
47
  return !0;
47
48
  }
48
- if (e.constructor === RegExp) return e.source === r.source && e.flags === r.flags;
49
- if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof r.valueOf == "function") return e.valueOf() === r.valueOf();
50
- if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof r.toString == "function") return e.toString() === r.toString();
51
- if (o = Object.keys(e), n = o.length, n !== Object.keys(r).length) return !1;
52
- for (t = n; t-- !== 0; )
53
- if (!Object.prototype.hasOwnProperty.call(r, o[t])) return !1;
54
- if (U && e instanceof Element) return !1;
55
- for (t = n; t-- !== 0; )
56
- if (!((o[t] === "_owner" || o[t] === "__v" || o[t] === "__o") && e.$$typeof) && !w(e[o[t]], r[o[t]]))
49
+ if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
50
+ if (t.valueOf !== Object.prototype.valueOf && typeof t.valueOf == "function" && typeof r.valueOf == "function") return t.valueOf() === r.valueOf();
51
+ if (t.toString !== Object.prototype.toString && typeof t.toString == "function" && typeof r.toString == "function") return t.toString() === r.toString();
52
+ if (o = Object.keys(t), n = o.length, n !== Object.keys(r).length) return !1;
53
+ for (e = n; e-- !== 0; )
54
+ if (!Object.prototype.hasOwnProperty.call(r, o[e])) return !1;
55
+ if (_ && t instanceof Element) return !1;
56
+ for (e = n; e-- !== 0; )
57
+ if (!((o[e] === "_owner" || o[e] === "__v" || o[e] === "__o") && t.$$typeof) && !g(t[o[e]], r[o[e]]))
57
58
  return !1;
58
59
  return !0;
59
60
  }
60
- return e !== e && r !== r;
61
+ return t !== t && r !== r;
61
62
  }
62
- var L = function(r, n) {
63
+ var U = function(r, n) {
63
64
  try {
64
- return w(r, n);
65
- } catch (t) {
66
- if ((t.message || "").match(/stack|recursion/i))
65
+ return g(r, n);
66
+ } catch (e) {
67
+ if ((e.message || "").match(/stack|recursion/i))
67
68
  return console.warn("react-fast-compare cannot handle circular refs"), !1;
68
- throw t;
69
+ throw e;
69
70
  }
70
71
  };
71
- const q = /* @__PURE__ */ I(L);
72
- var D = [], $ = function(r, n, t) {
73
- t === void 0 && (t = {});
74
- var o = l.useRef(null), u = {
75
- onFirstUpdate: t.onFirstUpdate,
76
- placement: t.placement || "bottom",
77
- strategy: t.strategy || "absolute",
78
- modifiers: t.modifiers || D
79
- }, m = l.useState({
72
+ const $ = /* @__PURE__ */ I(U);
73
+ var C = [], B = function(r, n, e) {
74
+ e === void 0 && (e = {});
75
+ var o = c.useRef(null), a = {
76
+ onFirstUpdate: e.onFirstUpdate,
77
+ placement: e.placement || "bottom",
78
+ strategy: e.strategy || "absolute",
79
+ modifiers: e.modifiers || C
80
+ }, l = c.useState({
80
81
  styles: {
81
82
  popper: {
82
- position: u.strategy,
83
+ position: a.strategy,
83
84
  left: "0",
84
85
  top: "0"
85
86
  },
@@ -88,90 +89,119 @@ var D = [], $ = function(r, n, t) {
88
89
  }
89
90
  },
90
91
  attributes: {}
91
- }), y = m[0], O = m[1], v = l.useMemo(function() {
92
+ }), v = l[0], h = l[1], y = c.useMemo(function() {
92
93
  return {
93
94
  name: "updateState",
94
95
  enabled: !0,
95
96
  phase: "write",
96
- fn: function(d) {
97
- var i = d.state, f = Object.keys(i.elements);
98
- _.flushSync(function() {
99
- O({
100
- styles: j(f.map(function(c) {
101
- return [c, i.styles[c] || {}];
97
+ fn: function(m) {
98
+ var p = m.state, f = Object.keys(p.elements);
99
+ x.flushSync(function() {
100
+ h({
101
+ styles: P(f.map(function(i) {
102
+ return [i, p.styles[i] || {}];
102
103
  })),
103
- attributes: j(f.map(function(c) {
104
- return [c, i.attributes[c]];
104
+ attributes: P(f.map(function(i) {
105
+ return [i, p.attributes[i]];
105
106
  }))
106
107
  });
107
108
  });
108
109
  },
109
110
  requires: ["computeStyles"]
110
111
  };
111
- }, []), p = l.useMemo(function() {
112
- var a = {
113
- onFirstUpdate: u.onFirstUpdate,
114
- placement: u.placement,
115
- strategy: u.strategy,
116
- modifiers: [].concat(u.modifiers, [v, {
112
+ }, []), d = c.useMemo(function() {
113
+ var s = {
114
+ onFirstUpdate: a.onFirstUpdate,
115
+ placement: a.placement,
116
+ strategy: a.strategy,
117
+ modifiers: [].concat(a.modifiers, [y, {
117
118
  name: "applyStyles",
118
119
  enabled: !1
119
120
  }])
120
121
  };
121
- return q(o.current, a) ? o.current || a : (o.current = a, a);
122
- }, [u.onFirstUpdate, u.placement, u.strategy, u.modifiers, v]), s = l.useRef();
123
- return R(function() {
124
- s.current && s.current.setOptions(p);
125
- }, [p]), R(function() {
122
+ return $(o.current, s) ? o.current || s : (o.current = s, s);
123
+ }, [a.onFirstUpdate, a.placement, a.strategy, a.modifiers, y]), u = c.useRef();
124
+ return S(function() {
125
+ u.current && u.current.setOptions(d);
126
+ }, [d]), S(function() {
126
127
  if (!(r == null || n == null)) {
127
- var a = t.createPopper || A, d = a(r, n, p);
128
- return s.current = d, function() {
129
- d.destroy(), s.current = null;
128
+ var s = e.createPopper || A, m = s(r, n, d);
129
+ return u.current = m, function() {
130
+ m.destroy(), u.current = null;
130
131
  };
131
132
  }
132
- }, [r, n, t.createPopper]), {
133
- state: s.current ? s.current.state : null,
134
- styles: y.styles,
135
- attributes: y.attributes,
136
- update: s.current ? s.current.update : null,
137
- forceUpdate: s.current ? s.current.forceUpdate : null
133
+ }, [r, n, e.createPopper]), {
134
+ state: u.current ? u.current.state : null,
135
+ styles: v.styles,
136
+ attributes: v.attributes,
137
+ update: u.current ? u.current.update : null,
138
+ forceUpdate: u.current ? u.current.forceUpdate : null
138
139
  };
139
140
  };
140
- function W(e) {
141
- const { children: r, content: n, isOpen: t, onClickOutside: o, placement: u } = e, [m, y] = E(null), [O, v] = E(
141
+ var q = process.env.NODE_ENV !== "production", z = function() {
142
+ };
143
+ if (q) {
144
+ var L = function(r, n) {
145
+ var e = arguments.length;
146
+ n = new Array(e > 1 ? e - 1 : 0);
147
+ for (var o = 1; o < e; o++)
148
+ n[o - 1] = arguments[o];
149
+ var a = 0, l = "Warning: " + r.replace(/%s/g, function() {
150
+ return n[a++];
151
+ });
152
+ typeof console < "u" && console.error(l);
153
+ try {
154
+ throw new Error(l);
155
+ } catch {
156
+ }
157
+ };
158
+ z = function(t, r, n) {
159
+ var e = arguments.length;
160
+ n = new Array(e > 2 ? e - 2 : 0);
161
+ for (var o = 2; o < e; o++)
162
+ n[o - 2] = arguments[o];
163
+ if (r === void 0)
164
+ throw new Error(
165
+ "`warning(condition, format, ...args)` requires a warning message argument"
166
+ );
167
+ t || L.apply(null, [r].concat(n));
168
+ };
169
+ }
170
+ function G(t) {
171
+ const { children: r, content: n, isOpen: e, onClickOutside: o, placement: a } = t, [l, v] = O(null), [h, y] = O(
142
172
  null
143
- ), p = g(null), s = g(null), { styles: a, attributes: d } = $(m, O, {
144
- placement: u
173
+ ), d = R(null), u = R(null), { styles: s, attributes: m } = B(l, h, {
174
+ placement: a
145
175
  });
146
- function i(f) {
147
- var c, h;
148
- !((c = p.current) != null && c.contains(f.target)) && !((h = s.current) != null && h.contains(f.target)) && (o == null || o());
176
+ function p(f) {
177
+ var i, w;
178
+ !((i = d.current) != null && i.contains(f.target)) && !((w = u.current) != null && w.contains(f.target)) && (o == null || o());
149
179
  }
150
- return F(() => (t ? document.addEventListener("mousedown", i) : document.removeEventListener("mousedown", i), () => {
151
- document.removeEventListener("mousedown", i);
152
- }), [t]), /* @__PURE__ */ M(P, { children: [
153
- /* @__PURE__ */ S(
180
+ return N(() => (e ? document.addEventListener("mousedown", p) : document.removeEventListener("mousedown", p), () => {
181
+ document.removeEventListener("mousedown", p);
182
+ }), [e]), /* @__PURE__ */ M(j, { children: [
183
+ /* @__PURE__ */ E(
154
184
  "div",
155
185
  {
156
186
  ref: (f) => {
157
- y(f), s.current = f;
187
+ v(f), u.current = f;
158
188
  },
159
189
  children: r
160
190
  }
161
191
  ),
162
- t && /* @__PURE__ */ S(
192
+ e && /* @__PURE__ */ E(
163
193
  "div",
164
194
  {
165
195
  ref: (f) => {
166
- v(f), p.current = f;
196
+ y(f), d.current = f;
167
197
  },
168
- style: { ...a.popper, zIndex: e.baseZIndex ?? 5 },
169
- ...d.popper,
198
+ style: { ...s.popper, zIndex: t.baseZIndex ?? 5 },
199
+ ...m.popper,
170
200
  children: n
171
201
  }
172
202
  )
173
203
  ] });
174
204
  }
175
205
  export {
176
- W as Popper
206
+ G as Popper
177
207
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as g, jsx as n } from "react/jsx-runtime";
2
2
  import { CSS_COLORS as v } from "../common/constants.js";
3
- import { keyOfMatchingRange as y, toFixed as N, scale as _, clamp01 as B } from "../common/math.js";
3
+ import { scale as y, keyOfMatchingRange as N, clamp01 as _, toFixed as B } from "../common/math.js";
4
4
  import { classes as m } from "../common/react.js";
5
5
  import { s as o } from "../ProgressBar.module-BkAFfFy0.js";
6
6
  import { computeBoxProps as S, computeBoxClassName as O } from "./Box.js";
@@ -14,12 +14,12 @@ function w(d) {
14
14
  ranges: h = {},
15
15
  children: l,
16
16
  ...t
17
- } = d, a = _(r, u, p), x = l !== void 0, s = C || y(r, h) || "default", e = S(t), c = [
17
+ } = d, a = y(r, u, p), x = l !== void 0, s = C || N(r, h) || "default", e = S(t), c = [
18
18
  o.progressBar,
19
19
  f,
20
20
  O(t)
21
21
  ], i = {
22
- width: B(a) * 100 + "%"
22
+ width: _(a) * 100 + "%"
23
23
  };
24
24
  return v.includes(s) || s === "default" ? c.push(o["color__" + s]) : (e.style = { ...e.style, borderColor: s }, i.backgroundColor = s), /* @__PURE__ */ g("div", { className: m(c), ...e, children: [
25
25
  /* @__PURE__ */ n(
@@ -29,7 +29,7 @@ function w(d) {
29
29
  style: i
30
30
  }
31
31
  ),
32
- /* @__PURE__ */ n("div", { className: o.content, children: x ? l : N(a * 100) + "%" })
32
+ /* @__PURE__ */ n("div", { className: o.content, children: x ? l : B(a * 100) + "%" })
33
33
  ] });
34
34
  }
35
35
  export {
@@ -1,5 +1,5 @@
1
1
  import { jsxs as k, jsx as _ } from "react/jsx-runtime";
2
- import { scale as d, keyOfMatchingRange as M, clamp01 as N } from "../common/math.js";
2
+ import { scale as d, clamp01 as M, keyOfMatchingRange as N } from "../common/math.js";
3
3
  import { classes as u } from "../common/react.js";
4
4
  import { AnimatedNumber as A } from "./AnimatedNumber.js";
5
5
  import { Box as B, computeBoxClassName as G, computeBoxProps as j } from "./Box.js";
@@ -65,7 +65,7 @@ function A_(y) {
65
65
  style: w,
66
66
  value: l,
67
67
  ...m
68
- } = y, C = d(l, s, n), p = N(C), c = a ? {} : { primary: [0, 1] };
68
+ } = y, C = d(l, s, n), p = M(C), c = a ? {} : { primary: [0, 1] };
69
69
  a && Object.keys(a).forEach((t) => {
70
70
  const g = a[t];
71
71
  c[t] = [
@@ -76,7 +76,7 @@ function A_(y) {
76
76
  function x() {
77
77
  return o && r && l > o && l < r || o && l > o ? !0 : !!(r && l < r);
78
78
  }
79
- const b = x() && M(p, c);
79
+ const b = x() && N(p, c);
80
80
  return /* @__PURE__ */ k(B, { inline: !0, children: [
81
81
  /* @__PURE__ */ _(
82
82
  "div",
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as S, useEffect as j } from "react";
3
3
  import { addScrollableNode as z, removeScrollableNode as B } from "../common/events.js";
4
- import { classes as H, canRender as m } from "../common/react.js";
4
+ import { canRender as m, classes as H } from "../common/react.js";
5
5
  import { s as t } from "../Section.module-CLVHJ4yA.js";
6
6
  import { computeBoxClassName as T, computeBoxProps as y } from "./Box.js";
7
7
  const q = S(
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as m } from "react/jsx-runtime";
2
- import { keyOfMatchingRange as R, clamp01 as t, scale as f } from "../common/math.js";
2
+ import { scale as f, keyOfMatchingRange as R, clamp01 as t } from "../common/math.js";
3
3
  import { classes as _ } from "../common/react.js";
4
4
  import { s as e } from "../ProgressBar.module-BkAFfFy0.js";
5
5
  import { computeBoxClassName as $, computeBoxProps as q } from "./Box.js";