|
| 1 | +.FormControl { |
| 2 | + position: relative; |
| 3 | + display: inline-flex; |
| 4 | +} |
| 5 | + |
| 6 | +.FormControl__button, |
| 7 | +.FormControl__select, |
| 8 | +.FormControl__input { |
| 9 | + width: 100%; |
| 10 | + appearance: none; |
| 11 | + height: 40px; |
| 12 | + background: var(--input-background); |
| 13 | + border-radius: 10px; |
| 14 | + font: var(--font-secondary-bold); |
| 15 | + color: var(--text-secondary); |
| 16 | + padding: 0 22px; |
| 17 | + border: none; |
| 18 | + outline: none; |
| 19 | + box-shadow: 0 4px 4px rgb(0 0 0 / 25%); |
| 20 | + transition: color 250ms; |
| 21 | +} |
| 22 | + |
| 23 | +.FormControl__button:focus-visible, |
| 24 | +.FormControl__select:focus-visible, |
| 25 | +.FormControl__input:focus-visible { |
| 26 | + outline: none; |
| 27 | + box-shadow: var(--accent) 0 0 0 2px inset; |
| 28 | +} |
| 29 | + |
| 30 | +.FormControl__select, |
| 31 | +.FormControl__input { |
| 32 | + font-size: 16px; |
| 33 | + line-height: 19px; |
| 34 | +} |
| 35 | + |
| 36 | +.FormControl__input::placeholder { |
| 37 | + color: var(--text-secondary); |
| 38 | + opacity: 0.7; |
| 39 | +} |
| 40 | + |
| 41 | +.FormControl__button:disabled, |
| 42 | +.FormControl__select:disabled, |
| 43 | +.FormControl__input:disabled { |
| 44 | + cursor: default; |
| 45 | + color: var(--text-secondary); |
| 46 | + opacity: 0.5; |
| 47 | +} |
| 48 | + |
| 49 | +.FormControl--clearable > input { |
| 50 | + padding-right: 40px; |
| 51 | +} |
| 52 | + |
| 53 | +.FormControl--select > select { |
| 54 | + cursor: pointer; |
| 55 | + padding-right: 40px; |
| 56 | +} |
| 57 | + |
| 58 | +.FormControl--segmented > button { |
| 59 | + box-sizing: border-box; |
| 60 | + height: 100%; |
| 61 | + padding: 0 10px; |
| 62 | + cursor: pointer; |
| 63 | + font-size: 14px; |
| 64 | + text-transform: uppercase; |
| 65 | + font-weight: 600; |
| 66 | + color: var(--text-default); |
| 67 | +} |
| 68 | + |
| 69 | +.FormControl--segmented > button:not(:disabled):hover { |
| 70 | + color: var(--text-hover); |
| 71 | +} |
| 72 | + |
| 73 | +.FormControl--segmented > button:not(.non-important):active, |
| 74 | +.FormControl--segmented > button:not(.non-important).active { |
| 75 | + color: var(--accent); |
| 76 | +} |
| 77 | + |
| 78 | +.FormControl--segmented > button:not(:first-child) { |
| 79 | + border-top-left-radius: 0; |
| 80 | + border-bottom-left-radius: 0; |
| 81 | + margin-left: 1px; |
| 82 | +} |
| 83 | + |
| 84 | +.FormControl--segmented > button:not(:last-child) { |
| 85 | + border-top-right-radius: 0; |
| 86 | + border-bottom-right-radius: 0; |
| 87 | +} |
| 88 | + |
| 89 | +.FormControl__segmentedFaIcon { |
| 90 | + font-size: 20px; |
| 91 | + outline: none; |
| 92 | +} |
| 93 | + |
| 94 | +.FormControl__caret, |
| 95 | +.FormControl__clear { |
| 96 | + position: absolute; |
| 97 | + right: 16px; |
| 98 | + top: 50%; |
| 99 | + transform: translate(0, -50%); |
| 100 | + transition: color 250ms; |
| 101 | +} |
| 102 | + |
| 103 | +.FormControl__caret { |
| 104 | + pointer-events: none; |
| 105 | +} |
| 106 | + |
| 107 | +.FormControl__clear { |
| 108 | + cursor: pointer; |
| 109 | +} |
| 110 | + |
| 111 | +.FormControl__clear:hover { |
| 112 | + color: var(--text-hover); |
| 113 | +} |
| 114 | + |
| 115 | +.FormControl__clear:active { |
| 116 | + color: var(--accent); |
| 117 | +} |
| 118 | + |
| 119 | +.FormControl__input:disabled ~ .FormControl__clear, |
| 120 | +.FormControl__input:placeholder-shown ~ .FormControl__clear { |
| 121 | + display: none; |
| 122 | +} |
| 123 | + |
| 124 | +.FormControl__select:hover + .FormControl__caret { |
| 125 | + color: var(--text-hover); |
| 126 | +} |
| 127 | + |
| 128 | +.FormControl__select:disabled + .FormControl__caret { |
| 129 | + color: var(--text-secondary); |
| 130 | + opacity: 0.5; |
| 131 | +} |
| 132 | + |
| 133 | +.FormControl option { |
| 134 | + background: var(--background-color); |
| 135 | +} |
| 136 | + |
| 137 | +.FormControl option:checked { |
| 138 | + color: var(--accent); |
| 139 | +} |
0 commit comments