;
+
+export const Default: Story = {
+ args: {
+ text: 'The quick brown fox jumps over the lazy dog.',
+ },
+};
+
+const introCode = `
+
+
+
+
+
+
+`;
+
+export const _DocsIntro: Story = {
+ tags: ['!dev'],
+ parameters: {
+ docs: {
+ source: { code: introCode },
+ },
+ },
+ render: () => ({
+ components: { Text },
+ template: introCode,
+ }),
+};
+
+export const Variants: Story = {
+ argTypes: {
+ variant: { control: { disable: true } },
+ text: { control: { disable: true } },
+ },
+ parameters: {
+ docs: {
+ source: {
+ code: `
+
+
+
+
+
+
+
+ `,
+ },
+ },
+ },
+ render: (args) => ({
+ components: { Text },
+ setup() {
+ const sharedProps = computed(() => {
+ const { variant, text, ...rest } = args;
+ return rest;
+ });
+ return { sharedProps };
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+ `,
+ }),
+};
+
+export const Sizes: Story = {
+ argTypes: {
+ size: { control: { disable: true } },
+ text: { control: { disable: true } },
+ },
+ parameters: {
+ docs: {
+ source: {
+ code: `
+
+
+
+ `,
+ },
+ },
+ },
+ render: (args) => ({
+ components: { Text },
+ setup() {
+ const sharedProps = computed(() => {
+ const { size, text, ...rest } = args;
+ return rest;
+ });
+ return { sharedProps };
+ },
+ template: `
+
+
+
+
+
+ `,
+ }),
+};
+
+const inlineCode = `
+Default with strong and subtle inline
+`;
+
+export const _InlineDocs: Story = {
+ tags: ['!dev'],
+ parameters: {
+ docs: {
+ source: { code: inlineCode },
+ },
+ },
+ render: () => ({
+ components: { Text },
+ template: inlineCode,
+ }),
+};
+
+const paragraphCode = `
+
+ This is a paragraph of default text that could appear inside a widget or table description.
+ This is a subtle paragraph, useful for secondary information or metadata.
+
+`;
+
+export const _AsParagraph: Story = {
+ tags: ['!dev'],
+ parameters: {
+ docs: {
+ source: { code: paragraphCode },
+ },
+ },
+ render: () => ({
+ components: { Text },
+ template: paragraphCode,
+ }),
+};
diff --git a/resources/js/stories/docs/Text.mdx b/resources/js/stories/docs/Text.mdx
new file mode 100644
index 0000000000..62235424cd
--- /dev/null
+++ b/resources/js/stories/docs/Text.mdx
@@ -0,0 +1,27 @@
+import { Canvas, Meta, ArgTypes } from '@storybook/addon-docs/blocks';
+import * as TextStories from '../Text.stories';
+
+
+
+# Text
+A utility component for styling inline and block text with consistent variants and sizes. Useful inside tables, widgets, cards, and anywhere you need to quickly apply text styles without reaching for utility classes.
+
+
+## Variants
+Use the `variant` prop to control the visual style of the text.
+
+
+## Sizes
+Use the `size` prop to control the text size.
+
+
+## Inline Composition
+Since `Text` renders as a `span` by default, you can nest variants inline.
+
+
+## As Paragraph
+Use the `as` prop to render as a `p` or any other element.
+
+
+## Arguments
+