@pactor-app/ui 1.2.0 → 1.7.0

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.
@@ -2,7 +2,7 @@ import {
2
2
  Icon,
3
3
  Menu,
4
4
  Sidebar
5
- } from "./chunk-HJPHJKVA.js";
5
+ } from "./chunk-ZM3WJZZ7.js";
6
6
  import {
7
7
  Alert,
8
8
  AlertDescription,
@@ -71,7 +71,6 @@ import {
71
71
  HoverCard,
72
72
  HoverCardContent,
73
73
  HoverCardTrigger,
74
- Input,
75
74
  InputGroup,
76
75
  InputOTP,
77
76
  InputOTPGroup,
@@ -116,12 +115,6 @@ import {
116
115
  SelectItem,
117
116
  SelectTrigger,
118
117
  SelectValue,
119
- Separator,
120
- Sheet,
121
- SheetContent,
122
- SheetHeader,
123
- SheetTitle,
124
- Skeleton,
125
118
  Slider,
126
119
  SliderControl,
127
120
  SliderIndicator,
@@ -148,9 +141,8 @@ import {
148
141
  chartColor,
149
142
  navigationMenuTriggerStyle,
150
143
  toast
151
- } from "./chunk-Q5NUGUJG.js";
144
+ } from "./chunk-E2TD6JD2.js";
152
145
  import {
153
- Button,
154
146
  Dialog,
155
147
  DialogContent,
156
148
  DialogDescription,
@@ -161,7 +153,7 @@ import {
161
153
  DrawerContent,
162
154
  DrawerHeader,
163
155
  DrawerTitle
164
- } from "./chunk-F3H23KYG.js";
156
+ } from "./chunk-F42SGQNW.js";
165
157
  import {
166
158
  Accordion,
167
159
  AccordionContent,
@@ -171,16 +163,24 @@ import {
171
163
  CardContent,
172
164
  CardHeader,
173
165
  CardTitle,
166
+ Input,
174
167
  Popover,
175
168
  PopoverContent,
176
169
  PopoverTrigger,
170
+ Separator,
171
+ Sheet,
172
+ SheetContent,
173
+ SheetHeader,
174
+ SheetTitle,
175
+ Skeleton,
177
176
  Tooltip,
178
177
  TooltipContent,
179
178
  TooltipTrigger
180
- } from "./chunk-2LYMCWEJ.js";
179
+ } from "./chunk-L4Z7MNYY.js";
181
180
  import {
181
+ Button,
182
182
  cn
183
- } from "./chunk-RQHJBTEU.js";
183
+ } from "./chunk-WKJUCGV4.js";
184
184
 
185
185
  // src/components/register.ts
186
186
  import { Registry } from "@pactor-app/core";
@@ -930,7 +930,7 @@ function ChatInput({
930
930
  {
931
931
  "data-slot": "chat-input",
932
932
  className: cn(
933
- "rounded-xl border border-border bg-background transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
933
+ "rounded-xl border border-border bg-card transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
934
934
  className
935
935
  ),
936
936
  style,
@@ -1164,10 +1164,312 @@ function DataTable({
1164
1164
  ] });
1165
1165
  }
1166
1166
 
1167
+ // src/components/components/DatePicker/index.tsx
1168
+ import { useI18n as useI18n4 } from "@pactor-app/runtime";
1169
+ import {
1170
+ addMonths,
1171
+ endOfMonth,
1172
+ endOfWeek,
1173
+ format as format2,
1174
+ isBefore,
1175
+ isValid as isValid2,
1176
+ parseISO as parseISO2,
1177
+ startOfDay,
1178
+ startOfMonth,
1179
+ startOfWeek,
1180
+ subDays,
1181
+ subMonths
1182
+ } from "date-fns";
1183
+ import { enUS, zhCN } from "date-fns/locale";
1184
+ import { Calendar as CalendarIcon } from "lucide-react";
1185
+ import { useEffect as useEffect5, useId as useId3, useState as useState7 } from "react";
1186
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
1187
+ function toDateFnsLocale(locale) {
1188
+ switch (locale) {
1189
+ case "zh-CN":
1190
+ return zhCN;
1191
+ case "en-US":
1192
+ return enUS;
1193
+ default:
1194
+ return enUS;
1195
+ }
1196
+ }
1197
+ function parseDate(value) {
1198
+ if (typeof value !== "string" || value === "") return void 0;
1199
+ const date = parseISO2(value);
1200
+ return isValid2(date) ? date : void 0;
1201
+ }
1202
+ function parseRange(value) {
1203
+ if (typeof value !== "object" || value === null) return void 0;
1204
+ const { start, end } = value;
1205
+ const from = parseDate(start);
1206
+ const to = parseDate(end);
1207
+ return from && to ? { from, to } : void 0;
1208
+ }
1209
+ var RANGE_ENDPOINT_CLASSES = "[&>button]:bg-(--calendar-selected-background) [&>button]:text-(--calendar-selected-foreground) [&>button]:hover:bg-(--calendar-selected-background) [&>button]:hover:text-(--calendar-selected-foreground)";
1210
+ var IN_RANGE_CLASSES = "[&>button]:bg-(--calendar-range-background) [&>button]:text-(--calendar-range-foreground) [&>button]:rounded-none";
1211
+ function DatePicker(props) {
1212
+ const {
1213
+ name,
1214
+ label,
1215
+ rules,
1216
+ placeholder,
1217
+ disabled,
1218
+ presets,
1219
+ className,
1220
+ style
1221
+ } = props;
1222
+ const mode = props.mode ?? "single";
1223
+ const isRange = mode === "range";
1224
+ const value = props.value;
1225
+ const onChange = props.onChange;
1226
+ const form = useFormContext();
1227
+ const { locale, t } = useI18n4();
1228
+ const dfLocale = toDateFnsLocale(locale);
1229
+ const controlId = useId3();
1230
+ const inForm = form?.inForm === true && typeof name === "string" && name !== "";
1231
+ const [open, setOpen] = useState7(false);
1232
+ useEffect5(() => {
1233
+ if (inForm && form && name) {
1234
+ form.registerField(name, rules, value);
1235
+ return () => form.unregisterField(name);
1236
+ }
1237
+ return void 0;
1238
+ });
1239
+ const [innerValue, setInnerValue] = useState7(value);
1240
+ useEffect5(() => {
1241
+ if (!inForm) setInnerValue(value);
1242
+ }, [inForm, value]);
1243
+ const [pendingStart, setPendingStart] = useState7();
1244
+ const [startMonth, setStartMonth] = useState7(
1245
+ () => startOfMonth(/* @__PURE__ */ new Date())
1246
+ );
1247
+ const [endMonth, setEndMonth] = useState7(
1248
+ () => startOfMonth(addMonths(/* @__PURE__ */ new Date(), 1))
1249
+ );
1250
+ const current = inForm && form && name ? form.values[name] : innerValue;
1251
+ const setPanelMonths = (start, end) => {
1252
+ const s = startOfMonth(start);
1253
+ const e = startOfMonth(end);
1254
+ setStartMonth(s);
1255
+ setEndMonth(isBefore(e, addMonths(s, 1)) ? addMonths(s, 1) : e);
1256
+ };
1257
+ const handleStartMonthChange = (month) => {
1258
+ const s = startOfMonth(month);
1259
+ setStartMonth(s);
1260
+ setEndMonth((prev) => isBefore(s, prev) ? prev : addMonths(s, 1));
1261
+ };
1262
+ const handleEndMonthChange = (month) => {
1263
+ const e = startOfMonth(month);
1264
+ setEndMonth(e);
1265
+ setStartMonth((prev) => isBefore(prev, e) ? prev : subMonths(e, 1));
1266
+ };
1267
+ useEffect5(() => {
1268
+ if (!isRange) return;
1269
+ const parsed = parseRange(current);
1270
+ setPendingStart(void 0);
1271
+ setPanelMonths(
1272
+ parsed?.from ?? /* @__PURE__ */ new Date(),
1273
+ parsed?.to ?? addMonths(/* @__PURE__ */ new Date(), 1)
1274
+ );
1275
+ }, [isRange, current]);
1276
+ const commit = (next) => {
1277
+ if (inForm && form && name) {
1278
+ form.setValue(name, next);
1279
+ } else {
1280
+ setInnerValue(next);
1281
+ }
1282
+ onChange?.(next);
1283
+ };
1284
+ const commitRange = (from, to) => {
1285
+ commit({ start: format2(from, "yyyy-MM-dd"), end: format2(to, "yyyy-MM-dd") });
1286
+ };
1287
+ const handleSingleSelect = (date) => {
1288
+ commit(date ? format2(date, "yyyy-MM-dd") : void 0);
1289
+ };
1290
+ const parsedRange = isRange ? parseRange(current) : void 0;
1291
+ const rangeStart = pendingStart ?? parsedRange?.from;
1292
+ const rangeEnd = pendingStart !== void 0 ? void 0 : parsedRange?.to;
1293
+ const handleRangeDaySelect = (date) => {
1294
+ if (!date) return;
1295
+ const day = startOfDay(date);
1296
+ if (pendingStart) {
1297
+ if (isBefore(day, pendingStart)) {
1298
+ setPendingStart(day);
1299
+ } else {
1300
+ commitRange(pendingStart, day);
1301
+ }
1302
+ } else {
1303
+ setPendingStart(day);
1304
+ }
1305
+ };
1306
+ const presetList = presets === false ? [] : presets ?? (isRange ? [{ key: "today" }, { key: "thisWeek" }, { key: "thisMonth" }] : []);
1307
+ const resolvePreset = (preset) => {
1308
+ const now = /* @__PURE__ */ new Date();
1309
+ if ("key" in preset) {
1310
+ const key = preset.key;
1311
+ const label2 = preset.label ?? t(`pactor.datePicker.${key}`);
1312
+ if (key === "today") return { label: label2, from: now, to: now };
1313
+ if (key === "thisWeek") {
1314
+ return {
1315
+ label: label2,
1316
+ from: startOfWeek(now, { locale: dfLocale }),
1317
+ to: endOfWeek(now, { locale: dfLocale })
1318
+ };
1319
+ }
1320
+ return { label: label2, from: startOfMonth(now), to: endOfMonth(now) };
1321
+ }
1322
+ if ("days" in preset) {
1323
+ return { label: preset.label, from: subDays(now, preset.days - 1), to: now };
1324
+ }
1325
+ return {
1326
+ label: preset.label,
1327
+ from: parseDate(preset.range.start) ?? now,
1328
+ to: parseDate(preset.range.end) ?? now
1329
+ };
1330
+ };
1331
+ const handlePresetClick = (preset, from, to) => {
1332
+ if ("key" in preset && preset.key === "today") {
1333
+ const today = startOfDay(/* @__PURE__ */ new Date());
1334
+ if (isRange) {
1335
+ setPendingStart(today);
1336
+ setPanelMonths(today, addMonths(today, 1));
1337
+ } else {
1338
+ commit(format2(today, "yyyy-MM-dd"));
1339
+ }
1340
+ return;
1341
+ }
1342
+ commitRange(from, to);
1343
+ };
1344
+ const singleDate = isRange ? void 0 : parseDate(current);
1345
+ const hasInnerRange = isRange && rangeStart !== void 0 && rangeEnd !== void 0 && isBefore(startOfDay(rangeStart), startOfDay(rangeEnd));
1346
+ const rangeModifiers = isRange ? {
1347
+ ...rangeStart ? { rangeStart } : {},
1348
+ ...rangeEnd ? { rangeEnd } : {},
1349
+ ...hasInnerRange ? { inRange: { after: rangeStart, before: rangeEnd } } : {}
1350
+ } : void 0;
1351
+ const rangeModifierClassNames = rangeModifiers ? {
1352
+ ...rangeStart ? { rangeStart: RANGE_ENDPOINT_CLASSES } : {},
1353
+ ...rangeEnd ? { rangeEnd: RANGE_ENDPOINT_CLASSES } : {},
1354
+ ...hasInnerRange ? { inRange: IN_RANGE_CLASSES } : {}
1355
+ } : void 0;
1356
+ const displayText = isRange ? typeof current === "object" && current !== null ? `${current.start} ~ ${current.end}` : "" : typeof current === "string" ? current : "";
1357
+ const placeholderText = placeholder ?? t(isRange ? "pactor.datePicker.placeholderRange" : "pactor.datePicker.placeholder");
1358
+ const calendar = isRange ? /* @__PURE__ */ jsxs18("div", { className: "flex", children: [
1359
+ /* @__PURE__ */ jsx23(
1360
+ "div",
1361
+ {
1362
+ "data-slot": "datepicker-start-panel",
1363
+ className: "border-r border-border",
1364
+ children: /* @__PURE__ */ jsx23(
1365
+ Calendar,
1366
+ {
1367
+ mode: "single",
1368
+ month: startMonth,
1369
+ onMonthChange: handleStartMonthChange,
1370
+ onSelect: handleRangeDaySelect,
1371
+ modifiers: rangeModifiers,
1372
+ modifiersClassNames: rangeModifierClassNames,
1373
+ locale: dfLocale
1374
+ }
1375
+ )
1376
+ }
1377
+ ),
1378
+ /* @__PURE__ */ jsx23("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ jsx23(
1379
+ Calendar,
1380
+ {
1381
+ mode: "single",
1382
+ month: endMonth,
1383
+ onMonthChange: handleEndMonthChange,
1384
+ onSelect: handleRangeDaySelect,
1385
+ modifiers: rangeModifiers,
1386
+ modifiersClassNames: rangeModifierClassNames,
1387
+ locale: dfLocale
1388
+ }
1389
+ ) })
1390
+ ] }) : /* @__PURE__ */ jsx23(
1391
+ Calendar,
1392
+ {
1393
+ mode: "single",
1394
+ selected: singleDate,
1395
+ onSelect: handleSingleSelect,
1396
+ locale: dfLocale
1397
+ }
1398
+ );
1399
+ const control = /* @__PURE__ */ jsxs18(Popover, { open, onOpenChange: setOpen, children: [
1400
+ /* @__PURE__ */ jsxs18(
1401
+ PopoverTrigger,
1402
+ {
1403
+ id: controlId,
1404
+ type: "button",
1405
+ disabled,
1406
+ "data-slot": "datepicker-trigger",
1407
+ className: cn(
1408
+ "flex h-9 w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors outline-none hover:bg-accent focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
1409
+ displayText === "" && "text-muted-foreground",
1410
+ !inForm && className
1411
+ ),
1412
+ style: inForm ? void 0 : style,
1413
+ children: [
1414
+ /* @__PURE__ */ jsx23("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholderText : displayText }),
1415
+ /* @__PURE__ */ jsx23(CalendarIcon, { className: "size-4 shrink-0 opacity-50" })
1416
+ ]
1417
+ }
1418
+ ),
1419
+ /* @__PURE__ */ jsx23(PopoverContent, { className: "w-auto p-0", children: presetList.length > 0 ? /* @__PURE__ */ jsxs18("div", { className: "flex", children: [
1420
+ /* @__PURE__ */ jsx23(
1421
+ "div",
1422
+ {
1423
+ "data-slot": "datepicker-presets",
1424
+ className: "flex flex-col gap-1 border-r border-border p-3",
1425
+ children: presetList.map((preset, index) => {
1426
+ const resolved = resolvePreset(preset);
1427
+ return /* @__PURE__ */ jsx23(
1428
+ "button",
1429
+ {
1430
+ type: "button",
1431
+ className: "cursor-pointer rounded-md px-3 py-1.5 text-left text-sm whitespace-nowrap hover:bg-accent hover:text-accent-foreground",
1432
+ onClick: () => handlePresetClick(preset, resolved.from, resolved.to),
1433
+ children: resolved.label
1434
+ },
1435
+ `${resolved.label}-${index}`
1436
+ );
1437
+ })
1438
+ }
1439
+ ),
1440
+ calendar
1441
+ ] }) : calendar })
1442
+ ] });
1443
+ if (inForm && form && name) {
1444
+ const error = form.errors[name];
1445
+ return /* @__PURE__ */ jsxs18(
1446
+ "div",
1447
+ {
1448
+ "data-slot": "form-item",
1449
+ className: cn(formItemClass(form.layout), className),
1450
+ style,
1451
+ children: [
1452
+ label ? /* @__PURE__ */ jsx23(
1453
+ "label",
1454
+ {
1455
+ htmlFor: controlId,
1456
+ className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
1457
+ children: label
1458
+ }
1459
+ ) : null,
1460
+ control,
1461
+ error ? /* @__PURE__ */ jsx23("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
1462
+ ]
1463
+ }
1464
+ );
1465
+ }
1466
+ return control;
1467
+ }
1468
+
1167
1469
  // src/components/components/Dialog/index.tsx
1168
1470
  import { useRenderer as useRenderer6 } from "@pactor-app/runtime";
1169
- import { useState as useState7 } from "react";
1170
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
1471
+ import { useState as useState8 } from "react";
1472
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1171
1473
  function Dialog2({
1172
1474
  title,
1173
1475
  description,
@@ -1179,10 +1481,10 @@ function Dialog2({
1179
1481
  style
1180
1482
  }) {
1181
1483
  const { renderChildren } = useRenderer6();
1182
- const [innerOpen, setInnerOpen] = useState7(false);
1484
+ const [innerOpen, setInnerOpen] = useState8(false);
1183
1485
  const controlled = open !== void 0;
1184
1486
  const visible = controlled ? open : innerOpen;
1185
- return /* @__PURE__ */ jsxs18(
1487
+ return /* @__PURE__ */ jsxs19(
1186
1488
  Dialog,
1187
1489
  {
1188
1490
  open: visible,
@@ -1195,7 +1497,7 @@ function Dialog2({
1195
1497
  }
1196
1498
  },
1197
1499
  children: [
1198
- trigger ? /* @__PURE__ */ jsx23(
1500
+ trigger ? /* @__PURE__ */ jsx24(
1199
1501
  DialogTrigger,
1200
1502
  {
1201
1503
  nativeButton: false,
@@ -1203,10 +1505,10 @@ function Dialog2({
1203
1505
  children: renderChildren([trigger])
1204
1506
  }
1205
1507
  ) : null,
1206
- /* @__PURE__ */ jsxs18(DialogContent, { className, style, children: [
1207
- title || description ? /* @__PURE__ */ jsxs18(DialogHeader, { children: [
1208
- title ? /* @__PURE__ */ jsx23(DialogTitle, { children: title }) : null,
1209
- description ? /* @__PURE__ */ jsx23(DialogDescription, { children: description }) : null
1508
+ /* @__PURE__ */ jsxs19(DialogContent, { className, style, children: [
1509
+ title || description ? /* @__PURE__ */ jsxs19(DialogHeader, { children: [
1510
+ title ? /* @__PURE__ */ jsx24(DialogTitle, { children: title }) : null,
1511
+ description ? /* @__PURE__ */ jsx24(DialogDescription, { children: description }) : null
1210
1512
  ] }) : null,
1211
1513
  children
1212
1514
  ] })
@@ -1216,7 +1518,7 @@ function Dialog2({
1216
1518
  }
1217
1519
 
1218
1520
  // src/components/components/Drawer/index.tsx
1219
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1521
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
1220
1522
  function Drawer2({
1221
1523
  title,
1222
1524
  open,
@@ -1226,7 +1528,7 @@ function Drawer2({
1226
1528
  className,
1227
1529
  style
1228
1530
  }) {
1229
- return /* @__PURE__ */ jsx24(
1531
+ return /* @__PURE__ */ jsx25(
1230
1532
  Drawer,
1231
1533
  {
1232
1534
  direction: placement,
@@ -1236,16 +1538,16 @@ function Drawer2({
1236
1538
  onClose?.();
1237
1539
  }
1238
1540
  },
1239
- children: /* @__PURE__ */ jsxs19(DrawerContent, { className, style, children: [
1240
- title ? /* @__PURE__ */ jsx24(DrawerHeader, { children: /* @__PURE__ */ jsx24(DrawerTitle, { children: title }) }) : null,
1241
- /* @__PURE__ */ jsx24("div", { className: "flex-1 overflow-auto p-4", children })
1541
+ children: /* @__PURE__ */ jsxs20(DrawerContent, { className, style, children: [
1542
+ title ? /* @__PURE__ */ jsx25(DrawerHeader, { children: /* @__PURE__ */ jsx25(DrawerTitle, { children: title }) }) : null,
1543
+ /* @__PURE__ */ jsx25("div", { className: "flex-1 overflow-auto p-4", children })
1242
1544
  ] })
1243
1545
  }
1244
1546
  );
1245
1547
  }
1246
1548
 
1247
1549
  // src/components/components/DropdownMenu/index.tsx
1248
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
1550
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1249
1551
  function DropdownMenu2({
1250
1552
  items = [],
1251
1553
  onSelect,
@@ -1253,8 +1555,8 @@ function DropdownMenu2({
1253
1555
  className,
1254
1556
  style
1255
1557
  }) {
1256
- return /* @__PURE__ */ jsxs20(DropdownMenu, { children: [
1257
- /* @__PURE__ */ jsx25(
1558
+ return /* @__PURE__ */ jsxs21(DropdownMenu, { children: [
1559
+ /* @__PURE__ */ jsx26(
1258
1560
  DropdownMenuTrigger,
1259
1561
  {
1260
1562
  nativeButton: false,
@@ -1262,14 +1564,14 @@ function DropdownMenu2({
1262
1564
  children
1263
1565
  }
1264
1566
  ),
1265
- /* @__PURE__ */ jsx25(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs20(
1567
+ /* @__PURE__ */ jsx26(DropdownMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs21(
1266
1568
  DropdownMenuItem,
1267
1569
  {
1268
1570
  variant: item.danger ? "destructive" : "default",
1269
1571
  disabled: item.disabled,
1270
1572
  onClick: () => onSelect?.(item.value),
1271
1573
  children: [
1272
- item.icon ? /* @__PURE__ */ jsx25(Icon, { name: item.icon, size: "sm" }) : null,
1574
+ item.icon ? /* @__PURE__ */ jsx26(Icon, { name: item.icon, size: "sm" }) : null,
1273
1575
  item.label
1274
1576
  ]
1275
1577
  },
@@ -1279,34 +1581,34 @@ function DropdownMenu2({
1279
1581
  }
1280
1582
 
1281
1583
  // src/components/components/Empty/index.tsx
1282
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1584
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
1283
1585
  function Empty2({ title, description, children, className, style }) {
1284
- return /* @__PURE__ */ jsxs21(Empty, { className, style, children: [
1285
- /* @__PURE__ */ jsxs21(EmptyHeader, { children: [
1286
- title ? /* @__PURE__ */ jsx26(EmptyTitle, { children: title }) : null,
1287
- description ? /* @__PURE__ */ jsx26(EmptyDescription, { children: description }) : null
1586
+ return /* @__PURE__ */ jsxs22(Empty, { className, style, children: [
1587
+ /* @__PURE__ */ jsxs22(EmptyHeader, { children: [
1588
+ title ? /* @__PURE__ */ jsx27(EmptyTitle, { children: title }) : null,
1589
+ description ? /* @__PURE__ */ jsx27(EmptyDescription, { children: description }) : null
1288
1590
  ] }),
1289
- children ? /* @__PURE__ */ jsx26(EmptyContent, { children }) : null
1591
+ children ? /* @__PURE__ */ jsx27(EmptyContent, { children }) : null
1290
1592
  ] });
1291
1593
  }
1292
1594
 
1293
1595
  // src/components/components/Field/index.tsx
1294
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
1596
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
1295
1597
  function Field2({ label, description, error, children, className, style }) {
1296
- return /* @__PURE__ */ jsxs22(Field, { className, style, children: [
1297
- label ? /* @__PURE__ */ jsx27(FieldLabel, { children: label }) : null,
1598
+ return /* @__PURE__ */ jsxs23(Field, { className, style, children: [
1599
+ label ? /* @__PURE__ */ jsx28(FieldLabel, { children: label }) : null,
1298
1600
  children,
1299
- description ? /* @__PURE__ */ jsx27(FieldDescription, { children: description }) : null,
1300
- error ? /* @__PURE__ */ jsx27(FieldError, { match: true, children: error }) : null
1601
+ description ? /* @__PURE__ */ jsx28(FieldDescription, { children: description }) : null,
1602
+ error ? /* @__PURE__ */ jsx28(FieldError, { match: true, children: error }) : null
1301
1603
  ] });
1302
1604
  }
1303
1605
 
1304
1606
  // src/components/components/Flex/index.tsx
1305
- import { jsx as jsx28 } from "react/jsx-runtime";
1607
+ import { jsx as jsx29 } from "react/jsx-runtime";
1306
1608
  var gapClass = {
1307
- small: "gap-2",
1308
- middle: "gap-4",
1309
- large: "gap-6"
1609
+ small: "gap-(--flex-gap-sm)",
1610
+ middle: "gap-(--flex-gap-md)",
1611
+ large: "gap-(--flex-gap-lg)"
1310
1612
  };
1311
1613
  var justifyClass = {
1312
1614
  start: "justify-start",
@@ -1332,13 +1634,14 @@ function Flex({
1332
1634
  style,
1333
1635
  children
1334
1636
  }) {
1335
- return /* @__PURE__ */ jsx28(
1637
+ return /* @__PURE__ */ jsx29(
1336
1638
  "div",
1337
1639
  {
1338
1640
  "data-slot": "flex",
1339
1641
  className: cn(
1340
1642
  "flex",
1341
1643
  direction === "vertical" && "flex-col",
1644
+ gap === void 0 && "gap-(--flex-gap)",
1342
1645
  typeof gap === "string" && gapClass[gap],
1343
1646
  justify && justifyClass[justify],
1344
1647
  align && alignClass[align],
@@ -1351,9 +1654,9 @@ function Flex({
1351
1654
  }
1352
1655
 
1353
1656
  // src/components/components/Footer/index.tsx
1354
- import { jsx as jsx29 } from "react/jsx-runtime";
1657
+ import { jsx as jsx30 } from "react/jsx-runtime";
1355
1658
  function Footer({ className, style, children }) {
1356
- return /* @__PURE__ */ jsx29(
1659
+ return /* @__PURE__ */ jsx30(
1357
1660
  "footer",
1358
1661
  {
1359
1662
  "data-slot": "layout-footer",
@@ -1371,12 +1674,12 @@ function Footer({ className, style, children }) {
1371
1674
  import { useRenderer as useRenderer7 } from "@pactor-app/runtime";
1372
1675
  import {
1373
1676
  useCallback,
1374
- useEffect as useEffect5,
1677
+ useEffect as useEffect6,
1375
1678
  useMemo as useMemo2,
1376
1679
  useRef as useRef2,
1377
- useState as useState8
1680
+ useState as useState9
1378
1681
  } from "react";
1379
- import { jsx as jsx30 } from "react/jsx-runtime";
1682
+ import { jsx as jsx31 } from "react/jsx-runtime";
1380
1683
  function isEmpty(value) {
1381
1684
  return value === void 0 || value === null || value === "";
1382
1685
  }
@@ -1391,16 +1694,16 @@ function Form({
1391
1694
  onValuesChange
1392
1695
  }) {
1393
1696
  const { context } = useRenderer7();
1394
- const [values, setValues] = useState8(() => ({
1697
+ const [values, setValues] = useState9(() => ({
1395
1698
  ...initialValues
1396
1699
  }));
1397
- const [errors, setErrors] = useState8({});
1700
+ const [errors, setErrors] = useState9({});
1398
1701
  const fieldRulesRef = useRef2(/* @__PURE__ */ new Map());
1399
1702
  const mergedInitialFieldsRef = useRef2(/* @__PURE__ */ new Set());
1400
1703
  const setValuesBatch = useCallback((partial) => {
1401
1704
  setValues((prev) => ({ ...prev, ...partial }));
1402
1705
  }, []);
1403
- useEffect5(() => {
1706
+ useEffect6(() => {
1404
1707
  context.forms.register(name, { setValues: setValuesBatch });
1405
1708
  return () => {
1406
1709
  context.forms.unregister(name);
@@ -1457,7 +1760,7 @@ function Form({
1457
1760
  context.state.set("form", values);
1458
1761
  onSubmit?.(values);
1459
1762
  };
1460
- return /* @__PURE__ */ jsx30(FormContextProvider, { value: formContext, children: /* @__PURE__ */ jsx30(
1763
+ return /* @__PURE__ */ jsx31(FormContextProvider, { value: formContext, children: /* @__PURE__ */ jsx31(
1461
1764
  "form",
1462
1765
  {
1463
1766
  "data-slot": "form",
@@ -1471,29 +1774,29 @@ function Form({
1471
1774
 
1472
1775
  // src/components/components/Grid/index.tsx
1473
1776
  import { Children } from "react";
1474
- import { jsx as jsx31 } from "react/jsx-runtime";
1777
+ import { jsx as jsx32 } from "react/jsx-runtime";
1475
1778
  function Grid({ columns = 1, gap, className, style, children }) {
1476
1779
  const cols = Math.max(1, columns);
1477
- return /* @__PURE__ */ jsx31(
1780
+ return /* @__PURE__ */ jsx32(
1478
1781
  "div",
1479
1782
  {
1480
1783
  "data-slot": "grid",
1481
1784
  "data-columns": cols,
1482
- className: cn("grid", className),
1785
+ className: cn("grid", gap === void 0 && "gap-(--grid-gap)", className),
1483
1786
  style: {
1484
1787
  gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
1485
1788
  ...gap !== void 0 ? { gap } : {},
1486
1789
  ...style
1487
1790
  },
1488
- children: Children.map(children, (child, index) => /* @__PURE__ */ jsx31("div", { "data-slot": "grid-item", children: child }, index))
1791
+ children: Children.map(children, (child, index) => /* @__PURE__ */ jsx32("div", { "data-slot": "grid-item", children: child }, index))
1489
1792
  }
1490
1793
  );
1491
1794
  }
1492
1795
 
1493
1796
  // src/components/components/Header/index.tsx
1494
- import { useI18n as useI18n4 } from "@pactor-app/runtime";
1797
+ import { useI18n as useI18n5 } from "@pactor-app/runtime";
1495
1798
  import { ChevronDownIcon } from "lucide-react";
1496
- import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
1799
+ import { Fragment as Fragment2, jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
1497
1800
  var menuItemClass = "flex items-center gap-1 rounded-md px-3 py-2 text-sm transition-colors text-muted-foreground hover:bg-accent/50 hover:text-foreground";
1498
1801
  function Header({
1499
1802
  logo,
@@ -1520,14 +1823,14 @@ function Header({
1520
1823
  const hasLocales = locales !== void 0 && locales.length > 0;
1521
1824
  const hasUser = user !== void 0;
1522
1825
  const rootClass = cn(
1523
- "flex h-14 shrink-0 items-center gap-4 border-b bg-background px-4",
1826
+ "flex h-14 shrink-0 items-center gap-4 border-b bg-card px-4",
1524
1827
  className
1525
1828
  );
1526
1829
  if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
1527
- return /* @__PURE__ */ jsx32("header", { "data-slot": "layout-header", className: rootClass, style, children });
1830
+ return /* @__PURE__ */ jsx33("header", { "data-slot": "layout-header", className: rootClass, style, children });
1528
1831
  }
1529
- const brandNode = hasBrand && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
1530
- logo !== void 0 && /* @__PURE__ */ jsx32(
1832
+ const brandNode = hasBrand && /* @__PURE__ */ jsxs24("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
1833
+ logo !== void 0 && /* @__PURE__ */ jsx33(
1531
1834
  "img",
1532
1835
  {
1533
1836
  "data-slot": "header-brand-logo",
@@ -1536,23 +1839,23 @@ function Header({
1536
1839
  className: "h-8 w-8 shrink-0 object-contain"
1537
1840
  }
1538
1841
  ),
1539
- title !== void 0 && /* @__PURE__ */ jsx32("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
1842
+ title !== void 0 && /* @__PURE__ */ jsx33("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
1540
1843
  ] });
1541
- const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ jsx32(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
1844
+ const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ jsx33(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
1542
1845
  const showLeft = brandLeft || dropdownLeft || hasMenu;
1543
1846
  const showRight = dropdownRight || brandRight || hasLocales || hasUser;
1544
- return /* @__PURE__ */ jsxs23("header", { "data-slot": "layout-header", className: rootClass, style, children: [
1545
- showLeft && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
1847
+ return /* @__PURE__ */ jsxs24("header", { "data-slot": "layout-header", className: rootClass, style, children: [
1848
+ showLeft && /* @__PURE__ */ jsxs24("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
1546
1849
  brandLeft && brandNode,
1547
1850
  dropdownLeft && dropdownNode,
1548
- hasMenu && /* @__PURE__ */ jsx32(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
1851
+ hasMenu && /* @__PURE__ */ jsx33(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
1549
1852
  ] }),
1550
- /* @__PURE__ */ jsx32("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
1551
- showRight && /* @__PURE__ */ jsxs23("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
1853
+ /* @__PURE__ */ jsx33("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
1854
+ showRight && /* @__PURE__ */ jsxs24("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
1552
1855
  dropdownRight && dropdownNode,
1553
1856
  brandRight && brandNode,
1554
- hasLocales && /* @__PURE__ */ jsx32(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
1555
- hasUser && /* @__PURE__ */ jsx32(HeaderUserArea, { user, onSelect: onUserSelect })
1857
+ hasLocales && /* @__PURE__ */ jsx33(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
1858
+ hasUser && /* @__PURE__ */ jsx33(HeaderUserArea, { user, onSelect: onUserSelect })
1556
1859
  ] })
1557
1860
  ] });
1558
1861
  }
@@ -1560,25 +1863,25 @@ function HeaderDropdownArea({
1560
1863
  dropdown,
1561
1864
  onSelect
1562
1865
  }) {
1563
- return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
1564
- /* @__PURE__ */ jsxs23(
1866
+ return /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
1867
+ /* @__PURE__ */ jsxs24(
1565
1868
  DropdownMenuTrigger,
1566
1869
  {
1567
1870
  "data-slot": "header-dropdown",
1568
- className: cn(menuItemClass, "outline-hidden"),
1871
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
1569
1872
  children: [
1570
1873
  dropdown.label,
1571
- /* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1874
+ /* @__PURE__ */ jsx33(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1572
1875
  ]
1573
1876
  }
1574
1877
  ),
1575
- /* @__PURE__ */ jsx32(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ jsxs23(
1878
+ /* @__PURE__ */ jsx33(DropdownMenuContent, { children: dropdown.items.map((item) => /* @__PURE__ */ jsxs24(
1576
1879
  DropdownMenuItem,
1577
1880
  {
1578
1881
  disabled: item.disabled,
1579
1882
  onClick: () => onSelect?.(item.value),
1580
1883
  children: [
1581
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1884
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1582
1885
  item.label
1583
1886
  ]
1584
1887
  },
@@ -1590,23 +1893,23 @@ function HeaderMenuArea({
1590
1893
  items,
1591
1894
  onSelect
1592
1895
  }) {
1593
- return /* @__PURE__ */ jsx32("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
1594
- (item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
1595
- /* @__PURE__ */ jsxs23(
1896
+ return /* @__PURE__ */ jsx33("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
1897
+ (item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
1898
+ /* @__PURE__ */ jsxs24(
1596
1899
  DropdownMenuTrigger,
1597
1900
  {
1598
1901
  "data-slot": "header-menu-item",
1599
1902
  "data-key": item.key,
1600
- className: cn(menuItemClass, "outline-hidden"),
1903
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
1601
1904
  children: [
1602
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1905
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1603
1906
  item.label,
1604
- /* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1907
+ /* @__PURE__ */ jsx33(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1605
1908
  ]
1606
1909
  }
1607
1910
  ),
1608
- /* @__PURE__ */ jsx32(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ jsx32(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
1609
- ] }, item.key) : /* @__PURE__ */ jsxs23(
1911
+ /* @__PURE__ */ jsx33(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ jsx33(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
1912
+ ] }, item.key) : /* @__PURE__ */ jsxs24(
1610
1913
  "button",
1611
1914
  {
1612
1915
  type: "button",
@@ -1615,7 +1918,7 @@ function HeaderMenuArea({
1615
1918
  className: menuItemClass,
1616
1919
  onClick: () => onSelect?.(item.key),
1617
1920
  children: [
1618
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1921
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1619
1922
  item.label
1620
1923
  ]
1621
1924
  },
@@ -1628,16 +1931,16 @@ function HeaderMenuEntry({
1628
1931
  onSelect
1629
1932
  }) {
1630
1933
  if (item.children !== void 0 && item.children.length > 0) {
1631
- return /* @__PURE__ */ jsxs23(DropdownMenuSub, { children: [
1632
- /* @__PURE__ */ jsxs23(DropdownMenuSubTrigger, { "data-key": item.key, children: [
1633
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1934
+ return /* @__PURE__ */ jsxs24(DropdownMenuSub, { children: [
1935
+ /* @__PURE__ */ jsxs24(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
1936
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1634
1937
  item.label
1635
1938
  ] }),
1636
- /* @__PURE__ */ jsx32(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ jsx32(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
1939
+ /* @__PURE__ */ jsx33(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ jsx33(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
1637
1940
  ] });
1638
1941
  }
1639
- return /* @__PURE__ */ jsxs23(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
1640
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1942
+ return /* @__PURE__ */ jsxs24(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
1943
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1641
1944
  item.label
1642
1945
  ] });
1643
1946
  }
@@ -1645,27 +1948,27 @@ function HeaderUserArea({
1645
1948
  user,
1646
1949
  onSelect
1647
1950
  }) {
1648
- const identity = /* @__PURE__ */ jsxs23(Fragment2, { children: [
1649
- /* @__PURE__ */ jsxs23(Avatar, { className: "size-7", children: [
1650
- user.avatar !== void 0 && /* @__PURE__ */ jsx32(AvatarImage, { src: user.avatar, alt: user.name }),
1651
- /* @__PURE__ */ jsx32(AvatarFallback, { children: user.name.charAt(0) })
1951
+ const identity = /* @__PURE__ */ jsxs24(Fragment2, { children: [
1952
+ /* @__PURE__ */ jsxs24(Avatar, { className: "size-7", children: [
1953
+ user.avatar !== void 0 && /* @__PURE__ */ jsx33(AvatarImage, { src: user.avatar, alt: user.name }),
1954
+ /* @__PURE__ */ jsx33(AvatarFallback, { children: user.name.charAt(0) })
1652
1955
  ] }),
1653
- /* @__PURE__ */ jsx32("span", { className: "text-sm", children: user.name })
1956
+ /* @__PURE__ */ jsx33("span", { className: "text-sm", children: user.name })
1654
1957
  ] });
1655
1958
  if (user.items === void 0 || user.items.length === 0) {
1656
- return /* @__PURE__ */ jsx32("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
1959
+ return /* @__PURE__ */ jsx33("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
1657
1960
  }
1658
- return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
1659
- /* @__PURE__ */ jsx32(
1961
+ return /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
1962
+ /* @__PURE__ */ jsx33(
1660
1963
  DropdownMenuTrigger,
1661
1964
  {
1662
1965
  "data-slot": "header-user",
1663
- className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50",
1966
+ className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50 cursor-pointer",
1664
1967
  children: identity
1665
1968
  }
1666
1969
  ),
1667
- /* @__PURE__ */ jsx32(DropdownMenuContent, { align: "end", children: user.items.map((item) => /* @__PURE__ */ jsxs23(DropdownMenuItem, { onClick: () => onSelect?.(item.value), children: [
1668
- item.icon ? /* @__PURE__ */ jsx32(Icon, { name: item.icon, size: "sm" }) : null,
1970
+ /* @__PURE__ */ jsx33(DropdownMenuContent, { align: "end", children: user.items.map((item) => /* @__PURE__ */ jsxs24(DropdownMenuItem, { onClick: () => onSelect?.(item.value), children: [
1971
+ item.icon ? /* @__PURE__ */ jsx33(Icon, { name: item.icon, size: "sm" }) : null,
1669
1972
  item.label
1670
1973
  ] }, item.value)) })
1671
1974
  ] });
@@ -1674,21 +1977,21 @@ function HeaderLocalesArea({
1674
1977
  locales,
1675
1978
  onSelect
1676
1979
  }) {
1677
- const { locale } = useI18n4();
1980
+ const { locale } = useI18n5();
1678
1981
  const current = locales.find((option) => option.value === locale);
1679
- return /* @__PURE__ */ jsxs23(DropdownMenu, { children: [
1680
- /* @__PURE__ */ jsxs23(
1982
+ return /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
1983
+ /* @__PURE__ */ jsxs24(
1681
1984
  DropdownMenuTrigger,
1682
1985
  {
1683
1986
  "data-slot": "header-locales",
1684
- className: cn(menuItemClass, "outline-hidden"),
1987
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
1685
1988
  children: [
1686
1989
  current?.label ?? locale,
1687
- /* @__PURE__ */ jsx32(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1990
+ /* @__PURE__ */ jsx33(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
1688
1991
  ]
1689
1992
  }
1690
1993
  ),
1691
- /* @__PURE__ */ jsx32(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ jsx32(
1994
+ /* @__PURE__ */ jsx33(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ jsx33(
1692
1995
  DropdownMenuItem,
1693
1996
  {
1694
1997
  onClick: () => onSelect?.(option.value),
@@ -1701,21 +2004,21 @@ function HeaderLocalesArea({
1701
2004
 
1702
2005
  // src/components/components/HoverCard/index.tsx
1703
2006
  import { useRenderer as useRenderer8 } from "@pactor-app/runtime";
1704
- import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
2007
+ import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
1705
2008
  function isDslNode2(value) {
1706
2009
  return typeof value === "object" && value !== null && typeof value.type === "string";
1707
2010
  }
1708
2011
  function HoverCard2({ content, children, className, style }) {
1709
2012
  const { renderChildren } = useRenderer8();
1710
- return /* @__PURE__ */ jsxs24(HoverCard, { children: [
1711
- /* @__PURE__ */ jsx33(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
1712
- /* @__PURE__ */ jsx33(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
2013
+ return /* @__PURE__ */ jsxs25(HoverCard, { children: [
2014
+ /* @__PURE__ */ jsx34(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
2015
+ /* @__PURE__ */ jsx34(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
1713
2016
  ] });
1714
2017
  }
1715
2018
 
1716
2019
  // src/components/components/Input/index.tsx
1717
- import { useEffect as useEffect6, useId as useId3 } from "react";
1718
- import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
2020
+ import { useEffect as useEffect7, useId as useId4 } from "react";
2021
+ import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
1719
2022
  function Input2({
1720
2023
  name,
1721
2024
  label,
@@ -1729,9 +2032,9 @@ function Input2({
1729
2032
  style
1730
2033
  }) {
1731
2034
  const form = useFormContext();
1732
- const controlId = useId3();
2035
+ const controlId = useId4();
1733
2036
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
1734
- useEffect6(() => {
2037
+ useEffect7(() => {
1735
2038
  if (inForm && form && name) {
1736
2039
  form.registerField(name, rules, value);
1737
2040
  return () => form.unregisterField(name);
@@ -1741,14 +2044,14 @@ function Input2({
1741
2044
  if (inForm && form && name) {
1742
2045
  const fieldValue = form.values[name];
1743
2046
  const error = form.errors[name];
1744
- return /* @__PURE__ */ jsxs25(
2047
+ return /* @__PURE__ */ jsxs26(
1745
2048
  "div",
1746
2049
  {
1747
2050
  "data-slot": "form-item",
1748
2051
  className: cn(formItemClass(form.layout), className),
1749
2052
  style,
1750
2053
  children: [
1751
- label ? /* @__PURE__ */ jsx34(
2054
+ label ? /* @__PURE__ */ jsx35(
1752
2055
  "label",
1753
2056
  {
1754
2057
  htmlFor: controlId,
@@ -1756,7 +2059,7 @@ function Input2({
1756
2059
  children: label
1757
2060
  }
1758
2061
  ) : null,
1759
- /* @__PURE__ */ jsx34(
2062
+ /* @__PURE__ */ jsx35(
1760
2063
  Input,
1761
2064
  {
1762
2065
  id: controlId,
@@ -1770,12 +2073,12 @@ function Input2({
1770
2073
  }
1771
2074
  }
1772
2075
  ),
1773
- error ? /* @__PURE__ */ jsx34("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2076
+ error ? /* @__PURE__ */ jsx35("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
1774
2077
  ]
1775
2078
  }
1776
2079
  );
1777
2080
  }
1778
- return /* @__PURE__ */ jsx34(
2081
+ return /* @__PURE__ */ jsx35(
1779
2082
  Input,
1780
2083
  {
1781
2084
  type,
@@ -1790,14 +2093,14 @@ function Input2({
1790
2093
  }
1791
2094
 
1792
2095
  // src/components/components/InputGroup/index.tsx
1793
- import { jsx as jsx35 } from "react/jsx-runtime";
2096
+ import { jsx as jsx36 } from "react/jsx-runtime";
1794
2097
  function InputGroup2({ className, style, children }) {
1795
- return /* @__PURE__ */ jsx35(InputGroup, { className, style, children });
2098
+ return /* @__PURE__ */ jsx36(InputGroup, { className, style, children });
1796
2099
  }
1797
2100
 
1798
2101
  // src/components/components/InputOTP/index.tsx
1799
- import { useEffect as useEffect7, useState as useState9 } from "react";
1800
- import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
2102
+ import { useEffect as useEffect8, useState as useState10 } from "react";
2103
+ import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
1801
2104
  function InputOTP2({
1802
2105
  name,
1803
2106
  label,
@@ -1812,15 +2115,15 @@ function InputOTP2({
1812
2115
  }) {
1813
2116
  const form = useFormContext();
1814
2117
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
1815
- useEffect7(() => {
2118
+ useEffect8(() => {
1816
2119
  if (inForm && form && name) {
1817
2120
  form.registerField(name, rules, value);
1818
2121
  return () => form.unregisterField(name);
1819
2122
  }
1820
2123
  return void 0;
1821
2124
  });
1822
- const [innerValue, setInnerValue] = useState9(typeof value === "string" ? value : "");
1823
- useEffect7(() => {
2125
+ const [innerValue, setInnerValue] = useState10(typeof value === "string" ? value : "");
2126
+ useEffect8(() => {
1824
2127
  if (!inForm) setInnerValue(typeof value === "string" ? value : "");
1825
2128
  }, [inForm, value]);
1826
2129
  const current = inForm && form && name ? typeof form.values[name] === "string" ? form.values[name] : "" : innerValue;
@@ -1835,38 +2138,38 @@ function InputOTP2({
1835
2138
  onComplete?.(next);
1836
2139
  }
1837
2140
  };
1838
- const control = /* @__PURE__ */ jsx36(
2141
+ const control = /* @__PURE__ */ jsx37(
1839
2142
  InputOTP,
1840
2143
  {
1841
2144
  maxLength: length,
1842
2145
  value: current,
1843
2146
  onChange: handleChange,
1844
2147
  disabled,
1845
- children: /* @__PURE__ */ jsx36(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx36(InputOTPSlot, { index }, index)) })
2148
+ children: /* @__PURE__ */ jsx37(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx37(InputOTPSlot, { index }, index)) })
1846
2149
  }
1847
2150
  );
1848
2151
  if (inForm && form && name) {
1849
2152
  const error = form.errors[name];
1850
- return /* @__PURE__ */ jsxs26(
2153
+ return /* @__PURE__ */ jsxs27(
1851
2154
  "div",
1852
2155
  {
1853
2156
  "data-slot": "form-item",
1854
2157
  className: cn(formItemClass(form.layout), className),
1855
2158
  style,
1856
2159
  children: [
1857
- label ? /* @__PURE__ */ jsx36("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
2160
+ label ? /* @__PURE__ */ jsx37("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
1858
2161
  control,
1859
- error ? /* @__PURE__ */ jsx36("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2162
+ error ? /* @__PURE__ */ jsx37("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
1860
2163
  ]
1861
2164
  }
1862
2165
  );
1863
2166
  }
1864
- return /* @__PURE__ */ jsx36("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
2167
+ return /* @__PURE__ */ jsx37("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
1865
2168
  }
1866
2169
 
1867
2170
  // src/components/components/Item/index.tsx
1868
2171
  import { useRenderer as useRenderer9 } from "@pactor-app/runtime";
1869
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
2172
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
1870
2173
  function Item2({
1871
2174
  title,
1872
2175
  description,
@@ -1877,39 +2180,39 @@ function Item2({
1877
2180
  }) {
1878
2181
  const { renderChildren } = useRenderer9();
1879
2182
  const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
1880
- return /* @__PURE__ */ jsxs27(Item, { className, style, children: [
1881
- mediaNodes.length > 0 ? /* @__PURE__ */ jsx37(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
1882
- /* @__PURE__ */ jsxs27(ItemContent, { children: [
1883
- title ? /* @__PURE__ */ jsx37(ItemTitle, { children: title }) : null,
1884
- description ? /* @__PURE__ */ jsx37(ItemDescription, { children: description }) : null
2183
+ return /* @__PURE__ */ jsxs28(Item, { className, style, children: [
2184
+ mediaNodes.length > 0 ? /* @__PURE__ */ jsx38(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
2185
+ /* @__PURE__ */ jsxs28(ItemContent, { children: [
2186
+ title ? /* @__PURE__ */ jsx38(ItemTitle, { children: title }) : null,
2187
+ description ? /* @__PURE__ */ jsx38(ItemDescription, { children: description }) : null
1885
2188
  ] }),
1886
- actions && actions.length > 0 ? /* @__PURE__ */ jsx37(ItemActions, { children: renderChildren(actions) }) : null
2189
+ actions && actions.length > 0 ? /* @__PURE__ */ jsx38(ItemActions, { children: renderChildren(actions) }) : null
1887
2190
  ] });
1888
2191
  }
1889
2192
 
1890
2193
  // src/components/components/Kbd/index.tsx
1891
- import { jsx as jsx38 } from "react/jsx-runtime";
2194
+ import { jsx as jsx39 } from "react/jsx-runtime";
1892
2195
  function Kbd2({ text, className, style }) {
1893
- return /* @__PURE__ */ jsx38(Kbd, { className, style, children: text });
2196
+ return /* @__PURE__ */ jsx39(Kbd, { className, style, children: text });
1894
2197
  }
1895
2198
 
1896
2199
  // src/components/components/Label/index.tsx
1897
- import { jsx as jsx39 } from "react/jsx-runtime";
2200
+ import { jsx as jsx40 } from "react/jsx-runtime";
1898
2201
  function Label2({ text, htmlFor, className, style }) {
1899
- return /* @__PURE__ */ jsx39(Label, { htmlFor, className, style, children: text });
2202
+ return /* @__PURE__ */ jsx40(Label, { htmlFor, className, style, children: text });
1900
2203
  }
1901
2204
 
1902
2205
  // src/components/components/Layout/index.tsx
1903
2206
  import { isDslSourceRef } from "@pactor-app/core";
1904
2207
  import { useRenderer as useRenderer10 } from "@pactor-app/runtime";
1905
- import { jsx as jsx40 } from "react/jsx-runtime";
2208
+ import { jsx as jsx41 } from "react/jsx-runtime";
1906
2209
  function Layout({ direction, className, style, dslChildren }) {
1907
2210
  const { renderChildren, context } = useRenderer10();
1908
2211
  const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
1909
2212
  (child) => !isDslSourceRef(child) && resolveRootType(child, context) === "Sider"
1910
2213
  ) : false;
1911
2214
  const dir = direction ?? (hasSider ? "horizontal" : "vertical");
1912
- return /* @__PURE__ */ jsx40(
2215
+ return /* @__PURE__ */ jsx41(
1913
2216
  "div",
1914
2217
  {
1915
2218
  "data-slot": "layout",
@@ -1933,9 +2236,9 @@ function resolveRootType(node, context) {
1933
2236
  }
1934
2237
 
1935
2238
  // src/components/components/Link/index.tsx
1936
- import { jsx as jsx41 } from "react/jsx-runtime";
2239
+ import { jsx as jsx42 } from "react/jsx-runtime";
1937
2240
  function Link({ href, text, target, className, style, children }) {
1938
- return /* @__PURE__ */ jsx41(
2241
+ return /* @__PURE__ */ jsx42(
1939
2242
  "a",
1940
2243
  {
1941
2244
  "data-slot": "link",
@@ -1950,17 +2253,17 @@ function Link({ href, text, target, className, style, children }) {
1950
2253
  }
1951
2254
 
1952
2255
  // src/components/components/Menubar/index.tsx
1953
- import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
2256
+ import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
1954
2257
  function Menubar2({ menus = [], onSelect, className, style }) {
1955
- return /* @__PURE__ */ jsx42(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ jsxs28(MenubarMenu, { children: [
1956
- /* @__PURE__ */ jsx42(MenubarTrigger, { children: menu.label }),
1957
- /* @__PURE__ */ jsx42(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ jsxs28(
2258
+ return /* @__PURE__ */ jsx43(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ jsxs29(MenubarMenu, { children: [
2259
+ /* @__PURE__ */ jsx43(MenubarTrigger, { children: menu.label }),
2260
+ /* @__PURE__ */ jsx43(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ jsxs29(
1958
2261
  MenubarItem,
1959
2262
  {
1960
2263
  disabled: item.disabled,
1961
2264
  onClick: () => onSelect?.(item.value),
1962
2265
  children: [
1963
- item.icon ? /* @__PURE__ */ jsx42(Icon, { name: item.icon, size: "sm" }) : null,
2266
+ item.icon ? /* @__PURE__ */ jsx43(Icon, { name: item.icon, size: "sm" }) : null,
1964
2267
  item.label
1965
2268
  ]
1966
2269
  },
@@ -1970,33 +2273,33 @@ function Menubar2({ menus = [], onSelect, className, style }) {
1970
2273
  }
1971
2274
 
1972
2275
  // src/components/components/NavigationMenu/index.tsx
1973
- import { Fragment as Fragment3, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
2276
+ import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
1974
2277
  function NavigationMenu2({ items = [], className, style }) {
1975
- return /* @__PURE__ */ jsx43(NavigationMenu, { className, style, children: /* @__PURE__ */ jsx43(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ jsx43(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ jsxs29(Fragment3, { children: [
1976
- /* @__PURE__ */ jsxs29(
2278
+ return /* @__PURE__ */ jsx44(NavigationMenu, { className, style, children: /* @__PURE__ */ jsx44(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ jsx44(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ jsxs30(Fragment3, { children: [
2279
+ /* @__PURE__ */ jsxs30(
1977
2280
  NavigationMenuTrigger,
1978
2281
  {
1979
2282
  className: item.icon !== void 0 ? "gap-2" : void 0,
1980
2283
  children: [
1981
- item.icon ? /* @__PURE__ */ jsx43(Icon, { name: item.icon, size: "sm" }) : null,
2284
+ item.icon ? /* @__PURE__ */ jsx44(Icon, { name: item.icon, size: "sm" }) : null,
1982
2285
  item.label
1983
2286
  ]
1984
2287
  }
1985
2288
  ),
1986
- /* @__PURE__ */ jsx43(NavigationMenuContent, { children: /* @__PURE__ */ jsx43("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsxs29(NavigationMenuLink, { href: child.href, children: [
1987
- /* @__PURE__ */ jsxs29(
2289
+ /* @__PURE__ */ jsx44(NavigationMenuContent, { children: /* @__PURE__ */ jsx44("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ jsx44("li", { children: /* @__PURE__ */ jsxs30(NavigationMenuLink, { href: child.href, children: [
2290
+ /* @__PURE__ */ jsxs30(
1988
2291
  "span",
1989
2292
  {
1990
2293
  className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
1991
2294
  children: [
1992
- child.icon ? /* @__PURE__ */ jsx43(Icon, { name: child.icon, size: "sm" }) : null,
2295
+ child.icon ? /* @__PURE__ */ jsx44(Icon, { name: child.icon, size: "sm" }) : null,
1993
2296
  child.label
1994
2297
  ]
1995
2298
  }
1996
2299
  ),
1997
- child.description ? /* @__PURE__ */ jsx43("span", { className: "text-muted-foreground", children: child.description }) : null
2300
+ child.description ? /* @__PURE__ */ jsx44("span", { className: "text-muted-foreground", children: child.description }) : null
1998
2301
  ] }) }, child.href)) }) })
1999
- ] }) : /* @__PURE__ */ jsxs29(
2302
+ ] }) : /* @__PURE__ */ jsxs30(
2000
2303
  NavigationMenuLink,
2001
2304
  {
2002
2305
  href: item.href,
@@ -2005,7 +2308,7 @@ function NavigationMenu2({ items = [], className, style }) {
2005
2308
  item.icon !== void 0 && "gap-2"
2006
2309
  ),
2007
2310
  children: [
2008
- item.icon ? /* @__PURE__ */ jsx43(Icon, { name: item.icon, size: "sm" }) : null,
2311
+ item.icon ? /* @__PURE__ */ jsx44(Icon, { name: item.icon, size: "sm" }) : null,
2009
2312
  item.label
2010
2313
  ]
2011
2314
  }
@@ -2013,17 +2316,17 @@ function NavigationMenu2({ items = [], className, style }) {
2013
2316
  }
2014
2317
 
2015
2318
  // src/components/components/Page/index.tsx
2016
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2319
+ import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
2017
2320
  function Page({ title, className, style, children }) {
2018
- return /* @__PURE__ */ jsxs30("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
2019
- title ? /* @__PURE__ */ jsx44("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
2020
- /* @__PURE__ */ jsx44("div", { "data-slot": "page-content", className: "space-y-5", children })
2321
+ return /* @__PURE__ */ jsxs31("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
2322
+ title ? /* @__PURE__ */ jsx45("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
2323
+ /* @__PURE__ */ jsx45("div", { "data-slot": "page-content", className: "space-y-5", children })
2021
2324
  ] });
2022
2325
  }
2023
2326
 
2024
2327
  // src/components/components/Pagination/index.tsx
2025
- import { useState as useState10 } from "react";
2026
- import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
2328
+ import { useState as useState11 } from "react";
2329
+ import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
2027
2330
  function pageItems(current, count) {
2028
2331
  if (count <= 7) {
2029
2332
  return Array.from({ length: count }, (_, i) => i + 1);
@@ -2044,7 +2347,7 @@ function Pagination2({
2044
2347
  className,
2045
2348
  style
2046
2349
  }) {
2047
- const [innerPage, setInnerPage] = useState10(1);
2350
+ const [innerPage, setInnerPage] = useState11(1);
2048
2351
  const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
2049
2352
  const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
2050
2353
  const goTo = (next) => {
@@ -2057,8 +2360,8 @@ function Pagination2({
2057
2360
  }
2058
2361
  onChange?.(target);
2059
2362
  };
2060
- return /* @__PURE__ */ jsx45(Pagination, { className, style, children: /* @__PURE__ */ jsxs31(PaginationContent, { children: [
2061
- /* @__PURE__ */ jsx45(PaginationItem, { children: /* @__PURE__ */ jsx45(
2363
+ return /* @__PURE__ */ jsx46(Pagination, { className, style, children: /* @__PURE__ */ jsxs32(PaginationContent, { children: [
2364
+ /* @__PURE__ */ jsx46(PaginationItem, { children: /* @__PURE__ */ jsx46(
2062
2365
  PaginationPrevious,
2063
2366
  {
2064
2367
  href: "#",
@@ -2069,7 +2372,7 @@ function Pagination2({
2069
2372
  }
2070
2373
  }
2071
2374
  ) }),
2072
- pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ jsx45(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx45(PaginationEllipsis, {}) : /* @__PURE__ */ jsx45(
2375
+ pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ jsx46(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx46(PaginationEllipsis, {}) : /* @__PURE__ */ jsx46(
2073
2376
  PaginationLink,
2074
2377
  {
2075
2378
  href: "#",
@@ -2081,7 +2384,7 @@ function Pagination2({
2081
2384
  children: item
2082
2385
  }
2083
2386
  ) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
2084
- /* @__PURE__ */ jsx45(PaginationItem, { children: /* @__PURE__ */ jsx45(
2387
+ /* @__PURE__ */ jsx46(PaginationItem, { children: /* @__PURE__ */ jsx46(
2085
2388
  PaginationNext,
2086
2389
  {
2087
2390
  href: "#",
@@ -2097,14 +2400,14 @@ function Pagination2({
2097
2400
 
2098
2401
  // src/components/components/Popover/index.tsx
2099
2402
  import { useRenderer as useRenderer11 } from "@pactor-app/runtime";
2100
- import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
2403
+ import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
2101
2404
  function isDslNode3(value) {
2102
2405
  return typeof value === "object" && value !== null && typeof value.type === "string";
2103
2406
  }
2104
2407
  function Popover2({ content, children, className, style }) {
2105
2408
  const { renderChildren } = useRenderer11();
2106
- return /* @__PURE__ */ jsxs32(Popover, { children: [
2107
- /* @__PURE__ */ jsx46(
2409
+ return /* @__PURE__ */ jsxs33(Popover, { children: [
2410
+ /* @__PURE__ */ jsx47(
2108
2411
  PopoverTrigger,
2109
2412
  {
2110
2413
  nativeButton: false,
@@ -2112,22 +2415,22 @@ function Popover2({ content, children, className, style }) {
2112
2415
  children
2113
2416
  }
2114
2417
  ),
2115
- /* @__PURE__ */ jsx46(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
2418
+ /* @__PURE__ */ jsx47(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
2116
2419
  ] });
2117
2420
  }
2118
2421
 
2119
2422
  // src/components/components/Progress/index.tsx
2120
- import { jsx as jsx47 } from "react/jsx-runtime";
2423
+ import { jsx as jsx48 } from "react/jsx-runtime";
2121
2424
  function Progress2({ value, className, style }) {
2122
2425
  const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
2123
- return /* @__PURE__ */ jsx47(Progress, { value: resolved, className, style, children: /* @__PURE__ */ jsx47(ProgressTrack, { children: /* @__PURE__ */ jsx47(ProgressIndicator, {}) }) });
2426
+ return /* @__PURE__ */ jsx48(Progress, { value: resolved, className, style, children: /* @__PURE__ */ jsx48(ProgressTrack, { children: /* @__PURE__ */ jsx48(ProgressIndicator, {}) }) });
2124
2427
  }
2125
2428
 
2126
2429
  // src/components/components/RadioGroup/index.tsx
2127
- import { useEffect as useEffect8, useId as useId4 } from "react";
2430
+ import { useEffect as useEffect9, useId as useId5 } from "react";
2128
2431
 
2129
2432
  // src/components/components/Form/form-item.tsx
2130
- import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
2433
+ import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
2131
2434
  function FieldShell({
2132
2435
  layout,
2133
2436
  label,
@@ -2137,14 +2440,14 @@ function FieldShell({
2137
2440
  style,
2138
2441
  children
2139
2442
  }) {
2140
- return /* @__PURE__ */ jsxs33(
2443
+ return /* @__PURE__ */ jsxs34(
2141
2444
  "div",
2142
2445
  {
2143
2446
  "data-slot": "form-item",
2144
2447
  className: cn(formItemClass(layout), className),
2145
2448
  style,
2146
2449
  children: [
2147
- label ? /* @__PURE__ */ jsx48(
2450
+ label ? /* @__PURE__ */ jsx49(
2148
2451
  "label",
2149
2452
  {
2150
2453
  htmlFor,
@@ -2153,14 +2456,14 @@ function FieldShell({
2153
2456
  }
2154
2457
  ) : null,
2155
2458
  children,
2156
- error ? /* @__PURE__ */ jsx48("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2459
+ error ? /* @__PURE__ */ jsx49("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2157
2460
  ]
2158
2461
  }
2159
2462
  );
2160
2463
  }
2161
2464
 
2162
2465
  // src/components/components/RadioGroup/index.tsx
2163
- import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
2466
+ import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
2164
2467
  function RadioGroup2({
2165
2468
  name,
2166
2469
  label,
@@ -2173,9 +2476,9 @@ function RadioGroup2({
2173
2476
  style
2174
2477
  }) {
2175
2478
  const form = useFormContext();
2176
- const controlId = useId4();
2479
+ const controlId = useId5();
2177
2480
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
2178
- useEffect8(() => {
2481
+ useEffect9(() => {
2179
2482
  if (inForm && form && name) {
2180
2483
  form.registerField(name, rules, value);
2181
2484
  return () => form.unregisterField(name);
@@ -2190,7 +2493,7 @@ function RadioGroup2({
2190
2493
  onChange?.(next);
2191
2494
  };
2192
2495
  const groupValue = current ?? "";
2193
- const group = /* @__PURE__ */ jsx49(
2496
+ const group = /* @__PURE__ */ jsx50(
2194
2497
  RadioGroup,
2195
2498
  {
2196
2499
  value: groupValue,
@@ -2201,8 +2504,8 @@ function RadioGroup2({
2201
2504
  style: inForm ? void 0 : style,
2202
2505
  children: options.map((option, index) => {
2203
2506
  const optionId = `${controlId}-${index}`;
2204
- return /* @__PURE__ */ jsxs34("span", { className: "inline-flex items-center gap-2", children: [
2205
- /* @__PURE__ */ jsx49(
2507
+ return /* @__PURE__ */ jsxs35("span", { className: "inline-flex items-center gap-2", children: [
2508
+ /* @__PURE__ */ jsx50(
2206
2509
  RadioGroupItem,
2207
2510
  {
2208
2511
  id: optionId,
@@ -2210,13 +2513,13 @@ function RadioGroup2({
2210
2513
  disabled: option.disabled
2211
2514
  }
2212
2515
  ),
2213
- /* @__PURE__ */ jsx49("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
2516
+ /* @__PURE__ */ jsx50("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
2214
2517
  ] }, String(option.value));
2215
2518
  })
2216
2519
  }
2217
2520
  );
2218
2521
  if (inForm && form && name) {
2219
- return /* @__PURE__ */ jsx49(
2522
+ return /* @__PURE__ */ jsx50(
2220
2523
  FieldShell,
2221
2524
  {
2222
2525
  layout: form.layout,
@@ -2234,7 +2537,7 @@ function RadioGroup2({
2234
2537
  // src/components/components/Resizable/index.tsx
2235
2538
  import { useRenderer as useRenderer12 } from "@pactor-app/runtime";
2236
2539
  import { Fragment as Fragment4 } from "react";
2237
- import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
2540
+ import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
2238
2541
  function Resizable({
2239
2542
  panels = [],
2240
2543
  direction = "horizontal",
@@ -2242,12 +2545,14 @@ function Resizable({
2242
2545
  style
2243
2546
  }) {
2244
2547
  const { renderChildren } = useRenderer12();
2245
- return /* @__PURE__ */ jsx50(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs35(Fragment4, { children: [
2246
- index > 0 ? /* @__PURE__ */ jsx50(ResizableHandle, { withHandle: true }) : null,
2247
- /* @__PURE__ */ jsx50(
2548
+ return /* @__PURE__ */ jsx51(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs36(Fragment4, { children: [
2549
+ index > 0 ? /* @__PURE__ */ jsx51(ResizableHandle, { withHandle: true }) : null,
2550
+ /* @__PURE__ */ jsx51(
2248
2551
  Panel,
2249
2552
  {
2250
- defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
2553
+ defaultSize: typeof panel.defaultSizePx === "number" ? `${panel.defaultSizePx}px` : typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
2554
+ minSize: typeof panel.minSizePx === "number" ? `${panel.minSizePx}px` : void 0,
2555
+ maxSize: typeof panel.maxSizePx === "number" ? `${panel.maxSizePx}px` : void 0,
2251
2556
  children: renderChildren(panel.children)
2252
2557
  }
2253
2558
  )
@@ -2255,7 +2560,7 @@ function Resizable({
2255
2560
  }
2256
2561
 
2257
2562
  // src/components/components/ScrollArea/index.tsx
2258
- import { jsx as jsx51 } from "react/jsx-runtime";
2563
+ import { jsx as jsx52 } from "react/jsx-runtime";
2259
2564
  function ScrollArea2({
2260
2565
  maxHeight,
2261
2566
  maxWidth,
@@ -2263,7 +2568,7 @@ function ScrollArea2({
2263
2568
  style,
2264
2569
  children
2265
2570
  }) {
2266
- return /* @__PURE__ */ jsx51(
2571
+ return /* @__PURE__ */ jsx52(
2267
2572
  ScrollArea,
2268
2573
  {
2269
2574
  className,
@@ -2274,9 +2579,9 @@ function ScrollArea2({
2274
2579
  }
2275
2580
 
2276
2581
  // src/components/components/Select/index.tsx
2277
- import { useI18n as useI18n5 } from "@pactor-app/runtime";
2278
- import { useEffect as useEffect9, useId as useId5 } from "react";
2279
- import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
2582
+ import { useI18n as useI18n6 } from "@pactor-app/runtime";
2583
+ import { useEffect as useEffect10, useId as useId6 } from "react";
2584
+ import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
2280
2585
  function Select2({
2281
2586
  name,
2282
2587
  label,
@@ -2291,10 +2596,10 @@ function Select2({
2291
2596
  style
2292
2597
  }) {
2293
2598
  const form = useFormContext();
2294
- const { t } = useI18n5();
2295
- const controlId = useId5();
2599
+ const { t } = useI18n6();
2600
+ const controlId = useId6();
2296
2601
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
2297
- useEffect9(() => {
2602
+ useEffect10(() => {
2298
2603
  if (inForm && form && name) {
2299
2604
  form.registerField(name, rules, value);
2300
2605
  return () => form.unregisterField(name);
@@ -2310,13 +2615,13 @@ function Select2({
2310
2615
  onChange?.(next ?? void 0);
2311
2616
  };
2312
2617
  const inFormRoot = inForm === true;
2313
- const select = /* @__PURE__ */ jsxs36(
2618
+ const select = /* @__PURE__ */ jsxs37(
2314
2619
  "span",
2315
2620
  {
2316
2621
  className: cn("inline-flex items-center gap-1", !inFormRoot && className),
2317
2622
  style: inFormRoot ? void 0 : style,
2318
2623
  children: [
2319
- /* @__PURE__ */ jsxs36(
2624
+ /* @__PURE__ */ jsxs37(
2320
2625
  Select,
2321
2626
  {
2322
2627
  items: options,
@@ -2325,8 +2630,8 @@ function Select2({
2325
2630
  disabled,
2326
2631
  name: inForm ? name : void 0,
2327
2632
  children: [
2328
- /* @__PURE__ */ jsx52(SelectTrigger, { id: controlId, children: /* @__PURE__ */ jsx52(SelectValue, { placeholder }) }),
2329
- /* @__PURE__ */ jsx52(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx52(
2633
+ /* @__PURE__ */ jsx53(SelectTrigger, { id: controlId, children: /* @__PURE__ */ jsx53(SelectValue, { placeholder }) }),
2634
+ /* @__PURE__ */ jsx53(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx53(
2330
2635
  SelectItem,
2331
2636
  {
2332
2637
  value: option.value,
@@ -2338,7 +2643,7 @@ function Select2({
2338
2643
  ]
2339
2644
  }
2340
2645
  ),
2341
- allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ jsx52(
2646
+ allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ jsx53(
2342
2647
  "button",
2343
2648
  {
2344
2649
  type: "button",
@@ -2358,14 +2663,14 @@ function Select2({
2358
2663
  );
2359
2664
  if (inForm && form && name) {
2360
2665
  const error = form.errors[name];
2361
- return /* @__PURE__ */ jsxs36(
2666
+ return /* @__PURE__ */ jsxs37(
2362
2667
  "div",
2363
2668
  {
2364
2669
  "data-slot": "form-item",
2365
2670
  className: cn(formItemClass(form.layout), className),
2366
2671
  style,
2367
2672
  children: [
2368
- label ? /* @__PURE__ */ jsx52(
2673
+ label ? /* @__PURE__ */ jsx53(
2369
2674
  "label",
2370
2675
  {
2371
2676
  htmlFor: controlId,
@@ -2374,7 +2679,7 @@ function Select2({
2374
2679
  }
2375
2680
  ) : null,
2376
2681
  select,
2377
- error ? /* @__PURE__ */ jsx52("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2682
+ error ? /* @__PURE__ */ jsx53("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
2378
2683
  ]
2379
2684
  }
2380
2685
  );
@@ -2383,13 +2688,13 @@ function Select2({
2383
2688
  }
2384
2689
 
2385
2690
  // src/components/components/Separator/index.tsx
2386
- import { jsx as jsx53 } from "react/jsx-runtime";
2691
+ import { jsx as jsx54 } from "react/jsx-runtime";
2387
2692
  function Separator2({ orientation = "horizontal", className, style }) {
2388
- return /* @__PURE__ */ jsx53(Separator, { orientation, className, style });
2693
+ return /* @__PURE__ */ jsx54(Separator, { orientation, className, style });
2389
2694
  }
2390
2695
 
2391
2696
  // src/components/components/Sheet/index.tsx
2392
- import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
2697
+ import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
2393
2698
  function Sheet2({
2394
2699
  title,
2395
2700
  open,
@@ -2399,7 +2704,7 @@ function Sheet2({
2399
2704
  className,
2400
2705
  style
2401
2706
  }) {
2402
- return /* @__PURE__ */ jsx54(
2707
+ return /* @__PURE__ */ jsx55(
2403
2708
  Sheet,
2404
2709
  {
2405
2710
  open: open ?? false,
@@ -2408,9 +2713,9 @@ function Sheet2({
2408
2713
  onClose?.();
2409
2714
  }
2410
2715
  },
2411
- children: /* @__PURE__ */ jsxs37(SheetContent, { side, className, style, children: [
2412
- title ? /* @__PURE__ */ jsx54(SheetHeader, { children: /* @__PURE__ */ jsx54(SheetTitle, { children: title }) }) : null,
2413
- /* @__PURE__ */ jsx54("div", { className: "flex-1 overflow-auto px-4", children })
2716
+ children: /* @__PURE__ */ jsxs38(SheetContent, { side, className, style, children: [
2717
+ title ? /* @__PURE__ */ jsx55(SheetHeader, { children: /* @__PURE__ */ jsx55(SheetTitle, { children: title }) }) : null,
2718
+ /* @__PURE__ */ jsx55("div", { className: "flex-1 overflow-auto px-4", children })
2414
2719
  ] })
2415
2720
  }
2416
2721
  );
@@ -2418,7 +2723,7 @@ function Sheet2({
2418
2723
 
2419
2724
  // src/components/components/Sider/index.tsx
2420
2725
  import { ChevronLeft, ChevronRight } from "lucide-react";
2421
- import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
2726
+ import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
2422
2727
  function Sider({
2423
2728
  width = 200,
2424
2729
  collapsible,
@@ -2430,26 +2735,26 @@ function Sider({
2430
2735
  children
2431
2736
  }) {
2432
2737
  const current = collapsed ? collapsedWidth : width;
2433
- return /* @__PURE__ */ jsxs38(
2738
+ return /* @__PURE__ */ jsxs39(
2434
2739
  "aside",
2435
2740
  {
2436
2741
  "data-slot": "layout-sider",
2437
2742
  "data-collapsed": collapsed || void 0,
2438
2743
  className: cn(
2439
- "flex min-h-0 shrink-0 flex-col border-r bg-background transition-[width]",
2744
+ "flex min-h-0 shrink-0 flex-col border-r bg-sidebar transition-[width]",
2440
2745
  className
2441
2746
  ),
2442
2747
  style: { width: current, ...style },
2443
2748
  children: [
2444
- /* @__PURE__ */ jsx55("div", { className: "min-h-0 flex-1 overflow-auto", children }),
2445
- collapsible ? /* @__PURE__ */ jsx55(
2749
+ /* @__PURE__ */ jsx56("div", { className: "min-h-0 flex-1 overflow-auto", children }),
2750
+ collapsible ? /* @__PURE__ */ jsx56(
2446
2751
  "button",
2447
2752
  {
2448
2753
  type: "button",
2449
2754
  "aria-label": collapsed ? "expand sider" : "collapse sider",
2450
2755
  className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
2451
2756
  onClick: () => onCollapse?.(!collapsed),
2452
- children: collapsed ? /* @__PURE__ */ jsx55(ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx55(ChevronLeft, { "aria-hidden": true, className: "size-4" })
2757
+ children: collapsed ? /* @__PURE__ */ jsx56(ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx56(ChevronLeft, { "aria-hidden": true, className: "size-4" })
2453
2758
  }
2454
2759
  ) : null
2455
2760
  ]
@@ -2458,7 +2763,7 @@ function Sider({
2458
2763
  }
2459
2764
 
2460
2765
  // src/components/components/Skeleton/index.tsx
2461
- import { jsx as jsx56 } from "react/jsx-runtime";
2766
+ import { jsx as jsx57 } from "react/jsx-runtime";
2462
2767
  var shapeDefaults = {
2463
2768
  line: { className: "h-4 w-full", style: {} },
2464
2769
  circle: { className: "rounded-full", style: { width: 40, height: 40 } },
@@ -2469,7 +2774,7 @@ function toSize(value) {
2469
2774
  }
2470
2775
  function Skeleton2({ shape = "line", width, height, className, style }) {
2471
2776
  const defaults = shapeDefaults[shape];
2472
- return /* @__PURE__ */ jsx56(
2777
+ return /* @__PURE__ */ jsx57(
2473
2778
  Skeleton,
2474
2779
  {
2475
2780
  className: cn(defaults.className, className),
@@ -2484,8 +2789,8 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
2484
2789
  }
2485
2790
 
2486
2791
  // src/components/components/Slider/index.tsx
2487
- import { useEffect as useEffect10 } from "react";
2488
- import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
2792
+ import { useEffect as useEffect11 } from "react";
2793
+ import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
2489
2794
  function Slider2({
2490
2795
  name,
2491
2796
  label,
@@ -2501,7 +2806,7 @@ function Slider2({
2501
2806
  }) {
2502
2807
  const form = useFormContext();
2503
2808
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
2504
- useEffect10(() => {
2809
+ useEffect11(() => {
2505
2810
  if (inForm && form && name) {
2506
2811
  form.registerField(name, rules, value);
2507
2812
  return () => form.unregisterField(name);
@@ -2516,7 +2821,7 @@ function Slider2({
2516
2821
  }
2517
2822
  onChange?.(next);
2518
2823
  };
2519
- const slider = /* @__PURE__ */ jsx57(
2824
+ const slider = /* @__PURE__ */ jsx58(
2520
2825
  Slider,
2521
2826
  {
2522
2827
  value: numberValue,
@@ -2528,14 +2833,14 @@ function Slider2({
2528
2833
  onValueChange: handleChange,
2529
2834
  className: inForm ? void 0 : className,
2530
2835
  style: inForm ? void 0 : style,
2531
- children: /* @__PURE__ */ jsx57(SliderControl, { children: /* @__PURE__ */ jsxs39(SliderTrack, { children: [
2532
- /* @__PURE__ */ jsx57(SliderIndicator, {}),
2533
- /* @__PURE__ */ jsx57(SliderThumb, {})
2534
- ] }) })
2836
+ children: /* @__PURE__ */ jsxs40(SliderControl, { children: [
2837
+ /* @__PURE__ */ jsx58(SliderTrack, { children: /* @__PURE__ */ jsx58(SliderIndicator, {}) }),
2838
+ /* @__PURE__ */ jsx58(SliderThumb, {})
2839
+ ] })
2535
2840
  }
2536
2841
  );
2537
2842
  if (inForm && form && name) {
2538
- return /* @__PURE__ */ jsx57(
2843
+ return /* @__PURE__ */ jsx58(
2539
2844
  FieldShell,
2540
2845
  {
2541
2846
  layout: form.layout,
@@ -2552,11 +2857,11 @@ function Slider2({
2552
2857
 
2553
2858
  // src/components/components/Sonner/index.tsx
2554
2859
  import { useRenderer as useRenderer13 } from "@pactor-app/runtime";
2555
- import { useEffect as useEffect11 } from "react";
2556
- import { jsx as jsx58 } from "react/jsx-runtime";
2860
+ import { useEffect as useEffect12 } from "react";
2861
+ import { jsx as jsx59 } from "react/jsx-runtime";
2557
2862
  function Sonner({ className, style }) {
2558
2863
  const { context } = useRenderer13();
2559
- useEffect11(() => {
2864
+ useEffect12(() => {
2560
2865
  const { actions } = context;
2561
2866
  if (actions.has("toast")) {
2562
2867
  return;
@@ -2570,36 +2875,36 @@ function Sonner({ className, style }) {
2570
2875
  return { ok: true };
2571
2876
  });
2572
2877
  }, [context]);
2573
- return /* @__PURE__ */ jsx58("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ jsx58(Toaster, {}) });
2878
+ return /* @__PURE__ */ jsx59("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ jsx59(Toaster, {}) });
2574
2879
  }
2575
2880
 
2576
2881
  // src/components/components/Spinner/index.tsx
2577
- import { jsx as jsx59 } from "react/jsx-runtime";
2882
+ import { jsx as jsx60 } from "react/jsx-runtime";
2578
2883
  var sizeClass = {
2579
2884
  sm: "size-3",
2580
2885
  default: "size-4",
2581
2886
  lg: "size-6"
2582
2887
  };
2583
2888
  function Spinner2({ size = "default", className, style }) {
2584
- return /* @__PURE__ */ jsx59(Spinner, { className: cn(sizeClass[size], className), style });
2889
+ return /* @__PURE__ */ jsx60(Spinner, { className: cn(sizeClass[size], className), style });
2585
2890
  }
2586
2891
 
2587
2892
  // src/components/components/Statistic/index.tsx
2588
- import { jsx as jsx60, jsxs as jsxs40 } from "react/jsx-runtime";
2893
+ import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
2589
2894
  function Statistic({ title, value, precision, suffix, className, style }) {
2590
2895
  const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
2591
- return /* @__PURE__ */ jsxs40("div", { "data-slot": "statistic", className: cn(className), style, children: [
2592
- title ? /* @__PURE__ */ jsx60("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
2593
- /* @__PURE__ */ jsxs40("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
2896
+ return /* @__PURE__ */ jsxs41("div", { "data-slot": "statistic", className: cn(className), style, children: [
2897
+ title ? /* @__PURE__ */ jsx61("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
2898
+ /* @__PURE__ */ jsxs41("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
2594
2899
  display,
2595
- suffix ? /* @__PURE__ */ jsx60("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
2900
+ suffix ? /* @__PURE__ */ jsx61("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
2596
2901
  ] })
2597
2902
  ] });
2598
2903
  }
2599
2904
 
2600
2905
  // src/components/components/Switch/index.tsx
2601
- import { useEffect as useEffect12, useId as useId6 } from "react";
2602
- import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
2906
+ import { useEffect as useEffect13, useId as useId7 } from "react";
2907
+ import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
2603
2908
  function Switch2({
2604
2909
  name,
2605
2910
  label,
@@ -2611,9 +2916,9 @@ function Switch2({
2611
2916
  style
2612
2917
  }) {
2613
2918
  const form = useFormContext();
2614
- const controlId = useId6();
2919
+ const controlId = useId7();
2615
2920
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
2616
- useEffect12(() => {
2921
+ useEffect13(() => {
2617
2922
  if (inForm && form && name) {
2618
2923
  form.registerField(name, rules, value);
2619
2924
  return () => form.unregisterField(name);
@@ -2628,13 +2933,13 @@ function Switch2({
2628
2933
  }
2629
2934
  onChange?.(next);
2630
2935
  };
2631
- const control = /* @__PURE__ */ jsxs41(
2936
+ const control = /* @__PURE__ */ jsxs42(
2632
2937
  "span",
2633
2938
  {
2634
2939
  className: cn("inline-flex items-center gap-2", !inForm && className),
2635
2940
  style: inForm ? void 0 : style,
2636
2941
  children: [
2637
- /* @__PURE__ */ jsx61(
2942
+ /* @__PURE__ */ jsx62(
2638
2943
  Switch,
2639
2944
  {
2640
2945
  id: controlId,
@@ -2644,12 +2949,12 @@ function Switch2({
2644
2949
  onCheckedChange: handleChange
2645
2950
  }
2646
2951
  ),
2647
- label ? /* @__PURE__ */ jsx61("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
2952
+ label ? /* @__PURE__ */ jsx62("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
2648
2953
  ]
2649
2954
  }
2650
2955
  );
2651
2956
  if (inForm && form && name) {
2652
- return /* @__PURE__ */ jsxs41(
2957
+ return /* @__PURE__ */ jsxs42(
2653
2958
  "div",
2654
2959
  {
2655
2960
  "data-slot": "form-item",
@@ -2657,7 +2962,7 @@ function Switch2({
2657
2962
  style,
2658
2963
  children: [
2659
2964
  control,
2660
- form.errors[name] ? /* @__PURE__ */ jsx61("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
2965
+ form.errors[name] ? /* @__PURE__ */ jsx62("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
2661
2966
  ]
2662
2967
  }
2663
2968
  );
@@ -2666,9 +2971,9 @@ function Switch2({
2666
2971
  }
2667
2972
 
2668
2973
  // src/components/components/Table/index.tsx
2669
- import { useI18n as useI18n6, useRenderer as useRenderer14 } from "@pactor-app/runtime";
2670
- import { useState as useState11 } from "react";
2671
- import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
2974
+ import { useI18n as useI18n7, useRenderer as useRenderer14 } from "@pactor-app/runtime";
2975
+ import { useState as useState12 } from "react";
2976
+ import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
2672
2977
  function renderCellValue2(value) {
2673
2978
  if (value === void 0 || value === null) {
2674
2979
  return "";
@@ -2689,8 +2994,8 @@ function Table2({
2689
2994
  style
2690
2995
  }) {
2691
2996
  const { renderChildren } = useRenderer14();
2692
- const { t } = useI18n6();
2693
- const [current, setCurrent] = useState11(1);
2997
+ const { t } = useI18n7();
2998
+ const [current, setCurrent] = useState12(1);
2694
2999
  const pageSize = pagination === false ? void 0 : pagination?.pageSize;
2695
3000
  const total = dataSource.length;
2696
3001
  const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
@@ -2699,17 +3004,17 @@ function Table2({
2699
3004
  setCurrent(page);
2700
3005
  onChange?.({ current: page, pageSize, total });
2701
3006
  };
2702
- return /* @__PURE__ */ jsxs42("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
2703
- loading ? /* @__PURE__ */ jsx62(
3007
+ return /* @__PURE__ */ jsxs43("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
3008
+ loading ? /* @__PURE__ */ jsx63(
2704
3009
  "div",
2705
3010
  {
2706
3011
  "data-slot": "table-loading",
2707
- className: "absolute inset-0 z-10 flex items-center justify-center bg-background/60 text-sm text-muted-foreground",
3012
+ className: "absolute inset-0 z-10 flex items-center justify-center bg-card/60 text-sm text-muted-foreground",
2708
3013
  children: t("pactor.table.loading")
2709
3014
  }
2710
3015
  ) : null,
2711
- /* @__PURE__ */ jsxs42(Table, { children: [
2712
- /* @__PURE__ */ jsx62(TableHeader, { children: /* @__PURE__ */ jsx62(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ jsx62(
3016
+ /* @__PURE__ */ jsxs43(Table, { children: [
3017
+ /* @__PURE__ */ jsx63(TableHeader, { children: /* @__PURE__ */ jsx63(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ jsx63(
2713
3018
  TableHead,
2714
3019
  {
2715
3020
  style: column.width !== void 0 ? { width: column.width } : void 0,
@@ -2717,7 +3022,7 @@ function Table2({
2717
3022
  },
2718
3023
  column.dataIndex ?? String(index)
2719
3024
  )) }) }),
2720
- /* @__PURE__ */ jsx62(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ jsx62(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx62(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ jsx62(
3025
+ /* @__PURE__ */ jsx63(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ jsx63(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx63(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ jsx63(
2721
3026
  "div",
2722
3027
  {
2723
3028
  "data-slot": "table-empty",
@@ -2726,10 +3031,10 @@ function Table2({
2726
3031
  }
2727
3032
  ) }) }) : pageRows.map((row, rowIndex) => {
2728
3033
  const key = row[rowKey];
2729
- return /* @__PURE__ */ jsx62(
3034
+ return /* @__PURE__ */ jsx63(
2730
3035
  TableRow,
2731
3036
  {
2732
- children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx62(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
3037
+ children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx63(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
2733
3038
  column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
2734
3039
  ) }, column.dataIndex ?? String(columnIndex)))
2735
3040
  },
@@ -2737,8 +3042,8 @@ function Table2({
2737
3042
  );
2738
3043
  }) })
2739
3044
  ] }),
2740
- pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx62("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
2741
- (page) => /* @__PURE__ */ jsx62(
3045
+ pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx63("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
3046
+ (page) => /* @__PURE__ */ jsx63(
2742
3047
  Button,
2743
3048
  {
2744
3049
  type: "button",
@@ -2756,10 +3061,10 @@ function Table2({
2756
3061
 
2757
3062
  // src/components/components/Tabs/index.tsx
2758
3063
  import { useRenderer as useRenderer15 } from "@pactor-app/runtime";
2759
- import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
3064
+ import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
2760
3065
  function Tabs2({ items = [], activeKey, onChange, className, style }) {
2761
3066
  const { renderChildren } = useRenderer15();
2762
- return /* @__PURE__ */ jsxs43(
3067
+ return /* @__PURE__ */ jsxs44(
2763
3068
  Tabs,
2764
3069
  {
2765
3070
  value: activeKey,
@@ -2768,20 +3073,20 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
2768
3073
  className,
2769
3074
  style,
2770
3075
  children: [
2771
- /* @__PURE__ */ jsx63(TabsList, { children: items.map((item) => /* @__PURE__ */ jsx63(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
2772
- items.map((item) => /* @__PURE__ */ jsx63(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
3076
+ /* @__PURE__ */ jsx64(TabsList, { children: items.map((item) => /* @__PURE__ */ jsx64(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
3077
+ items.map((item) => /* @__PURE__ */ jsx64(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
2773
3078
  ]
2774
3079
  }
2775
3080
  );
2776
3081
  }
2777
3082
 
2778
3083
  // src/components/components/Text/index.tsx
2779
- import { jsx as jsx64 } from "react/jsx-runtime";
3084
+ import { jsx as jsx65 } from "react/jsx-runtime";
2780
3085
  var typeClassMap = {
2781
3086
  default: "",
2782
3087
  secondary: "text-muted-foreground",
2783
- success: "text-green-600 dark:text-green-400",
2784
- warning: "text-amber-600 dark:text-amber-400",
3088
+ success: "text-success",
3089
+ warning: "text-warning",
2785
3090
  danger: "text-destructive"
2786
3091
  };
2787
3092
  function Text({
@@ -2795,7 +3100,7 @@ function Text({
2795
3100
  style,
2796
3101
  children
2797
3102
  }) {
2798
- return /* @__PURE__ */ jsx64(
3103
+ return /* @__PURE__ */ jsx65(
2799
3104
  "span",
2800
3105
  {
2801
3106
  "data-slot": "text",
@@ -2815,8 +3120,8 @@ function Text({
2815
3120
  }
2816
3121
 
2817
3122
  // src/components/components/Textarea/index.tsx
2818
- import { useEffect as useEffect13, useId as useId7 } from "react";
2819
- import { jsx as jsx65 } from "react/jsx-runtime";
3123
+ import { useEffect as useEffect14, useId as useId8 } from "react";
3124
+ import { jsx as jsx66 } from "react/jsx-runtime";
2820
3125
  function Textarea2({
2821
3126
  name,
2822
3127
  label,
@@ -2830,9 +3135,9 @@ function Textarea2({
2830
3135
  style
2831
3136
  }) {
2832
3137
  const form = useFormContext();
2833
- const controlId = useId7();
3138
+ const controlId = useId8();
2834
3139
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
2835
- useEffect13(() => {
3140
+ useEffect14(() => {
2836
3141
  if (inForm && form && name) {
2837
3142
  form.registerField(name, rules, value);
2838
3143
  return () => form.unregisterField(name);
@@ -2841,7 +3146,7 @@ function Textarea2({
2841
3146
  });
2842
3147
  if (inForm && form && name) {
2843
3148
  const fieldValue = form.values[name];
2844
- return /* @__PURE__ */ jsx65(
3149
+ return /* @__PURE__ */ jsx66(
2845
3150
  FieldShell,
2846
3151
  {
2847
3152
  layout: form.layout,
@@ -2850,7 +3155,7 @@ function Textarea2({
2850
3155
  error: form.errors[name],
2851
3156
  className,
2852
3157
  style,
2853
- children: /* @__PURE__ */ jsx65(
3158
+ children: /* @__PURE__ */ jsx66(
2854
3159
  Textarea,
2855
3160
  {
2856
3161
  id: controlId,
@@ -2867,7 +3172,7 @@ function Textarea2({
2867
3172
  }
2868
3173
  );
2869
3174
  }
2870
- return /* @__PURE__ */ jsx65(
3175
+ return /* @__PURE__ */ jsx66(
2871
3176
  Textarea,
2872
3177
  {
2873
3178
  value: value ?? "",
@@ -2882,7 +3187,7 @@ function Textarea2({
2882
3187
  }
2883
3188
 
2884
3189
  // src/components/components/Toggle/index.tsx
2885
- import { jsx as jsx66 } from "react/jsx-runtime";
3190
+ import { jsx as jsx67 } from "react/jsx-runtime";
2886
3191
  function Toggle2({
2887
3192
  text,
2888
3193
  pressed,
@@ -2893,7 +3198,7 @@ function Toggle2({
2893
3198
  className,
2894
3199
  style
2895
3200
  }) {
2896
- return /* @__PURE__ */ jsx66(
3201
+ return /* @__PURE__ */ jsx67(
2897
3202
  Toggle,
2898
3203
  {
2899
3204
  pressed,
@@ -2909,7 +3214,7 @@ function Toggle2({
2909
3214
  }
2910
3215
 
2911
3216
  // src/components/components/ToggleGroup/index.tsx
2912
- import { jsx as jsx67 } from "react/jsx-runtime";
3217
+ import { jsx as jsx68 } from "react/jsx-runtime";
2913
3218
  function ToggleGroup2({
2914
3219
  options = [],
2915
3220
  value,
@@ -2929,7 +3234,7 @@ function ToggleGroup2({
2929
3234
  onChange?.(added ?? void 0);
2930
3235
  }
2931
3236
  };
2932
- return /* @__PURE__ */ jsx67(
3237
+ return /* @__PURE__ */ jsx68(
2933
3238
  ToggleGroup,
2934
3239
  {
2935
3240
  value: groupValue,
@@ -2938,7 +3243,7 @@ function ToggleGroup2({
2938
3243
  onValueChange: (next) => handleChange(next),
2939
3244
  className,
2940
3245
  style,
2941
- children: options.map((option) => /* @__PURE__ */ jsx67(
3246
+ children: options.map((option) => /* @__PURE__ */ jsx68(
2942
3247
  ToggleGroupItem,
2943
3248
  {
2944
3249
  value: option.value,
@@ -2952,23 +3257,23 @@ function ToggleGroup2({
2952
3257
  }
2953
3258
 
2954
3259
  // src/components/components/Tooltip/index.tsx
2955
- import { jsx as jsx68, jsxs as jsxs44 } from "react/jsx-runtime";
3260
+ import { jsx as jsx69, jsxs as jsxs45 } from "react/jsx-runtime";
2956
3261
  function Tooltip3({ content, children, className, style }) {
2957
- return /* @__PURE__ */ jsxs44(Tooltip, { children: [
2958
- /* @__PURE__ */ jsx68(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
2959
- /* @__PURE__ */ jsx68(TooltipContent, { className, style, children: content })
3262
+ return /* @__PURE__ */ jsxs45(Tooltip, { children: [
3263
+ /* @__PURE__ */ jsx69(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
3264
+ /* @__PURE__ */ jsx69(TooltipContent, { className, style, children: content })
2960
3265
  ] });
2961
3266
  }
2962
3267
 
2963
3268
  // src/components/components/Typography/index.tsx
2964
- import { jsx as jsx69 } from "react/jsx-runtime";
3269
+ import { jsx as jsx70 } from "react/jsx-runtime";
2965
3270
  function Typography2({
2966
3271
  variant = "p",
2967
3272
  text,
2968
3273
  className,
2969
3274
  style
2970
3275
  }) {
2971
- return /* @__PURE__ */ jsx69(Typography, { variant, className, style, children: text });
3276
+ return /* @__PURE__ */ jsx70(Typography, { variant, className, style, children: text });
2972
3277
  }
2973
3278
 
2974
3279
  // src/components/register.ts
@@ -3033,6 +3338,7 @@ var builtinComponents = {
3033
3338
  HoverCard: HoverCard2,
3034
3339
  // 复合类扩展组件(第三批)
3035
3340
  Calendar: Calendar2,
3341
+ DatePicker,
3036
3342
  InputOTP: InputOTP2,
3037
3343
  Combobox: Combobox2,
3038
3344
  Carousel: Carousel2,
@@ -3082,9 +3388,11 @@ export {
3082
3388
  Combobox2 as Combobox,
3083
3389
  Command2 as Command,
3084
3390
  Chart,
3391
+ ChatInput,
3085
3392
  Content,
3086
3393
  ContextMenu2 as ContextMenu,
3087
3394
  DataTable,
3395
+ DatePicker,
3088
3396
  Dialog2 as Dialog,
3089
3397
  Drawer2 as Drawer,
3090
3398
  DropdownMenu2 as DropdownMenu,