lsp-uikit 1.4.18 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/components/accordion/accordion.d.ts +5 -6
  2. package/dist/components/accordion/accordion.js +1 -1
  3. package/dist/components/alert/alert.d.ts +1 -1
  4. package/dist/components/alert/alert.js +1 -1
  5. package/dist/components/avatar/avatar.d.ts +8 -0
  6. package/dist/components/avatar/avatar.js +2 -0
  7. package/dist/components/badge/badge.d.ts +10 -8
  8. package/dist/components/badge/badge.js +1 -1
  9. package/dist/components/button/button.d.ts +5 -6
  10. package/dist/components/button/button.js +1 -1
  11. package/dist/components/calendar/calendar.js +1 -1
  12. package/dist/components/card/card.d.ts +8 -9
  13. package/dist/components/card/card.js +1 -1
  14. package/dist/components/chart/chart.d.ts +26 -12
  15. package/dist/components/chart/chart.js +1 -1
  16. package/dist/components/checkbox/checkbox.d.ts +2 -5
  17. package/dist/components/checkbox/checkbox.js +1 -1
  18. package/dist/components/collapsible/collapsible.d.ts +10 -0
  19. package/dist/components/collapsible/collapsible.js +2 -0
  20. package/dist/components/combobox/combobox.d.ts +33 -0
  21. package/dist/components/combobox/combobox.js +2 -0
  22. package/dist/components/date-picker/date-picker.d.ts +11 -0
  23. package/dist/components/date-picker/date-picker.js +2 -0
  24. package/dist/components/date-range-picker/date-range-picker.d.ts +3 -2
  25. package/dist/components/date-range-picker/date-range-picker.js +1 -1
  26. package/dist/components/dialog/dialog.d.ts +15 -14
  27. package/dist/components/dialog/dialog.js +1 -1
  28. package/dist/components/dropdown/dropdown.d.ts +17 -17
  29. package/dist/components/dropdown/dropdown.js +1 -1
  30. package/dist/components/empty/empty.d.ts +15 -0
  31. package/dist/components/empty/empty.js +1 -0
  32. package/dist/components/field/field.d.ts +26 -0
  33. package/dist/components/field/field.js +2 -0
  34. package/dist/components/input/input.d.ts +3 -7
  35. package/dist/components/input/input.js +1 -1
  36. package/dist/components/label/label.d.ts +2 -3
  37. package/dist/components/label/label.js +1 -1
  38. package/dist/components/loader/loader.js +1 -1
  39. package/dist/components/native-table/native-table.d.ts +15 -0
  40. package/dist/components/{shadcn-table/shadcn-table.js → native-table/native-table.js} +1 -1
  41. package/dist/components/numeric-field/number-field.d.ts +15 -0
  42. package/dist/components/numeric-field/number-field.js +2 -0
  43. package/dist/components/pagination/pagination.js +1 -1
  44. package/dist/components/popover/coach-mark.d.ts +25 -0
  45. package/dist/components/popover/coach-mark.js +1 -0
  46. package/dist/components/popover/popover.d.ts +18 -6
  47. package/dist/components/popover/popover.js +1 -1
  48. package/dist/components/preview-card/preview-card.d.ts +11 -0
  49. package/dist/components/preview-card/preview-card.js +2 -0
  50. package/dist/components/progress/progress.d.ts +7 -4
  51. package/dist/components/progress/progress.js +1 -1
  52. package/dist/components/r-dialog/r-dialog.js +1 -1
  53. package/dist/components/radio-group/radio-group.d.ts +5 -5
  54. package/dist/components/radio-group/radio-group.js +1 -1
  55. package/dist/components/scroll-area/scroll-area.d.ts +9 -7
  56. package/dist/components/scroll-area/scroll-area.js +1 -1
  57. package/dist/components/select/select.d.ts +11 -11
  58. package/dist/components/select/select.js +1 -1
  59. package/dist/components/separator/separator.d.ts +2 -3
  60. package/dist/components/separator/separator.js +1 -1
  61. package/dist/components/sheet/sheet.d.ts +10 -10
  62. package/dist/components/sheet/sheet.js +1 -1
  63. package/dist/components/sidebar/sidebar.d.ts +2 -2
  64. package/dist/components/sidebar/sidebar.js +1 -1
  65. package/dist/components/slider/slider.d.ts +6 -0
  66. package/dist/components/slider/slider.js +2 -0
  67. package/dist/components/sonner/sonner.js +1 -1
  68. package/dist/components/stack/stack.d.ts +2 -2
  69. package/dist/components/switch/switch.d.ts +4 -8
  70. package/dist/components/switch/switch.js +1 -1
  71. package/dist/components/table/table.d.ts +12 -26
  72. package/dist/components/table/table.js +1 -1
  73. package/dist/components/tabs/tabs.d.ts +10 -7
  74. package/dist/components/tabs/tabs.js +1 -1
  75. package/dist/components/text/text.d.ts +4 -1
  76. package/dist/components/text/text.js +1 -1
  77. package/dist/components/textarea/textarea.d.ts +3 -2
  78. package/dist/components/textarea/textarea.js +1 -1
  79. package/dist/components/toggle/toggle.d.ts +2 -3
  80. package/dist/components/toggle/toggle.js +1 -1
  81. package/dist/components/tooltip/tooltip.d.ts +18 -6
  82. package/dist/components/tooltip/tooltip.js +1 -1
  83. package/dist/components/tour/tour-coach-mark.d.ts +7 -0
  84. package/dist/components/tour/tour-coach-mark.js +1 -0
  85. package/dist/components/tour/tour.d.ts +105 -0
  86. package/dist/components/tour/tour.js +1 -0
  87. package/dist/components/tour/useFocusGuards.js +1 -0
  88. package/dist/components/tour/useFocusTrap.js +1 -0
  89. package/dist/index.d.ts +28 -20
  90. package/dist/index.js +1 -1
  91. package/dist/lib/hooks/index.d.ts +5 -0
  92. package/dist/lib/hooks/index.js +1 -1
  93. package/dist/lib/hooks/useAsRef.d.ts +5 -0
  94. package/dist/lib/hooks/useAsRef.js +2 -0
  95. package/dist/lib/hooks/useComposedRefs.d.ts +7 -0
  96. package/dist/lib/hooks/useComposedRefs.js +2 -0
  97. package/dist/lib/hooks/useCopy.d.ts +9 -0
  98. package/dist/lib/hooks/useCopy.js +2 -0
  99. package/dist/lib/hooks/useIsomorphicLayoutEffect.d.ts +5 -0
  100. package/dist/lib/hooks/useIsomorphicLayoutEffect.js +2 -0
  101. package/dist/lib/hooks/useLazyRef.d.ts +5 -0
  102. package/dist/lib/hooks/useLazyRef.js +2 -0
  103. package/dist/variables.css +114 -87
  104. package/package.json +51 -45
  105. package/dist/components/checked-value/checked-value.d.ts +0 -11
  106. package/dist/components/checked-value/checked-value.js +0 -1
  107. package/dist/components/field-value/field-value.d.ts +0 -14
  108. package/dist/components/field-value/field-value.js +0 -2
  109. package/dist/components/hover-card/hover-card.d.ts +0 -9
  110. package/dist/components/hover-card/hover-card.js +0 -2
  111. package/dist/components/numeric-input/numeric-input.d.ts +0 -11
  112. package/dist/components/numeric-input/numeric-input.js +0 -1
  113. package/dist/components/shadcn-table/shadcn-table.d.ts +0 -15
  114. package/dist/lib/utils/digits.js +0 -1
  115. package/dist/lib/utils/events.js +0 -1
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- import * as React from 'react';
2
+ import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
4
3
 
5
- declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
- declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
7
- declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
8
- declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): react_jsx_runtime.JSX.Element;
4
+ declare function Accordion(props: Accordion$1.Root.Props): react_jsx_runtime.JSX.Element;
5
+ declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props): react_jsx_runtime.JSX.Element;
6
+ declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props): react_jsx_runtime.JSX.Element;
7
+ declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props): react_jsx_runtime.JSX.Element;
9
8
 
