@getcoherent/core 0.5.6 → 0.5.8
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 +1 -0
- package/dist/index.js +78 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1975,7 +1975,8 @@ var ComponentGenerator = class {
|
|
|
1975
1975
|
"alert-dialog": () => this.generateFullAlertDialog(),
|
|
1976
1976
|
"dropdown-menu": () => this.generateFullDropdownMenu(),
|
|
1977
1977
|
accordion: () => this.generateFullAccordion(),
|
|
1978
|
-
progress: () => this.generateProgress()
|
|
1978
|
+
progress: () => this.generateProgress(),
|
|
1979
|
+
alert: () => this.generateFullAlert()
|
|
1979
1980
|
};
|
|
1980
1981
|
return map[id] ?? null;
|
|
1981
1982
|
}
|
|
@@ -2836,6 +2837,67 @@ export const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
|
|
|
2836
2837
|
),
|
|
2837
2838
|
)
|
|
2838
2839
|
Progress.displayName = 'Progress'
|
|
2840
|
+
`;
|
|
2841
|
+
}
|
|
2842
|
+
generateFullAlert() {
|
|
2843
|
+
return `import * as React from 'react'
|
|
2844
|
+
import { cn } from '@/lib/utils'
|
|
2845
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2846
|
+
|
|
2847
|
+
const alertVariants = cva(
|
|
2848
|
+
'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',
|
|
2849
|
+
{
|
|
2850
|
+
variants: {
|
|
2851
|
+
variant: {
|
|
2852
|
+
default: 'bg-background text-foreground',
|
|
2853
|
+
destructive:
|
|
2854
|
+
'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
2855
|
+
},
|
|
2856
|
+
},
|
|
2857
|
+
defaultVariants: {
|
|
2858
|
+
variant: 'default',
|
|
2859
|
+
},
|
|
2860
|
+
}
|
|
2861
|
+
)
|
|
2862
|
+
|
|
2863
|
+
const Alert = React.forwardRef<
|
|
2864
|
+
HTMLDivElement,
|
|
2865
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
2866
|
+
>(({ className, variant, ...props }, ref) => (
|
|
2867
|
+
<div
|
|
2868
|
+
ref={ref}
|
|
2869
|
+
role="alert"
|
|
2870
|
+
className={cn(alertVariants({ variant }), className)}
|
|
2871
|
+
{...props}
|
|
2872
|
+
/>
|
|
2873
|
+
))
|
|
2874
|
+
Alert.displayName = 'Alert'
|
|
2875
|
+
|
|
2876
|
+
const AlertTitle = React.forwardRef<
|
|
2877
|
+
HTMLParagraphElement,
|
|
2878
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
2879
|
+
>(({ className, ...props }, ref) => (
|
|
2880
|
+
<h5
|
|
2881
|
+
ref={ref as React.Ref<HTMLHeadingElement>}
|
|
2882
|
+
className={cn('mb-1 font-medium leading-none tracking-tight', className)}
|
|
2883
|
+
{...props}
|
|
2884
|
+
/>
|
|
2885
|
+
))
|
|
2886
|
+
AlertTitle.displayName = 'AlertTitle'
|
|
2887
|
+
|
|
2888
|
+
const AlertDescription = React.forwardRef<
|
|
2889
|
+
HTMLParagraphElement,
|
|
2890
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
2891
|
+
>(({ className, ...props }, ref) => (
|
|
2892
|
+
<div
|
|
2893
|
+
ref={ref as React.Ref<HTMLDivElement>}
|
|
2894
|
+
className={cn('text-sm [&_p]:leading-relaxed', className)}
|
|
2895
|
+
{...props}
|
|
2896
|
+
/>
|
|
2897
|
+
))
|
|
2898
|
+
AlertDescription.displayName = 'AlertDescription'
|
|
2899
|
+
|
|
2900
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants }
|
|
2839
2901
|
`;
|
|
2840
2902
|
}
|
|
2841
2903
|
generateCheckbox() {
|
|
@@ -6135,10 +6197,17 @@ export function Header() {
|
|
|
6135
6197
|
(item) => ` <Link href="${item.route}" className="text-sm text-muted-foreground hover:text-foreground transition-colors">${item.label}</Link>`
|
|
6136
6198
|
).join("\n");
|
|
6137
6199
|
const hasMarketingLinks = marketingLinks.length > 0;
|
|
6138
|
-
const companyColumn = hasMarketingLinks ? `
|
|
6139
|
-
|
|
6200
|
+
const companyColumn = hasMarketingLinks ? ` <div className="flex flex-col space-y-3">
|
|
6201
|
+
<p className="text-sm font-medium text-foreground">Company</p>
|
|
6140
6202
|
${marketingLinkElements}
|
|
6141
|
-
|
|
6203
|
+
</div>` : "";
|
|
6204
|
+
const hasProductLinks = appLinks.length > 0;
|
|
6205
|
+
const colCount = 1 + (hasProductLinks ? 1 : 0) + (hasMarketingLinks ? 1 : 0);
|
|
6206
|
+
const mdGridCols = `md:grid-cols-${colCount}`;
|
|
6207
|
+
const productColumn = hasProductLinks ? ` <div className="flex flex-col space-y-3">
|
|
6208
|
+
<p className="text-sm font-medium text-foreground">Product</p>
|
|
6209
|
+
${linkElements}
|
|
6210
|
+
</div>` : "";
|
|
6142
6211
|
return `'use client'
|
|
6143
6212
|
|
|
6144
6213
|
import Link from 'next/link'
|
|
@@ -6150,8 +6219,8 @@ export function Footer() {
|
|
|
6150
6219
|
return (
|
|
6151
6220
|
<footer className="border-t bg-muted/30">
|
|
6152
6221
|
<div className="mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8">
|
|
6153
|
-
<div className="grid grid-cols-
|
|
6154
|
-
<div
|
|
6222
|
+
<div className="grid grid-cols-1 gap-8 py-10 ${mdGridCols}">
|
|
6223
|
+
<div>
|
|
6155
6224
|
<Link href="/" className="text-sm font-semibold text-foreground hover:text-foreground/90 transition-colors">
|
|
6156
6225
|
${appName}
|
|
6157
6226
|
</Link>
|
|
@@ -6159,10 +6228,7 @@ export function Footer() {
|
|
|
6159
6228
|
Modern project management for teams of all sizes.
|
|
6160
6229
|
</p>
|
|
6161
6230
|
</div>
|
|
6162
|
-
|
|
6163
|
-
<p className="text-sm font-medium text-foreground">Product</p>
|
|
6164
|
-
${linkElements}
|
|
6165
|
-
</div>
|
|
6231
|
+
${productColumn}
|
|
6166
6232
|
${companyColumn}
|
|
6167
6233
|
</div>
|
|
6168
6234
|
<div className="flex items-center justify-between border-t py-6 text-xs text-muted-foreground">
|
|
@@ -7781,8 +7847,8 @@ var D = {
|
|
|
7781
7847
|
formContainer: "w-full max-w-sm",
|
|
7782
7848
|
card: "bg-card border border-border/15 rounded-xl hover:border-border/30 transition-colors",
|
|
7783
7849
|
cardDark: "bg-zinc-900/50 border border-border/10 rounded-xl backdrop-blur-sm hover:border-border/30 transition-colors",
|
|
7784
|
-
icon: "size-4 text-muted-foreground",
|
|
7785
|
-
featureIcon: "h-5 w-5 text-primary",
|
|
7850
|
+
icon: "size-4 shrink-0 text-muted-foreground",
|
|
7851
|
+
featureIcon: "h-5 w-5 shrink-0 text-primary",
|
|
7786
7852
|
featureIconWrap: "flex items-center justify-center rounded-lg bg-primary/10 p-2.5",
|
|
7787
7853
|
statHeader: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
7788
7854
|
listItem: "flex items-center justify-between py-3 border-b last:border-0",
|