diff --git a/apps/shadcn-docs/src/content/components/tabs/examples/tabs-example.component.ts b/apps/shadcn-docs/src/content/components/tabs/examples/tabs-example.component.ts
index 90b868d9..638f5e32 100644
--- a/apps/shadcn-docs/src/content/components/tabs/examples/tabs-example.component.ts
+++ b/apps/shadcn-docs/src/content/components/tabs/examples/tabs-example.component.ts
@@ -27,13 +27,13 @@ import { ShTabsModule } from '@radix-ng/shadcn/tabs';
ShButtonDirective
],
template: `
-
-
+
+
-
+
-
+
Account
@@ -55,9 +55,9 @@ import { ShTabsModule } from '@radix-ng/shadcn/tabs';
-
+
-
+
Password
@@ -79,8 +79,8 @@ import { ShTabsModule } from '@radix-ng/shadcn/tabs';
-
-
+
+
`
})
export class TabsExampleComponent {}
diff --git a/packages/shadcn/tabs/index.ts b/packages/shadcn/tabs/index.ts
index 5e034984..37f60f73 100644
--- a/packages/shadcn/tabs/index.ts
+++ b/packages/shadcn/tabs/index.ts
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import {
- ShTabsContentDirective,
+ ShTabsContentComponent,
ShTabsDirective,
ShTabsListDirective,
ShTabsTriggerDirective
@@ -10,7 +10,7 @@ export * from './src/tabs.directive';
const tabsImports = [
ShTabsDirective,
- ShTabsContentDirective,
+ ShTabsContentComponent,
ShTabsTriggerDirective,
ShTabsListDirective
];
diff --git a/packages/shadcn/tabs/src/tabs.directive.ts b/packages/shadcn/tabs/src/tabs.directive.ts
index 1039277c..bc9f893b 100644
--- a/packages/shadcn/tabs/src/tabs.directive.ts
+++ b/packages/shadcn/tabs/src/tabs.directive.ts
@@ -1,4 +1,4 @@
-import { computed, Directive, Input, input } from '@angular/core';
+import { Component, computed, Directive, Input, input } from '@angular/core';
import {
RdxTabsContentDirective,
RdxTabsListDirective,
@@ -10,7 +10,7 @@ import { cva } from 'class-variance-authority';
// TabsPrimitive.Root
@Directive({
- selector: '[shTabs]',
+ selector: 'sh-tabs,[shTabs]',
standalone: true,
hostDirectives: [{ directive: RdxTabsRootDirective, inputs: ['defaultValue: shDefaultValue'] }]
})
@@ -23,7 +23,7 @@ const tabsListVariants = cva(
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground'
);
@Directive({
- selector: '[shTabsList]',
+ selector: 'sh-tabs-list,[shTabsList]',
standalone: true,
hostDirectives: [RdxTabsListDirective],
host: {
@@ -56,17 +56,18 @@ export class ShTabsTriggerDirective {
const tabsContentVariants = cva(
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2'
);
-@Directive({
- selector: '[shTabsContent]',
- standalone: true,
- hostDirectives: [{ directive: RdxTabsContentDirective, inputs: ['value: shValue'] }],
- host: {
- '[class]': 'computedClass()'
- }
+@Component({
+ selector: 'sh-tabs-content,[shTabsContent]',
+ imports: [RdxTabsContentDirective],
+ template: `
+
+
+
+ `
})
-export class ShTabsContentDirective {
+export class ShTabsContentComponent {
readonly shValue = input.required();
- readonly class = input();
- protected computedClass = computed(() => cn(tabsContentVariants(), this.class()));
+ readonly classContent = input();
+ protected computedClass = computed(() => cn(tabsContentVariants(), this.classContent()));
}