625 lines
18 KiB
JavaScript
625 lines
18 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 2af97222b2982846.43dcb21113.js
|
|
* Module id: 710242
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(389435),
|
|
o = e.i(358379),
|
|
s = e.i(855698),
|
|
n = e.i(938202);
|
|
e.i(7284);
|
|
var i = e.i(479324),
|
|
a = e.i(450943),
|
|
l = e.i(511859),
|
|
c = e.i(124859),
|
|
u = e.i(910655),
|
|
d = e.i(744931),
|
|
p = e.i(667361),
|
|
m = e.i(759455),
|
|
g = e.i(593307),
|
|
f = e.i(709172);
|
|
let h = (0, g.factory)((e, r) => {
|
|
let o = (0, i.useProps)("InputClearButton", null, e),
|
|
{ size: s, variant: n, vars: a, classNames: l, styles: c, ...u } = o,
|
|
p = (0, d.useInputContext)(),
|
|
{ resolvedClassNames: g, resolvedStyles: h } = (0,
|
|
m.useResolvedStylesApi)({ classNames: l, styles: c, props: o });
|
|
return (0, t.jsx)(f.CloseButton, {
|
|
variant: n || "transparent",
|
|
ref: r,
|
|
size: s || p?.size || "sm",
|
|
classNames: g,
|
|
styles: h,
|
|
__staticSelector: "InputClearButton",
|
|
style: {
|
|
pointerEvents: "all",
|
|
background: "var(--input-bg)",
|
|
...u.style,
|
|
},
|
|
...u,
|
|
});
|
|
});
|
|
h.displayName = "@mantine/core/InputClearButton";
|
|
let v = { xs: 7, sm: 8, md: 10, lg: 12, xl: 15 },
|
|
[b, C] = (0, e.i(209276).createOptionalContext)({
|
|
offsetBottom: !1,
|
|
offsetTop: !1,
|
|
describedBy: void 0,
|
|
getStyles: null,
|
|
inputId: void 0,
|
|
labelId: void 0,
|
|
});
|
|
e.s(
|
|
["InputWrapperProvider", () => b, "useInputWrapperContext", () => C],
|
|
710242,
|
|
);
|
|
let y = (0, n.createVarsResolver)((e, { size: t }) => ({
|
|
description: {
|
|
"--input-description-size":
|
|
void 0 === t
|
|
? void 0
|
|
: `calc(${(0, s.getFontSize)(t)} - ${(0, r.rem)(2)})`,
|
|
},
|
|
})),
|
|
w = (0, g.factory)((e, r) => {
|
|
let o = (0, i.useProps)("InputDescription", null, e),
|
|
{
|
|
classNames: s,
|
|
className: n,
|
|
style: l,
|
|
styles: u,
|
|
unstyled: d,
|
|
vars: m,
|
|
size: g,
|
|
__staticSelector: f,
|
|
__inheritStyles: h = !0,
|
|
attributes: v,
|
|
variant: b,
|
|
...w
|
|
} = (0, i.useProps)("InputDescription", null, o),
|
|
S = C(),
|
|
x = (0, a.useStyles)({
|
|
name: ["InputWrapper", f],
|
|
props: o,
|
|
classes: p.default,
|
|
className: n,
|
|
style: l,
|
|
classNames: s,
|
|
styles: u,
|
|
unstyled: d,
|
|
attributes: v,
|
|
rootSelector: "description",
|
|
vars: m,
|
|
varsResolver: y,
|
|
}),
|
|
F = (h && S?.getStyles) || x;
|
|
return (0, t.jsx)(c.Box, {
|
|
component: "p",
|
|
ref: r,
|
|
variant: b,
|
|
size: g,
|
|
...F(
|
|
"description",
|
|
S?.getStyles ? { className: n, style: l } : void 0,
|
|
),
|
|
...w,
|
|
});
|
|
});
|
|
(w.classes = p.default), (w.displayName = "@mantine/core/InputDescription");
|
|
let S = (0, n.createVarsResolver)((e, { size: t }) => ({
|
|
error: {
|
|
"--input-error-size":
|
|
void 0 === t
|
|
? void 0
|
|
: `calc(${(0, s.getFontSize)(t)} - ${(0, r.rem)(2)})`,
|
|
},
|
|
})),
|
|
x = (0, g.factory)((e, r) => {
|
|
let o = (0, i.useProps)("InputError", null, e),
|
|
{
|
|
classNames: s,
|
|
className: n,
|
|
style: l,
|
|
styles: u,
|
|
unstyled: d,
|
|
vars: m,
|
|
size: g,
|
|
attributes: f,
|
|
__staticSelector: h,
|
|
__inheritStyles: v = !0,
|
|
variant: b,
|
|
...y
|
|
} = o,
|
|
w = (0, a.useStyles)({
|
|
name: ["InputWrapper", h],
|
|
props: o,
|
|
classes: p.default,
|
|
className: n,
|
|
style: l,
|
|
classNames: s,
|
|
styles: u,
|
|
unstyled: d,
|
|
attributes: f,
|
|
rootSelector: "error",
|
|
vars: m,
|
|
varsResolver: S,
|
|
}),
|
|
x = C(),
|
|
F = (v && x?.getStyles) || w;
|
|
return (0, t.jsx)(c.Box, {
|
|
component: "p",
|
|
ref: r,
|
|
variant: b,
|
|
size: g,
|
|
...F("error", x?.getStyles ? { className: n, style: l } : void 0),
|
|
...y,
|
|
});
|
|
});
|
|
(x.classes = p.default), (x.displayName = "@mantine/core/InputError");
|
|
let F = { labelElement: "label" },
|
|
I = (0, n.createVarsResolver)((e, { size: t }) => ({
|
|
label: {
|
|
"--input-label-size": (0, s.getFontSize)(t),
|
|
"--input-asterisk-color": void 0,
|
|
},
|
|
})),
|
|
k = (0, g.factory)((e, r) => {
|
|
let o = (0, i.useProps)("InputLabel", F, e),
|
|
{
|
|
classNames: s,
|
|
className: n,
|
|
style: l,
|
|
styles: u,
|
|
unstyled: d,
|
|
vars: m,
|
|
labelElement: g,
|
|
size: f,
|
|
required: h,
|
|
htmlFor: v,
|
|
onMouseDown: b,
|
|
children: y,
|
|
__staticSelector: w,
|
|
variant: S,
|
|
mod: x,
|
|
attributes: k,
|
|
...z
|
|
} = (0, i.useProps)("InputLabel", F, o),
|
|
_ = (0, a.useStyles)({
|
|
name: ["InputWrapper", w],
|
|
props: o,
|
|
classes: p.default,
|
|
className: n,
|
|
style: l,
|
|
classNames: s,
|
|
styles: u,
|
|
unstyled: d,
|
|
attributes: k,
|
|
rootSelector: "label",
|
|
vars: m,
|
|
varsResolver: I,
|
|
}),
|
|
j = C(),
|
|
P = j?.getStyles || _;
|
|
return (0, t.jsxs)(c.Box, {
|
|
...P("label", j?.getStyles ? { className: n, style: l } : void 0),
|
|
component: g,
|
|
variant: S,
|
|
size: f,
|
|
ref: r,
|
|
htmlFor: "label" === g ? v : void 0,
|
|
mod: [{ required: h }, x],
|
|
onMouseDown: (e) => {
|
|
b?.(e), !e.defaultPrevented && e.detail > 1 && e.preventDefault();
|
|
},
|
|
...z,
|
|
children: [
|
|
y,
|
|
h &&
|
|
(0, t.jsx)("span", {
|
|
...P("required"),
|
|
"aria-hidden": !0,
|
|
children: " *",
|
|
}),
|
|
],
|
|
});
|
|
});
|
|
(k.classes = p.default), (k.displayName = "@mantine/core/InputLabel");
|
|
let z = (0, g.factory)((e, r) => {
|
|
let o = (0, i.useProps)("InputPlaceholder", null, e),
|
|
{
|
|
classNames: s,
|
|
className: n,
|
|
style: l,
|
|
styles: u,
|
|
unstyled: d,
|
|
vars: m,
|
|
__staticSelector: g,
|
|
variant: f,
|
|
error: h,
|
|
mod: v,
|
|
attributes: b,
|
|
...C
|
|
} = o,
|
|
y = (0, a.useStyles)({
|
|
name: ["InputPlaceholder", g],
|
|
props: o,
|
|
classes: p.default,
|
|
className: n,
|
|
style: l,
|
|
classNames: s,
|
|
styles: u,
|
|
unstyled: d,
|
|
attributes: b,
|
|
rootSelector: "placeholder",
|
|
});
|
|
return (0, t.jsx)(c.Box, {
|
|
...y("placeholder"),
|
|
mod: [{ error: !!h }, v],
|
|
component: "span",
|
|
variant: f,
|
|
ref: r,
|
|
...C,
|
|
});
|
|
});
|
|
(z.classes = p.default), (z.displayName = "@mantine/core/InputPlaceholder");
|
|
var _ = e.i(192830);
|
|
let j = {
|
|
labelElement: "label",
|
|
inputContainer: (e) => e,
|
|
inputWrapperOrder: ["label", "description", "input", "error"],
|
|
},
|
|
P = (0, n.createVarsResolver)((e, { size: t }) => ({
|
|
label: {
|
|
"--input-label-size": (0, s.getFontSize)(t),
|
|
"--input-asterisk-color": void 0,
|
|
},
|
|
error: {
|
|
"--input-error-size":
|
|
void 0 === t
|
|
? void 0
|
|
: `calc(${(0, s.getFontSize)(t)} - ${(0, r.rem)(2)})`,
|
|
},
|
|
description: {
|
|
"--input-description-size":
|
|
void 0 === t
|
|
? void 0
|
|
: `calc(${(0, s.getFontSize)(t)} - ${(0, r.rem)(2)})`,
|
|
},
|
|
})),
|
|
B = (0, g.factory)((e, r) => {
|
|
let s = (0, i.useProps)("InputWrapper", j, e),
|
|
{
|
|
classNames: n,
|
|
className: l,
|
|
style: u,
|
|
styles: d,
|
|
unstyled: m,
|
|
vars: g,
|
|
size: f,
|
|
variant: h,
|
|
__staticSelector: v,
|
|
inputContainer: C,
|
|
inputWrapperOrder: y,
|
|
label: S,
|
|
error: F,
|
|
description: I,
|
|
labelProps: z,
|
|
descriptionProps: B,
|
|
errorProps: E,
|
|
labelElement: N,
|
|
children: T,
|
|
withAsterisk: A,
|
|
id: L,
|
|
required: W,
|
|
__stylesApiProps: R,
|
|
mod: U,
|
|
attributes: $,
|
|
...O
|
|
} = s,
|
|
D = (0, a.useStyles)({
|
|
name: ["InputWrapper", v],
|
|
props: R || s,
|
|
classes: p.default,
|
|
className: l,
|
|
style: u,
|
|
classNames: n,
|
|
styles: d,
|
|
unstyled: m,
|
|
attributes: $,
|
|
vars: g,
|
|
varsResolver: P,
|
|
}),
|
|
M = { size: f, variant: h, __staticSelector: v },
|
|
G = (0, _.useId)(L),
|
|
V = E?.id || `${G}-error`,
|
|
J = B?.id || `${G}-description`,
|
|
q = !!F && "boolean" != typeof F,
|
|
Z = !!I,
|
|
K = `${q ? V : ""} ${Z ? J : ""}`,
|
|
H = K.trim().length > 0 ? K.trim() : void 0,
|
|
Q = z?.id || `${G}-label`,
|
|
X =
|
|
S &&
|
|
(0, t.jsx)(
|
|
k,
|
|
{
|
|
labelElement: N,
|
|
id: Q,
|
|
htmlFor: G,
|
|
required: "boolean" == typeof A ? A : W,
|
|
...M,
|
|
...z,
|
|
children: S,
|
|
},
|
|
"label",
|
|
),
|
|
Y =
|
|
Z &&
|
|
(0, t.jsx)(
|
|
w,
|
|
{
|
|
...B,
|
|
...M,
|
|
size: B?.size || M.size,
|
|
id: B?.id || J,
|
|
children: I,
|
|
},
|
|
"description",
|
|
),
|
|
ee = (0, t.jsx)(o.Fragment, { children: C(T) }, "input"),
|
|
et =
|
|
q &&
|
|
(0, o.createElement)(
|
|
x,
|
|
{
|
|
...E,
|
|
...M,
|
|
size: E?.size || M.size,
|
|
key: "error",
|
|
id: E?.id || V,
|
|
},
|
|
F,
|
|
),
|
|
er = y.map((e) => {
|
|
switch (e) {
|
|
case "label":
|
|
return X;
|
|
case "input":
|
|
return ee;
|
|
case "description":
|
|
return Y;
|
|
case "error":
|
|
return et;
|
|
default:
|
|
return null;
|
|
}
|
|
});
|
|
return (0, t.jsx)(b, {
|
|
value: {
|
|
getStyles: D,
|
|
describedBy: H,
|
|
inputId: G,
|
|
labelId: Q,
|
|
...(function (e, { hasDescription: t, hasError: r }) {
|
|
let o = e.findIndex((e) => "input" === e),
|
|
s = e.slice(0, o),
|
|
n = e.slice(o + 1),
|
|
i =
|
|
(t && s.includes("description")) ||
|
|
(r && s.includes("error"));
|
|
return {
|
|
offsetBottom:
|
|
(t && n.includes("description")) ||
|
|
(r && n.includes("error")),
|
|
offsetTop: i,
|
|
};
|
|
})(y, { hasDescription: Z, hasError: q }),
|
|
},
|
|
children: (0, t.jsx)(c.Box, {
|
|
ref: r,
|
|
variant: h,
|
|
size: f,
|
|
mod: [{ error: !!F }, U],
|
|
...D("root"),
|
|
...O,
|
|
children: er,
|
|
}),
|
|
});
|
|
});
|
|
(B.classes = p.default), (B.displayName = "@mantine/core/InputWrapper");
|
|
let E = {
|
|
variant: "default",
|
|
leftSectionPointerEvents: "none",
|
|
rightSectionPointerEvents: "none",
|
|
withAria: !0,
|
|
withErrorStyles: !0,
|
|
size: "sm",
|
|
},
|
|
N = (0, n.createVarsResolver)((e, t, o) => ({
|
|
wrapper: {
|
|
"--input-margin-top": o.offsetTop
|
|
? "calc(var(--mantine-spacing-xs) / 2)"
|
|
: void 0,
|
|
"--input-margin-bottom": o.offsetBottom
|
|
? "calc(var(--mantine-spacing-xs) / 2)"
|
|
: void 0,
|
|
"--input-height": (0, s.getSize)(t.size, "input-height"),
|
|
"--input-fz": (0, s.getFontSize)(t.size),
|
|
"--input-radius":
|
|
void 0 === t.radius ? void 0 : (0, s.getRadius)(t.radius),
|
|
"--input-left-section-width":
|
|
void 0 !== t.leftSectionWidth
|
|
? (0, r.rem)(t.leftSectionWidth)
|
|
: void 0,
|
|
"--input-right-section-width":
|
|
void 0 !== t.rightSectionWidth
|
|
? (0, r.rem)(t.rightSectionWidth)
|
|
: void 0,
|
|
"--input-padding-y": t.multiline
|
|
? (0, s.getSize)(t.size, "input-padding-y")
|
|
: void 0,
|
|
"--input-left-section-pointer-events": t.leftSectionPointerEvents,
|
|
"--input-right-section-pointer-events": t.rightSectionPointerEvents,
|
|
},
|
|
})),
|
|
T = (0, u.polymorphicFactory)((e, r) => {
|
|
let o = (0, i.useProps)("Input", E, e),
|
|
{
|
|
classNames: s,
|
|
className: n,
|
|
style: u,
|
|
styles: m,
|
|
unstyled: g,
|
|
required: f,
|
|
__staticSelector: h,
|
|
__stylesApiProps: b,
|
|
size: y,
|
|
wrapperProps: w,
|
|
error: S,
|
|
disabled: x,
|
|
leftSection: F,
|
|
leftSectionProps: I,
|
|
leftSectionWidth: k,
|
|
rightSection: z,
|
|
rightSectionProps: _,
|
|
rightSectionWidth: j,
|
|
rightSectionPointerEvents: P,
|
|
leftSectionPointerEvents: B,
|
|
variant: T,
|
|
vars: A,
|
|
pointer: L,
|
|
multiline: W,
|
|
radius: R,
|
|
id: U,
|
|
withAria: $,
|
|
withErrorStyles: O,
|
|
mod: D,
|
|
inputSize: M,
|
|
attributes: G,
|
|
__clearSection: V,
|
|
__clearable: J,
|
|
__defaultRightSection: q,
|
|
...Z
|
|
} = o,
|
|
{ styleProps: K, rest: H } = (0, l.extractStyleProps)(Z),
|
|
Q = C(),
|
|
X = { offsetBottom: Q?.offsetBottom, offsetTop: Q?.offsetTop },
|
|
Y = (0, a.useStyles)({
|
|
name: ["Input", h],
|
|
props: b || o,
|
|
classes: p.default,
|
|
className: n,
|
|
style: u,
|
|
classNames: s,
|
|
styles: m,
|
|
unstyled: g,
|
|
attributes: G,
|
|
stylesCtx: X,
|
|
rootSelector: "wrapper",
|
|
vars: A,
|
|
varsResolver: N,
|
|
}),
|
|
ee = $
|
|
? {
|
|
required: f,
|
|
disabled: x,
|
|
"aria-invalid": !!S,
|
|
"aria-describedby": Q?.describedBy,
|
|
id: Q?.inputId || U,
|
|
}
|
|
: {},
|
|
et = (function ({
|
|
__clearable: e,
|
|
__clearSection: r,
|
|
rightSection: o,
|
|
__defaultRightSection: s,
|
|
size: n = "sm",
|
|
}) {
|
|
let i = e && r;
|
|
return i && (o || s)
|
|
? (0, t.jsxs)("div", {
|
|
"data-combined-clear-section": !0,
|
|
style: {
|
|
display: "flex",
|
|
gap: 2,
|
|
alignItems: "center",
|
|
paddingInlineEnd: v[n],
|
|
},
|
|
children: [i, o || s],
|
|
})
|
|
: null === o
|
|
? null
|
|
: o || i || s;
|
|
})({
|
|
__clearable: J,
|
|
__clearSection: V,
|
|
rightSection: z,
|
|
__defaultRightSection: q,
|
|
size: y,
|
|
});
|
|
return (0, t.jsx)(d.InputContext, {
|
|
value: { size: y || "sm" },
|
|
children: (0, t.jsxs)(c.Box, {
|
|
...Y("wrapper"),
|
|
...K,
|
|
...w,
|
|
mod: [
|
|
{
|
|
error: !!S && O,
|
|
pointer: L,
|
|
disabled: x,
|
|
multiline: W,
|
|
"data-with-right-section": !!et,
|
|
"data-with-left-section": !!F,
|
|
},
|
|
D,
|
|
],
|
|
variant: T,
|
|
size: y,
|
|
children: [
|
|
F &&
|
|
(0, t.jsx)("div", {
|
|
...I,
|
|
"data-position": "left",
|
|
...Y("section", { className: I?.className, style: I?.style }),
|
|
children: F,
|
|
}),
|
|
(0, t.jsx)(c.Box, {
|
|
component: "input",
|
|
...H,
|
|
...ee,
|
|
ref: r,
|
|
required: f,
|
|
mod: { disabled: x, error: !!S && O },
|
|
variant: T,
|
|
__size: M,
|
|
...Y("input"),
|
|
}),
|
|
et &&
|
|
(0, t.jsx)("div", {
|
|
..._,
|
|
"data-position": "right",
|
|
...Y("section", { className: _?.className, style: _?.style }),
|
|
children: et,
|
|
}),
|
|
],
|
|
}),
|
|
});
|
|
});
|
|
(T.classes = p.default),
|
|
(T.Wrapper = B),
|
|
(T.Label = k),
|
|
(T.Error = x),
|
|
(T.Description = w),
|
|
(T.Placeholder = z),
|
|
(T.ClearButton = h),
|
|
(T.displayName = "@mantine/core/Input"),
|
|
e.s(["Input", () => T], 525230);
|
|
};
|
|
|
|
export default moduleFactory;
|