@aiready/components 0.11.13 → 0.11.15
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/components/button.d.ts +2 -2
- package/dist/components/button.js +9 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +4 -1
- package/dist/components/card.js +27 -1
- package/dist/components/card.js.map +1 -1
- package/dist/index.d.ts +129 -8
- package/dist/index.js +1104 -97
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/src/code-block/CodeBlock.tsx +59 -64
- package/src/components/button.tsx +9 -1
- package/src/components/card.tsx +42 -0
- package/src/components/icons.tsx +409 -0
- package/src/components/modal.tsx +96 -0
- package/src/data-display/ScoreCircle.tsx +144 -0
- package/src/data-display/index.ts +2 -7
- package/src/feedback/FeedbackWidget.tsx +121 -0
- package/src/feedback/index.ts +3 -12
- package/src/index.ts +15 -0
- package/src/navigation/Breadcrumb.tsx +26 -52
- package/src/navigation/PlatformShell.tsx +408 -0
- package/src/navigation/index.ts +2 -5
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
7
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "glow" | "glass" | "accent" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon" | "xs" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -9,7 +9,7 @@ function cn(...inputs) {
|
|
|
9
9
|
return twMerge(clsx(inputs));
|
|
10
10
|
}
|
|
11
11
|
var buttonVariants = cva(
|
|
12
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-
|
|
12
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
@@ -18,13 +18,19 @@ var buttonVariants = cva(
|
|
|
18
18
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
19
19
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
20
20
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
+
// Platform specific high-polish variants
|
|
23
|
+
glow: "bg-gradient-to-r from-cyan-600 to-blue-600 text-white shadow-lg shadow-cyan-500/20 hover:shadow-cyan-500/40 hover:scale-[1.02] active:scale-[0.98]",
|
|
24
|
+
glass: "bg-slate-800/50 backdrop-blur-sm border border-slate-700 text-slate-200 hover:bg-slate-700/50 hover:text-white",
|
|
25
|
+
accent: "bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 hover:bg-cyan-500/20"
|
|
22
26
|
},
|
|
23
27
|
size: {
|
|
24
28
|
default: "h-10 px-4 py-2",
|
|
25
29
|
sm: "h-9 rounded-md px-3",
|
|
26
30
|
lg: "h-11 rounded-md px-8",
|
|
27
|
-
icon: "h-10 w-10"
|
|
31
|
+
icon: "h-10 w-10",
|
|
32
|
+
// Extra sizes for dashboard use
|
|
33
|
+
xs: "h-7 rounded-md px-2 text-[10px] font-bold uppercase tracking-wider"
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
36
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/cn.ts","../../src/components/button.tsx"],"names":[],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AE,SAAS,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA;AAAA,QAC1D,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"button.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merges class names using clsx and tailwind-merge\n * @param inputs - Class values to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../utils/cn';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n // Platform specific high-polish variants\n glow: 'bg-gradient-to-r from-cyan-600 to-blue-600 text-white shadow-lg shadow-cyan-500/20 hover:shadow-cyan-500/40 hover:scale-[1.02] active:scale-[0.98]',\n glass:\n 'bg-slate-800/50 backdrop-blur-sm border border-slate-700 text-slate-200 hover:bg-slate-700/50 hover:text-white',\n accent:\n 'bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 hover:bg-cyan-500/20',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-10 w-10',\n // Extra sizes for dashboard use\n xs: 'h-7 rounded-md px-2 text-[10px] font-bold uppercase tracking-wider',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, ...props }, ref) => {\n return (\n <button\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n"]}
|
|
@@ -6,5 +6,8 @@ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HT
|
|
|
6
6
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
7
|
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const GlassCard: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const GlassCardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const GlassCardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
12
|
|
|
10
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
13
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, GlassCard, GlassCardContent, GlassCardHeader };
|
package/dist/components/card.js
CHANGED
|
@@ -60,7 +60,33 @@ var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
60
60
|
}
|
|
61
61
|
));
|
|
62
62
|
CardFooter.displayName = "CardFooter";
|
|
63
|
+
var GlassCard = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: cn(
|
|
68
|
+
"rounded-2xl border border-indigo-500/20 bg-slate-900/40 backdrop-blur-md shadow-xl transition-all hover:border-indigo-500/30",
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
GlassCard.displayName = "GlassCard";
|
|
75
|
+
var GlassCardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
className: cn(
|
|
80
|
+
"flex flex-col space-y-1.5 p-6 border-b border-indigo-500/10",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
GlassCardHeader.displayName = "GlassCardHeader";
|
|
87
|
+
var GlassCardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6", className), ...props }));
|
|
88
|
+
GlassCardContent.displayName = "GlassCardContent";
|
|
63
89
|
|
|
64
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
90
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, GlassCard, GlassCardContent, GlassCardHeader };
|
|
65
91
|
//# sourceMappingURL=card.js.map
|
|
66
92
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/cn.ts","../../src/components/card.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACPA,IAAM,IAAA,GAAa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A,EAAI,GAAG,OAAO,CACjE;AACD,WAAA,CAAY,WAAA,GAAc,aAAA;AAE1B,IAAM,UAAA,GAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,4BAAA,EAA8B,SAAS,CAAA;AAAA,IACpD,GAAG;AAAA;AACN,CACD;AACD,UAAA,CAAW,WAAA,GAAc,YAAA","file":"card.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merges class names using clsx and tailwind-merge\n * @param inputs - Class values to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { cn } from '../utils/cn';\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'rounded-lg border bg-card text-card-foreground shadow-sm',\n className\n )}\n {...props}\n />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col space-y-1.5 p-6', className)}\n {...props}\n />\n));\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n 'text-2xl font-semibold leading-none tracking-tight',\n className\n )}\n {...props}\n />\n));\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n));\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center p-6 pt-0', className)}\n {...props}\n />\n));\nCardFooter.displayName = 'CardFooter';\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/cn.ts","../../src/components/card.tsx"],"names":[],"mappings":";;;;;;AAQO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACPA,IAAM,IAAA,GAAa,iBAGjB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,IAAA,CAAK,WAAA,GAAc,MAAA;AAEnB,IAAM,UAAA,GAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,UAAA,CAAW,WAAA,GAAc,YAAA;AAEzB,IAAM,SAAA,GAAkB,iBAGtB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,E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eAAA,GAAwB,iBAG5B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,6DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAA,CAAgB,WAAA,GAAc,iBAAA;AAE9B,IAAM,mBAAyB,KAAA,CAAA,UAAA,CAG7B,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,EAAG,GAAA,yBACzB,KAAA,EAAA,EAAI,GAAA,EAAU,WAAW,EAAA,CAAG,KAAA,EAAO,SAAS,CAAA,EAAI,GAAG,OAAO,CAC5D;AACD,gBAAA,CAAiB,WAAA,GAAc,kBAAA","file":"card.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merges class names using clsx and tailwind-merge\n * @param inputs - Class values to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { cn } from '../utils/cn';\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'rounded-lg border bg-card text-card-foreground shadow-sm',\n className\n )}\n {...props}\n />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col space-y-1.5 p-6', className)}\n {...props}\n />\n));\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n 'text-2xl font-semibold leading-none tracking-tight',\n className\n )}\n {...props}\n />\n));\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n));\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center p-6 pt-0', className)}\n {...props}\n />\n));\nCardFooter.displayName = 'CardFooter';\n\n// GlassCard - Highly polished platform style\nconst GlassCard = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'rounded-2xl border border-indigo-500/20 bg-slate-900/40 backdrop-blur-md shadow-xl transition-all hover:border-indigo-500/30',\n className\n )}\n {...props}\n />\n));\nGlassCard.displayName = 'GlassCard';\n\nconst GlassCardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex flex-col space-y-1.5 p-6 border-b border-indigo-500/10',\n className\n )}\n {...props}\n />\n));\nGlassCardHeader.displayName = 'GlassCardHeader';\n\nconst GlassCardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6', className)} {...props} />\n));\nGlassCardContent.displayName = 'GlassCardContent';\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n GlassCard,\n GlassCardHeader,\n GlassCardContent,\n};\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { Button, ButtonProps, buttonVariants } from './components/button.js';
|
|
2
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card.js';
|
|
2
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, GlassCard, GlassCardContent, GlassCardHeader } from './components/card.js';
|
|
3
3
|
export { Input, InputProps } from './components/input.js';
|
|
4
4
|
export { Label, LabelProps } from './components/label.js';
|
|
5
5
|
export { Badge, BadgeProps, badgeVariants } from './components/badge.js';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import React__default from 'react';
|
|
6
9
|
export { Container, ContainerProps } from './components/container.js';
|
|
7
10
|
export { Grid, GridProps } from './components/grid.js';
|
|
8
11
|
export { Stack, StackProps } from './components/stack.js';
|
|
@@ -12,8 +15,6 @@ export { RadioGroup, RadioGroupProps, RadioOption } from './components/radio-gro
|
|
|
12
15
|
export { Switch, SwitchProps } from './components/switch.js';
|
|
13
16
|
export { Textarea, TextareaProps } from './components/textarea.js';
|
|
14
17
|
export { Select, SelectOption, SelectProps } from './components/select.js';
|
|
15
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import React__default from 'react';
|
|
17
18
|
export { cn } from './utils/cn.js';
|
|
18
19
|
export { chartColors, domainColors, getDomainColor, getSeverityColor, hexToRgba, severityColors } from './utils/colors.js';
|
|
19
20
|
export { formatCompactNumber, formatDate, formatDateTime, formatDecimal, formatDuration, formatFileSize, formatMetric, formatNumber, formatPercentage, formatRange, formatRelativeTime } from './utils/formatters.js';
|
|
@@ -26,14 +27,80 @@ import 'class-variance-authority';
|
|
|
26
27
|
import 'clsx';
|
|
27
28
|
import 'd3';
|
|
28
29
|
|
|
30
|
+
interface ModalProps {
|
|
31
|
+
isOpen: boolean;
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
maxWidth?: string;
|
|
35
|
+
showClose?: boolean;
|
|
36
|
+
variant?: 'default' | 'glass';
|
|
37
|
+
}
|
|
38
|
+
declare function Modal({ isOpen, onClose, children, maxWidth, showClose, variant, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare function RocketIcon({ className, ...props }: {
|
|
41
|
+
className?: string;
|
|
42
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare function ChartIcon({ className, ...props }: {
|
|
44
|
+
className?: string;
|
|
45
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
46
|
+
declare function TargetIcon({ className, ...props }: {
|
|
47
|
+
className?: string;
|
|
48
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
49
|
+
declare function RobotIcon({ className, ...props }: {
|
|
50
|
+
className?: string;
|
|
51
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
52
|
+
declare function FileIcon({ className, ...props }: {
|
|
53
|
+
className?: string;
|
|
54
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
55
|
+
declare function ShieldIcon({ className, ...props }: {
|
|
56
|
+
className?: string;
|
|
57
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
58
|
+
declare function TrendingUpIcon({ className, ...props }: {
|
|
59
|
+
className?: string;
|
|
60
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function TrashIcon({ className, ...props }: {
|
|
62
|
+
className?: string;
|
|
63
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
64
|
+
declare function PlayIcon({ className, ...props }: {
|
|
65
|
+
className?: string;
|
|
66
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function UploadIcon({ className, ...props }: {
|
|
68
|
+
className?: string;
|
|
69
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
70
|
+
declare function AlertCircleIcon({ className, ...props }: {
|
|
71
|
+
className?: string;
|
|
72
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
73
|
+
declare function InfoIcon({ className, ...props }: {
|
|
74
|
+
className?: string;
|
|
75
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
76
|
+
declare function BrainIcon({ className, ...props }: {
|
|
77
|
+
className?: string;
|
|
78
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare function TerminalIcon({ className, ...props }: {
|
|
80
|
+
className?: string;
|
|
81
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare function CommandLineIcon(props: {
|
|
83
|
+
className?: string;
|
|
84
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
85
|
+
declare function SettingsIcon({ className, ...props }: {
|
|
86
|
+
className?: string;
|
|
87
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
88
|
+
declare function SaveIcon({ className, ...props }: {
|
|
89
|
+
className?: string;
|
|
90
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function RefreshCwIcon({ className, ...props }: {
|
|
92
|
+
className?: string;
|
|
93
|
+
} & React__default.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
94
|
+
|
|
29
95
|
interface CodeBlockProps {
|
|
30
96
|
children: React__default.ReactNode;
|
|
31
97
|
language?: string;
|
|
32
98
|
showCopy?: boolean;
|
|
33
99
|
showHeader?: boolean;
|
|
34
100
|
className?: string;
|
|
101
|
+
variant?: 'default' | 'glass';
|
|
35
102
|
}
|
|
36
|
-
declare function CodeBlock({ children, language, showCopy, showHeader, className, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
103
|
+
declare function CodeBlock({ children, language, showCopy, showHeader, className, variant, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
37
104
|
declare function InlineCode({ children, className, }: {
|
|
38
105
|
children: React__default.ReactNode;
|
|
39
106
|
className?: string;
|
|
@@ -41,14 +108,48 @@ declare function InlineCode({ children, className, }: {
|
|
|
41
108
|
|
|
42
109
|
interface BreadcrumbItem {
|
|
43
110
|
label: string;
|
|
44
|
-
href
|
|
111
|
+
href: string;
|
|
45
112
|
}
|
|
46
113
|
interface BreadcrumbProps {
|
|
47
114
|
items: BreadcrumbItem[];
|
|
48
|
-
separator?: React__default.ReactNode;
|
|
49
115
|
className?: string;
|
|
50
116
|
}
|
|
51
|
-
declare function Breadcrumb({ items,
|
|
117
|
+
declare function Breadcrumb({ items, className }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
|
|
119
|
+
interface NavItem {
|
|
120
|
+
href: string;
|
|
121
|
+
label: string;
|
|
122
|
+
icon: React__default.ElementType;
|
|
123
|
+
}
|
|
124
|
+
interface User {
|
|
125
|
+
id: string;
|
|
126
|
+
name?: string | null;
|
|
127
|
+
email?: string | null;
|
|
128
|
+
image?: string | null;
|
|
129
|
+
}
|
|
130
|
+
interface Team {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
}
|
|
134
|
+
interface TeamMember {
|
|
135
|
+
teamId: string;
|
|
136
|
+
team: Team;
|
|
137
|
+
}
|
|
138
|
+
interface PlatformShellProps {
|
|
139
|
+
children: React__default.ReactNode;
|
|
140
|
+
user: User | null;
|
|
141
|
+
teams?: TeamMember[];
|
|
142
|
+
overallScore?: number | null;
|
|
143
|
+
activePage?: string;
|
|
144
|
+
pathname?: string;
|
|
145
|
+
onNavigate?: (href: string) => void;
|
|
146
|
+
onSignOut?: () => void;
|
|
147
|
+
onSwitchTeam?: (teamId: string | 'personal') => void;
|
|
148
|
+
logoUrl?: string;
|
|
149
|
+
navItems?: NavItem[];
|
|
150
|
+
LinkComponent?: React__default.ElementType;
|
|
151
|
+
}
|
|
152
|
+
declare function PlatformShell({ children, user, teams, overallScore, activePage, pathname, onNavigate, onSignOut, onSwitchTeam, logoUrl, navItems, LinkComponent, }: PlatformShellProps): react_jsx_runtime.JSX.Element;
|
|
52
153
|
|
|
53
154
|
type ScoreRating = 'excellent' | 'good' | 'fair' | 'needs-work' | 'critical';
|
|
54
155
|
interface ScoreBarProps {
|
|
@@ -72,6 +173,16 @@ interface ScoreCardProps {
|
|
|
72
173
|
}
|
|
73
174
|
declare function ScoreCard({ score, title, breakdown, className, }: ScoreCardProps): react_jsx_runtime.JSX.Element;
|
|
74
175
|
|
|
176
|
+
interface ScoreCircleProps {
|
|
177
|
+
score: number;
|
|
178
|
+
progress?: number;
|
|
179
|
+
isInView?: boolean;
|
|
180
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
181
|
+
showLabel?: boolean;
|
|
182
|
+
className?: string;
|
|
183
|
+
}
|
|
184
|
+
declare function ScoreCircle({ score, progress: customProgress, isInView, size, showLabel, className, }: ScoreCircleProps): react_jsx_runtime.JSX.Element;
|
|
185
|
+
|
|
75
186
|
interface LoadingSpinnerProps {
|
|
76
187
|
size?: 'sm' | 'md' | 'lg';
|
|
77
188
|
className?: string;
|
|
@@ -100,6 +211,16 @@ interface EmptyStateProps {
|
|
|
100
211
|
}
|
|
101
212
|
declare function EmptyState({ title, description, icon, action, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
102
213
|
|
|
214
|
+
interface FeedbackWidgetProps {
|
|
215
|
+
apiEndpoint?: string;
|
|
216
|
+
onSuccess?: (message: string) => void;
|
|
217
|
+
onError?: (error: any) => void;
|
|
218
|
+
title?: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
className?: string;
|
|
221
|
+
}
|
|
222
|
+
declare function FeedbackWidget({ apiEndpoint, onSuccess, onError, title, description, className, }: FeedbackWidgetProps): react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
103
224
|
type Theme = 'dark' | 'light' | 'system';
|
|
104
225
|
type EffectiveTheme = 'dark' | 'light';
|
|
105
226
|
interface ThemeContextValue {
|
|
@@ -138,4 +259,4 @@ interface GraphControlsProps {
|
|
|
138
259
|
}
|
|
139
260
|
declare const GraphControls: React__default.FC<GraphControlsProps>;
|
|
140
261
|
|
|
141
|
-
export { Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, CodeBlock, type CodeBlockProps, type EffectiveTheme, EmptyState, type EmptyStateProps, ErrorDisplay, type ErrorDisplayProps, GraphControls, type GraphControlsProps, InlineCode, LoadingOverlay, type LoadingOverlayProps, LoadingSpinner, type LoadingSpinnerProps, ScoreBar, type ScoreBarProps, ScoreCard, type ScoreCardProps, type ScoreRating, type Theme, ThemeProvider, getScoreRating, scoreBg, scoreColor, scoreGlow, scoreLabel, useTheme };
|
|
262
|
+
export { AlertCircleIcon, BrainIcon, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, ChartIcon, CodeBlock, type CodeBlockProps, CommandLineIcon, type EffectiveTheme, EmptyState, type EmptyStateProps, ErrorDisplay, type ErrorDisplayProps, FeedbackWidget, type FeedbackWidgetProps, FileIcon, GraphControls, type GraphControlsProps, InfoIcon, InlineCode, LoadingOverlay, type LoadingOverlayProps, LoadingSpinner, type LoadingSpinnerProps, Modal, type ModalProps, type NavItem, PlatformShell, type PlatformShellProps, PlayIcon, RefreshCwIcon, RobotIcon, RocketIcon, SaveIcon, ScoreBar, type ScoreBarProps, ScoreCard, type ScoreCardProps, ScoreCircle, type ScoreCircleProps, type ScoreRating, SettingsIcon, ShieldIcon, TargetIcon, type Team, type TeamMember, TerminalIcon, type Theme, ThemeProvider, TrashIcon, TrendingUpIcon, UploadIcon, type User, getScoreRating, scoreBg, scoreColor, scoreGlow, scoreLabel, useTheme };
|