@youversion/design-system-components 3.10.8 → 3.10.9
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/CHANGELOG.md +6 -0
- package/dist/index.es.js +102 -103
- package/dist/index.umd.js +1 -3
- package/dist/src/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Q0 from "clsx";
|
|
2
|
-
import { jsxs as n, jsx as c, Fragment as
|
|
2
|
+
import { jsxs as n, jsx as c, Fragment as Z0 } from "react/jsx-runtime";
|
|
3
3
|
import * as q from "react";
|
|
4
|
-
import d2, { forwardRef as d, createElement as
|
|
4
|
+
import d2, { forwardRef as d, createElement as h0, useEffect as n0, useLayoutEffect as B1, useRef as Q, useState as K, useImperativeHandle as e1, useCallback as g0, useMemo as l0, Children as o2, isValidElement as U0, useId as s2, cloneElement as m2 } from "react";
|
|
5
5
|
var h2 = Object.defineProperty, Z2 = Object.defineProperties, u2 = Object.getOwnPropertyDescriptors, j0 = Object.getOwnPropertySymbols, A1 = Object.prototype.hasOwnProperty, H1 = Object.prototype.propertyIsEnumerable, h1 = (r, i, l) => i in r ? h2(r, i, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[i] = l, s = (r, i) => {
|
|
6
6
|
for (var l in i || (i = {}))
|
|
7
7
|
A1.call(i, l) && h1(r, l, i[l]);
|
|
@@ -1322,7 +1322,7 @@ function W(r) {
|
|
|
1322
1322
|
return i.isThemeGetter = !0, i;
|
|
1323
1323
|
}
|
|
1324
1324
|
var q1 = /^\[(?:([a-z-]+):)?(.+)\]$/i, _r = /^\d+\/\d+$/, qr = /* @__PURE__ */ new Set(["px", "full", "screen"]), Xr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Yr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|^0$/, Kr = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
1325
|
-
function
|
|
1325
|
+
function m0(r) {
|
|
1326
1326
|
return x0(r) || qr.has(r) || _r.test(r) || b0(r);
|
|
1327
1327
|
}
|
|
1328
1328
|
function b0(r) {
|
|
@@ -1388,14 +1388,14 @@ function p1() {
|
|
|
1388
1388
|
}, T = function() {
|
|
1389
1389
|
return ["auto", i];
|
|
1390
1390
|
}, X = function() {
|
|
1391
|
-
return ["",
|
|
1391
|
+
return ["", m0];
|
|
1392
1392
|
}, V = function() {
|
|
1393
1393
|
return ["auto", x0, Y];
|
|
1394
1394
|
}, D = function() {
|
|
1395
1395
|
return ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
1396
1396
|
}, t0 = function() {
|
|
1397
1397
|
return ["solid", "dashed", "dotted", "double", "none"];
|
|
1398
|
-
},
|
|
1398
|
+
}, d0 = function() {
|
|
1399
1399
|
return ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"];
|
|
1400
1400
|
}, u0 = function() {
|
|
1401
1401
|
return ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
@@ -1403,7 +1403,7 @@ function p1() {
|
|
|
1403
1403
|
return ["", "0", Y];
|
|
1404
1404
|
}, p0 = function() {
|
|
1405
1405
|
return ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
1406
|
-
},
|
|
1406
|
+
}, o0 = function() {
|
|
1407
1407
|
return [x0, E0];
|
|
1408
1408
|
}, E = function() {
|
|
1409
1409
|
return [x0, Y];
|
|
@@ -1412,14 +1412,14 @@ function p1() {
|
|
|
1412
1412
|
cacheSize: 500,
|
|
1413
1413
|
theme: {
|
|
1414
1414
|
colors: [N0],
|
|
1415
|
-
spacing: [
|
|
1415
|
+
spacing: [m0],
|
|
1416
1416
|
blur: ["none", "", w0, b0],
|
|
1417
|
-
brightness:
|
|
1417
|
+
brightness: o0(),
|
|
1418
1418
|
borderColor: [r],
|
|
1419
1419
|
borderRadius: ["none", "", "full", w0, b0],
|
|
1420
1420
|
borderSpacing: [i],
|
|
1421
1421
|
borderWidth: X(),
|
|
1422
|
-
contrast:
|
|
1422
|
+
contrast: o0(),
|
|
1423
1423
|
grayscale: r0(),
|
|
1424
1424
|
hueRotate: E(),
|
|
1425
1425
|
invert: r0(),
|
|
@@ -1428,10 +1428,10 @@ function p1() {
|
|
|
1428
1428
|
gradientColorStopPositions: [la, b0],
|
|
1429
1429
|
inset: T(),
|
|
1430
1430
|
margin: T(),
|
|
1431
|
-
opacity:
|
|
1431
|
+
opacity: o0(),
|
|
1432
1432
|
padding: [i],
|
|
1433
|
-
saturate:
|
|
1434
|
-
scale:
|
|
1433
|
+
saturate: o0(),
|
|
1434
|
+
scale: o0(),
|
|
1435
1435
|
sepia: r0(),
|
|
1436
1436
|
skew: E(),
|
|
1437
1437
|
space: [i],
|
|
@@ -2032,7 +2032,7 @@ function p1() {
|
|
|
2032
2032
|
* @see https://tailwindcss.com/docs/min-width
|
|
2033
2033
|
*/
|
|
2034
2034
|
"min-w": [{
|
|
2035
|
-
"min-w": ["min", "max", "fit",
|
|
2035
|
+
"min-w": ["min", "max", "fit", m0]
|
|
2036
2036
|
}],
|
|
2037
2037
|
/**
|
|
2038
2038
|
* Max-Width
|
|
@@ -2055,7 +2055,7 @@ function p1() {
|
|
|
2055
2055
|
* @see https://tailwindcss.com/docs/min-height
|
|
2056
2056
|
*/
|
|
2057
2057
|
"min-h": [{
|
|
2058
|
-
"min-h": ["min", "max", "fit",
|
|
2058
|
+
"min-h": ["min", "max", "fit", m0]
|
|
2059
2059
|
}],
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Max-Height
|
|
@@ -2145,7 +2145,7 @@ function p1() {
|
|
|
2145
2145
|
* @see https://tailwindcss.com/docs/line-height
|
|
2146
2146
|
*/
|
|
2147
2147
|
leading: [{
|
|
2148
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
2148
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", m0]
|
|
2149
2149
|
}],
|
|
2150
2150
|
/**
|
|
2151
2151
|
* List Style Image
|
|
@@ -2221,14 +2221,14 @@ function p1() {
|
|
|
2221
2221
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
2222
2222
|
*/
|
|
2223
2223
|
"text-decoration-thickness": [{
|
|
2224
|
-
decoration: ["auto", "from-font",
|
|
2224
|
+
decoration: ["auto", "from-font", m0]
|
|
2225
2225
|
}],
|
|
2226
2226
|
/**
|
|
2227
2227
|
* Text Underline Offset
|
|
2228
2228
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
2229
2229
|
*/
|
|
2230
2230
|
"underline-offset": [{
|
|
2231
|
-
"underline-offset": ["auto",
|
|
2231
|
+
"underline-offset": ["auto", m0]
|
|
2232
2232
|
}],
|
|
2233
2233
|
/**
|
|
2234
2234
|
* Text Decoration Color
|
|
@@ -2689,14 +2689,14 @@ function p1() {
|
|
|
2689
2689
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
2690
2690
|
*/
|
|
2691
2691
|
"outline-offset": [{
|
|
2692
|
-
"outline-offset": [
|
|
2692
|
+
"outline-offset": [m0]
|
|
2693
2693
|
}],
|
|
2694
2694
|
/**
|
|
2695
2695
|
* Outline Width
|
|
2696
2696
|
* @see https://tailwindcss.com/docs/outline-width
|
|
2697
2697
|
*/
|
|
2698
2698
|
"outline-w": [{
|
|
2699
|
-
outline: [
|
|
2699
|
+
outline: [m0]
|
|
2700
2700
|
}],
|
|
2701
2701
|
/**
|
|
2702
2702
|
* Outline Color
|
|
@@ -2736,7 +2736,7 @@ function p1() {
|
|
|
2736
2736
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
2737
2737
|
*/
|
|
2738
2738
|
"ring-offset-w": [{
|
|
2739
|
-
"ring-offset": [
|
|
2739
|
+
"ring-offset": [m0]
|
|
2740
2740
|
}],
|
|
2741
2741
|
/**
|
|
2742
2742
|
* Ring Offset Color
|
|
@@ -2772,14 +2772,14 @@ function p1() {
|
|
|
2772
2772
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2773
2773
|
*/
|
|
2774
2774
|
"mix-blend": [{
|
|
2775
|
-
"mix-blend":
|
|
2775
|
+
"mix-blend": d0()
|
|
2776
2776
|
}],
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Background Blend Mode
|
|
2779
2779
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2780
2780
|
*/
|
|
2781
2781
|
"bg-blend": [{
|
|
2782
|
-
"bg-blend":
|
|
2782
|
+
"bg-blend": d0()
|
|
2783
2783
|
}],
|
|
2784
2784
|
// Filters
|
|
2785
2785
|
/**
|
|
@@ -3312,7 +3312,7 @@ function p1() {
|
|
|
3312
3312
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
3313
3313
|
*/
|
|
3314
3314
|
"stroke-w": [{
|
|
3315
|
-
stroke: [
|
|
3315
|
+
stroke: [m0, E0]
|
|
3316
3316
|
}],
|
|
3317
3317
|
/**
|
|
3318
3318
|
* Stroke
|
|
@@ -3493,14 +3493,14 @@ const W0 = (r) => {
|
|
|
3493
3493
|
v,
|
|
3494
3494
|
a
|
|
3495
3495
|
);
|
|
3496
|
-
return
|
|
3496
|
+
return h0(e, {
|
|
3497
3497
|
className: B,
|
|
3498
3498
|
...b,
|
|
3499
3499
|
ref: k
|
|
3500
3500
|
});
|
|
3501
3501
|
}, j = d(fa);
|
|
3502
3502
|
j.displayName = "Box";
|
|
3503
|
-
const H0 = ({ innerRef: r, forwardedRef: i }) => (
|
|
3503
|
+
const H0 = ({ innerRef: r, forwardedRef: i }) => (n0(() => {
|
|
3504
3504
|
[r, i].forEach((l) => {
|
|
3505
3505
|
l && (typeof l == "function" ? l(r.current || null) : l.current = r.current || null);
|
|
3506
3506
|
});
|
|
@@ -3512,7 +3512,7 @@ function ga() {
|
|
|
3512
3512
|
}, []);
|
|
3513
3513
|
}
|
|
3514
3514
|
function K1({ handler: r, ref: i }) {
|
|
3515
|
-
|
|
3515
|
+
n0(() => {
|
|
3516
3516
|
function l(t) {
|
|
3517
3517
|
const a = i == null ? void 0 : i.current;
|
|
3518
3518
|
!a || a.contains(t.target) || r(t);
|
|
@@ -3656,7 +3656,7 @@ const xa = ({
|
|
|
3656
3656
|
...R
|
|
3657
3657
|
}, C) => {
|
|
3658
3658
|
const z = Q(null), N = H0({ forwardedRef: C, innerRef: z }), [B, $] = K(!!x), [A, P] = K(!1);
|
|
3659
|
-
|
|
3659
|
+
n0(() => {
|
|
3660
3660
|
var T;
|
|
3661
3661
|
$(!!((T = N == null ? void 0 : N.current) != null && T.value) || !!(x || g));
|
|
3662
3662
|
}, [x, g, N]);
|
|
@@ -3769,7 +3769,7 @@ const Ma = ({ children: r, className: i, component: l, componentProps: t, disabl
|
|
|
3769
3769
|
]),
|
|
3770
3770
|
ref: v,
|
|
3771
3771
|
...Z,
|
|
3772
|
-
children:
|
|
3772
|
+
children: h0(l ?? "div", {
|
|
3773
3773
|
children: r,
|
|
3774
3774
|
...t,
|
|
3775
3775
|
className: u(
|
|
@@ -3847,7 +3847,7 @@ const ya = ({
|
|
|
3847
3847
|
},
|
|
3848
3848
|
[g, v, R, w]
|
|
3849
3849
|
), P = l0(() => t.filter((I) => I.label.toLowerCase().includes(w.toLowerCase())) ?? [], [t, w]);
|
|
3850
|
-
return
|
|
3850
|
+
return n0(() => (document.addEventListener("click", A, !0), () => {
|
|
3851
3851
|
document.removeEventListener("click", A, !0);
|
|
3852
3852
|
}), [A]), /* @__PURE__ */ n(j, { className: "relative", ref: x, children: [
|
|
3853
3853
|
r ? /* @__PURE__ */ c(L0, { className: "absolute z-1" }) : null,
|
|
@@ -3972,7 +3972,7 @@ const Na = ({ children: r, className: i, ...l }, t) => {
|
|
|
3972
3972
|
size: "15"
|
|
3973
3973
|
}
|
|
3974
3974
|
) : null,
|
|
3975
|
-
typeof o == "object" && "type" in o ?
|
|
3975
|
+
typeof o == "object" && "type" in o ? h0(o.type, {
|
|
3976
3976
|
...o.props,
|
|
3977
3977
|
className: u([
|
|
3978
3978
|
o.props.className ?? "",
|
|
@@ -4077,13 +4077,13 @@ const Ba = ({
|
|
|
4077
4077
|
r
|
|
4078
4078
|
);
|
|
4079
4079
|
return /* @__PURE__ */ n("button", { className: x, disabled: t || Z, ref: k, type: w, ...b, children: [
|
|
4080
|
-
o === "start" && a !== void 0 ?
|
|
4080
|
+
o === "start" && a !== void 0 ? h0(a, {
|
|
4081
4081
|
className: f === "xs" ? "mie-0.25" : "mie-0.5",
|
|
4082
4082
|
onClick: e ?? void 0,
|
|
4083
4083
|
size: S0[f]
|
|
4084
4084
|
}) : null,
|
|
4085
4085
|
/* @__PURE__ */ c("span", { className: u("w-full", l), children: i }),
|
|
4086
|
-
o === "end" && a !== void 0 ?
|
|
4086
|
+
o === "end" && a !== void 0 ? h0(a, {
|
|
4087
4087
|
className: f === "xs" ? "mis-0.25" : "mis-0.5",
|
|
4088
4088
|
onClick: e ?? void 0,
|
|
4089
4089
|
size: S0[f]
|
|
@@ -4346,7 +4346,7 @@ const Ta = ({ page: r, pages: i, maxPages: l = 5 }) => {
|
|
|
4346
4346
|
[i, l]
|
|
4347
4347
|
);
|
|
4348
4348
|
return i.length <= 1 ? null : /* @__PURE__ */ n(j, { className: "h-4 flex items-center justify-center", children: [
|
|
4349
|
-
l !== i[0] ? /* @__PURE__ */ n(
|
|
4349
|
+
l !== i[0] ? /* @__PURE__ */ n(Z0, { children: [
|
|
4350
4350
|
/* @__PURE__ */ n(
|
|
4351
4351
|
j,
|
|
4352
4352
|
{
|
|
@@ -4402,7 +4402,7 @@ const Ta = ({ page: r, pages: i, maxPages: l = 5 }) => {
|
|
|
4402
4402
|
children: `${i.indexOf(l) + 1} of ${i.length}`
|
|
4403
4403
|
}
|
|
4404
4404
|
),
|
|
4405
|
-
l !== i[i.length - 1] ? /* @__PURE__ */ n(
|
|
4405
|
+
l !== i[i.length - 1] ? /* @__PURE__ */ n(Z0, { children: [
|
|
4406
4406
|
/* @__PURE__ */ n(
|
|
4407
4407
|
j,
|
|
4408
4408
|
{
|
|
@@ -4584,11 +4584,11 @@ const Ga = 10, Wa = d(
|
|
|
4584
4584
|
thClassNames: V,
|
|
4585
4585
|
thTextClassNames: D,
|
|
4586
4586
|
theadClassNames: t0,
|
|
4587
|
-
theme:
|
|
4587
|
+
theme: d0,
|
|
4588
4588
|
trClassNames: u0,
|
|
4589
4589
|
variant: r0 = "default",
|
|
4590
4590
|
viewMoreButton: p0,
|
|
4591
|
-
...
|
|
4591
|
+
...o0
|
|
4592
4592
|
}, E) => {
|
|
4593
4593
|
switch (r0) {
|
|
4594
4594
|
case "default": {
|
|
@@ -4610,16 +4610,16 @@ const Ga = 10, Wa = d(
|
|
|
4610
4610
|
inactive: /* @__PURE__ */ c(F1, { className: v0, size: "16" })
|
|
4611
4611
|
}, y0 = Z1["blue-10"], U = Z1["blue-50"], _ = g0(
|
|
4612
4612
|
(M) => {
|
|
4613
|
-
const F =
|
|
4613
|
+
const F = d0 === "dark" ? U : y0;
|
|
4614
4614
|
return `linear-gradient(to right, ${F} 0%, ${F} ${M}, transparent ${M}, transparent 100%)`;
|
|
4615
4615
|
},
|
|
4616
|
-
[y0, U,
|
|
4616
|
+
[y0, U, d0]
|
|
4617
4617
|
);
|
|
4618
4618
|
function J(M) {
|
|
4619
4619
|
const { totalRowsCount: F } = M, G = Math.ceil(F / A);
|
|
4620
4620
|
return Array.from({ length: G ?? 1 }, (O, f0) => (f0 + 1).toString());
|
|
4621
4621
|
}
|
|
4622
|
-
return e ? /* @__PURE__ */ c("div", { className: u("w-full p-0 shadow-none relative"), style: { height: g ?? "400px" }, children: /* @__PURE__ */ c(L0, {}) }) : /* @__PURE__ */ c(
|
|
4622
|
+
return e ? /* @__PURE__ */ c("div", { className: u("w-full p-0 shadow-none relative"), style: { height: g ?? "400px" }, children: /* @__PURE__ */ c(L0, {}) }) : /* @__PURE__ */ c(Z0, { children: /* @__PURE__ */ n("div", { className: u("w-full p-0 flex flex-col justify-center relative", x), children: [
|
|
4623
4623
|
/* @__PURE__ */ c("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n(
|
|
4624
4624
|
"table",
|
|
4625
4625
|
{
|
|
@@ -4630,10 +4630,10 @@ const Ga = 10, Wa = d(
|
|
|
4630
4630
|
S
|
|
4631
4631
|
),
|
|
4632
4632
|
ref: E,
|
|
4633
|
-
...
|
|
4633
|
+
...o0,
|
|
4634
4634
|
children: [
|
|
4635
4635
|
o ? /* @__PURE__ */ c(Oa, { className: t0, children: /* @__PURE__ */ c(R1, { className: u0, children: i == null ? void 0 : i.map((M) => {
|
|
4636
|
-
var G,
|
|
4636
|
+
var G, s0, O;
|
|
4637
4637
|
const F = (I == null ? void 0 : I.sortBy) === M.dataIndex;
|
|
4638
4638
|
return /* @__PURE__ */ c(
|
|
4639
4639
|
Pa,
|
|
@@ -4654,7 +4654,7 @@ const Ga = 10, Wa = d(
|
|
|
4654
4654
|
"div",
|
|
4655
4655
|
{
|
|
4656
4656
|
className: "bg-transparent flex items-center gap-0.5",
|
|
4657
|
-
style: { justifyContent: ((
|
|
4657
|
+
style: { justifyContent: ((s0 = M.props) == null ? void 0 : s0.align) ?? "start" },
|
|
4658
4658
|
children: [
|
|
4659
4659
|
/* @__PURE__ */ c(
|
|
4660
4660
|
L,
|
|
@@ -4676,7 +4676,7 @@ const Ga = 10, Wa = d(
|
|
|
4676
4676
|
);
|
|
4677
4677
|
}) }) }) : null,
|
|
4678
4678
|
/* @__PURE__ */ c($a, { className: T, children: B == null ? void 0 : B.map((M, F) => {
|
|
4679
|
-
const G = !!(z || M != null && M.endIcon),
|
|
4679
|
+
const G = !!(z || M != null && M.endIcon), s0 = !!y;
|
|
4680
4680
|
return /* @__PURE__ */ c(
|
|
4681
4681
|
R1,
|
|
4682
4682
|
{
|
|
@@ -4684,8 +4684,8 @@ const Ga = 10, Wa = d(
|
|
|
4684
4684
|
"relative z-0",
|
|
4685
4685
|
w && F % 2 !== 0 ? (p == null ? void 0 : p[0]) ?? "bg-canvas-secondary-light dark:bg-surface-quaternary-dark" : "",
|
|
4686
4686
|
w && F % 2 === 0 ? p == null ? void 0 : p[1] : "",
|
|
4687
|
-
Z || M != null && M.rowLink ||
|
|
4688
|
-
M != null && M.rowLink ||
|
|
4687
|
+
Z || M != null && M.rowLink || s0 ? u("hover:bg-warm-neutral hover:dark:bg-warm-neutral-dark", H) : "",
|
|
4688
|
+
M != null && M.rowLink || s0 ? "cursor-pointer" : "",
|
|
4689
4689
|
u0
|
|
4690
4690
|
),
|
|
4691
4691
|
onClick: () => y == null ? void 0 : y(F),
|
|
@@ -4841,7 +4841,7 @@ const Da = d(
|
|
|
4841
4841
|
Da.displayName = "DataTableContainer";
|
|
4842
4842
|
const t2 = ({ autoFocus: r = !0, children: i, className: l }) => {
|
|
4843
4843
|
const t = Q(null);
|
|
4844
|
-
return
|
|
4844
|
+
return n0(() => {
|
|
4845
4845
|
if (t.current) {
|
|
4846
4846
|
const a = t.current.querySelectorAll(
|
|
4847
4847
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
@@ -4945,7 +4945,7 @@ const t2 = ({ autoFocus: r = !0, children: i, className: l }) => {
|
|
|
4945
4945
|
) })
|
|
4946
4946
|
] })), _a = d(Ua);
|
|
4947
4947
|
_a.displayName = "Dialog";
|
|
4948
|
-
const qa = ({ className: r, ...i }) => /* @__PURE__ */ c("hr", { ...i, className: u("w-full border-gray-15 dark:border-gray-30 border-standard", r) }), Xa = ({ children: r, className: i, isOrdered: l = !1, ...t }, a) =>
|
|
4948
|
+
const qa = ({ className: r, ...i }) => /* @__PURE__ */ c("hr", { ...i, className: u("w-full border-gray-15 dark:border-gray-30 border-standard", r) }), Xa = ({ children: r, className: i, isOrdered: l = !1, ...t }, a) => h0(l ? "ol" : "ul", {
|
|
4949
4949
|
children: r,
|
|
4950
4950
|
className: u(["bg-canvas-light dark:bg-gray-45 rounded-1 py-0.5", i]),
|
|
4951
4951
|
ref: a,
|
|
@@ -4968,7 +4968,7 @@ const Ja = ({
|
|
|
4968
4968
|
onSelect: e,
|
|
4969
4969
|
selectedOptionClassNames: o,
|
|
4970
4970
|
id: Z
|
|
4971
|
-
}) => /* @__PURE__ */ n(
|
|
4971
|
+
}) => /* @__PURE__ */ n(Z0, { children: [
|
|
4972
4972
|
/* @__PURE__ */ n(
|
|
4973
4973
|
z0,
|
|
4974
4974
|
{
|
|
@@ -4984,7 +4984,7 @@ const Ja = ({
|
|
|
4984
4984
|
onClick: () => e(t),
|
|
4985
4985
|
role: "option",
|
|
4986
4986
|
children: [
|
|
4987
|
-
/* @__PURE__ */ c(Ka, { children: t != null && t.labelComponent ? /* @__PURE__ */ c(
|
|
4987
|
+
/* @__PURE__ */ c(Ka, { children: t != null && t.labelComponent ? /* @__PURE__ */ c(Z0, { children: t.labelComponent }) : /* @__PURE__ */ c(
|
|
4988
4988
|
L,
|
|
4989
4989
|
{
|
|
4990
4990
|
className: "group-hover:text-canvas-light dark:group-hover:text-canvas-light",
|
|
@@ -5033,7 +5033,7 @@ const Ja = ({
|
|
|
5033
5033
|
const T = o.find((X) => X.value === S.target.value);
|
|
5034
5034
|
T && P(T);
|
|
5035
5035
|
};
|
|
5036
|
-
return
|
|
5036
|
+
return n0(() => (document.addEventListener("click", I, !0), () => {
|
|
5037
5037
|
document.removeEventListener("click", I, !0);
|
|
5038
5038
|
}), [I]), /* @__PURE__ */ c(j, { children: /* @__PURE__ */ n(j, { className: "relative", ref: z, children: [
|
|
5039
5039
|
i ? /* @__PURE__ */ c(L0, { className: "absolute z-1" }) : null,
|
|
@@ -5093,7 +5093,7 @@ const Ja = ({
|
|
|
5093
5093
|
] }) });
|
|
5094
5094
|
}, ei = d(Qa);
|
|
5095
5095
|
ei.displayName = "Dropdown";
|
|
5096
|
-
const li = ({ className: r, children: i, component: l = "a", variant: t = "borderless", ...a }, e) =>
|
|
5096
|
+
const li = ({ className: r, children: i, component: l = "a", variant: t = "borderless", ...a }, e) => h0(
|
|
5097
5097
|
l,
|
|
5098
5098
|
{
|
|
5099
5099
|
...a,
|
|
@@ -5208,9 +5208,9 @@ function ni({
|
|
|
5208
5208
|
const N = Q(null);
|
|
5209
5209
|
e1(z, () => N.current, []);
|
|
5210
5210
|
const [B, $] = K([]), [A, P] = K(!1), [I, p] = K(R);
|
|
5211
|
-
|
|
5211
|
+
n0(() => {
|
|
5212
5212
|
p(R);
|
|
5213
|
-
}, [R]),
|
|
5213
|
+
}, [R]), n0(() => o(B.map((E) => E.file)), [o, B]);
|
|
5214
5214
|
const S = l0(
|
|
5215
5215
|
() => B.map((E) => {
|
|
5216
5216
|
var H;
|
|
@@ -5242,7 +5242,7 @@ function ni({
|
|
|
5242
5242
|
), t0 = g0(
|
|
5243
5243
|
(E) => E.filter((H) => B.every((a0) => a0.id !== H.name)),
|
|
5244
5244
|
[B]
|
|
5245
|
-
),
|
|
5245
|
+
), d0 = g0(
|
|
5246
5246
|
(E) => {
|
|
5247
5247
|
const H = Object.values(E), a0 = V(H), v0 = t0(a0), I0 = D(v0);
|
|
5248
5248
|
$([...B, ...I0]);
|
|
@@ -5252,7 +5252,7 @@ function ni({
|
|
|
5252
5252
|
function u0(E) {
|
|
5253
5253
|
v && v(E);
|
|
5254
5254
|
const { files: H } = E.nativeEvent.target;
|
|
5255
|
-
H &&
|
|
5255
|
+
H && d0(H);
|
|
5256
5256
|
}
|
|
5257
5257
|
function r0(E) {
|
|
5258
5258
|
f && f(E), P(!0);
|
|
@@ -5260,7 +5260,7 @@ function ni({
|
|
|
5260
5260
|
function p0(E) {
|
|
5261
5261
|
w && w(E), P(!1);
|
|
5262
5262
|
}
|
|
5263
|
-
function
|
|
5263
|
+
function o0(E) {
|
|
5264
5264
|
g && g(E), P(!1);
|
|
5265
5265
|
}
|
|
5266
5266
|
return /* @__PURE__ */ n("div", { className: i, children: [
|
|
@@ -5340,7 +5340,7 @@ function ni({
|
|
|
5340
5340
|
onChange: u0,
|
|
5341
5341
|
onDragEnter: r0,
|
|
5342
5342
|
onDragLeave: p0,
|
|
5343
|
-
onDrop:
|
|
5343
|
+
onDrop: o0,
|
|
5344
5344
|
ref: N,
|
|
5345
5345
|
title: "",
|
|
5346
5346
|
type: "file",
|
|
@@ -5423,14 +5423,14 @@ const vi = ({
|
|
|
5423
5423
|
shape: I = "circle",
|
|
5424
5424
|
validation: p
|
|
5425
5425
|
}, S) => {
|
|
5426
|
-
const T = Q(null), X = H0({ forwardedRef: S, innerRef: T }), [V, D] = K({ error: v, status: z ? "resolved" : "idle" }), [t0,
|
|
5427
|
-
|
|
5426
|
+
const T = Q(null), X = H0({ forwardedRef: S, innerRef: T }), [V, D] = K({ error: v, status: z ? "resolved" : "idle" }), [t0, d0] = K(null), u0 = () => T != null && T.current ? T.current.click() : void 0;
|
|
5427
|
+
n0(() => {
|
|
5428
5428
|
if (z) {
|
|
5429
5429
|
let U = !0;
|
|
5430
5430
|
D((J) => ({ ...J, status: "pending" }));
|
|
5431
5431
|
const _ = new Image();
|
|
5432
5432
|
return _.onload = () => {
|
|
5433
|
-
U && (
|
|
5433
|
+
U && (d0({
|
|
5434
5434
|
height: _.height,
|
|
5435
5435
|
isLandscape: _.width >= _.height,
|
|
5436
5436
|
width: _.width
|
|
@@ -5441,7 +5441,7 @@ const vi = ({
|
|
|
5441
5441
|
U = !1, _.onload = null, _.onerror = null, _.src = "";
|
|
5442
5442
|
};
|
|
5443
5443
|
} else
|
|
5444
|
-
D((U) => ({ ...U, status: "idle" })),
|
|
5444
|
+
D((U) => ({ ...U, status: "idle" })), d0(null);
|
|
5445
5445
|
}, [z]);
|
|
5446
5446
|
const r0 = l0(() => V.file && V.status !== "rejected" ? (D((U) => ({ ...U, status: "resolved" })), V.file.imageSrc) : z && V.status === "resolved" ? (D((U) => ({ ...U, status: "resolved" })), z) : null, [V.file, V.status, z]), p0 = l0(() => {
|
|
5447
5447
|
var _, J, M;
|
|
@@ -5453,10 +5453,10 @@ const vi = ({
|
|
|
5453
5453
|
return /* @__PURE__ */ c(j, { className: "animate-spin", children: /* @__PURE__ */ c(r1, { className: "text-info-light dark:text-info-dark", "data-testid": "loading spinner", size: "32" }) });
|
|
5454
5454
|
case "resolved":
|
|
5455
5455
|
const F = i && t0 && (() => {
|
|
5456
|
-
const G = t0.width / t0.height,
|
|
5457
|
-
return Math.abs(G - i) / i >
|
|
5456
|
+
const G = t0.width / t0.height, s0 = 0.2;
|
|
5457
|
+
return Math.abs(G - i) / i > s0;
|
|
5458
5458
|
})();
|
|
5459
|
-
return /* @__PURE__ */ n(
|
|
5459
|
+
return /* @__PURE__ */ n(Z0, { children: [
|
|
5460
5460
|
F ? (
|
|
5461
5461
|
// Image with blurred background when aspect ratios don't match
|
|
5462
5462
|
/* @__PURE__ */ n("div", { className: "relative w-full h-full overflow-hidden rounded-2 flex items-center justify-center", children: [
|
|
@@ -5537,11 +5537,11 @@ const vi = ({
|
|
|
5537
5537
|
Z,
|
|
5538
5538
|
t0,
|
|
5539
5539
|
i
|
|
5540
|
-
]),
|
|
5541
|
-
var
|
|
5542
|
-
const F = new Image(), G = (
|
|
5540
|
+
]), o0 = ({ file: U, imageUrl: _ }) => new Promise((J, M) => {
|
|
5541
|
+
var s0;
|
|
5542
|
+
const F = new Image(), G = (s0 = p == null ? void 0 : p.imageRatio) == null ? void 0 : s0.split("/");
|
|
5543
5543
|
F.onload = async () => {
|
|
5544
|
-
if (
|
|
5544
|
+
if (d0({
|
|
5545
5545
|
height: F.height,
|
|
5546
5546
|
isLandscape: F.width >= F.height,
|
|
5547
5547
|
width: F.width
|
|
@@ -5565,7 +5565,7 @@ const vi = ({
|
|
|
5565
5565
|
if (_) {
|
|
5566
5566
|
const J = _[0], M = URL.createObjectURL(J);
|
|
5567
5567
|
let F = !0;
|
|
5568
|
-
D((G) => ({ ...G, status: "pending" })), P && await P(J), F = await
|
|
5568
|
+
D((G) => ({ ...G, status: "pending" })), P && await P(J), F = await o0({
|
|
5569
5569
|
file: J,
|
|
5570
5570
|
imageUrl: M
|
|
5571
5571
|
}), F && D((G) => ({
|
|
@@ -5665,7 +5665,7 @@ const gi = ({
|
|
|
5665
5665
|
...Z
|
|
5666
5666
|
}, v) => {
|
|
5667
5667
|
const f = e2(t !== void 0 ? a : void 0);
|
|
5668
|
-
return /* @__PURE__ */ n(({ children: g }) =>
|
|
5668
|
+
return /* @__PURE__ */ n(({ children: g }) => h0(
|
|
5669
5669
|
l,
|
|
5670
5670
|
{
|
|
5671
5671
|
...Z,
|
|
@@ -5680,12 +5680,12 @@ const gi = ({
|
|
|
5680
5680
|
},
|
|
5681
5681
|
g
|
|
5682
5682
|
), { children: [
|
|
5683
|
-
a === "start" && t !== void 0 ?
|
|
5683
|
+
a === "start" && t !== void 0 ? h0(t, {
|
|
5684
5684
|
className: u("flex-shrink-0", o === "xs" ? "mie-0.25" : "mie-0.5"),
|
|
5685
5685
|
size: S0[o]
|
|
5686
5686
|
}) : null,
|
|
5687
|
-
|
|
5688
|
-
a === "end" && t !== void 0 ?
|
|
5687
|
+
h0("span", { className: "" }, i),
|
|
5688
|
+
a === "end" && t !== void 0 ? h0(t, {
|
|
5689
5689
|
className: u("flex-shrink-0", o === "xs" ? "mis-0.25" : "mis-0.5"),
|
|
5690
5690
|
size: S0[o]
|
|
5691
5691
|
}) : null
|
|
@@ -5795,7 +5795,7 @@ const en = ({ children: r, className: i, ...l }) => /* @__PURE__ */ c("div", { c
|
|
|
5795
5795
|
children: i
|
|
5796
5796
|
}
|
|
5797
5797
|
);
|
|
5798
|
-
}, Ci = ({ open: r, children: i }) => /* @__PURE__ */ c(
|
|
5798
|
+
}, Ci = ({ open: r, children: i }) => /* @__PURE__ */ c(Z0, { children: r ? i : null }), ln = ({
|
|
5799
5799
|
align: r = { horizontal: "start", vertical: "bottom" },
|
|
5800
5800
|
autoFocus: i = !0,
|
|
5801
5801
|
children: l,
|
|
@@ -5838,7 +5838,7 @@ const en = ({ children: r, className: i, ...l }) => /* @__PURE__ */ c("div", { c
|
|
|
5838
5838
|
onClick: a,
|
|
5839
5839
|
ref: e
|
|
5840
5840
|
});
|
|
5841
|
-
return /* @__PURE__ */ c(
|
|
5841
|
+
return /* @__PURE__ */ c(Z0, { children: o });
|
|
5842
5842
|
}, ki = ({ children: r, className: i, error: l, hint: t, heading: a, headingProps: e, hintProps: o, errorProps: Z, ...v }, f) => /* @__PURE__ */ n("div", { ...v, className: u("flex-col rounded-0.5 w-fit", i), ref: f, children: [
|
|
5843
5843
|
a ? (
|
|
5844
5844
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -6082,28 +6082,27 @@ function Li({
|
|
|
6082
6082
|
className: Z,
|
|
6083
6083
|
activeItemClassName: v = ""
|
|
6084
6084
|
}) {
|
|
6085
|
-
return /* @__PURE__ */
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
] });
|
|
6085
|
+
return /* @__PURE__ */ c(
|
|
6086
|
+
"button",
|
|
6087
|
+
{
|
|
6088
|
+
className: u(
|
|
6089
|
+
"font-bold text-center hover:cursor-pointer p-2 leading-tight border-y-small border-tertiary-light dark:border-tertiary-dark border-solid",
|
|
6090
|
+
{
|
|
6091
|
+
"bg-gray-40 dark:bg-white text-white dark:text-gray-40 border-gray-40 dark:border-white": i === r,
|
|
6092
|
+
"border-e-small": a !== i && r !== i && l !== i,
|
|
6093
|
+
"border-e-small rounded-se-1 rounded-ee-1": i === l,
|
|
6094
|
+
"border-s-small rounded-ss-1 rounded-es-1": i === 0,
|
|
6095
|
+
"plb-0.5 text-14": o === "sm",
|
|
6096
|
+
"plb-1.5": o === "md"
|
|
6097
|
+
},
|
|
6098
|
+
Z,
|
|
6099
|
+
i === r ? v : ""
|
|
6100
|
+
),
|
|
6101
|
+
onClick: i !== r ? () => t(i) : void 0,
|
|
6102
|
+
type: "button",
|
|
6103
|
+
children: e
|
|
6104
|
+
}
|
|
6105
|
+
);
|
|
6107
6106
|
}
|
|
6108
6107
|
const rn = ({ className: r, ...i }) => /* @__PURE__ */ c(
|
|
6109
6108
|
"option",
|
|
@@ -6133,7 +6132,7 @@ const Fi = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
|
|
|
6133
6132
|
}, y) => {
|
|
6134
6133
|
var I;
|
|
6135
6134
|
const x = u(Vi, Fi), R = Q(null), C = H0({ forwardedRef: y, innerRef: R }), [z, N] = K(!!(b || (I = C == null ? void 0 : C.current) != null && I.value));
|
|
6136
|
-
|
|
6135
|
+
n0(() => {
|
|
6137
6136
|
var p;
|
|
6138
6137
|
N(!!((p = C == null ? void 0 : C.current) != null && p.value || b));
|
|
6139
6138
|
}, [b, C]);
|
|
@@ -6248,7 +6247,7 @@ const Di = d(
|
|
|
6248
6247
|
Di.displayName = "SideNavContent";
|
|
6249
6248
|
const Ui = d(({ className: r, ...i }, l) => {
|
|
6250
6249
|
const [t, a] = K(!1);
|
|
6251
|
-
return
|
|
6250
|
+
return n0(() => {
|
|
6252
6251
|
const e = document.querySelector('[data-sidebar="content"]');
|
|
6253
6252
|
if (!e)
|
|
6254
6253
|
return;
|
|
@@ -6388,7 +6387,7 @@ const nc = ({
|
|
|
6388
6387
|
}
|
|
6389
6388
|
);
|
|
6390
6389
|
nc.displayName = "SideNavItem";
|
|
6391
|
-
const dc = ({ icon: r }) => q.isValidElement(r) ? r : typeof r == "object" && "filled" in r && "outlined" in r ? /* @__PURE__ */ n(
|
|
6390
|
+
const dc = ({ icon: r }) => q.isValidElement(r) ? r : typeof r == "object" && "filled" in r && "outlined" in r ? /* @__PURE__ */ n(Z0, { children: [
|
|
6392
6391
|
/* @__PURE__ */ c("div", { className: "hidden group-data-[active=true]/menu-item:block", children: r.filled }),
|
|
6393
6392
|
/* @__PURE__ */ c("div", { className: "block group-data-[active=true]/menu-item:hidden", children: r.outlined })
|
|
6394
6393
|
] }) : null;
|
|
@@ -6681,7 +6680,7 @@ const yc = {
|
|
|
6681
6680
|
Rc.displayName = "TextArea";
|
|
6682
6681
|
const Nc = "_inputIcon_1pzdd_1", Sc = {
|
|
6683
6682
|
inputIcon: Nc
|
|
6684
|
-
}, Bc = ({ className: r, error: i, name: l, ...t }, a) => /* @__PURE__ */ n(
|
|
6683
|
+
}, Bc = ({ className: r, error: i, name: l, ...t }, a) => /* @__PURE__ */ n(Z0, { children: [
|
|
6685
6684
|
/* @__PURE__ */ c(
|
|
6686
6685
|
"input",
|
|
6687
6686
|
{
|
|
@@ -6722,7 +6721,7 @@ const Hc = {
|
|
|
6722
6721
|
position: o = "inlineEnd"
|
|
6723
6722
|
}) => {
|
|
6724
6723
|
const Z = Q(null), [v, f] = K(c0.START);
|
|
6725
|
-
|
|
6724
|
+
n0(() => {
|
|
6726
6725
|
if (v === c0.START) {
|
|
6727
6726
|
const x = setTimeout(() => f(c0.SHOW), 100);
|
|
6728
6727
|
return () => clearTimeout(x);
|
|
@@ -6758,7 +6757,7 @@ const Hc = {
|
|
|
6758
6757
|
] }) });
|
|
6759
6758
|
};
|
|
6760
6759
|
function Lc({ children: r, content: i, structuredContent: l, textClassName: t }) {
|
|
6761
|
-
return r || (l ? /* @__PURE__ */ n(
|
|
6760
|
+
return r || (l ? /* @__PURE__ */ n(Z0, { children: [
|
|
6762
6761
|
/* @__PURE__ */ c(L, { className: u("text-center font-medium", l == null ? void 0 : l.titleClassName), children: l.title }),
|
|
6763
6762
|
/* @__PURE__ */ c(L, { className: t, children: l.content })
|
|
6764
6763
|
] }) : /* @__PURE__ */ c(L, { className: t, children: i }));
|