mihirmithani commited on
Commit ·
ffd0276
1
Parent(s): 4ce5238
- src/app/globals.css +509 -37
- src/components/ui/Badge.tsx +7 -6
- src/components/ui/Button.tsx +12 -11
- src/components/ui/Card.tsx +8 -8
- src/components/ui/Input.tsx +4 -10
- src/components/ui/Select.tsx +3 -6
- src/components/ui/Slider.tsx +6 -11
- src/components/ui/Slider.tsx.bak +52 -0
- src/components/ui/TestSlider.tsx +52 -0
- src/components/ui/Tooltip.tsx +8 -11
- src/components/ui/index.ts +1 -1
src/app/globals.css
CHANGED
|
@@ -1,32 +1,338 @@
|
|
| 1 |
@import "tailwindcss";
|
| 2 |
|
|
|
|
|
|
|
| 3 |
:root {
|
| 4 |
-
-
|
| 5 |
-
--
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
--color-
|
| 10 |
-
--color-
|
| 11 |
-
--
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
@media (prefers-color-scheme: dark) {
|
| 16 |
:root {
|
| 17 |
-
-
|
| 18 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
}
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
* {
|
| 23 |
box-sizing: border-box;
|
| 24 |
}
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
body {
|
| 27 |
-
background: var(--background);
|
| 28 |
-
color: var(--foreground);
|
| 29 |
font-family: var(--font-sans);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
/* Custom scrollbar */
|
|
@@ -40,17 +346,24 @@ body {
|
|
| 40 |
}
|
| 41 |
|
| 42 |
::-webkit-scrollbar-thumb {
|
| 43 |
-
background:
|
| 44 |
border-radius: 4px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
|
| 47 |
::-webkit-scrollbar-thumb:hover {
|
| 48 |
-
background:
|
| 49 |
}
|
| 50 |
|
| 51 |
/* Focus visible styles */
|
| 52 |
:focus-visible {
|
| 53 |
-
outline: 2px solid
|
| 54 |
outline-offset: 2px;
|
| 55 |
}
|
| 56 |
|
|
@@ -66,10 +379,37 @@ body {
|
|
| 66 |
}
|
| 67 |
}
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
.animate-slide-in {
|
| 70 |
animation: slide-in 0.3s ease-out;
|
| 71 |
}
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
/* Canvas styles */
|
| 74 |
canvas {
|
| 75 |
display: block;
|
|
@@ -77,39 +417,171 @@ canvas {
|
|
| 77 |
|
| 78 |
/* Selection styles */
|
| 79 |
::selection {
|
| 80 |
-
background:
|
| 81 |
-
color:
|
| 82 |
}
|
| 83 |
|
| 84 |
-
/*
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
-webkit-appearance: none;
|
| 87 |
appearance: none;
|
| 88 |
}
|
| 89 |
|
| 90 |
-
input[type="
|
|
|
|
| 91 |
-webkit-appearance: none;
|
| 92 |
appearance: none;
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
background:
|
| 97 |
-
|
| 98 |
-
border:
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
}
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
input[type="number"]::-webkit-outer-spin-button {
|
| 114 |
opacity: 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
}
|
|
|
|
| 1 |
@import "tailwindcss";
|
| 2 |
|
| 3 |
+
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');
|
| 4 |
+
|
| 5 |
:root {
|
| 6 |
+
/* Claymorphism Color System - Light Mode */
|
| 7 |
+
--color-primary: #4F46E5;
|
| 8 |
+
--color-on-primary: #FFFFFF;
|
| 9 |
+
--color-secondary: #818CF8;
|
| 10 |
+
--color-accent: #EA580C;
|
| 11 |
+
--color-background: #EEF2FF;
|
| 12 |
+
--color-foreground: #1E1B4B;
|
| 13 |
+
--color-muted: #EBEEF8;
|
| 14 |
+
--color-border: #C7D2FE;
|
| 15 |
+
--color-destructive: #DC2626;
|
| 16 |
+
--color-ring: #4F46E5;
|
| 17 |
|
| 18 |
+
/* Semantic colors */
|
| 19 |
+
--color-success: #16A34A;
|
| 20 |
+
--color-warning: #F59E0B;
|
| 21 |
+
--color-info: #3B82F6;
|
| 22 |
+
|
| 23 |
+
/* Claymorphism shadows */
|
| 24 |
+
--shadow-clay-sm: 2px 2px 4px #C7D2FE, -2px -2px 4px #FFFFFF;
|
| 25 |
+
--shadow-clay-md: 4px 4px 8px #C7D2FE, -4px -4px 8px #FFFFFF;
|
| 26 |
+
--shadow-clay-lg: 8px 8px 16px #C7D2FE, -8px -8px 16px #FFFFFF;
|
| 27 |
+
--shadow-clay-inset: inset 2px 2px 4px #C7D2FE, inset -2px -2px 4px #FFFFFF;
|
| 28 |
+
--shadow-clay-press: inset 4px 4px 8px #C7D2FE, inset -4px -4px 8px #FFFFFF;
|
| 29 |
+
|
| 30 |
+
/* Dark mode Claymorphism shadows */
|
| 31 |
+
--shadow-clay-dark-sm: 2px 2px 4px #1E1B4B, -2px -2px 4px #3730A3;
|
| 32 |
+
--shadow-clay-dark-md: 4px 4px 8px #1E1B4B, -4px -4px 8px #3730A3;
|
| 33 |
+
--shadow-clay-dark-lg: 8px 8px 16px #1E1B4B, -8px -8px 16px #3730A3;
|
| 34 |
+
--shadow-clay-dark-inset: inset 2px 2px 4px #1E1B4B, inset -2px -2px 4px #3730A3;
|
| 35 |
+
--shadow-clay-dark-press: inset 4px 4px 8px #1E1B4B, inset -4px -4px 8px #3730A3;
|
| 36 |
+
|
| 37 |
+
/* Typography */
|
| 38 |
+
--font-sans: 'Fira Sans', system-ui, sans-serif;
|
| 39 |
+
--font-mono: 'Fira Code', monospace;
|
| 40 |
+
--font-base: 1rem;
|
| 41 |
+
--leading-normal: 1.5;
|
| 42 |
+
|
| 43 |
+
/* Spacing scale */
|
| 44 |
+
--space-1: 0.25rem;
|
| 45 |
+
--space-2: 0.5rem;
|
| 46 |
+
--space-3: 0.75rem;
|
| 47 |
+
--space-4: 1rem;
|
| 48 |
+
--space-5: 1.25rem;
|
| 49 |
+
--space-6: 1.5rem;
|
| 50 |
+
--space-8: 2rem;
|
| 51 |
+
--space-10: 2.5rem;
|
| 52 |
+
--space-12: 3rem;
|
| 53 |
+
--space-16: 4rem;
|
| 54 |
}
|
| 55 |
|
| 56 |
@media (prefers-color-scheme: dark) {
|
| 57 |
:root {
|
| 58 |
+
/* Claymorphism Color System - Dark Mode */
|
| 59 |
+
--color-primary: #818CF8;
|
| 60 |
+
--color-on-primary: #1E1B4B;
|
| 61 |
+
--color-secondary: #A5B4FC;
|
| 62 |
+
--color-accent: #FB923C;
|
| 63 |
+
--color-background: #1E1B4B;
|
| 64 |
+
--color-foreground: #EEF2FF;
|
| 65 |
+
--color-muted: #312E81;
|
| 66 |
+
--color-border: #3730A3;
|
| 67 |
+
--color-destructive: #EF4444;
|
| 68 |
+
--color-ring: #818CF8;
|
| 69 |
+
|
| 70 |
+
--color-success: #22C55E;
|
| 71 |
+
--color-warning: #FBBF24;
|
| 72 |
+
--color-info: #60A5FA;
|
| 73 |
}
|
| 74 |
}
|
| 75 |
|
| 76 |
+
@theme inline {
|
| 77 |
+
--color-background: var(--color-background);
|
| 78 |
+
--color-foreground: var(--color-foreground);
|
| 79 |
+
--color-primary: var(--color-primary);
|
| 80 |
+
--color-on-primary: var(--color-on-primary);
|
| 81 |
+
--color-secondary: var(--color-secondary);
|
| 82 |
+
--color-accent: var(--color-accent);
|
| 83 |
+
--color-muted: var(--color-muted);
|
| 84 |
+
--color-border: var(--color-border);
|
| 85 |
+
--color-destructive: var(--color-destructive);
|
| 86 |
+
--color-ring: var(--color-ring);
|
| 87 |
+
--font-sans: var(--font-sans);
|
| 88 |
+
--font-mono: var(--font-mono);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
* {
|
| 92 |
box-sizing: border-box;
|
| 93 |
}
|
| 94 |
|
| 95 |
+
html {
|
| 96 |
+
font-family: var(--font-sans);
|
| 97 |
+
font-size: var(--font-base);
|
| 98 |
+
line-height: var(--leading-normal);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
body {
|
| 102 |
+
background: var(--color-background);
|
| 103 |
+
color: var(--color-foreground);
|
| 104 |
font-family: var(--font-sans);
|
| 105 |
+
-webkit-font-smoothing: antialiased;
|
| 106 |
+
-moz-osx-font-smoothing: grayscale;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
/* Claymorphism utility classes */
|
| 110 |
+
.clay-card {
|
| 111 |
+
background: var(--color-background);
|
| 112 |
+
border: 2px solid var(--color-border);
|
| 113 |
+
border-radius: 16px;
|
| 114 |
+
box-shadow: var(--shadow-clay-md);
|
| 115 |
+
transition: box-shadow 200ms ease-out, transform 150ms ease-out;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
@media (prefers-color-scheme: dark) {
|
| 119 |
+
.clay-card {
|
| 120 |
+
box-shadow: var(--shadow-clay-dark-md);
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.clay-card:hover {
|
| 125 |
+
box-shadow: var(--shadow-clay-lg);
|
| 126 |
+
transform: translateY(-2px);
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
@media (prefers-color-scheme: dark) {
|
| 130 |
+
.clay-card:hover {
|
| 131 |
+
box-shadow: var(--shadow-clay-dark-lg);
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.clay-card:active {
|
| 136 |
+
box-shadow: var(--shadow-clay-press);
|
| 137 |
+
transform: translateY(0);
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
@media (prefers-color-scheme: dark) {
|
| 141 |
+
.clay-card:active {
|
| 142 |
+
box-shadow: var(--shadow-clay-dark-press);
|
| 143 |
+
}
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.clay-button {
|
| 147 |
+
background: var(--color-background);
|
| 148 |
+
border: 2px solid var(--color-border);
|
| 149 |
+
border-radius: 12px;
|
| 150 |
+
box-shadow: var(--shadow-clay-sm);
|
| 151 |
+
color: var(--color-foreground);
|
| 152 |
+
font-family: var(--font-sans);
|
| 153 |
+
font-weight: 500;
|
| 154 |
+
transition: all 150ms ease-out;
|
| 155 |
+
cursor: pointer;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
@media (prefers-color-scheme: dark) {
|
| 159 |
+
.clay-button {
|
| 160 |
+
box-shadow: var(--shadow-clay-dark-sm);
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.clay-button:hover {
|
| 165 |
+
box-shadow: var(--shadow-clay-md);
|
| 166 |
+
transform: translateY(-1px);
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
@media (prefers-color-scheme: dark) {
|
| 170 |
+
.clay-button:hover {
|
| 171 |
+
box-shadow: var(--shadow-clay-dark-md);
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.clay-button:active {
|
| 176 |
+
box-shadow: var(--shadow-clay-press);
|
| 177 |
+
transform: translateY(0);
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
@media (prefers-color-scheme: dark) {
|
| 181 |
+
.clay-button:active {
|
| 182 |
+
box-shadow: var(--shadow-clay-dark-press);
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.clay-button-primary {
|
| 187 |
+
background: var(--color-primary);
|
| 188 |
+
border: 2px solid var(--color-primary);
|
| 189 |
+
color: var(--color-on-primary);
|
| 190 |
+
box-shadow: var(--shadow-clay-sm);
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
@media (prefers-color-scheme: dark) {
|
| 194 |
+
.clay-button-primary {
|
| 195 |
+
box-shadow: var(--shadow-clay-dark-sm);
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
.clay-button-primary:hover {
|
| 200 |
+
box-shadow: var(--shadow-clay-md);
|
| 201 |
+
filter: brightness(1.1);
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
@media (prefers-color-scheme: dark) {
|
| 205 |
+
.clay-button-primary:hover {
|
| 206 |
+
box-shadow: var(--shadow-clay-dark-md);
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.clay-button-primary:active {
|
| 211 |
+
box-shadow: var(--shadow-clay-press);
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
@media (prefers-color-scheme: dark) {
|
| 215 |
+
.clay-button-primary:active {
|
| 216 |
+
box-shadow: var(--shadow-clay-dark-press);
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
.clay-button-accent {
|
| 221 |
+
background: var(--color-accent);
|
| 222 |
+
border: 2px solid var(--color-accent);
|
| 223 |
+
color: #FFFFFF;
|
| 224 |
+
box-shadow: var(--shadow-clay-sm);
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
@media (prefers-color-scheme: dark) {
|
| 228 |
+
.clay-button-accent {
|
| 229 |
+
box-shadow: var(--shadow-clay-dark-sm);
|
| 230 |
+
}
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.clay-button-accent:hover {
|
| 234 |
+
box-shadow: var(--shadow-clay-md);
|
| 235 |
+
filter: brightness(1.1);
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
@media (prefers-color-scheme: dark) {
|
| 239 |
+
.clay-button-accent:hover {
|
| 240 |
+
box-shadow: var(--shadow-clay-dark-md);
|
| 241 |
+
}
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.clay-button-accent:active {
|
| 245 |
+
box-shadow: var(--shadow-clay-press);
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
@media (prefers-color-scheme: dark) {
|
| 249 |
+
.clay-button-accent:active {
|
| 250 |
+
box-shadow: var(--shadow-clay-dark-press);
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
.clay-input {
|
| 255 |
+
background: var(--color-muted);
|
| 256 |
+
border: 2px solid var(--color-border);
|
| 257 |
+
border-radius: 10px;
|
| 258 |
+
color: var(--color-foreground);
|
| 259 |
+
font-family: var(--font-mono);
|
| 260 |
+
padding: 0.5rem 0.75rem;
|
| 261 |
+
box-shadow: var(--shadow-clay-inset);
|
| 262 |
+
transition: all 150ms ease-out;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
@media (prefers-color-scheme: dark) {
|
| 266 |
+
.clay-input {
|
| 267 |
+
box-shadow: var(--shadow-clay-dark-inset);
|
| 268 |
+
}
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.clay-input:focus {
|
| 272 |
+
outline: none;
|
| 273 |
+
border-color: var(--color-primary);
|
| 274 |
+
box-shadow: var(--shadow-clay-inset), 0 0 0 3px var(--color-ring);
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
@media (prefers-color-scheme: dark) {
|
| 278 |
+
.clay-input:focus {
|
| 279 |
+
box-shadow: var(--shadow-clay-dark-inset), 0 0 0 3px var(--color-ring);
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
.clay-slider {
|
| 284 |
+
-webkit-appearance: none;
|
| 285 |
+
appearance: none;
|
| 286 |
+
background: var(--color-muted);
|
| 287 |
+
border-radius: 9999px;
|
| 288 |
+
height: 8px;
|
| 289 |
+
outline: none;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
.clay-slider::-webkit-slider-thumb {
|
| 293 |
+
-webkit-appearance: none;
|
| 294 |
+
appearance: none;
|
| 295 |
+
width: 20px;
|
| 296 |
+
height: 20px;
|
| 297 |
+
border-radius: 50%;
|
| 298 |
+
background: var(--color-primary);
|
| 299 |
+
cursor: pointer;
|
| 300 |
+
border: 3px solid var(--color-background);
|
| 301 |
+
box-shadow: var(--shadow-clay-sm);
|
| 302 |
+
transition: all 150ms ease-out;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
@media (prefers-color-scheme: dark) {
|
| 306 |
+
.clay-slider::-webkit-slider-thumb {
|
| 307 |
+
box-shadow: var(--shadow-clay-dark-sm);
|
| 308 |
+
}
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.clay-slider::-webkit-slider-thumb:hover {
|
| 312 |
+
transform: scale(1.15);
|
| 313 |
+
box-shadow: var(--shadow-clay-md);
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
@media (prefers-color-scheme: dark) {
|
| 317 |
+
.clay-slider::-webkit-slider-thumb:hover {
|
| 318 |
+
box-shadow: var(--shadow-clay-dark-md);
|
| 319 |
+
}
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.clay-slider::-moz-range-thumb {
|
| 323 |
+
width: 20px;
|
| 324 |
+
height: 20px;
|
| 325 |
+
border-radius: 50%;
|
| 326 |
+
background: var(--color-primary);
|
| 327 |
+
cursor: pointer;
|
| 328 |
+
border: 3px solid var(--color-background);
|
| 329 |
+
box-shadow: var(--shadow-clay-sm);
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
@media (prefers-color-scheme: dark) {
|
| 333 |
+
.clay-slider::-moz-range-thumb {
|
| 334 |
+
box-shadow: var(--shadow-clay-dark-sm);
|
| 335 |
+
}
|
| 336 |
}
|
| 337 |
|
| 338 |
/* Custom scrollbar */
|
|
|
|
| 346 |
}
|
| 347 |
|
| 348 |
::-webkit-scrollbar-thumb {
|
| 349 |
+
background: var(--color-border);
|
| 350 |
border-radius: 4px;
|
| 351 |
+
border: 2px solid var(--color-background);
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
@media (prefers-color-scheme: dark) {
|
| 355 |
+
::-webkit-scrollbar-thumb {
|
| 356 |
+
border: 2px solid var(--color-background);
|
| 357 |
+
}
|
| 358 |
}
|
| 359 |
|
| 360 |
::-webkit-scrollbar-thumb:hover {
|
| 361 |
+
background: var(--color-primary);
|
| 362 |
}
|
| 363 |
|
| 364 |
/* Focus visible styles */
|
| 365 |
:focus-visible {
|
| 366 |
+
outline: 2px solid var(--color-ring);
|
| 367 |
outline-offset: 2px;
|
| 368 |
}
|
| 369 |
|
|
|
|
| 379 |
}
|
| 380 |
}
|
| 381 |
|
| 382 |
+
@keyframes fade-in {
|
| 383 |
+
from { opacity: 0; }
|
| 384 |
+
to { opacity: 1; }
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
@keyframes scale-in {
|
| 388 |
+
from { opacity: 0; transform: scale(0.95); }
|
| 389 |
+
to { opacity: 1; transform: scale(1); }
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
@keyframes pulse-soft {
|
| 393 |
+
0%, 100% { opacity: 1; }
|
| 394 |
+
50% { opacity: 0.7; }
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
.animate-slide-in {
|
| 398 |
animation: slide-in 0.3s ease-out;
|
| 399 |
}
|
| 400 |
|
| 401 |
+
.animate-fade-in {
|
| 402 |
+
animation: fade-in 0.2s ease-out;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
.animate-scale-in {
|
| 406 |
+
animation: scale-in 0.2s ease-out;
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
.animate-pulse-soft {
|
| 410 |
+
animation: pulse-soft 2s ease-in-out infinite;
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
/* Canvas styles */
|
| 414 |
canvas {
|
| 415 |
display: block;
|
|
|
|
| 417 |
|
| 418 |
/* Selection styles */
|
| 419 |
::selection {
|
| 420 |
+
background: var(--color-primary);
|
| 421 |
+
color: var(--color-on-primary);
|
| 422 |
}
|
| 423 |
|
| 424 |
+
/* Reduced motion */
|
| 425 |
+
@media (prefers-reduced-motion: reduce) {
|
| 426 |
+
*,
|
| 427 |
+
*::before,
|
| 428 |
+
*::after {
|
| 429 |
+
animation-duration: 0.01ms !important;
|
| 430 |
+
animation-iteration-count: 1 !important;
|
| 431 |
+
transition-duration: 0.01ms !important;
|
| 432 |
+
scroll-behavior: auto !important;
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
/* Claymorphism number input */
|
| 437 |
+
input[type="number"].clay-number {
|
| 438 |
-webkit-appearance: none;
|
| 439 |
appearance: none;
|
| 440 |
}
|
| 441 |
|
| 442 |
+
input[type="number"].clay-number::-webkit-inner-spin-button,
|
| 443 |
+
input[type="number"].clay-number::-webkit-outer-spin-button {
|
| 444 |
-webkit-appearance: none;
|
| 445 |
appearance: none;
|
| 446 |
+
margin: 0;
|
| 447 |
+
width: 20px;
|
| 448 |
+
height: 20px;
|
| 449 |
+
background: var(--color-muted);
|
| 450 |
+
border: 2px solid var(--color-border);
|
| 451 |
+
border-radius: 8px;
|
| 452 |
+
color: var(--color-primary);
|
| 453 |
+
font-family: var(--font-mono);
|
| 454 |
+
display: flex;
|
| 455 |
+
align-items: center;
|
| 456 |
+
justify-content: center;
|
| 457 |
}
|
| 458 |
|
| 459 |
+
@media (prefers-color-scheme: dark) {
|
| 460 |
+
input[type="number"].clay-number::-webkit-inner-spin-button,
|
| 461 |
+
input[type="number"].clay-number::-webkit-outer-spin-button {
|
| 462 |
+
background: var(--color-muted);
|
| 463 |
+
border-color: var(--color-border);
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
/* Tooltip styles */
|
| 468 |
+
.tooltip {
|
| 469 |
+
position: relative;
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
.tooltip::before {
|
| 473 |
+
content: attr(data-tooltip);
|
| 474 |
+
position: absolute;
|
| 475 |
+
bottom: 100%;
|
| 476 |
+
left: 50%;
|
| 477 |
+
transform: translateX(-50%);
|
| 478 |
+
padding: 0.5rem 0.75rem;
|
| 479 |
+
background: var(--color-foreground);
|
| 480 |
+
color: var(--color-background);
|
| 481 |
+
font-size: 0.75rem;
|
| 482 |
+
font-family: var(--font-sans);
|
| 483 |
+
border-radius: 8px;
|
| 484 |
+
white-space: nowrap;
|
| 485 |
+
opacity: 0;
|
| 486 |
+
visibility: hidden;
|
| 487 |
+
transition: all 200ms ease-out;
|
| 488 |
+
pointer-events: none;
|
| 489 |
+
z-index: 50;
|
| 490 |
+
margin-bottom: 0.5rem;
|
| 491 |
+
box-shadow: var(--shadow-clay-lg);
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
@media (prefers-color-scheme: dark) {
|
| 495 |
+
.tooltip::before {
|
| 496 |
+
box-shadow: var(--shadow-clay-dark-lg);
|
| 497 |
+
}
|
| 498 |
}
|
| 499 |
|
| 500 |
+
.tooltip:hover::before,
|
| 501 |
+
.tooltip:focus-within::before {
|
|
|
|
| 502 |
opacity: 1;
|
| 503 |
+
visibility: visible;
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
/* Badge styles */
|
| 507 |
+
.badge {
|
| 508 |
+
display: inline-flex;
|
| 509 |
+
align-items: center;
|
| 510 |
+
padding: 0.25rem 0.5rem;
|
| 511 |
+
font-size: 0.7rem;
|
| 512 |
+
font-weight: 600;
|
| 513 |
+
border-radius: 9999px;
|
| 514 |
+
font-family: var(--font-sans);
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
.badge-primary {
|
| 518 |
+
background: var(--color-primary);
|
| 519 |
+
color: var(--color-on-primary);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
.badge-secondary {
|
| 523 |
+
background: var(--color-secondary);
|
| 524 |
+
color: var(--color-on-primary);
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
.badge-accent {
|
| 528 |
+
background: var(--color-accent);
|
| 529 |
+
color: white;
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
.badge-muted {
|
| 533 |
+
background: var(--color-muted);
|
| 534 |
+
color: var(--color-foreground);
|
| 535 |
+
border: 1px solid var(--color-border);
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
.badge-outline {
|
| 539 |
+
background: transparent;
|
| 540 |
+
color: var(--color-foreground);
|
| 541 |
+
border: 1px solid var(--color-border);
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
/* Card header */
|
| 545 |
+
.card-header {
|
| 546 |
+
padding: var(--space-4) var(--space-4) var(--space-2);
|
| 547 |
+
border-bottom: 1px solid var(--color-border);
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
/* Divider */
|
| 551 |
+
.divider {
|
| 552 |
+
height: 1px;
|
| 553 |
+
background: var(--color-border);
|
| 554 |
+
border: none;
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
/* Code block */
|
| 558 |
+
.code-block {
|
| 559 |
+
background: var(--color-muted);
|
| 560 |
+
border: 1px solid var(--color-border);
|
| 561 |
+
border-radius: 10px;
|
| 562 |
+
padding: var(--space-4);
|
| 563 |
+
font-family: var(--font-mono);
|
| 564 |
+
font-size: 0.875rem;
|
| 565 |
+
overflow-x: auto;
|
| 566 |
+
box-shadow: var(--shadow-clay-inset);
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
@media (prefers-color-scheme: dark) {
|
| 570 |
+
.code-block {
|
| 571 |
+
box-shadow: var(--shadow-clay-dark-inset);
|
| 572 |
+
}
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
/* Loading spinner */
|
| 576 |
+
.spinner {
|
| 577 |
+
width: 32px;
|
| 578 |
+
height: 32px;
|
| 579 |
+
border: 3px solid var(--color-border);
|
| 580 |
+
border-top-color: var(--color-primary);
|
| 581 |
+
border-radius: 50%;
|
| 582 |
+
animation: spin 0.8s linear infinite;
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
@keyframes spin {
|
| 586 |
+
to { transform: rotate(360deg); }
|
| 587 |
}
|
src/components/ui/Badge.tsx
CHANGED
|
@@ -4,25 +4,26 @@ import { forwardRef, HTMLAttributes } from 'react'
|
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
| 7 |
-
variant?: '
|
| 8 |
}
|
| 9 |
|
| 10 |
export const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
|
| 11 |
-
({ className, variant = '
|
| 12 |
const variants = {
|
| 13 |
-
|
| 14 |
-
secondary: '
|
| 15 |
success: 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300',
|
| 16 |
warning: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300',
|
| 17 |
danger: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300',
|
| 18 |
-
outline: '
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
return (
|
| 22 |
<span
|
| 23 |
ref={ref}
|
| 24 |
className={cn(
|
| 25 |
-
'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium',
|
| 26 |
variants[variant],
|
| 27 |
className
|
| 28 |
)}
|
|
|
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
| 7 |
+
variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'outline' | 'muted'
|
| 8 |
}
|
| 9 |
|
| 10 |
export const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
|
| 11 |
+
({ className, variant = 'primary', children, ...props }, ref) => {
|
| 12 |
const variants = {
|
| 13 |
+
primary: 'badge-primary',
|
| 14 |
+
secondary: 'badge-secondary',
|
| 15 |
success: 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300',
|
| 16 |
warning: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300',
|
| 17 |
danger: 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300',
|
| 18 |
+
outline: 'badge-outline',
|
| 19 |
+
muted: 'badge-muted',
|
| 20 |
}
|
| 21 |
|
| 22 |
return (
|
| 23 |
<span
|
| 24 |
ref={ref}
|
| 25 |
className={cn(
|
| 26 |
+
'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium badge',
|
| 27 |
variants[variant],
|
| 28 |
className
|
| 29 |
)}
|
src/components/ui/Button.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef, ButtonHTMLAttributes } from 'react'
|
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
| 7 |
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'
|
| 8 |
size?: 'sm' | 'md' | 'lg' | 'icon'
|
| 9 |
loading?: boolean
|
| 10 |
}
|
|
@@ -12,21 +12,22 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
| 12 |
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
| 13 |
({ className, variant = 'primary', size = 'md', loading, disabled, children, ...props }, ref) => {
|
| 14 |
const baseStyles =
|
| 15 |
-
'inline-flex items-center justify-center font-medium transition-
|
| 16 |
|
| 17 |
const variants = {
|
| 18 |
-
primary: '
|
| 19 |
-
secondary: '
|
| 20 |
-
outline: '
|
| 21 |
-
ghost: 'bg-transparent hover:
|
| 22 |
-
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
const sizes = {
|
| 26 |
-
sm: 'h-8 px-3 text-sm gap-1.5',
|
| 27 |
-
md: 'h-10 px-4 text-sm gap-2',
|
| 28 |
-
lg: 'h-12 px-6 text-base gap-2',
|
| 29 |
-
icon: 'h-10 w-10',
|
| 30 |
}
|
| 31 |
|
| 32 |
return (
|
|
|
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
| 7 |
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'accent' | 'danger'
|
| 8 |
size?: 'sm' | 'md' | 'lg' | 'icon'
|
| 9 |
loading?: boolean
|
| 10 |
}
|
|
|
|
| 12 |
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
| 13 |
({ className, variant = 'primary', size = 'md', loading, disabled, children, ...props }, ref) => {
|
| 14 |
const baseStyles =
|
| 15 |
+
'inline-flex items-center justify-center font-medium transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50'
|
| 16 |
|
| 17 |
const variants = {
|
| 18 |
+
primary: 'clay-button-primary',
|
| 19 |
+
secondary: 'clay-button',
|
| 20 |
+
outline: 'clay-button border-2',
|
| 21 |
+
ghost: 'bg-transparent hover:clay-card text-inherit p-0',
|
| 22 |
+
accent: 'clay-button-accent',
|
| 23 |
+
danger: 'clay-button clay-button-accent bg-red-500 border-red-500 text-white',
|
| 24 |
}
|
| 25 |
|
| 26 |
const sizes = {
|
| 27 |
+
sm: 'h-8 px-3 text-sm gap-1.5 rounded-lg',
|
| 28 |
+
md: 'h-10 px-4 text-sm gap-2 rounded-xl',
|
| 29 |
+
lg: 'h-12 px-6 text-base gap-2 rounded-xl',
|
| 30 |
+
icon: 'h-10 w-10 rounded-xl',
|
| 31 |
}
|
| 32 |
|
| 33 |
return (
|
src/components/ui/Card.tsx
CHANGED
|
@@ -10,15 +10,15 @@ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
| 10 |
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
| 11 |
({ className, variant = 'default', children, ...props }, ref) => {
|
| 12 |
const variants = {
|
| 13 |
-
default: '
|
| 14 |
-
outlined: '
|
| 15 |
-
elevated: '
|
| 16 |
}
|
| 17 |
|
| 18 |
return (
|
| 19 |
<div
|
| 20 |
ref={ref}
|
| 21 |
-
className={cn('rounded-
|
| 22 |
{...props}
|
| 23 |
>
|
| 24 |
{children}
|
|
@@ -31,7 +31,7 @@ Card.displayName = 'Card'
|
|
| 31 |
|
| 32 |
export const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
| 33 |
({ className, children, ...props }, ref) => (
|
| 34 |
-
<div ref={ref} className={cn('px-6 py-4 border-b border-
|
| 35 |
{children}
|
| 36 |
</div>
|
| 37 |
)
|
|
@@ -41,7 +41,7 @@ CardHeader.displayName = 'CardHeader'
|
|
| 41 |
|
| 42 |
export const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(
|
| 43 |
({ className, children, ...props }, ref) => (
|
| 44 |
-
<h3 ref={ref} className={cn('text-lg font-semibold text-
|
| 45 |
{children}
|
| 46 |
</h3>
|
| 47 |
)
|
|
@@ -51,7 +51,7 @@ CardTitle.displayName = 'CardTitle'
|
|
| 51 |
|
| 52 |
export const CardDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
|
| 53 |
({ className, children, ...props }, ref) => (
|
| 54 |
-
<p ref={ref} className={cn('text-sm text-
|
| 55 |
{children}
|
| 56 |
</p>
|
| 57 |
)
|
|
@@ -71,7 +71,7 @@ CardContent.displayName = 'CardContent'
|
|
| 71 |
|
| 72 |
export const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
| 73 |
({ className, children, ...props }, ref) => (
|
| 74 |
-
<div ref={ref} className={cn('px-6 py-4 border-t border-
|
| 75 |
{children}
|
| 76 |
</div>
|
| 77 |
)
|
|
|
|
| 10 |
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
| 11 |
({ className, variant = 'default', children, ...props }, ref) => {
|
| 12 |
const variants = {
|
| 13 |
+
default: 'clay-card',
|
| 14 |
+
outlined: 'clay-card border-2',
|
| 15 |
+
elevated: 'clay-card shadow-lg',
|
| 16 |
}
|
| 17 |
|
| 18 |
return (
|
| 19 |
<div
|
| 20 |
ref={ref}
|
| 21 |
+
className={cn('rounded-2xl', variants[variant], className)}
|
| 22 |
{...props}
|
| 23 |
>
|
| 24 |
{children}
|
|
|
|
| 31 |
|
| 32 |
export const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
| 33 |
({ className, children, ...props }, ref) => (
|
| 34 |
+
<div ref={ref} className={cn('px-6 py-4 border-b border-current/20', className)} {...props}>
|
| 35 |
{children}
|
| 36 |
</div>
|
| 37 |
)
|
|
|
|
| 41 |
|
| 42 |
export const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(
|
| 43 |
({ className, children, ...props }, ref) => (
|
| 44 |
+
<h3 ref={ref} className={cn('text-lg font-semibold text-current', className)} {...props}>
|
| 45 |
{children}
|
| 46 |
</h3>
|
| 47 |
)
|
|
|
|
| 51 |
|
| 52 |
export const CardDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
|
| 53 |
({ className, children, ...props }, ref) => (
|
| 54 |
+
<p ref={ref} className={cn('text-sm text-current/70 mt-1', className)} {...props}>
|
| 55 |
{children}
|
| 56 |
</p>
|
| 57 |
)
|
|
|
|
| 71 |
|
| 72 |
export const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
| 73 |
({ className, children, ...props }, ref) => (
|
| 74 |
+
<div ref={ref} className={cn('px-6 py-4 border-t border-current/20 flex items-center gap-2', className)} {...props}>
|
| 75 |
{children}
|
| 76 |
</div>
|
| 77 |
)
|
src/components/ui/Input.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
| 18 |
{label && (
|
| 19 |
<label
|
| 20 |
htmlFor={inputId}
|
| 21 |
-
className="block text-sm font-medium text-
|
| 22 |
>
|
| 23 |
{label}
|
| 24 |
</label>
|
|
@@ -27,11 +27,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
| 27 |
ref={ref}
|
| 28 |
id={inputId}
|
| 29 |
className={cn(
|
| 30 |
-
'
|
| 31 |
-
'placeholder:text-gray-400',
|
| 32 |
-
'focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent',
|
| 33 |
-
'disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-100',
|
| 34 |
-
'dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 dark:placeholder:text-gray-500',
|
| 35 |
error && 'border-red-500 focus:ring-red-500',
|
| 36 |
className
|
| 37 |
)}
|
|
@@ -45,7 +41,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
| 45 |
</p>
|
| 46 |
)}
|
| 47 |
{helperText && !error && (
|
| 48 |
-
<p id={`${inputId}-helper`} className="mt-1 text-sm text-
|
| 49 |
{helperText}
|
| 50 |
</p>
|
| 51 |
)}
|
|
@@ -54,6 +50,4 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
| 54 |
}
|
| 55 |
)
|
| 56 |
|
| 57 |
-
Input.displayName = 'Input'
|
| 58 |
-
|
| 59 |
-
// Removed empty LabelProps interface - using LabelHTMLAttributes directly
|
|
|
|
| 18 |
{label && (
|
| 19 |
<label
|
| 20 |
htmlFor={inputId}
|
| 21 |
+
className="block text-sm font-medium text-current mb-1"
|
| 22 |
>
|
| 23 |
{label}
|
| 24 |
</label>
|
|
|
|
| 27 |
ref={ref}
|
| 28 |
id={inputId}
|
| 29 |
className={cn(
|
| 30 |
+
'clay-input clay-number',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
error && 'border-red-500 focus:ring-red-500',
|
| 32 |
className
|
| 33 |
)}
|
|
|
|
| 41 |
</p>
|
| 42 |
)}
|
| 43 |
{helperText && !error && (
|
| 44 |
+
<p id={`${inputId}-helper`} className="mt-1 text-sm text-current/70">
|
| 45 |
{helperText}
|
| 46 |
</p>
|
| 47 |
)}
|
|
|
|
| 50 |
}
|
| 51 |
)
|
| 52 |
|
| 53 |
+
Input.displayName = 'Input'
|
|
|
|
|
|
src/components/ui/Select.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
-
import { forwardRef, SelectHTMLAttributes, OptionHTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
@@ -19,7 +19,7 @@ export const Select = forwardRef<HTMLSelectElement, SelectProps>(
|
|
| 19 |
{label && (
|
| 20 |
<label
|
| 21 |
htmlFor={selectId}
|
| 22 |
-
className="block text-sm font-medium text-
|
| 23 |
>
|
| 24 |
{label}
|
| 25 |
</label>
|
|
@@ -28,10 +28,7 @@ export const Select = forwardRef<HTMLSelectElement, SelectProps>(
|
|
| 28 |
ref={ref}
|
| 29 |
id={selectId}
|
| 30 |
className={cn(
|
| 31 |
-
'
|
| 32 |
-
'focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent',
|
| 33 |
-
'disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-100',
|
| 34 |
-
'dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100',
|
| 35 |
error && 'border-red-500 focus:ring-red-500',
|
| 36 |
className
|
| 37 |
)}
|
|
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
+
import React, { forwardRef, SelectHTMLAttributes, OptionHTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
|
|
| 19 |
{label && (
|
| 20 |
<label
|
| 21 |
htmlFor={selectId}
|
| 22 |
+
className="block text-sm font-medium text-current mb-1"
|
| 23 |
>
|
| 24 |
{label}
|
| 25 |
</label>
|
|
|
|
| 28 |
ref={ref}
|
| 29 |
id={selectId}
|
| 30 |
className={cn(
|
| 31 |
+
'clay-input',
|
|
|
|
|
|
|
|
|
|
| 32 |
error && 'border-red-500 focus:ring-red-500',
|
| 33 |
className
|
| 34 |
)}
|
src/components/ui/Slider.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
-
import { forwardRef, InputHTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
@@ -22,11 +22,11 @@ export const Slider = forwardRef<HTMLInputElement, SliderProps>(
|
|
| 22 |
<div className={cn('w-full', className)}>
|
| 23 |
{label && (
|
| 24 |
<div className="flex items-center justify-between mb-1">
|
| 25 |
-
<label htmlFor={sliderId} className="text-sm font-medium text-
|
| 26 |
{label}
|
| 27 |
</label>
|
| 28 |
{showValue && (
|
| 29 |
-
<span className="text-sm text-
|
| 30 |
{valueFormat ? valueFormat(value) : value}
|
| 31 |
</span>
|
| 32 |
)}
|
|
@@ -41,17 +41,12 @@ export const Slider = forwardRef<HTMLInputElement, SliderProps>(
|
|
| 41 |
step={step}
|
| 42 |
value={value}
|
| 43 |
onChange={(e) => onValueChange(Number(e.target.value))}
|
| 44 |
-
className={cn(
|
| 45 |
-
'w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer',
|
| 46 |
-
'accent-blue-600 dark:bg-gray-700',
|
| 47 |
-
'focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2',
|
| 48 |
-
'disabled:cursor-not-allowed disabled:opacity-50'
|
| 49 |
-
)}
|
| 50 |
{...props}
|
| 51 |
/>
|
| 52 |
</div>
|
| 53 |
)
|
| 54 |
-
|
| 55 |
)
|
| 56 |
|
| 57 |
-
Slider.displayName = 'Slider'
|
|
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
+
import React, { forwardRef, InputHTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
|
|
| 22 |
<div className={cn('w-full', className)}>
|
| 23 |
{label && (
|
| 24 |
<div className="flex items-center justify-between mb-1">
|
| 25 |
+
<label htmlFor={sliderId} className="text-sm font-medium text-current">
|
| 26 |
{label}
|
| 27 |
</label>
|
| 28 |
{showValue && (
|
| 29 |
+
<span className="text-sm text-current/70 font-mono">
|
| 30 |
{valueFormat ? valueFormat(value) : value}
|
| 31 |
</span>
|
| 32 |
)}
|
|
|
|
| 41 |
step={step}
|
| 42 |
value={value}
|
| 43 |
onChange={(e) => onValueChange(Number(e.target.value))}
|
| 44 |
+
className={cn('clay-slider', className)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
{...props}
|
| 46 |
/>
|
| 47 |
</div>
|
| 48 |
)
|
| 49 |
+
)
|
| 50 |
)
|
| 51 |
|
| 52 |
+
Slider.displayName = 'Slider'
|
src/components/ui/Slider.tsx.bak
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use client'
|
| 2 |
+
|
| 3 |
+
import React, { forwardRef, InputHTMLAttributes } from 'react'
|
| 4 |
+
import { cn } from '@/utils/helpers'
|
| 5 |
+
|
| 6 |
+
export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
| 7 |
+
label?: string
|
| 8 |
+
min: number
|
| 9 |
+
max: number
|
| 10 |
+
step?: number
|
| 11 |
+
value: number
|
| 12 |
+
onValueChange: (value: number) => void
|
| 13 |
+
showValue?: boolean
|
| 14 |
+
valueFormat?: (value: number) => string
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
export const Slider = forwardRef<HTMLInputElement, SliderProps>(
|
| 18 |
+
({ className, label, min, max, step = 1, value, onValueChange, showValue = false, valueFormat, ...props }, ref) => {
|
| 19 |
+
const sliderId = label?.toLowerCase().replace(/\s+/g, '-')
|
| 20 |
+
|
| 21 |
+
return (
|
| 22 |
+
<div className={cn('w-full', className)}>
|
| 23 |
+
{label && (
|
| 24 |
+
<div className="flex items-center justify-between mb-1">
|
| 25 |
+
<label htmlFor={sliderId} className="text-sm font-medium text-current">
|
| 26 |
+
{label}
|
| 27 |
+
</label>
|
| 28 |
+
{showValue && (
|
| 29 |
+
<span className="text-sm text-current/70 font-mono">
|
| 30 |
+
{valueFormat ? valueFormat(value) : value}
|
| 31 |
+
</span>
|
| 32 |
+
)}
|
| 33 |
+
</div>
|
| 34 |
+
)}
|
| 35 |
+
<input
|
| 36 |
+
ref={ref}
|
| 37 |
+
id={sliderId}
|
| 38 |
+
type="range"
|
| 39 |
+
min={min}
|
| 40 |
+
max={max}
|
| 41 |
+
step={step}
|
| 42 |
+
value={value}
|
| 43 |
+
onChange={(e) => onValueChange(Number(e.target.value))}
|
| 44 |
+
className={cn('clay-slider', className)}
|
| 45 |
+
{...props}
|
| 46 |
+
/>
|
| 47 |
+
</div>
|
| 48 |
+
)
|
| 49 |
+
)
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
Slider.displayName = 'Slider'
|
src/components/ui/TestSlider.tsx
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use client'
|
| 2 |
+
|
| 3 |
+
import React, { forwardRef, InputHTMLAttributes } from 'react'
|
| 4 |
+
import { cn } from '@/utils/helpers'
|
| 5 |
+
|
| 6 |
+
export interface TestSliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
| 7 |
+
label?: string
|
| 8 |
+
min: number
|
| 9 |
+
max: number
|
| 10 |
+
step?: number
|
| 11 |
+
value: number
|
| 12 |
+
onValueChange: (value: number) => void
|
| 13 |
+
showValue?: boolean
|
| 14 |
+
valueFormat?: (value: number) => string
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
export const TestSlider = forwardRef<HTMLInputElement, TestSliderProps>(
|
| 18 |
+
({ className, label, min, max, step = 1, value, onValueChange, showValue = false, valueFormat, ...props }, ref) => {
|
| 19 |
+
const sliderId = label?.toLowerCase().replace(/\s+/g, '-')
|
| 20 |
+
|
| 21 |
+
return (
|
| 22 |
+
<div className={cn('w-full', className)}>
|
| 23 |
+
{label && (
|
| 24 |
+
<div className="flex items-center justify-between mb-1">
|
| 25 |
+
<label htmlFor={sliderId} className="text-sm font-medium text-current">
|
| 26 |
+
{label}
|
| 27 |
+
</label>
|
| 28 |
+
{showValue && (
|
| 29 |
+
<span className="text-sm text-current/70 font-mono">
|
| 30 |
+
{valueFormat ? valueFormat(value) : value}
|
| 31 |
+
</span>
|
| 32 |
+
)}
|
| 33 |
+
</div>
|
| 34 |
+
)}
|
| 35 |
+
<input
|
| 36 |
+
ref={ref}
|
| 37 |
+
id={sliderId}
|
| 38 |
+
type="range"
|
| 39 |
+
min={min}
|
| 40 |
+
max={max}
|
| 41 |
+
step={step}
|
| 42 |
+
value={value}
|
| 43 |
+
onChange={(e) => onValueChange(Number(e.target.value))}
|
| 44 |
+
className={cn('clay-slider', className)}
|
| 45 |
+
{...props}
|
| 46 |
+
/>
|
| 47 |
+
</div>
|
| 48 |
+
)
|
| 49 |
+
)
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
TestSlider.displayName = 'TestSlider'
|
src/components/ui/Tooltip.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
-
import { forwardRef, HTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -23,12 +23,12 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
|
|
| 23 |
}
|
| 24 |
|
| 25 |
return (
|
| 26 |
-
<div ref={ref} className={cn('relative inline-block', className)} {...props}>
|
| 27 |
{children}
|
| 28 |
<div
|
| 29 |
className={cn(
|
| 30 |
-
'absolute z-50 px-
|
| 31 |
-
'opacity-0 invisible transition-all duration-200',
|
| 32 |
'group-hover:opacity-100 group-hover:visible',
|
| 33 |
'whitespace-nowrap',
|
| 34 |
positions[position]
|
|
@@ -39,10 +39,10 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
|
|
| 39 |
<div
|
| 40 |
className={cn(
|
| 41 |
'absolute w-0 h-0 border-4 border-transparent',
|
| 42 |
-
position === 'top' && 'bottom-[-
|
| 43 |
-
position === 'bottom' && 'top-[-
|
| 44 |
-
position === 'left' && 'right-[-
|
| 45 |
-
position === 'right' && 'left-[-
|
| 46 |
)}
|
| 47 |
/>
|
| 48 |
</div>
|
|
@@ -52,6 +52,3 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
|
|
| 52 |
)
|
| 53 |
|
| 54 |
Tooltip.displayName = 'Tooltip'
|
| 55 |
-
|
| 56 |
-
// Need to import React
|
| 57 |
-
import React from 'react'
|
|
|
|
| 1 |
'use client'
|
| 2 |
|
| 3 |
+
import React, { forwardRef, HTMLAttributes } from 'react'
|
| 4 |
import { cn } from '@/utils/helpers'
|
| 5 |
|
| 6 |
export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
return (
|
| 26 |
+
<div ref={ref} className={cn('relative inline-block group', className)} {...props}>
|
| 27 |
{children}
|
| 28 |
<div
|
| 29 |
className={cn(
|
| 30 |
+
'absolute z-50 px-3 py-1.5 text-xs font-medium text-on-primary bg-primary rounded-lg',
|
| 31 |
+
'opacity-0 invisible transition-all duration-200 ease-out',
|
| 32 |
'group-hover:opacity-100 group-hover:visible',
|
| 33 |
'whitespace-nowrap',
|
| 34 |
positions[position]
|
|
|
|
| 39 |
<div
|
| 40 |
className={cn(
|
| 41 |
'absolute w-0 h-0 border-4 border-transparent',
|
| 42 |
+
position === 'top' && 'bottom-[-6px] left-1/2 -translate-x-1/2 border-t-primary',
|
| 43 |
+
position === 'bottom' && 'top-[-6px] left-1/2 -translate-x-1/2 border-b-primary',
|
| 44 |
+
position === 'left' && 'right-[-6px] top-1/2 -translate-y-1/2 border-l-primary',
|
| 45 |
+
position === 'right' && 'left-[-6px] top-1/2 -translate-y-1/2 border-r-primary'
|
| 46 |
)}
|
| 47 |
/>
|
| 48 |
</div>
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
Tooltip.displayName = 'Tooltip'
|
|
|
|
|
|
|
|
|
src/components/ui/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
export { Button } from './Button'
|
| 2 |
export { Input } from './Input'
|
| 3 |
export { Select } from './Select'
|
| 4 |
-
export { Slider } from './
|
| 5 |
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './Card'
|
| 6 |
export { Badge } from './Badge'
|
| 7 |
export { Tooltip } from './Tooltip'
|
|
|
|
| 1 |
export { Button } from './Button'
|
| 2 |
export { Input } from './Input'
|
| 3 |
export { Select } from './Select'
|
| 4 |
+
export { TestSlider as Slider } from './TestSlider'
|
| 5 |
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './Card'
|
| 6 |
export { Badge } from './Badge'
|
| 7 |
export { Tooltip } from './Tooltip'
|