@turtleclub/ui 0.0.1

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.
Files changed (50) hide show
  1. package/.turbo/turbo-build.log +15 -0
  2. package/.turbo/turbo-type-check.log +360 -0
  3. package/README.md +3 -0
  4. package/components.json +21 -0
  5. package/dist/index.cjs +2 -0
  6. package/dist/index.cjs.map +1 -0
  7. package/dist/index.js +1672 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/styles.css +1 -0
  10. package/package.json +66 -0
  11. package/src/components/molecules/index.ts +7 -0
  12. package/src/components/molecules/opportunity-details.tsx +145 -0
  13. package/src/components/molecules/opportunity-item.tsx +63 -0
  14. package/src/components/molecules/route-details.tsx +87 -0
  15. package/src/components/molecules/swap-details.tsx +95 -0
  16. package/src/components/molecules/swap-input.tsx +115 -0
  17. package/src/components/molecules/token-selector.tsx +72 -0
  18. package/src/components/molecules/tx-status.tsx +254 -0
  19. package/src/components/ui/button.tsx +65 -0
  20. package/src/components/ui/card.tsx +101 -0
  21. package/src/components/ui/chip.tsx +48 -0
  22. package/src/components/ui/icon-animation.tsx +82 -0
  23. package/src/components/ui/index.ts +18 -0
  24. package/src/components/ui/info-card.tsx +128 -0
  25. package/src/components/ui/input.tsx +78 -0
  26. package/src/components/ui/label-with-icon.tsx +112 -0
  27. package/src/components/ui/label.tsx +22 -0
  28. package/src/components/ui/navigation-bar.tsx +135 -0
  29. package/src/components/ui/opportunity-details-v1.tsx +90 -0
  30. package/src/components/ui/scroll-area.tsx +56 -0
  31. package/src/components/ui/select.tsx +180 -0
  32. package/src/components/ui/separator.tsx +26 -0
  33. package/src/components/ui/sonner.tsx +23 -0
  34. package/src/components/ui/switch.tsx +29 -0
  35. package/src/components/ui/toggle-group.tsx +71 -0
  36. package/src/components/ui/toggle.tsx +47 -0
  37. package/src/components/ui/tooltip.tsx +59 -0
  38. package/src/index.ts +9 -0
  39. package/src/lib/utils.ts +6 -0
  40. package/src/styles/globals.css +75 -0
  41. package/src/styles/themes/index.css +9 -0
  42. package/src/styles/themes/semantic.css +107 -0
  43. package/src/styles/tokens/colors.css +77 -0
  44. package/src/styles/tokens/index.css +15 -0
  45. package/src/styles/tokens/radius.css +46 -0
  46. package/src/styles/tokens/spacing.css +52 -0
  47. package/src/styles/tokens/typography.css +86 -0
  48. package/src/tokens/index.ts +108 -0
  49. package/tsconfig.json +21 -0
  50. package/vite.config.js +65 -0
