@pactor-app/ui 1.1.0 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -31,11 +31,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  Accordion: () => Accordion2,
34
+ AdminLayout: () => AdminLayout,
34
35
  Alert: () => Alert2,
35
36
  AlertDialog: () => AlertDialog2,
36
37
  AspectRatio: () => AspectRatio2,
37
38
  Avatar: () => Avatar2,
38
39
  Badge: () => Badge2,
40
+ BlankLayout: () => BlankLayout,
39
41
  Breadcrumb: () => Breadcrumb2,
40
42
  Button: () => Button2,
41
43
  ButtonGroup: () => ButtonGroup2,
@@ -43,6 +45,8 @@ __export(index_exports, {
43
45
  Card: () => Card2,
44
46
  Carousel: () => Carousel2,
45
47
  Chart: () => Chart,
48
+ ChatInput: () => ChatInput,
49
+ ChatLayout: () => ChatLayout,
46
50
  Checkbox: () => Checkbox2,
47
51
  Collapsible: () => Collapsible2,
48
52
  Combobox: () => Combobox2,
@@ -66,15 +70,19 @@ __export(index_exports, {
66
70
  Input: () => Input2,
67
71
  InputGroup: () => InputGroup2,
68
72
  InputOTP: () => InputOTP2,
73
+ InteractionProvider: () => InteractionProvider,
69
74
  Item: () => Item2,
70
75
  Kbd: () => Kbd2,
71
76
  Label: () => Label2,
77
+ LandingLayout: () => LandingLayout,
72
78
  Layout: () => Layout,
73
79
  Link: () => Link2,
80
+ LoginLayout: () => LoginLayout,
74
81
  Menu: () => Menu2,
75
82
  Menubar: () => Menubar2,
76
83
  NavigationMenu: () => NavigationMenu2,
77
84
  OVERLAY_CANCEL_PAYLOAD: () => OVERLAY_CANCEL_PAYLOAD,
85
+ OverlayHost: () => OverlayHost,
78
86
  OverlayManager: () => OverlayManager,
79
87
  Page: () => Page,
80
88
  Pagination: () => Pagination2,
@@ -86,12 +94,6 @@ __export(index_exports, {
86
94
  ScrollArea: () => ScrollArea2,
87
95
  Select: () => Select2,
88
96
  Separator: () => Separator2,
89
- ShadcnAdminLayout: () => ShadcnAdminLayout,
90
- ShadcnBlankLayout: () => ShadcnBlankLayout,
91
- ShadcnInteractionProvider: () => ShadcnInteractionProvider,
92
- ShadcnLandingLayout: () => ShadcnLandingLayout,
93
- ShadcnLoginLayout: () => ShadcnLoginLayout,
94
- ShadcnOverlayHost: () => ShadcnOverlayHost,
95
97
  Sheet: () => Sheet2,
96
98
  Sidebar: () => Sidebar,
97
99
  Sider: () => Sider,
@@ -109,18 +111,17 @@ __export(index_exports, {
109
111
  ToggleGroup: () => ToggleGroup2,
110
112
  Tooltip: () => Tooltip3,
111
113
  Typography: () => Typography2,
114
+ builtinComponents: () => builtinComponents,
112
115
  collectDefaultOpenKeys: () => collectDefaultOpenKeys,
113
- createShadcnComponentRegistry: () => createShadcnComponentRegistry,
114
- createShadcnLayoutRegistry: () => createShadcnLayoutRegistry,
116
+ createComponentRegistry: () => createComponentRegistry,
117
+ createLayoutRegistry: () => createLayoutRegistry,
115
118
  createUiBridge: () => createUiBridge,
116
119
  findMenuChain: () => findMenuChain,
117
120
  normalizeIconName: () => normalizeIconName,
121
+ registerBuiltinComponents: () => registerBuiltinComponents,
122
+ registerBuiltinLayouts: () => registerBuiltinLayouts,
118
123
  registerInteractionActions: () => registerInteractionActions,
119
- registerShadcnComponents: () => registerShadcnComponents,
120
- registerShadcnLayouts: () => registerShadcnLayouts,
121
124
  resolveLayout: () => resolveLayout,
122
- shadcnComponents: () => shadcnComponents,
123
- shadcnUiKit: () => shadcnUiKit,
124
125
  useFormContext: () => useFormContext,
125
126
  useSidebarDrawer: () => useSidebarDrawer
126
127
  });
@@ -342,16 +343,20 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
342
343
  variant: {
343
344
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
344
345
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20",
345
- outline: "border border-border bg-background hover:bg-accent hover:text-accent-foreground",
346
+ outline: "border border-border bg-card hover:bg-accent hover:text-accent-foreground",
346
347
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
347
348
  ghost: "hover:bg-accent hover:text-accent-foreground",
348
349
  link: "text-primary underline-offset-4 hover:underline"
349
350
  },
350
351
  size: {
351
352
  default: "h-9 px-4 py-2",
353
+ xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
352
354
  sm: "h-8 gap-1.5 rounded-md px-3 text-xs",
353
355
  lg: "h-10 rounded-md px-6",
354
- icon: "size-9"
356
+ icon: "size-9",
357
+ "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
358
+ "icon-sm": "size-8",
359
+ "icon-lg": "size-10"
355
360
  }
356
361
  },
357
362
  defaultVariants: {
@@ -416,7 +421,7 @@ function AlertDialogOverlay({
416
421
  {
417
422
  "data-slot": "alert-dialog-overlay",
418
423
  className: cn(
419
- "fixed inset-0 z-50 bg-black/50 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
424
+ "fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
420
425
  className
421
426
  ),
422
427
  ...props
@@ -434,7 +439,7 @@ function AlertDialogContent({
434
439
  {
435
440
  "data-slot": "alert-dialog-content",
436
441
  className: cn(
437
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-background p-6 shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
442
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
438
443
  className
439
444
  ),
440
445
  ...props
@@ -877,7 +882,7 @@ function Calendar({
877
882
  import_react_day_picker.DayPicker,
878
883
  {
879
884
  showOutsideDays,
880
- className: cn("bg-background p-3", className),
885
+ className: cn("bg-card p-3", className),
881
886
  classNames: {
882
887
  root: cn("w-fit", defaultClassNames.root),
883
888
  months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
@@ -910,15 +915,15 @@ function Calendar({
910
915
  week: cn("mt-2 flex w-full", defaultClassNames.week),
911
916
  day: cn("h-8 w-8 p-0 text-center text-sm", defaultClassNames.day),
912
917
  day_button: cn(
913
- "size-8 cursor-pointer rounded-md p-0 font-normal hover:bg-accent hover:text-accent-foreground aria-selected:opacity-100",
918
+ "size-8 cursor-pointer rounded-md p-0 font-normal hover:bg-(--calendar-day-hover-background) hover:text-(--calendar-day-hover-foreground) aria-selected:opacity-100",
914
919
  defaultClassNames.day_button
915
920
  ),
916
921
  selected: cn(
917
- "[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary",
922
+ "[&>button]:bg-(--calendar-selected-background) [&>button]:text-(--calendar-selected-foreground) [&>button]:hover:bg-(--calendar-selected-background)",
918
923
  defaultClassNames.selected
919
924
  ),
920
925
  today: cn(
921
- "[&>button]:bg-accent [&>button]:text-accent-foreground",
926
+ "[&>button]:bg-(--calendar-today-background) [&>button]:text-(--calendar-today-foreground)",
922
927
  defaultClassNames.today
923
928
  ),
924
929
  outside: cn(
@@ -1028,7 +1033,7 @@ function Card({ className, ...props }) {
1028
1033
  {
1029
1034
  "data-slot": "card",
1030
1035
  className: cn(
1031
- "flex flex-col gap-6 rounded-xl border border-border bg-card py-6 text-card-foreground shadow-sm",
1036
+ "flex flex-col gap-6 rounded-xl border border-border bg-card py-6 text-card-foreground shadow-(--card-shadow)",
1032
1037
  className
1033
1038
  ),
1034
1039
  ...props
@@ -1529,7 +1534,7 @@ function PopoverContent({
1529
1534
  {
1530
1535
  "data-slot": "popover-content",
1531
1536
  className: cn(
1532
- "z-50 w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
1537
+ "z-50 w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md shadow-(color:--shadow-color) outline-none duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
1533
1538
  className
1534
1539
  ),
1535
1540
  ...props
@@ -1684,7 +1689,7 @@ function CommandItem({
1684
1689
  {
1685
1690
  "data-slot": "command-item",
1686
1691
  className: cn(
1687
- "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1692
+ "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-(--menu-active-background) data-[selected=true]:text-(--menu-active-foreground) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1688
1693
  className
1689
1694
  ),
1690
1695
  ...props
@@ -1986,11 +1991,11 @@ var import_recharts2 = require("recharts");
1986
1991
  var import_recharts = require("recharts");
1987
1992
  var import_jsx_runtime36 = require("react/jsx-runtime");
1988
1993
  var CHART_TOKEN_COLORS = [
1989
- "hsl(var(--chart-1))",
1990
- "hsl(var(--chart-2))",
1991
- "hsl(var(--chart-3))",
1992
- "hsl(var(--chart-4))",
1993
- "hsl(var(--chart-5))"
1994
+ "var(--chart-1)",
1995
+ "var(--chart-2)",
1996
+ "var(--chart-3)",
1997
+ "var(--chart-4)",
1998
+ "var(--chart-5)"
1994
1999
  ];
1995
2000
  function chartColor(index, colors) {
1996
2001
  if (colors && colors.length > 0) {
@@ -2181,7 +2186,7 @@ function ChatInput({
2181
2186
  {
2182
2187
  "data-slot": "chat-input",
2183
2188
  className: cn(
2184
- "rounded-xl border border-border bg-background transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
2189
+ "rounded-xl border border-border bg-card transition-shadow focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",
2185
2190
  className
2186
2191
  ),
2187
2192
  style,
@@ -2260,7 +2265,7 @@ function ContextMenuContent({
2260
2265
  {
2261
2266
  "data-slot": "context-menu-content",
2262
2267
  className: cn(
2263
- "z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2268
+ "z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2264
2269
  className
2265
2270
  ),
2266
2271
  ...props
@@ -2278,7 +2283,7 @@ function ContextMenuItem({
2278
2283
  "data-slot": "context-menu-item",
2279
2284
  "data-variant": variant,
2280
2285
  className: cn(
2281
- "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2286
+ "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2282
2287
  className
2283
2288
  ),
2284
2289
  ...props
@@ -2598,7 +2603,7 @@ function DialogOverlay({
2598
2603
  {
2599
2604
  "data-slot": "dialog-overlay",
2600
2605
  className: cn(
2601
- "fixed inset-0 z-50 bg-black/50 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
2606
+ "fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
2602
2607
  className
2603
2608
  ),
2604
2609
  ...props
@@ -2618,7 +2623,7 @@ function DialogContent({
2618
2623
  {
2619
2624
  "data-slot": "dialog-content",
2620
2625
  className: cn(
2621
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-background p-6 shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
2626
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
2622
2627
  className
2623
2628
  ),
2624
2629
  ...props,
@@ -2771,7 +2776,7 @@ function DrawerOverlay({
2771
2776
  import_vaul.Drawer.Overlay,
2772
2777
  {
2773
2778
  "data-slot": "drawer-overlay",
2774
- className: cn("fixed inset-0 z-50 bg-black/50", className),
2779
+ className: cn("fixed inset-0 z-50 bg-(--overlay-background)", className),
2775
2780
  ...props
2776
2781
  }
2777
2782
  );
@@ -2788,7 +2793,7 @@ function DrawerContent({
2788
2793
  {
2789
2794
  "data-slot": "drawer-content",
2790
2795
  className: cn(
2791
- "group/drawer-content fixed z-50 flex h-auto flex-col border-border bg-background",
2796
+ "group/drawer-content fixed z-50 flex h-auto flex-col border-border bg-popover",
2792
2797
  "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
2793
2798
  "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
2794
2799
  "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
@@ -2890,7 +2895,7 @@ function DropdownMenuContent({
2890
2895
  {
2891
2896
  "data-slot": "dropdown-menu-content",
2892
2897
  className: cn(
2893
- "z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2898
+ "z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2894
2899
  className
2895
2900
  ),
2896
2901
  ...props
@@ -2910,7 +2915,7 @@ function DropdownMenuItem({
2910
2915
  "data-slot": "dropdown-menu-item",
2911
2916
  "data-variant": variant,
2912
2917
  className: cn(
2913
- "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2918
+ "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2914
2919
  className
2915
2920
  ),
2916
2921
  ...props
@@ -2932,7 +2937,7 @@ function DropdownMenuSubTrigger({
2932
2937
  {
2933
2938
  "data-slot": "dropdown-menu-sub-trigger",
2934
2939
  className: cn(
2935
- "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2940
+ "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-open:bg-(--menu-active-background) data-open:text-(--menu-active-foreground) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2936
2941
  className
2937
2942
  ),
2938
2943
  ...props,
@@ -2953,7 +2958,7 @@ function DropdownMenuSubContent({
2953
2958
  {
2954
2959
  "data-slot": "dropdown-menu-sub-content",
2955
2960
  className: cn(
2956
- "z-50 min-w-32 origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2961
+ "z-50 min-w-32 origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2957
2962
  className
2958
2963
  ),
2959
2964
  ...props
@@ -3124,9 +3129,9 @@ function Field2({ label, description, error, children, className, style }) {
3124
3129
  // src/components/components/Flex/index.tsx
3125
3130
  var import_jsx_runtime56 = require("react/jsx-runtime");
3126
3131
  var gapClass = {
3127
- small: "gap-2",
3128
- middle: "gap-4",
3129
- large: "gap-6"
3132
+ small: "gap-(--flex-gap-sm)",
3133
+ middle: "gap-(--flex-gap-md)",
3134
+ large: "gap-(--flex-gap-lg)"
3130
3135
  };
3131
3136
  var justifyClass = {
3132
3137
  start: "justify-start",
@@ -3159,6 +3164,7 @@ function Flex({
3159
3164
  className: cn(
3160
3165
  "flex",
3161
3166
  direction === "vertical" && "flex-col",
3167
+ gap === void 0 && "gap-(--flex-gap)",
3162
3168
  typeof gap === "string" && gapClass[gap],
3163
3169
  justify && justifyClass[justify],
3164
3170
  align && alignClass[align],
@@ -3293,7 +3299,7 @@ function Grid({ columns = 1, gap, className, style, children }) {
3293
3299
  {
3294
3300
  "data-slot": "grid",
3295
3301
  "data-columns": cols,
3296
- className: cn("grid", className),
3302
+ className: cn("grid", gap === void 0 && "gap-(--grid-gap)", className),
3297
3303
  style: {
3298
3304
  gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
3299
3305
  ...gap !== void 0 ? { gap } : {},
@@ -3334,7 +3340,7 @@ function Header({
3334
3340
  const hasLocales = locales !== void 0 && locales.length > 0;
3335
3341
  const hasUser = user !== void 0;
3336
3342
  const rootClass = cn(
3337
- "flex h-14 shrink-0 items-center gap-4 border-b bg-background px-4",
3343
+ "flex h-14 shrink-0 items-center gap-4 border-b bg-card px-4",
3338
3344
  className
3339
3345
  );
3340
3346
  if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales) {
@@ -3379,7 +3385,7 @@ function HeaderDropdownArea({
3379
3385
  DropdownMenuTrigger,
3380
3386
  {
3381
3387
  "data-slot": "header-dropdown",
3382
- className: cn(menuItemClass, "outline-hidden"),
3388
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3383
3389
  children: [
3384
3390
  dropdown.label,
3385
3391
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
@@ -3411,7 +3417,7 @@ function HeaderMenuArea({
3411
3417
  {
3412
3418
  "data-slot": "header-menu-item",
3413
3419
  "data-key": item.key,
3414
- className: cn(menuItemClass, "outline-hidden"),
3420
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3415
3421
  children: [
3416
3422
  item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
3417
3423
  item.label,
@@ -3443,7 +3449,7 @@ function HeaderMenuEntry({
3443
3449
  }) {
3444
3450
  if (item.children !== void 0 && item.children.length > 0) {
3445
3451
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuSub, { children: [
3446
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, children: [
3452
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
3447
3453
  item.icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
3448
3454
  item.label
3449
3455
  ] }),
@@ -3474,7 +3480,7 @@ function HeaderUserArea({
3474
3480
  DropdownMenuTrigger,
3475
3481
  {
3476
3482
  "data-slot": "header-user",
3477
- className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50",
3483
+ className: "flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors outline-hidden hover:bg-accent/50 cursor-pointer",
3478
3484
  children: identity
3479
3485
  }
3480
3486
  ),
@@ -3495,7 +3501,7 @@ function HeaderLocalesArea({
3495
3501
  DropdownMenuTrigger,
3496
3502
  {
3497
3503
  "data-slot": "header-locales",
3498
- className: cn(menuItemClass, "outline-hidden"),
3504
+ className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3499
3505
  children: [
3500
3506
  current?.label ?? locale,
3501
3507
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react15.ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
@@ -3548,7 +3554,7 @@ function HoverCardContent({
3548
3554
  {
3549
3555
  "data-slot": "hover-card-content",
3550
3556
  className: cn(
3551
- "z-50 w-64 origin-(--transform-origin) rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-hidden duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
3557
+ "z-50 w-64 origin-(--transform-origin) rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md shadow-(color:--shadow-color) outline-hidden duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
3552
3558
  className
3553
3559
  ),
3554
3560
  ...props
@@ -4068,15 +4074,17 @@ function RailTooltip({
4068
4074
 
4069
4075
  // src/components/components/Sidebar/index.tsx
4070
4076
  var import_runtime13 = require("@pactor-app/runtime");
4071
- var import_lucide_react17 = require("lucide-react");
4077
+ var import_react17 = require("react");
4078
+
4079
+ // src/ui/sidebar.tsx
4080
+ var React4 = __toESM(require("react"), 1);
4081
+ var import_class_variance_authority5 = require("class-variance-authority");
4082
+ var import_lucide_react18 = require("lucide-react");
4083
+
4084
+ // src/hooks/use-mobile.ts
4072
4085
  var import_react16 = require("react");
4073
- var import_jsx_runtime78 = require("react/jsx-runtime");
4074
- var SidebarDrawerContext = (0, import_react16.createContext)(null);
4075
- function useSidebarDrawer() {
4076
- return (0, import_react16.useContext)(SidebarDrawerContext);
4077
- }
4078
4086
  var MOBILE_MEDIA_QUERY = "(max-width: 767px)";
4079
- function useIsMobileViewport() {
4087
+ function useIsMobile() {
4080
4088
  const [isMobile, setIsMobile] = (0, import_react16.useState)(
4081
4089
  () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(MOBILE_MEDIA_QUERY).matches
4082
4090
  );
@@ -4094,6 +4102,512 @@ function useIsMobileViewport() {
4094
4102
  }, []);
4095
4103
  return isMobile;
4096
4104
  }
4105
+
4106
+ // src/ui/separator.tsx
4107
+ var import_separator = require("@base-ui/react/separator");
4108
+ var import_jsx_runtime78 = require("react/jsx-runtime");
4109
+ function Separator({
4110
+ className,
4111
+ orientation = "horizontal",
4112
+ decorative: _decorative,
4113
+ ...props
4114
+ }) {
4115
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4116
+ import_separator.Separator,
4117
+ {
4118
+ "data-slot": "separator",
4119
+ orientation,
4120
+ className: cn(
4121
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
4122
+ className
4123
+ ),
4124
+ ...props
4125
+ }
4126
+ );
4127
+ }
4128
+
4129
+ // src/ui/sheet.tsx
4130
+ var import_dialog3 = require("@base-ui/react/dialog");
4131
+ var import_lucide_react17 = require("lucide-react");
4132
+ var import_class_variance_authority4 = require("class-variance-authority");
4133
+ var import_jsx_runtime79 = require("react/jsx-runtime");
4134
+ function Sheet({
4135
+ ...props
4136
+ }) {
4137
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_dialog3.Dialog.Root, { "data-slot": "sheet", ...props });
4138
+ }
4139
+ function SheetPortal({
4140
+ ...props
4141
+ }) {
4142
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_dialog3.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
4143
+ }
4144
+ function SheetOverlay({
4145
+ className,
4146
+ ...props
4147
+ }) {
4148
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4149
+ import_dialog3.Dialog.Backdrop,
4150
+ {
4151
+ "data-slot": "sheet-overlay",
4152
+ className: cn(
4153
+ "fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
4154
+ className
4155
+ ),
4156
+ ...props
4157
+ }
4158
+ );
4159
+ }
4160
+ var sheetVariants = (0, import_class_variance_authority4.cva)(
4161
+ "fixed z-50 flex flex-col gap-4 border-border bg-popover shadow-lg shadow-(color:--shadow-color) transition ease-in-out data-open:animate-in data-open:duration-300 data-closed:animate-out data-closed:duration-200",
4162
+ {
4163
+ variants: {
4164
+ side: {
4165
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-open:slide-in-from-right data-closed:slide-out-to-right sm:max-w-sm",
4166
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-open:slide-in-from-left data-closed:slide-out-to-left sm:max-w-sm",
4167
+ top: "inset-x-0 top-0 border-b data-open:slide-in-from-top data-closed:slide-out-to-top",
4168
+ bottom: "inset-x-0 bottom-0 border-t data-open:slide-in-from-bottom data-closed:slide-out-to-bottom"
4169
+ }
4170
+ },
4171
+ defaultVariants: {
4172
+ side: "right"
4173
+ }
4174
+ }
4175
+ );
4176
+ function SheetContent({
4177
+ className,
4178
+ children,
4179
+ side = "right",
4180
+ ...props
4181
+ }) {
4182
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(SheetPortal, { "data-slot": "sheet-portal", children: [
4183
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SheetOverlay, {}),
4184
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
4185
+ import_dialog3.Dialog.Popup,
4186
+ {
4187
+ "data-slot": "sheet-content",
4188
+ className: cn(sheetVariants({ side }), className),
4189
+ ...props,
4190
+ children: [
4191
+ children,
4192
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
4193
+ import_dialog3.Dialog.Close,
4194
+ {
4195
+ "data-slot": "sheet-close",
4196
+ render: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4197
+ "button",
4198
+ {
4199
+ type: "button",
4200
+ className: "absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
4201
+ }
4202
+ ),
4203
+ children: [
4204
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_lucide_react17.XIcon, {}),
4205
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: "Close" })
4206
+ ]
4207
+ }
4208
+ )
4209
+ ]
4210
+ }
4211
+ )
4212
+ ] });
4213
+ }
4214
+ function SheetHeader({ className, ...props }) {
4215
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4216
+ "div",
4217
+ {
4218
+ "data-slot": "sheet-header",
4219
+ className: cn("flex flex-col gap-1.5 p-4", className),
4220
+ ...props
4221
+ }
4222
+ );
4223
+ }
4224
+ function SheetTitle({
4225
+ className,
4226
+ ...props
4227
+ }) {
4228
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4229
+ import_dialog3.Dialog.Title,
4230
+ {
4231
+ "data-slot": "sheet-title",
4232
+ className: cn("font-semibold text-foreground", className),
4233
+ ...props
4234
+ }
4235
+ );
4236
+ }
4237
+ function SheetDescription({
4238
+ className,
4239
+ ...props
4240
+ }) {
4241
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4242
+ import_dialog3.Dialog.Description,
4243
+ {
4244
+ "data-slot": "sheet-description",
4245
+ className: cn("text-sm text-muted-foreground", className),
4246
+ ...props
4247
+ }
4248
+ );
4249
+ }
4250
+
4251
+ // src/ui/skeleton.tsx
4252
+ var import_jsx_runtime80 = require("react/jsx-runtime");
4253
+ function Skeleton({ className, ...props }) {
4254
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4255
+ "div",
4256
+ {
4257
+ "data-slot": "skeleton",
4258
+ className: cn("animate-pulse rounded-md bg-muted", className),
4259
+ ...props
4260
+ }
4261
+ );
4262
+ }
4263
+
4264
+ // src/ui/sidebar.tsx
4265
+ var import_jsx_runtime81 = require("react/jsx-runtime");
4266
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
4267
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
4268
+ var SIDEBAR_WIDTH = "16rem";
4269
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
4270
+ var SIDEBAR_WIDTH_ICON = "3rem";
4271
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
4272
+ var SidebarContext = React4.createContext(null);
4273
+ function useSidebar() {
4274
+ const context = React4.useContext(SidebarContext);
4275
+ if (!context) {
4276
+ throw new Error("useSidebar must be used within a SidebarProvider.");
4277
+ }
4278
+ return context;
4279
+ }
4280
+ function SidebarProvider({
4281
+ defaultOpen = true,
4282
+ open: openProp,
4283
+ onOpenChange: setOpenProp,
4284
+ className,
4285
+ style,
4286
+ children,
4287
+ ...props
4288
+ }) {
4289
+ const isMobile = useIsMobile();
4290
+ const [openMobile, setOpenMobile] = React4.useState(false);
4291
+ const [_open, _setOpen] = React4.useState(defaultOpen);
4292
+ const open = openProp ?? _open;
4293
+ const setOpen = React4.useCallback(
4294
+ (value) => {
4295
+ const openState = typeof value === "function" ? value(open) : value;
4296
+ if (setOpenProp) {
4297
+ setOpenProp(openState);
4298
+ } else {
4299
+ _setOpen(openState);
4300
+ }
4301
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
4302
+ },
4303
+ [setOpenProp, open]
4304
+ );
4305
+ const toggleSidebar = React4.useCallback(() => {
4306
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
4307
+ }, [isMobile, setOpen, setOpenMobile]);
4308
+ React4.useEffect(() => {
4309
+ const handleKeyDown = (event) => {
4310
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
4311
+ event.preventDefault();
4312
+ toggleSidebar();
4313
+ }
4314
+ };
4315
+ window.addEventListener("keydown", handleKeyDown);
4316
+ return () => window.removeEventListener("keydown", handleKeyDown);
4317
+ }, [toggleSidebar]);
4318
+ const state = open ? "expanded" : "collapsed";
4319
+ const contextValue = React4.useMemo(
4320
+ () => ({
4321
+ state,
4322
+ open,
4323
+ setOpen,
4324
+ isMobile,
4325
+ openMobile,
4326
+ setOpenMobile,
4327
+ toggleSidebar
4328
+ }),
4329
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
4330
+ );
4331
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TooltipProvider, { delay: 0, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4332
+ "div",
4333
+ {
4334
+ "data-slot": "sidebar-wrapper",
4335
+ style: {
4336
+ "--sidebar-width": SIDEBAR_WIDTH,
4337
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
4338
+ ...style
4339
+ },
4340
+ className: cn(
4341
+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
4342
+ className
4343
+ ),
4344
+ ...props,
4345
+ children
4346
+ }
4347
+ ) }) });
4348
+ }
4349
+ function SidebarRoot({
4350
+ side = "left",
4351
+ variant = "sidebar",
4352
+ collapsible = "offcanvas",
4353
+ className,
4354
+ children,
4355
+ ...props
4356
+ }) {
4357
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
4358
+ if (collapsible === "none") {
4359
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4360
+ "div",
4361
+ {
4362
+ "data-slot": "sidebar",
4363
+ className: cn(
4364
+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
4365
+ className
4366
+ ),
4367
+ ...props,
4368
+ children
4369
+ }
4370
+ );
4371
+ }
4372
+ if (isMobile) {
4373
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
4374
+ SheetContent,
4375
+ {
4376
+ "data-sidebar": "sidebar",
4377
+ "data-slot": "sidebar",
4378
+ "data-mobile": "true",
4379
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
4380
+ style: {
4381
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
4382
+ },
4383
+ side,
4384
+ children: [
4385
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(SheetHeader, { className: "sr-only", children: [
4386
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SheetTitle, { children: "Sidebar" }),
4387
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
4388
+ ] }),
4389
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex h-full w-full flex-col", children })
4390
+ ]
4391
+ }
4392
+ ) });
4393
+ }
4394
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
4395
+ "div",
4396
+ {
4397
+ className: "group peer hidden text-sidebar-foreground md:block",
4398
+ "data-state": state,
4399
+ "data-collapsible": state === "collapsed" ? collapsible : "",
4400
+ "data-variant": variant,
4401
+ "data-side": side,
4402
+ "data-slot": "sidebar",
4403
+ children: [
4404
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4405
+ "div",
4406
+ {
4407
+ "data-slot": "sidebar-gap",
4408
+ className: cn(
4409
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
4410
+ "group-data-[collapsible=offcanvas]:w-0",
4411
+ "group-data-[side=right]:rotate-180",
4412
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
4413
+ )
4414
+ }
4415
+ ),
4416
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4417
+ "div",
4418
+ {
4419
+ "data-slot": "sidebar-container",
4420
+ className: cn(
4421
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
4422
+ side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
4423
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
4424
+ className
4425
+ ),
4426
+ ...props,
4427
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4428
+ "div",
4429
+ {
4430
+ "data-sidebar": "sidebar",
4431
+ "data-slot": "sidebar-inner",
4432
+ className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
4433
+ children
4434
+ }
4435
+ )
4436
+ }
4437
+ )
4438
+ ]
4439
+ }
4440
+ );
4441
+ }
4442
+ function SidebarInset({ className, ...props }) {
4443
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4444
+ "main",
4445
+ {
4446
+ "data-slot": "sidebar-inset",
4447
+ className: cn(
4448
+ "relative flex w-full flex-1 flex-col bg-background",
4449
+ "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
4450
+ className
4451
+ ),
4452
+ ...props
4453
+ }
4454
+ );
4455
+ }
4456
+ function SidebarHeader({ className, ...props }) {
4457
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4458
+ "div",
4459
+ {
4460
+ "data-slot": "sidebar-header",
4461
+ "data-sidebar": "header",
4462
+ className: cn("flex flex-col gap-2 p-2", className),
4463
+ ...props
4464
+ }
4465
+ );
4466
+ }
4467
+ function SidebarFooter({ className, ...props }) {
4468
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4469
+ "div",
4470
+ {
4471
+ "data-slot": "sidebar-footer",
4472
+ "data-sidebar": "footer",
4473
+ className: cn("flex flex-col gap-2 p-2", className),
4474
+ ...props
4475
+ }
4476
+ );
4477
+ }
4478
+ function SidebarContent({ className, ...props }) {
4479
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4480
+ "div",
4481
+ {
4482
+ "data-slot": "sidebar-content",
4483
+ "data-sidebar": "content",
4484
+ className: cn(
4485
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
4486
+ className
4487
+ ),
4488
+ ...props
4489
+ }
4490
+ );
4491
+ }
4492
+ function renderAsChild(children, dataSlot, className, rest) {
4493
+ if (!React4.isValidElement(children)) {
4494
+ return null;
4495
+ }
4496
+ return React4.cloneElement(children, {
4497
+ "data-slot": dataSlot,
4498
+ className: cn(
4499
+ className,
4500
+ children.props.className
4501
+ ),
4502
+ ...rest
4503
+ });
4504
+ }
4505
+ function SidebarMenu({ className, ...props }) {
4506
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4507
+ "ul",
4508
+ {
4509
+ "data-slot": "sidebar-menu",
4510
+ "data-sidebar": "menu",
4511
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
4512
+ ...props
4513
+ }
4514
+ );
4515
+ }
4516
+ function SidebarMenuItem({ className, ...props }) {
4517
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4518
+ "li",
4519
+ {
4520
+ "data-slot": "sidebar-menu-item",
4521
+ "data-sidebar": "menu-item",
4522
+ className: cn("group/menu-item relative", className),
4523
+ ...props
4524
+ }
4525
+ );
4526
+ }
4527
+ var sidebarMenuButtonVariants = (0, import_class_variance_authority5.cva)(
4528
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
4529
+ {
4530
+ variants: {
4531
+ variant: {
4532
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
4533
+ outline: "bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
4534
+ },
4535
+ size: {
4536
+ default: "h-8 text-sm",
4537
+ sm: "h-7 text-xs",
4538
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
4539
+ }
4540
+ },
4541
+ defaultVariants: {
4542
+ variant: "default",
4543
+ size: "default"
4544
+ }
4545
+ }
4546
+ );
4547
+ function SidebarMenuButton({
4548
+ asChild = false,
4549
+ isActive = false,
4550
+ variant = "default",
4551
+ size = "default",
4552
+ tooltip,
4553
+ className,
4554
+ children,
4555
+ ...props
4556
+ }) {
4557
+ const { isMobile, state } = useSidebar();
4558
+ const cls = cn(sidebarMenuButtonVariants({ variant, size }), className);
4559
+ const button = asChild ? renderAsChild(children, "sidebar-menu-button", cls, {
4560
+ "data-sidebar": "menu-button",
4561
+ "data-size": size,
4562
+ "data-active": isActive,
4563
+ ...props
4564
+ }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4565
+ "button",
4566
+ {
4567
+ "data-slot": "sidebar-menu-button",
4568
+ "data-sidebar": "menu-button",
4569
+ "data-size": size,
4570
+ "data-active": isActive,
4571
+ className: cls,
4572
+ ...props,
4573
+ children
4574
+ }
4575
+ );
4576
+ if (!tooltip) {
4577
+ return button;
4578
+ }
4579
+ if (typeof tooltip === "string") {
4580
+ tooltip = {
4581
+ children: tooltip
4582
+ };
4583
+ }
4584
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Tooltip2, { children: [
4585
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TooltipTrigger, { render: button }),
4586
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4587
+ TooltipContent,
4588
+ {
4589
+ side: "right",
4590
+ align: "center",
4591
+ hidden: state !== "collapsed" || isMobile,
4592
+ ...tooltip
4593
+ }
4594
+ )
4595
+ ] });
4596
+ }
4597
+
4598
+ // src/components/components/Sidebar/index.tsx
4599
+ var import_jsx_runtime82 = require("react/jsx-runtime");
4600
+ function useSidebarDrawer() {
4601
+ try {
4602
+ const ctx = useSidebar();
4603
+ return {
4604
+ close: () => ctx.setOpenMobile(false),
4605
+ collapsed: ctx.state === "collapsed"
4606
+ };
4607
+ } catch {
4608
+ return null;
4609
+ }
4610
+ }
4097
4611
  function useOptionalRenderer() {
4098
4612
  try {
4099
4613
  return (0, import_runtime13.useRenderer)();
@@ -4101,17 +4615,98 @@ function useOptionalRenderer() {
4101
4615
  return null;
4102
4616
  }
4103
4617
  }
4104
- function SidebarContent({ content }) {
4618
+ function SidebarContentSlot({ content }) {
4105
4619
  const renderer = useOptionalRenderer();
4106
4620
  if (renderer !== null && typeof content === "object" && content !== null && !("$$typeof" in content) && "type" in content) {
4107
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: renderer.renderChildren([content]) });
4621
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: renderer.renderChildren([content]) });
4108
4622
  }
4109
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: content });
4623
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: content });
4110
4624
  }
4111
4625
  function isBrandObject(brand) {
4112
4626
  return typeof brand === "object" && brand !== null && !("$$typeof" in brand) && "title" in brand;
4113
4627
  }
4114
- function Sidebar({
4628
+ function BrandNode({ brand, collapsed }) {
4629
+ if (brand === void 0 || brand === null) {
4630
+ return null;
4631
+ }
4632
+ if (isBrandObject(brand)) {
4633
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
4634
+ brand.logo ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4635
+ "img",
4636
+ {
4637
+ "data-slot": "sidebar-brand-logo",
4638
+ src: brand.logo,
4639
+ alt: brand.title,
4640
+ className: "size-6 shrink-0"
4641
+ }
4642
+ ) : null,
4643
+ collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate text-sm font-semibold", children: brand.title })
4644
+ ] });
4645
+ }
4646
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: brand });
4647
+ }
4648
+ function SidebarNavItems({ items }) {
4649
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarMenu, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarNavEntry, { item, depth: 0 }, item.href ?? item.label ?? index)) });
4650
+ }
4651
+ function SidebarNavEntry({ item, depth }) {
4652
+ const iconNode = item.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: item.icon, size: "sm" }) : null;
4653
+ const labelNode = item.label;
4654
+ const button = item.href ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarMenuButton, { asChild: true, tooltip: item.label, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("a", { href: item.href, children: [
4655
+ iconNode,
4656
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: labelNode })
4657
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(SidebarMenuButton, { tooltip: item.label, children: [
4658
+ iconNode,
4659
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: labelNode })
4660
+ ] });
4661
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(SidebarMenuItem, { children: [
4662
+ button,
4663
+ item.children && item.children.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: cn("ml-4"), children: item.children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4664
+ SidebarNavEntry,
4665
+ {
4666
+ item: child,
4667
+ depth: depth + 1
4668
+ },
4669
+ child.href ?? child.label ?? index
4670
+ )) })
4671
+ ] });
4672
+ }
4673
+ function Sidebar({
4674
+ brand,
4675
+ items = [],
4676
+ content,
4677
+ sidebarFooter,
4678
+ collapsible,
4679
+ onCollapse,
4680
+ locationKey,
4681
+ drawer = true,
4682
+ className,
4683
+ style,
4684
+ children
4685
+ }) {
4686
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4687
+ SidebarProvider,
4688
+ {
4689
+ defaultOpen: true,
4690
+ className,
4691
+ style,
4692
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4693
+ SidebarInner,
4694
+ {
4695
+ brand,
4696
+ items,
4697
+ content,
4698
+ sidebarFooter,
4699
+ collapsible,
4700
+ onCollapse,
4701
+ locationKey,
4702
+ drawer,
4703
+ children
4704
+ }
4705
+ )
4706
+ }
4707
+ );
4708
+ }
4709
+ function SidebarInner({
4115
4710
  brand,
4116
4711
  items = [],
4117
4712
  content,
@@ -4120,218 +4715,92 @@ function Sidebar({
4120
4715
  onCollapse,
4121
4716
  locationKey,
4122
4717
  drawer = true,
4123
- className,
4124
- style,
4125
4718
  children
4126
4719
  }) {
4127
4720
  const { t } = (0, import_runtime13.useI18n)();
4128
- const isMobile = useIsMobileViewport();
4129
- const [drawerOpen, setDrawerOpen] = (0, import_react16.useState)(false);
4130
- const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
4721
+ const isMobile = useIsMobile();
4722
+ const { state, setOpenMobile, toggleSidebar } = useSidebar();
4723
+ const collapsed = state === "collapsed";
4724
+ const prevCollapsed = (0, import_react17.useRef)(collapsed);
4725
+ (0, import_react17.useEffect)(() => {
4726
+ if (prevCollapsed.current !== collapsed) {
4727
+ prevCollapsed.current = collapsed;
4728
+ onCollapse?.(collapsed);
4729
+ }
4730
+ }, [collapsed, onCollapse]);
4731
+ (0, import_react17.useEffect)(() => {
4732
+ if (locationKey !== void 0) {
4733
+ setOpenMobile(false);
4734
+ }
4735
+ }, [locationKey, setOpenMobile]);
4131
4736
  const collapsedEffective = collapsible === true && collapsed && !isMobile;
4132
- const close = (0, import_react16.useCallback)(() => setDrawerOpen(false), []);
4133
- const toggleCollapsed = () => {
4134
- const next = !collapsed;
4135
- setCollapsed(next);
4136
- onCollapse?.(next);
4137
- };
4138
- const [trackedLocationKey, setTrackedLocationKey] = (0, import_react16.useState)(locationKey);
4139
- if (trackedLocationKey !== locationKey) {
4140
- setTrackedLocationKey(locationKey);
4141
- setDrawerOpen(false);
4142
- }
4143
- (0, import_react16.useEffect)(() => {
4144
- if (!drawerOpen) {
4145
- return;
4146
- }
4147
- const onKeyDown = (event) => {
4148
- if (event.key === "Escape") {
4149
- setDrawerOpen(false);
4150
- }
4151
- };
4152
- window.addEventListener("keydown", onKeyDown);
4153
- return () => window.removeEventListener("keydown", onKeyDown);
4154
- }, [drawerOpen]);
4155
- const brandNode = isBrandObject(brand) ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
4156
- brand.logo ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4157
- "img",
4737
+ const brandNode = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BrandNode, { brand, collapsed: collapsedEffective });
4738
+ const sidebarContent = content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarContentSlot, { content }) : items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarNavItems, { items }) : null;
4739
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
4740
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
4741
+ SidebarRoot,
4158
4742
  {
4159
- "data-slot": "sidebar-brand-logo",
4160
- src: brand.logo,
4161
- alt: brand.title,
4162
- className: "size-6 shrink-0"
4743
+ collapsible: collapsible ? "icon" : "offcanvas",
4744
+ children: [
4745
+ (brand !== void 0 || collapsible) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
4746
+ "div",
4747
+ {
4748
+ "data-slot": "sidebar-brand",
4749
+ className: cn(
4750
+ "flex h-14 shrink-0 items-center gap-2 px-2",
4751
+ collapsedEffective && "justify-center px-0"
4752
+ ),
4753
+ children: [
4754
+ collapsedEffective ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: brandNode }),
4755
+ collapsible && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4756
+ "button",
4757
+ {
4758
+ type: "button",
4759
+ "data-slot": "sidebar-collapse-trigger",
4760
+ "aria-label": collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
4761
+ "aria-expanded": !collapsedEffective,
4762
+ className: "flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
4763
+ onClick: toggleSidebar,
4764
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: collapsedEffective ? "chevron-right" : "chevron-left", size: 16 })
4765
+ }
4766
+ )
4767
+ ]
4768
+ }
4769
+ ) }),
4770
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarContent, { children: sidebarContent }),
4771
+ sidebarFooter !== void 0 && sidebarFooter !== null && !collapsedEffective && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarFooter, { children: sidebarFooter })
4772
+ ]
4163
4773
  }
4164
- ) : null,
4165
- collapsedEffective ? null : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-sm font-semibold", children: brand.title })
4166
- ] }) : brand;
4167
- const collapseTrigger = collapsible && !isMobile ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4168
- "button",
4169
- {
4170
- type: "button",
4171
- "data-slot": "sidebar-collapse-trigger",
4172
- "aria-label": collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
4173
- "aria-expanded": !collapsedEffective,
4174
- title: collapsedEffective ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
4175
- className: cn(
4176
- "cursor-pointer flex size-8 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground"
4177
- ),
4178
- onClick: toggleCollapsed,
4179
- children: collapsedEffective ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react17.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react17.ChevronLeft, { "aria-hidden": true, className: "size-4" })
4180
- }
4181
- ) : null;
4182
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4183
- SidebarDrawerContext.Provider,
4184
- {
4185
- value: { close, collapsed: collapsedEffective },
4186
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4774
+ ),
4775
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(SidebarInset, { children: [
4776
+ drawer && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
4187
4777
  "div",
4188
4778
  {
4189
- "data-slot": "sidebar-layout",
4190
- className: cn("flex min-h-screen w-full", className),
4191
- style,
4779
+ "data-slot": "sidebar-topbar",
4780
+ className: "flex h-14 items-center gap-2 border-b border-sidebar-border bg-sidebar px-3 md:hidden",
4192
4781
  children: [
4193
- drawer && drawerOpen ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4194
- "div",
4195
- {
4196
- "data-slot": "sidebar-scrim",
4197
- "aria-hidden": true,
4198
- className: "fixed inset-0 z-40 bg-black/40 md:hidden",
4199
- onClick: close
4200
- }
4201
- ) : null,
4202
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4203
- "aside",
4782
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4783
+ "button",
4204
4784
  {
4205
- "data-slot": "sidebar",
4206
- "data-collapsed": collapsedEffective || void 0,
4207
- "data-open": drawerOpen ? "true" : "false",
4208
- inert: drawer && isMobile && !drawerOpen ? true : void 0,
4209
- className: cn(
4210
- "flex shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width,transform]",
4211
- collapsedEffective ? "w-16" : "w-60",
4212
- // 移动端覆盖抽屉:退出文档流,关闭时移出屏幕
4213
- drawer && "max-md:fixed max-md:inset-y-0 max-md:left-0 max-md:z-50 max-md:w-60 max-md:-translate-x-full max-md:data-[open=true]:translate-x-0"
4214
- ),
4215
- children: [
4216
- brand !== void 0 || collapseTrigger !== null ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4217
- "div",
4218
- {
4219
- "data-slot": "sidebar-brand",
4220
- className: cn(
4221
- "flex h-14 shrink-0 items-center gap-2 border-b border-sidebar-border px-4",
4222
- // 移动端品牌维持顶栏现状:抽屉内不重复渲染品牌行
4223
- "max-md:hidden",
4224
- collapsedEffective && "justify-center px-2"
4225
- ),
4226
- children: [
4227
- collapsedEffective ? null : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: brandNode }),
4228
- collapseTrigger
4229
- ]
4230
- }
4231
- ) : null,
4232
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4233
- "nav",
4234
- {
4235
- "data-slot": "sidebar-nav",
4236
- className: "min-h-0 flex-1 overflow-auto p-2",
4237
- children: content !== void 0 && content !== null ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarContent, { content }) : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4238
- SidebarEntry,
4239
- {
4240
- item,
4241
- depth: 0,
4242
- collapsed: collapsedEffective
4243
- },
4244
- item.href ?? item.label ?? index
4245
- ))
4246
- }
4247
- ),
4248
- sidebarFooter !== void 0 && sidebarFooter !== null && !collapsedEffective ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4249
- "div",
4250
- {
4251
- "data-slot": "sidebar-footer",
4252
- className: "shrink-0 border-t border-sidebar-border p-2",
4253
- children: sidebarFooter
4254
- }
4255
- ) : null
4256
- ]
4785
+ type: "button",
4786
+ "data-slot": "sidebar-menu-trigger",
4787
+ "aria-label": t("pactor.layout.openNavigation"),
4788
+ className: "flex size-8 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
4789
+ onClick: toggleSidebar,
4790
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: "menu", size: 18 })
4257
4791
  }
4258
4792
  ),
4259
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("main", { "data-slot": "sidebar-content", className: "min-w-0 flex-1", children: [
4260
- drawer ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4261
- "div",
4262
- {
4263
- "data-slot": "sidebar-topbar",
4264
- className: "flex h-14 items-center gap-2 border-b border-sidebar-border bg-sidebar px-3 md:hidden",
4265
- children: [
4266
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4267
- "button",
4268
- {
4269
- type: "button",
4270
- "data-slot": "sidebar-menu-trigger",
4271
- "aria-label": t("pactor.layout.openNavigation"),
4272
- "aria-expanded": drawerOpen,
4273
- className: "flex size-8 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",
4274
- onClick: () => setDrawerOpen(true),
4275
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: "menu", size: 18 })
4276
- }
4277
- ),
4278
- brandNode
4279
- ]
4280
- }
4281
- ) : null,
4282
- children
4283
- ] })
4793
+ brandNode
4284
4794
  ]
4285
4795
  }
4286
- )
4287
- }
4288
- );
4289
- }
4290
- function SidebarEntry({
4291
- item,
4292
- depth,
4293
- collapsed
4294
- }) {
4295
- const entryClass = cn(
4296
- "flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",
4297
- "text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
4298
- collapsed && "justify-center px-0"
4299
- );
4300
- const indentStyle = !collapsed && depth > 0 ? { paddingLeft: 12 + depth * 16 } : void 0;
4301
- const labelNode = collapsed ? null : item.label;
4302
- const iconNode = item.icon ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: item.icon, size: "sm" }) : null;
4303
- const entry = item.href ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
4304
- "a",
4305
- {
4306
- "data-slot": "sidebar-item",
4307
- href: item.href,
4308
- className: entryClass,
4309
- style: indentStyle,
4310
- children: [
4311
- iconNode,
4312
- labelNode
4313
- ]
4314
- }
4315
- ) : /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { "data-slot": "sidebar-item", className: entryClass, style: indentStyle, children: [
4316
- iconNode,
4317
- labelNode
4318
- ] });
4319
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { "data-slot": "sidebar-entry", children: [
4320
- collapsed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RailTooltip, { label: item.label, children: entry }) : entry,
4321
- item.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4322
- SidebarEntry,
4323
- {
4324
- item: child,
4325
- depth: depth + 1,
4326
- collapsed
4327
- },
4328
- child.href ?? child.label ?? index
4329
- ))
4796
+ ),
4797
+ children
4798
+ ] })
4330
4799
  ] });
