@bizapps/ui 1.0.0 → 1.2.2
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/README.md +235 -137
- package/dist/main.cjs +1381 -465
- package/dist/main.cjs.map +1 -1
- package/dist/main.css +1 -1
- package/dist/main.d.cts +325 -241
- package/dist/main.d.ts +325 -241
- package/dist/main.js +1343 -467
- package/dist/main.js.map +1 -1
- package/package.json +15 -12
package/dist/main.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { SearchIcon, BellIcon, CircleHelpIcon,
|
|
2
|
+
import { SearchIcon, BellIcon, CircleHelpIcon, ChevronDownIcon, ChevronLeftIcon, MoreHorizontalIcon, ChevronRightIcon, MinusIcon, CheckIcon, LoaderCircle, ChevronUpIcon, X, ChevronLeft, ChevronRight, ExternalLinkIcon, XIcon, ChevronsUpDownIcon, UploadIcon, Loader2Icon, LoaderIcon, PipetteIcon, CalendarIcon, MenuIcon, Pencil, Clock, Funnel, ArrowUp, ArrowDown, ArrowUpDown, Ellipsis, Rows2, Eye, Search, House, Plane, Wallet, LayoutDashboardIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, CircleCheckIcon } from 'lucide-react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
7
|
-
import { createContext, memo, useRef, useState, useMemo, useCallback, useEffect, forwardRef, Fragment,
|
|
8
|
-
import {
|
|
9
|
-
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
7
|
+
import { createContext, memo, useRef, useState, useMemo, useCallback, useEffect, forwardRef, Fragment, useId, useContext, useLayoutEffect } from 'react';
|
|
8
|
+
import { Avatar as Avatar$1, Checkbox as Checkbox$1, Slot, Select as Select$1, Label as Label$1, Toggle as Toggle$1, ToggleGroup, Separator as Separator$1, Progress as Progress$1, Slider as Slider$1, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1, Popover as Popover$1, Dialog as Dialog$1, AlertDialog as AlertDialog$1, Accordion as Accordion$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, NavigationMenu as NavigationMenu$1 } from 'radix-ui';
|
|
10
9
|
import { isSameDay, isToday, format, addDays } from 'date-fns';
|
|
11
10
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
12
11
|
import { motion, AnimatePresence } from 'motion/react';
|
|
13
12
|
import { Command } from 'cmdk';
|
|
14
13
|
import { useDropzone } from 'react-dropzone';
|
|
15
14
|
import Color from 'color';
|
|
15
|
+
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
16
16
|
import { ScheduleXCalendar } from '@schedule-x/react';
|
|
17
17
|
import { createCalendar, viewMonthGrid, viewWeek, viewDay, viewMonthAgenda } from '@schedule-x/calendar';
|
|
18
18
|
import { createEventsServicePlugin } from '@schedule-x/events-service';
|
|
@@ -452,174 +452,6 @@ function Button({
|
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
454
|
}
|
|
455
|
-
function Calendar({
|
|
456
|
-
className,
|
|
457
|
-
classNames,
|
|
458
|
-
showOutsideDays = true,
|
|
459
|
-
captionLayout = "dropdown",
|
|
460
|
-
buttonVariant = "ghost",
|
|
461
|
-
locale,
|
|
462
|
-
formatters,
|
|
463
|
-
components,
|
|
464
|
-
fromYear,
|
|
465
|
-
toYear,
|
|
466
|
-
...props
|
|
467
|
-
}) {
|
|
468
|
-
const defaultClassNames = getDefaultClassNames();
|
|
469
|
-
return /* @__PURE__ */ jsx(
|
|
470
|
-
DayPicker,
|
|
471
|
-
{
|
|
472
|
-
showOutsideDays,
|
|
473
|
-
className: cn(
|
|
474
|
-
"group/calendar bg-background p-3 font-sans [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
475
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
476
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
477
|
-
className
|
|
478
|
-
),
|
|
479
|
-
captionLayout,
|
|
480
|
-
startMonth: new Date(fromYear ?? 1900, 0),
|
|
481
|
-
endMonth: new Date(toYear ?? 2100, 11),
|
|
482
|
-
locale,
|
|
483
|
-
formatters: {
|
|
484
|
-
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
485
|
-
...formatters
|
|
486
|
-
},
|
|
487
|
-
classNames: {
|
|
488
|
-
root: cn("w-fit", defaultClassNames.root),
|
|
489
|
-
months: cn("relative flex flex-col gap-3 md:flex-row", defaultClassNames.months),
|
|
490
|
-
month: cn("flex w-full flex-col gap-3", defaultClassNames.month),
|
|
491
|
-
nav: cn(
|
|
492
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-2",
|
|
493
|
-
defaultClassNames.nav
|
|
494
|
-
),
|
|
495
|
-
button_previous: cn(
|
|
496
|
-
buttonVariants({ variant: buttonVariant }),
|
|
497
|
-
"size-7 p-0 select-none opacity-50 aria-disabled:opacity-30 transition-opacity duration-150 hover:opacity-100",
|
|
498
|
-
defaultClassNames.button_previous
|
|
499
|
-
),
|
|
500
|
-
button_next: cn(
|
|
501
|
-
buttonVariants({ variant: buttonVariant }),
|
|
502
|
-
"size-7 p-0 select-none opacity-50 aria-disabled:opacity-30 transition-opacity duration-150 hover:opacity-100",
|
|
503
|
-
defaultClassNames.button_next
|
|
504
|
-
),
|
|
505
|
-
month_caption: cn(
|
|
506
|
-
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size) tracking-tight",
|
|
507
|
-
defaultClassNames.month_caption
|
|
508
|
-
),
|
|
509
|
-
dropdowns: cn(
|
|
510
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-semibold",
|
|
511
|
-
defaultClassNames.dropdowns
|
|
512
|
-
),
|
|
513
|
-
dropdown_root: cn(
|
|
514
|
-
"relative rounded-(--cell-radius)",
|
|
515
|
-
defaultClassNames.dropdown_root
|
|
516
|
-
),
|
|
517
|
-
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
518
|
-
caption_label: cn(
|
|
519
|
-
"font-semibold select-none",
|
|
520
|
-
captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
521
|
-
defaultClassNames.caption_label
|
|
522
|
-
),
|
|
523
|
-
weekdays: cn("flex gap-1", defaultClassNames.weekdays),
|
|
524
|
-
weekday: cn(
|
|
525
|
-
"flex-1 rounded-(--cell-radius) text-[0.75rem] font-semibold text-muted-foreground/70 select-none tracking-wide",
|
|
526
|
-
defaultClassNames.weekday
|
|
527
|
-
),
|
|
528
|
-
week: cn("mt-2 flex w-full gap-1", defaultClassNames.week),
|
|
529
|
-
week_number_header: cn(
|
|
530
|
-
"w-(--cell-size) select-none",
|
|
531
|
-
defaultClassNames.week_number_header
|
|
532
|
-
),
|
|
533
|
-
week_number: cn(
|
|
534
|
-
"text-[0.75rem] text-muted-foreground/50 select-none",
|
|
535
|
-
defaultClassNames.week_number
|
|
536
|
-
),
|
|
537
|
-
day: cn(
|
|
538
|
-
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
539
|
-
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
540
|
-
defaultClassNames.day
|
|
541
|
-
),
|
|
542
|
-
range_start: cn(
|
|
543
|
-
"relative isolate z-0 rounded-l-md bg-primary/8 after:absolute after:inset-y-0 after:right-0 after:w-3 after:bg-primary/8",
|
|
544
|
-
defaultClassNames.range_start
|
|
545
|
-
),
|
|
546
|
-
range_middle: cn("rounded-none bg-primary/8", defaultClassNames.range_middle),
|
|
547
|
-
range_end: cn(
|
|
548
|
-
"relative isolate z-0 rounded-r-md bg-primary/8 after:absolute after:inset-y-0 after:left-0 after:w-3 after:bg-primary/8",
|
|
549
|
-
defaultClassNames.range_end
|
|
550
|
-
),
|
|
551
|
-
today: cn("rounded-md bg-accent text-accent-foreground", defaultClassNames.today),
|
|
552
|
-
outside: cn(
|
|
553
|
-
"text-muted-foreground/50 aria-selected:text-muted-foreground/50",
|
|
554
|
-
defaultClassNames.outside
|
|
555
|
-
),
|
|
556
|
-
disabled: cn("text-muted-foreground/40 opacity-50", defaultClassNames.disabled),
|
|
557
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
558
|
-
...classNames
|
|
559
|
-
},
|
|
560
|
-
components: {
|
|
561
|
-
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
562
|
-
return /* @__PURE__ */ jsx(
|
|
563
|
-
"div",
|
|
564
|
-
{
|
|
565
|
-
"data-slot": "calendar",
|
|
566
|
-
ref: rootRef,
|
|
567
|
-
className: cn(className2),
|
|
568
|
-
...props2
|
|
569
|
-
}
|
|
570
|
-
);
|
|
571
|
-
},
|
|
572
|
-
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
573
|
-
if (orientation === "left") {
|
|
574
|
-
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
575
|
-
}
|
|
576
|
-
if (orientation === "right") {
|
|
577
|
-
return /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("size-4", className2), ...props2 });
|
|
578
|
-
}
|
|
579
|
-
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
580
|
-
},
|
|
581
|
-
DayButton: ({ ...props2 }) => /* @__PURE__ */ jsx(CalendarDayButton, { locale, ...props2 }),
|
|
582
|
-
WeekNumber: ({ children, ...props2 }) => {
|
|
583
|
-
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
584
|
-
},
|
|
585
|
-
...components
|
|
586
|
-
},
|
|
587
|
-
...props
|
|
588
|
-
}
|
|
589
|
-
);
|
|
590
|
-
}
|
|
591
|
-
function CalendarDayButton({
|
|
592
|
-
className,
|
|
593
|
-
day,
|
|
594
|
-
modifiers,
|
|
595
|
-
locale,
|
|
596
|
-
...props
|
|
597
|
-
}) {
|
|
598
|
-
const defaultClassNames = getDefaultClassNames();
|
|
599
|
-
const ref = useRef(null);
|
|
600
|
-
useEffect(() => {
|
|
601
|
-
if (modifiers.focused) ref.current?.focus();
|
|
602
|
-
}, [modifiers.focused]);
|
|
603
|
-
return /* @__PURE__ */ jsx(
|
|
604
|
-
Button,
|
|
605
|
-
{
|
|
606
|
-
ref,
|
|
607
|
-
variant: "ghost",
|
|
608
|
-
size: "icon-sm",
|
|
609
|
-
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
610
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
611
|
-
"data-range-start": modifiers.range_start,
|
|
612
|
-
"data-range-end": modifiers.range_end,
|
|
613
|
-
"data-range-middle": modifiers.range_middle,
|
|
614
|
-
className: cn(
|
|
615
|
-
"group-data-[focused=true]/day:ring-primary/40 data-[range-end=true]:!bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:!bg-primary/8 data-[range-middle=true]:text-foreground data-[range-start=true]:!bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:!bg-primary data-[selected-single=true]:text-primary-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 !rounded-md border-0 !bg-transparent leading-none font-normal transition-colors duration-150 group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:rounded-md group-data-[focused=true]/day:ring-[2px] hover:!bg-transparent data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[selected-single=true]:rounded-md [&>span]:text-xs [&>span]:font-medium [&>span]:opacity-75",
|
|
616
|
-
defaultClassNames.day,
|
|
617
|
-
className
|
|
618
|
-
),
|
|
619
|
-
...props
|
|
620
|
-
}
|
|
621
|
-
);
|
|
622
|
-
}
|
|
623
455
|
function useControllableState({
|
|
624
456
|
prop,
|
|
625
457
|
defaultProp,
|
|
@@ -1105,6 +937,22 @@ function Input({ className, type, ...props }) {
|
|
|
1105
937
|
}
|
|
1106
938
|
);
|
|
1107
939
|
}
|
|
940
|
+
function Label({ className, ...props }) {
|
|
941
|
+
return /* @__PURE__ */ jsx(
|
|
942
|
+
Label$1.Root,
|
|
943
|
+
{
|
|
944
|
+
"data-slot": "label",
|
|
945
|
+
className: cn(
|
|
946
|
+
"text-foreground text-sm leading-6 font-medium transition-colors select-none",
|
|
947
|
+
"group-has-disabled/field:cursor-not-allowed group-has-disabled/field:opacity-50",
|
|
948
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
949
|
+
"aria-invalid:text-destructive dark:aria-invalid:text-destructive/90",
|
|
950
|
+
className
|
|
951
|
+
),
|
|
952
|
+
...props
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
}
|
|
1108
956
|
|
|
1109
957
|
// src/utils/urlSecurity.ts
|
|
1110
958
|
var SAFE_HREF_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:", "mailto:", "tel:"]);
|
|
@@ -1580,7 +1428,7 @@ var progressVariants = cva("relative flex w-full items-center overflow-x-hidden
|
|
|
1580
1428
|
size: "md"
|
|
1581
1429
|
}
|
|
1582
1430
|
});
|
|
1583
|
-
var progressIndicatorVariants = cva("size-full flex-1 transition-all", {
|
|
1431
|
+
var progressIndicatorVariants = cva("size-full flex-1 transition-all rounded-[5px]", {
|
|
1584
1432
|
variants: {
|
|
1585
1433
|
variant: {
|
|
1586
1434
|
default: "bg-[var(--color-main-blue-primary)]",
|
|
@@ -4139,49 +3987,217 @@ var ColorPickerPresets = ({ colors, className, ...props }) => {
|
|
|
4139
3987
|
}) });
|
|
4140
3988
|
};
|
|
4141
3989
|
ColorPickerPresets.displayName = "ColorPickerPresets";
|
|
4142
|
-
function
|
|
4143
|
-
mode = "single",
|
|
4144
|
-
selected,
|
|
4145
|
-
onSelect,
|
|
4146
|
-
placeholder = "Pick a date",
|
|
4147
|
-
disabled = false,
|
|
3990
|
+
function Calendar({
|
|
4148
3991
|
className,
|
|
4149
|
-
|
|
4150
|
-
|
|
3992
|
+
classNames,
|
|
3993
|
+
showOutsideDays = true,
|
|
3994
|
+
captionLayout = "dropdown",
|
|
3995
|
+
buttonVariant = "ghost",
|
|
3996
|
+
locale,
|
|
3997
|
+
formatters,
|
|
3998
|
+
components,
|
|
3999
|
+
fromYear,
|
|
4000
|
+
toYear,
|
|
4001
|
+
...props
|
|
4151
4002
|
}) {
|
|
4152
|
-
const
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4003
|
+
const defaultClassNames = getDefaultClassNames();
|
|
4004
|
+
return /* @__PURE__ */ jsx(
|
|
4005
|
+
DayPicker,
|
|
4006
|
+
{
|
|
4007
|
+
showOutsideDays,
|
|
4008
|
+
className: cn(
|
|
4009
|
+
"group/calendar bg-background p-3 font-sans [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
4010
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
4011
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
4012
|
+
className
|
|
4013
|
+
),
|
|
4014
|
+
captionLayout,
|
|
4015
|
+
startMonth: new Date(fromYear ?? 1900, 0),
|
|
4016
|
+
endMonth: new Date(toYear ?? 2100, 11),
|
|
4017
|
+
locale,
|
|
4018
|
+
formatters: {
|
|
4019
|
+
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
4020
|
+
...formatters
|
|
4021
|
+
},
|
|
4022
|
+
classNames: {
|
|
4023
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
4024
|
+
months: cn("relative flex flex-col gap-3 md:flex-row", defaultClassNames.months),
|
|
4025
|
+
month: cn("flex w-full flex-col gap-3", defaultClassNames.month),
|
|
4026
|
+
nav: cn(
|
|
4027
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-2",
|
|
4028
|
+
defaultClassNames.nav
|
|
4176
4029
|
),
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4030
|
+
button_previous: cn(
|
|
4031
|
+
buttonVariants({ variant: buttonVariant }),
|
|
4032
|
+
"size-7 p-0 select-none opacity-50 aria-disabled:opacity-30 transition-opacity duration-150 hover:opacity-100",
|
|
4033
|
+
defaultClassNames.button_previous
|
|
4034
|
+
),
|
|
4035
|
+
button_next: cn(
|
|
4036
|
+
buttonVariants({ variant: buttonVariant }),
|
|
4037
|
+
"size-7 p-0 select-none opacity-50 aria-disabled:opacity-30 transition-opacity duration-150 hover:opacity-100",
|
|
4038
|
+
defaultClassNames.button_next
|
|
4039
|
+
),
|
|
4040
|
+
month_caption: cn(
|
|
4041
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size) tracking-tight",
|
|
4042
|
+
defaultClassNames.month_caption
|
|
4043
|
+
),
|
|
4044
|
+
dropdowns: cn(
|
|
4045
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-semibold",
|
|
4046
|
+
defaultClassNames.dropdowns
|
|
4047
|
+
),
|
|
4048
|
+
dropdown_root: cn(
|
|
4049
|
+
"relative rounded-(--cell-radius)",
|
|
4050
|
+
defaultClassNames.dropdown_root
|
|
4051
|
+
),
|
|
4052
|
+
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
4053
|
+
caption_label: cn(
|
|
4054
|
+
"font-semibold select-none",
|
|
4055
|
+
captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
4056
|
+
defaultClassNames.caption_label
|
|
4057
|
+
),
|
|
4058
|
+
weekdays: cn("flex gap-1", defaultClassNames.weekdays),
|
|
4059
|
+
weekday: cn(
|
|
4060
|
+
"flex-1 rounded-(--cell-radius) text-[0.75rem] font-semibold text-muted-foreground/70 select-none tracking-wide",
|
|
4061
|
+
defaultClassNames.weekday
|
|
4062
|
+
),
|
|
4063
|
+
week: cn("mt-2 flex w-full gap-1", defaultClassNames.week),
|
|
4064
|
+
week_number_header: cn(
|
|
4065
|
+
"w-(--cell-size) select-none",
|
|
4066
|
+
defaultClassNames.week_number_header
|
|
4067
|
+
),
|
|
4068
|
+
week_number: cn(
|
|
4069
|
+
"text-[0.75rem] text-muted-foreground/50 select-none",
|
|
4070
|
+
defaultClassNames.week_number
|
|
4071
|
+
),
|
|
4072
|
+
day: cn(
|
|
4073
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
4074
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
4075
|
+
defaultClassNames.day
|
|
4076
|
+
),
|
|
4077
|
+
range_start: cn(
|
|
4078
|
+
"relative isolate z-0 rounded-l-md bg-primary/8 after:absolute after:inset-y-0 after:right-0 after:w-3 after:bg-primary/8",
|
|
4079
|
+
defaultClassNames.range_start
|
|
4080
|
+
),
|
|
4081
|
+
range_middle: cn("rounded-none bg-primary/8", defaultClassNames.range_middle),
|
|
4082
|
+
range_end: cn(
|
|
4083
|
+
"relative isolate z-0 rounded-r-md bg-primary/8 after:absolute after:inset-y-0 after:left-0 after:w-3 after:bg-primary/8",
|
|
4084
|
+
defaultClassNames.range_end
|
|
4085
|
+
),
|
|
4086
|
+
today: cn("rounded-md bg-accent text-accent-foreground", defaultClassNames.today),
|
|
4087
|
+
outside: cn(
|
|
4088
|
+
"text-muted-foreground/50 aria-selected:text-muted-foreground/50",
|
|
4089
|
+
defaultClassNames.outside
|
|
4090
|
+
),
|
|
4091
|
+
disabled: cn("text-muted-foreground/40 opacity-50", defaultClassNames.disabled),
|
|
4092
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
4093
|
+
...classNames
|
|
4094
|
+
},
|
|
4095
|
+
components: {
|
|
4096
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
4097
|
+
return /* @__PURE__ */ jsx(
|
|
4098
|
+
"div",
|
|
4099
|
+
{
|
|
4100
|
+
"data-slot": "calendar",
|
|
4101
|
+
ref: rootRef,
|
|
4102
|
+
className: cn(className2),
|
|
4103
|
+
...props2
|
|
4104
|
+
}
|
|
4105
|
+
);
|
|
4106
|
+
},
|
|
4107
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
4108
|
+
if (orientation === "left") {
|
|
4109
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
4110
|
+
}
|
|
4111
|
+
if (orientation === "right") {
|
|
4112
|
+
return /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("size-4", className2), ...props2 });
|
|
4113
|
+
}
|
|
4114
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
4115
|
+
},
|
|
4116
|
+
DayButton: ({ ...props2 }) => /* @__PURE__ */ jsx(CalendarDayButton, { locale, ...props2 }),
|
|
4117
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
4118
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
4119
|
+
},
|
|
4120
|
+
...components
|
|
4121
|
+
},
|
|
4122
|
+
...props
|
|
4123
|
+
}
|
|
4124
|
+
);
|
|
4125
|
+
}
|
|
4126
|
+
function CalendarDayButton({
|
|
4127
|
+
className,
|
|
4128
|
+
day,
|
|
4129
|
+
modifiers,
|
|
4130
|
+
locale,
|
|
4131
|
+
...props
|
|
4132
|
+
}) {
|
|
4133
|
+
const defaultClassNames = getDefaultClassNames();
|
|
4134
|
+
const ref = useRef(null);
|
|
4135
|
+
useEffect(() => {
|
|
4136
|
+
if (modifiers.focused) ref.current?.focus();
|
|
4137
|
+
}, [modifiers.focused]);
|
|
4138
|
+
return /* @__PURE__ */ jsx(
|
|
4139
|
+
Button,
|
|
4140
|
+
{
|
|
4141
|
+
ref,
|
|
4142
|
+
variant: "ghost",
|
|
4143
|
+
size: "icon-sm",
|
|
4144
|
+
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
4145
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
4146
|
+
"data-range-start": modifiers.range_start,
|
|
4147
|
+
"data-range-end": modifiers.range_end,
|
|
4148
|
+
"data-range-middle": modifiers.range_middle,
|
|
4149
|
+
className: cn(
|
|
4150
|
+
"group-data-[focused=true]/day:ring-primary/40 data-[range-end=true]:!bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:!bg-primary/8 data-[range-middle=true]:text-foreground data-[range-start=true]:!bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:!bg-primary data-[selected-single=true]:text-primary-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 !rounded-md border-0 !bg-transparent leading-none font-normal transition-colors duration-150 group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:rounded-md group-data-[focused=true]/day:ring-[2px] hover:!bg-transparent data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[selected-single=true]:rounded-md [&>span]:text-xs [&>span]:font-medium [&>span]:opacity-75",
|
|
4151
|
+
defaultClassNames.day,
|
|
4152
|
+
className
|
|
4153
|
+
),
|
|
4154
|
+
...props
|
|
4155
|
+
}
|
|
4156
|
+
);
|
|
4157
|
+
}
|
|
4158
|
+
function DatePicker({
|
|
4159
|
+
mode = "single",
|
|
4160
|
+
selected,
|
|
4161
|
+
onSelect,
|
|
4162
|
+
placeholder = "Pick a date",
|
|
4163
|
+
disabled = false,
|
|
4164
|
+
className,
|
|
4165
|
+
fromDate,
|
|
4166
|
+
toDate
|
|
4167
|
+
}) {
|
|
4168
|
+
const [open, setOpen] = useState(false);
|
|
4169
|
+
const label = useMemo(() => {
|
|
4170
|
+
if (mode === "range") {
|
|
4171
|
+
const range = selected;
|
|
4172
|
+
if (range?.from && range?.to)
|
|
4173
|
+
return `${format(range.from, "MMM d, yyyy")} \u2013 ${format(range.to, "MMM d, yyyy")}`;
|
|
4174
|
+
if (range?.from) return `${format(range.from, "MMM d, yyyy")} \u2013 \u2026`;
|
|
4175
|
+
return placeholder;
|
|
4176
|
+
}
|
|
4177
|
+
const date = selected;
|
|
4178
|
+
return date ? format(date, "MMM d, yyyy") : placeholder;
|
|
4179
|
+
}, [mode, selected, placeholder]);
|
|
4180
|
+
const hasValue = mode === "range" ? !!selected?.from : !!selected;
|
|
4181
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4182
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
4183
|
+
Button,
|
|
4184
|
+
{
|
|
4185
|
+
"data-slot": "date-picker-trigger",
|
|
4186
|
+
variant: "primary",
|
|
4187
|
+
disabled,
|
|
4188
|
+
className: cn(
|
|
4189
|
+
"w-60 justify-start gap-2 font-normal",
|
|
4190
|
+
!hasValue && "text-white",
|
|
4191
|
+
className
|
|
4192
|
+
),
|
|
4193
|
+
children: [
|
|
4194
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "size-4 shrink-0" }),
|
|
4195
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: label })
|
|
4196
|
+
]
|
|
4197
|
+
}
|
|
4198
|
+
) }),
|
|
4199
|
+
/* @__PURE__ */ jsx(PopoverContent, { "data-slot": "date-picker-content", className: "w-auto p-0", align: "start", children: mode === "range" ? /* @__PURE__ */ jsx(
|
|
4200
|
+
Calendar,
|
|
4185
4201
|
{
|
|
4186
4202
|
...{
|
|
4187
4203
|
mode: "range",
|
|
@@ -4334,6 +4350,7 @@ var Navbar = forwardRef(
|
|
|
4334
4350
|
notifications,
|
|
4335
4351
|
avatarSrc,
|
|
4336
4352
|
avatarFallback,
|
|
4353
|
+
showUtilityBar = true,
|
|
4337
4354
|
onNavLinkClick,
|
|
4338
4355
|
onSearchClick,
|
|
4339
4356
|
onHelpClick,
|
|
@@ -4405,7 +4422,7 @@ var Navbar = forwardRef(
|
|
|
4405
4422
|
] }),
|
|
4406
4423
|
/* @__PURE__ */ jsx("nav", { className: "ml-auto flex h-full items-center", children: navigationLinks.map((link, i) => /* @__PURE__ */ jsx(NavLinkItem, { link, onNavLinkClick }, i)) })
|
|
4407
4424
|
] }) }),
|
|
4408
|
-
/* @__PURE__ */ jsx("div", { className: "bg-background border-border border-b px-4 md:px-6", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-9 max-w-screen-2xl items-center justify-between", children: [
|
|
4425
|
+
showUtilityBar && /* @__PURE__ */ jsx("div", { className: "bg-background border-border border-b px-4 md:px-6", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex h-9 max-w-screen-2xl items-center justify-between", children: [
|
|
4409
4426
|
/* @__PURE__ */ jsx("nav", { className: "flex items-center", children: utilityLinks.map((link, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4410
4427
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "text-border mx-3 select-none", children: "|" }),
|
|
4411
4428
|
/* @__PURE__ */ jsx(
|
|
@@ -4728,220 +4745,723 @@ function CanNot({ permission, mode = "any", fallback = null, children }) {
|
|
|
4728
4745
|
return /* @__PURE__ */ jsx(Can, { permission, mode, negate: true, fallback, children });
|
|
4729
4746
|
}
|
|
4730
4747
|
CanNot.displayName = "CanNot";
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4748
|
+
function useMediaQuery(query) {
|
|
4749
|
+
const [matches, setMatches] = useState(false);
|
|
4750
|
+
useEffect(() => {
|
|
4751
|
+
if (typeof window === "undefined") return;
|
|
4752
|
+
const mql = window.matchMedia(query);
|
|
4753
|
+
setMatches(mql.matches);
|
|
4754
|
+
const handler = (e) => setMatches(e.matches);
|
|
4755
|
+
mql.addEventListener("change", handler);
|
|
4756
|
+
return () => mql.removeEventListener("change", handler);
|
|
4757
|
+
}, [query]);
|
|
4758
|
+
return matches;
|
|
4739
4759
|
}
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
"
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4760
|
+
|
|
4761
|
+
// src/hooks/use-mobile.ts
|
|
4762
|
+
function useIsMobile() {
|
|
4763
|
+
return useMediaQuery("(max-width: 767px)");
|
|
4764
|
+
}
|
|
4765
|
+
function Sheet({ ...props }) {
|
|
4766
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "sheet", ...props });
|
|
4767
|
+
}
|
|
4768
|
+
function SheetTrigger({ ...props }) {
|
|
4769
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
4770
|
+
}
|
|
4771
|
+
function SheetClose({ ...props }) {
|
|
4772
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", ...props });
|
|
4773
|
+
}
|
|
4774
|
+
function SheetPortal({ ...props }) {
|
|
4775
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "sheet-portal", ...props });
|
|
4776
|
+
}
|
|
4777
|
+
function SheetOverlay({
|
|
4778
|
+
className,
|
|
4779
|
+
...props
|
|
4780
|
+
}) {
|
|
4781
|
+
return /* @__PURE__ */ jsx(
|
|
4782
|
+
Dialog$1.Overlay,
|
|
4783
|
+
{
|
|
4784
|
+
"data-slot": "sheet-overlay",
|
|
4785
|
+
className: cn(
|
|
4786
|
+
"fixed inset-0 z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
4787
|
+
className
|
|
4788
|
+
),
|
|
4789
|
+
...props
|
|
4790
|
+
}
|
|
4791
|
+
);
|
|
4792
|
+
}
|
|
4793
|
+
function SheetContent({
|
|
4794
|
+
className,
|
|
4795
|
+
children,
|
|
4796
|
+
side = "right",
|
|
4797
|
+
showCloseButton = true,
|
|
4798
|
+
...props
|
|
4799
|
+
}) {
|
|
4800
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
4801
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
4802
|
+
/* @__PURE__ */ jsxs(
|
|
4803
|
+
Dialog$1.Content,
|
|
4784
4804
|
{
|
|
4785
|
-
|
|
4786
|
-
"data-
|
|
4805
|
+
"data-slot": "sheet-content",
|
|
4806
|
+
"data-side": side,
|
|
4787
4807
|
className: cn(
|
|
4788
|
-
"bg-
|
|
4789
|
-
open ? "w-64" : collapsible === "icon" ? "w-12" : "w-0 overflow-hidden",
|
|
4808
|
+
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-xl transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
4790
4809
|
className
|
|
4791
4810
|
),
|
|
4792
4811
|
...props,
|
|
4793
|
-
children
|
|
4812
|
+
children: [
|
|
4813
|
+
children,
|
|
4814
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4 bg-secondary", size: "icon-sm", children: [
|
|
4815
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
4816
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
4817
|
+
] }) })
|
|
4818
|
+
]
|
|
4794
4819
|
}
|
|
4795
|
-
)
|
|
4796
|
-
}
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
return /* @__PURE__ */ jsxs(
|
|
4802
|
-
Button,
|
|
4820
|
+
)
|
|
4821
|
+
] });
|
|
4822
|
+
}
|
|
4823
|
+
function SheetHeader({ className, ...props }) {
|
|
4824
|
+
return /* @__PURE__ */ jsx(
|
|
4825
|
+
"div",
|
|
4803
4826
|
{
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
className: cn("shrink-0", className),
|
|
4808
|
-
onClick: (e) => {
|
|
4809
|
-
onClick?.(e);
|
|
4810
|
-
setOpen(!open);
|
|
4811
|
-
},
|
|
4812
|
-
...props,
|
|
4813
|
-
children: [
|
|
4814
|
-
/* @__PURE__ */ jsx(Menu, { className: "size-4" }),
|
|
4815
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle sidebar" })
|
|
4816
|
-
]
|
|
4827
|
+
"data-slot": "sheet-header",
|
|
4828
|
+
className: cn("flex flex-col gap-1.5 p-6", className),
|
|
4829
|
+
...props
|
|
4817
4830
|
}
|
|
4818
4831
|
);
|
|
4819
|
-
}
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4832
|
+
}
|
|
4833
|
+
function SheetFooter({ className, ...props }) {
|
|
4834
|
+
return /* @__PURE__ */ jsx(
|
|
4823
4835
|
"div",
|
|
4824
4836
|
{
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
className: cn("flex shrink-0 flex-col gap-2 p-3", className),
|
|
4837
|
+
"data-slot": "sheet-footer",
|
|
4838
|
+
className: cn("mt-auto flex flex-col gap-2 p-6", className),
|
|
4828
4839
|
...props
|
|
4829
4840
|
}
|
|
4830
|
-
)
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
"
|
|
4840
|
-
className
|
|
4841
|
-
|
|
4842
|
-
|
|
4841
|
+
);
|
|
4842
|
+
}
|
|
4843
|
+
function SheetTitle({
|
|
4844
|
+
className,
|
|
4845
|
+
...props
|
|
4846
|
+
}) {
|
|
4847
|
+
return /* @__PURE__ */ jsx(
|
|
4848
|
+
Dialog$1.Title,
|
|
4849
|
+
{
|
|
4850
|
+
"data-slot": "sheet-title",
|
|
4851
|
+
className: cn("text-base font-medium text-foreground", className),
|
|
4852
|
+
...props
|
|
4853
|
+
}
|
|
4854
|
+
);
|
|
4855
|
+
}
|
|
4856
|
+
function SheetDescription({
|
|
4857
|
+
className,
|
|
4858
|
+
...props
|
|
4859
|
+
}) {
|
|
4860
|
+
return /* @__PURE__ */ jsx(
|
|
4861
|
+
Dialog$1.Description,
|
|
4862
|
+
{
|
|
4863
|
+
"data-slot": "sheet-description",
|
|
4864
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
4865
|
+
...props
|
|
4866
|
+
}
|
|
4867
|
+
);
|
|
4868
|
+
}
|
|
4869
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
4870
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4871
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
4872
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4873
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4874
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4875
|
+
var SidebarContext = createContext(null);
|
|
4876
|
+
function useSidebar() {
|
|
4877
|
+
const context = useContext(SidebarContext);
|
|
4878
|
+
if (!context) {
|
|
4879
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4843
4880
|
}
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4881
|
+
return context;
|
|
4882
|
+
}
|
|
4883
|
+
function SidebarProvider({
|
|
4884
|
+
defaultOpen = true,
|
|
4885
|
+
open: openProp,
|
|
4886
|
+
onOpenChange: setOpenProp,
|
|
4887
|
+
className,
|
|
4888
|
+
style,
|
|
4889
|
+
children,
|
|
4890
|
+
...props
|
|
4891
|
+
}) {
|
|
4892
|
+
const isMobile = useIsMobile();
|
|
4893
|
+
const [openMobile, setOpenMobile] = useState(false);
|
|
4894
|
+
const [_open, _setOpen] = useState(defaultOpen);
|
|
4895
|
+
const open = openProp ?? _open;
|
|
4896
|
+
const setOpen = useCallback(
|
|
4897
|
+
(value) => {
|
|
4898
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
4899
|
+
if (setOpenProp) {
|
|
4900
|
+
setOpenProp(openState);
|
|
4901
|
+
} else {
|
|
4902
|
+
_setOpen(openState);
|
|
4903
|
+
}
|
|
4904
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}; SameSite=Lax; Secure`;
|
|
4905
|
+
},
|
|
4906
|
+
[setOpenProp, open]
|
|
4907
|
+
);
|
|
4908
|
+
const toggleSidebar = useCallback(() => {
|
|
4909
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4910
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
4911
|
+
useEffect(() => {
|
|
4912
|
+
const handleKeyDown = (event) => {
|
|
4913
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4914
|
+
const target = event.target;
|
|
4915
|
+
if (target.isContentEditable || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT") {
|
|
4916
|
+
return;
|
|
4917
|
+
}
|
|
4918
|
+
event.preventDefault();
|
|
4919
|
+
toggleSidebar();
|
|
4920
|
+
}
|
|
4921
|
+
};
|
|
4922
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
4923
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4924
|
+
}, [toggleSidebar]);
|
|
4925
|
+
const state = open ? "expanded" : "collapsed";
|
|
4926
|
+
const contextValue = useMemo(
|
|
4927
|
+
() => ({
|
|
4928
|
+
state,
|
|
4929
|
+
open,
|
|
4930
|
+
setOpen,
|
|
4931
|
+
isMobile,
|
|
4932
|
+
openMobile,
|
|
4933
|
+
setOpenMobile,
|
|
4934
|
+
toggleSidebar
|
|
4935
|
+
}),
|
|
4936
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
4937
|
+
);
|
|
4938
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
4939
|
+
"div",
|
|
4940
|
+
{
|
|
4941
|
+
"data-slot": "sidebar-wrapper",
|
|
4942
|
+
style: {
|
|
4943
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
4944
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
4945
|
+
...style
|
|
4946
|
+
},
|
|
4947
|
+
className: cn(
|
|
4948
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-dvh w-full",
|
|
4949
|
+
className
|
|
4950
|
+
),
|
|
4951
|
+
...props,
|
|
4952
|
+
children
|
|
4953
|
+
}
|
|
4954
|
+
) });
|
|
4955
|
+
}
|
|
4956
|
+
function SidebarResizeHandle() {
|
|
4957
|
+
const dragRef = useRef(null);
|
|
4958
|
+
return /* @__PURE__ */ jsx(
|
|
4959
|
+
"div",
|
|
4960
|
+
{
|
|
4961
|
+
"data-slot": "sidebar-resize-handle",
|
|
4962
|
+
className: "absolute inset-y-0 right-0 w-1 cursor-col-resize opacity-0 transition-opacity hover:opacity-100 hover:bg-sidebar-border group-data-[state=collapsed]:hidden",
|
|
4963
|
+
onPointerDown: (e) => {
|
|
4964
|
+
e.preventDefault();
|
|
4965
|
+
const wrapper = e.currentTarget.closest('[data-slot="sidebar-wrapper"]');
|
|
4966
|
+
if (!wrapper) return;
|
|
4967
|
+
const container = e.currentTarget.closest('[data-slot="sidebar-container"]');
|
|
4968
|
+
const gap = container?.parentElement?.querySelector('[data-slot="sidebar-gap"]') ?? null;
|
|
4969
|
+
const currentWidth = container ? parseFloat(getComputedStyle(container).width) : 256;
|
|
4970
|
+
if (container) container.style.transition = "none";
|
|
4971
|
+
if (gap) gap.style.transition = "none";
|
|
4972
|
+
dragRef.current = { startX: e.clientX, startWidth: currentWidth, wrapper, container: container ?? null, gap };
|
|
4973
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
4974
|
+
},
|
|
4975
|
+
onPointerMove: (e) => {
|
|
4976
|
+
if (!dragRef.current) return;
|
|
4977
|
+
const { startX, startWidth, wrapper } = dragRef.current;
|
|
4978
|
+
const newWidth = Math.max(160, Math.min(480, startWidth + (e.clientX - startX)));
|
|
4979
|
+
wrapper.style.setProperty("--sidebar-width", `${newWidth}px`);
|
|
4980
|
+
},
|
|
4981
|
+
onPointerUp: () => {
|
|
4982
|
+
if (dragRef.current?.container) dragRef.current.container.style.transition = "";
|
|
4983
|
+
if (dragRef.current?.gap) dragRef.current.gap.style.transition = "";
|
|
4984
|
+
dragRef.current = null;
|
|
4985
|
+
}
|
|
4986
|
+
}
|
|
4987
|
+
);
|
|
4988
|
+
}
|
|
4989
|
+
function Sidebar({
|
|
4990
|
+
side = "left",
|
|
4991
|
+
variant = "sidebar",
|
|
4992
|
+
collapsible = "offcanvas",
|
|
4993
|
+
className,
|
|
4994
|
+
children,
|
|
4995
|
+
dir,
|
|
4996
|
+
...props
|
|
4997
|
+
}) {
|
|
4998
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
4999
|
+
if (collapsible === "none") {
|
|
5000
|
+
return /* @__PURE__ */ jsx(
|
|
5001
|
+
"div",
|
|
5002
|
+
{
|
|
5003
|
+
"data-slot": "sidebar",
|
|
5004
|
+
className: cn(
|
|
5005
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
5006
|
+
className
|
|
5007
|
+
),
|
|
5008
|
+
...props,
|
|
5009
|
+
children
|
|
5010
|
+
}
|
|
5011
|
+
);
|
|
5012
|
+
}
|
|
5013
|
+
if (isMobile) {
|
|
5014
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
5015
|
+
SheetContent,
|
|
5016
|
+
{
|
|
5017
|
+
dir,
|
|
5018
|
+
"data-sidebar": "sidebar",
|
|
5019
|
+
"data-slot": "sidebar",
|
|
5020
|
+
"data-mobile": "true",
|
|
5021
|
+
showCloseButton: false,
|
|
5022
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0",
|
|
5023
|
+
style: {
|
|
5024
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
5025
|
+
},
|
|
5026
|
+
side,
|
|
5027
|
+
children: [
|
|
5028
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
5029
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
5030
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
5031
|
+
] }),
|
|
5032
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
5033
|
+
]
|
|
5034
|
+
}
|
|
5035
|
+
) });
|
|
5036
|
+
}
|
|
5037
|
+
return /* @__PURE__ */ jsxs(
|
|
5038
|
+
"div",
|
|
5039
|
+
{
|
|
5040
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
5041
|
+
"data-state": state,
|
|
5042
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
5043
|
+
"data-variant": variant,
|
|
5044
|
+
"data-side": side,
|
|
5045
|
+
"data-slot": "sidebar",
|
|
5046
|
+
children: [
|
|
5047
|
+
/* @__PURE__ */ jsx(
|
|
5048
|
+
"div",
|
|
5049
|
+
{
|
|
5050
|
+
"data-slot": "sidebar-gap",
|
|
5051
|
+
className: cn(
|
|
5052
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
5053
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
5054
|
+
"group-data-[side=right]:rotate-180",
|
|
5055
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
5056
|
+
)
|
|
5057
|
+
}
|
|
5058
|
+
),
|
|
5059
|
+
/* @__PURE__ */ jsxs(
|
|
5060
|
+
"div",
|
|
5061
|
+
{
|
|
5062
|
+
"data-slot": "sidebar-container",
|
|
5063
|
+
"data-side": side,
|
|
5064
|
+
className: cn(
|
|
5065
|
+
"fixed inset-y-0 z-10 hidden h-dvh w-(--sidebar-width) overflow-hidden transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
5066
|
+
// Adjust the padding for floating and inset variants.
|
|
5067
|
+
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",
|
|
5068
|
+
className
|
|
5069
|
+
),
|
|
5070
|
+
...props,
|
|
5071
|
+
children: [
|
|
5072
|
+
/* @__PURE__ */ jsx(
|
|
5073
|
+
"div",
|
|
5074
|
+
{
|
|
5075
|
+
"data-sidebar": "sidebar",
|
|
5076
|
+
"data-slot": "sidebar-inner",
|
|
5077
|
+
className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",
|
|
5078
|
+
children
|
|
5079
|
+
}
|
|
5080
|
+
),
|
|
5081
|
+
/* @__PURE__ */ jsx(SidebarResizeHandle, {})
|
|
5082
|
+
]
|
|
5083
|
+
}
|
|
5084
|
+
)
|
|
5085
|
+
]
|
|
5086
|
+
}
|
|
5087
|
+
);
|
|
5088
|
+
}
|
|
5089
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
5090
|
+
const { toggleSidebar } = useSidebar();
|
|
5091
|
+
return /* @__PURE__ */ jsxs(
|
|
5092
|
+
Button,
|
|
5093
|
+
{
|
|
5094
|
+
"data-sidebar": "trigger",
|
|
5095
|
+
"data-slot": "sidebar-trigger",
|
|
5096
|
+
variant: "ghost",
|
|
5097
|
+
size: "icon-sm",
|
|
5098
|
+
className: cn(className),
|
|
5099
|
+
onClick: (event) => {
|
|
5100
|
+
onClick?.(event);
|
|
5101
|
+
toggleSidebar();
|
|
5102
|
+
},
|
|
5103
|
+
...props,
|
|
5104
|
+
children: [
|
|
5105
|
+
/* @__PURE__ */ jsx(MenuIcon, {}),
|
|
5106
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
5107
|
+
]
|
|
5108
|
+
}
|
|
5109
|
+
);
|
|
5110
|
+
}
|
|
5111
|
+
function SidebarRail({ className, ...props }) {
|
|
5112
|
+
const { toggleSidebar } = useSidebar();
|
|
5113
|
+
return /* @__PURE__ */ jsx(
|
|
5114
|
+
"button",
|
|
5115
|
+
{
|
|
5116
|
+
"data-sidebar": "rail",
|
|
5117
|
+
"data-slot": "sidebar-rail",
|
|
5118
|
+
"aria-label": "Toggle Sidebar",
|
|
5119
|
+
tabIndex: -1,
|
|
5120
|
+
onClick: toggleSidebar,
|
|
5121
|
+
title: "Toggle Sidebar",
|
|
5122
|
+
className: cn(
|
|
5123
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
5124
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
5125
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
5126
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
5127
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
5128
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
5129
|
+
className
|
|
5130
|
+
),
|
|
5131
|
+
...props
|
|
5132
|
+
}
|
|
5133
|
+
);
|
|
5134
|
+
}
|
|
5135
|
+
function SidebarInset({ className, ...props }) {
|
|
5136
|
+
return /* @__PURE__ */ jsx(
|
|
5137
|
+
"main",
|
|
5138
|
+
{
|
|
5139
|
+
"data-slot": "sidebar-inset",
|
|
5140
|
+
className: cn(
|
|
5141
|
+
"bg-background relative flex w-full flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
5142
|
+
className
|
|
5143
|
+
),
|
|
5144
|
+
...props
|
|
5145
|
+
}
|
|
5146
|
+
);
|
|
5147
|
+
}
|
|
5148
|
+
function SidebarInput({ className, ...props }) {
|
|
5149
|
+
return /* @__PURE__ */ jsx(
|
|
5150
|
+
Input,
|
|
5151
|
+
{
|
|
5152
|
+
"data-slot": "sidebar-input",
|
|
5153
|
+
"data-sidebar": "input",
|
|
5154
|
+
className: cn("bg-input/50 h-8 w-full shadow-none", className),
|
|
5155
|
+
...props
|
|
5156
|
+
}
|
|
5157
|
+
);
|
|
5158
|
+
}
|
|
5159
|
+
function SidebarHeader({ className, ...props }) {
|
|
5160
|
+
return /* @__PURE__ */ jsx(
|
|
5161
|
+
"div",
|
|
5162
|
+
{
|
|
5163
|
+
"data-slot": "sidebar-header",
|
|
5164
|
+
"data-sidebar": "header",
|
|
5165
|
+
className: cn("flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]", className),
|
|
5166
|
+
...props
|
|
5167
|
+
}
|
|
5168
|
+
);
|
|
5169
|
+
}
|
|
5170
|
+
function SidebarFooter({ className, ...props }) {
|
|
5171
|
+
return /* @__PURE__ */ jsx(
|
|
4848
5172
|
"div",
|
|
4849
5173
|
{
|
|
4850
|
-
ref,
|
|
4851
5174
|
"data-slot": "sidebar-footer",
|
|
4852
|
-
|
|
5175
|
+
"data-sidebar": "footer",
|
|
5176
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
5177
|
+
...props
|
|
5178
|
+
}
|
|
5179
|
+
);
|
|
5180
|
+
}
|
|
5181
|
+
function SidebarSeparator({ className, ...props }) {
|
|
5182
|
+
return /* @__PURE__ */ jsx(
|
|
5183
|
+
Separator,
|
|
5184
|
+
{
|
|
5185
|
+
"data-slot": "sidebar-separator",
|
|
5186
|
+
"data-sidebar": "separator",
|
|
5187
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
5188
|
+
...props
|
|
5189
|
+
}
|
|
5190
|
+
);
|
|
5191
|
+
}
|
|
5192
|
+
function SidebarContent({ className, ...props }) {
|
|
5193
|
+
return /* @__PURE__ */ jsx(
|
|
5194
|
+
"div",
|
|
5195
|
+
{
|
|
5196
|
+
"data-slot": "sidebar-content",
|
|
5197
|
+
"data-sidebar": "content",
|
|
5198
|
+
className: cn(
|
|
5199
|
+
"no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden",
|
|
5200
|
+
className
|
|
5201
|
+
),
|
|
5202
|
+
...props
|
|
5203
|
+
}
|
|
5204
|
+
);
|
|
5205
|
+
}
|
|
5206
|
+
function SidebarGroup({ className, ...props }) {
|
|
5207
|
+
return /* @__PURE__ */ jsx(
|
|
5208
|
+
"div",
|
|
5209
|
+
{
|
|
5210
|
+
"data-slot": "sidebar-group",
|
|
5211
|
+
"data-sidebar": "group",
|
|
5212
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
5213
|
+
...props
|
|
5214
|
+
}
|
|
5215
|
+
);
|
|
5216
|
+
}
|
|
5217
|
+
function SidebarGroupLabel({
|
|
5218
|
+
className,
|
|
5219
|
+
asChild = false,
|
|
5220
|
+
...props
|
|
5221
|
+
}) {
|
|
5222
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
5223
|
+
return /* @__PURE__ */ jsx(
|
|
5224
|
+
Comp,
|
|
5225
|
+
{
|
|
5226
|
+
"data-slot": "sidebar-group-label",
|
|
5227
|
+
"data-sidebar": "group-label",
|
|
5228
|
+
className: cn(
|
|
5229
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5230
|
+
className
|
|
5231
|
+
),
|
|
5232
|
+
...props
|
|
5233
|
+
}
|
|
5234
|
+
);
|
|
5235
|
+
}
|
|
5236
|
+
function SidebarGroupAction({
|
|
5237
|
+
className,
|
|
5238
|
+
asChild = false,
|
|
5239
|
+
...props
|
|
5240
|
+
}) {
|
|
5241
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
5242
|
+
return /* @__PURE__ */ jsx(
|
|
5243
|
+
Comp,
|
|
5244
|
+
{
|
|
5245
|
+
"data-slot": "sidebar-group-action",
|
|
5246
|
+
"data-sidebar": "group-action",
|
|
5247
|
+
className: cn(
|
|
5248
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-xl p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5249
|
+
className
|
|
5250
|
+
),
|
|
5251
|
+
...props
|
|
5252
|
+
}
|
|
5253
|
+
);
|
|
5254
|
+
}
|
|
5255
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
5256
|
+
return /* @__PURE__ */ jsx(
|
|
5257
|
+
"div",
|
|
5258
|
+
{
|
|
5259
|
+
"data-slot": "sidebar-group-content",
|
|
5260
|
+
"data-sidebar": "group-content",
|
|
5261
|
+
className: cn("w-full text-sm", className),
|
|
5262
|
+
...props
|
|
5263
|
+
}
|
|
5264
|
+
);
|
|
5265
|
+
}
|
|
5266
|
+
function SidebarMenu({ className, ...props }) {
|
|
5267
|
+
return /* @__PURE__ */ jsx(
|
|
5268
|
+
"ul",
|
|
5269
|
+
{
|
|
5270
|
+
"data-slot": "sidebar-menu",
|
|
5271
|
+
"data-sidebar": "menu",
|
|
5272
|
+
className: cn("flex w-full min-w-0 flex-col gap-0.5", className),
|
|
5273
|
+
...props
|
|
5274
|
+
}
|
|
5275
|
+
);
|
|
5276
|
+
}
|
|
5277
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
5278
|
+
return /* @__PURE__ */ jsx(
|
|
5279
|
+
"li",
|
|
5280
|
+
{
|
|
5281
|
+
"data-slot": "sidebar-menu-item",
|
|
5282
|
+
"data-sidebar": "menu-item",
|
|
5283
|
+
className: cn("group/menu-item relative", className),
|
|
5284
|
+
...props
|
|
5285
|
+
}
|
|
5286
|
+
);
|
|
5287
|
+
}
|
|
5288
|
+
var sidebarMenuButtonVariants = cva(
|
|
5289
|
+
"peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-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-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",
|
|
5290
|
+
{
|
|
5291
|
+
variants: {
|
|
5292
|
+
variant: {
|
|
5293
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
5294
|
+
outline: "bg-background 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)]"
|
|
5295
|
+
},
|
|
5296
|
+
size: {
|
|
5297
|
+
default: "h-9 text-sm",
|
|
5298
|
+
sm: "h-8 text-xs",
|
|
5299
|
+
lg: "h-14 px-3 text-sm group-data-[collapsible=icon]:p-0!"
|
|
5300
|
+
}
|
|
5301
|
+
},
|
|
5302
|
+
defaultVariants: {
|
|
5303
|
+
variant: "default",
|
|
5304
|
+
size: "default"
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5307
|
+
);
|
|
5308
|
+
function SidebarMenuButton({
|
|
5309
|
+
asChild = false,
|
|
5310
|
+
isActive = false,
|
|
5311
|
+
variant = "default",
|
|
5312
|
+
size = "default",
|
|
5313
|
+
tooltip,
|
|
5314
|
+
className,
|
|
5315
|
+
...props
|
|
5316
|
+
}) {
|
|
5317
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
5318
|
+
const { isMobile, state } = useSidebar();
|
|
5319
|
+
const button = /* @__PURE__ */ jsx(
|
|
5320
|
+
Comp,
|
|
5321
|
+
{
|
|
5322
|
+
"data-slot": "sidebar-menu-button",
|
|
5323
|
+
"data-sidebar": "menu-button",
|
|
5324
|
+
"data-size": size,
|
|
5325
|
+
"data-active": isActive,
|
|
5326
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
5327
|
+
...props
|
|
5328
|
+
}
|
|
5329
|
+
);
|
|
5330
|
+
if (!tooltip) {
|
|
5331
|
+
return button;
|
|
5332
|
+
}
|
|
5333
|
+
if (typeof tooltip === "string") {
|
|
5334
|
+
tooltip = {
|
|
5335
|
+
children: tooltip
|
|
5336
|
+
};
|
|
5337
|
+
}
|
|
5338
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5339
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
5340
|
+
/* @__PURE__ */ jsx(
|
|
5341
|
+
TooltipContent,
|
|
5342
|
+
{
|
|
5343
|
+
side: "right",
|
|
5344
|
+
align: "center",
|
|
5345
|
+
hidden: state !== "collapsed" || isMobile,
|
|
5346
|
+
...tooltip
|
|
5347
|
+
}
|
|
5348
|
+
)
|
|
5349
|
+
] });
|
|
5350
|
+
}
|
|
5351
|
+
function SidebarMenuAction({
|
|
5352
|
+
className,
|
|
5353
|
+
asChild = false,
|
|
5354
|
+
showOnHover = false,
|
|
5355
|
+
...props
|
|
5356
|
+
}) {
|
|
5357
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
5358
|
+
return /* @__PURE__ */ jsx(
|
|
5359
|
+
Comp,
|
|
5360
|
+
{
|
|
5361
|
+
"data-slot": "sidebar-menu-action",
|
|
5362
|
+
"data-sidebar": "menu-action",
|
|
5363
|
+
className: cn(
|
|
5364
|
+
"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-xl p-0 outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-2 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5365
|
+
showOnHover && "peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0",
|
|
5366
|
+
className
|
|
5367
|
+
),
|
|
5368
|
+
...props
|
|
5369
|
+
}
|
|
5370
|
+
);
|
|
5371
|
+
}
|
|
5372
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
5373
|
+
return /* @__PURE__ */ jsx(
|
|
5374
|
+
"div",
|
|
5375
|
+
{
|
|
5376
|
+
"data-slot": "sidebar-menu-badge",
|
|
5377
|
+
"data-sidebar": "menu-badge",
|
|
5378
|
+
className: cn(
|
|
5379
|
+
"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1",
|
|
5380
|
+
className
|
|
5381
|
+
),
|
|
5382
|
+
...props
|
|
5383
|
+
}
|
|
5384
|
+
);
|
|
5385
|
+
}
|
|
5386
|
+
function SidebarMenuSkeleton({
|
|
5387
|
+
className,
|
|
5388
|
+
showIcon = false,
|
|
5389
|
+
...props
|
|
5390
|
+
}) {
|
|
5391
|
+
const [width] = useState(() => {
|
|
5392
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5393
|
+
});
|
|
5394
|
+
return /* @__PURE__ */ jsxs(
|
|
5395
|
+
"div",
|
|
5396
|
+
{
|
|
5397
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
5398
|
+
"data-sidebar": "menu-skeleton",
|
|
5399
|
+
className: cn("flex h-8 items-center gap-2 rounded-xl px-2", className),
|
|
5400
|
+
...props,
|
|
5401
|
+
children: [
|
|
5402
|
+
showIcon && /* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-xl", "data-sidebar": "menu-skeleton-icon" }),
|
|
5403
|
+
/* @__PURE__ */ jsx(
|
|
5404
|
+
Skeleton,
|
|
5405
|
+
{
|
|
5406
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
5407
|
+
"data-sidebar": "menu-skeleton-text",
|
|
5408
|
+
style: {
|
|
5409
|
+
"--skeleton-width": width
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
)
|
|
5413
|
+
]
|
|
5414
|
+
}
|
|
5415
|
+
);
|
|
5416
|
+
}
|
|
5417
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
5418
|
+
return /* @__PURE__ */ jsx(
|
|
5419
|
+
"ul",
|
|
5420
|
+
{
|
|
5421
|
+
"data-slot": "sidebar-menu-sub",
|
|
5422
|
+
"data-sidebar": "menu-sub",
|
|
5423
|
+
className: cn(
|
|
5424
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
5425
|
+
className
|
|
5426
|
+
),
|
|
4853
5427
|
...props
|
|
4854
5428
|
}
|
|
4855
|
-
)
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
"div",
|
|
5429
|
+
);
|
|
5430
|
+
}
|
|
5431
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
5432
|
+
return /* @__PURE__ */ jsx(
|
|
5433
|
+
"li",
|
|
4861
5434
|
{
|
|
4862
|
-
|
|
4863
|
-
"data-
|
|
4864
|
-
className: cn("
|
|
5435
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
5436
|
+
"data-sidebar": "menu-sub-item",
|
|
5437
|
+
className: cn("group/menu-sub-item relative", className),
|
|
4865
5438
|
...props
|
|
4866
5439
|
}
|
|
4867
|
-
)
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
"
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
}
|
|
4880
|
-
));
|
|
4881
|
-
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
4882
|
-
var SidebarGroupContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4883
|
-
"div",
|
|
4884
|
-
{
|
|
4885
|
-
ref,
|
|
4886
|
-
"data-slot": "sidebar-group-content",
|
|
4887
|
-
className: cn("flex flex-col gap-0.5", className),
|
|
4888
|
-
...props
|
|
4889
|
-
}
|
|
4890
|
-
));
|
|
4891
|
-
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
4892
|
-
var SidebarMenu = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4893
|
-
"ul",
|
|
4894
|
-
{
|
|
4895
|
-
ref,
|
|
4896
|
-
"data-slot": "sidebar-menu",
|
|
4897
|
-
className: cn("m-0 flex list-none flex-col gap-0.5 p-0", className),
|
|
4898
|
-
...props
|
|
4899
|
-
}
|
|
4900
|
-
));
|
|
4901
|
-
SidebarMenu.displayName = "SidebarMenu";
|
|
4902
|
-
var SidebarMenuItem = forwardRef(
|
|
4903
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4904
|
-
"li",
|
|
5440
|
+
);
|
|
5441
|
+
}
|
|
5442
|
+
function SidebarMenuSubButton({
|
|
5443
|
+
asChild = false,
|
|
5444
|
+
size = "md",
|
|
5445
|
+
isActive = false,
|
|
5446
|
+
className,
|
|
5447
|
+
...props
|
|
5448
|
+
}) {
|
|
5449
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
5450
|
+
return /* @__PURE__ */ jsx(
|
|
5451
|
+
Comp,
|
|
4905
5452
|
{
|
|
4906
|
-
|
|
4907
|
-
"data-
|
|
4908
|
-
|
|
5453
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
5454
|
+
"data-sidebar": "menu-sub-button",
|
|
5455
|
+
"data-size": size,
|
|
5456
|
+
"data-active": isActive,
|
|
5457
|
+
className: cn(
|
|
5458
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-3 outline-hidden group-data-[collapsible=icon]:hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5459
|
+
className
|
|
5460
|
+
),
|
|
4909
5461
|
...props
|
|
4910
5462
|
}
|
|
4911
|
-
)
|
|
4912
|
-
|
|
4913
|
-
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
4914
|
-
var SidebarMenuButton = forwardRef(
|
|
4915
|
-
({ asChild, isActive, className, children, ...props }, ref) => {
|
|
4916
|
-
const { open } = useSidebar();
|
|
4917
|
-
const Comp = asChild ? Slot.Root : "button";
|
|
4918
|
-
return /* @__PURE__ */ jsx(
|
|
4919
|
-
Comp,
|
|
4920
|
-
{
|
|
4921
|
-
ref,
|
|
4922
|
-
"data-active": isActive || void 0,
|
|
4923
|
-
className: cn(
|
|
4924
|
-
"flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm font-normal transition-colors outline-none",
|
|
4925
|
-
"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
4926
|
-
"data-[active]:bg-sidebar-primary/10 data-[active]:text-sidebar-primary data-[active]:font-normal",
|
|
4927
|
-
!open && "justify-center px-2",
|
|
4928
|
-
className
|
|
4929
|
-
),
|
|
4930
|
-
...props,
|
|
4931
|
-
children: Children.map(children, (child, i) => {
|
|
4932
|
-
if (i === 0 && isValidElement(child)) {
|
|
4933
|
-
return cloneElement(child, {
|
|
4934
|
-
className: cn("size-4 shrink-0", child.props.className)
|
|
4935
|
-
});
|
|
4936
|
-
}
|
|
4937
|
-
if (i > 0 && !open) return null;
|
|
4938
|
-
return child;
|
|
4939
|
-
})
|
|
4940
|
-
}
|
|
4941
|
-
);
|
|
4942
|
-
}
|
|
4943
|
-
);
|
|
4944
|
-
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
5463
|
+
);
|
|
5464
|
+
}
|
|
4945
5465
|
var defaultItems = [
|
|
4946
5466
|
{ label: "Home", icon: /* @__PURE__ */ jsx(House, {}) },
|
|
4947
5467
|
{ label: "Vacations", icon: /* @__PURE__ */ jsx(Plane, {}) },
|
|
@@ -4949,11 +5469,20 @@ var defaultItems = [
|
|
|
4949
5469
|
{ label: "Apps", icon: /* @__PURE__ */ jsx(LayoutDashboardIcon, {}) }
|
|
4950
5470
|
];
|
|
4951
5471
|
function SidebarBrand({ brandName }) {
|
|
4952
|
-
const {
|
|
4953
|
-
|
|
5472
|
+
const { state } = useSidebar();
|
|
5473
|
+
const collapsed = state === "collapsed";
|
|
4954
5474
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
4955
5475
|
/* @__PURE__ */ jsx("div", { className: "bg-primary text-primary-foreground flex size-7 shrink-0 items-center justify-center rounded-md text-xs font-bold", children: brandName.charAt(0) }),
|
|
4956
|
-
/* @__PURE__ */ jsx(
|
|
5476
|
+
/* @__PURE__ */ jsx(
|
|
5477
|
+
"span",
|
|
5478
|
+
{
|
|
5479
|
+
className: cn(
|
|
5480
|
+
"truncate text-sm font-semibold transition-opacity duration-200",
|
|
5481
|
+
collapsed ? "opacity-0 pointer-events-none w-0 overflow-hidden" : "opacity-100"
|
|
5482
|
+
),
|
|
5483
|
+
children: brandName
|
|
5484
|
+
}
|
|
5485
|
+
)
|
|
4957
5486
|
] });
|
|
4958
5487
|
}
|
|
4959
5488
|
function AppShell({
|
|
@@ -4962,48 +5491,65 @@ function AppShell({
|
|
|
4962
5491
|
onItemClick,
|
|
4963
5492
|
brandName = "Total Portal",
|
|
4964
5493
|
showHeader = true,
|
|
5494
|
+
header,
|
|
5495
|
+
open,
|
|
5496
|
+
onOpenChange,
|
|
5497
|
+
defaultOpen,
|
|
4965
5498
|
className,
|
|
4966
5499
|
mainClassName,
|
|
4967
5500
|
children
|
|
4968
5501
|
}) {
|
|
4969
|
-
return /* @__PURE__ */ jsxs(
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
{
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5502
|
+
return /* @__PURE__ */ jsxs(
|
|
5503
|
+
SidebarProvider,
|
|
5504
|
+
{
|
|
5505
|
+
className: cn("h-dvh overflow-hidden", className),
|
|
5506
|
+
open,
|
|
5507
|
+
onOpenChange,
|
|
5508
|
+
defaultOpen,
|
|
5509
|
+
children: [
|
|
5510
|
+
/* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", children: [
|
|
5511
|
+
/* @__PURE__ */ jsxs(SidebarHeader, { className: "flex flex-row items-center gap-2 p-2", children: [
|
|
5512
|
+
/* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0" }),
|
|
5513
|
+
/* @__PURE__ */ jsx(SidebarBrand, { brandName })
|
|
5514
|
+
] }),
|
|
5515
|
+
/* @__PURE__ */ jsx(SidebarContent, { className: "overflow-x:hidden", children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: items.map((item) => {
|
|
5516
|
+
const menuItem = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
|
|
5517
|
+
SidebarMenuButton,
|
|
5518
|
+
{
|
|
5519
|
+
tooltip: item.label,
|
|
5520
|
+
isActive: activeItem === item.label || item.active,
|
|
5521
|
+
onClick: () => {
|
|
5522
|
+
item.onClick?.();
|
|
5523
|
+
onItemClick?.(item.label);
|
|
5524
|
+
},
|
|
5525
|
+
children: [
|
|
5526
|
+
item.icon,
|
|
5527
|
+
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
5528
|
+
]
|
|
5529
|
+
}
|
|
5530
|
+
) }, item.label);
|
|
5531
|
+
if (!item.permission) return menuItem;
|
|
5532
|
+
return /* @__PURE__ */ jsx(
|
|
5533
|
+
Can,
|
|
5534
|
+
{
|
|
5535
|
+
permission: item.permission,
|
|
5536
|
+
mode: item.permissionMode,
|
|
5537
|
+
children: menuItem
|
|
5538
|
+
},
|
|
5539
|
+
item.label
|
|
5540
|
+
);
|
|
5541
|
+
}) }) }) }) })
|
|
5542
|
+
] }),
|
|
5543
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
5544
|
+
header ? header : showHeader ? /* @__PURE__ */ jsxs("header", { className: "flex h-14 items-center gap-2 border-b px-4", children: [
|
|
5545
|
+
/* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0 md:hidden" }),
|
|
5546
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: brandName })
|
|
5547
|
+
] }) : /* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0 md:hidden" }),
|
|
5548
|
+
/* @__PURE__ */ jsx("main", { className: cn("overflow-y-auto flex-1 p-6", mainClassName), children })
|
|
5549
|
+
] })
|
|
5550
|
+
]
|
|
5551
|
+
}
|
|
5552
|
+
);
|
|
5007
5553
|
}
|
|
5008
5554
|
function Textarea({ className, ...props }) {
|
|
5009
5555
|
return /* @__PURE__ */ jsx(
|
|
@@ -5609,14 +6155,9 @@ var eventCalendarStyles = `
|
|
|
5609
6155
|
font-weight: 600;
|
|
5610
6156
|
}
|
|
5611
6157
|
|
|
5612
|
-
/* \u2500\u2500 Event modal \
|
|
6158
|
+
/* \u2500\u2500 Event modal \u2014 hidden; replaced by TCCE Popover in event-calendar.tsx \u2500\u2500 */
|
|
5613
6159
|
.sx-tcce .sx__event-modal {
|
|
5614
|
-
|
|
5615
|
-
border: 1px solid var(--color-border);
|
|
5616
|
-
font-size: 13px;
|
|
5617
|
-
min-width: 220px;
|
|
5618
|
-
max-width: 300px;
|
|
5619
|
-
background: var(--color-background);
|
|
6160
|
+
display: none !important;
|
|
5620
6161
|
}
|
|
5621
6162
|
.sx-tcce .sx__event-modal__title {
|
|
5622
6163
|
font-size: 14px;
|
|
@@ -5761,8 +6302,43 @@ function useEventCalendar({
|
|
|
5761
6302
|
return () => unsubscribe?.();
|
|
5762
6303
|
}, []);
|
|
5763
6304
|
return {
|
|
5764
|
-
calendarApp: calendarApp.current
|
|
6305
|
+
calendarApp: calendarApp.current,
|
|
6306
|
+
eventModal: eventModal.current
|
|
6307
|
+
};
|
|
6308
|
+
}
|
|
6309
|
+
var EVENT_COLOR = {
|
|
6310
|
+
default: "#22205f",
|
|
6311
|
+
primary: "#22205f",
|
|
6312
|
+
success: "#00a824",
|
|
6313
|
+
warning: "#c8a23b",
|
|
6314
|
+
danger: "#ea3a3d"
|
|
6315
|
+
};
|
|
6316
|
+
function getFixedAnchorRect(el) {
|
|
6317
|
+
const rect = el.getBoundingClientRect();
|
|
6318
|
+
let ancestor = el.parentElement;
|
|
6319
|
+
while (ancestor && ancestor !== document.documentElement) {
|
|
6320
|
+
if (window.getComputedStyle(ancestor).transform !== "none") {
|
|
6321
|
+
const cb = ancestor.getBoundingClientRect();
|
|
6322
|
+
return new DOMRect(rect.left - cb.left, rect.top - cb.top, rect.width, rect.height);
|
|
6323
|
+
}
|
|
6324
|
+
ancestor = ancestor.parentElement;
|
|
6325
|
+
}
|
|
6326
|
+
return rect;
|
|
6327
|
+
}
|
|
6328
|
+
function formatEventTime(start, end) {
|
|
6329
|
+
const isAllDay = start.length === 10;
|
|
6330
|
+
if (isAllDay) {
|
|
6331
|
+
const date = /* @__PURE__ */ new Date(`${start}T00:00:00`);
|
|
6332
|
+
return date.toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" });
|
|
6333
|
+
}
|
|
6334
|
+
const fmt = (s) => {
|
|
6335
|
+
const [, time] = s.split(" ");
|
|
6336
|
+
const [h, m] = time.split(":").map(Number);
|
|
6337
|
+
const ampm = h >= 12 ? "PM" : "AM";
|
|
6338
|
+
const hour = h % 12 || 12;
|
|
6339
|
+
return `${hour}:${m.toString().padStart(2, "0")} ${ampm}`;
|
|
5765
6340
|
};
|
|
6341
|
+
return `${fmt(start)} \u2013 ${fmt(end)}`;
|
|
5766
6342
|
}
|
|
5767
6343
|
function EventCalendar({
|
|
5768
6344
|
events,
|
|
@@ -5775,6 +6351,9 @@ function EventCalendar({
|
|
|
5775
6351
|
className
|
|
5776
6352
|
}) {
|
|
5777
6353
|
const [currentView, setCurrentView] = useState(defaultView);
|
|
6354
|
+
const [selectedEvent, setSelectedEvent] = useState(null);
|
|
6355
|
+
const [anchorRect, setAnchorRect] = useState(null);
|
|
6356
|
+
const clickedEventElRef = useRef(false);
|
|
5778
6357
|
const handleViewChange = useCallback(
|
|
5779
6358
|
(view) => {
|
|
5780
6359
|
setCurrentView(view);
|
|
@@ -5782,19 +6361,106 @@ function EventCalendar({
|
|
|
5782
6361
|
},
|
|
5783
6362
|
[onViewChange]
|
|
5784
6363
|
);
|
|
5785
|
-
const
|
|
6364
|
+
const handleEventClick = useCallback(
|
|
6365
|
+
(event) => {
|
|
6366
|
+
setSelectedEvent(event);
|
|
6367
|
+
onEventClick?.(event);
|
|
6368
|
+
},
|
|
6369
|
+
[onEventClick]
|
|
6370
|
+
);
|
|
6371
|
+
const { calendarApp, eventModal } = useEventCalendar({
|
|
5786
6372
|
events,
|
|
5787
6373
|
defaultView,
|
|
5788
6374
|
defaultDate,
|
|
5789
6375
|
locale,
|
|
5790
|
-
onEventClick,
|
|
6376
|
+
onEventClick: handleEventClick,
|
|
5791
6377
|
onEventCreate,
|
|
5792
6378
|
onViewChange: handleViewChange
|
|
5793
6379
|
});
|
|
6380
|
+
useEffect(() => {
|
|
6381
|
+
const unsub = eventModal.calendarEventElement.subscribe((el) => {
|
|
6382
|
+
if (!el) {
|
|
6383
|
+
if (clickedEventElRef.current) {
|
|
6384
|
+
clickedEventElRef.current = false;
|
|
6385
|
+
} else {
|
|
6386
|
+
setSelectedEvent(null);
|
|
6387
|
+
setAnchorRect(null);
|
|
6388
|
+
}
|
|
6389
|
+
} else {
|
|
6390
|
+
setAnchorRect(getFixedAnchorRect(el));
|
|
6391
|
+
}
|
|
6392
|
+
});
|
|
6393
|
+
return unsub;
|
|
6394
|
+
}, [eventModal]);
|
|
6395
|
+
const handlePopoverOpenChange = useCallback(
|
|
6396
|
+
(open) => {
|
|
6397
|
+
if (!open) {
|
|
6398
|
+
eventModal.close();
|
|
6399
|
+
setSelectedEvent(null);
|
|
6400
|
+
setAnchorRect(null);
|
|
6401
|
+
}
|
|
6402
|
+
},
|
|
6403
|
+
[eventModal]
|
|
6404
|
+
);
|
|
5794
6405
|
const contextValue = useMemo(() => ({ currentView }), [currentView]);
|
|
5795
6406
|
return /* @__PURE__ */ jsxs(EventCalendarContext.Provider, { value: contextValue, children: [
|
|
5796
6407
|
/* @__PURE__ */ jsx("style", { href: "tcce-event-calendar", precedence: "default", children: eventCalendarStyles }),
|
|
5797
|
-
/* @__PURE__ */
|
|
6408
|
+
/* @__PURE__ */ jsxs(Popover, { open: !!selectedEvent && !!anchorRect, onOpenChange: handlePopoverOpenChange, children: [
|
|
6409
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "event-calendar", className: cn("sx-tcce w-full", className), children: /* @__PURE__ */ jsx(ScheduleXCalendar, { calendarApp: calendarApp ?? null }) }),
|
|
6410
|
+
anchorRect && /* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
6411
|
+
"span",
|
|
6412
|
+
{
|
|
6413
|
+
style: {
|
|
6414
|
+
position: "fixed",
|
|
6415
|
+
top: anchorRect.top,
|
|
6416
|
+
left: anchorRect.left,
|
|
6417
|
+
width: anchorRect.width,
|
|
6418
|
+
height: anchorRect.height,
|
|
6419
|
+
pointerEvents: "none"
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6422
|
+
) }),
|
|
6423
|
+
/* @__PURE__ */ jsx(
|
|
6424
|
+
PopoverContent,
|
|
6425
|
+
{
|
|
6426
|
+
side: "right",
|
|
6427
|
+
align: "start",
|
|
6428
|
+
className: "w-65 gap-2",
|
|
6429
|
+
onPointerDownOutside: (e) => {
|
|
6430
|
+
const target = e.target;
|
|
6431
|
+
const isEventEl = target.closest(
|
|
6432
|
+
".sx__month-grid-event, .sx__time-grid-event, .sx__month-agenda-event"
|
|
6433
|
+
);
|
|
6434
|
+
if (isEventEl) {
|
|
6435
|
+
e.preventDefault();
|
|
6436
|
+
clickedEventElRef.current = true;
|
|
6437
|
+
}
|
|
6438
|
+
},
|
|
6439
|
+
children: selectedEvent && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6440
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6441
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6442
|
+
/* @__PURE__ */ jsx(
|
|
6443
|
+
"span",
|
|
6444
|
+
{
|
|
6445
|
+
className: "size-2 shrink-0 rounded-full",
|
|
6446
|
+
style: {
|
|
6447
|
+
backgroundColor: EVENT_COLOR[selectedEvent.color ?? "default"]
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
),
|
|
6451
|
+
/* @__PURE__ */ jsx("span", { className: "font-heading text-sm font-semibold leading-tight", children: selectedEvent.title })
|
|
6452
|
+
] }),
|
|
6453
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Edit event", children: /* @__PURE__ */ jsx(Pencil, { size: 14 }) })
|
|
6454
|
+
] }),
|
|
6455
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
6456
|
+
/* @__PURE__ */ jsx(Clock, { size: 13, className: "shrink-0" }),
|
|
6457
|
+
/* @__PURE__ */ jsx("span", { children: formatEventTime(selectedEvent.start, selectedEvent.end) })
|
|
6458
|
+
] }),
|
|
6459
|
+
selectedEvent.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: selectedEvent.description })
|
|
6460
|
+
] })
|
|
6461
|
+
}
|
|
6462
|
+
)
|
|
6463
|
+
] })
|
|
5798
6464
|
] });
|
|
5799
6465
|
}
|
|
5800
6466
|
function useAppForm(schema, options) {
|
|
@@ -6136,18 +6802,6 @@ function TablePaginationBase({
|
|
|
6136
6802
|
);
|
|
6137
6803
|
}
|
|
6138
6804
|
var TablePagination = memo(TablePaginationBase);
|
|
6139
|
-
function useMediaQuery(query) {
|
|
6140
|
-
const [matches, setMatches] = useState(false);
|
|
6141
|
-
useEffect(() => {
|
|
6142
|
-
if (typeof window === "undefined") return;
|
|
6143
|
-
const mql = window.matchMedia(query);
|
|
6144
|
-
setMatches(mql.matches);
|
|
6145
|
-
const handler = (e) => setMatches(e.matches);
|
|
6146
|
-
mql.addEventListener("change", handler);
|
|
6147
|
-
return () => mql.removeEventListener("change", handler);
|
|
6148
|
-
}, [query]);
|
|
6149
|
-
return matches;
|
|
6150
|
-
}
|
|
6151
6805
|
var TableContext = createContext(null);
|
|
6152
6806
|
function useTableContext() {
|
|
6153
6807
|
const ctx = useContext(TableContext);
|
|
@@ -7705,6 +8359,228 @@ function DataTableSearch({
|
|
|
7705
8359
|
)
|
|
7706
8360
|
] });
|
|
7707
8361
|
}
|
|
8362
|
+
var DrawerContext = createContext(false);
|
|
8363
|
+
function Drawer({ children, open, onOpenChange, ...props }) {
|
|
8364
|
+
const [internalOpen, setInternalOpen] = useState(props.defaultOpen ?? false);
|
|
8365
|
+
const isOpen = open !== void 0 ? open : internalOpen;
|
|
8366
|
+
return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: isOpen, children: /* @__PURE__ */ jsx(
|
|
8367
|
+
Dialog$1.Root,
|
|
8368
|
+
{
|
|
8369
|
+
"data-slot": "drawer",
|
|
8370
|
+
...props,
|
|
8371
|
+
open: isOpen,
|
|
8372
|
+
onOpenChange: (v) => {
|
|
8373
|
+
setInternalOpen(v);
|
|
8374
|
+
onOpenChange?.(v);
|
|
8375
|
+
},
|
|
8376
|
+
children
|
|
8377
|
+
}
|
|
8378
|
+
) });
|
|
8379
|
+
}
|
|
8380
|
+
function DrawerTrigger({ ...props }) {
|
|
8381
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
8382
|
+
}
|
|
8383
|
+
function DrawerClose({ ...props }) {
|
|
8384
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "drawer-close", ...props });
|
|
8385
|
+
}
|
|
8386
|
+
function DrawerPortal({ children, ...props }) {
|
|
8387
|
+
const isOpen = useContext(DrawerContext);
|
|
8388
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { forceMount: true, ...props, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "sync", children: isOpen && children }) });
|
|
8389
|
+
}
|
|
8390
|
+
function DrawerOverlay({ className, ...props }) {
|
|
8391
|
+
return /* @__PURE__ */ jsx(Dialog$1.Overlay, { "data-slot": "drawer-overlay", asChild: true, forceMount: true, ...props, children: /* @__PURE__ */ jsx(
|
|
8392
|
+
motion.div,
|
|
8393
|
+
{
|
|
8394
|
+
className: cn(
|
|
8395
|
+
"fixed inset-0 isolate z-50 bg-black/30 supports-backdrop-filter:backdrop-blur-sm",
|
|
8396
|
+
className
|
|
8397
|
+
),
|
|
8398
|
+
initial: { opacity: 0 },
|
|
8399
|
+
animate: { opacity: 1 },
|
|
8400
|
+
exit: { opacity: 0 },
|
|
8401
|
+
transition: { duration: duration.normal, ease: ease.smooth }
|
|
8402
|
+
}
|
|
8403
|
+
) });
|
|
8404
|
+
}
|
|
8405
|
+
var sizeClasses = {
|
|
8406
|
+
sm: "w-64",
|
|
8407
|
+
md: "w-80",
|
|
8408
|
+
lg: "w-96",
|
|
8409
|
+
xl: "w-[30rem]",
|
|
8410
|
+
full: "w-screen"
|
|
8411
|
+
};
|
|
8412
|
+
function DrawerContent({
|
|
8413
|
+
className,
|
|
8414
|
+
children,
|
|
8415
|
+
side = "right",
|
|
8416
|
+
size = "md",
|
|
8417
|
+
showCloseButton = true,
|
|
8418
|
+
resizable = false,
|
|
8419
|
+
...props
|
|
8420
|
+
}) {
|
|
8421
|
+
const isHorizontal = side === "left" || side === "right";
|
|
8422
|
+
const xInitial = side === "right" ? "100%" : side === "left" ? "-100%" : 0;
|
|
8423
|
+
const yInitial = side === "bottom" ? "100%" : side === "top" ? "-100%" : 0;
|
|
8424
|
+
const dragRef = useRef(null);
|
|
8425
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
8426
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
8427
|
+
/* @__PURE__ */ jsx(
|
|
8428
|
+
Dialog$1.Content,
|
|
8429
|
+
{
|
|
8430
|
+
"data-slot": "drawer-content",
|
|
8431
|
+
"data-side": side,
|
|
8432
|
+
asChild: true,
|
|
8433
|
+
forceMount: true,
|
|
8434
|
+
className: cn(
|
|
8435
|
+
"fixed z-50 flex flex-col bg-popover text-popover-foreground shadow-xl outline-none",
|
|
8436
|
+
side === "left" && "inset-y-0 left-0",
|
|
8437
|
+
side === "right" && "inset-y-0 right-0",
|
|
8438
|
+
side === "top" && "inset-x-0 top-0",
|
|
8439
|
+
side === "bottom" && "inset-x-0 bottom-0",
|
|
8440
|
+
isHorizontal && sizeClasses[size],
|
|
8441
|
+
!isHorizontal && "h-auto min-h-40",
|
|
8442
|
+
className
|
|
8443
|
+
),
|
|
8444
|
+
...props,
|
|
8445
|
+
children: /* @__PURE__ */ jsxs(
|
|
8446
|
+
motion.div,
|
|
8447
|
+
{
|
|
8448
|
+
className: cn("flex flex-col", isHorizontal && "h-full"),
|
|
8449
|
+
initial: { x: xInitial, y: yInitial, opacity: 0 },
|
|
8450
|
+
animate: { x: 0, y: 0, opacity: 1 },
|
|
8451
|
+
exit: { x: xInitial, y: yInitial, opacity: 0 },
|
|
8452
|
+
transition: transition.sidebar,
|
|
8453
|
+
children: [
|
|
8454
|
+
children,
|
|
8455
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "drawer-close", asChild: true, children: /* @__PURE__ */ jsxs(
|
|
8456
|
+
Button,
|
|
8457
|
+
{
|
|
8458
|
+
variant: "ghost",
|
|
8459
|
+
className: "absolute top-4 right-4",
|
|
8460
|
+
size: "icon-sm",
|
|
8461
|
+
children: [
|
|
8462
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
8463
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
8464
|
+
]
|
|
8465
|
+
}
|
|
8466
|
+
) }),
|
|
8467
|
+
resizable && /* @__PURE__ */ jsx(
|
|
8468
|
+
"div",
|
|
8469
|
+
{
|
|
8470
|
+
"data-slot": "drawer-resize-handle",
|
|
8471
|
+
className: cn(
|
|
8472
|
+
"absolute opacity-0 transition-opacity hover:opacity-100 hover:bg-border",
|
|
8473
|
+
side === "right" && "inset-y-0 left-0 w-1 cursor-col-resize",
|
|
8474
|
+
side === "left" && "inset-y-0 right-0 w-1 cursor-col-resize",
|
|
8475
|
+
side === "top" && "inset-x-0 bottom-0 h-1 cursor-row-resize",
|
|
8476
|
+
side === "bottom" && "inset-x-0 top-0 h-1 cursor-row-resize"
|
|
8477
|
+
),
|
|
8478
|
+
onPointerDown: (e) => {
|
|
8479
|
+
e.preventDefault();
|
|
8480
|
+
const content = e.currentTarget.parentElement;
|
|
8481
|
+
if (!content) return;
|
|
8482
|
+
const startSize = isHorizontal ? parseFloat(getComputedStyle(content).width) : parseFloat(getComputedStyle(content).height);
|
|
8483
|
+
content.style.transition = "none";
|
|
8484
|
+
dragRef.current = {
|
|
8485
|
+
startPos: isHorizontal ? e.clientX : e.clientY,
|
|
8486
|
+
startSize,
|
|
8487
|
+
content
|
|
8488
|
+
};
|
|
8489
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
8490
|
+
},
|
|
8491
|
+
onPointerMove: (e) => {
|
|
8492
|
+
if (!dragRef.current) return;
|
|
8493
|
+
const { startPos, startSize, content } = dragRef.current;
|
|
8494
|
+
const delta = (isHorizontal ? e.clientX : e.clientY) - startPos;
|
|
8495
|
+
let newSize;
|
|
8496
|
+
if (side === "right") {
|
|
8497
|
+
newSize = Math.max(160, Math.min(window.innerWidth * 0.9, startSize - delta));
|
|
8498
|
+
} else if (side === "left") {
|
|
8499
|
+
newSize = Math.max(160, Math.min(window.innerWidth * 0.9, startSize + delta));
|
|
8500
|
+
} else if (side === "bottom") {
|
|
8501
|
+
newSize = Math.max(80, Math.min(window.innerHeight * 0.9, startSize - delta));
|
|
8502
|
+
} else {
|
|
8503
|
+
newSize = Math.max(80, Math.min(window.innerHeight * 0.9, startSize + delta));
|
|
8504
|
+
}
|
|
8505
|
+
content.style[isHorizontal ? "width" : "height"] = `${newSize}px`;
|
|
8506
|
+
},
|
|
8507
|
+
onPointerUp: () => {
|
|
8508
|
+
if (dragRef.current?.content) {
|
|
8509
|
+
dragRef.current.content.style.transition = "";
|
|
8510
|
+
}
|
|
8511
|
+
dragRef.current = null;
|
|
8512
|
+
},
|
|
8513
|
+
onPointerCancel: () => {
|
|
8514
|
+
if (dragRef.current?.content) {
|
|
8515
|
+
dragRef.current.content.style.transition = "";
|
|
8516
|
+
}
|
|
8517
|
+
dragRef.current = null;
|
|
8518
|
+
}
|
|
8519
|
+
}
|
|
8520
|
+
)
|
|
8521
|
+
]
|
|
8522
|
+
}
|
|
8523
|
+
)
|
|
8524
|
+
}
|
|
8525
|
+
)
|
|
8526
|
+
] });
|
|
8527
|
+
}
|
|
8528
|
+
function DrawerHeader({ className, ...props }) {
|
|
8529
|
+
return /* @__PURE__ */ jsx(
|
|
8530
|
+
"div",
|
|
8531
|
+
{
|
|
8532
|
+
"data-slot": "drawer-header",
|
|
8533
|
+
className: cn("flex shrink-0 flex-col gap-1.5 p-6", className),
|
|
8534
|
+
...props
|
|
8535
|
+
}
|
|
8536
|
+
);
|
|
8537
|
+
}
|
|
8538
|
+
function DrawerBody({ className, ...props }) {
|
|
8539
|
+
return /* @__PURE__ */ jsx(
|
|
8540
|
+
"div",
|
|
8541
|
+
{
|
|
8542
|
+
"data-slot": "drawer-body",
|
|
8543
|
+
className: cn("flex-1 overflow-y-auto px-6 pb-6", className),
|
|
8544
|
+
...props
|
|
8545
|
+
}
|
|
8546
|
+
);
|
|
8547
|
+
}
|
|
8548
|
+
function DrawerFooter({ className, ...props }) {
|
|
8549
|
+
return /* @__PURE__ */ jsx(
|
|
8550
|
+
"div",
|
|
8551
|
+
{
|
|
8552
|
+
"data-slot": "drawer-footer",
|
|
8553
|
+
className: cn(
|
|
8554
|
+
"border-border mt-auto flex shrink-0 flex-wrap items-center justify-end gap-2 border-t px-6 py-4",
|
|
8555
|
+
className
|
|
8556
|
+
),
|
|
8557
|
+
...props
|
|
8558
|
+
}
|
|
8559
|
+
);
|
|
8560
|
+
}
|
|
8561
|
+
function DrawerTitle({ className, ...props }) {
|
|
8562
|
+
return /* @__PURE__ */ jsx(
|
|
8563
|
+
Dialog$1.Title,
|
|
8564
|
+
{
|
|
8565
|
+
"data-slot": "drawer-title",
|
|
8566
|
+
className: cn("font-heading text-base leading-none font-semibold", className),
|
|
8567
|
+
...props
|
|
8568
|
+
}
|
|
8569
|
+
);
|
|
8570
|
+
}
|
|
8571
|
+
function DrawerDescription({
|
|
8572
|
+
className,
|
|
8573
|
+
...props
|
|
8574
|
+
}) {
|
|
8575
|
+
return /* @__PURE__ */ jsx(
|
|
8576
|
+
Dialog$1.Description,
|
|
8577
|
+
{
|
|
8578
|
+
"data-slot": "drawer-description",
|
|
8579
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
8580
|
+
...props
|
|
8581
|
+
}
|
|
8582
|
+
);
|
|
8583
|
+
}
|
|
7708
8584
|
function TCCEProvider({
|
|
7709
8585
|
children,
|
|
7710
8586
|
permissions,
|
|
@@ -7714,6 +8590,6 @@ function TCCEProvider({
|
|
|
7714
8590
|
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: tooltipDelayDuration, children: /* @__PURE__ */ jsx(AbilityProvider, { permissions, children: /* @__PURE__ */ jsx(Toaster, { position: toasterPosition, children }) }) });
|
|
7715
8591
|
}
|
|
7716
8592
|
|
|
7717
|
-
export { AbilityProvider, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button,
|
|
8593
|
+
export { AbilityProvider, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Can, CanNot, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, ColorPicker, ColorPickerAlpha, ColorPickerEyeDropper, ColorPickerFormat, ColorPickerHue, ColorPickerOutput, ColorPickerPresets, ColorPickerSelection, Combobox, DataTable, DataTableCardView, DataTableColumnFilter, DataTableFooter, DataTableHeaderCell, DataTableRowActions, DataTableSearch, DataTableSkeleton, DataTableToolbar, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EventCalendar, Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FilterOption, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, Link, Logo, MiniCalendar, MiniCalendarDay, MiniCalendarDays, MiniCalendarNavigation, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PinInput, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, SpinnerDots, SpinnerLoader, Status, StatusIndicator, StatusLabel, Switch, TCCEProvider, TEXT_SIZES, TEXT_WEIGHTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TablePagination, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, Toaster, Toggle, ToggleGroup2 as ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, animation, avatarVariants, badgeVariants2 as badgeVariants, buttonVariants, columnFiltersToArrayQueryParams, columnFiltersToJsonString, columnFiltersToQueryParams, columnFiltersToRecord, createBackendParams, createBackendParamsWithFilters, duration, ease, fadeIn, getActiveFilterCount, getActiveFilterValues, getColumnValueCounts, getUniqueColumnValues, hasActiveFilters, linkVariants, logos, matchPermission, mergeFilters, multiSelectFilter, navigationMenuTriggerStyle, parseJsonToFilters, parseQueryParamsToFilters, progressIndicatorVariants, progressVariants, scaleIn, searchInArray, skeletonVariants, slideRight, slideUp, sortRecordToSortingState, sortingStateToJsonString, sortingStateToRecord, spinnerDotsVariants, spinnerLoaderVariants, spinnerVariants, spring, stagger, toggleVariants, tooltipContentVariants, transition, useAbility, useAppForm, useCan, useCarousel, useColorPicker, useColumnFilter, useSidebar, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
|
|
7718
8594
|
//# sourceMappingURL=main.js.map
|
|
7719
8595
|
//# sourceMappingURL=main.js.map
|