159 lines
4.3 KiB
CSS
159 lines
4.3 KiB
CSS
/*
|
|
Copyright 2019 Adobe. All rights reserved.
|
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
governing permissions and limitations under the License.
|
|
*/
|
|
|
|
.spectrum-InputGroup {
|
|
&.is-focused {
|
|
&:not(.is-invalid) {
|
|
.spectrum-InputGroup-textfield {
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-key-focus);
|
|
}
|
|
}
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-m-border-color-key-focus);
|
|
}
|
|
}
|
|
}
|
|
&:hover {
|
|
&:not(.is-focused):not(.is-keyboardFocused):not(.is-disabled) {
|
|
.spectrum-InputGroup-textfield {
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-hover);
|
|
}
|
|
}
|
|
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-m-border-color-hover);
|
|
}
|
|
|
|
&.is-invalid {
|
|
.spectrum-InputGroup-textfield {
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-error-hover);
|
|
}
|
|
}
|
|
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-m-border-color-error-hover);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.is-disabled {
|
|
.spectrum-Datepicker-rangeDash {
|
|
color: var(--spectrum-alias-text-color-disabled);
|
|
}
|
|
}
|
|
}
|
|
|
|
.spectrum-InputGroup.is-focused {
|
|
.spectrum-InputGroup-button,
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-picker-m-border-color-key-focus);
|
|
}
|
|
|
|
&.is-invalid {
|
|
.spectrum-InputGroup-button,
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-picker-m-border-color-error);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Only add the 2px ring for keyboard focus */
|
|
.spectrum-InputGroup:not(.spectrum-InputGroup--quiet).is-keyboardFocused {
|
|
& {
|
|
box-shadow: 0 0 0 1px var(--spectrum-picker-m-border-color-key-focus);
|
|
}
|
|
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-input:focus-ring {
|
|
box-shadow: none ;
|
|
}
|
|
|
|
&.is-invalid {
|
|
& {
|
|
box-shadow: 0 0 0 1px var(--spectrum-picker-m-border-color-error-key-focus);
|
|
}
|
|
|
|
.spectrum-InputGroup-button,
|
|
.spectrum-InputGroup-input {
|
|
border-color: var(--spectrum-picker-m-border-color-error-key-focus);
|
|
}
|
|
}
|
|
|
|
.spectrum-InputGroup-button {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
.spectrum-InputGroup--quiet {
|
|
.spectrum-InputGroup-button {
|
|
&,
|
|
&:hover,
|
|
&:focus,
|
|
&:active,
|
|
&.is-selected,
|
|
&.is-invalid {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color);
|
|
}
|
|
|
|
&:disabled,
|
|
&:disabled:hover {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-disabled);
|
|
}
|
|
}
|
|
|
|
&:hover:not(.is-focused):not(.is-keyboardFocused):not(.is-disabled) {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-hover);
|
|
}
|
|
}
|
|
|
|
&.is-invalid {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-error);
|
|
}
|
|
}
|
|
|
|
&.is-focused {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-mouse-focus);
|
|
}
|
|
&.is-invalid {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-error-mouse-focus);
|
|
}
|
|
}
|
|
}
|
|
|
|
&.is-keyboardFocused {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
box-shadow: 0 1px 0 var(--spectrum-textfield-quiet-m-border-color-key-focus);
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-key-focus);
|
|
}
|
|
&.is-invalid {
|
|
.spectrum-InputGroup-input,
|
|
.spectrum-InputGroup-button {
|
|
box-shadow: 0 1px 0 var(--spectrum-picker-m-border-color-error-key-focus);
|
|
border-color: var(--spectrum-picker-m-border-color-error-key-focus);
|
|
}
|
|
}
|
|
}
|
|
}
|