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 UIPrimitives 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  362f5a77_708c_00d7_ddee_671b8c6c00ca["calendars.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  362f5a77_708c_00d7_ddee_671b8c6c00ca --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  d3a48a33_114e_9408_670a_e4d860f43a15["collapsible"]
  362f5a77_708c_00d7_ddee_671b8c6c00ca --> d3a48a33_114e_9408_670a_e4d860f43a15
  f1a5091e_9f4f_a457_6394_4e05eb42bbf1["sidebar"]
  362f5a77_708c_00d7_ddee_671b8c6c00ca --> f1a5091e_9f4f_a457_6394_4e05eb42bbf1
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  362f5a77_708c_00d7_ddee_671b8c6c00ca --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style 362f5a77_708c_00d7_ddee_671b8c6c00ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"

import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/registry/bases/base/ui/collapsible"
import {
  SidebarGroup,
  SidebarGroupContent,
  SidebarGroupLabel,
  SidebarMenu,
  SidebarMenuButton,
  SidebarMenuItem,
  SidebarSeparator,
} from "@/registry/bases/base/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
                className="group/label text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground w-full text-sm"
                render={<CollapsibleTrigger />}
              >
                {calendar.name}{" "}
                <IconPlaceholder
                  lucide="ChevronRightIcon"
                  tabler="IconChevronRight"
                  hugeicons="ArrowRight01Icon"
                  phosphor="CaretRightIcon"
                  remixicon="RiArrowRightSLine"
                  className="ml-auto transition-transform group-data-open/collapsible:rotate-90"
                />
              </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-sm 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, UIPrimitives 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/base/blocks/sidebar-12/components/calendars.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/blocks/sidebar-12/components).

Analyze Your Own Codebase

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

Try Supermodel Free