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: 2 additions & 1 deletion src/hooks/use-data-grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ function useDataGrid<TData extends RowData>({
initialState,
...props
}: UseDataGridProps<TData>) {
const dir = useDirection(dirProp);
const contextDir = useDirection();
const dir = dirProp ?? contextDir;
const dataGridRef = React.useRef<HTMLDivElement>(null);
const tableRef =
React.useRef<ReturnType<typeof useTable<DataGridFeatures, TData>>>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function DataGridFilterMenu<TData extends RowData>({
{columnFilters.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{columnFilters.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function DataGridSearchImpl({
<div
role="search"
data-slot="grid-search"
className="absolute end-4 top-4 z-50 flex animate-in flex-col gap-2 rounded-lg border bg-background p-2 shadow-lg fade-in-0 slide-in-from-top-2"
className="absolute inset-e-4 top-4 z-50 flex animate-in flex-col gap-2 rounded-lg border bg-background p-2 shadow-lg fade-in-0 slide-in-from-top-2"
>
<div className="flex items-center gap-2">
<Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function DataGridSortMenu<TData extends RowData>({
{sorting.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{sorting.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function DataTableFacetedFilter<TData extends RowData, TValue>({
<CommandInput placeholder={title} />
<CommandList className="max-h-full">
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup className="max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto">
<CommandGroup className="max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto">
{options.map((option) => {
const isSelected = selectedValues.has(option.value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export function DataTableFilterList<TData extends RowData>({
{filters.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{filters.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export function DataTableSortList<TData extends RowData>({
{sorting.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{sorting.length}
</Badge>
Expand Down
11 changes: 2 additions & 9 deletions src/registry/bases/base/ui/direction.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
"use client";

import {
export {
DirectionProvider,
useDirection as useBaseDirection,
useDirection,
} from "@base-ui/react/direction-provider";

function useDirection(dir?: "ltr" | "rtl") {
const contextDir = useBaseDirection();
return dir ?? contextDir;
}

export { DirectionProvider, useDirection };
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function DataGridFilterMenu<TData extends RowData>({
{columnFilters.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{columnFilters.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function DataGridSearchImpl({
<div
role="search"
data-slot="grid-search"
className="absolute end-4 top-4 z-50 flex animate-in flex-col gap-2 rounded-lg border bg-background p-2 shadow-lg fade-in-0 slide-in-from-top-2"
className="absolute inset-e-4 top-4 z-50 flex animate-in flex-col gap-2 rounded-lg border bg-background p-2 shadow-lg fade-in-0 slide-in-from-top-2"
>
<div className="flex items-center gap-2">
<Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function DataGridSortMenu<TData extends RowData>({
{sorting.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{sorting.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function DataTableFacetedFilter<TData extends RowData, TValue>({
<CommandInput placeholder={title} />
<CommandList className="max-h-full">
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup className="max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto">
<CommandGroup className="max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto">
{options.map((option) => {
const isSelected = selectedValues.has(option.value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export function DataTableFilterList<TData extends RowData>({
{filters.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{filters.length}
</Badge>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function DataTableSortList<TData extends RowData>({
{sorting.length > 0 && (
<Badge
variant="secondary"
className="h-[18.24px] rounded-[3.2px] px-[5.12px] font-mono text-[10.4px] font-normal"
className="h-[18.24px] rounded-md px-[5.12px] font-mono text-[10.4px] font-normal"
>
{sorting.length}
</Badge>
Expand Down
Loading