@bizapps/design-system-testing 1.0.6 → 1.0.8

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/main.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { SearchIcon, BellIcon, CircleHelpIcon, Menu, ChevronDownIcon, LoaderCircle, ChevronLeftIcon, MoreHorizontalIcon, ChevronRightIcon, MinusIcon, CheckIcon, ChevronUpIcon, X, ArrowLeft, ArrowRight, ExternalLinkIcon, XIcon, ChevronsUpDownIcon, UploadIcon, Loader2Icon, LoaderIcon, PipetteIcon, CalendarIcon, Funnel, ArrowUp, ArrowDown, ArrowUpDown, Ellipsis, Rows2, Eye, Search, House, Plane, Wallet, LayoutDashboardIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, CircleCheckIcon } from 'lucide-react';
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, 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, Children, isValidElement, cloneElement, useId, useContext, useLayoutEffect } from 'react';
8
- import { Slot, Avatar as Avatar$1, Checkbox as Checkbox$1, Select as Select$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';
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, 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';
9
9
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
10
10
  import { isSameDay, isToday, format, addDays } from 'date-fns';
11
11
  import useEmblaCarousel from 'embla-carousel-react';
@@ -399,7 +399,7 @@ var buttonVariants = cva(
399
399
  primary: "cursor-pointer bg-primary text-primary-foreground hover:bg-primary/80 focus-visible:ring-primary/30",
400
400
  secondary: "cursor-pointer bg-secondary text-secondary-foreground hover:bg-[var(--color-orange-700)] focus-visible:ring-secondary/30",
401
401
  cancel: "cursor-pointer bg-destructive text-secondary-foreground hover:bg-[var(--color-red-600)] focus-visible:ring-destructive/30",
402
- outline: " border-2 border-foreground/50 bg-transparent text-muted-foreground hover:bg-foreground/50 hover:text-white",
402
+ outline: "border border-foreground/50 bg-transparent text-muted-foreground hover:bg-foreground/50 hover:text-white",
403
403
  ghost: "cursor-pointer bg-transparent text-muted-foreground hover:bg-foreground/10 hover:text-primary focus-visible:ring-ring/30 border-none",
404
404
  cancelGhost: "cursor-pointer bg-destructive/10 text-red-600 hover:bg-destructive/15 hover:text-red-600 focus-visible:ring-ring/30"
405
405
  },
@@ -999,7 +999,7 @@ function CarouselPrevious({
999
999
  variant,
1000
1000
  size,
1001
1001
  className: cn(
1002
- "absolute touch-manipulation",
1002
+ "cursor-pointer hover:bg-foreground/5 hover:text-foreground font-border border-solid border-foreground/10 absolute touch-manipulation",
1003
1003
  orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
1004
1004
  className
1005
1005
  ),
@@ -1008,7 +1008,7 @@ function CarouselPrevious({
1008
1008
  "aria-label": "Previous slide",
1009
1009
  ...props,
1010
1010
  children: [
1011
- /* @__PURE__ */ jsx(ArrowLeft, { className: "size-4", "aria-hidden": "true" }),
1011
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4", "aria-hidden": "true" }),
1012
1012
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
1013
1013
  ]
1014
1014
  }
@@ -1028,7 +1028,7 @@ function CarouselNext({
1028
1028
  variant,
1029
1029
  size,
1030
1030
  className: cn(
1031
- "absolute touch-manipulation",
1031
+ "cursor-pointer hover:bg-foreground/5 hover:text-foreground border border-solid border-foreground/10 absolute touch-manipulation",
1032
1032
  orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
1033
1033
  className
1034
1034
  ),
@@ -1037,7 +1037,7 @@ function CarouselNext({
1037
1037
  "aria-label": "Next slide",
1038
1038
  ...props,
1039
1039
  children: [
1040
- /* @__PURE__ */ jsx(ArrowRight, { className: "size-4", "aria-hidden": "true" }),
1040
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-4", "aria-hidden": "true" }),
1041
1041
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
1042
1042
  ]
1043
1043
  }
@@ -3067,7 +3067,7 @@ var DropzoneContext = createContext(void 0);
3067
3067
  var dropzoneVariants = cva("", {
3068
3068
  variants: {
3069
3069
  border: {
3070
- default: "border-solid",
3070
+ default: "border border-solid border-foreground/15",
3071
3071
  dashed: "border-dashed border-foreground/50"
3072
3072
  }
3073
3073
  },
@@ -3117,14 +3117,14 @@ var Dropzone = ({
3117
3117
  "data-slot": "dropzone",
3118
3118
  "data-border": border ?? "default",
3119
3119
  className: cn(
3120
- "relative h-auto w-full flex-col overflow-hidden p-8",
3120
+ "cursor-auto relative h-auto w-full flex-col overflow-hidden p-8",
3121
3121
  dropzoneVariants({ border }),
3122
- isDragActive && "bg-muted outline-none",
3122
+ isDragActive && "bg-foreground/10 outline-none",
3123
3123
  className
3124
3124
  ),
3125
3125
  disabled,
3126
3126
  type: "button",
3127
- variant: "outline",
3127
+ variant: "ghost",
3128
3128
  ...getRootProps(),
3129
3129
  children: [
3130
3130
  /* @__PURE__ */ jsx("input", { ...getInputProps(), disabled }),
@@ -4728,65 +4728,228 @@ function CanNot({ permission, mode = "any", fallback = null, children }) {
4728
4728
  return /* @__PURE__ */ jsx(Can, { permission, mode, negate: true, fallback, children });
4729
4729
  }
4730
4730
  CanNot.displayName = "CanNot";
4731
- var SidebarContext = createContext({
4732
- open: true,
4733
- setOpen: () => {
4734
- },
4735
- isMobile: false
4736
- });
4737
- function useSidebar() {
4738
- return useContext(SidebarContext);
4731
+ var MOBILE_BREAKPOINT = 768;
4732
+ function useIsMobile() {
4733
+ const [isMobile, setIsMobile] = useState(void 0);
4734
+ useEffect(() => {
4735
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
4736
+ const onChange = () => {
4737
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4738
+ };
4739
+ mql.addEventListener("change", onChange);
4740
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4741
+ return () => mql.removeEventListener("change", onChange);
4742
+ }, []);
4743
+ return !!isMobile;
4739
4744
  }
4740
- var SidebarProvider = forwardRef(
4741
- ({ defaultOpen = true, open: controlledOpen, onOpenChange, className, children, ...props }, ref) => {
4742
- const [internalOpen, setInternalOpen] = useState(defaultOpen);
4743
- const [isMobile, setIsMobile] = useState(false);
4744
- const containerRef = useRef(null);
4745
- const open = controlledOpen ?? internalOpen;
4746
- const setOpen = useCallback(
4747
- (value) => {
4748
- setInternalOpen(value);
4749
- onOpenChange?.(value);
4750
- },
4751
- [onOpenChange]
4752
- );
4753
- useEffect(() => {
4754
- const check = () => {
4755
- const el = containerRef.current;
4756
- if (el) setIsMobile(el.offsetWidth < 768);
4757
- };
4758
- check();
4759
- const ro = new ResizeObserver(check);
4760
- if (containerRef.current) ro.observe(containerRef.current);
4761
- return () => ro.disconnect();
4762
- }, []);
4763
- return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { open, setOpen, isMobile }, children: /* @__PURE__ */ jsx(
4764
- "div",
4745
+ function Sheet({ ...props }) {
4746
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "sheet", ...props });
4747
+ }
4748
+ function SheetTrigger({ ...props }) {
4749
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "sheet-trigger", ...props });
4750
+ }
4751
+ function SheetClose({ ...props }) {
4752
+ return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", ...props });
4753
+ }
4754
+ function SheetPortal({ ...props }) {
4755
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "sheet-portal", ...props });
4756
+ }
4757
+ function SheetOverlay({
4758
+ className,
4759
+ ...props
4760
+ }) {
4761
+ return /* @__PURE__ */ jsx(
4762
+ Dialog$1.Overlay,
4763
+ {
4764
+ "data-slot": "sheet-overlay",
4765
+ className: cn(
4766
+ "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",
4767
+ className
4768
+ ),
4769
+ ...props
4770
+ }
4771
+ );
4772
+ }
4773
+ function SheetContent({
4774
+ className,
4775
+ children,
4776
+ side = "right",
4777
+ showCloseButton = true,
4778
+ ...props
4779
+ }) {
4780
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
4781
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
4782
+ /* @__PURE__ */ jsxs(
4783
+ Dialog$1.Content,
4765
4784
  {
4766
- ref: (node) => {
4767
- containerRef.current = node;
4768
- if (typeof ref === "function") ref(node);
4769
- else if (ref) ref.current = node;
4770
- },
4771
- className: cn("flex h-full w-full overflow-hidden", className),
4785
+ "data-slot": "sheet-content",
4786
+ "data-side": side,
4787
+ className: cn(
4788
+ "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",
4789
+ className
4790
+ ),
4772
4791
  ...props,
4773
- children
4792
+ children: [
4793
+ children,
4794
+ 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: [
4795
+ /* @__PURE__ */ jsx(XIcon, {}),
4796
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
4797
+ ] }) })
4798
+ ]
4774
4799
  }
4775
- ) });
4800
+ )
4801
+ ] });
4802
+ }
4803
+ function SheetHeader({ className, ...props }) {
4804
+ return /* @__PURE__ */ jsx(
4805
+ "div",
4806
+ {
4807
+ "data-slot": "sheet-header",
4808
+ className: cn("flex flex-col gap-1.5 p-6", className),
4809
+ ...props
4810
+ }
4811
+ );
4812
+ }
4813
+ function SheetFooter({ className, ...props }) {
4814
+ return /* @__PURE__ */ jsx(
4815
+ "div",
4816
+ {
4817
+ "data-slot": "sheet-footer",
4818
+ className: cn("mt-auto flex flex-col gap-2 p-6", className),
4819
+ ...props
4820
+ }
4821
+ );
4822
+ }
4823
+ function SheetTitle({
4824
+ className,
4825
+ ...props
4826
+ }) {
4827
+ return /* @__PURE__ */ jsx(
4828
+ Dialog$1.Title,
4829
+ {
4830
+ "data-slot": "sheet-title",
4831
+ className: cn("text-base font-medium text-foreground", className),
4832
+ ...props
4833
+ }
4834
+ );
4835
+ }
4836
+ function SheetDescription({
4837
+ className,
4838
+ ...props
4839
+ }) {
4840
+ return /* @__PURE__ */ jsx(
4841
+ Dialog$1.Description,
4842
+ {
4843
+ "data-slot": "sheet-description",
4844
+ className: cn("text-sm text-muted-foreground", className),
4845
+ ...props
4846
+ }
4847
+ );
4848
+ }
4849
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
4850
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
4851
+ var SIDEBAR_WIDTH = "16rem";
4852
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
4853
+ var SIDEBAR_WIDTH_ICON = "3rem";
4854
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
4855
+ var SidebarContext = createContext(null);
4856
+ function useSidebar() {
4857
+ const context = useContext(SidebarContext);
4858
+ if (!context) {
4859
+ throw new Error("useSidebar must be used within a SidebarProvider.");
4776
4860
  }
4777
- );
4778
- SidebarProvider.displayName = "SidebarProvider";
4779
- var Sidebar = forwardRef(
4780
- ({ collapsible = "offcanvas", className, children, ...props }, ref) => {
4781
- const { open } = useSidebar();
4861
+ return context;
4862
+ }
4863
+ function SidebarProvider({
4864
+ defaultOpen = true,
4865
+ open: openProp,
4866
+ onOpenChange: setOpenProp,
4867
+ className,
4868
+ style,
4869
+ children,
4870
+ ...props
4871
+ }) {
4872
+ const isMobile = useIsMobile();
4873
+ const [openMobile, setOpenMobile] = useState(false);
4874
+ const [_open, _setOpen] = useState(defaultOpen);
4875
+ const open = openProp ?? _open;
4876
+ const setOpen = useCallback(
4877
+ (value) => {
4878
+ const openState = typeof value === "function" ? value(open) : value;
4879
+ if (setOpenProp) {
4880
+ setOpenProp(openState);
4881
+ } else {
4882
+ _setOpen(openState);
4883
+ }
4884
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}; SameSite=Lax; Secure`;
4885
+ },
4886
+ [setOpenProp, open]
4887
+ );
4888
+ const toggleSidebar = useCallback(() => {
4889
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
4890
+ }, [isMobile, setOpen, setOpenMobile]);
4891
+ useEffect(() => {
4892
+ const handleKeyDown = (event) => {
4893
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
4894
+ const target = event.target;
4895
+ if (target.isContentEditable || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT") {
4896
+ return;
4897
+ }
4898
+ event.preventDefault();
4899
+ toggleSidebar();
4900
+ }
4901
+ };
4902
+ window.addEventListener("keydown", handleKeyDown);
4903
+ return () => window.removeEventListener("keydown", handleKeyDown);
4904
+ }, [toggleSidebar]);
4905
+ const state = open ? "expanded" : "collapsed";
4906
+ const contextValue = useMemo(
4907
+ () => ({
4908
+ state,
4909
+ open,
4910
+ setOpen,
4911
+ isMobile,
4912
+ openMobile,
4913
+ setOpenMobile,
4914
+ toggleSidebar
4915
+ }),
4916
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
4917
+ );
4918
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
4919
+ "div",
4920
+ {
4921
+ "data-slot": "sidebar-wrapper",
4922
+ style: {
4923
+ "--sidebar-width": SIDEBAR_WIDTH,
4924
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
4925
+ ...style
4926
+ },
4927
+ className: cn(
4928
+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-dvh w-full",
4929
+ className
4930
+ ),
4931
+ ...props,
4932
+ children
4933
+ }
4934
+ ) });
4935
+ }
4936
+ function Sidebar({
4937
+ side = "left",
4938
+ variant = "sidebar",
4939
+ collapsible = "offcanvas",
4940
+ className,
4941
+ children,
4942
+ dir,
4943
+ ...props
4944
+ }) {
4945
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
4946
+ if (collapsible === "none") {
4782
4947
  return /* @__PURE__ */ jsx(
4783
4948
  "div",
4784
4949
  {
4785
- ref,
4786
- "data-state": open ? "expanded" : "collapsed",
4950
+ "data-slot": "sidebar",
4787
4951
  className: cn(
4788
- "bg-sidebar text-sidebar-foreground border-sidebar-border relative flex h-full shrink-0 flex-col border-r transition-all duration-300 ease-in-out",
4789
- open ? "w-64" : collapsible === "icon" ? "w-12" : "w-0 overflow-hidden",
4952
+ "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
4790
4953
  className
4791
4954
  ),
4792
4955
  ...props,
@@ -4794,154 +4957,455 @@ var Sidebar = forwardRef(
4794
4957
  }
4795
4958
  );
4796
4959
  }
4797
- );
4798
- Sidebar.displayName = "Sidebar";
4799
- var SidebarTrigger = forwardRef(({ className, onClick, ...props }, ref) => {
4800
- const { open, setOpen } = useSidebar();
4960
+ if (isMobile) {
4961
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
4962
+ SheetContent,
4963
+ {
4964
+ dir,
4965
+ "data-sidebar": "sidebar",
4966
+ "data-slot": "sidebar",
4967
+ "data-mobile": "true",
4968
+ showCloseButton: false,
4969
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0",
4970
+ style: {
4971
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
4972
+ },
4973
+ side,
4974
+ children: [
4975
+ /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
4976
+ /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
4977
+ /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
4978
+ ] }),
4979
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
4980
+ ]
4981
+ }
4982
+ ) });
4983
+ }
4984
+ return /* @__PURE__ */ jsxs(
4985
+ "div",
4986
+ {
4987
+ className: "group peer text-sidebar-foreground hidden md:block",
4988
+ "data-state": state,
4989
+ "data-collapsible": state === "collapsed" ? collapsible : "",
4990
+ "data-variant": variant,
4991
+ "data-side": side,
4992
+ "data-slot": "sidebar",
4993
+ children: [
4994
+ /* @__PURE__ */ jsx(
4995
+ "div",
4996
+ {
4997
+ "data-slot": "sidebar-gap",
4998
+ className: cn(
4999
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
5000
+ "group-data-[collapsible=offcanvas]:w-0",
5001
+ "group-data-[side=right]:rotate-180",
5002
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
5003
+ )
5004
+ }
5005
+ ),
5006
+ /* @__PURE__ */ jsx(
5007
+ "div",
5008
+ {
5009
+ "data-slot": "sidebar-container",
5010
+ "data-side": side,
5011
+ className: cn(
5012
+ "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",
5013
+ // Adjust the padding for floating and inset variants.
5014
+ 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",
5015
+ className
5016
+ ),
5017
+ ...props,
5018
+ children: /* @__PURE__ */ jsx(
5019
+ "div",
5020
+ {
5021
+ "data-sidebar": "sidebar",
5022
+ "data-slot": "sidebar-inner",
5023
+ 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",
5024
+ children
5025
+ }
5026
+ )
5027
+ }
5028
+ )
5029
+ ]
5030
+ }
5031
+ );
5032
+ }
5033
+ function SidebarTrigger({ className, onClick, ...props }) {
5034
+ const { toggleSidebar } = useSidebar();
4801
5035
  return /* @__PURE__ */ jsxs(
4802
5036
  Button,
4803
5037
  {
4804
- ref,
4805
- variant: "ghost",
4806
- size: "md",
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
- ]
5038
+ "data-sidebar": "trigger",
5039
+ "data-slot": "sidebar-trigger",
5040
+ variant: "ghost",
5041
+ size: "icon-sm",
5042
+ className: cn(className),
5043
+ onClick: (event) => {
5044
+ onClick?.(event);
5045
+ toggleSidebar();
5046
+ },
5047
+ ...props,
5048
+ children: [
5049
+ /* @__PURE__ */ jsx(MenuIcon, {}),
5050
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
5051
+ ]
5052
+ }
5053
+ );
5054
+ }
5055
+ function SidebarRail({ className, ...props }) {
5056
+ const { toggleSidebar } = useSidebar();
5057
+ return /* @__PURE__ */ jsx(
5058
+ "button",
5059
+ {
5060
+ "data-sidebar": "rail",
5061
+ "data-slot": "sidebar-rail",
5062
+ "aria-label": "Toggle Sidebar",
5063
+ tabIndex: -1,
5064
+ onClick: toggleSidebar,
5065
+ title: "Toggle Sidebar",
5066
+ className: cn(
5067
+ "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",
5068
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
5069
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
5070
+ "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
5071
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
5072
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
5073
+ className
5074
+ ),
5075
+ ...props
5076
+ }
5077
+ );
5078
+ }
5079
+ function SidebarInset({ className, ...props }) {
5080
+ return /* @__PURE__ */ jsx(
5081
+ "main",
5082
+ {
5083
+ "data-slot": "sidebar-inset",
5084
+ className: cn(
5085
+ "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",
5086
+ className
5087
+ ),
5088
+ ...props
5089
+ }
5090
+ );
5091
+ }
5092
+ function SidebarInput({ className, ...props }) {
5093
+ return /* @__PURE__ */ jsx(
5094
+ Input,
5095
+ {
5096
+ "data-slot": "sidebar-input",
5097
+ "data-sidebar": "input",
5098
+ className: cn("bg-input/50 h-8 w-full shadow-none", className),
5099
+ ...props
5100
+ }
5101
+ );
5102
+ }
5103
+ function SidebarHeader({ className, ...props }) {
5104
+ return /* @__PURE__ */ jsx(
5105
+ "div",
5106
+ {
5107
+ "data-slot": "sidebar-header",
5108
+ "data-sidebar": "header",
5109
+ className: cn("flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]", className),
5110
+ ...props
5111
+ }
5112
+ );
5113
+ }
5114
+ function SidebarFooter({ className, ...props }) {
5115
+ return /* @__PURE__ */ jsx(
5116
+ "div",
5117
+ {
5118
+ "data-slot": "sidebar-footer",
5119
+ "data-sidebar": "footer",
5120
+ className: cn("flex flex-col gap-2 p-2", className),
5121
+ ...props
5122
+ }
5123
+ );
5124
+ }
5125
+ function SidebarSeparator({ className, ...props }) {
5126
+ return /* @__PURE__ */ jsx(
5127
+ Separator,
5128
+ {
5129
+ "data-slot": "sidebar-separator",
5130
+ "data-sidebar": "separator",
5131
+ className: cn("bg-sidebar-border mx-2 w-auto", className),
5132
+ ...props
5133
+ }
5134
+ );
5135
+ }
5136
+ function SidebarContent({ className, ...props }) {
5137
+ return /* @__PURE__ */ jsx(
5138
+ "div",
5139
+ {
5140
+ "data-slot": "sidebar-content",
5141
+ "data-sidebar": "content",
5142
+ className: cn(
5143
+ "no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden",
5144
+ className
5145
+ ),
5146
+ ...props
5147
+ }
5148
+ );
5149
+ }
5150
+ function SidebarGroup({ className, ...props }) {
5151
+ return /* @__PURE__ */ jsx(
5152
+ "div",
5153
+ {
5154
+ "data-slot": "sidebar-group",
5155
+ "data-sidebar": "group",
5156
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
5157
+ ...props
5158
+ }
5159
+ );
5160
+ }
5161
+ function SidebarGroupLabel({
5162
+ className,
5163
+ asChild = false,
5164
+ ...props
5165
+ }) {
5166
+ const Comp = asChild ? Slot.Root : "div";
5167
+ return /* @__PURE__ */ jsx(
5168
+ Comp,
5169
+ {
5170
+ "data-slot": "sidebar-group-label",
5171
+ "data-sidebar": "group-label",
5172
+ className: cn(
5173
+ "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",
5174
+ className
5175
+ ),
5176
+ ...props
5177
+ }
5178
+ );
5179
+ }
5180
+ function SidebarGroupAction({
5181
+ className,
5182
+ asChild = false,
5183
+ ...props
5184
+ }) {
5185
+ const Comp = asChild ? Slot.Root : "button";
5186
+ return /* @__PURE__ */ jsx(
5187
+ Comp,
5188
+ {
5189
+ "data-slot": "sidebar-group-action",
5190
+ "data-sidebar": "group-action",
5191
+ className: cn(
5192
+ "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",
5193
+ className
5194
+ ),
5195
+ ...props
5196
+ }
5197
+ );
5198
+ }
5199
+ function SidebarGroupContent({ className, ...props }) {
5200
+ return /* @__PURE__ */ jsx(
5201
+ "div",
5202
+ {
5203
+ "data-slot": "sidebar-group-content",
5204
+ "data-sidebar": "group-content",
5205
+ className: cn("w-full text-sm", className),
5206
+ ...props
5207
+ }
5208
+ );
5209
+ }
5210
+ function SidebarMenu({ className, ...props }) {
5211
+ return /* @__PURE__ */ jsx(
5212
+ "ul",
5213
+ {
5214
+ "data-slot": "sidebar-menu",
5215
+ "data-sidebar": "menu",
5216
+ className: cn("flex w-full min-w-0 flex-col gap-0.5", className),
5217
+ ...props
5218
+ }
5219
+ );
5220
+ }
5221
+ function SidebarMenuItem({ className, ...props }) {
5222
+ return /* @__PURE__ */ jsx(
5223
+ "li",
5224
+ {
5225
+ "data-slot": "sidebar-menu-item",
5226
+ "data-sidebar": "menu-item",
5227
+ className: cn("group/menu-item relative", className),
5228
+ ...props
5229
+ }
5230
+ );
5231
+ }
5232
+ var sidebarMenuButtonVariants = cva(
5233
+ "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",
5234
+ {
5235
+ variants: {
5236
+ variant: {
5237
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
5238
+ 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)]"
5239
+ },
5240
+ size: {
5241
+ default: "h-9 text-sm",
5242
+ sm: "h-8 text-xs",
5243
+ lg: "h-14 px-3 text-sm group-data-[collapsible=icon]:p-0!"
5244
+ }
5245
+ },
5246
+ defaultVariants: {
5247
+ variant: "default",
5248
+ size: "default"
5249
+ }
5250
+ }
5251
+ );
5252
+ function SidebarMenuButton({
5253
+ asChild = false,
5254
+ isActive = false,
5255
+ variant = "default",
5256
+ size = "default",
5257
+ tooltip,
5258
+ className,
5259
+ ...props
5260
+ }) {
5261
+ const Comp = asChild ? Slot.Root : "button";
5262
+ const { isMobile, state } = useSidebar();
5263
+ const button = /* @__PURE__ */ jsx(
5264
+ Comp,
5265
+ {
5266
+ "data-slot": "sidebar-menu-button",
5267
+ "data-sidebar": "menu-button",
5268
+ "data-size": size,
5269
+ "data-active": isActive,
5270
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
5271
+ ...props
5272
+ }
5273
+ );
5274
+ if (!tooltip) {
5275
+ return button;
5276
+ }
5277
+ if (typeof tooltip === "string") {
5278
+ tooltip = {
5279
+ children: tooltip
5280
+ };
5281
+ }
5282
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
5283
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
5284
+ /* @__PURE__ */ jsx(
5285
+ TooltipContent,
5286
+ {
5287
+ side: "right",
5288
+ align: "center",
5289
+ hidden: state !== "collapsed" || isMobile,
5290
+ ...tooltip
5291
+ }
5292
+ )
5293
+ ] });
5294
+ }
5295
+ function SidebarMenuAction({
5296
+ className,
5297
+ asChild = false,
5298
+ showOnHover = false,
5299
+ ...props
5300
+ }) {
5301
+ const Comp = asChild ? Slot.Root : "button";
5302
+ return /* @__PURE__ */ jsx(
5303
+ Comp,
5304
+ {
5305
+ "data-slot": "sidebar-menu-action",
5306
+ "data-sidebar": "menu-action",
5307
+ className: cn(
5308
+ "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",
5309
+ 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",
5310
+ className
5311
+ ),
5312
+ ...props
4817
5313
  }
4818
5314
  );
4819
- });
4820
- SidebarTrigger.displayName = "SidebarTrigger";
4821
- var SidebarHeader = forwardRef(
4822
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5315
+ }
5316
+ function SidebarMenuBadge({ className, ...props }) {
5317
+ return /* @__PURE__ */ jsx(
4823
5318
  "div",
4824
5319
  {
4825
- ref,
4826
- "data-slot": "sidebar-header",
4827
- className: cn("flex shrink-0 flex-col gap-2 p-3", className),
5320
+ "data-slot": "sidebar-menu-badge",
5321
+ "data-sidebar": "menu-badge",
5322
+ className: cn(
5323
+ "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",
5324
+ className
5325
+ ),
4828
5326
  ...props
4829
5327
  }
4830
- )
4831
- );
4832
- SidebarHeader.displayName = "SidebarHeader";
4833
- var SidebarContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4834
- "div",
4835
- {
4836
- ref,
4837
- "data-slot": "sidebar-content",
4838
- className: cn(
4839
- "flex flex-1 flex-col gap-2 overflow-x-hidden overflow-y-auto p-2",
4840
- className
4841
- ),
4842
- ...props
4843
- }
4844
- ));
4845
- SidebarContent.displayName = "SidebarContent";
4846
- var SidebarFooter = forwardRef(
4847
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5328
+ );
5329
+ }
5330
+ function SidebarMenuSkeleton({
5331
+ className,
5332
+ showIcon = false,
5333
+ ...props
5334
+ }) {
5335
+ const [width] = useState(() => {
5336
+ return `${Math.floor(Math.random() * 40) + 50}%`;
5337
+ });
5338
+ return /* @__PURE__ */ jsxs(
4848
5339
  "div",
4849
5340
  {
4850
- ref,
4851
- "data-slot": "sidebar-footer",
4852
- className: cn("flex shrink-0 flex-col gap-2 p-3", className),
4853
- ...props
5341
+ "data-slot": "sidebar-menu-skeleton",
5342
+ "data-sidebar": "menu-skeleton",
5343
+ className: cn("flex h-8 items-center gap-2 rounded-xl px-2", className),
5344
+ ...props,
5345
+ children: [
5346
+ showIcon && /* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-xl", "data-sidebar": "menu-skeleton-icon" }),
5347
+ /* @__PURE__ */ jsx(
5348
+ Skeleton,
5349
+ {
5350
+ className: "h-4 max-w-(--skeleton-width) flex-1",
5351
+ "data-sidebar": "menu-skeleton-text",
5352
+ style: {
5353
+ "--skeleton-width": width
5354
+ }
5355
+ }
5356
+ )
5357
+ ]
4854
5358
  }
4855
- )
4856
- );
4857
- SidebarFooter.displayName = "SidebarFooter";
4858
- var SidebarGroup = forwardRef(
4859
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4860
- "div",
5359
+ );
5360
+ }
5361
+ function SidebarMenuSub({ className, ...props }) {
5362
+ return /* @__PURE__ */ jsx(
5363
+ "ul",
4861
5364
  {
4862
- ref,
4863
- "data-slot": "sidebar-group",
4864
- className: cn("flex flex-col gap-1", className),
5365
+ "data-slot": "sidebar-menu-sub",
5366
+ "data-sidebar": "menu-sub",
5367
+ className: cn(
5368
+ "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",
5369
+ className
5370
+ ),
4865
5371
  ...props
4866
5372
  }
4867
- )
4868
- );
4869
- SidebarGroup.displayName = "SidebarGroup";
4870
- var SidebarGroupLabel = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4871
- "div",
4872
- {
4873
- ref,
4874
- className: cn(
4875
- "text-sidebar-foreground/50 px-2 py-1 text-xs font-medium tracking-wider uppercase",
4876
- className
4877
- ),
4878
- ...props
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(
5373
+ );
5374
+ }
5375
+ function SidebarMenuSubItem({ className, ...props }) {
5376
+ return /* @__PURE__ */ jsx(
4904
5377
  "li",
4905
5378
  {
4906
- ref,
4907
- "data-slot": "sidebar-menu-item",
4908
- className: cn("relative", className),
5379
+ "data-slot": "sidebar-menu-sub-item",
5380
+ "data-sidebar": "menu-sub-item",
5381
+ className: cn("group/menu-sub-item relative", className),
4909
5382
  ...props
4910
5383
  }
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";
5384
+ );
5385
+ }
5386
+ function SidebarMenuSubButton({
5387
+ asChild = false,
5388
+ size = "md",
5389
+ isActive = false,
5390
+ className,
5391
+ ...props
5392
+ }) {
5393
+ const Comp = asChild ? Slot.Root : "a";
5394
+ return /* @__PURE__ */ jsx(
5395
+ Comp,
5396
+ {
5397
+ "data-slot": "sidebar-menu-sub-button",
5398
+ "data-sidebar": "menu-sub-button",
5399
+ "data-size": size,
5400
+ "data-active": isActive,
5401
+ className: cn(
5402
+ "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",
5403
+ className
5404
+ ),
5405
+ ...props
5406
+ }
5407
+ );
5408
+ }
4945
5409
  var defaultItems = [
4946
5410
  { label: "Home", icon: /* @__PURE__ */ jsx(House, {}) },
4947
5411
  { label: "Vacations", icon: /* @__PURE__ */ jsx(Plane, {}) },
@@ -4949,11 +5413,20 @@ var defaultItems = [
4949
5413
  { label: "Apps", icon: /* @__PURE__ */ jsx(LayoutDashboardIcon, {}) }
4950
5414
  ];
4951
5415
  function SidebarBrand({ brandName }) {
4952
- const { open } = useSidebar();
4953
- if (!open) return null;
5416
+ const { state } = useSidebar();
5417
+ const collapsed = state === "collapsed";
4954
5418
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
4955
5419
  /* @__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("span", { className: "truncate text-sm font-semibold", children: brandName })
5420
+ /* @__PURE__ */ jsx(
5421
+ "span",
5422
+ {
5423
+ className: cn(
5424
+ "truncate text-sm font-semibold transition-opacity duration-200",
5425
+ collapsed ? "opacity-0 pointer-events-none w-0 overflow-hidden" : "opacity-100"
5426
+ ),
5427
+ children: brandName
5428
+ }
5429
+ )
4957
5430
  ] });
4958
5431
  }
4959
5432
  function AppShell({
@@ -4962,48 +5435,64 @@ function AppShell({
4962
5435
  onItemClick,
4963
5436
  brandName = "Total Portal",
4964
5437
  showHeader = true,
5438
+ open,
5439
+ onOpenChange,
5440
+ defaultOpen,
4965
5441
  className,
4966
5442
  mainClassName,
4967
5443
  children
4968
5444
  }) {
4969
- return /* @__PURE__ */ jsxs(SidebarProvider, { className: cn("min-h-0", className), children: [
4970
- /* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", children: [
4971
- /* @__PURE__ */ jsxs(SidebarHeader, { className: "flex flex-row items-center gap-2 p-2", children: [
4972
- /* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0" }),
4973
- /* @__PURE__ */ jsx(SidebarBrand, { brandName })
4974
- ] }),
4975
- /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: items.map((item) => {
4976
- const menuItem = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
4977
- SidebarMenuButton,
4978
- {
4979
- isActive: activeItem === item.label || item.active,
4980
- onClick: () => {
4981
- item.onClick?.();
4982
- onItemClick?.(item.label);
4983
- },
4984
- children: [
4985
- item.icon,
4986
- /* @__PURE__ */ jsx("span", { children: item.label })
4987
- ]
4988
- }
4989
- ) }, item.label);
4990
- if (!item.permission) return menuItem;
4991
- return /* @__PURE__ */ jsx(
4992
- Can,
4993
- {
4994
- permission: item.permission,
4995
- mode: item.permissionMode,
4996
- children: menuItem
4997
- },
4998
- item.label
4999
- );
5000
- }) }) }) }) })
5001
- ] }),
5002
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
5003
- showHeader && /* @__PURE__ */ jsx("header", { className: "flex h-14 items-center justify-between border-b px-4", children: /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: brandName }) }),
5004
- /* @__PURE__ */ jsx("main", { className: cn("overflow-y-auto flex-1 p-6", mainClassName), children })
5005
- ] })
5006
- ] });
5445
+ return /* @__PURE__ */ jsxs(
5446
+ SidebarProvider,
5447
+ {
5448
+ className: cn("h-dvh overflow-hidden", className),
5449
+ open,
5450
+ onOpenChange,
5451
+ defaultOpen,
5452
+ children: [
5453
+ /* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", children: [
5454
+ /* @__PURE__ */ jsxs(SidebarHeader, { className: "flex flex-row items-center gap-2 p-2", children: [
5455
+ /* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0" }),
5456
+ /* @__PURE__ */ jsx(SidebarBrand, { brandName })
5457
+ ] }),
5458
+ /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: items.map((item) => {
5459
+ const menuItem = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
5460
+ SidebarMenuButton,
5461
+ {
5462
+ tooltip: item.label,
5463
+ isActive: activeItem === item.label || item.active,
5464
+ onClick: () => {
5465
+ item.onClick?.();
5466
+ onItemClick?.(item.label);
5467
+ },
5468
+ children: [
5469
+ item.icon,
5470
+ /* @__PURE__ */ jsx("span", { children: item.label })
5471
+ ]
5472
+ }
5473
+ ) }, item.label);
5474
+ if (!item.permission) return menuItem;
5475
+ return /* @__PURE__ */ jsx(
5476
+ Can,
5477
+ {
5478
+ permission: item.permission,
5479
+ mode: item.permissionMode,
5480
+ children: menuItem
5481
+ },
5482
+ item.label
5483
+ );
5484
+ }) }) }) }) })
5485
+ ] }),
5486
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
5487
+ showHeader ? /* @__PURE__ */ jsxs("header", { className: "flex h-14 items-center gap-2 border-b px-4", children: [
5488
+ /* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0 md:hidden" }),
5489
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: brandName })
5490
+ ] }) : /* @__PURE__ */ jsx(SidebarTrigger, { variant: "ghost", className: "size-8 shrink-0 md:hidden" }),
5491
+ /* @__PURE__ */ jsx("main", { className: cn("overflow-y-auto flex-1 p-6", mainClassName), children })
5492
+ ] })
5493
+ ]
5494
+ }
5495
+ );
5007
5496
  }
5008
5497
  function Textarea({ className, ...props }) {
5009
5498
  return /* @__PURE__ */ jsx(
@@ -5061,11 +5550,14 @@ var eventCalendarStyles = `
5061
5550
  align-items: center;
5062
5551
  }
5063
5552
 
5553
+ .sx__calendar-header-content {
5554
+ padding-right: 14px;
5555
+ }
5556
+
5064
5557
  /* Range title \u2014 "June 2026" */
5065
5558
  .sx-tcce .sx__range-heading {
5066
5559
  font-size: 15px;
5067
5560
  font-weight: 700;
5068
- letter-spacing: -0.02em;
5069
5561
  color: var(--color-foreground);
5070
5562
  font-family: var(--font-heading, inherit);
5071
5563
  }
@@ -5081,21 +5573,37 @@ var eventCalendarStyles = `
5081
5573
  background: var(--color-primary);
5082
5574
  color: var(--color-primary-foreground);
5083
5575
  cursor: pointer;
5084
- transition: opacity 150ms;
5576
+ transition: opacity 150ms, background 150ms, outline 150ms;
5577
+ }
5578
+ .sx-tcce .sx__today-button:focus-visible {
5579
+ outline: 3px solid color-mix(in srgb, var(--ring) 50%, transparent);
5580
+ outline-offset: -1px;
5085
5581
  }
5086
5582
  .sx-tcce .sx__today-button:hover {
5087
5583
  opacity: 0.88;
5584
+ background: var(--color-primary);
5088
5585
  }
5089
5586
  .sx-tcce .sx__today-button:active {
5090
5587
  opacity: 0.72;
5588
+ background: var(--color-primary);
5589
+ }
5590
+ .sx-tcce .sx__today-button:focus {
5591
+ background: var(--color-primary);
5091
5592
  }
5092
5593
 
5093
5594
  /* Prev / Next arrow buttons */
5595
+ .sx__forward-backward-navigation {
5596
+ display: flex;
5597
+ align-items: center;
5598
+ justify-content: center;
5599
+ height: 32px;
5600
+ }
5094
5601
  .sx-tcce .sx__chevron-wrapper {
5095
- width: 32px;
5602
+ width: 30px;
5096
5603
  height: 32px;
5097
- min-width: 32px;
5098
- border-radius: var(--border-radius-secondary-button, 0.625rem);
5604
+ min-width: 30px !important;
5605
+ min-height: 32px !important;
5606
+ border-radius: var(--border-radius-secondary-button, 0.625rem);=
5099
5607
  border: 1px solid var(--color-border);
5100
5608
  background: var(--color-background);
5101
5609
  transition: background 150ms;
@@ -5103,6 +5611,9 @@ var eventCalendarStyles = `
5103
5611
  .sx-tcce .sx__chevron-wrapper:hover {
5104
5612
  background: var(--color-muted);
5105
5613
  }
5614
+ .sx__chevron-wrapper {
5615
+ min-height: 30px !important;
5616
+ }
5106
5617
 
5107
5618
  /* \u2500\u2500 View selector \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
5108
5619
  /* Hide the "View" text label (kept in DOM for a11y) */
@@ -5129,12 +5640,18 @@ var eventCalendarStyles = `
5129
5640
  align-items: center;
5130
5641
  gap: 4px;
5131
5642
  cursor: pointer;
5132
- transition: opacity 150ms;
5643
+ transition: opacity 150ms, background 150ms, color 150ms;
5133
5644
  }
5134
5645
  .sx-tcce .sx__view-selection-selected-item:hover,
5135
5646
  .sx-tcce .sx__view-selection-selected-item:focus,
5136
5647
  .sx-tcce .sx__view-selection-selected-item:active {
5137
5648
  opacity: 0.85;
5649
+ background: var(--color-primary);
5650
+ color: var(--color-primary-foreground);
5651
+ }
5652
+ .sx-tcce .sx__view-selection-selected-item:focus-visible {
5653
+ outline: 3px solid color-mix(in srgb, var(--ring) 50%, transparent);
5654
+ outline-offset: -1px;
5138
5655
  }
5139
5656
 
5140
5657
  /* Chevron image inside the view button */
@@ -5162,7 +5679,8 @@ var eventCalendarStyles = `
5162
5679
  transition: background 100ms;
5163
5680
  }
5164
5681
  .sx-tcce .sx__view-selection-item:hover {
5165
- background: color-mix(in srgb, var(--color-primary) 8%, transparent);
5682
+ background: var(--color-primary);
5683
+ color: var(--color-primary-foreground);
5166
5684
  }
5167
5685
 
5168
5686
  /* \u2500\u2500 Date input (top-right "6/5/2026 \u25BC") \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@@ -5175,44 +5693,68 @@ var eventCalendarStyles = `
5175
5693
  clip: rect(0, 0, 0, 0);
5176
5694
  white-space: nowrap;
5177
5695
  }
5178
-
5179
5696
  .sx-tcce .sx__date-input-wrapper {
5180
5697
  display: inline-flex;
5181
5698
  align-items: center;
5182
- gap: 2px;
5699
+ gap: 0.5rem;
5700
+ flex-shrink: 0;
5701
+
5183
5702
  height: 32px;
5184
- padding: 0 8px;
5185
- border: 1px solid var(--color-border);
5186
- border-radius: var(--border-radius-secondary-button, 0.625rem);
5187
- background: var(--color-background);
5703
+ padding: 0 1rem;
5704
+ min-width: 120px;
5705
+
5706
+ border-radius: 0.5rem;
5707
+ border: 1px solid transparent;
5708
+ background-color: var(--color-primary);
5709
+
5188
5710
  cursor: pointer;
5189
- transition: border-color 150ms;
5711
+ outline: none;
5712
+ user-select: none;
5713
+ transition: all 150ms ease;
5714
+
5190
5715
  overflow: hidden;
5716
+ justify-content: flex-start;
5717
+ color: var(--color-primary-foreground) !important;
5191
5718
  }
5192
5719
  .sx-tcce .sx__date-input-wrapper:focus-within {
5193
- border-color: var(--color-primary);
5720
+ border-color: var(--ring);
5721
+ box-shadow: 0 0 0 3px rgba(var(--ring-rgb), 0.3);
5722
+ }
5723
+ .sx-tcce .sx__date-input-wrapper:hover {
5724
+ background-color: var(--color-primary);
5725
+ opacity: 0.8;
5194
5726
  }
5195
-
5196
5727
  .sx-tcce .sx__date-input {
5197
- font-size: 12px;
5198
- font-weight: 500;
5728
+ font-size: 0.875rem;
5729
+ font-weight: 400;
5730
+ color: #ffffff;
5731
+ font-family: inherit;
5732
+
5199
5733
  background: transparent;
5200
5734
  border: none;
5201
5735
  outline: none;
5202
- width: 80px;
5203
- cursor: pointer;
5204
- color: var(--color-foreground);
5205
5736
  padding: 0;
5206
- font-family: inherit;
5737
+
5738
+ min-width: 100px;
5739
+ flex: 1;
5740
+
5741
+ cursor: pointer;
5742
+ }
5743
+
5744
+ .sx-tcce .sx__date-input::placeholder {
5745
+ color: rgba(255, 255, 255, 0.7);
5207
5746
  }
5208
5747
 
5209
5748
  .sx-tcce .sx__date-input-chevron-wrapper {
5210
- padding: 0;
5211
- width: 16px;
5212
- height: 16px;
5213
5749
  display: flex;
5214
5750
  align-items: center;
5215
5751
  justify-content: center;
5752
+ flex-shrink: 0;
5753
+
5754
+ width: 1rem;
5755
+ height: 1rem;
5756
+ padding: 0;
5757
+
5216
5758
  background: transparent;
5217
5759
  border: none;
5218
5760
  outline: none;
@@ -5220,52 +5762,199 @@ var eventCalendarStyles = `
5220
5762
  appearance: none;
5221
5763
  }
5222
5764
  .sx-tcce .sx__date-input-chevron {
5223
- width: 12px;
5224
- height: 12px;
5225
- opacity: 0.45;
5765
+ width: 1rem;
5766
+ height: 1rem;
5767
+ opacity: 1;
5768
+ color: #ffffff;
5226
5769
  }
5227
5770
 
5228
5771
  /* Date picker popup (the calendar that drops when clicking the date input) */
5229
5772
  .sx-tcce .sx__date-picker-popup {
5230
- border-radius: var(--border-radius-article, 0.875rem);
5773
+ border-radius: 0.5rem;
5231
5774
  border: 1px solid var(--color-border);
5775
+ background-color: var(--color-background);
5776
+
5777
+ padding: 0.75rem;
5778
+ font-size: 0.75rem;
5232
5779
  overflow: hidden;
5233
- font-size: 12px;
5234
- background: var(--color-background);
5780
+
5781
+ animation: popoverSlideIn 150ms ease-out;
5782
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
5783
+ }
5784
+ @keyframes popoverSlideIn {
5785
+ from {
5786
+ opacity: 0;
5787
+ transform: translateY(-4px);
5788
+ }
5789
+ to {
5790
+ opacity: 1;
5791
+ transform: translateY(0);
5792
+ }
5235
5793
  }
5236
5794
  .sx-tcce .sx__date-picker__month-view-header {
5237
- padding: 10px 12px 6px;
5795
+ padding: 0.75rem 0.75rem 0.375rem;
5238
5796
  }
5239
5797
  .sx-tcce .sx__date-picker__month-view-header__month-year {
5240
- font-size: 13px;
5241
- font-weight: 700;
5798
+ font-size: 0.8125rem;
5799
+ font-weight: 600;
5800
+ color: var(--color-foreground);
5801
+ text-align: center;
5242
5802
  }
5243
5803
  .sx-tcce .sx__date-picker__day-names {
5244
- padding: 0 4px;
5804
+ display: flex;
5805
+ gap: 0.25rem;
5806
+ padding: 0.5rem 0.25rem;
5245
5807
  }
5246
5808
  .sx-tcce .sx__date-picker__day-name {
5247
- width: 32px;
5248
- font-size: 10px;
5809
+ display: flex;
5810
+ align-items: center;
5811
+ justify-content: center;
5812
+ flex: 1;
5813
+
5814
+ width: 2rem;
5815
+ height: 2rem;
5816
+ min-height: 2rem;
5817
+
5818
+ font-size: 0.625rem;
5249
5819
  font-weight: 600;
5250
5820
  color: var(--color-muted-foreground);
5251
5821
  text-transform: uppercase;
5252
5822
  letter-spacing: 0.04em;
5823
+
5824
+ user-select: none;
5825
+ }
5826
+ /* Week */
5827
+ .sx-tcce .sx__date-picker__week {
5828
+ display: flex;
5829
+ gap: 0.25rem;
5830
+ margin-top: 0.5rem;
5253
5831
  }
5254
5832
  .sx-tcce .sx__date-picker__day {
5255
- width: 32px;
5256
- height: 32px;
5257
- font-size: 12px;
5258
- border-radius: 6px;
5259
- transition: background 100ms;
5833
+ /* Layout */
5834
+ display: flex;
5835
+ align-items: center;
5836
+ justify-content: center;
5837
+ flex: 1;
5838
+
5839
+ width: 2rem;
5840
+ height: 2rem;
5841
+ min-height: 2rem;
5842
+ aspect-ratio: 1;
5843
+
5844
+ border-radius: 0.375rem;
5845
+ border: none;
5846
+ background: transparent;
5847
+ padding: 0;
5848
+ cursor: pointer;
5849
+
5850
+ font-size: 0.75rem;
5851
+ font-weight: 400;
5852
+ color: var(--color-foreground);
5853
+
5854
+ transition: all 100ms ease;
5855
+ outline: none;
5856
+ user-select: none;
5857
+ }
5858
+ .sx-tcce .sx__date-picker__day:hover:not(:disabled) {
5859
+ background-color: var(--color-accent);
5860
+ color: var(--color-accent-foreground);
5861
+ }
5862
+ .sx-tcce .sx__date-picker__day:focus-visible {
5863
+ box-shadow: inset 0 0 0 2px var(--color-primary);
5864
+ border-radius: 0.375rem;
5260
5865
  }
5261
5866
  .sx-tcce .sx__date-picker__day--today {
5262
- font-weight: 700;
5867
+ font-weight: 600;
5868
+ color: var(--color-primary);
5869
+ background-color: var(--color-accent);
5870
+ }
5871
+ .sx-tcce .sx__date-picker__day--today:hover {
5872
+ background-color: var(--color-accent);
5263
5873
  color: var(--color-primary);
5264
5874
  }
5265
5875
  .sx-tcce .sx__date-picker__day--selected {
5266
5876
  background: var(--color-primary) !important;
5267
5877
  color: var(--color-primary-foreground) !important;
5268
- border-radius: 50% !important;
5878
+ }
5879
+ /* Selected day */
5880
+ .sx-tcce .sx__date-picker__day--selected {
5881
+ background-color: var(--color-primary) !important;
5882
+ color: var(--color-primary-foreground) !important;
5883
+ border-radius: 0.375rem;
5884
+ font-weight: 500;
5885
+ }
5886
+
5887
+ .sx-tcce .sx__date-picker__day--selected:hover {
5888
+ opacity: 0.9;
5889
+ }
5890
+
5891
+ /* Outside days (prev/next month) */
5892
+ .sx-tcce .sx__date-picker__day--outside {
5893
+ color: var(--color-muted-foreground);
5894
+ opacity: 0.5;
5895
+ cursor: not-allowed;
5896
+ }
5897
+
5898
+ /* Disabled days */
5899
+ .sx-tcce .sx__date-picker__day:disabled {
5900
+ color: var(--color-muted-foreground);
5901
+ opacity: 0.4;
5902
+ cursor: not-allowed;
5903
+ }
5904
+
5905
+ .sx-tcce .sx__date-picker__day--range-start {
5906
+ background-color: var(--color-primary) !important;
5907
+ color: var(--color-primary-foreground) !important;
5908
+ border-radius: 0.375rem 0 0 0.375rem;
5909
+ }
5910
+
5911
+ .sx-tcce .sx__date-picker__day--range-middle {
5912
+ background-color: var(--color-primary);
5913
+ opacity: 0.2;
5914
+ border-radius: 0;
5915
+ }
5916
+
5917
+ .sx-tcce .sx__date-picker__day--range-end {
5918
+ background-color: var(--color-primary) !important;
5919
+ color: var(--color-primary-foreground) !important;
5920
+ border-radius: 0 0.375rem 0.375rem 0;
5921
+ }
5922
+
5923
+ /* Navigation buttons (previous/next month) */
5924
+ .sx-tcce .sx__date-picker__nav-button {
5925
+ display: flex;
5926
+ align-items: center;
5927
+ justify-content: center;
5928
+ width: 1.75rem;
5929
+ height: 1.75rem;
5930
+ padding: 0;
5931
+
5932
+ background: transparent;
5933
+ border: none;
5934
+ border-radius: 0.375rem;
5935
+ cursor: pointer;
5936
+ opacity: 0.5;
5937
+ transition: all 150ms ease;
5938
+ outline: none;
5939
+ }
5940
+
5941
+ .sx-tcce .sx__date-picker__nav-button:hover:not(:disabled) {
5942
+ opacity: 1;
5943
+ background-color: var(--color-accent);
5944
+ }
5945
+
5946
+ .sx-tcce .sx__date-picker__nav-button:focus-visible {
5947
+ box-shadow: 0 0 0 2px var(--color-primary);
5948
+ }
5949
+
5950
+ .sx-tcce .sx__date-picker__nav-button:disabled {
5951
+ opacity: 0.3;
5952
+ cursor: not-allowed;
5953
+ }
5954
+
5955
+ .sx-tcce .sx__date-picker__nav-button svg {
5956
+ width: 1rem;
5957
+ height: 1rem;
5269
5958
  }
5270
5959
 
5271
5960
  /* \u2500\u2500 Month grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@@ -5673,7 +6362,7 @@ function TableHead({ className, ...props }) {
5673
6362
  {
5674
6363
  "data-slot": "table-head",
5675
6364
  className: cn(
5676
- "text-foreground h-12 px-3 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",
6365
+ "text-foreground has([role=checkbox])]:pr-0 h-12 px-3 text-left align-middle font-medium whitespace-nowrap",
5677
6366
  className
5678
6367
  ),
5679
6368
  ...props
@@ -5686,7 +6375,7 @@ function TableCell({ className, ...props }) {
5686
6375
  {
5687
6376
  "data-slot": "table-cell",
5688
6377
  className: cn(
5689
- "p-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
6378
+ "has([role=checkbox])]:pr-0 p-3 align-middle whitespace-nowrap",
5690
6379
  className
5691
6380
  ),
5692
6381
  ...props
@@ -6686,7 +7375,7 @@ function useTablePersistence({
6686
7375
  };
6687
7376
  }
6688
7377
  var cellSizeClass = {
6689
- sm: "px-4 py-2 text-xs",
7378
+ sm: "px-1 py-0 text-xs",
6690
7379
  md: "px-5 py-2.5 text-sm",
6691
7380
  lg: "px-6 py-3 text-sm"
6692
7381
  };
@@ -7514,6 +8203,6 @@ function TCCEProvider({
7514
8203
  return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: tooltipDelayDuration, children: /* @__PURE__ */ jsx(AbilityProvider, { permissions, children: /* @__PURE__ */ jsx(Toaster, { position: toasterPosition, children }) }) });
7515
8204
  }
7516
8205
 
7517
- 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, Calendar, CalendarDayButton, 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, 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, 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, SidebarProvider, 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, useTableContext, useTableData, useTableFiltering, useTableGlobalFilter, useTableSizing, useTableSorting, useTableVisibility, useToast };
8206
+ 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, Calendar, CalendarDayButton, 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, 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, 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 };
7518
8207
  //# sourceMappingURL=main.js.map
7519
8208
  //# sourceMappingURL=main.js.map