@react-spectrum/autocomplete 3.0.0-alpha.1 → 3.0.0-alpha.11
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.
- package/dist/main.css +1 -2
- package/dist/main.js +1150 -973
- package/dist/main.js.map +1 -1
- package/dist/module.js +1146 -880
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/MobileSearchAutocomplete.tsx +102 -90
- package/src/SearchAutocomplete.tsx +18 -12
- package/src/index.ts +2 -3
- package/src/searchautocomplete.css +5 -4
- package/dist/main.css.map +0 -1
|
@@ -19,8 +19,8 @@ import {ComboBoxState, useComboBoxState} from '@react-stately/combobox';
|
|
|
19
19
|
import {DismissButton} from '@react-aria/overlays';
|
|
20
20
|
import {Field} from '@react-spectrum/label';
|
|
21
21
|
import {FocusableRef, ValidationState} from '@react-types/shared';
|
|
22
|
-
import {FocusRing, FocusScope} from '@react-aria/focus';
|
|
23
22
|
import {focusSafely} from '@react-aria/focus';
|
|
23
|
+
import {FocusScope, useFocusRing} from '@react-aria/focus';
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
import intlMessages from '../intl/*.json';
|
|
26
26
|
import {ListBoxBase, useListBoxLayout} from '@react-spectrum/listbox';
|
|
@@ -38,7 +38,7 @@ import textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.
|
|
|
38
38
|
import {Tray} from '@react-spectrum/overlays';
|
|
39
39
|
import {useButton} from '@react-aria/button';
|
|
40
40
|
import {useDialog} from '@react-aria/dialog';
|
|
41
|
-
import {useFilter,
|
|
41
|
+
import {useFilter, useLocalizedStringFormatter} from '@react-aria/i18n';
|
|
42
42
|
import {useFocusableRef} from '@react-spectrum/utils';
|
|
43
43
|
import {useLabel} from '@react-aria/label';
|
|
44
44
|
import {useOverlayTrigger} from '@react-aria/overlays';
|
|
@@ -70,7 +70,7 @@ export const MobileSearchAutocomplete = React.forwardRef(function MobileSearchAu
|
|
|
70
70
|
selectedKey: undefined,
|
|
71
71
|
defaultSelectedKey: undefined
|
|
72
72
|
});
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
let buttonRef = useRef<HTMLElement>();
|
|
75
75
|
let domRef = useFocusableRef(ref, buttonRef);
|
|
76
76
|
let {triggerProps, overlayProps} = useOverlayTrigger({type: 'listbox'}, state, buttonRef);
|
|
@@ -99,7 +99,7 @@ export const MobileSearchAutocomplete = React.forwardRef(function MobileSearchAu
|
|
|
99
99
|
ref={domRef}
|
|
100
100
|
includeNecessityIndicatorInAccessibilityName>
|
|
101
101
|
<SearchAutocompleteButton
|
|
102
|
-
{...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus})}
|
|
102
|
+
{...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus, icon: props.icon})}
|
|
103
103
|
ref={buttonRef}
|
|
104
104
|
isQuiet={isQuiet}
|
|
105
105
|
isDisabled={isDisabled}
|
|
@@ -124,6 +124,7 @@ export const MobileSearchAutocomplete = React.forwardRef(function MobileSearchAu
|
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
interface SearchAutocompleteButtonProps extends AriaButtonProps {
|
|
127
|
+
icon?: ReactElement,
|
|
127
128
|
isQuiet?: boolean,
|
|
128
129
|
isDisabled?: boolean,
|
|
129
130
|
isReadOnly?: boolean,
|
|
@@ -137,7 +138,12 @@ interface SearchAutocompleteButtonProps extends AriaButtonProps {
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteButton(props: SearchAutocompleteButtonProps, ref: RefObject<HTMLElement>) {
|
|
141
|
+
let searchIcon = (
|
|
142
|
+
<Magnifier data-testid="searchicon" />
|
|
143
|
+
);
|
|
144
|
+
|
|
140
145
|
let {
|
|
146
|
+
icon = searchIcon,
|
|
141
147
|
isQuiet,
|
|
142
148
|
isDisabled,
|
|
143
149
|
isReadOnly,
|
|
@@ -149,24 +155,22 @@ const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteBut
|
|
|
149
155
|
style,
|
|
150
156
|
className
|
|
151
157
|
} = props;
|
|
152
|
-
let
|
|
158
|
+
let stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
153
159
|
let valueId = useId();
|
|
154
160
|
let invalidId = useId();
|
|
155
161
|
let validationIcon = validationState === 'invalid'
|
|
156
|
-
? <AlertMedium id={invalidId} aria-label={
|
|
162
|
+
? <AlertMedium id={invalidId} aria-label={stringFormatter.format('invalid')} />
|
|
157
163
|
: <CheckmarkMedium />;
|
|
158
164
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
size: 'S'
|
|
169
|
-
});
|
|
165
|
+
if (icon) {
|
|
166
|
+
icon = React.cloneElement(icon, {
|
|
167
|
+
UNSAFE_className: classNames(
|
|
168
|
+
textfieldStyles,
|
|
169
|
+
'spectrum-Textfield-icon'
|
|
170
|
+
),
|
|
171
|
+
size: 'S'
|
|
172
|
+
});
|
|
173
|
+
}
|
|
170
174
|
|
|
171
175
|
let clearButton = (
|
|
172
176
|
<ClearButton
|
|
@@ -175,7 +179,7 @@ const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteBut
|
|
|
175
179
|
props.onPress(e);
|
|
176
180
|
}}
|
|
177
181
|
preventFocus
|
|
178
|
-
aria-label={
|
|
182
|
+
aria-label={stringFormatter.format('clear')}
|
|
179
183
|
excludeFromTabOrder
|
|
180
184
|
UNSAFE_className={
|
|
181
185
|
classNames(
|
|
@@ -199,6 +203,7 @@ const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteBut
|
|
|
199
203
|
});
|
|
200
204
|
|
|
201
205
|
let {hoverProps, isHovered} = useHover({});
|
|
206
|
+
let {isFocused, isFocusVisible, focusProps} = useFocusRing();
|
|
202
207
|
let {buttonProps} = useButton({
|
|
203
208
|
...props,
|
|
204
209
|
'aria-labelledby': [
|
|
@@ -211,88 +216,92 @@ const SearchAutocompleteButton = React.forwardRef(function SearchAutocompleteBut
|
|
|
211
216
|
}, ref);
|
|
212
217
|
|
|
213
218
|
return (
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
<div
|
|
220
|
+
{...mergeProps(hoverProps, focusProps, buttonProps)}
|
|
221
|
+
aria-haspopup="dialog"
|
|
222
|
+
ref={ref as RefObject<HTMLDivElement>}
|
|
223
|
+
style={{...style, outline: 'none'}}
|
|
224
|
+
className={
|
|
225
|
+
classNames(
|
|
226
|
+
styles,
|
|
227
|
+
'spectrum-InputGroup',
|
|
228
|
+
{
|
|
229
|
+
'spectrum-InputGroup--quiet': isQuiet,
|
|
230
|
+
'is-disabled': isDisabled,
|
|
231
|
+
'spectrum-InputGroup--invalid': validationState === 'invalid',
|
|
232
|
+
'is-hovered': isHovered,
|
|
233
|
+
'is-focused': isFocused,
|
|
234
|
+
'focus-ring': isFocusVisible
|
|
235
|
+
},
|
|
236
|
+
classNames(
|
|
237
|
+
searchAutocompleteStyles,
|
|
238
|
+
'mobile-searchautocomplete'
|
|
239
|
+
),
|
|
240
|
+
className
|
|
241
|
+
)
|
|
242
|
+
}>
|
|
217
243
|
<div
|
|
218
|
-
{...mergeProps(hoverProps, buttonProps)}
|
|
219
|
-
aria-haspopup="dialog"
|
|
220
|
-
ref={ref as RefObject<HTMLDivElement>}
|
|
221
|
-
style={{...style, outline: 'none'}}
|
|
222
244
|
className={
|
|
223
245
|
classNames(
|
|
224
|
-
|
|
225
|
-
'spectrum-
|
|
246
|
+
textfieldStyles,
|
|
247
|
+
'spectrum-Textfield',
|
|
226
248
|
{
|
|
227
|
-
'spectrum-
|
|
228
|
-
'
|
|
229
|
-
'spectrum-
|
|
230
|
-
'is-hovered': isHovered
|
|
249
|
+
'spectrum-Textfield--invalid': validationState === 'invalid',
|
|
250
|
+
'spectrum-Textfield--valid': validationState === 'valid',
|
|
251
|
+
'spectrum-Textfield--quiet': isQuiet
|
|
231
252
|
},
|
|
232
253
|
classNames(
|
|
233
|
-
|
|
234
|
-
'
|
|
235
|
-
|
|
236
|
-
|
|
254
|
+
searchStyles,
|
|
255
|
+
'spectrum-Search',
|
|
256
|
+
{
|
|
257
|
+
'is-disabled': isDisabled,
|
|
258
|
+
'is-quiet': isQuiet,
|
|
259
|
+
'spectrum-Search--invalid': validationState === 'invalid',
|
|
260
|
+
'spectrum-Search--valid': validationState === 'valid'
|
|
261
|
+
}
|
|
262
|
+
)
|
|
237
263
|
)
|
|
238
264
|
}>
|
|
239
265
|
<div
|
|
240
266
|
className={
|
|
241
267
|
classNames(
|
|
242
268
|
textfieldStyles,
|
|
243
|
-
'spectrum-Textfield',
|
|
269
|
+
'spectrum-Textfield-input',
|
|
244
270
|
{
|
|
245
|
-
'spectrum-Textfield
|
|
246
|
-
'
|
|
247
|
-
'
|
|
271
|
+
'spectrum-Textfield-inputIcon': !!icon,
|
|
272
|
+
'is-hovered': isHovered,
|
|
273
|
+
'is-placeholder': isPlaceholder,
|
|
274
|
+
'is-disabled': isDisabled,
|
|
275
|
+
'is-quiet': isQuiet,
|
|
276
|
+
'is-focused': isFocused,
|
|
277
|
+
'focus-ring': isFocusVisible
|
|
248
278
|
},
|
|
249
279
|
classNames(
|
|
250
280
|
searchStyles,
|
|
251
|
-
'spectrum-Search'
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
'spectrum-Search--valid': validationState === 'valid'
|
|
257
|
-
}
|
|
281
|
+
'spectrum-Search-input'
|
|
282
|
+
),
|
|
283
|
+
classNames(
|
|
284
|
+
searchAutocompleteStyles,
|
|
285
|
+
'mobile-input'
|
|
258
286
|
)
|
|
259
287
|
)
|
|
260
288
|
}>
|
|
261
|
-
|
|
289
|
+
{icon}
|
|
290
|
+
<span
|
|
291
|
+
id={valueId}
|
|
262
292
|
className={
|
|
263
293
|
classNames(
|
|
264
|
-
|
|
265
|
-
'
|
|
266
|
-
'spectrum-Textfield-inputIcon',
|
|
267
|
-
{
|
|
268
|
-
'is-hovered': isHovered,
|
|
269
|
-
'is-placeholder': isPlaceholder,
|
|
270
|
-
'is-disabled': isDisabled,
|
|
271
|
-
'is-quiet': isQuiet
|
|
272
|
-
},
|
|
273
|
-
classNames(
|
|
274
|
-
searchStyles,
|
|
275
|
-
'spectrum-Search-input'
|
|
276
|
-
)
|
|
294
|
+
searchAutocompleteStyles,
|
|
295
|
+
'mobile-value'
|
|
277
296
|
)
|
|
278
297
|
}>
|
|
279
|
-
{
|
|
280
|
-
|
|
281
|
-
id={valueId}
|
|
282
|
-
className={
|
|
283
|
-
classNames(
|
|
284
|
-
searchAutocompleteStyles,
|
|
285
|
-
'mobile-value'
|
|
286
|
-
)
|
|
287
|
-
}>
|
|
288
|
-
{children}
|
|
289
|
-
</span>
|
|
290
|
-
</div>
|
|
291
|
-
{validationState ? validation : null}
|
|
292
|
-
{(inputValue !== '' || validationState != null) && !isReadOnly && clearButton}
|
|
298
|
+
{children}
|
|
299
|
+
</span>
|
|
293
300
|
</div>
|
|
301
|
+
{validationState ? validation : null}
|
|
302
|
+
{(inputValue !== '' || validationState != null) && !isReadOnly && clearButton}
|
|
294
303
|
</div>
|
|
295
|
-
</
|
|
304
|
+
</div>
|
|
296
305
|
);
|
|
297
306
|
});
|
|
298
307
|
|
|
@@ -304,9 +313,14 @@ interface SearchAutocompleteTrayProps extends SpectrumSearchAutocompleteProps<un
|
|
|
304
313
|
}
|
|
305
314
|
|
|
306
315
|
function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
316
|
+
let searchIcon = (
|
|
317
|
+
<Magnifier data-testid="searchicon" />
|
|
318
|
+
);
|
|
319
|
+
|
|
307
320
|
let {
|
|
308
321
|
// completionMode = 'suggest',
|
|
309
322
|
state,
|
|
323
|
+
icon = searchIcon,
|
|
310
324
|
isDisabled,
|
|
311
325
|
validationState,
|
|
312
326
|
label,
|
|
@@ -323,7 +337,7 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
|
323
337
|
let popoverRef = useRef<HTMLDivElement>();
|
|
324
338
|
let listBoxRef = useRef<HTMLDivElement>();
|
|
325
339
|
let layout = useListBoxLayout(state);
|
|
326
|
-
let
|
|
340
|
+
let stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
327
341
|
|
|
328
342
|
let {inputProps, listBoxProps, labelProps, clearButtonProps} = useSearchAutocomplete(
|
|
329
343
|
{
|
|
@@ -366,7 +380,7 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
|
366
380
|
<ClearButton
|
|
367
381
|
{...clearButtonProps}
|
|
368
382
|
preventFocus
|
|
369
|
-
aria-label={
|
|
383
|
+
aria-label={stringFormatter.format('clear')}
|
|
370
384
|
excludeFromTabOrder
|
|
371
385
|
UNSAFE_className={
|
|
372
386
|
classNames(
|
|
@@ -379,7 +393,7 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
|
379
393
|
|
|
380
394
|
let loadingCircle = (
|
|
381
395
|
<ProgressCircle
|
|
382
|
-
aria-label={
|
|
396
|
+
aria-label={stringFormatter.format('loading')}
|
|
383
397
|
size="S"
|
|
384
398
|
isIndeterminate
|
|
385
399
|
UNSAFE_className={classNames(
|
|
@@ -450,17 +464,15 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
|
450
464
|
}
|
|
451
465
|
};
|
|
452
466
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
size: 'S'
|
|
463
|
-
});
|
|
467
|
+
if (icon) {
|
|
468
|
+
icon = React.cloneElement(icon, {
|
|
469
|
+
UNSAFE_className: classNames(
|
|
470
|
+
textfieldStyles,
|
|
471
|
+
'spectrum-Textfield-icon'
|
|
472
|
+
),
|
|
473
|
+
size: 'S'
|
|
474
|
+
});
|
|
475
|
+
}
|
|
464
476
|
|
|
465
477
|
return (
|
|
466
478
|
<FocusScope restoreFocus contain>
|
|
@@ -527,7 +539,7 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) {
|
|
|
527
539
|
shouldUseVirtualFocus
|
|
528
540
|
renderEmptyState={() => loadingState !== 'loading' && (
|
|
529
541
|
<span className={classNames(searchAutocompleteStyles, 'no-results')}>
|
|
530
|
-
{
|
|
542
|
+
{stringFormatter.format('noResults')}
|
|
531
543
|
</span>
|
|
532
544
|
)}
|
|
533
545
|
UNSAFE_className={
|
|
@@ -24,21 +24,26 @@ import {MobileSearchAutocomplete} from './MobileSearchAutocomplete';
|
|
|
24
24
|
import {Placement} from '@react-types/overlays';
|
|
25
25
|
import {Popover} from '@react-spectrum/overlays';
|
|
26
26
|
import {ProgressCircle} from '@react-spectrum/progress';
|
|
27
|
-
import React, {forwardRef, InputHTMLAttributes, RefObject, useCallback, useEffect,
|
|
27
|
+
import React, {forwardRef, InputHTMLAttributes, RefObject, useCallback, useEffect, useRef, useState} from 'react';
|
|
28
28
|
import searchStyles from '@adobe/spectrum-css-temp/components/search/vars.css';
|
|
29
29
|
import {SpectrumSearchAutocompleteProps} from '@react-types/autocomplete';
|
|
30
30
|
import styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';
|
|
31
31
|
import {TextFieldBase} from '@react-spectrum/textfield';
|
|
32
32
|
import textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';
|
|
33
33
|
import {useComboBoxState} from '@react-stately/combobox';
|
|
34
|
-
import {useFilter,
|
|
34
|
+
import {useFilter, useLocalizedStringFormatter} from '@react-aria/i18n';
|
|
35
35
|
import {useHover} from '@react-aria/interactions';
|
|
36
|
+
import {useLayoutEffect} from '@react-aria/utils';
|
|
36
37
|
import {useProvider, useProviderProps} from '@react-spectrum/provider';
|
|
37
38
|
import {useSearchAutocomplete} from '@react-aria/autocomplete';
|
|
38
39
|
|
|
39
40
|
function SearchAutocomplete<T extends object>(props: SpectrumSearchAutocompleteProps<T>, ref: FocusableRef<HTMLElement>) {
|
|
40
41
|
props = useProviderProps(props);
|
|
41
42
|
|
|
43
|
+
if (props.placeholder) {
|
|
44
|
+
console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead.');
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
let isMobile = useIsMobileDevice();
|
|
43
48
|
if (isMobile) {
|
|
44
49
|
// menuTrigger=focus/manual don't apply to mobile searchwithin
|
|
@@ -61,7 +66,7 @@ const SearchAutocompleteBase = React.forwardRef(function SearchAutocompleteBase<
|
|
|
61
66
|
onSubmit = () => {}
|
|
62
67
|
} = props;
|
|
63
68
|
|
|
64
|
-
let
|
|
69
|
+
let stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
65
70
|
let isAsync = loadingState != null;
|
|
66
71
|
let popoverRef = useRef<DOMRefValue<HTMLDivElement>>();
|
|
67
72
|
let unwrappedPopoverRef = useUnwrapDOMRef(popoverRef);
|
|
@@ -82,7 +87,7 @@ const SearchAutocompleteBase = React.forwardRef(function SearchAutocompleteBase<
|
|
|
82
87
|
}
|
|
83
88
|
);
|
|
84
89
|
let layout = useListBoxLayout(state);
|
|
85
|
-
|
|
90
|
+
|
|
86
91
|
let {inputProps, listBoxProps, labelProps, clearButtonProps} = useSearchAutocomplete(
|
|
87
92
|
{
|
|
88
93
|
...props,
|
|
@@ -174,7 +179,7 @@ const SearchAutocompleteBase = React.forwardRef(function SearchAutocompleteBase<
|
|
|
174
179
|
onLoadMore={onLoadMore}
|
|
175
180
|
renderEmptyState={() => isAsync && (
|
|
176
181
|
<span>
|
|
177
|
-
{
|
|
182
|
+
{stringFormatter.format('noResults')}
|
|
178
183
|
</span>
|
|
179
184
|
)} />
|
|
180
185
|
<DismissButton onDismiss={() => state.close()} />
|
|
@@ -193,7 +198,12 @@ interface SearchAutocompleteInputProps extends SpectrumSearchAutocompleteProps<u
|
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
const SearchAutocompleteInput = React.forwardRef(function SearchAutocompleteInput(props: SearchAutocompleteInputProps, ref: RefObject<HTMLElement>) {
|
|
201
|
+
let searchIcon = (
|
|
202
|
+
<Magnifier data-testid="searchicon" />
|
|
203
|
+
);
|
|
204
|
+
|
|
196
205
|
let {
|
|
206
|
+
icon = searchIcon,
|
|
197
207
|
isQuiet,
|
|
198
208
|
isDisabled,
|
|
199
209
|
isReadOnly,
|
|
@@ -209,13 +219,13 @@ const SearchAutocompleteInput = React.forwardRef(function SearchAutocompleteInpu
|
|
|
209
219
|
clearButtonProps
|
|
210
220
|
} = props;
|
|
211
221
|
let {hoverProps, isHovered} = useHover({});
|
|
212
|
-
let
|
|
222
|
+
let stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
213
223
|
let timeout = useRef(null);
|
|
214
224
|
let [showLoading, setShowLoading] = useState(false);
|
|
215
225
|
|
|
216
226
|
let loadingCircle = (
|
|
217
227
|
<ProgressCircle
|
|
218
|
-
aria-label={
|
|
228
|
+
aria-label={stringFormatter.format('loading')}
|
|
219
229
|
size="S"
|
|
220
230
|
isIndeterminate
|
|
221
231
|
UNSAFE_className={classNames(
|
|
@@ -228,10 +238,6 @@ const SearchAutocompleteInput = React.forwardRef(function SearchAutocompleteInpu
|
|
|
228
238
|
)} />
|
|
229
239
|
);
|
|
230
240
|
|
|
231
|
-
let searchIcon = (
|
|
232
|
-
<Magnifier data-testid="searchicon" />
|
|
233
|
-
);
|
|
234
|
-
|
|
235
241
|
let clearButton = (
|
|
236
242
|
<ClearButton
|
|
237
243
|
{...clearButtonProps}
|
|
@@ -319,7 +325,7 @@ const SearchAutocompleteInput = React.forwardRef(function SearchAutocompleteInpu
|
|
|
319
325
|
validationState={validationState}
|
|
320
326
|
isLoading={showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading')}
|
|
321
327
|
loadingIndicator={loadingState != null && loadingCircle}
|
|
322
|
-
icon={
|
|
328
|
+
icon={icon}
|
|
323
329
|
wrapperChildren={(inputValue !== '' && !isReadOnly) && clearButton} />
|
|
324
330
|
</div>
|
|
325
331
|
</FocusRing>
|
package/src/index.ts
CHANGED
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
/// <reference types="css-module-types" />
|
|
14
|
-
|
|
15
|
-
export * from './SearchAutocomplete';
|
|
13
|
+
export {SearchAutocomplete} from './SearchAutocomplete';
|
|
16
14
|
export {Item, Section} from '@react-stately/collections';
|
|
15
|
+
export type {SpectrumSearchAutocompleteProps} from '@react-types/autocomplete';
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.mobile-input {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
text-overflow: ellipsis;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.mobile-value {
|
|
37
|
-
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.tray-dialog {
|
package/dist/main.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAYA,6BAOE,kEAIF,CAXA,6BAOE,mEAIF,CAXA,mBACE,aAAc,CAKd,4DAA6D,CAE7D,gGAAsD,CACtD,0DAA+D,CAC/D,iBACF,CAEA,kCACE,YACF,CAEA,qBACE,kBAAmB,CACnB,eAAgB,CAChB,sBACF,CAEA,qBACE,qBACF,CAEA,oBACE,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBAAsB,CACtB,WAAY,CACZ,YACF,CAEA,uBACE,gDAAiD,CACjD,sDAAuD,CACvD,mBAAc,CAAd,aAAc,CACd,oBASF,CAPE,wCACE,mDACF,CAEA,8DACE,sDACF,CAFA,8DACE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D,eAUF,CARE,yIAEE,8FACF,CAEA,mFACE,0CACF,CAGF,wCACE,qDAAiE,CACjE,iGAAyD,CACzD,iFAUF,CARE,mHAEE,6FACF,CAEA,wEACE,gFACF,CAGF,0FAEE,iGACF,CAGE,gEACE,2FAA8D,CAC9D,mGACF,CAGF,+FAEE,sDAAqE,CACrE,uEAA6D,CAC7D,qFAAoD,CAGpD,uGAUF,CARE,oQAEE,qFACF,CAEA,+JACE,0CACF,CAGF,oEACE,iGAgBF,CAdE,sFACE,qGACF,CAEA,2EACE,oGACF,CAGE,mGACE,iGAA0D,CAC1D,yGACF,CAIJ,mEACE,+EAAkE,CAClE,qFA2BF,CAzBE,qFACE,2FACF,CAEA,0EACE,iGACF,CAEA,8JAEE,2FACF,CAGE,kGACE,2FAA8D,CAC9D,iGACF,CAGF,kKAEE,+EAA2E,CAC3E,yFACF,CAGF,+FACE,iGAQF,CALI,8HACE,iGAA0D,CAC1D,yGACF,CAMA,qIACE,uGACF,CAMN,gCACE,2EACF,CAGE,4EACE,wFACF,CAEA,8EACE,sFACF","sources":["./packages/@react-spectrum/autocomplete/src/searchautocomplete.css","./node_modules/@adobe/spectrum-css-temp/components/search/index.css","./node_modules/@adobe/spectrum-css-temp/components/inputgroup/index.css","./node_modules/@adobe/spectrum-css-temp/components/inputgroup/skin.css","./node_modules/@adobe/spectrum-css-temp/components/textfield/index.css","./node_modules/@adobe/spectrum-css-temp/components/textfield/skin.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n.no-results {\n display: block;\n /*\n Renamed from padding-y to padding-height to fix docs issue where fallback var replaced this value\n (due to old spectrum-css postcss-custom-properties-custom-mapping plugin).\n */\n padding-top: var(--spectrum-selectlist-option-padding-height);\n padding-inline-start: var(--spectrum-selectlist-option-padding);\n font-size: var(--spectrum-selectlist-option-text-size);\n font-weight: var(--spectrum-selectlist-option-text-font-weight);\n font-style: italic;\n}\n\n.mobile-searchautocomplete {\n outline: none;\n}\n\n.mobile-input {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mobile-value {\n vertical-align: middle;\n}\n\n.tray-dialog {\n display: flex;\n flex-direction: column;\n height: 100%;\n outline: none;\n}\n\n.tray-textfield {\n margin: var(--spectrum-global-dimension-size-150);\n margin-bottom: var(--spectrum-global-dimension-size-50);\n flex-shrink: 0;\n width: initial !important;\n\n &.has-label {\n margin-top: var(--spectrum-global-dimension-size-50);\n }\n\n .tray-textfield-input {\n padding-inline-start: var(--spectrum-textfield-padding-x);\n }\n}\n\n.tray-listbox {\n width: 100%;\n flex: 1;\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n/* override DNA variables to use ones that change in large scale instead of staying static */\n:root {\n --spectrum-search-padding-left: var(--spectrum-global-dimension-size-450);\n --spectrum-search-padding-right: var(--spectrum-global-dimension-size-350);\n --spectrum-search-quiet-padding-left: var(--spectrum-global-dimension-size-300);\n --spectrum-search-quiet-padding-right: var(--spectrum-global-dimension-size-350);\n}\n\n.spectrum-Search {\n display: inline-block;\n position: relative;\n\n .spectrum-ClearButton {\n position: absolute;\n inset-inline-end: 0;\n top: 0;\n }\n\n &.is-quiet .spectrum-Search-input {\n padding-inline-start: var(--spectrum-search-quiet-padding-left);\n padding-inline-end: var(--spectrum-search-quiet-padding-right);\n }\n\n &.spectrum-Search--invalid .spectrum-ClearButton {\n inset-inline-end: calc(var(--spectrum-icon-alert-medium-width) + var(--spectrum-textfield-padding-x));\n }\n\n &.spectrum-Search--valid .spectrum-ClearButton {\n inset-inline-end: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x) / 2 + var(--spectrum-global-dimension-size-150));\n }\n\n /* Flip clear button and circle loader position so circle loader is to the left of the clear button */\n &.spectrum-Search--loadable .spectrum-ClearButton {\n inset-inline-end: 0\n }\n\n /* Flip clear button and circle loader position so circle loader is to the left of the clear button */\n &.spectrum-Search--loadable .spectrum-Search-circleLoader {\n inset-inline-end: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x) / 2 + var(--spectrum-global-dimension-size-150));\n }\n\n /* Move validation icons so that they sit to the left of the clear button (for async loading combobox tray, same position as loading indicator) */\n &.spectrum-Search--loadable .spectrum-Search-validationIcon {\n inset-inline-end: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x) / 2 + var(--spectrum-global-dimension-size-150));\n padding-inline-end: 0;\n }\n}\n\n.spectrum-Search-input {\n display: block;\n\n /* Correct the odd appearance of input[type=\"search\"] in Chrome and Safari.*/\n /* This gets overridden by .spectrum-Textfield */\n -webkit-appearance: none;\n\n /* Correct the outline for input[type=\"search\"] style in Safari. */\n outline-offset: -2px;\n\n text-indent: 0;\n\n /* Don't let long strings overlap the close icon */\n padding-inline-end: var(--spectrum-search-padding-right);\n\n /* Remove the inner padding and cancel buttons for input[type=\"search\"] in Chrome and Safari on macOS. */\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n .spectrum-Textfield.spectrum-Search--invalid & {\n padding-inline-end: calc(var(--spectrum-search-padding-right) + var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n\n .spectrum-Textfield.spectrum-Search--valid & {\n padding-inline-end: calc(var(--spectrum-search-padding-right) + var(--spectrum-textfield-padding-x) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n\n .spectrum-Textfield.spectrum-Search--loadable & {\n padding-inline-end: calc(var(--spectrum-search-padding-right) + var(--spectrum-textfield-padding-x) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n}\n\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n /* Todo: move to DNA */\n --spectrum-combobox-quiet-fieldbutton-border-radius: 0;\n --spectrum-combobox-quiet-fieldbutton-padding-right: 0;\n --spectrum-combobox-quiet-fieldbutton-padding-left: var(--spectrum-global-dimension-size-130);\n --spectrum-combobox-validation-icon-right: var(--spectrum-global-dimension-size-100);\n --spectrum-datepicker-input-width: calc(var(--spectrum-global-dimension-size-1600) - 2 * var(--spectrum-padding));\n --spectrum-datepicker-datetime-input-width: calc(var(--spectrum-datepicker-input-width) + var(--spectrum-global-dimension-size-700) - var(--spectrum-global-dimension-static-font-size-100) / 2);\n --spectrum-datepicker-range-dash-margin-left: calc(-0.5 * var(--spectrum-global-dimension-static-font-size-100));\n --spectrum-datepicker-range-dash-padding-top: 0;\n --spectrum-datepicker-range-dash-line-height: calc(var(--spectrum-textfield-height) - var(--spectrum-global-dimension-size-100));\n\n --spectrum-combobox-button-width: var(--spectrum-global-dimension-size-400);\n}\n\n.spectrum-InputGroup {\n position: relative;\n display: inline-flex;\n flex-direction: row;\n flex-wrap: nowrap;\n min-width: calc(2.5 * var(--spectrum-dropdown-height));\n border-radius: var(--spectrum-border-radius);\n\n .spectrum-FieldButton {\n padding: 0;\n inline-size: var(--spectrum-combobox-button-width);\n border-start-start-radius: var(--spectrum-combobox-fieldbutton-border-top-left-radius);\n border-end-start-radius: var(--spectrum-combobox-fieldbutton-border-bottom-left-radius);\n border-width: 1px;\n flex-shrink: 0;\n }\n\n /* Quiet or invalid inputgroup field button should always have a border width. */\n &.is-disabled:not(.spectrum-InputGroup--invalid):not(.spectrum-InputGroup--quiet) {\n .spectrum-FieldButton {\n border-width: 0;\n }\n }\n\n .spectrum-InputGroup-field {\n .spectrum-InputGroup-input-validationIcon {\n padding-inline-end: 0;\n inset-inline-end: var(--spectrum-combobox-validation-icon-right);\n }\n\n .spectrum-InputGroup-input-circleLoader {\n padding-inline-end: 0;\n inset-inline-end: var(--spectrum-combobox-validation-icon-right);\n }\n }\n}\n\n.spectrum-InputGroup-field {\n flex: 1 1 auto;\n}\n\n.spectrum-InputGroup-input {\n border-start-end-radius: var(--spectrum-combobox-textfield-border-top-right-radius);\n border-end-end-radius: var(--spectrum-combobox-textfield-border-bottom-right-radius);\n border-inline-end-style: none;\n}\n\n.spectrum-InputGroup--quiet {\n border-radius: var(--spectrum-combobox-quiet-fieldbutton-border-radius);\n min-width: calc(2 * var(--spectrum-dropdown-height));\n\n .spectrum-FieldButton {\n inline-size: auto;\n position: relative;\n\n padding-inline-start: var(--spectrum-combobox-quiet-fieldbutton-padding-left);\n padding-inline-end: var(--spectrum-combobox-quiet-fieldbutton-padding-right);\n border-width: 0;\n border-bottom: var(--spectrum-textfield-quiet-affixed-border-size) solid;\n border-radius: var(--spectrum-combobox-quiet-fieldbutton-border-radius);\n\n /* More hitarea */\n &:after {\n content: '';\n position: absolute;\n block-size: 100%;\n inline-size: 10px;\n inset-inline-end: -10px;\n }\n }\n\n .spectrum-InputGroup-icon {\n inset-inline-end: 0;\n }\n\n &.is-disabled {\n .spectrum-FieldButton {\n border-bottom-width: 1px;\n }\n }\n\n .spectrum-InputGroup-field {\n .spectrum-InputGroup-input-validationIcon {\n padding-inline-end: 0;\n inset-inline-end: 0;\n }\n\n .spectrum-InputGroup-input-circleLoader {\n padding-inline-end: 0;\n inset-inline-end: var(--spectrum-global-dimension-size-10);\n }\n }\n}\n\n.spectrum-InputGroup-popover--quiet {\n /* Define this var so it can be read from JS */\n --spectrum-dropdown-quiet-offset: calc(var(--spectrum-dropdown-quiet-popover-offset-x) + var(--spectrum-popover-border-size));\n margin-inline-end: calc(var(--spectrum-dropdown-quiet-offset) * -1);\n}\n\n.spectrum-Datepicker--range {\n border-radius: var(--spectrum-border-radius);\n /* Input Group */\n &.spectrum-InputGroup--quiet {\n border-radius: var(--spectrum-combobox-quiet-fieldbutton-border-radius);\n .spectrum-FieldButton {\n border-radius: var(--spectrum-combobox-quiet-fieldbutton-border-radius);\n }\n }\n /* Datetime Range */\n &.spectrum-Datepicker--datetimeRange {\n /* Inputs */\n .spectrum-InputGroup-field {\n width: var(--spectrum-datepicker-datetime-input-width);\n min-width: var(--spectrum-datepicker-datetime-input-width);\n }\n }\n /* Inputs */\n .spectrum-InputGroup-field {\n width: var(--spectrum-datepicker-input-width);\n min-width: var(--spectrum-datepicker-input-width);\n flex: initial;\n }\n .spectrum-Datepicker-startField {\n .spectrum-InputGroup-field {\n border-inline-end: 0;\n padding-inline-end: var(--spectrum-padding);\n }\n\n svg {\n display: none;\n }\n }\n .spectrum-Datepicker-endField {\n .spectrum-InputGroup-input {\n flex: 1;\n border-inline-start: 0;\n border-radius: 0;\n padding-inline-start: var(--spectrum-padding);\n }\n }\n /* Em dash */\n .spectrum-Datepicker--rangeDash {\n line-height: var(--spectrum-datepicker-range-dash-line-height);\n padding-top: var(--spectrum-datepicker-range-dash-padding-top);\n flex: initial;\n width: 0;\n z-index: 1;\n &:before {\n content: '–';\n display: inline-block;\n margin: 0 var(--spectrum-datepicker-range-dash-margin-left);\n overflow: hidden;\n text-align: center;\n vertical-align: middle;\n width: var(--spectrum-global-dimension-static-font-size-100);\n }\n }\n /* Focus ring */\n &.is-focused {\n .spectrum-Datepicker-focusRing {\n position: absolute;\n border-radius: var(--spectrum-border-radius);\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n }\n }\n &.spectrum-InputGroup--quiet {\n &.is-focused {\n .spectrum-Datepicker-focusRing {\n border-radius: var(--spectrum-combobox-quiet-fieldbutton-border-radius);\n top: auto;\n }\n }\n .spectrum-Datepicker--rangeDash {\n &:before {\n margin-inline-start: var(--spectrum-datepicker-range-dash-margin-left);\n }\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-InputGroup {\n &.is-focused {\n &:not(.spectrum-InputGroup--invalid):not(.is-disabled) {\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-textfield-border-color-key-focus);\n }\n\n .spectrum-FieldButton {\n border-color: var(--spectrum-textfield-border-color-key-focus);\n }\n }\n }\n\n &:hover {\n &:not(.spectrum-InputGroup--invalid):not(.is-focused):not(.is-disabled) {\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-textfield-border-color-hover);\n }\n\n .spectrum-FieldButton {\n border-color: var(--spectrum-textfield-border-color-hover);\n }\n }\n }\n}\n\n.spectrum-InputGroup.is-focused {\n .spectrum-FieldButton,\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-dropdown-border-color-key-focus);\n }\n\n &.spectrum-InputGroup--invalid {\n .spectrum-FieldButton,\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-dropdown-border-color-error);\n }\n }\n}\n\n/* Only add the 2px ring for keyboard focus */\n.spectrum-InputGroup:focus-ring:not(.spectrum-InputGroup--quiet) {\n .spectrum-FieldButton {\n z-index: 1;\n }\n\n .spectrum-FieldButton,\n .spectrum-InputGroup-input {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-key-focus);\n }\n\n &.spectrum-InputGroup--invalid {\n .spectrum-FieldButton,\n .spectrum-InputGroup-input {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n }\n }\n}\n\n.spectrum-InputGroup--quiet {\n /*\n specifically for readonly inputgroups that aren't disabled since the button will have the disabled class\n but we don't want the border color to be the disabled quiet one\n */\n &:not(.is-disabled) {\n .spectrum-FieldButton {\n &:disabled,\n &:disabled:hover {\n border-color: var(--spectrum-textfield-quiet-border-color);\n }\n }\n }\n\n .spectrum-FieldButton {\n &,\n &:hover,\n &:focus,\n &:active,\n &.is-selected,\n &.spectrum-FieldButton--invalid {\n border-color: var(--spectrum-textfield-quiet-border-color);\n }\n\n &:disabled,\n &:disabled:hover {\n border-color: var(--spectrum-textfield-quiet-border-color-disabled);\n }\n }\n\n &:hover:not(.spectrum-InputGroup--invalid):not(.is-focused):not(.is-disabled) {\n .spectrum-FieldButton {\n border-color: var(--spectrum-textfield-quiet-border-color-hover);\n }\n }\n\n &.spectrum-InputGroup {\n &.spectrum-InputGroup--invalid {\n .spectrum-FieldButton,\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-textfield-border-color-error);\n }\n }\n\n &.is-focused {\n .spectrum-FieldButton {\n border-color: var(--spectrum-textfield-quiet-border-color-key-focus);\n }\n\n &.spectrum-InputGroup--invalid {\n .spectrum-FieldButton {\n border-color: var(--spectrum-textfield-border-color-error);\n }\n }\n }\n\n &:focus-ring {\n .spectrum-InputGroup-input {\n box-shadow: 0 1px 0 var(--spectrum-textfield-quiet-border-color-key-focus);\n }\n\n .spectrum-FieldButton {\n box-shadow: 0 1px 0 var(--spectrum-textfield-quiet-border-color-key-focus);\n border-color: var(--spectrum-textfield-quiet-border-color-key-focus);\n }\n\n &.spectrum-InputGroup--invalid {\n .spectrum-InputGroup-input {\n box-shadow: 0 1px 0 var(--spectrum-textfield-border-color-error);\n }\n\n .spectrum-FieldButton {\n box-shadow: 0 1px 0 var(--spectrum-textfield-border-color-error);\n }\n }\n }\n }\n}\n\n.spectrum-Datepicker--range {\n &:focus-ring {\n .spectrum-InputGroup-input {\n box-shadow: none !important;\n }\n }\n\n &.is-disabled {\n .spectrum-Datepicker--rangeDash {\n color: var(--spectrum-textfield-text-color-disabled);\n }\n }\n\n /* Focus ring: When one of the inputs or the button has keyboard focus, render the focus ring border around the entire input group by styling an adjacent descendant element. */\n &:focus-ring {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-key-focus);\n\n &.spectrum-InputGroup--invalid {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n\n .spectrum-FieldButton {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n }\n }\n }\n\n &.spectrum-InputGroup--invalid {\n .spectrum-InputGroup-input {\n border-color: var(--spectrum-dropdown-border-color-error) !important;\n }\n\n /* Focus ring: When one of the inputs or the button has keyboard focus, render the focus ring border around the entire input group by styling an adjacent descendant element. */\n &:focus-ring {\n .spectrum-FieldButton {\n border-color: var(--spectrum-dropdown-border-color-error);\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n }\n }\n .spectrum-FieldButton {\n border-color: var(--spectrum-dropdown-border-color-error);\n &.spectrum-FieldButton--invalid {\n &:focus-ring {\n border-color: var(--spectrum-dropdown-border-color-error);\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n }\n }\n }\n }\n &.spectrum-InputGroup--quiet {\n &.is-focused {\n box-shadow: 0 1px 0 0 var(--spectrum-dropdown-border-color-key-focus);\n\n &.spectrum-InputGroup--invalid {\n .spectrum-FieldButton {\n box-shadow: none;\n border-color: var(--spectrum-dropdown-border-color-error);\n &.spectrum-FieldButton--invalid {\n &:focus-ring {\n box-shadow: 0 2px 0 0 var(--spectrum-dropdown-border-color-error);\n }\n }\n }\n &:focus-ring {\n box-shadow: 0 0 0 1px var(--spectrum-dropdown-border-color-error);\n }\n }\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-textfield-padding-top: 3px;\n --spectrum-textfield-padding-bottom: 5px;\n\n /* Todo fix in DNA */\n --spectrum-textfield-quiet-border-radius: 0;\n\n --spectrum-textfield-quiet-invalid-background-position: 100% 50%;\n\n --spectrum-textfield-multiline-height: auto;\n --spectrum-textfield-multiline-min-height: var(--spectrum-global-dimension-size-700);\n\n --spectrum-textfield-multiline-padding-x: var(--spectrum-textfield-padding-x);\n --spectrum-textfield-multiline-padding-top: var(--spectrum-textfield-padding-top);\n --spectrum-textfield-multiline-padding-bottom: var(--spectrum-textfield-padding-bottom);\n\n /* Todo: DNA uses incorrect font family \"Adobe Clean\" */;\n --spectrum-textfield-text-font-family-fixed: var(--spectrum-font-family-base);\n}\n\n.spectrum-Textfield {\n display: inline-flex;\n position: relative;\n min-width: var(--spectrum-textfield-min-width);\n width: var(--spectrum-component-single-line-width);\n\n &:not(.spectrum-Textfield--quiet).spectrum-Textfield--multiline .spectrum-Textfield-input:not(:disabled) {\n resize: vertical;\n }\n\n &.spectrum-Textfield--quiet.spectrum-Textfield--multiline .spectrum-Textfield-input {\n height: var(--spectrum-textfield-height);\n min-height: var(--spectrum-textfield-height);\n overflow-x: hidden;\n }\n}\n\n.spectrum-Textfield-input {\n /* box */\n box-sizing: border-box;\n border: var(--spectrum-textfield-border-size) solid;\n border-radius: var(--spectrum-textfield-border-radius);\n\n /* Apply padding by default to center text, giving consistency between input and textfield */\n padding: var(--spectrum-textfield-padding-top) var(--spectrum-textfield-padding-x) var(--spectrum-textfield-padding-bottom) calc(var(--spectrum-textfield-padding-x) - 1px);\n /* Use padding instead of text-indent because text-indent does not left align the text in Edge browser */\n text-indent: 0;\n\n inline-size: 100%;\n height: var(--spectrum-textfield-height);\n\n vertical-align: top; /* used to align them correctly in forms. */\n\n /* Remove the margin for input in Firefox and Safari. */\n margin: 0;\n\n /* Show the overflow for input in Edge. */\n overflow: visible;\n\n /* Change the input font styles in all browsers */\n font-family: var(--spectrum-textfield-text-font-family-fixed);\n font-size: var(--spectrum-textfield-text-size);\n line-height: var(--spectrum-textfield-text-line-height);\n text-overflow: ellipsis;\n\n transition: border-color var(--spectrum-global-animation-duration-100) ease-in-out,\n box-shadow var(--spectrum-global-animation-duration-100) ease-in-out;\n\n outline: none;\n\n -webkit-appearance: none;\n /*\n Removes the native spin buttons in Firefox; -moz-appearance: none results in spinners.\n This has to come after -webkit-appearance or it gets overridden (#214)\n Details: http://stackoverflow.com/questions/23372903/hide-spinner-in-input-number-firefox-29\n\n Sets the opacity to 1 as normalize.css sets an opacity to placeholders\n Details: https://github.com/csstools/normalize.css/blob/master/normalize.css#L297\n */\n -moz-appearance: textfield;\n\n &::placeholder,\n &.is-placeholder {\n font-weight: var(--spectrum-textfield-placeholder-text-font-weight);\n font-style: var(--spectrum-textfield-placeholder-text-font-style);\n font-synthesis: none;\n transition: color var(--spectrum-global-animation-duration-100) ease-in-out;\n opacity: 1;\n }\n\n /* added to work with Edge, note, it needs double ::\n * not single : which is what autoprefixer will add\n */\n &::-ms-input-placeholder {\n font-weight: var(--spectrum-textfield-placeholder-text-font-weight);\n font-style: var(--spectrum-textfield-placeholder-text-font-style);\n transition: color var(--spectrum-global-animation-duration-100) ease-in-out;\n opacity: 1;\n }\n\n /* placeholder gets clipped for synthetic italics, we rely on font-synthesis once\n * chrome supports it https://bugs.chromium.org/p/chromium/issues/detail?id=509989\n */\n &:lang(ja), &:lang(zh), &:lang(ko), &:lang(ar), &:lang(he) {\n &::placeholder,\n &.is-placeholder {\n font-style: normal;\n }\n &::-ms-input-placeholder { /* added to work with Edge, same as above */\n font-style: normal;\n }\n }\n\n &:hover {\n &::placeholder {\n font-weight: var(--spectrum-textfield-placeholder-text-font-weight);\n }\n }\n\n &:disabled {\n /* Disable the resize functionality when disabled */\n resize: none;\n\n /* The opacity must be set to 1 */\n opacity: 1;\n &::placeholder,\n &.is-placeholder {\n font-weight: var(--spectrum-textfield-placeholder-text-font-weight);\n }\n }\n\n /* Remove the native clear button in IE */\n /* http://stackoverflow.com/questions/14007655/remove-ie10s-clear-field-x-button-on-certain-inputs */\n &::-ms-clear {\n width: 0;\n height: 0;\n }\n\n /* removes the native spin buttons */\n /* http://stackoverflow.com/questions/23372903/hide-spinner-in-input-number-firefox-29 */\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* removes the red border that appears in Firefox */\n &:-moz-ui-invalid {\n box-shadow: none;\n }\n\n .spectrum-Textfield--multiline & {\n height: var(--spectrum-textfield-multiline-height);\n min-height: var(--spectrum-textfield-multiline-min-height);\n padding: var(--spectrum-textfield-multiline-padding-top) var(--spectrum-textfield-multiline-padding-x) var(--spectrum-textfield-multiline-padding-bottom) calc(var(--spectrum-textfield-multiline-padding-x) - 1px);\n\n /* Remove the default vertical scrollbar for textarea in IE. */\n overflow: auto;\n }\n\n .spectrum-Textfield--quiet & {\n border-radius: var(--spectrum-textfield-quiet-border-radius);\n border-width: 0 0 var(--spectrum-textfield-quiet-border-size) 0;\n\n /* removes the side padding to align the text properly */\n padding-inline-start: var(--spectrum-textfield-quiet-padding-x);\n padding-inline-end: var(--spectrum-textfield-quiet-padding-x);\n\n /* Treat all quiet inputs and textareas the same */\n resize: none;\n overflow-y: hidden;\n }\n\n .spectrum-Textfield--valid & {\n padding-inline-end: calc(var(--spectrum-textfield-padding-x) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n\n .spectrum-Textfield--invalid & {\n padding-inline-end: calc(var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n\n .spectrum-Textfield--loadable & {\n padding-inline-end: calc(var(--spectrum-textfield-padding-x) + var(--spectrum-icon-alert-medium-width) + var(--spectrum-textfield-icon-margin-left));\n }\n}\n\n.spectrum-Textfield-validationIcon {\n /* TODO: Confirm if this is ok for the validation icon sizing\n Note that the sizes are a bit different when compared with old background icons(more noticable for checkmark)\n */\n position: absolute;\n padding-inline-end: calc(var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2);\n pointer-events: all;\n transition: color var(--spectrum-global-animation-duration-100) ease-in-out;\n\n .spectrum-Textfield--quiet & {\n padding-inline-end: 0;\n }\n}\n\n.spectrum-Textfield--invalid .spectrum-Textfield-validationIcon {\n width: var(--spectrum-icon-alert-medium-width);\n height: var(--spectrum-icon-alert-medium-height);\n top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-height) / 2));\n inset-inline-end: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-width) / 2));\n}\n.spectrum-Textfield--valid .spectrum-Textfield-validationIcon {\n width: var(--spectrum-icon-checkmark-medium-width);\n height: var(--spectrum-icon-checkmark-medium-height);\n top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-checkmark-medium-height) / 2));\n inset-inline-end: var(--spectrum-global-dimension-size-150);\n}\n\n/* styles the left icon for textfield, assumes usage of workflow icon sizing (18px by 18px) */\n.spectrum-Textfield-icon {\n display: block;\n position: absolute;\n height: var(--spectrum-icon-info-medium-height);\n width: var(--spectrum-icon-info-medium-width);\n /* This has a named variable in a future update of spectrum-css. */\n inset-inline-start: var(--spectrum-global-dimension-size-150);\n top: var(--spectrum-global-dimension-size-85);\n transition: fill var(--spectrum-global-animation-duration-100) ease-in-out;\n}\n\n/* styles the textfield properly if the left icon is provided */\n.spectrum-Textfield-inputIcon {\n /* Use padding instead of text-indent so long strings don't overlap the icon */\n /* These values have real names in a spectrum-css update, when we update, use those. */\n padding-inline-start: calc(\n var(--spectrum-global-dimension-size-150) +\n var(--spectrum-global-dimension-size-225) +\n var(--spectrum-global-dimension-size-65)\n );\n\n .spectrum-Textfield--quiet & {\n padding-inline-start: calc(var(--spectrum-global-dimension-size-100) + var(--spectrum-icon-info-medium-width));\n\n /* Since quiet button has no left padding, push the icon all the way to the left */\n & ~ .spectrum-Textfield-icon {\n inset-inline-start: 0;\n }\n }\n\n &.spectrum-Textfield--multiline {\n height: var(--spectrum-textfield-height);\n min-height: var(--spectrum-textfield-height);\n }\n}\n\n\n/* same positioning as invalid icon */\n.spectrum-Textfield--loadable .spectrum-Textfield-circleLoader {\n position: absolute;\n top: calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-loader-circle-small-width) / 2));\n /* can't use padding right since it breaks the circle loader so add here */\n inset-inline-end: calc(calc(calc(var(--spectrum-textfield-icon-frame) / 2) - calc(var(--spectrum-icon-alert-medium-width) / 2)) + calc(var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2));\n\n .spectrum-Textfield--quiet& {\n padding-inline-end: 0;\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-Textfield-input {\n background-color: var(--spectrum-textfield-background-color);\n border-color: var(--spectrum-textfield-border-color);\n color: var(--spectrum-textfield-text-color);\n\n &::placeholder,\n &.is-placeholder {\n color: var(--spectrum-textfield-placeholder-text-color);\n }\n\n &:hover {\n border-color: var(--spectrum-textfield-border-color-hover);\n box-shadow: none;\n\n &::placeholder,\n &.is-placeholder {\n color: var(--spectrum-textfield-placeholder-text-color-hover);\n }\n\n & ~ .spectrum-Textfield-icon {\n fill: var(--spectrum-textfield-icon-color-hover);\n }\n }\n\n &:active {\n background-color: var(--spectrum-textfield-background-color-down);\n border-color: var(--spectrum-textfield-border-color-down);\n color: var(--spectrum-textfield-text-color-down);\n\n &::placeholder,\n &.is-placeholder {\n color: var(--spectrum-textfield-placeholder-text-color-down);\n }\n\n & ~ .spectrum-Textfield-icon {\n fill: var(--spectrum-textfield-icon-color-down);\n }\n }\n\n &:focus,\n &.is-focused {\n border-color: var(--spectrum-textfield-border-color-down);\n }\n\n &:focus-ring {\n &:not(:active) {\n border-color: var(--spectrum-textfield-border-color-key-focus);\n box-shadow: 0 0 0 1px var(--spectrum-textfield-border-color-key-focus);\n }\n }\n\n &[disabled],\n &.is-disabled {\n background-color: var(--spectrum-textfield-background-color-disabled);\n border-color: var(--spectrum-textfield-border-color-disabled);\n color: var(--spectrum-textfield-text-color-disabled);\n\n /* For safari mobile browser */\n -webkit-text-fill-color: var(--spectrum-textfield-text-color-disabled);\n\n &::placeholder,\n &.is-placeholder {\n color: var(--spectrum-textfield-placeholder-text-color-disabled);\n }\n\n & ~ .spectrum-Textfield-icon {\n fill: var(--spectrum-textfield-icon-color-disabled);\n }\n }\n\n &.spectrum-Textfield--invalid {\n border-color: var(--spectrum-textfield-border-color-error);\n\n &:hover {\n border-color: var(--spectrum-textfield-border-color-error-hover);\n }\n\n &:active {\n border-color: var(--spectrum-textfield-border-color-error-down);\n }\n\n &:focus-ring { /* might break things due to pre-defined focus-ring */\n &:not(:active) {\n border-color: var(--spectrum-textfield-border-color-error);\n box-shadow: 0 0 0 1px var(--spectrum-textfield-border-color-error);\n }\n }\n }\n\n .spectrum-Textfield--quiet & {\n background-color: var(--spectrum-textfield-quiet-background-color);\n border-color: var(--spectrum-textfield-quiet-border-color);\n\n &:hover {\n border-color: var(--spectrum-textfield-quiet-border-color-hover);\n }\n\n &:active {\n border-color: var(--spectrum-textfield-quiet-border-color-down);\n }\n\n &:focus,\n &.is-focused {\n border-color: var(--spectrum-textfield-quiet-border-color-key-focus);\n }\n\n &:focus-ring {\n &:not(:active) {\n border-color: var(--spectrum-textfield-border-color-key-focus);\n box-shadow: 0 1px 0 var(--spectrum-textfield-border-color-key-focus);\n }\n }\n\n &:disabled,\n &.is-disabled {\n background-color: var(--spectrum-textfield-quiet-background-color-disabled);\n border-color: var(--spectrum-textfield-quiet-border-color-disabled);\n }\n }\n\n .spectrum-Textfield.spectrum-Textfield--invalid & {\n border-color: var(--spectrum-textfield-border-color-error);\n\n &:focus-ring { /* might break things due to pre-defined focus-ring */\n &:not(:active) {\n border-color: var(--spectrum-textfield-border-color-error);\n box-shadow: 0 0 0 1px var(--spectrum-textfield-border-color-error);\n }\n }\n }\n\n .spectrum-Textfield--quiet.spectrum-Textfield--invalid & {\n &:focus-ring { /* might break things due to pre-defined focus-ring */\n &:not(:active) {\n box-shadow: 0 1px 0 var(--spectrum-textfield-border-color-error);\n }\n }\n }\n\n}\n\n.spectrum-Textfield-icon {\n fill: var(--spectrum-textfield-icon-color);\n}\n\n.spectrum-Textfield-validationIcon {\n .spectrum-Textfield--valid & {\n fill: var(--spectrum-alert-success-icon-color);\n }\n\n .spectrum-Textfield--invalid & {\n fill: var(--spectrum-alert-error-icon-color);\n }\n}\n"],"names":[],"version":3,"file":"main.css.map"}
|