4331
4800
  }
4332
4801
 
4333
4802
  // src/components/components/Menu/index.tsx
4334
- var import_jsx_runtime79 = require("react/jsx-runtime");
4803
+ var import_jsx_runtime83 = require("react/jsx-runtime");
4335
4804
  function Menu2({
4336
4805
  items = [],
4337
4806
  mode = "inline",
@@ -4343,7 +4812,7 @@ function Menu2({
4343
4812
  const drawer = useSidebarDrawer();
4344
4813
  const collapsed = mode === "inline" && drawer?.collapsed === true;
4345
4814
  let previousGroup;
4346
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4815
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4347
4816
  "nav",
4348
4817
  {
4349
4818
  "data-slot": "menu",
@@ -4360,8 +4829,8 @@ function Menu2({
4360
4829
  groupLabel = item.group;
4361
4830
  }
4362
4831
  previousGroup = item.group;
4363
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-group-entry", children: [
4364
- groupLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4832
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { "data-slot": "menu-group-entry", children: [
4833
+ groupLabel !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4365
4834
  "div",
4366
4835
  {
4367
4836
  "data-slot": "menu-group",
@@ -4369,7 +4838,7 @@ function Menu2({
4369
4838
  children: groupLabel
4370
4839
  }
4371
4840
  ),
4372
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4841
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4373
4842
  MenuEntry,
4374
4843
  {
4375
4844
  item,
@@ -4394,7 +4863,7 @@ function MenuEntry({
4394
4863
  collapsed = false
4395
4864
  }) {
4396
4865
  const selected = item.key === selectedKey;
4397
- const button = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
4866
+ const button = /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
4398
4867
  "button",
4399
4868
  {
4400
4869
  type: "button",
@@ -4405,7 +4874,7 @@ function MenuEntry({
4405
4874
  "flex w-full items-center gap-2 rounded-md text-sm transition-colors",
4406
4875
  mode === "horizontal" ? "px-3 py-2" : "px-3 py-2 text-left",
4407
4876
  collapsed && "justify-center px-0",
4408
- selected ? "bg-accent font-medium text-accent-foreground" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
4877
+ selected ? "bg-(--menu-active-background) font-medium text-(--menu-active-foreground)" : "cursor-pointer text-muted-foreground hover:bg-(--menu-hover-background)/50 hover:text-foreground",
4409
4878
  item.disabled && "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-muted-foreground"
4410
4879
  ),
4411
4880
  style: mode === "inline" && depth > 0 && !collapsed ? { paddingLeft: 12 + depth * 16 } : void 0,
@@ -4415,10 +4884,10 @@ function MenuEntry({
4415
4884
  }
4416
4885
  },
4417
4886
  children: [
4418
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
4419
- collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label }),
4420
- item.dot && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { "data-slot": "menu-item-dot", className: "size-1.5 shrink-0 rounded-full bg-destructive" }) : null,
4421
- item.badge !== void 0 && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4887
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
4888
+ collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: item.label }),
4889
+ item.dot && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { "data-slot": "menu-item-dot", className: "size-1.5 shrink-0 rounded-full bg-destructive" }) : null,
4890
+ item.badge !== void 0 && !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4422
4891
  "span",
4423
4892
  {
4424
4893
  "data-slot": "menu-item-badge",
@@ -4429,9 +4898,9 @@ function MenuEntry({
4429
4898
  ]
4430
4899
  }
4431
4900
  );
4432
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
4433
- collapsed ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(RailTooltip, { label: item.label, children: button }) : button,
4434
- item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4901
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
4902
+ collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RailTooltip, { label: item.label, children: button }) : button,
4903
+ item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
4435
4904
  MenuEntry,
4436
4905
  {
4437
4906
  item: child,
@@ -4449,17 +4918,17 @@ function MenuEntry({
4449
4918
  // src/ui/menubar.tsx
4450
4919
  var import_menu2 = require("@base-ui/react/menu");
4451
4920
  var import_menubar = require("@base-ui/react/menubar");
4452
- var import_jsx_runtime80 = require("react/jsx-runtime");
4921
+ var import_jsx_runtime84 = require("react/jsx-runtime");
4453
4922
  function Menubar({
4454
4923
  className,
4455
4924
  ...props
4456
4925
  }) {
4457
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4926
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4458
4927
  import_menubar.Menubar,
4459
4928
  {
4460
4929
  "data-slot": "menubar",
4461
4930
  className: cn(
4462
- "flex h-9 items-center gap-1 rounded-md border border-border bg-background p-1 shadow-xs",
4931
+ "flex h-9 items-center gap-1 rounded-md border border-border bg-card p-1 shadow-xs",
4463
4932
  className
4464
4933
  ),
4465
4934
  ...props
@@ -4469,18 +4938,18 @@ function Menubar({
4469
4938
  function MenubarMenu({
4470
4939
  ...props
4471
4940
  }) {
4472
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Root, { "data-slot": "menubar-menu", ...props });
4941
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_menu2.Menu.Root, { "data-slot": "menubar-menu", ...props });
4473
4942
  }
4474
4943
  function MenubarTrigger({
4475
4944
  className,
4476
4945
  ...props
4477
4946
  }) {
4478
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4947
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4479
4948
  import_menu2.Menu.Trigger,
4480
4949
  {
4481
4950
  "data-slot": "menubar-trigger",
4482
4951
  className: cn(
4483
- "flex cursor-pointer items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground",
4952
+ "flex cursor-pointer items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-(--menu-hover-background) hover:text-(--menu-hover-foreground) focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-open:bg-(--menu-active-background) data-open:text-(--menu-active-foreground)",
4484
4953
  className
4485
4954
  ),
4486
4955
  ...props
@@ -4494,19 +4963,19 @@ function MenubarContent({
4494
4963
  sideOffset = 8,
4495
4964
  ...props
4496
4965
  }) {
4497
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_menu2.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4966
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_menu2.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4498
4967
  import_menu2.Menu.Positioner,
4499
4968
  {
4500
4969
  align,
4501
4970
  side,
4502
4971
  sideOffset,
4503
4972
  className: "isolate z-50",
4504
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4973
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4505
4974
  import_menu2.Menu.Popup,
4506
4975
  {
4507
4976
  "data-slot": "menubar-content",
4508
4977
  className: cn(
4509
- "z-50 min-w-36 origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
4978
+ "z-50 min-w-36 origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
4510
4979
  className
4511
4980
  ),
4512
4981
  ...props
@@ -4520,13 +4989,13 @@ function MenubarItem({
4520
4989
  variant = "default",
4521
4990
  ...props
4522
4991
  }) {
4523
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4992
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4524
4993
  import_menu2.Menu.Item,
4525
4994
  {
4526
4995
  "data-slot": "menubar-item",
4527
4996
  "data-variant": variant,
4528
4997
  className: cn(
4529
- "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
4998
+ "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
4530
4999
  className
4531
5000
  ),
4532
5001
  ...props
@@ -4535,17 +5004,17 @@ function MenubarItem({
4535
5004
  }
4536
5005
 
4537
5006
  // src/components/components/Menubar/index.tsx
4538
- var import_jsx_runtime81 = require("react/jsx-runtime");
5007
+ var import_jsx_runtime85 = require("react/jsx-runtime");
4539
5008
  function Menubar2({ menus = [], onSelect, className, style }) {
4540
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(MenubarMenu, { children: [
4541
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarTrigger, { children: menu.label }),
4542
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
5009
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(MenubarMenu, { children: [
5010
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(MenubarTrigger, { children: menu.label }),
5011
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
4543
5012
  MenubarItem,
4544
5013
  {
4545
5014
  disabled: item.disabled,
4546
5015
  onClick: () => onSelect?.(item.value),
4547
5016
  children: [
4548
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
5017
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
4549
5018
  item.label
4550
5019
  ]
4551
5020
  },
@@ -4556,15 +5025,15 @@ function Menubar2({ menus = [], onSelect, className, style }) {
4556
5025
 
4557
5026
  // src/ui/navigation-menu.tsx
4558
5027
  var import_navigation_menu = require("@base-ui/react/navigation-menu");
4559
- var import_lucide_react18 = require("lucide-react");
4560
- var import_class_variance_authority4 = require("class-variance-authority");
4561
- var import_jsx_runtime82 = require("react/jsx-runtime");
5028
+ var import_lucide_react19 = require("lucide-react");
5029
+ var import_class_variance_authority6 = require("class-variance-authority");
5030
+ var import_jsx_runtime86 = require("react/jsx-runtime");
4562
5031
  function NavigationMenu({
4563
5032
  className,
4564
5033
  children,
4565
5034
  ...props
4566
5035
  }) {
4567
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5036
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
4568
5037
  import_navigation_menu.NavigationMenu.Root,
4569
5038
  {
4570
5039
  "data-slot": "navigation-menu",
@@ -4572,7 +5041,7 @@ function NavigationMenu({
4572
5041
  ...props,
4573
5042
  children: [
4574
5043
  children,
4575
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationMenuViewport, {})
5044
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(NavigationMenuViewport, {})
4576
5045
  ]
4577
5046
  }
4578
5047
  );
@@ -4581,7 +5050,7 @@ function NavigationMenuList({
4581
5050
  className,
4582
5051
  ...props
4583
5052
  }) {
4584
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5053
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4585
5054
  import_navigation_menu.NavigationMenu.List,
4586
5055
  {
4587
5056
  "data-slot": "navigation-menu-list",
@@ -4594,7 +5063,7 @@ function NavigationMenuItem({
4594
5063
  className,
4595
5064
  ...props
4596
5065
  }) {
4597
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5066
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4598
5067
  import_navigation_menu.NavigationMenu.Item,
4599
5068
  {
4600
5069
  "data-slot": "navigation-menu-item",
@@ -4603,15 +5072,15 @@ function NavigationMenuItem({
4603
5072
  }
4604
5073
  );
4605
5074
  }
4606
- var navigationMenuTriggerStyle = (0, import_class_variance_authority4.cva)(
4607
- "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-open:bg-accent/50 data-open:text-accent-foreground"
5075
+ var navigationMenuTriggerStyle = (0, import_class_variance_authority6.cva)(
5076
+ "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-md bg-transparent px-4 py-2 text-sm font-medium transition-colors hover:bg-(--menu-hover-background) hover:text-(--menu-hover-foreground) focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-open:bg-(--menu-active-background)/50 data-open:text-(--menu-active-foreground)"
4608
5077
  );
4609
5078
  function NavigationMenuTrigger({
4610
5079
  className,
4611
5080
  children,
4612
5081
  ...props
4613
5082
  }) {
4614
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5083
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
4615
5084
  import_navigation_menu.NavigationMenu.Trigger,
4616
5085
  {
4617
5086
  "data-slot": "navigation-menu-trigger",
@@ -4619,8 +5088,8 @@ function NavigationMenuTrigger({
4619
5088
  ...props,
4620
5089
  children: [
4621
5090
  children,
4622
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4623
- import_lucide_react18.ChevronDownIcon,
5091
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5092
+ import_lucide_react19.ChevronDownIcon,
4624
5093
  {
4625
5094
  className: "relative top-px ml-1 size-3 transition-transform duration-200 group-data-open/navigation-menu-trigger:rotate-180",
4626
5095
  "aria-hidden": "true"
@@ -4634,7 +5103,7 @@ function NavigationMenuContent({
4634
5103
  className,
4635
5104
  ...props
4636
5105
  }) {
4637
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5106
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4638
5107
  import_navigation_menu.NavigationMenu.Content,
4639
5108
  {
4640
5109
  "data-slot": "navigation-menu-content",
@@ -4647,21 +5116,21 @@ function NavigationMenuContent({
4647
5116
  );
4648
5117
  }
4649
5118
  function NavigationMenuViewport({ className }) {
4650
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5119
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_navigation_menu.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4651
5120
  import_navigation_menu.NavigationMenu.Positioner,
4652
5121
  {
4653
5122
  side: "bottom",
4654
5123
  align: "start",
4655
5124
  className: "isolate z-50",
4656
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5125
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4657
5126
  import_navigation_menu.NavigationMenu.Popup,
4658
5127
  {
4659
5128
  "data-slot": "navigation-menu-popup",
4660
5129
  className: cn(
4661
- "origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
5130
+ "origin-(--transform-origin) overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
4662
5131
  className
4663
5132
  ),
4664
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_navigation_menu.NavigationMenu.Viewport, { "data-slot": "navigation-menu-viewport" })
5133
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_navigation_menu.NavigationMenu.Viewport, { "data-slot": "navigation-menu-viewport" })
4665
5134
  }
4666
5135
  )
4667
5136
  }
@@ -4671,12 +5140,12 @@ function NavigationMenuLink({
4671
5140
  className,
4672
5141
  ...props
4673
5142
  }) {
4674
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5143
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
4675
5144
  import_navigation_menu.NavigationMenu.Link,
4676
5145
  {
4677
5146
  "data-slot": "navigation-menu-link",
4678
5147
  className: cn(
4679
- "flex flex-col gap-1 rounded-md p-2 text-sm transition-colors outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 data-active:bg-accent/50 data-active:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
5148
+ "flex flex-col gap-1 rounded-md p-2 text-sm transition-colors outline-none hover:bg-(--menu-hover-background) hover:text-(--menu-hover-foreground) focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) focus-visible:ring-[3px] focus-visible:ring-ring/50 data-active:bg-(--menu-active-background)/50 data-active:text-(--menu-active-foreground) [&_svg:not([class*='size-'])]:size-4",
4680
5149
  className
4681
5150
  ),
4682
5151
  ...props
@@ -4685,33 +5154,33 @@ function NavigationMenuLink({
4685
5154
  }
4686
5155
 
4687
5156
  // src/components/components/NavigationMenu/index.tsx
4688
- var import_jsx_runtime83 = require("react/jsx-runtime");
5157
+ var import_jsx_runtime87 = require("react/jsx-runtime");
4689
5158
  function NavigationMenu2({ items = [], className, style }) {
4690
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenu, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
4691
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
5159
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationMenu, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
5160
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
4692
5161
  NavigationMenuTrigger,
4693
5162
  {
4694
5163
  className: item.icon !== void 0 ? "gap-2" : void 0,
4695
5164
  children: [
4696
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
5165
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
4697
5166
  item.label
4698
5167
  ]
4699
5168
  }
4700
5169
  ),
4701
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationMenuContent, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(NavigationMenuLink, { href: child.href, children: [
4702
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
5170
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationMenuContent, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(NavigationMenuLink, { href: child.href, children: [
5171
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
4703
5172
  "span",
4704
5173
  {
4705
5174
  className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
4706
5175
  children: [
4707
- child.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: child.icon, size: "sm" }) : null,
5176
+ child.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { name: child.icon, size: "sm" }) : null,
4708
5177
  child.label
4709
5178
  ]
4710
5179
  }
4711
5180
  ),
4712
- child.description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-muted-foreground", children: child.description }) : null
5181
+ child.description ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-muted-foreground", children: child.description }) : null
4713
5182
  ] }) }, child.href)) }) })
4714
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
5183
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
4715
5184
  NavigationMenuLink,
4716
5185
  {
4717
5186
  href: item.href,
@@ -4720,7 +5189,7 @@ function NavigationMenu2({ items = [], className, style }) {
4720
5189
  item.icon !== void 0 && "gap-2"
4721
5190
  ),
4722
5191
  children: [
4723
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
5192
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { name: item.icon, size: "sm" }) : null,
4724
5193
  item.label
4725
5194
  ]
4726
5195
  }
@@ -4728,22 +5197,22 @@ function NavigationMenu2({ items = [], className, style }) {
4728
5197
  }
4729
5198
 
4730
5199
  // src/components/components/Page/index.tsx
4731
- var import_jsx_runtime84 = require("react/jsx-runtime");
5200
+ var import_jsx_runtime88 = require("react/jsx-runtime");
4732
5201
  function Page({ title, className, style, children }) {
4733
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
4734
- title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
4735
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
5202
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
5203
+ title ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
5204
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
4736
5205
  ] });
4737
5206
  }
4738
5207
 
4739
5208
  // src/components/components/Pagination/index.tsx
4740
- var import_react17 = require("react");
5209
+ var import_react18 = require("react");
4741
5210
 
4742
5211
  // src/ui/pagination.tsx
4743
- var import_lucide_react19 = require("lucide-react");
4744
- var import_jsx_runtime85 = require("react/jsx-runtime");
5212
+ var import_lucide_react20 = require("lucide-react");
5213
+ var import_jsx_runtime89 = require("react/jsx-runtime");
4745
5214
  function Pagination({ className, ...props }) {
4746
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5215
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4747
5216
  "nav",
4748
5217
  {
4749
5218
  role: "navigation",
@@ -4755,7 +5224,7 @@ function Pagination({ className, ...props }) {
4755
5224
  );
4756
5225
  }
4757
5226
  function PaginationContent({ className, ...props }) {
4758
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5227
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4759
5228
  "ul",
4760
5229
  {
4761
5230
  "data-slot": "pagination-content",
@@ -4765,7 +5234,7 @@ function PaginationContent({ className, ...props }) {
4765
5234
  );
4766
5235
  }
4767
5236
  function PaginationItem({ ...props }) {
4768
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { "data-slot": "pagination-item", ...props });
5237
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("li", { "data-slot": "pagination-item", ...props });
4769
5238
  }
4770
5239
  function PaginationLink({
4771
5240
  className,
@@ -4773,7 +5242,7 @@ function PaginationLink({
4773
5242
  disabled,
4774
5243
  ...props
4775
5244
  }) {
4776
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5245
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4777
5246
  "a",
4778
5247
  {
4779
5248
  "aria-current": isActive ? "page" : void 0,
@@ -4785,6 +5254,7 @@ function PaginationLink({
4785
5254
  buttonVariants({
4786
5255
  variant: isActive ? "outline" : "ghost"
4787
5256
  }),
5257
+ isActive && "border-(color:--pagination-active-border) bg-(--pagination-active-background) rounded-(--pagination-active-radius)",
4788
5258
  disabled && "pointer-events-none opacity-50",
4789
5259
  className
4790
5260
  ),
@@ -4796,15 +5266,15 @@ function PaginationPrevious({
4796
5266
  className,
4797
5267
  ...props
4798
5268
  }) {
4799
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
5269
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
4800
5270
  PaginationLink,
4801
5271
  {
4802
5272
  "aria-label": "Go to previous page",
4803
5273
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
4804
5274
  ...props,
4805
5275
  children: [
4806
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronLeftIcon, {}),
4807
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Previous" })
5276
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react20.ChevronLeftIcon, {}),
5277
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "hidden sm:block", children: "Previous" })
4808
5278
  ]
4809
5279
  }
4810
5280
  );
@@ -4813,21 +5283,21 @@ function PaginationNext({
4813
5283
  className,
4814
5284
  ...props
4815
5285
  }) {
4816
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
5286
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
4817
5287
  PaginationLink,
4818
5288
  {
4819
5289
  "aria-label": "Go to next page",
4820
5290
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
4821
5291
  ...props,
4822
5292
  children: [
4823
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "hidden sm:block", children: "Next" }),
4824
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.ChevronRightIcon, {})
5293
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "hidden sm:block", children: "Next" }),
5294
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react20.ChevronRightIcon, {})
4825
5295
  ]
4826
5296
  }
4827
5297
  );
4828
5298
  }
4829
5299
  function PaginationEllipsis({ className, ...props }) {
4830
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
5300
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
4831
5301
  "span",
4832
5302
  {
4833
5303
  "aria-hidden": true,
@@ -4835,15 +5305,15 @@ function PaginationEllipsis({ className, ...props }) {
4835
5305
  className: cn("flex size-9 items-center justify-center", className),
4836
5306
  ...props,
4837
5307
  children: [
4838
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react19.MoreHorizontalIcon, { className: "size-4" }),
4839
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "sr-only", children: "More pages" })
5308
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lucide_react20.MoreHorizontalIcon, { className: "size-4" }),
5309
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "sr-only", children: "More pages" })
4840
5310
  ]
4841
5311
  }
4842
5312
  );
4843
5313
  }
4844
5314
 
4845
5315
  // src/components/components/Pagination/index.tsx
4846
- var import_jsx_runtime86 = require("react/jsx-runtime");
5316
+ var import_jsx_runtime90 = require("react/jsx-runtime");
4847
5317
  function pageItems(current, count) {
4848
5318
  if (count <= 7) {
4849
5319
  return Array.from({ length: count }, (_, i) => i + 1);
@@ -4864,7 +5334,7 @@ function Pagination2({
4864
5334
  className,
4865
5335
  style
4866
5336
  }) {
4867
- const [innerPage, setInnerPage] = (0, import_react17.useState)(1);
5337
+ const [innerPage, setInnerPage] = (0, import_react18.useState)(1);
4868
5338
  const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
4869
5339
  const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
4870
5340
  const goTo = (next) => {
@@ -4877,8 +5347,8 @@ function Pagination2({
4877
5347
  }
4878
5348
  onChange?.(target);
4879
5349
  };
4880
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(PaginationContent, { children: [
4881
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5350
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(PaginationContent, { children: [
5351
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4882
5352
  PaginationPrevious,
4883
5353
  {
4884
5354
  href: "#",
@@ -4889,7 +5359,7 @@ function Pagination2({
4889
5359
  }
4890
5360
  }
4891
5361
  ) }),
4892
- pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5362
+ pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4893
5363
  PaginationLink,
4894
5364
  {
4895
5365
  href: "#",
@@ -4901,7 +5371,7 @@ function Pagination2({
4901
5371
  children: item
4902
5372
  }
4903
5373
  ) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
4904
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5374
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4905
5375
  PaginationNext,
4906
5376
  {
4907
5377
  href: "#",
@@ -4917,14 +5387,14 @@ function Pagination2({
4917
5387
 
4918
5388
  // src/components/components/Popover/index.tsx
4919
5389
  var import_runtime14 = require("@pactor-app/runtime");
4920
- var import_jsx_runtime87 = require("react/jsx-runtime");
5390
+ var import_jsx_runtime91 = require("react/jsx-runtime");
4921
5391
  function isDslNode3(value) {
4922
5392
  return typeof value === "object" && value !== null && typeof value.type === "string";
4923
5393
  }
4924
5394
  function Popover2({ content, children, className, style }) {
4925
5395
  const { renderChildren } = (0, import_runtime14.useRenderer)();
4926
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Popover, { children: [
4927
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5396
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Popover, { children: [
5397
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4928
5398
  PopoverTrigger,
4929
5399
  {
4930
5400
  nativeButton: false,
@@ -4932,15 +5402,15 @@ function Popover2({ content, children, className, style }) {
4932
5402
  children
4933
5403
  }
4934
5404
  ),
4935
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
5405
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
4936
5406
  ] });
4937
5407
  }
4938
5408
 
4939
5409
  // src/ui/progress.tsx
4940
5410
  var import_progress = require("@base-ui/react/progress");
4941
- var import_jsx_runtime88 = require("react/jsx-runtime");
5411
+ var import_jsx_runtime92 = require("react/jsx-runtime");
4942
5412
  function Progress({ className, ...props }) {
4943
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5413
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4944
5414
  import_progress.Progress.Root,
4945
5415
  {
4946
5416
  "data-slot": "progress",
@@ -4950,11 +5420,11 @@ function Progress({ className, ...props }) {
4950
5420
  );
4951
5421
  }
4952
5422
  function ProgressTrack({ className, ...props }) {
4953
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5423
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4954
5424
  import_progress.Progress.Track,
4955
5425
  {
4956
5426
  "data-slot": "progress-track",
4957
- className: cn("h-2 w-full overflow-hidden rounded-full bg-muted", className),
5427
+ className: cn("h-2 w-full overflow-hidden rounded-full bg-(--progress-track)", className),
4958
5428
  ...props
4959
5429
  }
4960
5430
  );
@@ -4963,12 +5433,12 @@ function ProgressIndicator({
4963
5433
  className,
4964
5434
  ...props
4965
5435
  }) {
4966
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5436
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4967
5437
  import_progress.Progress.Indicator,
4968
5438
  {
4969
5439
  "data-slot": "progress-indicator",
4970
5440
  className: cn(
4971
- "h-full bg-primary transition-[width] duration-300 ease-in-out",
5441
+ "h-full bg-(--progress-indicator) transition-[width] duration-300 ease-in-out",
4972
5442
  className
4973
5443
  ),
4974
5444
  ...props
@@ -4977,21 +5447,21 @@ function ProgressIndicator({
4977
5447
  }
4978
5448
 
4979
5449
  // src/components/components/Progress/index.tsx
4980
- var import_jsx_runtime89 = require("react/jsx-runtime");
5450
+ var import_jsx_runtime93 = require("react/jsx-runtime");
4981
5451
  function Progress2({ value, className, style }) {
4982
5452
  const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
4983
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Progress, { value: resolved, className, style, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ProgressIndicator, {}) }) });
5453
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Progress, { value: resolved, className, style, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ProgressIndicator, {}) }) });
4984
5454
  }
4985
5455
 
4986
5456
  // src/components/components/RadioGroup/index.tsx
4987
- var import_react18 = require("react");
5457
+ var import_react19 = require("react");
4988
5458
 
4989
5459
  // src/ui/radio-group.tsx
4990
5460
  var import_radio = require("@base-ui/react/radio");
4991
5461
  var import_radio_group = require("@base-ui/react/radio-group");
4992
- var import_jsx_runtime90 = require("react/jsx-runtime");
5462
+ var import_jsx_runtime94 = require("react/jsx-runtime");
4993
5463
  function RadioGroup({ className, ...props }) {
4994
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5464
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4995
5465
  import_radio_group.RadioGroup,
4996
5466
  {
4997
5467
  "data-slot": "radio-group",
@@ -5001,21 +5471,21 @@ function RadioGroup({ className, ...props }) {
5001
5471
  );
5002
5472
  }
5003
5473
  function RadioGroupItem({ className, ...props }) {
5004
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5474
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5005
5475
  import_radio.Radio.Root,
5006
5476
  {
5007
5477
  "data-slot": "radio-group-item",
5008
5478
  className: cn(
5009
- "aspect-square size-4 shrink-0 cursor-pointer rounded-full border border-input shadow-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-checked:border-primary",
5479
+ "aspect-square size-4 shrink-0 cursor-pointer inline-flex items-center justify-center rounded-full border border-(color:--radio-border) shadow-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-checked:border-(color:--radio-checked)",
5010
5480
  className
5011
5481
  ),
5012
5482
  ...props,
5013
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5483
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5014
5484
  import_radio.Radio.Indicator,
5015
5485
  {
5016
5486
  "data-slot": "radio-group-indicator",
5017
5487
  className: "flex items-center justify-center",
5018
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "size-2 rounded-full bg-primary" })
5488
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "size-2 rounded-full bg-(--radio-checked)" })
5019
5489
  }
5020
5490
  )
5021
5491
  }
@@ -5023,7 +5493,7 @@ function RadioGroupItem({ className, ...props }) {
5023
5493
  }
5024
5494
 
5025
5495
  // src/components/components/Form/form-item.tsx
5026
- var import_jsx_runtime91 = require("react/jsx-runtime");
5496
+ var import_jsx_runtime95 = require("react/jsx-runtime");
5027
5497
  function FieldShell({
5028
5498
  layout,
5029
5499
  label,
@@ -5033,14 +5503,14 @@ function FieldShell({
5033
5503
  style,
5034
5504
  children
5035
5505
  }) {
5036
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
5506
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
5037
5507
  "div",
5038
5508
  {
5039
5509
  "data-slot": "form-item",
5040
5510
  className: cn(formItemClass(layout), className),
5041
5511
  style,
5042
5512
  children: [
5043
- label ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
5513
+ label ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5044
5514
  "label",
5045
5515
  {
5046
5516
  htmlFor,
@@ -5049,14 +5519,14 @@ function FieldShell({
5049
5519
  }
5050
5520
  ) : null,
5051
5521
  children,
5052
- error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5522
+ error ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5053
5523
  ]
5054
5524
  }
5055
5525
  );
5056
5526
  }
5057
5527
 
5058
5528
  // src/components/components/RadioGroup/index.tsx
5059
- var import_jsx_runtime92 = require("react/jsx-runtime");
5529
+ var import_jsx_runtime96 = require("react/jsx-runtime");
5060
5530
  function RadioGroup2({
5061
5531
  name,
5062
5532
  label,
@@ -5069,9 +5539,9 @@ function RadioGroup2({
5069
5539
  style
5070
5540
  }) {
5071
5541
  const form = useFormContext();
5072
- const controlId = (0, import_react18.useId)();
5542
+ const controlId = (0, import_react19.useId)();
5073
5543
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
5074
- (0, import_react18.useEffect)(() => {
5544
+ (0, import_react19.useEffect)(() => {
5075
5545
  if (inForm && form && name) {
5076
5546
  form.registerField(name, rules, value);
5077
5547
  return () => form.unregisterField(name);
@@ -5086,7 +5556,7 @@ function RadioGroup2({
5086
5556
  onChange?.(next);
5087
5557
  };
5088
5558
  const groupValue = current ?? "";
5089
- const group = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5559
+ const group = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5090
5560
  RadioGroup,
5091
5561
  {
5092
5562
  value: groupValue,
@@ -5097,8 +5567,8 @@ function RadioGroup2({
5097
5567
  style: inForm ? void 0 : style,
5098
5568
  children: options.map((option, index) => {
5099
5569
  const optionId = `${controlId}-${index}`;
5100
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
5101
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5570
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
5571
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5102
5572
  RadioGroupItem,
5103
5573
  {
5104
5574
  id: optionId,
@@ -5106,13 +5576,13 @@ function RadioGroup2({
5106
5576
  disabled: option.disabled
5107
5577
  }
5108
5578
  ),
5109
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
5579
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
5110
5580
  ] }, String(option.value));
5111
5581
  })
5112
5582
  }
5113
5583
  );
5114
5584
  if (inForm && form && name) {
5115
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5585
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5116
5586
  FieldShell,
5117
5587
  {
5118
5588
  layout: form.layout,
@@ -5129,17 +5599,17 @@ function RadioGroup2({
5129
5599
 
5130
5600
  // src/components/components/Resizable/index.tsx
5131
5601
  var import_runtime15 = require("@pactor-app/runtime");
5132
- var import_react19 = require("react");
5602
+ var import_react20 = require("react");
5133
5603
 
5134
5604
  // src/ui/resizable.tsx
5135
- var import_lucide_react20 = require("lucide-react");
5605
+ var import_lucide_react21 = require("lucide-react");
5136
5606
  var import_react_resizable_panels = require("react-resizable-panels");
5137
- var import_jsx_runtime93 = require("react/jsx-runtime");
5607
+ var import_jsx_runtime97 = require("react/jsx-runtime");
5138
5608
  function PanelGroup({
5139
5609
  className,
5140
5610
  ...props
5141
5611
  }) {
5142
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5612
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5143
5613
  import_react_resizable_panels.Group,
5144
5614
  {
5145
5615
  "data-slot": "resizable-panel-group",
@@ -5152,14 +5622,14 @@ function PanelGroup({
5152
5622
  );
5153
5623
  }
5154
5624
  function Panel({ ...props }) {
5155
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
5625
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
5156
5626
  }
5157
5627
  function ResizableHandle({
5158
5628
  withHandle,
5159
5629
  className,
5160
5630
  ...props
5161
5631
  }) {
5162
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5632
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5163
5633
  import_react_resizable_panels.Separator,
5164
5634
  {
5165
5635
  "data-slot": "resizable-handle",
@@ -5168,13 +5638,13 @@ function ResizableHandle({
5168
5638
  className
5169
5639
  ),
5170
5640
  ...props,
5171
- children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_lucide_react20.GripVerticalIcon, { className: "size-2.5" }) }) : null
5641
+ children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.GripVerticalIcon, { className: "size-2.5" }) }) : null
5172
5642
  }
5173
5643
  );
5174
5644
  }
5175
5645
 
5176
5646
  // src/components/components/Resizable/index.tsx
5177
- var import_jsx_runtime94 = require("react/jsx-runtime");
5647
+ var import_jsx_runtime98 = require("react/jsx-runtime");
5178
5648
  function Resizable({
5179
5649
  panels = [],
5180
5650
  direction = "horizontal",
@@ -5182,12 +5652,14 @@ function Resizable({
5182
5652
  style
5183
5653
  }) {
5184
5654
  const { renderChildren } = (0, import_runtime15.useRenderer)();
5185
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react19.Fragment, { children: [
5186
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ResizableHandle, { withHandle: true }) : null,
5187
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5655
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react20.Fragment, { children: [
5656
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ResizableHandle, { withHandle: true }) : null,
5657
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5188
5658
  Panel,
5189
5659
  {
5190
- defaultSize: typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
5660
+ defaultSize: typeof panel.defaultSizePx === "number" ? `${panel.defaultSizePx}px` : typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
5661
+ minSize: typeof panel.minSizePx === "number" ? `${panel.minSizePx}px` : void 0,
5662
+ maxSize: typeof panel.maxSizePx === "number" ? `${panel.maxSizePx}px` : void 0,
5191
5663
  children: renderChildren(panel.children)
5192
5664
  }
5193
5665
  )
@@ -5196,20 +5668,20 @@ function Resizable({
5196
5668
 
5197
5669
  // src/ui/scroll-area.tsx
5198
5670
  var import_scroll_area = require("@base-ui/react/scroll-area");
5199
- var import_jsx_runtime95 = require("react/jsx-runtime");
5671
+ var import_jsx_runtime99 = require("react/jsx-runtime");
5200
5672
  function ScrollArea({
5201
5673
  className,
5202
5674
  children,
5203
5675
  ...props
5204
5676
  }) {
5205
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
5677
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
5206
5678
  import_scroll_area.ScrollArea.Root,
5207
5679
  {
5208
5680
  "data-slot": "scroll-area",
5209
5681
  className: cn("relative overflow-hidden", className),
5210
5682
  ...props,
5211
5683
  children: [
5212
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5684
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5213
5685
  import_scroll_area.ScrollArea.Viewport,
5214
5686
  {
5215
5687
  "data-slot": "scroll-area-viewport",
@@ -5217,8 +5689,8 @@ function ScrollArea({
5217
5689
  children
5218
5690
  }
5219
5691
  ),
5220
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ScrollBar, {}),
5221
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_scroll_area.ScrollArea.Corner, {})
5692
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ScrollBar, {}),
5693
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_scroll_area.ScrollArea.Corner, {})
5222
5694
  ]
5223
5695
  }
5224
5696
  );
@@ -5228,7 +5700,7 @@ function ScrollBar({
5228
5700
  orientation = "vertical",
5229
5701
  ...props
5230
5702
  }) {
5231
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5703
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5232
5704
  import_scroll_area.ScrollArea.Scrollbar,
5233
5705
  {
5234
5706
  "data-slot": "scroll-area-scrollbar",
@@ -5240,7 +5712,7 @@ function ScrollBar({
5240
5712
  className
5241
5713
  ),
5242
5714
  ...props,
5243
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5715
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5244
5716
  import_scroll_area.ScrollArea.Thumb,
5245
5717
  {
5246
5718
  "data-slot": "scroll-area-thumb",
@@ -5252,7 +5724,7 @@ function ScrollBar({
5252
5724
  }
5253
5725
 
5254
5726
  // src/components/components/ScrollArea/index.tsx
5255
- var import_jsx_runtime96 = require("react/jsx-runtime");
5727
+ var import_jsx_runtime100 = require("react/jsx-runtime");
5256
5728
  function ScrollArea2({
5257
5729
  maxHeight,
5258
5730
  maxWidth,
@@ -5260,7 +5732,7 @@ function ScrollArea2({
5260
5732
  style,
5261
5733
  children
5262
5734
  }) {
5263
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5735
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5264
5736
  ScrollArea,
5265
5737
  {
5266
5738
  className,
@@ -5272,17 +5744,17 @@ function ScrollArea2({
5272
5744
 
5273
5745
  // src/components/components/Select/index.tsx
5274
5746
  var import_runtime16 = require("@pactor-app/runtime");
5275
- var import_react20 = require("react");
5747
+ var import_react21 = require("react");
5276
5748
 
5277
5749
  // src/ui/select.tsx
5278
5750
  var import_select = require("@base-ui/react/select");
5279
- var import_lucide_react21 = require("lucide-react");
5280
- var import_jsx_runtime97 = require("react/jsx-runtime");
5751
+ var import_lucide_react22 = require("lucide-react");
5752
+ var import_jsx_runtime101 = require("react/jsx-runtime");
5281
5753
  var Select = import_select.Select.Root;
5282
5754
  function SelectValue({
5283
5755
  ...props
5284
5756
  }) {
5285
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
5757
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
5286
5758
  }
5287
5759
  function SelectTrigger({
5288
5760
  className,
@@ -5290,7 +5762,7 @@ function SelectTrigger({
5290
5762
  children,
5291
5763
  ...props
5292
5764
  }) {
5293
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
5765
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
5294
5766
  import_select.Select.Trigger,
5295
5767
  {
5296
5768
  "data-slot": "select-trigger",
@@ -5302,10 +5774,10 @@ function SelectTrigger({
5302
5774
  ...props,
5303
5775
  children: [
5304
5776
  children,
5305
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5777
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5306
5778
  import_select.Select.Icon,
5307
5779
  {
5308
- render: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4 opacity-50" })
5780
+ render: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.ChevronDownIcon, { className: "size-4 opacity-50" })
5309
5781
  }
5310
5782
  )
5311
5783
  ]
@@ -5321,7 +5793,7 @@ function SelectContent({
5321
5793
  alignItemWithTrigger = false,
5322
5794
  ...props
5323
5795
  }) {
5324
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5796
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5325
5797
  import_select.Select.Positioner,
5326
5798
  {
5327
5799
  side,
@@ -5329,19 +5801,19 @@ function SelectContent({
5329
5801
  align,
5330
5802
  alignItemWithTrigger,
5331
5803
  className: "isolate z-50",
5332
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
5804
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
5333
5805
  import_select.Select.Popup,
5334
5806
  {
5335
5807
  "data-slot": "select-content",
5336
5808
  className: cn(
5337
- "relative z-50 max-h-96 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground shadow-md duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
5809
+ "relative z-50 max-h-96 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
5338
5810
  className
5339
5811
  ),
5340
5812
  ...props,
5341
5813
  children: [
5342
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollUpButton, {}),
5343
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.List, { className: "p-1", children }),
5344
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SelectScrollDownButton, {})
5814
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SelectScrollUpButton, {}),
5815
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_select.Select.List, { className: "p-1", children }),
5816
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SelectScrollDownButton, {})
5345
5817
  ]
5346
5818
  }
5347
5819
  )
@@ -5353,18 +5825,18 @@ function SelectItem({
5353
5825
  children,
5354
5826
  ...props
5355
5827
  }) {
5356
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
5828
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
5357
5829
  import_select.Select.Item,
5358
5830
  {
5359
5831
  "data-slot": "select-item",
5360
5832
  className: cn(
5361
- "relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
5833
+ "relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-(--menu-hover-background) focus:text-(--menu-hover-foreground) data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
5362
5834
  className
5363
5835
  ),
5364
5836
  ...props,
5365
5837
  children: [
5366
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.CheckIcon, { className: "size-4" }) }) }),
5367
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_select.Select.ItemText, { children })
5838
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.CheckIcon, { className: "size-4" }) }) }),
5839
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_select.Select.ItemText, { children })
5368
5840
  ]
5369
5841
  }
5370
5842
  );
@@ -5373,7 +5845,7 @@ function SelectScrollUpButton({
5373
5845
  className,
5374
5846
  ...props
5375
5847
  }) {
5376
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5848
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5377
5849
  import_select.Select.ScrollUpArrow,
5378
5850
  {
5379
5851
  "data-slot": "select-scroll-up-button",
@@ -5382,7 +5854,7 @@ function SelectScrollUpButton({
5382
5854
  className
5383
5855
  ),
5384
5856
  ...props,
5385
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-4" })
5857
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.ChevronUpIcon, { className: "size-4" })
5386
5858
  }
5387
5859
  );
5388
5860
  }
@@ -5390,7 +5862,7 @@ function SelectScrollDownButton({
5390
5862
  className,
5391
5863
  ...props
5392
5864
  }) {
5393
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5865
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5394
5866
  import_select.Select.ScrollDownArrow,
5395
5867
  {
5396
5868
  "data-slot": "select-scroll-down-button",
@@ -5399,13 +5871,13 @@ function SelectScrollDownButton({
5399
5871
  className
5400
5872
  ),
5401
5873
  ...props,
5402
- children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-4" })
5874
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.ChevronDownIcon, { className: "size-4" })
5403
5875
  }
5404
5876
  );
5405
5877
  }
5406
5878
 
5407
5879
  // src/components/components/Select/index.tsx
5408
- var import_jsx_runtime98 = require("react/jsx-runtime");
5880
+ var import_jsx_runtime102 = require("react/jsx-runtime");
5409
5881
  function Select2({
5410
5882
  name,
5411
5883
  label,
@@ -5421,9 +5893,9 @@ function Select2({
5421
5893
  }) {
5422
5894
  const form = useFormContext();
5423
5895
  const { t } = (0, import_runtime16.useI18n)();
5424
- const controlId = (0, import_react20.useId)();
5896
+ const controlId = (0, import_react21.useId)();
5425
5897
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
5426
- (0, import_react20.useEffect)(() => {
5898
+ (0, import_react21.useEffect)(() => {
5427
5899
  if (inForm && form && name) {
5428
5900
  form.registerField(name, rules, value);
5429
5901
  return () => form.unregisterField(name);
@@ -5439,13 +5911,13 @@ function Select2({
5439
5911
  onChange?.(next ?? void 0);
5440
5912
  };
5441
5913
  const inFormRoot = inForm === true;
5442
- const select = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
5914
+ const select = /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
5443
5915
  "span",
5444
5916
  {
5445
5917
  className: cn("inline-flex items-center gap-1", !inFormRoot && className),
5446
5918
  style: inFormRoot ? void 0 : style,
5447
5919
  children: [
5448
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
5920
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
5449
5921
  Select,
5450
5922
  {
5451
5923
  items: options,
@@ -5454,8 +5926,8 @@ function Select2({
5454
5926
  disabled,
5455
5927
  name: inForm ? name : void 0,
5456
5928
  children: [
5457
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder }) }),
5458
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5929
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SelectTrigger, { id: controlId, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SelectValue, { placeholder }) }),
5930
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5459
5931
  SelectItem,
5460
5932
  {
5461
5933
  value: option.value,
@@ -5467,7 +5939,7 @@ function Select2({
5467
5939
  ]
5468
5940
  }
5469
5941
  ),
5470
- allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5942
+ allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5471
5943
  "button",
5472
5944
  {
5473
5945
  type: "button",
@@ -5475,182 +5947,50 @@ function Select2({
5475
5947
  className: "cursor-pointer text-muted-foreground hover:text-foreground",
5476
5948
  onClick: () => {
5477
5949
  if (inForm && form && name) {
5478
- form.setValue(name, void 0);
5479
- }
5480
- onChange?.(void 0);
5481
- },
5482
- children: "\xD7"
5483
- }
5484
- ) : null
5485
- ]
5486
- }
5487
- );
5488
- if (inForm && form && name) {
5489
- const error = form.errors[name];
5490
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
5491
- "div",
5492
- {
5493
- "data-slot": "form-item",
5494
- className: cn(formItemClass(form.layout), className),
5495
- style,
5496
- children: [
5497
- label ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5498
- "label",
5499
- {
5500
- htmlFor: controlId,
5501
- className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
5502
- children: label
5503
- }
5504
- ) : null,
5505
- select,
5506
- error ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5507
- ]
5508
- }
5509
- );
5510
- }
5511
- return select;
5512
- }
5513
-
5514
- // src/ui/separator.tsx
5515
- var import_separator = require("@base-ui/react/separator");
5516
- var import_jsx_runtime99 = require("react/jsx-runtime");
5517
- function Separator({
5518
- className,
5519
- orientation = "horizontal",
5520
- decorative: _decorative,
5521
- ...props
5522
- }) {
5523
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5524
- import_separator.Separator,
5525
- {
5526
- "data-slot": "separator",
5527
- orientation,
5528
- className: cn(
5529
- "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
5530
- className
5531
- ),
5532
- ...props
5533
- }
5534
- );
5535
- }
5536
-
5537
- // src/components/components/Separator/index.tsx
5538
- var import_jsx_runtime100 = require("react/jsx-runtime");
5539
- function Separator2({ orientation = "horizontal", className, style }) {
5540
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Separator, { orientation, className, style });
5541
- }
5542
-
5543
- // src/ui/sheet.tsx
5544
- var import_dialog3 = require("@base-ui/react/dialog");
5545
- var import_lucide_react22 = require("lucide-react");
5546
- var import_class_variance_authority5 = require("class-variance-authority");
5547
- var import_jsx_runtime101 = require("react/jsx-runtime");
5548
- function Sheet({
5549
- ...props
5550
- }) {
5551
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Root, { "data-slot": "sheet", ...props });
5552
- }
5553
- function SheetPortal({
5554
- ...props
5555
- }) {
5556
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_dialog3.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
5557
- }
5558
- function SheetOverlay({
5559
- className,
5560
- ...props
5561
- }) {
5562
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5563
- import_dialog3.Dialog.Backdrop,
5564
- {
5565
- "data-slot": "sheet-overlay",
5566
- className: cn(
5567
- "fixed inset-0 z-50 bg-black/50 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
5568
- className
5569
- ),
5570
- ...props
5571
- }
5572
- );
5573
- }
5574
- var sheetVariants = (0, import_class_variance_authority5.cva)(
5575
- "fixed z-50 flex flex-col gap-4 border-border bg-background shadow-lg transition ease-in-out data-open:animate-in data-open:duration-300 data-closed:animate-out data-closed:duration-200",
5576
- {
5577
- variants: {
5578
- side: {
5579
- right: "inset-y-0 right-0 h-full w-3/4 border-l data-open:slide-in-from-right data-closed:slide-out-to-right sm:max-w-sm",
5580
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-open:slide-in-from-left data-closed:slide-out-to-left sm:max-w-sm",
5581
- top: "inset-x-0 top-0 border-b data-open:slide-in-from-top data-closed:slide-out-to-top",
5582
- bottom: "inset-x-0 bottom-0 border-t data-open:slide-in-from-bottom data-closed:slide-out-to-bottom"
5583
- }
5584
- },
5585
- defaultVariants: {
5586
- side: "right"
5950
+ form.setValue(name, void 0);
5951
+ }
5952
+ onChange?.(void 0);
5953
+ },
5954
+ children: "\xD7"
5955
+ }
5956
+ ) : null
5957
+ ]
5587
5958
  }
5588
- }
5589
- );
5590
- function SheetContent({
5591
- className,
5592
- children,
5593
- side = "right",
5594
- ...props
5595
- }) {
5596
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(SheetPortal, { "data-slot": "sheet-portal", children: [
5597
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SheetOverlay, {}),
5598
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
5599
- import_dialog3.Dialog.Popup,
5959
+ );
5960
+ if (inForm && form && name) {
5961
+ const error = form.errors[name];
5962
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
5963
+ "div",
5600
5964
  {
5601
- "data-slot": "sheet-content",
5602
- className: cn(sheetVariants({ side }), className),
5603
- ...props,
5965
+ "data-slot": "form-item",
5966
+ className: cn(formItemClass(form.layout), className),
5967
+ style,
5604
5968
  children: [
5605
- children,
5606
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
5607
- import_dialog3.Dialog.Close,
5969
+ label ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5970
+ "label",
5608
5971
  {
5609
- "data-slot": "sheet-close",
5610
- render: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5611
- "button",
5612
- {
5613
- type: "button",
5614
- className: "absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
5615
- }
5616
- ),
5617
- children: [
5618
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react22.XIcon, {}),
5619
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "sr-only", children: "Close" })
5620
- ]
5972
+ htmlFor: controlId,
5973
+ className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
5974
+ children: label
5621
5975
  }
5622
- )
5976
+ ) : null,
5977
+ select,
5978
+ error ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5623
5979
  ]
5624
5980
  }
5625
- )
5626
- ] });
5627
- }
5628
- function SheetHeader({ className, ...props }) {
5629
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5630
- "div",
5631
- {
5632
- "data-slot": "sheet-header",
5633
- className: cn("flex flex-col gap-1.5 p-4", className),
5634
- ...props
5635
- }
5636
- );
5981
+ );
5982
+ }
5983
+ return select;
5637
5984
  }
5638
- function SheetTitle({
5639
- className,
5640
- ...props
5641
- }) {
5642
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5643
- import_dialog3.Dialog.Title,
5644
- {
5645
- "data-slot": "sheet-title",
5646
- className: cn("font-semibold text-foreground", className),
5647
- ...props
5648
- }
5649
- );
5985
+
5986
+ // src/components/components/Separator/index.tsx
5987
+ var import_jsx_runtime103 = require("react/jsx-runtime");
5988
+ function Separator2({ orientation = "horizontal", className, style }) {
5989
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Separator, { orientation, className, style });
5650
5990
  }
5651
5991
 
5652
5992
  // src/components/components/Sheet/index.tsx
5653
- var import_jsx_runtime102 = require("react/jsx-runtime");
5993
+ var import_jsx_runtime104 = require("react/jsx-runtime");
5654
5994
  function Sheet2({
5655
5995
  title,
5656
5996
  open,
@@ -5660,7 +6000,7 @@ function Sheet2({
5660
6000
  className,
5661
6001
  style
5662
6002
  }) {
5663
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6003
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
5664
6004
  Sheet,
5665
6005
  {
5666
6006
  open: open ?? false,
@@ -5669,9 +6009,9 @@ function Sheet2({
5669
6009
  onClose?.();
5670
6010
  }
5671
6011
  },
5672
- children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(SheetContent, { side, className, style, children: [
5673
- title ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SheetTitle, { children: title }) }) : null,
5674
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
6012
+ children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(SheetContent, { side, className, style, children: [
6013
+ title ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetTitle, { children: title }) }) : null,
6014
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
5675
6015
  ] })
5676
6016
  }
5677
6017
  );
@@ -5679,7 +6019,7 @@ function Sheet2({
5679
6019
 
5680
6020
  // src/components/components/Sider/index.tsx
5681
6021
  var import_lucide_react23 = require("lucide-react");
5682
- var import_jsx_runtime103 = require("react/jsx-runtime");
6022
+ var import_jsx_runtime105 = require("react/jsx-runtime");
5683
6023
  function Sider({
5684
6024
  width = 200,
5685
6025
  collapsible,
@@ -5691,26 +6031,26 @@ function Sider({
5691
6031
  children
5692
6032
  }) {
5693
6033
  const current = collapsed ? collapsedWidth : width;
5694
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6034
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
5695
6035
  "aside",
5696
6036
  {
5697
6037
  "data-slot": "layout-sider",
5698
6038
  "data-collapsed": collapsed || void 0,
5699
6039
  className: cn(
5700
- "flex min-h-0 shrink-0 flex-col border-r bg-background transition-[width]",
6040
+ "flex min-h-0 shrink-0 flex-col border-r bg-sidebar transition-[width]",
5701
6041
  className
5702
6042
  ),
5703
6043
  style: { width: current, ...style },
5704
6044
  children: [
5705
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
5706
- collapsible ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6045
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
6046
+ collapsible ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
5707
6047
  "button",
5708
6048
  {
5709
6049
  type: "button",
5710
6050
  "aria-label": collapsed ? "expand sider" : "collapse sider",
5711
6051
  className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
5712
6052
  onClick: () => onCollapse?.(!collapsed),
5713
- children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react23.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react23.ChevronLeft, { "aria-hidden": true, className: "size-4" })
6053
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react23.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react23.ChevronLeft, { "aria-hidden": true, className: "size-4" })
5714
6054
  }
5715
6055
  ) : null
5716
6056
  ]
@@ -5718,21 +6058,8 @@ function Sider({
5718
6058
  );
5719
6059
  }
5720
6060
 
5721
- // src/ui/skeleton.tsx
5722
- var import_jsx_runtime104 = require("react/jsx-runtime");
5723
- function Skeleton({ className, ...props }) {
5724
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
5725
- "div",
5726
- {
5727
- "data-slot": "skeleton",
5728
- className: cn("animate-pulse rounded-md bg-muted", className),
5729
- ...props
5730
- }
5731
- );
5732
- }
5733
-
5734
6061
  // src/components/components/Skeleton/index.tsx
5735
- var import_jsx_runtime105 = require("react/jsx-runtime");
6062
+ var import_jsx_runtime106 = require("react/jsx-runtime");
5736
6063
  var shapeDefaults = {
5737
6064
  line: { className: "h-4 w-full", style: {} },
5738
6065
  circle: { className: "rounded-full", style: { width: 40, height: 40 } },
@@ -5743,7 +6070,7 @@ function toSize(value) {
5743
6070
  }
5744
6071
  function Skeleton2({ shape = "line", width, height, className, style }) {
5745
6072
  const defaults = shapeDefaults[shape];
5746
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6073
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
5747
6074
  Skeleton,
5748
6075
  {
5749
6076
  className: cn(defaults.className, className),
@@ -5758,13 +6085,13 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
5758
6085
  }
5759
6086
 
5760
6087
  // src/components/components/Slider/index.tsx
5761
- var import_react21 = require("react");
6088
+ var import_react22 = require("react");
5762
6089
 
5763
6090
  // src/ui/slider.tsx
5764
6091
  var import_slider = require("@base-ui/react/slider");
5765
- var import_jsx_runtime106 = require("react/jsx-runtime");
6092
+ var import_jsx_runtime107 = require("react/jsx-runtime");
5766
6093
  function Slider({ className, ...props }) {
5767
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6094
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
5768
6095
  import_slider.Slider.Root,
5769
6096
  {
5770
6097
  "data-slot": "slider",
@@ -5777,7 +6104,7 @@ function Slider({ className, ...props }) {
5777
6104
  );
5778
6105
  }
5779
6106
  function SliderControl({ className, ...props }) {
5780
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6107
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
5781
6108
  import_slider.Slider.Control,
5782
6109
  {
5783
6110
  "data-slot": "slider-control",
@@ -5787,12 +6114,12 @@ function SliderControl({ className, ...props }) {
5787
6114
  );
5788
6115
  }
5789
6116
  function SliderTrack({ className, ...props }) {
5790
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6117
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
5791
6118
  import_slider.Slider.Track,
5792
6119
  {
5793
6120
  "data-slot": "slider-track",
5794
6121
  className: cn(
5795
- "relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted",
6122
+ "relative h-1.5 w-full grow overflow-hidden rounded-full bg-(--slider-track)",
5796
6123
  className
5797
6124
  ),
5798
6125
  ...props
@@ -5800,22 +6127,22 @@ function SliderTrack({ className, ...props }) {
5800
6127
  );
5801
6128
  }
5802
6129
  function SliderIndicator({ className, ...props }) {
5803
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6130
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
5804
6131
  import_slider.Slider.Indicator,
5805
6132
  {
5806
6133
  "data-slot": "slider-indicator",
5807
- className: cn("absolute h-full bg-primary", className),
6134
+ className: cn("absolute h-full bg-(--slider-range)", className),
5808
6135
  ...props
5809
6136
  }
5810
6137
  );
5811
6138
  }
5812
6139
  function SliderThumb({ className, ...props }) {
5813
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6140
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
5814
6141
  import_slider.Slider.Thumb,
5815
6142
  {
5816
6143
  "data-slot": "slider-thumb",
5817
6144
  className: cn(
5818
- "block size-4 shrink-0 cursor-grab rounded-full border border-primary bg-background shadow-sm transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none active:cursor-grabbing disabled:pointer-events-none disabled:opacity-50",
6145
+ "block size-4 shrink-0 cursor-grab rounded-full border border-primary bg-(--slider-thumb) shadow-sm transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none active:cursor-grabbing disabled:pointer-events-none disabled:opacity-50",
5819
6146
  className
5820
6147
  ),
5821
6148
  ...props
@@ -5824,7 +6151,7 @@ function SliderThumb({ className, ...props }) {
5824
6151
  }
5825
6152
 
5826
6153
  // src/components/components/Slider/index.tsx
5827
- var import_jsx_runtime107 = require("react/jsx-runtime");
6154
+ var import_jsx_runtime108 = require("react/jsx-runtime");
5828
6155
  function Slider2({
5829
6156
  name,
5830
6157
  label,
@@ -5840,7 +6167,7 @@ function Slider2({
5840
6167
  }) {
5841
6168
  const form = useFormContext();
5842
6169
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
5843
- (0, import_react21.useEffect)(() => {
6170
+ (0, import_react22.useEffect)(() => {
5844
6171
  if (inForm && form && name) {
5845
6172
  form.registerField(name, rules, value);
5846
6173
  return () => form.unregisterField(name);
@@ -5855,7 +6182,7 @@ function Slider2({
5855
6182
  }
5856
6183
  onChange?.(next);
5857
6184
  };
5858
- const slider = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6185
+ const slider = /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
5859
6186
  Slider,
5860
6187
  {
5861
6188
  value: numberValue,
@@ -5867,14 +6194,14 @@ function Slider2({
5867
6194
  onValueChange: handleChange,
5868
6195
  className: inForm ? void 0 : className,
5869
6196
  style: inForm ? void 0 : style,
5870
- children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderControl, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(SliderTrack, { children: [
5871
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderIndicator, {}),
5872
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SliderThumb, {})
5873
- ] }) })
6197
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(SliderControl, { children: [
6198
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SliderTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SliderIndicator, {}) }),
6199
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SliderThumb, {})
6200
+ ] })
5874
6201
  }
5875
6202
  );
5876
6203
  if (inForm && form && name) {
5877
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6204
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
5878
6205
  FieldShell,
5879
6206
  {
5880
6207
  layout: form.layout,
@@ -5891,12 +6218,12 @@ function Slider2({
5891
6218
 
5892
6219
  // src/components/components/Sonner/index.tsx
5893
6220
  var import_runtime17 = require("@pactor-app/runtime");
5894
- var import_react22 = require("react");
6221
+ var import_react23 = require("react");
5895
6222
 
5896
6223
  // src/ui/toast.tsx
5897
6224
  var import_toast = require("@base-ui/react/toast");
5898
6225
  var import_lucide_react24 = require("lucide-react");
5899
- var import_jsx_runtime108 = require("react/jsx-runtime");
6226
+ var import_jsx_runtime109 = require("react/jsx-runtime");
5900
6227
  var toastManager = import_toast.Toast.createToastManager();
5901
6228
  function toast(message, options = {}) {
5902
6229
  return toastManager.add({
@@ -5912,7 +6239,7 @@ var toastVariantClass = {
5912
6239
  };
5913
6240
  function ToasterViewport({ className }) {
5914
6241
  const { toasts } = import_toast.Toast.useToastManager();
5915
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6242
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
5916
6243
  import_toast.Toast.Viewport,
5917
6244
  {
5918
6245
  "data-slot": "toast-viewport",
@@ -5920,26 +6247,26 @@ function ToasterViewport({ className }) {
5920
6247
  "fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2 outline-none",
5921
6248
  className
5922
6249
  ),
5923
- children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6250
+ children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
5924
6251
  import_toast.Toast.Root,
5925
6252
  {
5926
6253
  toast: item,
5927
6254
  "data-slot": "toast",
5928
6255
  "data-type": item.type ?? "info",
5929
6256
  className: cn(
5930
- "rounded-md border border-border bg-popover px-4 py-3 text-sm text-popover-foreground shadow-md transition-[opacity,transform] duration-200 data-ending-style:animate-toast-out data-starting-style:animate-toast-in",
6257
+ "rounded-md border border-border bg-popover px-4 py-3 text-sm text-popover-foreground shadow-md shadow-(color:--shadow-color) transition-[opacity,transform] duration-200 data-ending-style:animate-toast-out data-starting-style:animate-toast-in",
5931
6258
  toastVariantClass[item.type ?? "info"] ?? toastVariantClass.info
5932
6259
  ),
5933
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
5934
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "grid gap-0.5", children: [
5935
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6260
+ children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
6261
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "grid gap-0.5", children: [
6262
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
5936
6263
  import_toast.Toast.Title,
5937
6264
  {
5938
6265
  "data-slot": "toast-title",
5939
6266
  className: "font-medium"
5940
6267
  }
5941
6268
  ),
5942
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6269
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
5943
6270
  import_toast.Toast.Description,
5944
6271
  {
5945
6272
  "data-slot": "toast-description",
@@ -5947,13 +6274,13 @@ function ToasterViewport({ className }) {
5947
6274
  }
5948
6275
  )
5949
6276
  ] }),
5950
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6277
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
5951
6278
  import_toast.Toast.Close,
5952
6279
  {
5953
6280
  "data-slot": "toast-close",
5954
6281
  "aria-label": "Close",
5955
6282
  className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none [&_svg]:size-3.5",
5956
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react24.XIcon, {})
6283
+ children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react24.XIcon, {})
5957
6284
  }
5958
6285
  )
5959
6286
  ] })
@@ -5964,14 +6291,14 @@ function ToasterViewport({ className }) {
5964
6291
  ) });
5965
6292
  }
5966
6293
  function Toaster({ className }) {
5967
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ToasterViewport, { className }) });
6294
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ToasterViewport, { className }) });
5968
6295
  }
5969
6296
 
5970
6297
  // src/components/components/Sonner/index.tsx
5971
- var import_jsx_runtime109 = require("react/jsx-runtime");
6298
+ var import_jsx_runtime110 = require("react/jsx-runtime");
5972
6299
  function Sonner({ className, style }) {
5973
6300
  const { context } = (0, import_runtime17.useRenderer)();
5974
- (0, import_react22.useEffect)(() => {
6301
+ (0, import_react23.useEffect)(() => {
5975
6302
  const { actions } = context;
5976
6303
  if (actions.has("toast")) {
5977
6304
  return;
@@ -5985,14 +6312,14 @@ function Sonner({ className, style }) {
5985
6312
  return { ok: true };
5986
6313
  });
5987
6314
  }, [context]);
5988
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Toaster, {}) });
6315
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Toaster, {}) });
5989
6316
  }
5990
6317
 
5991
6318
  // src/ui/spinner.tsx
5992
6319
  var import_lucide_react25 = require("lucide-react");
5993
- var import_jsx_runtime110 = require("react/jsx-runtime");
6320
+ var import_jsx_runtime111 = require("react/jsx-runtime");
5994
6321
  function Spinner({ className, ...props }) {
5995
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
6322
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
5996
6323
  import_lucide_react25.Loader2Icon,
5997
6324
  {
5998
6325
  role: "status",
@@ -6005,50 +6332,50 @@ function Spinner({ className, ...props }) {
6005
6332
  }
6006
6333
 
6007
6334
  // src/components/components/Spinner/index.tsx
6008
- var import_jsx_runtime111 = require("react/jsx-runtime");
6335
+ var import_jsx_runtime112 = require("react/jsx-runtime");
6009
6336
  var sizeClass = {
6010
6337
  sm: "size-3",
6011
6338
  default: "size-4",
6012
6339
  lg: "size-6"
6013
6340
  };
6014
6341
  function Spinner2({ size = "default", className, style }) {
6015
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
6342
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
6016
6343
  }
6017
6344
 
6018
6345
  // src/components/components/Statistic/index.tsx
6019
- var import_jsx_runtime112 = require("react/jsx-runtime");
6346
+ var import_jsx_runtime113 = require("react/jsx-runtime");
6020
6347
  function Statistic({ title, value, precision, suffix, className, style }) {
6021
6348
  const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
6022
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
6023
- title ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
6024
- /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
6349
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
6350
+ title ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
6351
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
6025
6352
  display,
6026
- suffix ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
6353
+ suffix ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
6027
6354
  ] })
6028
6355
  ] });
6029
6356
  }
6030
6357
 
6031
6358
  // src/components/components/Switch/index.tsx
6032
- var import_react23 = require("react");
6359
+ var import_react24 = require("react");
6033
6360
 
6034
6361
  // src/ui/switch.tsx
6035
6362
  var import_switch = require("@base-ui/react/switch");
6036
- var import_jsx_runtime113 = require("react/jsx-runtime");
6363
+ var import_jsx_runtime114 = require("react/jsx-runtime");
6037
6364
  function Switch({ className, ...props }) {
6038
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
6365
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
6039
6366
  import_switch.Switch.Root,
6040
6367
  {
6041
6368
  "data-slot": "switch",
6042
6369
  className: cn(
6043
- "inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-primary data-unchecked:bg-input",
6370
+ "inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-(--switch-track-checked) data-unchecked:bg-(--switch-track)",
6044
6371
  className
6045
6372
  ),
6046
6373
  ...props,
6047
- children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
6374
+ children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
6048
6375
  import_switch.Switch.Thumb,
6049
6376
  {
6050
6377
  "data-slot": "switch-thumb",
6051
- className: "pointer-events-none block size-4 rounded-full bg-background transition-transform data-checked:translate-x-[calc(100%-2px)] data-unchecked:translate-x-0"
6378
+ className: "pointer-events-none block size-4 rounded-full bg-(--switch-thumb) transition-transform data-checked:translate-x-[calc(100%-2px)] data-unchecked:translate-x-0"
6052
6379
  }
6053
6380
  )
6054
6381
  }
@@ -6056,7 +6383,7 @@ function Switch({ className, ...props }) {
6056
6383
  }
6057
6384
 
6058
6385
  // src/components/components/Switch/index.tsx
6059
- var import_jsx_runtime114 = require("react/jsx-runtime");
6386
+ var import_jsx_runtime115 = require("react/jsx-runtime");
6060
6387
  function Switch2({
6061
6388
  name,
6062
6389
  label,
@@ -6068,9 +6395,9 @@ function Switch2({
6068
6395
  style
6069
6396
  }) {
6070
6397
  const form = useFormContext();
6071
- const controlId = (0, import_react23.useId)();
6398
+ const controlId = (0, import_react24.useId)();
6072
6399
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
6073
- (0, import_react23.useEffect)(() => {
6400
+ (0, import_react24.useEffect)(() => {
6074
6401
  if (inForm && form && name) {
6075
6402
  form.registerField(name, rules, value);
6076
6403
  return () => form.unregisterField(name);
@@ -6085,13 +6412,13 @@ function Switch2({
6085
6412
  }
6086
6413
  onChange?.(next);
6087
6414
  };
6088
- const control = /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
6415
+ const control = /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
6089
6416
  "span",
6090
6417
  {
6091
6418
  className: cn("inline-flex items-center gap-2", !inForm && className),
6092
6419
  style: inForm ? void 0 : style,
6093
6420
  children: [
6094
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
6421
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6095
6422
  Switch,
6096
6423
  {
6097
6424
  id: controlId,
@@ -6101,12 +6428,12 @@ function Switch2({
6101
6428
  onCheckedChange: handleChange
6102
6429
  }
6103
6430
  ),
6104
- label ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
6431
+ label ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
6105
6432
  ]
6106
6433
  }
6107
6434
  );
6108
6435
  if (inForm && form && name) {
6109
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
6436
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
6110
6437
  "div",
6111
6438
  {
6112
6439
  "data-slot": "form-item",
@@ -6114,7 +6441,7 @@ function Switch2({
6114
6441
  style,
6115
6442
  children: [
6116
6443
  control,
6117
- form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
6444
+ form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
6118
6445
  ]
6119
6446
  }
6120
6447
  );
@@ -6124,8 +6451,8 @@ function Switch2({
6124
6451
 
6125
6452
  // src/components/components/Table/index.tsx
6126
6453
  var import_runtime18 = require("@pactor-app/runtime");
6127
- var import_react24 = require("react");
6128
- var import_jsx_runtime115 = require("react/jsx-runtime");
6454
+ var import_react25 = require("react");
6455
+ var import_jsx_runtime116 = require("react/jsx-runtime");
6129
6456
  function renderCellValue2(value) {
6130
6457
  if (value === void 0 || value === null) {
6131
6458
  return "";
@@ -6147,7 +6474,7 @@ function Table3({
6147
6474
  }) {
6148
6475
  const { renderChildren } = (0, import_runtime18.useRenderer)();
6149
6476
  const { t } = (0, import_runtime18.useI18n)();
6150
- const [current, setCurrent] = (0, import_react24.useState)(1);
6477
+ const [current, setCurrent] = (0, import_react25.useState)(1);
6151
6478
  const pageSize = pagination === false ? void 0 : pagination?.pageSize;
6152
6479
  const total = dataSource.length;
6153
6480
  const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
@@ -6156,17 +6483,17 @@ function Table3({
6156
6483
  setCurrent(page);
6157
6484
  onChange?.({ current: page, pageSize, total });
6158
6485
  };
6159
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
6160
- loading ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6486
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
6487
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6161
6488
  "div",
6162
6489
  {
6163
6490
  "data-slot": "table-loading",
6164
- className: "absolute inset-0 z-10 flex items-center justify-center bg-background/60 text-sm text-muted-foreground",
6491
+ className: "absolute inset-0 z-10 flex items-center justify-center bg-card/60 text-sm text-muted-foreground",
6165
6492
  children: t("pactor.table.loading")
6166
6493
  }
6167
6494
  ) : null,
6168
- /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Table2, { children: [
6169
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6495
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Table2, { children: [
6496
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6170
6497
  TableHead,
6171
6498
  {
6172
6499
  style: column.width !== void 0 ? { width: column.width } : void 0,
@@ -6174,7 +6501,7 @@ function Table3({
6174
6501
  },
6175
6502
  column.dataIndex ?? String(index)
6176
6503
  )) }) }),
6177
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6504
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6178
6505
  "div",
6179
6506
  {
6180
6507
  "data-slot": "table-empty",
@@ -6183,10 +6510,10 @@ function Table3({
6183
6510
  }
6184
6511
  ) }) }) : pageRows.map((row, rowIndex) => {
6185
6512
  const key = row[rowKey];
6186
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6513
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6187
6514
  TableRow,
6188
6515
  {
6189
- children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
6516
+ children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
6190
6517
  column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
6191
6518
  ) }, column.dataIndex ?? String(columnIndex)))
6192
6519
  },
@@ -6194,8 +6521,8 @@ function Table3({
6194
6521
  );
6195
6522
  }) })
6196
6523
  ] }),
6197
- pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
6198
- (page) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
6524
+ pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
6525
+ (page) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6199
6526
  Button,
6200
6527
  {
6201
6528
  type: "button",
@@ -6216,12 +6543,12 @@ var import_runtime19 = require("@pactor-app/runtime");
6216
6543
 
6217
6544
  // src/ui/tabs.tsx
6218
6545
  var import_tabs = require("@base-ui/react/tabs");
6219
- var import_jsx_runtime116 = require("react/jsx-runtime");
6546
+ var import_jsx_runtime117 = require("react/jsx-runtime");
6220
6547
  function Tabs({
6221
6548
  className,
6222
6549
  ...props
6223
6550
  }) {
6224
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6551
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
6225
6552
  import_tabs.Tabs.Root,
6226
6553
  {
6227
6554
  "data-slot": "tabs",
@@ -6234,7 +6561,7 @@ function TabsList({
6234
6561
  className,
6235
6562
  ...props
6236
6563
  }) {
6237
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6564
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
6238
6565
  import_tabs.Tabs.List,
6239
6566
  {
6240
6567
  "data-slot": "tabs-list",
@@ -6250,12 +6577,12 @@ function TabsTrigger({
6250
6577
  className,
6251
6578
  ...props
6252
6579
  }) {
6253
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6580
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
6254
6581
  import_tabs.Tabs.Tab,
6255
6582
  {
6256
6583
  "data-slot": "tabs-trigger",
6257
6584
  className: cn(
6258
- "inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-active:border-border data-active:bg-background data-active:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
6585
+ "inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-active:border-border data-active:bg-card data-active:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
6259
6586
  className
6260
6587
  ),
6261
6588
  ...props
@@ -6266,7 +6593,7 @@ function TabsContent({
6266
6593
  className,
6267
6594
  ...props
6268
6595
  }) {
6269
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
6596
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
6270
6597
  import_tabs.Tabs.Panel,
6271
6598
  {
6272
6599
  "data-slot": "tabs-content",
@@ -6277,10 +6604,10 @@ function TabsContent({
6277
6604
  }
6278
6605
 
6279
6606
  // src/components/components/Tabs/index.tsx
6280
- var import_jsx_runtime117 = require("react/jsx-runtime");
6607
+ var import_jsx_runtime118 = require("react/jsx-runtime");
6281
6608
  function Tabs2({ items = [], activeKey, onChange, className, style }) {
6282
6609
  const { renderChildren } = (0, import_runtime19.useRenderer)();
6283
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
6610
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
6284
6611
  Tabs,
6285
6612
  {
6286
6613
  value: activeKey,
@@ -6289,20 +6616,20 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
6289
6616
  className,
6290
6617
  style,
6291
6618
  children: [
6292
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsList, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
6293
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
6619
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TabsList, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
6620
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
6294
6621
  ]
6295
6622
  }
6296
6623
  );
6297
6624
  }
6298
6625
 
6299
6626
  // src/components/components/Text/index.tsx
6300
- var import_jsx_runtime118 = require("react/jsx-runtime");
6627
+ var import_jsx_runtime119 = require("react/jsx-runtime");
6301
6628
  var typeClassMap = {
6302
6629
  default: "",
6303
6630
  secondary: "text-muted-foreground",
6304
- success: "text-green-600 dark:text-green-400",
6305
- warning: "text-amber-600 dark:text-amber-400",
6631
+ success: "text-success",
6632
+ warning: "text-warning",
6306
6633
  danger: "text-destructive"
6307
6634
  };
6308
6635
  function Text({
@@ -6316,7 +6643,7 @@ function Text({
6316
6643
  style,
6317
6644
  children
6318
6645
  }) {
6319
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
6646
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
6320
6647
  "span",
6321
6648
  {
6322
6649
  "data-slot": "text",
@@ -6336,8 +6663,8 @@ function Text({
6336
6663
  }
6337
6664
 
6338
6665
  // src/components/components/Textarea/index.tsx
6339
- var import_react25 = require("react");
6340
- var import_jsx_runtime119 = require("react/jsx-runtime");
6666
+ var import_react26 = require("react");
6667
+ var import_jsx_runtime120 = require("react/jsx-runtime");
6341
6668
  function Textarea2({
6342
6669
  name,
6343
6670
  label,
@@ -6351,9 +6678,9 @@ function Textarea2({
6351
6678
  style
6352
6679
  }) {
6353
6680
  const form = useFormContext();
6354
- const controlId = (0, import_react25.useId)();
6681
+ const controlId = (0, import_react26.useId)();
6355
6682
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
6356
- (0, import_react25.useEffect)(() => {
6683
+ (0, import_react26.useEffect)(() => {
6357
6684
  if (inForm && form && name) {
6358
6685
  form.registerField(name, rules, value);
6359
6686
  return () => form.unregisterField(name);
@@ -6362,7 +6689,7 @@ function Textarea2({
6362
6689
  });
6363
6690
  if (inForm && form && name) {
6364
6691
  const fieldValue = form.values[name];
6365
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
6692
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
6366
6693
  FieldShell,
6367
6694
  {
6368
6695
  layout: form.layout,
@@ -6371,7 +6698,7 @@ function Textarea2({
6371
6698
  error: form.errors[name],
6372
6699
  className,
6373
6700
  style,
6374
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
6701
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
6375
6702
  Textarea,
6376
6703
  {
6377
6704
  id: controlId,
@@ -6388,7 +6715,7 @@ function Textarea2({
6388
6715
  }
6389
6716
  );
6390
6717
  }
6391
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
6718
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
6392
6719
  Textarea,
6393
6720
  {
6394
6721
  value: value ?? "",
@@ -6404,9 +6731,9 @@ function Textarea2({
6404
6731
 
6405
6732
  // src/ui/toggle.tsx
6406
6733
  var import_toggle = require("@base-ui/react/toggle");
6407
- var import_class_variance_authority6 = require("class-variance-authority");
6408
- var import_jsx_runtime120 = require("react/jsx-runtime");
6409
- var toggleVariants = (0, import_class_variance_authority6.cva)(
6734
+ var import_class_variance_authority7 = require("class-variance-authority");
6735
+ var import_jsx_runtime121 = require("react/jsx-runtime");
6736
+ var toggleVariants = (0, import_class_variance_authority7.cva)(
6410
6737
  "inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:bg-accent data-pressed:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
6411
6738
  {
6412
6739
  variants: {
@@ -6432,7 +6759,7 @@ function Toggle({
6432
6759
  size,
6433
6760
  ...props
6434
6761
  }) {
6435
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
6762
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
6436
6763
  import_toggle.Toggle,
6437
6764
  {
6438
6765
  "data-slot": "toggle",
@@ -6443,7 +6770,7 @@ function Toggle({
6443
6770
  }
6444
6771
 
6445
6772
  // src/components/components/Toggle/index.tsx
6446
- var import_jsx_runtime121 = require("react/jsx-runtime");
6773
+ var import_jsx_runtime122 = require("react/jsx-runtime");
6447
6774
  function Toggle2({
6448
6775
  text,
6449
6776
  pressed,
@@ -6454,7 +6781,7 @@ function Toggle2({
6454
6781
  className,
6455
6782
  style
6456
6783
  }) {
6457
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
6784
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6458
6785
  Toggle,
6459
6786
  {
6460
6787
  pressed,
@@ -6472,9 +6799,9 @@ function Toggle2({
6472
6799
  // src/ui/toggle-group.tsx
6473
6800
  var import_toggle3 = require("@base-ui/react/toggle");
6474
6801
  var import_toggle_group = require("@base-ui/react/toggle-group");
6475
- var React4 = __toESM(require("react"), 1);
6476
- var import_jsx_runtime122 = require("react/jsx-runtime");
6477
- var ToggleGroupContext = React4.createContext({
6802
+ var React5 = __toESM(require("react"), 1);
6803
+ var import_jsx_runtime123 = require("react/jsx-runtime");
6804
+ var ToggleGroupContext = React5.createContext({
6478
6805
  size: "default",
6479
6806
  variant: "default"
6480
6807
  });
@@ -6485,7 +6812,7 @@ function ToggleGroup({
6485
6812
  children,
6486
6813
  ...props
6487
6814
  }) {
6488
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6815
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6489
6816
  import_toggle_group.ToggleGroup,
6490
6817
  {
6491
6818
  "data-slot": "toggle-group",
@@ -6496,7 +6823,7 @@ function ToggleGroup({
6496
6823
  className
6497
6824
  ),
6498
6825
  ...props,
6499
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
6826
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
6500
6827
  }
6501
6828
  );
6502
6829
  }
@@ -6507,8 +6834,8 @@ function ToggleGroupItem({
6507
6834
  size,
6508
6835
  ...props
6509
6836
  }) {
6510
- const context = React4.useContext(ToggleGroupContext);
6511
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
6837
+ const context = React5.useContext(ToggleGroupContext);
6838
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6512
6839
  import_toggle3.Toggle,
6513
6840
  {
6514
6841
  "data-slot": "toggle-group-item",
@@ -6529,7 +6856,7 @@ function ToggleGroupItem({
6529
6856
  }
6530
6857
 
6531
6858
  // src/components/components/ToggleGroup/index.tsx
6532
- var import_jsx_runtime123 = require("react/jsx-runtime");
6859
+ var import_jsx_runtime124 = require("react/jsx-runtime");
6533
6860
  function ToggleGroup2({
6534
6861
  options = [],
6535
6862
  value,
@@ -6549,7 +6876,7 @@ function ToggleGroup2({
6549
6876
  onChange?.(added ?? void 0);
6550
6877
  }
6551
6878
  };
6552
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6879
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6553
6880
  ToggleGroup,
6554
6881
  {
6555
6882
  value: groupValue,
@@ -6558,7 +6885,7 @@ function ToggleGroup2({
6558
6885
  onValueChange: (next) => handleChange(next),
6559
6886
  className,
6560
6887
  style,
6561
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
6888
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
6562
6889
  ToggleGroupItem,
6563
6890
  {
6564
6891
  value: option.value,
@@ -6572,18 +6899,18 @@ function ToggleGroup2({
6572
6899
  }
6573
6900
 
6574
6901
  // src/components/components/Tooltip/index.tsx
6575
- var import_jsx_runtime124 = require("react/jsx-runtime");
6902
+ var import_jsx_runtime125 = require("react/jsx-runtime");
6576
6903
  function Tooltip3({ content, children, className, style }) {
6577
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Tooltip2, { children: [
6578
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
6579
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(TooltipContent, { className, style, children: content })
6904
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Tooltip2, { children: [
6905
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
6906
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(TooltipContent, { className, style, children: content })
6580
6907
  ] });
6581
6908
  }
6582
6909
 
6583
6910
  // src/ui/typography.tsx
6584
- var import_class_variance_authority7 = require("class-variance-authority");
6585
- var import_jsx_runtime125 = require("react/jsx-runtime");
6586
- var typographyVariants = (0, import_class_variance_authority7.cva)("", {
6911
+ var import_class_variance_authority8 = require("class-variance-authority");
6912
+ var import_jsx_runtime126 = require("react/jsx-runtime");
6913
+ var typographyVariants = (0, import_class_variance_authority8.cva)("", {
6587
6914
  variants: {
6588
6915
  variant: {
6589
6916
  h1: "scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
@@ -6618,7 +6945,7 @@ var variantTagMap = {
6618
6945
  };
6619
6946
  function Typography({ className, variant = "p", ...props }) {
6620
6947
  const Tag2 = variantTagMap[variant ?? "p"];
6621
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
6948
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
6622
6949
  Tag2,
6623
6950
  {
6624
6951
  "data-slot": "typography",
@@ -6630,18 +6957,18 @@ function Typography({ className, variant = "p", ...props }) {
6630
6957
  }
6631
6958
 
6632
6959
  // src/components/components/Typography/index.tsx
6633
- var import_jsx_runtime126 = require("react/jsx-runtime");
6960
+ var import_jsx_runtime127 = require("react/jsx-runtime");
6634
6961
  function Typography2({
6635
6962
  variant = "p",
6636
6963
  text,
6637
6964
  className,
6638
6965
  style
6639
6966
  }) {
6640
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Typography, { variant, className, style, children: text });
6967
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { variant, className, style, children: text });
6641
6968
  }
6642
6969
 
6643
6970
  // src/components/register.ts
6644
- var shadcnComponents = {
6971
+ var builtinComponents = {
6645
6972
  Page,
6646
6973
  Grid,
6647
6974
  Flex,
@@ -6721,14 +7048,14 @@ var shadcnComponents = {
6721
7048
  // 图标(lucide 白名单)
6722
7049
  Icon
6723
7050
  };
6724
- function registerShadcnComponents(registry) {
6725
- for (const [type, component] of Object.entries(shadcnComponents)) {
7051
+ function registerBuiltinComponents(registry) {
7052
+ for (const [type, component] of Object.entries(builtinComponents)) {
6726
7053
  registry.register(type, component);
6727
7054
  }
6728
7055
  }
6729
- function createShadcnComponentRegistry() {
7056
+ function createComponentRegistry() {
6730
7057
  const registry = new import_core2.Registry("ComponentRegistry");
6731
- registerShadcnComponents(registry);
7058
+ registerBuiltinComponents(registry);
6732
7059
  return registry;
6733
7060
  }
6734
7061
 
@@ -6776,14 +7103,14 @@ function collectDefaultOpenKeys(registry, activeMenuId) {
6776
7103
  return keys;
6777
7104
  }
6778
7105
 
6779
- // src/layout/admin/ShadcnAdminLayout.tsx
7106
+ // src/layout/admin/AdminLayout.tsx
6780
7107
  var import_permission = require("@pactor-app/permission");
6781
7108
  var import_router = require("@pactor-app/router");
6782
7109
  var import_runtime20 = require("@pactor-app/runtime");
6783
- var import_react27 = require("react");
7110
+ var import_react28 = require("react");
6784
7111
 
6785
7112
  // src/layout/admin/use-media-query.ts
6786
- var import_react26 = require("react");
7113
+ var import_react27 = require("react");
6787
7114
  var BREAKPOINT_PX = {
6788
7115
  xs: 480,
6789
7116
  sm: 576,
@@ -6793,10 +7120,10 @@ var BREAKPOINT_PX = {
6793
7120
  xxl: 1600
6794
7121
  };
6795
7122
  function useMediaQuery(query) {
6796
- const [matches, setMatches] = (0, import_react26.useState)(
7123
+ const [matches, setMatches] = (0, import_react27.useState)(
6797
7124
  () => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false
6798
7125
  );
6799
- (0, import_react26.useEffect)(() => {
7126
+ (0, import_react27.useEffect)(() => {
6800
7127
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6801
7128
  return;
6802
7129
  }
@@ -6815,8 +7142,8 @@ function useBreakpointBelow(breakpoint) {
6815
7142
  return breakpoint !== void 0 && matches;
6816
7143
  }
6817
7144
 
6818
- // src/layout/admin/ShadcnAdminLayout.tsx
6819
- var import_jsx_runtime127 = require("react/jsx-runtime");
7145
+ // src/layout/admin/AdminLayout.tsx
7146
+ var import_jsx_runtime128 = require("react/jsx-runtime");
6820
7147
  function buildVisibleMenuTree(registry, permissionChecker) {
6821
7148
  const tree = registry.tree();
6822
7149
  return permissionChecker === void 0 ? [...tree] : (0, import_permission.filterMenusByPermission)(tree, permissionChecker);
@@ -6831,7 +7158,7 @@ function navigateMenuItem(menu, bridge) {
6831
7158
  }
6832
7159
  bridge.push(menu.path);
6833
7160
  }
6834
- var menuItemClass2 = "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";
7161
+ var menuItemClass2 = "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-(--menu-hover-background) hover:text-(--menu-hover-foreground) disabled:pointer-events-none disabled:opacity-50";
6835
7162
  function CollapsedGroupFlyout({
6836
7163
  menu,
6837
7164
  registry,
@@ -6839,8 +7166,8 @@ function CollapsedGroupFlyout({
6839
7166
  activeMenuId,
6840
7167
  defaultOpenKeys
6841
7168
  }) {
6842
- const [open, setOpen] = (0, import_react27.useState)(false);
6843
- const closeTimer = (0, import_react27.useRef)(void 0);
7169
+ const [open, setOpen] = (0, import_react28.useState)(false);
7170
+ const closeTimer = (0, import_react28.useRef)(void 0);
6844
7171
  const openNow = () => {
6845
7172
  window.clearTimeout(closeTimer.current);
6846
7173
  setOpen(true);
@@ -6849,12 +7176,12 @@ function CollapsedGroupFlyout({
6849
7176
  window.clearTimeout(closeTimer.current);
6850
7177
  closeTimer.current = window.setTimeout(() => setOpen(false), 200);
6851
7178
  };
6852
- (0, import_react27.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
6853
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
6854
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7179
+ (0, import_react28.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
7180
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
7181
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6855
7182
  PopoverTrigger,
6856
7183
  {
6857
- render: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7184
+ render: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6858
7185
  "button",
6859
7186
  {
6860
7187
  type: "button",
@@ -6872,7 +7199,7 @@ function CollapsedGroupFlyout({
6872
7199
  )
6873
7200
  }
6874
7201
  ),
6875
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7202
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
6876
7203
  PopoverContent,
6877
7204
  {
6878
7205
  "data-slot": "menu-flyout",
@@ -6889,8 +7216,8 @@ function CollapsedGroupFlyout({
6889
7216
  }
6890
7217
  },
6891
7218
  children: [
6892
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
6893
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7219
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
7220
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6894
7221
  MenuTree,
6895
7222
  {
6896
7223
  menus: menu.children ?? [],
@@ -6914,9 +7241,9 @@ function MenuTree({
6914
7241
  collapsed = false
6915
7242
  }) {
6916
7243
  if (collapsed) {
6917
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
7244
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
6918
7245
  if (menu.type === "group") {
6919
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7246
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6920
7247
  CollapsedGroupFlyout,
6921
7248
  {
6922
7249
  menu,
@@ -6928,7 +7255,7 @@ function MenuTree({
6928
7255
  menu.id
6929
7256
  );
6930
7257
  }
6931
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7258
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6932
7259
  "button",
6933
7260
  {
6934
7261
  type: "button",
@@ -6937,7 +7264,7 @@ function MenuTree({
6937
7264
  className: cn(
6938
7265
  menuItemClass2,
6939
7266
  "mx-auto size-10 justify-center px-0 font-semibold",
6940
- menu.id === activeMenuId && "bg-accent font-semibold text-accent-foreground"
7267
+ menu.id === activeMenuId && "bg-(--menu-active-background) font-semibold text-(--menu-active-foreground)"
6941
7268
  ),
6942
7269
  disabled: menu.disabled,
6943
7270
  title: menu.title,
@@ -6948,7 +7275,7 @@ function MenuTree({
6948
7275
  );
6949
7276
  }) });
6950
7277
  }
6951
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7278
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6952
7279
  Accordion,
6953
7280
  {
6954
7281
  type: "multiple",
@@ -6957,27 +7284,27 @@ function MenuTree({
6957
7284
  className: "flex flex-col gap-0.5 px-2",
6958
7285
  children: menus.map((menu) => {
6959
7286
  if (menu.type === "group") {
6960
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7287
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
6961
7288
  AccordionItem,
6962
7289
  {
6963
7290
  value: menu.id,
6964
7291
  "data-slot": "menu-group",
6965
7292
  className: "border-b-0",
6966
7293
  children: [
6967
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7294
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6968
7295
  AccordionTrigger,
6969
7296
  {
6970
7297
  "data-slot": "menu-group-trigger",
6971
7298
  className: cn(menuItemClass2, "py-2 font-medium"),
6972
7299
  disabled: menu.disabled,
6973
7300
  title: menu.title,
6974
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
6975
- menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
7301
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
7302
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
6976
7303
  menu.title
6977
7304
  ] })
6978
7305
  }
6979
7306
  ),
6980
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7307
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
6981
7308
  MenuTree,
6982
7309
  {
6983
7310
  menus: menu.children ?? [],
@@ -6992,7 +7319,7 @@ function MenuTree({
6992
7319
  menu.id
6993
7320
  );
6994
7321
  }
6995
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7322
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
6996
7323
  "button",
6997
7324
  {
6998
7325
  type: "button",
@@ -7000,13 +7327,13 @@ function MenuTree({
7000
7327
  "data-active": menu.id === activeMenuId || void 0,
7001
7328
  className: cn(
7002
7329
  menuItemClass2,
7003
- menu.id === activeMenuId && "bg-accent font-semibold text-accent-foreground"
7330
+ menu.id === activeMenuId && "bg-(--menu-active-background) font-semibold text-(--menu-active-foreground)"
7004
7331
  ),
7005
7332
  disabled: menu.disabled,
7006
7333
  title: menu.title,
7007
7334
  onClick: () => navigateMenuItem(registry.findById(menu.id), bridge),
7008
7335
  children: [
7009
- menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
7336
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
7010
7337
  menu.title
7011
7338
  ]
7012
7339
  },
@@ -7016,7 +7343,7 @@ function MenuTree({
7016
7343
  }
7017
7344
  );
7018
7345
  }
7019
- function ShadcnAdminLayout({
7346
+ function AdminLayout({
7020
7347
  config = {},
7021
7348
  brand,
7022
7349
  registry,
@@ -7033,16 +7360,16 @@ function ShadcnAdminLayout({
7033
7360
  const showTabs = config.tabs ?? false;
7034
7361
  const showBreadcrumb = config.breadcrumb ?? false;
7035
7362
  const showFooter = config.footer ?? false;
7036
- const [collapsed, setCollapsed] = (0, import_react27.useState)(config.collapsed ?? false);
7363
+ const [collapsed, setCollapsed] = (0, import_react28.useState)(config.collapsed ?? false);
7037
7364
  const broken = useBreakpointBelow(config.breakpoint);
7038
7365
  const effectiveCollapsed = collapsed || broken;
7039
- const [bridgeRoute, setBridgeRoute] = (0, import_react27.useState)(
7366
+ const [bridgeRoute, setBridgeRoute] = (0, import_react28.useState)(
7040
7367
  () => (0, import_router.resolveRoute)(registry, bridge.getLocation())
7041
7368
  );
7042
- const [tabs, setTabs] = (0, import_react27.useState)([]);
7043
- const tabsRef = (0, import_react27.useRef)(tabs);
7369
+ const [tabs, setTabs] = (0, import_react28.useState)([]);
7370
+ const tabsRef = (0, import_react28.useRef)(tabs);
7044
7371
  tabsRef.current = tabs;
7045
- (0, import_react27.useEffect)(() => {
7372
+ (0, import_react28.useEffect)(() => {
7046
7373
  const handleLocation = (location) => {
7047
7374
  const next = (0, import_router.resolveRoute)(registry, location);
7048
7375
  setBridgeRoute(next);
@@ -7063,16 +7390,16 @@ function ShadcnAdminLayout({
7063
7390
  }, [registry, bridge]);
7064
7391
  const route = routeProp ?? bridgeRoute;
7065
7392
  const activeMenuId = route?.activeMenu;
7066
- const visibleMenus = (0, import_react27.useMemo)(
7393
+ const visibleMenus = (0, import_react28.useMemo)(
7067
7394
  () => buildVisibleMenuTree(registry, permissionChecker),
7068
7395
  [registry, permissionChecker]
7069
7396
  );
7070
- const defaultOpenKeysRef = (0, import_react27.useRef)(null);
7397
+ const defaultOpenKeysRef = (0, import_react28.useRef)(null);
7071
7398
  if (defaultOpenKeysRef.current === null) {
7072
7399
  defaultOpenKeysRef.current = collectDefaultOpenKeys(registry, activeMenuId);
7073
7400
  }
7074
7401
  const defaultOpenKeys = defaultOpenKeysRef.current;
7075
- const activeTopId = (0, import_react27.useMemo)(() => {
7402
+ const activeTopId = (0, import_react28.useMemo)(() => {
7076
7403
  if (activeMenuId !== void 0) {
7077
7404
  const chain = findMenuChain(registry, activeMenuId);
7078
7405
  if (chain.length > 0) {
@@ -7081,11 +7408,11 @@ function ShadcnAdminLayout({
7081
7408
  }
7082
7409
  return void 0;
7083
7410
  }, [registry, activeMenuId]);
7084
- const [selectedTopId, setSelectedTopId] = (0, import_react27.useState)();
7411
+ const [selectedTopId, setSelectedTopId] = (0, import_react28.useState)();
7085
7412
  const secondaryTopId = selectedTopId ?? activeTopId ?? visibleMenus.find((m) => m.type === "group")?.id ?? visibleMenus[0]?.id;
7086
7413
  const secondaryTop = visibleMenus.find((m) => m.id === secondaryTopId);
7087
7414
  const hasSecondary = (secondaryTop?.children?.length ?? 0) > 0;
7088
- const breadcrumbItems = (0, import_react27.useMemo)(() => {
7415
+ const breadcrumbItems = (0, import_react28.useMemo)(() => {
7089
7416
  if (!showBreadcrumb || activeMenuId === void 0) {
7090
7417
  return [];
7091
7418
  }
@@ -7101,30 +7428,30 @@ function ShadcnAdminLayout({
7101
7428
  };
7102
7429
  const fixedHeader = config.fixedHeader ?? true;
7103
7430
  const fixedSider = config.fixedSider ?? true;
7104
- const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7431
+ const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7105
7432
  "header",
7106
7433
  {
7107
7434
  "data-slot": "admin-header",
7108
7435
  className: cn(
7109
- "flex h-14 items-center gap-4 border-b border-border bg-background px-6",
7436
+ "flex h-14 items-center gap-4 border-b border-border bg-card px-6",
7110
7437
  fixedHeader && "sticky top-0 z-20"
7111
7438
  ),
7112
7439
  children: [
7113
- mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
7440
+ mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
7114
7441
  brand.logo,
7115
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
7442
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
7116
7443
  ] }),
7117
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex-1" }),
7444
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex-1" }),
7118
7445
  headerExtra
7119
7446
  ]
7120
7447
  }
7121
7448
  ) : null;
7122
- const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7449
+ const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7123
7450
  "div",
7124
7451
  {
7125
7452
  "data-slot": "admin-primary-col",
7126
7453
  className: "flex w-12 shrink-0 flex-col items-center gap-1 border-r border-border py-2",
7127
- children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7454
+ children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7128
7455
  "button",
7129
7456
  {
7130
7457
  type: "button",
@@ -7133,7 +7460,7 @@ function ShadcnAdminLayout({
7133
7460
  className: cn(
7134
7461
  menuItemClass2,
7135
7462
  "size-10 justify-center px-0 font-semibold",
7136
- (menu.id === secondaryTopId || menu.id === activeTopId) && "bg-accent text-accent-foreground"
7463
+ (menu.id === secondaryTopId || menu.id === activeTopId) && "bg-(--menu-active-background) text-(--menu-active-foreground)"
7137
7464
  ),
7138
7465
  disabled: menu.disabled,
7139
7466
  title: menu.title,
@@ -7151,32 +7478,32 @@ function ShadcnAdminLayout({
7151
7478
  }
7152
7479
  );
7153
7480
  const showTrigger = config.collapsible && mode !== "two-column";
7154
- const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7481
+ const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7155
7482
  "aside",
7156
7483
  {
7157
7484
  "data-slot": "admin-sidebar",
7158
7485
  "data-collapsed": effectiveCollapsed || void 0,
7159
7486
  className: cn(
7160
- "shrink-0 overflow-auto border-r border-border bg-background py-2",
7487
+ "shrink-0 overflow-auto border-r border-border bg-sidebar py-2",
7161
7488
  effectiveCollapsed ? "w-16 px-1.5" : "w-52",
7162
7489
  fixedSider && (mode === "side-full" ? "sticky top-0 h-screen" : "sticky top-14 h-[calc(100vh-3.5rem)]")
7163
7490
  ),
7164
7491
  style: mode === "two-column" && !hasSecondary ? { width: 56 } : void 0,
7165
7492
  children: [
7166
- mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7493
+ mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7167
7494
  "div",
7168
7495
  {
7169
7496
  "data-slot": "admin-sidebar-brand",
7170
7497
  className: "flex items-center gap-2 border-b border-border px-4 py-4 font-semibold",
7171
7498
  children: [
7172
7499
  brand.logo,
7173
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { children: brand.title })
7500
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { children: brand.title })
7174
7501
  ]
7175
7502
  }
7176
7503
  ),
7177
- mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
7504
+ mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
7178
7505
  primaryColumn,
7179
- hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7506
+ hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7180
7507
  MenuTree,
7181
7508
  {
7182
7509
  menus: secondaryTop?.children ?? [],
@@ -7186,7 +7513,7 @@ function ShadcnAdminLayout({
7186
7513
  defaultOpenKeys
7187
7514
  }
7188
7515
  ) })
7189
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7516
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7190
7517
  MenuTree,
7191
7518
  {
7192
7519
  menus: visibleMenus,
@@ -7197,14 +7524,14 @@ function ShadcnAdminLayout({
7197
7524
  collapsed: effectiveCollapsed
7198
7525
  }
7199
7526
  ),
7200
- showTrigger && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7527
+ showTrigger && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7201
7528
  "button",
7202
7529
  {
7203
7530
  type: "button",
7204
7531
  "data-slot": "admin-collapse-trigger",
7205
7532
  "aria-label": effectiveCollapsed ? t("pactor.layout.expandSidebar") : t("pactor.layout.collapseSidebar"),
7206
7533
  "aria-expanded": !effectiveCollapsed,
7207
- className: "sticky bottom-0 flex w-full cursor-pointer items-center justify-center border-t border-border bg-background py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
7534
+ className: "sticky bottom-0 flex w-full cursor-pointer items-center justify-center border-t border-border bg-sidebar py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
7208
7535
  onClick: () => setCollapsed((value) => !value),
7209
7536
  children: effectiveCollapsed ? "\xBB" : "\xAB"
7210
7537
  }
@@ -7212,14 +7539,14 @@ function ShadcnAdminLayout({
7212
7539
  ]
7213
7540
  }
7214
7541
  ) : null;
7215
- const body = /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
7216
- showTabs && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7542
+ const body = /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
7543
+ showTabs && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7217
7544
  "div",
7218
7545
  {
7219
7546
  "data-slot": "admin-tabs",
7220
7547
  role: "tablist",
7221
- className: "flex items-center gap-1 border-b border-border bg-background px-4 pt-2",
7222
- children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7548
+ className: "flex items-center gap-1 border-b border-border bg-card px-4 pt-2",
7549
+ children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7223
7550
  "div",
7224
7551
  {
7225
7552
  "data-slot": "admin-tab",
@@ -7227,10 +7554,10 @@ function ShadcnAdminLayout({
7227
7554
  role: "presentation",
7228
7555
  className: cn(
7229
7556
  "inline-flex items-center gap-1 rounded-t-md border border-b-0 border-border px-3 py-1.5 text-sm",
7230
- tab.key === currentPath ? "bg-background font-medium text-foreground" : "bg-muted text-muted-foreground"
7557
+ tab.key === currentPath ? "bg-card font-medium text-foreground" : "bg-muted text-muted-foreground"
7231
7558
  ),
7232
7559
  children: [
7233
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7560
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7234
7561
  "button",
7235
7562
  {
7236
7563
  type: "button",
@@ -7241,7 +7568,7 @@ function ShadcnAdminLayout({
7241
7568
  children: tab.title
7242
7569
  }
7243
7570
  ),
7244
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7571
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7245
7572
  "button",
7246
7573
  {
7247
7574
  type: "button",
@@ -7258,21 +7585,21 @@ function ShadcnAdminLayout({
7258
7585
  ))
7259
7586
  }
7260
7587
  ),
7261
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7588
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7262
7589
  "main",
7263
7590
  {
7264
7591
  "data-slot": "admin-content",
7265
7592
  className: "flex-1 bg-muted/40 p-6",
7266
7593
  children: [
7267
- showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7594
+ showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7268
7595
  "nav",
7269
7596
  {
7270
7597
  "data-slot": "admin-breadcrumb",
7271
7598
  "aria-label": t("pactor.layout.breadcrumb"),
7272
7599
  className: "mb-4",
7273
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("li", { className: "flex items-center gap-2", children: [
7274
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "aria-hidden": true, children: "/" }),
7275
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
7600
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("li", { className: "flex items-center gap-2", children: [
7601
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { "aria-hidden": true, children: "/" }),
7602
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
7276
7603
  ] }, index)) })
7277
7604
  }
7278
7605
  ),
@@ -7281,7 +7608,7 @@ function ShadcnAdminLayout({
7281
7608
  }
7282
7609
  )
7283
7610
  ] });
7284
- const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7611
+ const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7285
7612
  "footer",
7286
7613
  {
7287
7614
  "data-slot": "admin-footer",
@@ -7289,7 +7616,7 @@ function ShadcnAdminLayout({
7289
7616
  children: brand.title
7290
7617
  }
7291
7618
  ) : null;
7292
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7619
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7293
7620
  "div",
7294
7621
  {
7295
7622
  "data-slot": "admin-layout",
@@ -7297,9 +7624,9 @@ function ShadcnAdminLayout({
7297
7624
  "data-fixed-header": fixedHeader || void 0,
7298
7625
  "data-fixed-sider": fixedSider || void 0,
7299
7626
  className: "flex min-h-screen flex-col bg-background text-foreground",
7300
- children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
7627
+ children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
7301
7628
  sidebar,
7302
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
7629
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
7303
7630
  "div",
7304
7631
  {
7305
7632
  "data-slot": "admin-side-full-main",
@@ -7311,9 +7638,9 @@ function ShadcnAdminLayout({
7311
7638
  ]
7312
7639
  }
7313
7640
  )
7314
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
7641
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
7315
7642
  header,
7316
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
7643
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
7317
7644
  sidebar,
7318
7645
  body
7319
7646
  ] }),
@@ -7323,10 +7650,10 @@ function ShadcnAdminLayout({
7323
7650
  );
7324
7651
  }
7325
7652
 
7326
- // src/layout/basic/ShadcnBlankLayout.tsx
7327
- var import_jsx_runtime128 = require("react/jsx-runtime");
7328
- function ShadcnBlankLayout({ children }) {
7329
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7653
+ // src/layout/basic/BlankLayout.tsx
7654
+ var import_jsx_runtime129 = require("react/jsx-runtime");
7655
+ function BlankLayout({ children }) {
7656
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7330
7657
  "div",
7331
7658
  {
7332
7659
  "data-slot": "blank-layout",
@@ -7336,27 +7663,154 @@ function ShadcnBlankLayout({ children }) {
7336
7663
  );
7337
7664
  }
7338
7665
 
7339
- // src/layout/basic/ShadcnLoginLayout.tsx
7340
- var import_jsx_runtime129 = require("react/jsx-runtime");
7341
- function ShadcnLoginLayout({
7666
+ // src/layout/chat/ChatLayout.tsx
7667
+ var import_permission2 = require("@pactor-app/permission");
7668
+ var import_react29 = require("react");
7669
+ var import_jsx_runtime130 = require("react/jsx-runtime");
7670
+ function ChatLayout({
7671
+ brand,
7672
+ menu,
7673
+ registry,
7674
+ bridge,
7675
+ route: routeProp,
7676
+ permissionChecker,
7677
+ activeMenuKey,
7678
+ onMenuSelect,
7679
+ collapsible,
7680
+ sidebar,
7681
+ sidebarFooter,
7682
+ children
7683
+ }) {
7684
+ const registryMenus = (0, import_react29.useMemo)(() => {
7685
+ if (menu !== void 0 || registry === void 0) {
7686
+ return [];
7687
+ }
7688
+ const tree = registry.tree();
7689
+ const visible = permissionChecker !== void 0 ? (0, import_permission2.filterMenusByPermission)(tree, permissionChecker) : tree;
7690
+ return visible.flatMap((item) => menuItemToMenuData(item));
7691
+ }, [menu, registry, permissionChecker]);
7692
+ const menuItems = menu ?? registryMenus;
7693
+ const [bridgePath, setBridgePath] = (0, import_react29.useState)(
7694
+ () => bridge?.getLocation().pathname ?? "/"
7695
+ );
7696
+ (0, import_react29.useEffect)(() => {
7697
+ if (bridge === void 0) {
7698
+ return;
7699
+ }
7700
+ return bridge.subscribe((location) => {
7701
+ setBridgePath(location.pathname);
7702
+ });
7703
+ }, [bridge]);
7704
+ const activeKey = (0, import_react29.useMemo)(() => {
7705
+ if (activeMenuKey !== void 0) {
7706
+ return activeMenuKey;
7707
+ }
7708
+ const path = routeProp?.path ?? bridgePath;
7709
+ return menuItems.find((item) => item.path === path)?.key;
7710
+ }, [activeMenuKey, routeProp, bridgePath, menuItems]);
7711
+ const handleSelect = (key) => {
7712
+ const item = menuItems.find((m) => m.key === key);
7713
+ if (item === void 0 || item.disabled === true) {
7714
+ return;
7715
+ }
7716
+ if (onMenuSelect !== void 0) {
7717
+ onMenuSelect(key, item);
7718
+ return;
7719
+ }
7720
+ if (bridge !== void 0 && item.path !== void 0) {
7721
+ bridge.push(item.path);
7722
+ }
7723
+ };
7724
+ const sidebarContent = sidebar !== void 0 && sidebar !== null ? sidebar : menuItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7725
+ Menu2,
7726
+ {
7727
+ items: menuItems.map((item) => chatMenuItemToUiMenuItem(item)),
7728
+ selectedKey: activeKey,
7729
+ onSelect: handleSelect
7730
+ }
7731
+ ) : void 0;
7732
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7733
+ Sidebar,
7734
+ {
7735
+ brand,
7736
+ content: sidebarContent,
7737
+ sidebarFooter,
7738
+ collapsible,
7739
+ locationKey: routeProp?.path ?? bridgePath,
7740
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7741
+ "div",
7742
+ {
7743
+ "data-slot": "chat-layout-content",
7744
+ className: "flex min-h-0 flex-1 flex-col",
7745
+ children
7746
+ }
7747
+ )
7748
+ }
7749
+ );
7750
+ }
7751
+ function chatMenuItemToUiMenuItem(item) {
7752
+ return {
7753
+ key: item.key,
7754
+ label: item.label,
7755
+ icon: item.icon,
7756
+ badge: item.badge,
7757
+ dot: item.dot,
7758
+ group: item.group,
7759
+ disabled: item.disabled
7760
+ };
7761
+ }
7762
+ function menuItemToMenuData(item) {
7763
+ if (item.type === "group") {
7764
+ const children = (item.children ?? []).flatMap(
7765
+ (child) => menuItemToMenuData(child)
7766
+ );
7767
+ if (children.length === 0) {
7768
+ return [];
7769
+ }
7770
+ return children.map((child, index) => ({
7771
+ ...child,
7772
+ group: index === 0 ? item.title : void 0
7773
+ }));
7774
+ }
7775
+ if (item.hidden === true) {
7776
+ return [];
7777
+ }
7778
+ const ext = item;
7779
+ return [
7780
+ {
7781
+ key: item.id,
7782
+ label: item.title,
7783
+ icon: item.icon,
7784
+ path: item.path,
7785
+ badge: item.badge,
7786
+ dot: ext.dot,
7787
+ group: ext.group,
7788
+ disabled: item.disabled
7789
+ }
7790
+ ];
7791
+ }
7792
+
7793
+ // src/layout/basic/LoginLayout.tsx
7794
+ var import_jsx_runtime131 = require("react/jsx-runtime");
7795
+ function LoginLayout({
7342
7796
  variant = "center",
7343
7797
  brand,
7344
7798
  children
7345
7799
  }) {
7346
- const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
7800
+ const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
7347
7801
  brand.logo,
7348
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
7349
- brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
7802
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
7803
+ brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
7350
7804
  ] });
7351
7805
  if (variant === "split") {
7352
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
7806
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
7353
7807
  "div",
7354
7808
  {
7355
7809
  "data-slot": "login-layout",
7356
7810
  "data-variant": "split",
7357
7811
  className: "grid min-h-screen grid-cols-2 bg-background text-foreground",
7358
7812
  children: [
7359
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7813
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
7360
7814
  "div",
7361
7815
  {
7362
7816
  "data-slot": "login-brand-panel",
@@ -7364,7 +7818,7 @@ function ShadcnLoginLayout({
7364
7818
  children: brandBlock
7365
7819
  }
7366
7820
  ),
7367
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7821
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
7368
7822
  "div",
7369
7823
  {
7370
7824
  "data-slot": "login-form-panel",
@@ -7376,46 +7830,46 @@ function ShadcnLoginLayout({
7376
7830
  }
7377
7831
  );
7378
7832
  }
7379
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
7833
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
7380
7834
  "div",
7381
7835
  {
7382
7836
  "data-slot": "login-layout",
7383
7837
  "data-variant": "center",
7384
7838
  className: "flex min-h-screen items-center justify-center bg-muted/40 text-foreground",
7385
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
7386
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(CardHeader, { className: "px-6", children: [
7387
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
7839
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
7840
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(CardHeader, { className: "px-6", children: [
7841
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
7388
7842
  brandBlock
7389
7843
  ] }),
7390
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
7844
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
7391
7845
  ] })
7392
7846
  }
7393
7847
  );
7394
7848
  }
7395
7849
 
7396
- // src/layout/basic/ShadcnLandingLayout.tsx
7397
- var import_jsx_runtime130 = require("react/jsx-runtime");
7398
- function ShadcnLandingLayout({
7850
+ // src/layout/basic/LandingLayout.tsx
7851
+ var import_jsx_runtime132 = require("react/jsx-runtime");
7852
+ function LandingLayout({
7399
7853
  navbar,
7400
7854
  footer,
7401
7855
  children
7402
7856
  }) {
7403
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
7857
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
7404
7858
  "div",
7405
7859
  {
7406
7860
  "data-slot": "landing-layout",
7407
7861
  className: "flex min-h-screen flex-col bg-background text-foreground",
7408
7862
  children: [
7409
- navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7863
+ navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7410
7864
  "header",
7411
7865
  {
7412
7866
  "data-slot": "landing-navbar",
7413
- className: "border-b border-border bg-background",
7867
+ className: "border-b border-border bg-card",
7414
7868
  children: navbar
7415
7869
  }
7416
7870
  ),
7417
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
7418
- footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7871
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
7872
+ footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
7419
7873
  "footer",
7420
7874
  {
7421
7875
  "data-slot": "landing-footer",
@@ -7430,15 +7884,16 @@ function ShadcnLandingLayout({
7430
7884
 
7431
7885
  // src/layout/registry.ts
7432
7886
  var import_core3 = require("@pactor-app/core");
7433
- function registerShadcnLayouts(registry) {
7434
- registry.register("admin", ShadcnAdminLayout);
7435
- registry.register("blank", ShadcnBlankLayout);
7436
- registry.register("login", ShadcnLoginLayout);
7437
- registry.register("landing", ShadcnLandingLayout);
7438
- }
7439
- function createShadcnLayoutRegistry() {
7887
+ function registerBuiltinLayouts(registry) {
7888
+ registry.register("admin", AdminLayout);
7889
+ registry.register("blank", BlankLayout);
7890
+ registry.register("login", LoginLayout);
7891
+ registry.register("landing", LandingLayout);
7892
+ registry.register("chat", ChatLayout);
7893
+ }
7894
+ function createLayoutRegistry() {
7440
7895
  const registry = new import_core3.Registry("LayoutRegistry");
7441
- registerShadcnLayouts(registry);
7896
+ registerBuiltinLayouts(registry);
7442
7897
  return registry;
7443
7898
  }
7444
7899
  function resolveLayout(registry, type) {
@@ -7447,7 +7902,7 @@ function resolveLayout(registry, type) {
7447
7902
  console.warn(
7448
7903
  `[pactor-layout] unknown layout type "${type}", fallback to BlankLayout`
7449
7904
  );
7450
- return ShadcnBlankLayout;
7905
+ return BlankLayout;
7451
7906
  }
7452
7907
  return component;
7453
7908
  }
@@ -7621,9 +8076,9 @@ function isRecord(value) {
7621
8076
 
7622
8077
  // src/interaction/provider.tsx
7623
8078
  var import_runtime22 = require("@pactor-app/runtime");
7624
- var import_react28 = require("react");
8079
+ var import_react30 = require("react");
7625
8080
  var import_react_dom = require("react-dom");
7626
- var import_jsx_runtime131 = require("react/jsx-runtime");
8081
+ var import_jsx_runtime133 = require("react/jsx-runtime");
7627
8082
  var TOAST_DURATION = 3e3;
7628
8083
  var toastTypeClass = {
7629
8084
  success: "border-l-4 border-l-success",
@@ -7631,14 +8086,14 @@ var toastTypeClass = {
7631
8086
  info: "border-l-4 border-l-info",
7632
8087
  warning: "border-l-4 border-l-warning"
7633
8088
  };
7634
- function ShadcnInteractionProvider({
8089
+ function InteractionProvider({
7635
8090
  bridge,
7636
8091
  children
7637
8092
  }) {
7638
- const [confirmState, setConfirmState] = (0, import_react28.useState)(null);
7639
- const [toasts, setToasts] = (0, import_react28.useState)([]);
8093
+ const [confirmState, setConfirmState] = (0, import_react30.useState)(null);
8094
+ const [toasts, setToasts] = (0, import_react30.useState)([]);
7640
8095
  const { t } = (0, import_runtime22.useI18n)();
7641
- const { modal, message } = (0, import_react28.useMemo)(() => {
8096
+ const { modal, message } = (0, import_react30.useMemo)(() => {
7642
8097
  const pushToast = (type, content) => {
7643
8098
  const id = Date.now() + Math.random();
7644
8099
  setToasts((prev) => [...prev, { id, type, content }]);
@@ -7659,7 +8114,7 @@ function ShadcnInteractionProvider({
7659
8114
  };
7660
8115
  return { modal: modalImpl, message: messageImpl };
7661
8116
  }, []);
7662
- (0, import_react28.useEffect)(() => {
8117
+ (0, import_react30.useEffect)(() => {
7663
8118
  bridge.modal = modal;
7664
8119
  bridge.message = message;
7665
8120
  return () => {
@@ -7677,11 +8132,11 @@ function ShadcnInteractionProvider({
7677
8132
  setConfirmState(null);
7678
8133
  state?.onCancel?.();
7679
8134
  };
7680
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
8135
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
7681
8136
  children,
7682
8137
  typeof document !== "undefined" && (0, import_react_dom.createPortal)(
7683
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
7684
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8138
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
8139
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7685
8140
  Dialog,
7686
8141
  {
7687
8142
  open: confirmState !== null,
@@ -7690,29 +8145,29 @@ function ShadcnInteractionProvider({
7690
8145
  handleCancel();
7691
8146
  }
7692
8147
  },
7693
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
7694
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(DialogHeader, { children: [
7695
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
7696
- confirmState?.content !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8148
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
8149
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(DialogHeader, { children: [
8150
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
8151
+ confirmState?.content !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7697
8152
  DialogDescription,
7698
8153
  {
7699
- render: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { children: confirmState.content })
8154
+ render: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { children: confirmState.content })
7700
8155
  }
7701
8156
  )
7702
8157
  ] }),
7703
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(DialogFooter, { children: [
7704
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Button, { type: "button", variant: "outline", onClick: handleCancel, children: t("pactor.alertDialog.cancel") }),
7705
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Button, { type: "button", onClick: handleOk, children: t("pactor.alertDialog.confirm") })
8158
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(DialogFooter, { children: [
8159
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Button, { type: "button", variant: "outline", onClick: handleCancel, children: t("pactor.alertDialog.cancel") }),
8160
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Button, { type: "button", onClick: handleOk, children: t("pactor.alertDialog.confirm") })
7706
8161
  ] })
7707
8162
  ] })
7708
8163
  }
7709
8164
  ),
7710
- toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8165
+ toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7711
8166
  "div",
7712
8167
  {
7713
8168
  "data-slot": "toast-container",
7714
8169
  className: "fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2",
7715
- children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8170
+ children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7716
8171
  "div",
7717
8172
  {
7718
8173
  "data-slot": "toast",
@@ -7737,21 +8192,21 @@ function ShadcnInteractionProvider({
7737
8192
  // src/interaction/host.tsx
7738
8193
  var import_lucide_react26 = require("lucide-react");
7739
8194
  var import_runtime23 = require("@pactor-app/runtime");
7740
- var import_react29 = require("react");
7741
- var import_jsx_runtime132 = require("react/jsx-runtime");
8195
+ var import_react31 = require("react");
8196
+ var import_jsx_runtime134 = require("react/jsx-runtime");
7742
8197
  function toCssWidth(width) {
7743
8198
  if (width === void 0) {
7744
8199
  return void 0;
7745
8200
  }
7746
8201
  return typeof width === "number" ? `${width}px` : width;
7747
8202
  }
7748
- function ShadcnOverlayHost({ manager, resolvePage }) {
8203
+ function OverlayHost({ manager, resolvePage }) {
7749
8204
  const renderer = (0, import_runtime23.useRenderer)();
7750
- const stack = (0, import_react29.useSyncExternalStore)(
8205
+ const stack = (0, import_react31.useSyncExternalStore)(
7751
8206
  (onChange) => manager.subscribe(onChange),
7752
8207
  () => manager.stack()
7753
8208
  );
7754
- (0, import_react29.useSyncExternalStore)(
8209
+ (0, import_react31.useSyncExternalStore)(
7755
8210
  (onChange) => {
7756
8211
  const offState = renderer.context.state.subscribe(onChange);
7757
8212
  const offData = renderer.context.data.subscribe(onChange);
@@ -7762,7 +8217,7 @@ function ShadcnOverlayHost({ manager, resolvePage }) {
7762
8217
  },
7763
8218
  () => `${renderer.context.state.getVersion()}:${renderer.context.data.getVersion()}`
7764
8219
  );
7765
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_jsx_runtime132.Fragment, { children: stack.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8220
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children: stack.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7766
8221
  OverlayEntryView,
7767
8222
  {
7768
8223
  entry,
@@ -7788,7 +8243,7 @@ function OverlayEntryView({
7788
8243
  parent: manager.parentScopeOf(entry.id)
7789
8244
  });
7790
8245
  } else if (entry.page) {
7791
- body = /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8246
+ body = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7792
8247
  PageOverlayBody,
7793
8248
  {
7794
8249
  entry,
@@ -7798,9 +8253,9 @@ function OverlayEntryView({
7798
8253
  );
7799
8254
  }
7800
8255
  if (entry.type === "drawer") {
7801
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, children: body });
8256
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, children: body });
7802
8257
  }
7803
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8258
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7804
8259
  Dialog,
7805
8260
  {
7806
8261
  open: true,
@@ -7809,7 +8264,7 @@ function OverlayEntryView({
7809
8264
  handleCancel();
7810
8265
  }
7811
8266
  },
7812
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8267
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7813
8268
  DialogContent,
7814
8269
  {
7815
8270
  "data-slot": "overlay-modal",
@@ -7817,25 +8272,25 @@ function OverlayEntryView({
7817
8272
  style: entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) },
7818
8273
  showCloseButton: false,
7819
8274
  children: [
7820
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(DialogHeader, { children: [
7821
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DialogTitle, { children: entry.title ?? "" }),
7822
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8275
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogHeader, { children: [
8276
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DialogTitle, { children: entry.title ?? "" }),
8277
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7823
8278
  DialogClose,
7824
8279
  {
7825
- render: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8280
+ render: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7826
8281
  "button",
7827
8282
  {
7828
8283
  type: "button",
7829
8284
  "data-slot": "overlay-modal-close",
7830
8285
  "aria-label": t("pactor.overlay.close"),
7831
8286
  className: "absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",
7832
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_lucide_react26.XIcon, { className: "size-4" })
8287
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react26.XIcon, { className: "size-4" })
7833
8288
  }
7834
8289
  )
7835
8290
  }
7836
8291
  )
7837
8292
  ] }),
7838
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { "data-slot": "overlay-modal-body", children: body })
8293
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { "data-slot": "overlay-modal-body", children: body })
7839
8294
  ]
7840
8295
  }
7841
8296
  )
@@ -7849,7 +8304,7 @@ function ShadcnDrawerView({
7849
8304
  }) {
7850
8305
  const { t } = (0, import_runtime23.useI18n)();
7851
8306
  const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
7852
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8307
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7853
8308
  Drawer,
7854
8309
  {
7855
8310
  direction: "right",
@@ -7859,34 +8314,34 @@ function ShadcnDrawerView({
7859
8314
  onCancel();
7860
8315
  }
7861
8316
  },
7862
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8317
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7863
8318
  DrawerContent,
7864
8319
  {
7865
8320
  "data-slot": "drawer-panel",
7866
8321
  className: cn(entry.width !== void 0 && "sm:max-w-none"),
7867
8322
  style: panelStyle,
7868
8323
  children: [
7869
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8324
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
7870
8325
  DrawerHeader,
7871
8326
  {
7872
8327
  "data-slot": "drawer-header",
7873
8328
  className: "flex flex-row items-center justify-between border-b border-border px-6 py-4",
7874
8329
  children: [
7875
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DrawerTitle, { className: "text-lg", children: entry.title ?? "" }),
7876
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8330
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerTitle, { className: "text-lg", children: entry.title ?? "" }),
8331
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7877
8332
  "button",
7878
8333
  {
7879
8334
  type: "button",
7880
8335
  "data-slot": "drawer-close",
7881
8336
  "aria-label": t("pactor.overlay.close"),
7882
8337
  className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",
7883
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_lucide_react26.XIcon, { className: "size-4" })
8338
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react26.XIcon, { className: "size-4" })
7884
8339
  }
7885
8340
  ) })
7886
8341
  ]
7887
8342
  }
7888
8343
  ),
7889
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children })
8344
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children })
7890
8345
  ]
7891
8346
  }
7892
8347
  )
@@ -7898,13 +8353,13 @@ function PageOverlayBody({
7898
8353
  renderer,
7899
8354
  resolvePage
7900
8355
  }) {
7901
- const [child, setChild] = (0, import_react29.useState)(null);
7902
- const [error, setError] = (0, import_react29.useState)(null);
7903
- (0, import_react29.useEffect)(() => {
8356
+ const [child, setChild] = (0, import_react31.useState)(null);
8357
+ const [error, setError] = (0, import_react31.useState)(null);
8358
+ (0, import_react31.useEffect)(() => {
7904
8359
  if (!resolvePage) {
7905
8360
  setError(
7906
8361
  new Error(
7907
- `[@pactor-app/ui] page overlay\uFF08pageId: "${entry.page?.pageId}"\uFF09\u9700\u8981 ShadcnOverlayHost \u6CE8\u5165 resolvePage`
8362
+ `[@pactor-app/ui] page overlay\uFF08pageId: "${entry.page?.pageId}"\uFF09\u9700\u8981 OverlayHost \u6CE8\u5165 resolvePage`
7908
8363
  )
7909
8364
  );
7910
8365
  return;
@@ -7942,31 +8397,23 @@ function PageOverlayBody({
7942
8397
  };
7943
8398
  }, [entry.id]);
7944
8399
  if (error) {
7945
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { role: "alert", children: error.message });
8400
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { role: "alert", children: error.message });
7946
8401
  }
7947
8402
  if (!child) {
7948
8403
  return null;
7949
8404
  }
7950
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_runtime23.PageRuntimeView, { runtime: child });
8405
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_runtime23.PageRuntimeView, { runtime: child });
7951
8406
  }
7952
-
7953
- // src/index.ts
7954
- var shadcnUiKit = {
7955
- componentRegistry: createShadcnComponentRegistry,
7956
- layoutRegistry: createShadcnLayoutRegistry,
7957
- interactionKit: {
7958
- Provider: ShadcnInteractionProvider,
7959
- OverlayHost: ShadcnOverlayHost
7960
- }
7961
- };
7962
8407
  // Annotate the CommonJS export names for ESM import in node:
7963
8408
  0 && (module.exports = {
7964
8409
  Accordion,
8410
+ AdminLayout,
7965
8411
  Alert,
7966
8412
  AlertDialog,
7967
8413
  AspectRatio,
7968
8414
  Avatar,
7969
8415
  Badge,
8416
+ BlankLayout,
7970
8417
  Breadcrumb,
7971
8418
  Button,
7972
8419
  ButtonGroup,
@@ -7974,6 +8421,8 @@ var shadcnUiKit = {
7974
8421
  Card,
7975
8422
  Carousel,
7976
8423
  Chart,
8424
+ ChatInput,
8425
+ ChatLayout,
7977
8426
  Checkbox,
7978
8427
  Collapsible,
7979
8428
  Combobox,
@@ -7997,15 +8446,19 @@ var shadcnUiKit = {
7997
8446
  Input,
7998
8447
  InputGroup,
7999
8448
  InputOTP,
8449
+ InteractionProvider,
8000
8450
  Item,
8001
8451
  Kbd,
8002
8452
  Label,
8453
+ LandingLayout,
8003
8454
  Layout,
8004
8455
  Link,
8456
+ LoginLayout,
8005
8457
  Menu,
8006
8458
  Menubar,
8007
8459
  NavigationMenu,
8008
8460
  OVERLAY_CANCEL_PAYLOAD,
8461
+ OverlayHost,
8009
8462
  OverlayManager,
8010
8463
  Page,
8011
8464
  Pagination,
@@ -8017,12 +8470,6 @@ var shadcnUiKit = {
8017
8470
  ScrollArea,
8018
8471
  Select,
8019
8472
  Separator,
8020
- ShadcnAdminLayout,
8021
- ShadcnBlankLayout,
8022
- ShadcnInteractionProvider,
8023
- ShadcnLandingLayout,
8024
- ShadcnLoginLayout,
8025
- ShadcnOverlayHost,
8026
8473
  Sheet,
8027
8474
  Sidebar,
8028
8475
  Sider,
@@ -8040,18 +8487,17 @@ var shadcnUiKit = {
8040
8487
  ToggleGroup,
8041
8488
  Tooltip,
8042
8489
  Typography,
8490
+ builtinComponents,
8043
8491
  collectDefaultOpenKeys,
8044
- createShadcnComponentRegistry,
8045
- createShadcnLayoutRegistry,
8492
+ createComponentRegistry,
8493
+ createLayoutRegistry,
8046
8494
  createUiBridge,
8047
8495
  findMenuChain,
8048
8496
  normalizeIconName,
8497
+ registerBuiltinComponents,
8498
+ registerBuiltinLayouts,
8049
8499
  registerInteractionActions,
8050
- registerShadcnComponents,
8051
- registerShadcnLayouts,
8052
8500
  resolveLayout,
8053
- shadcnComponents,
8054
- shadcnUiKit,
8055
8501
  useFormContext,
8056
8502
  useSidebarDrawer
8057
8503
  });