Skip to content

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.

2.1 KB
Raw Blame
.textInputFieldWrapper {
  display: grid;
  grid-template-areas: 'label' 'input';
}

.textInputFieldWrapper input[type='text'],
.textInputFieldWrapper input[type='password'] {
  grid-area: input;
  width: 100%;
  min-width: 100px;
  height: var(--field-height);
  padding: 0 var(--field-padding-inline);
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  background: var(--field-background);
  box-shadow: none;
  font-family: var(--primary-font-family), 'Noto Color Emoji';
  font-size: var(--body-md);
  font-weight: var(--regular);
  color: var(--field-color);
  cursor: text;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;

  &::placeholder {
    color: var(--field-placeholder);
  }

  &:hover:not(:disabled) {
    border-color: var(--field-border-hover);
  }

  &:focus {
    outline: none;
    border-color: var(--field-border-focus);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
  }

  &:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
}

.textInputFieldWrapper label {
  grid-area: label;
  text-align: start;
  margin-bottom: var(--space-xs-fixed);
  font-family: var(--primary-font-family);
  font-size: var(--body-sm);
  font-weight: var(--medium);
  color: var(--field-label-color);
}

.textInputFieldWrapper .inputIcon {
  grid-area: input;
  align-self: center;
  justify-self: flex-end;
  margin-inline-end: 1rem;
  display: flex;
  align-items: center;
  z-index: 1;
  cursor: pointer;
  font-size: var(--body-lg);
  border: none;
  background: none;
  color: var(--text-default);
  padding: var(--space-3xs) var(--space-2xs);
  &:disabled {
    opacity: 0.7;
    .MuiSvgIcon-root {
      cursor: not-allowed;
    }
  }
}

.textInputFieldWrapper .inputIcon ~ input {
  padding-inline-end: 50px;
}

.textInputFieldWrapper.withRightButton {
  grid-template-areas: 'label label' 'input button';
  grid-template-columns: auto min-content;
  grid-column-gap: var(--space-xs-fixed);
}

.textInputFieldWrapper.withRightButton .rightButton {
  grid-area: button;
}

.textInputFieldWrapper .smallMessage {
  margin: var(--space-md) 0;
}