input.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. [data-component="input"] {
  2. width: 100%;
  3. [data-slot="input-input"] {
  4. width: 100%;
  5. color: var(--text-strong);
  6. /* text-14-regular */
  7. font-family: var(--font-family-sans);
  8. font-size: 14px;
  9. font-style: normal;
  10. font-weight: var(--font-weight-regular);
  11. line-height: var(--line-height-large); /* 142.857% */
  12. letter-spacing: var(--letter-spacing-normal);
  13. &:focus {
  14. outline: none;
  15. }
  16. &::placeholder {
  17. color: var(--text-weak);
  18. }
  19. }
  20. &[data-variant="normal"] {
  21. display: flex;
  22. flex-direction: column;
  23. align-items: flex-start;
  24. gap: 8px;
  25. [data-slot="input-label"] {
  26. color: var(--text-weak);
  27. /* text-12-medium */
  28. font-family: var(--font-family-sans);
  29. font-size: var(--font-size-small);
  30. font-style: normal;
  31. font-weight: var(--font-weight-medium);
  32. line-height: 18px; /* 150% */
  33. letter-spacing: var(--letter-spacing-normal);
  34. }
  35. [data-slot="input-input"] {
  36. color: var(--text-strong);
  37. display: flex;
  38. height: 32px;
  39. padding: 2px 12px;
  40. align-items: center;
  41. gap: 8px;
  42. align-self: stretch;
  43. border-radius: var(--radius-md);
  44. border: 1px solid var(--border-weak-base);
  45. background: var(--input-base);
  46. /* text-14-regular */
  47. font-family: var(--font-family-sans);
  48. font-size: 14px;
  49. font-style: normal;
  50. font-weight: var(--font-weight-regular);
  51. line-height: var(--line-height-large); /* 142.857% */
  52. letter-spacing: var(--letter-spacing-normal);
  53. &:focus {
  54. outline: none;
  55. /* border/shadow-xs/select */
  56. box-shadow:
  57. 0 0 0 3px var(--border-weak-selected),
  58. 0 0 0 1px var(--border-selected),
  59. 0 1px 2px -1px rgba(19, 16, 16, 0.25),
  60. 0 1px 2px 0 rgba(19, 16, 16, 0.08),
  61. 0 1px 3px 0 rgba(19, 16, 16, 0.12);
  62. }
  63. &[data-invalid] {
  64. background: var(--surface-critical-weak);
  65. border: 1px solid var(--border-critical-selected);
  66. }
  67. &::placeholder {
  68. color: var(--text-weak);
  69. }
  70. }
  71. [data-slot="input-error"] {
  72. color: var(--text-on-critical-base);
  73. /* text-12-medium */
  74. font-family: var(--font-family-sans);
  75. font-size: var(--font-size-small);
  76. font-style: normal;
  77. font-weight: var(--font-weight-medium);
  78. line-height: 18px; /* 150% */
  79. letter-spacing: var(--letter-spacing-normal);
  80. }
  81. }
  82. }