10
9
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"@radix-ui/react-accordion";import{ChevronDownIcon as a}from"lucide-react";import{cn as n}from"../../lib/utils/cn.js";function o({...t}){return e(r.Root,{"data-slot":"accordion",...t})}function i({className:t,...a}){return e(r.Item,{"data-slot":"accordion-item",className:n("border-b last:border-b-0",t),...a})}function s({className:o,children:i,...s}){return e(r.Header,{className:"flex",children:t(r.Trigger,{"data-slot":"accordion-trigger",className:n("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",o),...s,children:[i,e(a,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function c({className:t,children:a,...o}){return e(r.Content,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...o,children:e("div",{className:n("pt-0 pb-4",t),children:a})})}export{o as Accordion,c as AccordionContent,i as AccordionItem,s as AccordionTrigger};
2
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Accordion as a}from"@base-ui/react/accordion";import{ChevronDownIcon as n}from"lucide-react";import{cn as i}from"../../lib/utils/cn.js";function o(e){return t(a.Root,{"data-slot":"accordion",...e})}function r({className:e,...n}){return t(a.Item,{className:i("border-b last:border-b-0",e),"data-slot":"accordion-item",...n})}function s({className:o,children:r,...s}){return t(a.Header,{className:"flex",children:e(a.Trigger,{className:i("focus-visible:ring-ring flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-64 data-panel-open:*:data-[slot=accordion-indicator]:rotate-180",o),"data-slot":"accordion-trigger",...s,children:[r,t(n,{className:"pointer-events-none size-4 shrink-0 translate-y-0.5 opacity-80 transition-transform duration-200 ease-in-out","data-slot":"accordion-indicator"})]})})}function c({className:e,children:n,...o}){return t(a.Panel,{className:"text-muted-foreground h-(--accordion-panel-height) overflow-hidden text-sm transition-[height] duration-200 ease-in-out data-ending-style:h-0 data-starting-style:h-0","data-slot":"accordion-panel",...o,children:t("div",{className:i("pt-0 pb-4",e),children:n})})}export{o as Accordion,c as AccordionContent,r as AccordionItem,s as AccordionTrigger};
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import * as React from 'react';
5
5
 
6
6
  declare const alertVariants: (props?: ({
7
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  declare function Alert({ className, variant, hideDefaultIcon, children, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants> & {
10
10
  hideDefaultIcon?: boolean;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import{cva as t}from"class-variance-authority";import{AiFillCheckCircle as a}from"react-icons/ai";import{LuInfo as i}from"react-icons/lu";import{TiWarning as n}from"react-icons/ti";import{cn as o}from"../../lib/utils/cn.js";const s=t("relative w-full rounded-2xl px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-1 items-start [&>svg]:size-[18px] [&>svg]:translate-y-0.5",{variants:{variant:{default:"bg-secondary/50 text-foreground outline outline-[4px] outline-secondary dark:outline-secondary/40 border-foreground/20 [&>svg]:text-muted-foreground",destructive:"border-red-200 bg-red-500/5 dark:bg-red-900/30 dark:border-red-400/20 outline-[4px] outline-red-500/10 dark:outline-destructive/10 [&>svg]:text-destructive",warning:"border-orange-200 bg-amber-500/10 dark:bg-orange-400/15 dark:border-orange-400/20 outline-[4px] outline-amber-500/15 dark:outline-orange-400/10 [&>svg]:text-orange-500",success:"border-green-200 bg-green-500/5 dark:bg-green-900/50 dark:border-green-400/20 outline-[4px] outline-green-500/10 dark:outline-green-400/10 [&>svg]:text-green-500"}},defaultVariants:{variant:"default"}});function d({className:t,variant:d,hideDefaultIcon:l,children:u,...c}){return e("div",{"data-slot":"alert",role:"alert",className:o(s({variant:d}),t),...c,children:[l?null:"default"===d?r(i,{size:20}):"warning"===d||"destructive"===d?r(n,{size:20}):"success"===d?r(a,{size:20}):void 0,u]})}function l({className:e,...t}){return r("div",{"data-slot":"alert-title",className:o("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function u({className:e,...t}){return r("div",{"data-slot":"alert-description",className:o("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}export{d as Alert,u as AlertDescription,l as AlertTitle,s as alertVariants};
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";import{AiFillCheckCircle as s}from"react-icons/ai";import{LuInfo as e}from"react-icons/lu";import{TiWarning as i}from"react-icons/ti";import{cn as o}from"../../lib/utils/cn.js";const n=a("text-card-foreground relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-sm has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-2 has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] [&>svg]:h-lh [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"dark:bg-input/32 [&>svg]:text-muted-foreground bg-transparent",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function c({className:a,variant:c,hideDefaultIcon:l,children:d,...g}){return t("div",{"data-slot":"alert",role:"alert",className:o(n({variant:c}),a),...g,children:[l?null:"default"===c?r(e,{size:20}):"warning"===c||"error"===c?r(i,{size:20}):"success"===c?r(s,{size:20}):void 0,d]})}function l({className:t,...a}){return r("div",{"data-slot":"alert-title",className:o("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...a})}function d({className:t,...a}){return r("div",{"data-slot":"alert-description",className:o("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...a})}export{c as Alert,d as AlertDescription,l as AlertTitle,n as alertVariants};
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
3
+
4
+ declare function Avatar({ className, ...props }: Avatar$1.Root.Props): react_jsx_runtime.JSX.Element;
5
+ declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props): react_jsx_runtime.JSX.Element;
6
+ declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props): react_jsx_runtime.JSX.Element;
7
+
8
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import{Avatar as a}from"@base-ui/react/avatar";import{cn as t}from"../../lib/utils/cn.js";function r({className:r,...l}){return e(a.Root,{className:t("bg-background inline-flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-full align-middle text-xs font-medium select-none",r),"data-slot":"avatar",...l})}function l({className:r,...l}){return e(a.Image,{className:t("size-full object-cover",r),"data-slot":"avatar-image",...l})}function s({className:r,...l}){return e(a.Fallback,{className:t("bg-muted flex size-full items-center justify-center rounded-full",r),"data-slot":"avatar-fallback",...l})}export{r as Avatar,s as AvatarFallback,l as AvatarImage};
@@ -1,18 +1,20 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as React from 'react';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { useRender } from '@base-ui/react/use-render';
3
4
  import { VariantProps } from 'class-variance-authority';
4
- import * as React from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "destructive" | "outline" | "secondary" | "primary" | "primary_ghost" | "primary_outline" | "success" | "success_ghost" | "success_outline" | "purple" | "purple_ghost" | "purple_outline" | "destructive_ghost" | "destructive_outline" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | null | undefined;
8
+ variant?: "success" | "warning" | "destructive" | "outline" | "secondary" | "primary" | "primary_ghost" | "primary_outline" | "success_ghost" | "success_outline" | "warning_ghost" | "warning_outline" | "destructive_ghost" | "destructive_outline" | null | undefined;
8
9
  rounded?: "sm" | "md" | "full" | null | undefined;
9
10
  textOverflow?: "default" | "hidden" | null | undefined;
10
11
  hover?: boolean | null | undefined;
11
12
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
- type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
13
- asChild?: boolean;
14
- };
15
- declare function Badge({ className, variant, textOverflow, hover, asChild, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
13
+ interface BadgeProps extends useRender.ComponentProps<'span'> {
14
+ variant?: VariantProps<typeof badgeVariants>['variant'];
15
+ size?: VariantProps<typeof badgeVariants>['size'];
16
+ textOverflow?: VariantProps<typeof badgeVariants>['textOverflow'];
17
+ }
18
+ declare function Badge({ className, variant, size, render, textOverflow, ...props }: BadgeProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
16
19
 
17
20
  export { Badge, badgeVariants };
18
- export type { BadgeProps };
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Slot as e}from"@radix-ui/react-slot";import{cva as t}from"class-variance-authority";import{cn as o}from"../../lib/utils/cn.js";const i=t("inline-flex items-center justify-center rounded-md border px-2 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{primary:"border-transparent text-primary-foreground bg-blue-500",primary_ghost:"border-none text-primary bg-primary/10 dark:bg-blue-800/20",primary_outline:"border-primary/50 text-primary dark:border-primary bg-blue-100/50 dark:bg-blue-600/70 dark:text-primary-foreground",success:"border-transparent text-primary-foreground bg-green-500",success_ghost:"border-none text-green-600 bg-green-500/10",success_outline:"border-green-300 dark:border-green-700 bg-green-100/50 dark:bg-green-700/70 dark:text-primary-foreground",purple:"border-transparent text-primary-foreground bg-purple-500",purple_ghost:"border-none text-purple-600 bg-purple-500/10",purple_outline:"border-purple-300 dark:border-transparent bg-purple-100/50 dark:bg-purple-500 text-purple-800 dark:text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent text-white bg-destructive",destructive_ghost:"border-none bg-destructive/5 dark:bg-destructive/10 text-destructive",destructive_outline:"border-destructive/60 dark:border-destructive bg-destructive/20 dark:bg-destructive/20 text-red-500",outline:"text-foreground"},rounded:{sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},textOverflow:{default:"inline-flex",hidden:"overflow-hidden text-ellipsis whitespace-nowrap block"},hover:{true:"hover:opacity-80"}},defaultVariants:{variant:"primary_outline",rounded:"sm",textOverflow:"default"}});function d({className:t,variant:d,textOverflow:a="default",hover:n=!1,asChild:s=!1,...u}){return r(s?e:"span",{"data-slot":"badge",className:o(i({variant:d,textOverflow:a,hover:n}),t),...u})}export{d as Badge,i as badgeVariants};
1
+ import{mergeProps as r}from"@base-ui/react/merge-props";import{useRender as e}from"@base-ui/react/use-render";import{cva as t}from"class-variance-authority";import{cn as a}from"../../lib/utils/cn.js";const n=t("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-1 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{size:{default:"h-5.5 min-w-5.5 px-[calc(--spacing(1.5)-1px)] sm:h-4.5 sm:min-w-4.5",lg:"h-6.5 min-w-6.5 px-[calc(--spacing(2.5)-1px)] py-1 text-sm sm:h-5.5 sm:min-w-5.5",sm:"h-5 min-w-5 rounded-[calc(var(--radius-sm)-2px)] px-[calc(--spacing(1)-1px)] text-xs leading-none sm:h-4 sm:min-w-4 sm:text-[.625rem]"},variant:{primary:"text-primary-foreground border-transparent bg-blue-500",primary_ghost:"text-primary bg-primary/10 border-none dark:bg-blue-800/20",primary_outline:"border-primary/50 text-primary dark:border-primary dark:text-primary-foreground bg-blue-100/50 dark:bg-blue-600/70",success:"text-primary-foreground border-transparent bg-green-500",success_ghost:"border-none bg-green-500/10 text-green-600",success_outline:"dark:text-primary-foreground border-green-300 bg-green-100/50 text-green-600 dark:border-green-700 dark:bg-green-700/70",warning:"bg-warning dark:bg-warning/70 text-primary-foreground border-transparent",warning_ghost:"bg-warning/10 dark:bg-warning/15 border-none text-amber-600",warning_outline:"dark:text-primary-foreground border-amber-300 bg-amber-100/50 text-amber-600 dark:border-amber-700 dark:bg-amber-700/70",secondary:"bg-secondary text-secondary-foreground border-transparent",destructive:"bg-destructive border-transparent text-white",destructive_ghost:"bg-destructive/5 dark:bg-destructive/10 text-destructive border-none",destructive_outline:"border-destructive/60 dark:border-destructive bg-destructive/20 dark:bg-destructive/20 text-red-500",outline:"text-foreground"},rounded:{sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},textOverflow:{default:"inline-flex",hidden:"block overflow-hidden text-ellipsis whitespace-nowrap"},hover:{true:"hover:opacity-80"}},defaultVariants:{variant:"primary_outline",rounded:"sm",textOverflow:"default"}});function i({className:t,variant:i,size:d,render:o,textOverflow:s="default",...g}){const u={className:a(n({className:t,size:d,textOverflow:s,variant:i})),"data-slot":"badge"};return e({defaultTagName:"span",props:r(u,g),render:o})}export{i as Badge,n as badgeVariants};
@@ -1,18 +1,17 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React from 'react';
3
+ import { Button as Button$1 } from '@base-ui/react/button';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "default" | "default_invert" | "destructive" | "destructive_invert" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined;
8
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
7
+ variant?: "default" | "warning" | "default_invert" | "destructive" | "destructive_invert" | "warning_invert" | "outline" | "secondary" | "ghost" | "link" | "clear" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
- interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
11
- asChild?: boolean;
10
+ interface ButtonProps extends Button$1.Props, VariantProps<typeof buttonVariants> {
12
11
  isLoading?: boolean;
13
12
  replaceSvgWithLoading?: boolean;
14
13
  }
15
- declare function Button({ className, variant, size, isLoading, replaceSvgWithLoading, asChild, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
14
+ declare function Button({ className, variant, size, isLoading, disabled, replaceSvgWithLoading, children, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
16
15
 
17
16
  export { Button, buttonVariants };
18
17
  export type { ButtonProps };
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import{Slot as t}from"@radix-ui/react-slot";import{cva as i}from"class-variance-authority";import{Loader2 as a}from"lucide-react";import{cn as n}from"../../lib/utils/cn.js";const s=i('inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",default_invert:"text-primary dark:border-primary bg-primary/10 dark:bg-blue-600/25 dark:text-blue-500 hover:bg-primary/15 dark:hover:bg-blue-600/30",destructive:"bg-destructive text-white hover:bg-destructive/90",destructive_invert:"bg-destructive/10 dark:bg-destructive/15 text-destructive dark:text-red-500 hover:bg-destructive/15 dark:hover:bg-destructive/25",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/60",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",clear:"p-0"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3 py-2",lg:"h-[50px] px-8 text-base rounded-2xl",icon:"h-8 w-8 [&_svg]:size-[18px]"}},defaultVariants:{variant:"default",size:"default"}});function o({className:i,variant:o,size:d,isLoading:c,replaceSvgWithLoading:u=!0,asChild:l=!1,children:v,...g}){return e(l?t:"button",{"data-slot":"button",disabled:c||g.disabled,className:n(s({variant:o,size:d,className:i}),{"[&>svg:not(:first-child)]:hidden":u&&c}),...g,children:[c&&r(a,{className:"mr-1 h-4 w-4 animate-spin","data-loading":"true"}),v]})}export{o as Button,s as buttonVariants};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{Button as t}from"@base-ui/react/button";import{cva as i}from"class-variance-authority";import{Loader2 as a}from"lucide-react";import{cn as s}from"../../lib/utils/cn.js";const n=i('focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive relative inline-flex cursor-pointer items-center justify-center gap-2 overflow-hidden rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] active:scale-[0.975] active:animate-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-blue-700/80",default_invert:"text-primary dark:border-primary bg-primary/10 hover:bg-primary/15 dark:bg-blue-600/25 dark:text-blue-500 dark:hover:bg-blue-600/30",destructive:"bg-destructive hover:bg-destructive/90 text-white",destructive_invert:"bg-destructive/10 dark:bg-destructive/15 text-destructive hover:bg-destructive/15 dark:hover:bg-destructive/25 dark:text-red-500",warning:"hover:bg-warning/90 bg-orange-400 text-white dark:bg-amber-700 dark:hover:bg-amber-800",warning_invert:"dark:bg-warning/15 hover:bg-warning/15 dark:hover:bg-warning/20 bg-amber-500/15 text-amber-600",outline:"border-input bg-background hover:bg-accent hover:text-accent-foreground border",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/60",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 after:hidden hover:underline",clear:"hover:text-muted-foreground p-0"},size:{default:"h-10 px-[14px] py-2",sm:"h-9 px-3 py-2",lg:"h-[50px] rounded-2xl px-8 text-base",icon:"size-9 sm:size-8","icon-lg":"size-10 sm:size-9","icon-sm":"size-8 sm:size-7","icon-xl":"size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5","icon-xs":"size-7 rounded-md sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5"}},defaultVariants:{variant:"default",size:"default"}});function o({className:i,variant:o,size:d,isLoading:c,disabled:g,replaceSvgWithLoading:l=!0,children:v,...u}){return e(t,{disabled:c||g,"data-slot":"button",className:s(n({variant:o,size:d,className:i}),'data-[slot="combobox-trigger"]:active:scale-100 data-[slot="dropdown-menu-trigger"]:active:scale-100 data-[slot="popover-trigger"]:active:scale-100 data-[slot="select-trigger"]:active:scale-100',{"[&>svg:not(:last-child)]:hidden":l&&c}),...u,children:[v,c&&r(a,{className:"h-4 w-4 animate-spin","data-loading":"true"})]})}export{o as Button,n as buttonVariants};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{ChevronLeftIcon as t,ChevronRightIcon as r,ChevronDownIcon as a}from"lucide-react";import*as n from"react";import{getDefaultClassNames as d,DayPicker as o}from"react-day-picker";import{cn as s}from"../../lib/utils/cn.js";import{buttonVariants as l,Button as u}from"../button/button.js";function i({className:n,classNames:u,showOutsideDays:i=!0,captionLayout:m="label",buttonVariant:g="ghost",formatters:f,components:p,...b}){const x=d();return e(o,{showOutsideDays:i,className:s("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,n),captionLayout:m,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...f},classNames:{root:s("w-fit",x.root),months:s("flex gap-4 flex-col md:flex-row relative",x.months),month:s("flex flex-col w-full gap-4",x.month),nav:s("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",x.nav),button_previous:s(l({variant:g}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",x.button_previous),button_next:s(l({variant:g}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",x.button_next),month_caption:s("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",x.month_caption),dropdowns:s("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",x.dropdowns),dropdown_root:s("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",x.dropdown_root),dropdown:s("absolute bg-popover inset-0 opacity-0",x.dropdown),caption_label:s("select-none font-medium","label"===m?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",x.caption_label),table:"w-full border-collapse",weekdays:s("flex",x.weekdays),weekday:s("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",x.weekday),week:s("flex w-full mt-2",x.week),week_number_header:s("select-none w-(--cell-size)",x.week_number_header),week_number:s("text-[0.8rem] select-none text-muted-foreground",x.week_number),day:s("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",b.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",x.day),range_start:s("rounded-l-md bg-accent",x.range_start),range_middle:s("rounded-none",x.range_middle),range_end:s("rounded-r-md bg-accent",x.range_end),today:s("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",x.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",x.outside),disabled:s("text-muted-foreground opacity-50",x.disabled),hidden:s("invisible",x.hidden),...u},components:{Root:({className:t,rootRef:r,...a})=>e("div",{"data-slot":"calendar",ref:r,className:s(t),...a}),Chevron:({className:n,orientation:d,...o})=>e("left"===d?t:"right"===d?r:a,{className:s("size-4",n),...o}),DayButton:c,WeekNumber:({children:t,...r})=>e("td",{...r,children:e("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:t})}),...p},...b})}function c({className:t,day:r,modifiers:a,...o}){const l=d(),i=n.useRef(null);return n.useEffect(()=>{a.focused&&i.current?.focus()},[a.focused]),e(u,{ref:i,variant:"ghost",size:"icon","data-day":r.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:s("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] 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 [&>span]:text-xs [&>span]:opacity-70",l.day,t),...o})}export{i as Calendar,c as CalendarDayButton};
2
+ import{jsx as e}from"react/jsx-runtime";import{ChevronLeftIcon as t,ChevronRightIcon as r,ChevronDownIcon as a}from"lucide-react";import*as n from"react";import{getDefaultClassNames as d,DayPicker as o}from"react-day-picker";import{cn as s}from"../../lib/utils/cn.js";import{buttonVariants as l,Button as u}from"../button/button.js";function i({className:n,classNames:u,showOutsideDays:i=!0,captionLayout:m="label",buttonVariant:g="ghost",formatters:f,components:p,...b}){const x=d();return e(o,{showOutsideDays:i,className:s("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,n),captionLayout:m,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...f},classNames:{root:s("w-fit",x.root),months:s("relative flex flex-col gap-4 md:flex-row",x.months),month:s("flex w-full flex-col gap-4",x.month),nav:s("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",x.nav),button_previous:s(l({variant:g}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",x.button_previous),button_next:s(l({variant:g}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",x.button_next),month_caption:s("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",x.month_caption),dropdowns:s("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",x.dropdowns),dropdown_root:s("has-focus:border-ring border-input has-focus:ring-ring/50 relative rounded-md border shadow-xs has-focus:ring-[3px]",x.dropdown_root),dropdown:s("bg-popover absolute inset-0 opacity-0",x.dropdown),caption_label:s("font-medium select-none","label"===m?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5",x.caption_label),table:"w-full border-collapse",weekdays:s("flex",x.weekdays),weekday:s("text-muted-foreground flex-1 rounded-md text-[0.8rem] font-normal select-none",x.weekday),week:s("mt-2 flex w-full",x.week),week_number_header:s("w-(--cell-size) select-none",x.week_number_header),week_number:s("text-muted-foreground text-[0.8rem] select-none",x.week_number),day:s("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",b.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",x.day),range_start:s("bg-accent rounded-l-md",x.range_start),range_middle:s("rounded-none",x.range_middle),range_end:s("bg-accent rounded-r-md",x.range_end),today:s("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",x.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",x.outside),disabled:s("text-muted-foreground opacity-50",x.disabled),hidden:s("invisible",x.hidden),...u},components:{Root:({className:t,rootRef:r,...a})=>e("div",{"data-slot":"calendar",ref:r,className:s(t),...a}),Chevron:({className:n,orientation:d,...o})=>e("left"===d?t:"right"===d?r:a,{className:s("size-4",n),...o}),DayButton:c,WeekNumber:({children:t,...r})=>e("td",{...r,children:e("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:t})}),...p},...b})}function c({className:t,day:r,modifiers:a,...o}){const l=d(),i=n.useRef(null);return n.useEffect(()=>{a.focused&&i.current?.focus()},[a.focused]),e(u,{ref:i,variant:"ghost",size:"icon","data-day":r.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:s("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] 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 [&>span]:text-xs [&>span]:opacity-70",l.day,t),...o})}export{i as Calendar,c as CalendarDayButton};
@@ -1,12 +1,11 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
3
 
4
- declare function Card({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
5
- declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
6
- declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
7
- declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
8
- declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
9
- declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
10
- declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
4
+ declare function Card({ className, render, variant, ...props }: useRender.ComponentProps<'div'> & {
5
+ variant?: 'default' | 'transparent';
6
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
7
+ declare function CardHeader({ className, render, ...props }: useRender.ComponentProps<'div'>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
8
+ declare function CardTitle({ className, render, ...props }: useRender.ComponentProps<'div'>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
9
+ declare function CardDescription({ className, render, ...props }: useRender.ComponentProps<'div'>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
11
10
 
12
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
11
+ export { Card, CardDescription, CardHeader, CardTitle };
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{cn as t}from"../../lib/utils/cn.js";function r({className:r,...e}){return a("div",{"data-slot":"card",className:t("bg-background text-card-foreground flex flex-col gap-6 rounded-xl py-6",r),...e})}function e({className:r,...e}){return a("div",{"data-slot":"card-header",className:t("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",r),...e})}function s({className:r,...e}){return a("div",{"data-slot":"card-title",className:t("text-lg leading-none font-medium",r),...e})}function o({className:r,...e}){return a("div",{"data-slot":"card-description",className:t("text-muted-foreground text-sm",r),...e})}function c({className:r,...e}){return a("div",{"data-slot":"card-action",className:t("col-start-2 row-span-2 row-start-1 self-start justify-self-end",r),...e})}function d({className:r,...e}){return a("div",{"data-slot":"card-content",className:t("px-6",r),...e})}function n({className:r,...e}){return a("div",{"data-slot":"card-footer",className:t("flex items-center px-6 [.border-t]:pt-6",r),...e})}export{r as Card,c as CardAction,d as CardContent,o as CardDescription,n as CardFooter,e as CardHeader,s as CardTitle};
1
+ import{mergeProps as e}from"@base-ui/react/merge-props";import{useRender as r}from"@base-ui/react/use-render";import{cn as a}from"../../lib/utils/cn.js";function t({className:t,render:o,variant:d="default",...s}){const n={className:a("bg-card text-card-foreground relative flex flex-col gap-2 rounded-2xl p-5 not-dark:bg-clip-padding dark:border dark:shadow-xs/5 dark:before:pointer-events-none dark:before:absolute dark:before:inset-0 dark:before:rounded-[calc(var(--radius-2xl)-1px)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]","default"===d&&"border shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)]",t),"data-slot":"card"};return r({defaultTagName:"div",props:e(n,s),render:o})}function o({className:t,render:o,...d}){const s={className:a("flex flex-col items-start gap-2",t),"data-slot":"card-header"};return r({defaultTagName:"div",props:e(s,d),render:o})}function d({className:t,render:o,...d}){const s={className:a("flex w-full items-center gap-2 text-lg leading-none font-medium",t),"data-slot":"card-title"};return r({defaultTagName:"div",props:e(s,d),render:o})}function s({className:t,render:o,...d}){const s={className:a("text-muted-foreground text-sm",t),"data-slot":"card-description"};return r({defaultTagName:"div",props:e(s,d),render:o})}export{t as Card,s as CardDescription,o as CardHeader,d as CardTitle};
@@ -1,6 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as RechartsPrimitive from 'recharts';
4
+ import { ValueType, NameType, Payload } from 'recharts/types/component/DefaultTooltipContent';
5
+ import { TooltipContentProps } from 'recharts/types/component/Tooltip';
6
+ import { LegendPayload } from 'recharts/types/component/DefaultLegendContent';
7
+ import { Props } from 'recharts/types/component/Legend';
4
8
 
5
9
  declare const THEMES: {
6
10
  readonly light: "";
@@ -18,6 +22,25 @@ type ChartConfig = {
18
22
  theme: Record<keyof typeof THEMES, string>;
19
23
  });
20
24
  };
25
+ type CustomTooltipProps = TooltipContentProps<ValueType, NameType> & {
26
+ className?: string;
27
+ hideLabel?: boolean;
28
+ hideIndicator?: boolean;
29
+ indicator?: 'line' | 'dot' | 'dashed';
30
+ nameKey?: string;
31
+ labelKey?: string;
32
+ labelFormatter?: (label: TooltipContentProps<number, string>['label'], payload: TooltipContentProps<number, string>['payload']) => React.ReactNode;
33
+ formatter?: (value: number | string, name: string, item: Payload<number | string, string>, index: number, payload: ReadonlyArray<Payload<number | string, string>>) => React.ReactNode;
34
+ labelClassName?: string;
35
+ color?: string;
36
+ };
37
+ type ChartLegendContentProps = {
38
+ className?: string;
39
+ hideIcon?: boolean;
40
+ verticalAlign?: Props['verticalAlign'];
41
+ payload?: LegendPayload[];
42
+ nameKey?: string;
43
+ };
21
44
  declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<'div'> & {
22
45
  config: ChartConfig;
23
46
  children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
@@ -27,18 +50,9 @@ declare const ChartStyle: ({ id, config }: {
27
50
  config: ChartConfig;
28
51
  }) => react_jsx_runtime.JSX.Element | null;
29
52
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
30
- declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: RechartsPrimitive.TooltipContentProps<any, any> & React.ComponentProps<'div'> & {
31
- hideLabel?: boolean;
32
- hideIndicator?: boolean;
33
- indicator?: 'line' | 'dot' | 'dashed';
34
- nameKey?: string;
35
- labelKey?: string;
36
- }): react_jsx_runtime.JSX.Element | null;
53
+ declare function ChartTooltipContent({ active, payload, label, className, indicator, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: CustomTooltipProps): react_jsx_runtime.JSX.Element | null;
37
54
  declare const ChartLegend: typeof RechartsPrimitive.Legend;
38
- declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & Pick<RechartsPrimitive.DefaultLegendContentProps, 'payload' | 'verticalAlign'> & {
39
- hideIcon?: boolean;
40
- nameKey?: string;
41
- }): react_jsx_runtime.JSX.Element | null;
55
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): react_jsx_runtime.JSX.Element | null;
42
56
 
43
57
  export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
44
- export type { ChartConfig };
58
+ export type { ChartConfig, ChartLegendContentProps, CustomTooltipProps };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import*as n from"react";import*as a from"recharts";import{clsx as o}from"clsx";import{twMerge as l}from"tailwind-merge";function s(...e){return l(o(e))}const c={light:"",dark:".dark"},i=n.createContext(null);function d(){const e=n.useContext(i);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function u({id:t,className:o,children:l,config:c,...d}){const u=n.useId(),h=`chart-${t||u.replace(/:/g,"")}`;return e(i.Provider,{value:{config:c},children:r("div",{"data-slot":"chart","data-chart":h,className:s("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",o),...d,children:[e(m,{id:h,config:c}),e(a.ResponsiveContainer,{children:l})]})})}const m=({id:r,config:t})=>{const n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?e("style",{dangerouslySetInnerHTML:{__html:Object.entries(c).map(([e,t])=>`\n${t} [data-chart=${r}] {\n${n.map(([r,t])=>{const n=t.theme?.[e]||t.color;return n?` --color-${r}: ${n};`:null}).join("\n")}\n}\n`).join("\n")}}):null},h=a.Tooltip;function f({active:a,payload:o,className:l,indicator:c="dot",hideLabel:i=!1,hideIndicator:u=!1,label:m,labelFormatter:h,labelClassName:f,formatter:g,color:p,nameKey:v,labelKey:y}){const{config:x}=d(),k=n.useMemo(()=>{if(i||!o?.length)return null;const[r]=o,t=b(x,r,`${y||r?.dataKey||r?.name||"value"}`),n=y||"string"!=typeof m?t?.label:x[m]?.label||m;return h?e("div",{className:s("font-medium",f),children:h(n,o)}):n?e("div",{className:s("font-medium",f),children:n}):null},[m,h,o,i,f,x,y]);if(!a||!o?.length)return null;const N=1===o.length&&"dot"!==c;return r("div",{className:s("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",l),children:[N?null:k,e("div",{className:"grid gap-1.5",children:o.map((n,a)=>{const o=`${v||n.name||n.dataKey||"value"}`,l=b(x,n,o),i=p||n.payload.fill||n.color;return e("div",{className:s("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5","dot"===c&&"items-center"),children:g&&void 0!==n?.value&&n.name?g(n.value,n.name,n,a,n.payload):r(t,{children:[l?.icon?e(l.icon,{}):!u&&e("div",{className:s("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":"dot"===c,"w-1":"line"===c,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===c,"my-0.5":N&&"dashed"===c}),style:{"--color-bg":i,"--color-border":i}}),r("div",{className:s("flex flex-1 justify-between leading-none",N?"items-end":"items-center"),children:[r("div",{className:"grid gap-1.5",children:[N?k:null,e("span",{className:"text-muted-foreground",children:l?.label||n.name})]}),n.value&&e("span",{className:"text-foreground font-mono font-medium tabular-nums",children:n.value.toLocaleString()})]})]})},n.dataKey)})})]})}const g=a.Legend;function p({className:t,hideIcon:n=!1,payload:a,verticalAlign:o="bottom",nameKey:l}){const{config:c}=d();return a?.length?e("div",{className:s("flex items-center justify-center gap-4","top"===o?"pb-3":"pt-3",t),children:a.map(t=>{const a=`${l||t.dataKey||"value"}`,o=b(c,t,a);return r("div",{className:s("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[o?.icon&&!n?e(o.icon,{}):e("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:t.color}}),o?.label]},t.value)})}):null}function b(e,r,t){if("object"!=typeof r||null===r)return;const n="payload"in r&&"object"==typeof r.payload&&null!==r.payload?r.payload:void 0;let a=t;return t in r&&"string"==typeof r[t]?a=r[t]:n&&t in n&&"string"==typeof n[t]&&(a=n[t]),a in e?e[a]:e[t]}export{u as ChartContainer,g as ChartLegend,p as ChartLegendContent,m as ChartStyle,h as ChartTooltip,f as ChartTooltipContent};
2
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import*as n from"react";import*as a from"recharts";import{clsx as o}from"clsx";import{twMerge as l}from"tailwind-merge";function s(...e){return l(o(e))}const c={light:"",dark:".dark"},i=n.createContext(null);function d(){const e=n.useContext(i);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function u({id:t,className:o,children:l,config:c,...d}){const u=n.useId(),h=`chart-${t||u.replace(/:/g,"")}`;return e(i.Provider,{value:{config:c},children:r("div",{"data-slot":"chart","data-chart":h,className:s("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",o),...d,children:[e(m,{id:h,config:c}),e(a.ResponsiveContainer,{children:l})]})})}const m=({id:r,config:t})=>{const n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?e("style",{dangerouslySetInnerHTML:{__html:Object.entries(c).map(([e,t])=>`\n ${t} [data-chart=${r}] {\n ${n.map(([r,t])=>{const n=t.theme?.[e]||t.color;return n?` --color-${r}: ${n};`:null}).join("\n")}\n }\n `).join("\n")}}):null},h=a.Tooltip;function f({active:a,payload:o,label:l,className:c,indicator:i="dot",hideLabel:u=!1,hideIndicator:m=!1,labelFormatter:h,formatter:f,labelClassName:g,color:p,nameKey:v,labelKey:y}){const{config:x}=d(),k=n.useMemo(()=>{if(u||!o?.length)return null;const[r]=o,t=b(x,r,`${y||r?.dataKey||r?.name||"value"}`),n=(()=>{const e=y||"string"!=typeof l?t?.label:x[l]?.label??l;return"string"==typeof e||"number"==typeof e?e:void 0})();return h?e("div",{className:s("font-medium",g),children:h(n,o)}):n?e("div",{className:s("font-medium",g),children:n}):null},[l,h,o,u,g,x,y]);if(!a||!o?.length)return null;const N=1===o.length&&"dot"!==i;return r("div",{className:s("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",c),children:[N?null:k,e("div",{className:"grid gap-1.5",children:o.map((n,a)=>{const o=`${v||n.name||n.dataKey||"value"}`,l=b(x,n,o),c=p||n.payload.fill||n.color;return e("div",{className:s("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5","dot"===i&&"items-center"),children:f&&void 0!==n?.value&&n.name?f(n.value,n.name,n,a,n.payload):r(t,{children:[l?.icon?e(l.icon,{}):!m&&e("div",{className:s("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":"dot"===i,"w-1":"line"===i,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===i,"my-0.5":N&&"dashed"===i}),style:{"--color-bg":c,"--color-border":c}}),r("div",{className:s("flex flex-1 justify-between leading-none",N?"items-end":"items-center"),children:[r("div",{className:"grid gap-1.5",children:[N?k:null,e("span",{className:"text-muted-foreground",children:l?.label||n.name})]}),n.value&&e("span",{className:"text-foreground font-mono font-medium tabular-nums",children:n.value.toLocaleString()})]})]})},n.dataKey)})})]})}const g=a.Legend;function p({className:t,hideIcon:n=!1,payload:a,verticalAlign:o="bottom",nameKey:l}){const{config:c}=d();return a?.length?e("div",{className:s("flex items-center justify-center gap-4","top"===o?"pb-3":"pt-3",t),children:a.map(t=>{const a=`${l||t.dataKey||"value"}`,o=b(c,t,a);return r("div",{className:s("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[o?.icon&&!n?e(o.icon,{}):e("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:t.color}}),o?.label]},t.value)})}):null}function b(e,r,t){if("object"!=typeof r||null===r)return;const n="payload"in r&&"object"==typeof r.payload&&null!==r.payload?r.payload:void 0;let a=t;return t in r&&"string"==typeof r[t]?a=r[t]:n&&t in n&&"string"==typeof n[t]&&(a=n[t]),a in e?e[a]:e[t]}export{u as ChartContainer,g as ChartLegend,p as ChartLegendContent,m as ChartStyle,h as ChartTooltip,f as ChartTooltipContent};
@@ -1,9 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import * as React from 'react';
2
+ import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
4
3
 
5
- declare function Checkbox({ className, rounded, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root> & {
6
- rounded?: 'default' | 'small';
7
- }): react_jsx_runtime.JSX.Element;
4
+ declare function Checkbox({ className, ...props }: Checkbox$1.Root.Props): react_jsx_runtime.JSX.Element;
8
5
 
9
6
  export { Checkbox };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as r}from"react/jsx-runtime";import*as e from"@radix-ui/react-checkbox";import{CheckIcon as i}from"lucide-react";import{cn as a}from"../../lib/utils/cn.js";function t({className:t,rounded:d="small",...o}){return r(e.Root,{"data-slot":"checkbox",className:a("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50","default"===d&&"rounded-sm","small"===d&&"rounded-[4px]",t),...o,children:r(e.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:r(i,{className:"size-3.5"})})})}export{t as Checkbox};
2
+ import{jsx as r}from"react/jsx-runtime";import{Checkbox as e}from"@base-ui/react/checkbox";import{CheckIcon as i}from"lucide-react";import{cn as a}from"../../lib/utils/cn.js";function t({className:t,...d}){return r(e.Root,{"data-slot":"checkbox",className:a("border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-[3px] data-disabled:opacity-50",t),...d,children:r(e.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:r(i,{})})})}export{t as Checkbox};
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
3
+
4
+ declare function Collapsible({ ...props }: Collapsible$1.Root.Props): react_jsx_runtime.JSX.Element;
5
+ declare function CollapsibleTrigger({ className, withIcon, children, ...props }: Collapsible$1.Trigger.Props & {
6
+ withIcon?: boolean;
7
+ }): react_jsx_runtime.JSX.Element;
8
+ declare function CollapsiblePanel({ className, ...props }: Collapsible$1.Panel.Props): react_jsx_runtime.JSX.Element;
9
+
10
+ export { Collapsible, CollapsiblePanel as CollapsibleContent, CollapsiblePanel, CollapsibleTrigger };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Collapsible as a}from"@base-ui/react/collapsible";import{ChevronDownIcon as l}from"lucide-react";import{cn as i}from"../../lib/utils/cn.js";function r({...t}){return e(a.Root,{"data-slot":"collapsible",...t})}function o({className:r,withIcon:o=!1,children:s,...n}){return t(a.Trigger,{className:i("inline-flex cursor-pointer items-center gap-2 data-panel-open:[&_svg]:rotate-180",r),"data-slot":"collapsible-trigger",...n,children:[s,o&&e(l,{className:"size-4 transition-transform"})]})}function s({className:t,...l}){return e(a.Panel,{className:i("h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",t),"data-slot":"collapsible-panel",...l})}export{r as Collapsible,s as CollapsibleContent,s as CollapsiblePanel,o as CollapsibleTrigger};
@@ -0,0 +1,33 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
3
+ import * as React from 'react';
4
+
5
+ declare function Combobox<ItemValue, Multiple extends boolean | undefined = false>(props: Combobox$1.Root.Props<ItemValue, Multiple>): react_jsx_runtime.JSX.Element;
6
+ declare function ComboboxInput({ className, showTrigger, showClear, startAddon, ...props }: Omit<Combobox$1.Input.Props, 'size'> & {
7
+ showTrigger?: boolean;
8
+ showClear?: boolean;
9
+ startAddon?: React.ReactNode;
10
+ ref?: React.Ref<HTMLInputElement>;
11
+ }): react_jsx_runtime.JSX.Element;
12
+ declare function ComboboxTrigger({ className, ...props }: Combobox$1.Trigger.Props): react_jsx_runtime.JSX.Element;
13
+ declare function ComboboxPopup({ className, children, sideOffset, ...props }: Combobox$1.Popup.Props & {
14
+ sideOffset?: number;
15
+ }): react_jsx_runtime.JSX.Element;
16
+ declare function ComboboxItem({ className, children, ...props }: Combobox$1.Item.Props): react_jsx_runtime.JSX.Element;
17
+ declare function ComboboxSeparator({ className, ...props }: Combobox$1.Separator.Props): react_jsx_runtime.JSX.Element;
18
+ declare function ComboboxGroup({ className, ...props }: Combobox$1.Group.Props): react_jsx_runtime.JSX.Element;
19
+ declare function ComboboxGroupLabel({ className, ...props }: Combobox$1.GroupLabel.Props): react_jsx_runtime.JSX.Element;
20
+ declare function ComboboxEmpty({ className, ...props }: Combobox$1.Empty.Props): react_jsx_runtime.JSX.Element;
21
+ declare function ComboboxRow({ className, ...props }: Combobox$1.Row.Props): react_jsx_runtime.JSX.Element;
22
+ declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): react_jsx_runtime.JSX.Element;
23
+ declare function ComboboxList({ className, ...props }: Combobox$1.List.Props): react_jsx_runtime.JSX.Element;
24
+ declare function ComboboxClear({ className, ...props }: Combobox$1.Clear.Props): react_jsx_runtime.JSX.Element;
25
+ declare function ComboboxStatus({ className, ...props }: Combobox$1.Status.Props): react_jsx_runtime.JSX.Element;
26
+ declare function ComboboxCollection(props: Combobox$1.Collection.Props): react_jsx_runtime.JSX.Element;
27
+ declare function ComboboxChips({ className, children, startAddon, ...props }: Combobox$1.Chips.Props & {
28
+ startAddon?: React.ReactNode;
29
+ }): react_jsx_runtime.JSX.Element;
30
+ declare function ComboboxChip({ children, ...props }: Combobox$1.Chip.Props): react_jsx_runtime.JSX.Element;
31
+ declare const useComboboxFilter: typeof Combobox$1.useFilter;
32
+
33
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, useComboboxFilter };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Combobox as o}from"@base-ui/react/combobox";import{ChevronsUpDownIcon as s,XIcon as a}from"lucide-react";import*as n from"react";import{cn as r}from"../../lib/utils/cn.js";import{Input as i}from"../input/input.js";import{ScrollArea as c}from"../scroll-area/scroll-area.js";const l=n.createContext({chipsRef:null,multiple:!1});function d(t){const s=n.useRef(null);return e(l.Provider,{value:{chipsRef:s,multiple:!!t.multiple},children:e(o.Root,{...t})})}function m({className:c,showTrigger:d=!0,showClear:m=!1,startAddon:p,...h}){const{multiple:b}=n.useContext(l);return b?e(o.Input,{className:r("h-8 min-w-12 flex-1 px-3 py-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",c),"data-slot":"combobox-input",...h}):t("div",{className:"text-foreground relative w-full not-has-[>*.w-full]:w-fit has-disabled:opacity-64",children:[p&&e("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 [&_svg]:-mx-0.5 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4","data-slot":"combobox-start-addon",children:p}),e(o.Input,{"data-slot":"combobox-input",render:e(i,{className:r("has-disabled:opacity-100",p&&"ps-[calc(--spacing(8.5)-1px)]",c)}),...h}),d&&e(u,{className:r("absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 transition-opacity outline-none hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4"),children:e(s,{})}),m&&e(y,{className:r("absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 transition-opacity outline-none hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4"),children:e(a,{})})]})}function u({className:t,...s}){return e(o.Trigger,{className:r("focus-visible:ring-0",t),"data-slot":"combobox-trigger",...s})}function p({className:t,children:s,sideOffset:a=4,...i}){const{chipsRef:c}=n.useContext(l);return e(o.Portal,{children:e(o.Positioner,{anchor:c,className:"z-50 select-none","data-slot":"combobox-positioner",sideOffset:a,children:e(o.Popup,{className:r("text-foreground bg-popover popup-animate relative flex w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) flex-col rounded-lg border py-2 shadow-lg/5 transition-[scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",t),"data-slot":"combobox-popup",...i,children:s})})})}function h({className:s,children:a,...n}){return t(o.Item,{className:r("data-highlighted:bg-accent data-highlighted:text-accent-foreground grid cursor-default grid-cols-[1rem_1fr] items-center gap-2 px-3 py-[6px] pr-8 text-base outline-none in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",s),"data-slot":"combobox-item",...n,children:[e(o.ItemIndicator,{className:"col-start-1",children:e("svg",{fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/1500/svg",children:e("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})}),e("div",{className:"col-start-2",children:a})]})}function b({className:t,...s}){return e(o.Separator,{className:r("bg-border mx-2 my-1 h-px last:hidden",t),"data-slot":"combobox-separator",...s})}function x({className:t,...s}){return e(o.Group,{className:r("[[role=group]+&]:mt-1.5",t),"data-slot":"combobox-group",...s})}function f({className:t,...s}){return e(o.GroupLabel,{className:r("text-muted-foreground px-2 py-1.5 text-xs font-medium",t),"data-slot":"combobox-group-label",...s})}function g({className:t,...s}){return e(o.Empty,{className:r("text-muted-foreground text-center text-base not-empty:p-2 sm:text-sm",t),"data-slot":"combobox-empty",...s})}function v({className:t,...s}){return e(o.Row,{className:t,"data-slot":"combobox-row",...s})}function w({...t}){return e(o.Value,{"data-slot":"combobox-value",...t})}function N({className:t,...s}){return e(c,{scrollFade:!0,children:e(o.List,{className:r("max-h-[min(var(--available-height),23rem)] not-empty:scroll-py-1",t),"data-slot":"combobox-list",...s})})}function y({className:t,...s}){return e(o.Clear,{className:t,"data-slot":"combobox-clear",...s})}function z({className:t,...s}){return e(o.Status,{className:r("text-muted-foreground px-3 py-2 text-xs font-medium empty:m-0 empty:p-0",t),"data-slot":"combobox-status",...s})}function _(t){return e(o.Collection,{"data-slot":"combobox-collection",...t})}function k({className:s,children:a,startAddon:i,...c}){const{chipsRef:d}=n.useContext(l);return t(o.Chips,{className:r("border-input bg-background ring-ring/24 focus-within:border-ring has-aria-invalid:border-destructive/36 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border p-[calc(--spacing(1)-1px)] text-base shadow-xs/5 transition-shadow outline-none *:min-h-7 not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:ring-[3px] has-disabled:pointer-events-none has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none sm:min-h-7 sm:text-sm sm:*:min-h-7 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",s),"data-slot":"combobox-chips",onMouseDown:e=>{if(e.target.closest('[data-slot="combobox-chip"]')||!d?.current)return;e.preventDefault();const t=d.current.querySelector("input");t&&!d.current.querySelector("input:focus")&&t.focus()},ref:d,...c,children:[i&&e("div",{"aria-hidden":"true",className:"flex shrink-0 items-center ps-2.5 opacity-80 has-[+[data-slot=combobox-chip]]:px-2.5 [&_svg]:pointer-events-none [&_svg]:-ms-0.5 [&_svg]:-me-1.5 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4","data-slot":"combobox-start-addon",children:i}),a]})}function C({children:s,...a}){return t(o.Chip,{className:"bg-accent text-accent-foreground mt-[2px] flex h-7 items-center rounded-[calc(var(--radius-md)-1px)] ps-2 text-sm font-medium outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5","data-slot":"combobox-chip",...a,children:[s,e(R,{})]})}function R(t){return e(o.ChipRemove,{"aria-label":"Remove",className:"h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5","data-slot":"combobox-chip-remove",...t,children:e(a,{})})}const j=o.useFilter;export{d as Combobox,C as ComboboxChip,k as ComboboxChips,y as ComboboxClear,_ as ComboboxCollection,g as ComboboxEmpty,x as ComboboxGroup,f as ComboboxGroupLabel,m as ComboboxInput,h as ComboboxItem,N as ComboboxList,p as ComboboxPopup,v as ComboboxRow,b as ComboboxSeparator,z as ComboboxStatus,u as ComboboxTrigger,w as ComboboxValue,j as useComboboxFilter};
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+
3
+ type Props = {
4
+ selectedDate: string | undefined;
5
+ triggerClassName?: string;
6
+ className?: string;
7
+ onApply?: (date: string | undefined) => void;
8
+ };
9
+ declare const DatePicker: React.FC<Props>;
10
+
11
+ export { DatePicker };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{format as r}from"date-fns";import*as o from"react";import{LuCalendarFold as a}from"react-icons/lu";import{cn as s}from"../../lib/utils/cn.js";import{Button as m}from"../button/button.js";import{Calendar as i}from"../calendar/calendar.js";import{Popover as n,PopoverTrigger as c,PopoverContent as l}from"../popover/popover.js";import"lucide-react";import{Text as d}from"../text/text.js";const p=p=>{const{selectedDate:f,className:u,triggerClassName:j,onApply:x}=p,[y,g]=o.useState();o.useEffect(()=>{g(f?new Date(f):void 0)},[f]);return t(n,{children:[t(c,{render:e(m,{variant:"secondary",className:s("w-[240px] justify-start text-left font-normal",!y&&"text-muted-foreground",j)}),children:[e(a,{className:"mr-1 h-4 w-4"}),y?r(y,"PPP"):e(d,{children:"Выберите дату"})]}),e(l,{className:s("w-auto p-0",u),align:"start",children:e(i,{mode:"single",selected:y,onSelect:t=>{g(t),x?.(t?r(t,"yyyy-MM-dd"):void 0)},autoFocus:!0})})]})};export{p as DatePicker};
@@ -1,3 +1,4 @@
1
+ import { Popover } from '@base-ui/react/popover';
1
2
  import { FC } from 'react';
2
3
  import { DayPicker } from 'react-day-picker';
3
4
 
@@ -8,9 +9,9 @@ interface DatesStringRange {
8
9
  type Props = {
9
10
  datesRange: DatesStringRange | undefined;
10
11
  withDatesMacroses?: boolean;
11
- onApply: (datesRange: DatesStringRange | undefined) => void;
12
- triggerClassName?: string;
13
12
  className?: string;
13
+ onApply: (datesRange: DatesStringRange | undefined) => void;
14
+ render?: Popover.Trigger.Props['render'];
14
15
  } & React.ComponentProps<typeof DayPicker>;
15
16
  declare const DateRangePicker: FC<Props>;
16
17
 
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import{format as t,subDays as a}from"date-fns";import{CalendarIcon as n}from"lucide-react";import{useState as l,useEffect as i}from"react";import{cn as d}from"../../lib/utils/cn.js";import{Button as s}from"../button/button.js";import{Calendar as c}from"../calendar/calendar.js";import{Popover as m,PopoverTrigger as f,PopoverContent as y}from"../popover/popover.js";const p=p=>{const{className:h,datesRange:u,withDatesMacroses:v,triggerClassName:w,onApply:g,...M}=p,[N,L]=l(!1),[x,C]=l();i(()=>{C({from:u?.from?new Date(u?.from):void 0,to:u?.to?new Date(u?.to):void 0})},[u]);const k=e=>{const o=new Date;let r=new Date(o);"week"===e&&(r=a(o,6)),"month"===e&&(r=a(o,30)),"year"===e&&(r=a(o,365)),g({from:t(r,"yyyy-MM-dd"),to:t(o,"yyyy-MM-dd")}),L(!1)};return e("div",{className:d("grid gap-2",h),children:o(m,{open:N,onOpenChange:L,children:[e(f,{asChild:!0,children:o(s,{id:"date",variant:"outline",className:d("justify-start text-left font-normal",!u&&"text-muted-foreground",w),children:[e(n,{}),x?.from?x.to?o(r,{children:[t(x.from,"LLL dd, y")," -"," ",t(x.to,"LLL dd, y")]}):t(x.from,"LLL dd, y"):e("span",{children:"Укажите даты"})]})}),e(y,{className:"w-fit p-0",align:"start",children:o("div",{className:"flex w-full flex-col",children:[v&&o("div",{className:"flex w-full items-center gap-2 p-3",children:[e(s,{variant:"secondary",onClick:()=>k("week"),children:"7 дней"}),e(s,{variant:"secondary",onClick:()=>k("month"),children:"30 дней"}),e(s,{variant:"secondary",onClick:()=>k("year"),children:"Год"})]}),e(c,{...M,autoFocus:!0,mode:"range",defaultMonth:x?.from,selected:x,onSelect:C,numberOfMonths:2}),o("div",{className:"flex w-full gap-3 p-3",children:[e(s,{className:"w-full",onClick:()=>{g(void 0),L(!1)},variant:"outline",size:"sm",children:"Сбросить период"}),e(s,{disabled:!x?.from||!x.to,className:"w-full",onClick:()=>{g({from:t(x.from,"yyyy-MM-dd"),to:t(x.to,"yyyy-MM-dd")}),L(!1)},size:"sm",children:"Применить"})]})]})})]})})};export{p as DateRangePicker};
2
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{format as r,subDays as t}from"date-fns";import{useState as a,useEffect as n}from"react";import{LuCalendarFold as i}from"react-icons/lu";import{cn as l}from"../../lib/utils/cn.js";import{Button as s}from"../button/button.js";import{Calendar as d}from"../calendar/calendar.js";import{Popover as m,PopoverTrigger as c,PopoverContent as f}from"../popover/popover.js";import"lucide-react";const y=y=>{const{className:p,datesRange:u,withDatesMacroses:M,render:h,onApply:v,...w}=y,[g,N]=a(!1),[x,k]=a();n(()=>{k({from:u?.from?new Date(u?.from):void 0,to:u?.to?new Date(u?.to):void 0})},[u]);const j=e=>{const o=new Date;let a=new Date(o);"week"===e&&(a=t(o,6)),"month"===e&&(a=t(o,30)),"year"===e&&(a=t(o,365)),v({from:r(a,"yyyy-MM-dd"),to:r(o,"yyyy-MM-dd")}),N(!1)};return e("div",{className:l("grid gap-2",p),children:o(m,{open:g,onOpenChange:N,children:[o(c,{render:h??e(s,{id:"date",variant:"secondary",className:l("justify-start text-left font-normal",!u&&"text-muted-foreground")}),children:[e(i,{}),x?.from?x.to?`${r(x.from,"dd MMM yyyy")} - ${r(x.to,"dd MMM yyyy")}`:r(x.from,"dd MMM yyyy"):"Укажите даты"]}),e(f,{className:"w-fit p-0",align:"start",children:o("div",{className:"flex w-full flex-col",children:[M&&o("div",{className:"flex w-full items-center gap-2 p-3",children:[e(s,{size:"sm",variant:"secondary",onClick:()=>j("week"),children:"7 дней"}),e(s,{size:"sm",variant:"secondary",onClick:()=>j("month"),children:"30 дней"}),e(s,{size:"sm",variant:"secondary",onClick:()=>j("year"),children:"Год"})]}),e(d,{...w,autoFocus:!0,mode:"range",defaultMonth:x?.from,selected:x,onSelect:k,numberOfMonths:2}),o("div",{className:"flex w-full gap-3 p-3",children:[e(s,{className:"w-full",onClick:()=>{v(void 0),N(!1)},variant:"outline",size:"sm",children:"Сбросить период"}),e(s,{variant:"default_invert",disabled:!x?.from||!x.to,className:"w-full",onClick:()=>{v({from:r(x.from,"yyyy-MM-dd"),to:r(x.to,"yyyy-MM-dd")}),N(!1)},size:"sm",children:"Применить"})]})]})})]})})};export{y as DateRangePicker};
@@ -1,19 +1,20 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as DialogPrimitive from '@radix-ui/react-dialog';
2
+ import * as _base_ui_react from '@base-ui/react';
3
+ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
3
4
  import * as React from 'react';
4
5
 
5
- declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
- declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
7
- declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
8
- declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
9
- declare function DialogOverlay({ className, blurred, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay> & {
10
- blurred?: boolean;
11
- }): react_jsx_runtime.JSX.Element;
12
- declare function DialogContent({ className, radixClassName, children, contentRef, blurred, hideCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
13
- blurred?: boolean;
6
+ declare const DialogCreateHandle: typeof Dialog$1.createHandle;
7
+ declare const Dialog: typeof Dialog$1.Root;
8
+ declare const DialogPortal: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare function DialogTrigger(props: Dialog$1.Trigger.Props): react_jsx_runtime.JSX.Element;
10
+ declare function DialogClose(props: Dialog$1.Close.Props): react_jsx_runtime.JSX.Element;
11
+ declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): react_jsx_runtime.JSX.Element;
12
+ declare function DialogViewport({ className, ...props }: Dialog$1.Viewport.Props): react_jsx_runtime.JSX.Element;
13
+ declare function DialogContent({ className, children, contentRef, radixClassName, bottomStickOnMobile, hideCloseButton, ...props }: Dialog$1.Popup.Props & {
14
14
  hideCloseButton?: boolean;
15
+ bottomStickOnMobile?: boolean;
15
16
  radixClassName?: string;
16
- contentRef?: React.RefObject<HTMLDivElement | null>;
17
+ contentRef?: React.Ref<HTMLDivElement | null>;
17
18
  }): react_jsx_runtime.JSX.Element;
18
19
  declare function DialogHeader({ className, pin, ...props }: React.ComponentProps<'div'> & {
19
20
  pin?: boolean;
@@ -22,7 +23,7 @@ declare function DialogContentSection({ className, ...props }: React.ComponentPr
22
23
  declare function DialogFooter({ className, pin, ...props }: React.ComponentProps<'div'> & {
23
24
  pin?: boolean;
24
25
  }): react_jsx_runtime.JSX.Element;
25
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
26
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
26
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime.JSX.Element;
27
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
27
28
 
28
- export { Dialog, DialogClose, DialogContent, DialogContentSection, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
29
+ export { Dialog, DialogClose, DialogContent, DialogContentSection, DialogCreateHandle, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogViewport };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as a from"@radix-ui/react-dialog";import{XIcon as o}from"lucide-react";import{cn as l}from"../../lib/utils/cn.js";import{onPointerDownOutside as s}from"../../lib/utils/events.js";import{Button as n}from"../button/button.js";function r({...e}){return t(a.Root,{"data-slot":"dialog",...e})}function i({...e}){return t(a.Trigger,{"data-slot":"dialog-trigger",...e})}function d({...e}){return t(a.Portal,{"data-slot":"dialog-portal",...e})}function c({...e}){return t(a.Close,{"data-slot":"dialog-close",...e})}function u({className:e,blurred:o,...s}){return t(a.Overlay,{"data-slot":"dialog-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",o?"backdrop-blur":"bg-black/50",e),...s})}function f({className:r,radixClassName:i,children:c,contentRef:f,blurred:m=!1,hideCloseButton:g=!1,...p}){return e(d,{"data-slot":"dialog-portal",children:[t(u,{blurred:m}),e(a.Content,{"data-slot":"dialog-content",className:l("bg-dialog data-[state=open]:animate-in border-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 xs:max-h-[94%] fixed top-[50%] left-[50%] z-50 flex max-h-[98%] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-3 overflow-hidden rounded-3xl border shadow-lg duration-200 sm:max-w-lg",i),onOpenAutoFocus:t=>t.preventDefault(),onPointerDownOutside:s,...p,children:[t("div",{ref:f,className:l("flex h-full w-full flex-col gap-2 overflow-y-auto",r),children:c}),!g&&t(a.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-[25px] right-[25px] rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",asChild:!0,children:e(n,{variant:"secondary",className:"xs:bg-secondary h-auto rounded-md bg-transparent p-[6px]",children:[t(o,{className:"xs:size-4 size-5"}),t("span",{className:"sr-only",children:"Close"})]})})]})]})}function m({className:e,pin:a,...o}){return t("div",{"data-slot":"dialog-header",className:l("bg-background flex flex-col rounded-b-3xl p-[30px] text-left",{"outline-dialog sticky top-0 left-0 outline-[8px]":a},e),...o})}function g({className:e,...a}){return t("div",{className:l("bg-background rounded-3xl p-[30px]",e),...a})}function p({className:e,pin:a,...o}){return t("div",{"data-slot":"dialog-footer",className:l("bg-background flex flex-col-reverse gap-2 rounded-t-3xl p-[30px] sm:flex-row sm:justify-end",{"outline-dialog sticky bottom-0 left-0 outline-[8px]":a},e),...o})}function x({className:e,...o}){return t(a.Title,{"data-slot":"dialog-title",className:l("line-clamp-2 pr-5 text-xl leading-tight font-medium break-words text-ellipsis",e),...o})}function b({className:e,...o}){return t(a.Description,{"data-slot":"dialog-description",className:l("text-muted-foreground mt-2 text-sm",e),...o})}export{r as Dialog,c as DialogClose,f as DialogContent,g as DialogContentSection,b as DialogDescription,p as DialogFooter,m as DialogHeader,u as DialogOverlay,d as DialogPortal,x as DialogTitle,i as DialogTrigger};
2
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Dialog as t}from"@base-ui/react/dialog";import{XIcon as o}from"lucide-react";import*as s from"react";import{cn as l}from"../../lib/utils/cn.js";import{Button as n}from"../button/button.js";const r=t.createHandle,i=t.Root,d=t.Portal;function c(a){return e(t.Trigger,{"data-slot":"dialog-trigger",...a})}function m(a){return e(t.Close,{"data-slot":"dialog-close",...a,tabIndex:-1})}function x({className:a,...o}){return e(t.Backdrop,{className:l("fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",a),"data-slot":"dialog-backdrop",...o})}function u({className:a,...o}){return e(t.Viewport,{className:l("fixed inset-0 top-0 left-0 z-50 flex flex-col items-center justify-center overflow-hidden p-4",a),"data-slot":"dialog-viewport",...o})}function p({className:r,children:i,contentRef:c,radixClassName:m,bottomStickOnMobile:p=!0,hideCloseButton:f=!1,...g}){const b=s.useRef(null);return a(d,{children:[e(x,{}),e(u,{className:l(p&&"max-xs:grid-rows-[1fr_auto] max-xs:p-0 max-xs:pt-12"),children:a(t.Popup,{ref:b,initialFocus:!0,className:l("bg-dialog text-popover-foreground border-background xs:max-h-[94%] fixed flex max-h-[98%] min-h-0 w-full max-w-[calc(100%-2rem)] min-w-0 -translate-y-[calc(1.25rem*var(--nested-dialogs))] scale-[calc(1-0.1*var(--nested-dialogs))] flex-col gap-3 overflow-hidden rounded-3xl border opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg/5 transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] focus:outline-none focus-visible:outline-none data-ending-style:scale-98 data-ending-style:opacity-0 data-nested:data-ending-style:translate-y-8 data-nested-dialog-open:origin-top data-starting-style:scale-98 data-starting-style:opacity-0 data-nested:data-starting-style:translate-y-8 sm:max-w-lg dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",p&&"max-xs:max-w-none max-xs:rounded-none max-xs:border-x-0 max-xs:border-t max-xs:border-b-0 max-xs:opacity-[calc(1-min(var(--nested-dialogs),1))] max-xs:before:hidden max-xs:before:rounded-none max-xs:data-ending-style:translate-y-4 max-xs:data-starting-style:translate-y-4",m),"data-slot":"dialog-popup",...g,children:[e("div",{ref:c,className:l("flex h-full w-full flex-col gap-2 overflow-y-auto",r),children:i}),!f&&a(t.Close,{"aria-label":"Close",className:"absolute top-[25px] right-[25px] rounded-md [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",render:e(n,{variant:"secondary",className:"h-auto rounded-md p-[6px]"}),children:[e(o,{className:"xs:size-4 size-5"}),e("span",{className:"sr-only",children:"Close"})]})]})})]})}function f({className:a,pin:t,...o}){return e("div",{"data-slot":"dialog-header",className:l("bg-background flex flex-col rounded-b-3xl p-[30px] text-left",{"outline-dialog sticky top-0 left-0 outline-[8px]":t},a),...o})}function g({className:a,...t}){return e("div",{className:l("bg-background rounded-3xl p-[30px]",a),...t})}function b({className:a,pin:t,...o}){return e("div",{"data-slot":"dialog-footer",className:l("bg-background flex flex-col-reverse gap-2 rounded-t-3xl p-[30px] sm:flex-row sm:justify-end",{"outline-dialog sticky bottom-0 left-0 outline-[8px]":t},a),...o})}function y({className:a,...o}){return e(t.Title,{"data-slot":"dialog-title",className:l("line-clamp-2 pr-5 text-xl leading-tight font-medium break-words text-ellipsis",a),...o})}function h({className:a,...o}){return e(t.Description,{"data-slot":"dialog-description",className:l("text-muted-foreground mt-2 text-sm",a),...o})}export{i as Dialog,m as DialogClose,p as DialogContent,g as DialogContentSection,r as DialogCreateHandle,h as DialogDescription,b as DialogFooter,f as DialogHeader,x as DialogOverlay,d as DialogPortal,y as DialogTitle,c as DialogTrigger,u as DialogViewport};