@getcoherent/core 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3268,6 +3268,7 @@ declare class ComponentGenerator {
3268
3268
  private generateTextarea;
3269
3269
  private generateLabel;
3270
3270
  private generateBadge;
3271
+ private generateProgress;
3271
3272
  private generateCheckbox;
3272
3273
  private generateSelect;
3273
3274
  /**
package/dist/index.js CHANGED
@@ -1970,7 +1970,8 @@ var ComponentGenerator = class {
1970
1970
  dialog: () => this.generateFullDialog(),
1971
1971
  "alert-dialog": () => this.generateFullAlertDialog(),
1972
1972
  "dropdown-menu": () => this.generateFullDropdownMenu(),
1973
- accordion: () => this.generateFullAccordion()
1973
+ accordion: () => this.generateFullAccordion(),
1974
+ progress: () => this.generateProgress()
1974
1975
  };
1975
1976
  return map[id] ?? null;
1976
1977
  }
@@ -2775,7 +2776,7 @@ import { cn } from '@/lib/utils'
2775
2776
  import { cva, type VariantProps } from 'class-variance-authority'
2776
2777
 
2777
2778
  const badgeVariants = cva(
2778
- 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
2779
+ 'inline-flex items-center whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
2779
2780
  {
2780
2781
  variants: {
2781
2782
  variant: {
@@ -2800,6 +2801,31 @@ function Badge({ className, variant, ...props }: BadgeProps) {
2800
2801
  }
2801
2802
 
2802
2803
  export { Badge, badgeVariants }
2804
+ `;
2805
+ }
2806
+ generateProgress() {
2807
+ return `import * as React from 'react'
2808
+ import { cn } from '@/lib/utils'
2809
+
2810
+ export interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
2811
+ value?: number
2812
+ }
2813
+
2814
+ export const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
2815
+ ({ className, value = 0, ...props }, ref) => (
2816
+ <div
2817
+ ref={ref}
2818
+ className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}
2819
+ {...props}
2820
+ >
2821
+ <div
2822
+ className="h-full w-full flex-1 bg-primary transition-all"
2823
+ style={{ transform: \`translateX(-\${100 - (value || 0)}%)\` }}
2824
+ />
2825
+ </div>
2826
+ ),
2827
+ )
2828
+ Progress.displayName = 'Progress'
2803
2829
  `;
2804
2830
  }
2805
2831
  generateCheckbox() {
@@ -5755,8 +5781,10 @@ export function AppNav() {
5755
5781
  "/forgot-password",
5756
5782
  "/reset-password"
5757
5783
  ]);
5758
- const visibleItems = navItems.filter((item) => !authRoutes.has(item.route) && !item.route.includes("["));
5759
- const hasMultipleItems = visibleItems.length > 1;
5784
+ const visibleItems = navItems.filter(
5785
+ (item) => item.route !== "/" && !authRoutes.has(item.route) && !item.route.includes("[")
5786
+ );
5787
+ const hasMultipleItems = visibleItems.length > 0;
5760
5788
  const items = visibleItems.map(
5761
5789
  (item) => `<Link href="${item.route}" className={\`text-sm font-medium px-3 py-2 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring \${pathname === "${item.route}" ? 'bg-muted text-foreground' : 'text-muted-foreground hover:text-foreground hover:bg-muted/50'}\`}>${item.label}</Link>`
5762
5790
  ).join("\n ");
@@ -5798,6 +5826,7 @@ function ThemeToggle() {
5798
5826
 
5799
5827
  export function Header() {
5800
5828
  const pathname = usePathname()
5829
+ if (pathname?.startsWith('/design-system')) return null
5801
5830
  return (
5802
5831
  <>
5803
5832
  <nav className="sticky top-0 z-50 shrink-0 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
@@ -5832,7 +5861,11 @@ export function Header() {
5832
5861
  const appName = this.escapeString(this.config.name);
5833
5862
  return `'use client'
5834
5863
 
5864
+ import { usePathname } from 'next/navigation'
5865
+
5835
5866
  export function Footer() {
5867
+ const pathname = usePathname()
5868
+ if (pathname?.startsWith('/design-system')) return null
5836
5869
  return (
5837
5870
  <footer className="border-t">
5838
5871
  <div className="mx-auto flex h-14 max-w-7xl items-center justify-between px-4 text-sm text-muted-foreground sm:px-6 lg:px-8">
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.4",
6
+ "version": "0.3.6",
7
7
  "description": "Core design system engine for Coherent",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",