diff --git a/.changeset/clean-friends-check.md b/.changeset/clean-friends-check.md new file mode 100644 index 000000000..5c8e5b00a --- /dev/null +++ b/.changeset/clean-friends-check.md @@ -0,0 +1,5 @@ +--- +"shadcn": patch +--- + +remove restricted blocks diff --git a/packages/shadcn/src/commands/add.ts b/packages/shadcn/src/commands/add.ts index 004afc6f5..ebfb821a5 100644 --- a/packages/shadcn/src/commands/add.ts +++ b/packages/shadcn/src/commands/add.ts @@ -78,50 +78,6 @@ export const add = new Command() }) } - // Check for restricted component prefixes with base- or radix- styles. - const restrictedComponentPrefixes = [ - "sidebar-", - "login-", - "signup-", - "otp-", - "calendar-", - ] - const restrictedStylePrefixes = ["base-", "radix-"] - - if (components.length > 0) { - if (initialConfig?.style) { - const isRestrictedStyle = restrictedStylePrefixes.some((prefix) => - initialConfig?.style.startsWith(prefix) - ) - - if (isRestrictedStyle) { - const restrictedComponents = components.filter( - (component: string) => - restrictedComponentPrefixes.some((prefix) => - component.startsWith(prefix) - ) - ) - - if (restrictedComponents.length) { - logger.warn( - `The ${highlighter.info( - restrictedComponents - .map((component: string) => component) - .join(", ") - )} component(s) are not available for the ${highlighter.info( - initialConfig.style - )} style yet. They are coming soon.` - ) - logger.warn( - "In the meantime, you can visit the blocks page on https://ui.shadcn.com/blocks and copy the code." - ) - logger.break() - process.exit(1) - } - } - } - } - let hasNewRegistries = false if (components.length > 0) { const { config: updatedConfig, newRegistries } =