@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.
- package/.turbo/turbo-build.log +15 -0
- package/.turbo/turbo-type-check.log +360 -0
- package/README.md +3 -0
- package/components.json +21 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1672 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1 -0
- package/package.json +66 -0
- package/src/components/molecules/index.ts +7 -0
- package/src/components/molecules/opportunity-details.tsx +145 -0
- package/src/components/molecules/opportunity-item.tsx +63 -0
- package/src/components/molecules/route-details.tsx +87 -0
- package/src/components/molecules/swap-details.tsx +95 -0
- package/src/components/molecules/swap-input.tsx +115 -0
- package/src/components/molecules/token-selector.tsx +72 -0
- package/src/components/molecules/tx-status.tsx +254 -0
- package/src/components/ui/button.tsx +65 -0
- package/src/components/ui/card.tsx +101 -0
- package/src/components/ui/chip.tsx +48 -0
- package/src/components/ui/icon-animation.tsx +82 -0
- package/src/components/ui/index.ts +18 -0
- package/src/components/ui/info-card.tsx +128 -0
- package/src/components/ui/input.tsx +78 -0
- package/src/components/ui/label-with-icon.tsx +112 -0
- package/src/components/ui/label.tsx +22 -0
- package/src/components/ui/navigation-bar.tsx +135 -0
- package/src/components/ui/opportunity-details-v1.tsx +90 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +180 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/toggle-group.tsx +71 -0
- package/src/components/ui/toggle.tsx +47 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/index.ts +9 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/globals.css +75 -0
- package/src/styles/themes/index.css +9 -0
- package/src/styles/themes/semantic.css +107 -0
- package/src/styles/tokens/colors.css +77 -0
- package/src/styles/tokens/index.css +15 -0
- package/src/styles/tokens/radius.css +46 -0
- package/src/styles/tokens/spacing.css +52 -0
- package/src/styles/tokens/typography.css +86 -0
- package/src/tokens/index.ts +108 -0
- package/tsconfig.json +21 -0
- package/vite.config.js +65 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turtle Design System - Core Typography Tokens
|
|
3
|
+
*
|
|
4
|
+
* These define the typography scale, font families, and text styles
|
|
5
|
+
* for consistent text rendering across all components.
|
|
6
|
+
*
|
|
7
|
+
* Naming Convention:
|
|
8
|
+
* --font-[property]-[size/variant]: [value]
|
|
9
|
+
* --text-[size]: [value]
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
/* ===== FONT FAMILIES ===== */
|
|
14
|
+
/* Primary font stack for body text and UI elements */
|
|
15
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
16
|
+
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
|
|
17
|
+
sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
|
18
|
+
"Segoe UI Symbol", "Noto Color Emoji";
|
|
19
|
+
|
|
20
|
+
/* Monospace font stack for code and technical content */
|
|
21
|
+
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
|
|
22
|
+
"Liberation Mono", Menlo, monospace;
|
|
23
|
+
|
|
24
|
+
/* Display font (same as sans for now, can be customized) */
|
|
25
|
+
--font-display: var(--font-sans);
|
|
26
|
+
|
|
27
|
+
/* ===== FONT SIZES ===== */
|
|
28
|
+
/* Based on a modular scale for visual hierarchy */
|
|
29
|
+
--text-xs: 0.75rem; /* 12px */
|
|
30
|
+
--text-sm: 0.875rem; /* 14px */
|
|
31
|
+
--text-base: 1rem; /* 16px - Base size */
|
|
32
|
+
--text-lg: 1.125rem; /* 18px */
|
|
33
|
+
--text-xl: 1.25rem; /* 20px */
|
|
34
|
+
--text-2xl: 1.5rem; /* 24px */
|
|
35
|
+
--text-3xl: 1.875rem; /* 30px */
|
|
36
|
+
--text-4xl: 2.25rem; /* 36px */
|
|
37
|
+
--text-5xl: 3rem; /* 48px */
|
|
38
|
+
--text-6xl: 3.75rem; /* 60px */
|
|
39
|
+
--text-7xl: 4.5rem; /* 72px */
|
|
40
|
+
--text-8xl: 6rem; /* 96px */
|
|
41
|
+
--text-9xl: 8rem; /* 128px */
|
|
42
|
+
|
|
43
|
+
/* ===== LINE HEIGHTS ===== */
|
|
44
|
+
/* Corresponding line heights for each font size */
|
|
45
|
+
--leading-xs: 1rem; /* 16px - for 12px text */
|
|
46
|
+
--leading-sm: 1.25rem; /* 20px - for 14px text */
|
|
47
|
+
--leading-base: 1.5rem; /* 24px - for 16px text */
|
|
48
|
+
--leading-lg: 1.75rem; /* 28px - for 18px text */
|
|
49
|
+
--leading-xl: 1.75rem; /* 28px - for 20px text */
|
|
50
|
+
--leading-2xl: 2rem; /* 32px - for 24px text */
|
|
51
|
+
--leading-3xl: 2.25rem; /* 36px - for 30px text */
|
|
52
|
+
--leading-4xl: 2.5rem; /* 40px - for 36px text */
|
|
53
|
+
--leading-5xl: 1; /* 1 - tight for large text */
|
|
54
|
+
--leading-6xl: 1; /* 1 - tight for large text */
|
|
55
|
+
--leading-7xl: 1; /* 1 - tight for large text */
|
|
56
|
+
--leading-8xl: 1; /* 1 - tight for large text */
|
|
57
|
+
--leading-9xl: 1; /* 1 - tight for large text */
|
|
58
|
+
|
|
59
|
+
/* Semantic line heights */
|
|
60
|
+
--leading-tight: 1.25; /* Tight line height */
|
|
61
|
+
--leading-snug: 1.375; /* Snug line height */
|
|
62
|
+
--leading-normal: 1.5; /* Normal line height */
|
|
63
|
+
--leading-relaxed: 1.625; /* Relaxed line height */
|
|
64
|
+
--leading-loose: 2; /* Loose line height */
|
|
65
|
+
|
|
66
|
+
/* ===== FONT WEIGHTS ===== */
|
|
67
|
+
/* Standard font weight scale */
|
|
68
|
+
--font-weight-thin: 100; /* Thin */
|
|
69
|
+
--font-weight-extralight: 200; /* Extra light */
|
|
70
|
+
--font-weight-light: 300; /* Light */
|
|
71
|
+
--font-weight-normal: 400; /* Normal/Regular */
|
|
72
|
+
--font-weight-medium: 500; /* Medium */
|
|
73
|
+
--font-weight-semibold: 600; /* Semi-bold */
|
|
74
|
+
--font-weight-bold: 700; /* Bold */
|
|
75
|
+
--font-weight-extrabold: 800; /* Extra bold */
|
|
76
|
+
--font-weight-black: 900; /* Black */
|
|
77
|
+
|
|
78
|
+
/* ===== LETTER SPACING ===== */
|
|
79
|
+
/* Letter spacing for different text styles */
|
|
80
|
+
--tracking-tighter: -0.05em; /* Tighter letter spacing */
|
|
81
|
+
--tracking-tight: -0.025em; /* Tight letter spacing */
|
|
82
|
+
--tracking-normal: 0em; /* Normal letter spacing */
|
|
83
|
+
--tracking-wide: 0.025em; /* Wide letter spacing */
|
|
84
|
+
--tracking-wider: 0.05em; /* Wider letter spacing */
|
|
85
|
+
--tracking-widest: 0.1em; /* Widest letter spacing */
|
|
86
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export const tokens = {
|
|
2
|
+
colors: {
|
|
3
|
+
// Turtle brand colors
|
|
4
|
+
neonGreen: 'oklch(0.86 0.16 142.5)',
|
|
5
|
+
darkGreen: 'oklch(0.24 0.16 142.5)',
|
|
6
|
+
ninjaBlack: 'oklch(0.1 0.005 120)',
|
|
7
|
+
wiseWhite: 'oklch(0.98 0 0)',
|
|
8
|
+
wiseGray: 'oklch(0.17 0.003 120)',
|
|
9
|
+
mintCream: 'oklch(0.95 0.046 109)',
|
|
10
|
+
turtleYellow: 'oklch(0.97 0.21 98.2)',
|
|
11
|
+
turtleRed: 'oklch(0.6 0.28 29)',
|
|
12
|
+
whiteTransparent: 'oklch(0.98 0 0 / 0.02)',
|
|
13
|
+
|
|
14
|
+
// Semantic colors - light theme
|
|
15
|
+
light: {
|
|
16
|
+
background: 'oklch(1 0 0)',
|
|
17
|
+
foreground: 'oklch(0.141 0.005 285.823)',
|
|
18
|
+
card: 'oklch(1 0 0)',
|
|
19
|
+
cardForeground: 'oklch(0.141 0.005 285.823)',
|
|
20
|
+
popover: 'oklch(1 0 0)',
|
|
21
|
+
popoverForeground: 'oklch(0.141 0.005 285.823)',
|
|
22
|
+
primary: 'oklch(0.21 0.006 285.885)',
|
|
23
|
+
primaryForeground: 'oklch(0.985 0 0)',
|
|
24
|
+
secondary: 'oklch(0.967 0.001 286.375)',
|
|
25
|
+
secondaryForeground: 'oklch(0.21 0.006 285.885)',
|
|
26
|
+
muted: 'oklch(0.967 0.001 286.375)',
|
|
27
|
+
mutedForeground: 'oklch(0.552 0.016 285.938)',
|
|
28
|
+
accent: 'oklch(0.967 0.001 286.375)',
|
|
29
|
+
accentForeground: 'oklch(0.21 0.006 285.885)',
|
|
30
|
+
destructive: 'oklch(0.577 0.245 27.325)',
|
|
31
|
+
border: 'oklch(0.92 0.004 286.32)',
|
|
32
|
+
input: 'oklch(0.92 0.004 286.32)',
|
|
33
|
+
ring: 'oklch(0.705 0.015 286.067)',
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
// Semantic colors - dark theme
|
|
37
|
+
dark: {
|
|
38
|
+
background: 'oklch(0.141 0.005 285.823)',
|
|
39
|
+
foreground: 'oklch(0.985 0 0)',
|
|
40
|
+
card: 'oklch(0.21 0.006 285.885)',
|
|
41
|
+
cardForeground: 'oklch(0.985 0 0)',
|
|
42
|
+
popover: 'oklch(0.21 0.006 285.885)',
|
|
43
|
+
popoverForeground: 'oklch(0.985 0 0)',
|
|
44
|
+
primary: 'oklch(0.92 0.004 286.32)',
|
|
45
|
+
primaryForeground: 'oklch(0.21 0.006 285.885)',
|
|
46
|
+
secondary: 'oklch(0.274 0.006 286.033)',
|
|
47
|
+
secondaryForeground: 'oklch(0.985 0 0)',
|
|
48
|
+
muted: 'oklch(0.274 0.006 286.033)',
|
|
49
|
+
mutedForeground: 'oklch(0.705 0.015 286.067)',
|
|
50
|
+
accent: 'oklch(0.274 0.006 286.033)',
|
|
51
|
+
accentForeground: 'oklch(0.985 0 0)',
|
|
52
|
+
destructive: 'oklch(0.704 0.191 22.216)',
|
|
53
|
+
border: 'oklch(1 0 0 / 10%)',
|
|
54
|
+
input: 'oklch(1 0 0 / 15%)',
|
|
55
|
+
ring: 'oklch(0.552 0.016 285.938)',
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
spacing: {
|
|
60
|
+
xs: '0.25rem', // 4px
|
|
61
|
+
sm: '0.5rem', // 8px
|
|
62
|
+
md: '0.75rem', // 12px
|
|
63
|
+
lg: '1rem', // 16px
|
|
64
|
+
xl: '1.5rem', // 24px
|
|
65
|
+
'2xl': '2rem', // 32px
|
|
66
|
+
'3xl': '3rem', // 48px
|
|
67
|
+
'4xl': '4rem', // 64px
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
radius: {
|
|
71
|
+
none: '0',
|
|
72
|
+
sm: 'calc(0.625rem - 4px)',
|
|
73
|
+
md: 'calc(0.625rem - 2px)',
|
|
74
|
+
lg: '0.625rem',
|
|
75
|
+
xl: 'calc(0.625rem + 4px)',
|
|
76
|
+
full: '9999px',
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
fontSize: {
|
|
80
|
+
xs: ['0.75rem', { lineHeight: '1rem' }],
|
|
81
|
+
sm: ['0.875rem', { lineHeight: '1.25rem' }],
|
|
82
|
+
base: ['1rem', { lineHeight: '1.5rem' }],
|
|
83
|
+
lg: ['1.125rem', { lineHeight: '1.75rem' }],
|
|
84
|
+
xl: ['1.25rem', { lineHeight: '1.75rem' }],
|
|
85
|
+
'2xl': ['1.5rem', { lineHeight: '2rem' }],
|
|
86
|
+
'3xl': ['1.875rem', { lineHeight: '2.25rem' }],
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
fontWeight: {
|
|
90
|
+
normal: '400',
|
|
91
|
+
medium: '500',
|
|
92
|
+
semibold: '600',
|
|
93
|
+
bold: '700',
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
shadow: {
|
|
97
|
+
xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
98
|
+
sm: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
99
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
100
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
101
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
102
|
+
}
|
|
103
|
+
} as const
|
|
104
|
+
|
|
105
|
+
export type Tokens = typeof tokens
|
|
106
|
+
export type ColorTokens = typeof tokens.colors
|
|
107
|
+
export type SpacingTokens = typeof tokens.spacing
|
|
108
|
+
export type RadiusTokens = typeof tokens.radius
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "./src",
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": ["./src/*"]
|
|
9
|
+
},
|
|
10
|
+
"outDir": "./types",
|
|
11
|
+
"noImplicitAny": false,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"noUnusedLocals": false,
|
|
15
|
+
"noUnusedParameters": false,
|
|
16
|
+
"strict": false,
|
|
17
|
+
"noImplicitReturns": false,
|
|
18
|
+
"noFallthroughCasesInSwitch": false
|
|
19
|
+
},
|
|
20
|
+
"include": ["src/**/*"]
|
|
21
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import { resolve } from 'path'
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
+
|
|
5
|
+
const isCSS = process.env.BUILD_CSS === 'true'
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: isCSS ? [tailwindcss()] : [],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'@': resolve(process.cwd(), 'src'),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
build: isCSS ? {
|
|
15
|
+
// CSS build configuration
|
|
16
|
+
outDir: 'dist',
|
|
17
|
+
emptyOutDir: false,
|
|
18
|
+
cssMinify: true,
|
|
19
|
+
rollupOptions: {
|
|
20
|
+
input: resolve(process.cwd(), 'src/styles/globals.css'),
|
|
21
|
+
output: {
|
|
22
|
+
assetFileNames: 'styles.css',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
} : {
|
|
26
|
+
// Component build configuration
|
|
27
|
+
lib: {
|
|
28
|
+
entry: resolve(process.cwd(), 'src/index.ts'),
|
|
29
|
+
name: 'TurtleUI',
|
|
30
|
+
formats: ['es', 'cjs'],
|
|
31
|
+
fileName: (format) => `index.${format === 'es' ? 'js' : 'cjs'}`
|
|
32
|
+
},
|
|
33
|
+
outDir: 'dist',
|
|
34
|
+
sourcemap: true,
|
|
35
|
+
rollupOptions: {
|
|
36
|
+
external: [
|
|
37
|
+
'react',
|
|
38
|
+
'react-dom',
|
|
39
|
+
'react/jsx-runtime',
|
|
40
|
+
'@radix-ui/react-slot',
|
|
41
|
+
'@radix-ui/react-label',
|
|
42
|
+
'@radix-ui/react-scroll-area',
|
|
43
|
+
'@radix-ui/react-select',
|
|
44
|
+
'@radix-ui/react-separator',
|
|
45
|
+
'@radix-ui/react-switch',
|
|
46
|
+
'@radix-ui/react-toggle',
|
|
47
|
+
'@radix-ui/react-toggle-group',
|
|
48
|
+
'@radix-ui/react-tooltip',
|
|
49
|
+
'class-variance-authority',
|
|
50
|
+
'clsx',
|
|
51
|
+
'tailwind-merge',
|
|
52
|
+
'lucide-react',
|
|
53
|
+
'next-themes',
|
|
54
|
+
'sonner'
|
|
55
|
+
],
|
|
56
|
+
output: {
|
|
57
|
+
globals: {
|
|
58
|
+
react: 'React',
|
|
59
|
+
'react-dom': 'ReactDOM',
|
|
60
|
+
'react/jsx-runtime': 'ReactJSXRuntime'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
})
|