diff --git a/apps/www/__registry__/index.tsx b/apps/www/__registry__/index.tsx index 5b61ac36371..2a4ffc218b1 100644 --- a/apps/www/__registry__/index.tsx +++ b/apps/www/__registry__/index.tsx @@ -4944,213 +4944,18 @@ export const Index: Record = { source: "", meta: undefined, }, - "typography-blockquote": { - name: "typography-blockquote", + "text-demo": { + name: "text-demo", description: "", type: "registry:example", registryDependencies: undefined, files: [{ - path: "registry/new-york/examples/typography-blockquote.tsx", + path: "registry/new-york/examples/text-demo.tsx", type: "registry:example", target: "" }], categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-blockquote.tsx")), - source: "", - meta: undefined, - }, - "typography-demo": { - name: "typography-demo", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-demo.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-demo.tsx")), - source: "", - meta: undefined, - }, - "typography-h1": { - name: "typography-h1", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-h1.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-h1.tsx")), - source: "", - meta: undefined, - }, - "typography-h2": { - name: "typography-h2", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-h2.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-h2.tsx")), - source: "", - meta: undefined, - }, - "typography-h3": { - name: "typography-h3", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-h3.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-h3.tsx")), - source: "", - meta: undefined, - }, - "typography-h4": { - name: "typography-h4", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-h4.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-h4.tsx")), - source: "", - meta: undefined, - }, - "typography-inline-code": { - name: "typography-inline-code", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-inline-code.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-inline-code.tsx")), - source: "", - meta: undefined, - }, - "typography-large": { - name: "typography-large", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-large.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-large.tsx")), - source: "", - meta: undefined, - }, - "typography-lead": { - name: "typography-lead", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-lead.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-lead.tsx")), - source: "", - meta: undefined, - }, - "typography-list": { - name: "typography-list", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-list.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-list.tsx")), - source: "", - meta: undefined, - }, - "typography-muted": { - name: "typography-muted", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-muted.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-muted.tsx")), - source: "", - meta: undefined, - }, - "typography-p": { - name: "typography-p", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-p.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-p.tsx")), - source: "", - meta: undefined, - }, - "typography-small": { - name: "typography-small", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-small.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-small.tsx")), - source: "", - meta: undefined, - }, - "typography-table": { - name: "typography-table", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/new-york/examples/typography-table.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/new-york/examples/typography-table.tsx")), + component: React.lazy(() => import("@/registry/new-york/examples/text-demo.tsx")), source: "", meta: undefined, }, @@ -10199,213 +10004,18 @@ export const Index: Record = { source: "", meta: undefined, }, - "typography-blockquote": { - name: "typography-blockquote", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-blockquote.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-blockquote.tsx")), - source: "", - meta: undefined, - }, - "typography-demo": { - name: "typography-demo", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-demo.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-demo.tsx")), - source: "", - meta: undefined, - }, - "typography-h1": { - name: "typography-h1", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-h1.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-h1.tsx")), - source: "", - meta: undefined, - }, - "typography-h2": { - name: "typography-h2", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-h2.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-h2.tsx")), - source: "", - meta: undefined, - }, - "typography-h3": { - name: "typography-h3", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-h3.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-h3.tsx")), - source: "", - meta: undefined, - }, - "typography-h4": { - name: "typography-h4", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-h4.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-h4.tsx")), - source: "", - meta: undefined, - }, - "typography-inline-code": { - name: "typography-inline-code", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-inline-code.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-inline-code.tsx")), - source: "", - meta: undefined, - }, - "typography-large": { - name: "typography-large", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-large.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-large.tsx")), - source: "", - meta: undefined, - }, - "typography-lead": { - name: "typography-lead", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-lead.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-lead.tsx")), - source: "", - meta: undefined, - }, - "typography-list": { - name: "typography-list", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-list.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-list.tsx")), - source: "", - meta: undefined, - }, - "typography-muted": { - name: "typography-muted", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-muted.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-muted.tsx")), - source: "", - meta: undefined, - }, - "typography-p": { - name: "typography-p", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-p.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-p.tsx")), - source: "", - meta: undefined, - }, - "typography-small": { - name: "typography-small", - description: "", - type: "registry:example", - registryDependencies: undefined, - files: [{ - path: "registry/default/examples/typography-small.tsx", - type: "registry:example", - target: "" - }], - categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-small.tsx")), - source: "", - meta: undefined, - }, - "typography-table": { - name: "typography-table", + "text-demo": { + name: "text-demo", description: "", type: "registry:example", registryDependencies: undefined, files: [{ - path: "registry/default/examples/typography-table.tsx", + path: "registry/default/examples/text-demo.tsx", type: "registry:example", target: "" }], categories: undefined, - component: React.lazy(() => import("@/registry/default/examples/typography-table.tsx")), + component: React.lazy(() => import("@/registry/default/examples/text-demo.tsx")), source: "", meta: undefined, }, diff --git a/apps/www/config/docs.ts b/apps/www/config/docs.ts index 92d4ac8075d..99a5d26b3f3 100644 --- a/apps/www/config/docs.ts +++ b/apps/www/config/docs.ts @@ -82,11 +82,6 @@ export const docsConfig: DocsConfig = { href: "/docs/react-19", items: [], }, - { - title: "Typography", - href: "/docs/components/typography", - items: [], - }, { title: "Open in v0", href: "/docs/v0", @@ -372,6 +367,11 @@ export const docsConfig: DocsConfig = { href: "/docs/components/tabs", items: [], }, + { + title: "Text", + href: "/docs/components/text", + items: [], + }, { title: "Textarea", href: "/docs/components/textarea", diff --git a/apps/www/content/docs/components/text.mdx b/apps/www/content/docs/components/text.mdx new file mode 100644 index 00000000000..36c73a2d680 --- /dev/null +++ b/apps/www/content/docs/components/text.mdx @@ -0,0 +1,11 @@ +--- +title: Text +description: Displays a text or a component that looks like a text. +component: true +--- + + diff --git a/apps/www/content/docs/components/typography.mdx b/apps/www/content/docs/components/typography.mdx deleted file mode 100644 index 419d20cfd54..00000000000 --- a/apps/www/content/docs/components/typography.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Typography -description: Styles for headings, paragraphs, lists...etc -component: true ---- - - - -## h1 - - - -## h2 - - - -## h3 - - - -## h4 - - - -## p - - - -## blockquote - - - -## table - - - -## list - - - -## Inline code - - - -## Lead - - - -## Large - - - -## Small - - - -## Muted - - diff --git a/apps/www/public/r/styles/default/text-demo.json b/apps/www/public/r/styles/default/text-demo.json new file mode 100644 index 00000000000..4410ddd178a --- /dev/null +++ b/apps/www/public/r/styles/default/text-demo.json @@ -0,0 +1,12 @@ +{ + "name": "text-demo", + "type": "registry:example", + "files": [ + { + "path": "examples/text-demo.tsx", + "content": "import { Text } from \"@/registry/default/ui/text\"\n\nexport default function TextDemo() {\n return (\n
\n The Joke Tax Chronicles\n \n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n \n The King's Plan\n \n The king thought long and hard, and finally came up with{\" \"}\n \n a brilliant plan\n \n : he would tax the jokes in the kingdom.\n \n \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n \n The Joke Tax\n \n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n \n \n
  • 1st level of puns: 5 gold coins
  • \n
  • 2nd level of jokes: 10 gold coins
  • \n
  • 3rd level of one-liners : 20 gold coins
  • \n
    \n \n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n \n Jokester's Revolt\n \n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n \n \n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n \n The People's Rebellion\n \n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n \n \n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n \n \n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n \n
    \n )\n}\n", + "type": "registry:example", + "target": "" + } + ] +} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-blockquote.json b/apps/www/public/r/styles/default/typography-blockquote.json deleted file mode 100644 index 08ddcfd9a20..00000000000 --- a/apps/www/public/r/styles/default/typography-blockquote.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-blockquote", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-blockquote.tsx", - "content": "export default function TypographyBlockquote() {\n return (\n
    \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair that\n they should pay for the privilege.\"\n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-demo.json b/apps/www/public/r/styles/default/typography-demo.json deleted file mode 100644 index 8db6def4d14..00000000000 --- a/apps/www/public/r/styles/default/typography-demo.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-demo", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-demo.tsx", - "content": "export default function TypographyDemo() {\n return (\n
    \n

    \n The Joke Tax Chronicles\n

    \n

    \n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n

    \n

    \n The King's Plan\n

    \n

    \n The king thought long and hard, and finally came up with{\" \"}\n \n a brilliant plan\n \n : he would tax the jokes in the kingdom.\n

    \n
    \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n
    \n

    \n The Joke Tax\n

    \n

    \n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n

    \n
      li]:mt-2\">\n
    • 1st level of puns: 5 gold coins
    • \n
    • 2nd level of jokes: 10 gold coins
    • \n
    • 3rd level of one-liners : 20 gold coins
    • \n
    \n

    \n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n

    \n

    \n Jokester's Revolt\n

    \n

    \n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n

    \n

    \n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n

    \n

    \n The People's Rebellion\n

    \n

    \n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n King's Treasury\n \n People's happiness\n
    \n Empty\n \n Overflowing\n
    \n Modest\n \n Satisfied\n
    \n Full\n \n Ecstatic\n
    \n
    \n

    \n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n

    \n

    \n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n

    \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-h1.json b/apps/www/public/r/styles/default/typography-h1.json deleted file mode 100644 index ac9b2a69f50..00000000000 --- a/apps/www/public/r/styles/default/typography-h1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h1", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h1.tsx", - "content": "export default function TypographyH1() {\n return (\n

    \n Taxing Laughter: The Joke Tax Chronicles\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-h2.json b/apps/www/public/r/styles/default/typography-h2.json deleted file mode 100644 index 57909033817..00000000000 --- a/apps/www/public/r/styles/default/typography-h2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h2", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h2.tsx", - "content": "export default function TypographyH2() {\n return (\n

    \n The People of the Kingdom\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-h3.json b/apps/www/public/r/styles/default/typography-h3.json deleted file mode 100644 index 193e089e74e..00000000000 --- a/apps/www/public/r/styles/default/typography-h3.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h3", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h3.tsx", - "content": "export default function TypographyH3() {\n return (\n

    \n The Joke Tax\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-h4.json b/apps/www/public/r/styles/default/typography-h4.json deleted file mode 100644 index 19852b679e2..00000000000 --- a/apps/www/public/r/styles/default/typography-h4.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h4", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h4.tsx", - "content": "export default function TypographyH4() {\n return (\n

    \n People stopped telling jokes\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-inline-code.json b/apps/www/public/r/styles/default/typography-inline-code.json deleted file mode 100644 index eee8b57bd6d..00000000000 --- a/apps/www/public/r/styles/default/typography-inline-code.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-inline-code", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-inline-code.tsx", - "content": "export default function TypographyInlineCode() {\n return (\n \n @radix-ui/react-alert-dialog\n \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-large.json b/apps/www/public/r/styles/default/typography-large.json deleted file mode 100644 index 553e9e70fa1..00000000000 --- a/apps/www/public/r/styles/default/typography-large.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-large", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-large.tsx", - "content": "export default function TypographyLarge() {\n return
    Are you absolutely sure?
    \n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-lead.json b/apps/www/public/r/styles/default/typography-lead.json deleted file mode 100644 index d07c6a0c1d0..00000000000 --- a/apps/www/public/r/styles/default/typography-lead.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-lead", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-lead.tsx", - "content": "export default function TypographyLead() {\n return (\n

    \n A modal dialog that interrupts the user with important content and expects\n a response.\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-list.json b/apps/www/public/r/styles/default/typography-list.json deleted file mode 100644 index a53659185b8..00000000000 --- a/apps/www/public/r/styles/default/typography-list.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-list", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-list.tsx", - "content": "export default function TypographyList() {\n return (\n
      li]:mt-2\">\n
    • 1st level of puns: 5 gold coins
    • \n
    • 2nd level of jokes: 10 gold coins
    • \n
    • 3rd level of one-liners : 20 gold coins
    • \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-muted.json b/apps/www/public/r/styles/default/typography-muted.json deleted file mode 100644 index b8b411d0846..00000000000 --- a/apps/www/public/r/styles/default/typography-muted.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-muted", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-muted.tsx", - "content": "export default function TypographyMuted() {\n return (\n

    Enter your email address.

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-p.json b/apps/www/public/r/styles/default/typography-p.json deleted file mode 100644 index 7d9847196b0..00000000000 --- a/apps/www/public/r/styles/default/typography-p.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-p", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-p.tsx", - "content": "export default function TypographyP() {\n return (\n

    \n The king, seeing how much happier his subjects were, realized the error of\n his ways and repealed the joke tax.\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-small.json b/apps/www/public/r/styles/default/typography-small.json deleted file mode 100644 index 79bae7bb51f..00000000000 --- a/apps/www/public/r/styles/default/typography-small.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-small", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-small.tsx", - "content": "export default function TypographySmall() {\n return (\n Email address\n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/default/typography-table.json b/apps/www/public/r/styles/default/typography-table.json deleted file mode 100644 index 904c6d14179..00000000000 --- a/apps/www/public/r/styles/default/typography-table.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-table", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-table.tsx", - "content": "export default function TypographyTable() {\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n King's Treasury\n \n People's happiness\n
    \n Empty\n \n Overflowing\n
    \n Modest\n \n Satisfied\n
    \n Full\n \n Ecstatic\n
    \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/text-demo.json b/apps/www/public/r/styles/new-york/text-demo.json new file mode 100644 index 00000000000..4410ddd178a --- /dev/null +++ b/apps/www/public/r/styles/new-york/text-demo.json @@ -0,0 +1,12 @@ +{ + "name": "text-demo", + "type": "registry:example", + "files": [ + { + "path": "examples/text-demo.tsx", + "content": "import { Text } from \"@/registry/default/ui/text\"\n\nexport default function TextDemo() {\n return (\n
    \n The Joke Tax Chronicles\n \n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n \n The King's Plan\n \n The king thought long and hard, and finally came up with{\" \"}\n \n a brilliant plan\n \n : he would tax the jokes in the kingdom.\n \n \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n \n The Joke Tax\n \n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n \n \n
  • 1st level of puns: 5 gold coins
  • \n
  • 2nd level of jokes: 10 gold coins
  • \n
  • 3rd level of one-liners : 20 gold coins
  • \n
    \n \n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n \n Jokester's Revolt\n \n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n \n \n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n \n The People's Rebellion\n \n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n \n \n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n \n \n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n \n
    \n )\n}\n", + "type": "registry:example", + "target": "" + } + ] +} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-blockquote.json b/apps/www/public/r/styles/new-york/typography-blockquote.json deleted file mode 100644 index 08ddcfd9a20..00000000000 --- a/apps/www/public/r/styles/new-york/typography-blockquote.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-blockquote", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-blockquote.tsx", - "content": "export default function TypographyBlockquote() {\n return (\n
    \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair that\n they should pay for the privilege.\"\n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-demo.json b/apps/www/public/r/styles/new-york/typography-demo.json deleted file mode 100644 index 8db6def4d14..00000000000 --- a/apps/www/public/r/styles/new-york/typography-demo.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-demo", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-demo.tsx", - "content": "export default function TypographyDemo() {\n return (\n
    \n

    \n The Joke Tax Chronicles\n

    \n

    \n Once upon a time, in a far-off land, there was a very lazy king who\n spent all day lounging on his throne. One day, his advisors came to him\n with a problem: the kingdom was running out of money.\n

    \n

    \n The King's Plan\n

    \n

    \n The king thought long and hard, and finally came up with{\" \"}\n \n a brilliant plan\n \n : he would tax the jokes in the kingdom.\n

    \n
    \n \"After all,\" he said, \"everyone enjoys a good joke, so it's only fair\n that they should pay for the privilege.\"\n
    \n

    \n The Joke Tax\n

    \n

    \n The king's subjects were not amused. They grumbled and complained, but\n the king was firm:\n

    \n
      li]:mt-2\">\n
    • 1st level of puns: 5 gold coins
    • \n
    • 2nd level of jokes: 10 gold coins
    • \n
    • 3rd level of one-liners : 20 gold coins
    • \n
    \n

    \n As a result, people stopped telling jokes, and the kingdom fell into a\n gloom. But there was one person who refused to let the king's\n foolishness get him down: a court jester named Jokester.\n

    \n

    \n Jokester's Revolt\n

    \n

    \n Jokester began sneaking into the castle in the middle of the night and\n leaving jokes all over the place: under the king's pillow, in his soup,\n even in the royal toilet. The king was furious, but he couldn't seem to\n stop Jokester.\n

    \n

    \n And then, one day, the people of the kingdom discovered that the jokes\n left by Jokester were so funny that they couldn't help but laugh. And\n once they started laughing, they couldn't stop.\n

    \n

    \n The People's Rebellion\n

    \n

    \n The people of the kingdom, feeling uplifted by the laughter, started to\n tell jokes and puns again, and soon the entire kingdom was in on the\n joke.\n

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n King's Treasury\n \n People's happiness\n
    \n Empty\n \n Overflowing\n
    \n Modest\n \n Satisfied\n
    \n Full\n \n Ecstatic\n
    \n
    \n

    \n The king, seeing how much happier his subjects were, realized the error\n of his ways and repealed the joke tax. Jokester was declared a hero, and\n the kingdom lived happily ever after.\n

    \n

    \n The moral of the story is: never underestimate the power of a good laugh\n and always be careful of bad ideas.\n

    \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-h1.json b/apps/www/public/r/styles/new-york/typography-h1.json deleted file mode 100644 index ac9b2a69f50..00000000000 --- a/apps/www/public/r/styles/new-york/typography-h1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h1", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h1.tsx", - "content": "export default function TypographyH1() {\n return (\n

    \n Taxing Laughter: The Joke Tax Chronicles\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-h2.json b/apps/www/public/r/styles/new-york/typography-h2.json deleted file mode 100644 index 57909033817..00000000000 --- a/apps/www/public/r/styles/new-york/typography-h2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h2", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h2.tsx", - "content": "export default function TypographyH2() {\n return (\n

    \n The People of the Kingdom\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-h3.json b/apps/www/public/r/styles/new-york/typography-h3.json deleted file mode 100644 index 193e089e74e..00000000000 --- a/apps/www/public/r/styles/new-york/typography-h3.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h3", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h3.tsx", - "content": "export default function TypographyH3() {\n return (\n

    \n The Joke Tax\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-h4.json b/apps/www/public/r/styles/new-york/typography-h4.json deleted file mode 100644 index 19852b679e2..00000000000 --- a/apps/www/public/r/styles/new-york/typography-h4.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-h4", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-h4.tsx", - "content": "export default function TypographyH4() {\n return (\n

    \n People stopped telling jokes\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-inline-code.json b/apps/www/public/r/styles/new-york/typography-inline-code.json deleted file mode 100644 index eee8b57bd6d..00000000000 --- a/apps/www/public/r/styles/new-york/typography-inline-code.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-inline-code", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-inline-code.tsx", - "content": "export default function TypographyInlineCode() {\n return (\n \n @radix-ui/react-alert-dialog\n \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-large.json b/apps/www/public/r/styles/new-york/typography-large.json deleted file mode 100644 index 553e9e70fa1..00000000000 --- a/apps/www/public/r/styles/new-york/typography-large.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-large", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-large.tsx", - "content": "export default function TypographyLarge() {\n return
    Are you absolutely sure?
    \n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-lead.json b/apps/www/public/r/styles/new-york/typography-lead.json deleted file mode 100644 index d07c6a0c1d0..00000000000 --- a/apps/www/public/r/styles/new-york/typography-lead.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-lead", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-lead.tsx", - "content": "export default function TypographyLead() {\n return (\n

    \n A modal dialog that interrupts the user with important content and expects\n a response.\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-list.json b/apps/www/public/r/styles/new-york/typography-list.json deleted file mode 100644 index a53659185b8..00000000000 --- a/apps/www/public/r/styles/new-york/typography-list.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-list", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-list.tsx", - "content": "export default function TypographyList() {\n return (\n
      li]:mt-2\">\n
    • 1st level of puns: 5 gold coins
    • \n
    • 2nd level of jokes: 10 gold coins
    • \n
    • 3rd level of one-liners : 20 gold coins
    • \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-muted.json b/apps/www/public/r/styles/new-york/typography-muted.json deleted file mode 100644 index b8b411d0846..00000000000 --- a/apps/www/public/r/styles/new-york/typography-muted.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-muted", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-muted.tsx", - "content": "export default function TypographyMuted() {\n return (\n

    Enter your email address.

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-p.json b/apps/www/public/r/styles/new-york/typography-p.json deleted file mode 100644 index 7d9847196b0..00000000000 --- a/apps/www/public/r/styles/new-york/typography-p.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-p", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-p.tsx", - "content": "export default function TypographyP() {\n return (\n

    \n The king, seeing how much happier his subjects were, realized the error of\n his ways and repealed the joke tax.\n

    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-small.json b/apps/www/public/r/styles/new-york/typography-small.json deleted file mode 100644 index 79bae7bb51f..00000000000 --- a/apps/www/public/r/styles/new-york/typography-small.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-small", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-small.tsx", - "content": "export default function TypographySmall() {\n return (\n Email address\n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/public/r/styles/new-york/typography-table.json b/apps/www/public/r/styles/new-york/typography-table.json deleted file mode 100644 index 904c6d14179..00000000000 --- a/apps/www/public/r/styles/new-york/typography-table.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "typography-table", - "type": "registry:example", - "files": [ - { - "path": "examples/typography-table.tsx", - "content": "export default function TypographyTable() {\n return (\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n King's Treasury\n \n People's happiness\n
    \n Empty\n \n Overflowing\n
    \n Modest\n \n Satisfied\n
    \n Full\n \n Ecstatic\n
    \n
    \n )\n}\n", - "type": "registry:example", - "target": "" - } - ] -} \ No newline at end of file diff --git a/apps/www/registry/default/examples/text-demo.tsx b/apps/www/registry/default/examples/text-demo.tsx new file mode 100644 index 00000000000..e804b62f805 --- /dev/null +++ b/apps/www/registry/default/examples/text-demo.tsx @@ -0,0 +1,68 @@ +import { Text } from "@/registry/default/ui/text" + +export default function TextDemo() { + return ( +
    + The Joke Tax Chronicles + + Once upon a time, in a far-off land, there was a very lazy king who + spent all day lounging on his throne. One day, his advisors came to him + with a problem: the kingdom was running out of money. + + The King's Plan + + The king thought long and hard, and finally came up with{" "} + + a brilliant plan + + : he would tax the jokes in the kingdom. + + + "After all," he said, "everyone enjoys a good joke, so it's only fair + that they should pay for the privilege." + + The Joke Tax + + The king's subjects were not amused. They grumbled and complained, but + the king was firm: + + +
  • 1st level of puns: 5 gold coins
  • +
  • 2nd level of jokes: 10 gold coins
  • +
  • 3rd level of one-liners : 20 gold coins
  • +
    + + 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 Jokester. + + Jokester's Revolt + + 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. + + + 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. + + The People's Rebellion + + The people of the kingdom, feeling uplifted by the laughter, started to + tell jokes and puns again, and soon the entire kingdom was in on the + joke. + + + The king, seeing how much happier his subjects were, realized the error + of his ways and repealed the joke tax. Jokester was declared a hero, and + the kingdom lived happily ever after. + + + The moral of the story is: never underestimate the power of a good laugh + and always be careful of bad ideas. + +
    + ) +} diff --git a/apps/www/registry/default/examples/typography-blockquote.tsx b/apps/www/registry/default/examples/typography-blockquote.tsx deleted file mode 100644 index 21712995c0f..00000000000 --- a/apps/www/registry/default/examples/typography-blockquote.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyBlockquote() { - return ( -
    - "After all," he said, "everyone enjoys a good joke, so it's only fair that - they should pay for the privilege." -
    - ) -} diff --git a/apps/www/registry/default/examples/typography-demo.tsx b/apps/www/registry/default/examples/typography-demo.tsx deleted file mode 100644 index dfc6deebd50..00000000000 --- a/apps/www/registry/default/examples/typography-demo.tsx +++ /dev/null @@ -1,119 +0,0 @@ -export default function TypographyDemo() { - return ( -
    -

    - The Joke Tax Chronicles -

    -

    - Once upon a time, in a far-off land, there was a very lazy king who - spent all day lounging on his throne. One day, his advisors came to him - with a problem: the kingdom was running out of money. -

    -

    - The King's Plan -

    -

    - The king thought long and hard, and finally came up with{" "} - - a brilliant plan - - : he would tax the jokes in the kingdom. -

    -
    - "After all," he said, "everyone enjoys a good joke, so it's only fair - that they should pay for the privilege." -
    -

    - The Joke Tax -

    -

    - The king's subjects were not amused. They grumbled and complained, but - the king was firm: -

    -
      -
    • 1st level of puns: 5 gold coins
    • -
    • 2nd level of jokes: 10 gold coins
    • -
    • 3rd level of one-liners : 20 gold coins
    • -
    -

    - 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 Jokester. -

    -

    - Jokester's Revolt -

    -

    - 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. -

    -

    - 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. -

    -

    - The People's Rebellion -

    -

    - The people of the kingdom, feeling uplifted by the laughter, started to - tell jokes and puns again, and soon the entire kingdom was in on the - joke. -

    -
    - - - - - - - - - - - - - - - - - - - - - -
    - King's Treasury - - People's happiness -
    - Empty - - Overflowing -
    - Modest - - Satisfied -
    - Full - - Ecstatic -
    -
    -

    - The king, seeing how much happier his subjects were, realized the error - of his ways and repealed the joke tax. Jokester was declared a hero, and - the kingdom lived happily ever after. -

    -

    - The moral of the story is: never underestimate the power of a good laugh - and always be careful of bad ideas. -

    -
    - ) -} diff --git a/apps/www/registry/default/examples/typography-h1.tsx b/apps/www/registry/default/examples/typography-h1.tsx deleted file mode 100644 index 0ee8f5dd4b7..00000000000 --- a/apps/www/registry/default/examples/typography-h1.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH1() { - return ( -

    - Taxing Laughter: The Joke Tax Chronicles -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-h2.tsx b/apps/www/registry/default/examples/typography-h2.tsx deleted file mode 100644 index ea794416542..00000000000 --- a/apps/www/registry/default/examples/typography-h2.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH2() { - return ( -

    - The People of the Kingdom -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-h3.tsx b/apps/www/registry/default/examples/typography-h3.tsx deleted file mode 100644 index 4e8a1859cf5..00000000000 --- a/apps/www/registry/default/examples/typography-h3.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH3() { - return ( -

    - The Joke Tax -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-h4.tsx b/apps/www/registry/default/examples/typography-h4.tsx deleted file mode 100644 index 583516625ea..00000000000 --- a/apps/www/registry/default/examples/typography-h4.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH4() { - return ( -

    - People stopped telling jokes -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-inline-code.tsx b/apps/www/registry/default/examples/typography-inline-code.tsx deleted file mode 100644 index fbbc96ba688..00000000000 --- a/apps/www/registry/default/examples/typography-inline-code.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyInlineCode() { - return ( - - @radix-ui/react-alert-dialog - - ) -} diff --git a/apps/www/registry/default/examples/typography-large.tsx b/apps/www/registry/default/examples/typography-large.tsx deleted file mode 100644 index 944f4478d38..00000000000 --- a/apps/www/registry/default/examples/typography-large.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function TypographyLarge() { - return
    Are you absolutely sure?
    -} diff --git a/apps/www/registry/default/examples/typography-lead.tsx b/apps/www/registry/default/examples/typography-lead.tsx deleted file mode 100644 index aac39ea29ed..00000000000 --- a/apps/www/registry/default/examples/typography-lead.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyLead() { - return ( -

    - A modal dialog that interrupts the user with important content and expects - a response. -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-list.tsx b/apps/www/registry/default/examples/typography-list.tsx deleted file mode 100644 index a814f661f0b..00000000000 --- a/apps/www/registry/default/examples/typography-list.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function TypographyList() { - return ( -
      -
    • 1st level of puns: 5 gold coins
    • -
    • 2nd level of jokes: 10 gold coins
    • -
    • 3rd level of one-liners : 20 gold coins
    • -
    - ) -} diff --git a/apps/www/registry/default/examples/typography-muted.tsx b/apps/www/registry/default/examples/typography-muted.tsx deleted file mode 100644 index 545dcfc74f1..00000000000 --- a/apps/www/registry/default/examples/typography-muted.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default function TypographyMuted() { - return ( -

    Enter your email address.

    - ) -} diff --git a/apps/www/registry/default/examples/typography-p.tsx b/apps/www/registry/default/examples/typography-p.tsx deleted file mode 100644 index 88fd4795485..00000000000 --- a/apps/www/registry/default/examples/typography-p.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyP() { - return ( -

    - The king, seeing how much happier his subjects were, realized the error of - his ways and repealed the joke tax. -

    - ) -} diff --git a/apps/www/registry/default/examples/typography-small.tsx b/apps/www/registry/default/examples/typography-small.tsx deleted file mode 100644 index 822019d1df0..00000000000 --- a/apps/www/registry/default/examples/typography-small.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default function TypographySmall() { - return ( - Email address - ) -} diff --git a/apps/www/registry/default/examples/typography-table.tsx b/apps/www/registry/default/examples/typography-table.tsx deleted file mode 100644 index 0698c475194..00000000000 --- a/apps/www/registry/default/examples/typography-table.tsx +++ /dev/null @@ -1,44 +0,0 @@ -export default function TypographyTable() { - return ( -
    - - - - - - - - - - - - - - - - - - - - - -
    - King's Treasury - - People's happiness -
    - Empty - - Overflowing -
    - Modest - - Satisfied -
    - Full - - Ecstatic -
    -
    - ) -} diff --git a/apps/www/registry/default/ui/text.tsx b/apps/www/registry/default/ui/text.tsx new file mode 100644 index 00000000000..2c54e7b6b41 --- /dev/null +++ b/apps/www/registry/default/ui/text.tsx @@ -0,0 +1,102 @@ +import * as React from "react" +import { forwardRef } from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const shared = { + p: "leading-7 [&:not(:first-child)]:mt-6", + l: "my-6 ml-6 list-disc [&>li]:mt-2", +} + +const textVariants = cva("", { + defaultVariants: { variant: "p" }, + variants: { + variant: { + a: "text-primary font-medium underline underline-offset-4", + blockquote: "mt-6 border-l-2 pl-6 italic", + h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", + h2: "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", + h3: "scroll-m-20 text-2xl font-semibold tracking-tight", + h4: "scroll-m-20 text-xl font-semibold tracking-tight", + h5: shared.p, + p: shared.p, + small: "text-sm font-medium leading-none", + ul: shared.l, + ol: shared.l, + code: "bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold", + lead: "text-muted-foreground text-xl", + large: "text-lg font-semibold", + muted: "text-muted-foreground text-sm", + }, + }, +}) + +interface AnchorProps + extends React.AnchorHTMLAttributes, + VariantProps { + variant: "a" + asChild?: boolean + ref?: React.Ref +} + +interface BaseProps + extends React.HTMLAttributes, + VariantProps { + variant?: Exclude["variant"], "a"> + asChild?: boolean + ref?: React.Ref +} + +type TextProps = AnchorProps | BaseProps + +const variantToTag: Record< + NonNullable["variant"]>, + HTMLElement["tagName"] +> = { + a: "a", + blockquote: "blockquote", + h1: "h1", + h2: "h2", + h3: "h3", + h4: "h4", + h5: "h5", + p: "p", + small: "small", + code: "code", + ul: "ul", + ol: "ol", + lead: "p", + large: "div", + muted: "p", +} + +const Text = forwardRef( + (props, ref) => { + const { variant, asChild, className, ...rest } = props + const Component = asChild ? Slot : variantToTag[variant ?? "p"] + + if (variant === "a") { + return ( + + ) + } + + return ( + + ) + } +) + +Text.displayName = "Text" + +export { Text, textVariants } diff --git a/apps/www/registry/new-york/examples/text-demo.tsx b/apps/www/registry/new-york/examples/text-demo.tsx new file mode 100644 index 00000000000..e804b62f805 --- /dev/null +++ b/apps/www/registry/new-york/examples/text-demo.tsx @@ -0,0 +1,68 @@ +import { Text } from "@/registry/default/ui/text" + +export default function TextDemo() { + return ( +
    + The Joke Tax Chronicles + + Once upon a time, in a far-off land, there was a very lazy king who + spent all day lounging on his throne. One day, his advisors came to him + with a problem: the kingdom was running out of money. + + The King's Plan + + The king thought long and hard, and finally came up with{" "} + + a brilliant plan + + : he would tax the jokes in the kingdom. + + + "After all," he said, "everyone enjoys a good joke, so it's only fair + that they should pay for the privilege." + + The Joke Tax + + The king's subjects were not amused. They grumbled and complained, but + the king was firm: + + +
  • 1st level of puns: 5 gold coins
  • +
  • 2nd level of jokes: 10 gold coins
  • +
  • 3rd level of one-liners : 20 gold coins
  • +
    + + 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 Jokester. + + Jokester's Revolt + + 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. + + + 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. + + The People's Rebellion + + The people of the kingdom, feeling uplifted by the laughter, started to + tell jokes and puns again, and soon the entire kingdom was in on the + joke. + + + The king, seeing how much happier his subjects were, realized the error + of his ways and repealed the joke tax. Jokester was declared a hero, and + the kingdom lived happily ever after. + + + The moral of the story is: never underestimate the power of a good laugh + and always be careful of bad ideas. + +
    + ) +} diff --git a/apps/www/registry/new-york/examples/typography-blockquote.tsx b/apps/www/registry/new-york/examples/typography-blockquote.tsx deleted file mode 100644 index 21712995c0f..00000000000 --- a/apps/www/registry/new-york/examples/typography-blockquote.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyBlockquote() { - return ( -
    - "After all," he said, "everyone enjoys a good joke, so it's only fair that - they should pay for the privilege." -
    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-demo.tsx b/apps/www/registry/new-york/examples/typography-demo.tsx deleted file mode 100644 index dfc6deebd50..00000000000 --- a/apps/www/registry/new-york/examples/typography-demo.tsx +++ /dev/null @@ -1,119 +0,0 @@ -export default function TypographyDemo() { - return ( -
    -

    - The Joke Tax Chronicles -

    -

    - Once upon a time, in a far-off land, there was a very lazy king who - spent all day lounging on his throne. One day, his advisors came to him - with a problem: the kingdom was running out of money. -

    -

    - The King's Plan -

    -

    - The king thought long and hard, and finally came up with{" "} - - a brilliant plan - - : he would tax the jokes in the kingdom. -

    -
    - "After all," he said, "everyone enjoys a good joke, so it's only fair - that they should pay for the privilege." -
    -

    - The Joke Tax -

    -

    - The king's subjects were not amused. They grumbled and complained, but - the king was firm: -

    -
      -
    • 1st level of puns: 5 gold coins
    • -
    • 2nd level of jokes: 10 gold coins
    • -
    • 3rd level of one-liners : 20 gold coins
    • -
    -

    - 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 Jokester. -

    -

    - Jokester's Revolt -

    -

    - 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. -

    -

    - 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. -

    -

    - The People's Rebellion -

    -

    - The people of the kingdom, feeling uplifted by the laughter, started to - tell jokes and puns again, and soon the entire kingdom was in on the - joke. -

    -
    - - - - - - - - - - - - - - - - - - - - - -
    - King's Treasury - - People's happiness -
    - Empty - - Overflowing -
    - Modest - - Satisfied -
    - Full - - Ecstatic -
    -
    -

    - The king, seeing how much happier his subjects were, realized the error - of his ways and repealed the joke tax. Jokester was declared a hero, and - the kingdom lived happily ever after. -

    -

    - The moral of the story is: never underestimate the power of a good laugh - and always be careful of bad ideas. -

    -
    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-h1.tsx b/apps/www/registry/new-york/examples/typography-h1.tsx deleted file mode 100644 index 0ee8f5dd4b7..00000000000 --- a/apps/www/registry/new-york/examples/typography-h1.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH1() { - return ( -

    - Taxing Laughter: The Joke Tax Chronicles -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-h2.tsx b/apps/www/registry/new-york/examples/typography-h2.tsx deleted file mode 100644 index ea794416542..00000000000 --- a/apps/www/registry/new-york/examples/typography-h2.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH2() { - return ( -

    - The People of the Kingdom -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-h3.tsx b/apps/www/registry/new-york/examples/typography-h3.tsx deleted file mode 100644 index 4e8a1859cf5..00000000000 --- a/apps/www/registry/new-york/examples/typography-h3.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH3() { - return ( -

    - The Joke Tax -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-h4.tsx b/apps/www/registry/new-york/examples/typography-h4.tsx deleted file mode 100644 index 583516625ea..00000000000 --- a/apps/www/registry/new-york/examples/typography-h4.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyH4() { - return ( -

    - People stopped telling jokes -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-inline-code.tsx b/apps/www/registry/new-york/examples/typography-inline-code.tsx deleted file mode 100644 index fbbc96ba688..00000000000 --- a/apps/www/registry/new-york/examples/typography-inline-code.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function TypographyInlineCode() { - return ( - - @radix-ui/react-alert-dialog - - ) -} diff --git a/apps/www/registry/new-york/examples/typography-large.tsx b/apps/www/registry/new-york/examples/typography-large.tsx deleted file mode 100644 index 944f4478d38..00000000000 --- a/apps/www/registry/new-york/examples/typography-large.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function TypographyLarge() { - return
    Are you absolutely sure?
    -} diff --git a/apps/www/registry/new-york/examples/typography-lead.tsx b/apps/www/registry/new-york/examples/typography-lead.tsx deleted file mode 100644 index aac39ea29ed..00000000000 --- a/apps/www/registry/new-york/examples/typography-lead.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyLead() { - return ( -

    - A modal dialog that interrupts the user with important content and expects - a response. -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-list.tsx b/apps/www/registry/new-york/examples/typography-list.tsx deleted file mode 100644 index a814f661f0b..00000000000 --- a/apps/www/registry/new-york/examples/typography-list.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function TypographyList() { - return ( -
      -
    • 1st level of puns: 5 gold coins
    • -
    • 2nd level of jokes: 10 gold coins
    • -
    • 3rd level of one-liners : 20 gold coins
    • -
    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-muted.tsx b/apps/www/registry/new-york/examples/typography-muted.tsx deleted file mode 100644 index 545dcfc74f1..00000000000 --- a/apps/www/registry/new-york/examples/typography-muted.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default function TypographyMuted() { - return ( -

    Enter your email address.

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-p.tsx b/apps/www/registry/new-york/examples/typography-p.tsx deleted file mode 100644 index 88fd4795485..00000000000 --- a/apps/www/registry/new-york/examples/typography-p.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export default function TypographyP() { - return ( -

    - The king, seeing how much happier his subjects were, realized the error of - his ways and repealed the joke tax. -

    - ) -} diff --git a/apps/www/registry/new-york/examples/typography-small.tsx b/apps/www/registry/new-york/examples/typography-small.tsx deleted file mode 100644 index 822019d1df0..00000000000 --- a/apps/www/registry/new-york/examples/typography-small.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export default function TypographySmall() { - return ( - Email address - ) -} diff --git a/apps/www/registry/new-york/examples/typography-table.tsx b/apps/www/registry/new-york/examples/typography-table.tsx deleted file mode 100644 index 0698c475194..00000000000 --- a/apps/www/registry/new-york/examples/typography-table.tsx +++ /dev/null @@ -1,44 +0,0 @@ -export default function TypographyTable() { - return ( -
    - - - - - - - - - - - - - - - - - - - - - -
    - King's Treasury - - People's happiness -
    - Empty - - Overflowing -
    - Modest - - Satisfied -
    - Full - - Ecstatic -
    -
    - ) -} diff --git a/apps/www/registry/new-york/ui/text.tsx b/apps/www/registry/new-york/ui/text.tsx new file mode 100644 index 00000000000..2c54e7b6b41 --- /dev/null +++ b/apps/www/registry/new-york/ui/text.tsx @@ -0,0 +1,102 @@ +import * as React from "react" +import { forwardRef } from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const shared = { + p: "leading-7 [&:not(:first-child)]:mt-6", + l: "my-6 ml-6 list-disc [&>li]:mt-2", +} + +const textVariants = cva("", { + defaultVariants: { variant: "p" }, + variants: { + variant: { + a: "text-primary font-medium underline underline-offset-4", + blockquote: "mt-6 border-l-2 pl-6 italic", + h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", + h2: "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", + h3: "scroll-m-20 text-2xl font-semibold tracking-tight", + h4: "scroll-m-20 text-xl font-semibold tracking-tight", + h5: shared.p, + p: shared.p, + small: "text-sm font-medium leading-none", + ul: shared.l, + ol: shared.l, + code: "bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold", + lead: "text-muted-foreground text-xl", + large: "text-lg font-semibold", + muted: "text-muted-foreground text-sm", + }, + }, +}) + +interface AnchorProps + extends React.AnchorHTMLAttributes, + VariantProps { + variant: "a" + asChild?: boolean + ref?: React.Ref +} + +interface BaseProps + extends React.HTMLAttributes, + VariantProps { + variant?: Exclude["variant"], "a"> + asChild?: boolean + ref?: React.Ref +} + +type TextProps = AnchorProps | BaseProps + +const variantToTag: Record< + NonNullable["variant"]>, + HTMLElement["tagName"] +> = { + a: "a", + blockquote: "blockquote", + h1: "h1", + h2: "h2", + h3: "h3", + h4: "h4", + h5: "h5", + p: "p", + small: "small", + code: "code", + ul: "ul", + ol: "ol", + lead: "p", + large: "div", + muted: "p", +} + +const Text = forwardRef( + (props, ref) => { + const { variant, asChild, className, ...rest } = props + const Component = asChild ? Slot : variantToTag[variant ?? "p"] + + if (variant === "a") { + return ( + + ) + } + + return ( + + ) + } +) + +Text.displayName = "Text" + +export { Text, textVariants } diff --git a/apps/www/registry/registry-examples.ts b/apps/www/registry/registry-examples.ts index fde9da6d44e..cd3b7d820d9 100644 --- a/apps/www/registry/registry-examples.ts +++ b/apps/www/registry/registry-examples.ts @@ -1403,141 +1403,11 @@ export const examples: Registry = [ ], }, { - name: "typography-blockquote", + name: "text-demo", type: "registry:example", files: [ { - path: "examples/typography-blockquote.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-demo", - type: "registry:example", - files: [ - { - path: "examples/typography-demo.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-h1", - type: "registry:example", - files: [ - { - path: "examples/typography-h1.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-h2", - type: "registry:example", - files: [ - { - path: "examples/typography-h2.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-h3", - type: "registry:example", - files: [ - { - path: "examples/typography-h3.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-h4", - type: "registry:example", - files: [ - { - path: "examples/typography-h4.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-inline-code", - type: "registry:example", - files: [ - { - path: "examples/typography-inline-code.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-large", - type: "registry:example", - files: [ - { - path: "examples/typography-large.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-lead", - type: "registry:example", - files: [ - { - path: "examples/typography-lead.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-list", - type: "registry:example", - files: [ - { - path: "examples/typography-list.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-muted", - type: "registry:example", - files: [ - { - path: "examples/typography-muted.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-p", - type: "registry:example", - files: [ - { - path: "examples/typography-p.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-small", - type: "registry:example", - files: [ - { - path: "examples/typography-small.tsx", - type: "registry:example", - }, - ], - }, - { - name: "typography-table", - type: "registry:example", - files: [ - { - path: "examples/typography-table.tsx", + path: "examples/text-demo.tsx", type: "registry:example", }, ],