@react-spectrum/searchfield 3.8.5 → 3.8.6
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/SearchField.main.js +11 -11
- package/dist/SearchField.mjs +12 -12
- package/dist/SearchField.module.js +11 -11
- package/dist/search_vars_css.mjs +1 -1
- package/package.json +11 -11
package/dist/SearchField.main.js
CHANGED
|
@@ -41,40 +41,40 @@ $parcel$export(module.exports, "SearchField", () => $111fe330b4c1f3ac$export$b94
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
function $111fe330b4c1f3ac$var$SearchField(props, ref) {
|
|
44
|
-
props = (0, $anRgD$reactspectrumutils.useSlotProps)(props,
|
|
44
|
+
props = (0, $anRgD$reactspectrumutils.useSlotProps)(props, 'searchfield');
|
|
45
45
|
props = (0, $anRgD$reactspectrumprovider.useProviderProps)(props);
|
|
46
46
|
props = (0, $anRgD$reactspectrumform.useFormProps)(props);
|
|
47
47
|
let defaultIcon = /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, ($parcel$interopDefault($anRgD$spectrumiconsuiMagnifier))), {
|
|
48
48
|
"data-testid": "searchicon"
|
|
49
49
|
});
|
|
50
50
|
let { icon: icon = defaultIcon, isDisabled: isDisabled, UNSAFE_className: UNSAFE_className, placeholder: placeholder, ...otherProps } = props;
|
|
51
|
-
if (placeholder) console.warn(
|
|
51
|
+
if (placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/SearchField.html#help-text');
|
|
52
52
|
let state = (0, $anRgD$reactstatelysearchfield.useSearchFieldState)(props);
|
|
53
53
|
let inputRef = (0, $anRgD$react.useRef)(null);
|
|
54
54
|
let { clearButtonProps: clearButtonProps, ...result } = (0, $anRgD$reactariasearchfield.useSearchField)(props, state, inputRef);
|
|
55
55
|
let clearButton = /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, $anRgD$reactspectrumbutton.ClearButton), {
|
|
56
56
|
...clearButtonProps,
|
|
57
57
|
preventFocus: true,
|
|
58
|
-
UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))),
|
|
58
|
+
UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-ClearButton'),
|
|
59
59
|
isDisabled: isDisabled
|
|
60
60
|
});
|
|
61
|
-
let validationState = props.validationState || (result.isInvalid ?
|
|
61
|
+
let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
|
|
62
62
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, $anRgD$reactspectrumtextfield.TextFieldBase), {
|
|
63
63
|
...otherProps,
|
|
64
64
|
...result,
|
|
65
65
|
validationState: validationState,
|
|
66
|
-
UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search', 'spectrum-Textfield', {
|
|
67
|
+
'is-disabled': isDisabled,
|
|
68
|
+
'is-quiet': props.isQuiet,
|
|
69
|
+
'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
|
|
70
|
+
'spectrum-Search--valid': validationState === 'valid' && !isDisabled
|
|
71
71
|
}, UNSAFE_className),
|
|
72
|
-
inputClassName: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))),
|
|
72
|
+
inputClassName: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search-input'),
|
|
73
73
|
ref: ref,
|
|
74
74
|
inputRef: inputRef,
|
|
75
75
|
isDisabled: isDisabled,
|
|
76
76
|
icon: icon,
|
|
77
|
-
wrapperChildren: state.value !==
|
|
77
|
+
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
/**
|
package/dist/SearchField.mjs
CHANGED
|
@@ -35,40 +35,40 @@ function $parcel$interopDefault(a) {
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
function $a6a4ace9217ce6df$var$SearchField(props, ref) {
|
|
38
|
-
props = (0, $kYtTO$useSlotProps)(props,
|
|
38
|
+
props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
|
|
39
39
|
props = (0, $kYtTO$useProviderProps)(props);
|
|
40
40
|
props = (0, $kYtTO$useFormProps)(props);
|
|
41
41
|
let defaultIcon = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$spectrumiconsuiMagnifier), {
|
|
42
42
|
"data-testid": "searchicon"
|
|
43
43
|
});
|
|
44
44
|
let { icon: icon = defaultIcon, isDisabled: isDisabled, UNSAFE_className: UNSAFE_className, placeholder: placeholder, ...otherProps } = props;
|
|
45
|
-
if (placeholder) console.warn(
|
|
45
|
+
if (placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/SearchField.html#help-text');
|
|
46
46
|
let state = (0, $kYtTO$useSearchFieldState)(props);
|
|
47
47
|
let inputRef = (0, $kYtTO$useRef)(null);
|
|
48
48
|
let { clearButtonProps: clearButtonProps, ...result } = (0, $kYtTO$useSearchField)(props, state, inputRef);
|
|
49
49
|
let clearButton = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$ClearButton), {
|
|
50
50
|
...clearButtonProps,
|
|
51
51
|
preventFocus: true,
|
|
52
|
-
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
52
|
+
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
|
|
53
53
|
isDisabled: isDisabled
|
|
54
54
|
});
|
|
55
|
-
let validationState = props.validationState || (result.isInvalid ?
|
|
55
|
+
let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
|
|
56
56
|
return /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$TextFieldBase), {
|
|
57
57
|
...otherProps,
|
|
58
58
|
...result,
|
|
59
59
|
validationState: validationState,
|
|
60
|
-
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Textfield', {
|
|
61
|
+
'is-disabled': isDisabled,
|
|
62
|
+
'is-quiet': props.isQuiet,
|
|
63
|
+
'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
|
|
64
|
+
'spectrum-Search--valid': validationState === 'valid' && !isDisabled
|
|
65
65
|
}, UNSAFE_className),
|
|
66
|
-
inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
66
|
+
inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search-input'),
|
|
67
67
|
ref: ref,
|
|
68
68
|
inputRef: inputRef,
|
|
69
69
|
isDisabled: isDisabled,
|
|
70
70
|
icon: icon,
|
|
71
|
-
wrapperChildren: state.value !==
|
|
71
|
+
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
@@ -77,4 +77,4 @@ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
|
|
80
|
-
//# sourceMappingURL=SearchField.
|
|
80
|
+
//# sourceMappingURL=SearchField.module.js.map
|
|
@@ -35,40 +35,40 @@ function $parcel$interopDefault(a) {
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
function $a6a4ace9217ce6df$var$SearchField(props, ref) {
|
|
38
|
-
props = (0, $kYtTO$useSlotProps)(props,
|
|
38
|
+
props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
|
|
39
39
|
props = (0, $kYtTO$useProviderProps)(props);
|
|
40
40
|
props = (0, $kYtTO$useFormProps)(props);
|
|
41
41
|
let defaultIcon = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$spectrumiconsuiMagnifier), {
|
|
42
42
|
"data-testid": "searchicon"
|
|
43
43
|
});
|
|
44
44
|
let { icon: icon = defaultIcon, isDisabled: isDisabled, UNSAFE_className: UNSAFE_className, placeholder: placeholder, ...otherProps } = props;
|
|
45
|
-
if (placeholder) console.warn(
|
|
45
|
+
if (placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/SearchField.html#help-text');
|
|
46
46
|
let state = (0, $kYtTO$useSearchFieldState)(props);
|
|
47
47
|
let inputRef = (0, $kYtTO$useRef)(null);
|
|
48
48
|
let { clearButtonProps: clearButtonProps, ...result } = (0, $kYtTO$useSearchField)(props, state, inputRef);
|
|
49
49
|
let clearButton = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$ClearButton), {
|
|
50
50
|
...clearButtonProps,
|
|
51
51
|
preventFocus: true,
|
|
52
|
-
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
52
|
+
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
|
|
53
53
|
isDisabled: isDisabled
|
|
54
54
|
});
|
|
55
|
-
let validationState = props.validationState || (result.isInvalid ?
|
|
55
|
+
let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
|
|
56
56
|
return /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$TextFieldBase), {
|
|
57
57
|
...otherProps,
|
|
58
58
|
...result,
|
|
59
59
|
validationState: validationState,
|
|
60
|
-
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Textfield', {
|
|
61
|
+
'is-disabled': isDisabled,
|
|
62
|
+
'is-quiet': props.isQuiet,
|
|
63
|
+
'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
|
|
64
|
+
'spectrum-Search--valid': validationState === 'valid' && !isDisabled
|
|
65
65
|
}, UNSAFE_className),
|
|
66
|
-
inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))),
|
|
66
|
+
inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search-input'),
|
|
67
67
|
ref: ref,
|
|
68
68
|
inputRef: inputRef,
|
|
69
69
|
isDisabled: isDisabled,
|
|
70
70
|
icon: icon,
|
|
71
|
-
wrapperChildren: state.value !==
|
|
71
|
+
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
/**
|
package/dist/search_vars_css.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/searchfield",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.6",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/searchfield": "^3.7.
|
|
40
|
-
"@react-spectrum/button": "^3.16.
|
|
41
|
-
"@react-spectrum/form": "^3.7.
|
|
42
|
-
"@react-spectrum/textfield": "^3.12.
|
|
43
|
-
"@react-spectrum/utils": "^3.11.
|
|
44
|
-
"@react-stately/searchfield": "^3.5.
|
|
45
|
-
"@react-types/searchfield": "^3.5.
|
|
46
|
-
"@react-types/textfield": "^3.9.
|
|
47
|
-
"@spectrum-icons/ui": "^3.6.
|
|
39
|
+
"@react-aria/searchfield": "^3.7.5",
|
|
40
|
+
"@react-spectrum/button": "^3.16.4",
|
|
41
|
+
"@react-spectrum/form": "^3.7.6",
|
|
42
|
+
"@react-spectrum/textfield": "^3.12.1",
|
|
43
|
+
"@react-spectrum/utils": "^3.11.7",
|
|
44
|
+
"@react-stately/searchfield": "^3.5.3",
|
|
45
|
+
"@react-types/searchfield": "^3.5.5",
|
|
46
|
+
"@react-types/textfield": "^3.9.3",
|
|
47
|
+
"@spectrum-icons/ui": "^3.6.7",
|
|
48
48
|
"@swc/helpers": "^0.5.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
62
62
|
}
|