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
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ To learn more about the available components, take a look at: https://periscope.
All components live in `@signozhq/ui`. Import by subpath:

```ts
import { AlertDialog } from '@signozhq/ui';
import { AnnouncementBanner } from '@signozhq/ui';
import { Badge } from '@signozhq/ui';
import { Button } from '@signozhq/ui';
Expand All @@ -65,17 +66,23 @@ import { Callout } from '@signozhq/ui';
import { Checkbox } from '@signozhq/ui';
import { Combobox } from '@signozhq/ui';
import { Command } from '@signozhq/ui';
import { DatePicker } from '@signozhq/ui';
import { Dialog } from '@signozhq/ui';
import { Drawer } from '@signozhq/ui';
import { DropdownMenu } from '@signozhq/ui';
import { Input } from '@signozhq/ui';
import { Pagination } from '@signozhq/ui';
import { PinList } from '@signozhq/ui';
import { Popover } from '@signozhq/ui';
import { RadioGroup } from '@signozhq/ui';
import { ResizablePanelGroup } from '@signozhq/ui';
import { Toaster } from '@signozhq/ui';
import { Switch } from '@signozhq/ui';
import { Table } from '@signozhq/ui';
import { Tabs } from '@signozhq/ui';
import { Toaster } from '@signozhq/ui';
import { Toggle } from '@signozhq/ui';
import { ToggleGroup } from '@signozhq/ui';
import { Tooltip } from '@signozhq/ui';
```

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/.storybook/modeDecorator.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChevronDown, Moon, Palette, Sun } from 'lucide-react';
import { ChevronDown, Moon, Palette, Sun } from '@signozhq/icons';
import { useCallback, useEffect, useState } from 'react';
import { createPortal } from 'react-dom';

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/IconGallery.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Check, Copy } from '@signozhq/icons';
import { Button, ButtonColor, ButtonSize, ButtonVariant, Input } from '@signozhq/ui';
import { Check, Copy } from 'lucide-react';
import React, { useMemo, useState } from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';
import { FixedSizeGrid as Grid } from 'react-window';
Expand Down
3 changes: 1 addition & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
"dependencies": {
"@radix-ui/react-tabs": "^1.1.3",
"@signozhq/design-tokens": "2.1.3",
"@signozhq/icons": "^0.1.0",
"@signozhq/icons": "^0.3.0",
"@signozhq/tailwind-config": "workspace:*",
"@signozhq/ui": "workspace:*",
"@tailwindcss/vite": "^4.2.1",
"lucide-react": "^0.445.0",
"motion": "^11.18.2",
"nuqs": "^2.8.9",
"react": "^18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/stories/combobox-simple.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Code, Database, GitBranch, Terminal } from '@signozhq/icons';
import { ComboboxSimple } from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Code2, Database, GitBranch, Terminal } from 'lucide-react';
import { useState } from 'react';

