frutjam 0.3.0-alpha.2 → 0.4.0-alpha.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frutjam",
3
- "version": "0.3.0-alpha.2",
3
+ "version": "0.4.0-alpha.0",
4
4
  "description": "A utility-first CSS framework UI Library",
5
5
  "main": "./dist/frutjam.css",
6
6
  "browser": "dist/frutjam.css",
@@ -37,8 +37,8 @@
37
37
  "url": "https://github.com/nezanuha/frutjam/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@tailwindcss/postcss": "^4.0.14",
41
- "tailwindcss": "^4.0.14"
40
+ "@tailwindcss/postcss": "^4.0.15",
41
+ "tailwindcss": "^4.0.15"
42
42
  },
43
43
  "devDependencies": {
44
44
  "css-loader": "^7.1.2",
@@ -2,6 +2,6 @@
2
2
  :root,
3
3
  [data-theme] {
4
4
  background-color: var(--color-surface);
5
- color: var(--color-surface-content);
5
+ color: var(--color-surface-fore);
6
6
  }
7
7
  }
@@ -1,4 +1,4 @@
1
- @import '../themes/colors/base.css';
1
+ @import '../themes/styles/base.css';
2
2
  @utility accordion {
3
3
  @layer components {
4
4
  @apply grid divide-y divide-info border border-info cursor-pointer rounded-md;
@@ -0,0 +1,469 @@
1
+ @import "../themes/styles/base.css";
2
+ @import "../themes/animation/wiggle.css";
3
+
4
+ @utility btn-dashed {
5
+ @layer components {
6
+ &:is(.btn-primary) {
7
+ @apply text-primary bg-transparent border border-dashed border-primary;
8
+
9
+ @media (hover: hover) {
10
+ &:hover {
11
+ @apply ring-2 text-surface bg-primary bg-gradient-to-br from-primary via-primary/95 to-primary;
12
+ &::before {
13
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
14
+ }
15
+ }
16
+ }
17
+ }
18
+ &:is(.btn-secondary) {
19
+ @apply text-secondary bg-transparent border border-dashed border-secondary;
20
+
21
+ @media (hover: hover) {
22
+ &:hover {
23
+ @apply ring-2 text-surface bg-secondary bg-gradient-to-br from-secondary via-secondary/95 to-secondary;
24
+ &::before {
25
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
26
+ }
27
+ }
28
+ }
29
+ }
30
+ &:is(.btn-success) {
31
+ @apply text-success bg-transparent border border-dashed border-success;
32
+
33
+ @media (hover: hover) {
34
+ &:hover {
35
+ @apply ring-2 text-surface bg-success bg-gradient-to-br from-success via-success/95 to-success;
36
+ &::before {
37
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
38
+ }
39
+ }
40
+ }
41
+ }
42
+ &:is(.btn-error) {
43
+ @apply text-error bg-transparent border border-dashed border-error;
44
+
45
+ @media (hover: hover) {
46
+ &:hover {
47
+ @apply ring-2 text-surface bg-error bg-gradient-to-br from-error via-error/95 to-error;
48
+ &::before {
49
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ &:is(.btn-warning) {
56
+ @apply text-warning bg-transparent border border-dashed border-warning;
57
+
58
+ @media (hover: hover) {
59
+ &:hover {
60
+ @apply ring-2 text-surface bg-warning bg-gradient-to-br from-warning via-warning/95 to-warning;
61
+ &::before {
62
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ &:is(.btn-info) {
69
+ @apply text-info bg-transparent border border-dashed border-info;
70
+
71
+ @media (hover: hover) {
72
+ &:hover {
73
+ @apply ring-2 text-surface bg-info bg-gradient-to-br from-info via-info/95 to-info;
74
+ &::before {
75
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ &:is(.btn-accent) {
82
+ @apply text-accent bg-transparent border border-dashed border-accent;
83
+
84
+ @media (hover: hover) {
85
+ &:hover {
86
+ @apply ring-2 text-surface bg-accent bg-gradient-to-br from-accent via-accent/95 to-accent;
87
+ &::before {
88
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ @utility btn-outline {
97
+ @layer components {
98
+ &:is(.btn-primary) {
99
+ @apply text-primary bg-transparent ring-1 ring-primary;
100
+
101
+ @media (hover: hover) {
102
+ &:hover {
103
+ @apply ring-2 text-surface bg-primary bg-gradient-to-br from-primary via-primary/95 to-primary;
104
+ &::before {
105
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
106
+ }
107
+ }
108
+ }
109
+ }
110
+ &:is(.btn-secondary) {
111
+ @apply text-secondary bg-transparent ring-1 ring-secondary;
112
+
113
+ @media (hover: hover) {
114
+ &:hover {
115
+ @apply ring-2 text-surface bg-secondary bg-gradient-to-br from-secondary via-secondary/95 to-secondary;
116
+ &::before {
117
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
118
+ }
119
+ }
120
+ }
121
+ }
122
+ &:is(.btn-success) {
123
+ @apply text-success bg-transparent ring-1 ring-success;
124
+
125
+ @media (hover: hover) {
126
+ &:hover {
127
+ @apply ring-2 text-surface bg-success bg-gradient-to-br from-success via-success/95 to-success;
128
+ &::before {
129
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
130
+ }
131
+ }
132
+ }
133
+ }
134
+ &:is(.btn-error) {
135
+ @apply text-error bg-transparent ring-1 ring-error;
136
+
137
+ @media (hover: hover) {
138
+ &:hover {
139
+ @apply ring-2 text-surface bg-error bg-gradient-to-br from-error via-error/95 to-error;
140
+ &::before {
141
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ &:is(.btn-warning) {
148
+ @apply text-warning bg-transparent ring-1 ring-warning;
149
+
150
+ @media (hover: hover) {
151
+ &:hover {
152
+ @apply ring-2 text-surface bg-warning bg-gradient-to-br from-warning via-warning/95 to-warning;
153
+ &::before {
154
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ &:is(.btn-info) {
161
+ @apply text-info bg-transparent ring-1 ring-info;
162
+
163
+ @media (hover: hover) {
164
+ &:hover {
165
+ @apply ring-2 text-surface bg-info bg-gradient-to-br from-info via-info/95 to-info;
166
+ &::before {
167
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
168
+ }
169
+ }
170
+ }
171
+ }
172
+
173
+ &:is(.btn-accent) {
174
+ @apply text-accent bg-transparent ring-1 ring-accent;
175
+
176
+ @media (hover: hover) {
177
+ &:hover {
178
+ @apply ring-2 text-surface bg-accent bg-gradient-to-br from-accent via-accent/95 to-accent;
179
+ &::before {
180
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ @utility btn-soft {
189
+ @layer components {
190
+ &:is(.btn-primary) {
191
+ @apply text-primary bg-primary/20 ring-[0.5px] ring-primary/20;
192
+
193
+ @media (hover: hover) {
194
+ &:hover {
195
+ @apply ring-2;
196
+ &::before {
197
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ &:is(.btn-secondary) {
204
+ @apply text-secondary bg-secondary/20 ring-[0.5px] ring-secondary/20;
205
+
206
+ @media (hover: hover) {
207
+ &:hover {
208
+ @apply ring-2;
209
+ &::before {
210
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ &:is(.btn-success) {
217
+ @apply text-success bg-success/20 ring-[0.5px] ring-success/20;
218
+
219
+ @media (hover: hover) {
220
+ &:hover {
221
+ @apply ring-2;
222
+ &::before {
223
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ &:is(.btn-error) {
230
+ @apply text-error bg-error/20 ring-[0.5px] ring-error/20;
231
+
232
+ @media (hover: hover) {
233
+ &:hover {
234
+ @apply ring-2;
235
+ &::before {
236
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
237
+ }
238
+ }
239
+ }
240
+ }
241
+
242
+ &:is(.btn-warning) {
243
+ @apply text-warning bg-warning/20 ring-[0.5px] ring-warning/20;
244
+
245
+ @media (hover: hover) {
246
+ &:hover {
247
+ @apply ring-2;
248
+ &::before {
249
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ &:is(.btn-info) {
256
+ @apply text-info bg-info/20 ring-[0.5px] ring-info/20;
257
+
258
+ @media (hover: hover) {
259
+ &:hover {
260
+ @apply ring-2;
261
+ &::before {
262
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
263
+ }
264
+ }
265
+ }
266
+ }
267
+
268
+ &:is(.btn-accent) {
269
+ @apply text-accent bg-accent/20 ring-[0.5px] ring-accent/20;
270
+
271
+ @media (hover: hover) {
272
+ &:hover {
273
+ @apply ring-2;
274
+ &::before {
275
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+
283
+ @utility btn-xs {
284
+ @layer components {
285
+ @apply px-2.5 py-1.5 text-xs;
286
+ }
287
+ }
288
+
289
+ @utility btn-sm {
290
+ @layer components {
291
+ @apply px-3 py-2 text-sm;
292
+ }
293
+ }
294
+
295
+ @utility btn-md {
296
+ @layer components {
297
+ @apply px-3.5 py-2.5 text-sm;
298
+ }
299
+ }
300
+
301
+ @utility btn-lg {
302
+ @layer components {
303
+ @apply px-4 py-3 text-base;
304
+ }
305
+ }
306
+
307
+ @utility btn-xl {
308
+ @layer components {
309
+ @apply px-4.5 py-3.5 text-base;
310
+ }
311
+ }
312
+
313
+ @utility btn-2xl {
314
+ @layer components {
315
+ @apply px-5 py-4 text-base;
316
+ }
317
+ }
318
+
319
+ @utility btn-circle {
320
+ @layer components {
321
+ @apply rounded-full size-auto aspect-square;
322
+ }
323
+ }
324
+
325
+ @utility btn-square {
326
+ @layer components {
327
+ @apply size-auto aspect-square;
328
+ }
329
+ }
330
+
331
+ /* buttons colors */
332
+ @utility btn-primary {
333
+ @layer components {
334
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
335
+ @apply text-primary-fore bg-gradient-to-br from-primary via-primary/95 to-primary ring-[0.5px] ring-primary/50;
336
+
337
+ @media (hover: hover) {
338
+ &:hover {
339
+ @apply ring-2 bg-gradient-to-tr via-primary/90;
340
+ &::before {
341
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+
349
+ @utility btn-secondary {
350
+ @layer components {
351
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
352
+ @apply text-secondary-fore bg-gradient-to-br from-secondary via-secondary/95 to-secondary ring-[0.5px] ring-secondary/50;
353
+
354
+ @media (hover: hover) {
355
+ &:hover {
356
+ @apply ring-2 bg-gradient-to-tr via-secondary/90;
357
+ &::before {
358
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+
366
+ @utility btn-success {
367
+ @layer components {
368
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
369
+ @apply text-success-fore bg-gradient-to-br from-success via-success/95 to-success ring-[0.5px] ring-success/50;
370
+
371
+ @media (hover: hover) {
372
+ &:hover {
373
+ @apply ring-2 bg-gradient-to-tr via-success/90;
374
+ &::before {
375
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
376
+ }
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+
383
+ @utility btn-error {
384
+ @layer components {
385
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
386
+ @apply text-error-fore bg-gradient-to-br from-error via-error/95 to-error ring-[0.5px] ring-error/50;
387
+
388
+ @media (hover: hover) {
389
+ &:hover {
390
+ @apply ring-2 bg-gradient-to-tr via-error/90;
391
+ &::before {
392
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+
400
+ @utility btn-warning {
401
+ @layer components {
402
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
403
+ @apply text-warning-fore bg-gradient-to-br from-warning via-warning/95 to-warning ring-[0.5px] ring-warning/50;
404
+
405
+ @media (hover: hover) {
406
+ &:hover {
407
+ @apply ring-2 bg-gradient-to-tr via-warning/90;
408
+ &::before {
409
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+ }
416
+
417
+ @utility btn-info {
418
+ @layer components {
419
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
420
+ @apply text-info-fore bg-gradient-to-br from-info via-info/95 to-info ring-[0.5px] ring-info/50;
421
+
422
+ @media (hover: hover) {
423
+ &:hover {
424
+ @apply ring-2 bg-gradient-to-tr via-info/90;
425
+ &::before {
426
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+
434
+ @utility btn-accent {
435
+ @layer components {
436
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
437
+ @apply text-accent-fore bg-gradient-to-br from-accent via-accent/95 to-accent ring-[0.5px] ring-accent/50;
438
+
439
+ @media (hover: hover) {
440
+ &:hover {
441
+ @apply ring-2 bg-gradient-to-tr via-accent/90;
442
+ &::before {
443
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
444
+ }
445
+ }
446
+ }
447
+ }
448
+ }
449
+ }
450
+
451
+ /* default button */
452
+ @utility btn {
453
+ @layer components {
454
+ @apply btn-md text-[buttonFace] bg-default text-black relative inline-flex shrink-0 flex-nowrap items-center justify-center gap-1.5 text-center align-middle rounded-lg font-medium relative overflow-hidden text-xs transition duration-300 text-center leading-4;
455
+
456
+ &:not(.btn-dashed, .btn-outline, .btn-soft) {
457
+ @apply bg-gradient-to-br from-default via-default/95 to-default ring-[0.5px] ring-neutral-300;
458
+
459
+ @media (hover: hover) {
460
+ &:hover {
461
+ @apply ring-2 bg-gradient-to-tr via-default/90;
462
+ &::before {
463
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
464
+ }
465
+ }
466
+ }
467
+ }
468
+ }
469
+ }
@@ -1,241 +1,133 @@
1
- @import '../themes/colors/base.css';
2
- @utility btn {
3
- @layer components {
4
- @apply text-[buttonFace] flex items-center text-center rounded-lg font-medium cursor-pointer relative overflow-hidden text-xs transition duration-300 ring ring-black/40 inset-ring inset-ring-black/20 text-center;
1
+ @import "../themes/styles/base.css";
2
+ @import "../themes/animation/wiggle.css";
5
3
 
6
- &:focus{
7
- @apply inset-ring-black/10;
8
- }
9
4
 
10
- &:not(.btn-dashed, .btn-outline, .btn-soft){
11
- @apply border-b-2 border-black/30;
12
- }
13
- }
14
- }
15
-
16
- @utility btn-dashed {
5
+ @utility btn-* {
17
6
  @layer components {
18
- @apply border border-dashed;
19
- }
20
- }
7
+ @apply relative inline-flex shrink-0 flex-nowrap items-center justify-center gap-1.5 text-center align-middle font-medium relative overflow-hidden text-xs transition duration-300 text-center leading-4;
8
+ @apply rounded-[var(--radius-size)];
9
+ &:is(.btn-default, .btn-primary, .btn-secondary, .btn-success, .btn-error, .btn-warning, .btn-info, .btn-accent) {
21
10
 
22
- @utility btn-outline {
23
- @layer components {
24
- @apply border border-solid;
25
- }
26
- }
27
-
28
- @utility btn-soft {
29
- @layer components {
30
-
31
- &:is(.btn-primary){
32
- @apply bg-primary/10 text-primary;
33
- @media (hover: hover){
11
+ /* global */
12
+ @media (hover: hover) {
34
13
  &:hover {
35
- @apply bg-primary text-[var(--color-primary-content)];
14
+ &::before {
15
+ @apply content-[''] absolute size-full animate-wiggle bg-[radial-gradient(#ffffff33,_#00000000)];
16
+ }
36
17
  }
37
18
  }
38
- }
39
19
 
40
- &:is(.btn-secondary){
41
- @apply bg-secondary/10 text-secondary;
42
- @media (hover: hover){
43
- &:hover {
44
- @apply bg-secondary text-[var(--color-secondary-content)];
20
+ /* button for checkbox and radio button */
21
+ &:is(input[type="checkbox"], input[type="radio"]) {
22
+ @apply appearance-none;
23
+
24
+ &::after {
25
+ content: attr(aria-label);
26
+ }
27
+
28
+ &:checked {
29
+ @apply ring-2 bg-gradient-to-tr via-[--value(--color-*)]/90 isolate;
45
30
  }
46
31
  }
47
- }
48
32
 
49
- &:is(.btn-accent){
50
- @apply bg-accent/10 text-accent;
51
- @media (hover: hover){
52
- &:hover {
53
- @apply bg-accent text-[var(--color-accent-content)];
54
- }
33
+ /* disabled buttons */
34
+ &:is(:disabled, [disabled], .btn-disabled) {
35
+ @apply bg-[--value(--color-*)]/10 text-[--value(--color-*)]/30 pointer-events-none;
55
36
  }
56
- }
57
37
 
58
- &:is(.btn-info){
59
- @apply bg-info/10 text-info;
60
- @media (hover: hover){
61
- &:hover {
62
- @apply bg-info text-[var(--color-info-content)];
38
+ /* buttons colors */
39
+ &:not(.btn-dashed, .btn-outline, .btn-soft, :disabled, [disabled], .btn-disabled) {
40
+ &:not(.btn-ghost, .btn-link) {
41
+ @apply text-[--value(--color-*-fore)] bg-gradient-to-br from-[--value(--color-*)] via-[--value(--color-*)]/95 to-[--value(--color-*)] ring-[0.5px] ring-[--value(--color-*)]/50
42
+ }
43
+ &:is(.btn-ghost) {
44
+ @apply text-[--value(--color-*)];
63
45
  }
64
- }
65
- }
66
46
 
67
- &:is(.btn-success){
68
- @apply bg-success/10 text-success;
69
- @media (hover: hover){
70
- &:hover {
71
- @apply bg-success text-[var(--color-success-content)];
47
+ @media (hover: hover) {
48
+ &:hover {
49
+ &:is(.btn-ghost) {
50
+ @apply text-[--value(--color-*-fore)] from-[--value(--color-*)] to-[--value(--color-*)] ring-[--value(--color-*)]/50 duration-500;
51
+ }
52
+ &:not(.btn-link) {
53
+ @apply ring-2 bg-gradient-to-tr via-[--value(--color-*)]/90;
54
+ }
55
+ &:is(.btn-link) {
56
+ @apply text-[--value(--color-*)] underline underline-offset-4 cursor-pointer;
57
+ }
58
+ }
72
59
  }
73
60
  }
74
- }
75
61
 
76
- &:is(.btn-warning){
77
- @apply bg-warning/10 text-warning;
78
- @media (hover: hover){
79
- &:hover {
80
- @apply bg-warning text-[var(--color-warning-content)];
62
+ /* button dashed */
63
+ &:is(.btn-dashed) {
64
+ @apply text-[--value(--color-*)] bg-transparent border border-dashed border-[--value(--color-*)];
65
+
66
+ @media (hover: hover) {
67
+ &:hover {
68
+ @apply ring-2 text-surface bg-[--value(--color-*)] bg-gradient-to-br from-[--value(--color-*)] via-[--value(--color-*)]/95 to-[--value(--color-*)];
69
+ }
81
70
  }
82
71
  }
83
- }
84
72
 
85
- &:is(.btn-error){
86
- @apply bg-error/10 text-error;
87
- @media (hover: hover){
88
- &:hover {
89
- @apply bg-error text-[var(--color-error-content)];
73
+ /* button outline */
74
+ &:is(.btn-outline) {
75
+ @apply text-[--value(--color-*)] bg-transparent ring-1 ring-[--value(--color-*)];
76
+
77
+ @media (hover: hover) {
78
+ &:hover {
79
+ @apply ring-2 text-surface bg-[--value(--color-*)] bg-gradient-to-br from-[--value(--color-*)] via-[--value(--color-*)]/95 to-[--value(--color-*)];
80
+ }
90
81
  }
91
82
  }
92
- }
93
- }
94
- }
95
-
96
- @utility btn-xs {
97
- @layer components {
98
- @apply px-2.5 py-1.5 text-xs leading-4;
99
- }
100
- }
101
-
102
- @utility btn-sm {
103
- @layer components {
104
- @apply px-3 py-2 text-sm leading-4;
105
- }
106
- }
107
-
108
- @utility btn-md {
109
- @layer components {
110
- @apply px-4 py-2 text-sm leading-5;
111
- }
112
- }
113
-
114
- @utility btn-lg {
115
- @layer components {
116
- @apply px-4 py-2 text-base leading-6;
117
- }
118
- }
119
-
120
- @utility btn-xl {
121
- @layer components {
122
- @apply px-6 py-3 text-base leading-6;
123
- }
124
- }
125
83
 
126
- @utility btn-full {
127
- @layer components {
128
- @apply rounded-full leading-4;
129
- }
130
- }
131
-
132
- @utility btn-primary {
133
- @layer components {
134
- @apply bg-primary text-primary-content;
135
-
136
- &:is(.btn-dashed, .btn-outline):not(.btn-soft){
137
- @apply bg-white text-primary border-primary;
138
- }
139
-
140
- @media (hover: hover){
141
- &:hover {
142
- @apply bg-primary text-primary-content border-solid opacity-90;
84
+ /* button soft */
85
+ &:is(.btn-soft) {
86
+ @apply text-[--value(--color-*)] bg-[--value(--color-*)]/20 ring-[0.5px] ring-[--value(--color-*)]/20;
87
+
88
+ @media (hover: hover) {
89
+ &:hover {
90
+ @apply ring-2;
91
+ }
92
+ }
143
93
  }
144
94
  }
145
- }
146
- }
147
-
148
- @utility btn-secondary {
149
- @layer components {
150
- @apply bg-secondary text-secondary-content;
151
-
152
- &:is(.btn-dashed, .btn-outline){
153
- @apply bg-white text-secondary border-secondary;
154
- }
155
95
 
156
- @media (hover: hover){
157
- &:hover {
158
- @apply bg-secondary text-secondary-content border-solid opacity-90;
96
+ /* button sizes */
97
+ &:is(.btn-xs, .btn-sm, .btn-md, .btn-lg, .btn-xl, .btn-2xl) {
98
+ &:is(.btn-xs) {
99
+ @apply px-2.5 py-1.5 text-xs;
159
100
  }
160
- }
161
- }
162
- }
163
-
164
- @utility btn-accent {
165
- @layer components {
166
- @apply bg-accent text-accent-content;
167
-
168
- &:is(.btn-dashed, .btn-outline){
169
- @apply bg-white text-accent border-accent;
170
- }
171
-
172
- @media (hover: hover){
173
- &:hover {
174
- @apply bg-accent text-accent-content border-solid opacity-90;
101
+ &:is(.btn-sm) {
102
+ @apply px-3 py-2 text-sm;
175
103
  }
176
- }
177
- }
178
- }
179
-
180
- @utility btn-info {
181
- @layer components {
182
- @apply bg-info text-info-content;
183
-
184
- &:is(.btn-dashed, .btn-outline){
185
- @apply bg-white text-info border-info;
186
- }
187
-
188
- @media (hover: hover){
189
- &:hover {
190
- @apply bg-info text-info-content border-solid opacity-90;
104
+ &:is(.btn-md) {
105
+ @apply px-3.5 py-2.5 text-sm;
191
106
  }
192
- }
193
- }
194
- }
195
-
196
- @utility btn-success {
197
- @layer components {
198
- @apply bg-success text-success-content;
199
-
200
- &:is(.btn-dashed, .btn-outline){
201
- @apply bg-white text-success border-success;
202
- }
203
-
204
- @media (hover: hover){
205
- &:hover {
206
- @apply bg-success text-success-content border-solid opacity-90;
107
+ &:is(.btn-lg) {
108
+ @apply px-4 py-3 text-base;
207
109
  }
208
- }
209
- }
210
- }
211
-
212
- @utility btn-warning {
213
- @layer components {
214
- @apply bg-warning text-warning-content;
215
-
216
- &:is(.btn-dashed, .btn-outline){
217
- @apply bg-white text-warning border-warning;
218
- }
219
-
220
- @media (hover: hover){
221
- &:hover {
222
- @apply bg-warning text-warning-content border-solid opacity-90;
110
+ &:is(.btn-xl) {
111
+ @apply px-4.5 py-3.5 text-base;
112
+ }
113
+ &:is(.btn-2xl) {
114
+ @apply px-5 py-4 text-base;
223
115
  }
224
- }
225
- }
226
- }
227
-
228
- @utility btn-error {
229
- @layer components {
230
- @apply bg-error text-error-content;
231
-
232
- &:is(.btn-dashed, .btn-outline){
233
- @apply bg-white text-error border-error;
234
116
  }
235
117
 
236
- @media (hover: hover){
237
- &:hover {
238
- @apply bg-error text-error-content border-solid opacity-80;
118
+ /* button modifier */
119
+ &:is(.btn-circle, .btn-sqaure, .btn-wide, .btn-block) {
120
+ &:is(.btn-circle) {
121
+ @apply rounded-full size-auto aspect-square;
122
+ }
123
+ &:is(.btn-square) {
124
+ @apply size-auto aspect-square;
125
+ }
126
+ &:is(.btn-wide) {
127
+ @apply w-full max-w-64;
128
+ }
129
+ &:is(.btn-block) {
130
+ @apply w-full;
239
131
  }
240
132
  }
241
133
  }
@@ -1,4 +1,4 @@
1
- @import '../themes/colors/base.css';
1
+ @import '../themes/styles/base.css';
2
2
  @utility checkbox {
3
3
  @apply size-4 rounded-md relative shrink-0 cursor-pointer appearance-none p-1 align-middle shadow ring duration-150;
4
4
 
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  @utility checkbox-primary {
43
- @apply bg-primary/20 text-primary-content ring-primary;
43
+ @apply bg-primary/20 text-primary-fore ring-primary;
44
44
  &:checked,
45
45
  &[aria-checked="true"] {
46
46
  @apply bg-primary;
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  @utility checkbox-secondary {
51
- @apply bg-secondary/20 text-secondary-content ring-secondary;
51
+ @apply bg-secondary/20 text-secondary-fore ring-secondary;
52
52
  &:checked,
53
53
  &[aria-checked="true"] {
54
54
  @apply bg-secondary;
@@ -56,7 +56,7 @@
56
56
  }
57
57
 
58
58
  @utility checkbox-accent {
59
- @apply bg-accent/20 text-accent-content ring-accent;
59
+ @apply bg-accent/20 text-accent-fore ring-accent;
60
60
  &:checked,
61
61
  &[aria-checked="true"] {
62
62
  @apply bg-accent;
@@ -65,7 +65,7 @@
65
65
 
66
66
 
67
67
  @utility checkbox-info {
68
- @apply bg-info/20 text-info-content ring-info;
68
+ @apply bg-info/20 text-info-fore ring-info;
69
69
  &:checked,
70
70
  &[aria-checked="true"] {
71
71
  @apply bg-info;
@@ -73,7 +73,7 @@
73
73
  }
74
74
 
75
75
  @utility checkbox-success {
76
- @apply bg-success/20 text-success-content ring-success;
76
+ @apply bg-success/20 text-success-fore ring-success;
77
77
  &:checked,
78
78
  &[aria-checked="true"] {
79
79
  @apply bg-success;
@@ -81,7 +81,7 @@
81
81
  }
82
82
 
83
83
  @utility checkbox-warning {
84
- @apply bg-warning/20 text-warning-content ring-warning;
84
+ @apply bg-warning/20 text-warning-fore ring-warning;
85
85
  &:checked,
86
86
  &[aria-checked="true"] {
87
87
  @apply bg-warning;
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  @utility checkbox-error {
92
- @apply bg-error/20 text-error-content ring-error;
92
+ @apply bg-error/20 text-error-fore ring-error;
93
93
  &:checked,
94
94
  &[aria-checked="true"] {
95
95
  @apply bg-error;
@@ -1,4 +1,4 @@
1
- @import "../themes/colors/base.css";
1
+ @import "../themes/styles/base.css";
2
2
  @utility drawer {
3
3
  @layer components {
4
4
  @apply pointer-events-none invisible absolute inset-0 m-0 grid h-full max-h-none w-full max-w-none place-items-start bg-transparent p-0 text-inherit z-999 overflow-hidden overscroll-contain;
@@ -31,7 +31,7 @@
31
31
 
32
32
  @utility drawer-body {
33
33
  @layer components {
34
- @apply bg-surface text-surface-content rounded-none border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 h-screen max-h-none w-11/12 w-auto max-w-none p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
34
+ @apply bg-surface text-surface-fore rounded-none border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 h-screen max-h-none w-11/12 w-auto max-w-none p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
35
35
  translate: -100% 0;
36
36
  scale: 1;
37
37
  }
@@ -0,0 +1,15 @@
1
+ @import "../themes/styles/base.css";
2
+
3
+ @utility input-* {
4
+ @layer components {
5
+ @apply border border-[--value(--color-*-fore)]/20 rounded-[var(--radius-size)] transition duration-300 outline-0 px-1 py-0.5;
6
+ &:focus, &:focus-within {
7
+ @apply border-[--value(--color-*-fore)];
8
+ }
9
+ @media (hover: hover) {
10
+ &:hover {
11
+ @apply border-[--value(--color-*-fore)]/40
12
+ }
13
+ }
14
+ }
15
+ }
@@ -1,4 +1,4 @@
1
- @import "../themes/colors/base.css";
1
+ @import "../themes/styles/base.css";
2
2
  @import "../themes/placement.css";
3
3
  @import "../themes/animation/slide.css";
4
4
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  @utility modal-body {
36
36
  @layer components {
37
- @apply bg-surface text-surface-content rounded-2xl border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
37
+ @apply bg-surface text-surface-fore rounded-[calc(var(--radius-size)*2)] border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
38
38
  }
39
39
  }
40
40
 
@@ -1,4 +1,4 @@
1
- @import "../themes/colors/base.css";
1
+ @import "../themes/styles/base.css";
2
2
  @utility modal {
3
3
  @layer components {
4
4
  @apply pointer-events-none invisible fixed inset-0 m-0 grid h-full max-h-none w-full max-w-none items-center justify-items-center bg-transparent p-0 text-inherit z-999 overflow-hidden overscroll-contain;
@@ -31,7 +31,7 @@
31
31
 
32
32
  @utility modal-body {
33
33
  @layer components {
34
- @apply bg-surface text-surface-content rounded-3xl border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
34
+ @apply bg-surface text-surface-fore rounded-3xl border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
35
35
  }
36
36
  }
37
37
 
package/src/main.css CHANGED
@@ -1,4 +1,5 @@
1
1
  @import "./components/button.css";
2
+ @import "./components/input.css";
2
3
  @import "./components/modal.css";
3
4
  @import "./components/drawer.css";
4
5
  @import "./components/checkbox.css";
@@ -0,0 +1,14 @@
1
+ @theme {
2
+ --animate-wiggle: wiggle 1s linear infinite;
3
+ @keyframes wiggle {
4
+ 0% {
5
+ transform: rotate(345deg) translateY(-100%);
6
+ }
7
+ 50% {
8
+ transform: rotate(325deg) translateY(100%);
9
+ }
10
+ 100% {
11
+ transform: rotate(345deg) translateY(200%);
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,42 @@
1
+ @import "../../base/preflight.css" layer(theme);
2
+ @import "./light.css" layer(theme);
3
+ @import "./dark.css" layer(theme);
4
+
5
+ @custom-variant theme-dark (&:where([data-theme="dark"] *));
6
+ @custom-variant theme-light (&:where([data-theme="light"] *));
7
+
8
+ :root {
9
+ color-scheme: var(--color-scheme);
10
+ }
11
+
12
+ @theme inline {
13
+
14
+ --color-backdrop: var(--backdrop-color);
15
+
16
+ --color-surface: var(--surface-back-color);
17
+ --color-surface-fore: var(--surface-fore-color);
18
+
19
+ --color-default: var(--default-back-color);
20
+ --color-default-fore: var(--default-fore-color);
21
+
22
+ --color-primary: var(--primary-back-color);
23
+ --color-primary-fore: var(--primary-fore-color);
24
+
25
+ --color-secondary: var(--secondary-back-color);
26
+ --color-secondary-fore: var(--secondary-fore-color);
27
+
28
+ --color-accent: var(--accent-back-color);
29
+ --color-accent-fore: var(--accent-fore-color);
30
+
31
+ --color-info: var(--info-back-color);
32
+ --color-info-fore: var(--info-fore-color);
33
+
34
+ --color-success: var(--success-back-color);
35
+ --color-success-fore: var(--success-fore-color);
36
+
37
+ --color-warning: var(--warning-back-color);
38
+ --color-warning-fore: var(--warning-fore-color);
39
+
40
+ --color-error: var(--error-back-color);
41
+ --color-error-fore: var(--error-fore-color);
42
+ }
@@ -0,0 +1,36 @@
1
+ @layer theme {
2
+ [data-theme="dark"] {
3
+ --color-scheme: dark;
4
+
5
+ --radius-size: 0.5rem;
6
+
7
+ --backdrop-color: color-mix(in oklab,oklch(.141 .005 265.823)20%,transparent);
8
+
9
+ --surface-back-color: oklch(0.216 0.006 56.043);
10
+ --surface-fore-color: oklch(100% 0 0);
11
+
12
+ --default-back-color: oklch(8.15% 0 0);
13
+ --default-fore-color: oklch(92.19% 0 0);
14
+
15
+ --primary-back-color: oklch(15.72% 0.0267 199.35);
16
+ --primary-fore-color: oklch(0.961151 0.003 300.98);
17
+
18
+ --secondary-back-color: oklch(0.22 0 0);
19
+ --secondary-fore-color: oklch(100% 0 0);
20
+
21
+ --accent-back-color: oklch(24.47% 0.0416 202.69);
22
+ --accent-fore-color: oklch(100% 0 0);
23
+
24
+ --info-back-color: oklch(0.268 0.007 34.298);
25
+ --info-fore-color: oklch(99.78% 0.0105 106.59);
26
+
27
+ --success-back-color: oklch(45.77% 0.155081 142.3128);
28
+ --success-fore-color: oklch(100% 0 0);
29
+
30
+ --warning-back-color: oklch(78.45% 0.1486 83.48);
31
+ --warning-fore-color: oklch(15.72% 0.0267 199.35);
32
+
33
+ --error-back-color: oklch(58.57% 0.2363 29.65);
34
+ --error-fore-color: oklch(100% 0 0);
35
+ }
36
+ }
@@ -0,0 +1,37 @@
1
+ @layer theme {
2
+ :not(data-theme), [data-theme="light"] {
3
+ --color-scheme: light;
4
+
5
+ --radius-size: 0.5rem;
6
+
7
+ --backdrop-color: color-mix(in oklab,oklch(.141 .005 285.823)20%,transparent);
8
+
9
+ --surface-color: oklch(100% 0 0);
10
+ --surface-fore-color: oklch(15.72% 0.0267 199.35);
11
+
12
+ --default-color: oklch(92.19% 0 0);
13
+ --default-fore-color: oklch(8.15% 0 0);
14
+
15
+ --primary-color: oklch(15.72% 0.0267 199.35);
16
+ --primary-fore-color: oklch(0.961151 0.003 300.98);
17
+
18
+ --secondary-color: oklch(84.27% 0.0057 31.06);
19
+ --secondary-fore-color: oklch(15.72% 0.0267 199.35);
20
+
21
+ --accent-color: oklch(24.47% 0.0416 202.69);
22
+ --accent-fore-color: oklch(100% 0 0);
23
+
24
+ --info-color: oklch(93.01% 0.0111 348.44);
25
+ --info-fore-color: oklch(24.47% 0.0416 202.69);
26
+
27
+ --success-color: oklch(45.77% 0.155081 142.3128);
28
+ --success-fore-color: oklch(100% 0 0);
29
+
30
+ --warning-color: oklch(78.45% 0.1486 83.48);
31
+ --warning-fore-color: oklch(15.72% 0.0267 199.35);
32
+
33
+ --error-color: oklch(58.57% 0.2363 29.65);
34
+ --error-fore-color: oklch(100% 0 0);
35
+ }
36
+
37
+ }
@@ -11,6 +11,7 @@
11
11
  @apply font-bold;
12
12
  font-size: var(--style-h2-size);
13
13
  }
14
+
14
15
  }
15
16
 
16
17
  @utility heading-3 {
@@ -1,39 +0,0 @@
1
- @import "../../base/preflight.css" layer(theme);
2
- @import "./light.css" layer(theme);
3
- @import "./dark.css" layer(theme);
4
-
5
- @custom-variant theme-dark (&:where([data-theme="dark"] *));
6
- @custom-variant theme-light (&:where([data-theme="light"] *));
7
-
8
- :root {
9
- color-scheme: var(--color-scheme);
10
- }
11
-
12
- @theme inline {
13
-
14
- --color-backdrop: var(--backdrop-color);
15
-
16
- --color-surface: var(--surface-color);
17
- --color-surface-content: var(--surface-content-color);
18
-
19
- --color-primary: var(--primary-color);
20
- --color-primary-content: var(--primary-content-color);
21
-
22
- --color-secondary: var(--secondary-color);
23
- --color-secondary-content: var(--secondary-content-color);
24
-
25
- --color-accent: var(--accent-color);
26
- --color-accent-content: var(--accent-content-color);
27
-
28
- --color-info: var(--info-color);
29
- --color-info-content: var(--info-content-color);
30
-
31
- --color-success: var(--success-color);
32
- --color-success-content: var(--success-content-color);
33
-
34
- --color-warning: var(--warning-color);
35
- --color-warning-content: var(--warning-content-color);
36
-
37
- --color-error: var(--error-color);
38
- --color-error-content: var(--error-content-color);
39
- }
@@ -1,31 +0,0 @@
1
- @layer theme {
2
- [data-theme="dark"] {
3
- --color-scheme: dark;
4
-
5
- --backdrop-color: color-mix(in oklab,oklch(.141 .005 265.823)20%,transparent);
6
-
7
- --surface-color: oklch(0.216 0.006 56.043);
8
- --surface-content-color: oklch(100% 0 0);
9
-
10
- --primary-color: oklch(15.72% 0.0267 199.35);
11
- --primary-content-color: oklch(0.961151 0.003 300.98);
12
-
13
- --secondary-color: oklch(0.22 0 0);
14
- --secondary-content-color: oklch(100% 0 0);
15
-
16
- --accent-color: oklch(24.47% 0.0416 202.69);
17
- --accent-content-color: oklch(100% 0 0);
18
-
19
- --info-color: oklch(0.268 0.007 34.298);
20
- --info-content-color: oklch(99.78% 0.0105 106.59);
21
-
22
- --success-color: oklch(45.77% 0.155081 142.3128);
23
- --success-content-color: oklch(100% 0 0);
24
-
25
- --warning-color: oklch(78.45% 0.1486 83.48);
26
- --warning-content-color: oklch(15.72% 0.0267 199.35);
27
-
28
- --error-color: oklch(58.57% 0.2363 29.65);
29
- --error-content-color: oklch(100% 0 0);
30
- }
31
- }
@@ -1,32 +0,0 @@
1
- @layer theme {
2
- :root, [data-theme="light"] {
3
- --color-scheme: light;
4
-
5
- --backdrop-color: color-mix(in oklab,oklch(.141 .005 285.823)20%,transparent);
6
-
7
- --surface-color: oklch(100% 0 0);
8
- --surface-content-color: oklch(15.72% 0.0267 199.35);
9
-
10
- --primary-color: oklch(15.72% 0.0267 199.35);
11
- --primary-content-color: oklch(0.961151 0.003 300.98);
12
-
13
- --secondary-color: oklch(84.27% 0.0057 31.06);
14
- --secondary-content-color: oklch(15.72% 0.0267 199.35);
15
-
16
- --accent-color: oklch(24.47% 0.0416 202.69);
17
- --accent-content-color: oklch(100% 0 0);
18
-
19
- --info-color: oklch(93.01% 0.0111 348.44);
20
- --info-content-color: oklch(24.47% 0.0416 202.69);
21
-
22
- --success-color: oklch(45.77% 0.155081 142.3128);
23
- --success-content-color: oklch(100% 0 0);
24
-
25
- --warning-color: oklch(78.45% 0.1486 83.48);
26
- --warning-content-color: oklch(15.72% 0.0267 199.35);
27
-
28
- --error-color: oklch(58.57% 0.2363 29.65);
29
- --error-content-color: oklch(100% 0 0);
30
- }
31
-
32
- }