@invana/forms 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +82 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +81 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1413,6 +1413,86 @@ function FieldError({
|
|
|
1413
1413
|
}
|
|
1414
1414
|
);
|
|
1415
1415
|
}
|
|
1416
|
+
var PARAM_SOURCES = ["literal", "argument", "binding"];
|
|
1417
|
+
var ParamRow = React2__namespace.forwardRef(
|
|
1418
|
+
({
|
|
1419
|
+
name,
|
|
1420
|
+
type,
|
|
1421
|
+
source,
|
|
1422
|
+
onSourceChange,
|
|
1423
|
+
value,
|
|
1424
|
+
onValueChange,
|
|
1425
|
+
note,
|
|
1426
|
+
invalid,
|
|
1427
|
+
disabled,
|
|
1428
|
+
className,
|
|
1429
|
+
children,
|
|
1430
|
+
...props
|
|
1431
|
+
}, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1432
|
+
"div",
|
|
1433
|
+
{
|
|
1434
|
+
ref,
|
|
1435
|
+
"data-invalid": invalid || void 0,
|
|
1436
|
+
"data-disabled": disabled || void 0,
|
|
1437
|
+
className: ui.cn("flex items-start gap-3 py-1.5", className),
|
|
1438
|
+
...props,
|
|
1439
|
+
children: [
|
|
1440
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[118px] shrink-0 pt-1", children: [
|
|
1441
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-mono text-meta", children: name }),
|
|
1442
|
+
type != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-meta text-muted-foreground", children: type }) : null
|
|
1443
|
+
] }),
|
|
1444
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
1445
|
+
children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0", children: [
|
|
1446
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1447
|
+
Select,
|
|
1448
|
+
{
|
|
1449
|
+
value: source,
|
|
1450
|
+
onValueChange: (v) => onSourceChange?.(v),
|
|
1451
|
+
disabled,
|
|
1452
|
+
children: [
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1454
|
+
SelectTrigger,
|
|
1455
|
+
{
|
|
1456
|
+
triggerSize: "sm",
|
|
1457
|
+
"aria-label": `${name} source`,
|
|
1458
|
+
className: "w-auto shrink-0 rounded-r-none border-r-0 text-meta text-muted-foreground",
|
|
1459
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {})
|
|
1460
|
+
}
|
|
1461
|
+
),
|
|
1462
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: PARAM_SOURCES.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: s, children: s }, s)) })
|
|
1463
|
+
]
|
|
1464
|
+
}
|
|
1465
|
+
),
|
|
1466
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1467
|
+
Input,
|
|
1468
|
+
{
|
|
1469
|
+
inputSize: "sm",
|
|
1470
|
+
value,
|
|
1471
|
+
onChange: (e) => onValueChange?.(e.target.value),
|
|
1472
|
+
disabled,
|
|
1473
|
+
"aria-invalid": invalid || void 0,
|
|
1474
|
+
"aria-label": name,
|
|
1475
|
+
style: invalid ? { borderColor: "var(--color-destructive)" } : void 0,
|
|
1476
|
+
className: "min-w-0 flex-1 rounded-l-none font-mono"
|
|
1477
|
+
}
|
|
1478
|
+
)
|
|
1479
|
+
] }),
|
|
1480
|
+
note != null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1481
|
+
"div",
|
|
1482
|
+
{
|
|
1483
|
+
className: ui.cn(
|
|
1484
|
+
"text-meta",
|
|
1485
|
+
invalid ? "text-destructive" : "text-muted-foreground"
|
|
1486
|
+
),
|
|
1487
|
+
children: note
|
|
1488
|
+
}
|
|
1489
|
+
) : null
|
|
1490
|
+
] })
|
|
1491
|
+
]
|
|
1492
|
+
}
|
|
1493
|
+
)
|
|
1494
|
+
);
|
|
1495
|
+
ParamRow.displayName = "ParamRow";
|
|
1416
1496
|
function InputGroup({ className, ...props }) {
|
|
1417
1497
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1418
1498
|
"div",
|
|
@@ -1589,6 +1669,8 @@ exports.InputGroupTextarea = InputGroupTextarea;
|
|
|
1589
1669
|
exports.Label = Label;
|
|
1590
1670
|
exports.NumberField = NumberField;
|
|
1591
1671
|
exports.ObjectField = ObjectField;
|
|
1672
|
+
exports.PARAM_SOURCES = PARAM_SOURCES;
|
|
1673
|
+
exports.ParamRow = ParamRow;
|
|
1592
1674
|
exports.PasswordField = PasswordField;
|
|
1593
1675
|
exports.PasswordInput = PasswordInput;
|
|
1594
1676
|
exports.RadioField = RadioField;
|