@@ -0,0 +1,26 @@
1
+ import * as React from "react"
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
+ return (
13
+ <SeparatorPrimitive.Root
14
+ data-slot="separator"
15
+ decorative={decorative}
16
+ orientation={orientation}
17
+ className={cn(
18
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
+ className
20
+ )}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ export { Separator }
@@ -0,0 +1,23 @@
1
+ import { useTheme } from "next-themes"
2
+ import { Toaster as Sonner, ToasterProps } from "sonner"
3
+
4
+ const Toaster = ({ ...props }: ToasterProps) => {
5
+ const { theme = "system" } = useTheme()
6
+
7
+ return (
8
+ <Sonner
9
+ theme={theme as ToasterProps["theme"]}
10
+ className="toaster group"
11
+ style={
12
+ {
13
+ "--normal-bg": "var(--popover)",
14
+ "--normal-text": "var(--popover-foreground)",
15
+ "--normal-border": "var(--border)",
16
+ } as React.CSSProperties
17
+ }
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+
23
+ export { Toaster }
@@ -0,0 +1,29 @@
1
+ import * as React from "react"
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Switch({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
10
+ return (
11
+ <SwitchPrimitive.Root
12
+ data-slot="switch"
13
+ className={cn(
14
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
+ className
16
+ )}
17
+ {...props}
18
+ >
19
+ <SwitchPrimitive.Thumb
20
+ data-slot="switch-thumb"
21
+ className={cn(
22
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
23
+ )}
24
+ />
25
+ </SwitchPrimitive.Root>
26
+ )
27
+ }
28
+
29
+ export { Switch }
@@ -0,0 +1,71 @@
1
+ import * as React from "react"
2
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
3
+ import { type VariantProps } from "class-variance-authority"
4
+
5
+ import { cn } from "@/lib/utils"
6
+ import { toggleVariants } from "@/components/ui/toggle"
7
+
8
+ const ToggleGroupContext = React.createContext<
9
+ VariantProps<typeof toggleVariants>
10
+ >({
11
+ size: "default",
12
+ variant: "default",
13
+ })
14
+
15
+ function ToggleGroup({
16
+ className,
17
+ variant,
18
+ size,
19
+ children,
20
+ ...props
21
+ }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
22
+ VariantProps<typeof toggleVariants>) {
23
+ return (
24
+ <ToggleGroupPrimitive.Root
25
+ data-slot="toggle-group"
26
+ data-variant={variant}
27
+ data-size={size}
28
+ className={cn(
29
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
30
+ className
31
+ )}
32
+ {...props}
33
+ >
34
+ <ToggleGroupContext.Provider value={{ variant, size }}>
35
+ {children}
36
+ </ToggleGroupContext.Provider>
37
+ </ToggleGroupPrimitive.Root>
38
+ )
39
+ }
40
+
41
+ function ToggleGroupItem({
42
+ className,
43
+ children,
44
+ variant,
45
+ size,
46
+ ...props
47
+ }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
48
+ VariantProps<typeof toggleVariants>) {
49
+ const context = React.useContext(ToggleGroupContext)
50
+
51
+ return (
52
+ <ToggleGroupPrimitive.Item
53
+ data-slot="toggle-group-item"
54
+ data-variant={context.variant || variant}
55
+ data-size={context.size || size}
56
+ className={cn(
57
+ toggleVariants({
58
+ variant: context.variant || variant,
59
+ size: context.size || size,
60
+ }),
61
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
62
+ className
63
+ )}
64
+ {...props}
65
+ >
66
+ {children}
67
+ </ToggleGroupPrimitive.Item>
68
+ )
69
+ }
70
+
71
+ export { ToggleGroup, ToggleGroupItem }
@@ -0,0 +1,47 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as TogglePrimitive from "@radix-ui/react-toggle"
5
+ import { cva, type VariantProps } from "class-variance-authority"
6
+
7
+ import { cn } from "@/lib/utils"
8
+
9
+ const toggleVariants = cva(
10
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
11
+ {
12
+ variants: {
13
+ variant: {
14
+ default: "bg-transparent",
15
+ outline:
16
+ "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
17
+ },
18
+ size: {
19
+ default: "h-9 px-2 min-w-9",
20
+ sm: "h-8 px-1.5 min-w-8",
21
+ lg: "h-10 px-2.5 min-w-10",
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ variant: "default",
26
+ size: "default",
27
+ },
28
+ }
29
+ )
30
+
31
+ function Toggle({
32
+ className,
33
+ variant,
34
+ size,
35
+ ...props
36
+ }: React.ComponentProps<typeof TogglePrimitive.Root> &
37
+ VariantProps<typeof toggleVariants>) {
38
+ return (
39
+ <TogglePrimitive.Root
40
+ data-slot="toggle"
41
+ className={cn(toggleVariants({ variant, size, className }))}
42
+ {...props}
43
+ />
44
+ )
45
+ }
46
+
47
+ export { Toggle, toggleVariants }
@@ -0,0 +1,59 @@
1
+ import * as React from "react"
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function TooltipProvider({
7
+ delayDuration = 0,
8
+ ...props
9
+ }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
10
+ return (
11
+ <TooltipPrimitive.Provider
12
+ data-slot="tooltip-provider"
13
+ delayDuration={delayDuration}
14
+ {...props}
15
+ />
16
+ )
17
+ }
18
+
19
+ function Tooltip({
20
+ ...props
21
+ }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
22
+ return (
23
+ <TooltipProvider>
24
+ <TooltipPrimitive.Root data-slot="tooltip" {...props} />
25
+ </TooltipProvider>
26
+ )
27
+ }
28
+
29
+ function TooltipTrigger({
30
+ ...props
31
+ }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
32
+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
33
+ }
34
+
35
+ function TooltipContent({
36
+ className,
37
+ sideOffset = 0,
38
+ children,
39
+ ...props
40
+ }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
41
+ return (
42
+ <TooltipPrimitive.Portal>
43
+ <TooltipPrimitive.Content
44
+ data-slot="tooltip-content"
45
+ sideOffset={sideOffset}
46
+ className={cn(
47
+ "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
48
+ className
49
+ )}
50
+ {...props}
51
+ >
52
+ {children}
53
+ <TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
54
+ </TooltipPrimitive.Content>
55
+ </TooltipPrimitive.Portal>
56
+ )
57
+ }
58
+
59
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
package/src/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ // Re-export components
2
+ export * from "./components/ui";
3
+ export * from "./components/molecules";
4
+
5
+ // Re-export utilities
6
+ export * from "./lib/utils";
7
+
8
+ // Re-export design tokens
9
+ export * from "./tokens";
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Turtle Design System - Global Styles
3
+ *
4
+ * This is the main entry point for the Turtle Design System.
5
+ * It imports our complete token-based theming architecture and
6
+ * provides base styles for all components.
7
+ */
8
+
9
+ /* Import Tailwind CSS and animations */
10
+ @import "tailwindcss";
11
+ @import "tw-animate-css";
12
+
13
+ /* Import our complete design system */
14
+ @import "./themes/index.css";
15
+
16
+ /* Custom Tailwind variants */
17
+ @custom-variant dark (&:is(.dark *));
18
+
19
+ /* ===== TAILWIND THEME INTEGRATION ===== */
20
+ /*
21
+ * This section maps our semantic variables to Tailwind's color system
22
+ * so we can use classes like bg-background, text-foreground, etc.
23
+ */
24
+ @theme inline {
25
+ /* Border radius mapping */
26
+ --radius-sm: calc(var(--radius) - 4px);
27
+ --radius-md: calc(var(--radius) - 2px);
28
+ --radius-lg: var(--radius);
29
+ --radius-xl: calc(var(--radius) + 4px);
30
+
31
+ /* Color mapping for Tailwind classes */
32
+ --color-background: var(--background);
33
+ --color-foreground: var(--foreground);
34
+ --color-card: var(--card);
35
+ --color-card-foreground: var(--card-foreground);
36
+ --color-popover: var(--popover);
37
+ --color-popover-foreground: var(--popover-foreground);
38
+ --color-primary: var(--primary);
39
+ --color-primary-foreground: var(--primary-foreground);
40
+ --color-secondary: var(--secondary);
41
+ --color-secondary-foreground: var(--secondary-foreground);
42
+ --color-muted: var(--muted);
43
+ --color-muted-foreground: var(--muted-foreground);
44
+ --color-accent: var(--accent);
45
+ --color-accent-foreground: var(--accent-foreground);
46
+ --color-destructive: var(--destructive);
47
+ --color-destructive-foreground: var(--destructive-foreground);
48
+ --color-border: var(--border);
49
+ --color-input: var(--input);
50
+ --color-ring: var(--ring);
51
+ --color-chart-1: var(--chart-1);
52
+ --color-chart-2: var(--chart-2);
53
+ --color-chart-3: var(--chart-3);
54
+ --color-chart-4: var(--chart-4);
55
+ --color-chart-5: var(--chart-5);
56
+ }
57
+
58
+ /* ===== BASE STYLES ===== */
59
+ @layer base {
60
+ /* Universal border and outline styles */
61
+ * {
62
+ @apply border-border outline-ring/50;
63
+ }
64
+
65
+ /* HTML and body setup */
66
+ html,
67
+ body {
68
+ @apply size-full font-sans antialiased;
69
+ }
70
+
71
+ /* Body styling with semantic variables */
72
+ body {
73
+ @apply bg-background text-foreground;
74
+ }
75
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Turtle Design System - Themes
3
+ *
4
+ * This file exports all available themes for the design system.
5
+ * Import this file to get the complete theming solution.
6
+ */
7
+
8
+ /* Import semantic theme (includes core tokens) */
9
+ @import "./semantic.css";
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Turtle Design System - Semantic Theme Variables
3
+ *
4
+ * This file maps our core design tokens to the semantic variables
5
+ * expected by shadcn/ui components. This is the bridge between our
6
+ * brand identity and the component API.
7
+ *
8
+ * All shadcn/ui components use these semantic variables, making them
9
+ * fully themeable while maintaining our brand consistency.
10
+ */
11
+
12
+ /* Import core design tokens first */
13
+ @import "../tokens/index.css";
14
+
15
+ :root {
16
+ /* ===== SEMANTIC COLOR MAPPING ===== */
17
+ /* Default theme: DARK (Turtle's primary brand experience) */
18
+
19
+ /* Background colors */
20
+ --background: var(--color-brand-black); /* #141514 - Dark background (default) */
21
+ --foreground: var(--color-brand-white); /* #F9F9F9 - Light text (default) */
22
+
23
+ /* Card colors */
24
+ --card: var(--color-brand-black); /* #141514 - Dark card background */
25
+ --card-foreground: var(--color-brand-white); /* #F9F9F9 - Light card text */
26
+
27
+ /* Popover colors */
28
+ --popover: var(--color-brand-black); /* #141514 - Dark popover */
29
+ --popover-foreground: var(--color-brand-white); /* #F9F9F9 - Light popover text */
30
+
31
+ /* Primary colors */
32
+ --primary: var(--color-brand-green); /* #73F36C - Primary brand color */
33
+ --primary-foreground: var(--color-brand-black); /* #141514 - Black text on green */
34
+
35
+ /* Secondary colors */
36
+ --secondary: var(--color-neutral-alpha-10); /* #F9F9F91A - Light overlay on dark */
37
+ --secondary-foreground: var(--color-brand-white); /* #F9F9F9 - Light text */
38
+
39
+ /* Muted colors */
40
+ --muted: var(--color-neutral-alpha-2); /* #F9F9F905 - Subtle overlay */
41
+ --muted-foreground: var(--color-neutral-alpha-50); /* #FFFFFF80 - Muted text */
42
+
43
+ /* Accent colors */
44
+ --accent: var(--color-brand-green); /* #73F36C - Accent color */
45
+ --accent-foreground: var(--color-brand-black); /* #141514 - Black text on green */
46
+
47
+ /* Destructive colors */
48
+ --destructive: var(--color-error); /* #EF4444 - Error/destructive */
49
+ --destructive-foreground: var(--color-brand-white); /* #F9F9F9 - Light text on red */
50
+
51
+ /* Border and input colors */
52
+ --border: var(--color-neutral-alpha-10); /* #F9F9F91A - Light borders on dark */
53
+ --input: var(--color-neutral-alpha-2); /* #F9F9F905 - Subtle input background */
54
+ --ring: var(--color-brand-green); /* #73F36C - Focus ring */
55
+
56
+ /* ===== SEMANTIC SPACING MAPPING ===== */
57
+ --radius: var(--radius-default); /* 10px - Default border radius */
58
+
59
+ /* ===== CHART COLORS (FOR DATA VISUALIZATION) ===== */
60
+ --chart-1: var(--color-brand-green); /* Primary chart color */
61
+ --chart-2: var(--color-info); /* Secondary chart color */
62
+ --chart-3: var(--color-warning); /* Tertiary chart color */
63
+ --chart-4: var(--color-error); /* Quaternary chart color */
64
+ --chart-5: var(--color-success); /* Quinary chart color */
65
+ }
66
+
67
+ /* ===== LIGHT THEME ===== */
68
+ .light {
69
+ /* Light theme - for when users prefer light mode */
70
+
71
+ /* Background colors */
72
+ --background: var(--color-brand-white); /* #F9F9F9 - Light background */
73
+ --foreground: var(--color-brand-black); /* #141514 - Dark text */
74
+
75
+ /* Card colors */
76
+ --card: var(--color-brand-white); /* #F9F9F9 - Light card background */
77
+ --card-foreground: var(--color-brand-black); /* #141514 - Dark card text */
78
+
79
+ /* Popover colors */
80
+ --popover: var(--color-brand-white); /* #F9F9F9 - Light popover */
81
+ --popover-foreground: var(--color-brand-black); /* #141514 - Dark popover text */
82
+
83
+ /* Primary colors */
84
+ --primary: var(--color-brand-green); /* #73F36C - Same green (brand consistency) */
85
+ --primary-foreground: var(--color-brand-black); /* #141514 - Black text on green */
86
+
87
+ /* Secondary colors */
88
+ --secondary: var(--color-neutral-alpha-10); /* #F9F9F91A - Light overlay */
89
+ --secondary-foreground: var(--color-brand-black); /* #141514 - Dark text */
90
+
91
+ /* Muted colors */
92
+ --muted: var(--color-neutral-alpha-2); /* #F9F9F905 - Subtle overlay */
93
+ --muted-foreground: var(--color-neutral-alpha-50); /* #FFFFFF80 - Muted text */
94
+
95
+ /* Accent colors */
96
+ --accent: var(--color-brand-green); /* #73F36C - Same accent */
97
+ --accent-foreground: var(--color-brand-black); /* #141514 - Black text on green */
98
+
99
+ /* Destructive colors */
100
+ --destructive: var(--color-error); /* #EF4444 - Same error color */
101
+ --destructive-foreground: var(--color-brand-white); /* #F9F9F9 - Light text on red */
102
+
103
+ /* Border and input colors */
104
+ --border: var(--color-neutral-alpha-dark-10); /* #1415141A - Dark borders on light */
105
+ --input: var(--color-neutral-alpha-2); /* #F9F9F905 - Subtle input background */
106
+ --ring: var(--color-brand-green); /* #73F36C - Same focus ring */
107
+ }
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Turtle Design System - Core Color Tokens
3
+ *
4
+ * These are the foundational color values that define our brand identity.
5
+ * They should not be changed frequently and represent our core brand colors.
6
+ *
7
+ * Naming Convention:
8
+ * --color-[category]-[name]: [value]
9
+ *
10
+ * Categories:
11
+ * - brand: Primary brand colors (Neon Green, Ninja Black, Wise White)
12
+ * - neutral: Functional grays and transparent variants
13
+ * - semantic: Special purpose colors (success, error, warning)
14
+ */
15
+
16
+ :root {
17
+ /* ===== PRIMARY BRAND COLORS ===== */
18
+ /* These are the core Turtle Club brand colors */
19
+ --color-brand-green: #73F36C; /* Neon Green - Primary brand color */
20
+ --color-brand-black: #141514; /* Ninja Black - Dark backgrounds, text */
21
+ --color-brand-white: #F9F9F9; /* Wise White - Light backgrounds, text */
22
+
23
+ /* ===== NEUTRAL COLORS ===== */
24
+ /* Functional colors for UI elements */
25
+ --color-neutral-50: #F9F9F9; /* Lightest - same as brand white */
26
+ --color-neutral-100: #F1F1F1; /* Very light gray */
27
+ --color-neutral-200: #E5E5E5; /* Light gray for borders */
28
+ --color-neutral-300: #D1D1D1; /* Medium light gray */
29
+ --color-neutral-400: #A3A3A3; /* Medium gray */
30
+ --color-neutral-500: #737373; /* True neutral */
31
+ --color-neutral-600: #525252; /* Medium dark gray */
32
+ --color-neutral-700: #404040; /* Dark gray */
33
+ --color-neutral-800: #262626; /* Very dark gray */
34
+ --color-neutral-900: #141514; /* Darkest - same as brand black */
35
+
36
+ /* ===== TRANSPARENT VARIANTS ===== */
37
+ /* Alpha variants for overlays and subtle backgrounds */
38
+ --color-neutral-alpha-2: #F9F9F905; /* 2% opacity white */
39
+ --color-neutral-alpha-5: #F9F9F90D; /* 5% opacity white */
40
+ --color-neutral-alpha-10: #F9F9F91A; /* 10% opacity white */
41
+ --color-neutral-alpha-20: #F9F9F933; /* 20% opacity white */
42
+ --color-neutral-alpha-30: #F9F9F94D; /* 30% opacity white */
43
+ --color-neutral-alpha-50: #FFFFFF80; /* 50% opacity white */
44
+
45
+ /* Green alpha variants for design system */
46
+ --color-brand-green-alpha-10: #47A73B1A; /* 10% opacity green */
47
+ --color-brand-green-alpha-20: #73F36C33; /* 20% opacity green (Dark Green) */
48
+
49
+ /* Special colors from design system */
50
+ --color-brand-aqua: #AAF1D5; /* Aqua - Secondary brand color */
51
+
52
+ /* Black alpha variants */
53
+ --color-neutral-alpha-dark-2: #14151405; /* 2% opacity black */
54
+ --color-neutral-alpha-dark-5: #1415140D; /* 5% opacity black */
55
+ --color-neutral-alpha-dark-10: #1415141A; /* 10% opacity black */
56
+ --color-neutral-alpha-dark-20: #14151433; /* 20% opacity black */
57
+ --color-neutral-alpha-dark-30: #1415144D; /* 30% opacity black */
58
+ --color-neutral-alpha-dark-50: #14151480; /* 50% opacity black */
59
+
60
+ /* ===== SEMANTIC COLORS ===== */
61
+ /* Colors for specific UI states and feedback */
62
+ --color-success: #22C55E; /* Green for success states */
63
+ --color-success-light: #DCFCE7; /* Light green background */
64
+ --color-success-dark: #166534; /* Dark green for text */
65
+
66
+ --color-error: #EF4444; /* Red for error states */
67
+ --color-error-light: #FEE2E2; /* Light red background */
68
+ --color-error-dark: #991B1B; /* Dark red for text */
69
+
70
+ --color-warning: #F59E0B; /* Amber for warning states */
71
+ --color-warning-light: #FEF3C7; /* Light amber background */
72
+ --color-warning-dark: #92400E; /* Dark amber for text */
73
+
74
+ --color-info: #3B82F6; /* Blue for info states */
75
+ --color-info-light: #DBEAFE; /* Light blue background */
76
+ --color-info-dark: #1E40AF; /* Dark blue for text */
77
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Turtle Design System - Core Design Tokens
3
+ *
4
+ * This file imports all core design tokens that define the foundation
5
+ * of our design system. These tokens should be imported before any
6
+ * semantic theme files.
7
+ *
8
+ * Import order is important for CSS cascade.
9
+ */
10
+
11
+ /* Core design tokens - order matters */
12
+ @import "./colors.css";
13
+ @import "./spacing.css";
14
+ @import "./radius.css";
15
+ @import "./typography.css";
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Turtle Design System - Core Radius Tokens
3
+ *
4
+ * These define the border radius scale for consistent rounded corners
5
+ * across all components. Based on a mathematical progression.
6
+ *
7
+ * Naming Convention:
8
+ * --radius-[size]: [value]
9
+ *
10
+ * Scale: none, sm, md, lg, xl, 2xl, 3xl, full
11
+ */
12
+
13
+ :root {
14
+ /* ===== BASE RADIUS SCALE ===== */
15
+ /* Mathematical progression for visual harmony */
16
+ --radius-none: 0px; /* 0px - No rounding */
17
+ --radius-xs: 0.125rem; /* 2px - Extra small rounding */
18
+ --radius-sm: 0.25rem; /* 4px - Small rounding */
19
+ --radius-md: 0.375rem; /* 6px - Medium rounding */
20
+ --radius-lg: 0.5rem; /* 8px - Large rounding */
21
+ --radius-xl: 0.75rem; /* 12px - Extra large rounding */
22
+ --radius-2xl: 1rem; /* 16px - 2X large rounding */
23
+ --radius-3xl: 1.5rem; /* 24px - 3X large rounding */
24
+ --radius-full: 9999px; /* Full rounding (pill shape) */
25
+
26
+ /* ===== TURTLE DESIGN SYSTEM DEFAULTS ===== */
27
+ /* Our preferred radius values based on the design system */
28
+ --radius-default: 0.625rem; /* 10px - Turtle default radius */
29
+ --radius-button: var(--radius-full); /* Full rounding for buttons */
30
+ --radius-card: var(--radius-xl); /* 12px - Card rounding */
31
+ --radius-input: var(--radius-md); /* 6px - Input field rounding */
32
+ --radius-modal: var(--radius-xl); /* 12px - Modal rounding */
33
+ --radius-tooltip: var(--radius-md); /* 6px - Tooltip rounding */
34
+
35
+ /* ===== COMPONENT-SPECIFIC RADIUS ===== */
36
+ /* Specific radius values for different component types */
37
+ --radius-avatar: var(--radius-full); /* Avatar - fully rounded */
38
+ --radius-badge: var(--radius-full); /* Badge - pill shape */
39
+ --radius-chip: var(--radius-full); /* Chip - pill shape */
40
+ --radius-progress: var(--radius-full); /* Progress bar - rounded ends */
41
+ --radius-slider-thumb: var(--radius-full); /* Slider thumb - circle */
42
+ --radius-switch: var(--radius-full); /* Switch - pill shape */
43
+ --radius-tab: var(--radius-lg); /* Tab - medium rounding */
44
+ --radius-dropdown: var(--radius-lg); /* Dropdown - medium rounding */
45
+ --radius-popover: var(--radius-lg); /* Popover - medium rounding */
46
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Turtle Design System - Core Spacing Tokens
3
+ *
4
+ * These define the spatial rhythm and consistency across all components.
5
+ * Based on a 4px base unit for mathematical harmony.
6
+ *
7
+ * Naming Convention:
8
+ * --spacing-[size]: [value]
9
+ *
10
+ * Scale: 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96
11
+ */
12
+
13
+ :root {
14
+ /* ===== BASE SPACING SCALE ===== */
15
+ /* Based on 4px increments for consistent rhythm */
16
+ --spacing-0: 0px; /* 0px - No spacing */
17
+ --spacing-1: 0.25rem; /* 4px - Tiny spacing */
18
+ --spacing-2: 0.5rem; /* 8px - Extra small */
19
+ --spacing-3: 0.75rem; /* 12px - Small */
20
+ --spacing-4: 1rem; /* 16px - Default/medium */
21
+ --spacing-5: 1.25rem; /* 20px - Medium-large */
22
+ --spacing-6: 1.5rem; /* 24px - Large */
23
+ --spacing-8: 2rem; /* 32px - Extra large */
24
+ --spacing-10: 2.5rem; /* 40px - 2X large */
25
+ --spacing-12: 3rem; /* 48px - 3X large */
26
+ --spacing-16: 4rem; /* 64px - 4X large */
27
+ --spacing-20: 5rem; /* 80px - 5X large */
28
+ --spacing-24: 6rem; /* 96px - 6X large */
29
+ --spacing-32: 8rem; /* 128px - Huge */
30
+ --spacing-40: 10rem; /* 160px - Extra huge */
31
+ --spacing-48: 12rem; /* 192px - Maximum */
32
+
33
+ /* ===== SEMANTIC SPACING ===== */
34
+ /* Common spacing patterns with semantic names */
35
+ --spacing-xs: var(--spacing-1); /* 4px - Extra small */
36
+ --spacing-sm: var(--spacing-2); /* 8px - Small */
37
+ --spacing-md: var(--spacing-4); /* 16px - Medium/default */
38
+ --spacing-lg: var(--spacing-6); /* 24px - Large */
39
+ --spacing-xl: var(--spacing-8); /* 32px - Extra large */
40
+ --spacing-2xl: var(--spacing-12); /* 48px - 2X large */
41
+ --spacing-3xl: var(--spacing-16); /* 64px - 3X large */
42
+
43
+ /* ===== COMPONENT-SPECIFIC SPACING ===== */
44
+ /* Common spacing patterns for specific use cases */
45
+ --spacing-button-padding-x: var(--spacing-4); /* 16px - Button horizontal padding */
46
+ --spacing-button-padding-y: var(--spacing-2); /* 8px - Button vertical padding */
47
+ --spacing-card-padding: var(--spacing-6); /* 24px - Card inner padding */
48
+ --spacing-container-padding: var(--spacing-4); /* 16px - Container padding */
49
+ --spacing-section-gap: var(--spacing-8); /* 32px - Gap between sections */
50
+ --spacing-component-gap: var(--spacing-4); /* 16px - Gap between components */
51
+ --spacing-element-gap: var(--spacing-2); /* 8px - Gap between small elements */
52
+ }