Skip to content

Commit b056ac0

Browse files
Merge pull request #244 from creativetimofficial/local-feat
Local feat
2 parents e6c1a9c + 8cd6320 commit b056ac0

File tree

202 files changed

+3725
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+3725
-919
lines changed

apps/www/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "@creative-tim/ui-documentation",
2+
"name": "@creative-tim/ui",
33
"version": "0.1.0",
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "next dev --turbopack -p 5001 -H 0.0.0.0",
7+
"dev": "next dev -p 5001 -H 0.0.0.0",
88
"build": "next build",
99
"start": "next start -p 5001 -H 0.0.0.0",
1010
"lint": "next lint",
@@ -24,11 +24,12 @@
2424
"@dnd-kit/utilities": "^3.2.2",
2525
"@faker-js/faker": "^8.2.0",
2626
"@hookform/resolvers": "^3.10.0",
27+
"@paddle/paddle-js": "^1.4.2",
2728
"@radix-ui/react-accessible-icon": "^1.1.1",
2829
"@radix-ui/react-accordion": "^1.2.2",
2930
"@radix-ui/react-alert-dialog": "^1.1.5",
3031
"@radix-ui/react-aspect-ratio": "^1.1.1",
31-
"@radix-ui/react-avatar": "^1.1.10",
32+
"@radix-ui/react-avatar": "^1.1.2",
3233
"@radix-ui/react-checkbox": "^1.1.3",
3334
"@radix-ui/react-collapsible": "^1.1.2",
3435
"@radix-ui/react-context-menu": "^2.2.5",
@@ -79,6 +80,7 @@
7980
"little-date": "^1.0.0",
8081
"lodash": "^4.17.21",
8182
"lucide-react": "0.474.0",
83+
"maplibre-gl": "^5.15.0",
8284
"motion": "^12.12.1",
8385
"next": "15.3.6",
8486
"next-themes": "0.4.6",
@@ -95,7 +97,7 @@
9597
"shiki": "^3.13.0",
9698
"sonner": "^2.0.0",
9799
"streamdown": "^1.3.0",
98-
"swiper": "^12.0.2",
100+
"swiper": "^12.0.3",
99101
"tailwind-merge": "^3.0.1",
100102
"three": "^0.180.0",
101103
"ts-morph": "18.0.0",
@@ -106,8 +108,12 @@
106108
"devDependencies": {
107109
"@eslint/eslintrc": "^3",
108110
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
111+
"@react-oauth/google": "0.12.2",
109112
"@tailwindcss/postcss": "^4",
113+
"@tanstack/react-query": "5.90.5",
114+
"@types/google.accounts": "^0.0.18",
110115
"@types/lodash": "^4.17.7",
116+
"@types/maplibre-gl": "^1.14.0",
111117
"@types/mdx": "^2.0.13",
112118
"@types/node": "^20",
113119
"@types/react": "19.1.2",

apps/www/public/r/accordion.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
33
"name": "accordion",
4-
"type": "registry:ui",
54
"dependencies": [
65
"@radix-ui/react-accordion"
76
],
87
"files": [
98
{
10-
"path": "registry/creative-tim/ui/accordion.tsx",
9+
"path": "components/ui/accordion.tsx",
1110
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Accordion({\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />\n}\n\nfunction AccordionItem({\n className,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-b last:border-b-0\", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn(\"pt-0 pb-4\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
1211
"type": "registry:ui"
1312
}
14-
]
13+
],
14+
"type": "registry:ui"
1515
}

apps/www/public/r/account-2fa-01.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
33
"name": "account-2fa-01",
4-
"type": "registry:block",
54
"description": "Two-factor authentication setup",
65
"registryDependencies": [
76
"button",
@@ -12,7 +11,7 @@
1211
],
1312
"files": [
1413
{
15-
"path": "registry/creative-tim/blocks/account-2fa-01/page.tsx",
14+
"path": "creative-tim/blocks/account-2fa-01/page.tsx",
1615
"content": "\"use client\"\n\nimport {\n AlertCircle,\n CheckCircle2,\n KeyRound,\n MessageSquare,\n Shield,\n Smartphone,\n} from \"lucide-react\"\n\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport { Card } from \"@/components/ui/card\"\n\nconst TwoFactorMethods = [\n {\n title: \"Security Keys\",\n description:\n \"Physical security keys provide the highest level of protection by requiring a hardware device for authentication.\",\n value: \"No security keys configured\",\n action: \"Add\",\n icon: KeyRound,\n isConfigured: false,\n recommended: true,\n },\n {\n title: \"Authenticator App\",\n description:\n \"Generate time-based one-time passwords (TOTP) using apps like Google Authenticator or Authy.\",\n value: \"Not configured\",\n action: \"Setup\",\n icon: Smartphone,\n isConfigured: false,\n recommended: true,\n },\n {\n title: \"SMS Number\",\n description:\n \"Receive verification codes via text message to your registered mobile number.\",\n value: \"+1 (555) 123-4567\",\n action: \"Edit\",\n icon: MessageSquare,\n isConfigured: true,\n recommended: false,\n },\n]\n\nexport default function Account2FA01() {\n return (\n <div className=\"mx-auto max-w-5xl p-6\">\n <Card className=\"bg-card border p-8\">\n <div className=\"flex flex-wrap items-start justify-between gap-4 border-b pb-6\">\n <div className=\"flex items-center gap-3\">\n <div className=\"bg-primary/10 flex h-12 w-12 items-center justify-center rounded-lg\">\n <Shield className=\"text-primary h-6 w-6\" />\n </div>\n <div>\n <h2 className=\"text-2xl font-semibold tracking-tight\">\n Two-Factor Authentication\n </h2>\n <p className=\"text-muted-foreground mt-1 text-sm\">\n Add an extra layer of security to your account\n </p>\n </div>\n </div>\n <Badge\n variant=\"outline\"\n className=\"border-green-500 bg-green-50 text-green-700\"\n >\n <CheckCircle2 className=\"mr-1 h-3 w-3\" />\n Enabled\n </Badge>\n </div>\n\n <div className=\"space-y-0\">\n {TwoFactorMethods.map((method, index) => {\n const Icon = method.icon\n return (\n <div\n key={method.title}\n className={`group flex flex-wrap items-center justify-between gap-6 py-6 ${\n index !== TwoFactorMethods.length - 1\n ? \"border-border border-b\"\n : \"\"\n }`}\n >\n <div className=\"flex items-start gap-4\">\n <div\n className={`bg-muted flex h-12 w-12 shrink-0 items-center justify-center rounded-lg ${method.isConfigured ? \"bg-primary/10\" : \"\"}`}\n >\n <Icon\n className={`h-6 w-6 ${method.isConfigured ? \"text-primary\" : \"text-muted-foreground\"}`}\n />\n </div>\n <div className=\"flex-1 space-y-2\">\n <div className=\"flex items-center gap-2\">\n <p className=\"font-semibold\">{method.title}</p>\n {method.recommended && (\n <span className=\"text-primary border-primary bg-primary/10 rounded-full border px-2 py-0.5 text-xs font-medium\">\n Recommended\n </span>\n )}\n </div>\n <p className=\"text-muted-foreground text-sm\">\n {method.description}\n </p>\n <p\n className={`text-sm ${\n method.isConfigured\n ? \"font-semibold\"\n : \"text-muted-foreground\"\n }`}\n >\n {method.isConfigured && (\n <CheckCircle2 className=\"mr-1 inline h-4 w-4 text-green-500\" />\n )}\n {method.value}\n </p>\n </div>\n </div>\n <Button\n size=\"sm\"\n variant={method.isConfigured ? \"outline\" : \"default\"}\n >\n {method.action}\n </Button>\n </div>\n )\n })}\n </div>\n\n <div className=\"mt-8 space-y-4\">\n <div className=\"bg-muted/50 flex items-start gap-3 rounded-lg border p-4\">\n <AlertCircle className=\"mt-0.5 h-5 w-5 text-blue-500\" />\n <div>\n <h4 className=\"mb-1 text-sm font-medium\">Recovery Codes</h4>\n <p className=\"text-muted-foreground text-sm\">\n Generate backup codes that can be used if you lose access to\n your 2FA methods. Store them securely in a safe place.\n </p>\n <Button variant=\"link\" className=\"mt-2 h-auto p-0 text-sm\">\n Generate Recovery Codes →\n </Button>\n </div>\n </div>\n\n <div className=\"flex justify-end gap-3 border-t pt-6\">\n <Button variant=\"outline\">View Activity Log</Button>\n <Button>Save Settings</Button>\n </div>\n </div>\n </Card>\n </div>\n )\n}\n",
1716
"type": "registry:page",
1817
"target": "app/account-2fa/page.tsx"
@@ -26,5 +25,6 @@
2625
},
2726
"categories": [
2827
"account"
29-
]
28+
],
29+
"type": "registry:block"
3030
}

apps/www/public/r/account-avatar-upload-01.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
33
"name": "account-avatar-upload-01",
4-
"type": "registry:block",
54
"description": "Profile avatar upload and management",
65
"registryDependencies": [
76
"button",
87
"card"
98
],
109
"files": [
1110
{
12-
"path": "registry/creative-tim/blocks/account-avatar-upload-01/page.tsx",
11+
"path": "creative-tim/blocks/account-avatar-upload-01/page.tsx",
1312
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n CheckCircle2,\n Pencil,\n Trash2,\n Upload,\n User,\n XCircle,\n} from \"lucide-react\"\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport { Card } from \"@/components/ui/card\"\nimport { Label } from \"@/components/ui/label\"\nimport { Switch } from \"@/components/ui/switch\"\n\nexport default function AccountAvatarUpload01() {\n const [status, setStatus] = React.useState(\"Online\")\n const [avatarPreview, setAvatarPreview] = React.useState<string | null>(null)\n\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0]\n if (file) {\n const reader = new FileReader()\n reader.onloadend = () => {\n setAvatarPreview(reader.result as string)\n }\n reader.readAsDataURL(file)\n }\n }\n\n const handleRemoveAvatar = () => {\n setAvatarPreview(null)\n }\n\n return (\n <div className=\"mx-auto max-w-5xl p-6\">\n <Card className=\"bg-card border p-8\">\n <div className=\"border-b pb-6\">\n <div className=\"flex items-center gap-3\">\n <div className=\"bg-primary/10 flex h-12 w-12 items-center justify-center rounded-lg\">\n <User className=\"text-primary h-6 w-6\" />\n </div>\n <div>\n <h2 className=\"text-2xl font-semibold tracking-tight\">\n Profile Picture\n </h2>\n <p className=\"text-muted-foreground mt-1 text-sm\">\n Update your profile picture and personal information\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center justify-between gap-6\">\n <div className=\"flex items-center gap-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"relative\">\n <Avatar className=\"border-border h-16 w-16 border-2\">\n <AvatarImage\n src={\n avatarPreview ||\n \"https://images.unsplash.com/photo-1623853434105-8e7a72898180?auto=format&fit=crop&q=80&w=400&h=400\"\n }\n alt=\"Profile Picture\"\n className=\"object-cover\"\n />\n <AvatarFallback className=\"bg-muted-foreground/10 text-muted-foreground\">\n <User className=\"h-8 w-8\" />\n </AvatarFallback>\n </Avatar>\n <label\n htmlFor=\"avatar-upload\"\n className=\"absolute right-0 bottom-0 cursor-pointer\"\n >\n <div className=\"bg-primary/10 text-primary hover:bg-primary/20 border-border rounded-full border p-1.5\">\n <Pencil className=\"h-3.5 w-3.5\" />\n </div>\n <input\n type=\"file\"\n id=\"avatar-upload\"\n accept=\"image/png,image/jpeg,image/svg+xml\"\n className=\"hidden\"\n onChange={handleFileUpload}\n />\n </label>\n </div>\n\n <div className=\"space-y-1\">\n <h3 className=\"font-semibold\">Select and Upload Image</h3>\n <p className=\"text-muted-foreground text-sm\">\n .svg, .png, .jpg (size 400x400px)\n </p>\n </div>\n </div>\n\n <div className=\"flex items-center gap-3\">\n <Button>\n <Upload className=\"mr-2 h-4 w-4\" />\n Upload Avatar\n </Button>\n {avatarPreview && (\n <Button variant=\"destructive\" onClick={handleRemoveAvatar}>\n <Trash2 className=\"mr-2 h-4 w-4\" />\n Remove\n </Button>\n )}\n </div>\n </div>\n\n <div className=\"flex flex-col\">\n <Label className=\"mb-3 flex items-center gap-2\">\n <CheckCircle2 className=\"text-muted-foreground h-4 w-4\" />\n Availability Status\n </Label>\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"status\"\n checked={status === \"Online\"}\n onCheckedChange={() =>\n setStatus((cur) => (cur === \"Online\" ? \"Offline\" : \"Online\"))\n }\n />\n <Label\n htmlFor=\"status\"\n className=\"flex cursor-pointer items-center gap-2\"\n >\n {status === \"Online\" ? (\n <CheckCircle2 className=\"h-4 w-4 text-green-500\" />\n ) : (\n <XCircle className=\"text-muted-foreground h-4 w-4\" />\n )}\n {status}\n </Label>\n </div>\n </div>\n </div>\n\n <div className=\"bg-muted/50 mt-6 rounded-lg border p-4\">\n <div className=\"flex items-start gap-3\">\n <CheckCircle2 className=\"mt-0.5 h-5 w-5 text-blue-500\" />\n <div>\n <h4 className=\"mb-1 text-sm font-medium\">Profile Picture Tips</h4>\n <p className=\"text-muted-foreground text-sm\">\n Choose a high-quality, professional image that clearly shows\n your face. Recommended image size is 400x400 pixels. Only .svg,\n .png, and .jpg formats are supported.\n </p>\n </div>\n </div>\n </div>\n </Card>\n </div>\n )\n}\n",
1413
"type": "registry:page",
1514
"target": "app/account-avatar-upload/page.tsx"
@@ -22,5 +21,6 @@
2221
},
2322
"categories": [
2423
"account"
25-
]
24+
],
25+
"type": "registry:block"
2626
}

0 commit comments

Comments
 (0)