@krak-stack/registry 0.1.27 → 0.1.29
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/components/ui/code-block.js +1 -5
- package/dist/components/ui/copy-button.js +1 -5
- package/dist/components/ui/data-table.js +239 -242
- package/dist/components/ui/editing-locale-switcher.js +1 -5
- package/dist/components/ui/effect-form.js +170 -175
- package/dist/components/ui/error-component.d.ts +30 -0
- package/dist/components/ui/error-component.js +811 -0
- package/dist/components/ui/file-picker.js +1 -5
- package/dist/components/ui/form.js +113 -118
- package/dist/components/ui/google-map.js +1 -5
- package/dist/components/ui/icon-input.js +41 -48
- package/dist/components/ui/loading.js +1 -5
- package/dist/components/ui/locale-switcher.js +1 -5
- package/dist/components/ui/pagination.js +3 -7
- package/dist/components/ui/search-menu.js +1 -5
- package/dist/components/ui/sidebar-layout.js +67 -76
- package/dist/components/ui/stats-card.js +1 -5
- package/dist/components/ui/theme-switcher.js +4 -8
- package/dist/components/ui/virtualized-combobox.js +32 -39
- package/dist/lib/docs.js +134 -143
- package/dist/lib/docs.server.js +24 -49
- package/dist/lib/documentation-toolkit.js +25 -50
- package/dist/lib/httpapi-cli.js +7 -7
- package/dist/lib/httpapi-client.js +3 -3
- package/dist/lib/httpapi-helpers.js +11 -11
- package/dist/lib/httpapi-mcp.js +2 -2
- package/dist/lib/httpapi-toolkit.js +2 -2
- package/dist/lib/query.d.ts +16 -6
- package/dist/lib/query.js +17 -8
- package/dist/lib/seo.js +2 -2
- package/dist/lib/utils.d.ts +1 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/services/agent/client/index.js +130 -133
- package/dist/services/agent/index.d.ts +4 -0
- package/dist/services/agent/index.js +1 -1
- package/dist/services/agent/schema.d.ts +6 -0
- package/dist/services/agent/schema.js +6 -5
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +6 -10
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +8 -12
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/package.json +7 -4
|
@@ -9,11 +9,7 @@ import { Languages, Loader2, Plus, Trash } from "lucide-react";
|
|
|
9
9
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
10
10
|
|
|
11
11
|
// ../../src/lib/utils.ts
|
|
12
|
-
import {
|
|
13
|
-
import { twMerge } from "tailwind-merge";
|
|
14
|
-
function cn(...inputs) {
|
|
15
|
-
return twMerge(clsx(inputs));
|
|
16
|
-
}
|
|
12
|
+
import { cn } from "cn";
|
|
17
13
|
|
|
18
14
|
// ../../src/components/ui/button.tsx
|
|
19
15
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
@@ -1116,12 +1112,11 @@ function Label({ className, ...props }) {
|
|
|
1116
1112
|
|
|
1117
1113
|
// ../../src/components/ui/separator.tsx
|
|
1118
1114
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1119
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1120
1115
|
|
|
1121
1116
|
// ../../src/components/ui/field.tsx
|
|
1122
|
-
import { jsx as
|
|
1117
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1123
1118
|
function FieldSet({ className, ...props }) {
|
|
1124
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ jsx8("fieldset", {
|
|
1125
1120
|
"data-slot": "field-set",
|
|
1126
1121
|
className: cn("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
1127
1122
|
...props
|
|
@@ -1132,7 +1127,7 @@ function FieldLegend({
|
|
|
1132
1127
|
variant = "legend",
|
|
1133
1128
|
...props
|
|
1134
1129
|
}) {
|
|
1135
|
-
return /* @__PURE__ */
|
|
1130
|
+
return /* @__PURE__ */ jsx8("legend", {
|
|
1136
1131
|
"data-slot": "field-legend",
|
|
1137
1132
|
"data-variant": variant,
|
|
1138
1133
|
className: cn("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
|
|
@@ -1140,7 +1135,7 @@ function FieldLegend({
|
|
|
1140
1135
|
});
|
|
1141
1136
|
}
|
|
1142
1137
|
function FieldGroup({ className, ...props }) {
|
|
1143
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
1144
1139
|
"data-slot": "field-group",
|
|
1145
1140
|
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
|
|
1146
1141
|
...props
|
|
@@ -1163,7 +1158,7 @@ function Field({
|
|
|
1163
1158
|
orientation = "vertical",
|
|
1164
1159
|
...props
|
|
1165
1160
|
}) {
|
|
1166
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
1167
1162
|
role: "group",
|
|
1168
1163
|
"data-slot": "field",
|
|
1169
1164
|
"data-orientation": orientation,
|
|
@@ -1175,14 +1170,14 @@ function FieldLabel({
|
|
|
1175
1170
|
className,
|
|
1176
1171
|
...props
|
|
1177
1172
|
}) {
|
|
1178
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ jsx8(Label, {
|
|
1179
1174
|
"data-slot": "field-label",
|
|
1180
1175
|
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
1181
1176
|
...props
|
|
1182
1177
|
});
|
|
1183
1178
|
}
|
|
1184
1179
|
function FieldDescription({ className, ...props }) {
|
|
1185
|
-
return /* @__PURE__ */
|
|
1180
|
+
return /* @__PURE__ */ jsx8("p", {
|
|
1186
1181
|
"data-slot": "field-description",
|
|
1187
1182
|
className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
1188
1183
|
...props
|
|
@@ -1192,18 +1187,18 @@ function FieldDescription({ className, ...props }) {
|
|
|
1192
1187
|
// ../../src/components/ui/select.tsx
|
|
1193
1188
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
1194
1189
|
import { ChevronDownIcon, CheckIcon as CheckIcon2, ChevronUpIcon } from "lucide-react";
|
|
1195
|
-
import { jsx as
|
|
1190
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1196
1191
|
"use client";
|
|
1197
1192
|
var Select = SelectPrimitive.Root;
|
|
1198
1193
|
function SelectGroup({ className, ...props }) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ jsx9(SelectPrimitive.Group, {
|
|
1200
1195
|
"data-slot": "select-group",
|
|
1201
1196
|
className: cn("scroll-my-1 p-1", className),
|
|
1202
1197
|
...props
|
|
1203
1198
|
});
|
|
1204
1199
|
}
|
|
1205
1200
|
function SelectValue({ className, ...props }) {
|
|
1206
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ jsx9(SelectPrimitive.Value, {
|
|
1207
1202
|
"data-slot": "select-value",
|
|
1208
1203
|
className: cn("flex flex-1 text-left", className),
|
|
1209
1204
|
...props
|
|
@@ -1222,8 +1217,8 @@ function SelectTrigger({
|
|
|
1222
1217
|
...props,
|
|
1223
1218
|
children: [
|
|
1224
1219
|
children,
|
|
1225
|
-
/* @__PURE__ */
|
|
1226
|
-
render: /* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ jsx9(SelectPrimitive.Icon, {
|
|
1221
|
+
render: /* @__PURE__ */ jsx9(ChevronDownIcon, {
|
|
1227
1222
|
className: "text-muted-foreground pointer-events-none size-4"
|
|
1228
1223
|
})
|
|
1229
1224
|
})
|
|
@@ -1240,8 +1235,8 @@ function SelectContent({
|
|
|
1240
1235
|
alignItemWithTrigger = true,
|
|
1241
1236
|
...props
|
|
1242
1237
|
}) {
|
|
1243
|
-
return /* @__PURE__ */
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1238
|
+
return /* @__PURE__ */ jsx9(SelectPrimitive.Portal, {
|
|
1239
|
+
children: /* @__PURE__ */ jsx9(SelectPrimitive.Positioner, {
|
|
1245
1240
|
side,
|
|
1246
1241
|
sideOffset,
|
|
1247
1242
|
align,
|
|
@@ -1254,11 +1249,11 @@ function SelectContent({
|
|
|
1254
1249
|
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1255
1250
|
...props,
|
|
1256
1251
|
children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ jsx9(SelectScrollUpButton, {}),
|
|
1253
|
+
/* @__PURE__ */ jsx9(SelectPrimitive.List, {
|
|
1259
1254
|
children
|
|
1260
1255
|
}),
|
|
1261
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsx9(SelectScrollDownButton, {})
|
|
1262
1257
|
]
|
|
1263
1258
|
})
|
|
1264
1259
|
})
|
|
@@ -1274,15 +1269,15 @@ function SelectItem({
|
|
|
1274
1269
|
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
1275
1270
|
...props,
|
|
1276
1271
|
children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ jsx9(SelectPrimitive.ItemText, {
|
|
1278
1273
|
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
1279
1274
|
children
|
|
1280
1275
|
}),
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
render: /* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ jsx9(SelectPrimitive.ItemIndicator, {
|
|
1277
|
+
render: /* @__PURE__ */ jsx9("span", {
|
|
1283
1278
|
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
|
|
1284
1279
|
}),
|
|
1285
|
-
children: /* @__PURE__ */
|
|
1280
|
+
children: /* @__PURE__ */ jsx9(CheckIcon2, {
|
|
1286
1281
|
className: "pointer-events-none"
|
|
1287
1282
|
})
|
|
1288
1283
|
})
|
|
@@ -1293,29 +1288,29 @@ function SelectScrollUpButton({
|
|
|
1293
1288
|
className,
|
|
1294
1289
|
...props
|
|
1295
1290
|
}) {
|
|
1296
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ jsx9(SelectPrimitive.ScrollUpArrow, {
|
|
1297
1292
|
"data-slot": "select-scroll-up-button",
|
|
1298
1293
|
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1299
1294
|
...props,
|
|
1300
|
-
children: /* @__PURE__ */
|
|
1295
|
+
children: /* @__PURE__ */ jsx9(ChevronUpIcon, {})
|
|
1301
1296
|
});
|
|
1302
1297
|
}
|
|
1303
1298
|
function SelectScrollDownButton({
|
|
1304
1299
|
className,
|
|
1305
1300
|
...props
|
|
1306
1301
|
}) {
|
|
1307
|
-
return /* @__PURE__ */
|
|
1302
|
+
return /* @__PURE__ */ jsx9(SelectPrimitive.ScrollDownArrow, {
|
|
1308
1303
|
"data-slot": "select-scroll-down-button",
|
|
1309
1304
|
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1310
1305
|
...props,
|
|
1311
|
-
children: /* @__PURE__ */
|
|
1306
|
+
children: /* @__PURE__ */ jsx9(ChevronDownIcon, {})
|
|
1312
1307
|
});
|
|
1313
1308
|
}
|
|
1314
1309
|
|
|
1315
1310
|
// ../../src/components/ui/textarea.tsx
|
|
1316
|
-
import { jsx as
|
|
1311
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1317
1312
|
function Textarea({ className, ...props }) {
|
|
1318
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsx10("textarea", {
|
|
1319
1314
|
"data-slot": "textarea",
|
|
1320
1315
|
className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
1321
1316
|
...props
|
|
@@ -1335,9 +1330,9 @@ import {
|
|
|
1335
1330
|
|
|
1336
1331
|
// ../../src/components/ui/input-group.tsx
|
|
1337
1332
|
import { cva as cva5 } from "class-variance-authority";
|
|
1338
|
-
import { jsx as
|
|
1333
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1339
1334
|
function InputGroup({ className, ...props }) {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1335
|
+
return /* @__PURE__ */ jsx11("div", {
|
|
1341
1336
|
"data-slot": "input-group",
|
|
1342
1337
|
role: "group",
|
|
1343
1338
|
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
@@ -1370,7 +1365,7 @@ function InputGroupInput({
|
|
|
1370
1365
|
className,
|
|
1371
1366
|
...props
|
|
1372
1367
|
}) {
|
|
1373
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ jsx11(Input, {
|
|
1374
1369
|
"data-slot": "input-group-control",
|
|
1375
1370
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
1376
1371
|
...props
|
|
@@ -1378,7 +1373,7 @@ function InputGroupInput({
|
|
|
1378
1373
|
}
|
|
1379
1374
|
|
|
1380
1375
|
// ../../src/components/ui/virtualized-combobox.tsx
|
|
1381
|
-
import { jsx as
|
|
1376
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1382
1377
|
"use client";
|
|
1383
1378
|
var messages2 = {
|
|
1384
1379
|
en: {
|
|
@@ -1454,19 +1449,19 @@ var VirtualizedComboboxList = ({
|
|
|
1454
1449
|
virtualizer.measure();
|
|
1455
1450
|
}, [virtualizer]);
|
|
1456
1451
|
if (filteredItems.length === 0) {
|
|
1457
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
1458
1453
|
className: "text-muted-foreground py-6 text-center text-sm",
|
|
1459
1454
|
children: emptyLabel
|
|
1460
1455
|
});
|
|
1461
1456
|
}
|
|
1462
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ jsx12(ComboboxPrimitive.List, {
|
|
1463
1458
|
className: "scroll-py-1 overflow-auto overscroll-contain p-1",
|
|
1464
1459
|
ref: handleScrollElementRef,
|
|
1465
1460
|
style: {
|
|
1466
1461
|
height: Math.min(virtualizer.getTotalSize() + 8, 288),
|
|
1467
1462
|
maxHeight: "var(--available-height)"
|
|
1468
1463
|
},
|
|
1469
|
-
children: /* @__PURE__ */
|
|
1464
|
+
children: /* @__PURE__ */ jsx12("div", {
|
|
1470
1465
|
className: "relative w-full",
|
|
1471
1466
|
role: "presentation",
|
|
1472
1467
|
style: { height: virtualizer.getTotalSize() },
|
|
@@ -1479,9 +1474,9 @@ var VirtualizedComboboxList = ({
|
|
|
1479
1474
|
transform: `translateY(${virtualItem.start}px)`
|
|
1480
1475
|
};
|
|
1481
1476
|
if (entry.kind === "group") {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ jsx12(ComboboxPrimitive.Group, {
|
|
1483
1478
|
className: "contents",
|
|
1484
|
-
children: /* @__PURE__ */
|
|
1479
|
+
children: /* @__PURE__ */ jsx12(ComboboxPrimitive.GroupLabel, {
|
|
1485
1480
|
className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
|
|
1486
1481
|
"data-index": virtualItem.index,
|
|
1487
1482
|
ref: virtualizer.measureElement,
|
|
@@ -1500,13 +1495,13 @@ var VirtualizedComboboxList = ({
|
|
|
1500
1495
|
style,
|
|
1501
1496
|
value: entry.item,
|
|
1502
1497
|
children: [
|
|
1503
|
-
renderItem?.(entry.item) ?? /* @__PURE__ */
|
|
1498
|
+
renderItem?.(entry.item) ?? /* @__PURE__ */ jsx12("span", {
|
|
1504
1499
|
className: "min-w-0 truncate",
|
|
1505
1500
|
children: entry.item.label
|
|
1506
1501
|
}),
|
|
1507
|
-
/* @__PURE__ */
|
|
1502
|
+
/* @__PURE__ */ jsx12(ComboboxPrimitive.ItemIndicator, {
|
|
1508
1503
|
className: "absolute right-2 flex size-4 items-center justify-center",
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1504
|
+
children: /* @__PURE__ */ jsx12(Check, {})
|
|
1510
1505
|
})
|
|
1511
1506
|
]
|
|
1512
1507
|
}, entry.item.value);
|
|
@@ -1525,8 +1520,8 @@ var VirtualizedComboboxContent = ({
|
|
|
1525
1520
|
virtualizerRef
|
|
1526
1521
|
}) => {
|
|
1527
1522
|
const labels = virtualizedComboboxMessages(messageOverrides);
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
children: /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx12(ComboboxPrimitive.Portal, {
|
|
1524
|
+
children: /* @__PURE__ */ jsx12(ComboboxPrimitive.Positioner, {
|
|
1530
1525
|
align: "start",
|
|
1531
1526
|
className: "isolate z-50",
|
|
1532
1527
|
side: "bottom",
|
|
@@ -1534,17 +1529,17 @@ var VirtualizedComboboxContent = ({
|
|
|
1534
1529
|
children: /* @__PURE__ */ jsxs5(ComboboxPrimitive.Popup, {
|
|
1535
1530
|
className: cn("relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-in-95", contentClassName),
|
|
1536
1531
|
children: [
|
|
1537
|
-
/* @__PURE__ */
|
|
1532
|
+
/* @__PURE__ */ jsx12("div", {
|
|
1538
1533
|
className: "min-w-0 p-1 pb-0",
|
|
1539
|
-
children: /* @__PURE__ */
|
|
1534
|
+
children: /* @__PURE__ */ jsx12(InputGroup, {
|
|
1540
1535
|
className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
|
|
1541
|
-
children: /* @__PURE__ */
|
|
1536
|
+
children: /* @__PURE__ */ jsx12(ComboboxPrimitive.Input, {
|
|
1542
1537
|
placeholder: labels.search,
|
|
1543
|
-
render: /* @__PURE__ */
|
|
1538
|
+
render: /* @__PURE__ */ jsx12(InputGroupInput, {})
|
|
1544
1539
|
})
|
|
1545
1540
|
})
|
|
1546
1541
|
}),
|
|
1547
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ jsx12(VirtualizedComboboxList, {
|
|
1548
1543
|
emptyLabel,
|
|
1549
1544
|
groupSelections,
|
|
1550
1545
|
itemIndexRef,
|
|
@@ -1567,20 +1562,20 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
|
|
|
1567
1562
|
type: "button",
|
|
1568
1563
|
variant: "outline",
|
|
1569
1564
|
children: [
|
|
1570
|
-
/* @__PURE__ */
|
|
1565
|
+
/* @__PURE__ */ jsx12("span", {
|
|
1571
1566
|
className: "min-w-0 flex-1 truncate pr-7 text-left",
|
|
1572
1567
|
children: label
|
|
1573
1568
|
}),
|
|
1574
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ jsx12(ChevronsUpDown, {
|
|
1575
1570
|
className: "text-muted-foreground shrink-0 opacity-70"
|
|
1576
1571
|
})
|
|
1577
1572
|
]
|
|
1578
1573
|
});
|
|
1579
|
-
var defaultClear = (label) => /* @__PURE__ */
|
|
1574
|
+
var defaultClear = (label) => /* @__PURE__ */ jsx12(ComboboxPrimitive.Clear, {
|
|
1580
1575
|
"aria-label": label,
|
|
1581
1576
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute top-1/2 right-7 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-sm outline-none focus-visible:border focus-visible:ring-3",
|
|
1582
1577
|
type: "button",
|
|
1583
|
-
children: /* @__PURE__ */
|
|
1578
|
+
children: /* @__PURE__ */ jsx12(X, {
|
|
1584
1579
|
className: "size-3.5"
|
|
1585
1580
|
})
|
|
1586
1581
|
});
|
|
@@ -1619,13 +1614,13 @@ var VirtualizedComboboxSingle = (props) => {
|
|
|
1619
1614
|
/* @__PURE__ */ jsxs5("div", {
|
|
1620
1615
|
className: "relative",
|
|
1621
1616
|
children: [
|
|
1622
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ jsx12(ComboboxPrimitive.Trigger, {
|
|
1623
1618
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
1624
1619
|
}),
|
|
1625
1620
|
props.trigger ? null : defaultClear(labels.clear)
|
|
1626
1621
|
]
|
|
1627
1622
|
}),
|
|
1628
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ jsx12(VirtualizedComboboxContent, {
|
|
1629
1624
|
...props,
|
|
1630
1625
|
groupSelections: false,
|
|
1631
1626
|
itemIndexRef,
|
|
@@ -1661,13 +1656,13 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
1661
1656
|
/* @__PURE__ */ jsxs5("div", {
|
|
1662
1657
|
className: "relative",
|
|
1663
1658
|
children: [
|
|
1664
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ jsx12(ComboboxPrimitive.Trigger, {
|
|
1665
1660
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
1666
1661
|
}),
|
|
1667
1662
|
props.trigger ? null : defaultClear(labels.clear)
|
|
1668
1663
|
]
|
|
1669
1664
|
}),
|
|
1670
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ jsx12(VirtualizedComboboxContent, {
|
|
1671
1666
|
...props,
|
|
1672
1667
|
groupSelections: true,
|
|
1673
1668
|
itemIndexRef,
|
|
@@ -1678,15 +1673,15 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
1678
1673
|
});
|
|
1679
1674
|
};
|
|
1680
1675
|
function VirtualizedCombobox(props) {
|
|
1681
|
-
return props.multiple ? /* @__PURE__ */
|
|
1676
|
+
return props.multiple ? /* @__PURE__ */ jsx12(VirtualizedComboboxMultiple, {
|
|
1682
1677
|
...props
|
|
1683
|
-
}) : /* @__PURE__ */
|
|
1678
|
+
}) : /* @__PURE__ */ jsx12(VirtualizedComboboxSingle, {
|
|
1684
1679
|
...props
|
|
1685
1680
|
});
|
|
1686
1681
|
}
|
|
1687
1682
|
|
|
1688
1683
|
// ../../src/components/ui/effect-form.tsx
|
|
1689
|
-
import { jsx as
|
|
1684
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1690
1685
|
var messages3 = {
|
|
1691
1686
|
en: {
|
|
1692
1687
|
add: "Add",
|
|
@@ -1747,21 +1742,21 @@ var FieldWrapper = ({
|
|
|
1747
1742
|
localized && editingLocale && locales2 && /* @__PURE__ */ jsxs6(Badge, {
|
|
1748
1743
|
variant: "outline",
|
|
1749
1744
|
children: [
|
|
1750
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ jsx13(Languages, {}),
|
|
1751
1746
|
locales2.find(({ value }) => value === editingLocale)?.label
|
|
1752
1747
|
]
|
|
1753
1748
|
})
|
|
1754
1749
|
]
|
|
1755
1750
|
}),
|
|
1756
|
-
description && /* @__PURE__ */
|
|
1751
|
+
description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1757
1752
|
children: description
|
|
1758
1753
|
}),
|
|
1759
|
-
/* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ jsx13(FieldGroup, {
|
|
1760
1755
|
children
|
|
1761
1756
|
})
|
|
1762
1757
|
]
|
|
1763
1758
|
});
|
|
1764
|
-
var ErrorMessage = ({ text }) => /* @__PURE__ */
|
|
1759
|
+
var ErrorMessage = ({ text }) => /* @__PURE__ */ jsx13("em", {
|
|
1765
1760
|
role: "alert",
|
|
1766
1761
|
className: "text-destructive text-sm",
|
|
1767
1762
|
children: text
|
|
@@ -1770,7 +1765,7 @@ var SubmitError = ({
|
|
|
1770
1765
|
result
|
|
1771
1766
|
}) => {
|
|
1772
1767
|
const message = AsyncResult.isFailure(result) ? Schema2.isSchemaError(Cause.squash(result.cause)) ? undefined : getCauseErrorMessage(result.cause) : undefined;
|
|
1773
|
-
return message ? /* @__PURE__ */
|
|
1768
|
+
return message ? /* @__PURE__ */ jsx13(ErrorMessage, {
|
|
1774
1769
|
text: message
|
|
1775
1770
|
}) : null;
|
|
1776
1771
|
};
|
|
@@ -1794,7 +1789,7 @@ var SubmitButton = ({
|
|
|
1794
1789
|
submit();
|
|
1795
1790
|
},
|
|
1796
1791
|
children: [
|
|
1797
|
-
submitResult.waiting && /* @__PURE__ */
|
|
1792
|
+
submitResult.waiting && /* @__PURE__ */ jsx13(Loader2, {
|
|
1798
1793
|
"data-icon": "inline-start",
|
|
1799
1794
|
className: "animate-spin"
|
|
1800
1795
|
}),
|
|
@@ -1807,7 +1802,7 @@ var FieldError = ({
|
|
|
1807
1802
|
message
|
|
1808
1803
|
}) => Option.match(error, {
|
|
1809
1804
|
onNone: () => null,
|
|
1810
|
-
onSome: (errorMessage) => /* @__PURE__ */
|
|
1805
|
+
onSome: (errorMessage) => /* @__PURE__ */ jsx13(ErrorMessage, {
|
|
1811
1806
|
text: message ?? errorMessage
|
|
1812
1807
|
})
|
|
1813
1808
|
});
|
|
@@ -1822,14 +1817,14 @@ var TextField = ({
|
|
|
1822
1817
|
/* @__PURE__ */ jsxs6("div", {
|
|
1823
1818
|
className: "flex w-full items-center gap-2",
|
|
1824
1819
|
children: [
|
|
1825
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
1826
1821
|
htmlFor: field.path,
|
|
1827
1822
|
children: label
|
|
1828
1823
|
}),
|
|
1829
1824
|
children
|
|
1830
1825
|
]
|
|
1831
1826
|
}),
|
|
1832
|
-
/* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ jsx13(Input, {
|
|
1833
1828
|
...inputProps,
|
|
1834
1829
|
id: field.path,
|
|
1835
1830
|
name: field.path,
|
|
@@ -1838,10 +1833,10 @@ var TextField = ({
|
|
|
1838
1833
|
onChange: (event) => field.onChange(event.target.value),
|
|
1839
1834
|
"aria-invalid": Option.isSome(field.error)
|
|
1840
1835
|
}),
|
|
1841
|
-
description && /* @__PURE__ */
|
|
1836
|
+
description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1842
1837
|
children: description
|
|
1843
1838
|
}),
|
|
1844
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
1845
1840
|
error: field.error,
|
|
1846
1841
|
message: errorMessage
|
|
1847
1842
|
})
|
|
@@ -1851,7 +1846,7 @@ var TextField = ({
|
|
|
1851
1846
|
var NameField = ({
|
|
1852
1847
|
field,
|
|
1853
1848
|
props
|
|
1854
|
-
}) => /* @__PURE__ */
|
|
1849
|
+
}) => /* @__PURE__ */ jsx13(TextField, {
|
|
1855
1850
|
field,
|
|
1856
1851
|
props: {
|
|
1857
1852
|
...props,
|
|
@@ -1869,14 +1864,14 @@ var TextAreaField = ({ field, props }) => {
|
|
|
1869
1864
|
/* @__PURE__ */ jsxs6("div", {
|
|
1870
1865
|
className: "flex w-full items-center gap-2",
|
|
1871
1866
|
children: [
|
|
1872
|
-
/* @__PURE__ */
|
|
1867
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
1873
1868
|
htmlFor: field.path,
|
|
1874
1869
|
children: label
|
|
1875
1870
|
}),
|
|
1876
1871
|
children
|
|
1877
1872
|
]
|
|
1878
1873
|
}),
|
|
1879
|
-
/* @__PURE__ */
|
|
1874
|
+
/* @__PURE__ */ jsx13(Textarea, {
|
|
1880
1875
|
...nativeTextareaProps,
|
|
1881
1876
|
id: field.path,
|
|
1882
1877
|
name: field.path,
|
|
@@ -1885,16 +1880,16 @@ var TextAreaField = ({ field, props }) => {
|
|
|
1885
1880
|
onChange: (event) => field.onChange(event.target.value),
|
|
1886
1881
|
"aria-invalid": Option.isSome(field.error)
|
|
1887
1882
|
}),
|
|
1888
|
-
description && /* @__PURE__ */
|
|
1883
|
+
description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1889
1884
|
children: description
|
|
1890
1885
|
}),
|
|
1891
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
1892
1887
|
error: field.error
|
|
1893
1888
|
})
|
|
1894
1889
|
]
|
|
1895
1890
|
});
|
|
1896
1891
|
};
|
|
1897
|
-
var DescriptionField = ({ field, props }) => /* @__PURE__ */
|
|
1892
|
+
var DescriptionField = ({ field, props }) => /* @__PURE__ */ jsx13(TextAreaField, {
|
|
1898
1893
|
field,
|
|
1899
1894
|
props: { ...props, label: effectFormMessages().description }
|
|
1900
1895
|
});
|
|
@@ -1903,11 +1898,11 @@ var FileField = ({ field, props }) => {
|
|
|
1903
1898
|
return /* @__PURE__ */ jsxs6(Field, {
|
|
1904
1899
|
"data-invalid": invalid,
|
|
1905
1900
|
children: [
|
|
1906
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
1907
1902
|
htmlFor: field.path,
|
|
1908
1903
|
children: props.label
|
|
1909
1904
|
}),
|
|
1910
|
-
/* @__PURE__ */
|
|
1905
|
+
/* @__PURE__ */ jsx13(FilePicker, {
|
|
1911
1906
|
accept: props.accept ?? "",
|
|
1912
1907
|
canClear: field.value instanceof File,
|
|
1913
1908
|
...field.value ? { file: field.value } : {},
|
|
@@ -1926,10 +1921,10 @@ var FileField = ({ field, props }) => {
|
|
|
1926
1921
|
...props.required === undefined ? {} : { required: props.required },
|
|
1927
1922
|
title: field.value?.name ?? props.label
|
|
1928
1923
|
}),
|
|
1929
|
-
props.description && /* @__PURE__ */
|
|
1924
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1930
1925
|
children: props.description
|
|
1931
1926
|
}),
|
|
1932
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
1933
1928
|
error: field.error
|
|
1934
1929
|
})
|
|
1935
1930
|
]
|
|
@@ -1945,14 +1940,14 @@ var NullableTextAreaField = ({ field, props }) => {
|
|
|
1945
1940
|
/* @__PURE__ */ jsxs6("div", {
|
|
1946
1941
|
className: "flex w-full items-center gap-2",
|
|
1947
1942
|
children: [
|
|
1948
|
-
/* @__PURE__ */
|
|
1943
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
1949
1944
|
htmlFor: field.path,
|
|
1950
1945
|
children: label
|
|
1951
1946
|
}),
|
|
1952
1947
|
children
|
|
1953
1948
|
]
|
|
1954
1949
|
}),
|
|
1955
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx13(Textarea, {
|
|
1956
1951
|
...nativeTextareaProps,
|
|
1957
1952
|
id: field.path,
|
|
1958
1953
|
name: field.path,
|
|
@@ -1961,10 +1956,10 @@ var NullableTextAreaField = ({ field, props }) => {
|
|
|
1961
1956
|
onChange: (event) => field.onChange(event.target.value),
|
|
1962
1957
|
"aria-invalid": Option.isSome(field.error)
|
|
1963
1958
|
}),
|
|
1964
|
-
description && /* @__PURE__ */
|
|
1959
|
+
description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1965
1960
|
children: description
|
|
1966
1961
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
1968
1963
|
error: field.error
|
|
1969
1964
|
})
|
|
1970
1965
|
]
|
|
@@ -1979,7 +1974,7 @@ var CheckboxField = ({
|
|
|
1979
1974
|
/* @__PURE__ */ jsxs6("div", {
|
|
1980
1975
|
className: "flex w-full flex-row items-center gap-2",
|
|
1981
1976
|
children: [
|
|
1982
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx13(Checkbox, {
|
|
1983
1978
|
id: field.path,
|
|
1984
1979
|
name: field.path,
|
|
1985
1980
|
checked: field.value,
|
|
@@ -1987,17 +1982,17 @@ var CheckboxField = ({
|
|
|
1987
1982
|
onCheckedChange: field.onChange,
|
|
1988
1983
|
"aria-invalid": Option.isSome(field.error)
|
|
1989
1984
|
}),
|
|
1990
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
1991
1986
|
htmlFor: field.path,
|
|
1992
1987
|
children: props.label
|
|
1993
1988
|
}),
|
|
1994
1989
|
props.children
|
|
1995
1990
|
]
|
|
1996
1991
|
}),
|
|
1997
|
-
props.description && /* @__PURE__ */
|
|
1992
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
1998
1993
|
children: props.description
|
|
1999
1994
|
}),
|
|
2000
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2001
1996
|
error: field.error
|
|
2002
1997
|
})
|
|
2003
1998
|
]
|
|
@@ -2008,7 +2003,7 @@ var SelectField = ({
|
|
|
2008
2003
|
}) => /* @__PURE__ */ jsxs6(Field, {
|
|
2009
2004
|
"data-invalid": Option.isSome(field.error),
|
|
2010
2005
|
children: [
|
|
2011
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2012
2007
|
htmlFor: field.path,
|
|
2013
2008
|
children: props.label
|
|
2014
2009
|
}),
|
|
@@ -2020,16 +2015,16 @@ var SelectField = ({
|
|
|
2020
2015
|
},
|
|
2021
2016
|
value: field.value,
|
|
2022
2017
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2018
|
+
/* @__PURE__ */ jsx13(SelectTrigger, {
|
|
2024
2019
|
id: field.path,
|
|
2025
2020
|
"aria-invalid": Option.isSome(field.error),
|
|
2026
|
-
children: /* @__PURE__ */
|
|
2021
|
+
children: /* @__PURE__ */ jsx13(SelectValue, {
|
|
2027
2022
|
placeholder: props.placeholder
|
|
2028
2023
|
})
|
|
2029
2024
|
}),
|
|
2030
|
-
/* @__PURE__ */
|
|
2031
|
-
children: /* @__PURE__ */
|
|
2032
|
-
children: props.options.map((option) => /* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ jsx13(SelectContent, {
|
|
2026
|
+
children: /* @__PURE__ */ jsx13(SelectGroup, {
|
|
2027
|
+
children: props.options.map((option) => /* @__PURE__ */ jsx13(SelectItem, {
|
|
2033
2028
|
value: option.value,
|
|
2034
2029
|
children: option.label
|
|
2035
2030
|
}, option.value))
|
|
@@ -2037,10 +2032,10 @@ var SelectField = ({
|
|
|
2037
2032
|
})
|
|
2038
2033
|
]
|
|
2039
2034
|
}),
|
|
2040
|
-
props.description && /* @__PURE__ */
|
|
2035
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2041
2036
|
children: props.description
|
|
2042
2037
|
}),
|
|
2043
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2044
2039
|
error: field.error
|
|
2045
2040
|
})
|
|
2046
2041
|
]
|
|
@@ -2048,7 +2043,7 @@ var SelectField = ({
|
|
|
2048
2043
|
var FolderField = ({
|
|
2049
2044
|
field,
|
|
2050
2045
|
props
|
|
2051
|
-
}) => /* @__PURE__ */
|
|
2046
|
+
}) => /* @__PURE__ */ jsx13(SelectField, {
|
|
2052
2047
|
field,
|
|
2053
2048
|
props: { ...props, label: effectFormMessages().folder }
|
|
2054
2049
|
});
|
|
@@ -2058,7 +2053,7 @@ var MultiSelectField = ({
|
|
|
2058
2053
|
}) => /* @__PURE__ */ jsxs6(Field, {
|
|
2059
2054
|
"data-invalid": Option.isSome(field.error),
|
|
2060
2055
|
children: [
|
|
2061
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2062
2057
|
htmlFor: field.path,
|
|
2063
2058
|
children: props.label
|
|
2064
2059
|
}),
|
|
@@ -2068,17 +2063,17 @@ var MultiSelectField = ({
|
|
|
2068
2063
|
multiple: true,
|
|
2069
2064
|
value: Array.from(field.value),
|
|
2070
2065
|
children: [
|
|
2071
|
-
/* @__PURE__ */
|
|
2066
|
+
/* @__PURE__ */ jsx13(SelectTrigger, {
|
|
2072
2067
|
className: "gap-1",
|
|
2073
2068
|
id: field.path,
|
|
2074
2069
|
"aria-invalid": Option.isSome(field.error),
|
|
2075
|
-
children: /* @__PURE__ */
|
|
2070
|
+
children: /* @__PURE__ */ jsx13(SelectValue, {
|
|
2076
2071
|
placeholder: props.placeholder
|
|
2077
2072
|
})
|
|
2078
2073
|
}),
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2081
|
-
children: props.options.map((option) => /* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsx13(SelectContent, {
|
|
2075
|
+
children: /* @__PURE__ */ jsx13(SelectGroup, {
|
|
2076
|
+
children: props.options.map((option) => /* @__PURE__ */ jsx13(SelectItem, {
|
|
2082
2077
|
value: option.value,
|
|
2083
2078
|
children: option.label
|
|
2084
2079
|
}, option.value))
|
|
@@ -2086,10 +2081,10 @@ var MultiSelectField = ({
|
|
|
2086
2081
|
})
|
|
2087
2082
|
]
|
|
2088
2083
|
}),
|
|
2089
|
-
props.description && /* @__PURE__ */
|
|
2084
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2090
2085
|
children: props.description
|
|
2091
2086
|
}),
|
|
2092
|
-
/* @__PURE__ */
|
|
2087
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2093
2088
|
error: field.error
|
|
2094
2089
|
})
|
|
2095
2090
|
]
|
|
@@ -2100,7 +2095,7 @@ var NullableMultiSelectField = ({
|
|
|
2100
2095
|
}) => /* @__PURE__ */ jsxs6(Field, {
|
|
2101
2096
|
"data-invalid": Option.isSome(field.error),
|
|
2102
2097
|
children: [
|
|
2103
|
-
/* @__PURE__ */
|
|
2098
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2104
2099
|
htmlFor: field.path,
|
|
2105
2100
|
children: props.label
|
|
2106
2101
|
}),
|
|
@@ -2110,17 +2105,17 @@ var NullableMultiSelectField = ({
|
|
|
2110
2105
|
multiple: true,
|
|
2111
2106
|
value: field.value ? Array.from(field.value) : [],
|
|
2112
2107
|
children: [
|
|
2113
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ jsx13(SelectTrigger, {
|
|
2114
2109
|
className: "gap-1",
|
|
2115
2110
|
id: field.path,
|
|
2116
2111
|
"aria-invalid": Option.isSome(field.error),
|
|
2117
|
-
children: /* @__PURE__ */
|
|
2112
|
+
children: /* @__PURE__ */ jsx13(SelectValue, {
|
|
2118
2113
|
placeholder: props.placeholder
|
|
2119
2114
|
})
|
|
2120
2115
|
}),
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
children: /* @__PURE__ */
|
|
2123
|
-
children: props.options.map((option) => /* @__PURE__ */
|
|
2116
|
+
/* @__PURE__ */ jsx13(SelectContent, {
|
|
2117
|
+
children: /* @__PURE__ */ jsx13(SelectGroup, {
|
|
2118
|
+
children: props.options.map((option) => /* @__PURE__ */ jsx13(SelectItem, {
|
|
2124
2119
|
value: option.value,
|
|
2125
2120
|
children: option.label
|
|
2126
2121
|
}, option.value))
|
|
@@ -2128,10 +2123,10 @@ var NullableMultiSelectField = ({
|
|
|
2128
2123
|
})
|
|
2129
2124
|
]
|
|
2130
2125
|
}),
|
|
2131
|
-
props.description && /* @__PURE__ */
|
|
2126
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2132
2127
|
children: props.description
|
|
2133
2128
|
}),
|
|
2134
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2135
2130
|
error: field.error
|
|
2136
2131
|
})
|
|
2137
2132
|
]
|
|
@@ -2160,11 +2155,11 @@ var SearchableSelectField = ({
|
|
|
2160
2155
|
className: "min-w-0",
|
|
2161
2156
|
"data-invalid": invalid,
|
|
2162
2157
|
children: [
|
|
2163
|
-
/* @__PURE__ */
|
|
2158
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2164
2159
|
htmlFor: field.path,
|
|
2165
2160
|
children: props.label
|
|
2166
2161
|
}),
|
|
2167
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ jsx13(VirtualizedCombobox, {
|
|
2168
2163
|
ariaInvalid: invalid,
|
|
2169
2164
|
ariaLabel,
|
|
2170
2165
|
emptyLabel: props.emptyLabel,
|
|
@@ -2179,10 +2174,10 @@ var SearchableSelectField = ({
|
|
|
2179
2174
|
triggerId: field.path,
|
|
2180
2175
|
value: selectedItems
|
|
2181
2176
|
}),
|
|
2182
|
-
props.description && /* @__PURE__ */
|
|
2177
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2183
2178
|
children: props.description
|
|
2184
2179
|
}),
|
|
2185
|
-
/* @__PURE__ */
|
|
2180
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2186
2181
|
error: field.error
|
|
2187
2182
|
})
|
|
2188
2183
|
]
|
|
@@ -2200,11 +2195,11 @@ var SingleSearchableSelectField = ({
|
|
|
2200
2195
|
className: "min-w-0",
|
|
2201
2196
|
"data-invalid": invalid,
|
|
2202
2197
|
children: [
|
|
2203
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2204
2199
|
htmlFor: field.path,
|
|
2205
2200
|
children: props.label
|
|
2206
2201
|
}),
|
|
2207
|
-
/* @__PURE__ */
|
|
2202
|
+
/* @__PURE__ */ jsx13(VirtualizedCombobox, {
|
|
2208
2203
|
ariaInvalid: invalid,
|
|
2209
2204
|
ariaLabel,
|
|
2210
2205
|
emptyLabel: props.emptyLabel,
|
|
@@ -2218,10 +2213,10 @@ var SingleSearchableSelectField = ({
|
|
|
2218
2213
|
triggerId: field.path,
|
|
2219
2214
|
value: selectedItems[0] ?? null
|
|
2220
2215
|
}),
|
|
2221
|
-
props.description && /* @__PURE__ */
|
|
2216
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2222
2217
|
children: props.description
|
|
2223
2218
|
}),
|
|
2224
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2225
2220
|
error: field.error
|
|
2226
2221
|
})
|
|
2227
2222
|
]
|
|
@@ -2236,13 +2231,13 @@ var NullableKeyValueField = ({
|
|
|
2236
2231
|
return /* @__PURE__ */ jsxs6(Field, {
|
|
2237
2232
|
"data-invalid": Option.isSome(field.error),
|
|
2238
2233
|
children: [
|
|
2239
|
-
/* @__PURE__ */
|
|
2234
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2240
2235
|
children: props.label
|
|
2241
2236
|
}),
|
|
2242
2237
|
entries.map(([key, value], index) => /* @__PURE__ */ jsxs6("div", {
|
|
2243
2238
|
className: "flex w-full flex-row items-center gap-2",
|
|
2244
2239
|
children: [
|
|
2245
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ jsx13(Input, {
|
|
2246
2241
|
id: `${field.path}-${index}-key`,
|
|
2247
2242
|
name: `${field.path}.${index}.key`,
|
|
2248
2243
|
type: "text",
|
|
@@ -2253,7 +2248,7 @@ var NullableKeyValueField = ({
|
|
|
2253
2248
|
onChange: (event) => field.onChange(updateEntry(index, event.target.value, value)),
|
|
2254
2249
|
"aria-invalid": Option.isSome(field.error)
|
|
2255
2250
|
}),
|
|
2256
|
-
/* @__PURE__ */
|
|
2251
|
+
/* @__PURE__ */ jsx13(Input, {
|
|
2257
2252
|
id: `${field.path}-${index}-value`,
|
|
2258
2253
|
name: `${field.path}.${index}.value`,
|
|
2259
2254
|
type: "text",
|
|
@@ -2269,7 +2264,7 @@ var NullableKeyValueField = ({
|
|
|
2269
2264
|
variant: "secondary",
|
|
2270
2265
|
onClick: () => field.onChange(Object.fromEntries(entries.filter((_, currentIndex) => currentIndex !== index))),
|
|
2271
2266
|
children: [
|
|
2272
|
-
/* @__PURE__ */
|
|
2267
|
+
/* @__PURE__ */ jsx13(Trash, {
|
|
2273
2268
|
"data-icon": "inline-start"
|
|
2274
2269
|
}),
|
|
2275
2270
|
effectFormMessages().delete
|
|
@@ -2283,16 +2278,16 @@ var NullableKeyValueField = ({
|
|
|
2283
2278
|
className: "self-start",
|
|
2284
2279
|
onClick: () => field.onChange({ ...field.value, "": "" }),
|
|
2285
2280
|
children: [
|
|
2286
|
-
/* @__PURE__ */
|
|
2281
|
+
/* @__PURE__ */ jsx13(Plus, {
|
|
2287
2282
|
"data-icon": "inline-start"
|
|
2288
2283
|
}),
|
|
2289
2284
|
effectFormMessages().add
|
|
2290
2285
|
]
|
|
2291
2286
|
}),
|
|
2292
|
-
props.description && /* @__PURE__ */
|
|
2287
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2293
2288
|
children: props.description
|
|
2294
2289
|
}),
|
|
2295
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2296
2291
|
error: field.error
|
|
2297
2292
|
})
|
|
2298
2293
|
]
|
|
@@ -2307,13 +2302,13 @@ var KeyValueField = ({
|
|
|
2307
2302
|
return /* @__PURE__ */ jsxs6(Field, {
|
|
2308
2303
|
"data-invalid": Option.isSome(field.error),
|
|
2309
2304
|
children: [
|
|
2310
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2311
2306
|
children: props.label
|
|
2312
2307
|
}),
|
|
2313
2308
|
entries.map(([key, value], index) => /* @__PURE__ */ jsxs6("div", {
|
|
2314
2309
|
className: "flex w-full flex-row items-center gap-2",
|
|
2315
2310
|
children: [
|
|
2316
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx13(Input, {
|
|
2317
2312
|
id: `${field.path}-${index}-key`,
|
|
2318
2313
|
name: `${field.path}.${index}.key`,
|
|
2319
2314
|
type: "text",
|
|
@@ -2324,7 +2319,7 @@ var KeyValueField = ({
|
|
|
2324
2319
|
onChange: (event) => field.onChange(updateEntry(index, event.target.value, value)),
|
|
2325
2320
|
"aria-invalid": Option.isSome(field.error)
|
|
2326
2321
|
}),
|
|
2327
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ jsx13(Input, {
|
|
2328
2323
|
id: `${field.path}-${index}-value`,
|
|
2329
2324
|
name: `${field.path}.${index}.value`,
|
|
2330
2325
|
type: "text",
|
|
@@ -2340,7 +2335,7 @@ var KeyValueField = ({
|
|
|
2340
2335
|
variant: "secondary",
|
|
2341
2336
|
onClick: () => field.onChange(Object.fromEntries(entries.filter((_, currentIndex) => currentIndex !== index))),
|
|
2342
2337
|
children: [
|
|
2343
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx13(Trash, {
|
|
2344
2339
|
"data-icon": "inline-start"
|
|
2345
2340
|
}),
|
|
2346
2341
|
effectFormMessages().delete
|
|
@@ -2354,16 +2349,16 @@ var KeyValueField = ({
|
|
|
2354
2349
|
className: "self-start",
|
|
2355
2350
|
onClick: () => field.onChange({ ...field.value, "": "" }),
|
|
2356
2351
|
children: [
|
|
2357
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ jsx13(Plus, {
|
|
2358
2353
|
"data-icon": "inline-start"
|
|
2359
2354
|
}),
|
|
2360
2355
|
effectFormMessages().add
|
|
2361
2356
|
]
|
|
2362
2357
|
}),
|
|
2363
|
-
props.description && /* @__PURE__ */
|
|
2358
|
+
props.description && /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2364
2359
|
children: props.description
|
|
2365
2360
|
}),
|
|
2366
|
-
/* @__PURE__ */
|
|
2361
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2367
2362
|
error: field.error
|
|
2368
2363
|
})
|
|
2369
2364
|
]
|
|
@@ -2372,9 +2367,9 @@ var KeyValueField = ({
|
|
|
2372
2367
|
var RevertButton = ({
|
|
2373
2368
|
field,
|
|
2374
2369
|
props
|
|
2375
|
-
}) => field.value === props.original ? null : /* @__PURE__ */
|
|
2370
|
+
}) => field.value === props.original ? null : /* @__PURE__ */ jsx13("div", {
|
|
2376
2371
|
className: "flex flex-1 justify-end",
|
|
2377
|
-
children: /* @__PURE__ */
|
|
2372
|
+
children: /* @__PURE__ */ jsx13(Button, {
|
|
2378
2373
|
type: "button",
|
|
2379
2374
|
variant: "link",
|
|
2380
2375
|
className: "-mr-4 h-auto py-0",
|
|
@@ -2388,11 +2383,11 @@ var ImageField = ({ field, props }) => {
|
|
|
2388
2383
|
return /* @__PURE__ */ jsxs6(Field, {
|
|
2389
2384
|
"data-invalid": invalid,
|
|
2390
2385
|
children: [
|
|
2391
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ jsx13(FieldLabel, {
|
|
2392
2387
|
htmlFor: field.path,
|
|
2393
2388
|
children: props.label
|
|
2394
2389
|
}),
|
|
2395
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsx13(FilePicker, {
|
|
2396
2391
|
accept: "image/*",
|
|
2397
2392
|
onBlur: field.onBlur,
|
|
2398
2393
|
canClear: Boolean(field.value),
|
|
@@ -2412,40 +2407,40 @@ var ImageField = ({ field, props }) => {
|
|
|
2412
2407
|
onClear: () => field.onChange(null),
|
|
2413
2408
|
title: field.value instanceof File ? field.value.name : props.label
|
|
2414
2409
|
}),
|
|
2415
|
-
props.size.suggestedWidth && props.size.suggestedHeight ? /* @__PURE__ */
|
|
2410
|
+
props.size.suggestedWidth && props.size.suggestedHeight ? /* @__PURE__ */ jsx13(FieldDescription, {
|
|
2416
2411
|
children: effectFormMessages().suggestedImageSize(String(props.size.suggestedWidth), String(props.size.suggestedHeight))
|
|
2417
2412
|
}) : null,
|
|
2418
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ jsx13(FieldError, {
|
|
2419
2414
|
error: field.error
|
|
2420
2415
|
})
|
|
2421
2416
|
]
|
|
2422
2417
|
});
|
|
2423
2418
|
};
|
|
2424
|
-
var NavigationBlock = ({ shouldBlock }) => /* @__PURE__ */
|
|
2419
|
+
var NavigationBlock = ({ shouldBlock }) => /* @__PURE__ */ jsx13(Block, {
|
|
2425
2420
|
enableBeforeUnload: () => shouldBlock,
|
|
2426
2421
|
shouldBlockFn: () => shouldBlock,
|
|
2427
2422
|
withResolver: true,
|
|
2428
|
-
children: ({ status, proceed, reset }) => /* @__PURE__ */
|
|
2423
|
+
children: ({ status, proceed, reset }) => /* @__PURE__ */ jsx13(AlertDialog, {
|
|
2429
2424
|
open: status === "blocked",
|
|
2430
2425
|
children: /* @__PURE__ */ jsxs6(AlertDialogContent, {
|
|
2431
2426
|
children: [
|
|
2432
2427
|
/* @__PURE__ */ jsxs6(AlertDialogHeader, {
|
|
2433
2428
|
children: [
|
|
2434
|
-
/* @__PURE__ */
|
|
2429
|
+
/* @__PURE__ */ jsx13(AlertDialogTitle, {
|
|
2435
2430
|
children: effectFormMessages().blockNavigationTitle
|
|
2436
2431
|
}),
|
|
2437
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ jsx13(AlertDialogDescription, {
|
|
2438
2433
|
children: effectFormMessages().blockNavigationDescription
|
|
2439
2434
|
})
|
|
2440
2435
|
]
|
|
2441
2436
|
}),
|
|
2442
2437
|
/* @__PURE__ */ jsxs6(AlertDialogFooter, {
|
|
2443
2438
|
children: [
|
|
2444
|
-
/* @__PURE__ */
|
|
2439
|
+
/* @__PURE__ */ jsx13(AlertDialogCancel, {
|
|
2445
2440
|
onClick: reset,
|
|
2446
2441
|
children: effectFormMessages().blockNavigationCancel
|
|
2447
2442
|
}),
|
|
2448
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ jsx13(AlertDialogAction, {
|
|
2449
2444
|
onClick: proceed,
|
|
2450
2445
|
children: effectFormMessages().blockNavigationConfirm
|
|
2451
2446
|
})
|
|
@@ -2461,35 +2456,35 @@ var FormBlockNavigation = ({ form }) => {
|
|
|
2461
2456
|
const hasChangedSinceSubmit = useAtomValue(form.hasChangedSinceSubmit);
|
|
2462
2457
|
const lastSubmittedValues = useAtomValue(form.lastSubmittedValues);
|
|
2463
2458
|
const shouldBlock = !submitResult.waiting && (Option.isNone(lastSubmittedValues) ? isDirty : hasChangedSinceSubmit);
|
|
2464
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ jsx13(NavigationBlock, {
|
|
2465
2460
|
shouldBlock
|
|
2466
2461
|
});
|
|
2467
2462
|
};
|
|
2468
|
-
var BlockNavigation = ({ form }) => /* @__PURE__ */
|
|
2463
|
+
var BlockNavigation = ({ form }) => /* @__PURE__ */ jsx13(FormBlockNavigation, {
|
|
2469
2464
|
form
|
|
2470
2465
|
});
|
|
2471
2466
|
export {
|
|
2472
|
-
|
|
2473
|
-
TextField,
|
|
2474
|
-
TextAreaField,
|
|
2475
|
-
SubmitError,
|
|
2476
|
-
SubmitButton,
|
|
2477
|
-
SingleSearchableSelectField,
|
|
2478
|
-
SelectField,
|
|
2479
|
-
SearchableSelectField,
|
|
2480
|
-
RevertButton,
|
|
2481
|
-
NullableTextAreaField,
|
|
2482
|
-
NullableMultiSelectField,
|
|
2483
|
-
NullableKeyValueField,
|
|
2484
|
-
NameField,
|
|
2485
|
-
MultiSelectField,
|
|
2486
|
-
KeyValueField,
|
|
2487
|
-
ImageField,
|
|
2488
|
-
FolderField,
|
|
2489
|
-
FileField,
|
|
2490
|
-
FieldWrapper,
|
|
2491
|
-
ErrorMessage,
|
|
2492
|
-
DescriptionField,
|
|
2467
|
+
BlockNavigation,
|
|
2493
2468
|
CheckboxField,
|
|
2494
|
-
|
|
2469
|
+
DescriptionField,
|
|
2470
|
+
ErrorMessage,
|
|
2471
|
+
FieldWrapper,
|
|
2472
|
+
FileField,
|
|
2473
|
+
FolderField,
|
|
2474
|
+
ImageField,
|
|
2475
|
+
KeyValueField,
|
|
2476
|
+
MultiSelectField,
|
|
2477
|
+
NameField,
|
|
2478
|
+
NullableKeyValueField,
|
|
2479
|
+
NullableMultiSelectField,
|
|
2480
|
+
NullableTextAreaField,
|
|
2481
|
+
RevertButton,
|
|
2482
|
+
SearchableSelectField,
|
|
2483
|
+
SelectField,
|
|
2484
|
+
SingleSearchableSelectField,
|
|
2485
|
+
SubmitButton,
|
|
2486
|
+
SubmitError,
|
|
2487
|
+
TextAreaField,
|
|
2488
|
+
TextField,
|
|
2489
|
+
effectFormMessages
|
|
2495
2490
|
};
|