@tolle_/tolle-ui 0.0.19-beta → 0.0.22-beta

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/theme.css CHANGED
@@ -1,208 +1,229 @@
1
1
  /* -------------------------------------------------------------------------- */
2
- /* 1. TAILWIND & CDK CORE IMPORTS */
2
+ /* 1. TAILWIND DIRECTIVES (MUST COME FIRST) */
3
3
  /* -------------------------------------------------------------------------- */
4
4
  @tailwind base;
5
5
  @tailwind components;
6
6
  @tailwind utilities;
7
7
 
8
8
  /* -------------------------------------------------------------------------- */
9
- /* 2. THEME VARIABLES (The Engine) - WITH FULL PALETTE */
9
+ /* 2. THEME VARIABLES (CSS CUSTOM PROPERTIES) */
10
10
  /* -------------------------------------------------------------------------- */
11
11
  :root {
12
- /* --- Configuration (Source of Truth) --- */
13
- --primary: #2563eb;
12
+ /* --- Core Colors --- */
13
+ --background: 255 255 255;
14
+ --foreground: 10 10 10;
15
+ --card: 255 255 255;
16
+ --card-foreground: 10 10 10;
17
+ --popover: 255 255 255;
18
+ --popover-foreground: 10 10 10;
19
+
20
+ /* --- Primary Colors --- */
21
+ --primary: 37 99 235; /* #2563eb in RGB */
22
+ --primary-foreground: 255 255 255;
23
+
24
+ /* --- Semantic Colors --- */
25
+ --secondary: 244 244 245; /* #f4f4f5 in RGB */
26
+ --secondary-foreground: 24 24 27;
27
+ --muted: 244 244 245;
28
+ --muted-foreground: 113 113 122;
29
+ --accent: 244 244 245;
30
+ --accent-foreground: 24 24 27;
31
+ --destructive: 239 68 68; /* #ef4444 in RGB */
32
+ --destructive-foreground: 250 250 250;
33
+
34
+ /* --- UI Elements --- */
35
+ --border: 228 228 231; /* #e4e4e7 in RGB */
36
+ --input: 228 228 231;
37
+ --ring: 96 165 250; /* #60a5fa in RGB - lighter blue */
14
38
  --radius: 0.5rem;
15
39
 
16
- /* --- Auto-Generated Full Palette (Defaults) --- */
17
- --primary-50: #eff6ff;
18
- --primary-100: #dbeafe;
19
- --primary-200: #bfdbfe;
20
- --primary-300: #93c5fd;
21
- --primary-400: #60a5fa;
22
- --primary-500: #3b82f6;
23
- --primary-600: #2563eb;
24
- --primary-700: #1d4ed8;
25
- --primary-800: #1e40af;
26
- --primary-900: #1e3a8a;
27
-
28
- /* --- Derived Colors (will be overridden by dynamic styles) --- */
29
- --primary-foreground: #ffffff;
30
- --secondary: color-mix(in srgb, var(--primary-200), transparent 40%);
31
- --secondary-foreground: var(--primary-900);
32
- --muted: color-mix(in srgb, var(--primary-50), #f3f4f6 50%);
33
- --muted-foreground: color-mix(in srgb, var(--primary-400), #4b5563 60%);
34
- --accent: color-mix(in srgb, var(--primary-100), transparent 70%);
35
- --accent-foreground: var(--primary-700);
36
- --ring: color-mix(in srgb, var(--primary-300), transparent 50%);
37
-
38
- /* --- Neutral/Layout Base --- */
39
- --background: #ffffff;
40
- --foreground: #020817;
41
- --border: #dddddd;
42
- --input: #e4e4e7;
43
- --destructive: #ef4444;
44
- --destructive-foreground: #f8fafc;
45
- --input-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
46
- --popover: #ffffff;
47
- --popover-foreground: #020817;
48
- }
49
-
50
- /* --- Dark Mode (Google/Charcoal Palette) --- */
40
+ /* --- Shadows --- */
41
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
42
+ --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
43
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
44
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
45
+ }
46
+
47
+ /* --- Dark Mode --- */
51
48
  .dark {
52
- --primary-50: #1e3a8a;
53
- --primary-100: #1e40af;
54
- --primary-200: #1d4ed8;
55
- --primary-300: #2563eb;
56
- --primary-400: #3b82f6;
57
- --primary-500: #60a5fa;
58
- --primary-600: #93c5fd;
59
- --primary-700: #bfdbfe;
60
- --primary-800: #dbeafe;
61
- --primary-900: #eff6ff;
62
-
63
- --background: #121212;
64
- --foreground: #e3e3e3;
65
- --secondary: #1f1f1f;
66
- --secondary-foreground: #ffffff;
67
- --muted: #2a2a2a;
68
- --muted-foreground: #9aa0a6;
69
- --border: #3c4043;
70
- --input: #3c4043;
71
- --popover: #1f1f1f;
72
- --popover-foreground: #e3e3e3;
73
- --accent: rgba(255, 255, 255, 0.04);
74
- --accent-foreground: var(--primary-400);
75
- --ring: color-mix(in srgb, var(--primary-500), transparent 60%);
76
- --input-shadow: 0 0 #0000;
77
- --destructive: #dc2626;
78
- --destructive-foreground: #f8fafc;
79
- }
80
-
81
- /* [Rest of your existing CSS remains the same - everything below stays] */
49
+ --background: 9 9 11; /* #09090b in RGB */
50
+ --foreground: 250 250 250;
51
+ --card: 9 9 11;
52
+ --card-foreground: 250 250 250;
53
+ --popover: 9 9 11;
54
+ --popover-foreground: 250 250 250;
55
+
56
+ --primary: 59 130 246; /* #3b82f6 in RGB */
57
+ --primary-foreground: 250 250 250;
58
+
59
+ --secondary: 39 39 42; /* #27272a in RGB */
60
+ --secondary-foreground: 250 250 250;
61
+ --muted: 39 39 42;
62
+ --muted-foreground: 161 161 170;
63
+ --accent: 39 39 42;
64
+ --accent-foreground: 250 250 250;
65
+
66
+ --destructive: 127 29 29; /* #7f1d1d in RGB */
67
+ --destructive-foreground: 254 242 242;
68
+
69
+ --border: 39 39 42;
70
+ --input: 39 39 42;
71
+ --ring: 147 197 253; /* #93c5fd in RGB - even lighter blue */
72
+
73
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
74
+ --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
75
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
76
+ }
77
+
82
78
  /* -------------------------------------------------------------------------- */
