@protonradio/proton-ui 0.6.18-beta.10 → 0.6.18-beta.11
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.
- package/dist/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +105 -105
- package/dist/index.es.js.map +1 -1
- package/dist/utils-B5na7vwh.mjs +137 -0
- package/dist/utils-B5na7vwh.mjs.map +1 -0
- package/dist/utils-DJm1pkEy.js +2 -0
- package/dist/utils-DJm1pkEy.js.map +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +1 -1
- package/package.json +1 -1
- package/dist/utils-Cs9qWW9j.js +0 -2
- package/dist/utils-Cs9qWW9j.js.map +0 -1
- package/dist/utils-D71CUDBU.mjs +0 -115
- package/dist/utils-D71CUDBU.mjs.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import g, { useLayoutEffect as pr, useState as D, useRef as S, createElement as Qt, useEffect as F, createContext as O, useContext as A, useMemo as oe, isValidElement as hr, forwardRef as fe, useCallback as ne, cloneElement as vr } from "react";
|
|
2
2
|
import en, { createPortal as tn } from "react-dom";
|
|
3
|
-
import { useMenu as nn, useOverlay as mr, FocusScope as pt, useMenuItem as rn, useButton as De, useRadioGroup as br, useRadio as gr, VisuallyHidden as on, useDialog as yr, useTextField as xr, useClipboard as
|
|
3
|
+
import { useMenu as nn, useOverlay as mr, FocusScope as pt, useMenuItem as rn, useButton as De, useRadioGroup as br, useRadio as gr, VisuallyHidden as on, useDialog as yr, useTextField as xr, useClipboard as $r, useSearchField as _r, useOverlayTrigger as Sr, usePopover as Er, Overlay as wr, DismissButton as Cr, useFocusRing as we, useHover as Rr, useId as Lt, mergeProps as me, useMenuTrigger as Pr, useMenuSection as Tr, useTooltipTrigger as jr, OverlayContainer as Nr, useOverlayPosition as Mr, useTooltip as kr, useListBox as Ar, useOption as Or, useSelect as an, HiddenSelect as ln, useSwitch as Ir, useTableHeaderRow as Dr, useTableColumnHeader as Lr, useTableRowGroup as Br, useTableRow as Vr, useTableCell as Hr, useTable as Kr } from "react-aria";
|
|
4
4
|
import { useTreeState as sn, Item as ht, useRadioGroupState as Wr, useOverlayTriggerState as Fr, useMenuTriggerState as Gr, useTooltipTriggerState as cn, useSelectState as un, useToggleState as Ur, useTableState as zr } from "react-stately";
|
|
5
|
-
import { b as E, i as vt, h as dn } from "./utils-
|
|
5
|
+
import { b as E, i as vt, h as dn } from "./utils-B5na7vwh.mjs";
|
|
6
6
|
import { THEMES as le, BREAKPOINTS as fn } from "./constants.es.js";
|
|
7
7
|
import { transparentize as de, toRgba as Xe } from "color2k";
|
|
8
8
|
import { G as Q, S as Ne, W as Me, D as ke, B as Yr } from "./colors-Dwh4VIMR.mjs";
|
|
9
9
|
import { c as Na } from "./colors-Dwh4VIMR.mjs";
|
|
10
|
-
var rt = { exports: {} },
|
|
10
|
+
var rt = { exports: {} }, $e = {};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,7 +19,7 @@ var rt = { exports: {} }, _e = {};
|
|
|
19
19
|
*/
|
|
20
20
|
var Bt;
|
|
21
21
|
function qr() {
|
|
22
|
-
if (Bt) return
|
|
22
|
+
if (Bt) return $e;
|
|
23
23
|
Bt = 1;
|
|
24
24
|
var t = g, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
25
|
function l(c, u, f) {
|
|
@@ -29,9 +29,9 @@ function qr() {
|
|
|
29
29
|
if (c && c.defaultProps) for (d in u = c.defaultProps, u) h[d] === void 0 && (h[d] = u[d]);
|
|
30
30
|
return { $$typeof: e, type: c, key: p, ref: v, props: h, _owner: o.current };
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return $e.Fragment = n, $e.jsx = l, $e.jsxs = l, $e;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var _e = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -45,7 +45,7 @@ var Vt;
|
|
|
45
45
|
function Jr() {
|
|
46
46
|
return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
47
|
var t = g, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), y = Symbol.iterator, x = "@@iterator";
|
|
48
|
-
function
|
|
48
|
+
function $(a) {
|
|
49
49
|
if (a === null || typeof a != "object")
|
|
50
50
|
return null;
|
|
51
51
|
var m = y && a[y] || a[x];
|
|
@@ -54,14 +54,14 @@ function Jr() {
|
|
|
54
54
|
var w = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
55
55
|
function R(a) {
|
|
56
56
|
{
|
|
57
|
-
for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0),
|
|
58
|
-
b[
|
|
57
|
+
for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), _ = 1; _ < m; _++)
|
|
58
|
+
b[_ - 1] = arguments[_];
|
|
59
59
|
j("error", a, b);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
function j(a, m, b) {
|
|
63
63
|
{
|
|
64
|
-
var
|
|
64
|
+
var _ = w.ReactDebugCurrentFrame, N = _.getStackAddendum();
|
|
65
65
|
N !== "" && (m += "%s", b = b.concat([N]));
|
|
66
66
|
var k = b.map(function(T) {
|
|
67
67
|
return String(T);
|
|
@@ -79,9 +79,9 @@ function Jr() {
|
|
|
79
79
|
a.$$typeof === W || a.getModuleId !== void 0));
|
|
80
80
|
}
|
|
81
81
|
function ce(a, m, b) {
|
|
82
|
-
var
|
|
83
|
-
if (
|
|
84
|
-
return
|
|
82
|
+
var _ = a.displayName;
|
|
83
|
+
if (_)
|
|
84
|
+
return _;
|
|
85
85
|
var N = m.displayName || m.name || "";
|
|
86
86
|
return N !== "" ? b + "(" + N + ")" : b;
|
|
87
87
|
}
|
|
@@ -120,8 +120,8 @@ function Jr() {
|
|
|
120
120
|
case u:
|
|
121
121
|
return ce(a, a.render, "ForwardRef");
|
|
122
122
|
case h:
|
|
123
|
-
var
|
|
124
|
-
return
|
|
123
|
+
var _ = a.displayName || null;
|
|
124
|
+
return _ !== null ? _ : H(a.type) || "Memo";
|
|
125
125
|
case p: {
|
|
126
126
|
var N = a, k = N._payload, T = N._init;
|
|
127
127
|
try {
|
|
@@ -133,14 +133,14 @@ function Jr() {
|
|
|
133
133
|
}
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
|
-
var Z = Object.assign, B = 0, U, Y, q, ae, pe,
|
|
136
|
+
var Z = Object.assign, B = 0, U, Y, q, ae, pe, $t, _t;
|
|
137
137
|
function St() {
|
|
138
138
|
}
|
|
139
139
|
St.__reactDisabledLog = !0;
|
|
140
140
|
function Vn() {
|
|
141
141
|
{
|
|
142
142
|
if (B === 0) {
|
|
143
|
-
U = console.log, Y = console.info, q = console.warn, ae = console.error, pe = console.group,
|
|
143
|
+
U = console.log, Y = console.info, q = console.warn, ae = console.error, pe = console.group, $t = console.groupCollapsed, _t = console.groupEnd;
|
|
144
144
|
var a = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
@@ -185,10 +185,10 @@ function Jr() {
|
|
|
185
185
|
value: pe
|
|
186
186
|
}),
|
|
187
187
|
groupCollapsed: Z({}, a, {
|
|
188
|
-
value:
|
|
188
|
+
value: $t
|
|
189
189
|
}),
|
|
190
190
|
groupEnd: Z({}, a, {
|
|
191
|
-
value:
|
|
191
|
+
value: _t
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
}
|
|
@@ -202,8 +202,8 @@ function Jr() {
|
|
|
202
202
|
try {
|
|
203
203
|
throw Error();
|
|
204
204
|
} catch (N) {
|
|
205
|
-
var
|
|
206
|
-
We =
|
|
205
|
+
var _ = N.stack.trim().match(/\n( *(at )?)/);
|
|
206
|
+
We = _ && _[1] || "";
|
|
207
207
|
}
|
|
208
208
|
return `
|
|
209
209
|
` + We + a;
|
|
@@ -222,7 +222,7 @@ function Jr() {
|
|
|
222
222
|
if (b !== void 0)
|
|
223
223
|
return b;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var _;
|
|
226
226
|
Fe = !0;
|
|
227
227
|
var N = Error.prepareStackTrace;
|
|
228
228
|
Error.prepareStackTrace = void 0;
|
|
@@ -241,14 +241,14 @@ function Jr() {
|
|
|
241
241
|
try {
|
|
242
242
|
Reflect.construct(T, []);
|
|
243
243
|
} catch (X) {
|
|
244
|
-
|
|
244
|
+
_ = X;
|
|
245
245
|
}
|
|
246
246
|
Reflect.construct(a, [], T);
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
T.call();
|
|
250
250
|
} catch (X) {
|
|
251
|
-
|
|
251
|
+
_ = X;
|
|
252
252
|
}
|
|
253
253
|
a.call(T.prototype);
|
|
254
254
|
}
|
|
@@ -256,14 +256,14 @@ function Jr() {
|
|
|
256
256
|
try {
|
|
257
257
|
throw Error();
|
|
258
258
|
} catch (X) {
|
|
259
|
-
|
|
259
|
+
_ = X;
|
|
260
260
|
}
|
|
261
261
|
a();
|
|
262
262
|
}
|
|
263
263
|
} catch (X) {
|
|
264
|
-
if (X &&
|
|
264
|
+
if (X && _ && typeof X.stack == "string") {
|
|
265
265
|
for (var C = X.stack.split(`
|
|
266
|
-
`), J =
|
|
266
|
+
`), J = _.stack.split(`
|
|
267
267
|
`), V = C.length - 1, K = J.length - 1; V >= 1 && K >= 0 && C[V] !== J[K]; )
|
|
268
268
|
K--;
|
|
269
269
|
for (; V >= 1 && K >= 0; V--, K--)
|
|
@@ -312,7 +312,7 @@ function Jr() {
|
|
|
312
312
|
case h:
|
|
313
313
|
return Te(a.type, m, b);
|
|
314
314
|
case p: {
|
|
315
|
-
var
|
|
315
|
+
var _ = a, N = _._payload, k = _._init;
|
|
316
316
|
try {
|
|
317
317
|
return Te(k(N), m, b);
|
|
318
318
|
} catch {
|
|
@@ -329,7 +329,7 @@ function Jr() {
|
|
|
329
329
|
} else
|
|
330
330
|
Ct.setExtraStackFrame(null);
|
|
331
331
|
}
|
|
332
|
-
function Gn(a, m, b,
|
|
332
|
+
function Gn(a, m, b, _, N) {
|
|
333
333
|
{
|
|
334
334
|
var k = Function.call.bind(ye);
|
|
335
335
|
for (var T in a)
|
|
@@ -337,14 +337,14 @@ function Jr() {
|
|
|
337
337
|
var C = void 0;
|
|
338
338
|
try {
|
|
339
339
|
if (typeof a[T] != "function") {
|
|
340
|
-
var J = Error((
|
|
340
|
+
var J = Error((_ || "React class") + ": " + b + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
341
341
|
throw J.name = "Invariant Violation", J;
|
|
342
342
|
}
|
|
343
|
-
C = a[T](m, T,
|
|
343
|
+
C = a[T](m, T, _, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
344
|
} catch (V) {
|
|
345
345
|
C = V;
|
|
346
346
|
}
|
|
347
|
-
C && !(C instanceof Error) && (je(N), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",
|
|
347
|
+
C && !(C instanceof Error) && (je(N), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", b, T, typeof C), je(null)), C instanceof Error && !(C.message in wt) && (wt[C.message] = !0, je(N), R("Failed %s type: %s", b, C.message), je(null));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -423,7 +423,7 @@ function Jr() {
|
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
var tr = function(a, m, b,
|
|
426
|
+
var tr = function(a, m, b, _, N, k, T) {
|
|
427
427
|
var C = {
|
|
428
428
|
// This tag allows us to uniquely identify this as a React Element
|
|
429
429
|
$$typeof: e,
|
|
@@ -444,7 +444,7 @@ function Jr() {
|
|
|
444
444
|
configurable: !1,
|
|
445
445
|
enumerable: !1,
|
|
446
446
|
writable: !1,
|
|
447
|
-
value:
|
|
447
|
+
value: _
|
|
448
448
|
}), Object.defineProperty(C, "_source", {
|
|
449
449
|
configurable: !1,
|
|
450
450
|
enumerable: !1,
|
|
@@ -452,7 +452,7 @@ function Jr() {
|
|
|
452
452
|
value: N
|
|
453
453
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
454
454
|
};
|
|
455
|
-
function nr(a, m, b,
|
|
455
|
+
function nr(a, m, b, _, N) {
|
|
456
456
|
{
|
|
457
457
|
var k, T = {}, C = null, J = null;
|
|
458
458
|
b !== void 0 && (Pt(b), C = "" + b), Xn(m) && (Pt(m.key), C = "" + m.key), Jn(m) && (J = m.ref, Zn(m, N));
|
|
@@ -467,7 +467,7 @@ function Jr() {
|
|
|
467
467
|
var K = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
468
468
|
C && Qn(T, K), J && er(T, K);
|
|
469
469
|
}
|
|
470
|
-
return tr(a, C, J, N,
|
|
470
|
+
return tr(a, C, J, N, _, xe.current, T);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
var ze = w.ReactCurrentOwner, Nt = w.ReactDebugCurrentFrame;
|
|
@@ -520,8 +520,8 @@ Check the top-level render call using <` + b + ">.");
|
|
|
520
520
|
if (kt[b])
|
|
521
521
|
return;
|
|
522
522
|
kt[b] = !0;
|
|
523
|
-
var
|
|
524
|
-
a && a._owner && a._owner !== ze.current && (
|
|
523
|
+
var _ = "";
|
|
524
|
+
a && a._owner && a._owner !== ze.current && (_ = " It was passed a child from " + H(a._owner.type) + "."), he(a), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, _), he(null);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
function Ot(a, m) {
|
|
@@ -530,13 +530,13 @@ Check the top-level render call using <` + b + ">.");
|
|
|
530
530
|
return;
|
|
531
531
|
if (Ge(a))
|
|
532
532
|
for (var b = 0; b < a.length; b++) {
|
|
533
|
-
var
|
|
534
|
-
qe(
|
|
533
|
+
var _ = a[b];
|
|
534
|
+
qe(_) && At(_, m);
|
|
535
535
|
}
|
|
536
536
|
else if (qe(a))
|
|
537
537
|
a._store && (a._store.validated = !0);
|
|
538
538
|
else if (a) {
|
|
539
|
-
var N =
|
|
539
|
+
var N = $(a);
|
|
540
540
|
if (typeof N == "function" && N !== a.entries)
|
|
541
541
|
for (var k = N.call(a), T; !(T = k.next()).done; )
|
|
542
542
|
qe(T.value) && At(T.value, m);
|
|
@@ -558,8 +558,8 @@ Check the top-level render call using <` + b + ">.");
|
|
|
558
558
|
else
|
|
559
559
|
return;
|
|
560
560
|
if (b) {
|
|
561
|
-
var
|
|
562
|
-
Gn(b, a.props, "prop",
|
|
561
|
+
var _ = H(m);
|
|
562
|
+
Gn(b, a.props, "prop", _, a);
|
|
563
563
|
} else if (m.PropTypes !== void 0 && !Ye) {
|
|
564
564
|
Ye = !0;
|
|
565
565
|
var N = H(m);
|
|
@@ -571,9 +571,9 @@ Check the top-level render call using <` + b + ">.");
|
|
|
571
571
|
function ar(a) {
|
|
572
572
|
{
|
|
573
573
|
for (var m = Object.keys(a.props), b = 0; b < m.length; b++) {
|
|
574
|
-
var
|
|
575
|
-
if (
|
|
576
|
-
he(a), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
574
|
+
var _ = m[b];
|
|
575
|
+
if (_ !== "children" && _ !== "key") {
|
|
576
|
+
he(a), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), he(null);
|
|
577
577
|
break;
|
|
578
578
|
}
|
|
579
579
|
}
|
|
@@ -581,7 +581,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
583
|
var It = {};
|
|
584
|
-
function Dt(a, m, b,
|
|
584
|
+
function Dt(a, m, b, _, N, k) {
|
|
585
585
|
{
|
|
586
586
|
var T = te(a);
|
|
587
587
|
if (!T) {
|
|
@@ -598,7 +598,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
598
598
|
if (T) {
|
|
599
599
|
var ee = m.children;
|
|
600
600
|
if (ee !== void 0)
|
|
601
|
-
if (
|
|
601
|
+
if (_)
|
|
602
602
|
if (Ge(ee)) {
|
|
603
603
|
for (var ve = 0; ve < ee.length; ve++)
|
|
604
604
|
Ot(ee[ve], a);
|
|
@@ -632,8 +632,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
632
632
|
return Dt(a, m, b, !1);
|
|
633
633
|
}
|
|
634
634
|
var cr = sr, ur = lr;
|
|
635
|
-
|
|
636
|
-
}()),
|
|
635
|
+
_e.Fragment = r, _e.jsx = cr, _e.jsxs = ur;
|
|
636
|
+
}()), _e;
|
|
637
637
|
}
|
|
638
638
|
process.env.NODE_ENV === "production" ? rt.exports = qr() : rt.exports = Jr();
|
|
639
639
|
var s = rt.exports;
|
|
@@ -669,7 +669,7 @@ const Zr = ({ children: t }) => {
|
|
|
669
669
|
"data-testid": h
|
|
670
670
|
}) => {
|
|
671
671
|
Xr(e);
|
|
672
|
-
const { className: p, theme: v } = ie(), [y, x] = D(!1), [
|
|
672
|
+
const { className: p, theme: v } = ie(), [y, x] = D(!1), [$, w] = D(0), R = S(null), j = S(null), P = S(window.location.pathname), L = c && c.length > 0, M = () => {
|
|
673
673
|
x(!0), w(0), setTimeout(() => {
|
|
674
674
|
d == null || d(), x(!1);
|
|
675
675
|
}, 300);
|
|
@@ -724,7 +724,7 @@ const Zr = ({ children: t }) => {
|
|
|
724
724
|
{
|
|
725
725
|
...W,
|
|
726
726
|
className: "proton-ActionMenu__background",
|
|
727
|
-
style: { opacity:
|
|
727
|
+
style: { opacity: $ > 0 ? 1 : 0 },
|
|
728
728
|
onClick: M,
|
|
729
729
|
id: t,
|
|
730
730
|
children: /* @__PURE__ */ s.jsx(
|
|
@@ -750,7 +750,7 @@ const Zr = ({ children: t }) => {
|
|
|
750
750
|
{
|
|
751
751
|
className: E("proton-ActionMenu__card", p),
|
|
752
752
|
"data-testid": "ActionMenu-content",
|
|
753
|
-
style: { height: `${
|
|
753
|
+
style: { height: `${$}px` },
|
|
754
754
|
children: /* @__PURE__ */ s.jsx("div", { ref: j, children: /* @__PURE__ */ s.jsx("div", { ...z, ref: R, children: ce ? /* @__PURE__ */ s.jsxs(pt, { autoFocus: !0, contain: !0, children: [
|
|
755
755
|
i && /* @__PURE__ */ s.jsx("div", { className: "proton-ActionMenu__content", children: typeof i == "function" ? i({ close: M }) : i }),
|
|
756
756
|
L && /* @__PURE__ */ s.jsx(
|
|
@@ -1178,7 +1178,7 @@ const po = fe(
|
|
|
1178
1178
|
autoComplete: v,
|
|
1179
1179
|
"data-testid": y
|
|
1180
1180
|
}, x) => {
|
|
1181
|
-
const
|
|
1181
|
+
const $ = S(null), { className: w, palette: R, theme: j } = ie(), P = x || $, { labelProps: L, inputProps: M, descriptionProps: G, errorMessageProps: z } = xr(
|
|
1182
1182
|
{
|
|
1183
1183
|
label: c,
|
|
1184
1184
|
name: u,
|
|
@@ -1195,7 +1195,7 @@ const po = fe(
|
|
|
1195
1195
|
onChange: l
|
|
1196
1196
|
},
|
|
1197
1197
|
P
|
|
1198
|
-
), { clipboardProps: W } =
|
|
1198
|
+
), { clipboardProps: W } = $r({
|
|
1199
1199
|
getItems() {
|
|
1200
1200
|
return [{ "text/plain": h }];
|
|
1201
1201
|
}
|
|
@@ -1203,7 +1203,7 @@ const po = fe(
|
|
|
1203
1203
|
"--input-background": (() => {
|
|
1204
1204
|
switch (j) {
|
|
1205
1205
|
case le.CUSTOM_DARK:
|
|
1206
|
-
return de(R.PRIMARY.
|
|
1206
|
+
return de(R.PRIMARY.PRIMARY_LIGHTEST, 0.6);
|
|
1207
1207
|
case le.DARK:
|
|
1208
1208
|
return de(Q.GRAY_MEDIUM, 0.5);
|
|
1209
1209
|
default:
|
|
@@ -1333,11 +1333,11 @@ const ha = ({
|
|
|
1333
1333
|
onChange: (w) => u == null ? void 0 : u(w),
|
|
1334
1334
|
onClear: () => f == null ? void 0 : f(),
|
|
1335
1335
|
label: e
|
|
1336
|
-
}), h = S(null), { inputProps: p, clearButtonProps: v } =
|
|
1336
|
+
}), h = S(null), { inputProps: p, clearButtonProps: v } = _r(
|
|
1337
1337
|
{ ...d, placeholder: e },
|
|
1338
1338
|
d,
|
|
1339
1339
|
h
|
|
1340
|
-
), { value: y, setValue: x } = d,
|
|
1340
|
+
), { value: y, setValue: x } = d, $ = () => {
|
|
1341
1341
|
f && f(), u == null || u(""), x("");
|
|
1342
1342
|
};
|
|
1343
1343
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -1395,7 +1395,7 @@ const ha = ({
|
|
|
1395
1395
|
"data-testid": `${c}-clear`,
|
|
1396
1396
|
onClick: () => {
|
|
1397
1397
|
var w;
|
|
1398
|
-
|
|
1398
|
+
$(), (w = h.current) == null || w.focus();
|
|
1399
1399
|
},
|
|
1400
1400
|
children: /* @__PURE__ */ s.jsxs(
|
|
1401
1401
|
"svg",
|
|
@@ -1810,13 +1810,13 @@ function xo(t = !1) {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
return n.current;
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function $o(t) {
|
|
1814
1814
|
let e = A(xn);
|
|
1815
1815
|
e === Oe && !yo && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
1816
1816
|
let n = xo(!!t), r = e === Oe && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
|
1817
1817
|
return t || `${r}-${n}`;
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function _o(t) {
|
|
1820
1820
|
let e = g.useId(), [n] = D(Be()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Oe.prefix}`;
|
|
1821
1821
|
return t || `${r}-${e}`;
|
|
1822
1822
|
}
|
|
@@ -1891,20 +1891,20 @@ const No = (t) => {
|
|
|
1891
1891
|
var e;
|
|
1892
1892
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
|
1893
1893
|
};
|
|
1894
|
-
function
|
|
1894
|
+
function $n(t) {
|
|
1895
1895
|
var e, n, r = "";
|
|
1896
1896
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1897
1897
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1898
1898
|
var o = t.length;
|
|
1899
|
-
for (e = 0; e < o; e++) t[e] && (n =
|
|
1899
|
+
for (e = 0; e < o; e++) t[e] && (n = $n(t[e])) && (r && (r += " "), r += n);
|
|
1900
1900
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1901
1901
|
return r;
|
|
1902
1902
|
}
|
|
1903
1903
|
function Mo() {
|
|
1904
|
-
for (var t, e, n = 0, r = "", o = arguments.length; n < o; n++) (t = arguments[n]) && (e =
|
|
1904
|
+
for (var t, e, n = 0, r = "", o = arguments.length; n < o; n++) (t = arguments[n]) && (e = $n(t)) && (r && (r += " "), r += e);
|
|
1905
1905
|
return r;
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function _n(...t) {
|
|
1908
1908
|
let e = {
|
|
1909
1909
|
...t[0]
|
|
1910
1910
|
};
|
|
@@ -2015,12 +2015,12 @@ function Ho() {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
var n = typeof Object.is == "function" ? Object.is : e, r = t.useState, o = t.useEffect, i = t.useLayoutEffect, l = t.useDebugValue;
|
|
2017
2017
|
function c(h, p) {
|
|
2018
|
-
var v = p(), y = r({ inst: { value: v, getSnapshot: p } }), x = y[0].inst,
|
|
2018
|
+
var v = p(), y = r({ inst: { value: v, getSnapshot: p } }), x = y[0].inst, $ = y[1];
|
|
2019
2019
|
return i(function() {
|
|
2020
|
-
x.value = v, x.getSnapshot = p, u(x) &&
|
|
2020
|
+
x.value = v, x.getSnapshot = p, u(x) && $({ inst: x });
|
|
2021
2021
|
}, [h, v, p]), o(function() {
|
|
2022
|
-
return u(x) &&
|
|
2023
|
-
u(x) &&
|
|
2022
|
+
return u(x) && $({ inst: x }), h(function() {
|
|
2023
|
+
u(x) && $({ inst: x });
|
|
2024
2024
|
});
|
|
2025
2025
|
}, [h]), l(v), v;
|
|
2026
2026
|
}
|
|
@@ -2117,7 +2117,7 @@ function Ko() {
|
|
|
2117
2117
|
function y(j, P, L) {
|
|
2118
2118
|
return P();
|
|
2119
2119
|
}
|
|
2120
|
-
var x = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u",
|
|
2120
|
+
var x = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", $ = !x, w = $ ? y : p, R = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : w;
|
|
2121
2121
|
tt.useSyncExternalStore = R, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2122
2122
|
}()), tt;
|
|
2123
2123
|
}
|
|
@@ -2332,7 +2332,7 @@ function Ce(t, e, n) {
|
|
|
2332
2332
|
let r = wn(n, t.slot) || {}, { ref: o, ...i } = r, l = Ve(oe(() => ko(e, o), [
|
|
2333
2333
|
e,
|
|
2334
2334
|
o
|
|
2335
|
-
])), c =
|
|
2335
|
+
])), c = _n(i, t);
|
|
2336
2336
|
return "style" in i && i.style && "style" in t && t.style && (typeof i.style == "function" || typeof t.style == "function" ? c.style = (u) => {
|
|
2337
2337
|
let f = typeof i.style == "function" ? i.style(u) : i.style, d = {
|
|
2338
2338
|
...u.defaultStyle,
|
|
@@ -2469,12 +2469,12 @@ function ui(t, e) {
|
|
|
2469
2469
|
defaultClassName: "react-aria-Button"
|
|
2470
2470
|
}), v = Lt(o.id), y = Lt(), x = o["aria-labelledby"];
|
|
2471
2471
|
r && (x ? x = `${x} ${y}` : o["aria-label"] && (x = `${v} ${y}`));
|
|
2472
|
-
let
|
|
2472
|
+
let $ = S(r);
|
|
2473
2473
|
return F(() => {
|
|
2474
2474
|
let w = {
|
|
2475
2475
|
"aria-labelledby": x || v
|
|
2476
2476
|
};
|
|
2477
|
-
(
|
|
2477
|
+
(!$.current && c && r || $.current && c && !r) && qt(w, "assertive"), $.current = r;
|
|
2478
2478
|
}, [
|
|
2479
2479
|
r,
|
|
2480
2480
|
c,
|
|
@@ -2514,7 +2514,7 @@ lt.displayName = "PressResponderContext";
|
|
|
2514
2514
|
const pi = /* @__PURE__ */ g.forwardRef(({ children: t, ...e }, n) => {
|
|
2515
2515
|
let r = S(!1), o = A(lt);
|
|
2516
2516
|
n = Ve(n || (o == null ? void 0 : o.ref));
|
|
2517
|
-
let i =
|
|
2517
|
+
let i = _n(o || {}, {
|
|
2518
2518
|
...e,
|
|
2519
2519
|
ref: n,
|
|
2520
2520
|
register() {
|
|
@@ -2658,10 +2658,10 @@ function gi(t, e) {
|
|
|
2658
2658
|
}, n);
|
|
2659
2659
|
}
|
|
2660
2660
|
let yi = /* @__PURE__ */ g.forwardRef(gi);
|
|
2661
|
-
const xi = /* @__PURE__ */ O({}),
|
|
2661
|
+
const xi = /* @__PURE__ */ O({}), $i = /* @__PURE__ */ O({}), Tn = /* @__PURE__ */ O({
|
|
2662
2662
|
placement: "bottom"
|
|
2663
2663
|
});
|
|
2664
|
-
function
|
|
2664
|
+
function _i(t, e) {
|
|
2665
2665
|
[t, e] = Ce(t, e, Tn);
|
|
2666
2666
|
let n = t.placement, r = {
|
|
2667
2667
|
position: "absolute",
|
|
@@ -2685,7 +2685,7 @@ function $i(t, e) {
|
|
|
2685
2685
|
"data-placement": n
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
|
-
const Si = /* @__PURE__ */ fe(
|
|
2688
|
+
const Si = /* @__PURE__ */ fe(_i), ct = /* @__PURE__ */ O(null), Ei = /* @__PURE__ */ O(null), wi = /* @__PURE__ */ O({});
|
|
2689
2689
|
function jn(t) {
|
|
2690
2690
|
return null;
|
|
2691
2691
|
}
|
|
@@ -2790,8 +2790,8 @@ function Ti({ props: t, collection: e, menuRef: n }) {
|
|
|
2790
2790
|
}, r, n), f = A(Mn), d = A(ct), h = (d == null ? void 0 : d.trigger) === "SubmenuTrigger";
|
|
2791
2791
|
mi({
|
|
2792
2792
|
ref: n,
|
|
2793
|
-
onInteractOutside: (
|
|
2794
|
-
f && !(o != null && o.contains(
|
|
2793
|
+
onInteractOutside: ($) => {
|
|
2794
|
+
f && !(o != null && o.contains($.target)) && f.close();
|
|
2795
2795
|
},
|
|
2796
2796
|
isDisabled: h || (f == null ? void 0 : f.expandedKeysStack.length) === 0
|
|
2797
2797
|
});
|
|
@@ -2801,9 +2801,9 @@ function Ti({ props: t, collection: e, menuRef: n }) {
|
|
|
2801
2801
|
F(() => {
|
|
2802
2802
|
if (o && p.current !== o && v.left === 0) {
|
|
2803
2803
|
p.current = o;
|
|
2804
|
-
let { left:
|
|
2804
|
+
let { left: $ } = o.getBoundingClientRect();
|
|
2805
2805
|
y({
|
|
2806
|
-
left: -1 *
|
|
2806
|
+
left: -1 * $
|
|
2807
2807
|
});
|
|
2808
2808
|
}
|
|
2809
2809
|
}, [
|
|
@@ -2830,7 +2830,7 @@ function Ti({ props: t, collection: e, menuRef: n }) {
|
|
|
2830
2830
|
r
|
|
2831
2831
|
],
|
|
2832
2832
|
[
|
|
2833
|
-
|
|
2833
|
+
$i,
|
|
2834
2834
|
{
|
|
2835
2835
|
elementType: "div"
|
|
2836
2836
|
}
|
|
@@ -2908,7 +2908,7 @@ const ut = /* @__PURE__ */ O(null), Mi = /* @__PURE__ */ Jo("item", function(e,
|
|
|
2908
2908
|
...e,
|
|
2909
2909
|
id: i,
|
|
2910
2910
|
key: r.key
|
|
2911
|
-
}, l, c), { isFocusVisible: v, focusProps: y } = we(), { hoverProps: x, isHovered:
|
|
2911
|
+
}, l, c), { isFocusVisible: v, focusProps: y } = we(), { hoverProps: x, isHovered: $ } = vi({
|
|
2912
2912
|
isDisabled: p.isDisabled
|
|
2913
2913
|
}), w = ge({
|
|
2914
2914
|
...e,
|
|
@@ -2917,7 +2917,7 @@ const ut = /* @__PURE__ */ O(null), Mi = /* @__PURE__ */ Jo("item", function(e,
|
|
|
2917
2917
|
defaultClassName: "react-aria-MenuItem",
|
|
2918
2918
|
values: {
|
|
2919
2919
|
...p,
|
|
2920
|
-
isHovered:
|
|
2920
|
+
isHovered: $,
|
|
2921
2921
|
isFocusVisible: v,
|
|
2922
2922
|
selectionMode: l.selectionManager.selectionMode,
|
|
2923
2923
|
selectionBehavior: l.selectionManager.selectionBehavior,
|
|
@@ -2930,7 +2930,7 @@ const ut = /* @__PURE__ */ O(null), Mi = /* @__PURE__ */ Jo("item", function(e,
|
|
|
2930
2930
|
...w,
|
|
2931
2931
|
ref: c,
|
|
2932
2932
|
"data-disabled": p.isDisabled || void 0,
|
|
2933
|
-
"data-hovered":
|
|
2933
|
+
"data-hovered": $ || void 0,
|
|
2934
2934
|
"data-focused": p.isFocused || void 0,
|
|
2935
2935
|
"data-focus-visible": v || void 0,
|
|
2936
2936
|
"data-pressed": p.isPressed || void 0,
|
|
@@ -3238,13 +3238,13 @@ function xa({
|
|
|
3238
3238
|
{
|
|
3239
3239
|
...v,
|
|
3240
3240
|
ref: p,
|
|
3241
|
-
onPress: () => h((
|
|
3241
|
+
onPress: () => h(($) => !$),
|
|
3242
3242
|
isDisabled: o,
|
|
3243
3243
|
className: `proton-ResponsiveMenuTrigger__button ${u}`,
|
|
3244
3244
|
children: /* @__PURE__ */ s.jsx(Bi, { size: n })
|
|
3245
3245
|
}
|
|
3246
3246
|
), x = t ? t(
|
|
3247
|
-
{ ...v, onClick: () => h((
|
|
3247
|
+
{ ...v, onClick: () => h(($) => !$) },
|
|
3248
3248
|
d
|
|
3249
3249
|
) : y;
|
|
3250
3250
|
return F(() => () => {
|
|
@@ -3285,22 +3285,22 @@ function xa({
|
|
|
3285
3285
|
id: e,
|
|
3286
3286
|
autoFocus: !0,
|
|
3287
3287
|
"data-testid": c,
|
|
3288
|
-
children: r.map((
|
|
3288
|
+
children: r.map(($) => /* @__PURE__ */ s.jsx(
|
|
3289
3289
|
Mi,
|
|
3290
3290
|
{
|
|
3291
|
-
href:
|
|
3291
|
+
href: $.to,
|
|
3292
3292
|
target: "_blank",
|
|
3293
3293
|
rel: "noopener noreferrer",
|
|
3294
3294
|
onAction: () => {
|
|
3295
3295
|
var w;
|
|
3296
|
-
(w =
|
|
3296
|
+
(w = $.onAction) == null || w.call($, $.key), setTimeout(() => {
|
|
3297
3297
|
h(!1);
|
|
3298
3298
|
}, 200);
|
|
3299
3299
|
},
|
|
3300
3300
|
className: "proton-ListBox__item proton-ResponsiveMenuTrigger__menu-item",
|
|
3301
|
-
children:
|
|
3301
|
+
children: $.label
|
|
3302
3302
|
},
|
|
3303
|
-
|
|
3303
|
+
$.key
|
|
3304
3304
|
))
|
|
3305
3305
|
}
|
|
3306
3306
|
)
|
|
@@ -3392,7 +3392,7 @@ function Hi({
|
|
|
3392
3392
|
onOpenChange: (j) => {
|
|
3393
3393
|
j ? l == null || l() : c == null || c();
|
|
3394
3394
|
}
|
|
3395
|
-
}, p = un(h), v = S(null), y = S(null), { labelProps: x, triggerProps:
|
|
3395
|
+
}, p = un(h), v = S(null), y = S(null), { labelProps: x, triggerProps: $, valueProps: w, menuProps: R } = an(
|
|
3396
3396
|
{ ...h, label: t || e },
|
|
3397
3397
|
p,
|
|
3398
3398
|
v
|
|
@@ -3432,7 +3432,7 @@ function Hi({
|
|
|
3432
3432
|
/* @__PURE__ */ s.jsxs(
|
|
3433
3433
|
Bn,
|
|
3434
3434
|
{
|
|
3435
|
-
|
|
3435
|
+
...$,
|
|
3436
3436
|
isOpen: p.isOpen,
|
|
3437
3437
|
ref: v,
|
|
3438
3438
|
disabled: n,
|
|
@@ -3477,7 +3477,7 @@ function Hi({
|
|
|
3477
3477
|
}
|
|
3478
3478
|
);
|
|
3479
3479
|
}
|
|
3480
|
-
const
|
|
3480
|
+
const $a = {
|
|
3481
3481
|
Menu: Hi,
|
|
3482
3482
|
Option: ht
|
|
3483
3483
|
};
|
|
@@ -3506,7 +3506,7 @@ function Ki({
|
|
|
3506
3506
|
items: u,
|
|
3507
3507
|
"data-testid": f,
|
|
3508
3508
|
children: d
|
|
3509
|
-
}, p = un(h), v = Ln(fn.MEDIUM), y = S(null), x = S(null), { labelProps:
|
|
3509
|
+
}, p = un(h), v = Ln(fn.MEDIUM), y = S(null), x = S(null), { labelProps: $, triggerProps: w, valueProps: R, menuProps: j } = an(
|
|
3510
3510
|
{ ...h, label: t || e },
|
|
3511
3511
|
p,
|
|
3512
3512
|
y
|
|
@@ -3523,14 +3523,14 @@ function Ki({
|
|
|
3523
3523
|
t ? /* @__PURE__ */ s.jsx(
|
|
3524
3524
|
"div",
|
|
3525
3525
|
{
|
|
3526
|
-
|
|
3526
|
+
...$,
|
|
3527
3527
|
className: "proton-Select__label",
|
|
3528
3528
|
"data-testid": "select-label",
|
|
3529
3529
|
children: t
|
|
3530
3530
|
}
|
|
3531
3531
|
) : (
|
|
3532
3532
|
// If no label is provided, render an invisible label for a11y
|
|
3533
|
-
/* @__PURE__ */ s.jsx("div", {
|
|
3533
|
+
/* @__PURE__ */ s.jsx("div", { ...$ })
|
|
3534
3534
|
),
|
|
3535
3535
|
/* @__PURE__ */ s.jsx(
|
|
3536
3536
|
ln,
|
|
@@ -3591,7 +3591,7 @@ function Ki({
|
|
|
3591
3591
|
}
|
|
3592
3592
|
);
|
|
3593
3593
|
}
|
|
3594
|
-
const
|
|
3594
|
+
const _a = {
|
|
3595
3595
|
Menu: Ki,
|
|
3596
3596
|
Option: ht
|
|
3597
3597
|
};
|
|
@@ -3927,7 +3927,7 @@ function Pa({
|
|
|
3927
3927
|
"data-testid": f
|
|
3928
3928
|
}) {
|
|
3929
3929
|
var Z;
|
|
3930
|
-
const { className: d, palette: h, theme: p } = ie(), v = S(null), [y, x] = D([]), [
|
|
3930
|
+
const { className: d, palette: h, theme: p } = ie(), v = S(null), [y, x] = D([]), [$, w] = D(null), [R, j] = D(!1), [P, L] = D(!1), M = t || Ji, G = u || (p === "custom-dark" ? h.BRAND.PRIMARY : void 0), z = e;
|
|
3931
3931
|
F(() => {
|
|
3932
3932
|
if (!v.current) return;
|
|
3933
3933
|
const B = (q) => {
|
|
@@ -3988,17 +3988,17 @@ function Pa({
|
|
|
3988
3988
|
}
|
|
3989
3989
|
}
|
|
3990
3990
|
),
|
|
3991
|
-
|
|
3991
|
+
$ !== null && /* @__PURE__ */ s.jsx(
|
|
3992
3992
|
"div",
|
|
3993
3993
|
{
|
|
3994
3994
|
className: "proton-Waveform__hover-line",
|
|
3995
3995
|
style: {
|
|
3996
|
-
left: `${
|
|
3996
|
+
left: `${$ / l * 100}%`
|
|
3997
3997
|
}
|
|
3998
3998
|
}
|
|
3999
3999
|
),
|
|
4000
4000
|
y.map((B, U) => {
|
|
4001
|
-
const Y = U / y.length * l, q = n !== void 0 && r !== void 0 && (Y < n || Y > r), ae = o === 0 ? !1 : Y <= o, pe =
|
|
4001
|
+
const Y = U / y.length * l, q = n !== void 0 && r !== void 0 && (Y < n || Y > r), ae = o === 0 ? !1 : Y <= o, pe = $ !== null && Y <= $;
|
|
4002
4002
|
return /* @__PURE__ */ s.jsx(
|
|
4003
4003
|
qi,
|
|
4004
4004
|
{
|
|
@@ -4095,11 +4095,11 @@ export {
|
|
|
4095
4095
|
po as Input,
|
|
4096
4096
|
mt as Popover,
|
|
4097
4097
|
xa as ResponsiveMenuTrigger,
|
|
4098
|
-
|
|
4098
|
+
_a as ResponsiveSelect,
|
|
4099
4099
|
ya as Row,
|
|
4100
4100
|
ha as SearchInput,
|
|
4101
4101
|
ma as Section,
|
|
4102
|
-
|
|
4102
|
+
$a as Select,
|
|
4103
4103
|
Sa as Switch,
|
|
4104
4104
|
le as THEMES,
|
|
4105
4105
|
Ca as Table,
|