Home / File/ calendars.tsx — ui Source File

calendars.tsx — ui Source File

Architecture documentation for calendars.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  ea403cce_16fc_85f0_3a4a_0bf30ce753ad["calendars.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  ea403cce_16fc_85f0_3a4a_0bf30ce753ad --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  6446fa60_a046_3422_5dd0_2a98daa65df9["collapsible"]
  ea403cce_16fc_85f0_3a4a_0bf30ce753ad --> 6446fa60_a046_3422_5dd0_2a98daa65df9
  1fee781a_1910_afaa_bb29_21305eb0ae61["sidebar"]
  ea403cce_16fc_85f0_3a4a_0bf30ce753ad --> 1fee781a_1910_afaa_bb29_21305eb0ae61
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  ea403cce_16fc_85f0_3a4a_0bf30ce753ad --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style ea403cce_16fc_85f0_3a4a_0bf30ce753ad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"

import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/registry/bases/radix/ui/collapsible"
import {
  SidebarGroup,
  SidebarGroupContent,
  SidebarGroupLabel,
  SidebarMenu,
  SidebarMenuButton,
  SidebarMenuItem,
  SidebarSeparator,
} from "@/registry/bases/radix/ui/sidebar"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export function Calendars({
  calendars,
}: {
  calendars: {
    name: string
    items: string[]
  }[]
}) {
  return (
    <>
      {calendars.map((calendar, index) => (
        <React.Fragment key={calendar.name}>
          <SidebarGroup key={calendar.name}>
            <Collapsible
              defaultOpen={index === 0}
              className="group/collapsible"
            >
              <SidebarGroupLabel
                asChild
                className="group/label text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground w-full text-sm"
              >
                <CollapsibleTrigger>
                  {calendar.name}{" "}
                  <IconPlaceholder
                    lucide="ChevronRightIcon"
                    tabler="IconChevronRight"
                    hugeicons="ArrowRight01Icon"
                    phosphor="CaretRightIcon"
                    remixicon="RiArrowRightSLine"
                    className="ml-auto transition-transform group-data-[state=open]/collapsible:rotate-90"
                  />
                </CollapsibleTrigger>
              </SidebarGroupLabel>
              <CollapsibleContent>
                <SidebarGroupContent>
                  <SidebarMenu>
                    {calendar.items.map((item, index) => (
                      <SidebarMenuItem key={item}>
                        <SidebarMenuButton>
                          <div
                            data-active={index < 2}
                            className="group/calendar-item border-sidebar-border text-sidebar-primary-foreground data-[active=true]:border-sidebar-primary data-[active=true]:bg-sidebar-primary flex aspect-square size-4 shrink-0 items-center justify-center rounded-xs border"
                          >
                            <IconPlaceholder
                              lucide="CheckIcon"
                              tabler="IconCheck"
                              hugeicons="Tick02Icon"
                              phosphor="CheckIcon"
                              remixicon="RiCheckLine"
                              className="hidden size-3 group-data-[active=true]/calendar-item:block"
                            />
                          </div>
                          {item}
                        </SidebarMenuButton>
                      </SidebarMenuItem>
                    ))}
                  </SidebarMenu>
                </SidebarGroupContent>
              </CollapsibleContent>
            </Collapsible>
          </SidebarGroup>
          <SidebarSeparator className="mx-0" />
        </React.Fragment>
      ))}
    </>
  )
}

Subdomains

Functions

Dependencies

  • collapsible
  • icon-placeholder
  • react
  • sidebar

Frequently Asked Questions

What does calendars.tsx do?
calendars.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in calendars.tsx?
calendars.tsx defines 1 function(s): Calendars.
What does calendars.tsx depend on?
calendars.tsx imports 4 module(s): collapsible, icon-placeholder, react, sidebar.
Where is calendars.tsx in the architecture?
calendars.tsx is located at apps/v4/registry/bases/radix/blocks/sidebar-15/components/calendars.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/blocks/sidebar-15/components).

Analyze Your Own Codebase

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

Try Supermodel Free