Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"@upstash/ratelimit": "^2.1.0",
"@upstash/redis": "^1.38.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cn": "^0.3.0",
"date-fns": "^4.4.0",
"drizzle-orm": "^0.45.2",
"export-to-csv": "^1.5.0",
Expand All @@ -72,7 +72,6 @@
"server-only": "^0.0.1",
"shadcn": "4.21.0",
"sonner": "^2.0.8",
"tailwind-merge": "^3.7.0",
"uploadthing": "^7.7.4",
"vaul": "^1.1.2",
"zod": "^4.6.5"
Expand Down
21 changes: 10 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 11 additions & 10 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"label",
"skeleton"
],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs"],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-table/data-table.tsx",
Expand Down Expand Up @@ -112,7 +112,7 @@
"popover",
"select"
],
"dependencies": ["@tanstack/react-table", "lucide-react"],
"dependencies": ["@tanstack/react-table", "lucide-react", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-table/data-table-sort-list.tsx",
Expand Down Expand Up @@ -160,7 +160,7 @@
"popover",
"select"
],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs"],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-table/data-table-filter-list.tsx",
Expand Down Expand Up @@ -240,7 +240,7 @@
"popover",
"select"
],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs"],
"dependencies": ["@tanstack/react-table", "lucide-react", "nuqs", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-table/data-table-filter-menu.tsx",
Expand Down Expand Up @@ -317,7 +317,8 @@
"@tanstack/react-table",
"@tanstack/react-virtual",
"lucide-react",
"sonner"
"sonner",
"cn"
],
"files": [
{
Expand Down Expand Up @@ -419,7 +420,7 @@
"title": "Data Grid Select Column",
"description": "A reusable select column definition for the data grid with checkbox selection and shift-click support",
"registryDependencies": ["checkbox"],
"dependencies": ["@tanstack/react-table"],
"dependencies": ["@tanstack/react-table", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-grid/data-grid-select-column.tsx",
Expand Down Expand Up @@ -448,7 +449,7 @@
"popover",
"select"
],
"dependencies": ["@tanstack/react-table", "lucide-react"],
"dependencies": ["@tanstack/react-table", "lucide-react", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-grid/data-grid-sort-menu.tsx",
Expand Down Expand Up @@ -508,7 +509,7 @@
"title": "Data Grid View Menu",
"description": "A view menu component for the data grid to toggle column visibility",
"registryDependencies": ["button", "command", "popover"],
"dependencies": ["@tanstack/react-table", "lucide-react"],
"dependencies": ["@tanstack/react-table", "lucide-react", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-grid/data-grid-view-menu.tsx",
Expand Down Expand Up @@ -564,7 +565,7 @@
"popover",
"select"
],
"dependencies": ["@tanstack/react-table", "lucide-react"],
"dependencies": ["@tanstack/react-table", "lucide-react", "cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-grid/data-grid-filter-menu.tsx",
Expand Down Expand Up @@ -613,7 +614,7 @@
"title": "Data Grid Skeleton",
"description": "A composable skeleton component for the data grid with toolbar and grid parts",
"registryDependencies": ["skeleton"],
"dependencies": [],
"dependencies": ["cn"],
"files": [
{
"path": "src/registry/bases/radix/components/data-grid/data-grid-skeleton.tsx",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function withImportedDependencies(

const next = [...(dependencies ?? [])];

for (const pkg of ["@base-ui/react", "@base-ui/utils"] as const) {
for (const pkg of ["@base-ui/react", "@base-ui/utils", "cn"] as const) {
if (contents.some((content) => content.includes(`"${pkg}`))) {
if (!next.includes(pkg)) next.push(pkg);
}
Expand Down
7 changes: 1 addition & 6 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export { cn } from "cn";

export function getAbsoluteUrl(path: string) {
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import type { RowData } from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";
import { toast } from "sonner";

Expand All @@ -19,7 +20,6 @@ import {
getUrlHref,
parseLocalDate,
} from "@/lib/data-grid-utils";
import { cn } from "@/lib/utils";
import { DataGridCellWrapper } from "@/registry/bases/base/components/data-grid/data-grid-cell-wrapper";
import { Badge } from "@/registry/bases/base/ui/badge";
import { Button } from "@/registry/bases/base/ui/button";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import type { RowData } from "@tanstack/react-table";

import { useMergedRefs } from "@base-ui/utils/useMergedRefs";
import { cn } from "cn";
import * as React from "react";

import type { DataGridCellProps } from "@/lib/data-grid-types";

import { getCellKey } from "@/lib/data-grid-utils";
import { cn } from "@/lib/utils";
import { useDataGridPresence } from "@/registry/bases/base/components/data-grid/data-grid-presence";

interface DataGridCellWrapperProps<TData extends RowData>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import type {
Table,
} from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";

import { getColumnVariant } from "@/lib/data-grid-utils";
import { cn } from "@/lib/utils";
import {
DropdownMenu,
DropdownMenuCheckboxItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
Table,
} from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";
Expand All @@ -18,7 +19,6 @@ import {
getOperatorsForVariant,
} from "@/lib/data-grid-filters";
import { formatDate } from "@/lib/format";
import { cn } from "@/lib/utils";
import { Badge } from "@/registry/bases/base/ui/badge";
import { Button } from "@/registry/bases/base/ui/button";
import { useDirection } from "@/registry/bases/base/ui/direction";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { cn } from "cn";
import * as React from "react";

import type {
Expand All @@ -8,7 +9,6 @@ import type {
} from "@/lib/data-grid-types";

import { useAsRef } from "@/hooks/use-as-ref";
import { cn } from "@/lib/utils";
import { Button } from "@/registry/bases/base/ui/button";
import {
Dialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
import type { VirtualItem } from "@tanstack/react-virtual";

import { useMergedRefs } from "@base-ui/utils/useMergedRefs";
import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";
Expand All @@ -26,7 +27,6 @@ import {
getColumnPinningStyle,
getRowHeightValue,
} from "@/lib/data-grid-utils";
import { cn } from "@/lib/utils";
import { DataGridCell } from "@/registry/bases/base/components/data-grid/data-grid-cell";

interface DataGridRowProps<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import type {
RowData,
} from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";

import { cn } from "@/lib/utils";
import { Checkbox } from "@/registry/bases/base/ui/checkbox";

type HitboxSize = "default" | "sm" | "lg";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type * as React from "react";

import { cn } from "@/lib/utils";
import { cn } from "cn";

import { Skeleton } from "@/registry/bases/radix/ui/skeleton";

interface DivProps extends React.ComponentProps<"div"> {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import type { ColumnSort, RowData, Table } from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";

import { cn } from "@/lib/utils";
import { Badge } from "@/registry/bases/base/ui/badge";
import { Button } from "@/registry/bases/base/ui/button";
import { useDirection } from "@/registry/bases/base/ui/direction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import type { RowData, Table } from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { DataGridFeatures } from "@/lib/data-grid-features";

import { cn } from "@/lib/utils";
import { Button } from "@/registry/bases/base/ui/button";
import { useDirection } from "@/registry/bases/base/ui/direction";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/registry/bases/base/components/data-grid/data-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import type { RowData } from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { useDataGrid } from "@/hooks/use-data-grid";
Expand All @@ -13,7 +14,6 @@ import {
getColumnBorderVisibility,
getColumnPinningStyle,
} from "@/lib/data-grid-utils";
import { cn } from "@/lib/utils";
import { DataGridColumnHeader } from "@/registry/bases/base/components/data-grid/data-grid-column-header";
import { DataGridContextMenu } from "@/registry/bases/base/components/data-grid/data-grid-context-menu";
import { DataGridPasteDialog } from "@/registry/bases/base/components/data-grid/data-grid-paste-dialog";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import type { RowData, Table } from "@tanstack/react-table";
import type * as React from "react";

import { cn } from "cn";

import type { DataTableFeatures } from "@/lib/table-features";

import { cn } from "@/lib/utils";
import { DataTableViewOptions } from "@/registry/bases/base/components/data-table/data-table-view-options";

interface DataTableAdvancedToolbarProps<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import type { Column, RowData } from "@tanstack/react-table";

import { cn } from "cn";

import type { DataTableFeatures } from "@/lib/table-features";

import { cn } from "@/lib/utils";
import {
DropdownMenu,
DropdownMenuCheckboxItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import type { Column, RowData } from "@tanstack/react-table";

import { cn } from "cn";
import * as React from "react";

import type { Option } from "@/lib/data-table-types";
import type { DataTableFeatures } from "@/lib/table-features";

import { cn } from "@/lib/utils";
import { Badge } from "@/registry/bases/base/ui/badge";
import { Button } from "@/registry/bases/base/ui/button";
import {
Expand Down
Loading
Loading