83
- /* 3. BASE LAYER (Icons & Typography) */
79
+ /* 3. BASE STYLES */
84
80
  /* -------------------------------------------------------------------------- */
85
- @layer base {
86
- /* Remix Icons Standardization */
87
- i[class^="ri-"], i[class*=" ri-"] {
88
- display: inline-flex;
89
- align-items: center;
90
- justify-content: center;
91
- vertical-align: middle;
92
- line-height: 1;
93
- font-size: 1.2rem;
94
- }
81
+ /* Note: @layer base styles should be placed AFTER the @tailwind directives */
82
+ /* These will be injected into Tailwind's base layer */
95
83
 
96
- /* Scale icons for XS/SM containers */
97
- .size-xs i[class^="ri-"], .size-xs i[class*=" ri-"],
98
- .size-sm i[class^="ri-"], .size-sm i[class*=" ri-"] {
99
- font-size: 1rem;
100
- }
84
+ /* You can also define base styles without @layer if you're having issues */
85
+ /* Just remove the @layer and use regular CSS */
101
86
 
102
- .tolle-button-content {
103
- display: flex;
104
- align-items: center;
105
- gap: 0.5rem;
106
- }
87
+ /* Base text color inheritance - THIS IS KEY */
88
+ * {
89
+ border-color: var(--border, #e4e4e7);
90
+ }
91
+
92
+ html {
93
+ scroll-behavior: smooth;
94
+ }
95
+
96
+ body {
97
+ background-color: var(--background, #ffffff);
98
+ color: var(--foreground, #0a0a0a);
99
+ -webkit-font-smoothing: antialiased;
100
+ -moz-osx-font-smoothing: grayscale;
101
+ font-feature-settings: "rlig" 1, "calt" 1;
102
+ }
103
+
104
+ /* Links */
105
+ a {
106
+ color: var(--primary, #2563eb);
107
+ text-underline-offset: 4px;
108
+ }
109
+
110
+ a:hover {
111
+ text-decoration: underline;
112
+ }
113
+
114
+ /* Remix Icons */
115
+ i[class^="ri-"], i[class*=" ri-"] {
116
+ display: inline-flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ vertical-align: middle;
120
+ font-size: 1.2em;
107
121
  }
108
122
 
109
123
  /* -------------------------------------------------------------------------- */
110
- /* 4. COMPONENT OVERRIDES */
124
+ /* 5. UTILITY CLASSES */
111
125
  /* -------------------------------------------------------------------------- */
112
- @layer components {
113
- /* Updated: Target the container div (tolle-input > div) instead of the input tag */
114
- tolle-input > div,
115
- tolle-select button,
116
- tolle-masked-input > div,
117
- tolle-date-picker tolle-masked-input > div {
118
- box-shadow: var(--input-shadow);
119
- transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms ease;
126
+ @layer utilities {
127
+
128
+ /* Animation utilities */
129
+ .animate-in {
130
+ animation: animate-in 0.2s ease-out;
131
+ }
132
+
133
+ .animate-out {
134
+ animation: animate-out 0.2s ease-in;
120
135
  }
121
136
 
122
- /* When the container is focused-within, we clear the shadow and let the ring handle the focus */
123
- tolle-input > div:focus-within,
124
- tolle-select button:focus,
125
- tolle-masked-input > div:focus-within {
126
- box-shadow: 0 0 #0000;
137
+ @keyframes animate-in {
138
+ from {
139
+ opacity: 0;
140
+ transform: translateY(2px);
141
+ }
142
+ to {
143
+ opacity: 1;
144
+ transform: translateY(0);
145
+ }
127
146
  }
128
147
 
129
- /* Remove shadow from the native input since the container now handles the elevation */
130
- tolle-input input,
131
- tolle-masked-input input {
132
- box-shadow: none !important;
133
- background: transparent;
148
+ @keyframes animate-out {
149
+ from {
150
+ opacity: 1;
151
+ transform: translateY(0);
152
+ }
153
+ to {
154
+ opacity: 0;
155
+ transform: translateY(2px);
156
+ }
134
157
  }
135
158
 
136
- /* Dark Mode specific component adjustments */
137
- .dark tolle-card {
138
- background-color: var(--secondary);
139
- border-color: var(--border);
159
+ /* Hide scrollbar */
160
+ .no-scrollbar::-webkit-scrollbar {
161
+ display: none;
140
162
  }
141
163
 
142
- /* Dark mode backgrounds for form components */
143
- .dark tolle-input > div,
144
- .dark tolle-select button {
145
- background-color: transparent;
164
+ .no-scrollbar {
165
+ -ms-overflow-style: none;
166
+ scrollbar-width: none;
146
167
  }
147
168
 
148
- /* Icon sizing inside buttons and input slots */
149
- tolle-button svg,
150
- tolle-input [prefix] svg,
151
- tolle-input [suffix] svg {
152
- @apply w-4 h-4;
169
+ /* Text utilities */
170
+ .text-balance {
171
+ text-wrap: balance;
153
172
  }
154
173
 
155
- .h-8 svg { @apply w-3.5 h-3.5; }
174
+ /* Glass effect */
175
+ .glass {
176
+ backdrop-filter: blur(8px);
177
+ background-color: rgba(255, 255, 255, 0.1);
178
+ border: 1px solid rgba(255, 255, 255, 0.2);
179
+ }
180
+
181
+ .dark .glass {
182
+ background-color: rgba(0, 0, 0, 0.2);
183
+ border: 1px solid rgba(255, 255, 255, 0.1);
184
+ }
185
+ }
156
186
 
157
- /* Compact Select Items */
158
- .size-xs tolle-select-item > div { padding: 4px 8px 4px 32px; font-size: 12px; }
159
- .size-sm tolle-select-item > div { padding: 6px 12px 6px 32px; }
187
+ /* Remove default browser focus styles */
188
+ tolle-textarea textarea:focus {
189
+ outline: none !important;
190
+ }
191
+
192
+ tolle-select button:focus {
193
+ outline: none !important;
160
194
  }
161
195
 
162
196
  /* -------------------------------------------------------------------------- */
163
- /* 5. CDK OVERLAY & MODAL SYSTEM (Structural) */
197
+ /* 6. CDK OVERLAY STYLES */
164
198
  /* -------------------------------------------------------------------------- */
165
199
  .cdk-overlay-container {
166
200
  position: fixed;
167
- z-index: 1000;
168
201
  top: 0;
169
202
  left: 0;
170
- width: 100%;
171
- height: 100%;
203
+ right: 0;
204
+ bottom: 0;
205
+ z-index: 50;
172
206
  pointer-events: none;
173
207
  }
174
208
 
175
- .cdk-global-overlay-wrapper {
176
- display: flex;
177
- position: absolute;
178
- z-index: 1001;
209
+ .cdk-overlay-backdrop {
210
+ position: fixed;
179
211
  top: 0;
180
212
  left: 0;
181
- width: 100%;
182
- height: 100%;
183
- pointer-events: none;
213
+ right: 0;
214
+ bottom: 0;
215
+ z-index: 50;
216
+ background-color: rgba(0, 0, 0, 0.8);
217
+ backdrop-filter: blur(4px);
218
+ transition-property: opacity;
219
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
220
+ transition-duration: 150ms;
221
+ opacity: 0;
184
222
  }
185
223
 
186
224
  .cdk-overlay-pane {
187
- position: absolute;
188
- pointer-events: auto;
189
- box-sizing: border-box;
190
- z-index: 1001;
191
- display: flex;
192
- flex-direction: column;
193
- align-items: center;
194
- justify-content: center;
195
- }
196
-
197
- /* Backdrop Styles */
198
- .cdk-overlay-backdrop {
199
- position: absolute;
200
- top: 0; bottom: 0; left: 0; right: 0;
201
- z-index: 1000;
202
- pointer-events: auto;
203
- -webkit-tap-highlight-color: transparent;
204
- transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
205
- opacity: 0;
225
+ position: fixed;
226
+ z-index: 50;
206
227
  }
207
228
 
208
229
  .cdk-overlay-backdrop-showing {
@@ -212,24 +233,39 @@
212
233
  .tolle-modal-backdrop {
213
234
  background-color: rgba(0, 0, 0, 0.8);
214
235
  backdrop-filter: blur(4px);
215
- z-index: 50;
216
236
  }
217
237
 
218
- /* Hide scrollbar for modern browsers */
219
- .scrollbar-hidden::-webkit-scrollbar {
220
- display: none; /* Chrome, Safari, and Opera */
238
+ /* Add these to your theme.css file */
239
+
240
+ /* Override Tailwind's default ring widths for thicker rings */
241
+ .ring-2 {
242
+ --tw-ring-width: 3px !important;
243
+ }
244
+
245
+ .ring-4 {
246
+ --tw-ring-width: 5px !important;
247
+ }
248
+
249
+ /* Custom ring utilities */
250
+ .ring-thick {
251
+ --tw-ring-width: 3px !important;
252
+ }
253
+
254
+ .ring-thicker {
255
+ --tw-ring-width: 4px !important;
221
256
  }
222
257
 
223
- .scrollbar-hidden {
224
- -ms-overflow-style: none; /* IE and Edge */
225
- scrollbar-width: none; /* Firefox */
258
+ /* Input-specific focus styles */
259
+ tolle-input:focus-within {
260
+ --tw-ring-width: 3px;
226
261
  }
227
262
 
228
- @keyframes caret-blink {
229
- 0%, 70%, 100% { opacity: 1; }
230
- 20%, 50% { opacity: 0; }
263
+ /* Make sure the ring color uses our CSS variable */
264
+ .ring-ring {
265
+ --tw-ring-color: var(--ring) !important;
231
266
  }
232
267
 
233
- .animate-caret-blink {
234
- animation: caret-blink 1.25s ease-out infinite;
268
+ /* Error state ring color */
269
+ .ring-destructive {
270
+ --tw-ring-color: var(--destructive) !important;
235
271
  }