@uselets/ui 0.2.0 → 0.4.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 (171) hide show
  1. package/README.md +90 -2
  2. package/dist/components/accordion.d.ts +31 -0
  3. package/dist/components/accordion.js +2 -0
  4. package/dist/components/accordion.js.map +1 -0
  5. package/dist/components/alert-dialog.d.ts +74 -0
  6. package/dist/components/alert-dialog.js +2 -0
  7. package/dist/components/alert-dialog.js.map +1 -0
  8. package/dist/components/alert.d.ts +1 -1
  9. package/dist/components/alert.js +1 -1
  10. package/dist/components/alert.js.map +1 -1
  11. package/dist/components/avatar.d.ts +4 -4
  12. package/dist/components/avatar.js +1 -1
  13. package/dist/components/avatar.js.map +1 -1
  14. package/dist/components/badge.d.ts +22 -0
  15. package/dist/components/badge.js +2 -0
  16. package/dist/components/badge.js.map +1 -0
  17. package/dist/components/breadcrumb.d.ts +47 -0
  18. package/dist/components/breadcrumb.js +2 -0
  19. package/dist/components/breadcrumb.js.map +1 -0
  20. package/dist/components/button-group.d.ts +33 -0
  21. package/dist/components/button-group.js +2 -0
  22. package/dist/components/button-group.js.map +1 -0
  23. package/dist/components/button.d.ts +8 -5
  24. package/dist/components/button.js +1 -1
  25. package/dist/components/button.js.map +1 -1
  26. package/dist/components/calendar.d.ts +34 -0
  27. package/dist/components/calendar.js +2 -0
  28. package/dist/components/calendar.js.map +1 -0
  29. package/dist/components/card.js +1 -1
  30. package/dist/components/card.js.map +1 -1
  31. package/dist/components/carousel.d.ts +62 -0
  32. package/dist/components/carousel.js +2 -0
  33. package/dist/components/carousel.js.map +1 -0
  34. package/dist/components/center.d.ts +21 -0
  35. package/dist/components/center.js +2 -0
  36. package/dist/components/center.js.map +1 -0
  37. package/dist/components/chart.d.ts +263 -0
  38. package/dist/components/chart.js +8 -0
  39. package/dist/components/chart.js.map +1 -0
  40. package/dist/components/checkbox.d.ts +20 -0
  41. package/dist/components/checkbox.js +2 -0
  42. package/dist/components/checkbox.js.map +1 -0
  43. package/dist/components/collapsible.d.ts +20 -0
  44. package/dist/components/collapsible.js +2 -0
  45. package/dist/components/collapsible.js.map +1 -0
  46. package/dist/components/combobox.d.ts +103 -0
  47. package/dist/components/combobox.js +2 -0
  48. package/dist/components/combobox.js.map +1 -0
  49. package/dist/components/command.d.ts +65 -0
  50. package/dist/components/command.js +2 -0
  51. package/dist/components/command.js.map +1 -0
  52. package/dist/components/container.d.ts +19 -0
  53. package/dist/components/container.js +2 -0
  54. package/dist/components/container.js.map +1 -0
  55. package/dist/components/dialog.d.ts +18 -10
  56. package/dist/components/dialog.js +1 -1
  57. package/dist/components/dialog.js.map +1 -1
  58. package/dist/components/drawer.d.ts +1 -1
  59. package/dist/components/drawer.js +1 -1
  60. package/dist/components/drawer.js.map +1 -1
  61. package/dist/components/dropdown-menu.d.ts +36 -42
  62. package/dist/components/dropdown-menu.js +1 -1
  63. package/dist/components/dropdown-menu.js.map +1 -1
  64. package/dist/components/empty.d.ts +1 -1
  65. package/dist/components/empty.js +1 -1
  66. package/dist/components/empty.js.map +1 -1
  67. package/dist/components/field.d.ts +2 -2
  68. package/dist/components/field.js +1 -1
  69. package/dist/components/field.js.map +1 -1
  70. package/dist/components/group.d.ts +21 -0
  71. package/dist/components/group.js +2 -0
  72. package/dist/components/group.js.map +1 -0
  73. package/dist/components/hover-card.d.ts +24 -0
  74. package/dist/components/hover-card.js +2 -0
  75. package/dist/components/hover-card.js.map +1 -0
  76. package/dist/components/input-group.d.ts +51 -0
  77. package/dist/components/input-group.js +2 -0
  78. package/dist/components/input-group.js.map +1 -0
  79. package/dist/components/input-otp.js +1 -1
  80. package/dist/components/input-otp.js.map +1 -1
  81. package/dist/components/input.js +1 -1
  82. package/dist/components/input.js.map +1 -1
  83. package/dist/components/kbd.d.ts +6 -3
  84. package/dist/components/kbd.js +1 -1
  85. package/dist/components/kbd.js.map +1 -1
  86. package/dist/components/label.d.ts +2 -1
  87. package/dist/components/label.js +1 -1
  88. package/dist/components/label.js.map +1 -1
  89. package/dist/components/native-select.js +1 -1
  90. package/dist/components/native-select.js.map +1 -1
  91. package/dist/components/navigation-menu.d.ts +56 -0
  92. package/dist/components/navigation-menu.js +2 -0
  93. package/dist/components/navigation-menu.js.map +1 -0
  94. package/dist/components/pagination.d.ts +53 -0
  95. package/dist/components/pagination.js +2 -0
  96. package/dist/components/pagination.js.map +1 -0
  97. package/dist/components/popover.d.ts +43 -0
  98. package/dist/components/popover.js +2 -0
  99. package/dist/components/popover.js.map +1 -0
  100. package/dist/components/progress.d.ts +15 -0
  101. package/dist/components/progress.js +2 -0
  102. package/dist/components/progress.js.map +1 -0
  103. package/dist/components/radio-group.d.ts +19 -0
  104. package/dist/components/radio-group.js +2 -0
  105. package/dist/components/radio-group.js.map +1 -0
  106. package/dist/components/resizable.d.ts +25 -0
  107. package/dist/components/resizable.js +2 -0
  108. package/dist/components/resizable.js.map +1 -0
  109. package/dist/components/scroll-area.d.ts +21 -0
  110. package/dist/components/scroll-area.js +2 -0
  111. package/dist/components/scroll-area.js.map +1 -0
  112. package/dist/components/select.d.ts +15 -17
  113. package/dist/components/select.js +1 -1
  114. package/dist/components/select.js.map +1 -1
  115. package/dist/components/separator.d.ts +4 -2
  116. package/dist/components/separator.js +1 -1
  117. package/dist/components/separator.js.map +1 -1
  118. package/dist/components/sheet.d.ts +61 -0
  119. package/dist/components/sheet.js +2 -0
  120. package/dist/components/sheet.js.map +1 -0
  121. package/dist/components/sidebar.d.ts +192 -0
  122. package/dist/components/sidebar.js +2 -0
  123. package/dist/components/sidebar.js.map +1 -0
  124. package/dist/components/skeleton.js +1 -1
  125. package/dist/components/skeleton.js.map +1 -1
  126. package/dist/components/slider.d.ts +18 -0
  127. package/dist/components/slider.js +2 -0
  128. package/dist/components/slider.js.map +1 -0
  129. package/dist/components/sonner.js +1 -1
  130. package/dist/components/sonner.js.map +1 -1
  131. package/dist/components/spinner.d.ts +10 -2
  132. package/dist/components/spinner.js +1 -1
  133. package/dist/components/spinner.js.map +1 -1
  134. package/dist/components/stack.d.ts +19 -0
  135. package/dist/components/stack.js +2 -0
  136. package/dist/components/stack.js.map +1 -0
  137. package/dist/components/switch.d.ts +17 -0
  138. package/dist/components/switch.js +2 -0
  139. package/dist/components/switch.js.map +1 -0
  140. package/dist/components/table.d.ts +48 -0
  141. package/dist/components/table.js +2 -0
  142. package/dist/components/table.js.map +1 -0
  143. package/dist/components/tabs.d.ts +36 -0
  144. package/dist/components/tabs.js +2 -0
  145. package/dist/components/tabs.js.map +1 -0
  146. package/dist/components/textarea.d.ts +13 -0
  147. package/dist/components/textarea.js +2 -0
  148. package/dist/components/textarea.js.map +1 -0
  149. package/dist/components/theme.d.ts +5 -2
  150. package/dist/components/theme.js +1 -1
  151. package/dist/components/theme.js.map +1 -1
  152. package/dist/components/toggle-group.d.ts +32 -0
  153. package/dist/components/toggle-group.js +2 -0
  154. package/dist/components/toggle-group.js.map +1 -0
  155. package/dist/components/toggle.d.ts +22 -0
  156. package/dist/components/toggle.js +2 -0
  157. package/dist/components/toggle.js.map +1 -0
  158. package/dist/components/tooltip.d.ts +29 -0
  159. package/dist/components/tooltip.js +2 -0
  160. package/dist/components/tooltip.js.map +1 -0
  161. package/dist/hooks/use-mobile.d.ts +7 -0
  162. package/dist/hooks/use-mobile.js +2 -0
  163. package/dist/hooks/use-mobile.js.map +1 -0
  164. package/dist/index.d.ts +42 -5
  165. package/dist/index.js +1 -1
  166. package/dist/lib/utils.js +1 -1
  167. package/dist/lib/utils.js.map +1 -1
  168. package/dist/styles.css +1436 -3
  169. package/package.json +21 -10
  170. package/dist/styles.css.map +0 -1
  171. package/dist/styles.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["ButtonPrimitive"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring cursor-pointer focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/80',\n outline:\n 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',\n ghost:\n 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n destructive:\n 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',\n link: 'text-primary underline-offset-4 hover:underline'\n },\n size: {\n default: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',\n icon: 'size-8',\n 'icon-xs':\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-9'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'default'\n }\n }\n)\n\nexport type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>\n\nfunction Button({ className, variant = 'default', size = 'default', ...props }: ButtonProps) {\n return <ButtonPrimitive data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />\n}\n\nexport { Button, buttonVariants }\n"],"mappings":"oNAKA,MAAM,EAAiB,EACrB,kkBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,QACE,kLACF,UACE,kIACF,MACE,mHACF,YACE,8NACF,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,uFACT,GAAI,gNACJ,GAAI,0NACJ,GAAI,uFACJ,KAAM,SACN,UACE,0HACF,UAAW,qFACX,UAAW,SACZ,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAID,SAAS,OAAO,CAAE,YAAW,UAAU,UAAW,OAAO,UAAW,GAAG,GAAsB,CAC3F,OAAO,EAACA,EAAAA,CAAgB,YAAU,SAAS,UAAW,EAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,GAAS"}
1
+ {"version":3,"file":"button.js","names":[],"sources":["../../src/components/button.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst buttonVariants = cva(\n \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/80',\n outline:\n 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',\n ghost:\n 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n destructive:\n 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',\n link: 'text-primary underline-offset-4 hover:underline'\n },\n size: {\n default: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3',\n icon: 'size-8',\n 'icon-xs':\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-9'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'default'\n }\n }\n)\n\nexport type ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }\n\nfunction Button({ className, variant = 'default', size = 'default', asChild = false, ...props }: ButtonProps) {\n const Comp = asChild ? Slot.Root : 'button'\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n"],"mappings":"yLAOA,MAAM,EAAiB,EACrB,mjBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,QACE,kLACF,UACE,kIACF,MACE,mHACF,YACE,8NACF,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,uFACT,GAAI,gNACJ,GAAI,0NACJ,GAAI,uFACJ,KAAM,SACN,UACE,0HACF,UAAW,qFACX,UAAW,SACZ,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAOD,SAAS,OAAO,CAAE,YAAW,UAAU,UAAW,OAAO,UAAW,UAAU,GAAO,GAAG,GAAsB,CAG5G,OACE,EAHW,EAAU,EAAK,KAAO,SAGjC,CACE,YAAU,SACV,eAAc,EACd,YAAW,EACX,UAAW,EAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAC3D,GAAI,EACJ,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import { Button } from "./button.js";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as React from "react";
5
+ import { DateRange, DayButton, DayPicker, Locale } from "react-day-picker";
6
+
7
+ //#region src/components/calendar.d.ts
8
+ type CalendarProps = React.ComponentProps<typeof DayPicker> & {
9
+ buttonVariant?: React.ComponentProps<typeof Button>['variant'];
10
+ };
11
+ type CalendarDayButtonProps = React.ComponentProps<typeof DayButton> & {
12
+ locale?: Partial<Locale>;
13
+ };
14
+ declare function Calendar({
15
+ className,
16
+ classNames,
17
+ showOutsideDays,
18
+ captionLayout,
19
+ buttonVariant,
20
+ locale,
21
+ formatters,
22
+ components,
23
+ ...props
24
+ }: CalendarProps): react_jsx_runtime0.JSX.Element;
25
+ declare function CalendarDayButton({
26
+ className,
27
+ day,
28
+ modifiers,
29
+ locale,
30
+ ...props
31
+ }: CalendarDayButtonProps): react_jsx_runtime0.JSX.Element;
32
+ //#endregion
33
+ export { Calendar, CalendarDayButton, CalendarDayButtonProps, CalendarProps, type DateRange };
34
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1,2 @@
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{Button as t,buttonVariants as n}from"./button.js";import{IconChevronDown as r,IconChevronLeft as i,IconChevronRight as a}from"@tabler/icons-react";import{jsx as o}from"react/jsx-runtime";import*as s from"react";import{DayPicker as c,getDefaultClassNames as l}from"react-day-picker";function Calendar({className:t,classNames:s,showOutsideDays:u=!0,captionLayout:d=`label`,buttonVariant:f=`ghost`,locale:p,formatters:m,components:h,...g}){let _=l();return o(c,{showOutsideDays:u,className:e(`group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,t),captionLayout:d,locale:p,formatters:{formatMonthDropdown:e=>e.toLocaleString(p?.code,{month:`short`}),...m},classNames:{root:e(`w-fit`,_.root),months:e(`relative flex flex-col gap-4 md:flex-row`,_.months),month:e(`flex w-full flex-col gap-4`,_.month),nav:e(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,_.nav),button_previous:e(n({variant:f}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,_.button_previous),button_next:e(n({variant:f}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,_.button_next),month_caption:e(`flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)`,_.month_caption),dropdowns:e(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,_.dropdowns),dropdown_root:e(`relative rounded-(--cell-radius)`,_.dropdown_root),dropdown:e(`absolute inset-0 bg-popover opacity-0`,_.dropdown),caption_label:e(`font-medium select-none`,d===`label`?`text-sm`:`flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground`,_.caption_label),table:`w-full border-collapse`,weekdays:e(`flex`,_.weekdays),weekday:e(`flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none`,_.weekday),week:e(`mt-2 flex w-full`,_.week),week_number_header:e(`w-(--cell-size) select-none`,_.week_number_header),week_number:e(`text-[0.8rem] text-muted-foreground select-none`,_.week_number),day:e(`group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)`,g.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)`:`[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)`,_.day),range_start:e(`relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted`,_.range_start),range_middle:e(`rounded-none`,_.range_middle),range_end:e(`relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted`,_.range_end),today:e(`rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none`,_.today),outside:e(`text-muted-foreground aria-selected:text-muted-foreground`,_.outside),disabled:e(`text-muted-foreground opacity-50`,_.disabled),hidden:e(`invisible`,_.hidden),...s},components:{Root:({className:t,rootRef:n,...r})=>o(`div`,{"data-slot":`calendar`,ref:n,className:e(t),...r}),Chevron:({className:t,orientation:n,...s})=>o(n===`left`?i:n===`right`?a:r,{className:e(`size-4`,t),...s}),DayButton:({...e})=>o(CalendarDayButton,{locale:p,...e}),WeekNumber:({children:e,...t})=>o(`td`,{...t,children:o(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})}),...h},...g})}function CalendarDayButton({className:n,day:r,modifiers:i,locale:a,...c}){let u=l(),d=s.useRef(null);return s.useEffect(()=>{i.focused&&d.current?.focus()},[i.focused]),o(t,{ref:d,variant:`ghost`,size:`icon`,"data-day":r.date.toLocaleDateString(a?.code),"data-selected-single":i.selected&&!i.range_start&&!i.range_end&&!i.range_middle,"data-range-start":i.range_start,"data-range-end":i.range_end,"data-range-middle":i.range_middle,className:e(`relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70`,u.day,n),...c})}export{Calendar,CalendarDayButton};
2
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","names":[],"sources":["../../src/components/calendar.tsx"],"sourcesContent":["import * as React from 'react'\nimport { type DateRange, type DayButton, DayPicker, getDefaultClassNames, type Locale } from 'react-day-picker'\n\nimport { IconChevronDown, IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button, buttonVariants } from './button'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant']\n}\n\nexport type CalendarDayButtonProps = React.ComponentProps<typeof DayButton> & {\n locale?: Partial<Locale>\n}\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n locale,\n formatters,\n components,\n ...props\n}: CalendarProps) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n locale={locale}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: 'short' }),\n ...formatters\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn('absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1', defaultClassNames.nav),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn('relative rounded-(--cell-radius)', defaultClassNames.dropdown_root),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none',\n defaultClassNames.weekday\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn('text-[0.8rem] text-muted-foreground select-none', defaultClassNames.week_number),\n day: cn(\n 'group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)'\n : '[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)',\n defaultClassNames.day\n ),\n range_start: cn(\n 'relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn(\n 'relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted',\n defaultClassNames.range_end\n ),\n today: cn(\n 'rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div data-slot=\"calendar\" ref={rootRef as React.Ref<HTMLDivElement>} className={cn(className)} {...props} />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return <IconChevronLeft className={cn('size-4', className)} {...props} />\n }\n\n if (orientation === 'right') {\n return <IconChevronRight className={cn('size-4', className)} {...props} />\n }\n\n return <IconChevronDown className={cn('size-4', className)} {...props} />\n },\n DayButton: ({ ...props }) => <CalendarDayButton locale={locale} {...props} />,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">{children}</div>\n </td>\n )\n },\n ...components\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({ className, day, modifiers, locale, ...props }: CalendarDayButtonProps) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString(locale?.code)}\n data-selected-single={\n modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton, type DateRange }\n"],"mappings":"mWAgBA,SAAS,SAAS,CAChB,YACA,aACA,kBAAkB,GAClB,gBAAgB,QAChB,gBAAgB,QAChB,SACA,aACA,aACA,GAAG,GACa,CAChB,IAAM,EAAoB,GAAsB,CAEhD,OACE,EAAC,EAAD,CACmB,kBACjB,UAAW,EACT,wLACA,OAAO,GAAG,4CACV,OAAO,GAAG,gDACV,EACD,CACc,gBACP,SACR,WAAY,CACV,oBAAsB,GAAS,EAAK,eAAe,GAAQ,KAAM,CAAE,MAAO,QAAS,CAAC,CACpF,GAAG,EACJ,CACD,WAAY,CACV,KAAM,EAAG,QAAS,EAAkB,KAAK,CACzC,OAAQ,EAAG,2CAA4C,EAAkB,OAAO,CAChF,MAAO,EAAG,6BAA8B,EAAkB,MAAM,CAChE,IAAK,EAAG,0EAA2E,EAAkB,IAAI,CACzG,gBAAiB,EACf,EAAe,CAAE,QAAS,EAAe,CAAC,CAC1C,8DACA,EAAkB,gBACnB,CACD,YAAa,EACX,EAAe,CAAE,QAAS,EAAe,CAAC,CAC1C,8DACA,EAAkB,YACnB,CACD,cAAe,EACb,2EACA,EAAkB,cACnB,CACD,UAAW,EACT,sFACA,EAAkB,UACnB,CACD,cAAe,EAAG,mCAAoC,EAAkB,cAAc,CACtF,SAAU,EAAG,wCAAyC,EAAkB,SAAS,CACjF,cAAe,EACb,0BACA,IAAkB,QACd,UACA,yGACJ,EAAkB,cACnB,CACD,MAAO,yBACP,SAAU,EAAG,OAAQ,EAAkB,SAAS,CAChD,QAAS,EACP,6FACA,EAAkB,QACnB,CACD,KAAM,EAAG,mBAAoB,EAAkB,KAAK,CACpD,mBAAoB,EAAG,8BAA+B,EAAkB,mBAAmB,CAC3F,YAAa,EAAG,kDAAmD,EAAkB,YAAY,CACjG,IAAK,EACH,yKACA,EAAM,eACF,wEACA,uEACJ,EAAkB,IACnB,CACD,YAAa,EACX,gIACA,EAAkB,YACnB,CACD,aAAc,EAAG,eAAgB,EAAkB,aAAa,CAChE,UAAW,EACT,+HACA,EAAkB,UACnB,CACD,MAAO,EACL,qFACA,EAAkB,MACnB,CACD,QAAS,EAAG,4DAA6D,EAAkB,QAAQ,CACnG,SAAU,EAAG,mCAAoC,EAAkB,SAAS,CAC5E,OAAQ,EAAG,YAAa,EAAkB,OAAO,CACjD,GAAG,EACJ,CACD,WAAY,CACV,MAAO,CAAE,YAAW,UAAS,GAAG,KAE5B,EAAC,MAAD,CAAK,YAAU,WAAW,IAAK,EAAsC,UAAW,EAAG,EAAU,CAAE,GAAI,EAAS,CAAA,CAGhH,SAAU,CAAE,YAAW,cAAa,GAAG,KAE5B,EADL,IAAgB,OACV,EAGN,IAAgB,QACV,EAGF,EAPC,CAAiB,UAAW,EAAG,SAAU,EAAU,CAAE,GAAI,EAAS,CAAA,CAS7E,WAAY,CAAE,GAAG,KAAY,EAAC,kBAAD,CAA2B,SAAQ,GAAI,EAAS,CAAA,CAC7E,YAAa,CAAE,WAAU,GAAG,KAExB,EAAC,KAAD,CAAI,GAAI,WACN,EAAC,MAAD,CAAK,UAAU,kEAAmE,WAAe,CAAA,CAC9F,CAAA,CAGT,GAAG,EACJ,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,kBAAkB,CAAE,YAAW,MAAK,YAAW,SAAQ,GAAG,GAAiC,CAClG,IAAM,EAAoB,GAAsB,CAE1C,EAAM,EAAM,OAA0B,KAAK,CAKjD,OAJA,EAAM,cAAgB,CAChB,EAAU,SAAS,EAAI,SAAS,OAAO,EAC1C,CAAC,EAAU,QAAQ,CAAC,CAGrB,EAAC,EAAD,CACO,MACL,QAAQ,QACR,KAAK,OACL,WAAU,EAAI,KAAK,mBAAmB,GAAQ,KAAK,CACnD,uBACE,EAAU,UAAY,CAAC,EAAU,aAAe,CAAC,EAAU,WAAa,CAAC,EAAU,aAErF,mBAAkB,EAAU,YAC5B,iBAAgB,EAAU,UAC1B,oBAAmB,EAAU,aAC7B,UAAW,EACT,u7BACA,EAAkB,IAClB,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"../chunk-IpJEthwI.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";function Card({className:e,size:r=`default`,...i}){return n(`div`,{"data-slot":`card`,"data-size":r,className:t(`ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,e),...i})}function CardHeader({className:e,...r}){return n(`div`,{"data-slot":`card-header`,className:t(`gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,e),...r})}function CardTitle({className:e,...r}){return n(`div`,{"data-slot":`card-title`,className:t(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...r})}function CardDescription({className:e,...r}){return n(`div`,{"data-slot":`card-description`,className:t(`text-muted-foreground text-sm`,e),...r})}function CardAction({className:e,...r}){return n(`div`,{"data-slot":`card-action`,className:t(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...r})}function CardContent({className:e,...r}){return n(`div`,{"data-slot":`card-content`,className:t(`px-4 group-data-[size=sm]/card:px-3`,e),...r})}function CardFooter({className:e,...r}){return n(`div`,{"data-slot":`card-footer`,className:t(`bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center`,e),...r})}export{Card,CardAction,CardContent,CardDescription,CardFooter,CardHeader,CardTitle};
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";function Card({className:n,size:r=`default`,...i}){return t(`div`,{"data-slot":`card`,"data-size":r,className:e(`group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm bg-card text-card-foreground ring-foreground/10 ring-1`,`has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0`,`data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0`,`*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),...i})}function CardHeader({className:n,...r}){return t(`div`,{"data-slot":`card-header`,className:e(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4`,`group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,`has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,n),...r})}function CardTitle({className:n,...r}){return t(`div`,{"data-slot":`card-title`,className:e(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),...r})}function CardDescription({className:n,...r}){return t(`div`,{"data-slot":`card-description`,className:e(`text-muted-foreground text-sm`,n),...r})}function CardAction({className:n,...r}){return t(`div`,{"data-slot":`card-action`,className:e(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),...r})}function CardContent({className:n,...r}){return t(`div`,{"data-slot":`card-content`,className:e(`px-4 group-data-[size=sm]/card:px-3`,n),...r})}function CardFooter({className:n,...r}){return t(`div`,{"data-slot":`card-footer`,className:e(`bg-muted/50 flex items-center rounded-b-xl border-t p-4`,`group-data-[size=sm]/card:p-3`,n),...r})}export{Card,CardAction,CardContent,CardDescription,CardFooter,CardHeader,CardTitle};
2
2
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CardProps = React.ComponentProps<'div'> & { size?: 'default' | 'sm' }\n\nexport type CardHeaderProps = React.ComponentProps<'div'>\n\nexport type CardTitleProps = React.ComponentProps<'div'>\n\nexport type CardDescriptionProps = React.ComponentProps<'div'>\n\nexport type CardActionProps = React.ComponentProps<'div'>\n\nexport type CardContentProps = React.ComponentProps<'div'>\n\nexport type CardFooterProps = React.ComponentProps<'div'>\n\nfunction Card({ className, size = 'default', ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: CardHeaderProps) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: CardTitleProps) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: CardDescriptionProps) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />\n}\n\nfunction CardAction({ className, ...props }: CardActionProps) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: CardContentProps) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />\n}\n\nfunction CardFooter({ className, ...props }: CardFooterProps) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center', className)}\n {...props}\n />\n )\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }\n"],"mappings":"sHAkBA,SAAS,KAAK,CAAE,YAAW,OAAO,UAAW,GAAG,GAAoB,CAClE,OACE,EAAC,MAAA,CACC,YAAU,OACV,YAAW,EACX,UAAW,EACT,uVACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EACT,qSACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,UAAU,CAAE,YAAW,GAAG,GAAyB,CAC1D,OACE,EAAC,MAAA,CACC,YAAU,aACV,UAAW,EAAG,uEAAwE,EAAU,CAChG,GAAI,GACJ,CAIN,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OAAO,EAAC,MAAA,CAAI,YAAU,mBAAmB,UAAW,EAAG,gCAAiC,EAAU,CAAE,GAAI,GAAS,CAGnH,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EAAG,iEAAkE,EAAU,CAC1F,GAAI,GACJ,CAIN,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAAC,MAAA,CAAI,YAAU,eAAe,UAAW,EAAG,sCAAuC,EAAU,CAAE,GAAI,GAAS,CAGrH,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAA,CACC,YAAU,cACV,UAAW,EAAG,wFAAyF,EAAU,CACjH,GAAI,GACJ"}
1
+ {"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CardProps = React.ComponentProps<'div'> & { size?: 'default' | 'sm' }\n\nexport type CardHeaderProps = React.ComponentProps<'div'>\n\nexport type CardTitleProps = React.ComponentProps<'div'>\n\nexport type CardDescriptionProps = React.ComponentProps<'div'>\n\nexport type CardActionProps = React.ComponentProps<'div'>\n\nexport type CardContentProps = React.ComponentProps<'div'>\n\nexport type CardFooterProps = React.ComponentProps<'div'>\n\nfunction Card({ className, size = 'default', ...props }: CardProps) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl py-4 text-sm bg-card text-card-foreground ring-foreground/10 ring-1',\n 'has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0',\n 'data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0',\n '*:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: CardHeaderProps) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4',\n 'group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n 'has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: CardTitleProps) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: CardDescriptionProps) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />\n}\n\nfunction CardAction({ className, ...props }: CardActionProps) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: CardContentProps) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />\n}\n\nfunction CardFooter({ className, ...props }: CardFooterProps) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n 'bg-muted/50 flex items-center rounded-b-xl border-t p-4',\n 'group-data-[size=sm]/card:p-3',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }\n"],"mappings":"0GAkBA,SAAS,KAAK,CAAE,YAAW,OAAO,UAAW,GAAG,GAAoB,CAClE,OACE,EAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EACT,gIACA,+DACA,2FACA,mEACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EACT,kGACA,6FACA,0GACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,UAAU,CAAE,YAAW,GAAG,GAAyB,CAC1D,OACE,EAAC,MAAD,CACE,YAAU,aACV,UAAW,EAAG,uEAAwE,EAAU,CAChG,GAAI,EACJ,CAAA,CAIN,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OAAO,EAAC,MAAD,CAAK,YAAU,mBAAmB,UAAW,EAAG,gCAAiC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGnH,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAG,iEAAkE,EAAU,CAC1F,GAAI,EACJ,CAAA,CAIN,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,sCAAuC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGrH,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EACT,0DACA,gCACA,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -0,0 +1,62 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import { Button } from "./button.js";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as React from "react";
5
+ import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
6
+
7
+ //#region src/components/carousel.d.ts
8
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
9
+ type CarouselOptions = UseCarouselParameters[0];
10
+ type CarouselPlugin = UseCarouselParameters[1];
11
+ type CarouselApi = UseEmblaCarouselType[1];
12
+ type CarouselProps = React.ComponentProps<'div'> & {
13
+ opts?: CarouselOptions;
14
+ plugins?: CarouselPlugin;
15
+ orientation?: 'horizontal' | 'vertical';
16
+ setApi?: (api: CarouselApi) => void;
17
+ };
18
+ type CarouselContentProps = React.ComponentProps<'div'>;
19
+ type CarouselItemProps = React.ComponentProps<'div'>;
20
+ type CarouselPreviousProps = React.ComponentProps<typeof Button>;
21
+ type CarouselNextProps = React.ComponentProps<typeof Button>;
22
+ type CarouselContextProps = {
23
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
24
+ api: ReturnType<typeof useEmblaCarousel>[1];
25
+ scrollPrev: () => void;
26
+ scrollNext: () => void;
27
+ canScrollPrev: boolean;
28
+ canScrollNext: boolean;
29
+ } & CarouselProps;
30
+ declare function useCarousel(): CarouselContextProps;
31
+ declare function Carousel({
32
+ orientation,
33
+ opts,
34
+ setApi,
35
+ plugins,
36
+ className,
37
+ children,
38
+ ...props
39
+ }: CarouselProps): react_jsx_runtime0.JSX.Element;
40
+ declare function CarouselContent({
41
+ className,
42
+ ...props
43
+ }: CarouselContentProps): react_jsx_runtime0.JSX.Element;
44
+ declare function CarouselItem({
45
+ className,
46
+ ...props
47
+ }: CarouselItemProps): react_jsx_runtime0.JSX.Element;
48
+ declare function CarouselPrevious({
49
+ className,
50
+ variant,
51
+ size,
52
+ ...props
53
+ }: CarouselPreviousProps): react_jsx_runtime0.JSX.Element;
54
+ declare function CarouselNext({
55
+ className,
56
+ variant,
57
+ size,
58
+ ...props
59
+ }: CarouselNextProps): react_jsx_runtime0.JSX.Element;
60
+ //#endregion
61
+ export { Carousel, CarouselApi, CarouselContent, CarouselContentProps, CarouselItem, CarouselItemProps, CarouselNext, CarouselNextProps, CarouselPrevious, CarouselPreviousProps, CarouselProps, useCarousel };
62
+ //# sourceMappingURL=carousel.d.ts.map
@@ -0,0 +1,2 @@
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r}from"@tabler/icons-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import*as o from"react";import s from"embla-carousel-react";const c=o.createContext(null);function useCarousel(){let e=o.useContext(c);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function Carousel({orientation:t=`horizontal`,opts:n,setApi:r,plugins:a,className:l,children:u,...d}){let[f,p]=s({...n,axis:t===`horizontal`?`x`:`y`},a),[m,h]=o.useState(!1),[g,_]=o.useState(!1),v=o.useCallback(e=>{e&&(h(e.canScrollPrev()),_(e.canScrollNext()))},[]),y=o.useCallback(()=>{p?.scrollPrev()},[p]),b=o.useCallback(()=>{p?.scrollNext()},[p]),x=o.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),y()):e.key===`ArrowRight`&&(e.preventDefault(),b())},[y,b]);return o.useEffect(()=>{!p||!r||r(p)},[p,r]),o.useEffect(()=>{if(p)return v(p),p.on(`reInit`,v),p.on(`select`,v),()=>{p?.off(`select`,v)}},[p,v]),i(c.Provider,{value:{carouselRef:f,api:p,opts:n,orientation:t||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:y,scrollNext:b,canScrollPrev:m,canScrollNext:g},children:i(`section`,{onKeyDownCapture:x,className:e(`relative`,l),"data-slot":`carousel`,...d,children:u})})}function CarouselContent({className:t,...n}){let{carouselRef:r,orientation:a}=useCarousel();return i(`div`,{ref:r,className:`overflow-hidden`,"data-slot":`carousel-content`,children:i(`div`,{className:e(`flex`,a===`horizontal`?`-ml-4`:`-mt-4 flex-col`,t),...n})})}function CarouselItem({className:t,...n}){let{orientation:r}=useCarousel();return i(`div`,{"data-slot":`carousel-item`,className:e(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,t),...n})}function CarouselPrevious({className:r,variant:o=`outline`,size:s=`icon-sm`,...c}){let{orientation:l,scrollPrev:u,canScrollPrev:d}=useCarousel();return a(t,{"data-slot":`carousel-previous`,variant:o,size:s,className:e(`absolute touch-manipulation rounded-full`,l===`horizontal`?`top-1/2 -left-12 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,r),disabled:!d,onClick:u,...c,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Previous slide`})]})}function CarouselNext({className:n,variant:o=`outline`,size:s=`icon-sm`,...c}){let{orientation:l,scrollNext:u,canScrollNext:d}=useCarousel();return a(t,{"data-slot":`carousel-next`,variant:o,size:s,className:e(`absolute touch-manipulation rounded-full`,l===`horizontal`?`top-1/2 -right-12 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,n),disabled:!d,onClick:u,...c,children:[i(r,{}),i(`span`,{className:`sr-only`,children:`Next slide`})]})}export{Carousel,CarouselContent,CarouselItem,CarouselNext,CarouselPrevious,useCarousel};
2
+ //# sourceMappingURL=carousel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel.js","names":[],"sources":["../../src/components/carousel.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight } from '@tabler/icons-react'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\nexport type CarouselApi = UseEmblaCarouselType[1]\n\nexport type CarouselProps = React.ComponentProps<'div'> & {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\nexport type CarouselContentProps = React.ComponentProps<'div'>\n\nexport type CarouselItemProps = React.ComponentProps<'div'>\n\nexport type CarouselPreviousProps = React.ComponentProps<typeof Button>\n\nexport type CarouselNextProps = React.ComponentProps<typeof Button>\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nfunction Carousel({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }: CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y'\n },\n plugins\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext()\n }, [api])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n scrollPrev()\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n scrollNext()\n }\n },\n [scrollPrev, scrollNext]\n )\n\n React.useEffect(() => {\n if (!api || !setApi) return\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) return\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api?.off('select', onSelect)\n }\n }, [api, onSelect])\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext\n }}\n >\n <section onKeyDownCapture={handleKeyDown} className={cn('relative', className)} data-slot=\"carousel\" {...props}>\n {children}\n </section>\n </CarouselContext.Provider>\n )\n}\n\nfunction CarouselContent({ className, ...props }: CarouselContentProps) {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n )\n}\n\nfunction CarouselItem({ className, ...props }: CarouselItemProps) {\n const { orientation } = useCarousel()\n\n return (\n <div\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n}\n\nfunction CarouselPrevious({ className, variant = 'outline', size = 'icon-sm', ...props }: CarouselPreviousProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <IconChevronLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n}\n\nfunction CarouselNext({ className, variant = 'outline', size = 'icon-sm', ...props }: CarouselNextProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <IconChevronRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, useCarousel }\n"],"mappings":"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"}
@@ -0,0 +1,21 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { VariantProps } from "class-variance-authority";
4
+ import * as React from "react";
5
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
6
+
7
+ //#region src/components/center.d.ts
8
+ declare const centerVariants: (props?: ({
9
+ direction?: "horizontal" | "vertical" | null | undefined;
10
+ size?: "xs" | "sm" | "lg" | "md" | "xl" | null | undefined;
11
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
12
+ type CenterProps = React.ComponentProps<'div'> & VariantProps<typeof centerVariants>;
13
+ declare function Center({
14
+ className,
15
+ direction,
16
+ size,
17
+ ...props
18
+ }: CenterProps): react_jsx_runtime0.JSX.Element;
19
+ //#endregion
20
+ export { Center, CenterProps, centerVariants };
21
+ //# sourceMappingURL=center.d.ts.map
@@ -0,0 +1,2 @@
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`flex items-center justify-center`,{variants:{direction:{horizontal:`flex-row`,vertical:`flex-col`},size:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{direction:`horizontal`,size:`md`}});function Center({className:n,direction:i=`horizontal`,size:a=`md`,...o}){return t(`div`,{"data-slot":`center`,"data-direction":i,"data-size":a,className:e(r({direction:i,size:a}),n),...o})}export{Center,r as centerVariants};
2
+ //# sourceMappingURL=center.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"center.js","names":[],"sources":["../../src/components/center.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst centerVariants = cva('flex items-center justify-center', {\n variants: {\n direction: {\n horizontal: 'flex-row',\n vertical: 'flex-col'\n },\n size: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n direction: 'horizontal',\n size: 'md'\n }\n})\n\nexport type CenterProps = React.ComponentProps<'div'> & VariantProps<typeof centerVariants>\n\nfunction Center({ className, direction = 'horizontal', size = 'md', ...props }: CenterProps) {\n return (\n <div\n data-slot=\"center\"\n data-direction={direction}\n data-size={size}\n className={cn(centerVariants({ direction, size }), className)}\n {...props}\n />\n )\n}\n\nexport { Center, centerVariants }\n"],"mappings":"yJAMA,MAAM,EAAiB,EAAI,mCAAoC,CAC7D,SAAU,CACR,UAAW,CACT,WAAY,WACZ,SAAU,WACX,CACD,KAAM,CACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACF,CACD,gBAAiB,CACf,UAAW,aACX,KAAM,KACP,CACF,CAAC,CAIF,SAAS,OAAO,CAAE,YAAW,YAAY,aAAc,OAAO,KAAM,GAAG,GAAsB,CAC3F,OACE,EAAC,MAAD,CACE,YAAU,SACV,iBAAgB,EAChB,YAAW,EACX,UAAW,EAAG,EAAe,CAAE,YAAW,OAAM,CAAC,CAAE,EAAU,CAC7D,GAAI,EACJ,CAAA"}
@@ -0,0 +1,263 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as react from "react";
4
+ import * as RechartsPrimitive from "recharts";
5
+ import * as recharts_types_chart_generateCategoricalChart0 from "recharts/types/chart/generateCategoricalChart";
6
+ import * as recharts_types_chart_AccessibilityManager0 from "recharts/types/chart/AccessibilityManager";
7
+ import * as lodash from "lodash";
8
+ import * as recharts_types_chart_types0 from "recharts/types/chart/types";
9
+ import * as recharts_types_util_types0 from "recharts/types/util/types";
10
+
11
+ //#region src/components/chart.d.ts
12
+ declare const THEMES: {
13
+ readonly light: "";
14
+ readonly dark: ".dark";
15
+ };
16
+ type ChartConfig = { [k in string]: {
17
+ label?: react.ReactNode;
18
+ icon?: react.ComponentType;
19
+ } & ({
20
+ color?: string;
21
+ theme?: never;
22
+ } | {
23
+ color?: never;
24
+ theme: Record<keyof typeof THEMES, string>;
25
+ }) };
26
+ type ChartContainerProps = react.ComponentProps<'div'> & {
27
+ config: ChartConfig;
28
+ children: react.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
29
+ };
30
+ type ChartStyleProps = {
31
+ id: string;
32
+ config: ChartConfig;
33
+ };
34
+ type ChartTooltipProps = react.ComponentProps<typeof RechartsPrimitive.Tooltip>;
35
+ type ChartTooltipContentProps = react.ComponentProps<typeof RechartsPrimitive.Tooltip> & react.ComponentProps<'div'> & {
36
+ hideLabel?: boolean;
37
+ hideIndicator?: boolean;
38
+ indicator?: 'line' | 'dot' | 'dashed';
39
+ nameKey?: string;
40
+ labelKey?: string;
41
+ };
42
+ type ChartLegendProps = react.ComponentProps<typeof RechartsPrimitive.Legend>;
43
+ type ChartLegendContentProps = react.ComponentProps<'div'> & Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
44
+ hideIcon?: boolean;
45
+ nameKey?: string;
46
+ };
47
+ declare function ChartContainer({
48
+ id,
49
+ className,
50
+ children,
51
+ config,
52
+ ...props
53
+ }: ChartContainerProps): react_jsx_runtime0.JSX.Element;
54
+ declare const ChartStyle: ({
55
+ id,
56
+ config
57
+ }: ChartStyleProps) => react_jsx_runtime0.JSX.Element | null;
58
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
59
+ declare function ChartTooltipContent({
60
+ active,
61
+ payload,
62
+ className,
63
+ indicator,
64
+ hideLabel,
65
+ hideIndicator,
66
+ label,
67
+ labelFormatter,
68
+ labelClassName,
69
+ formatter,
70
+ color,
71
+ nameKey,
72
+ labelKey
73
+ }: ChartTooltipContentProps): react_jsx_runtime0.JSX.Element | null;
74
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
75
+ declare function ChartLegendContent({
76
+ className,
77
+ hideIcon,
78
+ payload,
79
+ verticalAlign,
80
+ nameKey
81
+ }: ChartLegendContentProps): react_jsx_runtime0.JSX.Element | null;
82
+ declare const Bar: typeof RechartsPrimitive.Bar;
83
+ declare const BarChart: react.ForwardRefExoticComponent<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps & react.RefAttributes<{
84
+ readonly eventEmitterSymbol: Symbol;
85
+ clipPathId: string;
86
+ accessibilityManager: recharts_types_chart_AccessibilityManager0.AccessibilityManager;
87
+ throttleTriggeredAfterMouseMove: lodash.DebouncedFunc<(e: recharts_types_chart_generateCategoricalChart0.MousePointer) => any>;
88
+ container?: HTMLElement;
89
+ componentDidMount(): void;
90
+ displayDefaultTooltip(): void;
91
+ getSnapshotBeforeUpdate(prevProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, prevState: Readonly<recharts_types_chart_types0.CategoricalChartState>): null;
92
+ componentDidUpdate(prevProps: recharts_types_chart_generateCategoricalChart0.CategoricalChartProps): void;
93
+ componentWillUnmount(): void;
94
+ getTooltipEventType(): recharts_types_util_types0.TooltipEventType;
95
+ getMouseInfo(event: recharts_types_chart_generateCategoricalChart0.MousePointer): {
96
+ activeTooltipIndex: number;
97
+ activeLabel: any;
98
+ activePayload: any[];
99
+ activeCoordinate: recharts_types_util_types0.ChartCoordinate;
100
+ xValue: any;
101
+ yValue: any;
102
+ chartX: number;
103
+ chartY: number;
104
+ } | {
105
+ activeTooltipIndex: number;
106
+ activeLabel: any;
107
+ activePayload: any[];
108
+ activeCoordinate: recharts_types_util_types0.ChartCoordinate;
109
+ chartX: number;
110
+ chartY: number;
111
+ };
112
+ inRange(x: number, y: number, scale?: number): any;
113
+ parseEventsOfWrapper(): any;
114
+ addListener(): void;
115
+ removeListener(): void;
116
+ handleLegendBBoxUpdate: (box: DOMRect) => void;
117
+ handleReceiveSyncEvent: (cId: string | number, data: recharts_types_chart_types0.CategoricalChartState, emitter: Symbol) => void;
118
+ handleBrushChange: ({
119
+ startIndex,
120
+ endIndex
121
+ }: {
122
+ startIndex: number;
123
+ endIndex: number;
124
+ }) => void;
125
+ handleMouseEnter: (e: react.MouseEvent<Element, MouseEvent>) => void;
126
+ triggeredAfterMouseMove: (e: recharts_types_chart_generateCategoricalChart0.MousePointer) => any;
127
+ handleItemMouseEnter: (el: any) => void;
128
+ handleItemMouseLeave: () => void;
129
+ handleMouseMove: (e: recharts_types_chart_generateCategoricalChart0.MousePointer & Partial<Omit<react.MouseEvent<Element, MouseEvent>, keyof recharts_types_chart_generateCategoricalChart0.MousePointer>>) => void;
130
+ handleMouseLeave: (e: any) => void;
131
+ handleOuterEvent: (e: react.MouseEvent<Element, MouseEvent> | react.TouchEvent<Element>) => void;
132
+ handleClick: (e: react.MouseEvent<Element, MouseEvent>) => void;
133
+ handleMouseDown: (e: react.MouseEvent<Element, MouseEvent> | react.Touch) => void;
134
+ handleMouseUp: (e: react.MouseEvent<Element, MouseEvent> | react.Touch) => void;
135
+ handleTouchMove: (e: react.TouchEvent<Element>) => void;
136
+ handleTouchStart: (e: react.TouchEvent<Element>) => void;
137
+ handleTouchEnd: (e: react.TouchEvent<Element>) => void;
138
+ handleDoubleClick: (e: react.MouseEvent<Element, MouseEvent>) => void;
139
+ handleContextMenu: (e: react.MouseEvent<Element, MouseEvent>) => void;
140
+ triggerSyncEvent: (data: recharts_types_chart_types0.CategoricalChartState) => void;
141
+ applySyncEvent: (data: recharts_types_chart_types0.CategoricalChartState) => void;
142
+ filterFormatItem(item: any, displayName: any, childIndex: any): any;
143
+ renderCursor: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.JSX.Element;
144
+ renderPolarAxis: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
145
+ renderPolarGrid: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
146
+ renderLegend: () => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
147
+ renderTooltip: () => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
148
+ renderBrush: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
149
+ renderReferenceElement: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
150
+ renderActivePoints: ({
151
+ item,
152
+ activePoint,
153
+ basePoint,
154
+ childIndex,
155
+ isRange
156
+ }: any) => react.ReactElement<any, string | react.JSXElementConstructor<any>>[];
157
+ renderGraphicChild: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
158
+ renderCustomized: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
159
+ renderClipPath(): react.JSX.Element;
160
+ getXScales(): {
161
+ [x: string]: Function | recharts_types_util_types0.ScaleType;
162
+ };
163
+ getYScales(): {
164
+ [x: string]: Function | recharts_types_util_types0.ScaleType;
165
+ };
166
+ getXScaleByAxisId(axisId: string): Function | recharts_types_util_types0.ScaleType;
167
+ getYScaleByAxisId(axisId: string): Function | recharts_types_util_types0.ScaleType;
168
+ getItemByXY(chartXY: {
169
+ x: number;
170
+ y: number;
171
+ }): {
172
+ graphicalItem: any;
173
+ payload: any;
174
+ };
175
+ renderMap: {
176
+ CartesianGrid: {
177
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
178
+ once: boolean;
179
+ };
180
+ ReferenceArea: {
181
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
182
+ };
183
+ ReferenceLine: {
184
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
185
+ };
186
+ ReferenceDot: {
187
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
188
+ };
189
+ XAxis: {
190
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
191
+ };
192
+ YAxis: {
193
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
194
+ };
195
+ Brush: {
196
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
197
+ once: boolean;
198
+ };
199
+ Bar: {
200
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
201
+ };
202
+ Line: {
203
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
204
+ };
205
+ Area: {
206
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
207
+ };
208
+ Radar: {
209
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
210
+ };
211
+ RadialBar: {
212
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
213
+ };
214
+ Scatter: {
215
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
216
+ };
217
+ Pie: {
218
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
219
+ };
220
+ Funnel: {
221
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => any[];
222
+ };
223
+ Tooltip: {
224
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.JSX.Element;
225
+ once: boolean;
226
+ };
227
+ PolarGrid: {
228
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
229
+ once: boolean;
230
+ };
231
+ PolarAngleAxis: {
232
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
233
+ };
234
+ PolarRadiusAxis: {
235
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
236
+ };
237
+ Customized: {
238
+ handler: (element: react.ReactElement<any, string | react.JSXElementConstructor<any>>, displayName: string, index: number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>;
239
+ };
240
+ };
241
+ render(): react.JSX.Element;
242
+ context: unknown;
243
+ setState<K extends keyof recharts_types_chart_types0.CategoricalChartState>(state: recharts_types_chart_types0.CategoricalChartState | ((prevState: Readonly<recharts_types_chart_types0.CategoricalChartState>, props: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>) => recharts_types_chart_types0.CategoricalChartState | Pick<recharts_types_chart_types0.CategoricalChartState, K>) | Pick<recharts_types_chart_types0.CategoricalChartState, K>, callback?: () => void): void;
244
+ forceUpdate(callback?: () => void): void;
245
+ readonly props: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>;
246
+ state: Readonly<recharts_types_chart_types0.CategoricalChartState>;
247
+ refs: {
248
+ [key: string]: react.ReactInstance;
249
+ };
250
+ shouldComponentUpdate?(nextProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, nextState: Readonly<recharts_types_chart_types0.CategoricalChartState>, nextContext: any): boolean;
251
+ componentDidCatch?(error: Error, errorInfo: react.ErrorInfo): void;
252
+ componentWillMount?(): void;
253
+ UNSAFE_componentWillMount?(): void;
254
+ componentWillReceiveProps?(nextProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, nextContext: any): void;
255
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, nextContext: any): void;
256
+ componentWillUpdate?(nextProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, nextState: Readonly<recharts_types_chart_types0.CategoricalChartState>, nextContext: any): void;
257
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<recharts_types_chart_generateCategoricalChart0.CategoricalChartProps>, nextState: Readonly<recharts_types_chart_types0.CategoricalChartState>, nextContext: any): void;
258
+ }>>;
259
+ declare const CartesianGrid: typeof RechartsPrimitive.CartesianGrid;
260
+ declare const XAxis: typeof RechartsPrimitive.XAxis;
261
+ //#endregion
262
+ export { Bar, BarChart, CartesianGrid, ChartConfig, ChartContainer, ChartContainerProps, ChartLegend, ChartLegendContent, ChartLegendContentProps, ChartLegendProps, ChartStyle, ChartStyleProps, ChartTooltip, ChartTooltipContent, ChartTooltipContentProps, ChartTooltipProps, XAxis };
263
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1,8 @@
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"react";import*as a from"recharts";const o={light:``,dark:`.dark`},s=i.createContext(null);function useChart(){let e=i.useContext(s);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function ChartContainer({id:t,className:o,children:c,config:l,...u}){let d=i.useId(),f=`chart-${t||d.replace(/:/g,``)}`;return n(s.Provider,{value:{config:l},children:r(`div`,{"data-slot":`chart`,"data-chart":f,className:e(`flex aspect-video justify-center text-xs [&_.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-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.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 [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,o),...u,children:[n(ChartStyle,{id:f,config:l}),n(a.ResponsiveContainer,{children:c})]})})}const ChartStyle=({id:e,config:t})=>{let r=Object.entries(t).filter(([,e])=>e.theme||e.color);return r.length?n(`style`,{children:Object.entries(o).map(([t,n])=>`
2
+ ${n} [data-chart=${e}] {
3
+ ${r.map(([e,n])=>{let r=n.theme?.[t]||n.color;return r?` --color-${e}: ${r};`:null}).join(`
4
+ `)}
5
+ }
6
+ `).join(`
7
+ `)}):null},c=a.Tooltip;function ChartTooltipContent({active:a,payload:o,className:s,indicator:c=`dot`,hideLabel:l=!1,hideIndicator:u=!1,label:d,labelFormatter:f,labelClassName:p,formatter:m,color:h,nameKey:g,labelKey:_}){let{config:v}=useChart(),y=i.useMemo(()=>{if(l||!o?.length)return null;let[t]=o,r=getPayloadConfigFromPayload(v,t,`${_||t?.dataKey||t?.name||`value`}`),i=!_&&typeof d==`string`?v[d]?.label||d:r?.label;return f?n(`div`,{className:e(`font-medium`,p),children:f(i,o)}):i?n(`div`,{className:e(`font-medium`,p),children:i}):null},[d,f,o,l,p,v,_]);if(!a||!o?.length)return null;let b=o.length===1&&c!==`dot`;return r(`div`,{className:e(`grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,s),children:[b?null:y,n(`div`,{className:`grid gap-1.5`,children:o.filter(e=>e.type!==`none`).map((i,a)=>{let o=getPayloadConfigFromPayload(v,i,`${g||i.name||i.dataKey||`value`}`),s=h||i.payload.fill||i.color;return n(`div`,{className:e(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,c===`dot`&&`items-center`),children:m&&i?.value!==void 0&&i.name?m(i.value,i.name,i,a,i.payload):r(t,{children:[o?.icon?n(o.icon,{}):!u&&n(`div`,{className:e(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":c===`dot`,"w-1":c===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":c===`dashed`,"my-0.5":b&&c===`dashed`}),style:{"--color-bg":s,"--color-border":s}}),r(`div`,{className:e(`flex flex-1 justify-between leading-none`,b?`items-end`:`items-center`),children:[r(`div`,{className:`grid gap-1.5`,children:[b?y:null,n(`span`,{className:`text-muted-foreground`,children:o?.label||i.name})]}),i.value&&n(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:i.value.toLocaleString()})]})]})},i.dataKey)})})]})}const l=a.Legend;function ChartLegendContent({className:t,hideIcon:i=!1,payload:a,verticalAlign:o=`bottom`,nameKey:s}){let{config:c}=useChart();return a?.length?n(`div`,{className:e(`flex items-center justify-center gap-4`,o===`top`?`pb-3`:`pt-3`,t),children:a.filter(e=>e.type!==`none`).map(t=>{let a=getPayloadConfigFromPayload(c,t,`${s||t.dataKey||`value`}`);return r(`div`,{className:e(`flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground`),children:[a?.icon&&!i?n(a.icon,{}):n(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:t.color}}),a?.label]},t.value)})}):null}function getPayloadConfigFromPayload(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}const u=a.Bar,d=a.BarChart,f=a.CartesianGrid,p=a.XAxis;export{u as Bar,d as BarChart,f as CartesianGrid,ChartContainer,l as ChartLegend,ChartLegendContent,ChartStyle,c as ChartTooltip,ChartTooltipContent,p as XAxis};
8
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","names":[],"sources":["../../src/components/chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport * as RechartsPrimitive from 'recharts'\n\nimport { cn } from '../lib/utils'\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & ({ color?: string; theme?: never } | { color?: never; theme: Record<keyof typeof THEMES, string> })\n}\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nexport type ChartContainerProps = React.ComponentProps<'div'> & {\n config: ChartConfig\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children']\n}\n\nexport type ChartStyleProps = {\n id: string\n config: ChartConfig\n}\n\nexport type ChartTooltipProps = React.ComponentProps<typeof RechartsPrimitive.Tooltip>\n\nexport type ChartTooltipContentProps = React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<'div'> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: 'line' | 'dot' | 'dashed'\n nameKey?: string\n labelKey?: string\n }\n\nexport type ChartLegendProps = React.ComponentProps<typeof RechartsPrimitive.Legend>\n\nexport type ChartLegendContentProps = React.ComponentProps<'div'> &\n Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {\n hideIcon?: boolean\n nameKey?: string\n }\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />')\n }\n\n return context\n}\n\nfunction ChartContainer({ id, className, children, config, ...props }: ChartContainerProps) {\n const uniqueId = React.useId()\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.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-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.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 [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: ChartStyleProps) => {\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color)\n\n if (!colorConfig.length) {\n return null\n }\n\n const styles = Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join('\\n')}\n}\n`\n )\n .join('\\n')\n\n return <style>{styles}</style>\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey\n}: ChartTooltipContentProps) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey || item?.dataKey || item?.name || 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === 'string' ? config[label as keyof typeof config]?.label || label : itemConfig?.label\n\n if (labelFormatter) {\n return <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot'\n\n return (\n <div\n className={cn(\n 'grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl',\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color || item.payload.fill || item.color\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n 'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n indicator === 'dot' && 'items-center'\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn('shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)', {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed'\n })}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center'\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">{itemConfig?.label || item.name}</span>\n </div>\n {item.value && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = 'bottom',\n nameKey\n}: ChartLegendContentProps) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div className={cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)}>\n {payload\n .filter((item) => item.type !== 'none')\n .map((item) => {\n const key = `${nameKey || item.dataKey || 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div\n key={item.value}\n className={cn('flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground')}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (key in payload && typeof payload[key as keyof typeof payload] === 'string') {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === 'string'\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config]\n}\n\nexport const Bar = RechartsPrimitive.Bar\nexport const BarChart = RechartsPrimitive.BarChart\nexport const CartesianGrid = RechartsPrimitive.CartesianGrid\nexport const XAxis = RechartsPrimitive.XAxis\n\nexport { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent }\n"],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ import { t as __name } from "../chunk-IpJEthwI.js";
2
+ import { Checkbox as Checkbox$1 } from "radix-ui";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import { VariantProps } from "class-variance-authority";
5
+ import * as React from "react";
6
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
7
+
8
+ //#region src/components/checkbox.d.ts
9
+ declare const checkboxVariants: (props?: ({
10
+ size?: "sm" | "default" | "lg" | null | undefined;
11
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
12
+ type CheckboxProps = React.ComponentProps<typeof Checkbox$1.Root> & VariantProps<typeof checkboxVariants>;
13
+ declare function Checkbox({
14
+ className,
15
+ size,
16
+ ...props
17
+ }: CheckboxProps): react_jsx_runtime0.JSX.Element;
18
+ //#endregion
19
+ export { Checkbox, CheckboxProps };
20
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1,2 @@
1
+ import"../chunk-IpJEthwI.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t}from"@tabler/icons-react";import{Checkbox as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`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 flex items-center justify-center border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50`,{variants:{size:{sm:`size-3.5 rounded-[3px] [&_[data-slot=checkbox-indicator]>svg]:size-3`,default:`size-4 rounded-[4px] [&_[data-slot=checkbox-indicator]>svg]:size-3.5`,lg:`size-5 rounded-[5px] [&_[data-slot=checkbox-indicator]>svg]:size-4`}},defaultVariants:{size:`default`}});function Checkbox({className:i,size:o=`default`,...s}){return r(n.Root,{"data-slot":`checkbox`,"data-size":o,className:e(a({size:o}),i),...s,children:r(n.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:r(t,{})})})}export{Checkbox};
2
+ //# sourceMappingURL=checkbox.js.map