@pactor-app/ui 0.1.0 → 1.0.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.
@@ -212,6 +212,146 @@ function PopoverContent({
212
212
  ) });
213
213
  }
214
214
 
215
+ // src/components/components/Icon/index.tsx
216
+ var import_lucide_react2 = require("lucide-react");
217
+ var import_jsx_runtime3 = require("react/jsx-runtime");
218
+ var ICONS = {
219
+ "arrow-left": import_lucide_react2.ArrowLeft,
220
+ "arrow-right": import_lucide_react2.ArrowRight,
221
+ "arrow-up": import_lucide_react2.ArrowUp,
222
+ "arrow-down": import_lucide_react2.ArrowDown,
223
+ "chevron-left": import_lucide_react2.ChevronLeft,
224
+ "chevron-right": import_lucide_react2.ChevronRight,
225
+ "chevron-up": import_lucide_react2.ChevronUp,
226
+ "chevron-down": import_lucide_react2.ChevronDown,
227
+ check: import_lucide_react2.Check,
228
+ x: import_lucide_react2.X,
229
+ plus: import_lucide_react2.Plus,
230
+ minus: import_lucide_react2.Minus,
231
+ search: import_lucide_react2.Search,
232
+ settings: import_lucide_react2.Settings,
233
+ user: import_lucide_react2.User,
234
+ users: import_lucide_react2.Users,
235
+ home: import_lucide_react2.House,
236
+ menu: import_lucide_react2.Menu,
237
+ bell: import_lucide_react2.Bell,
238
+ calendar: import_lucide_react2.Calendar,
239
+ clock: import_lucide_react2.Clock,
240
+ download: import_lucide_react2.Download,
241
+ upload: import_lucide_react2.Upload,
242
+ pencil: import_lucide_react2.Pencil,
243
+ edit: import_lucide_react2.SquarePen,
244
+ trash: import_lucide_react2.Trash2,
245
+ eye: import_lucide_react2.Eye,
246
+ info: import_lucide_react2.Info,
247
+ warning: import_lucide_react2.TriangleAlert,
248
+ error: import_lucide_react2.CircleAlert,
249
+ "check-circle": import_lucide_react2.CircleCheck,
250
+ "x-circle": import_lucide_react2.CircleX,
251
+ "help-circle": import_lucide_react2.CircleQuestionMark,
252
+ loading: import_lucide_react2.LoaderCircle,
253
+ spinner: import_lucide_react2.LoaderCircle,
254
+ star: import_lucide_react2.Star,
255
+ heart: import_lucide_react2.Heart,
256
+ bookmark: import_lucide_react2.Bookmark,
257
+ share: import_lucide_react2.Share2,
258
+ copy: import_lucide_react2.Copy,
259
+ "external-link": import_lucide_react2.ExternalLink,
260
+ link: import_lucide_react2.Link,
261
+ mail: import_lucide_react2.Mail,
262
+ phone: import_lucide_react2.Phone,
263
+ lock: import_lucide_react2.Lock,
264
+ unlock: import_lucide_react2.LockOpen,
265
+ "log-in": import_lucide_react2.LogIn,
266
+ "log-out": import_lucide_react2.LogOut,
267
+ sun: import_lucide_react2.Sun,
268
+ moon: import_lucide_react2.Moon,
269
+ globe: import_lucide_react2.Globe,
270
+ filter: import_lucide_react2.Funnel,
271
+ "list-filter": import_lucide_react2.ListFilter,
272
+ "more-horizontal": import_lucide_react2.Ellipsis,
273
+ "more-vertical": import_lucide_react2.EllipsisVertical,
274
+ refresh: import_lucide_react2.RefreshCcw,
275
+ save: import_lucide_react2.Save,
276
+ file: import_lucide_react2.File,
277
+ folder: import_lucide_react2.Folder,
278
+ image: import_lucide_react2.Image,
279
+ camera: import_lucide_react2.Camera,
280
+ chart: import_lucide_react2.ChartColumn,
281
+ table: import_lucide_react2.Table,
282
+ list: import_lucide_react2.List,
283
+ grid: import_lucide_react2.LayoutGrid,
284
+ tag: import_lucide_react2.Tag,
285
+ "shopping-cart": import_lucide_react2.ShoppingCart,
286
+ "credit-card": import_lucide_react2.CreditCard,
287
+ package: import_lucide_react2.Package,
288
+ "map-pin": import_lucide_react2.MapPin,
289
+ building: import_lucide_react2.Building2,
290
+ briefcase: import_lucide_react2.Briefcase,
291
+ send: import_lucide_react2.Send,
292
+ message: import_lucide_react2.MessageCircle,
293
+ "message-square": import_lucide_react2.MessageSquare,
294
+ paperclip: import_lucide_react2.Paperclip,
295
+ "thumbs-up": import_lucide_react2.ThumbsUp,
296
+ "thumbs-down": import_lucide_react2.ThumbsDown,
297
+ zap: import_lucide_react2.Zap,
298
+ flag: import_lucide_react2.Flag,
299
+ key: import_lucide_react2.Key,
300
+ shield: import_lucide_react2.Shield,
301
+ terminal: import_lucide_react2.Terminal,
302
+ code: import_lucide_react2.Code,
303
+ database: import_lucide_react2.Database,
304
+ cloud: import_lucide_react2.Cloud,
305
+ languages: import_lucide_react2.Languages
306
+ };
307
+ function normalizeIconName(name) {
308
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
309
+ }
310
+ var sizePx = {
311
+ sm: 16,
312
+ default: 20,
313
+ lg: 24
314
+ };
315
+ function Icon({
316
+ name,
317
+ size = "default",
318
+ color,
319
+ strokeWidth,
320
+ className,
321
+ style
322
+ }) {
323
+ const key = name ? normalizeIconName(name) : "";
324
+ const Lucide = ICONS[key];
325
+ const px = typeof size === "number" ? size : sizePx[size];
326
+ if (!Lucide) {
327
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
328
+ import_lucide_react2.CircleQuestionMark,
329
+ {
330
+ "data-slot": "icon",
331
+ "data-unknown": name,
332
+ size: px,
333
+ color,
334
+ strokeWidth,
335
+ className: cn("shrink-0 text-muted-foreground", className),
336
+ style,
337
+ "aria-hidden": "true"
338
+ }
339
+ );
340
+ }
341
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
342
+ Lucide,
343
+ {
344
+ "data-slot": "icon",
345
+ size: px,
346
+ color,
347
+ strokeWidth,
348
+ className: cn("shrink-0", className),
349
+ style,
350
+ "aria-hidden": "true"
351
+ }
352
+ );
353
+ }
354
+
215
355
  // src/layout/admin/use-media-query.ts
