strata-ui-react 0.2.9 → 0.2.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/strata-ui-react.es.js +469 -920
- package/package.json +2 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { createContext, createElement, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import * as ReactDOM from "react-dom";
|
|
4
|
+
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
|
4
5
|
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (t, n) => () => (n || t((n = { exports: {} }).exports, n), n.exports), __copyProps = (t, n, i, s) => {
|
|
5
6
|
if (n && typeof n == "object" || typeof n == "function") for (var c = __getOwnPropNames(n), l = 0, u = c.length, d; l < u; l++) d = c[l], !__hasOwnProp.call(t, d) && d !== i && __defProp(t, d, {
|
|
6
7
|
get: ((t) => n[t]).bind(null, d),
|
|
@@ -13,22 +14,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
13
14
|
}) : i, t)), __require = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : t)(function(t) {
|
|
14
15
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
15
16
|
throw Error("Calling `require` for \"" + t + "\" in an environment that doesn't expose the `require` function.");
|
|
16
|
-
})
|
|
17
|
-
var n = __require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
18
|
-
t.c = function(t) {
|
|
19
|
-
return n.H.useMemoCache(t);
|
|
20
|
-
};
|
|
21
|
-
})), require_react_compiler_runtime_development = /* @__PURE__ */ __commonJSMin(((t) => {
|
|
22
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
23
|
-
var n = __require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
24
|
-
t.c = function(t) {
|
|
25
|
-
var i = n.H;
|
|
26
|
-
return i === null && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."), i.useMemoCache(t);
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
29
|
-
})), require_compiler_runtime = /* @__PURE__ */ __commonJSMin(((t, n) => {
|
|
30
|
-
process.env.NODE_ENV === "production" ? n.exports = require_react_compiler_runtime_production() : n.exports = require_react_compiler_runtime_development();
|
|
31
|
-
}));
|
|
17
|
+
});
|
|
32
18
|
function formatErrorMessage(t, ...n) {
|
|
33
19
|
let i = new URL(`https://base-ui.com/production-error/${t}`);
|
|
34
20
|
return n.forEach((t) => i.searchParams.append("args[]", t)), `Base UI error #${t}; visit ${i} for the full message.`;
|
|
@@ -284,7 +270,7 @@ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((t) =>
|
|
|
284
270
|
if (typeof t == "string") return t;
|
|
285
271
|
switch (t) {
|
|
286
272
|
case S: return "Fragment";
|
|
287
|
-
case
|
|
273
|
+
case w: return "Profiler";
|
|
288
274
|
case C: return "StrictMode";
|
|
289
275
|
case k: return "Suspense";
|
|
290
276
|
case A: return "SuspenseList";
|
|
@@ -419,7 +405,7 @@ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((t) =>
|
|
|
419
405
|
function v(t) {
|
|
420
406
|
return typeof t == "object" && !!t && t.$$typeof === b;
|
|
421
407
|
}
|
|
422
|
-
var y = __require("react"), b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"),
|
|
408
|
+
var y = __require("react"), b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), D = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), F = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, L = Array.isArray, R = console.createTask ? console.createTask : function() {
|
|
423
409
|
return null;
|
|
424
410
|
};
|
|
425
411
|
y = { react_stack_bottom_frame: function(t) {
|
|
@@ -2165,49 +2151,23 @@ var concatArrays = (t, n) => {
|
|
|
2165
2151
|
function cn(...t) {
|
|
2166
2152
|
return twMerge(clsx(t));
|
|
2167
2153
|
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
let n = (0, import_compiler_runtime$30.c)(10), i, s, c;
|
|
2186
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3]) : ({className: i, ref: c, ...s} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c);
|
|
2187
|
-
let l;
|
|
2188
|
-
n[4] === i ? l = n[5] : (l = cn("flex size-full items-center justify-center", i), n[4] = i, n[5] = l);
|
|
2189
|
-
let u;
|
|
2190
|
-
return n[6] !== s || n[7] !== c || n[8] !== l ? (u = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback$1, {
|
|
2191
|
-
className: l,
|
|
2192
|
-
"data-slot": "avatar-fallback",
|
|
2193
|
-
ref: c,
|
|
2194
|
-
...s
|
|
2195
|
-
}), n[6] = s, n[7] = c, n[8] = l, n[9] = u) : u = n[9], u;
|
|
2196
|
-
};
|
|
2197
|
-
var import_compiler_runtime$29 = require_compiler_runtime();
|
|
2198
|
-
const AvatarImage = (t) => {
|
|
2199
|
-
let n = (0, import_compiler_runtime$29.c)(10), i, s, c;
|
|
2200
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3]) : ({className: i, ref: c, ...s} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c);
|
|
2201
|
-
let l;
|
|
2202
|
-
n[4] === i ? l = n[5] : (l = cn("size-full object-cover", i), n[4] = i, n[5] = l);
|
|
2203
|
-
let u;
|
|
2204
|
-
return n[6] !== s || n[7] !== c || n[8] !== l ? (u = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarImage$1, {
|
|
2205
|
-
className: l,
|
|
2206
|
-
"data-slot": "avatar-image",
|
|
2207
|
-
ref: c,
|
|
2208
|
-
...s
|
|
2209
|
-
}), n[6] = s, n[7] = c, n[8] = l, n[9] = u) : u = n[9], u;
|
|
2210
|
-
};
|
|
2154
|
+
const Avatar = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarRoot, {
|
|
2155
|
+
className: cn("raised-2 inline-flex size-xl select-none items-center justify-center overflow-hidden rounded-full bg-surface-container align-middle font-medium", t),
|
|
2156
|
+
"data-slot": "avatar",
|
|
2157
|
+
ref: i,
|
|
2158
|
+
...s,
|
|
2159
|
+
children: n
|
|
2160
|
+
}), AvatarFallback = ({ className: t, ref: n, ...i }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback$1, {
|
|
2161
|
+
className: cn("flex size-full items-center justify-center", t),
|
|
2162
|
+
"data-slot": "avatar-fallback",
|
|
2163
|
+
ref: n,
|
|
2164
|
+
...i
|
|
2165
|
+
}), AvatarImage = ({ className: t, ref: n, ...i }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarImage$1, {
|
|
2166
|
+
className: cn("size-full object-cover", t),
|
|
2167
|
+
"data-slot": "avatar-image",
|
|
2168
|
+
ref: n,
|
|
2169
|
+
...i
|
|
2170
|
+
});
|
|
2211
2171
|
var falsyToString = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t;
|
|
2212
2172
|
const cx = clsx, cva = (t, n) => (i) => {
|
|
2213
2173
|
if (n?.variants == null) return cx(t, i?.class, i?.className);
|
|
@@ -2334,26 +2294,17 @@ const cx = clsx, cva = (t, n) => (i) => {
|
|
|
2334
2294
|
className: "outline-warning text-warning"
|
|
2335
2295
|
}
|
|
2336
2296
|
]
|
|
2337
|
-
})
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
})), n[8] = s, n[9] = l, n[10] = d, n[11] = f, n[12] = m) : m = n[12];
|
|
2349
|
-
let h;
|
|
2350
|
-
return n[13] !== i || n[14] !== c || n[15] !== u || n[16] !== m ? (h = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2351
|
-
className: m,
|
|
2352
|
-
ref: u,
|
|
2353
|
-
...c,
|
|
2354
|
-
children: i
|
|
2355
|
-
}), n[13] = i, n[14] = c, n[15] = u, n[16] = m, n[17] = h) : h = n[17], h;
|
|
2356
|
-
}, buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-full select-none transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer", {
|
|
2297
|
+
}), Badge = ({ className: t, tone: n, style: i, radius: s, children: c, ref: l, ...u }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2298
|
+
className: cn(badgeVariants({
|
|
2299
|
+
className: t,
|
|
2300
|
+
tone: n,
|
|
2301
|
+
style: i,
|
|
2302
|
+
radius: s
|
|
2303
|
+
})),
|
|
2304
|
+
ref: l,
|
|
2305
|
+
...u,
|
|
2306
|
+
children: c
|
|
2307
|
+
}), buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-full select-none transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer", {
|
|
2357
2308
|
variants: {
|
|
2358
2309
|
tone: {
|
|
2359
2310
|
destructive: "",
|
|
@@ -2870,23 +2821,17 @@ const Badge = (t) => {
|
|
|
2870
2821
|
}
|
|
2871
2822
|
]
|
|
2872
2823
|
});
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
})
|
|
2884
|
-
let m;
|
|
2885
|
-
return n[12] !== i || n[13] !== c || n[14] !== f ? (m = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2886
|
-
className: f,
|
|
2887
|
-
...c,
|
|
2888
|
-
children: i
|
|
2889
|
-
}), n[12] = i, n[13] = c, n[14] = f, n[15] = m) : m = n[15], m;
|
|
2824
|
+
function Button({ className: t, children: n, tone: i, style: s, size: c, ...l }) {
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2826
|
+
className: cn(buttonVariants({
|
|
2827
|
+
tone: i,
|
|
2828
|
+
style: s,
|
|
2829
|
+
size: c,
|
|
2830
|
+
className: t
|
|
2831
|
+
})),
|
|
2832
|
+
...l,
|
|
2833
|
+
children: n
|
|
2834
|
+
});
|
|
2890
2835
|
}
|
|
2891
2836
|
function useControlled({ controlled: n, default: i, name: s, state: c = "value" }) {
|
|
2892
2837
|
let { current: l } = React.useRef(n !== void 0), [u, d] = React.useState(i), f = l ? n : u;
|
|
@@ -3372,16 +3317,16 @@ function useValueChanged(n, i) {
|
|
|
3372
3317
|
}, [n]);
|
|
3373
3318
|
}
|
|
3374
3319
|
const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
3375
|
-
let { checked: s, className: c, defaultChecked: l = !1, disabled: u = !1, id: d, indeterminate: f = !1, inputRef: m, name: h, onCheckedChange: g, parent: _ = !1, readOnly: v = !1, render: y, required: b = !1, uncheckedValue: x, value: S, nativeButton: C = !1, ...w } = n, { clearErrors: T } = useFormContext(), { disabled: E, name: D, setDirty: O, setFilled:
|
|
3376
|
-
K ? Q = _ ? Z : `${
|
|
3320
|
+
let { checked: s, className: c, defaultChecked: l = !1, disabled: u = !1, id: d, indeterminate: f = !1, inputRef: m, name: h, onCheckedChange: g, parent: _ = !1, readOnly: v = !1, render: y, required: b = !1, uncheckedValue: x, value: S, nativeButton: C = !1, ...w } = n, { clearErrors: T } = useFormContext(), { disabled: E, name: D, setDirty: O, setFilled: A, setFocused: j, setTouched: M, state: N, validationMode: P, validityData: F, shouldValidateOnChange: I, validation: L } = useFieldRootContext(), R = useFieldItemContext(), { labelId: z, controlId: B, setControlId: V, getDescriptionProps: H } = useLabelableContext(), W = useCheckboxGroupContext(), G = W?.parent, K = G && W.allValues, q = E || R.disabled || W?.disabled || u, J = D ?? h, Y = S ?? J, X = useBaseUiId(), Z = useBaseUiId(), Q = B;
|
|
3321
|
+
K ? Q = _ ? Z : `${G.id}-${Y}` : d && (Q = d);
|
|
3377
3322
|
let $ = {};
|
|
3378
|
-
K && (_ ? $ =
|
|
3379
|
-
let
|
|
3323
|
+
K && (_ ? $ = W.parent.getParentProps() : Y && ($ = W.parent.getChildProps(Y)));
|
|
3324
|
+
let Nm = useStableCallback(g), { checked: Fm = s, indeterminate: Im = f, onCheckedChange: Lm, ...zm } = $, Bm = W?.value, Vm = W?.setValue, Hm = W?.defaultValue, Um = React.useRef(null), { getButtonProps: Wm, buttonRef: Gm } = useButton({
|
|
3380
3325
|
disabled: q,
|
|
3381
3326
|
native: C
|
|
3382
|
-
}),
|
|
3383
|
-
controlled: Y &&
|
|
3384
|
-
default: Y &&
|
|
3327
|
+
}), Km = W?.validation ?? L, [Jm, Ym] = useControlled({
|
|
3328
|
+
controlled: Y && Bm && !_ ? Bm.includes(Y) : Fm,
|
|
3329
|
+
default: Y && Hm && !_ ? Hm.includes(Y) : l,
|
|
3385
3330
|
name: "Checkbox",
|
|
3386
3331
|
state: "checked"
|
|
3387
3332
|
});
|
|
@@ -3391,35 +3336,35 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
3391
3336
|
};
|
|
3392
3337
|
}, [
|
|
3393
3338
|
Q,
|
|
3394
|
-
|
|
3339
|
+
W,
|
|
3395
3340
|
V,
|
|
3396
3341
|
_
|
|
3397
3342
|
]), useField({
|
|
3398
|
-
enabled: !
|
|
3343
|
+
enabled: !W,
|
|
3399
3344
|
id: X,
|
|
3400
|
-
commit:
|
|
3401
|
-
value:
|
|
3402
|
-
controlRef:
|
|
3345
|
+
commit: Km.commit,
|
|
3346
|
+
value: Jm,
|
|
3347
|
+
controlRef: Um,
|
|
3403
3348
|
name: J,
|
|
3404
|
-
getValue: () =>
|
|
3349
|
+
getValue: () => Jm
|
|
3405
3350
|
});
|
|
3406
|
-
let
|
|
3351
|
+
let Xm = React.useRef(null), Zm = useMergedRefs(m, Xm, Km.inputRef);
|
|
3407
3352
|
useIsoLayoutEffect(() => {
|
|
3408
|
-
|
|
3353
|
+
Xm.current && (Xm.current.indeterminate = Im, Jm && A(!0));
|
|
3409
3354
|
}, [
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
]), useValueChanged(
|
|
3414
|
-
|
|
3355
|
+
Jm,
|
|
3356
|
+
Im,
|
|
3357
|
+
A
|
|
3358
|
+
]), useValueChanged(Jm, () => {
|
|
3359
|
+
W && !_ || (T(J), A(Jm), O(Jm !== F.initialValue), I() ? Km.commit(Jm) : Km.commit(Jm, !0));
|
|
3415
3360
|
});
|
|
3416
|
-
let
|
|
3417
|
-
checked:
|
|
3361
|
+
let Qm = mergeProps({
|
|
3362
|
+
checked: Jm,
|
|
3418
3363
|
disabled: q,
|
|
3419
3364
|
name: _ ? void 0 : J,
|
|
3420
3365
|
id: Q ?? void 0,
|
|
3421
3366
|
required: b,
|
|
3422
|
-
ref:
|
|
3367
|
+
ref: Zm,
|
|
3423
3368
|
style: visuallyHidden,
|
|
3424
3369
|
tabIndex: -1,
|
|
3425
3370
|
type: "checkbox",
|
|
@@ -3427,79 +3372,79 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
3427
3372
|
onChange(t) {
|
|
3428
3373
|
if (t.nativeEvent.defaultPrevented) return;
|
|
3429
3374
|
let n = t.target.checked, i = createChangeEventDetails(none, t.nativeEvent);
|
|
3430
|
-
|
|
3375
|
+
Lm?.(n, i), Nm(n, i), !i.isCanceled && (Ym(n), Y && Bm && Vm && !_ && Vm(n ? [...Bm, Y] : Bm.filter((t) => t !== Y), i));
|
|
3431
3376
|
},
|
|
3432
3377
|
onFocus() {
|
|
3433
|
-
|
|
3378
|
+
Um.current?.focus();
|
|
3434
3379
|
}
|
|
3435
|
-
}, S === void 0 ? EMPTY_OBJECT : { value: (
|
|
3380
|
+
}, S === void 0 ? EMPTY_OBJECT : { value: (W ? Jm && S : S) || "" }, H, W ? Km.getValidationProps : Km.getInputValidationProps), $m = K ? !!Fm : Jm, eh = K && Im || f;
|
|
3436
3381
|
React.useEffect(() => {
|
|
3437
|
-
|
|
3382
|
+
G && Y && G.disabledStatesRef.current.set(Y, q);
|
|
3438
3383
|
}, [
|
|
3439
|
-
|
|
3384
|
+
G,
|
|
3440
3385
|
q,
|
|
3441
3386
|
Y
|
|
3442
3387
|
]);
|
|
3443
|
-
let
|
|
3388
|
+
let th = React.useMemo(() => ({
|
|
3444
3389
|
...N,
|
|
3445
|
-
checked:
|
|
3390
|
+
checked: $m,
|
|
3446
3391
|
disabled: q,
|
|
3447
3392
|
readOnly: v,
|
|
3448
3393
|
required: b,
|
|
3449
|
-
indeterminate:
|
|
3394
|
+
indeterminate: eh
|
|
3450
3395
|
}), [
|
|
3451
3396
|
N,
|
|
3452
|
-
|
|
3397
|
+
$m,
|
|
3453
3398
|
q,
|
|
3454
3399
|
v,
|
|
3455
3400
|
b,
|
|
3456
|
-
|
|
3457
|
-
]),
|
|
3458
|
-
state:
|
|
3401
|
+
eh
|
|
3402
|
+
]), nh = useStateAttributesMapping(th), rh = useRenderElement("span", n, {
|
|
3403
|
+
state: th,
|
|
3459
3404
|
ref: [
|
|
3460
|
-
|
|
3461
|
-
|
|
3405
|
+
Gm,
|
|
3406
|
+
Um,
|
|
3462
3407
|
i,
|
|
3463
|
-
|
|
3408
|
+
W?.registerControlRef
|
|
3464
3409
|
],
|
|
3465
3410
|
props: [
|
|
3466
3411
|
{
|
|
3467
3412
|
id: X,
|
|
3468
3413
|
role: "checkbox",
|
|
3469
|
-
"aria-checked":
|
|
3414
|
+
"aria-checked": Im ? "mixed" : Jm,
|
|
3470
3415
|
"aria-readonly": v || void 0,
|
|
3471
3416
|
"aria-required": b || void 0,
|
|
3472
3417
|
"aria-labelledby": z,
|
|
3473
3418
|
"data-parent": _ ? "" : void 0,
|
|
3474
3419
|
onFocus() {
|
|
3475
|
-
|
|
3420
|
+
j(!0);
|
|
3476
3421
|
},
|
|
3477
3422
|
onBlur() {
|
|
3478
|
-
let t =
|
|
3479
|
-
t && (M(!0),
|
|
3423
|
+
let t = Xm.current;
|
|
3424
|
+
t && (M(!0), j(!1), P === "onBlur" && Km.commit(W ? Bm : t.checked));
|
|
3480
3425
|
},
|
|
3481
3426
|
onClick(t) {
|
|
3482
|
-
v || q || (t.preventDefault(),
|
|
3427
|
+
v || q || (t.preventDefault(), Xm.current?.click());
|
|
3483
3428
|
}
|
|
3484
3429
|
},
|
|
3485
3430
|
H,
|
|
3486
|
-
|
|
3431
|
+
Km.getValidationProps,
|
|
3487
3432
|
w,
|
|
3488
|
-
|
|
3489
|
-
|
|
3433
|
+
zm,
|
|
3434
|
+
Wm
|
|
3490
3435
|
],
|
|
3491
|
-
stateAttributesMapping:
|
|
3436
|
+
stateAttributesMapping: nh
|
|
3492
3437
|
});
|
|
3493
3438
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxRootContext.Provider, {
|
|
3494
|
-
value:
|
|
3439
|
+
value: th,
|
|
3495
3440
|
children: [
|
|
3496
|
-
|
|
3497
|
-
!
|
|
3441
|
+
rh,
|
|
3442
|
+
!Jm && !W && J && !_ && x !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
3498
3443
|
type: "hidden",
|
|
3499
3444
|
name: J,
|
|
3500
3445
|
value: x
|
|
3501
3446
|
}),
|
|
3502
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...Qm })
|
|
3503
3448
|
]
|
|
3504
3449
|
});
|
|
3505
3450
|
});
|
|
@@ -3746,47 +3691,24 @@ var e = React.forwardRef((n, i) => /* @__PURE__ */ React.createElement(p, {
|
|
|
3746
3691
|
weights: a
|
|
3747
3692
|
}));
|
|
3748
3693
|
e.displayName = "XIcon";
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
}
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
let m;
|
|
3768
|
-
n[9] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(o$1, { weight: "bold" }) }), n[9] = m) : m = n[9];
|
|
3769
|
-
let h;
|
|
3770
|
-
n[10] !== s || n[11] !== c || n[12] !== u || n[13] !== d || n[14] !== f ? (h = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxRoot, {
|
|
3771
|
-
className: f,
|
|
3772
|
-
disabled: s,
|
|
3773
|
-
id: c,
|
|
3774
|
-
ref: d,
|
|
3775
|
-
...u,
|
|
3776
|
-
children: m
|
|
3777
|
-
}), n[10] = s, n[11] = c, n[12] = u, n[13] = d, n[14] = f, n[15] = h) : h = n[15];
|
|
3778
|
-
let g;
|
|
3779
|
-
n[16] !== s || n[17] !== c || n[18] !== l ? (g = l && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
3780
|
-
className: cn("body-base cursor-pointer", s && "cursor-not-allowed text-text-neutral-primary-disabled"),
|
|
3781
|
-
htmlFor: c,
|
|
3782
|
-
children: l
|
|
3783
|
-
}), n[16] = s, n[17] = c, n[18] = l, n[19] = g) : g = n[19];
|
|
3784
|
-
let _;
|
|
3785
|
-
return n[20] !== h || n[21] !== g ? (_ = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3786
|
-
className: "flex items-center gap-2",
|
|
3787
|
-
children: [h, g]
|
|
3788
|
-
}), n[20] = h, n[21] = g, n[22] = _) : _ = n[22], _;
|
|
3789
|
-
}, DialogRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
3694
|
+
const CheckboxIndicator = ({ className: t, ...n }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicator$1, {
|
|
3695
|
+
className: cn("flex", t),
|
|
3696
|
+
...n
|
|
3697
|
+
}), Checkbox = ({ className: t, ref: n, label: i, id: s, disabled: c, ...l }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3698
|
+
className: "flex items-center gap-2",
|
|
3699
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxRoot, {
|
|
3700
|
+
className: cn("data-checked:raised-1 inset-shadow-1-shadow flex size-md items-center justify-center rounded-sm bg-surface-dim text-on-accent transition-colors hover:cursor-pointer hover:disabled:cursor-not-allowed data-checked:bg-accent", t),
|
|
3701
|
+
disabled: c,
|
|
3702
|
+
id: s,
|
|
3703
|
+
ref: n,
|
|
3704
|
+
...l,
|
|
3705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(o$1, { weight: "bold" }) })
|
|
3706
|
+
}), i && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
3707
|
+
className: cn("body-base cursor-pointer", c && "cursor-not-allowed text-text-neutral-primary-disabled"),
|
|
3708
|
+
htmlFor: s,
|
|
3709
|
+
children: i
|
|
3710
|
+
})]
|
|
3711
|
+
}), DialogRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
3790
3712
|
process.env.NODE_ENV !== "production" && (DialogRootContext.displayName = "DialogRootContext");
|
|
3791
3713
|
function useDialogRootContext(n) {
|
|
3792
3714
|
let i = React.useContext(DialogRootContext);
|
|
@@ -4747,7 +4669,7 @@ function handleTabIndex(t, n) {
|
|
|
4747
4669
|
n.current.includes("floating") || s.length === 0 ? c !== "0" && t.setAttribute("tabindex", "0") : (c !== "-1" || t.hasAttribute("data-tabindex") && t.getAttribute("data-tabindex") !== "-1") && (t.setAttribute("tabindex", "-1"), t.setAttribute("data-tabindex", "-1"));
|
|
4748
4670
|
}
|
|
4749
4671
|
function FloatingFocusManager(n) {
|
|
4750
|
-
let { context: i, children: s, disabled: c = !1, order: l = ["content"], initialFocus: u = !0, returnFocus: d = !0, restoreFocus: f = !1, modal: m = !0, closeOnFocusOut: h = !0, openInteractionType: g = "", getInsideElements: _ = () => [], nextFocusableElement: v, previousFocusableElement: y, beforeContentFocusGuardRef: b, externalTree: x } = n, S = "rootStore" in i ? i.rootStore : i, C = S.useState("open"), w = S.useState("domReferenceElement"), T = S.useState("floatingElement"), { events: E, dataRef: D } = S.context, O = useStableCallback(() => D.current.floatingContext?.nodeId),
|
|
4672
|
+
let { context: i, children: s, disabled: c = !1, order: l = ["content"], initialFocus: u = !0, returnFocus: d = !0, restoreFocus: f = !1, modal: m = !0, closeOnFocusOut: h = !0, openInteractionType: g = "", getInsideElements: _ = () => [], nextFocusableElement: v, previousFocusableElement: y, beforeContentFocusGuardRef: b, externalTree: x } = n, S = "rootStore" in i ? i.rootStore : i, C = S.useState("open"), w = S.useState("domReferenceElement"), T = S.useState("floatingElement"), { events: E, dataRef: D } = S.context, O = useStableCallback(() => D.current.floatingContext?.nodeId), A = useStableCallback(_), j = u === !1, M = isTypeableCombobox(w) && j, N = useValueAsRef(l), P = useValueAsRef(u), F = useValueAsRef(d), I = useValueAsRef(g), L = useFloatingTree(x), R = usePortalContext(), z = React.useRef(null), B = React.useRef(null), V = React.useRef(!1), H = React.useRef(!1), U = React.useRef(!1), W = React.useRef(-1), G = React.useRef(""), K = React.useRef(""), q = useTimeout(), J = useTimeout(), Y = useAnimationFrame(), X = R != null, Z = getFloatingFocusElement(T), Q = useStableCallback((t = Z) => t ? tabbable(t, getTabbableOptions()) : []), $ = useStableCallback((t) => {
|
|
4751
4673
|
let n = Q(t);
|
|
4752
4674
|
return N.current.map(() => n).filter(Boolean).flat();
|
|
4753
4675
|
});
|
|
@@ -4870,18 +4792,18 @@ function FloatingFocusManager(n) {
|
|
|
4870
4792
|
J,
|
|
4871
4793
|
Y
|
|
4872
4794
|
]);
|
|
4873
|
-
let
|
|
4795
|
+
let Mm = React.useRef(null), Nm = React.useRef(null), Pm = useMergedRefs(Mm, b, R?.beforeInsideRef), Fm = useMergedRefs(Nm, R?.afterInsideRef);
|
|
4874
4796
|
React.useEffect(() => {
|
|
4875
4797
|
if (c || !T || !C) return;
|
|
4876
4798
|
let t = Array.from(R?.portalNode?.querySelectorAll(`[${createAttribute("portal")}]`) || []), n = markOthers([
|
|
4877
4799
|
T,
|
|
4878
4800
|
(L ? getNodeAncestors(L.nodesRef.current, O()) : []).find((t) => isTypeableCombobox(t.context?.elements.domReference || null))?.context?.elements.domReference,
|
|
4879
4801
|
...t,
|
|
4880
|
-
...
|
|
4802
|
+
...A(),
|
|
4881
4803
|
z.current,
|
|
4882
4804
|
B.current,
|
|
4883
|
-
|
|
4884
|
-
|
|
4805
|
+
Mm.current,
|
|
4806
|
+
Nm.current,
|
|
4885
4807
|
R?.beforeOutsideRef.current,
|
|
4886
4808
|
R?.afterOutsideRef.current,
|
|
4887
4809
|
resolveRef(y),
|
|
@@ -4902,7 +4824,7 @@ function FloatingFocusManager(n) {
|
|
|
4902
4824
|
M,
|
|
4903
4825
|
L,
|
|
4904
4826
|
O,
|
|
4905
|
-
|
|
4827
|
+
A,
|
|
4906
4828
|
v,
|
|
4907
4829
|
y
|
|
4908
4830
|
]), useIsoLayoutEffect(() => {
|
|
@@ -4918,7 +4840,7 @@ function FloatingFocusManager(n) {
|
|
|
4918
4840
|
c,
|
|
4919
4841
|
C,
|
|
4920
4842
|
Z,
|
|
4921
|
-
|
|
4843
|
+
j,
|
|
4922
4844
|
$,
|
|
4923
4845
|
P,
|
|
4924
4846
|
I
|
|
@@ -5012,11 +4934,11 @@ function FloatingFocusManager(n) {
|
|
|
5012
4934
|
Z,
|
|
5013
4935
|
N
|
|
5014
4936
|
]);
|
|
5015
|
-
let
|
|
4937
|
+
let Im = !c && (m ? !M : !0) && (X || m);
|
|
5016
4938
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(React.Fragment, { children: [
|
|
5017
|
-
|
|
4939
|
+
Im && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGuard, {
|
|
5018
4940
|
"data-type": "inside",
|
|
5019
|
-
ref:
|
|
4941
|
+
ref: Pm,
|
|
5020
4942
|
onFocus: (t) => {
|
|
5021
4943
|
if (m) {
|
|
5022
4944
|
let t = $();
|
|
@@ -5025,9 +4947,9 @@ function FloatingFocusManager(n) {
|
|
|
5025
4947
|
}
|
|
5026
4948
|
}),
|
|
5027
4949
|
s,
|
|
5028
|
-
|
|
4950
|
+
Im && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGuard, {
|
|
5029
4951
|
"data-type": "inside",
|
|
5030
|
-
ref:
|
|
4952
|
+
ref: Fm,
|
|
5031
4953
|
onFocus: (t) => {
|
|
5032
4954
|
m ? enqueueFocus($()[0]) : R?.portalNode && (h && (V.current = !0), isOutsideEvent(t, R.portalNode) ? getPreviousTabbable(w)?.focus() : resolveRef(v ?? R.afterOutsideRef)?.focus());
|
|
5033
4955
|
}
|
|
@@ -6470,101 +6392,15 @@ const createSelector = (t, n, i, s, c, l, ...u) => {
|
|
|
6470
6392
|
};
|
|
6471
6393
|
/**
|
|
6472
6394
|
* @license React
|
|
6473
|
-
* use-sync-external-store-shim.production.js
|
|
6395
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
6474
6396
|
*
|
|
6475
6397
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6476
6398
|
*
|
|
6477
6399
|
* This source code is licensed under the MIT license found in the
|
|
6478
6400
|
* LICENSE file in the root directory of this source tree.
|
|
6479
6401
|
*/
|
|
6480
|
-
var
|
|
6481
|
-
var n = __require("react");
|
|
6482
|
-
function i(t, n) {
|
|
6483
|
-
return t === n && (t !== 0 || 1 / t == 1 / n) || t !== t && n !== n;
|
|
6484
|
-
}
|
|
6485
|
-
var s = typeof Object.is == "function" ? Object.is : i, c = n.useState, l = n.useEffect, u = n.useLayoutEffect, d = n.useDebugValue;
|
|
6486
|
-
function f(t, n) {
|
|
6487
|
-
var i = n(), s = c({ inst: {
|
|
6488
|
-
value: i,
|
|
6489
|
-
getSnapshot: n
|
|
6490
|
-
} }), f = s[0].inst, h = s[1];
|
|
6491
|
-
return u(function() {
|
|
6492
|
-
f.value = i, f.getSnapshot = n, m(f) && h({ inst: f });
|
|
6493
|
-
}, [
|
|
6494
|
-
t,
|
|
6495
|
-
i,
|
|
6496
|
-
n
|
|
6497
|
-
]), l(function() {
|
|
6498
|
-
return m(f) && h({ inst: f }), t(function() {
|
|
6499
|
-
m(f) && h({ inst: f });
|
|
6500
|
-
});
|
|
6501
|
-
}, [t]), d(i), i;
|
|
6502
|
-
}
|
|
6503
|
-
function m(t) {
|
|
6504
|
-
var n = t.getSnapshot;
|
|
6505
|
-
t = t.value;
|
|
6506
|
-
try {
|
|
6507
|
-
var i = n();
|
|
6508
|
-
return !s(t, i);
|
|
6509
|
-
} catch {
|
|
6510
|
-
return !0;
|
|
6511
|
-
}
|
|
6512
|
-
}
|
|
6513
|
-
function h(t, n) {
|
|
6514
|
-
return n();
|
|
6515
|
-
}
|
|
6516
|
-
var g = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? h : f;
|
|
6517
|
-
t.useSyncExternalStore = n.useSyncExternalStore === void 0 ? g : n.useSyncExternalStore;
|
|
6518
|
-
})), require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((t) => {
|
|
6519
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
6520
|
-
function n(t, n) {
|
|
6521
|
-
return t === n && (t !== 0 || 1 / t == 1 / n) || t !== t && n !== n;
|
|
6522
|
-
}
|
|
6523
|
-
function i(t, n) {
|
|
6524
|
-
g || l.startTransition === void 0 || (g = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
6525
|
-
var i = n();
|
|
6526
|
-
if (!_) {
|
|
6527
|
-
var c = n();
|
|
6528
|
-
u(i, c) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), _ = !0);
|
|
6529
|
-
}
|
|
6530
|
-
c = d({ inst: {
|
|
6531
|
-
value: i,
|
|
6532
|
-
getSnapshot: n
|
|
6533
|
-
} });
|
|
6534
|
-
var v = c[0].inst, y = c[1];
|
|
6535
|
-
return m(function() {
|
|
6536
|
-
v.value = i, v.getSnapshot = n, s(v) && y({ inst: v });
|
|
6537
|
-
}, [
|
|
6538
|
-
t,
|
|
6539
|
-
i,
|
|
6540
|
-
n
|
|
6541
|
-
]), f(function() {
|
|
6542
|
-
return s(v) && y({ inst: v }), t(function() {
|
|
6543
|
-
s(v) && y({ inst: v });
|
|
6544
|
-
});
|
|
6545
|
-
}, [t]), h(i), i;
|
|
6546
|
-
}
|
|
6547
|
-
function s(t) {
|
|
6548
|
-
var n = t.getSnapshot;
|
|
6549
|
-
t = t.value;
|
|
6550
|
-
try {
|
|
6551
|
-
var i = n();
|
|
6552
|
-
return !u(t, i);
|
|
6553
|
-
} catch {
|
|
6554
|
-
return !0;
|
|
6555
|
-
}
|
|
6556
|
-
}
|
|
6557
|
-
function c(t, n) {
|
|
6558
|
-
return n();
|
|
6559
|
-
}
|
|
6560
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
6561
|
-
var l = __require("react"), u = typeof Object.is == "function" ? Object.is : n, d = l.useState, f = l.useEffect, m = l.useLayoutEffect, h = l.useDebugValue, g = !1, _ = !1, v = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? c : i;
|
|
6562
|
-
t.useSyncExternalStore = l.useSyncExternalStore === void 0 ? v : l.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
6563
|
-
})();
|
|
6564
|
-
})), require_shim = /* @__PURE__ */ __commonJSMin(((t, n) => {
|
|
6565
|
-
process.env.NODE_ENV === "production" ? n.exports = require_use_sync_external_store_shim_production() : n.exports = require_use_sync_external_store_shim_development();
|
|
6566
|
-
})), require_with_selector_production = /* @__PURE__ */ __commonJSMin(((t) => {
|
|
6567
|
-
var n = __require("react"), i = require_shim();
|
|
6402
|
+
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((t) => {
|
|
6403
|
+
var n = __require("react"), i = __require("use-sync-external-store/shim");
|
|
6568
6404
|
function s(t, n) {
|
|
6569
6405
|
return t === n && (t !== 0 || 1 / t == 1 / n) || t !== t && n !== n;
|
|
6570
6406
|
}
|
|
@@ -6614,7 +6450,7 @@ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJS
|
|
|
6614
6450
|
return t === n && (t !== 0 || 1 / t == 1 / n) || t !== t && n !== n;
|
|
6615
6451
|
}
|
|
6616
6452
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
6617
|
-
var i = __require("react"), s =
|
|
6453
|
+
var i = __require("react"), s = __require("use-sync-external-store/shim"), c = typeof Object.is == "function" ? Object.is : n, l = s.useSyncExternalStore, u = i.useRef, d = i.useEffect, f = i.useMemo, m = i.useDebugValue;
|
|
6618
6454
|
t.useSyncExternalStoreWithSelector = function(t, n, i, s, h) {
|
|
6619
6455
|
var g = u(null);
|
|
6620
6456
|
if (g.current === null) {
|
|
@@ -6657,7 +6493,7 @@ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJS
|
|
|
6657
6493
|
})();
|
|
6658
6494
|
})), require_with_selector = /* @__PURE__ */ __commonJSMin(((t, n) => {
|
|
6659
6495
|
process.env.NODE_ENV === "production" ? n.exports = require_with_selector_production() : n.exports = require_with_selector_development();
|
|
6660
|
-
})),
|
|
6496
|
+
})), import_with_selector$1 = require_with_selector(), useStoreImplementation = isReactVersionAtLeast(19) ? useStoreR19 : useStoreLegacy;
|
|
6661
6497
|
function useStore$1(t, n, i, s, c) {
|
|
6662
6498
|
return useStoreImplementation(t, n, i, s, c);
|
|
6663
6499
|
}
|
|
@@ -6669,7 +6505,7 @@ function useStoreR19(n, i, s, c, l) {
|
|
|
6669
6505
|
c,
|
|
6670
6506
|
l
|
|
6671
6507
|
]);
|
|
6672
|
-
return
|
|
6508
|
+
return useSyncExternalStore(n.subscribe, u, u);
|
|
6673
6509
|
}
|
|
6674
6510
|
function useStoreLegacy(t, n, i, s, c) {
|
|
6675
6511
|
return (0, import_with_selector$1.useSyncExternalStoreWithSelector)(t.subscribe, t.getSnapshot, t.getSnapshot, (t) => n(t, i, s, c));
|
|
@@ -8150,12 +7986,12 @@ const DialogTrigger$1 = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
8150
7986
|
let v = useBaseUiId(d), y = _.useState("floatingRootContext"), b = _.useState("isOpenedByTrigger", v), x = React.useRef(null), { registerTrigger: S, isMountedByThisTrigger: C } = useTriggerDataForwarding(v, x, _, { payload: f }), { getButtonProps: w, buttonRef: T } = useButton({
|
|
8151
7987
|
disabled: l,
|
|
8152
7988
|
native: u
|
|
8153
|
-
}),
|
|
7989
|
+
}), D = useInteractions([useClick(y, { enabled: y != null })]), O = React.useMemo(() => ({
|
|
8154
7990
|
disabled: l,
|
|
8155
7991
|
open: b
|
|
8156
7992
|
}), [l, b]), k = _.useState("triggerProps", C);
|
|
8157
7993
|
return useRenderElement("button", n, {
|
|
8158
|
-
state:
|
|
7994
|
+
state: O,
|
|
8159
7995
|
ref: [
|
|
8160
7996
|
T,
|
|
8161
7997
|
i,
|
|
@@ -8163,7 +7999,7 @@ const DialogTrigger$1 = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
8163
7999
|
x
|
|
8164
8000
|
],
|
|
8165
8001
|
props: [
|
|
8166
|
-
|
|
8002
|
+
D.getReferenceProps(),
|
|
8167
8003
|
k,
|
|
8168
8004
|
{
|
|
8169
8005
|
"data-base-ui-click-trigger": "",
|
|
@@ -8176,99 +8012,40 @@ const DialogTrigger$1 = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
8176
8012
|
});
|
|
8177
8013
|
});
|
|
8178
8014
|
process.env.NODE_ENV !== "production" && (DialogTrigger$1.displayName = "DialogTrigger");
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
return n[2] === i ? s = n[3] : (s = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, { ...i }), n[2] = i, n[3] = s), s;
|
|
8185
|
-
};
|
|
8186
|
-
var import_compiler_runtime$23 = require_compiler_runtime();
|
|
8187
|
-
const DialogClose = (t) => {
|
|
8188
|
-
let n = (0, import_compiler_runtime$23.c)(13), i, s, c, l;
|
|
8189
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4]) : ({className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l);
|
|
8190
|
-
let u;
|
|
8191
|
-
n[5] === s ? u = n[6] : (u = cn("", s), n[5] = s, n[6] = u);
|
|
8192
|
-
let d;
|
|
8193
|
-
n[7] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
8015
|
+
const Dialog = ({ ...t }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, { ...t }), DialogClose = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogClose$1, {
|
|
8016
|
+
className: cn("", t),
|
|
8017
|
+
ref: i,
|
|
8018
|
+
...s,
|
|
8019
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
8194
8020
|
style: "ghost",
|
|
8195
8021
|
tone: "neutral",
|
|
8196
8022
|
children: "Close"
|
|
8197
|
-
}),
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
let n = (0, import_compiler_runtime$22.c)(12), i, s, c, l;
|
|
8210
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4]) : ({className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l);
|
|
8211
|
-
let u;
|
|
8212
|
-
n[5] === s ? u = n[6] : (u = cn("mb-0 text-prose-0", s), n[5] = s, n[6] = u);
|
|
8213
|
-
let d;
|
|
8214
|
-
return n[7] !== i || n[8] !== c || n[9] !== l || n[10] !== u ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescription$1, {
|
|
8215
|
-
className: u,
|
|
8216
|
-
ref: l,
|
|
8217
|
-
...c,
|
|
8218
|
-
children: i
|
|
8219
|
-
}), n[7] = i, n[8] = c, n[9] = l, n[10] = u, n[11] = d) : d = n[11], d;
|
|
8220
|
-
};
|
|
8221
|
-
var import_compiler_runtime$21 = require_compiler_runtime();
|
|
8222
|
-
const DialogPopup = (t) => {
|
|
8223
|
-
let n = (0, import_compiler_runtime$21.c)(19), i, s, c, l, u;
|
|
8224
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4], u = n[5]) : ({className: s, children: i, showCloseButton: u, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l, n[5] = u);
|
|
8225
|
-
let d = u === void 0 ? !0 : u, f;
|
|
8226
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogBackdrop, { className: "fixed inset-[0px] min-h-dvh bg-scrim opacity-50 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute" }), n[6] = f) : f = n[6];
|
|
8227
|
-
let m;
|
|
8228
|
-
n[7] === s ? m = n[8] : (m = cn("fixed top-1/2 left-1/2 min-w-1/3 max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 space-y-2xs rounded-lg bg-surface-container px-md py-sm outline-1 outline-outline transition-all duration-150 data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0", s), n[7] = s, n[8] = m);
|
|
8229
|
-
let h;
|
|
8230
|
-
n[9] === d ? h = n[10] : (h = d && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogClose, {}), n[9] = d, n[10] = h);
|
|
8231
|
-
let g;
|
|
8232
|
-
n[11] === h ? g = n[12] : (g = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8023
|
+
}),
|
|
8024
|
+
children: n
|
|
8025
|
+
}), DialogDescription = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescription$1, {
|
|
8026
|
+
className: cn("mb-0 text-prose-0", t),
|
|
8027
|
+
ref: i,
|
|
8028
|
+
...s,
|
|
8029
|
+
children: n
|
|
8030
|
+
}), DialogPopup = ({ className: t, children: n, showCloseButton: i = !0, ref: s, ...c }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogBackdrop, { className: "fixed inset-[0px] min-h-dvh bg-scrim opacity-50 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPopup$1, {
|
|
8031
|
+
className: cn("fixed top-1/2 left-1/2 min-w-1/3 max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 space-y-2xs rounded-lg bg-surface-container px-md py-sm outline-1 outline-outline transition-all duration-150 data-ending-style:scale-90 data-starting-style:scale-90 data-ending-style:opacity-0 data-starting-style:opacity-0", t),
|
|
8032
|
+
ref: s,
|
|
8033
|
+
...c,
|
|
8034
|
+
children: [n, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8233
8035
|
className: "flex justify-end",
|
|
8234
|
-
children:
|
|
8235
|
-
})
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4]) : ({className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l);
|
|
8248
|
-
let u;
|
|
8249
|
-
n[5] === s ? u = n[6] : (u = cn("text-strong-2", s), n[5] = s, n[6] = u);
|
|
8250
|
-
let d;
|
|
8251
|
-
return n[7] !== i || n[8] !== c || n[9] !== l || n[10] !== u ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitle$1, {
|
|
8252
|
-
className: u,
|
|
8253
|
-
ref: l,
|
|
8254
|
-
...c,
|
|
8255
|
-
children: i
|
|
8256
|
-
}), n[7] = i, n[8] = c, n[9] = l, n[10] = u, n[11] = d) : d = n[11], d;
|
|
8257
|
-
};
|
|
8258
|
-
var import_compiler_runtime$19 = require_compiler_runtime();
|
|
8259
|
-
const DialogTrigger = (t) => {
|
|
8260
|
-
let n = (0, import_compiler_runtime$19.c)(12), i, s, c, l;
|
|
8261
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4]) : ({className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l);
|
|
8262
|
-
let u;
|
|
8263
|
-
n[5] === s ? u = n[6] : (u = cn("", s), n[5] = s, n[6] = u);
|
|
8264
|
-
let d;
|
|
8265
|
-
return n[7] !== i || n[8] !== c || n[9] !== l || n[10] !== u ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTrigger$1, {
|
|
8266
|
-
className: u,
|
|
8267
|
-
ref: l,
|
|
8268
|
-
...c,
|
|
8269
|
-
children: i
|
|
8270
|
-
}), n[7] = i, n[8] = c, n[9] = l, n[10] = u, n[11] = d) : d = n[11], d;
|
|
8271
|
-
};
|
|
8036
|
+
children: i && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogClose, {})
|
|
8037
|
+
})]
|
|
8038
|
+
})] }), DialogTitle = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitle$1, {
|
|
8039
|
+
className: cn("text-strong-2", t),
|
|
8040
|
+
ref: i,
|
|
8041
|
+
...s,
|
|
8042
|
+
children: n
|
|
8043
|
+
}), DialogTrigger = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTrigger$1, {
|
|
8044
|
+
className: cn("", t),
|
|
8045
|
+
ref: i,
|
|
8046
|
+
...s,
|
|
8047
|
+
children: n
|
|
8048
|
+
});
|
|
8272
8049
|
var __storeToDerived = /* @__PURE__ */ new WeakMap(), __derivedToStore = /* @__PURE__ */ new WeakMap(), __depsThatHaveWrittenThisTick = { current: [] }, __isFlushing = !1, __batchDepth = 0, __pendingUpdates = /* @__PURE__ */ new Set(), __initialBatchValues = /* @__PURE__ */ new Map();
|
|
8273
8050
|
function __flush_internals(t) {
|
|
8274
8051
|
let n = Array.from(t).sort((t, n) => t instanceof Derived && t.options.deps.includes(n) ? 1 : n instanceof Derived && n.options.deps.includes(t) ? -1 : 0);
|
|
@@ -10077,32 +9854,21 @@ function createFormHook({ fieldComponents: t, fieldContext: n, formContext: i, f
|
|
|
10077
9854
|
withFieldGroup: d
|
|
10078
9855
|
};
|
|
10079
9856
|
}
|
|
10080
|
-
const { fieldContext, useFieldContext, formContext, useFormContext: useFormContext$1 } = createFormHookContexts()
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
className: d,
|
|
10095
|
-
ref: l,
|
|
10096
|
-
...c,
|
|
10097
|
-
children: [i, f]
|
|
10098
|
-
}), n[9] = i, n[10] = c, n[11] = l, n[12] = d, n[13] = f, n[14] = m) : m = n[14], m;
|
|
9857
|
+
const { fieldContext, useFieldContext, formContext, useFormContext: useFormContext$1 } = createFormHookContexts(), FieldErrors = ({ className: t, children: n, ref: i, ...s }) => {
|
|
9858
|
+
let c = useFieldContext();
|
|
9859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
9860
|
+
className: cn("", t),
|
|
9861
|
+
ref: i,
|
|
9862
|
+
...s,
|
|
9863
|
+
children: [n, c.state.meta.errors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
9864
|
+
className: "mt-2",
|
|
9865
|
+
children: c.state.meta.errors.map((t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
9866
|
+
className: "text-error text-sm",
|
|
9867
|
+
children: t.message
|
|
9868
|
+
}, t.message))
|
|
9869
|
+
})]
|
|
9870
|
+
});
|
|
10099
9871
|
};
|
|
10100
|
-
function _temp$1(t) {
|
|
10101
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
10102
|
-
className: "text-error text-sm",
|
|
10103
|
-
children: t.message
|
|
10104
|
-
}, t.message);
|
|
10105
|
-
}
|
|
10106
9872
|
function useLabelableId(t = {}) {
|
|
10107
9873
|
let { id: n, implicit: i = !1, controlRef: s } = t, { controlId: c, setControlId: l } = useLabelableContext(), u = useBaseUiId(n);
|
|
10108
9874
|
return useIsoLayoutEffect(() => {
|
|
@@ -10191,122 +9957,62 @@ const Input$1 = /* @__PURE__ */ React.forwardRef(function(t, n) {
|
|
|
10191
9957
|
});
|
|
10192
9958
|
});
|
|
10193
9959
|
process.env.NODE_ENV !== "production" && (Input$1.displayName = "Input");
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
...c,
|
|
10205
|
-
children: i
|
|
10206
|
-
}), n[7] = i, n[8] = c, n[9] = l, n[10] = u, n[11] = d) : d = n[11], d;
|
|
10207
|
-
};
|
|
10208
|
-
var import_compiler_runtime$16 = require_compiler_runtime();
|
|
10209
|
-
const Input = (t) => {
|
|
10210
|
-
let n = (0, import_compiler_runtime$16.c)(20), s, c, l, u, d;
|
|
10211
|
-
n[0] === t ? (s = n[1], c = n[2], l = n[3], u = n[4], d = n[5]) : ({leadingIcon: c, showSeparator: d, className: s, ref: u, ...l} = t, n[0] = t, n[1] = s, n[2] = c, n[3] = l, n[4] = u, n[5] = d);
|
|
10212
|
-
let f = d === void 0 ? !0 : d, m = l.disabled, h;
|
|
10213
|
-
n[6] === s ? h = n[7] : (h = cn("group inset-shadow-2-shadow flex h-xl w-full items-center gap-xs rounded-xl bg-surface-dim px-md py-sm outline-2 outline-transparent transition-all focus-within:caret-primary focus-within:outline-primary hover:not-focus-within:outline-outline data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 data-[disabled=true]:hover:outline-transparent", s), n[6] = s, n[7] = h);
|
|
10214
|
-
let g = l.disabled, _;
|
|
10215
|
-
n[8] !== c || n[9] !== f ? (_ = c && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
9960
|
+
const Separator = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
9961
|
+
className: cn("", t),
|
|
9962
|
+
ref: i,
|
|
9963
|
+
...s,
|
|
9964
|
+
children: n
|
|
9965
|
+
}), Input = ({ leadingIcon: t, showSeparator: n = !0, className: s, ref: c, ...l }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
9966
|
+
"aria-disabled": l.disabled,
|
|
9967
|
+
className: cn("group inset-shadow-2-shadow flex h-xl w-full items-center gap-xs rounded-xl bg-surface-dim px-md py-sm outline-2 outline-transparent transition-all focus-within:caret-primary focus-within:outline-primary hover:not-focus-within:outline-outline data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 data-[disabled=true]:hover:outline-transparent", s),
|
|
9968
|
+
"data-disabled": l.disabled,
|
|
9969
|
+
children: [t && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
10216
9970
|
className: cn("flex items-center justify-center text-on-surface-variant transition-all group-focus-within:text-primary [&>svg]:size-s"),
|
|
10217
|
-
children: createElement(
|
|
10218
|
-
}),
|
|
9971
|
+
children: createElement(t, { weight: "bold" })
|
|
9972
|
+
}), n && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Separator, {
|
|
10219
9973
|
className: "group-focus-within:bg-primary",
|
|
10220
9974
|
orientation: "vertical"
|
|
10221
|
-
})] }),
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
let y;
|
|
10225
|
-
n[12] !== l || n[13] !== u ? (y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input$1, {
|
|
10226
|
-
className: v,
|
|
10227
|
-
ref: u,
|
|
9975
|
+
})] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input$1, {
|
|
9976
|
+
className: cn("w-full outline-none", "placeholder:opacity-60", "disabled:cursor-not-allowed disabled:text-text-neutral-primary-disabled", "overflow-ellipsis"),
|
|
9977
|
+
ref: c,
|
|
10228
9978
|
...l
|
|
10229
|
-
})
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
className:
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
var import_compiler_runtime$15 = require_compiler_runtime();
|
|
10239
|
-
const FieldInput = (t) => {
|
|
10240
|
-
let n = (0, import_compiler_runtime$15.c)(23), i, s, c, l;
|
|
10241
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4]) : ({className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l);
|
|
10242
|
-
let u = useFieldContext(), d;
|
|
10243
|
-
n[5] === u ? d = n[6] : (d = u.state.value && u.getMeta().errors.length > 0 && "outline-error", n[5] = u, n[6] = d);
|
|
10244
|
-
let f;
|
|
10245
|
-
n[7] === u ? f = n[8] : (f = u.state.value && u.getMeta().isValid && "outline-success", n[7] = u, n[8] = f);
|
|
10246
|
-
let m;
|
|
10247
|
-
n[9] !== s || n[10] !== d || n[11] !== f ? (m = cn(d, f, s), n[9] = s, n[10] = d, n[11] = f, n[12] = m) : m = n[12];
|
|
10248
|
-
let h;
|
|
10249
|
-
n[13] === u ? h = n[14] : (h = (t) => u.handleChange(t.target.value), n[13] = u, n[14] = h);
|
|
10250
|
-
let g;
|
|
10251
|
-
return n[15] !== i || n[16] !== u.name || n[17] !== u.state.value || n[18] !== c || n[19] !== l || n[20] !== m || n[21] !== h ? (g = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
10252
|
-
className: m,
|
|
10253
|
-
id: u.name,
|
|
10254
|
-
name: u.name,
|
|
10255
|
-
onChange: h,
|
|
10256
|
-
ref: l,
|
|
9979
|
+
})]
|
|
9980
|
+
}), FieldInput = ({ className: t, children: n, ref: i, ...s }) => {
|
|
9981
|
+
let c = useFieldContext();
|
|
9982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
9983
|
+
className: cn(c.state.value && c.getMeta().errors.length > 0 && "outline-error", c.state.value && c.getMeta().isValid && "outline-success", t),
|
|
9984
|
+
id: c.name,
|
|
9985
|
+
name: c.name,
|
|
9986
|
+
onChange: (t) => c.handleChange(t.target.value),
|
|
9987
|
+
ref: i,
|
|
10257
9988
|
required: !0,
|
|
10258
9989
|
type: "text",
|
|
10259
|
-
value:
|
|
10260
|
-
...
|
|
10261
|
-
children:
|
|
10262
|
-
})
|
|
10263
|
-
}
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
})
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
}
|
|
10285
|
-
function _temp(t) {
|
|
10286
|
-
return t.errors;
|
|
10287
|
-
}
|
|
10288
|
-
function _temp2(t) {
|
|
10289
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
10290
|
-
className: "text-error text-sm",
|
|
10291
|
-
children: t.message
|
|
10292
|
-
}, t.message);
|
|
10293
|
-
}
|
|
10294
|
-
var import_compiler_runtime$13 = require_compiler_runtime();
|
|
10295
|
-
const FormSubmit = (t) => {
|
|
10296
|
-
let n = (0, import_compiler_runtime$13.c)(15), i, s, c, l, u;
|
|
10297
|
-
n[0] === t ? (i = n[1], s = n[2], c = n[3], l = n[4], u = n[5]) : ({submittingText: u, className: s, children: i, ref: l, ...c} = t, n[0] = t, n[1] = i, n[2] = s, n[3] = c, n[4] = l, n[5] = u);
|
|
10298
|
-
let d = u === void 0 ? "Submitting..." : u, f = useFormContext$1(), m;
|
|
10299
|
-
n[6] !== i || n[7] !== s || n[8] !== c || n[9] !== l || n[10] !== d ? (m = (t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
10300
|
-
className: cn("w-full", s),
|
|
10301
|
-
disabled: !t.canSubmit || t.isSubmitting,
|
|
10302
|
-
ref: l,
|
|
10303
|
-
type: "submit",
|
|
10304
|
-
...c,
|
|
10305
|
-
children: t.isSubmitting ? d : i
|
|
10306
|
-
}), n[6] = i, n[7] = s, n[8] = c, n[9] = l, n[10] = d, n[11] = m) : m = n[11];
|
|
10307
|
-
let h;
|
|
10308
|
-
return n[12] !== f.Subscribe || n[13] !== m ? (h = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(f.Subscribe, { children: m }), n[12] = f.Subscribe, n[13] = m, n[14] = h) : h = n[14], h;
|
|
10309
|
-
}, Form = createFormHook({
|
|
9990
|
+
value: c.state.value,
|
|
9991
|
+
...s,
|
|
9992
|
+
children: n
|
|
9993
|
+
});
|
|
9994
|
+
}, FormErrors = ({ className: t, children: n, ref: i, ...s }) => {
|
|
9995
|
+
let c = useStore(useFormContext$1().store, (t) => t.errors);
|
|
9996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
9997
|
+
className: cn("", t),
|
|
9998
|
+
ref: i,
|
|
9999
|
+
...s,
|
|
10000
|
+
children: [n, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
10001
|
+
className: "mt-2",
|
|
10002
|
+
children: c.map((t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
10003
|
+
className: "text-error text-sm",
|
|
10004
|
+
children: t.message
|
|
10005
|
+
}, t.message))
|
|
10006
|
+
})]
|
|
10007
|
+
});
|
|
10008
|
+
}, FormSubmit = ({ submittingText: t = "Submitting...", className: n, children: i, ref: s, ...c }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(useFormContext$1().Subscribe, { children: (l) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
10009
|
+
className: cn("w-full", n),
|
|
10010
|
+
disabled: !l.canSubmit || l.isSubmitting,
|
|
10011
|
+
ref: s,
|
|
10012
|
+
type: "submit",
|
|
10013
|
+
...c,
|
|
10014
|
+
children: l.isSubmitting ? t : i
|
|
10015
|
+
}) }), Form = createFormHook({
|
|
10310
10016
|
fieldComponents: {
|
|
10311
10017
|
FieldErrors,
|
|
10312
10018
|
FieldInput
|
|
@@ -10317,63 +10023,31 @@ const FormSubmit = (t) => {
|
|
|
10317
10023
|
},
|
|
10318
10024
|
fieldContext,
|
|
10319
10025
|
formContext
|
|
10320
|
-
})
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
}),
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
n[14] === c ? x = n[15] : (x = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback, { children: c }), n[14] = c, n[15] = x);
|
|
10346
|
-
let S;
|
|
10347
|
-
n[16] !== i || n[17] !== b || n[18] !== x ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Avatar, { children: [
|
|
10348
|
-
b,
|
|
10349
|
-
x,
|
|
10350
|
-
i
|
|
10351
|
-
] }), n[16] = i, n[17] = b, n[18] = x, n[19] = S) : S = n[19];
|
|
10352
|
-
let C = v && "hidden", w;
|
|
10353
|
-
n[20] === C ? w = n[21] : (w = cn("flex flex-col items-start justify-start", C), n[20] = C, n[21] = w);
|
|
10354
|
-
let T;
|
|
10355
|
-
n[22] === g ? T = n[23] : (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
10356
|
-
className: "text-prose-0",
|
|
10357
|
-
children: g
|
|
10358
|
-
}), n[22] = g, n[23] = T);
|
|
10359
|
-
let E;
|
|
10360
|
-
n[24] === _ ? E = n[25] : (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
10361
|
-
className: "text-on-surface-variant text-prose--1",
|
|
10362
|
-
children: _
|
|
10363
|
-
}), n[24] = _, n[25] = E);
|
|
10364
|
-
let D;
|
|
10365
|
-
n[26] !== T || n[27] !== E || n[28] !== w ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
10366
|
-
className: w,
|
|
10367
|
-
children: [T, E]
|
|
10368
|
-
}), n[26] = T, n[27] = E, n[28] = w, n[29] = D) : D = n[29];
|
|
10369
|
-
let O;
|
|
10370
|
-
return n[30] !== u || n[31] !== d || n[32] !== D || n[33] !== y || n[34] !== S ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
10371
|
-
className: y,
|
|
10372
|
-
ref: d,
|
|
10373
|
-
...u,
|
|
10374
|
-
children: [S, D]
|
|
10375
|
-
}), n[30] = u, n[31] = d, n[32] = D, n[33] = y, n[34] = S, n[35] = O) : O = n[35], O;
|
|
10376
|
-
}, ScrollAreaRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
10026
|
+
}), Label = ({ className: t, children: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
10027
|
+
className: cn("hover:cursor-pointer", t),
|
|
10028
|
+
"data-slot": "label",
|
|
10029
|
+
ref: i,
|
|
10030
|
+
...s,
|
|
10031
|
+
children: n
|
|
10032
|
+
}), Profile = ({ className: t, imageUrl: n, fallbackText: i, profileName: s = "", profileEmail: c = "", compact: l = !1, children: u, ref: d, ...f }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
10033
|
+
className: cn("flex items-center gap-xs transition-colors", t),
|
|
10034
|
+
ref: d,
|
|
10035
|
+
...f,
|
|
10036
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Avatar, { children: [
|
|
10037
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarImage, { src: n }),
|
|
10038
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback, { children: i }),
|
|
10039
|
+
u
|
|
10040
|
+
] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
10041
|
+
className: cn("flex flex-col items-start justify-start", l && "hidden"),
|
|
10042
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
10043
|
+
className: "text-prose-0",
|
|
10044
|
+
children: s
|
|
10045
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
10046
|
+
className: "text-on-surface-variant text-prose--1",
|
|
10047
|
+
children: c
|
|
10048
|
+
})]
|
|
10049
|
+
})]
|
|
10050
|
+
}), ScrollAreaRootContext = /* @__PURE__ */ React.createContext(void 0);
|
|
10377
10051
|
process.env.NODE_ENV !== "production" && (ScrollAreaRootContext.displayName = "ScrollAreaRootContext");
|
|
10378
10052
|
function useScrollAreaRootContext() {
|
|
10379
10053
|
let n = React.useContext(ScrollAreaRootContext);
|
|
@@ -10496,7 +10170,7 @@ const ScrollAreaRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
10496
10170
|
ref: [i, D],
|
|
10497
10171
|
props: [Q, u],
|
|
10498
10172
|
stateAttributesMapping: scrollAreaStateAttributesMapping
|
|
10499
|
-
}),
|
|
10173
|
+
}), Mm = React.useMemo(() => ({
|
|
10500
10174
|
handlePointerDown: q,
|
|
10501
10175
|
handlePointerMove: J,
|
|
10502
10176
|
handlePointerUp: Y,
|
|
@@ -10554,7 +10228,7 @@ const ScrollAreaRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
10554
10228
|
G
|
|
10555
10229
|
]);
|
|
10556
10230
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ScrollAreaRootContext.Provider, {
|
|
10557
|
-
value:
|
|
10231
|
+
value: Mm,
|
|
10558
10232
|
children: [styleDisableScrollbar.element, $]
|
|
10559
10233
|
});
|
|
10560
10234
|
});
|
|
@@ -10639,13 +10313,13 @@ const ScrollAreaViewport = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
10639
10313
|
let t = i.offsetWidth - Y - V - U, n = b - C, s = n === 0 ? 0 : E / n, l = O === "rtl" ? clamp$1(s * t, -t, 0) : clamp$1(s * t, 0, t);
|
|
10640
10314
|
c.style.transform = `translate3d(${l}px,0,0)`;
|
|
10641
10315
|
}
|
|
10642
|
-
let Z = clamp$1(F, 0, N), Q = clamp$1(I, 0, N), $ = clamp$1(L, 0, P),
|
|
10316
|
+
let Z = clamp$1(F, 0, N), Q = clamp$1(I, 0, N), $ = clamp$1(L, 0, P), Mm = clamp$1(R, 0, P), Nm = [
|
|
10643
10317
|
[ScrollAreaViewportCssVars.scrollAreaOverflowXStart, Z],
|
|
10644
10318
|
[ScrollAreaViewportCssVars.scrollAreaOverflowXEnd, Q],
|
|
10645
10319
|
[ScrollAreaViewportCssVars.scrollAreaOverflowYStart, $],
|
|
10646
|
-
[ScrollAreaViewportCssVars.scrollAreaOverflowYEnd,
|
|
10320
|
+
[ScrollAreaViewportCssVars.scrollAreaOverflowYEnd, Mm]
|
|
10647
10321
|
];
|
|
10648
|
-
for (let [n, i] of
|
|
10322
|
+
for (let [n, i] of Nm) t.style.setProperty(n, `${i}px`);
|
|
10649
10323
|
l && (A || k ? v({
|
|
10650
10324
|
width: 0,
|
|
10651
10325
|
height: 0
|
|
@@ -10660,13 +10334,13 @@ const ScrollAreaViewport = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
10660
10334
|
cornerHidden: n
|
|
10661
10335
|
};
|
|
10662
10336
|
});
|
|
10663
|
-
let
|
|
10337
|
+
let Pm = {
|
|
10664
10338
|
xStart: !A && Z > D.xStart,
|
|
10665
10339
|
xEnd: !A && Q > D.xEnd,
|
|
10666
10340
|
yStart: !k && $ > D.yStart,
|
|
10667
|
-
yEnd: !k &&
|
|
10341
|
+
yEnd: !k && Mm > D.yEnd
|
|
10668
10342
|
};
|
|
10669
|
-
T((t) => t.xStart ===
|
|
10343
|
+
T((t) => t.xStart === Pm.xStart && t.xEnd === Pm.xEnd && t.yStart === Pm.yStart && t.yEnd === Pm.yEnd ? t : Pm);
|
|
10670
10344
|
}
|
|
10671
10345
|
let N = useStableCallback(() => {
|
|
10672
10346
|
ReactDOM.flushSync(M);
|
|
@@ -10877,41 +10551,23 @@ const ScrollAreaCorner = /* @__PURE__ */ React.forwardRef(function(t, n) {
|
|
|
10877
10551
|
return d.cornerHidden ? null : f;
|
|
10878
10552
|
});
|
|
10879
10553
|
process.env.NODE_ENV !== "production" && (ScrollAreaCorner.displayName = "ScrollAreaCorner");
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
className: v,
|
|
10898
|
-
orientation: d,
|
|
10899
|
-
children: y
|
|
10900
|
-
}), n[16] = d, n[17] = v, n[18] = b) : b = n[18];
|
|
10901
|
-
let x;
|
|
10902
|
-
n[19] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaCorner, {}), n[19] = x) : x = n[19];
|
|
10903
|
-
let S;
|
|
10904
|
-
return n[20] !== c || n[21] !== l || n[22] !== m || n[23] !== h || n[24] !== b ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ScrollAreaRoot, {
|
|
10905
|
-
className: m,
|
|
10906
|
-
ref: l,
|
|
10907
|
-
...c,
|
|
10908
|
-
children: [
|
|
10909
|
-
h,
|
|
10910
|
-
b,
|
|
10911
|
-
x
|
|
10912
|
-
]
|
|
10913
|
-
}), n[20] = c, n[21] = l, n[22] = m, n[23] = h, n[24] = b, n[25] = S) : S = n[25], S;
|
|
10914
|
-
};
|
|
10554
|
+
const ScrollArea = ({ orientation: t = "vertical", className: n, children: i, ref: s, ...c }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ScrollAreaRoot, {
|
|
10555
|
+
className: cn("h-[200px] rounded-lg bg-surface-container", t === "horizontal" && "h-full", n),
|
|
10556
|
+
ref: s,
|
|
10557
|
+
...c,
|
|
10558
|
+
children: [
|
|
10559
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaViewport, {
|
|
10560
|
+
className: "prose-step-0 flex h-full flex-col gap-xs overscroll-contain py-2xs pr-sm pl-sm",
|
|
10561
|
+
children: i
|
|
10562
|
+
}),
|
|
10563
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaScrollbar, {
|
|
10564
|
+
className: cn("inset-shadow-1-shadow flex justify-center rounded bg-surface-dim p-[2px] opacity-0 transition-opacity delay-300 hover:cursor-pointer data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-75 data-scrolling:duration-75", t === "vertical" && "my-2xs mr-2xs w-2xs", t === "horizontal" && "mx-xs mb-2xs h-2xs flex-col", n),
|
|
10565
|
+
orientation: t,
|
|
10566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaThumb, { className: "h-full w-full rounded-1 rounded-full bg-accent" })
|
|
10567
|
+
}),
|
|
10568
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaCorner, {})
|
|
10569
|
+
]
|
|
10570
|
+
});
|
|
10915
10571
|
var getBoundingClientRect = (t) => {
|
|
10916
10572
|
let n = t.getBoundingClientRect();
|
|
10917
10573
|
return {
|
|
@@ -11177,7 +10833,7 @@ function useTooltipProviderContext() {
|
|
|
11177
10833
|
const TooltipTrigger$1 = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
11178
10834
|
let { className: s, render: c, handle: l, payload: u, disabled: d, delay: f, closeDelay: m, id: h, ...g } = n, _ = useTooltipRootContext(!0), v = l?.store ?? _;
|
|
11179
10835
|
if (!v) throw Error(process.env.NODE_ENV === "production" ? formatErrorMessage(82) : "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");
|
|
11180
|
-
let y = useBaseUiId(h), b = v.useState("isTriggerActive", y), x = v.useState("floatingRootContext"), S = v.useState("isOpenedByTrigger", y), C = React.useRef(null), w = f ?? 600, T = m ?? 0, { registerTrigger:
|
|
10836
|
+
let y = useBaseUiId(h), b = v.useState("isTriggerActive", y), x = v.useState("floatingRootContext"), S = v.useState("isOpenedByTrigger", y), C = React.useRef(null), w = f ?? 600, T = m ?? 0, { registerTrigger: D, isMountedByThisTrigger: O } = useTriggerDataForwarding(y, C, v, {
|
|
11181
10837
|
payload: u,
|
|
11182
10838
|
closeDelay: T
|
|
11183
10839
|
}), k = useTooltipProviderContext(), { delayRef: A, isInstantPhase: j, hasProvider: M } = useDelayGroup(x, { open: S });
|
|
@@ -11197,12 +10853,12 @@ const TooltipTrigger$1 = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
11197
10853
|
},
|
|
11198
10854
|
triggerElementRef: C,
|
|
11199
10855
|
isActiveTrigger: b
|
|
11200
|
-
}), R = React.useMemo(() => ({ open: S }), [S]), z = v.useState("triggerProps",
|
|
10856
|
+
}), R = React.useMemo(() => ({ open: S }), [S]), z = v.useState("triggerProps", O);
|
|
11201
10857
|
return useRenderElement("button", n, {
|
|
11202
10858
|
state: R,
|
|
11203
10859
|
ref: [
|
|
11204
10860
|
i,
|
|
11205
|
-
|
|
10861
|
+
D,
|
|
11206
10862
|
C
|
|
11207
10863
|
],
|
|
11208
10864
|
props: [
|
|
@@ -11455,7 +11111,7 @@ function useAnchorPositioning(n) {
|
|
|
11455
11111
|
let $ = React.useMemo(() => ({
|
|
11456
11112
|
elementResize: !_ && typeof ResizeObserver < "u",
|
|
11457
11113
|
layoutShift: !_ && typeof IntersectionObserver < "u"
|
|
11458
|
-
}), [_]), { refs:
|
|
11114
|
+
}), [_]), { refs: Mm, elements: Nm, x: Pm, y: Fm, middlewareData: Im, update: Lm, placement: Rm, context: zm, isPositioned: Bm, floatingStyles: Vm } = useFloating({
|
|
11459
11115
|
rootContext: y,
|
|
11460
11116
|
placement: R,
|
|
11461
11117
|
middleware: J,
|
|
@@ -11463,89 +11119,89 @@ function useAnchorPositioning(n) {
|
|
|
11463
11119
|
whileElementsMounted: v ? void 0 : (...t) => autoUpdate(...t, $),
|
|
11464
11120
|
nodeId: C,
|
|
11465
11121
|
externalTree: E
|
|
11466
|
-
}), { sideX:
|
|
11467
|
-
position:
|
|
11468
|
-
[
|
|
11469
|
-
[
|
|
11122
|
+
}), { sideX: Hm, sideY: Um } = Im.adaptiveOrigin || DEFAULT_SIDES, Wm = Bm ? s : "fixed", Gm = React.useMemo(() => w ? {
|
|
11123
|
+
position: Wm,
|
|
11124
|
+
[Hm]: Pm,
|
|
11125
|
+
[Um]: Fm
|
|
11470
11126
|
} : {
|
|
11471
|
-
position:
|
|
11472
|
-
...
|
|
11127
|
+
position: Wm,
|
|
11128
|
+
...Vm
|
|
11473
11129
|
}, [
|
|
11474
11130
|
w,
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
]),
|
|
11131
|
+
Wm,
|
|
11132
|
+
Hm,
|
|
11133
|
+
Pm,
|
|
11134
|
+
Um,
|
|
11135
|
+
Fm,
|
|
11136
|
+
Vm
|
|
11137
|
+
]), Km = React.useRef(null);
|
|
11482
11138
|
useIsoLayoutEffect(() => {
|
|
11483
11139
|
if (!b) return;
|
|
11484
11140
|
let t = F.current, n = typeof t == "function" ? t() : t, i = (isRef(n) ? n.current : n) || null;
|
|
11485
|
-
i !==
|
|
11141
|
+
i !== Km.current && (Mm.setPositionReference(i), Km.current = i);
|
|
11486
11142
|
}, [
|
|
11487
11143
|
b,
|
|
11488
|
-
|
|
11144
|
+
Mm,
|
|
11489
11145
|
P,
|
|
11490
11146
|
F
|
|
11491
11147
|
]), React.useEffect(() => {
|
|
11492
11148
|
if (!b) return;
|
|
11493
11149
|
let t = F.current;
|
|
11494
|
-
typeof t != "function" && isRef(t) && t.current !==
|
|
11150
|
+
typeof t != "function" && isRef(t) && t.current !== Km.current && (Mm.setPositionReference(t.current), Km.current = t.current);
|
|
11495
11151
|
}, [
|
|
11496
11152
|
b,
|
|
11497
|
-
|
|
11153
|
+
Mm,
|
|
11498
11154
|
P,
|
|
11499
11155
|
F
|
|
11500
11156
|
]), React.useEffect(() => {
|
|
11501
|
-
if (v && b &&
|
|
11157
|
+
if (v && b && Nm.domReference && Nm.floating) return autoUpdate(Nm.domReference, Nm.floating, Lm, $);
|
|
11502
11158
|
}, [
|
|
11503
11159
|
v,
|
|
11504
11160
|
b,
|
|
11505
|
-
|
|
11506
|
-
|
|
11161
|
+
Nm,
|
|
11162
|
+
Lm,
|
|
11507
11163
|
$
|
|
11508
11164
|
]);
|
|
11509
|
-
let
|
|
11165
|
+
let qm = getSide(Rm), Jm = getLogicalSide(c, qm, I), Ym = getAlignment(Rm) || "center", Xm = !!Im.hide?.referenceHidden;
|
|
11510
11166
|
useIsoLayoutEffect(() => {
|
|
11511
|
-
T && b &&
|
|
11167
|
+
T && b && Bm && O(qm);
|
|
11512
11168
|
}, [
|
|
11513
11169
|
T,
|
|
11514
11170
|
b,
|
|
11515
|
-
|
|
11516
|
-
|
|
11171
|
+
Bm,
|
|
11172
|
+
qm
|
|
11517
11173
|
]);
|
|
11518
|
-
let
|
|
11174
|
+
let Zm = React.useMemo(() => ({
|
|
11519
11175
|
position: "absolute",
|
|
11520
|
-
top:
|
|
11521
|
-
left:
|
|
11522
|
-
}), [
|
|
11176
|
+
top: Im.arrow?.y,
|
|
11177
|
+
left: Im.arrow?.x
|
|
11178
|
+
}), [Im.arrow]), Qm = Im.arrow?.centerOffset !== 0;
|
|
11523
11179
|
return React.useMemo(() => ({
|
|
11524
|
-
positionerStyles:
|
|
11525
|
-
arrowStyles:
|
|
11180
|
+
positionerStyles: Gm,
|
|
11181
|
+
arrowStyles: Zm,
|
|
11526
11182
|
arrowRef: G,
|
|
11527
|
-
arrowUncentered:
|
|
11528
|
-
side:
|
|
11529
|
-
align:
|
|
11530
|
-
physicalSide:
|
|
11531
|
-
anchorHidden:
|
|
11532
|
-
refs:
|
|
11533
|
-
context:
|
|
11534
|
-
isPositioned:
|
|
11535
|
-
update:
|
|
11183
|
+
arrowUncentered: Qm,
|
|
11184
|
+
side: Jm,
|
|
11185
|
+
align: Ym,
|
|
11186
|
+
physicalSide: qm,
|
|
11187
|
+
anchorHidden: Xm,
|
|
11188
|
+
refs: Mm,
|
|
11189
|
+
context: zm,
|
|
11190
|
+
isPositioned: Bm,
|
|
11191
|
+
update: Lm
|
|
11536
11192
|
}), [
|
|
11537
|
-
|
|
11538
|
-
|
|
11193
|
+
Gm,
|
|
11194
|
+
Zm,
|
|
11539
11195
|
G,
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11196
|
+
Qm,
|
|
11197
|
+
Jm,
|
|
11198
|
+
Ym,
|
|
11199
|
+
qm,
|
|
11200
|
+
Xm,
|
|
11201
|
+
Mm,
|
|
11202
|
+
zm,
|
|
11203
|
+
Bm,
|
|
11204
|
+
Lm
|
|
11549
11205
|
]);
|
|
11550
11206
|
}
|
|
11551
11207
|
function isRef(t) {
|
|
@@ -11807,50 +11463,26 @@ const TooltipProvider = function(n) {
|
|
|
11807
11463
|
});
|
|
11808
11464
|
};
|
|
11809
11465
|
process.env.NODE_ENV !== "production" && (TooltipProvider.displayName = "TooltipProvider");
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
n
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
className: "fill-surface-container-high",
|
|
11831
|
-
weight: "fill"
|
|
11832
|
-
})
|
|
11833
|
-
}), n[6] = u) : u = n[6];
|
|
11834
|
-
let d;
|
|
11835
|
-
return n[7] !== i || n[8] !== c || n[9] !== l ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPositioner, {
|
|
11836
|
-
sideOffset: 10,
|
|
11837
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipPopup, {
|
|
11838
|
-
className: l,
|
|
11839
|
-
...c,
|
|
11840
|
-
children: [u, i]
|
|
11841
|
-
})
|
|
11842
|
-
}) }), n[7] = i, n[8] = c, n[9] = l, n[10] = d) : d = n[10], d;
|
|
11843
|
-
};
|
|
11844
|
-
var import_compiler_runtime$7 = require_compiler_runtime();
|
|
11845
|
-
const TooltipTrigger = (t) => {
|
|
11846
|
-
let n = (0, import_compiler_runtime$7.c)(6), i, s;
|
|
11847
|
-
n[0] === t ? (i = n[1], s = n[2]) : ({children: i, ...s} = t, n[0] = t, n[1] = i, n[2] = s);
|
|
11848
|
-
let c;
|
|
11849
|
-
return n[3] !== i || n[4] !== s ? (c = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger$1, {
|
|
11850
|
-
...s,
|
|
11851
|
-
children: i
|
|
11852
|
-
}), n[3] = i, n[4] = s, n[5] = c) : c = n[5], c;
|
|
11853
|
-
}, SliderHandle = ({ sliderInstance: t, isActive: n, onKeyDownHandler: i, onMouseDownHandler: s, onTouchStart: c, value: l, className: u, children: d, ref: m, ...h }) => {
|
|
11466
|
+
const Tooltip = ({ children: t, ...n }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipRoot, {
|
|
11467
|
+
...n,
|
|
11468
|
+
children: t
|
|
11469
|
+
}) }), TooltipContent = ({ className: t, children: n, ...i }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPositioner, {
|
|
11470
|
+
sideOffset: 10,
|
|
11471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipPopup, {
|
|
11472
|
+
className: cn("fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--transform-origin) animate-in text-balance rounded-md bg-surface-container-high px-xs py-3xs text-sm data-[state=closed]:animate-out", t),
|
|
11473
|
+
...i,
|
|
11474
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipArrow, {
|
|
11475
|
+
className: "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=top]:bottom-[-8px] data-[side=right]:left-[-13px] data-[side=left]:rotate-90 data-[side=right]:-rotate-90 data-[side=top]:rotate-180",
|
|
11476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
11477
|
+
className: "fill-surface-container-high",
|
|
11478
|
+
weight: "fill"
|
|
11479
|
+
})
|
|
11480
|
+
}), n]
|
|
11481
|
+
})
|
|
11482
|
+
}) }), TooltipTrigger = ({ children: t, ...n }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger$1, {
|
|
11483
|
+
...n,
|
|
11484
|
+
children: t
|
|
11485
|
+
}), SliderHandle = ({ sliderInstance: t, isActive: n, onKeyDownHandler: i, onMouseDownHandler: s, onTouchStart: c, value: l, className: u, children: d, ref: m, ...h }) => {
|
|
11854
11486
|
let [g, _] = useState(!1);
|
|
11855
11487
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, {
|
|
11856
11488
|
open: n || g,
|
|
@@ -11972,11 +11604,11 @@ const stateAttributesMapping$2 = {
|
|
|
11972
11604
|
return t ? { [SwitchRootDataAttributes.checked]: "" } : { [SwitchRootDataAttributes.unchecked]: "" };
|
|
11973
11605
|
}
|
|
11974
11606
|
}, SwitchRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
11975
|
-
let { checked: s, className: c, defaultChecked: l, id: u, inputRef: d, name: f, nativeButton: m = !1, onCheckedChange: h, readOnly: g = !1, required: _ = !1, disabled: v = !1, render: y, uncheckedValue: b, ...x } = n, { clearErrors: S } = useFormContext(), { state: C, setTouched: w, setDirty: T, validityData: E, setFilled: D, setFocused: O, shouldValidateOnChange:
|
|
11607
|
+
let { checked: s, className: c, defaultChecked: l, id: u, inputRef: d, name: f, nativeButton: m = !1, onCheckedChange: h, readOnly: g = !1, required: _ = !1, disabled: v = !1, render: y, uncheckedValue: b, ...x } = n, { clearErrors: S } = useFormContext(), { state: C, setTouched: w, setDirty: T, validityData: E, setFilled: D, setFocused: O, shouldValidateOnChange: A, validationMode: j, disabled: M, name: N, validation: P } = useFieldRootContext(), { labelId: F } = useLabelableContext(), I = M || v, L = N ?? f, R = useStableCallback(h), z = React.useRef(null), B = useMergedRefs(z, d, P.inputRef), V = React.useRef(null), H = useBaseUiId(), W = useLabelableId({
|
|
11976
11608
|
id: u,
|
|
11977
11609
|
implicit: !1,
|
|
11978
11610
|
controlRef: V
|
|
11979
|
-
}), [
|
|
11611
|
+
}), [G, K] = useControlled({
|
|
11980
11612
|
controlled: s,
|
|
11981
11613
|
default: !!l,
|
|
11982
11614
|
name: "Switch",
|
|
@@ -11985,14 +11617,14 @@ const stateAttributesMapping$2 = {
|
|
|
11985
11617
|
useField({
|
|
11986
11618
|
id: H,
|
|
11987
11619
|
commit: P.commit,
|
|
11988
|
-
value:
|
|
11620
|
+
value: G,
|
|
11989
11621
|
controlRef: V,
|
|
11990
11622
|
name: L,
|
|
11991
|
-
getValue: () =>
|
|
11623
|
+
getValue: () => G
|
|
11992
11624
|
}), useIsoLayoutEffect(() => {
|
|
11993
11625
|
z.current && D(z.current.checked);
|
|
11994
|
-
}, [z, D]), useValueChanged(
|
|
11995
|
-
S(L), T(
|
|
11626
|
+
}, [z, D]), useValueChanged(G, () => {
|
|
11627
|
+
S(L), T(G !== E.initialValue), D(G), A() ? P.commit(G) : P.commit(G, !0);
|
|
11996
11628
|
});
|
|
11997
11629
|
let { getButtonProps: q, buttonRef: J } = useButton({
|
|
11998
11630
|
disabled: I,
|
|
@@ -12000,7 +11632,7 @@ const stateAttributesMapping$2 = {
|
|
|
12000
11632
|
}), Y = {
|
|
12001
11633
|
id: H,
|
|
12002
11634
|
role: "switch",
|
|
12003
|
-
"aria-checked":
|
|
11635
|
+
"aria-checked": G,
|
|
12004
11636
|
"aria-readonly": g || void 0,
|
|
12005
11637
|
"aria-labelledby": F,
|
|
12006
11638
|
onFocus() {
|
|
@@ -12008,15 +11640,15 @@ const stateAttributesMapping$2 = {
|
|
|
12008
11640
|
},
|
|
12009
11641
|
onBlur() {
|
|
12010
11642
|
let t = z.current;
|
|
12011
|
-
!t || I || (w(!0), O(!1),
|
|
11643
|
+
!t || I || (w(!0), O(!1), j === "onBlur" && P.commit(t.checked));
|
|
12012
11644
|
},
|
|
12013
11645
|
onClick(t) {
|
|
12014
11646
|
g || I || (t.preventDefault(), z?.current?.click());
|
|
12015
11647
|
}
|
|
12016
11648
|
}, X = React.useMemo(() => mergeProps({
|
|
12017
|
-
checked:
|
|
11649
|
+
checked: G,
|
|
12018
11650
|
disabled: I,
|
|
12019
|
-
id:
|
|
11651
|
+
id: W,
|
|
12020
11652
|
name: L,
|
|
12021
11653
|
required: _,
|
|
12022
11654
|
style: visuallyHidden,
|
|
@@ -12033,10 +11665,10 @@ const stateAttributesMapping$2 = {
|
|
|
12033
11665
|
V.current?.focus();
|
|
12034
11666
|
}
|
|
12035
11667
|
}, P.getInputValidationProps), [
|
|
12036
|
-
|
|
11668
|
+
G,
|
|
12037
11669
|
I,
|
|
12038
11670
|
B,
|
|
12039
|
-
|
|
11671
|
+
W,
|
|
12040
11672
|
L,
|
|
12041
11673
|
R,
|
|
12042
11674
|
_,
|
|
@@ -12044,13 +11676,13 @@ const stateAttributesMapping$2 = {
|
|
|
12044
11676
|
P
|
|
12045
11677
|
]), Z = React.useMemo(() => ({
|
|
12046
11678
|
...C,
|
|
12047
|
-
checked:
|
|
11679
|
+
checked: G,
|
|
12048
11680
|
disabled: I,
|
|
12049
11681
|
readOnly: g,
|
|
12050
11682
|
required: _
|
|
12051
11683
|
}), [
|
|
12052
11684
|
C,
|
|
12053
|
-
|
|
11685
|
+
G,
|
|
12054
11686
|
I,
|
|
12055
11687
|
g,
|
|
12056
11688
|
_
|
|
@@ -12073,7 +11705,7 @@ const stateAttributesMapping$2 = {
|
|
|
12073
11705
|
value: Z,
|
|
12074
11706
|
children: [
|
|
12075
11707
|
Q,
|
|
12076
|
-
!
|
|
11708
|
+
!G && L && b !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
12077
11709
|
type: "hidden",
|
|
12078
11710
|
name: L,
|
|
12079
11711
|
value: b
|
|
@@ -12096,32 +11728,18 @@ const SwitchThumb = /* @__PURE__ */ React.forwardRef(function(t, n) {
|
|
|
12096
11728
|
});
|
|
12097
11729
|
});
|
|
12098
11730
|
process.env.NODE_ENV !== "production" && (SwitchThumb.displayName = "SwitchThumb");
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
...c,
|
|
12112
|
-
children: d
|
|
12113
|
-
}), n[8] = c, n[9] = l, n[10] = u, n[11] = f) : f = n[11];
|
|
12114
|
-
let m;
|
|
12115
|
-
n[12] !== s || n[13] !== c ? (m = s && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
|
|
12116
|
-
htmlFor: c.id,
|
|
12117
|
-
children: s
|
|
12118
|
-
}), n[12] = s, n[13] = c, n[14] = m) : m = n[14];
|
|
12119
|
-
let h;
|
|
12120
|
-
return n[15] !== f || n[16] !== m ? (h = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
12121
|
-
className: "flex items-center gap-xs",
|
|
12122
|
-
children: [f, m]
|
|
12123
|
-
}), n[15] = f, n[16] = m, n[17] = h) : h = n[17], h;
|
|
12124
|
-
}, CompositeListContext = /* @__PURE__ */ React.createContext({
|
|
11731
|
+
const Switch = ({ label: t, className: n, ref: i, ...s }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
11732
|
+
className: "flex items-center gap-xs",
|
|
11733
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SwitchRoot, {
|
|
11734
|
+
className: cn("group relative inset-shadow-1-shadow flex h-[26px] w-[50px] items-center rounded-full bg-size-[6.5rem_100%] bg-surface-dim p-0.5 outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer not-disabled:hover:outline-accent disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent data-checked:active:bg-gray-500", n),
|
|
11735
|
+
ref: i,
|
|
11736
|
+
...s,
|
|
11737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SwitchThumb, { className: "size-[14px] translate-x-[6px] rounded-full bg-accent shadow-xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-[18px] data-checked:translate-x-[26px] data-checked:scale-[1.1] data-checked:bg-on-accent data-unchecked:bg-accent" })
|
|
11738
|
+
}), t && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
|
|
11739
|
+
htmlFor: s.id,
|
|
11740
|
+
children: t
|
|
11741
|
+
})]
|
|
11742
|
+
}), CompositeListContext = /* @__PURE__ */ React.createContext({
|
|
12125
11743
|
register: () => {},
|
|
12126
11744
|
unregister: () => {},
|
|
12127
11745
|
subscribeMapChange: () => () => {},
|
|
@@ -12625,12 +12243,12 @@ function useCompositeRoot(n) {
|
|
|
12625
12243
|
let n = T.current[t];
|
|
12626
12244
|
scrollIntoViewIfNeeded(C.current, n, d, u);
|
|
12627
12245
|
}
|
|
12628
|
-
}),
|
|
12246
|
+
}), A = useStableCallback((t) => {
|
|
12629
12247
|
if (t.size === 0 || E.current) return;
|
|
12630
12248
|
E.current = !0;
|
|
12631
12249
|
let n = Array.from(t.keys()), i = n.find((t) => t?.hasAttribute("data-composite-item-active")) ?? null, s = i ? n.indexOf(i) : -1;
|
|
12632
12250
|
s !== -1 && O(s), scrollIntoViewIfNeeded(C.current, i, d, u);
|
|
12633
|
-
}),
|
|
12251
|
+
}), j = React.useMemo(() => ({
|
|
12634
12252
|
"aria-orientation": u === "both" ? void 0 : u,
|
|
12635
12253
|
ref: w,
|
|
12636
12254
|
onFocus(t) {
|
|
@@ -12709,20 +12327,20 @@ function useCompositeRoot(n) {
|
|
|
12709
12327
|
_
|
|
12710
12328
|
]);
|
|
12711
12329
|
return React.useMemo(() => ({
|
|
12712
|
-
props:
|
|
12330
|
+
props: j,
|
|
12713
12331
|
highlightedIndex: D,
|
|
12714
12332
|
onHighlightedIndexChange: O,
|
|
12715
12333
|
elementsRef: T,
|
|
12716
12334
|
disabledIndices: v,
|
|
12717
|
-
onMapChange:
|
|
12718
|
-
relayKeyboardEvent:
|
|
12335
|
+
onMapChange: A,
|
|
12336
|
+
relayKeyboardEvent: j.onKeyDown
|
|
12719
12337
|
}), [
|
|
12720
|
-
|
|
12338
|
+
j,
|
|
12721
12339
|
D,
|
|
12722
12340
|
O,
|
|
12723
12341
|
T,
|
|
12724
12342
|
v,
|
|
12725
|
-
|
|
12343
|
+
A
|
|
12726
12344
|
]);
|
|
12727
12345
|
}
|
|
12728
12346
|
function isModifierKeySet(t, n) {
|
|
@@ -12869,103 +12487,47 @@ function useActivationDirectionDetector(n, i, s, c) {
|
|
|
12869
12487
|
n
|
|
12870
12488
|
]);
|
|
12871
12489
|
}
|
|
12872
|
-
const TabsOrientationContext = createContext("vertical")
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
let n = (0, import_compiler_runtime$5.c)(15), { className: i, ref: s, ...l } = t, [u, d] = useState(l.orientation ?? "vertical");
|
|
12876
|
-
if (useEffect(() => {
|
|
12490
|
+
const TabsOrientationContext = createContext("vertical"), Tabs = ({ className: t, ref: n, ...i }) => {
|
|
12491
|
+
let [s, l] = useState(i.orientation ?? "vertical");
|
|
12492
|
+
return useEffect(() => {
|
|
12877
12493
|
let t = () => {
|
|
12878
|
-
window.innerWidth < 768 ?
|
|
12494
|
+
window.innerWidth < 768 ? l("horizontal") : l(i.orientation ?? "vertical");
|
|
12879
12495
|
};
|
|
12880
12496
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
12881
|
-
}, [
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
}), n[5] = c, n[6] = t, n[7] = s) : s = n[7], s;
|
|
12916
|
-
}
|
|
12917
|
-
let l;
|
|
12918
|
-
n[8] === i ? l = n[9] : (l = cn("absolute top-1/2 left-0 z-[-1] h-11 w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] md:h-12", i), n[8] = i, n[9] = l);
|
|
12919
|
-
let u;
|
|
12920
|
-
return n[10] !== c || n[11] !== l ? (u = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsIndicator$1, {
|
|
12921
|
-
className: l,
|
|
12922
|
-
...c
|
|
12923
|
-
}), n[10] = c, n[11] = l, n[12] = u) : u = n[12], u;
|
|
12924
|
-
};
|
|
12925
|
-
var import_compiler_runtime$3 = require_compiler_runtime();
|
|
12926
|
-
const TabsList = (t) => {
|
|
12927
|
-
let n = (0, import_compiler_runtime$3.c)(13), i, c;
|
|
12928
|
-
if (n[0] === t ? (i = n[1], c = n[2]) : ({className: i, ...c} = t, n[0] = t, n[1] = i, n[2] = c), useContext(TabsOrientationContext) === "horizontal") {
|
|
12929
|
-
let t;
|
|
12930
|
-
n[3] === i ? t = n[4] : (t = cn("relative z-0 flex h-fit grow flex-col gap-2 rounded-3xl bg-surface-neutral-primary-default p-2", i), n[3] = i, n[4] = t);
|
|
12931
|
-
let s;
|
|
12932
|
-
return n[5] !== c || n[6] !== t ? (s = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
|
|
12933
|
-
className: t,
|
|
12934
|
-
...c
|
|
12935
|
-
}), n[5] = c, n[6] = t, n[7] = s) : s = n[7], s;
|
|
12936
|
-
}
|
|
12937
|
-
let l;
|
|
12938
|
-
n[8] === i ? l = n[9] : (l = cn("relative z-0 flex gap-1 rounded-full bg-surface-neutral-primary-default p-2", i), n[8] = i, n[9] = l);
|
|
12939
|
-
let u;
|
|
12940
|
-
return n[10] !== c || n[11] !== l ? (u = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
|
|
12941
|
-
className: l,
|
|
12942
|
-
...c
|
|
12943
|
-
}), n[10] = c, n[11] = l, n[12] = u) : u = n[12], u;
|
|
12944
|
-
};
|
|
12945
|
-
var import_compiler_runtime$2 = require_compiler_runtime();
|
|
12946
|
-
const TabsPanel = (t) => {
|
|
12947
|
-
let n = (0, import_compiler_runtime$2.c)(9), i, c;
|
|
12948
|
-
n[0] === t ? (i = n[1], c = n[2]) : ({className: i, ...c} = t, n[0] = t, n[1] = i, n[2] = c);
|
|
12949
|
-
let l = useContext(TabsOrientationContext) === "horizontal" ? "h-full min-h-0 flex-1" : "grow", u;
|
|
12950
|
-
n[3] !== i || n[4] !== l ? (u = cn("relative rounded-xl bg-surface-neutral-primary-default", l, "flex items-center justify-center overflow-auto p-4", i), n[3] = i, n[4] = l, n[5] = u) : u = n[5];
|
|
12951
|
-
let d;
|
|
12952
|
-
return n[6] !== c || n[7] !== u ? (d = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsPanel$1, {
|
|
12953
|
-
className: u,
|
|
12954
|
-
...c
|
|
12955
|
-
}), n[6] = c, n[7] = u, n[8] = d) : d = n[8], d;
|
|
12956
|
-
};
|
|
12957
|
-
var import_compiler_runtime$1 = require_compiler_runtime();
|
|
12958
|
-
const TabsTab = (t) => {
|
|
12959
|
-
let n = (0, import_compiler_runtime$1.c)(8), i, s;
|
|
12960
|
-
n[0] === t ? (i = n[1], s = n[2]) : ({className: i, ...s} = t, n[0] = t, n[1] = i, n[2] = s);
|
|
12961
|
-
let c;
|
|
12962
|
-
n[3] === i ? c = n[4] : (c = cn("body-base-semibold inline-flex h-11 w-full select-none items-center justify-center whitespace-nowrap break-keep rounded-2xl border-0 px-6 text-center text-text-brand-primary-default outline-none transition-colors duration-300 hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline aria-[selected=false]:hover:bg-surface-neutral-primary-hover data-selected:text-text-inverse-primary-default md:h-12 md:rounded-full", i), n[3] = i, n[4] = c);
|
|
12963
|
-
let l;
|
|
12964
|
-
return n[5] !== s || n[6] !== c ? (l = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTab$1, {
|
|
12965
|
-
className: c,
|
|
12966
|
-
...s
|
|
12967
|
-
}), n[5] = s, n[6] = c, n[7] = l) : l = n[7], l;
|
|
12968
|
-
};
|
|
12497
|
+
}, [i.orientation]), i.orientation = s, i.orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsOrientationContext.Provider, {
|
|
12498
|
+
value: i.orientation,
|
|
12499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRoot, {
|
|
12500
|
+
className: cn("flex flex-wrap gap-4 overflow-auto", t),
|
|
12501
|
+
ref: n,
|
|
12502
|
+
...i
|
|
12503
|
+
})
|
|
12504
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRoot, {
|
|
12505
|
+
className: cn("flex flex-col gap-2 overflow-clip", t),
|
|
12506
|
+
ref: n,
|
|
12507
|
+
...i
|
|
12508
|
+
});
|
|
12509
|
+
}, TabsIndicator = ({ className: t, ...n }) => useContext(TabsOrientationContext) === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsIndicator$1, {
|
|
12510
|
+
className: cn("absolute top-0 left-1/2 z-[-1] h-11 w-(--active-tab-width) -translate-x-1/2 translate-y-(--active-tab-top) rounded-2xl bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] md:h-12 md:rounded-full", t),
|
|
12511
|
+
...n
|
|
12512
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsIndicator$1, {
|
|
12513
|
+
className: cn("absolute top-1/2 left-0 z-[-1] h-11 w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 rounded-full bg-surface-brand-primary-default transition-all duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] md:h-12", t),
|
|
12514
|
+
...n
|
|
12515
|
+
}), TabsList = ({ className: t, ...n }) => useContext(TabsOrientationContext) === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
|
|
12516
|
+
className: cn("relative z-0 flex h-fit grow flex-col gap-2 rounded-3xl bg-surface-neutral-primary-default p-2", t),
|
|
12517
|
+
...n
|
|
12518
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsList$1, {
|
|
12519
|
+
className: cn("relative z-0 flex gap-1 rounded-full bg-surface-neutral-primary-default p-2", t),
|
|
12520
|
+
...n
|
|
12521
|
+
}), TabsPanel = ({ className: t, ...n }) => {
|
|
12522
|
+
let i = useContext(TabsOrientationContext);
|
|
12523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsPanel$1, {
|
|
12524
|
+
className: cn("relative rounded-xl bg-surface-neutral-primary-default", i === "horizontal" ? "h-full min-h-0 flex-1" : "grow", "flex items-center justify-center overflow-auto p-4", t),
|
|
12525
|
+
...n
|
|
12526
|
+
});
|
|
12527
|
+
}, TabsTab = ({ className: t, ...n }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsTab$1, {
|
|
12528
|
+
className: cn("body-base-semibold inline-flex h-11 w-full select-none items-center justify-center whitespace-nowrap break-keep rounded-2xl border-0 px-6 text-center text-text-brand-primary-default outline-none transition-colors duration-300 hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline aria-[selected=false]:hover:bg-surface-neutral-primary-hover data-selected:text-text-inverse-primary-default md:h-12 md:rounded-full", t),
|
|
12529
|
+
...n
|
|
12530
|
+
});
|
|
12969
12531
|
var counter = 0;
|
|
12970
12532
|
function generateId(t) {
|
|
12971
12533
|
return counter += 1, `${t}-${Math.random().toString(36).slice(2, 6)}-${counter}`;
|
|
@@ -13367,7 +12929,7 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13367
12929
|
s.transitionStatus === "ending" && b(s.id);
|
|
13368
12930
|
}
|
|
13369
12931
|
});
|
|
13370
|
-
let
|
|
12932
|
+
let Mm = useStableCallback((t = !1) => {
|
|
13371
12933
|
let n = U.current;
|
|
13372
12934
|
if (!n) return;
|
|
13373
12935
|
let i = n.style.height;
|
|
@@ -13384,15 +12946,15 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13384
12946
|
}
|
|
13385
12947
|
t ? ReactDOM.flushSync(l) : l();
|
|
13386
12948
|
});
|
|
13387
|
-
useIsoLayoutEffect(
|
|
13388
|
-
function
|
|
12949
|
+
useIsoLayoutEffect(Mm, [Mm]);
|
|
12950
|
+
function Nm(t, n) {
|
|
13389
12951
|
let i = t, s = n;
|
|
13390
12952
|
return !h.includes("left") && !h.includes("right") ? i = t > 0 ? t ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(t) ** OPPOSITE_DIRECTION_DAMPING_FACTOR) : (!h.includes("right") && t > 0 && (i = t ** OPPOSITE_DIRECTION_DAMPING_FACTOR), !h.includes("left") && t < 0 && (i = -(Math.abs(t) ** OPPOSITE_DIRECTION_DAMPING_FACTOR))), !h.includes("up") && !h.includes("down") ? s = n > 0 ? n ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(n) ** OPPOSITE_DIRECTION_DAMPING_FACTOR) : (!h.includes("down") && n > 0 && (s = n ** OPPOSITE_DIRECTION_DAMPING_FACTOR), !h.includes("up") && n < 0 && (s = -(Math.abs(n) ** OPPOSITE_DIRECTION_DAMPING_FACTOR))), {
|
|
13391
12953
|
x: i,
|
|
13392
12954
|
y: s
|
|
13393
12955
|
};
|
|
13394
12956
|
}
|
|
13395
|
-
function
|
|
12957
|
+
function Pm(t) {
|
|
13396
12958
|
if (t.button !== 0) return;
|
|
13397
12959
|
t.pointerType === "touch" && S();
|
|
13398
12960
|
let n = getTarget(t.nativeEvent);
|
|
@@ -13410,7 +12972,7 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13410
12972
|
w(!0), O(!0), A(!1), H(null), X.current = !0, U.current?.setPointerCapture(t.pointerId);
|
|
13411
12973
|
}
|
|
13412
12974
|
}
|
|
13413
|
-
function
|
|
12975
|
+
function Fm(t) {
|
|
13414
12976
|
if (!D) return;
|
|
13415
12977
|
t.preventDefault(), X.current &&= (W.current = {
|
|
13416
12978
|
x: t.clientX,
|
|
@@ -13435,13 +12997,13 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13435
12997
|
let t = K.current, n = getDisplacement(t, f, d);
|
|
13436
12998
|
n > SWIPE_THRESHOLD ? (J.current = !1, E(t)) : !(h.includes("left") && h.includes("right")) && !(h.includes("up") && h.includes("down")) && q.current - n >= REVERSE_CANCEL_THRESHOLD && (J.current = !0);
|
|
13437
12999
|
}
|
|
13438
|
-
let g =
|
|
13000
|
+
let g = Nm(l, u), _ = G.current.x, v = G.current.y;
|
|
13439
13001
|
V === "horizontal" ? (h.includes("left") || h.includes("right")) && (_ += g.x) : (V === "vertical" || (h.includes("left") || h.includes("right")) && (_ += g.x), (h.includes("up") || h.includes("down")) && (v += g.y)), P({
|
|
13440
13002
|
x: _,
|
|
13441
13003
|
y: v
|
|
13442
13004
|
});
|
|
13443
13005
|
}
|
|
13444
|
-
function
|
|
13006
|
+
function Im(t) {
|
|
13445
13007
|
if (!D) return;
|
|
13446
13008
|
if (O(!1), A(!1), H(null), U.current?.releasePointerCapture(t.pointerId), J.current) {
|
|
13447
13009
|
P({
|
|
@@ -13474,7 +13036,7 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13474
13036
|
y: F.y
|
|
13475
13037
|
}), E(void 0));
|
|
13476
13038
|
}
|
|
13477
|
-
function
|
|
13039
|
+
function Lm(t) {
|
|
13478
13040
|
if (t.key === "Escape") {
|
|
13479
13041
|
if (!U.current || !contains(U.current, activeElement(ownerDocument(U.current)))) return;
|
|
13480
13042
|
y(s.id);
|
|
@@ -13491,7 +13053,7 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13491
13053
|
t.removeEventListener("touchmove", n);
|
|
13492
13054
|
};
|
|
13493
13055
|
}, [g]);
|
|
13494
|
-
function
|
|
13056
|
+
function zm() {
|
|
13495
13057
|
if (!D && N.x === F.x && N.y === F.y && !j) return {
|
|
13496
13058
|
[ToastRootCssVars.swipeMovementX]: "0px",
|
|
13497
13059
|
[ToastRootCssVars.swipeMovementY]: "0px"
|
|
@@ -13504,25 +13066,25 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13504
13066
|
[ToastRootCssVars.swipeMovementY]: `${n}px`
|
|
13505
13067
|
};
|
|
13506
13068
|
}
|
|
13507
|
-
let
|
|
13508
|
-
role:
|
|
13069
|
+
let Bm = s.priority === "high", Vm = {
|
|
13070
|
+
role: Bm ? "alertdialog" : "dialog",
|
|
13509
13071
|
tabIndex: 0,
|
|
13510
13072
|
"aria-modal": !1,
|
|
13511
13073
|
"aria-labelledby": L,
|
|
13512
13074
|
"aria-describedby": z,
|
|
13513
|
-
"aria-hidden":
|
|
13514
|
-
onPointerDown: g ?
|
|
13515
|
-
onPointerMove: g ?
|
|
13516
|
-
onPointerUp: g ?
|
|
13517
|
-
onKeyDown:
|
|
13075
|
+
"aria-hidden": Bm && !v ? !0 : void 0,
|
|
13076
|
+
onPointerDown: g ? Pm : void 0,
|
|
13077
|
+
onPointerMove: g ? Fm : void 0,
|
|
13078
|
+
onPointerUp: g ? Im : void 0,
|
|
13079
|
+
onKeyDown: Lm,
|
|
13518
13080
|
inert: inertValue(s.limited),
|
|
13519
13081
|
style: {
|
|
13520
|
-
...
|
|
13082
|
+
...zm(),
|
|
13521
13083
|
[ToastRootCssVars.index]: s.transitionStatus === "ending" ? Z : Q,
|
|
13522
13084
|
[ToastRootCssVars.offsetY]: `${$}px`,
|
|
13523
13085
|
[ToastRootCssVars.height]: s.height ? `${s.height}px` : void 0
|
|
13524
13086
|
}
|
|
13525
|
-
},
|
|
13087
|
+
}, Hm = React.useMemo(() => ({
|
|
13526
13088
|
rootRef: U,
|
|
13527
13089
|
toast: s,
|
|
13528
13090
|
titleId: L,
|
|
@@ -13531,7 +13093,7 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13531
13093
|
setDescriptionId: B,
|
|
13532
13094
|
swiping: D,
|
|
13533
13095
|
swipeDirection: T,
|
|
13534
|
-
recalculateHeight:
|
|
13096
|
+
recalculateHeight: Mm,
|
|
13535
13097
|
index: Z,
|
|
13536
13098
|
visibleIndex: Q,
|
|
13537
13099
|
expanded: C
|
|
@@ -13541,33 +13103,33 @@ const ToastRoot = /* @__PURE__ */ React.forwardRef(function(n, i) {
|
|
|
13541
13103
|
z,
|
|
13542
13104
|
D,
|
|
13543
13105
|
T,
|
|
13544
|
-
|
|
13106
|
+
Mm,
|
|
13545
13107
|
Z,
|
|
13546
13108
|
Q,
|
|
13547
13109
|
C
|
|
13548
|
-
]),
|
|
13110
|
+
]), Um = React.useMemo(() => ({
|
|
13549
13111
|
transitionStatus: s.transitionStatus,
|
|
13550
13112
|
expanded: C,
|
|
13551
13113
|
limited: s.limited || !1,
|
|
13552
13114
|
type: s.type,
|
|
13553
|
-
swiping:
|
|
13554
|
-
swipeDirection:
|
|
13115
|
+
swiping: Hm.swiping,
|
|
13116
|
+
swipeDirection: Hm.swipeDirection
|
|
13555
13117
|
}), [
|
|
13556
13118
|
C,
|
|
13557
13119
|
s.transitionStatus,
|
|
13558
13120
|
s.limited,
|
|
13559
13121
|
s.type,
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
]),
|
|
13563
|
-
ref: [i,
|
|
13564
|
-
state:
|
|
13122
|
+
Hm.swiping,
|
|
13123
|
+
Hm.swipeDirection
|
|
13124
|
+
]), Wm = useRenderElement("div", n, {
|
|
13125
|
+
ref: [i, Hm.rootRef],
|
|
13126
|
+
state: Um,
|
|
13565
13127
|
stateAttributesMapping,
|
|
13566
|
-
props: [
|
|
13128
|
+
props: [Vm, d]
|
|
13567
13129
|
});
|
|
13568
13130
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastRootContext.Provider, {
|
|
13569
|
-
value:
|
|
13570
|
-
children:
|
|
13131
|
+
value: Hm,
|
|
13132
|
+
children: Wm
|
|
13571
13133
|
});
|
|
13572
13134
|
});
|
|
13573
13135
|
process.env.NODE_ENV !== "production" && (ToastRoot.displayName = "ToastRoot");
|
|
@@ -13696,33 +13258,20 @@ const Toast = ({ className: t, children: n, position: i = "top-right", ref: s, .
|
|
|
13696
13258
|
})
|
|
13697
13259
|
]
|
|
13698
13260
|
}, l.id));
|
|
13699
|
-
}
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
"fixed top-auto right-[1rem] bottom-[6rem] left-auto z-10 mx-0 flex w-1/4": v
|
|
13712
|
-
}, s), n[6] = s, n[7] = f, n[8] = m, n[9] = h, n[10] = g, n[11] = _, n[12] = v, n[13] = y) : y = n[13];
|
|
13713
|
-
let b;
|
|
13714
|
-
n[14] === d ? b = n[15] : (b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toast, { position: d }), n[14] = d, n[15] = b);
|
|
13715
|
-
let x;
|
|
13716
|
-
n[16] !== c || n[17] !== l || n[18] !== y || n[19] !== b ? (x = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastViewport, {
|
|
13717
|
-
className: y,
|
|
13718
|
-
ref: l,
|
|
13261
|
+
}, ToastProvider = ({ position: t = "bottom-center", className: n, children: i, ref: s, ...c }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToastProvider$1, {
|
|
13262
|
+
timeout: 5e3,
|
|
13263
|
+
children: [i, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastViewport, {
|
|
13264
|
+
className: cn({
|
|
13265
|
+
"fixed top-[1rem] right-auto bottom-auto left-[1rem] z-10 mx-0 flex w-1/4": t === "top-left",
|
|
13266
|
+
"fixed top-[1rem] right-auto bottom-auto left-1/2 z-10 mx-auto flex w-1/4 -translate-x-1/2": t === "top-center",
|
|
13267
|
+
"fixed top-[1rem] right-[1rem] bottom-auto left-auto z-10 mx-0 flex w-1/4": t === "top-right",
|
|
13268
|
+
"fixed top-auto right-auto bottom-[6rem] left-[1rem] z-10 mx-0 flex w-1/4": t === "bottom-left",
|
|
13269
|
+
"fixed top-auto right-auto bottom-[6rem] left-1/2 z-10 mx-auto flex w-1/4 -translate-x-1/2": t === "bottom-center",
|
|
13270
|
+
"fixed top-auto right-[1rem] bottom-[6rem] left-auto z-10 mx-0 flex w-1/4": t === "bottom-right"
|
|
13271
|
+
}, n),
|
|
13272
|
+
ref: s,
|
|
13719
13273
|
...c,
|
|
13720
|
-
children:
|
|
13721
|
-
}) })
|
|
13722
|
-
|
|
13723
|
-
return n[21] !== i || n[22] !== x ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToastProvider$1, {
|
|
13724
|
-
timeout: 5e3,
|
|
13725
|
-
children: [i, x]
|
|
13726
|
-
}), n[21] = i, n[22] = x, n[23] = S) : S = n[23], S;
|
|
13727
|
-
};
|
|
13274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toast, { position: t })
|
|
13275
|
+
}) })]
|
|
13276
|
+
});
|
|
13728
13277
|
export { Avatar, AvatarFallback, AvatarImage, Badge, Button, Checkbox, CheckboxIndicator, Dialog, DialogClose, DialogDescription, DialogPopup, DialogTitle, DialogTrigger, FieldErrors, FieldInput, Form, FormErrors, FormSubmit, Input, Label, Profile, ScrollArea, Separator, Slider, SliderHandle, SliderSegment, SliderTick, SliderTickLabel, SliderTrack, Switch, Tabs, TabsIndicator, TabsList, TabsPanel, TabsTab, Toast, ToastProvider, Tooltip, TooltipContent, TooltipTrigger, cn };
|