@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/esm2022/lib/badge.component.mjs +4 -4
- package/esm2022/lib/button.component.mjs +18 -13
- package/esm2022/lib/card.component.mjs +3 -3
- package/esm2022/lib/data-table.component.mjs +1 -1
- package/esm2022/lib/date-picker.component.mjs +2 -2
- package/esm2022/lib/date-range-picker.component.mjs +1 -1
- package/esm2022/lib/input.component.mjs +125 -32
- package/esm2022/lib/masked-input.component.mjs +118 -30
- package/esm2022/lib/multi-select.component.mjs +1 -1
- package/esm2022/lib/otp-slot.component.mjs +35 -23
- package/esm2022/lib/select.component.mjs +38 -9
- package/esm2022/lib/textarea.component.mjs +130 -26
- package/esm2022/lib/theme.service.mjs +283 -75
- package/fesm2022/tolle-ui.mjs +751 -212
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/button.component.d.ts +2 -3
- package/lib/input.component.d.ts +11 -3
- package/lib/masked-input.component.d.ts +7 -1
- package/lib/otp-slot.component.d.ts +1 -0
- package/lib/select.component.d.ts +1 -0
- package/lib/textarea.component.d.ts +8 -1
- package/lib/theme.service.d.ts +46 -3
- package/package.json +1 -1
- package/preset.js +47 -33
- package/theme.css +204 -168
package/theme.css
CHANGED
|
@@ -1,208 +1,229 @@
|
|
|
1
1
|
/* -------------------------------------------------------------------------- */
|
|
2
|
-
/* 1. TAILWIND
|
|
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 (
|
|
9
|
+
/* 2. THEME VARIABLES (CSS CUSTOM PROPERTIES) */
|
|
10
10
|
/* -------------------------------------------------------------------------- */
|
|
11
11
|
:root {
|
|
12
|
-
/* ---
|
|
13
|
-
--
|
|
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
|
-
/* ---
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
|
|
59
|
-
--primary
|
|
60
|
-
--primary-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
--
|
|
67
|
-
--
|
|
68
|
-
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
|
|
72
|
-
--
|
|
73
|
-
--
|
|
74
|
-
--
|
|
75
|
-
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
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
|
|
79
|
+
/* 3. BASE STYLES */
|
|
84
80
|
/* -------------------------------------------------------------------------- */
|
|
85
|
-
@layer base
|
|
86
|
-
|
|
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
|
-
|
|
97
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
/*
|
|
124
|
+
/* 5. UTILITY CLASSES */
|
|
111
125
|
/* -------------------------------------------------------------------------- */
|
|
112
|
-
@layer
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
/*
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
border-color: var(--border);
|
|
159
|
+
/* Hide scrollbar */
|
|
160
|
+
.no-scrollbar::-webkit-scrollbar {
|
|
161
|
+
display: none;
|
|
140
162
|
}
|
|
141
163
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
background-color: transparent;
|
|
164
|
+
.no-scrollbar {
|
|
165
|
+
-ms-overflow-style: none;
|
|
166
|
+
scrollbar-width: none;
|
|
146
167
|
}
|
|
147
168
|
|
|
148
|
-
/*
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
/*
|
|
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
|
-
|
|
171
|
-
|
|
203
|
+
right: 0;
|
|
204
|
+
bottom: 0;
|
|
205
|
+
z-index: 50;
|
|
172
206
|
pointer-events: none;
|
|
173
207
|
}
|
|
174
208
|
|
|
175
|
-
.cdk-
|
|
176
|
-
|
|
177
|
-
position: absolute;
|
|
178
|
-
z-index: 1001;
|
|
209
|
+
.cdk-overlay-backdrop {
|
|
210
|
+
position: fixed;
|
|
179
211
|
top: 0;
|
|
180
212
|
left: 0;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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:
|
|
188
|
-
|
|
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
|
-
/*
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
258
|
+
/* Input-specific focus styles */
|
|
259
|
+
tolle-input:focus-within {
|
|
260
|
+
--tw-ring-width: 3px;
|
|
226
261
|
}
|
|
227
262
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
234
|
-
|
|
268
|
+
/* Error state ring color */
|
|
269
|
+
.ring-destructive {
|
|
270
|
+
--tw-ring-color: var(--destructive) !important;
|
|
235
271
|
}
|