@auronui/styles 1.0.16 → 1.0.17

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.
@@ -1,5 +1,5 @@
1
1
  .input {
2
- @apply flex items-center gap-2 rounded-field border bg-field px-3 py-2 text-sm text-field-foreground shadow-field outline-none sm:text-xs;
2
+ @apply flex items-center gap-2 rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none sm:text-xs;
3
3
 
4
4
  /* Default size - matches input--md (height equivalent to h-9) */
5
5
  height: 2.25rem;
@@ -175,19 +175,27 @@
175
175
  /* ─── Size modifiers ─────────────────────────────────────────────────────────── */
176
176
 
177
177
  .input--sm {
178
- @apply text-xs px-2 py-1;
178
+ @apply text-xs;
179
179
  height: 1.75rem;
180
180
  }
181
181
 
182
+ .input--sm .input__input {
183
+ padding: 0.25rem 0.5rem;
184
+ }
185
+
182
186
  .input--md {
183
187
  /* No styles — md is the default size defined on .input base */
184
188
  }
185
189
 
186
190
  .input--lg {
187
- @apply text-base px-4 py-2.5;
191
+ @apply text-base;
188
192
  height: 2.75rem;
189
193
  }
190
194
 
195
+ .input--lg .input__input {
196
+ padding: 0.625rem 1rem;
197
+ }
198
+
191
199
  /* ─── Color modifiers ────────────────────────────────────────────────────────── */
192
200
 
193
201
  .input--default {
@@ -297,32 +305,45 @@
297
305
  /* ─── Slots ──────────────────────────────────────────────────────────────────── */
298
306
 
299
307
  .input__input {
300
- @apply flex-1 bg-transparent outline-none border-0 p-0 h-auto text-inherit;
308
+ @apply flex-1 bg-transparent outline-none border-0 text-inherit;
301
309
  @apply placeholder:text-field-placeholder;
310
+ align-self: stretch;
311
+ padding: 0.5rem 0.75rem;
312
+ border-radius: inherit;
302
313
 
303
314
  &:focus,
304
315
  &:focus-visible {
305
316
  outline: none;
306
317
  box-shadow: none;
307
318
  }
319
+ }
308
320
 
309
- /* Suppress browser autofill background use inset shadow to paint over it */
310
- &:-webkit-autofill,
311
- &:-webkit-autofill:hover,
312
- &:-webkit-autofill:focus {
313
- -webkit-box-shadow: 0 0 0px 1000px var(--color-field) inset;
314
- box-shadow: 0 0 0px 1000px var(--color-field) inset;
315
- -webkit-text-fill-color: var(--color-field-foreground);
316
- caret-color: var(--color-field-foreground);
317
- }
321
+ /* Underlined: no horizontal padding on the input underline spans edge-to-edge */
322
+ .input--underlined .input__input {
323
+ padding-left: 0;
324
+ padding-right: 0;
318
325
  }
319
326
 
320
- .input__start-content,
327
+ .input__start-content {
328
+ @apply inline-flex items-center justify-center shrink-0;
329
+ color: var(--color-field-placeholder);
330
+ padding-left: 0.75rem;
331
+ }
332
+
333
+ .input--sm .input__start-content { padding-left: 0.5rem; }
334
+ .input--lg .input__start-content { padding-left: 1rem; }
335
+ .input--underlined .input__start-content { padding-left: 0; }
336
+
321
337
  .input__end-content {
322
338
  @apply inline-flex items-center justify-center shrink-0;
323
339
  color: var(--color-field-placeholder);
340
+ padding-right: 0.75rem;
324
341
  }
325
342
 
343
+ .input--sm .input__end-content { padding-right: 0.5rem; }
344
+ .input--lg .input__end-content { padding-right: 1rem; }
345
+ .input--underlined .input__end-content { padding-right: 0; }
346
+
326
347
  .input__start-content svg,
327
348
  .input__end-content svg {
328
349
  @apply size-4;
@@ -406,26 +427,27 @@
406
427
  transform: translateY(-110%) scale(0.85);
407
428
  }
408
429
 
409
- /* Start-content pushes the label's left anchor so it doesn't overlap the icon */
430
+ /* Start-content pushes the label's left anchor so it doesn't overlap the icon.
431
+ Formula: start-content-pl + icon(1rem) + gap + input-pl */
410
432
  .input--label-inside:has(> .input__start-content) .input__label {
411
- left: calc(0.75rem + 1rem + 0.5rem); /* px-3 + size-4 icon + gap-2 */
433
+ left: calc(0.75rem + 1rem + 0.5rem + 0.75rem); /* start-content-pl + size-4 + gap-2 + input-pl */
412
434
  }
413
435
  .input--label-inside.input--underlined:has(> .input__start-content) .input__label {
414
- left: calc(1rem + 0.5rem); /* px-3 + size-4 icon + gap-2 */
436
+ left: calc(1rem + 0.5rem); /* icon + gap-2 (underlined has no pl on start-content or input) */
415
437
  }
416
438
 
417
439
  /* Size-aware offsets for the inside variant */
418
440
  .input--label-inside.input--sm .input__label {
419
441
  font-size: var(--text-xs, 0.75rem);
420
- left: 0.5rem; /* matches .input--sm px-2 */
442
+ left: 0.5rem; /* matches input--sm input pl-2 */
421
443
  }
422
444
 
423
445
  .input--label-inside.input--sm:has(> .input__start-content) .input__label {
424
- left: calc(0.5rem + 1rem + 0.4rem); /* px-3 + size-4 icon + gap-2 */
446
+ left: calc(0.5rem + 1rem + 0.4rem + 0.5rem); /* start-content-pl + size-4 + gap + input-pl */
425
447
  }
426
448
 
427
449
  .input--label-inside.input--underlined.input--sm:has(> .input__start-content) .input__label {
428
- left: calc(1rem + 0.4rem); /* px-3 + size-4 icon + gap-2 */
450
+ left: calc(1rem + 0.4rem); /* icon + gap (underlined has no pl) */
429
451
  }
430
452
 
431
453
  .input--label-inside.input--sm .input__input {
@@ -439,14 +461,14 @@
439
461
 
440
462
  .input--label-inside.input--lg .input__label {
441
463
  font-size: var(--text-base, 1rem);
442
- left: 1rem; /* matches .input--lg px-4 */
464
+ left: 1rem; /* matches input--lg input pl-4 */
443
465
  }
444
466
  .input--label-inside.input--lg:has(> .input__start-content) .input__label {
445
- left: calc(1rem + 1rem + 1rem); /* px-3 + size-4 icon + gap-2 */
467
+ left: calc(1rem + 1rem + 1rem + 1rem); /* start-content-pl + size-4 + gap-4 + input-pl */
446
468
  }
447
469
 
448
470
  .input--label-inside.input--underlined.input--lg:has(> .input__start-content) .input__label {
449
- left: calc(1rem + 1rem); /* px-3 + size-4 icon + gap-2 */
471
+ left: calc(1rem + 1rem); /* icon + gap-4 (underlined has no pl) */
450
472
  }
451
473
 
452
474
  .input--label-inside.input--lg .input__input {
@@ -539,7 +561,8 @@
539
561
  .input__clear-button,
540
562
  .input__password-toggle {
541
563
  @apply inline-flex items-center justify-center shrink-0;
542
- @apply bg-transparent border-0 p-0 cursor-pointer outline-none;
564
+ @apply bg-transparent border-0 cursor-pointer outline-none;
565
+ padding: 0 0.75rem 0 0;
543
566
  color: var(--color-field-placeholder);
544
567
  transition:
545
568
  color 300ms var(--ease-smooth),
@@ -552,17 +575,32 @@
552
575
  @apply size-4;
553
576
  }
554
577
 
578
+ .input--sm .input__clear-button,
579
+ .input--sm .input__password-toggle {
580
+ padding-right: 0.5rem;
581
+ }
582
+
555
583
  .input--sm .input__clear-button svg,
556
584
  .input--sm .input__password-toggle svg {
557
585
  width: 0.875rem;
558
586
  height: 0.875rem;
559
587
  }
560
588
 
589
+ .input--lg .input__clear-button,
590
+ .input--lg .input__password-toggle {
591
+ padding-right: 1rem;
592
+ }
593
+
561
594
  .input--lg .input__clear-button svg,
562
595
  .input--lg .input__password-toggle svg {
563
596
  @apply size-5;
564
597
  }
565
598
 
599
+ .input--underlined .input__clear-button,
600
+ .input--underlined .input__password-toggle {
601
+ padding-right: 0;
602
+ }
603
+
566
604
  @media (hover: hover) {
567
605
  .input__clear-button:hover,
568
606
  .input__password-toggle:hover,
@@ -1,6 +1,6 @@
1
1
  /* use textarea instead of text-area to avoid conflict with Tailwind `text-` prefix */
2
2
  .textarea {
3
- @apply flex items-start gap-2 rounded-field border bg-field px-3 py-2 text-sm text-field-foreground shadow-field outline-none sm:text-xs;
3
+ @apply flex items-start gap-2 rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none sm:text-xs;
4
4
 
5
5
  border-width: var(--border-width-field);
6
6
  border-color: var(--color-field-border);
@@ -124,7 +124,7 @@
124
124
 
125
125
  .textarea--underlined {
126
126
  /* Bottom border only — always-visible underline */
127
- @apply rounded-none shadow-none bg-transparent !px-0;
127
+ @apply rounded-none shadow-none bg-transparent;
128
128
  border-top: none;
129
129
  border-left: none;
130
130
  border-right: none;
@@ -174,7 +174,11 @@
174
174
  /* ─── Size modifiers ─────────────────────────────────────────────────────────── */
175
175
 
176
176
  .textarea--sm {
177
- @apply text-xs px-2 py-1;
177
+ @apply text-xs;
178
+ }
179
+
180
+ .textarea--sm .textarea__input {
181
+ padding: 0.25rem 0.5rem;
178
182
  }
179
183
 
180
184
  .textarea--md {
@@ -182,7 +186,11 @@
182
186
  }
183
187
 
184
188
  .textarea--lg {
185
- @apply text-base px-4 py-2.5;
189
+ @apply text-base;
190
+ }
191
+
192
+ .textarea--lg .textarea__input {
193
+ padding: 0.625rem 1rem;
186
194
  }
187
195
 
188
196
  /* ─── Color modifiers ────────────────────────────────────────────────────────── */
@@ -284,9 +292,11 @@
284
292
  /* ─── Slots ──────────────────────────────────────────────────────────────────── */
285
293
 
286
294
  .textarea__input {
287
- @apply flex-1 bg-transparent outline-none border-0 p-0 text-inherit resize-none;
295
+ @apply flex-1 bg-transparent outline-none border-0 text-inherit resize-none;
288
296
  @apply placeholder:text-field-placeholder;
289
297
  min-height: 1.5rem;
298
+ padding: 0.5rem 0.75rem;
299
+ border-radius: inherit;
290
300
 
291
301
  &:focus,
292
302
  &:focus-visible {
@@ -297,20 +307,41 @@
297
307
  &:-webkit-autofill,
298
308
  &:-webkit-autofill:hover,
299
309
  &:-webkit-autofill:focus {
300
- -webkit-box-shadow: 0 0 0px 1000px var(--color-field) inset;
301
- box-shadow: 0 0 0px 1000px var(--color-field) inset;
310
+ -webkit-box-shadow: 0 0 0px 1000px color-mix(in oklch, #006fee 8%, var(--color-field, white)) inset;
311
+ box-shadow: 0 0 0px 1000px color-mix(in oklch, #006fee 8%, var(--color-field, white)) inset;
302
312
  -webkit-text-fill-color: var(--color-field-foreground);
303
313
  caret-color: var(--color-field-foreground);
304
314
  }
305
315
  }
306
316
 
307
- .textarea__start-content,
317
+ .textarea--underlined .textarea__input {
318
+ padding-left: 0;
319
+ padding-right: 0;
320
+ }
321
+
322
+ .textarea__start-content {
323
+ @apply inline-flex items-center justify-center shrink-0;
324
+ color: var(--color-field-placeholder);
325
+ padding-top: 0.125rem;
326
+ padding-left: 0.75rem;
327
+ }
328
+
308
329
  .textarea__end-content {
309
330
  @apply inline-flex items-center justify-center shrink-0;
310
331
  color: var(--color-field-placeholder);
311
332
  padding-top: 0.125rem;
333
+ padding-right: 0.75rem;
312
334
  }
313
335
 
336
+ .textarea--sm .textarea__start-content { padding-left: 0.5rem; }
337
+ .textarea--lg .textarea__start-content { padding-left: 1rem; }
338
+
339
+ .textarea--sm .textarea__end-content { padding-right: 0.5rem; }
340
+ .textarea--lg .textarea__end-content { padding-right: 1rem; }
341
+
342
+ .textarea--underlined .textarea__start-content { padding-left: 0; }
343
+ .textarea--underlined .textarea__end-content { padding-right: 0; }
344
+
314
345
  .textarea__start-content svg,
315
346
  .textarea__end-content svg {
316
347
  @apply size-4;
@@ -333,6 +364,9 @@
333
364
 
334
365
  .textarea--label-inside {
335
366
  position: relative;
367
+ }
368
+
369
+ .textarea--label-inside .textarea__input {
336
370
  padding-top: 1.5rem;
337
371
  }
338
372
 
@@ -372,7 +406,7 @@
372
406
  }
373
407
 
374
408
  .textarea--label-inside:has(> .textarea__start-content) .textarea__label {
375
- left: calc(0.75rem + 1rem + 0.5rem);
409
+ left: calc(0.75rem + 1rem + 0.5rem + 0.75rem);
376
410
  }
377
411
  .textarea--label-inside.textarea--underlined:has(> .textarea__start-content) .textarea__label {
378
412
  left: calc(1rem + 0.5rem);
@@ -384,7 +418,7 @@
384
418
  }
385
419
 
386
420
  .textarea--label-inside.textarea--sm:has(> .textarea__start-content) .textarea__label {
387
- left: calc(0.5rem + 1rem + 0.4rem);
421
+ left: calc(0.5rem + 1rem + 0.4rem + 0.5rem);
388
422
  }
389
423
 
390
424
  .textarea--label-inside.textarea--underlined.textarea--sm:has(> .textarea__start-content) .textarea__label {
@@ -396,7 +430,7 @@
396
430
  left: 1rem;
397
431
  }
398
432
  .textarea--label-inside.textarea--lg:has(> .textarea__start-content) .textarea__label {
399
- left: calc(1rem + 1rem + 1rem);
433
+ left: calc(1rem + 1rem + 1rem + 1rem);
400
434
  }
401
435
 
402
436
  .textarea--label-inside.textarea--underlined.textarea--lg:has(> .textarea__start-content) .textarea__label {
@@ -482,7 +516,8 @@
482
516
 
483
517
  .textarea__clear-button {
484
518
  @apply inline-flex items-center justify-center shrink-0;
485
- @apply bg-transparent border-0 p-0 cursor-pointer outline-none;
519
+ @apply bg-transparent border-0 cursor-pointer outline-none;
520
+ padding: 0 0.75rem 0 0;
486
521
  color: var(--color-field-placeholder);
487
522
  transition:
488
523
  color 300ms var(--ease-smooth),
@@ -494,6 +529,18 @@
494
529
  @apply size-4;
495
530
  }
496
531
 
532
+ .textarea--sm .textarea__clear-button {
533
+ padding-right: 0.5rem;
534
+ }
535
+
536
+ .textarea--lg .textarea__clear-button {
537
+ padding-right: 1rem;
538
+ }
539
+
540
+ .textarea--underlined .textarea__clear-button {
541
+ padding-right: 0;
542
+ }
543
+
497
544
  .textarea--sm .textarea__clear-button svg {
498
545
  width: 0.875rem;
499
546
  height: 0.875rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auronui/styles",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Auron core styles — adapted for Reka UI",
5
5
  "type": "module",
6
6
  "license": "MIT",