The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Replace Info with InlineBanner (#26967)
Raphaël Bosif6f5c1761ec6
diff --git a/packages/twenty-docs/docs.json b/packages/twenty-docs/docs.jsonindex 4344737fb23..ad0266c9d16 100644--- a/packages/twenty-docs/docs.json+++ b/packages/twenty-docs/docs.json@@ -633,7 +633,6 @@"ui/components/callout","ui/components/color-scheme-picker","ui/components/command-block",- "ui/components/info","ui/components/inline-banner","ui/components/json-tree","ui/components/menu-items",@@ -6680,6 +6679,10 @@}},"redirects": [+ {+ "source": "/ui/components/info",+ "destination": "/ui/components/inline-banner"+ },{"source": "/ui/primitives/layout/animated-expandable-container","destination": "/ui/primitives/layout/collapsible"diff --git a/packages/twenty-docs/navigation/base-structure.json b/packages/twenty-docs/navigation/base-structure.jsonindex 2b785d2a5c5..49651479075 100644--- a/packages/twenty-docs/navigation/base-structure.json+++ b/packages/twenty-docs/navigation/base-structure.json@@ -651,7 +651,6 @@"ui/components/callout","ui/components/color-scheme-picker","ui/components/command-block",- "ui/components/info","ui/components/inline-banner","ui/components/json-tree","ui/components/menu-items",diff --git a/packages/twenty-docs/snippets/ui/generated/components/info.mdx b/packages/twenty-docs/snippets/ui/generated/components/info.mdxdeleted file mode 100644index 233daab31a3..00000000000--- a/packages/twenty-docs/snippets/ui/generated/components/info.mdx+++ /dev/null@@ -1,36 +0,0 @@-{/*- * _____ _- *|_ _|_ _____ _ __ | |_ _ _- * | | \ \ /\ / / _ \ '_ \| __| | | | 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="accent" type=""blue" | "danger"" default="blue">- Information or danger styling.-</ParamField>--<ParamField body="buttonTitle" type="string">- Visible label for the optional action. Requires href or onClick.-</ParamField>--<ParamField body="href" type="string">- Action destination. Takes precedence over onClick.-</ParamField>--<ParamField body="onClick" type="((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void)">- Action callback when href is absent.-</ParamField>--<ParamField body="render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>">- Custom render element for the link action, forwarded to Button when href is supplied.-</ParamField>--<ParamField body="text" type="string" required>- Message displayed beside the information icon.-</ParamField>diff --git a/packages/twenty-docs/snippets/ui/generated/components/inline-banner.mdx b/packages/twenty-docs/snippets/ui/generated/components/inline-banner.mdxindex 83bb37c2da2..fec61c10d3e 100644--- a/packages/twenty-docs/snippets/ui/generated/components/inline-banner.mdx+++ b/packages/twenty-docs/snippets/ui/generated/components/inline-banner.mdx@@ -11,20 +11,34 @@* npx nx generate:ui twenty-docs*/}-<ParamField body="button" type="{ title?: string | undefined; onClick?: (() => void) | undefined; hidden?: boolean | undefined; disabled?: boolean | undefined; Icon?: IconComponent | undefined; }">- Optional action with title, onClick, hidden, disabled, and Icon fields.+<ParamField body="button" type="InlineBannerButtonProps">+ Optional button or destination link. All fields are optional:++ - `title` (`string`): visible action label.+ - `onClick` (`(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => void`): activation handler, including keyboard activation.+ - `href` (`string`): destination URL; selects native link semantics.+ - `render` (`ReactElement | ((props: HTMLProps, state: { disabled: boolean }) => ReactElement)`): custom root element or renderer. Preserve an anchor when `href` is set, or a native button otherwise. `HTMLProps` includes native element attributes and its ref.+ - `target` (`string`): link browsing context, such as `_blank`.+ - `rel` (`string`): link relationship, such as `noopener noreferrer`.+ - `download` (native anchor attribute): use `true` to download the destination or a `string` to suggest a filename.+ - `disabled` (`boolean`): prevents activation.+ - `hidden` (`boolean`): omits the action from the banner.+ - `aria-label` (`string`): accessible action name, needed when no visible title is supplied.+ - `Icon` (`IconComponent`): decorative icon component displayed before the title.++ Action and link fields use the corresponding [Button props](/ui/primitives/input/button). `BaseUIEvent` extends the React event with `preventBaseUIHandler()` and `baseUIHandlerPrevented`.</ParamField><ParamField body="className" type="string">Class applied to the banner.</ParamField>-<ParamField body="color" type=""blue" | "danger"">+<ParamField body="color" type=""blue" | "danger"" default="blue">Banner palette color. An omitted color uses Banner’s default.</ParamField><ParamField body="embedded" type="boolean" default="false">- Uses the embedded banner appearance.+ Removes the bottom margin from standard banners. Compact banners have no bottom margin.</ParamField><ParamField body="LeftIcon" type="IconComponent">@@ -32,5 +46,9 @@</ParamField><ParamField body="message" type="string" required>- Message, truncated with its full text available in a tooltip.+ Message text. Standard banners truncate with a focusable tooltip; compact banners wrap.+</ParamField>++<ParamField body="variant" type=""compact" | "standard"" default="standard">+ Standard full-width banner or compact wrapping message with a 512px maximum content width.</ParamField>diff --git a/packages/twenty-docs/ui/components/info.mdx b/packages/twenty-docs/ui/components/info.mdxdeleted file mode 100644index b2624e8f357..00000000000--- a/packages/twenty-docs/ui/components/info.mdx+++ /dev/null@@ -1,33 +0,0 @@-----title: Info-description: An inline information message with an optional button or link.------import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';-import InfoReference from '/snippets/ui/generated/components/info.mdx';--`Info` displays a message with a blue or danger accent. Supply `buttonTitle` with `onClick` for an action, or with `href` for a link. When both are supplied, `href` takes precedence.--```tsx-import { Info } from 'twenty-ui/components';--export const ConnectionInfo = ({ onConnect }: { onConnect: () => void }) => (- <Info- text="Connect your account to sync contacts."- buttonTitle="Connect account"- onClick={onConnect}- />-);-```--Use `accent="danger"` for an error. `render` customizes the link action when `href` is supplied. The message has no automatic dismissal or announcement behavior.--<StoryEmbed- storyId="ui-feedback-info--default"- title="Info example"- height={280}-/>--## Props--<InfoReference />diff --git a/packages/twenty-docs/ui/components/inline-banner.mdx b/packages/twenty-docs/ui/components/inline-banner.mdxindex db8ee20cc4e..babfd1e8ae9 100644--- a/packages/twenty-docs/ui/components/inline-banner.mdx+++ b/packages/twenty-docs/ui/components/inline-banner.mdx@@ -1,11 +1,12 @@---title: InlineBanner-description: A compact banner with a message, icon, and optional action.+description: A compact banner with a message, icon, and optional button or link.---+import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';import InlineBannerReference from '/snippets/ui/generated/components/inline-banner.mdx';-`InlineBanner` uses the secondary [Banner](/ui/primitives/feedback/banner) treatment. Its message truncates with a tooltip for the full text. Your application owns whether the banner is rendered.+`InlineBanner` builds on [Banner](/ui/primitives/feedback/banner). Its standard appearance fills the available width and truncates the message. Keyboard focus, pointer hover, or touch reveals the full message in a tooltip. Your application owns whether the banner is rendered.```tsximport { InlineBanner } from 'twenty-ui/components';@@ -19,7 +20,35 @@ export const SyncBanner = ({ onRetry }: { onRetry: () => void }) => ();```-`button` accepts `title`, `onClick`, `disabled`, `hidden`, and an `Icon` component. `LeftIcon` changes the leading icon. `embedded` adjusts the banner for an embedded surface. Use a separate live-region wrapper when changes should be announced.+<StoryEmbed+ storyId="ui-feedback-inlinebanner--default"+ title="Inline banner with an action"+ height={280}+/>++Use `variant="compact"` for wrapping text, closer spacing, and a maximum content width of 512px. This appearance has no bottom margin. Both appearances support `color="blue"` and `color="danger"`.++```tsx+import { InlineBanner } from 'twenty-ui/components';++export const ConnectionBanner = () => (+ <InlineBanner+ variant="compact"+ message="Connect your account to sync contacts."+ button={{ title: 'Connection settings', href: '/settings/accounts' }}+ />+);+```++<StoryEmbed+ storyId="ui-feedback-inlinebanner--compact-link"+ title="Compact banner with a destination link"+ height={280}+/>++`button` accepts `title`, `onClick`, `disabled`, `hidden`, and an `Icon` component. Supply `href` for a native destination link, with optional `target`, `rel`, and `download`. Pair `href` with `render` for an application-owned router link. An action without `href` remains a native button. Use `aria-label` when the action has no visible title.++`LeftIcon` changes the leading icon. `embedded` removes the standard banner's bottom margin. Use a separate live-region wrapper when changes should be announced.## Propsdiff --git a/packages/twenty-docs/ui/components/overview.mdx b/packages/twenty-docs/ui/components/overview.mdxindex 63fb50b937f..6ce03642d1e 100644--- a/packages/twenty-docs/ui/components/overview.mdx+++ b/packages/twenty-docs/ui/components/overview.mdx@@ -28,7 +28,6 @@ Import shared components from `twenty-ui/components`. The code editor has its ow| [NotificationCounter](/ui/components/notification-counter) | Compact numeric badges. || [TintedIconTile](/ui/components/tinted-icon-tile) | Icons on theme-colored tiles. || [Callout](/ui/components/callout) | Semantic messages with actions and dismissal. |-| [Info](/ui/components/info) | Information messages with a button or link. || [InlineBanner](/ui/components/inline-banner) | Compact banners with optional actions. || [ToastProvider and Toaster](/ui/components/toast#application-notifications) | Notification stores, queue limits, and rendering. || [ColorSchemePicker](/ui/components/color-scheme-picker) | Light, dark, and system preference selection. |diff --git a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsxindex 386fc7a83a3..15a15e1d94c 100644--- a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx@@ -1,3 +1,4 @@+import { inlineBannerSandboxTest } from '@/__stories__/twenty-ui-gallery/utils/inlineBannerSandboxTest';import { themeTokenTest } from '@/__stories__/twenty-ui-gallery/utils/themeTokenTest';import { inputTest } from '@/__stories__/twenty-ui-gallery/utils/inputTest';import { settingsRowTest } from '@/__stories__/twenty-ui-gallery/utils/settingsRowTest';@@ -523,3 +524,15 @@ export const IconButtonElevatedPreact: Story = createGalleryStory({runtime: 'preact',play: iconButtonElevatedTest,});++export const InlineBannerReactFocusFailure: Story = createGalleryStory({+ frontComponentBundleName: 'twenty-ui-inline-banner',+ runtime: 'react',+ play: inlineBannerSandboxTest,+});++export const InlineBannerPreactFocusFailure: Story = createGalleryStory({+ frontComponentBundleName: 'twenty-ui-inline-banner',+ runtime: 'preact',+ play: inlineBannerSandboxTest,+});diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsxindex 4126d2beb42..6faafecac2f 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx@@ -1,5 +1,5 @@import { defineFrontComponent } from 'twenty-sdk/define';-import { Callout, Info, InlineBanner } from 'twenty-ui/components';+import { Callout, InlineBanner } from 'twenty-ui/components';import { Banner, Loader, ProgressBar } from 'twenty-ui/primitives/feedback';import { ThemeProvider } from 'twenty-ui/theme';@@ -24,8 +24,14 @@ const FEEDBACK_ENTRIES: GalleryEntry[] = [),},{- name: 'Info',- node: <Info accent="blue" text="Some information" />,+ name: 'InlineBanner compact link',+ node: (+ <InlineBanner+ variant="compact"+ message="Connect your account to keep your contacts in sync."+ button={{ title: 'Connection settings', href: '#connection-settings' }}+ />+ ),},{name: 'InlineBanner',diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-inline-banner.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-inline-banner.front-component.tsxnew file mode 100644index 00000000000..f37e6f16e24--- /dev/null+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-inline-banner.front-component.tsx@@ -0,0 +1,49 @@+import { useState } from 'react';+import { defineFrontComponent } from 'twenty-sdk/define';+import { InlineBanner } from 'twenty-ui/components';+import { Text } from 'twenty-ui/primitives/typography';++import { TwentyUiGalleryCard } from '@/__stories__/shared/front-components/twenty-ui-gallery-card';++const InlineBannerExample = () => {+ const [retryCount, setRetryCount] = useState(0);++ return (+ <TwentyUiGalleryCard title="Inline banner actions">+ <InlineBanner+ variant="compact"+ color="danger"+ message="Contact sync could not finish. Retry to reconnect your account."+ button={{+ title: 'Retry sync',+ onClick: () => setRetryCount((count) => count + 1),+ }}+ />+ <Text>Retry count: {retryCount}</Text>+ <InlineBanner+ variant="compact"+ message="Connect your account to keep your contacts in sync."+ button={{+ title: 'Connection settings',+ href: 'https://twenty.com',+ target: '_blank',+ rel: 'noopener noreferrer',+ render: (+ <a+ href="https://twenty.com"+ aria-label="Open connection settings"+ />+ ),+ }}+ />+ <InlineBanner message="Mailbox needs attention." />+ </TwentyUiGalleryCard>+ );+};++export default defineFrontComponent({+ universalIdentifier: 'a8716125-5bde-4c64-9333-b36d0f50c646',+ name: 'twenty-ui-inline-banner',+ description: 'Inline banner links and keyboard actions in the sandbox',+ component: InlineBannerExample,+});diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/inlineBannerSandboxTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/inlineBannerSandboxTest.tsnew file mode 100644index 00000000000..40f2d06a7c1--- /dev/null+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/inlineBannerSandboxTest.ts@@ -0,0 +1,38 @@+import { expect, userEvent, within } from 'storybook/test';++import { errorHandler } from '@/__stories__/shared/test-utils/createFrontComponentStoryMeta';+import { expectFrontComponentMounted } from '@/__stories__/shared/test-utils/matchers/expectFrontComponentMounted';+import { SANDBOX_ERROR_PATTERNS } from '@/__stories__/twenty-ui-gallery/constants/SANDBOX_ERROR_PATTERNS';+import { expectSandboxErrors } from '@/__stories__/twenty-ui-gallery/utils/expectSandboxErrors';+import { type TwentyUiGalleryPlayFunction } from '@/__stories__/twenty-ui-gallery/types/TwentyUiGalleryPlayFunction';++export const inlineBannerSandboxTest: TwentyUiGalleryPlayFunction = async ({+ canvasElement,+}) => {+ const canvas = within(canvasElement);+ await expectFrontComponentMounted(canvas);+ const button = canvas.getByRole('button', { name: 'Retry sync' });++ await userEvent.click(button);+ await expect(await canvas.findByText('Retry count: 1')).toBeVisible();+ await expect(button).toHaveFocus();+ await userEvent.keyboard('{Enter}');+ await expect(await canvas.findByText('Retry count: 2')).toBeVisible();+ await userEvent.keyboard(' ');+ await expect(await canvas.findByText('Retry count: 3')).toBeVisible();+ await userEvent.tab();+ const link = canvas.getByRole('link', { name: 'Open connection settings' });++ await expect(link.tagName).toBe('A');+ await expect(link).toHaveFocus();+ await expect(link).toHaveAttribute('href', 'https://twenty.com');+ await expect(link).toHaveAttribute('target', '_blank');+ await expect(link).toHaveAttribute('rel', 'noopener noreferrer');+ await expect(errorHandler).not.toHaveBeenCalled();+ await userEvent.tab();+ await expect(canvas.getByText('Mailbox needs attention.')).toHaveFocus();++ await expectSandboxErrors({+ requiredErrors: [SANDBOX_ERROR_PATTERNS.COMPOSED_PATH],+ });+};diff --git a/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx b/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsxindex 4fe5bb94033..1bbcbf0a0af 100644--- a/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx@@ -17,7 +17,7 @@ import {import { useState } from 'react';import { useLocation } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';-import { Info, useToast } from 'twenty-ui/components';+import { InlineBanner, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';import { CreateBillingPaymentMethodSetupIntentDocument } from '~/generated-metadata/graphql';@@ -170,9 +170,10 @@ export const AddPaymentMethodForm = ({if (!isDefined(stripePromise)) {return (<StyledFormContainer>- <Info- accent="danger"- text={t`Card payment is currently unavailable. Please verify your Stripe configuration or contact your workspace admin.`}+ <InlineBanner+ variant="compact"+ color="danger"+ message={t`Card payment is currently unavailable. Please verify your Stripe configuration or contact your workspace admin.`}/></StyledFormContainer>);diff --git a/packages/twenty-front/src/modules/settings/legal/components/DpaNotice.tsx b/packages/twenty-front/src/modules/settings/legal/components/DpaNotice.tsxindex a45d4b627d2..e4ef4e22b9e 100644--- a/packages/twenty-front/src/modules/settings/legal/components/DpaNotice.tsx+++ b/packages/twenty-front/src/modules/settings/legal/components/DpaNotice.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import { Info } from 'twenty-ui/components';+import { InlineBanner } from 'twenty-ui/components';-const StyledFullWidthInfo = styled.div`+const StyledFullWidthBanner = styled.div`& > * {max-width: 100%;}@@ -12,7 +12,7 @@ type DpaNoticeProps = {};export const DpaNotice = ({ text }: DpaNoticeProps) => (- <StyledFullWidthInfo>- <Info accent="danger" text={text} />- </StyledFullWidthInfo>+ <StyledFullWidthBanner>+ <InlineBanner variant="compact" color="danger" message={text} />+ </StyledFullWidthBanner>);diff --git a/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx b/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsxindex 9482f65fc5b..274368c95a1 100644--- a/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx+++ b/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx@@ -29,7 +29,7 @@ import { Trans, useLingui } from '@lingui/react/macro';import { Elements, PaymentElement } from '@stripe/react-stripe-js';import { AppPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { Info, MainButton } from 'twenty-ui/components';+import { InlineBanner, MainButton } from 'twenty-ui/components';import { Loader } from 'twenty-ui/primitives/feedback';import { Button, RadioGroup } from 'twenty-ui/primitives/input';import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';@@ -214,9 +214,10 @@ const UpgradeFreeTrialContent = ({}}/>) : (- <Info- accent="danger"- text={t`Card payment is currently unavailable. Please verify your Stripe configuration or contact your workspace admin.`}+ <InlineBanner+ variant="compact"+ color="danger"+ message={t`Card payment is currently unavailable. Please verify your Stripe configuration or contact your workspace admin.`}/>))}</OnboardingPlanCard>diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsxindex 2f6fdb7061a..8a16b83ee2a 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx@@ -19,7 +19,7 @@ import { Controller, useForm } from 'react-hook-form';import { Link, useNavigate, useParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';-import { Info, Section, useToast } from 'twenty-ui/components';+import { InlineBanner, Section, useToast } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Checkbox, Switch } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';@@ -342,16 +342,19 @@ export const SettingsAdminNewAiModel = () => {><SettingsPageContainer>{!hasCustomAiProviderAccess && (- <Info- accent="danger"- text={customAiProviderGateDescription}- buttonTitle={t`Activate`}- href={getSettingsPath(SettingsPath.AdminPanelOrganization)}- render={- <Link- to={getSettingsPath(SettingsPath.AdminPanelOrganization)}- />- }+ <InlineBanner+ variant="compact"+ color="danger"+ message={customAiProviderGateDescription}+ button={{+ title: t`Activate`,+ href: getSettingsPath(SettingsPath.AdminPanelOrganization),+ render: (+ <Link+ to={getSettingsPath(SettingsPath.AdminPanelOrganization)}+ />+ ),+ }}/>)}diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsxindex d58a0b399cc..3b58c09f4bd 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx@@ -23,7 +23,7 @@ import { slugify } from 'transliteration';import { type AiSdkPackage, isDataResidency } from 'twenty-shared/ai';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';-import { Info, Section, useToast } from 'twenty-ui/components';+import { InlineBanner, Section, useToast } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { OrganizationAdornment } from '~/pages/settings/enterprise/components/OrganizationAdornment';@@ -271,16 +271,19 @@ export const SettingsAdminNewAiProvider = () => {><SettingsPageContainer>{!hasCustomAiProviderAccess && (- <Info- accent="danger"- text={customAiProviderGateDescription}- buttonTitle={t`Activate`}- href={getSettingsPath(SettingsPath.AdminPanelOrganization)}- render={- <Link- to={getSettingsPath(SettingsPath.AdminPanelOrganization)}- />- }+ <InlineBanner+ variant="compact"+ color="danger"+ message={customAiProviderGateDescription}+ button={{+ title: t`Activate`,+ href: getSettingsPath(SettingsPath.AdminPanelOrganization),+ render: (+ <Link+ to={getSettingsPath(SettingsPath.AdminPanelOrganization)}+ />+ ),+ }}/>)}@@ -310,9 +313,10 @@ export const SettingsAdminNewAiProvider = () => {</Section.Root>{isModelsDevWithoutNativeSdk && (- <Info- accent="blue"- text={t`This provider doesn't have a native SDK yet — it will use OpenAI-compatible mode. Need native support? Reach out to us.`}+ <InlineBanner+ variant="compact"+ color="blue"+ message={t`This provider doesn't have a native SDK yet — it will use OpenAI-compatible mode. Need native support? Reach out to us.`}/>)}diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsxindex 2a90c3f415d..e5af28e4e44 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx@@ -8,7 +8,7 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { Info, Section } from 'twenty-ui/components';+import { InlineBanner, Section } from 'twenty-ui/components';import { IconChevronRight, IconPlus } from 'twenty-ui/icon';import { Avatar, Status } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';@@ -77,9 +77,10 @@ export const SettingsApplicationConnectionsSection = ({}/>{isOAuth && !isClientCredentialsConfigured && (- <Info- accent="danger"- text={t`${provider.displayName} OAuth is not yet set up by your server administrator. They need to fill in the OAuth client ID and secret on the application registration before you can add a connection.`}+ <InlineBanner+ variant="compact"+ color="danger"+ message={t`${provider.displayName} OAuth is not yet set up by your server administrator. They need to fill in the OAuth client ID and secret on the application registration before you can add a connection.`}/>)}{providerConnections.length > 0 && (diff --git a/packages/twenty-shared/src/constants/DocumentationPaths.ts b/packages/twenty-shared/src/constants/DocumentationPaths.tsindex 0aa4f14f1a6..deb0dab8666 100644--- a/packages/twenty-shared/src/constants/DocumentationPaths.ts+++ b/packages/twenty-shared/src/constants/DocumentationPaths.ts@@ -136,7 +136,6 @@ export const DOCUMENTATION_PATHS = {UI_COMPONENTS_COLOR_SCHEME_PICKER: '/ui/components/color-scheme-picker',UI_COMPONENTS_COMMAND_BLOCK: '/ui/components/command-block',UI_COMPONENTS_DROPDOWN: '/ui/components/dropdown',- UI_COMPONENTS_INFO: '/ui/components/info',UI_COMPONENTS_INLINE_BANNER: '/ui/components/inline-banner',UI_COMPONENTS_INPUT_ICON_BUTTON: '/ui/components/input/icon-button',UI_COMPONENTS_INPUT_LIGHT_BUTTON: '/ui/components/input/light-button',diff --git a/packages/twenty-ui/CHANGELOG.md b/packages/twenty-ui/CHANGELOG.mdindex 4a123bcd390..573e5aa86eb 100644--- a/packages/twenty-ui/CHANGELOG.md+++ b/packages/twenty-ui/CHANGELOG.md@@ -5,6 +5,7 @@### Breaking Changes- Removed `CardPicker` and `CardPickerProps`. Use `Radio variant="card"` inside `RadioGroup` from `twenty-ui/primitives/input`. Card layout, selection, keyboard navigation, and form behavior are preserved.+- Removed `Info`, `InfoProps`, and `InfoAccent`. Use `InlineBanner` from `twenty-ui/components` with `variant="compact"`, `message`, and `color` to preserve wrapping and presentation. Its `button` supports native links through `href`, custom links through `render`, and button actions through `onClick`. The separately versioned Granola app must migrate its four Info-consuming files together with its `twenty-ui@^1.0.0-alpha.1` dependency upgrade.- `ProgressBar` no longer accepts `countdownDurationInMs`, `isCountdownPaused`, or `onCountdownComplete`. Notification countdowns belong to `Toast`. Its duration, hover pause, manual progress, and close behavior are preserved, and keyboard focus now also pauses the countdown. The desktop companion uses the shared Toast.- Removed `ClickToActionLink`. Use `Button variant="link"` from `twenty-ui/primitives/input`: pass `onClick` for actions or `href` for navigation. The link appearance preserves compact text styling while actions gain native button keyboard behavior and prop forwarding.@@ -21,7 +22,7 @@- **Public module ownership changes without a deprecation window.** This release removes 55 public React exports and the `twenty-ui/primitives/json-visualizer` entry point. Applications using the removed imports must migrate when upgrading; compatibility exports are not provided.- Import shared compositions, including `JsonTree`, menu presets, and Toast components and hooks, from `twenty-ui/components`. Foundational controls retain `twenty-ui/primitives/<family>` imports. The optional code editor retains `twenty-ui/components/code-editor`.- Field displays, application links, placeholders, and feature animations are no longer package exports. External applications must own these integrations or compose supported primitives. Internal implementation parts are private.-- `Info` uses `href` and `render` in place of `to`. Replace `AnimatedEaseInOut` and `AnimatedExpandableContainer` with `Collapsible`. Remove the unused `mode` and `initial` props.+- Replace `AnimatedEaseInOut` and `AnimatedExpandableContainer` with `Collapsible`. Remove the unused `mode` and `initial` props.- `SegmentedControl` is a radio group. Use `aria-label` or `aria-labelledby` (one is required), `value` or `defaultValue`, and `onValueChange(value, eventDetails)` in place of `ariaLabel`, `value`, and `onChange(value)`. Options take `startIcon` and `'aria-label'` in place of `Icon` and `ariaLabel`. `role` and `width` are removed: use `Tabs` for tab lists and `className` or `style` to size the control. Arrow keys select the next option, Enter no longer selects, and choosing the selected option again no longer calls `onValueChange`.- Dropdown submenu arrow keys follow `TextDirectionProvider` instead of the computed CSS direction. RTL content set only through `dir` or `direction` now uses LTR keys; wrap it in `TextDirectionProvider`. A Base UI `DirectionProvider` on its own no longer sets `dir` on Select, Dialog, AlertDialog, or Toaster portals; use `TextDirectionProvider`.- `Dropdown.Header` and `Dropdown.Back` no longer rotate caller-supplied icons in RTL. Pass an icon that already points the intended way.diff --git a/packages/twenty-ui/docs/components.ts b/packages/twenty-ui/docs/components.tsindex 8e03d7963bd..8994ee2754e 100644--- a/packages/twenty-ui/docs/components.ts+++ b/packages/twenty-ui/docs/components.ts@@ -4,7 +4,6 @@ import { JSON_TREE_PROP_DESCRIPTIONS } from './jsonTreePropDescriptions';import { NOTIFICATION_COUNTER_PROP_DESCRIPTIONS } from './notificationCounterPropDescriptions';import { TINTED_ICON_TILE_PROP_DESCRIPTIONS } from './tintedIconTilePropDescriptions';import { CALLOUT_PROP_DESCRIPTIONS } from './calloutPropDescriptions';-import { INFO_PROP_DESCRIPTIONS } from './infoPropDescriptions';import { INLINE_BANNER_PROP_DESCRIPTIONS } from './inlineBannerPropDescriptions';import { TOAST_PROVIDER_PROP_DESCRIPTIONS } from './toastProviderPropDescriptions';import { TOASTER_PROP_DESCRIPTIONS } from './toasterPropDescriptions';@@ -521,13 +520,6 @@ export const DOCUMENTED_COMPONENTS = [slug: 'components/callout',propDescriptions: CALLOUT_PROP_DESCRIPTIONS,},- {- name: 'Info',- source: 'components/feedback/Info/Info.tsx',- entryPoint: 'twenty-ui/components',- slug: 'components/info',- propDescriptions: INFO_PROP_DESCRIPTIONS,- },{name: 'InlineBanner',source: 'components/feedback/InlineBanner/InlineBanner.tsx',diff --git a/packages/twenty-ui/docs/infoPropDescriptions.ts b/packages/twenty-ui/docs/infoPropDescriptions.tsdeleted file mode 100644index 33138844d6a..00000000000--- a/packages/twenty-ui/docs/infoPropDescriptions.ts+++ /dev/null@@ -1,14 +0,0 @@-import { type ComponentProps } from 'react';--import { type Info } from '../src/components/feedback/Info/Info';--export const INFO_PROP_DESCRIPTIONS = {- accent: 'Information or danger styling.',- text: 'Message displayed beside the information icon.',- buttonTitle:- 'Visible label for the optional action. Requires href or onClick.',- onClick: 'Action callback when href is absent.',- href: 'Action destination. Takes precedence over onClick.',- render:- 'Custom render element for the link action, forwarded to Button when href is supplied.',-} satisfies Partial<Record<keyof ComponentProps<typeof Info>, string>>;diff --git a/packages/twenty-ui/docs/inlineBannerPropDescriptions.ts b/packages/twenty-ui/docs/inlineBannerPropDescriptions.tsindex d1a62392cf8..a98681e71cb 100644--- a/packages/twenty-ui/docs/inlineBannerPropDescriptions.ts+++ b/packages/twenty-ui/docs/inlineBannerPropDescriptions.ts@@ -4,10 +4,29 @@ import { type InlineBanner } from '../src/components/feedback/InlineBanner/Inlinexport const INLINE_BANNER_PROP_DESCRIPTIONS = {color: 'Banner palette color. An omitted color uses Banner’s default.',- message: 'Message, truncated with its full text available in a tooltip.',- embedded: 'Uses the embedded banner appearance.',- button:- 'Optional action with title, onClick, hidden, disabled, and Icon fields.',+ message:+ 'Message text. Standard banners truncate with a focusable tooltip; compact banners wrap.',+ variant:+ 'Standard full-width banner or compact wrapping message with a 512px maximum content width.',+ embedded:+ 'Removes the bottom margin from standard banners. Compact banners have no bottom margin.',+ button: [+ 'Optional button or destination link. All fields are optional:',+ '',+ '- `title` (`string`): visible action label.',+ '- `onClick` (`(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => void`): activation handler, including keyboard activation.',+ '- `href` (`string`): destination URL; selects native link semantics.',+ '- `render` (`ReactElement | ((props: HTMLProps, state: { disabled: boolean }) => ReactElement)`): custom root element or renderer. Preserve an anchor when `href` is set, or a native button otherwise. `HTMLProps` includes native element attributes and its ref.',+ '- `target` (`string`): link browsing context, such as `_blank`.',+ '- `rel` (`string`): link relationship, such as `noopener noreferrer`.',+ '- `download` (native anchor attribute): use `true` to download the destination or a `string` to suggest a filename.',+ '- `disabled` (`boolean`): prevents activation.',+ '- `hidden` (`boolean`): omits the action from the banner.',+ '- `aria-label` (`string`): accessible action name, needed when no visible title is supplied.',+ '- `Icon` (`IconComponent`): decorative icon component displayed before the title.',+ '',+ 'Action and link fields use the corresponding [Button props](/ui/primitives/input/button). `BaseUIEvent` extends the React event with `preventBaseUIHandler()` and `baseUIHandlerPrevented`.',+ ].join('\n'),LeftIcon: 'Leading icon component. Defaults to the information icon.',className: 'Class applied to the banner.',} satisfies Partial<Record<keyof ComponentProps<typeof InlineBanner>, string>>;diff --git a/packages/twenty-ui/docs/label-ownership.md b/packages/twenty-ui/docs/label-ownership.mdindex c0289090204..3e0116bf802 100644--- a/packages/twenty-ui/docs/label-ownership.md+++ b/packages/twenty-ui/docs/label-ownership.md@@ -18,5 +18,5 @@ This covers production exports under components, primitives, and icons, includin| ResizeHandle and CodeEditor | ResizeHandle accepts native labels over `Resize`. CodeEditor exposes `resizeLabel` (default `Resize editor`) and Monaco `options`, including its editor accessible label. The loading indicator adds no text. Monaco owns its internal editor messages. || Input, Textarea, Select, Field, Slider, Radio, RadioGroup, Checkbox, Switch, SegmentedControl | Native attributes, compound label/description/error parts, options, and children belong to the caller. Browser validation messages remain browser-owned; Field.Error children or render content can replace them. || Dialog, AlertDialog, Popover, Tooltip, Tabs | Text belongs to title, description, close, trigger, tab, and popup parts. No built-in English action or status strings. |-| Banner, InlineBanner, Info, SettingsRow, Section, NavigationBar, RoundedLink, CommandBlock | Content and labels belong to supplied props or children. |+| Banner, InlineBanner, SettingsRow, Section, NavigationBar, RoundedLink, CommandBlock | Content and labels belong to supplied props or children. || Tag, Status, Pill, AvatarGroup, NotificationCounter, ColorSample, TintedIconTile, typography, layout and icon exports | Caller content, data values, native accessible attributes where supported, or decorative output. Loader and progress graphics add no built-in English loading message. |diff --git a/packages/twenty-ui/docs/module-ownership.json b/packages/twenty-ui/docs/module-ownership.jsonindex be8718c9afa..a5957c4e862 100644--- a/packages/twenty-ui/docs/module-ownership.json+++ b/packages/twenty-ui/docs/module-ownership.json@@ -49,7 +49,6 @@"CommandBlock","Dropdown","IconButton",- "Info","InlineBanner","JsonTree","LightButton",diff --git a/packages/twenty-ui/generated/components.docs.json b/packages/twenty-ui/generated/components.docs.jsonindex 793dcebb78d..522d490e108 100644--- a/packages/twenty-ui/generated/components.docs.json+++ b/packages/twenty-ui/generated/components.docs.json@@ -8290,55 +8290,6 @@}]},- {- "name": "Info",- "entryPoint": "twenty-ui/components",- "slug": "components/info",- "props": [- {- "name": "accent",- "type": "\"blue\" | \"danger\"",- "required": false,- "defaultValue": "blue",- "description": "Information or danger styling."- },- {- "name": "buttonTitle",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Visible label for the optional action. Requires href or onClick."- },- {- "name": "href",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Action destination. Takes precedence over onClick."- },- {- "name": "onClick",- "type": "((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void)",- "required": false,- "defaultValue": null,- "description": "Action callback when href is absent."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>",- "required": false,- "defaultValue": null,- "description": "Custom render element for the link action, forwarded to Button when href is supplied."- },- {- "name": "text",- "type": "string",- "required": true,- "defaultValue": null,- "description": "Message displayed beside the information icon."- }- ]- },{"name": "InlineBanner","entryPoint": "twenty-ui/components",@@ -8346,10 +8297,10 @@"props": [{"name": "button",- "type": "{ title?: string | undefined; onClick?: (() => void) | undefined; hidden?: boolean | undefined; disabled?: boolean | undefined; Icon?: IconComponent | undefined; }",+ "type": "InlineBannerButtonProps","required": false,"defaultValue": null,- "description": "Optional action with title, onClick, hidden, disabled, and Icon fields."+ "description": "Optional button or destination link. All fields are optional:\n\n- `title` (`string`): visible action label.\n- `onClick` (`(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => void`): activation handler, including keyboard activation.\n- `href` (`string`): destination URL; selects native link semantics.\n- `render` (`ReactElement | ((props: HTMLProps, state: { disabled: boolean }) => ReactElement)`): custom root element or renderer. Preserve an anchor when `href` is set, or a native button otherwise. `HTMLProps` includes native element attributes and its ref.\n- `target` (`string`): link browsing context, such as `_blank`.\n- `rel` (`string`): link relationship, such as `noopener noreferrer`.\n- `download` (native anchor attribute): use `true` to download the destination or a `string` to suggest a filename.\n- `disabled` (`boolean`): prevents activation.\n- `hidden` (`boolean`): omits the action from the banner.\n- `aria-label` (`string`): accessible action name, needed when no visible title is supplied.\n- `Icon` (`IconComponent`): decorative icon component displayed before the title.\n\nAction and link fields use the corresponding [Button props](/ui/primitives/input/button). `BaseUIEvent` extends the React event with `preventBaseUIHandler()` and `baseUIHandlerPrevented`."},{"name": "className",@@ -8362,7 +8313,7 @@"name": "color","type": "\"blue\" | \"danger\"","required": false,- "defaultValue": null,+ "defaultValue": "blue","description": "Banner palette color. An omitted color uses Banner’s default."},{@@ -8370,7 +8321,7 @@"type": "boolean","required": false,"defaultValue": "false",- "description": "Uses the embedded banner appearance."+ "description": "Removes the bottom margin from standard banners. Compact banners have no bottom margin."},{"name": "LeftIcon",@@ -8384,7 +8335,14 @@"type": "string","required": true,"defaultValue": null,- "description": "Message, truncated with its full text available in a tooltip."+ "description": "Message text. Standard banners truncate with a focusable tooltip; compact banners wrap."+ },+ {+ "name": "variant",+ "type": "\"compact\" | \"standard\"",+ "required": false,+ "defaultValue": "standard",+ "description": "Standard full-width banner or compact wrapping message with a 512px maximum content width."}]},diff --git a/packages/twenty-ui/src/components/feedback/Info/Info.module.scss b/packages/twenty-ui/src/components/feedback/Info/Info.module.scssdeleted file mode 100644index 52132791a20..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/Info.module.scss+++ /dev/null@@ -1,38 +0,0 @@-.info {- align-items: center;- border-radius: var(--t-border-radius-md);- display: flex;- font-weight: var(--t-font-weight-medium);- justify-content: space-between;- max-width: 512px;- gap: var(--t-spacing-2);- padding: var(--t-spacing-2);- background: transparent;- color: inherit;-}--.accentBlue {- background: var(--t-color-blue5);- color: var(--t-color-blue10);-}--.accentDanger {- background: var(--t-color-red3);- color: var(--t-color-red);-}--.textContainer {- align-items: center;- display: flex;- gap: var(--t-spacing-2);-- & > svg {- flex-shrink: 0;- }-}--.linkContainer {- & > a {- text-decoration: none;- }-}diff --git a/packages/twenty-ui/src/components/feedback/Info/Info.module.scss.d.ts b/packages/twenty-ui/src/components/feedback/Info/Info.module.scss.d.tsdeleted file mode 100644index 6c8375ba899..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/Info.module.scss.d.ts+++ /dev/null@@ -1,8 +0,0 @@-declare const classNames: {- readonly info: 'info';- readonly accentBlue: 'accentBlue';- readonly accentDanger: 'accentDanger';- readonly textContainer: 'textContainer';- readonly linkContainer: 'linkContainer';-};-export default classNames;diff --git a/packages/twenty-ui/src/components/feedback/Info/Info.tsx b/packages/twenty-ui/src/components/feedback/Info/Info.tsxdeleted file mode 100644index b34284c967e..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/Info.tsx+++ /dev/null@@ -1,57 +0,0 @@-import { IconInfoCircle } from '@ui/icon/components/TablerIcons';-import { useTheme } from '@ui/theme';-import { clsx } from 'clsx';-import { type InfoAccent } from './types/InfoAccent';-import { type InfoProps } from './types/InfoProps';--import { Button } from '@ui/primitives/input/Button/Button';--import styles from './Info.module.scss';--const INFO_ACCENT_CLASS_NAMES: Record<InfoAccent, string> = {- blue: styles.accentBlue,- danger: styles.accentDanger,-};--export const Info = ({- accent = 'blue',- text,- buttonTitle,- onClick,- href,- render,-}: InfoProps) => {- const theme = useTheme();-- return (- <div className={clsx(styles.info, INFO_ACCENT_CLASS_NAMES[accent])}>- <div className={styles.textContainer}>- <IconInfoCircle size={theme.icon.size.md} />- {text}- </div>- {buttonTitle && href && (- <span className={styles.linkContainer}>- <Button- href={href}- render={render}- size="sm"- variant="outline"- color={accent === 'blue' ? 'accent' : 'danger'}- >- {buttonTitle}- </Button>- </span>- )}- {buttonTitle && onClick && !href && (- <Button- onClick={onClick}- size="sm"- variant="outline"- color={accent === 'blue' ? 'accent' : 'danger'}- >- {buttonTitle}- </Button>- )}- </div>- );-};diff --git a/packages/twenty-ui/src/components/feedback/Info/__stories__/Info.stories.tsx b/packages/twenty-ui/src/components/feedback/Info/__stories__/Info.stories.tsxdeleted file mode 100644index f2a7a62fae3..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/__stories__/Info.stories.tsx+++ /dev/null@@ -1,51 +0,0 @@-import { type Meta, type StoryObj } from '@storybook/react-vite';-import {- A11Y_DEFER_COLOR_CONTRAST,- CatalogDecorator,- ComponentDecorator,- type CatalogStory,-} from '@ui/testing';--import { Info } from '@ui/components/feedback/Info/Info';-import { type InfoAccent } from '@ui/components/feedback/Info/types/InfoAccent';--const meta: Meta<typeof Info> = {- title: 'UI/Feedback/Info',- component: Info,-};--export default meta;-type Story = StoryObj<typeof Info>;--export const Default: Story = {- parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- args: {- accent: 'blue',- text: 'An info component',- buttonTitle: 'Update',- },- decorators: [ComponentDecorator],-};--export const Catalog: CatalogStory<Story, typeof Info> = {- args: {- text: 'An info component',- buttonTitle: 'Update',- },- argTypes: {- accent: { control: false },- },- parameters: {- a11y: A11Y_DEFER_COLOR_CONTRAST,- catalog: {- dimensions: [- {- name: 'accents',- values: ['blue', 'danger'] satisfies InfoAccent[],- props: (accent: InfoAccent) => ({ accent }),- },- ],- },- },- decorators: [CatalogDecorator],-};diff --git a/packages/twenty-ui/src/components/feedback/Info/types/InfoAccent.ts b/packages/twenty-ui/src/components/feedback/Info/types/InfoAccent.tsdeleted file mode 100644index 29a88df7616..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/types/InfoAccent.ts+++ /dev/null@@ -1 +0,0 @@-export type InfoAccent = 'blue' | 'danger';diff --git a/packages/twenty-ui/src/components/feedback/Info/types/InfoProps.ts b/packages/twenty-ui/src/components/feedback/Info/types/InfoProps.tsdeleted file mode 100644index f545504ab2f..00000000000--- a/packages/twenty-ui/src/components/feedback/Info/types/InfoProps.ts+++ /dev/null@@ -1,12 +0,0 @@-import { type Button } from '@ui/primitives/input/Button/Button';-import React from 'react';-import { type InfoAccent } from './InfoAccent';--export type InfoProps = {- accent?: InfoAccent;- text: string;- buttonTitle?: string;- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;- href?: string;- render?: React.ComponentProps<typeof Button>['render'];-};diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scssindex 9495048b027..0d6b95638a8 100644--- a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss@@ -23,3 +23,31 @@flex: 1;min-width: 0;}++.compact {+ box-sizing: content-box;+ font-family: inherit;+ font-size: inherit;+ font-style: inherit;+ gap: var(--t-spacing-2);+ justify-content: space-between;+ line-height: inherit;+ margin-bottom: 0;+ max-width: 512px;+ min-height: auto;+ width: auto;++ .bannerContent {+ flex: initial;+ }+}++.compactBlue {+ background: var(--t-color-blue5);+ color: var(--t-color-blue10);+}++.compactDanger {+ background: var(--t-color-red3);+ color: var(--t-color-red);+}diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss.d.ts b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss.d.tsindex cb3a98933f8..5cc7af193e2 100644--- a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss.d.ts+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.module.scss.d.ts@@ -3,5 +3,8 @@ declare const classNames: {readonly embedded: 'embedded';readonly bannerContent: 'bannerContent';readonly bannerText: 'bannerText';+ readonly compact: 'compact';+ readonly compactBlue: 'compactBlue';+ readonly compactDanger: 'compactDanger';};export default classNames;diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsxindex 14b1d61accd..02b82f18469 100644--- a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx@@ -1,70 +1,55 @@+import { clsx } from 'clsx';+import { IconInfoCircle } from '@ui/icon/components/TablerIcons';-import { type IconComponent } from '@ui/icon/types/IconComponent';-import {- Banner,- type BannerColor,-} from '@ui/primitives/feedback/Banner/Banner';-import { Button } from '@ui/primitives/input/Button/Button';+import { Banner } from '@ui/primitives/feedback/Banner/Banner';import { OverflowingTextWithTooltip } from '@ui/primitives/typography/OverflowingTextWithTooltip/OverflowingTextWithTooltip';import { useTheme } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';-import { clsx } from 'clsx';import styles from './InlineBanner.module.scss';--type InlineBannerProps = {- color?: BannerColor;- message: string;- embedded?: boolean;- button?: {- title?: string;- onClick?: () => void;- hidden?: boolean;- disabled?: boolean;- Icon?: IconComponent;- };- LeftIcon?: IconComponent;- className?: string;-};+import { InlineBannerButton } from './internal/InlineBannerButton';+import { type InlineBannerProps } from './types/InlineBannerProps';export const InlineBanner = ({- color,+ color = 'blue',message,+ variant = 'standard',embedded = false,button,LeftIcon = IconInfoCircle,className,}: InlineBannerProps) => {const theme = useTheme();+ const isCompact = variant === 'compact';return (<Banner- className={clsx(styles.banner, embedded && styles.embedded, className)}+ className={clsx(+ styles.banner,+ isCompact && styles.compact,+ isCompact &&+ (color === 'danger' ? styles.compactDanger : styles.compactBlue),+ embedded && styles.embedded,+ className,+ )}color={color}- variant={'secondary'}+ variant="secondary"><div className={styles.bannerContent}><LeftIcon size={theme.icon.size.md} /><div className={styles.bannerText}>- <OverflowingTextWithTooltip- isFocusable- text={<>{message}</>}- tooltipContent={message}- />+ {isCompact ? (+ message+ ) : (+ <OverflowingTextWithTooltip+ isFocusable+ text={<>{message}</>}+ tooltipContent={message}+ />+ )}</div></div>- {button && !button.hidden && (- <Button- size="sm"- onClick={button?.onClick}- disabled={button.disabled}- startIcon={isDefined(button.Icon) ? <button.Icon /> : undefined}- variant="outline"- color={color === 'danger' ? 'danger' : 'accent'}- >- {button?.title}- </Button>- )}+ {isDefined(button) && <InlineBannerButton {...button} color={color} />}</Banner>);};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 a83c77f922f..d40839db7ad 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@@ -24,6 +24,10 @@ export const Default: Story = {message: 'No AI models are enabled.',button: { title: 'Configure models', onClick: fn() },},+};++export const KeyboardAction: Story = {+ args: Default.args,play: async ({ canvasElement, args }) => {const canvas = within(canvasElement);const button = await canvas.findByRole('button', {@@ -155,3 +159,113 @@ export const TruncatedMessage: Story = {await expect(args.button?.onClick).toHaveBeenCalledTimes(1);},};++export const CompactLink: Story = {+ args: {+ variant: 'compact',+ message: 'Connect your account to keep your contacts in sync.',+ button: { title: 'Connection settings', href: '#connection-settings' },+ },+};++export const CompactDanger: Story = {+ args: {+ variant: 'compact',+ color: 'danger',+ message:+ 'Card payment is currently unavailable. Please verify your Stripe configuration or contact your workspace admin.',+ },+};++export const WrappingMessage: Story = {+ args: CompactDanger.args,+ parameters: { container: { width: 240 } },+ play: async ({ canvasElement, args }) => {+ const canvas = within(canvasElement);+ const message = canvas.getByText(args.message);++ await expect(message.scrollWidth).toBeLessThanOrEqual(message.clientWidth);+ await expect(getComputedStyle(message).whiteSpace).toBe('normal');+ await expect(message.getBoundingClientRect().height).toBeGreaterThan(40);+ await expect(message).not.toHaveAttribute('tabindex');+ await userEvent.hover(message);+ await expect(+ within(canvasElement.ownerDocument.body).queryByRole('tooltip'),+ ).not.toBeInTheDocument();+ },+};++export const DestinationLink: Story = {+ args: CompactLink.args,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const link = canvas.getByRole('link', { name: 'Connection settings' });++ await expect(link.tagName).toBe('A');+ await expect(link).toHaveAttribute('href', '#connection-settings');+ await expect(canvas.queryByRole('button')).not.toBeInTheDocument();+ await userEvent.tab();+ await expect(link).toHaveFocus();+ },+};++export const CustomLink: Story = {+ args: {+ ...CompactLink.args,+ button: {+ title: 'Connection settings',+ href: 'https://twenty.com',+ target: '_blank',+ rel: 'noopener noreferrer',+ render: (+ <a href="https://twenty.com" aria-label="Open connection settings" />+ ),+ onClick: fn((event) => event.preventDefault()),+ },+ },+ play: async ({ canvasElement, args }) => {+ const canvas = within(canvasElement);+ const link = canvas.getByRole('link', { name: 'Open connection settings' });++ await expect(link).toHaveAttribute('href', 'https://twenty.com');+ await expect(link).toHaveAttribute('target', '_blank');+ await expect(link).toHaveAttribute('rel', 'noopener noreferrer');+ await userEvent.tab();+ await expect(link).toHaveFocus();+ await userEvent.keyboard('{Enter}');+ await expect(args.button?.onClick).toHaveBeenCalledTimes(1);+ },+};++export const CompactAction: Story = {+ args: {+ variant: 'compact',+ color: 'danger',+ message: 'Your connection needs attention.',+ button: { title: 'Reconnect', onClick: fn() },+ },+ play: async ({ canvasElement, args }) => {+ const canvas = within(canvasElement);+ const button = canvas.getByRole('button', { name: 'Reconnect' });++ await userEvent.tab();+ await expect(button).toHaveFocus();+ await userEvent.keyboard('{Enter}');+ await userEvent.keyboard(' ');+ await expect(args.button?.onClick).toHaveBeenCalledTimes(2);+ await expect(button).toHaveFocus();+ },+};++export const HiddenAction: Story = {+ args: {+ ...Default.args,+ button: { title: 'Configure models', hidden: true, onClick: fn() },+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ await expect(canvas.queryByRole('button')).not.toBeInTheDocument();+ await expect(canvas.queryByRole('link')).not.toBeInTheDocument();+ },+};diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/internal/InlineBannerButton.tsx b/packages/twenty-ui/src/components/feedback/InlineBanner/internal/InlineBannerButton.tsxnew file mode 100644index 00000000000..435d17daedc--- /dev/null+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/internal/InlineBannerButton.tsx@@ -0,0 +1,42 @@+import { type BannerColor } from '@ui/primitives/feedback/Banner/Banner';+import { isDefined } from '@ui/utilities/utils/isDefined';+import { Button } from '@ui/primitives/input/Button/Button';+import { type InlineBannerButtonProps } from '../types/InlineBannerButtonProps';++export const InlineBannerButton = ({+ color,+ title,+ Icon,+ hidden,+ onClick,+ href,+ render,+ target,+ rel,+ download,+ disabled,+ 'aria-label': ariaLabel,+}: InlineBannerButtonProps & { color: BannerColor }) => {+ if (hidden) {+ return null;+ }++ return (+ <Button+ onClick={onClick}+ href={href}+ render={render}+ target={target}+ rel={rel}+ download={download}+ disabled={disabled}+ aria-label={ariaLabel}+ size="sm"+ startIcon={isDefined(Icon) ? <Icon /> : undefined}+ variant="outline"+ color={color === 'danger' ? 'danger' : 'accent'}+ >+ {title}+ </Button>+ );+};diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerButtonProps.ts b/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerButtonProps.tsnew file mode 100644index 00000000000..f710eb75b6d--- /dev/null+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerButtonProps.ts@@ -0,0 +1,18 @@+import { type IconComponent } from '@ui/icon/types/IconComponent';+import { type ButtonProps } from '@ui/primitives/input/Button/types/ButtonProps';++export type InlineBannerButtonProps = Pick<+ ButtonProps,+ | 'onClick'+ | 'href'+ | 'render'+ | 'target'+ | 'rel'+ | 'download'+ | 'disabled'+ | 'aria-label'+> & {+ title?: string;+ hidden?: boolean;+ Icon?: IconComponent;+};diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerProps.ts b/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerProps.tsnew file mode 100644index 00000000000..dd90603d2dd--- /dev/null+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/types/InlineBannerProps.ts@@ -0,0 +1,13 @@+import { type IconComponent } from '@ui/icon/types/IconComponent';+import { type BannerColor } from '@ui/primitives/feedback/Banner/Banner';+import { type InlineBannerButtonProps } from './InlineBannerButtonProps';++export type InlineBannerProps = {+ color?: BannerColor;+ message: string;+ variant?: 'standard' | 'compact';+ embedded?: boolean;+ button?: InlineBannerButtonProps;+ LeftIcon?: IconComponent;+ className?: string;+};diff --git a/packages/twenty-ui/src/components/index.ts b/packages/twenty-ui/src/components/index.tsindex d6c5ae48d7b..b486849b370 100644--- a/packages/twenty-ui/src/components/index.ts+++ b/packages/twenty-ui/src/components/index.ts@@ -24,10 +24,9 @@ export { getIconTileColorShades } from './data-display/TintedIconTile/utils/getIexport { Callout } from './feedback/Callout/Callout';export type { CalloutProps } from './feedback/Callout/types/CalloutProps';export type { CalloutVariant } from './feedback/Callout/types/CalloutVariant';-export { Info } from './feedback/Info/Info';-export type { InfoAccent } from './feedback/Info/types/InfoAccent';-export type { InfoProps } from './feedback/Info/types/InfoProps';export { InlineBanner } from './feedback/InlineBanner/InlineBanner';+export type { InlineBannerButtonProps } from './feedback/InlineBanner/types/InlineBannerButtonProps';+export type { InlineBannerProps } from './feedback/InlineBanner/types/InlineBannerProps';export { useToast } from './feedback/Toast/hooks/useToast';export { Toast } from './feedback/Toast/Toast';export { ToastProvider } from './feedback/Toast/ToastProvider';