Home / File/ calendar.tsx — ui Source File

calendar.tsx — ui Source File

Architecture documentation for calendar.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx DocumentationAtlas SearchAPI 5 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  26d769e3_e483_c665_841e_8b817b07c7fc["calendar.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  26d769e3_e483_c665_841e_8b817b07c7fc --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  3d9438e8_7604_787c_4898_907262aff28b["utils"]
  26d769e3_e483_c665_841e_8b817b07c7fc --> 3d9438e8_7604_787c_4898_907262aff28b
  43bb9fc1_6eab_13df_a99b_981eb13b9ec1["button"]
  26d769e3_e483_c665_841e_8b817b07c7fc --> 43bb9fc1_6eab_13df_a99b_981eb13b9ec1
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  26d769e3_e483_c665_841e_8b817b07c7fc --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  bfc8708c_7488_3983_8998_32b793781735["react-day-picker"]
  26d769e3_e483_c665_841e_8b817b07c7fc --> bfc8708c_7488_3983_8998_32b793781735
  style 26d769e3_e483_c665_841e_8b817b07c7fc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { cn } from "@/examples/base/lib/utils"
import { Button, buttonVariants } from "@/examples/base/ui-rtl/button"
import {
  ChevronDownIcon,
  ChevronLeftIcon,
  ChevronRightIcon,
} from "lucide-react"
import {
  DayPicker,
  getDefaultClassNames,
  type DayButton,
  type Locale,
} from "react-day-picker"

function Calendar({
  className,
  classNames,
  showOutsideDays = true,
  captionLayout = "label",
  buttonVariant = "ghost",
  locale,
  formatters,
  components,
  ...props
}: React.ComponentProps<typeof DayPicker> & {
  buttonVariant?: React.ComponentProps<typeof Button>["variant"]
}) {
  const defaultClassNames = getDefaultClassNames()

  return (
    <DayPicker
      showOutsideDays={showOutsideDays}
      className={cn(
        "bg-background group/calendar 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`,
        className
      )}
      captionLayout={captionLayout}
      locale={locale}
      formatters={{
        formatMonthDropdown: (date) =>
          date.toLocaleString(locale?.code, { month: "short" }),
        ...formatters,
      }}
      classNames={{
        root: cn("w-fit", defaultClassNames.root),
        months: cn(
          "flex gap-4 flex-col md:flex-row relative",
          defaultClassNames.months
        ),
        month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
        nav: cn(
          "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
          defaultClassNames.nav
        ),
        button_previous: cn(
// ... (171 more lines)

Subdomains

Dependencies

  • button
  • lucide-react
  • react
  • react-day-picker
  • utils

Frequently Asked Questions

What does calendar.tsx do?
calendar.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in calendar.tsx?
calendar.tsx defines 2 function(s): Calendar, CalendarDayButton.
What does calendar.tsx depend on?
calendar.tsx imports 5 module(s): button, lucide-react, react, react-day-picker, utils.
Where is calendar.tsx in the architecture?
calendar.tsx is located at apps/v4/examples/base/ui-rtl/calendar.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/base/ui-rtl).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free