The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Make twenty-ui documentation consistent (#28198)
Raphaël Bosi075fbca34e88
diff --git a/packages/twenty-docs/scripts/check-ui-story-embeds.mts b/packages/twenty-docs/scripts/check-ui-story-embeds.mtsindex c29213da331..c377ab551dc 100644--- a/packages/twenty-docs/scripts/check-ui-story-embeds.mts+++ b/packages/twenty-docs/scripts/check-ui-story-embeds.mts@@ -35,6 +35,11 @@ const storiesWithPlayFunctions = new Set(.filter((entry) => entry.tags?.includes('play-fn')).map((entry) => entry.id),);+const displayStoryIds = new Set(+ Object.values(index.entries)+ .filter((entry) => entry.type === 'story' && entry.exportName === 'Display')+ .map((entry) => entry.id),+);const documentationRoot = fileURLToPath(new URL('..', import.meta.url));const storyErrors = new Map<string, string[]>();const getPresentationErrors = (storyId: string): string[] => {@@ -68,6 +73,11 @@ const errors = pages.flatMap((page) =>content: readFileSync(resolve(documentationRoot, page), 'utf8'),storyIds,storiesWithPlayFunctions,+ displayStoryIds,+ requireDisplay:+ (page.startsWith('ui/primitives/') ||+ page.startsWith('ui/components/')) &&+ !page.endsWith('/overview.mdx'),getPresentationErrors,}).map((error) => `${page}: ${error}`),);diff --git a/packages/twenty-docs/scripts/ui/__tests__/check-story-embeds.spec.ts b/packages/twenty-docs/scripts/ui/__tests__/check-story-embeds.spec.tsindex 3721447bb01..4f4d67bdc52 100644--- a/packages/twenty-docs/scripts/ui/__tests__/check-story-embeds.spec.ts+++ b/packages/twenty-docs/scripts/ui/__tests__/check-story-embeds.spec.ts@@ -2,13 +2,74 @@ import { describe, expect, it } from 'vitest';import { checkStoryEmbeds } from '../check-story-embeds.mjs';-const storyIds = new Set(['ui-input-input--default']);+const storyIds = new Set([+ 'ui-input-input--default',+ 'ui-input-input--display',+]);describe('checkStoryEmbeds', () => {+ it('requires a preview on a component guide', () => {+ expect(+ checkStoryEmbeds({ content: '# Input', storyIds, requireDisplay: true }),+ ).toEqual(['Component guides must include a Display story preview.']);+ });++ it('requires Display before catalogs and focused examples', () => {+ expect(+ checkStoryEmbeds({+ content: `<StoryEmbed storyId="ui-input-input--default" title="Input states" />+<StoryEmbed storyId="ui-input-input--display" title="Input example" />`,+ storyIds,+ displayStoryIds: new Set(['ui-input-input--display']),+ requireDisplay: true,+ }),+ ).toEqual([+ 'Line 1: The first component preview must use a story exported as Display.',+ ]);+ });++ it('accepts Display followed by a focused example', () => {+ expect(+ checkStoryEmbeds({+ content: `<StoryEmbed storyId="ui-input-input--display" title="Input example" />+<StoryEmbed storyId="ui-input-input--default" title="Input states" />`,+ storyIds,+ displayStoryIds: new Set(['ui-input-input--display']),+ requireDisplay: true,+ }),+ ).toEqual([]);+ });++ it('uses the story index export name rather than trusting a display suffix', () => {+ expect(+ checkStoryEmbeds({+ content:+ '<StoryEmbed storyId="ui-input-input--display" title="Input" />',+ storyIds,+ requireDisplay: true,+ }),+ ).toEqual([+ 'Line 1: The first component preview must use a story exported as Display.',+ ]);+ });++ it.each(['', 'title=""', 'title=" "', 'title={label}'])(+ 'rejects a missing or unverifiable preview title: %s',+ (title) => {+ expect(+ checkStoryEmbeds({+ content: `<StoryEmbed storyId="ui-input-input--default" ${title} />`,+ storyIds,+ }),+ ).toEqual(['Line 1: StoryEmbed needs a descriptive literal title.']);+ },+ );+it('rejects interaction stories embedded in documentation', () => {expect(checkStoryEmbeds({- content: '<StoryEmbed storyId="ui-input-input--default" />',+ content:+ '<StoryEmbed storyId="ui-input-input--default" title="Input example" />',storyIds,storiesWithPlayFunctions: new Set(['ui-input-input--default']),}),@@ -22,7 +83,7 @@ describe('checkStoryEmbeds', () => {checkStoryEmbeds({content: `<Tabs><Tab title="Preview">- <StoryEmbed storyId="ui-input-input--default" />+ <StoryEmbed storyId="ui-input-input--default" title="Input example" /></Tab></Tabs>`,storyIds,@@ -45,7 +106,7 @@ describe('checkStoryEmbeds', () => {'<StoryEmbed />','<StoryEmbed storyId={selectedStory} />','<StoryEmbed storyId="" />',- '<StoryEmbed storyId="ui-input-input--default" {...props} />',+ '<StoryEmbed storyId="ui-input-input--default" title="Input example" {...props} />',])('rejects an unverifiable story ID in %s', (content) => {expect(checkStoryEmbeds({ content, storyIds })).toEqual(['Line 1: StoryEmbed needs a literal storyId.',@@ -63,6 +124,17 @@ describe('checkStoryEmbeds', () => {).toEqual(['Line 3: Storybook story "removed-story" does not exist.']);});+ it('rejects a default import that cannot render the named StoryEmbed export', () => {+ expect(+ checkStoryEmbeds({+ content: `import StoryEmbed from '/snippets/ui/StoryEmbed.mdx';++<StoryEmbed storyId="ui-input-input--default" title="Input example" />`,+ storyIds,+ }),+ ).toEqual(['Line 1: StoryEmbed must use a named import.']);+ });+it('ignores examples and comments while parsing page metadata', () => {expect(checkStoryEmbeds({diff --git a/packages/twenty-docs/scripts/ui/check-story-embeds.mts b/packages/twenty-docs/scripts/ui/check-story-embeds.mtsindex bfd40a38755..74cad15f0ee 100644--- a/packages/twenty-docs/scripts/ui/check-story-embeds.mts+++ b/packages/twenty-docs/scripts/ui/check-story-embeds.mts@@ -1,17 +1,21 @@import { createProcessor } from '@mdx-js/mdx';import remarkFrontmatter from 'remark-frontmatter';-import { isNonEmptyString } from '@sniptt/guards';+import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';import { visit } from 'unist-util-visit';export const checkStoryEmbeds = ({content,storyIds,storiesWithPlayFunctions = new Set<string>(),+ displayStoryIds = new Set<string>(),+ requireDisplay = false,getPresentationErrors = () => [],}: {content: string;storyIds: Set<string>;storiesWithPlayFunctions?: Set<string>;+ displayStoryIds?: Set<string>;+ requireDisplay?: boolean;getPresentationErrors?: (storyId: string) => string[];}): string[] => {const errors: string[] = [];@@ -19,6 +23,10 @@ export const checkStoryEmbeds = ({remarkPlugins: [remarkFrontmatter],}).parse(content);const embedNames = new Set(['StoryEmbed']);+ const previewNodes: Extract<+ (typeof tree.children)[number],+ { type: 'mdxJsxFlowElement' | 'mdxJsxTextElement' }+ >[] = [];visit(tree, 'mdxjsEsm', (node) => {for (const statement of node.data?.estree?.body ?? []) {@@ -30,12 +38,19 @@ export const checkStoryEmbeds = ({}for (const specifier of statement.specifiers) {+ const isDefaultEmbed = specifier.type === 'ImportDefaultSpecifier';const isNamedEmbed =specifier.type === 'ImportSpecifier' &&specifier.imported.type === 'Identifier' &&specifier.imported.name === 'StoryEmbed';- if (specifier.type === 'ImportDefaultSpecifier' || isNamedEmbed) {+ if (isDefaultEmbed) {+ errors.push(+ `Line ${node.position?.start.line}: StoryEmbed must use a named import.`,+ );+ }++ if (isDefaultEmbed || isNamedEmbed) {embedNames.add(specifier.local.name);}}@@ -51,6 +66,10 @@ export const checkStoryEmbeds = ({return;}+ previewNodes.push(node);+ });++ for (const node of previewNodes) {const storyId = node.attributes.find((attribute) =>attribute.type === 'mdxJsxAttribute' && attribute.name === 'storyId',@@ -58,6 +77,7 @@ export const checkStoryEmbeds = ({const value =storyId?.type === 'mdxJsxAttribute' ? storyId.value : undefined;const line = node.position?.start.line;+ const isFirstPreview = node === previewNodes[0];const hasSpreadAttributes = node.attributes.some((attribute) => attribute.type === 'mdxJsxExpressionAttribute',@@ -65,25 +85,48 @@ export const checkStoryEmbeds = ({if (!isNonEmptyString(value) || hasSpreadAttributes) {errors.push(`Line ${line}: StoryEmbed needs a literal storyId.`);- return;+ continue;}if (!storyIds.has(value)) {errors.push(`Line ${line}: Storybook story "${value}" does not exist.`);- return;+ continue;+ }++ if (requireDisplay && isFirstPreview && !displayStoryIds.has(value)) {+ errors.push(+ `Line ${line}: The first component preview must use a story exported as Display.`,+ );+ }++ const title = node.attributes.find(+ (attribute) =>+ attribute.type === 'mdxJsxAttribute' && attribute.name === 'title',+ );+ const titleValue =+ title?.type === 'mdxJsxAttribute' ? title.value : undefined;++ if (!isNonEmptyString(titleValue) || !isNonEmptyString(titleValue.trim())) {+ errors.push(+ `Line ${line}: StoryEmbed needs a descriptive literal title.`,+ );}if (storiesWithPlayFunctions.has(value)) {errors.push(`Line ${line}: Storybook story "${value}" has a play function. Documentation stories must be presentational.`,);- return;+ continue;}for (const error of getPresentationErrors(value)) {errors.push(`Line ${line}: Storybook story "${value}": ${error}`);}- });+ }++ if (requireDisplay && !isNonEmptyArray(previewNodes)) {+ errors.push('Component guides must include a Display story preview.');+ }return errors;};diff --git a/packages/twenty-docs/snippets/ui/StoryEmbed.mdx b/packages/twenty-docs/snippets/ui/StoryEmbed.mdxindex 011f326cce3..50a404a0861 100644--- a/packages/twenty-docs/snippets/ui/StoryEmbed.mdx+++ b/packages/twenty-docs/snippets/ui/StoryEmbed.mdx@@ -1,4 +1,4 @@-export const StoryEmbed = ({ storyId, title, height = 240 }) => (+export const StoryEmbed = ({ storyId, title, height = 120 }) => (<><Tabs><Tab title="Light">@@ -8,6 +8,7 @@ export const StoryEmbed = ({ storyId, title, height = 240 }) => (width="100%"height={height}loading="lazy"+ allow="clipboard-write"style={{ border: 0 }}/></Tab>@@ -18,6 +19,7 @@ export const StoryEmbed = ({ storyId, title, height = 240 }) => (width="100%"height={height}loading="lazy"+ allow="clipboard-write"style={{ border: 0 }}/></Tab>diff --git a/packages/twenty-docs/snippets/ui/generated/testing/grouped-catalog.mdx b/packages/twenty-docs/snippets/ui/generated/testing/grouped-catalog.mdxnew file mode 100644index 00000000000..4eab530a165--- /dev/null+++ b/packages/twenty-docs/snippets/ui/generated/testing/grouped-catalog.mdx@@ -0,0 +1,20 @@+{/*+ * _____ _+ *|_ _|_ _____ _ __ | |_ _ _+ * | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file+ * | | \ V V / __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten+ * |_| \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs+ * |___/+ *+ * This file is generated from the documentation data in packages/twenty-ui/generated.+ * To update it, edit the component prop types or design tokens in twenty-ui and run:+ * npx nx generate:ui twenty-docs+ */}++<ParamField body="groups" type="{ label: string; examples: CatalogExample[]; }[]" required>+ Labeled groups of examples. Each example has a unique label within its group and can include additional data for the renderer.+</ParamField>++<ParamField body="renderExample" type="(example: CatalogExample) => ReactNode" required>+ Renders one example, including its visible label or accessible name. The layout supplies the surrounding cell and spacing.+</ParamField>diff --git a/packages/twenty-docs/ui/components/code-editor/code-editor.mdx b/packages/twenty-docs/ui/components/code-editor/code-editor.mdxindex 0fc10c453fa..317c50157a6 100644--- a/packages/twenty-docs/ui/components/code-editor/code-editor.mdx+++ b/packages/twenty-docs/ui/components/code-editor/code-editor.mdx@@ -10,11 +10,33 @@ import CodeEditorHeaderReference from '/snippets/ui/generated/components/code-ed`CodeEditor` renders a [Monaco](https://microsoft.github.io/monaco-editor/) editor that follows the Twenty theme in light and dark mode. `CodeEditorHeader` adds a bar above it for a title, tabs, or actions. Both come from `twenty-ui/components/code-editor`, a separate entry point, so the rest of Twenty UI works without Monaco.<StoryEmbed- storyId="ui-components-codeeditor--documentation"+ storyId="ui-components-codeeditor--display"title="Code editor example"height={280}/>+## Usage++```tsx+import { CodeEditor, CodeEditorHeader } from 'twenty-ui/components/code-editor';++export const WorkspaceEditor = () => (+ <>+ <CodeEditorHeader title="workspace.json" />+ <CodeEditor+ variant="with-header"+ language="json"+ defaultValue={JSON.stringify(+ { name: 'Acme', plan: 'Pro', seats: 12 },+ null,+ 2,+ )}+ height={160}+ />+ </>+);+```+## SetupInstall the editor's optional peer dependencies:@@ -27,7 +49,7 @@ The editor loads your installed `monaco-editor` package rather than a copy fromThe code editor does not run inside [front components](/developers/extend/apps/layout/front-components) yet.-## Usage+## Controlled content```tsximport { useState } from 'react';diff --git a/packages/twenty-docs/ui/components/data-display/avatar-group.mdx b/packages/twenty-docs/ui/components/data-display/avatar-group.mdxindex 97e0f3d1bea..e85ffa4f23c 100644--- a/packages/twenty-docs/ui/components/data-display/avatar-group.mdx+++ b/packages/twenty-docs/ui/components/data-display/avatar-group.mdx@@ -8,6 +8,14 @@ import AvatarGroupReference from '/snippets/ui/generated/components/data-display`AvatarGroup` receives rendered avatars and derives the hidden count. `maxVisible` counts actual avatars; the overflow indicator is additional. Eight supplied avatars with `maxVisible={3}` show three avatars and `+5`.+<StoryEmbed+ storyId="ui-data-display-avatargroup--display"+ title="Eight avatars with three visible"+ height={100}+/>++## Usage+```tsximport { AvatarGroup } from 'twenty-ui/components/data-display';import { Avatar } from 'twenty-ui/primitives/data-display';@@ -15,6 +23,9 @@ import { Avatar } from 'twenty-ui/primitives/data-display';export const TeamAvatars = () => (<AvatarGroupmaxVisible={3}+ overflowShape="circle"+ overlap="left"+ overlapOffset="4px"avatars={['Ada','Grace',@@ -25,7 +36,12 @@ export const TeamAvatars = () => ('Katherine','Joan',].map((name) => (- <Avatar key={name} name={name} imageProps={{ alt: name }} />+ <Avatar+ key={name}+ name={name}+ shape="circle"+ imageProps={{ alt: name }}+ />))}/>);@@ -33,10 +49,14 @@ export const TeamAvatars = () => (Supply stable keys to keep surviving avatars mounted when the limit, total, or display order changes. Avatars are decorative by default. When the group is the only representation of its members, supply each member's name through `imageProps.alt` to label the image and default fallback. Keep avatars decorative when visible text or an owner label already supplies that identity.+## Visual options++Compare circle and square avatars at each size. The group keeps three visible members in this comparison.+<StoryEmbed- storyId="ui-data-display-avatargroup--with-derived-overflow"- title="Eight avatars with three visible"- height={280}+ storyId="ui-data-display-avatargroup--catalog"+ title="Compare avatar shapes and sizes"+ height={850}/>## Partially loaded collections@@ -65,7 +85,7 @@ export const LoadedTeamAvatars = () => (<StoryEmbedstoryId="ui-data-display-avatargroup--partially-loaded"title="Three loaded members from a team of twenty"- height={280}+ height={100}/>## Custom overflow@@ -106,7 +126,7 @@ export const TeamAvatarsWithAction = ({<StoryEmbedstoryId="ui-data-display-avatargroup--custom-overflow"title="Custom overflow button"- height={280}+ height={100}/>## Appearancediff --git a/packages/twenty-docs/ui/components/data-display/command-block.mdx b/packages/twenty-docs/ui/components/data-display/command-block.mdxindex 93ebda25738..81ef5ec063a 100644--- a/packages/twenty-docs/ui/components/data-display/command-block.mdx+++ b/packages/twenty-docs/ui/components/data-display/command-block.mdx@@ -8,24 +8,44 @@ import CommandBlockReference from '/snippets/ui/generated/components/data-displa`CommandBlock` displays each supplied command with a prompt marker. It does not execute commands or provide copying automatically. Supply `actions` with any React node, such as a [Button](/ui/primitives/input/button), link or status. Command text uses `pre` and `code` semantics, preserves line breaks, and wraps within the available width. Prompt markers are decorative.+<StoryEmbed+ storyId="ui-components-data-display-commandblock--display"+ title="CommandBlock example"+ height={130}+/>++## Usage+```tsx+import { useState } from 'react';import { CommandBlock } from 'twenty-ui/components/data-display';import { Button } from 'twenty-ui/primitives/input';-export const InstallCommand = ({ onCopy }: { onCopy: () => void }) => (- <CommandBlock- commands={['yarn add twenty-ui']}- actions={<Button onClick={onCopy}>Copy command</Button>}- />-);+export const InstallCommand = () => {+ const [copyLabel, setCopyLabel] = useState('Copy command');++ return (+ <CommandBlock+ commands={['yarn add twenty-ui']}+ actions={+ <Button+ onClick={async () => {+ try {+ await navigator.clipboard.writeText('yarn add twenty-ui');+ setCopyLabel('Copied');+ } catch {+ setCopyLabel('Select and copy the command');+ }+ }}+ >+ {copyLabel}+ </Button>+ }+ />+ );+};```-<StoryEmbed- storyId="ui-components-data-display-commandblock--documentation"- title="CommandBlock example"- height={160}-/>-Native attributes, event handlers, classes, styles and refs target the outer `div`. Use `render` to compose another root, for example `render={<section aria-label="Installation commands" />}`. `CommandBlockProps` is exported from `twenty-ui/components/data-display`.When migrating, replace `button` with `actions`.diff --git a/packages/twenty-docs/ui/components/data-display/json-tree.mdx b/packages/twenty-docs/ui/components/data-display/json-tree.mdxindex 00b0f095655..1528b0907e9 100644--- a/packages/twenty-docs/ui/components/data-display/json-tree.mdx+++ b/packages/twenty-docs/ui/components/data-display/json-tree.mdx@@ -3,10 +3,20 @@ title: JsonTreedescription: Explore JSON values with expandable nodes and custom labels.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import JsonTreeReference from '/snippets/ui/generated/components/data-display/json-tree.mdx';`JsonTree` displays either a JSON `value` or an array of named `entries`. Pass all empty-value and expand/collapse labels so your application controls the text.+<StoryEmbed+ storyId="ui-jsonvisualizer-jsontree--display"+ title="Expandable record details"+ height={320}+/>++## Usage+```tsximport { JsonTree } from 'twenty-ui/components/data-display';diff --git a/packages/twenty-docs/ui/components/data-display/metric-row.mdx b/packages/twenty-docs/ui/components/data-display/metric-row.mdxindex 80ecbeeea33..242944317a1 100644--- a/packages/twenty-docs/ui/components/data-display/metric-row.mdx+++ b/packages/twenty-docs/ui/components/data-display/metric-row.mdx@@ -9,30 +9,30 @@ import MetricRowReference from '/snippets/ui/generated/components/data-display/m`MetricRow` aligns a label, optional icon, and preformatted value. An optional [ProgressRing](/ui/primitives/feedback/progress-ring) uses the visible label as its accessible name.<StoryEmbed- storyId="ui-data-display-metricrow--default"+ storyId="ui-data-display-metricrow--display"title="Metric row example"- height={160}+ height={100}/>## Usage-Pass a nonempty text label as required children and the formatted value through `value`. Add `progress` when the metric has a known percentage.-```tsximport { MetricRow } from 'twenty-ui/components/data-display';-import { IconDatabase } from 'twenty-ui/icon';+import { IconFiles } from 'twenty-ui/icon';-export const StorageMetric = () => (+export const ImportMetric = () => (<MetricRow- startIcon={<IconDatabase size={14} />}- value="12 / 20 GB"- progress={60}+ startIcon={<IconFiles size={14} />}+ value="75 of 100"+ progress={75}>- Storage+ Imported files</MetricRow>);```+Pass a nonempty text label as required children and the formatted value through `value`. Add `progress` when the metric has a known percentage.+The application owns calculations, units, number formatting, and the meaning of the metric. `progressColor` accepts a CSS color for the filled arc.## Values without progressdiff --git a/packages/twenty-docs/ui/components/data-display/stack-icon.mdx b/packages/twenty-docs/ui/components/data-display/stack-icon.mdxindex 3dda8557fa5..b0b1e7d6c66 100644--- a/packages/twenty-docs/ui/components/data-display/stack-icon.mdx+++ b/packages/twenty-docs/ui/components/data-display/stack-icon.mdx@@ -3,10 +3,22 @@ title: StackIcondescription: A 16px icon with a smaller item stacked on its bottom-right corner.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import StackIconReference from '/snippets/ui/generated/components/data-display/stack-icon.mdx';Pass the main icon through the `icon` node slot and the stacked item through `stackedIcon`. The container is 16px wide and tall; the stacked item is positioned absolutely at 8px from the left and 7px from the top so it overflows the bottom-right corner. A 12px square avatar is the intended size for an application logo. Both nodes are decorative, so keep a visible label beside the icon.+Leave room for the stacked item's overflow when placing neighboring content. The example uses a 12px gap between the icon container and its label.++<StoryEmbed+ storyId="ui-components-data-display-stackicon--display"+ title="Company icon with a stacked logo"+ height={100}+/>++## Usage+```tsximport { StackIcon } from 'twenty-ui/components/data-display';import { IconBuildingSkyscraper } from 'twenty-ui/icon';@@ -14,7 +26,7 @@ import { Avatar } from 'twenty-ui/primitives/data-display';import { Text } from 'twenty-ui/primitives/typography';export const CompanyFieldLabel = () => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><StackIconicon={<IconBuildingSkyscraper size={16} />}stackedIcon={@@ -22,7 +34,7 @@ export const CompanyFieldLabel = () => (}/><Text>Companies</Text>- </>+ </Text>);```diff --git a/packages/twenty-docs/ui/components/data-display/tinted-icon-tile.mdx b/packages/twenty-docs/ui/components/data-display/tinted-icon-tile.mdxindex c408ab337f7..7b0bec25349 100644--- a/packages/twenty-docs/ui/components/data-display/tinted-icon-tile.mdx+++ b/packages/twenty-docs/ui/components/data-display/tinted-icon-tile.mdx@@ -3,20 +3,30 @@ title: TintedIconTiledescription: An icon on a tinted background derived from a theme color.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import TintedIconTileReference from '/snippets/ui/generated/components/data-display/tinted-icon-tile.mdx';Pass icon content through the lowercase `icon` node slot. The tile derives its background and inherited foreground color from the theme palette. Icon content is decorative. Keep a visible label beside it, or give the root `role="img"` and an accessible name for a standalone labeled image.+<StoryEmbed+ storyId="ui-components-data-display-tintedicontile--display"+ title="Company icon on a tinted tile"+ height={100}+/>++## Usage+```tsximport { TintedIconTile } from 'twenty-ui/components/data-display';import { IconBuildingSkyscraper } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';export const CompanyLabel = () => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><TintedIconTile icon={<IconBuildingSkyscraper size={16} />} color="blue" /><Text>Companies</Text>- </>+ </Text>);```diff --git a/packages/twenty-docs/ui/components/feedback/callout.mdx b/packages/twenty-docs/ui/components/feedback/callout.mdxindex 7ff94a0395a..16aef657ea3 100644--- a/packages/twenty-docs/ui/components/feedback/callout.mdx+++ b/packages/twenty-docs/ui/components/feedback/callout.mdx@@ -8,6 +8,39 @@ import CalloutReference from '/snippets/ui/generated/components/feedback/callout`Callout` combines title, description, icon, and action nodes. Use `status` for `neutral`, `info`, `success`, `warning`, or `error`. It defaults to `info` and supports the `soft` appearance. The status selects a gray, blue, green, orange, or red palette; `color` overrides that palette without changing the meaning.+<StoryEmbed+ storyId="ui-feedback-callout--display"+ title="Callout example"+ height={230}+/>++## Usage++```tsx+import { Callout } from 'twenty-ui/components/feedback';++export const WorkflowNotice = () => (+ <Callout+ status="neutral"+ title="This form will appear in workflow runs."+ description="Because this workflow is not using a manual trigger, the form will not open on top of the interface. To fill it, open the corresponding workflow run and complete the form there."+ action={<Callout.Action>Learn more</Callout.Action>}+ />+);+```++## Visual options++Compare semantic statuses using the same content. Choose a status for the message meaning, and override color only when the surrounding design requires it.++<StoryEmbed+ storyId="ui-feedback-callout--catalog"+ title="Callout feedback statuses"+ height={1010}+/>++## Dismissible notice+```tsximport { useState } from 'react';import { Callout } from 'twenty-ui/components/feedback';@@ -26,9 +59,7 @@ export const ImportNotice = ({ onReview }: { onReview: () => void }) => {description="Review the missing email addresses before importing."icon={<IconAlertTriangle size={16} aria-hidden="true" />}action={- <Callout.Action onClick={onReview}>- Review records- </Callout.Action>+ <Callout.Action onClick={onReview}>Review records</Callout.Action>}onDismiss={() => setIsVisible(false)}closeLabel="Dismiss import notice"@@ -56,12 +87,6 @@ The component adds no live-region role or announcements. Supply native `role`, `Replace the previous semantic `variant` with `status`, and constructor `Icon` with an `icon` node. Replace `{ label, onClick }` action objects with `Callout.Action` or custom controls. Replace `isClosable` and `onClose` with `onDismiss`, and conditionally render the callout in the caller when dismissal should hide it. Existing translated content and action labels stay in the application.-<StoryEmbed- storyId="ui-feedback-callout--default"- title="Callout example"- height={280}-/>-## Props<CalloutReference />diff --git a/packages/twenty-docs/ui/components/feedback/inline-banner.mdx b/packages/twenty-docs/ui/components/feedback/inline-banner.mdxindex c40a09cdeb2..5c6c53bdee3 100644--- a/packages/twenty-docs/ui/components/feedback/inline-banner.mdx+++ b/packages/twenty-docs/ui/components/feedback/inline-banner.mdx@@ -8,28 +8,32 @@ import InlineBannerReference from '/snippets/ui/generated/components/feedback/in`InlineBanner` composes [Banner](/ui/primitives/feedback/banner) with a rounded inline layout and a decorative information icon. It shares Banner's independent `status`, `variant`, `color`, `icon` and `action` contracts. Its default appearance is `soft` and its default status is `info`.-The `standard` layout fills the available width. Plain string children truncate, with keyboard focus, pointer hover or touch revealing the full string in a tooltip. Rich node children render directly, so embedded links and controls retain their own semantics. Compose explicit typography when rich content needs truncation.+<StoryEmbed+ storyId="ui-feedback-inlinebanner--display"+ title="Inline banner with an action"+ height={130}+/>++## Usage```tsximport { InlineBanner } from 'twenty-ui/components/feedback';-export const SyncBanner = ({ onRetry }: { onRetry: () => void }) => (+export const ModelsBanner = ({ onConfigure }: { onConfigure: () => void }) => (<InlineBannerstatus="error"action={- <InlineBanner.Action onClick={onRetry}>Retry sync</InlineBanner.Action>+ <InlineBanner.Action onClick={onConfigure}>+ Configure models+ </InlineBanner.Action>}>- Contact sync could not finish.+ No AI models are enabled.</InlineBanner>);```-<StoryEmbed- storyId="ui-feedback-inlinebanner--default"- title="Inline banner with an action"- height={280}-/>+The `standard` layout fills the available width. Plain string children truncate, with keyboard focus, pointer hover or touch revealing the full string in a tooltip. Rich node children render directly, so embedded links and controls retain their own semantics. Compose explicit typography when rich content needs truncation.Use `layout="compact"` for wrapping content, closer spacing and a maximum content width of 512px. It has no bottom margin. Layout is independent of `solid` or `soft` appearance. `embedded` removes the standard layout's bottom margin.@@ -57,7 +61,7 @@ export const ConnectionBanner = () => (<StoryEmbedstoryId="ui-feedback-inlinebanner--compact-link"title="Compact banner with a destination link"- height={280}+ height={120}/>`InlineBanner.Action` provides a small outline button that inherits the banner’s displayed color, including explicit palette overrides and solid appearances. It supports Button interactions, links, refs and custom rendering. The `action` slot also accepts arbitrary controls.diff --git a/packages/twenty-docs/ui/components/feedback/toast.mdx b/packages/twenty-docs/ui/components/feedback/toast.mdxindex b40ea068b78..a05951e0df3 100644--- a/packages/twenty-docs/ui/components/feedback/toast.mdx+++ b/packages/twenty-docs/ui/components/feedback/toast.mdx@@ -11,14 +11,47 @@ import ToasterReference from '/snippets/ui/generated/components/feedback/toaster`Toast` renders one notification. Your application controls when it appears, its position, and when it is removed.-For application notifications, wrap the application in `ToastProvider`, mount a `Toaster` inside it, and use `useToast()` from descendants. Each provider owns an independent notification store, countdowns, and dismissal lifecycle. Multiple Toasters can mirror the same provider.-<StoryEmbed- storyId="ui-feedback-toast--documentation"+ storyId="ui-feedback-toast--display"title="Toast example"- height={240}+ height={120}/>+## Usage++```tsx+import { useState } from 'react';+import { Toast } from 'twenty-ui/components/feedback';+import { Button } from 'twenty-ui/primitives/input';++export const SavedNotification = () => {+ const [isOpen, setIsOpen] = useState(true);++ return (+ <>+ <Button onClick={() => setIsOpen(true)}>Show notification</Button>+ {isOpen && (+ <Toast status="success" progress={100} onClose={() => setIsOpen(false)}>+ Changes saved+ </Toast>+ )}+ </>+ );+};+```++## Visual options++Compare neutral, success, error, information, and warning feedback with the same message and progress.++<StoryEmbed+ storyId="ui-feedback-toast--catalog"+ title="Toast feedback statuses"+ height={530}+/>++For application notifications, wrap the application in `ToastProvider`, mount a `Toaster` inside it, and use `useToast()` from descendants. Each provider owns an independent notification store, countdowns, and dismissal lifecycle. Multiple Toasters can mirror the same provider.+## Application notifications```tsx@@ -71,7 +104,7 @@ The provider defaults to three visible notifications. `limit` must be a positive<StoryEmbedstoryId="ui-feedback-toaster-lifecycle--documentation"title="Shared notification lifecycle"- height={450}+ height={430}/>Multiple Toasters inside a provider render the same notifications. Updates and dismissal apply to every mirror, and each notification has one shared countdown. Hover or focus inside any mirror pauses it; it resumes after all mirrors release both. Mounting another Toaster does not restart the countdown or create another callback lifecycle. Use separate providers for independent queues.@@ -87,7 +120,7 @@ Dismissed notifications are inert during exit animations. Their entries are remo<StoryEmbedstoryId="ui-feedback-toaster-lifecycle--portal-documentation"title="Scoped notification portal"- height={350}+ height={430}/>## Update a live notification@@ -151,7 +184,7 @@ The countdown defaults to 6,000 milliseconds. It pauses while the pointer is ove<StoryEmbedstoryId="ui-feedback-toaster-timing--documentation"title="Toast timing controls"- height={400}+ height={480}/>| Operation | Countdown behavior |diff --git a/packages/twenty-docs/ui/components/input/country-select.mdx b/packages/twenty-docs/ui/components/input/country-select.mdxindex 4190141fb79..2e21a2cd106 100644--- a/packages/twenty-docs/ui/components/input/country-select.mdx+++ b/packages/twenty-docs/ui/components/input/country-select.mdx@@ -9,12 +9,12 @@ import CountrySelectReference from '/snippets/ui/generated/components/input/coun`CountrySelect` combines a labeled trigger, decorative flags, country search, selected options, and an explicit no-country choice. It uses the shared Dropdown picker behavior. Your application supplies country data and translated text and decides how selected values are stored.<StoryEmbed- storyId="ui-input-countryselect--default"+ storyId="ui-input-countryselect--display"title="Country selection"height={340}/>-## Prepared choices+## UsageEach choice has a unique, non-empty `value`, a display `label`, and an optional `flag`. Values are opaque strings. They can be country names, identifiers, or codes according to your application's existing storage format. Selecting a choice reports its value unchanged.diff --git a/packages/twenty-docs/ui/components/input/currency-picker.mdx b/packages/twenty-docs/ui/components/input/currency-picker.mdxindex db2a46cb98c..1e0d2459fe3 100644--- a/packages/twenty-docs/ui/components/input/currency-picker.mdx+++ b/packages/twenty-docs/ui/components/input/currency-picker.mdx@@ -9,9 +9,9 @@ import CurrencyPickerReference from '/snippets/ui/generated/components/input/cur`CurrencyPicker` provides a compact selected currency code and searchable currency options. Import it from `twenty-ui/components` and compose it inside a [Dropdown](/ui/components/navigation/dropdown) with `type="picker"`.<StoryEmbed- storyId="ui-input-currencypicker--documentation"+ storyId="ui-input-currencypicker--display"title="Currency picker"- height={380}+ height={420}/>## Usagediff --git a/packages/twenty-docs/ui/components/input/icon-button.mdx b/packages/twenty-docs/ui/components/input/icon-button.mdxindex 7f863d45b5d..c7cba2a5105 100644--- a/packages/twenty-docs/ui/components/input/icon-button.mdx+++ b/packages/twenty-docs/ui/components/input/icon-button.mdx@@ -9,30 +9,35 @@ import IconButtonReference from '/snippets/ui/generated/components/input/icon-bu`IconButton` composes [Button](/ui/primitives/input/button) with a square or round surface. Pass the icon as children and provide an accessible name with `aria-label` or `aria-labelledby`. Icon content is decorative and hidden from assistive technology.+<StoryEmbed+ storyId="ui-components-iconbutton--display"+ title="Icon button with an accessible name"+ height={110}+/>+## Usage```tsximport { IconButton } from 'twenty-ui/components/input';-import { IconPlus } from 'twenty-ui/icon';+import { IconSearch } from 'twenty-ui/icon';-export const CreateRecordButton = () => (- <IconButton- aria-label="Create record"- variant="solid"- color="accent"- size="sm"- >- <IconPlus />+export const SearchButton = () => (+ <IconButton aria-label="Search">+ <IconSearch /></IconButton>);```Sizes are `xs` (20px), `sm` (24px), and `md` (32px). The defaults are `md`, `outline`, and `neutral`. Variants and colors match Button. Use `shape="round"` for a circular button; the default shape is `square`.+## Visual options++Compare one visual choice at a time. Use the named tooltip, elevated, and grouped examples for composition.+<StoryEmbed- title="Icon button example"storyId="ui-components-iconbutton--catalog"- height={620}+ title="Icon button variants, colors, sizes, shapes, elevation, and states"+ height={810}/>## Accessible names@@ -45,21 +50,21 @@ import { IconSearch } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';export const LabelledSearchButton = () => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><Text render={<span />} id="records-search-label">Search records</Text><IconButton aria-labelledby="records-search-label" tooltip="Find a record"><IconSearch /></IconButton>- </>+ </Text>);```<StoryEmbedtitle="Icon button named by visible text"storyId="ui-components-iconbutton--labelled-by"- height={180}+ height={140}/>## Tooltip@@ -71,7 +76,7 @@ import { IconButton } from 'twenty-ui/components/input';import { IconSearch } from 'twenty-ui/icon';export const SearchRecordsButton = () => (- <IconButton aria-label="Search" tooltip="Search records" variant="ghost">+ <IconButton aria-label="Search" tooltip="Search records"><IconSearch /></IconButton>);@@ -80,7 +85,7 @@ export const SearchRecordsButton = () => (<StoryEmbedtitle="Icon button with tooltip"storyId="ui-components-iconbutton--tooltip-documentation"- height={180}+ height={140}/>The tooltip defaults to the bottom, with a 1000ms delay and a 5px offset. Use `tooltipPlace`, `tooltipDelay`, and `tooltipOffset` to adjust it. Omitting `tooltip` renders the button directly.@@ -109,7 +114,7 @@ export const AddWidgetButton = () => (<StoryEmbedtitle="Elevated icon action"storyId="ui-components-iconbutton--elevated"- height={180}+ height={100}/>Omit `elevated` or set it to `false` to restore the standard appearance. Elevated buttons support the same tooltips, loading states, links, and keyboard interactions.@@ -117,7 +122,7 @@ Omit `elevated` or set it to `false` to restore the standard appearance. Elevate<StoryEmbedtitle="Elevated icon action with tooltip"storyId="ui-components-iconbutton--elevated-tooltip"- height={180}+ height={140}/>Replace existing `FloatingIconButton` controls with `IconButton elevated`. Pass the icon as children, use native `aria-label`, and map `small` to `sm` and `medium` to `md`. Supply `size="sm"` when the previous control used its default size. Native focus and `aria-pressed` replace synthetic focus and active flags.@@ -132,11 +137,21 @@ import { IconButton } from 'twenty-ui/components/input';import { IconPlus, IconSearch } from 'twenty-ui/icon';export const RecordActions = () => (- <ButtonGroup aria-label="Record actions" size="sm" variant="outline">- <IconButton aria-label="Search records">+ <ButtonGroup+ aria-label="Record actions"+ size="sm"+ variant="solid"+ color="accent"+ >+ <IconButton+ aria-label="Search records"+ tooltip="Search records"+ variant="outline"+ color="neutral"+ ><IconSearch /></IconButton>- <IconButton aria-label="Create record">+ <IconButton aria-label="Create record" tooltip="Create record"><IconPlus /></IconButton></ButtonGroup>@@ -145,10 +160,12 @@ export const RecordActions = () => ([ButtonGroup](/ui/primitives/input/button-group) supplies defaults for size, variant, and color, plus adjoining corners. Explicit child props take precedence independently, including `size="xs"`. Individual buttons do not need a position prop.+Keep attached buttons the same size so their edges align. Set the size on the group and let each button inherit it.+<StoryEmbedstoryId="ui-components-iconbutton--grouped-overrides"title="Individual icon button appearance in a group"- height={180}+ height={140}/>## Links and forms@@ -157,10 +174,16 @@ Without a custom `render`, `href` renders an anchor unless `nativeButton` is expNative button and anchor attributes, event handlers, event details, refs, and render composition pass through to Button. The ref receives the actual root element. Tooltip composition preserves that root and its accessible name. The default is `type="button"`; set `type="submit"` explicitly for form submission.-## Props--<IconButtonReference />-## Compact and round controlsUse `size="xs"` for a 20px control and `shape="round"` for circular corners. Existing `RoundedIconButton` controls become `IconButton` with `shape="round"`, `variant="solid"`, and `color="accent"`. Map their old `small` size to `xs` and `medium` size to `sm`. Supply icon children and an accessible name.++<StoryEmbed+ storyId="ui-components-iconbutton--round-documentation"+ title="Round icon buttons in compact and regular sizes"+ height={140}+/>++## Props++<IconButtonReference />diff --git a/packages/twenty-docs/ui/components/input/image-input.mdx b/packages/twenty-docs/ui/components/input/image-input.mdxindex feab53af954..2542eb59986 100644--- a/packages/twenty-docs/ui/components/input/image-input.mdx+++ b/packages/twenty-docs/ui/components/input/image-input.mdx@@ -9,29 +9,49 @@ import ImageInputReference from '/snippets/ui/generated/components/input/image-i`ImageInput` combines an image preview, a native file picker, and upload, remove, or abort actions. `onFileSelect` fires when a file is selected. Your application validates and uploads the file, owns upload progress and cancellation, and supplies the preview URL through `src`.<StoryEmbed- storyId="ui-input-imageinput--with-helper-text"- title="Image input with an existing image"- height={180}+ storyId="ui-input-imageinput--display"+ title="Choose, preview, and remove an image"+ height={140}/>+## Usage+```tsx-import { ImageInput, type ImageInputProps } from 'twenty-ui/components/input';--export const WorkspaceImage = ({- src,- onFileSelect,- onRemove,-}: Pick<ImageInputProps, 'src' | 'onFileSelect' | 'onRemove'>) => (- <ImageInput- src={src}- onFileSelect={onFileSelect}- onRemove={onRemove}- accept="image/png, image/jpeg"- helperText="Choose a square image for your workspace."- />-);+import { useState } from 'react';+import { ImageInput } from 'twenty-ui/components/input';++export const WorkspaceImage = () => {+ const [preview, setPreview] = useState<{+ src?: string;+ reader?: FileReader;+ }>({});++ return (+ <ImageInput+ helperText="Choose a square image for your workspace."+ src={preview.src}+ onFileSelect={(file) => {+ const reader = new FileReader();+ setPreview((current) => ({ src: current.src, reader }));+ reader.onload = () => {+ setPreview((current) => {+ if (current.reader !== reader) {+ return current;+ }++ return { src: reader.result?.toString() };+ });+ };+ reader.readAsDataURL(file);+ }}+ onRemove={() => setPreview({})}+ />+ );+};```+The example keeps the current preview while reading a replacement and ignores reads from removed or superseded selections.+## Selection and previewThe preview and Upload button open the same native file picker. `onFileSelect` receives the selected `File`; it does not start an upload itself. Canceling or returning an empty selection leaves the current image unchanged. The file input clears after selection so the same file can be selected again, and the callback's `File` remains usable.@@ -61,7 +81,7 @@ Native `required` validation still sees an empty input after selection because t<StoryEmbedstoryId="ui-input-imageinput--uploading"title="Image upload with an abort action"- height={180}+ height={140}/>## Labels, instructions, and errors@@ -73,7 +93,7 @@ Supply localized `uploadLabel`, `removeLabel`, and `abortLabel` strings. They de<StoryEmbedstoryId="ui-input-imageinput--with-error"title="Image input with instructions and an error"- height={200}+ height={160}/>## Migration@@ -87,12 +107,7 @@ export const WorkspaceImageSelector = ({uploadImage,}: {uploadImage: (file: File) => void;-}) => (- <ImageInput- onFileSelect={uploadImage}- accept="image/png, image/jpeg"- />-);+}) => <ImageInput onFileSelect={uploadImage} accept="image/png, image/jpeg" />;```## Propsdiff --git a/packages/twenty-docs/ui/components/input/light-button.mdx b/packages/twenty-docs/ui/components/input/light-button.mdxindex 5b284225138..a8b40e7c1fc 100644--- a/packages/twenty-docs/ui/components/input/light-button.mdx+++ b/packages/twenty-docs/ui/components/input/light-button.mdx@@ -12,16 +12,34 @@ Use the shared `LightButton` component for a lightweight action. It composesfont weight, and no elevation.<StoryEmbed- storyId="ui-components-lightbutton--default"+ storyId="ui-components-lightbutton--display"title="LightButton example"- height={240}+ height={100}+/>++## Usage++```tsx+import { LightButton } from 'twenty-ui/components/input';++export const FilterAction = () => <LightButton>Add filter</LightButton>;+```++## Visual options++Compare standard and subtle emphasis across common action states.++<StoryEmbed+ storyId="ui-components-lightbutton--catalog"+ title="Light button emphasis and states"+ height={230}/>## State ownership`LightButton` uses Button's state model and adds no state of its own. Your application supplies `loading` and `disabled`; `emphasis` only changes appearance. See [Button's state ownership example](/ui/primitives/input/button#state-ownership) for managing an asynchronous action. There are no controlled and uncontrolled selection modes.-## Usage+## Emphasis and icons```tsximport { LightButton } from 'twenty-ui/components/input';diff --git a/packages/twenty-docs/ui/components/input/light-icon-button.mdx b/packages/twenty-docs/ui/components/input/light-icon-button.mdxindex fb0dbcaa787..e2637a63303 100644--- a/packages/twenty-docs/ui/components/input/light-icon-button.mdx+++ b/packages/twenty-docs/ui/components/input/light-icon-button.mdx@@ -9,26 +9,36 @@ import LightIconButtonReference from '/snippets/ui/generated/components/input/li`LightIconButton` composes [IconButton](/ui/components/input/icon-button) with a ghost surface and a small size. Supply an accessible name and decorative icon content.<StoryEmbed- storyId="ui-input-button-lighticonbutton--documentation"+ storyId="ui-input-button-lighticonbutton--display"title="Light icon button"- height={240}+ height={100}/>## Usage```tsximport { LightIconButton } from 'twenty-ui/components/input';-import { IconPlus } from 'twenty-ui/icon';+import { IconSearch } from 'twenty-ui/icon';-export const AddAction = () => (- <LightIconButton aria-label="Add record" emphasis="subtle">- <IconPlus />+export const SearchAction = () => (+ <LightIconButton aria-label="Search">+ <IconSearch /></LightIconButton>);```Standard emphasis uses secondary neutral text; subtle emphasis uses tertiary text. Explicit child appearance takes precedence over ButtonGroup values, followed by the component defaults. Semantic colors retain their own contrast treatment. Small controls are 24px with a 14px icon; medium controls are 32px with a 16px icon. Compact controls use `size="xs"` and are 20px.+## Visual options++Compare emphasis at small and medium sizes, including selected, loading, and disabled states.++<StoryEmbed+ storyId="ui-input-button-lighticonbutton--catalog"+ title="Light icon button emphasis, sizes, and states"+ height={410}+/>+## State and interactionButton owns keyboard activation, disabled and loading behavior, refs, native attributes, and render composition. The native default is `type="button"`. Use `aria-pressed` for toggles and `aria-expanded` for disclosures. The application owns these states and can set `color="accent"` to highlight a selected action. Keyboard focus uses the shared focus ring.diff --git a/packages/twenty-docs/ui/components/input/main-button.mdx b/packages/twenty-docs/ui/components/input/main-button.mdxindex 60d338b9392..43b20daf8cf 100644--- a/packages/twenty-docs/ui/components/input/main-button.mdx+++ b/packages/twenty-docs/ui/components/input/main-button.mdx@@ -12,16 +12,34 @@ Use the shared `MainButton` component for a prominent action. It composestext, and 12px horizontal padding. Its default color is neutral and size is `md`.<StoryEmbed- storyId="ui-components-mainbutton--default"+ storyId="ui-components-mainbutton--display"title="MainButton example"- height={240}+ height={110}+/>++## Usage++```tsx+import { MainButton } from 'twenty-ui/components/input';++export const SaveAction = () => <MainButton>Save changes</MainButton>;+```++## Visual options++Compare solid and outline appearances across default and small sizes, plus disabled and loading states.++<StoryEmbed+ storyId="ui-components-mainbutton--catalog"+ title="Main button variants and states"+ height={230}/>## State ownership`MainButton` uses Button's state model and adds no state of its own. Your application supplies `loading` and `disabled`; there are no controlled and uncontrolled selection modes. See [Button's state ownership example](/ui/primitives/input/button#state-ownership) for managing an asynchronous action.-## Usage+## Forms and width```tsximport { MainButton } from 'twenty-ui/components/input';diff --git a/packages/twenty-docs/ui/components/input/number-stepper.mdx b/packages/twenty-docs/ui/components/input/number-stepper.mdxindex 1ad6c399f3e..26439d20bef 100644--- a/packages/twenty-docs/ui/components/input/number-stepper.mdx+++ b/packages/twenty-docs/ui/components/input/number-stepper.mdx@@ -9,9 +9,38 @@ import NumberStepperReference from '/snippets/ui/generated/components/input/numb`NumberStepper` is the compact convenience preset built from [NumberField](/ui/primitives/input/number-field). It combines a numeric text input with optional decrement and increment buttons. Import it from `twenty-ui/components/input`. Use `NumberField` when you need locale or formatting options, different modifier steps, scrubbing, or independent part composition.<StoryEmbed- storyId="ui-input-numberstepper--default"+ storyId="ui-input-numberstepper--display"title="NumberStepper example"- height={180}+ height={130}+/>++## Usage++```tsx+import { NumberStepper } from 'twenty-ui/components/input';+import { Field } from 'twenty-ui/primitives/input';++export const QuantityInput = () => (+ <Field.Root>+ <Field.Label style={{ color: 'var(--t-font-color-primary)' }}>+ Quantity+ </Field.Label>+ <NumberStepper defaultValue={3} min={0} max={10} />+ <Field.Description style={{ color: 'var(--t-font-color-secondary)' }}>+ Choose up to ten items.+ </Field.Description>+ </Field.Root>+);+```++## Visual options++Compare default, bound, disabled, read-only, and invalid states with or without step buttons.++<StoryEmbed+ storyId="ui-input-numberstepper--catalog"+ title="Number stepper bounds and states"+ height={220}/>## Uncontrolled valuediff --git a/packages/twenty-docs/ui/components/input/phone-country-picker.mdx b/packages/twenty-docs/ui/components/input/phone-country-picker.mdxindex 63d3e5ee0e7..5fe6614363f 100644--- a/packages/twenty-docs/ui/components/input/phone-country-picker.mdx+++ b/packages/twenty-docs/ui/components/input/phone-country-picker.mdx@@ -9,12 +9,12 @@ import PhoneCountryPickerReference from '/snippets/ui/generated/components/input`PhoneCountryPicker` displays a country flag trigger and searchable calling-code choices. Compose its two parts inside [Dropdown](/ui/components/navigation/dropdown). Your application supplies country data, owns the selected value, and handles the phone number.<StoryEmbed- storyId="ui-input-phonecountrypicker--documentation"+ storyId="ui-input-phonecountrypicker--display"title="Phone country selection"- height={400}+ height={260}/>-## Prepared choices+## UsageEach `PhoneCountryOption` has a unique `value`, a localized country `label`, a `callingCode` without the leading plus sign, and a `flag` node. Supply the country list in the order you want it displayed. The picker adds the plus sign to calling-code labels and keeps calling codes left to right next to right-to-left country names.diff --git a/packages/twenty-docs/ui/components/input/search-input.mdx b/packages/twenty-docs/ui/components/input/search-input.mdxindex 93072829930..7f699724eba 100644--- a/packages/twenty-docs/ui/components/input/search-input.mdx+++ b/packages/twenty-docs/ui/components/input/search-input.mdx@@ -8,19 +8,26 @@ import SearchInputReference from '/snippets/ui/generated/components/input/search`SearchInput` supplies a search icon and text input. `onValueChange` receives the new string; `onChange` receives the native React change event. Filtering, fetching, and debouncing belong to your application.+<StoryEmbed+ storyId="ui-input-searchinput--display"+ title="SearchInput example"+ height={110}+/>++## Usage+```tsximport { useState } from 'react';import { SearchInput } from 'twenty-ui/components/input';-export const PeopleSearch = () => {- const [search, setSearch] = useState('');+export const RecordSearch = () => {+ const [value, setValue] = useState('');return (<SearchInput- aria-label="Search people"- placeholder="Name or email"- value={search}- onValueChange={setSearch}+ value={value}+ onValueChange={setValue}+ placeholder="Search..."/>);};@@ -28,12 +35,6 @@ export const PeopleSearch = () => {Use `aria-label` or `aria-labelledby` for an accessible name.-<StoryEmbed- storyId="ui-input-searchinput--default"- title="SearchInput example"- height={280}-/>-Native input props, `className`, `style`, and `ref` apply to the input itself. The shared `InputGroup` owns the search adornment and focus treatment. The wrapper that lays out the field and its actions takes no props; place `SearchInput` in your own container to size or position it. Use `size="sm"` for a compact search field.## Actionsdiff --git a/packages/twenty-docs/ui/components/input/segmented-control.mdx b/packages/twenty-docs/ui/components/input/segmented-control.mdxindex 3a59239f5f5..befc487d093 100644--- a/packages/twenty-docs/ui/components/input/segmented-control.mdx+++ b/packages/twenty-docs/ui/components/input/segmented-control.mdx@@ -10,16 +10,15 @@ import SegmentedControlReference from '/snippets/ui/generated/components/input/s`SegmentedControl` is a preset assembled from [Radio](/ui/primitives/input/radio) and [RadioGroup](/ui/primitives/input/radio-group), with joined options. Use it for a short, mutually exclusive choice. For navigation between content panels, use [Tabs](/ui/primitives/navigation/tabs).<StoryEmbed- storyId="components-input-segmentedcontrol--documentation"+ storyId="components-input-segmentedcontrol--display"title="SegmentedControl example"+ height={110}/>## UsageSupply an accessible group name with `aria-label` or `aria-labelledby`. Each option needs a unique string `value`. Selection belongs to the group; options do not have independent checked state.-## Uncontrolled state-```tsximport { SegmentedControl } from 'twenty-ui/components/input';diff --git a/packages/twenty-docs/ui/components/layout/animated-icon-crossfade.mdx b/packages/twenty-docs/ui/components/layout/animated-icon-crossfade.mdxindex be5144de534..13a1da3b396 100644--- a/packages/twenty-docs/ui/components/layout/animated-icon-crossfade.mdx+++ b/packages/twenty-docs/ui/components/layout/animated-icon-crossfade.mdx@@ -8,6 +8,14 @@ import AnimatedIconCrossfadeReference from '/snippets/ui/generated/components/la`AnimatedIconCrossfade` crossfades between `activeIcon` and `inactiveIcon` node content according to `isActive`. It does not own the action or state. Compose it inside a labeled [Button](/ui/primitives/input/button).+<StoryEmbed+ storyId="ui-components-layout-animatediconcrossfade--display"+ title="AnimatedIconCrossfade example"+ height={100}+/>++## Usage+```tsximport { useState } from 'react';import { AnimatedIconCrossfade } from 'twenty-ui/components/layout';@@ -19,6 +27,8 @@ export const EditToggle = () => {return (<Button+ size="sm"+ aria-expanded={isEditing}onClick={() => setIsEditing(!isEditing)}startIcon={<AnimatedIconCrossfade@@ -28,7 +38,7 @@ export const EditToggle = () => {/>}>- {isEditing ? 'Finish editing' : 'Edit record'}+ Edit actions</Button>);};@@ -40,12 +50,6 @@ Native attributes, events, `className`, `style`, and `ref` target an inline spanReplace `ActiveIcon` and `InactiveIcon` constructors with lowercase `activeIcon` and `inactiveIcon` nodes. Move the former `size` option to the node dimensions and root styles.-<StoryEmbed- storyId="ui-components-layout-animatediconcrossfade--animated-icon-documentation"- title="AnimatedIconCrossfade example"- height={280}-/>-## Props<AnimatedIconCrossfadeReference />diff --git a/packages/twenty-docs/ui/components/layout/overflowing-list.mdx b/packages/twenty-docs/ui/components/layout/overflowing-list.mdxindex 0c299d6897b..9debb9527d1 100644--- a/packages/twenty-docs/ui/components/layout/overflowing-list.mdx+++ b/packages/twenty-docs/ui/components/layout/overflowing-list.mdx@@ -8,42 +8,55 @@ import OverflowingListReference from '/snippets/ui/generated/components/layout/o`OverflowingList` measures its available width, keeps fitting items in a compact row, and offers a `+N` button that opens the complete list in a popup. The count updates when the container, item content or ordered list changes. Empty lists and lists that fit have no overflow button or exposed popup.+<StoryEmbed+ storyId="ui-components-overflowinglist--display"+ title="Overflowing list example"+ height={280}+/>+Supply the complete ordered list as keyed elements. Your application owns each item's content, actions and data. The compact row remains visible when the popup opens. The popup repeats the complete list, including the items that fit in the row.+## Usage+```tsx-import { OverflowingList } from 'twenty-ui/components/layout';+import { OverflowingList, Section } from 'twenty-ui/components/layout';import { Tag } from 'twenty-ui/primitives/data-display';-const TEAMS = ['Design', 'Engineering', 'Support', 'Operations'];+const TAGS = ['Customer', 'Partner', 'Priority', 'Renewal'];-export const TeamList = () => (- <OverflowingList- style={{ width: 220 }}- showOverflowCount- overflowLabel="Show all teams"- >- {TEAMS.map((team) => (- <Tag key={team} color="blue">- {team}- </Tag>- ))}- </OverflowingList>+export const CompanyTags = () => (+ <Section.Root>+ <Section.Header+ title="Company tags"+ description="Open the count to see all tags."+ />+ <OverflowingList+ style={{ width: 180 }}+ showOverflowCount+ overflowLabel="Show all company tags"+ >+ {TAGS.map((label) => (+ <Tag+ key={label}+ color="blue"+ truncate={false}+ style={{ width: 80, minWidth: 'fit-content' }}+ >+ {label}+ </Tag>+ ))}+ </OverflowingList>+ </Section.Root>);```-<StoryEmbed- storyId="ui-components-overflowinglist--documentation"- title="Overflowing list example"- height={280}-/>-## Count visibility| `showOverflowCount` | Behavior when items overflow || ------------------- | ---------------------------------------------------------------------------- || Omitted | Shows the count on pointer hover, keyboard focus or while the popup is open. || `true` | Keeps the count visible. |-| `false` | Hides the count and clips the row. An open popup stays open until dismissed. |+| `false` | Hides the count and clips the row. An open popup stays open until dismissed. |The default mode keeps the current count visibility while an inline item is focused, so showing the count does not push that item out of the row. Focusing the count button makes the count visible.diff --git a/packages/twenty-docs/ui/components/layout/section.mdx b/packages/twenty-docs/ui/components/layout/section.mdxindex e268a17dddb..9f78046be3e 100644--- a/packages/twenty-docs/ui/components/layout/section.mdx+++ b/packages/twenty-docs/ui/components/layout/section.mdx@@ -9,11 +9,28 @@ import SectionReference from '/snippets/ui/generated/components/layout/section.m`Section.Root` groups related content. `Section.Header` combines [Heading](/ui/primitives/typography/heading) with a description and optional `actions` content. Descriptions are ordinary text associated with the heading, so they do not add levels to the document outline.<StoryEmbed- storyId="ui-components-section--documentation"+ storyId="ui-components-section--display"title="Section example"- height={200}+ height={150}/>+## Usage++```tsx+import { Section } from 'twenty-ui/components/layout';+import { Text } from 'twenty-ui/primitives/typography';++export const WorkspaceSection = () => (+ <Section.Root>+ <Section.Header+ title="Workspace settings"+ description="Manage your workspace name and preferences."+ />+ <Text>Workspace preferences appear here.</Text>+ </Section.Root>+);+```+## Add a description and action```tsxdiff --git a/packages/twenty-docs/ui/components/navigation/dropdown.mdx b/packages/twenty-docs/ui/components/navigation/dropdown.mdxindex 3dd12c58f8a..2983312e18f 100644--- a/packages/twenty-docs/ui/components/navigation/dropdown.mdx+++ b/packages/twenty-docs/ui/components/navigation/dropdown.mdx@@ -9,13 +9,58 @@ import DropdownReference from '/snippets/ui/generated/components/navigation/drop`Dropdown` combines a positioned popup, visual rows, keyboard navigation, focus, and dismissal. Your application owns data, filtering, fetching and pagination. `SelectionGroup` owns independent selection values inside the popup. Import it from `twenty-ui/components`.<StoryEmbed- storyId="ui-components-dropdown--documentation"+ storyId="ui-components-dropdown--display"title="Dropdown actions"- height={380}+ height={420}/>Dropdown.Content accepts numeric offsets or functions for `sideOffset` and `alignOffset`. Offset functions receive the anchor and popup dimensions, side, and alignment. Use them to preserve an anchored field picker’s overlap when the cell is scaled.+## Usage++```tsx+import { Dropdown } from 'twenty-ui/components/navigation';+import { IconArchive, IconCopy, IconDownload } from 'twenty-ui/icon';+import { Button } from 'twenty-ui/primitives/input';++export const RecordActions = () => (+ <Dropdown.Root type="menu">+ <Dropdown.Trigger render={<Button>Record actions</Button>} />+ <Dropdown.Content aria-label="Record actions" width={240}>+ <Dropdown.Section>+ <Dropdown.ActionItem startIcon={<IconCopy />}>+ Duplicate+ </Dropdown.ActionItem>+ <Dropdown.Submenu>+ <Dropdown.SubmenuTrigger startIcon={<IconDownload />}>+ Export+ </Dropdown.SubmenuTrigger>+ <Dropdown.Content aria-label="Export formats">+ <Dropdown.Section>+ <Dropdown.ActionItem>CSV</Dropdown.ActionItem>+ <Dropdown.ActionItem>Excel</Dropdown.ActionItem>+ </Dropdown.Section>+ </Dropdown.Content>+ </Dropdown.Submenu>+ </Dropdown.Section>+ <Dropdown.Separator />+ <Dropdown.Section>+ <Dropdown.ActionItem startIcon={<IconArchive />}>+ Archive+ </Dropdown.ActionItem>+ <Dropdown.ActionItem+ render={+ <a href="#dropdown-documentation" aria-label="Documentation" />+ }+ >+ Documentation+ </Dropdown.ActionItem>+ </Dropdown.Section>+ </Dropdown.Content>+ </Dropdown.Root>+);+```+## Choose an interaction typeSet `type` on `Dropdown.Root` to match the popup's contents.@@ -334,7 +379,7 @@ Use `type="panel"` for form inputs. Input interaction keeps the panel open; a sa<StoryEmbedstoryId="ui-components-dropdown--panel-documentation"title="Controlled form panel"- height={380}+ height={420}/>Escape dismisses the popup and restores focus to its trigger. Outside interaction also dismisses it, and the click that dismisses it doesn't activate what it lands on. Keys pressed inside the popup stay inside it, except Ctrl or Cmd shortcuts the dropdown doesn't handle, so page-level shortcuts keep working. `Content` accepts focus and portal options from Popover, including an explicit return-focus target for editor workflows.@@ -371,7 +416,7 @@ A root can open without a `Trigger`, for example as a context menu. Control it w<StoryEmbedstoryId="ui-components-dropdown--context-menu-documentation"title="Context menu anchored to the pointer"- height={300}+ height={420}/>```tsxdiff --git a/packages/twenty-docs/ui/components/navigation/list-item-button.mdx b/packages/twenty-docs/ui/components/navigation/list-item-button.mdxindex f27119d652f..48014a894b3 100644--- a/packages/twenty-docs/ui/components/navigation/list-item-button.mdx+++ b/packages/twenty-docs/ui/components/navigation/list-item-button.mdx@@ -9,11 +9,32 @@ import ListItemButtonReference from '/snippets/ui/generated/components/navigatioUse `ListItemButton` for action rows and standalone selection buttons. It combines [ListItem](/ui/primitives/navigation/list-item) layout with a native button, including Enter and Space activation, focus, and disabled behavior. It defaults to `type="button"`.<StoryEmbed- storyId="ui-components-listitembutton--default"+ storyId="ui-components-listitembutton--display"title="ListItemButton example"- height={180}+ height={110}/>+## Usage++```tsx+import { ListItemButton } from 'twenty-ui/components/navigation';+import { IconCopy } from 'twenty-ui/icon';++export const DuplicateAction = ({+ onDuplicate,+}: {+ onDuplicate: () => void;+}) => (+ <ListItemButton+ startIcon={<IconCopy />}+ description="Create a copy"+ onClick={onDuplicate}+ >+ Duplicate+ </ListItemButton>+);+```+## Actions and disabled statePass `onClick` and `disabled` directly. Disabled buttons use the matching row appearance, prevent activation, and leave the tab order.@@ -45,7 +66,7 @@ export const DuplicateAction = ({<StoryEmbedstoryId="ui-components-listitembutton--disabled"title="Disabled action row"- height={180}+ height={110}/>Set `focusableWhenDisabled` to keep a disabled button focusable. It uses `aria-disabled` and continues to block activation. Native button attributes, events, styles, class names, and an `HTMLButtonElement` ref reach the button. Events bubble normally; callers supply any `stopPropagation()` or `preventDefault()` policy.@@ -77,7 +98,7 @@ export const ShowArchivedToggle = () => {<StoryEmbedstoryId="ui-components-listitembutton--selected"title="Selected action row"- height={180}+ height={110}/>Use `startIcon`, `endIcon`, `description`, and `descriptionPlacement` for supporting content. `color="danger"` marks a destructive action. `shortcutJoinLabel` controls the text between sequential shortcuts, and `hasSubmenu` displays a submenu indicator.@@ -110,7 +131,7 @@ export const ContactActions = ({ onOpen, onDetails }: ContactActionsProps) => (<StoryEmbedstoryId="ui-components-listitembutton--independent-action"title="Sibling action controls"- height={180}+ height={110}/>Use `ListItem` for passive content, links, or custom semantic owners. Use the existing [Dropdown](/ui/components/navigation/dropdown), and [Select](/ui/primitives/input/select) item parts within their popup owners, which supply roles and keyboard navigation.diff --git a/packages/twenty-docs/ui/components/navigation/menu-items.mdx b/packages/twenty-docs/ui/components/navigation/menu-items.mdxindex 2d9af1d40b2..b4fb4e12a13 100644--- a/packages/twenty-docs/ui/components/navigation/menu-items.mdx+++ b/packages/twenty-docs/ui/components/navigation/menu-items.mdx@@ -3,6 +3,8 @@ title: Menu rowsdescription: MenuItem, MenuItemAvatar, MenuItemDraggable, and MenuItemSuggestion presentation presets.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import MenuItemReference from '/snippets/ui/generated/components/navigation/menu-item.mdx';import MenuItemAvatarReference from '/snippets/ui/generated/components/navigation/menu-item-avatar.mdx';import MenuItemDraggableReference from '/snippets/ui/generated/components/navigation/menu-item-draggable.mdx';@@ -10,7 +12,13 @@ import MenuItemSuggestionReference from '/snippets/ui/generated/components/navigThese components provide row presentation. For complete menu semantics, keyboard navigation, and dismissal, use [Dropdown](/ui/components/navigation/dropdown).-## MenuItem+<StoryEmbed+ storyId="ui-navigation-menu-menuitem-menuitem--display"+ title="Menu row with an icon and shortcut"+ height={110}+/>++## Usage`MenuItem` accepts a main `text` label, leading and trailing content, supporting text, shortcut hints, and submenu indicators. `focused` and `selected` change its appearance; the application owns actual focus and selection.@@ -25,10 +33,14 @@ export const CopyRowPreview = () => (The root is a div. `onClick` alone does not provide keyboard activation or menu semantics. Native attributes and refs are not exposed by this preset. Use `Dropdown.ActionItem` for accessible commands. Shortcut hints and `hasSubMenu` are visual; they do not register handlers or create a submenu. `isTooltipOpen` is currently accepted but unused.-<MenuItemReference />-## MenuItemAvatar+<StoryEmbed+ storyId="ui-components-navigation-menuitemavatar--display"+ title="Person row with an avatar"+ height={110}+/>+`MenuItemAvatar` places an [Avatar](/ui/primitives/data-display/avatar) before a text label. Its `avatar` accepts `name`, `src`, `colorSeed`, `size`, and `shape`. Omit it to render no avatar.```tsx@@ -44,10 +56,14 @@ export const PersonRowPreview = () => (It shares MenuItem's pointer and keyboard limitations. For a selectable person, compose an Avatar inside `Dropdown.OptionItem` instead.-<MenuItemAvatarReference />-## MenuItemDraggable+<StoryEmbed+ storyId="ui-navigation-menu-menuitem-menuitemdraggable--display"+ title="Row with a drag grip"+ height={110}+/>+`MenuItemDraggable` renders a menu row that can show a drag grip. The application supplies drag behavior. `gripMode` defaults to `never`, which shows no grip; `always` shows the grip, and `onHover` swaps the leading content (`LeftComponent`, otherwise `LeftIcon`) for the grip while the row is hovered, so it shows nothing without leading content. `isDragDisabled` affects the appearance, not external drag handlers.```tsx@@ -60,24 +76,46 @@ export const ReorderRowPreview = () => (The root remains a div without keyboard drag behavior. `isTooltipOpen` and `isHoverDisabled` are currently accepted but unused. Provide an accessible reordering interface in the surrounding application.-<MenuItemDraggableReference />-## MenuItemSuggestion-`MenuItemSuggestion` renders a list item with optional icon and supporting text. Supplying `onClick` gives it button semantics, a tab stop, and Enter/Space activation. The `li` root then has the button role instead of `listitem`, so keep clickable suggestions in a `ul` with `role="none"`: the markup stays valid and assistive technology does not expect list items. `selected` applies visual styling and does not implement a listbox selection model.+<StoryEmbed+ storyId="ui-components-navigation-menuitemsuggestion--display"+ title="Suggested company with supporting text"+ height={110}+/>++`MenuItemSuggestion` presents a suggested value with an optional icon and supporting text. Without `onClick`, keep its `li` root inside a semantic list. `selected` changes its appearance without adding selection behavior.```tsximport { MenuItemSuggestion } from 'twenty-ui/components/navigation';--export const SuggestedName = ({ onChoose }: { onChoose: () => void }) => (- <ul role="none">- <MenuItemSuggestion- text="Acme"- contextualText="Company"- onClick={onChoose}- />- </ul>+import { Text } from 'twenty-ui/primitives/typography';++export const SuggestedName = () => (+ <Text+ render={<ul />}+ style={{ margin: 0, padding: 0, listStyle: 'none', width: '100%' }}+ >+ <MenuItemSuggestion text="Acme" contextualText="Company" />+ </Text>);```+Supplying `onClick` gives the row button semantics, a tab stop, and Enter/Space activation. Place clickable rows in `<ul role="none">` because their `li` roots expose `button` instead of `listitem`. For a complete selection or action workflow, prefer [Dropdown.OptionItem](/ui/components/navigation/dropdown) or [ListItemButton](/ui/components/navigation/list-item-button).++## Props++### MenuItem++<MenuItemReference />++### MenuItemAvatar++<MenuItemAvatarReference />++### MenuItemDraggable++<MenuItemDraggableReference />++### MenuItemSuggestion+<MenuItemSuggestionReference />diff --git a/packages/twenty-docs/ui/components/navigation/menu-picker.mdx b/packages/twenty-docs/ui/components/navigation/menu-picker.mdxindex d1e4a4c20c8..33d7785682e 100644--- a/packages/twenty-docs/ui/components/navigation/menu-picker.mdx+++ b/packages/twenty-docs/ui/components/navigation/menu-picker.mdx@@ -3,10 +3,20 @@ title: MenuPickerdescription: A compact icon button with selected styling and an optional tooltip.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import MenuPickerReference from '/snippets/ui/generated/components/navigation/menu-picker.mdx';`MenuPicker` renders a native button. Your application owns `selected` and the action. `selected` also controls `aria-pressed`.+<StoryEmbed+ storyId="ui-navigation-menu-menupicker--display"+ title="Toggle the board view"+ height={130}+/>++## Usage+```tsximport { useState } from 'react';import { MenuPicker } from 'twenty-ui/components/navigation';@@ -29,6 +39,16 @@ export const BoardToggle = () => {Keep `label` even with `showLabel={false}` because it supplies the accessible name. `tooltipContent` adds a supplementary explanation. `disabled` prevents activation. Place the button outside a form unless its default native submission behavior is appropriate.+## Visual options++Compare selected and disabled appearances, hidden labels, and supplemental tooltips.++<StoryEmbed+ storyId="ui-navigation-menu-menupicker--all-states"+ title="Menu picker presentation choices"+ height={280}+/>+## Props<MenuPickerReference />diff --git a/packages/twenty-docs/ui/components/navigation/tab-button.mdx b/packages/twenty-docs/ui/components/navigation/tab-button.mdxindex 94bac5d328b..984848cd66a 100644--- a/packages/twenty-docs/ui/components/navigation/tab-button.mdx+++ b/packages/twenty-docs/ui/components/navigation/tab-button.mdx@@ -9,11 +9,24 @@ import TabButtonReference from '/snippets/ui/generated/components/navigation/tabUse `TabButton` for route links and actions such as adding a tab or opening an overflow menu. It shares the appearance of [Tabs](/ui/primitives/navigation/tabs) and uses [Button](/ui/primitives/input/button) for interaction.<StoryEmbed- storyId="ui-components-tabbutton--default"+ storyId="ui-components-tabbutton--display"title="TabButton example"- height={180}+ height={120}/>+## Usage++```tsx+import { TabButton } from 'twenty-ui/components/navigation';+import { IconSettings } from 'twenty-ui/icon';++export const GeneralAction = ({ onOpen }: { onOpen: () => void }) => (+ <TabButton startIcon={<IconSettings />} onClick={onOpen}>+ General+ </TabButton>+);+```+## State and semanticsYour application supplies `active` from its current route or menu state. This prop highlights the control. Set `aria-current="page"` on the current route link. Route links and adjacent actions retain their link or button semantics, with no tab role, `aria-selected`, or panel relationship.diff --git a/packages/twenty-docs/ui/components/settings/settings-row.mdx b/packages/twenty-docs/ui/components/settings/settings-row.mdxindex 03462ea3256..3f08b1c20ef 100644--- a/packages/twenty-docs/ui/components/settings/settings-row.mdx+++ b/packages/twenty-docs/ui/components/settings/settings-row.mdx@@ -9,9 +9,32 @@ import SettingsRowReference from '/snippets/ui/generated/components/settings/set`SettingsRow` combines the appearance of [ListItem](/ui/primitives/navigation/list-item) with [Switch](/ui/primitives/input/switch). It renders a native label associated with its switch. Your application supplies the row content and owns any preference updates.<StoryEmbed- storyId="ui-components-settingsrow--default"+ storyId="ui-components-settingsrow--display"title="Settings row example"- height={160}+ height={110}+/>++## Usage++```tsx+import { SettingsRow } from 'twenty-ui/components/settings';+import { IconBell } from 'twenty-ui/icon';++export const NotificationSetting = () => (+ <SettingsRow startElement={<IconBell aria-hidden />}>+ Notifications+ </SettingsRow>+);+```++## Visual options++Compare switch sizes and checked, disabled, and read-only states.++<StoryEmbed+ storyId="ui-components-settingsrow--catalog"+ title="Settings row sizes and states"+ height={520}/>## Configure the switch@@ -62,7 +85,7 @@ export const WorkspaceSettings = () => (<StoryEmbedstoryId="ui-components-settingsrow--with-description"title="Settings row with a description"- height={160}+ height={110}/>```tsxdiff --git a/packages/twenty-docs/ui/primitives/accessibility/visually-hidden.mdx b/packages/twenty-docs/ui/primitives/accessibility/visually-hidden.mdxindex 14dd17d9ed5..8b26425952e 100644--- a/packages/twenty-docs/ui/primitives/accessibility/visually-hidden.mdx+++ b/packages/twenty-docs/ui/primitives/accessibility/visually-hidden.mdx@@ -3,10 +3,18 @@ title: VisuallyHiddendescription: Keep supporting text available to assistive technology without displaying it visually.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import VisuallyHiddenReference from '/snippets/ui/generated/accessibility/visually-hidden.mdx';`VisuallyHidden` renders a visually hidden `span`. Its content stays in the accessibility tree and can supply an accessible name. It accepts native span props, a span ref, and Base UI `render` composition. Import `VisuallyHiddenProps` from the same entry point.+<StoryEmbed+ storyId="ui-accessibility-visuallyhidden--display"+ title="Visually hidden example"+ height={100}+/>+## Usage```tsxdiff --git a/packages/twenty-docs/ui/primitives/data-display/avatar.mdx b/packages/twenty-docs/ui/primitives/data-display/avatar.mdxindex 5c47ed493ab..c8099fcb76c 100644--- a/packages/twenty-docs/ui/primitives/data-display/avatar.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/avatar.mdx@@ -9,17 +9,25 @@ import AvatarReference from '/snippets/ui/generated/data-display/avatar.mdx';`Avatar` shows an image with a first-letter fallback. Use it beside a record name or inside a [Chip](/ui/primitives/data-display/chip). Its default root is a presentational `span`.-<StoryEmbed storyId="ui-data-display-avatar--app" title="Avatar example" />+<StoryEmbed+ storyId="ui-data-display-avatar--display"+ title="Avatar example"+ height={90}+/>-## Image and fallback+## Usage```tsximport { Avatar } from 'twenty-ui/primitives/data-display';-type PersonAvatarProps = { name: string; imageUrl?: string | null };--export const PersonAvatar = ({ name, imageUrl }: PersonAvatarProps) => (- <Avatar src={imageUrl} name={name} shape="circle" size="lg" />+export const WorkspaceAvatar = () => (+ <Avatar+ name="Acme"+ colorSeed="acme-app"+ shape="square"+ variant="outline"+ size="md"+ />);```@@ -80,7 +88,11 @@ export const ContactAvatar = ({);```-<StoryEmbed storyId="ui-data-display-avatar--parts" title="Avatar parts" />+<StoryEmbed+ storyId="ui-data-display-avatar--parts"+ title="Avatar parts"+ height={110}+/>The parts share Base UI's image loading state. Image renders an `img` after a successful load by default, and Fallback renders a `span` while the image is absent, loading, or has failed. `delay` postpones the initial fallback display in milliseconds and defaults to `0`. A changed source is loaded again and can replace either the current image or fallback.@@ -94,6 +106,12 @@ The public `AvatarRootProps`, `AvatarImageProps`, `AvatarFallbackProps`, `Avatar## Shape and appearance+<StoryEmbed+ storyId="ui-data-display-avatar--catalog"+ title="Avatar sizes and shapes"+ height={320}+/>+`shape` accepts `square`, `rounded-square`, or `circle`. Sizes run from `xs` (12px) to `xl` (40px); `md` is 16px. `variant="outline"` adds a border to the fallback. The `color`, `backgroundColor`, and `borderColor` overrides customize the fallback, while a loaded image keeps its original appearance.```tsx@@ -146,6 +164,7 @@ export const ProfileAvatar = ({<StoryEmbedstoryId="ui-data-display-avatar--button-composition"title="Avatar composed as a button"+ height={110}/>Compose a native button for actions. It owns focus, Enter and Space activation, and disabled behavior. Supply an action-specific accessible name. Put `onClick` and `disabled` on the rendered button; shorthand Avatar has no `onClick`, `disabled`, or `nativeButton` prop.diff --git a/packages/twenty-docs/ui/primitives/data-display/badge.mdx b/packages/twenty-docs/ui/primitives/data-display/badge.mdxindex a6abb539d4f..2e05eac76d4 100644--- a/packages/twenty-docs/ui/primitives/data-display/badge.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/badge.mdx@@ -10,8 +10,9 @@ import BadgeReference from '/snippets/ui/generated/data-display/badge.mdx';`Badge` displays compact inline information, including short labels and counts. Use [Tag](/ui/primitives/data-display/tag) for categories, [Chip](/ui/primitives/data-display/chip) for compact controls, or [Status](/ui/primitives/data-display/status) for a named state with an indicator.<StoryEmbed- storyId="ui-data-display-badge--documentation"+ storyId="ui-data-display-badge--display"title="Badge example"+ height={90}/>## Usage@@ -42,6 +43,12 @@ Icons are ordinary child nodes. Give decorative icons `aria-hidden` and keep a v## Appearance+<StoryEmbed+ storyId="ui-data-display-badge--catalog"+ title="Badge sizes and shapes"+ height={200}+/>+```tsximport { Badge } from 'twenty-ui/primitives/data-display';import { Text } from 'twenty-ui/primitives/typography';@@ -66,6 +73,12 @@ export const BadgeAppearances = () => (`size` accepts `xs`, `sm`, or `md`. `color` accepts `tertiary`, `inherit`, `primary`, or `secondary`. `shape` accepts `pill` or `circle`. The defaults are `sm`, `tertiary`, and `pill`. The circular treatment has a fixed width equal to its height. Use `pill` for longer content, including abbreviated counts.+<StoryEmbed+ storyId="ui-data-display-badge--colors"+ title="Badge text colors"+ height={140}+/>+## Counts and visibility```tsxdiff --git a/packages/twenty-docs/ui/primitives/data-display/chip.mdx b/packages/twenty-docs/ui/primitives/data-display/chip.mdxindex 4a58900c300..e1f494e12e1 100644--- a/packages/twenty-docs/ui/primitives/data-display/chip.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/chip.mdx@@ -10,11 +10,12 @@ import ChipReference from '/snippets/ui/generated/data-display/chip.mdx';Use `Chip` for compact references to people, records, or files. Use [Tag](/ui/primitives/data-display/tag) for colored categories and [Status](/ui/primitives/data-display/status) for workflow states.<StoryEmbed- storyId="ui-data-display-chip--with-left-avatar"+ storyId="ui-data-display-chip--display"title="Chip example"+ height={90}/>-## Content and slots+## Usage```tsximport { Avatar, Chip } from 'twenty-ui/primitives/data-display';@@ -35,6 +36,16 @@ Children accept text or nodes. `startElement` and `endElement` accept avatars, iChip never inserts a label. Supply a translated fallback from your application when needed. Omit children for content made entirely from slots. An interactive chip with only an icon needs a caller-supplied accessible name.+## Appearance++<StoryEmbed+ storyId="ui-data-display-chip--catalog"+ title="Chip variants and sizes"+ height={200}+/>++`size` accepts `sm` or `md`. `variant` accepts `ghost`, `soft`, or `solid`; `ghost` is the default. Use `shape="round"` for a pill, `weight="medium"` for emphasis, and `color="secondary"` for secondary text.+## Buttons and links```tsx@@ -96,10 +107,6 @@ export const FileChip = () => (Replace `emptyLabel` with caller-provided fallback children, and replace `forceEmptyText` or `isLabelHidden` with omitted children. Keep translated product fallbacks in the application. Replace `tooltipLabel` with `tooltipContent`. Move `disabled` to the explicit interactive owner and remove `nativeButton`. Add a native button or link through `render` wherever the chip previously relied on `onClick` to choose its element.-## Appearance--`size` accepts `sm` or `md`. `variant` accepts `ghost`, `soft`, or `solid`; `ghost` is the default. Use `shape="round"` for a pill, `weight="medium"` for emphasis, and `color="secondary"` for secondary text.-## PropsTypes and defaults are generated from the public component types. Native attributes and event handlers are also accepted.diff --git a/packages/twenty-docs/ui/primitives/data-display/color-sample.mdx b/packages/twenty-docs/ui/primitives/data-display/color-sample.mdxindex c4a0ed0df13..191fdf92a24 100644--- a/packages/twenty-docs/ui/primitives/data-display/color-sample.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/color-sample.mdx@@ -10,8 +10,9 @@ import ColorSampleReference from '/snippets/ui/generated/data-display/color-samp`ColorSample` is a non-interactive color swatch. Use it next to a label so the meaning does not depend on color alone. Selection belongs to the surrounding control.<StoryEmbed- storyId="ui-data-display-colorsample--default"+ storyId="ui-data-display-colorsample--display"title="ColorSample example"+ height={90}/>## Usage@@ -22,12 +23,7 @@ import { Text } from 'twenty-ui/primitives/typography';export const PriorityColor = () => (<Text style={{ display: 'flex', alignItems: 'center', gap: 8 }}>- <ColorSample- colorName="red"- variant="circle"- render={<span />}- aria-hidden="true"- />+ <ColorSample colorName="red" render={<span />} aria-hidden="true" />High priority</Text>);diff --git a/packages/twenty-docs/ui/primitives/data-display/status.mdx b/packages/twenty-docs/ui/primitives/data-display/status.mdxindex 7aa0aaf1017..daf7ed2b3ee 100644--- a/packages/twenty-docs/ui/primitives/data-display/status.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/status.mdx@@ -10,22 +10,33 @@ import StatusReference from '/snippets/ui/generated/data-display/status.mdx';`Status` combines a colored dot, a text label, and an optional loader. Use it for workflow or record states. Use [Tag](/ui/primitives/data-display/tag) for a category without the status indicator.<StoryEmbed- storyId="ui-data-display-status--documentation"+ storyId="ui-data-display-status--display"title="Status example"+ height={90}/>-## Record state+## Usage```tsximport { Status } from 'twenty-ui/primitives/data-display';-export const RecordStatus = () => <Status color="green">Active</Status>;+export const RecordStatus = () => (+ <Status color="red" weight="medium">+ Urgent+ </Status>+);````color` is required and uses the theme palette. The label communicates the meaning independently of the color. The default element is always a `span`, including when a native click handler is supplied; `weight="medium"` emphasizes its text.## Loading and announcements+<StoryEmbed+ storyId="ui-data-display-status--loading"+ title="Status while saving"+ height={90}+/>+```tsximport { Status } from 'twenty-ui/primitives/data-display';diff --git a/packages/twenty-docs/ui/primitives/data-display/tag.mdx b/packages/twenty-docs/ui/primitives/data-display/tag.mdxindex 5ac8b830ef9..bd724a66f6b 100644--- a/packages/twenty-docs/ui/primitives/data-display/tag.mdx+++ b/packages/twenty-docs/ui/primitives/data-display/tag.mdx@@ -9,9 +9,13 @@ import TagReference from '/snippets/ui/generated/data-display/tag.mdx';Use `Tag` for categories, priorities, or other short attributes. Keep a text label so the meaning does not depend on color. Use [Status](/ui/primitives/data-display/status) when you need a state indicator and loading feedback.-<StoryEmbed storyId="ui-data-display-tag--documentation" title="Tag example" />+<StoryEmbed+ storyId="ui-data-display-tag--display"+ title="Tag example"+ height={90}+/>-## Category label+## Usage```tsximport { Tag } from 'twenty-ui/primitives/data-display';@@ -23,6 +27,12 @@ export const PriorityTag = () => <Tag color="red">Urgent</Tag>;## Variants+<StoryEmbed+ storyId="ui-data-display-tag--catalog"+ title="Tag variants"+ height={140}+/>+```tsximport { Tag } from 'twenty-ui/primitives/data-display';@@ -46,6 +56,16 @@ export const CategoryTags = () => (`soft` is the default treatment. `solid` emphasizes the label, `outline` adds a border, and `ghost` removes the background. Use `borderStyle="dashed"` with `outline` and `weight="medium"` for a stronger label.+## Colors++<StoryEmbed+ storyId="ui-data-display-tag--colors"+ title="Tag theme colors"+ height={240}+/>++Keep the label meaningful without relying on its color. The catalog compares the default soft treatment; the same palette is available to the other variants.+## Filter by a tag```tsxdiff --git a/packages/twenty-docs/ui/primitives/feedback/banner.mdx b/packages/twenty-docs/ui/primitives/feedback/banner.mdxindex 503308aa3b7..6b23b446862 100644--- a/packages/twenty-docs/ui/primitives/feedback/banner.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/banner.mdx@@ -10,7 +10,31 @@ import BannerReference from '/snippets/ui/generated/feedback/banner.mdx';Defaults are `status="info"` and `variant="solid"`. The default status palettes are gray, blue, green, orange and red, respectively.-<StoryEmbed storyId="ui-feedback-banner--default" title="Banner example" />+<StoryEmbed+ storyId="ui-feedback-banner--display"+ title="Banner example"+ height={130}+/>++## Usage++```tsx+import { Banner } from 'twenty-ui/primitives/feedback';++export const SyncBanner = () => (+ <Banner status="info" variant="solid">+ Contact sync is temporarily paused. Your saved records remain available.+ </Banner>+);+```++## Actions and appearance++<StoryEmbed+ storyId="ui-feedback-banner--catalog"+ title="Banner feedback palettes and variants"+ height={560}+/>```tsximport { Banner } from 'twenty-ui/primitives/feedback';diff --git a/packages/twenty-docs/ui/primitives/feedback/loader.mdx b/packages/twenty-docs/ui/primitives/feedback/loader.mdxindex aa6804b067a..9a68b57f9f5 100644--- a/packages/twenty-docs/ui/primitives/feedback/loader.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/loader.mdx@@ -10,8 +10,9 @@ import LoaderReference from '/snippets/ui/generated/feedback/loader.mdx';`Loader` shows an animated dot inside a small bordered capsule. Use it while an operation is in progress and the percentage is unknown. For numeric progress, use [ProgressBar](/ui/primitives/feedback/progress-bar).<StoryEmbed- storyId="ui-feedback-loader--with-color-documentation"+ storyId="ui-feedback-loader--display"title="Loader example"+ height={90}/>## Usage@@ -23,7 +24,11 @@ import { Text } from 'twenty-ui/primitives/typography';type SaveFeedbackProps = { isSaving: boolean };export const SaveFeedback = ({ isSaving }: SaveFeedbackProps) => (- <Text render={<div />} role="status" style={{ display: 'flex', gap: 8 }}>+ <Text+ render={<div />}+ role="status"+ style={{ display: 'flex', alignItems: 'center', gap: 8 }}+ >{isSaving && <Loader color="blue" aria-hidden="true" render={<span />} />}{isSaving ? 'Saving changes' : 'Changes saved'}</Text>diff --git a/packages/twenty-docs/ui/primitives/feedback/progress-bar.mdx b/packages/twenty-docs/ui/primitives/feedback/progress-bar.mdxindex 8d5511d2d0e..c46f461e96c 100644--- a/packages/twenty-docs/ui/primitives/feedback/progress-bar.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/progress-bar.mdx@@ -9,8 +9,9 @@ import ProgressBarReference from '/snippets/ui/generated/feedback/progress-bar.m`ProgressBar` supplies a horizontal appearance for [Progress](/ui/primitives/feedback/progress). It preserves the complete root contract, including native attributes, refs, render composition, formatting, custom ranges, and indeterminate progress. Give it an `aria-label` that identifies the operation.<StoryEmbed- storyId="ui-feedback-progressbar-progressbar--default"+ storyId="ui-feedback-progressbar-progressbar--display"title="ProgressBar example"+ height={100}/>## Usage@@ -22,15 +23,14 @@ import { Text } from 'twenty-ui/primitives/typography';type ImportProgressProps = { importedRecords: number | null };export const ImportProgress = ({ importedRecords }: ImportProgressProps) => (- <>+ <Text style={{ display: 'grid', gap: 8, width: 300 }}><Text>Importing records: {importedRecords ?? 'preparing'}</Text><ProgressBarvalue={importedRecords}max={1000}aria-label="Importing records"- withBorderRadius/>- </>+ </Text>);```@@ -43,6 +43,7 @@ export const ImportProgress = ({ importedRecords }: ImportProgressProps) => (<StoryEmbedstoryId="ui-feedback-progressbar-progressbar--custom-range"title="A nonzero minimum and custom maximum"+ height={80}/>Use `aria-valuetext`, `getAriaValueText`, `locale`, and `format` as described in [Progress](/ui/primitives/feedback/progress). Use composed Progress parts when labels and values need their own visible layout.diff --git a/packages/twenty-docs/ui/primitives/feedback/progress-ring.mdx b/packages/twenty-docs/ui/primitives/feedback/progress-ring.mdxindex 7d4b05cc311..b612edc50ec 100644--- a/packages/twenty-docs/ui/primitives/feedback/progress-ring.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/progress-ring.mdx@@ -9,9 +9,9 @@ import ProgressRingReference from '/snippets/ui/generated/feedback/progress-ring`ProgressRing` supplies a circular appearance for [Progress](/ui/primitives/feedback/progress). It shares the root's custom range, null, formatting, labeling, native prop, ref, and render contract. Optional children display a preformatted value beside the ring.<StoryEmbed- storyId="ui-feedback-progressring-progressring--default"+ storyId="ui-feedback-progressring-progressring--display"title="Progress ring example"- height={140}+ height={90}/>## Usage@@ -42,7 +42,7 @@ The application calculates `value` and formats display content. The ring does no<StoryEmbedstoryId="ui-feedback-progressring-progressring--custom-range"title="Circular progress in a custom range"- height={140}+ height={90}/>Pass `value={null}` for indeterminate progress. The ring omits `aria-valuenow` and displays an indeterminate arc. Non-finite values also remain indeterminate; they do not become zero or completion. Display content stays controlled by the application.diff --git a/packages/twenty-docs/ui/primitives/feedback/progress.mdx b/packages/twenty-docs/ui/primitives/feedback/progress.mdxindex 05a31354548..5a5a54b98f9 100644--- a/packages/twenty-docs/ui/primitives/feedback/progress.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/progress.mdx@@ -9,27 +9,47 @@ import ProgressReference from '/snippets/ui/generated/feedback/progress.mdx';`Progress` exposes the installed Base UI parts: `Root`, `Track`, `Indicator`, `Label`, and `Value`. Import them from `twenty-ui/primitives/feedback`. Use [ProgressBar](/ui/primitives/feedback/progress-bar) or [ProgressRing](/ui/primitives/feedback/progress-ring) for a convenient appearance with the same semantic contract.<StoryEmbed- storyId="ui-feedback-progress--default"+ storyId="ui-feedback-progress--display"title="Composed progress example"- height={180}+ height={100}/>-## Compose progress+## Usage`Root` owns the controlled value and accessible progressbar semantics. `Label` supplies its accessible name. `Value` displays the formatted value. `Track` and `Indicator` describe the visual fill; the indicator width comes from the root's normalized range. The parts do not impose an appearance.```tsximport { Progress } from 'twenty-ui/primitives/feedback';+import { Text } from 'twenty-ui/primitives/typography';export const ImportProgress = () => (- <Progress.Root value={70} min={20} max={120} style={{ width: 240 }}>- <Progress.Label>Importing records</Progress.Label>- <Progress.Value />+ <Progress.Root+ value={70}+ min={20}+ max={120}+ style={{+ display: 'grid',+ gridTemplateColumns: '1fr auto',+ alignItems: 'center',+ gap: 8,+ width: 320,+ maxWidth: '100%',+ }}+ >+ <Progress.Label render={<Text />}>Importing records</Progress.Label>+ <Progress.Value render={<Text />} /><Progress.Track- style={{ height: 8, background: 'var(--t-background-tertiary)' }}+ style={{+ gridColumn: '1 / -1',+ height: 8,+ background: 'var(--t-background-tertiary)',+ }}><Progress.Indicator- style={{ background: 'var(--t-font-color-primary)' }}+ style={{+ height: '100%',+ background: 'var(--t-font-color-primary)',+ }}/></Progress.Track></Progress.Root>diff --git a/packages/twenty-docs/ui/primitives/feedback/skeleton.mdx b/packages/twenty-docs/ui/primitives/feedback/skeleton.mdxindex 07a6d022dd7..b47d86ca953 100644--- a/packages/twenty-docs/ui/primitives/feedback/skeleton.mdx+++ b/packages/twenty-docs/ui/primitives/feedback/skeleton.mdx@@ -9,7 +9,11 @@ import SkeletonReference from '/snippets/ui/generated/feedback/skeleton.mdx';`Skeleton` provides a placeholder shape with theme colors and a moving highlight. Compose shapes in the layout of the content being loaded. The application owns loading state and feature-specific layouts.-<StoryEmbed storyId="ui-feedback-skeleton--shapes" title="Skeleton shapes" />+<StoryEmbed+ storyId="ui-feedback-skeleton--display"+ title="Skeleton shapes"+ height={110}+/>## Usage@@ -20,9 +24,16 @@ import { Text } from 'twenty-ui/primitives/typography';export const LoadingProfile = () => (<Text render={<div />} style={{ display: 'flex', gap: 16 }}><Skeleton width={40} height={40} borderRadius="50%" />- <Text render={<div />} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>+ <Text+ render={<div />}+ style={{ display: 'flex', flexDirection: 'column', gap: 8 }}+ ><Skeleton borderRadius={4} width={180} height={SKELETON_HEIGHT_SIZES.s} />- <Skeleton borderRadius={4} width={120} height={SKELETON_HEIGHT_SIZES.xs} />+ <Skeleton+ borderRadius={4}+ width={120}+ height={SKELETON_HEIGHT_SIZES.xs}+ /></Text></Text>);@@ -40,7 +51,11 @@ Skeletons are decorative and have `aria-hidden="true"` by default. Keep loadingThe highlight moves from left to right on a 1.5-second ease-in-out loop and is hidden when the user prefers reduced motion. Pass `animated={false}` for a static placeholder.-<StoryEmbed storyId="ui-feedback-skeleton--static" title="Static skeleton" />+<StoryEmbed+ storyId="ui-feedback-skeleton--static"+ title="Static skeleton"+ height={90}+/>## Composition and themediff --git a/packages/twenty-docs/ui/primitives/input/autocomplete.mdx b/packages/twenty-docs/ui/primitives/input/autocomplete.mdxindex 36cb19b56b0..690a32c8a08 100644--- a/packages/twenty-docs/ui/primitives/input/autocomplete.mdx+++ b/packages/twenty-docs/ui/primitives/input/autocomplete.mdx@@ -4,17 +4,52 @@ description: Suggest values while the user types and keeps focus in the input.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import AutocompleteReference from '/snippets/ui/generated/input/autocomplete.mdx';Use `Autocomplete` for suggestions attached to a text input. The input keeps its caret and keyboard focus while arrow keys highlight suggestions. Use [Select](/ui/primitives/input/select) when the user must choose a value from a fixed list. [Dropdown](/ui/components/navigation/dropdown) remains the higher-level component for menus and pickers.<StoryEmbed- storyId="ui-input-autocomplete--documentation"+ storyId="ui-input-autocomplete--display"title="Autocomplete example"height={360}/>+## Usage++Pass `items` to `Root` and render them through `List` so filtering updates the visible suggestions. `autoHighlight="always"` highlights the first result whenever the list opens.++```tsx+import { Autocomplete } from 'twenty-ui/primitives/input';++const FRUITS = ['Apple', 'Banana', 'Cherry'];++export const FruitInput = () => (+ <Autocomplete.Root items={FRUITS} autoHighlight="always">+ <Autocomplete.InputGroup>+ <Autocomplete.Input aria-label="Fruit" placeholder="Search fruits" />+ </Autocomplete.InputGroup>+ <Autocomplete.Portal>+ <Autocomplete.Positioner>+ <Autocomplete.Popup>+ <Autocomplete.Empty>No fruits found</Autocomplete.Empty>+ <Autocomplete.List>+ {(fruit: string) => (+ <Autocomplete.Item key={fruit} value={fruit}>+ {fruit}+ </Autocomplete.Item>+ )}+ </Autocomplete.List>+ </Autocomplete.Popup>+ </Autocomplete.Positioner>+ </Autocomplete.Portal>+ </Autocomplete.Root>+);+```++`value` and `onValueChange` control the input text. Use `defaultValue` for an uncontrolled initial value. Open state is independent: use `open` and `onOpenChange`, or `defaultOpen`. `Item.onClick` handles both pointer selection and Enter from the input.++`mode="list"` filters without changing input text on highlight. `mode="both"` also supplies inline completion. `mode="inline"` keeps all items and supplies inline completion; `mode="none"` keeps all items without inline completion. `readOnly` prevents inline completion from changing the input.+## AnatomyKeep related parts inside a mounted `Autocomplete.Root`. Compose the portal destination, positioning wrapper, and content separately. `InputGroup` optionally groups the input with adjacent controls and anchors the popup to that group.@@ -73,40 +108,6 @@ Rendered parts retain native attributes, handlers, refs, state-based `className``Autocomplete.useFilter()` supplies locale-aware `contains`, `startsWith`, and `endsWith` matching. `Autocomplete.useFilteredItems<TItem>()` reads the internally filtered collection under Root. Treat that result as read-only.-## Local suggestions--Pass `items` to `Root` and render them through `List` so filtering updates the visible suggestions. `autoHighlight="always"` highlights the first result whenever the list opens.--```tsx-import { Autocomplete } from 'twenty-ui/primitives/input';--const CITIES = ['Paris', 'London', 'Lisbon'];--export const CityInput = () => (- <Autocomplete.Root items={CITIES} autoHighlight="always">- <Autocomplete.Input aria-label="City" placeholder="Search cities" />- <Autocomplete.Portal>- <Autocomplete.Positioner>- <Autocomplete.Popup>- <Autocomplete.Empty>No matching cities</Autocomplete.Empty>- <Autocomplete.List>- {(city: string) => (- <Autocomplete.Item key={city} value={city}>- {city}- </Autocomplete.Item>- )}- </Autocomplete.List>- </Autocomplete.Popup>- </Autocomplete.Positioner>- </Autocomplete.Portal>- </Autocomplete.Root>-);-```--`value` and `onValueChange` control the input text. Use `defaultValue` for an uncontrolled initial value. Open state is independent: use `open` and `onOpenChange`, or `defaultOpen`. `Item.onClick` handles both pointer selection and Enter from the input.--`mode="list"` filters without changing input text on highlight. `mode="both"` also supplies inline completion. `mode="inline"` keeps all items and supplies inline completion; `mode="none"` keeps all items without inline completion. `readOnly` prevents inline completion from changing the input.-## Object and grouped itemsItems can be strings or arbitrary objects. Use `itemToStringValue` to supply the text used for filtering, completion, and form submission. Objects shaped as `{ value, label }` use their label automatically. Render the same item value supplied through Root; no Twenty-specific item shape or selection equality prop is required. Autocomplete owns text input rather than a separate selected object value.@@ -115,6 +116,7 @@ For grouped data, pass groups with an `items` array. Root preserves the item typ```tsximport { Autocomplete } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';type City = { id: number; name: string; country: string };type CityGroup = { label: string; items: City[] };@@ -130,38 +132,47 @@ const CITY_GROUPS: CityGroup[] = [];export const GroupedCityInput = () => (- <Autocomplete.Root- items={CITY_GROUPS}- itemToStringValue={(city) => city.name}- autoHighlight="always"+ <Text+ style={{ display: 'grid', alignContent: 'start', gap: 8, width: '100%' }}>- <Autocomplete.Input aria-label="City" />- <Autocomplete.Portal>- <Autocomplete.Positioner>- <Autocomplete.Popup>- <Autocomplete.Empty>No matching cities</Autocomplete.Empty>- <Autocomplete.List>- {(group: CityGroup) => (- <Autocomplete.Group key={group.label} items={group.items}>- <Autocomplete.GroupLabel>{group.label}</Autocomplete.GroupLabel>- <Autocomplete.Collection>- {(city: City) => (- <Autocomplete.Item- key={city.id}- value={city}- description={city.country}- >- {city.name}- </Autocomplete.Item>- )}- </Autocomplete.Collection>- </Autocomplete.Group>- )}- </Autocomplete.List>- </Autocomplete.Popup>- </Autocomplete.Positioner>- </Autocomplete.Portal>- </Autocomplete.Root>+ <label htmlFor="grouped-city">+ <Text render={<span />}>City</Text>+ </label>+ <Autocomplete.Root+ items={CITY_GROUPS}+ itemToStringValue={(city) => city.name}+ autoHighlight="always"+ >+ <Autocomplete.Input id="grouped-city" placeholder="Search cities" />+ <Autocomplete.Portal>+ <Autocomplete.Positioner>+ <Autocomplete.Popup>+ <Autocomplete.Empty>No matching cities</Autocomplete.Empty>+ <Autocomplete.List>+ {(group: CityGroup) => (+ <Autocomplete.Group key={group.label} items={group.items}>+ <Autocomplete.GroupLabel>+ {group.label}+ </Autocomplete.GroupLabel>+ <Autocomplete.Collection>+ {(city: City) => (+ <Autocomplete.Item+ key={city.id}+ value={city}+ description={city.country}+ >+ {city.name}+ </Autocomplete.Item>+ )}+ </Autocomplete.Collection>+ </Autocomplete.Group>+ )}+ </Autocomplete.List>+ </Autocomplete.Popup>+ </Autocomplete.Positioner>+ </Autocomplete.Portal>+ </Autocomplete.Root>+ </Text>);```diff --git a/packages/twenty-docs/ui/primitives/input/button-group.mdx b/packages/twenty-docs/ui/primitives/input/button-group.mdxindex 447fff1f339..d23689808e2 100644--- a/packages/twenty-docs/ui/primitives/input/button-group.mdx+++ b/packages/twenty-docs/ui/primitives/input/button-group.mdx@@ -4,40 +4,43 @@ description: Group related buttons with shared appearance and an optional frame.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';--<StoryEmbed- storyId="ui-input-button-buttongroup--documentation"- title="Button group"- height={220}-/>-import ButtonGroupReference from '/snippets/ui/generated/input/button-group.mdx';Give a group an accessible name and place related buttons inside it. The group joins adjacent borders and can apply defaults for size, variant, and color. Buttons retain their own tab stops.-## State ownership--`ButtonGroup` coordinates appearance, not selection. It has no controlled or uncontrolled selection mode. Each button receives its own action handler and application state; see [Button's state ownership example](/ui/primitives/input/button#state-ownership) for loading behavior.--For a mutually exclusive choice, use [RadioGroup](/ui/primitives/input/radio-group), which owns selection for its radio controls.+<StoryEmbed+ storyId="ui-input-button-buttongroup--display"+ title="Button group"+ height={100}+/>## Usage```tsx+import { IconCheckbox, IconNotes, IconTimelineEvent } from 'twenty-ui/icon';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';-export const RecordActions = () => (- <ButtonGroup aria-label="Record actions" size="sm">- <Button>Edit</Button>- <Button>Duplicate</Button>+export const ActivityActions = () => (+ <ButtonGroup aria-label="Create activity" size="sm">+ <Button startIcon={<IconNotes />}>Note</Button>+ <Button startIcon={<IconCheckbox />}>Task</Button>+ <Button startIcon={<IconTimelineEvent />}>Activity</Button></ButtonGroup>);```+## State ownership++`ButtonGroup` coordinates appearance, not selection. It has no controlled or uncontrolled selection mode. Each button receives its own action handler and application state; see [Button's state ownership example](/ui/primitives/input/button#state-ownership) for loading behavior.++For a mutually exclusive choice, use [RadioGroup](/ui/primitives/input/radio-group), which owns selection for its radio controls.+## Appearance precedenceEach appearance prop resolves independently: the child's explicit prop, then the group default, then the component default. This applies to both Button and IconButton, including an explicit `IconButton size="xs"`. Defaults reach children through fragments, wrappers, and tooltip anchors.+Keep attached buttons at the same size so their edges align. This example overrides variant and color while inheriting the group size.+```tsximport { Button, ButtonGroup } from 'twenty-ui/primitives/input';@@ -48,11 +51,11 @@ export const ActivityActions = () => (color="accent"size="sm">- <Button>New activity</Button>- <Button variant="ghost" color="danger" size="md">+ <Button variant="ghost" color="danger">Delete activity</Button><Button color="neutral">Duplicate activity</Button>+ <Button>New activity</Button></ButtonGroup>);```@@ -60,13 +63,9 @@ export const ActivityActions = () => (<StoryEmbedstoryId="ui-input-button-buttongroup--appearance-overrides"title="Individual appearance in a button group"- height={180}+ height={100}/>-## Props--<ButtonGroupReference />-## Detached controlsSet `attached={false}` to keep each control's rounded corners and a 2px gap. Group defaults still apply through wrappers and tooltip anchors; explicit child props take precedence.@@ -78,7 +77,7 @@ Set `framed` to add a translucent background, border, 2px padding, and concentri<StoryEmbedstoryId="ui-components-iconbutton--framed-group-documentation"title="Framed button group"- height={180}+ height={100}/>```tsx@@ -101,3 +100,7 @@ export const CompactRecordActions = () => (## Updating existing groupsReplace `IconButtonGroup` and its `iconButtons` array with `ButtonGroup framed attached={false}` and explicit children. Replace `InsideButton` with `LightIconButton size="xs"`. Each button owns its accessible name, action handler, disabled state, and optional tooltip.++## Props++<ButtonGroupReference />diff --git a/packages/twenty-docs/ui/primitives/input/button.mdx b/packages/twenty-docs/ui/primitives/input/button.mdxindex bd2663abc5c..3cda6932cab 100644--- a/packages/twenty-docs/ui/primitives/input/button.mdx+++ b/packages/twenty-docs/ui/primitives/input/button.mdx@@ -3,9 +3,7 @@ title: Buttondescription: Trigger actions or navigate with styled buttons.----import StoryEmbed from '/snippets/ui/StoryEmbed.mdx';--<StoryEmbed storyId="ui-input-button-button--default" height={220} />+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';import ButtonReference from '/snippets/ui/generated/input/button.mdx';Use `Button` for an action and supply its visible label as children. Use [IconButton](/ui/components/input/icon-button) for icon-only controls, with an accessible name from `aria-label` or `aria-labelledby`.@@ -14,6 +12,55 @@ For recurring design defaults, use [MainButton](/ui/components/input/main-buttonor [LightButton](/ui/components/input/light-button) from `twenty-ui/components`.Both share Button's native props, refs, state, and rendering behavior.+<StoryEmbed+ title="Button display"+ storyId="ui-input-button-button--display"+ height={100}+/>++## Usage++```tsx+import { Button } from 'twenty-ui/primitives/input';++export const SaveChanges = () => <Button>Save changes</Button>;+```++## Appearance++Compare variants, semantic colors, sizes, and common states separately. Each group changes one choice while keeping the others fixed.++<StoryEmbed+ storyId="ui-input-button-button--catalog"+ title="Appearance for button"+ height={630}+/>++```tsx+import { Button } from 'twenty-ui/primitives/input';+import { IconPlus } from 'twenty-ui/icon';++export const CreateRecord = () => (+ <Button variant="solid" color="accent" size="sm" startIcon={<IconPlus />}>+ Create record+ </Button>+);+```++Choose `solid`, `outline`, `soft`, `ghost`, or `link` independently of the `neutral`, `accent`, `danger`, or `success` color. Sizes are `sm` and `md`; the defaults are `outline`, `neutral`, and `md`. `fullWidth` fills the available width. `startIcon` and `endIcon` accept elements and are decorative. `elevated` adds a shadow and backdrop blur. Neutral outline buttons also gain a bordered surface with matching text and interaction colors. Other variants and semantic colors keep their existing palette. It defaults to `false` and does not change size or position. `shortcut` displays keyboard hints on larger screens; bind the shortcuts in your application.++`link` uses compact text with no border or filled background. It follows its content height at either size, with a smaller font and narrower padding. Its neutral color uses stronger text on hover. The appearance does not determine semantics: use `onClick` for actions and `href` for navigation.++`disabled` and `loading` prevent activation. Loading keeps the label accessible and communicates a busy state. By default, `loadingPosition="center"` hides the content while preserving its layout space and centers the spinner. Set `loadingPosition` to `start` or `end` to keep children and the opposite icon visible while replacing the corresponding icon with the spinner.++Your application owns progress formatting and the translated label. Pass the complete status phrase as children, for example `Installing (42%)`.++<StoryEmbed+ title="Button loading at end"+ storyId="ui-input-button-button--loading-at-end"+ height={100}+/>+## State ownership`Button` triggers an action and does not manage a selected value, so it has no controlled or uncontrolled selection mode. Its native `value` prop supplies form data, not selection state.@@ -56,29 +103,6 @@ export const SaveRecord = ({ onSave }: SaveRecordProps) => {The application starts and clears loading around the save operation. The button prevents activation while loading and becomes available again when the operation finishes, including after an error. `MainButton` and `LightButton` use the same state model.-## Appearance--```tsx-import { Button } from 'twenty-ui/primitives/input';-import { IconPlus } from 'twenty-ui/icon';--export const CreateRecord = () => (- <Button variant="solid" color="accent" size="sm" startIcon={<IconPlus />}>- Create record- </Button>-);-```--Choose `solid`, `outline`, `soft`, `ghost`, or `link` independently of the `neutral`, `accent`, `danger`, or `success` color. Sizes are `sm` and `md`; the defaults are `outline`, `neutral`, and `md`. `fullWidth` fills the available width. `startIcon` and `endIcon` accept elements and are decorative. `elevated` adds a shadow and backdrop blur. Neutral outline buttons also gain a bordered surface with matching text and interaction colors. Other variants and semantic colors keep their existing palette. It defaults to `false` and does not change size or position. `shortcut` displays keyboard hints on larger screens; bind the shortcuts in your application.--`link` uses compact text with no border or filled background. It follows its content height at either size, with a smaller font and narrower padding. Its neutral color uses stronger text on hover. The appearance does not determine semantics: use `onClick` for actions and `href` for navigation.--`disabled` and `loading` prevent activation. Loading keeps the label accessible and communicates a busy state. By default, `loadingPosition="center"` hides the content while preserving its layout space and centers the spinner. Set `loadingPosition` to `start` or `end` to keep children and the opposite icon visible while replacing the corresponding icon with the spinner.--Your application owns progress formatting and the translated label. Pass the complete status phrase as children, for example `Installing (42%)`.--<StoryEmbed storyId="ui-input-button-button--loading-at-end" height={220} />-## Upcoming featuresYour application owns feature availability and its label. Compose a disabled button with `Badge` as children so the label remains part of the button's accessible name. Supply localized text from your application.@@ -143,8 +167,8 @@ When an icon is itself an action, use `IconButton` or `LightIconButton` and anim<StoryEmbedtitle="Button with an animated icon"- storyId="ui-components-layout-animatediconcrossfade--animated-icon-documentation"- height={120}+ storyId="ui-components-layout-animatediconcrossfade--display"+ height={100}/>## Links and formsdiff --git a/packages/twenty-docs/ui/primitives/input/checkbox.mdx b/packages/twenty-docs/ui/primitives/input/checkbox.mdxindex 7205325216d..588f00825af 100644--- a/packages/twenty-docs/ui/primitives/input/checkbox.mdx+++ b/packages/twenty-docs/ui/primitives/input/checkbox.mdx@@ -4,54 +4,89 @@ description: Select independent options with checked and indeterminate states.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import CheckboxReference from '/snippets/ui/generated/input/checkbox.mdx';Use `Checkbox` when each option can be selected independently. For a mutually exclusive choice, use [RadioGroup](/ui/primitives/input/radio-group).<StoryEmbed- storyId="ui-input-checkbox-checkbox--default"+ storyId="ui-input-checkbox-checkbox--display"title="Checkbox example"- height={240}+ height={100}/>-## Uncontrolled state+## Usage++### Uncontrolled stateUse `defaultChecked` to set the initial checked state. The checkbox owns subsequent changes.```tsx+import { useId } from 'react';import { Checkbox } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';-export const EmailPreference = () => (- <label>- <Checkbox name="updates" value="email" defaultChecked />- Receive product updates- </label>-);+export const EmailPreference = () => {+ const checkboxId = useId();++ return (+ <label+ htmlFor={checkboxId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ >+ <Checkbox id={checkboxId} name="updates" value="email" defaultChecked />+ <Text render={<span />}>Receive product updates</Text>+ </label>+ );+};```A checked, named checkbox contributes its value to a form. Set `uncheckedValue` if the form should also submit a value when it is unchecked.+## Appearance and interaction++Compare checked, indeterminate, and disabled states, then choose the color, size, shape, and variant independently. The enabled examples can be toggled.++<StoryEmbed+ storyId="ui-input-checkbox-checkbox--catalog"+ title="Appearance and interaction for checkbox"+ height={400}+/>++| Prop | Values | Default |+| --------- | ------------------------------ | -------- |+| `size` | `sm`, `md` | `sm` |+| `variant` | `solid`, `outline`, `soft` | `solid` |+| `shape` | `square`, `round` | `square` |+| `color` | `accent`, `success`, `warning` | `accent` |++Tab focuses the checkbox and Space toggles it. Clicking its label also toggles it. Use `disabled` to prevent interaction, or `readOnly` when the value should remain unchanged while the control stays focusable. Keep meaning in the label rather than communicating it through color alone.+## Controlled statePass `checked` and update it with `onCheckedChange` to own the same preference in React state. The callback receives the next boolean and event details.```tsx-import { useState } from 'react';+import { useId, useState } from 'react';import { Checkbox } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';export const EmailPreference = () => {+ const checkboxId = useId();const [checked, setChecked] = useState(true);return (- <label>+ <label+ htmlFor={checkboxId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ ><Checkbox+ id={checkboxId}name="updates"value="email"checked={checked}onCheckedChange={setChecked}/>- Receive product updates+ <Text render={<span />}>Receive product updates</Text></label>);};@@ -96,17 +131,6 @@ export const ColumnSelection = () => {};```-## Appearance and interaction--| Prop | Values | Default |-| --------- | ------------------------------ | -------- |-| `size` | `sm`, `md` | `sm` |-| `variant` | `solid`, `outline`, `soft` | `solid` |-| `shape` | `square`, `round` | `square` |-| `color` | `accent`, `success`, `warning` | `accent` |--Tab focuses the checkbox and Space toggles it. Clicking its label also toggles it. Use `disabled` to prevent interaction, or `readOnly` when the value should remain unchanged while the control stays focusable. Keep meaning in the label rather than communicating it through color alone.-## Parts and custom content`Checkbox` assembles the styled root and its default check and indeterminate icons. Use `Checkbox.Root` with `Checkbox.Indicator` to own the indicator content. Root owns state and box appearance; Indicator renders the content you supply.@@ -131,7 +155,7 @@ Indicator receives checked and indeterminate state, including transition state.<StoryEmbedstoryId="ui-input-checkbox-parts--composition"title="Checkbox part composition"- height={240}+ height={100}/>The callable assembly and its `CheckboxProps` type remain supported. Replace the assembly with Root and its part when supplying custom icons instead of appending another part to the assembly's children.diff --git a/packages/twenty-docs/ui/primitives/input/field.mdx b/packages/twenty-docs/ui/primitives/input/field.mdxindex 82d81e8fd1c..cbf8096f4a8 100644--- a/packages/twenty-docs/ui/primitives/input/field.mdx+++ b/packages/twenty-docs/ui/primitives/input/field.mdx@@ -4,17 +4,36 @@ description: Connect a form control to its label, description, and validation fe---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import FieldReference from '/snippets/ui/generated/input/field.mdx';Use `Field` to group one control with its accessible label and helper text. Components such as [Input](/ui/primitives/input/input) integrate with the field directly.<StoryEmbed- storyId="ui-input-field--default"+ storyId="ui-input-field--display"title="Field example"- height={240}+ height={180}/>+## Usage++```tsx+import { Field, Input } from 'twenty-ui/primitives/input';++export const EmailField = () => (+ <Field.Root name="email" validationMode="onBlur">+ <Field.Label>Work email</Field.Label>+ <Input type="email" required placeholder="[email protected]" />+ <Field.Description>+ We send account updates to this address.+ </Field.Description>+ <Field.Error match="valueMissing">Enter your email address.</Field.Error>+ <Field.Error match="typeMismatch">Enter a valid email address.</Field.Error>+ </Field.Root>+);+```++`Field.Root` manages the control's name, disabled state, and validity. `Field.Label` and `Field.Description` connect their content to the control. Set validation timing with `validationMode`; use `validate` for custom validation.+## AnatomyPlace one control and its supporting parts inside `Field.Root`. This tree shows a field built with the styled `Input` component.@@ -40,26 +59,6 @@ Field.Root`Input` and `Textarea` already integrate with the field. Place them directly inside `Root`; they supply the control behavior themselves. Compound controls such as [Select](/ui/primitives/input/select#compose-with-a-field) keep their own root and parts inside the field.-## Labeled control--```tsx-import { Field, Input } from 'twenty-ui/primitives/input';--export const EmailField = () => (- <Field.Root name="email" validationMode="onBlur">- <Field.Label>Work email</Field.Label>- <Input type="email" required placeholder="[email protected]" />- <Field.Description>- We send account updates to this address.- </Field.Description>- <Field.Error match="valueMissing">Enter your email address.</Field.Error>- <Field.Error match="typeMismatch">Enter a valid email address.</Field.Error>- </Field.Root>-);-```--`Field.Root` manages the control's name, disabled state, and validity. `Field.Label` and `Field.Description` connect their content to the control. Set validation timing with `validationMode`; use `validate` for custom validation.-## External errorsUse `invalid` when your application owns the error state. An explicit `match` makes the error message visible.@@ -87,27 +86,42 @@ Use `Field.Item` inside a radio or checkbox group to associate each choice with<StoryEmbedstoryId="ui-input-field--grouped-items"title="Field items"- height={360}+ height={220}/>```tsximport { Field, Radio, RadioGroup } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';export const NotificationsField = () => (<Field.Root name="notifications"><Field.Label>Notifications</Field.Label>- <RadioGroup defaultValue="important">- <Field.Item>- <Field.Label>Important updates</Field.Label>+ <RadioGroup defaultValue="important" style={{ gap: 16, marginTop: 12 }}>+ <Field.Item style={{ display: 'flex', alignItems: 'start', gap: 12 }}><Radio value="important" />- <Field.Description>- Only messages that need your attention- </Field.Description>+ <Text>+ <Field.Label>Important updates</Field.Label>+ <Field.Description>+ Only messages that need your attention+ </Field.Description>+ </Text>+ </Field.Item>+ <Field.Item style={{ display: 'flex', alignItems: 'start', gap: 12 }}>+ <Radio value="all" />+ <Text>+ <Field.Label>All updates</Field.Label>+ <Field.Description>Every change to your records</Field.Description>+ </Text></Field.Item>- <Field.Item disabled>- <Field.Label>Daily digest</Field.Label>+ <Field.Item+ disabled+ style={{ display: 'flex', alignItems: 'start', gap: 12 }}+ ><Radio value="digest" />- <Field.Description>Coming soon</Field.Description>+ <Text>+ <Field.Label>Daily digest</Field.Label>+ <Field.Description>Coming soon</Field.Description>+ </Text></Field.Item></RadioGroup></Field.Root>diff --git a/packages/twenty-docs/ui/primitives/input/input-group.mdx b/packages/twenty-docs/ui/primitives/input/input-group.mdxindex 085c9385073..1e543fe96b0 100644--- a/packages/twenty-docs/ui/primitives/input/input-group.mdx+++ b/packages/twenty-docs/ui/primitives/input/input-group.mdx@@ -4,15 +4,49 @@ description: Add prefixes, suffixes, and actions around a text input.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import InputGroupReference from '/snippets/ui/generated/input/input-group.mdx';`InputGroup` gives an [Input](/ui/primitives/input/input) a shared border and optional leading or trailing content. Set `size` on the group to size the container and provide a default for its input. Explicit child size takes precedence over that default; the group still controls the shared layout height.<StoryEmbed- storyId="ui-input-inputgroup--default"+ storyId="ui-input-inputgroup--display"title="InputGroup example"- height={240}+ height={140}+/>++## Usage++```tsx+import { Field, Input, InputGroup } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';++export const WebsiteField = () => (+ <Field.Root name="website">+ <Field.Label>Website</Field.Label>+ <InputGroup+ startElement={+ <Text render={<span />} aria-hidden>+ https://+ </Text>+ }+ >+ <Input placeholder="example.com" />+ </InputGroup>+ <Field.Description>Enter the domain without https://.</Field.Description>+ </Field.Root>+);+```++`startElement` and `endElement` accept React nodes. Prefixes and suffixes are visual content; the input's submitted value contains only what the user enters.++## Visual choices++Compare prefix, suffix, and combined adornments at both input sizes. The group shares its size with the input.++<StoryEmbed+ storyId="ui-input-inputgroup--catalog"+ title="Visual choices for input group"+ height={300}/>## Anatomy@@ -37,24 +71,6 @@ Field.Root`startElement` and `endElement` are React node props, not separate components. `InputGroup` does not supply a label or manage validation. Give the input an accessible name, either through `Field.Label` or its own labeling attributes.-## Prefix and suffix--```tsx-import { Field, Input, InputGroup } from 'twenty-ui/primitives/input';--export const WebsiteField = () => (- <Field.Root name="website">- <Field.Label>Website</Field.Label>- <InputGroup startElement={<span aria-hidden>https://</span>}>- <Input placeholder="example.com" />- </InputGroup>- <Field.Description>Enter the domain without https://.</Field.Description>- </Field.Root>-);-```--`startElement` and `endElement` accept React nodes. Prefixes and suffixes are visual content; the input's submitted value contains only what the user enters.-## Trailing action```tsxdiff --git a/packages/twenty-docs/ui/primitives/input/input.mdx b/packages/twenty-docs/ui/primitives/input/input.mdxindex 9c8a148e3c5..a814fc9ec81 100644--- a/packages/twenty-docs/ui/primitives/input/input.mdx+++ b/packages/twenty-docs/ui/primitives/input/input.mdx@@ -4,18 +4,19 @@ description: A text input with native attributes, field integration, and two siz---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import InputReference from '/snippets/ui/generated/input/input.mdx';`Input` renders a text input and accepts native input attributes such as `type`, `name`, `required`, `disabled`, and `autoComplete`.<StoryEmbed- storyId="ui-input-input--default"+ storyId="ui-input-input--display"title="Input example"- height={240}+ height={140}/>-## Uncontrolled state+## Usage++### Uncontrolled stateUse `defaultValue` to set the initial email address. The input owns subsequent changes.@@ -36,6 +37,16 @@ export const EmailField = () => ();```+## Visual choices++Compare small and medium inputs in their default, focused, invalid, and disabled states. Use validation feedback alongside invalid styling.++<StoryEmbed+ storyId="ui-input-input--catalog"+ title="Visual choices for input"+ height={380}+/>+## Controlled statePass `value` and update it with `onValueChange` to own the same email address in React state. The callback receives the next string value and event details.diff --git a/packages/twenty-docs/ui/primitives/input/number-field.mdx b/packages/twenty-docs/ui/primitives/input/number-field.mdxindex 72a462ff4dd..bf45e617fbb 100644--- a/packages/twenty-docs/ui/primitives/input/number-field.mdx+++ b/packages/twenty-docs/ui/primitives/input/number-field.mdx@@ -11,16 +11,17 @@ import NumberFieldReference from '/snippets/ui/generated/input/number-field.mdx'For the compact preset with fixed formatting and modifier-step defaults, use [NumberStepper](/ui/components/input/number-stepper) from `twenty-ui/components/input`.<StoryEmbed- storyId="ui-input-numberfield--default"+ storyId="ui-input-numberfield--display"title="NumberField example"- height={200}+ height={140}/>-## Compose a field+## Usage`Root` owns numeric state. `Input` is the visible text input. Use `Group` to arrange optional decrement and increment controls around it. Supply content and accessible names for the controls; the primitive does not inject icons or labels.```tsx+import { IconMinus, IconPlus } from 'twenty-ui/icon';import { Field, NumberField } from 'twenty-ui/primitives/input';export const QuantityInput = () => (@@ -29,11 +30,11 @@ export const QuantityInput = () => (<NumberField.Root name="quantity" defaultValue={3} min={0} max={10}><NumberField.Group><NumberField.Decrement aria-label="Decrease quantity">- −+ <IconMinus size={16} /></NumberField.Decrement><NumberField.Input /><NumberField.Increment aria-label="Increase quantity">- ++ <IconPlus size={16} /></NumberField.Increment></NumberField.Group></NumberField.Root>@@ -87,7 +88,7 @@ Set `locale` and `format` on `Root`. They retain the installed Base UI contract:<StoryEmbedstoryId="ui-input-numberfield--locale-currency"title="Locale and currency formatting"- height={200}+ height={140}/>```tsx@@ -128,7 +129,7 @@ Typing and paste use the configured locale and supported format symbols. Blur no<StoryEmbedstoryId="ui-input-numberfield--with-scrubbing"title="Scrub the width label"- height={220}+ height={150}/>Compose `ScrubAreaCursor` inside `ScrubArea` for a custom cursor during pointer-lock scrubbing. It portals to the document body while active. Base UI falls back to the normal cursor for touch input, denied pointer lock, and WebKit. Set `allowWheelScrub` on `Root` to allow wheel adjustment while the input is focused and hovered; it defaults to `false`.diff --git a/packages/twenty-docs/ui/primitives/input/radio-group.mdx b/packages/twenty-docs/ui/primitives/input/radio-group.mdxindex ffe24fae7e9..3f77d03a541 100644--- a/packages/twenty-docs/ui/primitives/input/radio-group.mdx+++ b/packages/twenty-docs/ui/primitives/input/radio-group.mdx@@ -4,17 +4,39 @@ description: Manage a single selection across a set of radio options.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import RadioGroupReference from '/snippets/ui/generated/input/radio-group.mdx';`RadioGroup` coordinates the value, keyboard navigation, and form submission of its [Radio](/ui/primitives/input/radio) children.<StoryEmbed- storyId="ui-input-radiogroup--default"+ storyId="ui-input-radiogroup--display"title="RadioGroup example"- height={240}+ height={110}/>+## Usage++### Uncontrolled state++Use `defaultValue` to set the initial billing frequency. The group owns subsequent changes.++```tsx+import { Radio, RadioGroup } from 'twenty-ui/primitives/input';++export const BillingFrequency = () => (+ <RadioGroup+ name="billingFrequency"+ defaultValue="monthly"+ aria-label="Billing frequency"+ >+ <Radio value="monthly">Monthly</Radio>+ <Radio value="yearly">Yearly</Radio>+ </RadioGroup>+);+```++The group's `name` identifies the selected value in form submission. Give the group an accessible name as well as labeling each radio.+## AnatomyPut each `Radio` or `Radio.Root` inside the group and associate it with a label. Use `Radio.Indicator` to compose a custom indicator. `RadioGroup` and `Radio` are separate exports.@@ -38,41 +60,6 @@ fieldsetGive the group its own accessible name using `aria-label` or `aria-labelledby`. In the examples below, `aria-labelledby` connects the group to the legend. Each radio also needs its own name. Put selection props on `RadioGroup` and option values on `Radio`.-## Uncontrolled state--Use `defaultValue` to set the initial billing frequency. The group owns subsequent changes.--```tsx-import { useId } from 'react';-import { Radio, RadioGroup } from 'twenty-ui/primitives/input';--export const BillingFrequency = () => {- const labelId = useId();-- return (- <fieldset>- <legend id={labelId}>Billing frequency</legend>- <RadioGroup- name="billingFrequency"- defaultValue="monthly"- aria-labelledby={labelId}- >- <label>- <Radio value="monthly" />- Monthly- </label>- <label>- <Radio value="yearly" />- Yearly- </label>- </RadioGroup>- </fieldset>- );-};-```--The group's `name` identifies the selected value in form submission. Give the group an accessible name as well as labeling each radio.-## Controlled statePass `value` and update it with `onValueChange` to own the same billing frequency in React state. Selection belongs to the group, not to individual radio controls.diff --git a/packages/twenty-docs/ui/primitives/input/radio.mdx b/packages/twenty-docs/ui/primitives/input/radio.mdxindex b9c9480b618..63171dd0a92 100644--- a/packages/twenty-docs/ui/primitives/input/radio.mdx+++ b/packages/twenty-docs/ui/primitives/input/radio.mdx@@ -4,18 +4,17 @@ description: Render one option in a mutually exclusive radio group.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import RadioReference from '/snippets/ui/generated/input/radio.mdx';`Radio` represents one option inside [RadioGroup](/ui/primitives/input/radio-group). Give each option a distinct `value` and a visible label. The group owns the selected value.<StoryEmbed- storyId="ui-input-radio--documentation"+ storyId="ui-input-radio--display"title="Radio example"- height={240}+ height={140}/>-## Labeled options+## Usage```tsximport { Radio, RadioGroup } from 'twenty-ui/primitives/input';@@ -26,24 +25,27 @@ export const ContactMethod = () => (defaultValue="email"aria-label="Preferred contact method">- <label>- <Radio value="email" />- </label>- <label>- <Radio value="phone" />- Phone- </label>- <label>- <Radio value="post" disabled />+ <Radio value="email">Email</Radio>+ <Radio value="phone">Phone</Radio>+ <Radio value="post" disabled>Postal mail (unavailable)- </label>+ </Radio></RadioGroup>);```The `size` prop accepts `sm` or `md` and defaults to `sm`. Use the same size for options in a group.+## Visual choices++Compare selected and disabled states, sizes, and the default and card appearances. Use a labeled group of options for an actual choice.++<StoryEmbed+ storyId="ui-input-radio--catalog"+ title="Visual choices for radio"+ height={380}+/>+## Complete parts`Radio.Root` and `Radio.Indicator` expose the installed Base UI parts without the styled assembly. Compose them when you need custom content or indicator placement. The callable `Radio` supplies Twenty's radio appearance and indicator for common options.@@ -70,14 +72,33 @@ Standard radios and `Radio.Root` render a span with radio semantics and an adjacUse `variant="card"` for full-width options with an inset radio indicator. Card radios keep their div root by default. Use `render` to choose another element explicitly. When that element is a native button, also set `nativeButton`. Keep interactive controls outside the card content.+Give the group enough width for its content and leave space for the indicator at the top right. A title, icon, and short description help explain each choice.+<StoryEmbedstoryId="ui-input-radio--cards-documentation"title="Radio card options"- height={280}+ height={290}/>```tsx+import { IconLayoutKanban, IconTable } from 'twenty-ui/icon';import { Radio, RadioGroup } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';++const VIEWS = [+ {+ value: 'table',+ title: 'Table view',+ description: 'Browse records in rows.',+ Icon: IconTable,+ },+ {+ value: 'board',+ title: 'Board view',+ description: 'Track progress across columns.',+ Icon: IconLayoutKanban,+ },+];export const ViewChoice = () => (<RadioGroup@@ -85,12 +106,25 @@ export const ViewChoice = () => (defaultValue="table"style={{ width: 280 }}>- <Radio variant="card" value="table">- Table view- </Radio>- <Radio variant="card" value="board">- Board view- </Radio>+ {VIEWS.map(({ value, title, description, Icon }) => (+ <Radio key={value} variant="card" value={value}>+ <span style={{ display: 'grid', gap: 8, paddingInlineEnd: 24 }}>+ <Icon size={20} aria-hidden />+ <Text+ render={<span />}+ style={{ fontWeight: 'var(--t-font-weight-medium)' }}+ >+ {title}+ </Text>+ <Text+ render={<span />}+ style={{ color: 'var(--t-font-color-secondary)', lineHeight: 1.5 }}+ >+ {description}+ </Text>+ </span>+ </Radio>+ ))}</RadioGroup>);```diff --git a/packages/twenty-docs/ui/primitives/input/select.mdx b/packages/twenty-docs/ui/primitives/input/select.mdxindex 99902987eb7..d776098e171 100644--- a/packages/twenty-docs/ui/primitives/input/select.mdx+++ b/packages/twenty-docs/ui/primitives/input/select.mdx@@ -4,17 +4,59 @@ description: Choose one or more values from a popup list of options.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import SelectReference from '/snippets/ui/generated/input/select.mdx';Use `Select` for a form value chosen from a list. [Dropdown](/ui/components/navigation/dropdown) remains the main higher-level API for menus, pickers, panels, and pages that combine those workflows.<StoryEmbed- storyId="ui-input-select--documentation"+ storyId="ui-input-select--display"title="Select example"- height={400}+ height={240}/>+## Usage++### Uncontrolled state++Use `defaultValue` to set the initial priority. The select owns subsequent selection changes.++```tsx+import { Select } from 'twenty-ui/primitives/input';++const PRIORITIES = [+ { value: 'low', label: 'Low' },+ { value: 'normal', label: 'Normal' },+ { value: 'high', label: 'High' },+];++export const PrioritySelect = () => (+ <Select.Root name="priority" defaultValue="normal" items={PRIORITIES}>+ <Select.Trigger aria-label="Priority">+ <Select.Value placeholder="Choose a priority" />+ <Select.Icon />+ </Select.Trigger>+ <Select.Portal>+ <Select.Positioner+ align="start"+ sideOffset={8}+ alignItemWithTrigger={false}+ >+ <Select.Popup>+ {PRIORITIES.map(({ value, label }) => (+ <Select.Item key={value} value={value}>+ <Select.ItemText>{label}</Select.ItemText>+ <Select.ItemIndicator />+ </Select.Item>+ ))}+ </Select.Popup>+ </Select.Positioner>+ </Select.Portal>+ </Select.Root>+);+```++Supply `items` on `Root` so `Value` renders the selected item's label; without it, the trigger shows the raw value. The selected value can be `null` when nothing is selected.+## AnatomyCompose the public parts inside `Select.Root`. `Trigger` and `Item` render only their children. Add `Icon`, `ItemText`, and `ItemIndicator` explicitly when you want the default chevron, label, and checkmark.@@ -63,47 +105,6 @@ Select.Root`Portal`, `List`, `Backdrop`, arrows, and indicators are optional. Use `Positioner` around `Popup` for positioning, including when you render the popup inline without a portal.-## Uncontrolled state--Use `defaultValue` to set the initial priority. The select owns subsequent selection changes.--```tsx-import { Select } from 'twenty-ui/primitives/input';--const PRIORITIES = [- { value: 'low', label: 'Low' },- { value: 'normal', label: 'Normal' },- { value: 'high', label: 'High' },-];--export const PrioritySelect = () => (- <Select.Root name="priority" defaultValue="normal" items={PRIORITIES}>- <Select.Trigger aria-label="Priority">- <Select.Value placeholder="Choose a priority" />- <Select.Icon />- </Select.Trigger>- <Select.Portal>- <Select.Positioner- align="start"- sideOffset={8}- alignItemWithTrigger={false}- >- <Select.Popup>- {PRIORITIES.map(({ value, label }) => (- <Select.Item key={value} value={value}>- <Select.ItemText>{label}</Select.ItemText>- <Select.ItemIndicator />- </Select.Item>- ))}- </Select.Popup>- </Select.Positioner>- </Select.Portal>- </Select.Root>-);-```--Supply `items` on `Root` so `Value` renders the selected item's label; without it, the trigger shows the raw value. The selected value can be `null` when nothing is selected.-## Controlled statePass `value` and update it with `onValueChange` to own the same priority in React state. The callback receives the next value and event details.@@ -403,7 +404,7 @@ export const PositionedPrioritySelect = () => {<StoryEmbedstoryId="ui-input-select-portals--positioning-documentation"title="Select with a custom anchor and scrollable list"- height={440}+ height={480}/>## Native forms and callback detailsdiff --git a/packages/twenty-docs/ui/primitives/input/slider.mdx b/packages/twenty-docs/ui/primitives/input/slider.mdxindex 977126b092e..0e2ca7ebcb5 100644--- a/packages/twenty-docs/ui/primitives/input/slider.mdx+++ b/packages/twenty-docs/ui/primitives/input/slider.mdx@@ -4,15 +4,53 @@ description: Choose a numeric value or range with draggable, keyboard-accessible---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import SliderReference from '/snippets/ui/generated/input/slider.mdx';`Slider` supports a single number or an array of numbers for a range. Compose its label, track, indicator, and thumbs inside `Root`.<StoryEmbed- storyId="ui-input-slider--default"+ storyId="ui-input-slider--display"title="Slider example"- height={240}+ height={120}+/>++## Usage++### Uncontrolled state++Use `defaultValue` to set the initial volume. The slider owns subsequent changes.++```tsx+import { Slider } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';++export const VolumeSlider = () => (+ <Slider.Root name="volume" defaultValue={40} min={0} max={100} step={1}>+ <Text+ render={<div />}+ style={{ display: 'flex', justifyContent: 'space-between' }}+ >+ <Slider.Label>Volume</Slider.Label>+ <Slider.Value />+ </Text>+ <Slider.Control>+ <Slider.Track>+ <Slider.Indicator />+ <Slider.Thumb />+ </Slider.Track>+ </Slider.Control>+ </Slider.Root>+);+```++## Visual choices++Compare the accent and success colors at minimum, middle, maximum, and disabled values. The enabled sliders remain interactive.++<StoryEmbed+ storyId="ui-input-slider--catalog"+ title="Visual choices for slider"+ height={340}/>## Anatomy@@ -41,27 +79,6 @@ Slider.RootFor a range, add a thumb for each value with its matching `index` and a distinct accessible name. Labels and numeric output stay outside `Control`, so they do not become part of the draggable area.-## Uncontrolled state--Use `defaultValue` to set the initial volume. The slider owns subsequent changes.--```tsx-import { Slider } from 'twenty-ui/primitives/input';--export const VolumeSlider = () => (- <Slider.Root name="volume" defaultValue={40} min={0} max={100} step={1}>- <Slider.Label>Volume</Slider.Label>- <Slider.Value />- <Slider.Control>- <Slider.Track>- <Slider.Indicator />- <Slider.Thumb />- </Slider.Track>- </Slider.Control>- </Slider.Root>-);-```-## Controlled statePass `value` and update it with `onValueChange` to own the same volume in React state. The callback receives the next value and event details.@@ -137,7 +154,13 @@ Set `color="success"` for the alternative palette; the default is `accent`.The default `thumbAlignment` is `edge`. Pass `center` or `edge-client-only` to override it. Native `className`, `style`, and `render` composition remain available on each part, including state functions.<Note>-With `edge` and `edge-client-only` alignment, Base UI 1.8 and 1.9 never re-measure a thumb after its `Slider.Control` resizes, and a slider mounted while hidden keeps its thumbs hidden once shown ([mui/base-ui#5995](https://github.com/mui/base-ui/issues/5995)). React front components hit the same issue on their first render. Use `thumbAlignment="center"` until a Base UI release includes the fix ([mui/base-ui#6000](https://github.com/mui/base-ui/pull/6000)).+ With `edge` and `edge-client-only` alignment, Base UI 1.8 and 1.9 never+ re-measure a thumb after its `Slider.Control` resizes, and a slider mounted+ while hidden keeps its thumbs hidden once shown+ ([mui/base-ui#5995](https://github.com/mui/base-ui/issues/5995)). React front+ components hit the same issue on their first render. Use+ `thumbAlignment="center"` until a Base UI release includes the fix+ ([mui/base-ui#6000](https://github.com/mui/base-ui/pull/6000)).</Note>## Native integration and typesdiff --git a/packages/twenty-docs/ui/primitives/input/switch.mdx b/packages/twenty-docs/ui/primitives/input/switch.mdxindex 957e2242d6a..1ce6fe88ab4 100644--- a/packages/twenty-docs/ui/primitives/input/switch.mdx+++ b/packages/twenty-docs/ui/primitives/input/switch.mdx@@ -4,51 +4,77 @@ description: A labeled on or off control with controlled and uncontrolled state.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import SwitchReference from '/snippets/ui/generated/input/switch.mdx';Use `Switch` for an on or off preference. Give the control a visible label or an accessible name.<StoryEmbed- storyId="ui-input-switch-switch--default"+ storyId="ui-input-switch-switch--display"title="Switch example"- height={240}+ height={90}/>-## Uncontrolled state+## Usage++### Uncontrolled stateUse `defaultChecked` to set the initial checked state. The switch owns subsequent changes.```tsx+import { useId } from 'react';import { Switch } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';-export const NotificationsPreference = () => (- <label>- <Switch name="notifications" defaultChecked />- Email notifications- </label>-);+export const NotificationsPreference = () => {+ const switchId = useId();++ return (+ <label+ htmlFor={switchId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ >+ <Switch id={switchId} name="notifications" />+ <Text render={<span />}>Email notifications</Text>+ </label>+ );+};```+## Visual choices++Compare the two sizes in on, off, disabled, read-only, and focus states. Use the enabled examples to try toggling.++<StoryEmbed+ storyId="ui-input-switch-switch--catalog"+ title="Visual choices for switch"+ height={440}+/>+## Controlled statePass `checked` and update it with `onCheckedChange` to own the same preference in React state.```tsx-import { useState } from 'react';+import { useId, useState } from 'react';import { Switch } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';export const NotificationsPreference = () => {- const [checked, setChecked] = useState(true);+ const switchId = useId();+ const [checked, setChecked] = useState(false);return (- <label>+ <label+ htmlFor={switchId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ ><Switch+ id={switchId}name="notifications"checked={checked}onCheckedChange={setChecked}/>- Email notifications+ <Text render={<span />}>Email notifications</Text></label>);};@@ -85,7 +111,7 @@ Thumb receives the current checked, disabled, readOnly, required, and Field stat<StoryEmbedstoryId="ui-input-switch-parts--composition"title="Switch part composition"- height={240}+ height={90}/>The callable assembly and its `SwitchProps` type remain supported. Replace the assembly with Root and its part when supplying custom thumb content instead of appending another part to the assembly's children.diff --git a/packages/twenty-docs/ui/primitives/input/textarea.mdx b/packages/twenty-docs/ui/primitives/input/textarea.mdxindex 8ab1c1396ab..8d1614471b5 100644--- a/packages/twenty-docs/ui/primitives/input/textarea.mdx+++ b/packages/twenty-docs/ui/primitives/input/textarea.mdx@@ -4,18 +4,19 @@ description: Enter multiple lines of text with optional automatic resizing.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import TextareaReference from '/snippets/ui/generated/input/textarea.mdx';Use `Textarea` for notes, descriptions, and other multiline values. It integrates with [Field](/ui/primitives/input/field) for labels and validation.<StoryEmbed- storyId="ui-input-textarea--default"+ storyId="ui-input-textarea--display"title="Textarea example"- height={240}+ height={190}/>-## Uncontrolled state+## Usage++### Uncontrolled stateUse `defaultValue` to set the initial notes. The textarea owns subsequent changes.@@ -33,6 +34,16 @@ export const NotesField = () => (Native textarea attributes such as `rows`, `maxLength`, `required`, and `readOnly` are available. `size` accepts `sm` or `md` and defaults to `md`.+## Visual choices++Compare the two sizes in default, focused, invalid, and disabled states. Automatic resizing is demonstrated separately below.++<StoryEmbed+ storyId="ui-input-textarea--catalog"+ title="Visual choices for textarea"+ height={440}+/>+## Controlled statePass `value` and update it with `onValueChange` to own the same notes in React state. The callback receives the next string value and event details; native `onChange` is also available.diff --git a/packages/twenty-docs/ui/primitives/layout/collapsible.mdx b/packages/twenty-docs/ui/primitives/layout/collapsible.mdxindex af4c0711712..b832833ead6 100644--- a/packages/twenty-docs/ui/primitives/layout/collapsible.mdx+++ b/packages/twenty-docs/ui/primitives/layout/collapsible.mdx@@ -8,18 +8,10 @@ import CollapsibleReference from '/snippets/ui/generated/layout/collapsible.mdx'`Collapsible` exposes Base UI's Root, Trigger, and Panel contracts. Root owns expansion state, Trigger supplies keyboard activation and the panel relationship, and Panel owns animation and content lifetime.-## Anatomy--```text-Collapsible.Root-├── Collapsible.Trigger-└── Collapsible.Panel- └── Content-```-<StoryEmbed- storyId="ui-layout-collapsible--documentation"+ storyId="ui-layout-collapsible--display"title="Collapsible example"+ height={160}/>## Usage@@ -30,12 +22,20 @@ import { Collapsible } from 'twenty-ui/primitives/layout';import { Text } from 'twenty-ui/primitives/typography';export const ImportDetails = () => (- <Collapsible.Root defaultOpen>+ <Collapsible.Root defaultOpen style={{ width: 360, maxWidth: '100%' }}><Collapsible.Trigger render={<Button />}>Import details</Collapsible.Trigger><Collapsible.Panel>- <Text>Match each CSV column to a record field before importing.</Text>+ <Text+ style={{+ paddingTop: 12,+ color: 'var(--t-font-color-secondary)',+ lineHeight: 1.5,+ }}+ >+ Match each CSV column to a record field before importing.+ </Text></Collapsible.Panel></Collapsible.Root>);@@ -45,6 +45,15 @@ Use `defaultOpen` for uncontrolled expansion. Use `open` and `onOpenChange` whenTriggers inherit Root's `disabled` state and can override it with their own `disabled` prop. The native trigger supports Enter and Space and supplies `aria-expanded` and `aria-controls` automatically. Give each trigger a meaningful accessible name.+## Anatomy++```text+Collapsible.Root+├── Collapsible.Trigger+└── Collapsible.Panel+ └── Content+```+## Native customizationRoot and Panel render a `div`; Trigger renders a `button`. Each part accepts native attributes, handlers, `className`, `style`, refs, and Base UI `render` composition. Class and style callbacks receive the part's state. Forward all supplied props and the ref from custom render components. Set `nativeButton={false}` when Trigger renders a non-button element.diff --git a/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx b/packages/twenty-docs/ui/primitives/layout/direction-provider.mdxindex 1b91a974387..91c53d27b5a 100644--- a/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx+++ b/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx@@ -10,8 +10,9 @@ import DirectionProviderReference from '/snippets/ui/generated/layout/direction-`DirectionProvider` supplies `ltr` or `rtl` direction to Twenty UI controls. It does not render a DOM element or set an HTML `dir` attribute. Set both the provider direction and the matching document direction.<StoryEmbed- storyId="components-input-segmentedcontrol--right-to-left-documentation"+ storyId="ui-layout-directionprovider--display"title="DirectionProvider example"+ height={160}/>## Usage@@ -19,12 +20,13 @@ import DirectionProviderReference from '/snippets/ui/generated/layout/direction-```tsximport { SegmentedControl } from 'twenty-ui/components/input';import { DirectionProvider } from 'twenty-ui/primitives/layout';+import { Text } from 'twenty-ui/primitives/typography';type DirectionalChoicesProps = { direction: 'ltr' | 'rtl' };export const DirectionalChoices = ({ direction }: DirectionalChoicesProps) => (<DirectionProvider direction={direction}>- <div dir={direction}>+ <Text dir={direction}><SegmentedControlaria-label="Billing period"defaultValue="annual"@@ -33,7 +35,7 @@ export const DirectionalChoices = ({ direction }: DirectionalChoicesProps) => ({ label: 'Monthly', value: 'monthly' },]}/>- </div>+ </Text></DirectionProvider>);```@@ -54,8 +56,8 @@ Text, indentation, attached button corners, and directional disclosure icons fol<StoryEmbedstoryId="ui-layout-directionprovider--reading-directions"- title="Light and dark reading directions"- height={1500}+ title="Left-to-right and right-to-left layouts"+ height={1260}/>## Propsdiff --git a/packages/twenty-docs/ui/primitives/layout/resize-handle.mdx b/packages/twenty-docs/ui/primitives/layout/resize-handle.mdxindex 4917e88f0a7..2656d0a7327 100644--- a/packages/twenty-docs/ui/primitives/layout/resize-handle.mdx+++ b/packages/twenty-docs/ui/primitives/layout/resize-handle.mdx@@ -10,19 +10,19 @@ import ResizeHandleReference from '/snippets/ui/generated/layout/resize-handle.m`ResizeHandle` manages a numeric size and exposes a focusable separator. The application applies that size to the panel; the handle does not resize another element automatically.<StoryEmbed- storyId="ui-layout-resizehandle--resizable-documentation"+ storyId="ui-layout-resizehandle--display"title="ResizeHandle example"+ height={600}/>## UsageUse `edge` for a panel boundary, or `axis="y"` for inline height resizing and `axis="x"` for inline width resizing. Give the handle a specific accessible name and use `aria-controls` to identify the panel.-## Uncontrolled state-```tsximport { useId, useState } from 'react';import { ResizeHandle } from 'twenty-ui/primitives/layout';+import { Card } from 'twenty-ui/primitives/surfaces';import { Text } from 'twenty-ui/primitives/typography';export const ResizableNotes = () => {@@ -30,20 +30,41 @@ export const ResizableNotes = () => {const [height, setHeight] = useState(150);return (- <>- <Text id={panelId} style={{ height, overflow: 'auto' }}>- Record notes+ <Card.Root style={{ width: 300, maxWidth: '100%' }}>+ <Text+ id={panelId}+ style={{+ height,+ overflow: 'auto',+ padding: 16,+ boxSizing: 'border-box',+ }}+ >+ <Text+ style={{+ color: 'var(--t-font-color-primary)',+ fontWeight: 'var(--t-font-weight-medium)',+ }}+ >+ Record notes+ </Text>+ <Text style={{ marginTop: 8, lineHeight: 1.5 }}>+ Follow up with Morgan about the proposal. Share the revised timeline+ before Friday.+ </Text></Text>- <ResizeHandle- axis="y"- defaultValue={150}- onValueChange={setHeight}- min={50}- max={500}- aria-label="Resize notes height"- aria-controls={panelId}- />- </>+ <Text style={{ padding: 4 }}>+ <ResizeHandle+ axis="y"+ defaultValue={150}+ onValueChange={setHeight}+ min={50}+ max={500}+ aria-label="Resize notes height"+ aria-controls={panelId}+ />+ </Text>+ </Card.Root>);};```@@ -55,6 +76,7 @@ The handle owns its value. `onValueChange` copies the latest size to the panel l```tsximport { useId, useState } from 'react';import { ResizeHandle } from 'twenty-ui/primitives/layout';+import { Card } from 'twenty-ui/primitives/surfaces';import { Text } from 'twenty-ui/primitives/typography';export const ResizableNotes = () => {@@ -62,20 +84,41 @@ export const ResizableNotes = () => {const [height, setHeight] = useState(150);return (- <>- <Text id={panelId} style={{ height, overflow: 'auto' }}>- Record notes+ <Card.Root style={{ width: 300, maxWidth: '100%' }}>+ <Text+ id={panelId}+ style={{+ height,+ overflow: 'auto',+ padding: 16,+ boxSizing: 'border-box',+ }}+ >+ <Text+ style={{+ color: 'var(--t-font-color-primary)',+ fontWeight: 'var(--t-font-weight-medium)',+ }}+ >+ Record notes+ </Text>+ <Text style={{ marginTop: 8, lineHeight: 1.5 }}>+ Follow up with Morgan about the proposal. Share the revised timeline+ before Friday.+ </Text></Text>- <ResizeHandle- axis="y"- value={height}- onValueChange={setHeight}- min={50}- max={500}- aria-label="Resize notes height"- aria-controls={panelId}- />- </>+ <Text style={{ padding: 4 }}>+ <ResizeHandle+ axis="y"+ value={height}+ onValueChange={setHeight}+ min={50}+ max={500}+ aria-label="Resize notes height"+ aria-controls={panelId}+ />+ </Text>+ </Card.Root>);};```@@ -130,11 +173,13 @@ export const ResizableDetails = ({<StoryEmbedstoryId="ui-layout-resizehandle-panels--documentation"title="ResizeHandle panel edge example"+ height={250}/><StoryEmbedstoryId="ui-layout-resizehandle-panels--gap"title="ResizeHandle panel gap example"+ height={520}/>The application owns the layout, saved size, collapse state and focus destination when collapsing removes the handle. Use `onActivate` for an optional collapse action.diff --git a/packages/twenty-docs/ui/primitives/layout/separator.mdx b/packages/twenty-docs/ui/primitives/layout/separator.mdxindex 09f33db0a55..c7cbc4bb595 100644--- a/packages/twenty-docs/ui/primitives/layout/separator.mdx+++ b/packages/twenty-docs/ui/primitives/layout/separator.mdx@@ -10,8 +10,9 @@ import SeparatorReference from '/snippets/ui/generated/layout/separator.mdx';`Separator` renders a `div` with `role="separator"` and an accessible orientation. It uses the Base UI separator contract, including native props, refs, and `render` composition. Import `SeparatorProps` from the same entry point.<StoryEmbed- storyId="ui-layout-separator--documentation"+ storyId="ui-layout-separator--display"title="Horizontal separator"+ height={130}/>## Usage@@ -36,6 +37,7 @@ export const ImportSources = () => (<StoryEmbedstoryId="ui-layout-separator--vertical-documentation"title="Vertical separator"+ height={150}/>## Labeled dividersdiff --git a/packages/twenty-docs/ui/primitives/navigation/breadcrumb.mdx b/packages/twenty-docs/ui/primitives/navigation/breadcrumb.mdxindex 938147f4f13..7e3ba96b582 100644--- a/packages/twenty-docs/ui/primitives/navigation/breadcrumb.mdx+++ b/packages/twenty-docs/ui/primitives/navigation/breadcrumb.mdx@@ -10,9 +10,9 @@ import BreadcrumbReference from '/snippets/ui/generated/navigation/breadcrumb.md`Breadcrumb` renders an ordered navigation trail. It includes decorative separators, link focus styles, and truncation of the final item's label. Items preserve native anchor behavior and support custom routing through `render`.<StoryEmbed- storyId="primitives-navigation-breadcrumb--default"+ storyId="primitives-navigation-breadcrumb--display"title="Breadcrumb example"- height={160}+ height={100}/>## Usage@@ -97,7 +97,7 @@ The final item shrinks and truncates with an ellipsis when the container has lim<StoryEmbedstoryId="primitives-navigation-breadcrumb--truncation"title="Breadcrumb with a long current page label"- height={160}+ height={100}/>## Rich content@@ -107,7 +107,7 @@ An item's `children` can include text and supporting visual content. Keep the la<StoryEmbedstoryId="primitives-navigation-breadcrumb--rich-content"title="Breadcrumb with supporting content"- height={160}+ height={100}/>## Text direction@@ -117,7 +117,7 @@ The trail follows the surrounding text direction. Set `dir="rtl"` on `Breadcrumb<StoryEmbedstoryId="primitives-navigation-breadcrumb--rtl"title="Breadcrumb in right-to-left content"- height={160}+ height={100}/>## Root customizationdiff --git a/packages/twenty-docs/ui/primitives/navigation/list-item.mdx b/packages/twenty-docs/ui/primitives/navigation/list-item.mdxindex f66e539e252..47379d99192 100644--- a/packages/twenty-docs/ui/primitives/navigation/list-item.mdx+++ b/packages/twenty-docs/ui/primitives/navigation/list-item.mdx@@ -10,11 +10,22 @@ import ListItemReference from '/snippets/ui/generated/navigation/list-item.mdx';`ListItem` supplies the visual layout shared by list and menu rows. It renders a `div` by default for passive content. Use [ListItemButton](/ui/components/navigation/list-item-button) for ordinary action rows. Compose `ListItem` with an anchor for navigation or with a custom semantic owner when needed. Use [Dropdown](/ui/components/navigation/dropdown) or [Select](/ui/primitives/input/select) when you need a complete popup or selection owner.<StoryEmbed- storyId="ui-navigation-listitem--default"+ storyId="ui-navigation-listitem--display"title="ListItem example"- height={240}+ height={100}/>+## Usage++```tsx+import { IconBell } from 'twenty-ui/icon';+import { ListItem } from 'twenty-ui/primitives/navigation';++export const NotificationRow = () => (+ <ListItem startIcon={<IconBell />}>Notifications</ListItem>+);+```+## Anatomy`ListItem` exposes content slots through props. These slots arrange content inside one row; they are not separately exported components.@@ -71,7 +82,7 @@ A custom button owner can still compose `ListItem` through `render`. That owner<StoryEmbedstoryId="ui-navigation-listitem--button-owner"title="Custom button composition"- height={160}+ height={100}/>## Navigation and explicit links@@ -91,7 +102,7 @@ export const DocumentationLink = () => (<StoryEmbedstoryId="ui-navigation-listitem--link-owner"title="Link row"- height={160}+ height={100}/>String labels stay text, including URL-shaped strings. ListItem does not create links. To link part of a non-interactive row, supply an anchor as caller-owned content. Keep that row as a `div` to avoid nested links or buttons. String labels retain their truncation and overflow tooltip; custom content can use [OverflowingTextWithTooltip](/ui/primitives/typography/overflowing-text-with-tooltip) with an explicit rendered anchor.@@ -122,9 +133,9 @@ export const RecordActions = ({ onDuplicate }: RecordActionsProps) => (```<StoryEmbed- storyId="ui-components-dropdown--documentation"+ storyId="ui-components-dropdown--display"title="Dropdown item owner"- height={260}+ height={420}/>## Native event policy@@ -192,7 +203,7 @@ Place an [Avatar](/ui/primitives/data-display/avatar) in `startIcon` to identify<StoryEmbedstoryId="ui-navigation-listitem-picker--single-selection"title="Single selection rows"- height={260}+ height={170}/>```tsx@@ -230,7 +241,7 @@ Compose [Tag](/ui/primitives/data-display/tag) as the row content for tagged val<StoryEmbedstoryId="ui-navigation-listitem-picker--multiple-selection"title="Multiple selection rows"- height={260}+ height={170}/>```tsxdiff --git a/packages/twenty-docs/ui/primitives/navigation/tabs.mdx b/packages/twenty-docs/ui/primitives/navigation/tabs.mdxindex c2ee9d9cdb5..8335fbf0413 100644--- a/packages/twenty-docs/ui/primitives/navigation/tabs.mdx+++ b/packages/twenty-docs/ui/primitives/navigation/tabs.mdx@@ -9,11 +9,35 @@ import TabsReference from '/snippets/ui/generated/navigation/tabs.mdx';`Tabs` connects each tab to a related content panel using a shared `value`. Keep values unique within a root. Use [TabButton](/ui/components/navigation/tab-button) for route links and adjacent actions.<StoryEmbed- storyId="ui-navigation-tabs--documentation"+ storyId="ui-navigation-tabs--display"title="Tabs example"- height={240}+ height={160}/>+## Usage++Use `defaultValue` to set the initial selection. The root owns subsequent changes.++```tsx+import { Tabs } from 'twenty-ui/primitives/navigation';++export const RecordTabs = () => (+ <Tabs.Root defaultValue="overview">+ <Tabs.List aria-label="Record details">+ <Tabs.Tab value="overview">Overview</Tabs.Tab>+ <Tabs.Tab value="activity">Activity</Tabs.Tab>+ <Tabs.Tab value="settings">Settings</Tabs.Tab>+ <Tabs.Indicator />+ </Tabs.List>+ <Tabs.Panel value="overview">Record overview</Tabs.Panel>+ <Tabs.Panel value="activity">Recent activity</Tabs.Panel>+ <Tabs.Panel value="settings">Record settings</Tabs.Panel>+ </Tabs.Root>+);+```++`Tabs.Tab` accepts `startIcon`, `endIcon`, `badge`, and a `size` of `sm` or `md` (default `sm`). The remaining props retain the installed Base UI contract. Values are not restricted to strings or numbers. Reference values must use the same identity on their tab, panel, and root. A root value of `null` selects no panel.+## AnatomyPlace tabs and an optional indicator inside `Tabs.List`. Place their panels alongside the list, all within the same `Tabs.Root`.@@ -42,30 +66,6 @@ When you provide a custom `id` on `Tabs.Panel`, set `aria-controls` on the matchAdd one `Tabs.Indicator` when you want the active underline. `List` does not insert an indicator.-## Uncontrolled state--Use `defaultValue` to set the initial selection. The root owns subsequent changes.--```tsx-import { Tabs } from 'twenty-ui/primitives/navigation';--export const RecordTabs = () => (- <Tabs.Root defaultValue="overview">- <Tabs.List aria-label="Record details">- <Tabs.Tab value="overview">Overview</Tabs.Tab>- <Tabs.Tab value="activity" badge={3}>- Activity- </Tabs.Tab>- <Tabs.Indicator />- </Tabs.List>- <Tabs.Panel value="overview">Company and contact details.</Tabs.Panel>- <Tabs.Panel value="activity">Recent calls and emails.</Tabs.Panel>- </Tabs.Root>-);-```--`Tabs.Tab` accepts `startIcon`, `endIcon`, `badge`, and a `size` of `sm` or `md` (default `sm`). The remaining props retain the installed Base UI contract. Values are not restricted to strings or numbers. Reference values must use the same identity on their tab, panel, and root. A root value of `null` selects no panel.-## Controlled state and event detailsPass `value` and update it with `onValueChange` to own selection. The callback receives the next value and Base UI event details, including the originating `event`, `reason`, `activationDirection`, and `cancel()`.diff --git a/packages/twenty-docs/ui/primitives/surfaces/alert-dialog.mdx b/packages/twenty-docs/ui/primitives/surfaces/alert-dialog.mdxindex 1aa51ef5c6d..187d10a6610 100644--- a/packages/twenty-docs/ui/primitives/surfaces/alert-dialog.mdx+++ b/packages/twenty-docs/ui/primitives/surfaces/alert-dialog.mdx@@ -4,7 +4,6 @@ description: Ask for confirmation before an action that needs an explicit decisi---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import AlertDialogReference from '/snippets/ui/generated/surfaces/alert-dialog.mdx';Use `AlertDialog` for a decision that interrupts the current workflow, such as confirming deletion. It provides `alertdialog` semantics, focus management, and explicit confirmation or cancellation.@@ -12,49 +11,14 @@ Use `AlertDialog` for a decision that interrupts the current workflow, such as cThis primitive is for standalone Twenty UI and host-owned interfaces. Front components must request a confirmation through the [SDK host dialog API](/developers/extend/apps/layout/front-components#host-communication-api). Direct `Dialog`, `AlertDialog`, and native browser dialogs are prohibited inside the front component renderer.<StoryEmbed- storyId="ui-surfaces-alertdialog--documentation"+ storyId="ui-surfaces-alertdialog--display"title="AlertDialog example"height={440}/>-## Anatomy--Keep related parts inside `AlertDialog.Root`, or connect detached triggers through a handle. Compose the portal, backdrop, viewport, and popup separately.--```text-AlertDialog.Root-├── AlertDialog.Trigger-└── AlertDialog.Portal- ├── AlertDialog.Backdrop- └── AlertDialog.Viewport- └── AlertDialog.Popup- ├── AlertDialog.Header- │ ├── AlertDialog.Title- │ └── AlertDialog.Description- ├── AlertDialog.Body- └── AlertDialog.Footer- ├── AlertDialog.Close- └── Confirmation action-```--| Part | Requirement | Purpose |-| -------------------------- | --------------------------------------------- | ----------------------------------------------------------------------- |-| `Root` | Required | Coordinates open state and modal behavior. |-| `Trigger` | Optional for a programmatically opened dialog | Opens the dialog and provides a return focus target. |-| `Portal` | Recommended | Moves the overlay to its container and controls mounting. |-| `Backdrop` | Optional | Visually separates the alert from the surrounding page. |-| `Viewport` | Recommended | Positions the popup and provides its scrollable surrounding area. |-| `Popup` | Required | Renders the alert content with focus management. |-| `Title` | Recommended | Supplies the visible alert name. An accessible name is always required. |-| `Description` | Recommended for a confirmation | Explains the decision and its consequences. |-| `Header`, `Body`, `Footer` | Optional layout parts | Arrange headings, additional content, and actions. |-| `Close` | Recommended for cancellation | Supplies an explicit close action. |--Set `container` and `keepMounted` on `Portal`, backdrop attributes on `Backdrop`, layout attributes on `Viewport`, and `size` and focus props on `Popup`. Each element part accepts its own native attributes, handlers, ref, and `render` composition. `Popup.ref` points to the alert content element. `Title` and `Description` establish the accessible relationships; provide `aria-label` on `Popup` when omitting a title.--The confirmation action is application content, not an exported part. Use `Close` with a synchronous handler or a `Button` with controlled open state for asynchronous confirmation.+## Usage-## Uncontrolled state+### Uncontrolled stateUse `defaultOpen` to set the initial visibility. The dialog owns subsequent changes from its trigger, close controls, and dismissal interactions.@@ -67,7 +31,7 @@ type DeleteConfirmationProps = { onDelete: () => void };export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => (<AlertDialog.Root defaultOpen={false}><AlertDialog.Trigger- render={<Button color="danger">Delete record</Button>}+ render={<Button variant="solid">Delete record</Button>}/><AlertDialog.Portal><AlertDialog.Backdrop />@@ -76,13 +40,12 @@ export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => (<AlertDialog.Header><AlertDialog.Title>Delete this record?</AlertDialog.Title><AlertDialog.Description>- This action cannot be undone.+ This record will be permanently deleted. This action cannot be+ undone.</AlertDialog.Description></AlertDialog.Header><AlertDialog.Footer>- <AlertDialog.Close- render={<Button variant="outline">Cancel</Button>}- />+ <AlertDialog.Close render={<Button>Cancel</Button>} /><AlertDialog.CloseonClick={onDelete}render={<Button color="danger">Delete</Button>}@@ -97,6 +60,43 @@ export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => (`defaultOpen` defaults to `false`, so it can be omitted. This example uses a synchronous confirmation callback and closes after the action runs.+## Anatomy++Keep related parts inside `AlertDialog.Root`, or connect detached triggers through a handle. Compose the portal, backdrop, viewport, and popup separately.++```text+AlertDialog.Root+├── AlertDialog.Trigger+└── AlertDialog.Portal+ ├── AlertDialog.Backdrop+ └── AlertDialog.Viewport+ └── AlertDialog.Popup+ ├── AlertDialog.Header+ │ ├── AlertDialog.Title+ │ └── AlertDialog.Description+ ├── AlertDialog.Body+ └── AlertDialog.Footer+ ├── AlertDialog.Close+ └── Confirmation action+```++| Part | Requirement | Purpose |+| -------------------------- | --------------------------------------------- | ----------------------------------------------------------------------- |+| `Root` | Required | Coordinates open state and modal behavior. |+| `Trigger` | Optional for a programmatically opened dialog | Opens the dialog and provides a return focus target. |+| `Portal` | Recommended | Moves the overlay to its container and controls mounting. |+| `Backdrop` | Optional | Visually separates the alert from the surrounding page. |+| `Viewport` | Recommended | Positions the popup and provides its scrollable surrounding area. |+| `Popup` | Required | Renders the alert content with focus management. |+| `Title` | Recommended | Supplies the visible alert name. An accessible name is always required. |+| `Description` | Recommended for a confirmation | Explains the decision and its consequences. |+| `Header`, `Body`, `Footer` | Optional layout parts | Arrange headings, additional content, and actions. |+| `Close` | Recommended for cancellation | Supplies an explicit close action. |++Set `container` and `keepMounted` on `Portal`, backdrop attributes on `Backdrop`, layout attributes on `Viewport`, and `size` and focus props on `Popup`. Each element part accepts its own native attributes, handlers, ref, and `render` composition. `Popup.ref` points to the alert content element. `Title` and `Description` establish the accessible relationships; provide `aria-label` on `Popup` when omitting a title.++The confirmation action is application content, not an exported part. Use `Close` with a synchronous handler or a `Button` with controlled open state for asynchronous confirmation.+## Controlled statePass `open` and update it with `onOpenChange` to own the same dialog's visibility in React state. The callback receives the requested boolean and upstream event details, including `reason`, `event`, and `cancel()`. Call `eventDetails.cancel()` to reject a requested change. `onOpenChangeComplete` runs after opening or closing transitions finish.@@ -114,7 +114,7 @@ export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => {return (<AlertDialog.Root open={open} onOpenChange={setOpen}><AlertDialog.Trigger- render={<Button color="danger">Delete record</Button>}+ render={<Button variant="solid">Delete record</Button>}/><AlertDialog.Portal><AlertDialog.Backdrop />@@ -123,13 +123,12 @@ export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => {<AlertDialog.Header><AlertDialog.Title>Delete this record?</AlertDialog.Title><AlertDialog.Description>- This action cannot be undone.+ This record will be permanently deleted. This action cannot be+ undone.</AlertDialog.Description></AlertDialog.Header><AlertDialog.Footer>- <AlertDialog.Close- render={<Button variant="outline">Cancel</Button>}- />+ <AlertDialog.Close render={<Button>Cancel</Button>} /><AlertDialog.CloseonClick={onDelete}render={<Button color="danger">Delete</Button>}@@ -158,7 +157,7 @@ type DeleteConfirmationProps = { onDelete: () => void };export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => (<AlertDialog.Root><AlertDialog.Trigger- render={<Button color="danger">Delete record</Button>}+ render={<Button variant="solid">Delete record</Button>}/><AlertDialog.Portal><AlertDialog.Backdrop />@@ -167,13 +166,12 @@ export const DeleteConfirmation = ({ onDelete }: DeleteConfirmationProps) => (<AlertDialog.Header><AlertDialog.Title>Delete this record?</AlertDialog.Title><AlertDialog.Description>- This action cannot be undone.+ This record will be permanently deleted. This action cannot be+ undone.</AlertDialog.Description></AlertDialog.Header><AlertDialog.Footer>- <AlertDialog.Close- render={<Button variant="outline">Cancel</Button>}- />+ <AlertDialog.Close render={<Button>Cancel</Button>} /><AlertDialog.CloseonClick={onDelete}render={<Button color="danger">Delete</Button>}diff --git a/packages/twenty-docs/ui/primitives/surfaces/card.mdx b/packages/twenty-docs/ui/primitives/surfaces/card.mdxindex 1b8098fe822..86c6b666364 100644--- a/packages/twenty-docs/ui/primitives/surfaces/card.mdx+++ b/packages/twenty-docs/ui/primitives/surfaces/card.mdx@@ -4,27 +4,15 @@ description: Group related information inside a bordered surface.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import CardReference from '/snippets/ui/generated/surfaces/card.mdx';`Card` groups four presentational parts under one named export. Compose `Card.Root`, `Card.Header`, `Card.Content`, and `Card.Footer` to separate a title, body, and supporting actions. The parts do not manage selection, focus, or application state. The application owns the behavior of any controls placed inside them.-## Anatomy--```text-Card.Root (outer surface)-├── Card.Header (optional)-├── Card.Content (optional, repeatable)-└── Card.Footer (optional)-```--Import `Card` from `twenty-ui/primitives/surfaces`. `Card.Root` supplies the outer border and clipping, but creates no sections internally. No part requires another part or a particular section order. The sections also work independently, without `Card.Root` or context.--Each part renders a `div` by default and accepts native div attributes, event handlers, `className`, `style`, and a DOM `ref`. Use `render` with an element or callback to choose a semantic target. No part infers an element or role from `onClick`.--`CardRootProps`, `CardHeaderProps`, `CardContentProps`, and `CardFooterProps` are exported from `twenty-ui/primitives/surfaces`, `twenty-ui/primitives`, and the root package.--<StoryEmbed storyId="ui-surfaces-card--default" title="Card example" />+<StoryEmbed+ storyId="ui-surfaces-card--display"+ title="Card example"+ height={200}+/>## Usage@@ -34,9 +22,7 @@ import { Button } from 'twenty-ui/primitives/input';import { Card } from 'twenty-ui/primitives/surfaces';import { Heading, Text } from 'twenty-ui/primitives/typography';-type ImportSummaryProps = { onReview: () => void };--export const ImportSummary = ({ onReview }: ImportSummaryProps) => {+export const ImportSummary = () => {const titleId = useId();return (@@ -50,7 +36,7 @@ export const ImportSummary = ({ onReview }: ImportSummaryProps) => {<Text>24 records are ready to import.</Text></Card.Content><Card.Footer>- <Button onClick={onReview}>Review records</Button>+ <Button>Review records</Button></Card.Footer></Card.Root>);@@ -59,6 +45,21 @@ export const ImportSummary = ({ onReview }: ImportSummaryProps) => {Use [Heading](/ui/primitives/typography/heading) at the level required by the surrounding page. Put actions in [Button](/ui/primitives/input/button) or a native link so keyboard and assistive-technology users can activate them.+## Anatomy++```text+Card.Root (outer surface)+├── Card.Header (optional)+├── Card.Content (optional, repeatable)+└── Card.Footer (optional)+```++Import `Card` from `twenty-ui/primitives/surfaces`. `Card.Root` supplies the outer border and clipping, but creates no sections internally. No part requires another part or a particular section order. The sections also work independently, without `Card.Root` or context.++Each part renders a `div` by default and accepts native div attributes, event handlers, `className`, `style`, and a DOM `ref`. Use `render` with an element or callback to choose a semantic target. No part infers an element or role from `onClick`.++`CardRootProps`, `CardHeaderProps`, `CardContentProps`, and `CardFooterProps` are exported from `twenty-ui/primitives/surfaces`, `twenty-ui/primitives`, and the root package.+## Appearance and dividers`Card.Root` has a transparent background by default. `fullWidth` fills its container, and `backgroundColor` changes the outer background. Child sections have their own backgrounds. `rounded` currently uses the same corner radius as the default card.diff --git a/packages/twenty-docs/ui/primitives/surfaces/dialog.mdx b/packages/twenty-docs/ui/primitives/surfaces/dialog.mdxindex fbd6e9963dc..f425b95d7e4 100644--- a/packages/twenty-docs/ui/primitives/surfaces/dialog.mdx+++ b/packages/twenty-docs/ui/primitives/surfaces/dialog.mdx@@ -4,7 +4,6 @@ description: Present a focused task above the current page.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import DialogReference from '/snippets/ui/generated/surfaces/dialog.mdx';Use `Dialog` for forms, details, and other tasks that open above the page. It manages focus, keyboard dismissal, outside clicks, and scrolling. Use [AlertDialog](/ui/primitives/surfaces/alert-dialog) when the user must explicitly respond to a decision.@@ -12,11 +11,49 @@ Use `Dialog` for forms, details, and other tasks that open above the page. It maThis API is for standalone Twenty UI and the Twenty host application. Front components must use the SDK's [`openCommandConfirmationModal`](/developers/extend/apps/layout/front-components#host-communication-api) instead of rendering `Dialog` or `AlertDialog` directly. Native browser dialogs and popovers are also prohibited in the front component renderer.<StoryEmbed- storyId="ui-surfaces-dialog--documentation"+ storyId="ui-surfaces-dialog--display"title="Dialog example"height={440}/>+## Usage++### Uncontrolled state++`Root` owns visibility by default. Set `defaultOpen` for its initial state. Triggers, close controls, Escape, and outside clicks update that state.++```tsx+import { Button, Field, Input } from 'twenty-ui/primitives/input';+import { Dialog } from 'twenty-ui/primitives/surfaces';++export const AccountDialog = () => (+ <Dialog.Root defaultOpen={false}>+ <Dialog.Trigger render={<Button>Edit account</Button>} />+ <Dialog.Portal>+ <Dialog.Backdrop />+ <Dialog.Viewport>+ <Dialog.Popup>+ <Dialog.Header>+ <Dialog.Title>Edit account</Dialog.Title>+ <Dialog.Description>Update the account details.</Dialog.Description>+ </Dialog.Header>+ <Dialog.Body>+ <Field.Root name="company">+ <Field.Label>Company name</Field.Label>+ <Input defaultValue="Acme" />+ </Field.Root>+ </Dialog.Body>+ <Dialog.Footer>+ <Dialog.Close render={<Button variant="outline">Close</Button>} />+ <Dialog.Close render={<Button>Save</Button>} />+ </Dialog.Footer>+ </Dialog.Popup>+ </Dialog.Viewport>+ </Dialog.Portal>+ </Dialog.Root>+);+```+## Anatomy```text@@ -49,45 +86,13 @@ Dialog.RootAssemble `Portal`, `Backdrop`, `Viewport` and `Popup` explicitly. Each DOM part accepts its own native attributes, handlers, `className`, `style`, ref and `render` composition. A ref targets that part's rendered element. `Popup` does not create a portal, backdrop or viewport.-## Uncontrolled state--`Root` owns visibility by default. Set `defaultOpen` for its initial state. Triggers, close controls, Escape, and outside clicks update that state.--```tsx-import { Button } from 'twenty-ui/primitives/input';-import { Dialog } from 'twenty-ui/primitives/surfaces';--export const AccountDialog = () => (- <Dialog.Root defaultOpen={false}>- <Dialog.Trigger render={<Button>Account details</Button>} />- <Dialog.Portal>- <Dialog.Backdrop />- <Dialog.Viewport>- <Dialog.Popup>- <Dialog.Header>- <Dialog.Title>Account details</Dialog.Title>- <Dialog.Description>- Review your account information.- </Dialog.Description>- </Dialog.Header>- <Dialog.Body>Acme</Dialog.Body>- <Dialog.Footer>- <Dialog.Close render={<Button>Close</Button>} />- </Dialog.Footer>- </Dialog.Popup>- </Dialog.Viewport>- </Dialog.Portal>- </Dialog.Root>-);-```-## Controlled statePass `open` and `onOpenChange` when the application owns visibility. The callback receives the requested state and Base UI event details, including `reason`, `event`, `trigger` and `cancel()`. Update state to accept a change, or call `eventDetails.cancel()` to reject it. `onOpenChangeComplete` runs when the opening or closing animation finishes.```tsximport { useState } from 'react';-import { Button } from 'twenty-ui/primitives/input';+import { Button, Field, Input } from 'twenty-ui/primitives/input';import { Dialog } from 'twenty-ui/primitives/surfaces';export const AccountDialog = () => {@@ -95,20 +100,26 @@ export const AccountDialog = () => {return (<Dialog.Root open={open} onOpenChange={setOpen}>- <Dialog.Trigger render={<Button>Account details</Button>} />+ <Dialog.Trigger render={<Button>Edit account</Button>} /><Dialog.Portal><Dialog.Backdrop /><Dialog.Viewport><Dialog.Popup><Dialog.Header>- <Dialog.Title>Account details</Dialog.Title>+ <Dialog.Title>Edit account</Dialog.Title><Dialog.Description>- Review your account information.+ Update the account details.</Dialog.Description></Dialog.Header>- <Dialog.Body>Acme</Dialog.Body>+ <Dialog.Body>+ <Field.Root name="company">+ <Field.Label>Company name</Field.Label>+ <Input defaultValue="Acme" />+ </Field.Root>+ </Dialog.Body><Dialog.Footer>- <Dialog.Close render={<Button>Close</Button>} />+ <Dialog.Close render={<Button variant="outline">Close</Button>} />+ <Dialog.Close render={<Button>Save</Button>} /></Dialog.Footer></Dialog.Popup></Dialog.Viewport>diff --git a/packages/twenty-docs/ui/primitives/surfaces/popover.mdx b/packages/twenty-docs/ui/primitives/surfaces/popover.mdxindex 31a3b36eccd..4f173b1ccd8 100644--- a/packages/twenty-docs/ui/primitives/surfaces/popover.mdx+++ b/packages/twenty-docs/ui/primitives/surfaces/popover.mdx@@ -4,15 +4,59 @@ description: Display contextual content anchored to a trigger.---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import PopoverReference from '/snippets/ui/generated/surfaces/popover.mdx';Use `Popover` for contextual information or lightweight controls. Compose its portal, positioning wrapper and popup separately. Use [Dropdown](/ui/components/navigation/dropdown) for menus, pickers and panels with higher-level navigation.<StoryEmbed- storyId="ui-surfaces-popover--documentation"+ storyId="ui-surfaces-popover--display"title="Popover example"- height={440}+ height={280}+/>++## Usage++### Uncontrolled state++Use `defaultOpen` to set the initial visibility. The popover owns subsequent changes from its trigger, close controls, and dismissal interactions.++```tsx+import { Button } from 'twenty-ui/primitives/input';+import { Popover } from 'twenty-ui/primitives/surfaces';++export const ContactDetailsPopover = () => (+ <Popover.Root defaultOpen={false}>+ <Popover.Trigger render={<Button>Show details</Button>} />+ <Popover.Portal>+ <Popover.Positioner align="start">+ <Popover.Popup+ style={{ boxSizing: 'border-box', width: 260, padding: 16, gap: 12 }}+ >+ <Popover.Title>Contact details</Popover.Title>+ <Popover.Description>+ Reach Alex at [email protected].+ </Popover.Description>+ <Popover.Close+ style={{ alignSelf: 'flex-end' }}+ render={<Button size="sm">Close</Button>}+ />+ </Popover.Popup>+ </Popover.Positioner>+ </Popover.Portal>+ </Popover.Root>+);+```++`defaultOpen` defaults to `false`, so it can be omitted. Use `Title` and `Description` to identify the popup. The trigger renders a button by default; `render` lets you supply a compatible element.++## Placement comparison++Compare the supported sides with and without an arrow. These open examples keep each popup beside its trigger for inspection; use the Display example to try opening and dismissing a popover.++<StoryEmbed+ storyId="ui-surfaces-popover--catalog"+ title="Placement comparison for popover"+ height={640}/>## Anatomy@@ -49,57 +93,39 @@ Popover.RootAll rendered parts support the installed Base UI native attributes, handlers, refs and element/function `render` composition. Custom components must forward the supplied props and ref. Every part has a public `Popover<Part>Props` and `Popover<Part>State` type. `PopoverRootProps` and `PopoverTriggerProps` preserve payload generics. `PopoverHandle`, `PopoverRootActions`, `PopoverRootChangeEventDetails` and `PopoverRootChangeEventReason` are also exported from `twenty-ui/primitives/surfaces`.-## Uncontrolled state--Use `defaultOpen` to set the initial visibility. The popover owns subsequent changes from its trigger, close controls, and dismissal interactions.--```tsx-import { Popover } from 'twenty-ui/primitives/surfaces';--export const ImportHelp = () => (- <Popover.Root defaultOpen={false}>- <Popover.Trigger>Import help</Popover.Trigger>- <Popover.Portal>- <Popover.Positioner>- <Popover.Popup>- <Popover.Arrow />- <Popover.Title>Import a CSV file</Popover.Title>- <Popover.Description>- Use a header row to identify your columns.- </Popover.Description>- <Popover.Close>Got it</Popover.Close>- </Popover.Popup>- </Popover.Positioner>- </Popover.Portal>- </Popover.Root>-);-```--`defaultOpen` defaults to `false`, so it can be omitted. Use `Title` and `Description` to identify the popup. The trigger renders a button by default; `render` lets you supply a compatible element.-## Controlled statePass `open` and update it with `onOpenChange` to own the same popover's visibility in React state.```tsximport { useState } from 'react';+import { Button } from 'twenty-ui/primitives/input';import { Popover } from 'twenty-ui/primitives/surfaces';-export const ImportHelp = () => {+export const ContactDetailsPopover = () => {const [open, setOpen] = useState(false);return (<Popover.Root open={open} onOpenChange={setOpen}>- <Popover.Trigger>Import help</Popover.Trigger>+ <Popover.Trigger render={<Button>Show details</Button>} /><Popover.Portal>- <Popover.Positioner>- <Popover.Popup>- <Popover.Arrow />- <Popover.Title>Import a CSV file</Popover.Title>+ <Popover.Positioner align="start">+ <Popover.Popup+ style={{+ boxSizing: 'border-box',+ width: 260,+ padding: 16,+ gap: 12,+ }}+ >+ <Popover.Title>Contact details</Popover.Title><Popover.Description>- Use a header row to identify your columns.+ Reach Alex at [email protected].</Popover.Description>- <Popover.Close>Got it</Popover.Close>+ <Popover.Close+ style={{ alignSelf: 'flex-end' }}+ render={<Button size="sm">Close</Button>}+ /></Popover.Popup></Popover.Positioner></Popover.Portal>@@ -122,14 +148,19 @@ export const ImportHelp = () => (<Popover.Root><Popover.Trigger render={<Button variant="outline">Import help</Button>} /><Popover.Portal>- <Popover.Positioner>- <Popover.Popup>+ <Popover.Positioner align="start">+ <Popover.Popup+ style={{ boxSizing: 'border-box', width: 260, padding: 16, gap: 12 }}+ ><Popover.Arrow /><Popover.Title>Import a CSV file</Popover.Title><Popover.Description>Use a header row to identify your columns.</Popover.Description>- <Popover.Close render={<Button>Got it</Button>} />+ <Popover.Close+ style={{ alignSelf: 'flex-end' }}+ render={<Button size="sm">Got it</Button>}+ /></Popover.Popup></Popover.Positioner></Popover.Portal>@@ -210,7 +241,7 @@ export const OwnerHelp = () => {<Popover.Root handle={handle}>{({ payload }) => (<Popover.Portal>- <Popover.Positioner>+ <Popover.Positioner align="start"><Popover.Popup aria-label="Account owner">{payload?.name}<Popover.Close>Close</Popover.Close>diff --git a/packages/twenty-docs/ui/primitives/surfaces/tooltip.mdx b/packages/twenty-docs/ui/primitives/surfaces/tooltip.mdxindex 8c9eaae22ac..f07042af073 100644--- a/packages/twenty-docs/ui/primitives/surfaces/tooltip.mdx+++ b/packages/twenty-docs/ui/primitives/surfaces/tooltip.mdx@@ -4,27 +4,28 @@ description: Show supplementary information when a trigger is hovered or focused---import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import TooltipReference from '/snippets/ui/generated/surfaces/tooltip.mdx';Use `Tooltip` for a short explanation of a control or truncated text. Keep essential information visible, give controls an accessible name, and use [Popover](/ui/primitives/surfaces/popover) when the content contains links, buttons, or other controls.<StoryEmbed- storyId="ui-surfaces-tooltip--documentation"+ storyId="ui-surfaces-tooltip--display"title="Tooltip example"+ height={180}/>-## Single trigger+## Usage```tsximport { Button } from 'twenty-ui/primitives/input';import { Tooltip } from 'twenty-ui/primitives/surfaces';+import { Text } from 'twenty-ui/primitives/typography';export const ExportHelp = () => (<Tooltip content="Download the visible records as a CSV file" side="top">- <span>+ <Text render={<span />}><Button>Export records</Button>- </span>+ </Text></Tooltip>);```diff --git a/packages/twenty-docs/ui/primitives/typography/heading.mdx b/packages/twenty-docs/ui/primitives/typography/heading.mdxindex 54ee79658e8..9cea756005a 100644--- a/packages/twenty-docs/ui/primitives/typography/heading.mdx+++ b/packages/twenty-docs/ui/primitives/typography/heading.mdx@@ -9,29 +9,31 @@ import HeadingReference from '/snippets/ui/generated/typography/heading.mdx';`Heading` renders an `h2` by default. Use `children` for its content, `level` for document structure, and `size` for appearance.<StoryEmbed- storyId="ui-typography-heading--documentation"+ storyId="ui-typography-heading--display"title="Heading example"- height={180}+ height={90}/>-## Choose a heading level and size+## UsageChoose levels in document order. A smaller visual size does not change the level announced by assistive technology.```tsximport { Heading } from 'twenty-ui/primitives/typography';-export const WorkspaceTitle = () => (- <Heading level={1} size="lg">- Workspace settings- </Heading>-);+export const WorkspaceTitle = () => <Heading>Workspace settings</Heading>;```Sizes `xs`, `sm`, `md`, and `lg` use the matching font tokens. Headings have no outer margin; their surrounding layout owns spacing.## Color and composition+<StoryEmbed+ storyId="ui-typography-heading--catalog"+ title="Heading sizes and colors"+ height={320}+/>+Use `color="secondary"` for less prominent headings. `tertiary` is also available, but its contrast depends on the font size, theme, and background. Check readability when using it.Native attributes, styles, class names, and refs pass to the heading. Use `render` to compose with a custom element or component; that element is responsible for preserving heading semantics.diff --git a/packages/twenty-docs/ui/primitives/typography/overflowing-text-tooltip-mode-provider.mdx b/packages/twenty-docs/ui/primitives/typography/overflowing-text-tooltip-mode-provider.mdxindex 30b03b865b8..c0b7167e3d5 100644--- a/packages/twenty-docs/ui/primitives/typography/overflowing-text-tooltip-mode-provider.mdx+++ b/packages/twenty-docs/ui/primitives/typography/overflowing-text-tooltip-mode-provider.mdx@@ -3,31 +3,53 @@ title: OverflowingTextTooltipModeProviderdescription: Choose when OverflowingTextWithTooltip checks truncation for a subtree.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';+import OverflowingTextTooltipModeProviderReference from '/snippets/ui/generated/typography/overflowing-text-tooltip-mode-provider.mdx';`OverflowingTextTooltipModeProvider` sets how every [OverflowingTextWithTooltip](/ui/primitives/typography/overflowing-text-with-tooltip) inside it handles its tooltip. It renders no DOM element.+<StoryEmbed+ storyId="ui-typography-overflowingtexttooltipmodeprovider--display"+ title="Overflowing text tooltip mode provider example"+ height={180}+/>+## Usage```tsximport {OverflowingTextTooltipModeProvider,OverflowingTextWithTooltip,+ Text,} from 'twenty-ui/primitives/typography';-export const RecordCell = ({ name }: { name: string }) => (- <OverflowingTextTooltipModeProvider mode="disabled">- <OverflowingTextWithTooltip text={name} />+export const RecordCell = () => (+ <OverflowingTextTooltipModeProvider mode="measure-on-hover">+ <Text style={{ maxWidth: 220 }}>+ <OverflowingTextWithTooltip+ text="Quarterly account review and renewal preparation"+ isFocusable+ />+ </Text></OverflowingTextTooltipModeProvider>);```+Hover or focus the truncated label to read its full value. Change `mode` in the Storybook controls to compare when the tooltip is available.+## Modes- `measure-on-hover`, the default without a provider, checks truncation on pointer entry and focus. A label that fits stays out of the way of a parent tooltip.- `measure-on-open` checks truncation when the tooltip tries to open. Use it for labels that mount under the pointer, such as a hover overlay, where no pointer entry happens.- `disabled` renders only the text, without any tooltip parts. Use it for many labels that a user cannot hover, such as content covered by an overlay.+<StoryEmbed+ storyId="ui-typography-overflowingtexttooltipmodeprovider--disabled"+ title="Tooltip disabled for a subtree"+ height={90}+/>+Nested providers override the mode for their subtree.## Propsdiff --git a/packages/twenty-docs/ui/primitives/typography/overflowing-text-with-tooltip.mdx b/packages/twenty-docs/ui/primitives/typography/overflowing-text-with-tooltip.mdxindex e010e96ef9c..8c5cfa38343 100644--- a/packages/twenty-docs/ui/primitives/typography/overflowing-text-with-tooltip.mdx+++ b/packages/twenty-docs/ui/primitives/typography/overflowing-text-with-tooltip.mdx@@ -10,8 +10,9 @@ import OverflowingTextWithTooltipReference from '/snippets/ui/generated/typograp`OverflowingTextWithTooltip` truncates content within the available width. It checks for overflow on pointer entry and focus, then shows a tooltip only when needed. It manages tooltip visibility internally and exposes no controlled or uncontrolled open-state props. Use [OverflowingTextTooltipModeProvider](/ui/primitives/typography/overflowing-text-tooltip-mode-provider) to change when a subtree checks truncation or to turn the tooltip off.<StoryEmbed- storyId="ui-surfaces-overflowingtextwithtooltip--single-line-overflowing-documentation"+ storyId="ui-surfaces-overflowingtextwithtooltip--display"title="OverflowingTextWithTooltip example"+ height={180}/>## Usagediff --git a/packages/twenty-docs/ui/primitives/typography/shortcut.mdx b/packages/twenty-docs/ui/primitives/typography/shortcut.mdxindex ae0f4af4004..15c227dce08 100644--- a/packages/twenty-docs/ui/primitives/typography/shortcut.mdx+++ b/packages/twenty-docs/ui/primitives/typography/shortcut.mdx@@ -6,13 +6,23 @@ description: Display simultaneous key combinations and sequential shortcuts.import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';import ShortcutReference from '/snippets/ui/generated/typography/shortcut.mdx';+Import `Shortcut` and `formatShortcut` from `twenty-ui/primitives/typography`. Both share the same model, symbols, and separators. Register shortcuts in your application. `Shortcut` only formats the hint; it does not register keyboard actions. Native attributes, event handlers, styles, class names, and refs target its outer span. `ShortcutProps` and `ShortcutFormatOptions` are public types.+<StoryEmbed- storyId="ui-typography-shortcut--documentation"+ storyId="ui-typography-shortcut--display"title="Shortcut presentations"- height={200}+ height={90}/>-Import `Shortcut` and `formatShortcut` from `twenty-ui/primitives/typography`. Both share the same model, symbols, and separators. Register shortcuts in your application. `Shortcut` only formats the hint; it does not register keyboard actions. Native attributes, event handlers, styles, class names, and refs target its outer span. `ShortcutProps` and `ShortcutFormatOptions` are public types.+## Usage++```tsx+import { Shortcut } from 'twenty-ui/primitives/typography';++export const SearchShortcut = () => <Shortcut shortcut={['Mod', 'K']} />;+```++## Combinations and sequences```tsximport { Shortcut, formatShortcut } from 'twenty-ui/primitives/typography';@@ -45,6 +55,16 @@ Use `sequenceJoinLabel` for localized join text. `combinationSeparator` can presKey symbols have readable accessible names. Use `accessibleKeyLabels` to localize individual key names in screen reader output. Supply `aria-label` or `aria-labelledby` for a localized name for the whole shortcut, or `aria-hidden` for a decorative hint. Buttons keep their action names and hide their decorative hints on mobile. Menu and list rows keep their hints visible.+## Appearance++Use `keys` for individual keycaps, `text` for an inline hint, or `button` for the compact hint inside an action. These variants only change the presentation.++<StoryEmbed+ storyId="ui-typography-shortcut--catalog"+ title="Shortcut appearance variants"+ height={160}+/>+## Migration| Previous prop | Replacement |@@ -56,4 +76,6 @@ Key symbols have readable accessible names. Use `accessibleKeyLabels` to localizFlat stored arrays that represent successive key presses need nesting before being passed to `shortcut`: `hotKeys.map((key) => [key])`. Arrays that represent simultaneous keys can be passed directly. Key strings remain literal tokens, so `['Mod', '+']` contains a plus key and `['Space']` contains the Space key; no shortcut-string parsing is required.+## Props+<ShortcutReference />diff --git a/packages/twenty-docs/ui/primitives/typography/text.mdx b/packages/twenty-docs/ui/primitives/typography/text.mdxindex 86a3c917531..9e0ad84ce93 100644--- a/packages/twenty-docs/ui/primitives/typography/text.mdx+++ b/packages/twenty-docs/ui/primitives/typography/text.mdx@@ -10,12 +10,12 @@ import TextReference from '/snippets/ui/generated/typography/text.mdx';`Text` provides overflow handling. It renders a `div` by default and inherits typography from its surroundings.<StoryEmbed- storyId="ui-typography-text--documentation"+ storyId="ui-typography-text--display"title="Text example"- height={240}+ height={90}/>-## Truncate one line+## UsageGive the text a constrained width, then set `truncate` to show an ellipsis when it overflows:@@ -31,6 +31,12 @@ export const ContactName = () => (## Limit the number of lines+<StoryEmbed+ storyId="ui-typography-text--catalog"+ title="Text overflow options"+ height={210}+/>+Use `lineClamp` with a positive integer. Choose either `truncate` or `lineClamp`; their props are mutually exclusive.```tsxdiff --git a/packages/twenty-docs/ui/testing.mdx b/packages/twenty-docs/ui/testing.mdxindex 8aba14ac56b..77e95227a9d 100644--- a/packages/twenty-docs/ui/testing.mdx+++ b/packages/twenty-docs/ui/testing.mdx@@ -4,9 +4,20 @@ description: Present component previews and variant catalogs with twenty-ui/test---import ComponentStorybookLayoutReference from '/snippets/ui/generated/testing/component-storybook-layout.mdx';+import GroupedCatalogReference from '/snippets/ui/generated/testing/grouped-catalog.mdx';`twenty-ui/testing` exposes Storybook decorators and preview layout helpers. Configure styles and a [ThemeProvider](/ui/theming) in your Storybook preview before rendering themed components.+## Story roles++Start each component guide with a `Display` story showing one representative, usable example. Follow it with Usage code that reproduces the preview using public imports. Compound components demonstrate their parts together. Providers and accessibility helpers demonstrate their effect in context.++Add a `Catalog` when a labeled comparison helps readers choose between visual options. Group variants, sizes, colors, and states separately; use a matrix only when comparing two dimensions together is useful. A simple component can use one alternative example. Dialogs, menus, and other interactive components usually need focused examples for each workflow.++Preserve comprehensive screenshot coverage in separate `VisualRegression` stories, including dark themes and variant matrices. Tag those stories with `!autodocs` and keep them out of the component guides.++Name other stories after what they demonstrate, such as `Controlled`, `WithValidation`, or `MultipleSelection`. Keep interaction checks in separate stories with `play` functions. The display and other documentation previews remain usable by the reader without automated actions.+## ComponentDecorator`ComponentDecorator` wraps a story in `ComponentStorybookLayout`. Set `parameters.container.width` and `parameters.container.height` in pixels. It also reads the story's `inverted` and `accent` args to choose an optional background.@@ -23,9 +34,43 @@ const meta = {export default meta;-export const Default = { args: { children: 'Save changes' } };+export const Display = { args: { children: 'Save changes' } };+```++## GroupedCatalog++`GroupedCatalog` gives curated catalogs a shared layout for headings, wrapping rows, and spacing. Each group has a `label` and an `examples` array. Every example needs a unique `label` within its group; it can carry any other data used by `renderExample`.++```tsx+import { Button } from 'twenty-ui/primitives/input';+import { Text } from 'twenty-ui/primitives/typography';+import { GroupedCatalog } from 'twenty-ui/testing';++const groups = [+ {+ label: 'Variants',+ examples: [+ { label: 'Solid', variant: 'solid' as const },+ { label: 'Outline', variant: 'outline' as const },+ ],+ },+];++export const ButtonCatalog = () => (+ <GroupedCatalog+ groups={groups}+ renderExample={({ label, variant }) => (+ <>+ <Text>{label}</Text>+ <Button variant={variant}>Save changes</Button>+ </>+ )}+ />+);```+<GroupedCatalogReference />+## CatalogDecorator`CatalogDecorator` renders combinations of up to four dimensions from `parameters.catalog.dimensions`. Each dimension has a `name`, `values`, a `props(value)` mapper, and an optional `labels(value)` formatter. The mapper returns the props for that cell. `parameters.catalog.options.elementContainer` accepts `width`, `style`, and `className`.@@ -37,7 +82,7 @@ import { CatalogDecorator } from 'twenty-ui/testing';const meta = { component: Button };export default meta;-export const Variants = {+export const Catalog = {args: { children: 'Save changes' },decorators: [CatalogDecorator],parameters: {@@ -74,3 +119,7 @@ export const ButtonPreview = () => (## Documentation previewsStories embedded in the documentation must be presentational and have no `play` function. Keep interaction tests in separate stories. Share explicit `args`, `render`, `decorators`, and `parameters` when needed, rather than spreading an interaction story into a preview. The documentation embed check rejects stories marked with Storybook's `play-fn` tag, including inherited play functions.++Each component guide's first embed must reference a story exported as `Display`. Give every embed a descriptive title for its iframe and enough height to show the example. The shared preview supplies light and dark tabs and a link to Storybook, where readers can use controls to explore props.++Run `npx nx check:ui-stories twenty-docs` to check the required display, preview titles, references, and presentation rules. Run `npx nx check:ui twenty-docs` to validate the generated API references and typecheck copyable examples.diff --git a/packages/twenty-ui/README.md b/packages/twenty-ui/README.mdindex 97a44b739dd..f173f951a97 100644--- a/packages/twenty-ui/README.md+++ b/packages/twenty-ui/README.md@@ -133,13 +133,38 @@ Record formatting, routing, product illustrations, and feature-specific animatio### Documentation-Primitive guides belong in `packages/twenty-docs/ui/primitives`. Shared component guides belong in `packages/twenty-docs/ui/components`. For each stateful API that supports both modes, include separate **Uncontrolled state** and **Controlled state** examples with the same scenario, labels, and initial state. Keep each example complete, with public imports and one exported example component.+Primitive guides belong in `packages/twenty-docs/ui/primitives`. Shared component guides belong in `packages/twenty-docs/ui/components`.++Every component guide starts with its purpose and a `Display` story, followed by **Usage** with complete code matching that preview. Use realistic content and the public API. Compound components share one complete display across their parts; providers and accessibility helpers demonstrate their effect in context. Keep useful Storybook controls available on the display.++Make previews look like usable UI. Align controls with their labels, separate actions from supporting text, and give panels and cards enough padding. Constrain long text to a readable width, use theme colors for secondary content, and check that examples fit the documentation frame in both light and dark themes. Keep these layout choices in the example and its matching code snippet.++Preserve the component's existing appearance in its Display story. Improve the surrounding layout without changing the control's shape, size, variant, or focus styling for decoration. Show alternative appearances in named stories or catalogs.++Use these story roles consistently:++| Story | Purpose | When to include it |+| ------------------- | ------------------------------------- | ------------------------------------------------- |+| `Display` | One representative, usable example | Every component guide |+| `Catalog` | Labeled comparisons of visual options | When seeing options together helps readers choose |+| Named examples | A specific behavior or composition | When the component supports distinct workflows |+| Interaction stories | Verify behavior with `play` functions | Keep these separate from embedded previews |++After Usage, document visual options, anatomy where relevant, behavior and composition, accessibility, and the generated API reference. Omit sections that add no useful information. Put migration guidance before the API reference.++Catalogs should group variants, sizes, colors, and states separately. Use a matrix only when two dimensions need to be compared together. Avoid multiplying every prop combination. Use `GroupedCatalog` from `twenty-ui/testing` for a consistent grouped layout. Simple components can use a focused alternative example; interactive components usually need working workflow examples. Use the preview's light and dark tabs for theme comparison.++Keep comprehensive visual checks in separate `VisualRegression` stories using `CatalogDecorator`, including the existing dark-theme and variant matrices. Tag them with `!autodocs` and do not embed them in the guides. Simplifying a documentation catalog must preserve its existing visual regression coverage.++Embed stories with a descriptive `title` and a height that closely fits their content, including the preview's padding. Check wrapping at narrow documentation widths. Reserve additional height only for dropdowns, popups, validation messages, resizing, or other expanding content, and verify those states fit. Embedded stories can respond to the reader, but must not define or inherit a `play` function. Share a presentational example with its interaction story instead of copying automated interactions into the documentation.++For each stateful API that supports both modes, include separate **Uncontrolled state** and **Controlled state** examples with the same scenario, labels, and initial state. Keep each example complete, with public imports and one exported example component.Explain state ownership before advanced behavior such as indeterminate selection or manual tab activation. Document independent states, such as selection and popup visibility, separately. For components that delegate state to a parent or group, explain that ownership and link to the relevant examples.For compound components, include an anatomy tree and identify required parts, optional parts, and elements supplied internally. Show supported composition with complete examples, use Twenty UI components for supporting controls, and explain how custom wrappers preserve props and refs. Use `text` fences for structural diagrams and `tsx` fences for runnable examples so the documentation checker validates the examples.-Run `npx nx check:ui twenty-docs` to validate generated references and documentation examples.+Run `npx nx check:ui twenty-docs` to validate generated references and documentation examples. Run `npx nx check:ui-stories twenty-docs` to validate preview titles, story references, the required first `Display`, and the absence of automated interactions in embedded stories.### Testingdiff --git a/packages/twenty-ui/docs/components.ts b/packages/twenty-ui/docs/components.tsindex 8771415087b..66adbc68663 100644--- a/packages/twenty-ui/docs/components.ts+++ b/packages/twenty-ui/docs/components.ts@@ -38,6 +38,7 @@ import { ICONS_PROVIDER_PROP_DESCRIPTIONS } from './iconsProviderPropDescriptionimport { ILLUSTRATION_ICON_WRAPPER_PROP_DESCRIPTIONS } from './illustrationIconWrapperPropDescriptions';import { THINKING_ORBIT_LOADER_ICON_PROP_DESCRIPTIONS } from './thinkingOrbitLoaderIconPropDescriptions';import { COMPONENT_STORYBOOK_LAYOUT_PROP_DESCRIPTIONS } from './componentStorybookLayoutPropDescriptions';+import { GROUPED_CATALOG_PROP_DESCRIPTIONS } from './groupedCatalogPropDescriptions';import { COLLAPSIBLE_PART_PROP_DESCRIPTIONS } from './collapsiblePropDescriptions';import { AVATAR_PROP_DESCRIPTIONS } from './avatarPropDescriptions';import { AVATAR_PART_PROP_DESCRIPTIONS } from './avatarPartPropDescriptions';@@ -1044,4 +1045,11 @@ export const DOCUMENTED_COMPONENTS = [slug: 'testing/component-storybook-layout',propDescriptions: COMPONENT_STORYBOOK_LAYOUT_PROP_DESCRIPTIONS,},+ {+ name: 'GroupedCatalog',+ source: 'testing/GroupedCatalog.tsx',+ entryPoint: 'twenty-ui/testing',+ slug: 'testing/grouped-catalog',+ propDescriptions: GROUPED_CATALOG_PROP_DESCRIPTIONS,+ },] as const;diff --git a/packages/twenty-ui/docs/groupedCatalogPropDescriptions.ts b/packages/twenty-ui/docs/groupedCatalogPropDescriptions.tsnew file mode 100644index 00000000000..c4cd5d922df--- /dev/null+++ b/packages/twenty-ui/docs/groupedCatalogPropDescriptions.ts@@ -0,0 +1,12 @@+import { type ComponentProps } from 'react';++import { type GroupedCatalog } from '../src/testing/GroupedCatalog';++export const GROUPED_CATALOG_PROP_DESCRIPTIONS = {+ groups:+ 'Labeled groups of examples. Each example has a unique label within its group and can include additional data for the renderer.',+ renderExample:+ 'Renders one example, including its visible label or accessible name. The layout supplies the surrounding cell and spacing.',+} satisfies Partial<+ Record<keyof ComponentProps<typeof GroupedCatalog>, string>+>;diff --git a/packages/twenty-ui/docs/public-exports.json b/packages/twenty-ui/docs/public-exports.jsonindex 04653a89fe9..9626ef90a30 100644--- a/packages/twenty-ui/docs/public-exports.json+++ b/packages/twenty-ui/docs/public-exports.json@@ -1191,6 +1191,7 @@"CatalogDecorator": "testing/decorators/CatalogDecorator","ComponentDecorator": "testing/decorators/ComponentDecorator","ComponentStorybookLayout": "testing/ComponentStorybookLayout",+ "GroupedCatalog": "testing/GroupedCatalog","overrideMediaQueryMatches": "testing/utils/overrideMediaQueryMatches"},"types": {diff --git a/packages/twenty-ui/generated/components.docs.json b/packages/twenty-ui/generated/components.docs.jsonindex 31cb8ca077e..9f5db651447 100644--- a/packages/twenty-ui/generated/components.docs.json+++ b/packages/twenty-ui/generated/components.docs.json@@ -14521,5 +14521,26 @@"description": "Container width in pixels. When omitted, the container has a 300px minimum width."}]+ },+ {+ "name": "GroupedCatalog",+ "entryPoint": "twenty-ui/testing",+ "slug": "testing/grouped-catalog",+ "props": [+ {+ "name": "groups",+ "type": "{ label: string; examples: CatalogExample[]; }[]",+ "required": true,+ "defaultValue": null,+ "description": "Labeled groups of examples. Each example has a unique label within its group and can include additional data for the renderer."+ },+ {+ "name": "renderExample",+ "type": "(example: CatalogExample) => ReactNode",+ "required": true,+ "defaultValue": null,+ "description": "Renders one example, including its visible label or accessible name. The layout supplies the surrounding cell and spacing."+ }+ ]}]diff --git a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.stories.tsx b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.stories.tsxindex a6fa929bd42..27db54e3990 100644--- a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.stories.tsx+++ b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.stories.tsx@@ -1,7 +1,10 @@-import { A11Y_DEFER_COLOR_CONTRAST } from '@ui/testing';+import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';import { type Meta, type StoryObj } from '@storybook/react-vite';import { ThemeProvider } from '@ui/theme';+import { SegmentedControl } from '@ui/components/input';+import { DirectionProvider } from '@ui/primitives/layout';+import { Text } from '@ui/primitives/typography';import { DirectionalLayoutExample } from './DirectionalLayoutExample';@@ -14,7 +17,55 @@ const meta: Meta<typeof DirectionalLayoutExample> = {export default meta;type Story = StoryObj<typeof DirectionalLayoutExample>;+export const Display: Story = {+ args: { direction: 'rtl' },+ decorators: [ComponentDecorator],+ parameters: { layout: 'centered' },+ render: ({ direction }) => (+ <DirectionProvider direction={direction}>+ <Text dir={direction}>+ <SegmentedControl+ aria-label="Billing period"+ defaultValue="annual"+ options={[+ { label: 'Annual', value: 'annual' },+ { label: 'Monthly', value: 'monthly' },+ ]}+ />+ </Text>+ </DirectionProvider>+ ),+};+export const ReadingDirections: Story = {+ render: () => (+ <Text+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 320px), 1fr))',+ gap: 16,+ padding: 16,+ }}+ >+ {(['ltr', 'rtl'] as const).map((direction) => (+ <DirectionalLayoutExample+ key={direction}+ direction={direction}+ style={{+ boxSizing: 'border-box',+ width: '100%',+ minWidth: 0,+ border: '1px solid var(--t-border-color-light)',+ borderRadius: 8,+ }}+ />+ ))}+ </Text>+ ),+};++export const VisualRegression: Story = {+ tags: ['!autodocs'],render: () => (<divstyle={{ display: 'grid', gridTemplateColumns: 'repeat(2, max-content)' }}diff --git a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalLayoutExample.tsx b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalLayoutExample.tsxindex 88a608da6a6..119779d902a 100644--- a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalLayoutExample.tsx+++ b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalLayoutExample.tsx@@ -1,3 +1,5 @@+import { type CSSProperties } from 'react';+import { AvatarGroup, Callout, JsonTree } from '@ui/components';import { SegmentedControl } from '@ui/components/input/SegmentedControl/SegmentedControl';import { Avatar, Badge } from '@ui/primitives/data-display';@@ -9,8 +11,10 @@ import { DirectionProvider } from '@ui/primitives/layout/DirectionProvider/Direcexport const DirectionalLayoutExample = ({direction,+ style,}: {direction: 'ltr' | 'rtl';+ style?: CSSProperties;}) => {return (<DirectionProvider direction={direction}>@@ -24,6 +28,7 @@ export const DirectionalLayoutExample = ({padding: 20,background: 'var(--t-background-primary)',color: 'var(--t-font-color-primary)',+ ...style,}}><Text>{direction.toUpperCase()}</Text>diff --git a/packages/twenty-ui/src/components/code-editor/CodeEditor/__stories__/CodeEditor.stories.tsx b/packages/twenty-ui/src/components/code-editor/CodeEditor/__stories__/CodeEditor.stories.tsxindex 64f52572f66..21f65c062fa 100644--- a/packages/twenty-ui/src/components/code-editor/CodeEditor/__stories__/CodeEditor.stories.tsx+++ b/packages/twenty-ui/src/components/code-editor/CodeEditor/__stories__/CodeEditor.stories.tsx@@ -8,7 +8,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, waitFor, within } from 'storybook/test';import { CodeEditorHeader } from '@ui/components/code-editor/CodeEditorHeader/CodeEditorHeader';-import { Button } from '@ui/primitives/input/Button/Button';import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';import { isDefined } from '@ui/utilities/utils/isDefined';@@ -122,6 +121,23 @@ export default meta;type Story = StoryObj<typeof CodeEditor>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: {+ variant: 'with-header',+ value: undefined,+ defaultValue: WORKSPACE_SETTINGS_JSON,+ beforeMount: undefined,+ onMount: undefined,+ },+ render: (args) => (+ <div style={{ width: '100%' }}>+ <CodeEditorHeader title="workspace.json" />+ <CodeEditor {...args} />+ </div>+ ),+};+export const Default: Story = {decorators: [ComponentDecorator],play: async ({ canvasElement }) => {@@ -239,26 +255,8 @@ export const BoundedResizable: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- args: { variant: 'with-header' },- render: (args) => (- <div style={{ width: '100%' }}>- <CodeEditorHeader- title="workspace.json"- endElement={- <Button size="sm" variant="outline">- Format- </Button>- }- />- <CodeEditor {...args} />- </div>- ),-};-export const Dark: Story = {- ...Documentation,+ ...Display,play: Default.play,tags: ['!autodocs'],globals: { colorScheme: 'dark' },diff --git a/packages/twenty-ui/src/components/data-display/AvatarGroup/__stories__/AvatarGroup.stories.tsx b/packages/twenty-ui/src/components/data-display/AvatarGroup/__stories__/AvatarGroup.stories.tsxindex 8aad7362747..3197e7ee6fa 100644--- a/packages/twenty-ui/src/components/data-display/AvatarGroup/__stories__/AvatarGroup.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/AvatarGroup/__stories__/AvatarGroup.stories.tsx@@ -15,6 +15,9 @@ import {import { AvatarGroup } from '@ui/components/data-display/AvatarGroup/AvatarGroup';import { type AvatarGroupProps } from '@ui/components/data-display/AvatarGroup/types/AvatarGroupProps';+const AVATAR_SHAPES = ['circle', 'square'] satisfies AvatarShape[];+const AVATAR_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] satisfies AvatarSize[];+const makeAvatar = ({userName,props = {},@@ -56,23 +59,43 @@ const meta: Meta<export default meta;type Story = StoryObj<typeof AvatarGroup>;-export const Default: Story = {- decorators: [ComponentDecorator],-};--export const WithDerivedOverflow: Story = {+export const Display: Story = {decorators: [ComponentDecorator],- render: () => (+ args: {+ maxVisible: 3,+ overflowShape: 'circle',+ overlap: 'left',+ overlapOffset: '4px',+ },+ argTypes: { avatars: { control: false } },+ render: (args) => (<AvatarGroup- avatars={getAvatars({ shape: 'circle' })}- maxVisible={3}- overflowShape="circle"- overlap="left"- overlapOffset="4px"+ {...args}+ avatars={[+ 'Ada',+ 'Grace',+ 'Margaret',+ 'Annie',+ 'Mary',+ 'Dorothy',+ 'Katherine',+ 'Joan',+ ].map((name) => (+ <Avatar+ key={name}+ name={name}+ shape="circle"+ imageProps={{ alt: name }}+ />+ ))}/>),};+export const Default: Story = {+ decorators: [ComponentDecorator],+};+export const PartiallyLoaded: Story = {decorators: [ComponentDecorator],render: () => (@@ -116,6 +139,33 @@ export const WithRing: Story = {};export const Catalog: Story = {+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ catalog: {+ dimensions: [+ {+ name: 'number of avatars',+ values: [3],+ props: (numberOfAvatars: number) => ({ numberOfAvatars }),+ },+ {+ name: 'types',+ values: AVATAR_SHAPES,+ props: (shape: AvatarShape) => ({ shape }),+ },+ {+ name: 'sizes',+ values: AVATAR_SIZES,+ props: (size: AvatarSize) => ({ size }),+ },+ ],+ },+ },+ decorators: [CatalogDecorator],+};++export const VisualRegression: Story = {+ tags: ['!autodocs'],parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,catalog: {@@ -127,12 +177,12 @@ export const Catalog: Story = {},{name: 'types',- values: ['circle', 'square'] as AvatarShape[],+ values: AVATAR_SHAPES,props: (shape: AvatarShape) => ({ shape }),},{name: 'sizes',- values: ['xs', 'sm', 'md', 'lg', 'xl'] as AvatarSize[],+ values: AVATAR_SIZES,props: (size: AvatarSize) => ({ size }),},],diff --git a/packages/twenty-ui/src/components/data-display/CommandBlock/__stories__/CommandBlock.stories.tsx b/packages/twenty-ui/src/components/data-display/CommandBlock/__stories__/CommandBlock.stories.tsxindex 55430d79568..5d0beca2315 100644--- a/packages/twenty-ui/src/components/data-display/CommandBlock/__stories__/CommandBlock.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/CommandBlock/__stories__/CommandBlock.stories.tsx@@ -1,4 +1,5 @@import { type Meta, type StoryObj } from '@storybook/react-vite';+import { useState } from 'react';import { expect, fn, userEvent, within } from 'storybook/test';import { Button } from '@ui/primitives/input/Button/Button';@@ -18,6 +19,34 @@ export default meta;type Story = StoryObj<typeof CommandBlock>;+export const Display: Story = {+ args: { commands: ['yarn add twenty-ui'] },+ argTypes: { actions: { control: false } },+ render: function Render(args) {+ const [copyLabel, setCopyLabel] = useState('Copy command');++ return (+ <CommandBlock+ {...args}+ actions={+ <Button+ onClick={async () => {+ try {+ await navigator.clipboard.writeText(args.commands.join('\n'));+ setCopyLabel('Copied');+ } catch {+ setCopyLabel('Select and copy the command');+ }+ }}+ >+ {copyLabel}+ </Button>+ }+ />+ );+ },+};+export const Default: Story = {play: async ({ canvasElement }) => {const canvas = within(canvasElement);@@ -28,17 +57,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- args: {- actions: (- <>- <Text>Ready to install</Text>- <Button>Copy commands</Button>- </>- ),- },-};-const handleCopy = fn();const handleRootFocus = fn();const handleRenderFocus = fn();diff --git a/packages/twenty-ui/src/components/data-display/JsonTree/__stories__/JsonTree.stories.tsx b/packages/twenty-ui/src/components/data-display/JsonTree/__stories__/JsonTree.stories.tsxindex 47ba1f85c92..e83c7257b99 100644--- a/packages/twenty-ui/src/components/data-display/JsonTree/__stories__/JsonTree.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/JsonTree/__stories__/JsonTree.stories.tsx@@ -32,6 +32,19 @@ export default meta;type Story = StoryObj<typeof JsonTree>;+export const Display: Story = {+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },+ args: {+ value: { name: 'Acme', active: true, contacts: [] },+ emptyStringLabel: 'Empty text',+ emptyArrayLabel: 'No items',+ emptyObjectLabel: 'No properties',+ arrowButtonCollapsedLabel: 'Expand node',+ arrowButtonExpandedLabel: 'Collapse node',+ shouldExpandNodeInitially: isTwoFirstDepths,+ },+};+export const String: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {diff --git a/packages/twenty-ui/src/components/data-display/MetricRow/__stories__/MetricRow.stories.tsx b/packages/twenty-ui/src/components/data-display/MetricRow/__stories__/MetricRow.stories.tsxindex 92aa868e301..14cc059e54a 100644--- a/packages/twenty-ui/src/components/data-display/MetricRow/__stories__/MetricRow.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/MetricRow/__stories__/MetricRow.stories.tsx@@ -35,7 +35,7 @@ export default meta;type Story = StoryObj<typeof MetricRow>;-export const Default: Story = {};+export const Display: Story = {};export const WithoutProgress: Story = {args: {diff --git a/packages/twenty-ui/src/components/data-display/StackIcon/__stories__/StackIcon.stories.tsx b/packages/twenty-ui/src/components/data-display/StackIcon/__stories__/StackIcon.stories.tsxindex 78e8faf1bd0..87c31f8f4a4 100644--- a/packages/twenty-ui/src/components/data-display/StackIcon/__stories__/StackIcon.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/StackIcon/__stories__/StackIcon.stories.tsx@@ -25,21 +25,30 @@ export default meta;type Story = StoryObj<typeof meta>;-export const Default: Story = {+export const Display: Story = {render: (args) => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><StackIcon {...args} /><Text>Companies</Text>- </>+ </Text>),+};++export const Geometry: Story = {+ ...Display,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const icon = canvasElement.querySelector('svg')!;const root = icon.parentElement!.parentElement!;+ const label = canvas.getByText('Companies');+ const stackedAvatar = canvas.getByText('S');- await expect(canvas.getByText('Companies')).toBeVisible();+ await expect(label).toBeVisible();await expect(root.getBoundingClientRect().width).toBe(16);await expect(root.getBoundingClientRect().height).toBe(16);await expect(icon.getBoundingClientRect().width).toBe(16);+ await expect(label.getBoundingClientRect().left).toBeGreaterThan(+ stackedAvatar.getBoundingClientRect().right,+ );},};diff --git a/packages/twenty-ui/src/components/data-display/TintedIconTile/__stories__/TintedIconTile.stories.tsx b/packages/twenty-ui/src/components/data-display/TintedIconTile/__stories__/TintedIconTile.stories.tsxindex b6783711afd..25dfa131f70 100644--- a/packages/twenty-ui/src/components/data-display/TintedIconTile/__stories__/TintedIconTile.stories.tsx+++ b/packages/twenty-ui/src/components/data-display/TintedIconTile/__stories__/TintedIconTile.stories.tsx@@ -19,13 +19,17 @@ export default meta;type Story = StoryObj<typeof meta>;-export const Default: Story = {+export const Display: Story = {render: (args) => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><TintedIconTile {...args} /><Text>Companies</Text>- </>+ </Text>),+};++export const Geometry: Story = {+ ...Display,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const icon = canvasElement.querySelector('svg')!;diff --git a/packages/twenty-ui/src/components/feedback/Callout/__stories__/Callout.stories.tsx b/packages/twenty-ui/src/components/feedback/Callout/__stories__/Callout.stories.tsxindex 3537b5a3fc2..d2286102832 100644--- a/packages/twenty-ui/src/components/feedback/Callout/__stories__/Callout.stories.tsx+++ b/packages/twenty-ui/src/components/feedback/Callout/__stories__/Callout.stories.tsx@@ -34,7 +34,7 @@ const meta: Meta<typeof Callout> = {export default meta;type Story = StoryObj<typeof Callout>;-export const Default: Story = {+export const Display: Story = {args: {status: 'neutral',title: 'This form will appear in workflow runs.',@@ -200,11 +200,16 @@ export const WithoutDismissal: Story = {};export const Catalog: CatalogStory<Story, typeof Callout> = {- args: Default.args,+ args: Display.args,argTypes: { status: { control: false } },parameters: {catalog: {dimensions: [+ {+ name: 'content',+ values: ['notice'],+ props: () => ({}),+ },{name: 'status',values: [diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/__stories__/InlineBanner.stories.tsx b/packages/twenty-ui/src/components/feedback/InlineBanner/__stories__/InlineBanner.stories.tsxindex 02df75e3674..b79024a8437 100644--- a/packages/twenty-ui/src/components/feedback/InlineBanner/__stories__/InlineBanner.stories.tsx+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/__stories__/InlineBanner.stories.tsx@@ -28,7 +28,7 @@ const meta: Meta<typeof InlineBanner> = {export default meta;type Story = StoryObj<typeof InlineBanner>;-export const Default: Story = {+export const Display: Story = {args: {status: 'error',children: NO_AI_MODELS_MESSAGE,@@ -41,7 +41,7 @@ export const Default: Story = {};export const KeyboardAction: Story = {- args: Default.args,+ args: Display.args,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const button = await canvas.findByRole('button', {@@ -321,7 +321,7 @@ export const CompactAction: Story = {export const HiddenAction: Story = {args: {- ...Default.args,+ ...Display.args,action: null,},play: async ({ canvasElement }) => {diff --git a/packages/twenty-ui/src/components/feedback/Toast/__stories__/Toast.stories.tsx b/packages/twenty-ui/src/components/feedback/Toast/__stories__/Toast.stories.tsxindex 5af3eda2ca3..e39912815e9 100644--- a/packages/twenty-ui/src/components/feedback/Toast/__stories__/Toast.stories.tsx+++ b/packages/twenty-ui/src/components/feedback/Toast/__stories__/Toast.stories.tsx@@ -25,6 +25,12 @@ const meta: Meta<typeof Toast> = {export default meta;type Story = StoryObj<typeof Toast>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { status: 'success' },+ render: (args) => <DismissibleToast {...args} />,+};+export const Default: Story = {decorators: [ComponentDecorator],args: { status: 'success', onClose: fn() },@@ -36,12 +42,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- args: Default.args,- render: (args) => <DismissibleToast {...args} />,-};-export const WithDescriptionAndAction: Story = {...Default,parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },diff --git a/packages/twenty-ui/src/components/input/CountrySelect/__stories__/CountrySelect.stories.tsx b/packages/twenty-ui/src/components/input/CountrySelect/__stories__/CountrySelect.stories.tsxindex 28cbc470aa7..30cf0a9ad5d 100644--- a/packages/twenty-ui/src/components/input/CountrySelect/__stories__/CountrySelect.stories.tsx+++ b/packages/twenty-ui/src/components/input/CountrySelect/__stories__/CountrySelect.stories.tsx@@ -20,7 +20,16 @@ const meta: Meta<typeof CountrySelectExample> = {export default meta;type Story = StoryObj<typeof CountrySelectExample>;-export const Default: Story = {};+export const Display: Story = {+ args: {+ label: 'Shipping country',+ countries: [+ { value: 'France', label: 'France', flag: '🇫🇷' },+ { value: 'Germany', label: 'Germany', flag: '🇩🇪' },+ { value: 'Japan', label: 'Japan', flag: '🇯🇵' },+ ],+ },+};export const Disabled: Story = {args: { disabled: true },diff --git a/packages/twenty-ui/src/components/input/CurrencyPicker/__stories__/CurrencyPicker.stories.tsx b/packages/twenty-ui/src/components/input/CurrencyPicker/__stories__/CurrencyPicker.stories.tsxindex 2b5f266f3c3..cc7c451e733 100644--- a/packages/twenty-ui/src/components/input/CurrencyPicker/__stories__/CurrencyPicker.stories.tsx+++ b/packages/twenty-ui/src/components/input/CurrencyPicker/__stories__/CurrencyPicker.stories.tsx@@ -22,7 +22,17 @@ const meta: Meta<typeof CurrencyPickerExample> = {export default meta;type Story = StoryObj<typeof CurrencyPickerExample>;-export const Documentation: Story = {};+export const Display: Story = {+ args: {+ triggerLabel: 'Invoice currency',+ currencies: [+ { code: 'EUR', name: 'Euro' },+ { code: 'USD', name: 'US Dollar' },+ ],+ searchLabel: 'Search currencies',+ emptyLabel: 'No currencies found',+ },+};export const Default: Story = {play: async ({ canvasElement }) => {diff --git a/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButton.stories.tsx b/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButton.stories.tsxindex ce10d049bc1..d01ebb38ef5 100644--- a/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButton.stories.tsx+++ b/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButton.stories.tsx@@ -3,18 +3,20 @@ import { expect, fn, userEvent, within } from 'storybook/test';import { IconPlus, IconSearch, IconTrash } from '@ui/icon';import { Text } from '@ui/primitives/typography';-import { ButtonGroup } from '@ui/primitives/input/ButtonGroup/ButtonGroup';import { type ButtonColor } from '@ui/primitives/input/Button/types/ButtonColor';import { type ButtonVariant } from '@ui/primitives/input/Button/types/ButtonVariant';+import { ButtonGroup } from '@ui/primitives/input/ButtonGroup/ButtonGroup';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,type CatalogStory,ComponentDecorator,+ GroupedCatalog,} from '@ui/testing';import { IconButton } from '../IconButton';import { type IconButtonProps } from '../types/IconButtonProps';+import { IconButtonExample } from './IconButtonExample';const meta: Meta<typeof IconButton> = {id: 'ui-components-iconbutton',@@ -26,46 +28,82 @@ const meta: Meta<typeof IconButton> = {export default meta;type Story = StoryObj<typeof IconButton>;-export const Default: Story = { decorators: [ComponentDecorator] };+export const Display: Story = { decorators: [ComponentDecorator] };export const Elevated: Story = {- ...Default,- args: { elevated: true, size: 'sm' },+ ...Display,+ args: {+ elevated: true,+ size: 'sm',+ children: <IconPlus />,+ 'aria-label': 'Add widget',+ },};export const ElevatedTooltip: Story = {...Elevated,- args: { ...Elevated.args, tooltip: 'Search records', tooltipDelay: 0 },+ args: { ...Elevated.args, tooltip: 'Add widget', tooltipDelay: 0 },};+const ELEVATED_EXAMPLES: {+ label: string;+ props: Partial<IconButtonProps>;+}[] = [+ { label: 'Regular', props: { 'aria-label': 'Regular action' } },+ {+ label: 'Elevated',+ props: { elevated: true, 'aria-label': 'Elevated action' },+ },+ {+ label: 'Compact',+ props: { elevated: true, size: 'sm', 'aria-label': 'Compact action' },+ },+ {+ label: 'Link',+ props: { href: '#search', 'aria-label': 'Link without elevation' },+ },+ { label: 'Solid', props: { variant: 'solid', 'aria-label': 'Solid action' } },+ {+ label: 'Elevated solid',+ props: {+ variant: 'solid',+ elevated: true,+ 'aria-label': 'Elevated solid action',+ },+ },+ {+ label: 'Accent',+ props: { color: 'accent', 'aria-label': 'Accent action' },+ },+ {+ label: 'Elevated accent',+ props: {+ color: 'accent',+ elevated: true,+ 'aria-label': 'Elevated accent action',+ },+ },+];+export const ElevatedAppearance: Story = {- ...Default,+ ...Display,args: { onClick: fn() },render: (args) => (- <>- <IconButton {...args} aria-label="Regular action" />- <IconButton {...args} elevated aria-label="Elevated action" />- <IconButton {...args} elevated size="sm" aria-label="Compact action" />- <IconButton- {...args}- href="#search"- aria-label="Link without elevation"- />- <IconButton {...args} variant="solid" aria-label="Solid action" />- <IconButton- {...args}- variant="solid"- elevated- aria-label="Elevated solid action"- />- <IconButton {...args} color="accent" aria-label="Accent action" />- <IconButton- {...args}- color="accent"- elevated- aria-label="Elevated accent action"- />- </>+ <Text+ style={{+ display: 'grid',+ gridTemplateColumns: 'repeat(auto-fit, minmax(120px, 1fr))',+ gap: 24,+ width: 560,+ maxWidth: '100%',+ }}+ >+ {ELEVATED_EXAMPLES.map(({ label, props }) => (+ <IconButtonExample key={label} label={label}>+ <IconButton {...args} {...props} />+ </IconButtonExample>+ ))}+ </Text>),play: async ({ canvasElement, args }) => {const canvas = within(canvasElement);@@ -133,7 +171,7 @@ export const ElevatedAppearanceDark: Story = {};export const Keyboard: Story = {- ...Default,+ ...Display,args: { onClick: fn() },play: async ({ canvasElement, args }) => {const button = within(canvasElement).getByRole('button', {@@ -147,7 +185,7 @@ export const Keyboard: Story = {};export const Disabled: Story = {- ...Default,+ ...Display,args: { disabled: true, onClick: fn() },play: async ({ canvasElement, args }) => {const button = within(canvasElement).getByRole('button', {@@ -179,7 +217,7 @@ export const Loading: Story = {};export const Link: Story = {- ...Default,+ ...Display,args: { href: '#search', onClick: fn((event) => event.preventDefault()) },play: async ({ canvasElement, args }) => {const link = within(canvasElement).getByRole('link', { name: 'Search' });@@ -192,7 +230,7 @@ export const Link: Story = {};export const Tooltip: Story = {- ...Default,+ ...Display,args: { tooltip: 'Search records', tooltipDelay: 0 },play: async ({ canvasElement }) => {const button = within(canvasElement).getByRole('button', {@@ -262,7 +300,7 @@ export const TooltipLink: Story = {};export const Grouped: Story = {- ...Default,+ ...Display,render: () => (<ButtonGrouparia-label="Record actions"@@ -300,8 +338,58 @@ const CATALOG_STATES: Record<string, Partial<IconButtonProps>> = {loading: { loading: true },};-export const Catalog: CatalogStory<Story, typeof IconButton> = {- decorators: [CatalogDecorator],+const ICON_BUTTON_CATALOG_GROUPS: {+ label: string;+ examples: { label: string; props: Partial<IconButtonProps> }[];+}[] = [+ {+ label: 'Variants',+ examples: (['solid', 'outline', 'soft', 'ghost'] as const).map(+ (variant) => ({ label: variant, props: { variant } }),+ ),+ },+ {+ label: 'Colors',+ examples: (['neutral', 'accent', 'danger', 'success'] as const).map(+ (color) => ({ label: color, props: { color } }),+ ),+ },+ {+ label: 'Sizes',+ examples: (['xs', 'sm', 'md'] as const).map((size) => ({+ label: size,+ props: { size },+ })),+ },+ {+ label: 'Shapes',+ examples: (['square', 'round'] as const).map((shape) => ({+ label: shape,+ props: { shape },+ })),+ },+ {+ label: 'Elevation',+ examples: [+ { label: 'standard', props: {} },+ { label: 'elevated', props: { elevated: true } },+ ],+ },+ {+ label: 'States',+ examples: [+ 'default',+ 'hover',+ 'pressed',+ 'focused',+ 'disabled',+ 'loading',+ ].map((label) => ({ label, props: CATALOG_STATES[label]! })),+ },+];++export const Catalog: Story = {+ decorators: [ComponentDecorator],parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,pseudo: {@@ -309,73 +397,62 @@ export const Catalog: CatalogStory<Story, typeof IconButton> = {active: ['.pressed'],focusVisible: ['.focused'],},- catalog: {- dimensions: [- {- name: 'state',- values: Object.keys(CATALOG_STATES),- props: (state: string) => CATALOG_STATES[state] ?? {},- },- {- name: 'color',- values: ['neutral', 'accent', 'danger', 'success'],- props: (color: ButtonColor) => ({ color }),- },- {- name: 'variant',- values: ['solid', 'outline', 'soft', 'ghost'],- props: (variant: ButtonVariant) => ({ variant }),- },- ],- },},+ render: (args) => (+ <GroupedCatalog+ groups={ICON_BUTTON_CATALOG_GROUPS}+ renderExample={({ label, props }) => (+ <IconButtonExample label={label}>+ <IconButton {...args} {...props} />+ </IconButtonExample>+ )}+ />+ ),};-export const CatalogDark: CatalogStory<Story, typeof IconButton> = {+export const CatalogDark: Story = {...Catalog,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};-export const Round: Story = {- ...Default,+const ROUND_EXAMPLES = [+ { label: '20px', name: 'Compact round', size: 'xs', disabled: false },+ { label: '24px', name: 'Small round', size: 'sm', disabled: false },+ { label: '32px', name: 'Medium round', size: 'md', disabled: false },+ { label: 'Disabled', name: 'Disabled round', size: 'sm', disabled: true },+] as const;++export const RoundDocumentation: Story = {+ ...Display,render: () => (- <>- <IconButton- aria-label="Compact round"- size="xs"- shape="round"- variant="solid"- color="accent"- >- <IconPlus />- </IconButton>- <IconButton- aria-label="Small round"- size="sm"- shape="round"- variant="solid"- color="accent"- >- <IconPlus />- </IconButton>- <IconButton- aria-label="Disabled round"- size="sm"- shape="round"- variant="solid"- color="accent"- disabled- >- <IconPlus />- </IconButton>- </>+ <Text style={{ display: 'flex', flexWrap: 'wrap', gap: 24 }}>+ {ROUND_EXAMPLES.map(({ label, name, size, disabled }) => (+ <IconButtonExample key={name} label={label}>+ <IconButton+ aria-label={name}+ size={size}+ shape="round"+ variant="solid"+ color="accent"+ disabled={disabled}+ >+ <IconPlus />+ </IconButton>+ </IconButtonExample>+ ))}+ </Text>),+};++export const Round: Story = {+ ...RoundDocumentation,play: async ({ canvasElement }) => {const canvas = within(canvasElement);for (const [name, size] of [['Compact round', 20],['Small round', 24],+ ['Medium round', 32],['Disabled round', 24],] as const) {const button = canvas.getByRole('button', { name });@@ -392,7 +469,7 @@ export const Round: Story = {export const LabelledBy: Story = {decorators: [ComponentDecorator],render: () => (- <>+ <Text style={{ display: 'flex', alignItems: 'center', gap: 12 }}><Text render={<span />} id="search-records-label">Search records</Text>@@ -403,7 +480,7 @@ export const LabelledBy: Story = {><IconSearch /></IconButton>- </>+ </Text>),};@@ -436,7 +513,6 @@ export const GroupedOverrides: Story = {<IconButtonvariant="outline"color="neutral"- size="xs"aria-label="Search records"tooltip="Search records">@@ -458,11 +534,43 @@ export const GroupedOverridesInteraction: Story = {await expect(searchButton).toHaveAttribute('data-variant', 'outline');await expect(searchButton).toHaveAttribute('data-color', 'neutral');+ await expect(searchButton).toHaveAttribute('data-icon-size', 'sm');+ await expect(searchButton.getBoundingClientRect().width).toBe(24);+ await expect(searchButton.getBoundingClientRect().height).toBe(24);+ await expect(createButton).toHaveAttribute('data-variant', 'solid');+ await expect(createButton).toHaveAttribute('data-color', 'accent');+ await expect(createButton).toHaveAttribute('data-icon-size', 'sm');+ await expect(createButton.getBoundingClientRect().width).toBe(24);+ await expect(createButton.getBoundingClientRect().height).toBe(24);+ },+};++export const GroupedSizeOverride: Story = {+ decorators: [ComponentDecorator],+ tags: ['!autodocs'],+ render: () => (+ <ButtonGroup+ aria-label="Record actions"+ size="sm"+ attached={false}+ style={{ alignItems: 'center' }}+ >+ <IconButton size="xs" aria-label="Search records">+ <IconSearch />+ </IconButton>+ <IconButton aria-label="Create record">+ <IconPlus />+ </IconButton>+ </ButtonGroup>+ ),+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const searchButton = canvas.getByRole('button', { name: 'Search records' });+ const createButton = canvas.getByRole('button', { name: 'Create record' });+await expect(searchButton).toHaveAttribute('data-icon-size', 'xs');await expect(searchButton.getBoundingClientRect().width).toBe(20);await expect(searchButton.getBoundingClientRect().height).toBe(20);- await expect(createButton).toHaveAttribute('data-variant', 'solid');- await expect(createButton).toHaveAttribute('data-color', 'accent');await expect(createButton).toHaveAttribute('data-icon-size', 'sm');await expect(createButton.getBoundingClientRect().width).toBe(24);await expect(createButton.getBoundingClientRect().height).toBe(24);@@ -482,3 +590,41 @@ export const FramedGroupDocumentation: Story = {</ButtonGroup>),};++export const VisualRegression: CatalogStory<Story, typeof IconButton> = {+ tags: ['!autodocs'],+ decorators: [CatalogDecorator],+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ pseudo: {+ hover: ['.hover'],+ active: ['.pressed'],+ focusVisible: ['.focused'],+ },+ catalog: {+ dimensions: [+ {+ name: 'state',+ values: Object.keys(CATALOG_STATES),+ props: (state: string) => CATALOG_STATES[state] ?? {},+ },+ {+ name: 'color',+ values: ['neutral', 'accent', 'danger', 'success'],+ props: (color: ButtonColor) => ({ color }),+ },+ {+ name: 'variant',+ values: ['solid', 'outline', 'soft', 'ghost'],+ props: (variant: ButtonVariant) => ({ variant }),+ },+ ],+ },+ },+};++export const VisualRegressionDark: CatalogStory<Story, typeof IconButton> = {+ ...VisualRegression,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};diff --git a/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButtonExample.tsx b/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButtonExample.tsxnew file mode 100644index 00000000000..6ed677e6c78--- /dev/null+++ b/packages/twenty-ui/src/components/input/IconButton/__stories__/IconButtonExample.tsx@@ -0,0 +1,35 @@+import { type ReactNode } from 'react';++import { Text } from '@ui/primitives/typography';+import { themeCssVariables } from '@ui/theme';++type IconButtonExampleProps = {+ children: ReactNode;+ label: string;+};++export const IconButtonExample = ({+ children,+ label,+}: IconButtonExampleProps) => (+ <Text+ style={{ display: 'grid', gap: 8, justifyItems: 'center', minWidth: 64 }}+ >+ <Text+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ height: 40,+ }}+ >+ {children}+ </Text>+ <Text+ render={<span />}+ style={{ color: themeCssVariables.font.color.secondary, fontSize: 12 }}+ >+ {label}+ </Text>+ </Text>+);diff --git a/packages/twenty-ui/src/components/input/ImageInput/__stories__/ImageInput.stories.tsx b/packages/twenty-ui/src/components/input/ImageInput/__stories__/ImageInput.stories.tsxindex 5cc4ec8096e..56dadcfe52e 100644--- a/packages/twenty-ui/src/components/input/ImageInput/__stories__/ImageInput.stories.tsx+++ b/packages/twenty-ui/src/components/input/ImageInput/__stories__/ImageInput.stories.tsx@@ -1,11 +1,40 @@import { type Meta, type StoryObj } from '@storybook/react-vite';-import { fn } from 'storybook/test';+import { useState } from 'react';+import { flushSync } from 'react-dom';+import { expect, fn, spyOn, userEvent, within } from 'storybook/test';import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';+import { isDefined } from '@ui/utilities/utils/isDefined';import { ImageInput } from '../ImageInput';import { IMAGE_INPUT_PREVIEW_URL } from './imageInputPreviewUrl';+const mockImageReads = () => {+ const readers: FileReader[] = [];+ const readAsDataURL = spyOn(+ FileReader.prototype,+ 'readAsDataURL',+ ).mockImplementation(function (this: FileReader) {+ readers.push(this);+ });++ return {+ complete: ({ readIndex, src }: { readIndex: number; src: string }) => {+ const reader = readers[readIndex];++ if (!isDefined(reader)) {+ throw new Error('Select an image before completing its read.');+ }++ Object.defineProperty(reader, 'result', { value: src });+ flushSync(() => {+ reader.dispatchEvent(new ProgressEvent('load'));+ });+ },+ restore: () => readAsDataURL.mockRestore(),+ };+};+const meta: Meta<typeof ImageInput> = {id: 'ui-input-imageinput',title: 'UI/Components/Input/ImageInput',@@ -18,19 +47,119 @@ const meta: Meta<typeof ImageInput> = {export default meta;type Story = StoryObj<typeof ImageInput>;+export const Display: Story = {+ args: { helperText: 'Choose a square image for your workspace.' },+ argTypes: {+ src: { control: false },+ onFileSelect: { control: false },+ onRemove: { control: false },+ },+ render: function Render(args) {+ const [preview, setPreview] = useState<{+ src?: string;+ reader?: FileReader;+ }>({});++ return (+ <ImageInput+ {...args}+ src={preview.src}+ onFileSelect={(file) => {+ const reader = new FileReader();+ setPreview((current) => ({ src: current.src, reader }));+ reader.onload = () => {+ setPreview((current) => {+ if (current.reader !== reader) {+ return current;+ }++ return { src: reader.result?.toString() };+ });+ };+ reader.readAsDataURL(file);+ }}+ onRemove={() => setPreview({})}+ />+ );+ },+};+export const Default: Story = {};-export const WithPicture: Story = {- args: { src: IMAGE_INPUT_PREVIEW_URL },+export const RemovePendingReplacement: Story = {+ ...Display,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const fileInput = canvas.getByLabelText('Upload', { selector: 'input' });+ const imageReads = mockImageReads();++ try {+ await userEvent.upload(+ fileInput,+ new File(['original'], 'original.svg', { type: 'image/svg+xml' }),+ );+ imageReads.complete({ readIndex: 0, src: IMAGE_INPUT_PREVIEW_URL });+ await expect(canvas.getByRole('presentation')).toHaveAttribute(+ 'src',+ IMAGE_INPUT_PREVIEW_URL,+ );++ await userEvent.upload(+ fileInput,+ new File(['replacement'], 'replacement.svg', { type: 'image/svg+xml' }),+ );+ await userEvent.click(canvas.getByRole('button', { name: 'Remove' }));+ imageReads.complete({ readIndex: 1, src: IMAGE_INPUT_PREVIEW_URL });++ await expect(canvas.queryByRole('presentation')).not.toBeInTheDocument();+ await expect(+ canvas.getByRole('button', { name: 'Remove' }),+ ).toBeDisabled();+ } finally {+ imageReads.restore();+ }+ },};-export const WithHelperText: Story = {- args: {- src: IMAGE_INPUT_PREVIEW_URL,- helperText: 'Choose a square image for your workspace.',+export const LatestSelectionWins: Story = {+ ...Display,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const fileInput = canvas.getByLabelText('Upload', { selector: 'input' });+ const imageReads = mockImageReads();+ const latestPreviewUrl = `${IMAGE_INPUT_PREVIEW_URL}#latest`;++ try {+ await userEvent.upload(+ fileInput,+ new File(['first'], 'first.svg', { type: 'image/svg+xml' }),+ );+ await userEvent.upload(+ fileInput,+ new File(['latest'], 'latest.svg', { type: 'image/svg+xml' }),+ );+ imageReads.complete({ readIndex: 1, src: latestPreviewUrl });+ await expect(canvas.getByRole('presentation')).toHaveAttribute(+ 'src',+ latestPreviewUrl,+ );++ imageReads.complete({ readIndex: 0, src: IMAGE_INPUT_PREVIEW_URL });++ await expect(canvas.getByRole('presentation')).toHaveAttribute(+ 'src',+ latestPreviewUrl,+ );+ } finally {+ imageReads.restore();+ }},};+export const WithPicture: Story = {+ args: { src: IMAGE_INPUT_PREVIEW_URL },+};+export const Disabled: Story = {args: { disabled: true, src: IMAGE_INPUT_PREVIEW_URL },};@@ -47,7 +176,10 @@ export const WithError: Story = {};export const Dark: Story = {- ...WithHelperText,+ args: {+ src: IMAGE_INPUT_PREVIEW_URL,+ helperText: 'Choose a square image for your workspace.',+ },globals: { colorScheme: 'dark' },};diff --git a/packages/twenty-ui/src/components/input/LightButton/__stories__/LightButton.stories.tsx b/packages/twenty-ui/src/components/input/LightButton/__stories__/LightButton.stories.tsxindex f51e3e37bf5..42af185dfaf 100644--- a/packages/twenty-ui/src/components/input/LightButton/__stories__/LightButton.stories.tsx+++ b/packages/twenty-ui/src/components/input/LightButton/__stories__/LightButton.stories.tsx@@ -23,10 +23,10 @@ const meta: Meta<typeof LightButton> = {export default meta;type Story = StoryObj<typeof LightButton>;-export const Default: Story = { decorators: [ComponentDecorator] };+export const Display: Story = { decorators: [ComponentDecorator] };export const Emphasis: Story = {- ...Default,+ ...Display,parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },render: () => (<>@@ -57,7 +57,7 @@ export const Emphasis: Story = {};export const SemanticAndGroupAppearance: Story = {- ...Default,+ ...Display,render: () => (<><LightButton emphasis="subtle" color="danger">diff --git a/packages/twenty-ui/src/components/input/LightIconButton/__stories__/LightIconButton.stories.tsx b/packages/twenty-ui/src/components/input/LightIconButton/__stories__/LightIconButton.stories.tsxindex 3f8dcd71cc1..1b094ba53ae 100644--- a/packages/twenty-ui/src/components/input/LightIconButton/__stories__/LightIconButton.stories.tsx+++ b/packages/twenty-ui/src/components/input/LightIconButton/__stories__/LightIconButton.stories.tsx@@ -21,6 +21,11 @@ const meta: Meta<typeof LightIconButton> = {export default meta;type Story = StoryObj<typeof LightIconButton>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { onClick: fn() },+};+export const Default: Story = {decorators: [ComponentDecorator],args: { onClick: fn() },@@ -34,11 +39,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- args: Default.args,-};-export const Appearance: Story = {...Default,render: () => (@@ -185,6 +185,10 @@ export const Catalog: CatalogStory<Story, typeof LightIconButton> = {],},},+};++export const CatalogInteractions: Story = {+ ...Catalog,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const buttons = canvas.getAllByRole('button', { name: 'Search' });diff --git a/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx b/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsxindex 05cea2e9449..cd73c19bc08 100644--- a/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx+++ b/packages/twenty-ui/src/components/input/MainButton/__stories__/MainButton.stories.tsx@@ -27,10 +27,10 @@ const meta: Meta<MainButtonStoryProps> = {export default meta;type Story = StoryObj<MainButtonStoryProps>;-export const Default: Story = { decorators: [ComponentDecorator] };+export const Display: Story = { decorators: [ComponentDecorator] };export const FormControls: Story = {- ...Default,+ ...Display,args: {onClick: fn(),onFormSubmit: fn<FormEventHandler<HTMLFormElement>>((event) =>@@ -68,7 +68,7 @@ export const FormControls: Story = {};export const Loading: Story = {- ...Default,+ ...Display,args: {loading: true,className: ({ disabled }) => (disabled ? 'unavailable-action' : undefined),@@ -86,7 +86,7 @@ export const Loading: Story = {};export const DisabledOutline: Story = {- ...Default,+ ...Display,args: { variant: 'outline', elevated: false, disabled: true, onClick: fn() },play: async ({ canvasElement, args }) => {const button = within(canvasElement).getByRole('button');diff --git a/packages/twenty-ui/src/components/input/NumberStepper/__stories__/NumberStepper.stories.tsx b/packages/twenty-ui/src/components/input/NumberStepper/__stories__/NumberStepper.stories.tsxindex 5d081862c75..0c386c07af2 100644--- a/packages/twenty-ui/src/components/input/NumberStepper/__stories__/NumberStepper.stories.tsx+++ b/packages/twenty-ui/src/components/input/NumberStepper/__stories__/NumberStepper.stories.tsx@@ -1,5 +1,7 @@import { type Meta, type StoryObj } from '@storybook/react-vite';+import { Field } from '@ui/primitives/input/Field/Field';+import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,@@ -18,8 +20,19 @@ const meta: Meta<typeof NumberStepper> = {export default meta;type Story = StoryObj<typeof NumberStepper>;-export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],+ render: (args) => (+ <Field.Root>+ <Field.Label style={{ color: 'var(--t-font-color-primary)' }}>+ Quantity+ </Field.Label>+ <NumberStepper {...args} />+ <Field.Description style={{ color: 'var(--t-font-color-secondary)' }}>+ Choose up to ten items.+ </Field.Description>+ </Field.Root>+ ),};export const WithoutButtons: Story = {diff --git a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.interactions.stories.tsx b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.interactions.stories.tsxindex 0f23f5f9e64..aa8d8507de9 100644--- a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.interactions.stories.tsx+++ b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.interactions.stories.tsx@@ -20,7 +20,7 @@ const meta: Meta<typeof PhoneCountryPickerExample> = {tags: ['!autodocs'],decorators: [ComponentDecorator],parameters: {- container: { width: 360, height: 360 },+ container: { width: 360 },a11y: PHONE_COUNTRY_PICKER_STORY_A11Y_PARAMETERS,},};diff --git a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.stories.tsx b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.stories.tsxindex 5eebcaab790..6077092e556 100644--- a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.stories.tsx+++ b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPicker.stories.tsx@@ -18,7 +18,7 @@ const meta: Meta<typeof PhoneCountryPickerExample> = {),decorators: [ComponentDecorator],parameters: {- container: { width: 320, height: 360 },+ container: { width: 320 },a11y: PHONE_COUNTRY_PICKER_STORY_A11Y_PARAMETERS,},};@@ -26,7 +26,17 @@ const meta: Meta<typeof PhoneCountryPickerExample> = {export default meta;type Story = StoryObj<typeof PhoneCountryPickerExample>;-export const Documentation: Story = {};+export const Display: Story = {+ args: {+ countries: [+ { value: 'FR', label: 'France', callingCode: '33', flag: '🇫🇷' },+ { value: 'GB', label: 'United Kingdom', callingCode: '44', flag: '🇬🇧' },+ { value: 'US', label: 'United States', callingCode: '1', flag: '🇺🇸' },+ ],+ searchLabel: 'Search countries',+ emptyLabel: 'No countries found',+ },+};export const Default: Story = {args: { onValueChange: fn() },diff --git a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.tsx b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.tsxindex 9ad44f13e02..ce60a91532f 100644--- a/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.tsx+++ b/packages/twenty-ui/src/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.tsx@@ -2,6 +2,7 @@ import { useState } from 'react';import { Dropdown } from '@ui/components/navigation/Dropdown/Dropdown';import { Text } from '@ui/primitives/typography/Text/Text';+import { themeCssVariables } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';import { PhoneCountryPicker } from '../PhoneCountryPicker';@@ -31,7 +32,14 @@ export const PhoneCountryPickerExample = ({const country = countries.find((choice) => choice.value === value);return (- <Text style={{ display: 'grid', gap: 8, justifyItems: 'start' }}>+ <Text+ style={{+ display: 'grid',+ alignContent: 'start',+ gap: 8,+ justifyItems: 'start',+ }}+ ><Text>{label}</Text><Dropdown.Root type="picker"><PhoneCountryPicker.Trigger@@ -52,7 +60,11 @@ export const PhoneCountryPickerExample = ({/></Dropdown.Content></Dropdown.Root>- <Text role="status" aria-label={`${label} selection`}>+ <Text+ role="status"+ aria-label={`${label} selection`}+ style={{ color: themeCssVariables.font.color.secondary, fontSize: 12 }}+ >{isDefined(country)? `${country.label} (+${country.callingCode})`: 'International'}diff --git a/packages/twenty-ui/src/components/input/SearchInput/__stories__/SearchInput.stories.tsx b/packages/twenty-ui/src/components/input/SearchInput/__stories__/SearchInput.stories.tsxindex 910662a3d8f..6f6145f04c2 100644--- a/packages/twenty-ui/src/components/input/SearchInput/__stories__/SearchInput.stories.tsx+++ b/packages/twenty-ui/src/components/input/SearchInput/__stories__/SearchInput.stories.tsx@@ -17,7 +17,7 @@ const meta: Meta<typeof SearchInputExample> = {export default meta;type Story = StoryObj<typeof SearchInputExample>;-export const Default: Story = {+export const Display: Story = {args: {placeholder: 'Search...',},diff --git a/packages/twenty-ui/src/components/input/SegmentedControl/__stories__/SegmentedControl.stories.tsx b/packages/twenty-ui/src/components/input/SegmentedControl/__stories__/SegmentedControl.stories.tsxindex 901e67716f6..dd920e6a751 100644--- a/packages/twenty-ui/src/components/input/SegmentedControl/__stories__/SegmentedControl.stories.tsx+++ b/packages/twenty-ui/src/components/input/SegmentedControl/__stories__/SegmentedControl.stories.tsx@@ -24,6 +24,8 @@ const meta: Meta<typeof SegmentedControl> = {export default meta;type Story = StoryObj<typeof SegmentedControl>;+export const Display: Story = {};+export const Default: Story = {play: async ({ canvasElement }) => {const canvas = within(canvasElement);@@ -41,8 +43,6 @@ export const Default: Story = {},};-export const Documentation: Story = {};-export const Dark: Story = {globals: { colorScheme: 'dark' },play: Default.play,diff --git a/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/__stories__/AnimatedIconCrossfade.stories.tsx b/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/__stories__/AnimatedIconCrossfade.stories.tsxindex 155931c3ceb..4b50243ef8b 100644--- a/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/__stories__/AnimatedIconCrossfade.stories.tsx+++ b/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/__stories__/AnimatedIconCrossfade.stories.tsx@@ -23,9 +23,10 @@ export default meta;type Story = StoryObj<typeof meta>;-export const AnimatedIcon: Story = {+export const Display: Story = {decorators: [ComponentDecorator],- render: function Render() {+ argTypes: { isActive: { control: false } },+ render: function Render(args) {const [isEditing, setIsEditing] = useState(false);return (@@ -33,18 +34,16 @@ export const AnimatedIcon: Story = {size="sm"aria-expanded={isEditing}onClick={() => setIsEditing(!isEditing)}- startIcon={- <AnimatedIconCrossfade- isActive={isEditing}- activeIcon={<IconX size={14} />}- inactiveIcon={<IconPencil size={14} />}- />- }+ startIcon={<AnimatedIconCrossfade {...args} isActive={isEditing} />}>Edit actions</Button>);},+};++export const AnimatedIcon: Story = {+ ...Display,play: async ({ canvasElement }) => {const button = within(canvasElement).getByRole('button', {name: 'Edit actions',@@ -73,7 +72,3 @@ export const AnimatedIcon: Story = {await userEvent.tab();},};-export const AnimatedIconDocumentation: Story = {- decorators: AnimatedIcon.decorators,- render: AnimatedIcon.render,-};diff --git a/packages/twenty-ui/src/components/layout/OverflowingList/__stories__/OverflowingList.stories.tsx b/packages/twenty-ui/src/components/layout/OverflowingList/__stories__/OverflowingList.stories.tsxindex 0ba7f941392..9632f55302c 100644--- a/packages/twenty-ui/src/components/layout/OverflowingList/__stories__/OverflowingList.stories.tsx+++ b/packages/twenty-ui/src/components/layout/OverflowingList/__stories__/OverflowingList.stories.tsx@@ -1,7 +1,6 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { Section } from '@ui/components/layout/Section/Section';-import { Text } from '@ui/primitives/typography/Text/Text';import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';import { OverflowingList } from '../OverflowingList';@@ -27,18 +26,21 @@ const meta: Meta<typeof OverflowingList> = {export default meta;type Story = StoryObj<typeof OverflowingList>;-export const Default: Story = {};--export const Documentation: Story = {+export const Display: Story = {+ args: { overflowLabel: 'Show all company tags' },render: (args) => (<Section.Root>- <Section.Header title="Company tags" />- <Text>Open the count to see all tags.</Text>- <OverflowingList {...args} overflowLabel="Show all company tags" />+ <Section.Header+ title="Company tags"+ description="Open the count to see all tags."+ />+ <OverflowingList {...args} /></Section.Root>),};+export const Default: Story = {};+export const Controlled: Story = {render: () => <OverflowingListControlledExample />,};diff --git a/packages/twenty-ui/src/components/layout/Section/__stories__/Section.stories.tsx b/packages/twenty-ui/src/components/layout/Section/__stories__/Section.stories.tsxindex 3ab4aeb36c4..8da3d343a8d 100644--- a/packages/twenty-ui/src/components/layout/Section/__stories__/Section.stories.tsx+++ b/packages/twenty-ui/src/components/layout/Section/__stories__/Section.stories.tsx@@ -20,6 +20,17 @@ export default meta;type Story = StoryObj<typeof Section.Header>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { description: 'Manage your workspace name and preferences.' },+ render: (args) => (+ <Section.Root>+ <Section.Header {...args} />+ <Text>Workspace preferences appear here.</Text>+ </Section.Root>+ ),+};+export const Default: Story = {decorators: [ComponentDecorator],};@@ -37,17 +48,6 @@ export const WithDescription: Story = {},};-export const Documentation: Story = {- decorators: WithDescription.decorators,- args: WithDescription.args,- render: (args) => (- <Section.Root>- <Section.Header {...args} />- <Text>Workspace preferences appear here.</Text>- </Section.Root>- ),-};-export const Centered: Story = {...Default,render: () => (diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/__stories__/Dropdown.stories.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/__stories__/Dropdown.stories.tsxindex 2c7033785f9..93fc5385611 100644--- a/packages/twenty-ui/src/components/navigation/Dropdown/__stories__/Dropdown.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/Dropdown/__stories__/Dropdown.stories.tsx@@ -67,7 +67,7 @@ export default meta;type Story = StoryObj<typeof DropdownMenuExample>;-export const Documentation: Story = {};+export const Display: Story = {};export const Menu: Story = {play: async ({ canvasElement }) => {diff --git a/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButton.stories.tsx b/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButton.stories.tsxindex 3c1d56a7f4a..a8b60b34020 100644--- a/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButton.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/ListItemButton/__stories__/ListItemButton.stories.tsx@@ -27,7 +27,7 @@ const meta: Meta<typeof ListItemButton> = {export default meta;type Story = StoryObj<typeof ListItemButton>;-export const Default: Story = {};+export const Display: Story = {};export const Disabled: Story = {args: { disabled: true },diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/__stories__/MenuItem.stories.tsx b/packages/twenty-ui/src/components/navigation/MenuItem/__stories__/MenuItem.stories.tsxindex ec12d3c70e1..ae03246f9ef 100644--- a/packages/twenty-ui/src/components/navigation/MenuItem/__stories__/MenuItem.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItem/__stories__/MenuItem.stories.tsx@@ -5,7 +5,7 @@ import { action } from 'storybook/actions';import { MenuItem } from '@ui/components/navigation/MenuItem/MenuItem';import { type MenuItemAccent } from '@ui/components/navigation/MenuItem/types/MenuItemAccent';-import { IconBell } from '@ui/icon';+import { IconBell, IconCopy } from '@ui/icon';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,@@ -23,7 +23,16 @@ export default meta;type Story = StoryObj<typeof MenuItem>;-export const Default: Story = {+export const Display: Story = {+ args: {+ text: 'Copy record',+ LeftIcon: IconCopy,+ shortcut: ['Mod', 'C'],+ },+ decorators: [ComponentDecorator],+};++export const WithActions: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {text: 'Menu item text',@@ -44,7 +53,7 @@ export const Default: Story = {};export const Catalog: CatalogStory<Story, typeof MenuItem> = {- args: { ...Default.args },+ args: { ...WithActions.args },argTypes: {accent: { control: false },className: { control: false },diff --git a/packages/twenty-ui/src/components/navigation/MenuItemAvatar/__stories__/MenuItemAvatar.stories.tsx b/packages/twenty-ui/src/components/navigation/MenuItemAvatar/__stories__/MenuItemAvatar.stories.tsxnew file mode 100644index 00000000000..02252eadbba--- /dev/null+++ b/packages/twenty-ui/src/components/navigation/MenuItemAvatar/__stories__/MenuItemAvatar.stories.tsx@@ -0,0 +1,21 @@+import { type Meta, type StoryObj } from '@storybook/react-vite';++import { ComponentDecorator } from '@ui/testing';+import { MenuItemAvatar } from '../MenuItemAvatar';++const meta: Meta<typeof MenuItemAvatar> = {+ title: 'UI/Components/Navigation/MenuItemAvatar',+ component: MenuItemAvatar,+ decorators: [ComponentDecorator],+ parameters: { container: { width: 280 } },+};++export default meta;+type Story = StoryObj<typeof MenuItemAvatar>;++export const Display: Story = {+ args: {+ text: 'Ada Lovelace',+ avatar: { name: 'Ada Lovelace', shape: 'circle' },+ },+};diff --git a/packages/twenty-ui/src/components/navigation/MenuItemDraggable/__stories__/MenuItemDraggable.stories.tsx b/packages/twenty-ui/src/components/navigation/MenuItemDraggable/__stories__/MenuItemDraggable.stories.tsxindex 2bdb592fd8e..4d4d5e9d838 100644--- a/packages/twenty-ui/src/components/navigation/MenuItemDraggable/__stories__/MenuItemDraggable.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItemDraggable/__stories__/MenuItemDraggable.stories.tsx@@ -25,7 +25,13 @@ export default meta;type Story = StoryObj<typeof MenuItemDraggable>;-export const Default: Story = {+export const Display: Story = {+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },+ args: { text: 'Company name', gripMode: 'always' },+ decorators: [ComponentDecorator],+};++export const WithActions: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {LeftIcon: IconBell,@@ -43,7 +49,7 @@ export const Default: Story = {};export const Catalog: Story = {- args: { ...Default.args },+ args: { ...WithActions.args },argTypes: {accent: { control: false },iconButtons: { control: false },@@ -128,18 +134,18 @@ export const Catalog: Story = {export const Grip: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- args: { ...Default.args, gripMode: 'always', isDragDisabled: false },+ args: { ...WithActions.args, gripMode: 'always', isDragDisabled: false },};export const GripOnHover: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- args: { ...Default.args, gripMode: 'onHover', isDragDisabled: false },+ args: { ...WithActions.args, gripMode: 'onHover', isDragDisabled: false },};export const GripOnHoverWithIconContainer: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {- ...Default.args,+ ...WithActions.args,gripMode: 'onHover',withIconContainer: true,isDragDisabled: false,@@ -149,7 +155,7 @@ export const GripOnHoverWithIconContainer: Story = {export const GripOnHoverWithLeftComponent: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {- ...Default.args,+ ...WithActions.args,LeftIcon: undefined,LeftComponent: (<TintedIconTile@@ -181,5 +187,5 @@ export const GripOnHoverWithLeftComponent: Story = {export const HoverDisabled: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- args: { ...Default.args, isHoverDisabled: true },+ args: { ...WithActions.args, isHoverDisabled: true },};diff --git a/packages/twenty-ui/src/components/navigation/MenuItemSuggestion/__stories__/MenuItemSuggestion.stories.tsx b/packages/twenty-ui/src/components/navigation/MenuItemSuggestion/__stories__/MenuItemSuggestion.stories.tsxnew file mode 100644index 00000000000..cbe6d665ee4--- /dev/null+++ b/packages/twenty-ui/src/components/navigation/MenuItemSuggestion/__stories__/MenuItemSuggestion.stories.tsx@@ -0,0 +1,30 @@+import { type Meta, type StoryObj } from '@storybook/react-vite';+import { Text } from '@ui/primitives/typography/Text/Text';+import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';+import { MenuItemSuggestion } from '../MenuItemSuggestion';++const meta: Meta<typeof MenuItemSuggestion> = {+ title: 'UI/Components/Navigation/MenuItemSuggestion',+ component: MenuItemSuggestion,+ decorators: [ComponentDecorator],+ parameters: {+ container: { width: 280 },+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ },+};++export default meta;+type Story = StoryObj<typeof MenuItemSuggestion>;++export const Display: Story = {+ args: { text: 'Acme', contextualText: 'Company', selected: false },+ argTypes: { onClick: { control: false } },+ render: (args) => (+ <Text+ render={<ul />}+ style={{ margin: 0, padding: 0, listStyle: 'none', width: '100%' }}+ >+ <MenuItemSuggestion {...args} />+ </Text>+ ),+};diff --git a/packages/twenty-ui/src/components/navigation/MenuPicker/__stories__/MenuPicker.stories.tsx b/packages/twenty-ui/src/components/navigation/MenuPicker/__stories__/MenuPicker.stories.tsxindex d2df81a50c4..326cf50b7f1 100644--- a/packages/twenty-ui/src/components/navigation/MenuPicker/__stories__/MenuPicker.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuPicker/__stories__/MenuPicker.stories.tsx@@ -1,9 +1,9 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { MenuPicker } from '@ui/components/navigation/MenuPicker/MenuPicker';-import { IconChartPie } from '@ui/icon';+import { IconChartPie, IconLayoutKanban } from '@ui/icon';import { Heading } from '@ui/primitives/typography/Heading/Heading';import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';-import { type ReactNode } from 'react';+import { type ReactNode, useState } from 'react';import styles from './MenuPicker.stories.module.scss';@@ -32,8 +32,21 @@ const meta: Meta<typeof MenuPicker> = {export default meta;type Story = StoryObj<typeof MenuPicker>;-export const Default: Story = {+export const Display: Story = {parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },+ args: { icon: IconLayoutKanban, label: 'Board view' },+ argTypes: { selected: { control: false }, onClick: { control: false } },+ render: function Render(args) {+ const [selected, setSelected] = useState(false);++ return (+ <MenuPicker+ {...args}+ selected={selected}+ onClick={() => setSelected(!selected)}+ />+ );+ },};export const Selected: Story = {diff --git a/packages/twenty-ui/src/components/navigation/TabButton/__stories__/TabButton.stories.tsx b/packages/twenty-ui/src/components/navigation/TabButton/__stories__/TabButton.stories.tsxindex 66b0712d4d3..04c2c8a147c 100644--- a/packages/twenty-ui/src/components/navigation/TabButton/__stories__/TabButton.stories.tsx+++ b/packages/twenty-ui/src/components/navigation/TabButton/__stories__/TabButton.stories.tsx@@ -51,7 +51,7 @@ const meta: Meta<typeof TabButton> = {export default meta;type Story = StoryObj<typeof TabButton>;-export const Default: Story = {+export const Display: Story = {args: {children: 'General',startIcon: <IconSettings />,diff --git a/packages/twenty-ui/src/components/settings/SettingsRow/__stories__/SettingsRow.stories.tsx b/packages/twenty-ui/src/components/settings/SettingsRow/__stories__/SettingsRow.stories.tsxindex 9424daeef5a..402cf4cc4ba 100644--- a/packages/twenty-ui/src/components/settings/SettingsRow/__stories__/SettingsRow.stories.tsx+++ b/packages/twenty-ui/src/components/settings/SettingsRow/__stories__/SettingsRow.stories.tsx@@ -23,18 +23,18 @@ const meta: Meta<typeof SettingsRow> = {export default meta;type Story = StoryObj<typeof SettingsRow>;-export const Default: Story = { decorators: [ComponentDecorator] };-export const Checked: Story = { ...Default, args: { defaultChecked: true } };+export const Display: Story = { decorators: [ComponentDecorator] };+export const Checked: Story = { ...Display, args: { defaultChecked: true } };export const Disabled: Story = {- ...Default,+ ...Display,args: { disabled: true, defaultChecked: true },};export const ReadOnly: Story = {- ...Default,+ ...Display,args: { readOnly: true, defaultChecked: true },};export const WithDescription: Story = {- ...Default,+ ...Display,parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: { description: 'Updates by email' },};diff --git a/packages/twenty-ui/src/primitives/accessibility/__stories__/VisuallyHidden.stories.tsx b/packages/twenty-ui/src/primitives/accessibility/__stories__/VisuallyHidden.stories.tsxindex cc9eacd2e36..6cd08c3e6c6 100644--- a/packages/twenty-ui/src/primitives/accessibility/__stories__/VisuallyHidden.stories.tsx+++ b/packages/twenty-ui/src/primitives/accessibility/__stories__/VisuallyHidden.stories.tsx@@ -16,6 +16,16 @@ const meta: Meta<typeof VisuallyHidden> = {export default meta;type Story = StoryObj<typeof VisuallyHidden>;+export const Display: Story = {+ args: { children: 'Add record' },+ render: (args) => (+ <Button>+ <IconPlus aria-hidden />+ <VisuallyHidden {...args} />+ </Button>+ ),+};+export const AccessibleDescription: Story = {render: () => {return (diff --git a/packages/twenty-ui/src/primitives/data-display/Avatar/__stories__/Avatar.stories.tsx b/packages/twenty-ui/src/primitives/data-display/Avatar/__stories__/Avatar.stories.tsxindex 977aadb5d18..d3ae6d7775b 100644--- a/packages/twenty-ui/src/primitives/data-display/Avatar/__stories__/Avatar.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Avatar/__stories__/Avatar.stories.tsx@@ -43,6 +43,18 @@ type LinkInteractionStory = StoryObj<AvatarProps & { onNavigate?: MouseEventHandler<HTMLAnchorElement> }>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: {+ shape: 'square',+ variant: 'outline',+ size: 'md',+ src: undefined,+ name: 'Acme',+ colorSeed: 'acme-app',+ },+};+export const Rounded: Story = { decorators: [ComponentDecorator] };export const Squared: Story = {@@ -89,17 +101,6 @@ export const NoAvatarPictureSquared: Story = {},};-export const App: Story = {- decorators: [ComponentDecorator],- args: {- shape: 'square',- variant: 'outline',- src: '',- name: 'Acme',- colorSeed: 'acme-app',- },-};-export const Parts: Story = {decorators: [ComponentDecorator],render: () => (@@ -410,6 +411,36 @@ export const FallbackDelayInteraction: Story = {};export const Catalog: CatalogStory<Story, typeof Avatar> = {+ args: { src: undefined, name: 'Jane' },+ decorators: [CatalogDecorator],+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ catalog: {+ dimensions: [+ {+ name: 'size',+ values: ['xs', 'sm', 'md', 'lg', 'xl'],+ props: (size: 'xs' | 'sm' | 'md' | 'lg' | 'xl') => ({ size }),+ },+ {+ name: 'shape',+ values: ['square', 'rounded-square', 'circle'],+ props: (shape: AvatarShape) => ({ shape }),+ },+ ],+ options: { elementContainer: { style: { width: 48 } } },+ },+ },+};++export const CatalogDark: typeof Catalog = {+ ...Catalog,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};++export const VisualRegression: CatalogStory<Story, typeof Avatar> = {+ tags: ['!autodocs'],args: { src: undefined, name: 'Jane' },decorators: [CatalogDecorator],parameters: {@@ -437,8 +468,7 @@ export const Catalog: CatalogStory<Story, typeof Avatar> = {},};-export const CatalogDark: typeof Catalog = {- ...Catalog,- tags: ['!autodocs'],+export const VisualRegressionDark: typeof VisualRegression = {+ ...VisualRegression,globals: { colorScheme: 'dark' },};diff --git a/packages/twenty-ui/src/primitives/data-display/Badge/__stories__/Badge.stories.tsx b/packages/twenty-ui/src/primitives/data-display/Badge/__stories__/Badge.stories.tsxindex f012de1b3ac..c6e9cd93b0e 100644--- a/packages/twenty-ui/src/primitives/data-display/Badge/__stories__/Badge.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Badge/__stories__/Badge.stories.tsx@@ -27,6 +27,11 @@ const meta: Meta<typeof Badge> = {export default meta;type Story = StoryObj<typeof Badge>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { children: 'Preview' },+};+export const Default: Story = {decorators: [ComponentDecorator],play: async ({ canvasElement }) => {@@ -41,6 +46,49 @@ export const Default: Story = {};export const Catalog: CatalogStory<Story, typeof Badge> = {+ args: { children: 3 },+ parameters: {+ catalog: {+ dimensions: [+ {+ name: 'size',+ values: ['xs', 'sm', 'md'] satisfies BadgeSize[],+ props: (size: BadgeSize) => ({ size }),+ },+ {+ name: 'shape',+ values: ['pill', 'circle'] satisfies BadgeShape[],+ props: (shape: BadgeShape) => ({ shape }),+ },+ ],+ },+ },+ decorators: [CatalogDecorator],+};++export const Colors: CatalogStory<Story, typeof Badge> = {+ args: { children: 'Preview' },+ decorators: [CatalogDecorator],+ parameters: {+ catalog: {+ dimensions: [+ {+ name: 'color',+ values: [+ 'tertiary',+ 'inherit',+ 'primary',+ 'secondary',+ ] satisfies BadgeColor[],+ props: (color: BadgeColor) => ({ color }),+ },+ ],+ },+ },+};++export const VisualRegression: CatalogStory<Story, typeof Badge> = {+ tags: ['!autodocs'],args: { children: 3 },parameters: {catalog: {@@ -89,7 +137,7 @@ export const Catalog: CatalogStory<Story, typeof Badge> = {},};-export const Documentation: Story = {+export const WithTabs: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 360 } },render: () => (diff --git a/packages/twenty-ui/src/primitives/data-display/Chip/__stories__/Chip.stories.tsx b/packages/twenty-ui/src/primitives/data-display/Chip/__stories__/Chip.stories.tsxindex 270657d96bf..7de137b992e 100644--- a/packages/twenty-ui/src/primitives/data-display/Chip/__stories__/Chip.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Chip/__stories__/Chip.stories.tsx@@ -25,25 +25,24 @@ const meta: Meta<typeof Chip> = {export default meta;type Story = StoryObj<typeof Chip>;-export const Default: Story = {+export const Display: Story = {args: {- children: 'Chip test',- size: 'sm',+ children: 'Jane',variant: 'soft',- color: 'primary',- maxWidth: 200,+ startElement: (+ <Avatar name="Jane" size="sm" shape="circle" imageProps={{ alt: '' }} />+ ),},decorators: [ComponentDecorator],};-export const WithLeftAvatar: Story = {+export const Default: Story = {args: {- children: 'John Doe',- clickable: true,- variant: 'ghost',- startElement: (- <Avatar name="JD" colorSeed="John Doe" size="sm" shape="circle" />- ),+ children: 'Chip test',+ size: 'sm',+ variant: 'soft',+ color: 'primary',+ maxWidth: 200,},decorators: [ComponentDecorator],};@@ -74,7 +73,7 @@ export const CallerFallback: Story = {};export const Catalog: CatalogStory<Story, typeof Chip> = {- args: { clickable: true, children: 'Hello' },+ args: { children: 'Jane' },argTypes: {size: { control: false },variant: { control: false },@@ -85,7 +84,6 @@ export const Catalog: CatalogStory<Story, typeof Chip> = {},parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,- pseudo: { hover: ['.hover'], active: ['.active'] },catalog: {options: { elementContainer: { style: { width: 110 } } },dimensions: [@@ -99,21 +97,6 @@ export const Catalog: CatalogStory<Story, typeof Chip> = {values: ['sm', 'md'],props: (size: ChipSize) => ({ size }),},- {- name: 'states',- values: ['default', 'hover', 'active', 'disabled'],- props: (state: string) => {- switch (state) {- case 'hover':- case 'active':- return { className: state };- case 'disabled':- return { render: <button type="button" disabled /> };- default:- return {};- }- },- },],},},diff --git a/packages/twenty-ui/src/primitives/data-display/ColorSample/__stories__/ColorSample.stories.tsx b/packages/twenty-ui/src/primitives/data-display/ColorSample/__stories__/ColorSample.stories.tsxindex 5512eb15aa3..8decac35594 100644--- a/packages/twenty-ui/src/primitives/data-display/ColorSample/__stories__/ColorSample.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/ColorSample/__stories__/ColorSample.stories.tsx@@ -15,6 +15,16 @@ const meta: Meta<typeof ColorSample> = {export default meta;type Story = StoryObj<typeof ColorSample>;+export const Display: Story = {+ args: { colorName: 'red' },+ render: (args) => (+ <Text style={{ display: 'flex', alignItems: 'center', gap: 8 }}>+ <ColorSample {...args} render={<span />} aria-hidden="true" />+ High priority+ </Text>+ ),+};+export const Default: Story = {args: { 'aria-hidden': true },};@@ -30,15 +40,6 @@ export const Circle: Story = {},};-export const WithLabel: Story = {- render: (args) => (- <Text style={{ display: 'flex', alignItems: 'center', gap: 8 }}>- <ColorSample {...args} render={<span />} aria-hidden="true" />- High priority- </Text>- ),-};-export const CustomColor: Story = {args: {colorName: 'blue',diff --git a/packages/twenty-ui/src/primitives/data-display/Status/__stories__/Status.stories.tsx b/packages/twenty-ui/src/primitives/data-display/Status/__stories__/Status.stories.tsxindex 02faf78dd17..0bf7a38e4ee 100644--- a/packages/twenty-ui/src/primitives/data-display/Status/__stories__/Status.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Status/__stories__/Status.stories.tsx@@ -22,16 +22,12 @@ const meta: Meta<typeof Status> = {export default meta;type Story = StoryObj<typeof Status>;-export const Default: Story = {+export const Display: Story = {args: {color: 'red',},decorators: [ComponentDecorator],-};--export const Documentation: Story = {- args: Default.args,- decorators: Default.decorators,+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },};export const WithLongText: Story = {@@ -47,7 +43,7 @@ export const WithLongText: Story = {};export const Loading: Story = {- ...Default,+ ...Display,args: {children: 'Saving',color: 'blue',@@ -172,9 +168,9 @@ export const RenderCallback: Story = {};export const DefaultSemantics: Story = {- ...Default,+ ...Display,args: {- ...Default.args,+ ...Display.args,title: 'Record state',onClick: fn(),ref: fn(),diff --git a/packages/twenty-ui/src/primitives/data-display/Tag/__stories__/Tag.stories.tsx b/packages/twenty-ui/src/primitives/data-display/Tag/__stories__/Tag.stories.tsxindex 46c7713af24..1ebf28c5e3f 100644--- a/packages/twenty-ui/src/primitives/data-display/Tag/__stories__/Tag.stories.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Tag/__stories__/Tag.stories.tsx@@ -24,18 +24,13 @@ const meta: Meta<typeof Tag> = {export default meta;type Story = StoryObj<typeof Tag>;-export const Default: Story = {+export const Display: Story = {args: {color: 'red',},decorators: [ComponentDecorator],};-export const Documentation: Story = {- args: Default.args,- decorators: Default.decorators,-};-export const WithLongText: Story = {decorators: [ComponentDecorator],args: {@@ -76,9 +71,9 @@ export const WithoutTruncation: Story = {};export const WithoutPadding: Story = {- ...Default,+ ...Display,args: {- ...Default.args,+ ...Display.args,style: { padding: 0 },title: 'Unpadded category',},@@ -129,6 +124,7 @@ export const FullLabel: Story = {};export const Catalog: CatalogStory<Story, typeof Tag> = {+ args: { color: 'blue', children: 'Customer' },argTypes: {color: { control: false },},@@ -144,17 +140,26 @@ export const Catalog: CatalogStory<Story, typeof Tag> = {variant,}),},- {- name: 'colors',- values: MAIN_COLOR_NAMES,- props: (color: ThemeColor) => ({ color }),- },],},},decorators: [CatalogDecorator],};+export const Colors: Story = {+ decorators: [ComponentDecorator],+ parameters: { container: { width: 600 }, a11y: A11Y_DEFER_COLOR_CONTRAST },+ render: () => (+ <Text style={{ display: 'flex', flexWrap: 'wrap', gap: 16 }}>+ {MAIN_COLOR_NAMES.map((color) => (+ <Tag key={color} color={color}>+ {color}+ </Tag>+ ))}+ </Text>+ ),+};+export const EmptyTag: Story = {decorators: [ComponentDecorator],args: {@@ -240,9 +245,9 @@ export const RenderCallback: Story = {};export const DefaultSemantics: Story = {- ...Default,+ ...Display,args: {- ...Default.args,+ ...Display.args,title: 'Category label',onClick: fn(),ref: fn(),@@ -300,9 +305,9 @@ export const Navigation: Story = {};export const NodeContent: Story = {- ...Default,+ ...Display,args: {- ...Default.args,+ ...Display.args,children: (<>Category:{' '}@@ -328,3 +333,36 @@ export const NodeContent: Story = {await expect(canvas.queryByRole('button')).not.toBeInTheDocument();},};++export const VisualRegression: CatalogStory<Story, typeof Tag> = {+ tags: ['!autodocs'],+ argTypes: {+ color: { control: false },+ },+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ catalog: {+ options: { elementContainer: { style: { width: 80 } } },+ dimensions: [+ {+ name: 'variants',+ values: ['soft', 'solid', 'outline', 'ghost'],+ props: (variant: 'soft' | 'solid' | 'outline' | 'ghost') => ({+ variant,+ }),+ },+ {+ name: 'colors',+ values: MAIN_COLOR_NAMES,+ props: (color: ThemeColor) => ({ color }),+ },+ ],+ },+ },+ decorators: [CatalogDecorator],+};++export const VisualRegressionDark: typeof VisualRegression = {+ ...VisualRegression,+ globals: { colorScheme: 'dark' },+};diff --git a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scss b/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scssdeleted file mode 100644index 21fa331c818..00000000000--- a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scss+++ /dev/null@@ -1,15 +0,0 @@-.bannerContent {- align-items: center;- display: flex;- flex: 1;- gap: 8px;- justify-content: center;-}--.container {- width: 100%;-}--.closeButton[data-variant='ghost'] {- color: inherit;-}diff --git a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scss.d.ts b/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scss.d.tsdeleted file mode 100644index a32841232ed..00000000000--- a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.module.scss.d.ts+++ /dev/null@@ -1,6 +0,0 @@-declare const classNames: {- readonly bannerContent: 'bannerContent';- readonly closeButton: 'closeButton';- readonly container: 'container';-};-export default classNames;diff --git a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.tsx b/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.tsxindex 1fd76dad69f..890746fd5dd 100644--- a/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/Banner/__stories__/Banner.stories.tsx@@ -1,12 +1,11 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';-import { IconInfoCircle, IconX } from '@ui/icon';+import { IconInfoCircle } from '@ui/icon';import { Banner } from '@ui/primitives/feedback/Banner/Banner';import { type BannerColor } from '@ui/primitives/feedback/Banner/types/BannerColor';import { type BannerStatus } from '@ui/primitives/feedback/Banner/types/BannerStatus';import { type BannerVariant } from '@ui/primitives/feedback/Banner/types/BannerVariant';-import { Button } from '@ui/primitives/input/Button/Button';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,@@ -14,8 +13,6 @@ import {ComponentDecorator,} from '@ui/testing';-import styles from './Banner.stories.module.scss';-const meta: Meta<typeof Banner> = {title: 'UI/Feedback/Banner',component: Banner,@@ -50,23 +47,13 @@ const meta: Meta<typeof Banner> = {export default meta;type Story = StoryObj<typeof Banner>;-export const Default: Story = {- args: { status: 'info', variant: 'solid' },- render: (args) => (- <Banner {...args}>- <div className={styles.bannerContent}>- Sync lost with mailbox [email protected]. Please reconnect for updates:- <Banner.Action>Reconnect</Banner.Action>- </div>- <Button- className={styles.closeButton}- size="sm"- variant="ghost"- aria-label="Close"- startIcon={<IconX />}- />- </Banner>- ),+export const Display: Story = {+ args: {+ status: 'info',+ variant: 'solid',+ children:+ 'Contact sync is temporarily paused. Your saved records remain available.',+ },decorators: [ComponentDecorator],};@@ -97,10 +84,14 @@ export const Catalog: CatalogStory<Story, typeof Banner> = {props: (status: BannerStatus) => ({ status }),},],- options: { elementContainer: { width: 700 } },+ options: { elementContainer: { width: 240 } },},},decorators: [CatalogDecorator],+};++export const CatalogContrast: Story = {+ ...Catalog,play: async ({ canvasElement }) => {const canvas = within(canvasElement);diff --git a/packages/twenty-ui/src/primitives/feedback/Loader/__stories__/Loader.stories.tsx b/packages/twenty-ui/src/primitives/feedback/Loader/__stories__/Loader.stories.tsxindex 181bae62f55..f1b820a4eb1 100644--- a/packages/twenty-ui/src/primitives/feedback/Loader/__stories__/Loader.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/Loader/__stories__/Loader.stories.tsx@@ -16,6 +16,20 @@ export default meta;type Story = StoryObj<typeof Loader>;+export const Display: Story = {+ args: { color: 'blue', 'aria-hidden': true, render: <span /> },+ render: (args) => (+ <Text+ render={<div />}+ role="status"+ style={{ display: 'flex', alignItems: 'center', gap: 8 }}+ >+ <Loader {...args} data-testid="decorative-loader" />+ <Text>Saving changes</Text>+ </Text>+ ),+};+export const WithColor: Story = {args: {color: 'red',@@ -29,22 +43,8 @@ export const WithColor: Story = {},};-export const WithColorDocumentation: Story = {- render: () => (- <Text render={<div />} role="status" style={{ display: 'flex', gap: 8 }}>- <Loader- color="blue"- aria-hidden="true"- render={<span />}- data-testid="decorative-loader"- />- <Text>Saving changes</Text>- </Text>- ),-};-export const WithStatusText: Story = {- ...WithColorDocumentation,+ ...Display,play: async ({ canvas }) => {const status = canvas.getByRole('status');const label = canvas.getByText('Saving changes');@@ -104,7 +104,10 @@ export const Composition: Story = {style: { borderColor: '#123456' },},render: (args) => (- <Text render={<div />} style={{ display: 'flex', gap: 8 }}>+ <Text+ render={<div />}+ style={{ display: 'flex', alignItems: 'center', gap: 8 }}+ ><Loader {...args} /><Text id="loader-label">Loading results</Text></Text>diff --git a/packages/twenty-ui/src/primitives/feedback/Progress/__stories__/Progress.stories.tsx b/packages/twenty-ui/src/primitives/feedback/Progress/__stories__/Progress.stories.tsxindex 3b23ef88558..2c9f217ab8e 100644--- a/packages/twenty-ui/src/primitives/feedback/Progress/__stories__/Progress.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/Progress/__stories__/Progress.stories.tsx@@ -13,16 +13,32 @@ const meta = {component: Progress.Root,decorators: [ComponentDecorator],args: { value: 70, min: 20, max: 120 },- parameters: { container: { width: 240 } },+ parameters: { container: { width: 320 } },render: (args) => (- <Progress.Root {...args} style={{ width: '100%' }}>+ <Progress.Root+ {...args}+ style={{+ display: 'grid',+ gridTemplateColumns: '1fr auto',+ alignItems: 'center',+ gap: 8,+ width: '100%',+ }}+ ><Progress.Label render={<Text />}>Importing records</Progress.Label><Progress.Value render={<Text />} /><Progress.Track- style={{ height: 8, background: 'var(--t-background-tertiary)' }}+ style={{+ gridColumn: '1 / -1',+ height: 8,+ background: 'var(--t-background-tertiary)',+ }}><Progress.Indicator- style={{ background: 'var(--t-font-color-primary)' }}+ style={{+ height: '100%',+ background: 'var(--t-font-color-primary)',+ }}/></Progress.Track></Progress.Root>@@ -33,7 +49,7 @@ export default meta;type Story = StoryObj<typeof meta>;-export const Default: Story = {};+export const Display: Story = {};export const LabelAndValue: Story = {play: async ({ canvasElement }) => {diff --git a/packages/twenty-ui/src/primitives/feedback/ProgressBar/__stories__/ProgressBar.stories.tsx b/packages/twenty-ui/src/primitives/feedback/ProgressBar/__stories__/ProgressBar.stories.tsxindex 35b0ccde560..7dda7221354 100644--- a/packages/twenty-ui/src/primitives/feedback/ProgressBar/__stories__/ProgressBar.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/ProgressBar/__stories__/ProgressBar.stories.tsx@@ -5,6 +5,7 @@ import { expect, userEvent, within } from 'storybook/test';import { type Progress, ProgressRing } from '@ui/primitives/feedback';import { ProgressBar } from '@ui/primitives/feedback/ProgressBar/ProgressBar';import { Button } from '@ui/primitives/input/Button/Button';+import { Text } from '@ui/primitives/typography/Text/Text';import { ComponentDecorator } from '@ui/testing/decorators/ComponentDecorator';const meta: Meta<typeof ProgressBar> = {@@ -22,7 +23,22 @@ export default meta;type Story = StoryObj<typeof ProgressBar>;-export const Default: Story = {};+export const Display: Story = {+ argTypes: {+ value: { control: { type: 'range', min: 0, max: 1000, step: 1 } },+ },+ args: {+ value: 600,+ max: 1000,+ 'aria-label': 'Importing records',+ },+ render: (args) => (+ <Text style={{ display: 'grid', gap: 8, width: 300 }}>+ <Text>Importing records: {args.value ?? 'preparing'}</Text>+ <ProgressBar {...args} />+ </Text>+ ),+};export const Small: Story = {args: { value: 50, size: 'sm', withBorderRadius: true },diff --git a/packages/twenty-ui/src/primitives/feedback/ProgressRing/__stories__/ProgressRing.stories.tsx b/packages/twenty-ui/src/primitives/feedback/ProgressRing/__stories__/ProgressRing.stories.tsxindex 22f21c7f33c..86469c03694 100644--- a/packages/twenty-ui/src/primitives/feedback/ProgressRing/__stories__/ProgressRing.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/ProgressRing/__stories__/ProgressRing.stories.tsx@@ -25,7 +25,18 @@ export default meta;type Story = StoryObj<typeof ProgressRing>;-export const Default: Story = {};+export const Display: Story = {+ argTypes: {+ value: { control: { type: 'range', min: 0, max: 1000, step: 1 } },+ },+ args: {+ value: 600,+ max: 1000,+ 'aria-label': 'Importing records',+ 'aria-valuetext': '600 of 1,000 records',+ children: '600 / 1,000',+ },+};export const Small: Story = {args: { size: 'sm' },diff --git a/packages/twenty-ui/src/primitives/feedback/Skeleton/__stories__/Skeleton.stories.tsx b/packages/twenty-ui/src/primitives/feedback/Skeleton/__stories__/Skeleton.stories.tsxindex 1d6c06ff08c..2a0f9938a19 100644--- a/packages/twenty-ui/src/primitives/feedback/Skeleton/__stories__/Skeleton.stories.tsx+++ b/packages/twenty-ui/src/primitives/feedback/Skeleton/__stories__/Skeleton.stories.tsx@@ -25,6 +25,29 @@ type Story = StoryObj<typeof Skeleton>;const isMotionEnabled = () =>!window.matchMedia('(prefers-reduced-motion: reduce)').matches;+export const Display: Story = {+ parameters: {+ controls: {+ include: ['animated', 'borderRadius', 'baseColor', 'highlightColor'],+ },+ },+ render: (args) => (+ <Text+ render={<div />}+ style={{ display: 'flex', gap: 16, alignItems: 'center' }}+ >+ <Skeleton {...args} width={40} height={40} borderRadius="50%" />+ <Text+ render={<div />}+ style={{ display: 'flex', flexDirection: 'column', gap: 8 }}+ >+ <Skeleton {...args} width={180} height={16} />+ <Skeleton {...args} width={120} height={13} />+ </Text>+ </Text>+ ),+};+export const Default: Story = {play: async ({ canvas }) => {const placeholder = canvas.getByTestId('placeholder');@@ -58,24 +81,6 @@ export const Default: Story = {},};-export const Shapes: Story = {- render: (args) => (- <Text- render={<div />}- style={{ display: 'flex', gap: 16, alignItems: 'center' }}- >- <Skeleton {...args} width={40} height={40} borderRadius="50%" />- <Text- render={<div />}- style={{ display: 'flex', flexDirection: 'column', gap: 8 }}- >- <Skeleton {...args} width={180} height={16} />- <Skeleton {...args} width={120} height={13} />- </Text>- </Text>- ),-};-export const Static: Story = {args: { animated: false },};diff --git a/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/Autocomplete.stories.tsx b/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/Autocomplete.stories.tsxindex 007c2d6b164..f936a891aec 100644--- a/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/Autocomplete.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/Autocomplete.stories.tsx@@ -15,6 +15,8 @@ const meta: Meta<typeof AutocompleteExample> = {export default meta;type Story = StoryObj<typeof AutocompleteExample>;+export const Display: Story = {};+export const Default: Story = {play: async ({ canvasElement }) => {const input = within(canvasElement).getByRole('combobox', {@@ -37,5 +39,3 @@ export const Default: Story = {);},};--export const Documentation: Story = {};diff --git a/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/AutocompleteGroupedExample.tsx b/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/AutocompleteGroupedExample.tsxindex 4ce4d24cfda..15f2e626c25 100644--- a/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/AutocompleteGroupedExample.tsx+++ b/packages/twenty-ui/src/primitives/input/Autocomplete/__stories__/AutocompleteGroupedExample.tsx@@ -22,57 +22,71 @@ const CITY_GROUPS: CityGroup[] = [];export const AutocompleteGroupedExample = () => (- <Autocomplete.Root- items={CITY_GROUPS}- itemToStringValue={(city) => city.name}- autoHighlight="always"+ <Text+ style={{ display: 'grid', alignContent: 'start', gap: 8, width: '100%' }}>- <Autocomplete.InputGroup style={{ gap: 4 }}>- <Autocomplete.Input aria-label="City" placeholder="Search cities" />- <Autocomplete.Clear- aria-label="Clear city"- render={<Button variant="ghost" size="sm" startIcon={<IconX />} />}- />- <Autocomplete.Trigger- aria-label="Show cities"- render={<Button variant="ghost" size="sm" />}+ <label htmlFor="grouped-city">+ <Text render={<span />}>City</Text>+ </label>+ <Autocomplete.Root+ items={CITY_GROUPS}+ itemToStringValue={(city) => city.name}+ autoHighlight="always"+ >+ <Autocomplete.InputGroup style={{ gap: 4 }}>+ <Autocomplete.Input id="grouped-city" placeholder="Search cities" />+ <Autocomplete.Clear+ aria-label="Clear city"+ render={<Button variant="ghost" size="sm" startIcon={<IconX />} />}+ />+ <Autocomplete.Trigger+ aria-label="Show cities"+ render={<Button variant="ghost" size="sm" />}+ >+ <Autocomplete.Icon>+ <IconChevronDown />+ </Autocomplete.Icon>+ </Autocomplete.Trigger>+ </Autocomplete.InputGroup>+ <Autocomplete.Portal>+ <Autocomplete.Positioner>+ <Autocomplete.Popup>+ <Autocomplete.Arrow />+ <Autocomplete.Empty>No matching cities</Autocomplete.Empty>+ <Autocomplete.List>+ {(group: CityGroup, groupIndex: number) => (+ <Autocomplete.Group key={group.label} items={group.items}>+ {groupIndex > 0 && <Autocomplete.Separator />}+ <Autocomplete.GroupLabel>+ {group.label}+ </Autocomplete.GroupLabel>+ <Autocomplete.Collection>+ {(city: City) => (+ <Autocomplete.Item+ key={city.id}+ value={city}+ description={city.country}+ >+ {city.name}+ </Autocomplete.Item>+ )}+ </Autocomplete.Collection>+ </Autocomplete.Group>+ )}+ </Autocomplete.List>+ </Autocomplete.Popup>+ </Autocomplete.Positioner>+ </Autocomplete.Portal>+ <Autocomplete.Status+ render={<Text />}+ style={{ color: 'var(--t-font-color-secondary)' }}>- <Autocomplete.Icon>- <IconChevronDown />- </Autocomplete.Icon>- </Autocomplete.Trigger>- </Autocomplete.InputGroup>- <Autocomplete.Portal>- <Autocomplete.Positioner>- <Autocomplete.Popup>- <Autocomplete.Arrow />- <Autocomplete.Empty>No matching cities</Autocomplete.Empty>- <Autocomplete.List>- {(group: CityGroup, groupIndex: number) => (- <Autocomplete.Group key={group.label} items={group.items}>- {groupIndex > 0 && <Autocomplete.Separator />}- <Autocomplete.GroupLabel>{group.label}</Autocomplete.GroupLabel>- <Autocomplete.Collection>- {(city: City) => (- <Autocomplete.Item- key={city.id}- value={city}- description={city.country}- >- {city.name}- </Autocomplete.Item>- )}- </Autocomplete.Collection>- </Autocomplete.Group>- )}- </Autocomplete.List>- </Autocomplete.Popup>- </Autocomplete.Positioner>- </Autocomplete.Portal>- <Autocomplete.Status render={<Text />}>- <Autocomplete.Value>- {(value) => (value ? `City query: ${value}` : 'Type to search cities')}- </Autocomplete.Value>- </Autocomplete.Status>- </Autocomplete.Root>+ <Autocomplete.Value>+ {(value) =>+ value ? `City query: ${value}` : 'Type to search cities'+ }+ </Autocomplete.Value>+ </Autocomplete.Status>+ </Autocomplete.Root>+ </Text>);diff --git a/packages/twenty-ui/src/primitives/input/Button/__stories__/Button.stories.tsx b/packages/twenty-ui/src/primitives/input/Button/__stories__/Button.stories.tsxindex 657ec42b478..bf2815d22cb 100644--- a/packages/twenty-ui/src/primitives/input/Button/__stories__/Button.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Button/__stories__/Button.stories.tsx@@ -10,11 +10,12 @@ import {CatalogDecorator,type CatalogStory,ComponentDecorator,+ GroupedCatalog,} from '@ui/testing';import { Button } from '../Button';import { type ButtonProps } from '../types/ButtonProps';-import { type ButtonVariant } from '../types/ButtonVariant';import { type ButtonColor } from '../types/ButtonColor';+import { type ButtonVariant } from '../types/ButtonVariant';const meta: Meta<typeof Button> = {title: 'UI/Input/Button/Button',@@ -24,9 +25,10 @@ const meta: Meta<typeof Button> = {export default meta;type Story = StoryObj<typeof Button>;-export const Default: Story = { decorators: [ComponentDecorator] };+export const Display: Story = { decorators: [ComponentDecorator] };+export const Keyboard: Story = {- ...Default,+ ...Display,args: { onClick: fn(), onFocus: fn(), onBlur: fn() },play: async ({ canvasElement, args }) => {const button = within(canvasElement).getByRole('button');@@ -39,7 +41,7 @@ export const Keyboard: Story = {},};export const Disabled: Story = {- ...Default,+ ...Display,args: { disabled: true, onClick: fn() },play: async ({ canvasElement, args }) => {const button = within(canvasElement).getByRole('button');@@ -88,7 +90,7 @@ const LoadingExample = () => {);};export const Loading: Story = {- ...Default,+ ...Display,render: () => <LoadingExample />,play: async ({ canvasElement }) => {const canvas = within(canvasElement);@@ -106,7 +108,7 @@ export const Loading: Story = {},};export const LoadingAtStart: Story = {- ...Default,+ ...Display,args: {children: 'Creating record',startIcon: <IconPlus />,@@ -130,7 +132,7 @@ export const LoadingAtStartInteraction: Story = {},};export const LoadingAtEnd: Story = {- ...Default,+ ...Display,args: {children: 'Installing (42%)',startIcon: <IconDownload />,@@ -152,7 +154,7 @@ export const LoadingAtEndInteraction: Story = {},};export const NativeForm: Story = {- ...Default,+ ...Display,parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: { onClick: fn() },render: (args) => (@@ -185,7 +187,7 @@ export const NativeForm: Story = {},};export const LinkButton: Story = {- ...Default,+ ...Display,parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },args: {variant: 'link',@@ -201,7 +203,7 @@ export const LinkButton: Story = {},};export const DisabledLink: Story = {- ...Default,+ ...Display,args: {variant: 'link',href: '#disabled-destination',@@ -225,7 +227,7 @@ export const CustomRender: Story = {},};export const Icons: Story = {- ...Default,+ ...Display,args: {startIcon: <IconPlus />,endIcon: <IconArrowRight />,@@ -233,7 +235,7 @@ export const Icons: Story = {},};export const Truncation: Story = {- ...Default,+ ...Display,args: {children: 'A long button label that must remain inside its container',startIcon: <IconPlus />,@@ -246,48 +248,80 @@ export const Truncation: Story = {},};-const CATALOG_STATES: Record<string, Partial<ButtonProps>> = {- default: {},- small: { size: 'sm' },- shortcut: { shortcut: ['H'] },- disabled: { disabled: true },- loading: { loading: true },-};-export const Catalog: CatalogStory<Story, typeof Button> = {- decorators: [CatalogDecorator],- args: { children: 'Button' },+const BUTTON_CATALOG_GROUPS: {+ label: string;+ examples: { label: string; props: Partial<ButtonProps> }[];+}[] = [+ {+ label: 'Variants',+ examples: [+ { label: 'Solid', props: { variant: 'solid' } },+ { label: 'Outline', props: { variant: 'outline' } },+ { label: 'Soft', props: { variant: 'soft' } },+ { label: 'Ghost', props: { variant: 'ghost' } },+ { label: 'Link', props: { variant: 'link' } },+ ],+ },+ {+ label: 'Colors',+ examples: [+ { label: 'Neutral', props: { color: 'neutral', variant: 'solid' } },+ { label: 'Accent', props: { color: 'accent', variant: 'solid' } },+ { label: 'Danger', props: { color: 'danger', variant: 'solid' } },+ { label: 'Success', props: { color: 'success', variant: 'solid' } },+ ],+ },+ {+ label: 'Sizes',+ examples: [+ { label: 'Small', props: { size: 'sm' } },+ { label: 'Medium', props: { size: 'md' } },+ ],+ },+ {+ label: 'States',+ examples: [+ { label: 'Ready', props: {} },+ { label: 'Disabled', props: { disabled: true } },+ { label: 'Loading', props: { loading: true } },+ ],+ },+];++export const Catalog: Story = {+ decorators: [ComponentDecorator],parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,- catalog: {- dimensions: [- {- name: 'state',- values: Object.keys(CATALOG_STATES),- props: (state: string) => CATALOG_STATES[state] ?? {},- },- {- name: 'color',- values: ['neutral', 'accent', 'danger', 'success'],- props: (color: ButtonColor) => ({ color }),- },- {- name: 'variant',- values: ['solid', 'outline', 'soft', 'ghost', 'link'],- props: (variant: ButtonVariant) => ({ variant }),- },- ],- options: { elementContainer: { style: { width: 100 } } },- },+ container: { width: 640 },},+ render: () => (+ <GroupedCatalog+ groups={BUTTON_CATALOG_GROUPS}+ renderExample={({ label, props }) => (+ <>+ <Text>{label}</Text>+ <Button+ variant={props.variant}+ color={props.color}+ size={props.size}+ disabled={props.disabled}+ loading={props.loading}+ >+ Save changes+ </Button>+ </>+ )}+ />+ ),};-export const CatalogDark: CatalogStory<Story, typeof Button> = {+export const CatalogDark: Story = {...Catalog,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};export const NativeButtonWithHref: Story = {- ...Default,+ ...Display,args: {children: 'Open records',nativeButton: true,@@ -319,7 +353,7 @@ export const NativeButtonWithHref: Story = {};export const CustomButton: Story = {- ...Default,+ ...Display,args: {children: 'Open records',nativeButton: false,@@ -342,7 +376,7 @@ export const CustomButton: Story = {};export const NativeAnchorAttributes: Story = {- ...Default,+ ...Display,args: {children: 'Open records',href: '#records-download',@@ -382,7 +416,7 @@ export const NativeAnchorAttributes: Story = {const renderedLinkClick = fn();export const ComposedNavigation: Story = {- ...Default,+ ...Display,args: {children: 'Open records',nativeButton: false,@@ -412,7 +446,7 @@ export const ComposedNavigation: Story = {};export const RenderCallback: Story = {- ...Default,+ ...Display,args: {children: 'Open records',nativeButton: false,@@ -462,3 +496,44 @@ export const CustomButtonKeyboardCancellation: Story = {await expect(args.onClick).toHaveBeenCalledOnce();},};++const VISUAL_REGRESSION_STATES: Record<string, Partial<ButtonProps>> = {+ default: {},+ small: { size: 'sm' },+ shortcut: { shortcut: ['H'] },+ disabled: { disabled: true },+ loading: { loading: true },+};+export const VisualRegression: CatalogStory<Story, typeof Button> = {+ tags: ['!autodocs'],+ decorators: [CatalogDecorator],+ args: { children: 'Button' },+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ catalog: {+ dimensions: [+ {+ name: 'state',+ values: Object.keys(VISUAL_REGRESSION_STATES),+ props: (state: string) => VISUAL_REGRESSION_STATES[state] ?? {},+ },+ {+ name: 'color',+ values: ['neutral', 'accent', 'danger', 'success'],+ props: (color: ButtonColor) => ({ color }),+ },+ {+ name: 'variant',+ values: ['solid', 'outline', 'soft', 'ghost', 'link'],+ props: (variant: ButtonVariant) => ({ variant }),+ },+ ],+ options: { elementContainer: { style: { width: 100 } } },+ },+ },+};+export const VisualRegressionDark: CatalogStory<Story, typeof Button> = {+ ...VisualRegression,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};diff --git a/packages/twenty-ui/src/primitives/input/ButtonGroup/__stories__/ButtonGroup.stories.tsx b/packages/twenty-ui/src/primitives/input/ButtonGroup/__stories__/ButtonGroup.stories.tsxindex 796a4265584..351ef1d2ffd 100644--- a/packages/twenty-ui/src/primitives/input/ButtonGroup/__stories__/ButtonGroup.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/ButtonGroup/__stories__/ButtonGroup.stories.tsx@@ -12,7 +12,7 @@ const meta: Meta<typeof ButtonGroup> = {export default meta;type Story = StoryObj<typeof ButtonGroup>;-export const Default: Story = {+export const Display: Story = {args: {'aria-label': 'Create activity',size: 'sm',@@ -29,6 +29,10 @@ export const Default: Story = {],},decorators: [ComponentDecorator],+};++export const Default: Story = {+ ...Display,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const buttons = canvas.getAllByRole('button');@@ -38,11 +42,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- args: Default.args,- decorators: Default.decorators,-};-export const Dark: Story = { ...Default, globals: { colorScheme: 'dark' } };export const Single: Story = {...Default,@@ -170,12 +169,12 @@ export const AppearanceOverrides: Story = {decorators: [ComponentDecorator],render: () => (<ButtonGroup- aria-label="Activity appearance"+ aria-label="Activity actions"variant="solid"color="accent"size="sm">- <Button variant="ghost" color="danger" size="md">+ <Button variant="ghost" color="danger">Delete activity</Button><Button color="neutral">Duplicate activity</Button>@@ -198,7 +197,7 @@ export const AppearanceOverridesInteraction: Story = {await expect(deleteButton).toHaveAttribute('data-variant', 'ghost');await expect(deleteButton).toHaveAttribute('data-color', 'danger');- await expect(deleteButton).toHaveAttribute('data-size', 'md');+ await expect(deleteButton).toHaveAttribute('data-size', 'sm');await expect(duplicateButton).toHaveAttribute('data-variant', 'solid');await expect(duplicateButton).toHaveAttribute('data-color', 'neutral');await expect(duplicateButton).toHaveAttribute('data-size', 'sm');diff --git a/packages/twenty-ui/src/primitives/input/Checkbox/__stories__/Checkbox.stories.tsx b/packages/twenty-ui/src/primitives/input/Checkbox/__stories__/Checkbox.stories.tsxindex 4d4dfca95e1..ebad1e8bc10 100644--- a/packages/twenty-ui/src/primitives/input/Checkbox/__stories__/Checkbox.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Checkbox/__stories__/Checkbox.stories.tsx@@ -1,17 +1,19 @@import { type Meta, type StoryObj } from '@storybook/react-vite';-import { useState } from 'react';+import { type ComponentProps, useId, useState } from 'react';+import { Text } from '@ui/primitives/typography';import { expect, fn, userEvent, within } from 'storybook/test';import { Checkbox } from '@ui/primitives/input/Checkbox/Checkbox';import { Button } from '@ui/primitives/input/Button/Button';import { type CheckboxColor } from '@ui/primitives/input/Checkbox/types/CheckboxColor';-import { type CheckboxProps } from '@ui/primitives/input/Checkbox/types/CheckboxProps';import { type CheckboxSize } from '@ui/primitives/input/Checkbox/types/CheckboxSize';+import { type CheckboxProps } from '@ui/primitives/input/Checkbox/types/CheckboxProps';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,type CatalogStory,ComponentDecorator,+ GroupedCatalog,} from '@ui/testing';const meta: Meta<typeof Checkbox> = {@@ -23,6 +25,13 @@ const meta: Meta<typeof Checkbox> = {export default meta;type Story = StoryObj<typeof Checkbox>;+export const Display: Story = {+ args: { 'aria-label': undefined },+ decorators: [ComponentDecorator],+ parameters: { container: { width: 320 } },+ render: (args) => <CheckboxDisplayExample {...args} />,+};+const ControlledExample = (props: CheckboxProps) => {const [checked, setChecked] = useState(false);return (@@ -61,9 +70,25 @@ export const Controlled: Story = {},};-export const Default: Story = {- args: { hoverable: false },- decorators: [ComponentDecorator],+const CheckboxDisplayExample = (props: ComponentProps<typeof Checkbox>) => {+ const generatedCheckboxId = useId();+ const checkboxId = props.id ?? generatedCheckboxId;++ return (+ <label+ htmlFor={checkboxId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ >+ <Checkbox+ name="updates"+ value="email"+ defaultChecked+ {...props}+ id={checkboxId}+ />+ <Text render={<span />}>Receive product updates</Text>+ </label>+ );};export const Round: Story = {@@ -86,14 +111,92 @@ export const Warning: Story = {decorators: [ComponentDecorator],};-type CatalogState =+const CHECKBOX_CATALOG_GROUPS: {+ label: string;+ examples: { label: string; props: Partial<CheckboxProps> }[];+}[] = [+ {+ label: 'States',+ examples: [+ { label: 'Unchecked', props: {} },+ { label: 'Checked', props: { defaultChecked: true } },+ { label: 'Indeterminate', props: { indeterminate: true } },+ { label: 'Disabled', props: { disabled: true } },+ {+ label: 'Disabled checked',+ props: { defaultChecked: true, disabled: true },+ },+ ],+ },+ {+ label: 'Colors',+ examples: [+ { label: 'Accent', props: { color: 'accent', defaultChecked: true } },+ { label: 'Success', props: { color: 'success', defaultChecked: true } },+ { label: 'Warning', props: { color: 'warning', defaultChecked: true } },+ ],+ },+ {+ label: 'Sizes and shapes',+ examples: [+ { label: 'Small', props: { size: 'sm', defaultChecked: true } },+ { label: 'Medium', props: { size: 'md', defaultChecked: true } },+ { label: 'Round', props: { shape: 'round', defaultChecked: true } },+ ],+ },+ {+ label: 'Variants',+ examples: [+ { label: 'Solid', props: { variant: 'solid', defaultChecked: true } },+ { label: 'Outline', props: { variant: 'outline', defaultChecked: true } },+ { label: 'Soft', props: { variant: 'soft', defaultChecked: true } },+ ],+ },+];++export const Catalog: Story = {+ decorators: [ComponentDecorator],+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ container: { width: 640 },+ },+ render: () => (+ <GroupedCatalog+ groups={CHECKBOX_CATALOG_GROUPS}+ renderExample={({ label, props }) => (+ <label style={{ display: 'flex', alignItems: 'center', gap: 8 }}>+ <Checkbox+ defaultChecked={props.defaultChecked}+ indeterminate={props.indeterminate}+ disabled={props.disabled}+ color={props.color}+ size={props.size}+ shape={props.shape}+ variant={props.variant}+ />+ <Text>{label}</Text>+ </label>+ )}+ />+ ),+};+export const CatalogDark: Story = {+ ...Catalog,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};++type VisualRegressionState =| 'unchecked'| 'checked'| 'mixed'| 'disabled'| 'disabled on';-const CATALOG_STATE_PROPS: Record<CatalogState, Partial<CheckboxProps>> = {+const VISUAL_REGRESSION_STATE_PROPS: Record<+ VisualRegressionState,+ Partial<CheckboxProps>+> = {unchecked: {},checked: { checked: true },mixed: { indeterminate: true },@@ -101,7 +204,8 @@ const CATALOG_STATE_PROPS: Record<CatalogState, Partial<CheckboxProps>> = {'disabled on': { checked: true, disabled: true },};-export const Catalog: CatalogStory<Story, typeof Checkbox> = {+export const VisualRegression: CatalogStory<Story, typeof Checkbox> = {+ tags: ['!autodocs'],decorators: [CatalogDecorator],parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,@@ -109,8 +213,9 @@ export const Catalog: CatalogStory<Story, typeof Checkbox> = {dimensions: [{name: 'state',- values: Object.keys(CATALOG_STATE_PROPS),- props: (state: CatalogState) => CATALOG_STATE_PROPS[state],+ values: Object.keys(VISUAL_REGRESSION_STATE_PROPS),+ props: (state: VisualRegressionState) =>+ VISUAL_REGRESSION_STATE_PROPS[state],},{name: 'color',@@ -128,19 +233,19 @@ export const Catalog: CatalogStory<Story, typeof Checkbox> = {},};-export const CatalogDark: CatalogStory<Story, typeof Checkbox> = {- ...Catalog,+export const VisualRegressionDark: CatalogStory<Story, typeof Checkbox> = {+ ...VisualRegression,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};-export const Soft: CatalogStory<Story, typeof Checkbox> = {- ...Catalog,+export const SoftVisualRegression: CatalogStory<Story, typeof Checkbox> = {+ ...VisualRegression,args: { variant: 'soft' },};-export const SoftDark: CatalogStory<Story, typeof Checkbox> = {- ...Soft,+export const SoftVisualRegressionDark: CatalogStory<Story, typeof Checkbox> = {+ ...SoftVisualRegression,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};diff --git a/packages/twenty-ui/src/primitives/input/Field/__stories__/Field.stories.tsx b/packages/twenty-ui/src/primitives/input/Field/__stories__/Field.stories.tsxindex 6c99cfafc1f..e531e19d5bf 100644--- a/packages/twenty-ui/src/primitives/input/Field/__stories__/Field.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Field/__stories__/Field.stories.tsx@@ -1,3 +1,6 @@+import { type ComponentProps } from 'react';+import { Input } from '@ui/primitives/input';+import { Text } from '@ui/primitives/typography';import { type Meta, type StoryObj } from '@storybook/react-vite';import {@@ -20,17 +23,24 @@ export default meta;type Story = StoryObj<typeof Field.Root>;-export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],- parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- render: () => (- <Field.Root>- <Field.Label>Label</Field.Label>- <Field.Description>This is a hint</Field.Description>- </Field.Root>- ),+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST, container: { width: 320 } },+ render: (args) => <FieldDisplayExample {...args} />,};+const FieldDisplayExample = (props: ComponentProps<typeof Field.Root>) => (+ <Field.Root name="email" validationMode="onBlur" {...props}>+ <Field.Label>Work email</Field.Label>+ <Input type="email" required placeholder="[email protected]" />+ <Field.Description>+ We send account updates to this address.+ </Field.Description>+ <Field.Error match="valueMissing">Enter your email address.</Field.Error>+ <Field.Error match="typeMismatch">Enter a valid email address.</Field.Error>+ </Field.Root>+);+export const WithError: Story = {decorators: [ComponentDecorator],parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },@@ -44,27 +54,36 @@ export const WithError: Story = {export const GroupedItems: Story = {decorators: [ComponentDecorator],- parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST, container: { width: 360 } },render: () => (<Field.Root name="notifications"><Field.Label>Notifications</Field.Label>- <RadioGroup defaultValue="important">- <Field.Item>- <Field.Label>Important updates</Field.Label>+ <RadioGroup defaultValue="important" style={{ gap: 16, marginTop: 12 }}>+ <Field.Item style={{ display: 'flex', alignItems: 'start', gap: 12 }}><Radio value="important" />- <Field.Description>- Only messages that need your attention- </Field.Description>+ <Text>+ <Field.Label>Important updates</Field.Label>+ <Field.Description>+ Only messages that need your attention+ </Field.Description>+ </Text></Field.Item>- <Field.Item>- <Field.Label>All updates</Field.Label>+ <Field.Item style={{ display: 'flex', alignItems: 'start', gap: 12 }}><Radio value="all" />- <Field.Description>Every change to your records</Field.Description>+ <Text>+ <Field.Label>All updates</Field.Label>+ <Field.Description>Every change to your records</Field.Description>+ </Text></Field.Item>- <Field.Item disabled>- <Field.Label>Daily digest</Field.Label>+ <Field.Item+ disabled+ style={{ display: 'flex', alignItems: 'start', gap: 12 }}+ ><Radio value="digest" />- <Field.Description>Coming soon</Field.Description>+ <Text>+ <Field.Label>Daily digest</Field.Label>+ <Field.Description>Coming soon</Field.Description>+ </Text></Field.Item></RadioGroup></Field.Root>diff --git a/packages/twenty-ui/src/primitives/input/Input/__stories__/Input.stories.tsx b/packages/twenty-ui/src/primitives/input/Input/__stories__/Input.stories.tsxindex 99b697cdf20..1718faef618 100644--- a/packages/twenty-ui/src/primitives/input/Input/__stories__/Input.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Input/__stories__/Input.stories.tsx@@ -1,3 +1,4 @@+import { type ComponentProps } from 'react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, within } from 'storybook/test';@@ -25,11 +26,27 @@ export default meta;type Story = StoryObj<typeof Input>;-export const Default: Story = {+export const Display: Story = {+ args: { 'aria-label': undefined, placeholder: undefined },decorators: [ComponentDecorator],- parameters: { container: { width: 240 } },+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST, container: { width: 320 } },+ render: (args) => <InputDisplayExample {...args} />,};+const InputDisplayExample = (props: ComponentProps<typeof Input>) => (+ <Field.Root>+ <Field.Label>Email</Field.Label>+ <Input+ name="email"+ type="email"+ autoComplete="email"+ defaultValue="[email protected]"+ {...props}+ />+ <Field.Description>Use your work email address.</Field.Description>+ </Field.Root>+);+export const WithField: Story = {decorators: [ComponentDecorator],parameters: {diff --git a/packages/twenty-ui/src/primitives/input/InputGroup/__stories__/InputGroup.stories.tsx b/packages/twenty-ui/src/primitives/input/InputGroup/__stories__/InputGroup.stories.tsxindex f0925b02077..dbc6e8339ba 100644--- a/packages/twenty-ui/src/primitives/input/InputGroup/__stories__/InputGroup.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/InputGroup/__stories__/InputGroup.stories.tsx@@ -1,3 +1,6 @@+import { Text } from '@ui/primitives/typography';+import { type ComponentProps } from 'react';+import { Field } from '@ui/primitives/input';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';@@ -8,7 +11,6 @@ import {ComponentDecorator,} from '@ui/testing';-import { IconSearch } from '@ui/icon';import { Input } from '@ui/primitives/input/Input/Input';import inputStyles from '@ui/primitives/input/Input/Input.module.scss';import { InputGroup } from '@ui/primitives/input/InputGroup/InputGroup';@@ -23,17 +25,29 @@ export default meta;type Story = StoryObj<typeof InputGroup>;-const SEARCH_ICON = <IconSearch size={16} />;--export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],- parameters: { container: { width: 240 } },- args: {- startElement: SEARCH_ICON,- children: <Input placeholder="Search" />,- },+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST, container: { width: 320 } },+ render: (args) => <InputGroupDisplayExample {...args} />,};+const InputGroupDisplayExample = (props: ComponentProps<typeof InputGroup>) => (+ <Field.Root name="website">+ <Field.Label>Website</Field.Label>+ <InputGroup+ startElement={+ <Text render={<span />} aria-hidden>+ https://+ </Text>+ }+ {...props}+ >+ <Input placeholder="example.com" />+ </InputGroup>+ <Field.Description>Enter the domain without https://.</Field.Description>+ </Field.Root>+);+export const WithEndElement: Story = {decorators: [ComponentDecorator],parameters: {@@ -115,12 +129,12 @@ type InputGroupCatalogAdornment = 'start' | 'end' | 'both';const getInputGroupCatalogAdornmentProps = (adornment: InputGroupCatalogAdornment,) => ({- startElement: adornment === 'end' ? undefined : SEARCH_ICON,- endElement: adornment === 'start' ? undefined : 'USD',+ startElement: adornment === 'end' ? undefined : 'https://',+ endElement: adornment === 'start' ? undefined : '.com',});export const Catalog: CatalogStory<Story, typeof InputGroup> = {- args: { children: <Input placeholder="Search" /> },+ args: { children: <Input aria-label="Website" placeholder="example" /> },parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,catalog: {diff --git a/packages/twenty-ui/src/primitives/input/NumberField/__stories__/NumberField.stories.tsx b/packages/twenty-ui/src/primitives/input/NumberField/__stories__/NumberField.stories.tsxindex 9e966177a1a..88867459214 100644--- a/packages/twenty-ui/src/primitives/input/NumberField/__stories__/NumberField.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/NumberField/__stories__/NumberField.stories.tsx@@ -14,7 +14,7 @@ const meta = {a11y: A11Y_DEFER_COLOR_CONTRAST,container: { width: 280 },},- args: { defaultValue: 3, min: 0, max: 10 },+ args: { name: 'quantity', defaultValue: 3, min: 0, max: 10 },render: (args) => (<Field.Root><Field.Label>Quantity</Field.Label>@@ -37,7 +37,7 @@ const meta = {export default meta;type Story = StoryObj<typeof meta>;-export const Default: Story = {};+export const Display: Story = {};export const Empty: Story = {args: { defaultValue: undefined },@@ -77,7 +77,7 @@ export const WithScrubbing: Story = {args: { defaultValue: 240, min: 0, max: 1000, step: 1 },render: (args) => (<Field.Root>- <NumberField.Root {...args}>+ <NumberField.Root {...args} style={{ display: 'grid', gap: 8 }}><NumberField.ScrubArea style={{ cursor: 'ew-resize' }}><Field.Label>Width</Field.Label><NumberField.ScrubAreaCursor>↔</NumberField.ScrubAreaCursor>diff --git a/packages/twenty-ui/src/primitives/input/Radio/__stories__/Radio.stories.tsx b/packages/twenty-ui/src/primitives/input/Radio/__stories__/Radio.stories.tsxindex 7fe775a2de5..dd1fff10375 100644--- a/packages/twenty-ui/src/primitives/input/Radio/__stories__/Radio.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Radio/__stories__/Radio.stories.tsx@@ -1,17 +1,21 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, within } from 'storybook/test';+import { IconLayoutKanban, IconTable } from '@ui/icon';import { RadioGroup } from '@ui/primitives/input/RadioGroup/RadioGroup';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,type CatalogStory,ComponentDecorator,+ GroupedCatalog,} from '@ui/testing';import { Radio } from '../Radio';import { type RadioProps } from '../types/RadioProps';+import { RadioCardContent } from './RadioCardContent';+const RadioExample = ({selected = false,...props@@ -30,14 +34,21 @@ const meta: Meta<typeof RadioExample> = {export default meta;type Story = StoryObj<typeof RadioExample>;-type RadioState = 'default' | 'hover' | 'focus' | 'disabled' | 'readOnly';--const STATE_PROPS: Record<RadioState, Partial<RadioProps>> = {- default: {},- hover: { className: 'hover' },- focus: { className: 'focus' },- disabled: { disabled: true },- readOnly: { readOnly: true },+export const Display: Story = {+ decorators: [ComponentDecorator],+ parameters: { container: { width: 320 } },+ argTypes: {+ value: { control: false },+ children: { control: false },+ selected: { control: false },+ },+ render: (args) => (+ <RadioDisplayExample+ size={args.size}+ variant={args.variant}+ disabled={args.disabled}+ />+ ),};export const Default: Story = {@@ -50,38 +61,93 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,-};+const RadioDisplayExample = (+ props: Pick<RadioProps, 'size' | 'variant' | 'disabled'>,+) => (+ <RadioGroup+ name="contactMethod"+ defaultValue="email"+ aria-label="Preferred contact method"+ >+ <Radio value="email" {...props}>+ </Radio>+ <Radio value="phone" {...props}>+ Phone+ </Radio>+ <Radio value="post" {...props} disabled>+ Postal mail (unavailable)+ </Radio>+ </RadioGroup>+);++const RADIO_CATALOG_GROUPS: {+ label: string;+ examples: { label: string; selected?: boolean; props: Partial<RadioProps> }[];+}[] = [+ {+ label: 'States',+ examples: [+ { label: 'Unselected', props: {} },+ { label: 'Selected', selected: true, props: {} },+ { label: 'Disabled', props: { disabled: true } },+ { label: 'Disabled selected', selected: true, props: { disabled: true } },+ { label: 'Read only', selected: true, props: { readOnly: true } },+ ],+ },+ {+ label: 'Sizes',+ examples: [+ { label: 'Small', selected: true, props: { size: 'sm' } },+ { label: 'Medium', selected: true, props: { size: 'md' } },+ ],+ },+ {+ label: 'Variants',+ examples: [+ { label: 'Default', selected: true, props: { variant: 'default' } },+ { label: 'Card', selected: true, props: { variant: 'card' } },+ ],+ },+];-export const Catalog: CatalogStory<Story, typeof RadioExample> = {+export const Catalog: Story = {+ decorators: [ComponentDecorator],parameters: {a11y: A11Y_DEFER_COLOR_CONTRAST,- pseudo: { hover: ['.hover'], focusVisible: ['.focus'] },- catalog: {- dimensions: [- {- name: 'selected',- values: [false, true],- props: (selected: boolean) => ({ selected }),- },- {- name: 'state',- values: Object.keys(STATE_PROPS),- props: (state: RadioState) => STATE_PROPS[state],- },- {- name: 'size',- values: ['sm', 'md'],- props: (size: RadioProps['size']) => ({ size }),- },- ],- options: { elementContainer: { style: { width: 160 } } },- },+ container: { width: 640 },},- decorators: [CatalogDecorator],+ render: () => (+ <GroupedCatalog+ groups={RADIO_CATALOG_GROUPS}+ renderExample={({ label, selected, props }) => (+ <RadioGroup+ aria-label={label}+ defaultValue={selected ? 'option' : ''}+ style={props.variant === 'card' ? { width: 240 } : undefined}+ >+ <Radio+ value="option"+ disabled={props.disabled}+ readOnly={props.readOnly}+ size={props.size}+ variant={props.variant}+ >+ {props.variant === 'card' ? (+ <RadioCardContent+ icon={<IconTable size={20} aria-hidden />}+ title="Table view"+ description="Browse records in rows."+ />+ ) : (+ label+ )}+ </Radio>+ </RadioGroup>+ )}+ />+ ),};-export const CatalogDark: typeof Catalog = {...Catalog,tags: ['!autodocs'],@@ -97,26 +163,23 @@ export const CardsDocumentation: Story = {style={{ width: 280 }}><Radio variant="card" value="table">- Table view+ <RadioCardContent+ icon={<IconTable size={20} aria-hidden />}+ title="Table view"+ description="Browse records in rows."+ /></Radio><Radio variant="card" value="board">- Board view+ <RadioCardContent+ icon={<IconLayoutKanban size={20} aria-hidden />}+ title="Board view"+ description="Track progress across columns."+ /></Radio></RadioGroup>),};-export const CardsCatalog: typeof Catalog = {- ...Catalog,- args: { variant: 'card' },-};--export const CardsCatalogDark: typeof Catalog = {- ...CardsCatalog,- tags: ['!autodocs'],- globals: { colorScheme: 'dark' },-};-export const PartsDocumentation: Story = {decorators: [ComponentDecorator],render: () => (@@ -132,3 +195,59 @@ export const PartsDocumentation: Story = {</RadioGroup>),};++type RadioState = 'default' | 'hover' | 'focus' | 'disabled' | 'readOnly';++const VISUAL_REGRESSION_STATE_PROPS: Record<RadioState, Partial<RadioProps>> = {+ default: {},+ hover: { className: 'hover' },+ focus: { className: 'focus' },+ disabled: { disabled: true },+ readOnly: { readOnly: true },+};++export const VisualRegression: CatalogStory<Story, typeof RadioExample> = {+ tags: ['!autodocs'],+ parameters: {+ a11y: A11Y_DEFER_COLOR_CONTRAST,+ pseudo: { hover: ['.hover'], focusVisible: ['.focus'] },+ catalog: {+ dimensions: [+ {+ name: 'selected',+ values: [false, true],+ props: (selected: boolean) => ({ selected }),+ },+ {+ name: 'state',+ values: Object.keys(VISUAL_REGRESSION_STATE_PROPS),+ props: (state: RadioState) => VISUAL_REGRESSION_STATE_PROPS[state],+ },+ {+ name: 'size',+ values: ['sm', 'md'],+ props: (size: RadioProps['size']) => ({ size }),+ },+ ],+ options: { elementContainer: { style: { width: 160 } } },+ },+ },+ decorators: [CatalogDecorator],+};++export const VisualRegressionDark: typeof VisualRegression = {+ ...VisualRegression,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};++export const CardsVisualRegression: typeof VisualRegression = {+ ...VisualRegression,+ args: { variant: 'card' },+};++export const CardsVisualRegressionDark: typeof VisualRegression = {+ ...CardsVisualRegression,+ tags: ['!autodocs'],+ globals: { colorScheme: 'dark' },+};diff --git a/packages/twenty-ui/src/primitives/input/Radio/__stories__/RadioCardContent.tsx b/packages/twenty-ui/src/primitives/input/Radio/__stories__/RadioCardContent.tsxnew file mode 100644index 00000000000..304dfe19cf8--- /dev/null+++ b/packages/twenty-ui/src/primitives/input/Radio/__stories__/RadioCardContent.tsx@@ -0,0 +1,31 @@+import { type ReactNode } from 'react';++import { Text } from '@ui/primitives/typography';++type RadioCardContentProps = {+ icon: ReactNode;+ title: string;+ description: string;+};++export const RadioCardContent = ({+ icon,+ title,+ description,+}: RadioCardContentProps) => (+ <span style={{ display: 'grid', gap: 8, paddingInlineEnd: 24 }}>+ {icon}+ <Text+ render={<span />}+ style={{ fontWeight: 'var(--t-font-weight-medium)' }}+ >+ {title}+ </Text>+ <Text+ render={<span />}+ style={{ color: 'var(--t-font-color-secondary)', lineHeight: 1.5 }}+ >+ {description}+ </Text>+ </span>+);diff --git a/packages/twenty-ui/src/primitives/input/RadioGroup/__stories__/RadioGroup.stories.tsx b/packages/twenty-ui/src/primitives/input/RadioGroup/__stories__/RadioGroup.stories.tsxindex b728278f359..a19e0300c2b 100644--- a/packages/twenty-ui/src/primitives/input/RadioGroup/__stories__/RadioGroup.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/RadioGroup/__stories__/RadioGroup.stories.tsx@@ -10,6 +10,7 @@ const meta: Meta<typeof RadioGroup> = {component: RadioGroup,args: {'aria-label': 'Billing frequency',+ name: 'billingFrequency',defaultValue: 'monthly',children: (<>@@ -23,6 +24,6 @@ const meta: Meta<typeof RadioGroup> = {export default meta;type Story = StoryObj<typeof RadioGroup>;-export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],};diff --git a/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.stories.tsx b/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.stories.tsxindex 13e9c1d7c93..d1077de644d 100644--- a/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.stories.tsx@@ -23,6 +23,13 @@ const meta: Meta<typeof SelectExample> = {export default meta;type Story = StoryObj<typeof SelectExample>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ parameters: { container: { width: 320 } },+ args: { defaultValue: 'normal' },+ render: (args) => <SelectDisplayExample {...args} />,+};+export const Default: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240, height: 200 } },@@ -46,11 +53,45 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- parameters: Default.parameters,- args: Default.args,-};+const PRIORITIES = [+ { value: 'low', label: 'Low' },+ { value: 'normal', label: 'Normal' },+ { value: 'high', label: 'High' },+];++const SelectDisplayExample = ({+ size,+ container,+ side,+ sideOffset = 8,+ align = 'start',+ alignItemWithTrigger = false,+ ...props+}: SelectExampleProps) => (+ <Select.Root name="priority" {...props} items={PRIORITIES}>+ <Select.Trigger size={size} aria-label="Priority">+ <Select.Value placeholder="Choose a priority" />+ <Select.Icon />+ </Select.Trigger>+ <Select.Portal container={container}>+ <Select.Positioner+ side={side}+ align={align}+ sideOffset={sideOffset}+ alignItemWithTrigger={alignItemWithTrigger}+ >+ <Select.Popup>+ {PRIORITIES.map(({ value, label }) => (+ <Select.Item key={value} value={value}>+ <Select.ItemText>{label}</Select.ItemText>+ <Select.ItemIndicator />+ </Select.Item>+ ))}+ </Select.Popup>+ </Select.Positioner>+ </Select.Portal>+ </Select.Root>+);export const Placeholder: Story = {...Default,diff --git a/packages/twenty-ui/src/primitives/input/Slider/__stories__/Slider.stories.tsx b/packages/twenty-ui/src/primitives/input/Slider/__stories__/Slider.stories.tsxindex 24246618042..cd07c49ef09 100644--- a/packages/twenty-ui/src/primitives/input/Slider/__stories__/Slider.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Slider/__stories__/Slider.stories.tsx@@ -1,3 +1,4 @@+import { Text } from '@ui/primitives/typography';import { DirectionProvider } from '@base-ui/react/direction-provider';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, within } from 'storybook/test';@@ -15,7 +16,7 @@ import { type SliderRootProps } from '../types/SliderRootProps';const meta = {title: 'UI/Input/Slider',component: Slider.Root<number>,- args: { defaultValue: 40 },+ args: { name: 'volume', defaultValue: 40, min: 0, max: 100, step: 1 },render: (args) => (<Slider.Root {...args}><Slider.Control>@@ -31,20 +32,18 @@ const meta = {export default meta;type Story = StoryObj<typeof meta>;-export const Default: Story = {- decorators: [ComponentDecorator],- parameters: { container: { width: 240 } },-};--export const WithLabelAndValue: Story = {+export const Display: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240 } },render: (args) => (<Slider.Root {...args}>- <div style={{ display: 'flex', justifyContent: 'space-between' }}>+ <Text+ render={<div />}+ style={{ display: 'flex', justifyContent: 'space-between' }}+ ><Slider.Label>Volume</Slider.Label><Slider.Value />- </div>+ </Text><Slider.Control><Slider.Track><Slider.Indicator />@@ -53,6 +52,15 @@ export const WithLabelAndValue: Story = {</Slider.Control></Slider.Root>),+};++export const TrackOnly: Story = {+ decorators: [ComponentDecorator],+ parameters: { container: { width: 240 } },+};++export const WithLabelAndValue: Story = {+ ...Display,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const slider = canvas.getByRole('slider', { name: 'Volume' });@@ -98,7 +106,7 @@ export const Range: Story = {};export const Vertical: Story = {- ...Default,+ ...TrackOnly,args: { orientation: 'vertical' },play: async ({ canvasElement }) => {const slider = within(canvasElement).getByRole('slider', {@@ -113,7 +121,7 @@ export const Vertical: Story = {};export const RightToLeft: Story = {- ...Default,+ ...TrackOnly,render: (args) => (<DirectionProvider direction="rtl"><div dir="rtl" style={{ width: '100%' }}>diff --git a/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx b/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsxindex cd9b219b80c..41f05d6931a 100644--- a/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx@@ -1,5 +1,7 @@+import { useId } from 'react';import { type Meta, type StoryObj } from '@storybook/react-vite';+import { Text } from '@ui/primitives/typography';import {A11Y_DEFER_COLOR_CONTRAST,CatalogDecorator,@@ -21,8 +23,28 @@ const meta: Meta<typeof Switch> = {export default meta;type Story = StoryObj<typeof Switch>;-export const Default: Story = { decorators: [ComponentDecorator] };-export const Checked: Story = { ...Default, args: { defaultChecked: true } };+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { 'aria-label': undefined },+ render: (args) => <SwitchDisplayExample {...args} />,+};++const SwitchDisplayExample = (props: SwitchProps) => {+ const generatedSwitchId = useId();+ const switchId = props.id ?? generatedSwitchId;++ return (+ <label+ htmlFor={switchId}+ style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}+ >+ <Switch {...props} id={switchId} name="notifications" />+ <Text render={<span />}>Email notifications</Text>+ </label>+ );+};++export const Checked: Story = { ...Display, args: { defaultChecked: true } };export const Small: Story = {...Checked,args: { defaultChecked: true, size: 'sm' },diff --git a/packages/twenty-ui/src/primitives/input/Textarea/__stories__/Textarea.stories.tsx b/packages/twenty-ui/src/primitives/input/Textarea/__stories__/Textarea.stories.tsxindex 12c7eebc67f..2ee82c74f9b 100644--- a/packages/twenty-ui/src/primitives/input/Textarea/__stories__/Textarea.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Textarea/__stories__/Textarea.stories.tsx@@ -1,3 +1,5 @@+import { type ComponentProps } from 'react';+import { Field } from '@ui/primitives/input';import { type Meta, type StoryObj } from '@storybook/react-vite';import {@@ -23,12 +25,21 @@ export default meta;type Story = StoryObj<typeof Textarea>;-export const Default: Story = {+export const Display: Story = {+ args: { 'aria-label': undefined, placeholder: undefined },decorators: [ComponentDecorator],- parameters: { container: { width: 240 } },- args: { rows: 3 },+ parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST, container: { width: 320 } },+ render: (args) => <TextareaDisplayExample {...args} />,};+const TextareaDisplayExample = (props: ComponentProps<typeof Textarea>) => (+ <Field.Root name="notes">+ <Field.Label>Notes</Field.Label>+ <Textarea rows={4} defaultValue="Follow up next week." {...props} />+ <Field.Description>Add context for your team.</Field.Description>+ </Field.Root>+);+export const AutoResize: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240 } },diff --git a/packages/twenty-ui/src/primitives/layout/Collapsible/__stories__/Collapsible.stories.tsx b/packages/twenty-ui/src/primitives/layout/Collapsible/__stories__/Collapsible.stories.tsxindex 5098ca72b8d..6bafd6aa0d2 100644--- a/packages/twenty-ui/src/primitives/layout/Collapsible/__stories__/Collapsible.stories.tsx+++ b/packages/twenty-ui/src/primitives/layout/Collapsible/__stories__/Collapsible.stories.tsx@@ -116,8 +116,38 @@ const verifyExpansion: NonNullable<Story['play']> = async ({await waitFor(() => expect(canvas.getByText(content)).toBeVisible());};+export const Display: Story = {+ args: { defaultOpen: true },+ argTypes: { hasFixedHeight: { control: false, table: { disable: true } } },+ render: ({ defaultOpen, dimension, duration, style }) => (+ <Collapsible.Root+ defaultOpen={defaultOpen}+ style={{ width: 360, maxWidth: '100%' }}+ >+ <Collapsible.Trigger render={<Button />}>+ Import details+ </Collapsible.Trigger>+ <Collapsible.Panel+ dimension={dimension}+ duration={duration}+ style={style}+ >+ <Text+ style={{+ paddingTop: 12,+ color: 'var(--t-font-color-secondary)',+ lineHeight: 1.5,+ }}+ >+ Match each CSV column to a record field before importing.+ </Text>+ </Collapsible.Panel>+ </Collapsible.Root>+ ),+};+export const Default: Story = { play: verifyExpansion };-export const Documentation: Story = {};+export const FitContent: Story = {args: { hasFixedHeight: false, defaultOpen: true },play: verifyExpansion,diff --git a/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.tsx b/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.tsxnew file mode 100644index 00000000000..791e0e4d4f7--- /dev/null+++ b/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.tsx@@ -0,0 +1,52 @@+import { useId, useState } from 'react';++import { ResizeHandle } from '@ui/primitives/layout/ResizeHandle/ResizeHandle';+import { type ResizeHandleProps } from '@ui/primitives/layout/ResizeHandle/types/ResizeHandleProps';+import { Card } from '@ui/primitives/surfaces/Card/Card';+import { Text } from '@ui/primitives/typography/Text/Text';++export const ResizableNotesExample = (+ props: Pick<ResizeHandleProps, 'disabled' | 'step' | 'min' | 'max'>,+) => {+ const panelId = useId();+ const [height, setHeight] = useState(150);++ return (+ <Card.Root style={{ width: 300, maxWidth: '100%' }}>+ <Text+ id={panelId}+ style={{+ height,+ overflow: 'auto',+ padding: 16,+ boxSizing: 'border-box',+ }}+ >+ <Text+ style={{+ color: 'var(--t-font-color-primary)',+ fontWeight: 'var(--t-font-weight-medium)',+ }}+ >+ Record notes+ </Text>+ <Text style={{ marginTop: 8, lineHeight: 1.5 }}>+ Follow up with Morgan about the proposal. Share the revised timeline+ before Friday.+ </Text>+ </Text>+ <Text style={{ padding: 4 }}>+ <ResizeHandle+ axis="y"+ defaultValue={150}+ onValueChange={setHeight}+ min={50}+ max={500}+ {...props}+ aria-label="Resize notes height"+ aria-controls={panelId}+ />+ </Text>+ </Card.Root>+ );+};diff --git a/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizeHandle.stories.tsx b/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizeHandle.stories.tsxindex 95c488c55b3..542545cd649 100644--- a/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizeHandle.stories.tsx+++ b/packages/twenty-ui/src/primitives/layout/ResizeHandle/__stories__/ResizeHandle.stories.tsx@@ -5,6 +5,7 @@ import { expect, userEvent, within } from 'storybook/test';import { ResizeHandle } from '@ui/primitives/layout/ResizeHandle/ResizeHandle';import { ResizableDemo } from './ResizableDemo';+import { ResizableNotesExample } from './ResizableNotesExample';const meta: Meta<typeof ResizeHandle> = {title: 'UI/Layout/ResizeHandle',@@ -15,6 +16,19 @@ const meta: Meta<typeof ResizeHandle> = {export default meta;type Story = StoryObj<typeof ResizeHandle>;+export const Display: Story = {+ args: { min: 50, max: 500, step: 10, disabled: false },+ parameters: { controls: { include: ['min', 'max', 'step', 'disabled'] } },+ render: ({ min, max, step, disabled }) => (+ <ResizableNotesExample+ min={min}+ max={max}+ step={step}+ disabled={disabled}+ />+ ),+};+export const Resizable: Story = {render: () => <ResizableDemo />,play: async ({ canvasElement }) => {@@ -33,10 +47,6 @@ export const Resizable: Story = {},};-export const ResizableDocumentation: Story = {- render: Resizable.render,-};-export const Horizontal: Story = {render: () => <ResizableDemo axis="x" />,play: async ({ canvasElement }) => {diff --git a/packages/twenty-ui/src/primitives/layout/Separator/__stories__/Separator.stories.tsx b/packages/twenty-ui/src/primitives/layout/Separator/__stories__/Separator.stories.tsxindex ef9e8a00641..8abfcdc6468 100644--- a/packages/twenty-ui/src/primitives/layout/Separator/__stories__/Separator.stories.tsx+++ b/packages/twenty-ui/src/primitives/layout/Separator/__stories__/Separator.stories.tsx@@ -15,6 +15,16 @@ const meta: Meta<typeof Separator> = {export default meta;type Story = StoryObj<typeof Separator>;+export const Display: Story = {+ render: (args) => (+ <Text style={{ display: 'grid', gap: 'var(--t-spacing-3)' }}>+ <Text>Import records from a CSV file.</Text>+ <Separator {...args} />+ <Text>Connect an external data source.</Text>+ </Text>+ ),+};+export const Default: Story = {args: { 'aria-label': 'Sections' },play: async ({ canvasElement }) => {@@ -78,6 +88,4 @@ export const LabeledComposition: Story = {),};-export const Documentation: Story = { args: Default.args };-export const VerticalDocumentation: Story = { args: Vertical.args };diff --git a/packages/twenty-ui/src/primitives/navigation/Breadcrumb/__stories__/Breadcrumb.stories.tsx b/packages/twenty-ui/src/primitives/navigation/Breadcrumb/__stories__/Breadcrumb.stories.tsxindex 50a9db1ea0d..06476f7a315 100644--- a/packages/twenty-ui/src/primitives/navigation/Breadcrumb/__stories__/Breadcrumb.stories.tsx+++ b/packages/twenty-ui/src/primitives/navigation/Breadcrumb/__stories__/Breadcrumb.stories.tsx@@ -28,7 +28,16 @@ const meta: Meta<typeof Breadcrumb> = {export default meta;type Story = StoryObj<typeof Breadcrumb>;-export const Default: Story = {};+export const Display: Story = {+ args: {+ 'aria-label': 'Breadcrumb',+ links: [+ { children: 'Home', href: '/' },+ { children: 'Companies', href: '/companies' },+ { children: 'Acme' },+ ],+ },+};export const Truncation: Story = {args: {diff --git a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsxindex 8f4d840efee..d2cccd7b0a1 100644--- a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx+++ b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx@@ -52,10 +52,10 @@ const ACTIONS = (</>);-export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240 } },- args: { startIcon: START_ICON },+ args: { children: 'Notifications', startIcon: START_ICON },};export const OverflowingLabel: Story = {@@ -85,7 +85,7 @@ export const WithPersistentActions: Story = {};export const ButtonOwner: Story = {- ...Default,+ ...Display,args: {children: 'Duplicate record',render: <button type="button" />,@@ -94,7 +94,7 @@ export const ButtonOwner: Story = {};export const LinkOwner: Story = {- ...Default,+ ...Display,args: {children: 'Typography documentation',render: (renderProps) => (@@ -106,8 +106,8 @@ export const LinkOwner: Story = {};export const ExplicitLinkContent: Story = {- ...Default,- parameters: { ...Default.parameters, a11y: A11Y_DEFER_COLOR_CONTRAST },+ ...Display,+ parameters: { ...Display.parameters, a11y: A11Y_DEFER_COLOR_CONTRAST },args: {children: <a href="https://twenty.com/developers">Read documentation</a>,description: 'Resource',diff --git a/packages/twenty-ui/src/primitives/navigation/Tabs/__stories__/Tabs.stories.tsx b/packages/twenty-ui/src/primitives/navigation/Tabs/__stories__/Tabs.stories.tsxindex f1a5ef26928..d7bf87607a1 100644--- a/packages/twenty-ui/src/primitives/navigation/Tabs/__stories__/Tabs.stories.tsx+++ b/packages/twenty-ui/src/primitives/navigation/Tabs/__stories__/Tabs.stories.tsx@@ -91,6 +91,11 @@ export default meta;type Story = StoryObj<typeof Tabs.Tab>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ parameters: { container: { width: 360 } },+};+export const Default: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 360 } },@@ -113,11 +118,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- parameters: Default.parameters,-};-export const Controlled: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 360 } },diff --git a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.stories.tsxindex fa973fc2811..d1fe6bc3bcc 100644--- a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.stories.tsx@@ -21,6 +21,11 @@ const meta: Meta<typeof AlertDialogExample> = {export default meta;type Story = StoryObj<typeof AlertDialogExample>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { defaultOpen: false },+};+export const Default: Story = {decorators: [ComponentDecorator],args: { defaultOpen: true },@@ -54,11 +59,6 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- args: { defaultOpen: false },-};-export const Small: Story = {...Default,args: { defaultOpen: true, size: 'sm' },@@ -76,7 +76,7 @@ export const Fullscreen: Story = {args: { defaultOpen: true, size: 'fullscreen' },};-export const Catalog: Story = {+export const WithRecordContext: Story = {...Default,args: {defaultOpen: true,@@ -84,8 +84,8 @@ export const Catalog: Story = {},};-export const CatalogDark: Story = {- ...Catalog,+export const WithRecordContextDark: Story = {+ ...WithRecordContext,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};diff --git a/packages/twenty-ui/src/primitives/surfaces/Card/__stories__/Card.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Card/__stories__/Card.stories.tsxindex ecdf681895c..9cbc4c8e7a1 100644--- a/packages/twenty-ui/src/primitives/surfaces/Card/__stories__/Card.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Card/__stories__/Card.stories.tsx@@ -1,3 +1,5 @@+import { type ComponentProps, useId } from 'react';+import { Heading, Text } from '@ui/primitives/typography';import { type Meta, type StoryObj } from '@storybook/react-vite';import { ComponentDecorator } from '@ui/testing';@@ -23,7 +25,30 @@ const meta: Meta<typeof Card.Root> = {export default meta;type Story = StoryObj<typeof Card.Root>;-export const Default: Story = {};+export const Display: Story = {+ parameters: { container: { width: 320 } },+ render: (args) => <CardDisplayExample {...args} />,+};++const CardDisplayExample = (props: ComponentProps<typeof Card.Root>) => {+ const titleId = useId();++ return (+ <Card.Root fullWidth role="region" aria-labelledby={titleId} {...props}>+ <Card.Header>+ <Heading id={titleId} level={2}>+ Import summary+ </Heading>+ </Card.Header>+ <Card.Content>+ <Text>24 records are ready to import.</Text>+ </Card.Content>+ <Card.Footer>+ <Button>Review records</Button>+ </Card.Footer>+ </Card.Root>+ );+};export const NativeParts: Story = {render: (args) => (diff --git a/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.stories.tsxindex 28eb3c92009..a4d45a50476 100644--- a/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.stories.tsx@@ -1,3 +1,4 @@+import { Field, Input } from '@ui/primitives/input';import { Text } from '@ui/primitives/typography/Text/Text';import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, userEvent, waitFor, within } from 'storybook/test';@@ -22,6 +23,19 @@ const meta: Meta<typeof DialogExample> = {export default meta;type Story = StoryObj<typeof DialogExample>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: {+ defaultOpen: false,+ content: (+ <Field.Root name="company">+ <Field.Label>Company name</Field.Label>+ <Input defaultValue="Acme" />+ </Field.Root>+ ),+ },+};+export const Default: Story = {decorators: [ComponentDecorator],args: { defaultOpen: true },@@ -46,13 +60,8 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: Default.decorators,- args: { defaultOpen: false },-};-export const DocumentationInteractions: Story = {- ...Documentation,+ ...Display,play: async ({ canvasElement }) => {const trigger = within(canvasElement).getByRole('button', {name: 'Edit account',@@ -93,7 +102,7 @@ export const Fullscreen: Story = {args: { defaultOpen: true, size: 'fullscreen' },};-export const Catalog: Story = {+export const WithRecordContext: Story = {...Default,args: {defaultOpen: true,@@ -101,8 +110,8 @@ export const Catalog: Story = {},};-export const CatalogDark: Story = {- ...Catalog,+export const WithRecordContextDark: Story = {+ ...WithRecordContext,tags: ['!autodocs'],globals: { colorScheme: 'dark' },};diff --git a/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsxindex 39aca9d77cb..9ef282bdf66 100644--- a/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx@@ -70,6 +70,44 @@ const meta: Meta<typeof PopoverStory> = {export default meta;type Story = StoryObj<typeof PopoverStory>;+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { align: 'start' },+ parameters: { container: { width: 300, height: 200 } },+ render: ({ side, align, arrow, keepMounted, container, ...props }) => (+ <Popover.Root {...props}>+ <Popover.Trigger+ aria-label="Show details"+ style={{ alignSelf: 'flex-start' }}+ render={<Button>Show details</Button>}+ />+ <Popover.Portal container={container} keepMounted={keepMounted}>+ <Popover.Positioner side={side} align={align}>+ <Popover.Popup+ style={{+ boxSizing: 'border-box',+ width: 260,+ padding: 16,+ gap: 12,+ }}+ >+ {arrow && <Popover.Arrow />}+ <Popover.Title>Contact details</Popover.Title>+ <Popover.Description>+ Reach Alex at [email protected].+ </Popover.Description>+ <Popover.Close+ aria-label="Close"+ style={{ alignSelf: 'flex-end' }}+ render={<Button size="sm">Close</Button>}+ />+ </Popover.Popup>+ </Popover.Positioner>+ </Popover.Portal>+ </Popover.Root>+ ),+};+export const Default: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240, height: 200 } },@@ -128,33 +166,8 @@ export const Default: Story = {},};-export const Documentation: Story = {- decorators: [ComponentDecorator],- parameters: { container: { width: 240, height: 200 } },- render: () => (- <Popover.Root>- <Popover.Trigger- aria-label="Show details"- style={{ alignSelf: 'flex-start' }}- render={<Button>Show details</Button>}- />- <Popover.Portal>- <Popover.Positioner>- <Popover.Popup>- <Popover.Title>Contact details</Popover.Title>- <Popover.Description>- Add notes and contact information here.- </Popover.Description>- <Popover.Close aria-label="Close" render={<Button>Close</Button>} />- </Popover.Popup>- </Popover.Positioner>- </Popover.Portal>- </Popover.Root>- ),-};-export const DocumentationInteractions: Story = {- ...Documentation,+ ...Display,play: async ({ canvasElement }) => {const canvas = within(canvasElement);const body = within(canvasElement.ownerDocument.body);diff --git a/packages/twenty-ui/src/primitives/surfaces/Tooltip/__stories__/Tooltip.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Tooltip/__stories__/Tooltip.stories.tsxindex d1d32475c5a..9d12bded9c4 100644--- a/packages/twenty-ui/src/primitives/surfaces/Tooltip/__stories__/Tooltip.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Tooltip/__stories__/Tooltip.stories.tsx@@ -1,5 +1,5 @@import { type Meta, type StoryObj } from '@storybook/react-vite';-import { useRef, useState } from 'react';+import { type ComponentProps, useRef, useState } from 'react';import { expect, userEvent, waitFor, within } from 'storybook/test';import { IconInfoCircle } from '@ui/icon';@@ -39,6 +39,16 @@ const meta: Meta<typeof Tooltip> = {export default meta;type Story = StoryObj<typeof Tooltip>;+export const Display: Story = {+ args: {+ content: 'Download the visible records as a CSV file',+ side: 'top',+ delay: 600,+ },+ parameters: { container: { width: 320 } },+ render: (args) => <TooltipDisplayExample {...args} />,+};+export const Default: Story = {play: async ({ canvasElement }) => {await userEvent.hover(within(canvasElement).getByRole('button'));@@ -47,7 +57,13 @@ export const Default: Story = {},};-export const Documentation: Story = {};+const TooltipDisplayExample = (props: ComponentProps<typeof Tooltip>) => (+ <Tooltip {...props}>+ <Text render={<span />}>+ <Button>Export records</Button>+ </Text>+ </Tooltip>+);export const WithArrow: Story = {...Default,diff --git a/packages/twenty-ui/src/primitives/typography/Heading/__stories__/Heading.stories.tsx b/packages/twenty-ui/src/primitives/typography/Heading/__stories__/Heading.stories.tsxindex fe462bdc6af..9e2fb0c1a68 100644--- a/packages/twenty-ui/src/primitives/typography/Heading/__stories__/Heading.stories.tsx+++ b/packages/twenty-ui/src/primitives/typography/Heading/__stories__/Heading.stories.tsx@@ -2,6 +2,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';import { ComponentDecorator } from '@ui/testing';+import { Text } from '@ui/primitives/typography/Text/Text';import { Heading } from '../Heading';@@ -15,14 +16,10 @@ export default meta;type Story = StoryObj<typeof Heading>;-export const Default: Story = {+export const Display: Story = {decorators: [ComponentDecorator],};-export const Documentation: Story = {- ...Default,-};-export const SemanticLevel: Story = {decorators: [ComponentDecorator],args: { level: 3, size: 'lg' },@@ -43,9 +40,9 @@ const HEADING_COLORS = ['primary', 'secondary'] as const;export const Catalog: Story = {decorators: [ComponentDecorator],render: () => (- <div>+ <Text>{HEADING_COLORS.map((color) => (- <div key={color}>+ <Text key={color}>{HEADING_SIZES.map((size) => (<Headingkey={size}@@ -56,9 +53,9 @@ export const Catalog: Story = {{size} {color} heading</Heading>))}- </div>+ </Text>))}- </div>+ </Text>),};diff --git a/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowTextWithTooltip.stories.tsx b/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowTextWithTooltip.stories.tsxindex 3e7590936df..986de1bacb1 100644--- a/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowTextWithTooltip.stories.tsx+++ b/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowTextWithTooltip.stories.tsx@@ -22,6 +22,15 @@ const meta: Meta<typeof OverflowingTextWithTooltip> = {export default meta;type Story = StoryObj<typeof OverflowingTextWithTooltip>;+export const Display: Story = {+ args: {+ text: 'Quarterly account review and renewal preparation',+ isFocusable: true,+ style: { maxWidth: 220 },+ },+ decorators: [ComponentDecorator],+};+export const SingleLineOverflowing: Story = {args: {text: longText,@@ -44,11 +53,6 @@ export const SingleLineOverflowing: Story = {},};-export const SingleLineOverflowingDocumentation: Story = {- args: SingleLineOverflowing.args,- decorators: SingleLineOverflowing.decorators,-};-export const SingleLineNotOverflowing: Story = {args: {text: 'Short',diff --git a/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowingTextTooltipModeProvider.stories.tsx b/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowingTextTooltipModeProvider.stories.tsxnew file mode 100644index 00000000000..9edaea5ba6a--- /dev/null+++ b/packages/twenty-ui/src/primitives/typography/OverflowingTextWithTooltip/__stories__/OverflowingTextTooltipModeProvider.stories.tsx@@ -0,0 +1,39 @@+import { type Meta, type StoryObj } from '@storybook/react-vite';++import {+ OverflowingTextTooltipModeProvider,+ OverflowingTextWithTooltip,+ Text,+} from '@ui/primitives/typography';+import { ComponentDecorator } from '@ui/testing';++const meta: Meta<typeof OverflowingTextTooltipModeProvider> = {+ title: 'UI/Typography/OverflowingTextTooltipModeProvider',+ component: OverflowingTextTooltipModeProvider,+ decorators: [ComponentDecorator],+ args: { mode: 'measure-on-hover' },+ argTypes: {+ children: { control: false, table: { disable: true } },+ mode: {+ control: 'select',+ options: ['measure-on-hover', 'measure-on-open', 'disabled'],+ },+ },+ render: ({ mode }) => (+ <OverflowingTextTooltipModeProvider mode={mode}>+ <Text style={{ maxWidth: 220 }}>+ <OverflowingTextWithTooltip+ text="Quarterly account review and renewal preparation"+ isFocusable+ />+ </Text>+ </OverflowingTextTooltipModeProvider>+ ),+};++export default meta;+type Story = StoryObj<typeof OverflowingTextTooltipModeProvider>;++export const Display: Story = {};++export const Disabled: Story = { args: { mode: 'disabled' } };diff --git a/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx b/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsxindex 1ce25dcfa69..120c5606677 100644--- a/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx+++ b/packages/twenty-ui/src/primitives/typography/Shortcut/__stories__/Shortcut.stories.tsx@@ -3,7 +3,7 @@ import { expect, within } from 'storybook/test';import { Button } from '@ui/primitives/input';import { ListItem } from '@ui/primitives/navigation';-import { Shortcut, formatShortcut } from '@ui/primitives/typography';+import { Shortcut, Text, formatShortcut } from '@ui/primitives/typography';import { ComponentDecorator, overrideMediaQueryMatches } from '@ui/testing';import { MOBILE_MEDIA_QUERY } from '@ui/utilities';@@ -20,6 +20,8 @@ const meta: Meta<typeof Shortcut> = {export default meta;type Story = StoryObj<typeof Shortcut>;+export const Display: Story = { args: { platform: undefined } };+export const Combination: Story = {play: async ({ canvasElement, args }) => {const shortcut = within(canvasElement).getByRole('img', {@@ -106,14 +108,20 @@ export const Mobile: Story = {},};-export const Documentation: Story = {+export const Catalog: Story = {render: () => (- <>- <Button shortcut={['Mod', 'Enter']}>Save record</Button>- <ListItem shortcut={[['G'], ['P']]} shortcutJoinLabel="next">- Open people- </ListItem>- <Shortcut shortcut={['Mod', 'K']} variant="text" />- </>+ <Text style={{ display: 'grid', gap: 16 }}>+ {(['keys', 'text', 'button'] as const).map((variant) => (+ <Text+ key={variant}+ style={{ display: 'flex', alignItems: 'center', gap: 16 }}+ >+ <Text render={<span />} style={{ width: 48 }}>+ {variant}+ </Text>+ <Shortcut shortcut={['Mod', 'K']} variant={variant} />+ </Text>+ ))}+ </Text>),};diff --git a/packages/twenty-ui/src/primitives/typography/Text/__stories__/Text.stories.tsx b/packages/twenty-ui/src/primitives/typography/Text/__stories__/Text.stories.tsxindex 84f1e6f7fb5..d4301bc2d08 100644--- a/packages/twenty-ui/src/primitives/typography/Text/__stories__/Text.stories.tsx+++ b/packages/twenty-ui/src/primitives/typography/Text/__stories__/Text.stories.tsx@@ -22,6 +22,12 @@ type Story = StoryObj<typeof Text>;const LONG_TEXT ='Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore';+export const Display: Story = {+ decorators: [ComponentDecorator],+ args: { truncate: true, children: 'Alexandra Montgomery' },+ parameters: { container: { width: 160 } },+};+export const Truncate: Story = {decorators: [ComponentDecorator],args: {@@ -43,12 +49,6 @@ export const Truncate: Story = {},};-export const Documentation: Story = {- decorators: Truncate.decorators,- args: Truncate.args,- parameters: Truncate.parameters,-};-export const LineClamp: Story = {decorators: [ComponentDecorator],args: {diff --git a/packages/twenty-ui/src/testing/GroupedCatalog.tsx b/packages/twenty-ui/src/testing/GroupedCatalog.tsxnew file mode 100644index 00000000000..75902c9251d--- /dev/null+++ b/packages/twenty-ui/src/testing/GroupedCatalog.tsx@@ -0,0 +1,42 @@+import { type ReactNode } from 'react';++import { Heading } from '@ui/primitives/typography';++type GroupedCatalogProps<CatalogExample extends { label: string }> = {+ groups: { label: string; examples: CatalogExample[] }[];+ renderExample: (example: CatalogExample) => ReactNode;+};++export const GroupedCatalog = <CatalogExample extends { label: string }>({+ groups,+ renderExample,+}: GroupedCatalogProps<CatalogExample>) => (+ <div style={{ display: 'grid', gap: 'var(--t-spacing-6)', width: '100%' }}>+ {groups.map(({ label, examples }) => (+ <section key={label} aria-label={label}>+ <Heading level={3}>{label}</Heading>+ <div+ style={{+ display: 'flex',+ flexWrap: 'wrap',+ gap: 'var(--t-spacing-6)',+ marginTop: 'var(--t-spacing-3)',+ }}+ >+ {examples.map((example) => (+ <div+ key={example.label}+ style={{+ display: 'grid',+ gap: 'var(--t-spacing-2)',+ justifyItems: 'start',+ }}+ >+ {renderExample(example)}+ </div>+ ))}+ </div>+ </section>+ ))}+ </div>+);diff --git a/packages/twenty-ui/src/testing/index.ts b/packages/twenty-ui/src/testing/index.tsindex 99b050435b7..3a5ad2a4416 100644--- a/packages/twenty-ui/src/testing/index.ts+++ b/packages/twenty-ui/src/testing/index.ts@@ -15,6 +15,7 @@ export type {} from './decorators/CatalogDecorator';export { CatalogDecorator } from './decorators/CatalogDecorator';export { ComponentDecorator } from './decorators/ComponentDecorator';+export { GroupedCatalog } from './GroupedCatalog';export { AVATAR_URL_MOCK } from './mocks/avatarUrlMock';export type { CatalogStory } from './types/CatalogStory';export { overrideMediaQueryMatches } from './utils/overrideMediaQueryMatches';