const meta: Meta<typeof ComboboxSimple> = {
Expand Down Expand Up @@ -140,7 +140,7 @@ const itemsWithIcons = [
value: 'react',
label: (
<>
<Code2 className="mr-2 h-4 w-4" />
<Code className="mr-2 h-4 w-4" />
React
</>
),
Expand Down Expand Up @@ -196,7 +196,7 @@ export const WithGroupsAndIcons: Story = {
value: 'react',
label: (
<>
<Code2 className="mr-2 h-4 w-4" />
<Code className="mr-2 h-4 w-4" />
React
</>
),
Expand All @@ -205,7 +205,7 @@ export const WithGroupsAndIcons: Story = {
value: 'vue',
label: (
<>
<Code2 className="mr-2 h-4 w-4" />
<Code className="mr-2 h-4 w-4" />
Vue
</>
),
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/stories/combobox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ export default function MyComponent() {
```tsx
import { ComboboxSimple } from '@signozhq/ui';
import { useState } from 'react';
import { Code2, Database } from 'lucide-react';
import { Code, Database } from '@signozhq/icons';

const items = [
{ value: 'react', label: <><Code2 className="mr-2 h-4 w-4" />React</> },
{ value: 'vue', label: <><Code2 className="mr-2 h-4 w-4" />Vue</> },
{ value: 'react', label: <><Code className="mr-2 h-4 w-4" />React</> },
{ value: 'vue', label: <><Code className="mr-2 h-4 w-4" />Vue</> },
{ value: 'postgres', label: <><Database className="mr-2 h-4 w-4" />PostgreSQL</> },
];

Expand All @@ -83,11 +83,11 @@ export default function MyComponent() {
```tsx
import { ComboboxSimple } from '@signozhq/ui';
import { useState } from 'react';
import { Code2 } from 'lucide-react';
import { Code } from '@signozhq/icons';

const items = [
{ value: 'react', label: <><Code2 className="mr-2 h-4 w-4" />React</>, displayValue: 'React' },
{ value: 'vue', label: <><Code2 className="mr-2 h-4 w-4" />Vue</>, displayValue: 'Vue' },
{ value: 'react', label: <><Code className="mr-2 h-4 w-4" />React</>, displayValue: 'React' },
{ value: 'vue', label: <><Code className="mr-2 h-4 w-4" />Vue</>, displayValue: 'Vue' },
];

export default function MyComponent() {
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/stories/combobox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Code, Database, GitBranch, Terminal } from '@signozhq/icons';
import {
Combobox,
ComboboxCommand,
Expand All @@ -12,7 +13,6 @@ import {
ComboboxTrigger,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Code2, Database, GitBranch, Terminal } from 'lucide-react';
import { useState } from 'react';

const meta: Meta<typeof Combobox> = {
Expand Down Expand Up @@ -595,7 +595,7 @@ export const WithIcons: Story = {
{
value: 'react',
label: 'React',
icon: Code2,
icon: Code,
},
{
value: 'nodejs',
Expand Down
48 changes: 25 additions & 23 deletions apps/docs/stories/data-table.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CircleAlert, CircleCheck, CircleX, Clock, Eye, Pencil, Trash2 } from '@signozhq/icons';
import {
Badge,
DataTable as BaseDataTable,
Expand All @@ -7,8 +8,9 @@ import {
type Row,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import type { LucideIcon } from 'lucide-react';
import { AlertCircle, CheckCircle, Clock, Edit, Eye, Trash2, XCircle } from 'lucide-react';

type IconComponent = React.ComponentType<{ className?: string; size?: number }>;

import * as React from 'react';

// Create a properly typed wrapper component
Expand Down Expand Up @@ -278,16 +280,16 @@ const enhancedColumns: ColumnDef<User>[] = [
const status = row.getValue('status') as User['status'];
const statusMap: Record<
User['status'],
{ label: string; icon: LucideIcon; className: string }
{ label: string; icon: IconComponent; className: string }
> = {
active: {
label: 'Active',
icon: CheckCircle,
icon: CircleCheck,
className: 'bg-green-100 text-green-800 border-green-200',
},
inactive: {
label: 'Inactive',
icon: XCircle,
icon: CircleX,
className: 'bg-red-100 text-red-800 border-red-200',
},
pending: {
Expand All @@ -297,7 +299,7 @@ const enhancedColumns: ColumnDef<User>[] = [
},
suspended: {
label: 'Suspended',
icon: AlertCircle,
icon: CircleAlert,
className: 'bg-gray-100 text-gray-800 border-gray-200',
},
};
Expand Down Expand Up @@ -397,7 +399,7 @@ const enhancedColumns: ColumnDef<User>[] = [
<Eye className="h-4 w-4" />
</Button>
<Button variant="ghost" color={ButtonColor.None} size="sm" className="h-8 w-8 p-0">
<Edit className="h-4 w-4" />
<Pencil className="h-4 w-4" />
</Button>
<Button
variant="ghost"
Expand Down Expand Up @@ -630,11 +632,11 @@ export const Compact: StoryObj<typeof DataTable<User>> = {
header: 'Status',
cell: ({ row }: { row: Row<User> }) => {
const status = row.original.status;
const statusMap: Record<User['status'], { icon: LucideIcon; className: string }> = {
active: { icon: CheckCircle, className: 'text-green-600' },
inactive: { icon: XCircle, className: 'text-red-600' },
const statusMap: Record<User['status'], { icon: IconComponent; className: string }> = {
active: { icon: CircleCheck, className: 'text-green-600' },
inactive: { icon: CircleX, className: 'text-red-600' },
pending: { icon: Clock, className: 'text-yellow-600' },
suspended: { icon: AlertCircle, className: 'text-gray-600' },
suspended: { icon: CircleAlert, className: 'text-gray-600' },
};
const statusInfo = statusMap[status];
const Icon = statusInfo.icon;
Expand Down Expand Up @@ -840,12 +842,12 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
> = {
active: {
label: 'Active',
icon: CheckCircle,
icon: CircleCheck,
className: 'bg-green-100 text-green-800 border-green-200',
},
inactive: {
label: 'Inactive',
icon: XCircle,
icon: CircleX,
className: 'bg-red-100 text-red-800 border-red-200',
},
pending: {
Expand All @@ -855,7 +857,7 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
},
suspended: {
label: 'Suspended',
icon: AlertCircle,
icon: CircleAlert,
className: 'bg-gray-100 text-gray-800 border-gray-200',
},
};
Expand Down Expand Up @@ -942,7 +944,7 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
<Eye className="h-4 w-4" />
</Button>
<Button variant="ghost" color={ButtonColor.None} size="sm" className="h-8 w-8 p-0">
<Edit className="h-4 w-4" />
<Pencil className="h-4 w-4" />
</Button>
<Button
variant="ghost"
Expand Down Expand Up @@ -1089,12 +1091,12 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
> = {
active: {
label: 'Active',
icon: CheckCircle,
icon: CircleCheck,
className: 'bg-green-100 text-green-800 border-green-200',
},
inactive: {
label: 'Inactive',
icon: XCircle,
icon: CircleX,
className: 'bg-red-100 text-red-800 border-red-200',
},
pending: {
Expand All @@ -1104,7 +1106,7 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
},
suspended: {
label: 'Suspended',
icon: AlertCircle,
icon: CircleAlert,
className: 'bg-gray-100 text-gray-800 border-gray-200',
},
};
Expand Down Expand Up @@ -1191,7 +1193,7 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
<Eye className="h-4 w-4" />
</Button>
<Button variant="ghost" color={ButtonColor.None} size="sm" className="h-8 w-8 p-0">
<Edit className="h-4 w-4" />
<Pencil className="h-4 w-4" />
</Button>
<Button
variant="ghost"
Expand Down Expand Up @@ -1540,11 +1542,11 @@ export const StickyHeaders: StoryObj<typeof DataTable<User>> = {
header: 'Status',
size: 120,
cell: ({ row }: { row: Row<User> }) => {
const statusMap: Record<User['status'], { icon: LucideIcon; className: string }> = {
active: { icon: CheckCircle, className: 'text-green-600' },
inactive: { icon: XCircle, className: 'text-red-600' },
const statusMap: Record<User['status'], { icon: IconComponent; className: string }> = {
active: { icon: CircleCheck, className: 'text-green-600' },
inactive: { icon: CircleX, className: 'text-red-600' },
pending: { icon: Clock, className: 'text-yellow-600' },
suspended: { icon: AlertCircle, className: 'text-orange-600' },
suspended: { icon: CircleAlert, className: 'text-orange-600' },
};
const status = statusMap[row.original.status];
const Icon = status.icon;
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/stories/dropdown-menu-item.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Check, LogOut, Settings, User } from '@signozhq/icons';
import {
Button,
DropdownMenu,
Expand All @@ -7,7 +8,6 @@ import {
DropdownMenuTrigger,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Check, LogOut, Settings, User } from 'lucide-react';

const meta: Meta<typeof DropdownMenuItem> = {
title: 'Components/DropdownMenu/DropdownMenuItem',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/stories/dropdown-menu-multi-step.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Settings, User } from '@signozhq/icons';
import {
Button,
DropdownMenuItem,
Expand All @@ -7,7 +8,6 @@ import {
DropdownMenuTrigger,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Settings, User } from 'lucide-react';

const meta: Meta<typeof DropdownMenuMultiStep> = {
title: 'Components/DropdownMenu/DropdownMenuMultiStep',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/stories/dropdown-menu-sub-trigger.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link, Settings } from '@signozhq/icons';
import {
Button,
DropdownMenu,
Expand All @@ -9,7 +10,6 @@ import {
DropdownMenuTrigger,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Link, Settings } from 'lucide-react';

const meta: Meta<typeof DropdownMenuSubTrigger> = {
title: 'Components/DropdownMenu/DropdownMenuSubTrigger',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/stories/dropdown-menu-sub.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link, Settings } from '@signozhq/icons';
import {
Button,
DropdownMenu,
Expand All @@ -9,7 +10,6 @@ import {
DropdownMenuTrigger,
} from '@signozhq/ui';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Link, Settings } from 'lucide-react';
import * as React from 'react';

function SubMenuFrame({
Expand Down
9 changes: 8 additions & 1 deletion apps/docs/stories/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ To learn more about the available components, take a look at: https://periscope.
All components live in `@signozhq/ui`. Import by subpath:

```ts
import { AlertDialog } from '@signozhq/ui';
import { AnnouncementBanner } from '@signozhq/ui';
import { Badge } from '@signozhq/ui';
import { Button } from '@signozhq/ui';
Expand All @@ -69,15 +70,21 @@ import { Callout } from '@signozhq/ui';
import { Checkbox } from '@signozhq/ui';
import { Combobox } from '@signozhq/ui';
import { Command } from '@signozhq/ui';
import { DatePicker } from '@signozhq/ui';
import { Dialog } from '@signozhq/ui';
import { Drawer } from '@signozhq/ui';
import { DropdownMenu } from '@signozhq/ui';
import { Input } from '@signozhq/ui';
import { Pagination } from '@signozhq/ui';
import { PinList } from '@signozhq/ui';
import { Popover } from '@signozhq/ui';
import { RadioGroup } from '@signozhq/ui';
import { ResizablePanelGroup } from '@signozhq/ui';
import { Toaster } from '@signozhq/ui';
import { Switch } from '@signozhq/ui';
import { Table } from '@signozhq/ui';
import { Tabs } from '@signozhq/ui';
import { Toaster } from '@signozhq/ui';
import { Toggle } from '@signozhq/ui';
import { ToggleGroup } from '@signozhq/ui';
import { Tooltip } from '@signozhq/ui';
```
4 changes: 2 additions & 2 deletions apps/docs/stories/pin-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A pin list component for displaying items that can be pinned/unpinned as shortcu

```tsx
import { PinList } from '@signozhq/ui';
import { FileText, BarChart } from 'lucide-react';
import { FileText, ChartBar } from '@signozhq/icons';

export default function MyComponent() {
const items = [
Expand All @@ -30,7 +30,7 @@ export default function MyComponent() {
key: '2',
itemKey: '2',
label: 'Metrics',
icon: <BarChart />,
icon: <ChartBar />,
isPinned: false,
isEnabled: true,
},
Expand Down
Loading