216
356
  var import_react = require("react");
217
357
  var BREAKPOINT_PX = {
@@ -246,7 +386,7 @@ function useBreakpointBelow(breakpoint) {
246
386
  }
247
387
 
248
388
  // src/layout/admin/ShadcnAdminLayout.tsx
249
- var import_jsx_runtime3 = require("react/jsx-runtime");
389
+ var import_jsx_runtime4 = require("react/jsx-runtime");
250
390
  function buildVisibleMenuTree(registry, permissionChecker) {
251
391
  const tree = registry.tree();
252
392
  return permissionChecker === void 0 ? [...tree] : (0, import_permission.filterMenusByPermission)(tree, permissionChecker);
@@ -261,7 +401,7 @@ function navigateMenuItem(menu, bridge) {
261
401
  }
262
402
  bridge.push(menu.path);
263
403
  }
264
- var menuItemClass = "flex w-full cursor-pointer items-center rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50";
404
+ var menuItemClass = "flex w-full cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50";
265
405
  function CollapsedGroupFlyout({
266
406
  menu,
267
407
  registry,
@@ -280,11 +420,11 @@ function CollapsedGroupFlyout({
280
420
  closeTimer.current = window.setTimeout(() => setOpen(false), 200);
281
421
  };
282
422
  (0, import_react2.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
283
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
284
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
423
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
424
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
285
425
  PopoverTrigger,
286
426
  {
287
- render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
427
+ render: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
288
428
  "button",
289
429
  {
290
430
  type: "button",
@@ -302,7 +442,7 @@ function CollapsedGroupFlyout({
302
442
  )
303
443
  }
304
444
  ),
305
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
445
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
306
446
  PopoverContent,
307
447
  {
308
448
  "data-slot": "menu-flyout",
@@ -319,8 +459,8 @@ function CollapsedGroupFlyout({
319
459
  }
320
460
  },
321
461
  children: [
322
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
323
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
462
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
463
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
324
464
  MenuTree,
325
465
  {
326
466
  menus: menu.children ?? [],
@@ -344,9 +484,9 @@ function MenuTree({
344
484
  collapsed = false
345
485
  }) {
346
486
  if (collapsed) {
347
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
487
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
348
488
  if (menu.type === "group") {
349
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
489
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
350
490
  CollapsedGroupFlyout,
351
491
  {
352
492
  menu,
@@ -358,7 +498,7 @@ function MenuTree({
358
498
  menu.id
359
499
  );
360
500
  }
361
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
501
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
362
502
  "button",
363
503
  {
364
504
  type: "button",
@@ -378,7 +518,7 @@ function MenuTree({
378
518
  );
379
519
  }) });
380
520
  }
381
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
521
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
382
522
  Accordion,
383
523
  {
384
524
  type: "multiple",
@@ -387,24 +527,27 @@ function MenuTree({
387
527
  className: "flex flex-col gap-0.5 px-2",
388
528
  children: menus.map((menu) => {
389
529
  if (menu.type === "group") {
390
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
530
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
391
531
  AccordionItem,
392
532
  {
393
533
  value: menu.id,
394
534
  "data-slot": "menu-group",
395
535
  className: "border-b-0",
396
536
  children: [
397
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
537
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
398
538
  AccordionTrigger,
399
539
  {
400
540
  "data-slot": "menu-group-trigger",
401
541
  className: cn(menuItemClass, "py-2 font-medium"),
402
542
  disabled: menu.disabled,
403
543
  title: menu.title,
404
- children: menu.title
544
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
545
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
546
+ menu.title
547
+ ] })
405
548
  }
406
549
  ),
407
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
550
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
408
551
  MenuTree,
409
552
  {
410
553
  menus: menu.children ?? [],
@@ -419,7 +562,7 @@ function MenuTree({
419
562
  menu.id
420
563
  );
421
564
  }
422
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
565
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
423
566
  "button",
424
567
  {
425
568
  type: "button",
@@ -432,7 +575,10 @@ function MenuTree({
432
575
  disabled: menu.disabled,
433
576
  title: menu.title,
434
577
  onClick: () => navigateMenuItem(registry.findById(menu.id), bridge),
435
- children: menu.title
578
+ children: [
579
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
580
+ menu.title
581
+ ]
436
582
  },
437
583
  menu.id
438
584
  );
@@ -525,7 +671,7 @@ function ShadcnAdminLayout({
525
671
  };
526
672
  const fixedHeader = config.fixedHeader ?? true;
527
673
  const fixedSider = config.fixedSider ?? true;
528
- const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
674
+ const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
529
675
  "header",
530
676
  {
531
677
  "data-slot": "admin-header",
@@ -534,21 +680,21 @@ function ShadcnAdminLayout({
534
680
  fixedHeader && "sticky top-0 z-20"
535
681
  ),
536
682
  children: [
537
- mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
683
+ mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
538
684
  brand.logo,
539
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
685
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
540
686
  ] }),
541
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex-1" }),
687
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1" }),
542
688
  headerExtra
543
689
  ]
544
690
  }
545
691
  ) : null;
546
- const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
692
+ const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
547
693
  "div",
548
694
  {
549
695
  "data-slot": "admin-primary-col",
550
696
  className: "flex w-12 shrink-0 flex-col items-center gap-1 border-r border-border py-2",
551
- children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
697
+ children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
552
698
  "button",
553
699
  {
554
700
  type: "button",
@@ -575,7 +721,7 @@ function ShadcnAdminLayout({
575
721
  }
576
722
  );
577
723
  const showTrigger = config.collapsible && mode !== "two-column";
578
- const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
724
+ const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
579
725
  "aside",
580
726
  {
581
727
  "data-slot": "admin-sidebar",
@@ -587,20 +733,20 @@ function ShadcnAdminLayout({
587
733
  ),
588
734
  style: mode === "two-column" && !hasSecondary ? { width: 56 } : void 0,
589
735
  children: [
590
- mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
736
+ mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
591
737
  "div",
592
738
  {
593
739
  "data-slot": "admin-sidebar-brand",
594
740
  className: "flex items-center gap-2 border-b border-border px-4 py-4 font-semibold",
595
741
  children: [
596
742
  brand.logo,
597
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: brand.title })
743
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: brand.title })
598
744
  ]
599
745
  }
600
746
  ),
601
- mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
747
+ mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
602
748
  primaryColumn,
603
- hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
749
+ hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
604
750
  MenuTree,
605
751
  {
606
752
  menus: secondaryTop?.children ?? [],
@@ -610,7 +756,7 @@ function ShadcnAdminLayout({
610
756
  defaultOpenKeys
611
757
  }
612
758
  ) })
613
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
759
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
614
760
  MenuTree,
615
761
  {
616
762
  menus: visibleMenus,
@@ -621,7 +767,7 @@ function ShadcnAdminLayout({
621
767
  collapsed: effectiveCollapsed
622
768
  }
623
769
  ),
624
- showTrigger && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
770
+ showTrigger && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
625
771
  "button",
626
772
  {
627
773
  type: "button",
@@ -636,14 +782,14 @@ function ShadcnAdminLayout({
636
782
  ]
637
783
  }
638
784
  ) : null;
639
- const body = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
640
- showTabs && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
785
+ const body = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
786
+ showTabs && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
641
787
  "div",
642
788
  {
643
789
  "data-slot": "admin-tabs",
644
790
  role: "tablist",
645
791
  className: "flex items-center gap-1 border-b border-border bg-background px-4 pt-2",
646
- children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
792
+ children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
647
793
  "div",
648
794
  {
649
795
  "data-slot": "admin-tab",
@@ -654,7 +800,7 @@ function ShadcnAdminLayout({
654
800
  tab.key === currentPath ? "bg-background font-medium text-foreground" : "bg-muted text-muted-foreground"
655
801
  ),
656
802
  children: [
657
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
803
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
658
804
  "button",
659
805
  {
660
806
  type: "button",
@@ -665,7 +811,7 @@ function ShadcnAdminLayout({
665
811
  children: tab.title
666
812
  }
667
813
  ),
668
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
814
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
669
815
  "button",
670
816
  {
671
817
  type: "button",
@@ -682,21 +828,21 @@ function ShadcnAdminLayout({
682
828
  ))
683
829
  }
684
830
  ),
685
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
831
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
686
832
  "main",
687
833
  {
688
834
  "data-slot": "admin-content",
689
835
  className: "flex-1 bg-muted/40 p-6",
690
836
  children: [
691
- showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
837
+ showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
692
838
  "nav",
693
839
  {
694
840
  "data-slot": "admin-breadcrumb",
695
841
  "aria-label": t("pactor.layout.breadcrumb"),
696
842
  className: "mb-4",
697
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "flex items-center gap-2", children: [
698
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": true, children: "/" }),
699
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
843
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("li", { className: "flex items-center gap-2", children: [
844
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, children: "/" }),
845
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
700
846
  ] }, index)) })
701
847
  }
702
848
  ),
@@ -705,7 +851,7 @@ function ShadcnAdminLayout({
705
851
  }
706
852
  )
707
853
  ] });
708
- const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
854
+ const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
709
855
  "footer",
710
856
  {
711
857
  "data-slot": "admin-footer",
@@ -713,7 +859,7 @@ function ShadcnAdminLayout({
713
859
  children: brand.title
714
860
  }
715
861
  ) : null;
716
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
862
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
717
863
  "div",
718
864
  {
719
865
  "data-slot": "admin-layout",
@@ -721,9 +867,9 @@ function ShadcnAdminLayout({
721
867
  "data-fixed-header": fixedHeader || void 0,
722
868
  "data-fixed-sider": fixedSider || void 0,
723
869
  className: "flex min-h-screen flex-col bg-background text-foreground",
724
- children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
870
+ children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
725
871
  sidebar,
726
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
872
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
727
873
  "div",
728
874
  {
729
875
  "data-slot": "admin-side-full-main",
@@ -735,9 +881,9 @@ function ShadcnAdminLayout({
735
881
  ]
736
882
  }
737
883
  )
738
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
884
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
739
885
  header,
740
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
886
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
741
887
  sidebar,
742
888
  body
743
889
  ] }),
@@ -748,9 +894,9 @@ function ShadcnAdminLayout({
748
894
  }
749
895
 
750
896
  // src/layout/basic/ShadcnBlankLayout.tsx
751
- var import_jsx_runtime4 = require("react/jsx-runtime");
897
+ var import_jsx_runtime5 = require("react/jsx-runtime");
752
898
  function ShadcnBlankLayout({ children }) {
753
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
899
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
754
900
  "div",
755
901
  {
756
902
  "data-slot": "blank-layout",
@@ -761,9 +907,9 @@ function ShadcnBlankLayout({ children }) {
761
907
  }
762
908
 
763
909
  // src/ui/card.tsx
764
- var import_jsx_runtime5 = require("react/jsx-runtime");
910
+ var import_jsx_runtime6 = require("react/jsx-runtime");
765
911
  function Card({ className, ...props }) {
766
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
912
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
767
913
  "div",
768
914
  {
769
915
  "data-slot": "card",
@@ -776,7 +922,7 @@ function Card({ className, ...props }) {
776
922
  );
777
923
  }
778
924
  function CardHeader({ className, ...props }) {
779
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
925
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
780
926
  "div",
781
927
  {
782
928
  "data-slot": "card-header",
@@ -789,7 +935,7 @@ function CardHeader({ className, ...props }) {
789
935
  );
790
936
  }
791
937
  function CardTitle({ className, ...props }) {
792
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
938
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
793
939
  "div",
794
940
  {
795
941
  "data-slot": "card-title",
@@ -799,7 +945,7 @@ function CardTitle({ className, ...props }) {
799
945
  );
800
946
  }
801
947
  function CardContent({ className, ...props }) {
802
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
948
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
803
949
  "div",
804
950
  {
805
951
  "data-slot": "card-content",
@@ -810,26 +956,26 @@ function CardContent({ className, ...props }) {
810
956
  }
811
957
 
812
958
  // src/layout/basic/ShadcnLoginLayout.tsx
813
- var import_jsx_runtime6 = require("react/jsx-runtime");
959
+ var import_jsx_runtime7 = require("react/jsx-runtime");
814
960
  function ShadcnLoginLayout({
815
961
  variant = "center",
816
962
  brand,
817
963
  children
818
964
  }) {
819
- const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
965
+ const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
820
966
  brand.logo,
821
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
822
- brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
967
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
968
+ brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
823
969
  ] });
824
970
  if (variant === "split") {
825
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
971
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
826
972
  "div",
827
973
  {
828
974
  "data-slot": "login-layout",
829
975
  "data-variant": "split",
830
976
  className: "grid min-h-screen grid-cols-2 bg-background text-foreground",
831
977
  children: [
832
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
978
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
833
979
  "div",
834
980
  {
835
981
  "data-slot": "login-brand-panel",
@@ -837,7 +983,7 @@ function ShadcnLoginLayout({
837
983
  children: brandBlock
838
984
  }
839
985
  ),
840
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
986
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
841
987
  "div",
842
988
  {
843
989
  "data-slot": "login-form-panel",
@@ -849,37 +995,37 @@ function ShadcnLoginLayout({
849
995
  }
850
996
  );
851
997
  }
852
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
998
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
853
999
  "div",
854
1000
  {
855
1001
  "data-slot": "login-layout",
856
1002
  "data-variant": "center",
857
1003
  className: "flex min-h-screen items-center justify-center bg-muted/40 text-foreground",
858
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
859
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(CardHeader, { className: "px-6", children: [
860
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
1004
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
1005
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CardHeader, { className: "px-6", children: [
1006
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
861
1007
  brandBlock
862
1008
  ] }),
863
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
1009
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
864
1010
  ] })
865
1011
  }
866
1012
  );
867
1013
  }
868
1014
 
869
1015
  // src/layout/basic/ShadcnLandingLayout.tsx
870
- var import_jsx_runtime7 = require("react/jsx-runtime");
1016
+ var import_jsx_runtime8 = require("react/jsx-runtime");
871
1017
  function ShadcnLandingLayout({
872
1018
  navbar,
873
1019
  footer,
874
1020
  children
875
1021
  }) {
876
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1022
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
877
1023
  "div",
878
1024
  {
879
1025
  "data-slot": "landing-layout",
880
1026
  className: "flex min-h-screen flex-col bg-background text-foreground",
881
1027
  children: [
882
- navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1028
+ navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
883
1029
  "header",
884
1030
  {
885
1031
  "data-slot": "landing-navbar",
@@ -887,8 +1033,8 @@ function ShadcnLandingLayout({
887
1033
  children: navbar
888
1034
  }
889
1035
  ),
890
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
891
- footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1036
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
1037
+ footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
892
1038
  "footer",
893
1039
  {
894
1040
  "data-slot": "landing-footer",
@@ -8,9 +8,9 @@ import {
8
8
  findMenuChain,
9
9
  registerShadcnLayouts,
10
10
  resolveLayout
11
- } from "../chunk-DMK6RSTK.js";
12
- import "../chunk-SNFDI77B.js";
13
- import "../chunk-57NRUZ5G.js";
11
+ } from "../chunk-D6G4J5XS.js";
12
+ import "../chunk-UR3I4WXQ.js";
13
+ import "../chunk-GL7IO22L.js";
14
14
  import "../chunk-RQHJBTEU.js";
15
15
  export {
16
16
  ShadcnAdminLayout,
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ /** shadcn/ui Toggle(vendored 源码,Base UI 原语):按下态切换按钮 */
7
+ declare const toggleVariants: (props?: ({
8
+ variant?: "default" | "outline" | null | undefined;
9
+ size?: "default" | "sm" | "lg" | null | undefined;
10
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
11
+ declare function Toggle({ className, variant, size, ...props }: Toggle$1.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
12
+
13
+ /**
14
+ * shadcn 风格 Typography(vendored,cva 变体):
15
+ * 按 variant 渲染对应语义标签与排版样式。
16
+ */
17
+ declare const typographyVariants: (props?: ({
18
+ variant?: "blockquote" | "h1" | "h2" | "h3" | "h4" | "p" | "small" | "list" | "inline-code" | "lead" | "muted" | null | undefined;
19
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
20
+ interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
21
+ }
22
+ declare function Typography({ className, variant, ...props }: TypographyProps): React.JSX.Element;
23
+
24
+ export { Toggle as T, Typography as a, typographyVariants as b, toggleVariants as t };