(null);
const environment = useEnvironment();
+ const radioGroupLabelId = useId();
const isComponent = !caller.startsWith('use');
@@ -142,6 +143,7 @@ const EnableOrganizationsPromptInternal = ({
) : (
<>
setAllowPersonalAccount(value === 'allow')}
+ labelledBy={radioGroupLabelId}
>
void;
children: React.ReactNode;
+ labelledBy?: string;
};
-const RadioGroup = ({ value, onChange, children }: RadioGroupProps) => {
+const RadioGroup = ({ value, onChange, children, labelledBy }: RadioGroupProps) => {
const name = useId();
const contextValue = React.useMemo(() => ({ value: { name, value, onChange } }), [name, value, onChange]);
@@ -453,6 +457,8 @@ const RadioGroup = ({ value, onChange, children }: RadioGroupProps) => {
role='radiogroup'
direction='col'
gap={3}
+ aria-orientation='vertical'
+ aria-labelledby={labelledBy}
>
{children}
From c324d5d9555b6cfbadfa4f44d414f23dbc05a801 Mon Sep 17 00:00:00 2001
From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Date: Mon, 15 Dec 2025 14:34:41 -0300
Subject: [PATCH 07/11] Move the description outside the label
---
.../EnableOrganizationsPrompt/index.tsx | 238 ++++++++----------
1 file changed, 104 insertions(+), 134 deletions(-)
diff --git a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
index 0489a30e025..9418cd02b47 100644
--- a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
+++ b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
@@ -6,9 +6,7 @@ import type { SerializedStyles } from '@emotion/react';
import { css } from '@emotion/react';
import React, { forwardRef, useId, useLayoutEffect, useRef, useState } from 'react';
-import { ArrowRightIcon } from '@/icons';
import { useEnvironment } from '@/ui/contexts';
-import { Alert } from '@/ui/elements/Alert';
import { Modal } from '@/ui/elements/Modal';
import { InternalThemeProvider } from '@/ui/styledSystem';
@@ -212,38 +210,6 @@ const EnableOrganizationsPromptInternal = ({
description='Users can work outside of an organization with a personal account'
/>
-
- {!allowPersonalAccount && (
- ({ marginTop: t.sizes.$3 })}
- >
- Existing users will be forced to join an organization, which may break your application. If you are
- unsure of the impact, please contact support before enabling.
-
- Learn more
-
-
-
- )}
)}
@@ -422,7 +388,7 @@ const PromptBadge = ({ children }: PromptBadgeProps) => {
border-radius: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
- line-height: 1.25;
+ line-height: 1.23;
background-color: #ebebeb;
color: #2b2b34;
`}
@@ -472,102 +438,104 @@ type RadioGroupItemProps = {
description?: React.ReactNode;
};
+const RADIO_INDICATOR_SIZE = '1rem';
+const RADIO_GAP = '0.5rem';
+
const RadioGroupItem = ({ value, label, description }: RadioGroupItemProps) => {
const { name, value: selectedValue, onChange } = useRadioGroup();
const descriptionId = useId();
const checked = value === selectedValue;
return (
-
+
+
+ {description && (
+
+ {description}
+
+ )}
+
);
};
From 3cb07e9ce5da47ab15e0aed383e38500e5beacaa Mon Sep 17 00:00:00 2001
From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Date: Mon, 15 Dec 2025 16:36:38 -0300
Subject: [PATCH 08/11] Add explicit return type for components
---
.../EnableOrganizationsPrompt/index.tsx | 30 ++++++++++++++-----
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
index 9418cd02b47..2dd159bd995 100644
--- a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
+++ b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
@@ -20,7 +20,7 @@ const EnableOrganizationsPromptInternal = ({
caller,
onSuccess,
onClose,
-}: __internal_EnableOrganizationsPromptProps) => {
+}: __internal_EnableOrganizationsPromptProps): JSX.Element => {
const clerk = useClerk();
const [isLoading, setIsLoading] = useState(false);
const [isEnabled, setIsEnabled] = useState(false);
@@ -199,8 +199,20 @@ const EnableOrganizationsPromptInternal = ({
}
description={
<>
- Users need to belong to at least one organization.
- Common for most B2B SaaS applications
+
+ Users need to belong to at least one organization.
+
+
+ Common for most B2B SaaS applications
+ {' '}
>
}
/>
@@ -279,7 +291,7 @@ const EnableOrganizationsPromptInternal = ({
* A prompt that allows the user to enable the Organizations feature for their development instance
* @internal
*/
-export const EnableOrganizationsPrompt = (props: __internal_EnableOrganizationsPromptProps) => {
+export const EnableOrganizationsPrompt = (props: __internal_EnableOrganizationsPromptProps): JSX.Element => {
return (
@@ -377,7 +389,7 @@ type PromptBadgeProps = {
children: React.ReactNode;
};
-const PromptBadge = ({ children }: PromptBadgeProps) => {
+const PromptBadge = ({ children }: PromptBadgeProps): JSX.Element => {
return (
{
+const RadioGroup = ({ value, onChange, children, labelledBy }: RadioGroupProps): JSX.Element => {
const name = useId();
const contextValue = React.useMemo(() => ({ value: { name, value, onChange } }), [name, value, onChange]);
@@ -441,7 +453,7 @@ type RadioGroupItemProps = {
const RADIO_INDICATOR_SIZE = '1rem';
const RADIO_GAP = '0.5rem';
-const RadioGroupItem = ({ value, label, description }: RadioGroupItemProps) => {
+const RadioGroupItem = ({ value, label, description }: RadioGroupItemProps): JSX.Element => {
const { name, value: selectedValue, onChange } = useRadioGroup();
const descriptionId = useId();
const checked = value === selectedValue;
@@ -470,6 +482,7 @@ const RadioGroupItem = ({ value, label, description }: RadioGroupItemProps) => {
}
&:hover:has(input:checked) > span:first-of-type {
+ background-color: rgba(108, 71, 255, 0.8);
background-color: color-mix(in srgb, #6c47ff 80%, transparent);
}
`}
@@ -517,6 +530,7 @@ const RadioGroupItem = ({ value, label, description }: RadioGroupItemProps) => {
css`
border-width: 2px;
border-color: #6c47ff;
+ background-color: #6c47ff;
background-color: color-mix(in srgb, #6c47ff 100%, transparent);
box-shadow: 0 0 0 2px rgba(108, 71, 255, 0.2);
`}
@@ -597,7 +611,7 @@ const Link = forwardRef & { css?: S
},
);
-const CoinFlip = ({ isEnabled }: { isEnabled: boolean }) => {
+const CoinFlip = ({ isEnabled }: { isEnabled: boolean }): JSX.Element => {
const [rotation, setRotation] = useState(0);
useLayoutEffect(() => {
From 61680abefa650ad5b24ccd32c0bbbb772e8bf527 Mon Sep 17 00:00:00 2001
From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Date: Mon, 15 Dec 2025 17:44:58 -0300
Subject: [PATCH 09/11] Update copy
---
.../EnableOrganizationsPrompt/index.tsx | 21 ++-----------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
index 2dd159bd995..91be476c648 100644
--- a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
+++ b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
@@ -194,27 +194,10 @@ const EnableOrganizationsPromptInternal = ({
label={
Require organization membership
- Most common
+ Standard
}
- description={
- <>
-
- Users need to belong to at least one organization.
-
-
- Common for most B2B SaaS applications
- {' '}
- >
- }
+ description='Users need to belong to at least one organization.'
/>
Date: Tue, 16 Dec 2025 12:43:32 -0500
Subject: [PATCH 10/11] allow wrapping
---
.../devPrompts/EnableOrganizationsPrompt/index.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
index 91be476c648..e6e2a1e0dbb 100644
--- a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
+++ b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
@@ -192,7 +192,10 @@ const EnableOrganizationsPromptInternal = ({
+ ({ columnGap: t.sizes.$2, rowGap: t.sizes.$1 })}
+ >
Require organization membership
Standard
@@ -386,6 +389,7 @@ const PromptBadge = ({ children }: PromptBadgeProps): JSX.Element => {
line-height: 1.23;
background-color: #ebebeb;
color: #2b2b34;
+ white-space: nowrap;
`}
>
{children}
From 27c86eba5fc0a3adcb17cb937311054b1c7c1e04 Mon Sep 17 00:00:00 2001
From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Date: Tue, 16 Dec 2025 16:56:39 -0300
Subject: [PATCH 11/11] Update copy
---
.../EnableOrganizationsPrompt/index.tsx | 21 ++++++++++++-------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
index e6e2a1e0dbb..5ca5a59a36a 100644
--- a/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
+++ b/packages/ui/src/components/devPrompts/EnableOrganizationsPrompt/index.tsx
@@ -179,32 +179,37 @@ const EnableOrganizationsPromptInternal = ({
)}
- {hasPersonalAccountsEnabled && (
+ {hasPersonalAccountsEnabled && !isEnabled && (
({ marginTop: t.sizes.$2 })}
direction='col'
>
setAllowPersonalAccount(value === 'allow')}
+ value={allowPersonalAccount ? 'optional' : 'required'}
+ onChange={value => setAllowPersonalAccount(value === 'optional')}
labelledBy={radioGroupLabelId}
>
({ columnGap: t.sizes.$2, rowGap: t.sizes.$1 })}
>
- Require organization membership
+ Membership required
Standard
}
- description='Users need to belong to at least one organization.'
+ description={
+ <>
+ Users need to belong to at least one organization.
+ Common for most B2B SaaS applications
+ >
+ }
/>