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
18 changes: 18 additions & 0 deletions apps/design-system/content/docs/components/table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ import {
</Table>
```

## Sortable Columns

Use `TableHeadSort` inside `TableHead` to enable column sorting.

| Prop | Type | Description |
| -------------- | -------------------------- | ------------------------------------------------------------------ |
| `column` | `string` | Unique identifier for the column |
| `currentSort` | `string` | Current sort state in format `"column:order"` (e.g., `"name:asc"`) |
| `onSortChange` | `(column: string) => void` | Callback fired when column header is clicked |

```tsx
<TableHead>
<TableHeadSort column="name" currentSort={sort} onSortChange={handleSortChange}>
Name
</TableHeadSort>
</TableHead>
```

## Data Table

You can use the `<Table />` component to build more complex data tables. Combine it with [@tanstack/react-table](https://tanstack.com/table/v8) to create tables with sorting, filtering and pagination.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function DialogDemo() {
<DialogHeader padding={'small'}>
<DialogTitle>Edit profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're done.
Make changes to your profile here. Click save when you&apos;re done.
</DialogDescription>
</DialogHeader>
<DialogSectionSeparator />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function PageLayoutDetail() {
<PageHeaderSummary>
<PageHeaderTitle>Billing</PageHeaderTitle>
<PageHeaderDescription>
Manage your organization's billing and subscription settings.
Manage your organization&apos;s billing and subscription settings.
</PageHeaderDescription>
</PageHeaderSummary>
</PageHeaderMeta>
Expand Down Expand Up @@ -72,7 +72,7 @@ export default function PageLayoutDetail() {
<PageSectionSummary>
<PageSectionTitle>Cost control</PageSectionTitle>
<PageSectionDescription>
Set spending limits and alerts to manage your organization's costs.
Set spending limits and alerts to manage your organization&apos;s costs.
</PageSectionDescription>
</PageSectionSummary>
</PageSectionMeta>
Expand Down
2 changes: 1 addition & 1 deletion apps/design-system/registry/default/example/toc-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function MultiSelectDemo() {
</a>
</h2>
<p>
Before diving deep into cloud services, it's important to understand the basic
Before diving deep into cloud services, it&apos;s important to understand the basic
building blocks that make cloud computing possible.
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function MultiSelectDemo() {
</a>
</h2>
<p>
Before diving deep into cloud services, it's important to understand the basic
Before diving deep into cloud services, it&apos;s important to understand the basic
building blocks that make cloud computing possible.
</p>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default function TypographyBlockquote() {
return (
<blockquote className="mt-6 border-l-2 pl-6 italic">
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for
the privilege."
&quot;After all,&quot; he said, &quot;everyone enjoys a good joke, so it&apos;s only fair that
they should pay for the privilege.&quot;
</blockquote>
)
}
29 changes: 16 additions & 13 deletions apps/design-system/registry/default/example/typography-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function TypographyDemo() {
of money.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
The King's Plan
The King&apos;s Plan
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king thought long and hard, and finally came up with{' '}
Expand All @@ -20,12 +20,13 @@ export default function TypographyDemo() {
: he would tax the jokes in the kingdom.
</p>
<blockquote className="mt-6 border-l-2 pl-6 italic">
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay
for the privilege."
&quot;After all,&quot; he said, &quot;everyone enjoys a good joke, so it&apos;s only fair
that they should pay for the privilege.&quot;
</blockquote>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">The Joke Tax</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king's subjects were not amused. They grumbled and complained, but the king was firm:
The king&apos;s subjects were not amused. They grumbled and complained, but the king was
firm:
</p>
<ul className="my-6 ml-6 list-disc [&>li]:mt-2">
<li>1st level of puns: 5 gold coins</li>
Expand All @@ -34,22 +35,24 @@ export default function TypographyDemo() {
</ul>
<p className="leading-7 [&:not(:first-child)]:mt-6">
As a result, people stopped telling jokes, and the kingdom fell into a gloom. But there was
one person who refused to let the king's foolishness get him down: a court jester named
one person who refused to let the king&apos;s foolishness get him down: a court jester named
Jokester.
</p>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">Jokester's Revolt</h3>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
Jokester&apos;s Revolt
</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
Jokester began sneaking into the castle in the middle of the night and leaving jokes all
over the place: under the king's pillow, in his soup, even in the royal toilet. The king was
furious, but he couldn't seem to stop Jokester.
over the place: under the king&apos;s pillow, in his soup, even in the royal toilet. The
king was furious, but he couldn&apos;t seem to stop Jokester.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6">
And then, one day, the people of the kingdom discovered that the jokes left by Jokester were
so funny that they couldn't help but laugh. And once they started laughing, they couldn't
stop.
so funny that they couldn&apos;t help but laugh. And once they started laughing, they
couldn&apos;t stop.
</p>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
The People's Rebellion
The People&apos;s Rebellion
</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The people of the kingdom, feeling uplifted by the laughter, started to tell jokes and puns
Expand All @@ -60,10 +63,10 @@ export default function TypographyDemo() {
<thead>
<tr className="m-0 border-t p-0 even:bg-muted">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
King&apos;s Treasury
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
People's happiness
People&apos;s happiness
</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export default function TypographyTable() {
<thead>
<tr className="m-0 border-t p-0 even:bg-muted">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
King&apos;s Treasury
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
People's happiness
People&apos;s happiness
</th>
</tr>
</thead>
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as Sentry from '@sentry/nextjs'

export async function register() {
// eslint-disable-next-line turbo/no-undeclared-env-vars
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config')
}

// eslint-disable-next-line turbo/no-undeclared-env-vars
if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config')
}
Expand Down
Loading
Loading