@react-spectrum/searchfield 3.8.11 → 3.8.13
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 +2 -5
- package/dist/SearchField.main.js.map +1 -1
- package/dist/SearchField.mjs +3 -6
- package/dist/SearchField.module.js +3 -6
- package/dist/SearchField.module.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -12
- package/src/SearchField.tsx +5 -8
package/dist/SearchField.main.js
CHANGED
|
@@ -40,7 +40,7 @@ $parcel$export(module.exports, "SearchField", () => $111fe330b4c1f3ac$export$b94
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
const $111fe330b4c1f3ac$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $anRgD$react.forwardRef)(function SearchField(props, ref) {
|
|
44
44
|
props = (0, $anRgD$reactspectrumutils.useSlotProps)(props, 'searchfield');
|
|
45
45
|
props = (0, $anRgD$reactspectrumprovider.useProviderProps)(props);
|
|
46
46
|
props = (0, $anRgD$reactspectrumform.useFormProps)(props);
|
|
@@ -76,10 +76,7 @@ function $111fe330b4c1f3ac$var$SearchField(props, ref) {
|
|
|
76
76
|
icon: icon,
|
|
77
77
|
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
78
78
|
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* A SearchField is a text field designed for searches.
|
|
82
|
-
*/ let $111fe330b4c1f3ac$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $anRgD$react.forwardRef)($111fe330b4c1f3ac$var$SearchField);
|
|
79
|
+
});
|
|
83
80
|
|
|
84
81
|
|
|
85
82
|
//# sourceMappingURL=SearchField.main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkBM,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAA+B,EAAE,GAAsB;IAChH,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IACrB,IAAI,4BACF,0DAAC,CAAA,GAAA,yDAAQ;QAAE,eAAY;;IAGzB,IAAI,QACF,OAAO,yBACP,UAAU,oBACV,gBAAgB,eAChB,WAAW,EACX,GAAG,YACJ,GAAG;IAEJ,IAAI,aACF,QAAQ,IAAI,CAAC;IAGf,IAAI,QAAQ,CAAA,GAAA,kDAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,oBAAC,gBAAgB,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,0CAAa,EAAE,OAAO,OAAO;IAEjE,IAAI,4BACF,0DAAC,CAAA,GAAA,sCAAU;QACR,GAAG,gBAAgB;QACpB,cAAA;QACA,kBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;QAGJ,YAAY;;IAGhB,IAAI,kBAAkB,MAAM,eAAe,IAAK,CAAA,OAAO,SAAS,GAAG,YAAY,SAAQ;IAEvF,qBACE,0DAAC,CAAA,GAAA,2CAAY;QACV,GAAG,UAAU;QACb,GAAG,MAAM;QACV,iBAAiB;QACjB,kBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,mBACA,sBACA;YACE,eAAe;YACf,YAAY,MAAM,OAAO;YACzB,4BAA4B,oBAAoB,aAAa,CAAC;YAC9D,0BAA0B,oBAAoB,WAAW,CAAC;QAC5D,GACA;QAGJ,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACnC,KAAK;QACL,UAAU;QACV,YAAY;QACZ,MAAM;QACN,iBAAiB,AAAC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM,UAAU,GAAI,cAAc;;AAEjF","sources":["packages/@react-spectrum/searchfield/src/SearchField.tsx"],"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\nimport {classNames, useSlotProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport Magnifier from '@spectrum-icons/ui/Magnifier';\nimport React, {forwardRef, ReactElement, Ref, useRef} from 'react';\nimport {SpectrumSearchFieldProps} from '@react-types/searchfield';\nimport styles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\n/**\n * A SearchField is a text field designed for searches.\n */\nexport const SearchField = forwardRef(function SearchField(props: SpectrumSearchFieldProps, ref: Ref<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n props = useFormProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n placeholder,\n ...otherProps\n } = props;\n\n if (placeholder) {\n 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');\n }\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement>(null);\n let {clearButtonProps, ...result} = useSearchField(props, state, inputRef);\n\n let clearButton = (\n <ClearButton\n {...clearButtonProps}\n preventFocus\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ClearButton'\n )\n }\n isDisabled={isDisabled} />\n );\n\n let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);\n\n return (\n <TextFieldBase\n {...otherProps}\n {...result}\n validationState={validationState}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n {\n 'is-disabled': isDisabled,\n 'is-quiet': props.isQuiet,\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n UNSAFE_className\n )\n }\n inputClassName={classNames(styles, 'spectrum-Search-input')}\n ref={ref}\n inputRef={inputRef}\n isDisabled={isDisabled}\n icon={icon}\n wrapperChildren={(state.value !== '' && !props.isReadOnly) ? clearButton : undefined} />\n );\n}) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;\n"],"names":[],"version":3,"file":"SearchField.main.js.map"}
|
package/dist/SearchField.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import $kYtTO$search_vars_cssmodulejs from "./search_vars_css.mjs";
|
|
|
3
3
|
import {useSlotProps as $kYtTO$useSlotProps, classNames as $kYtTO$classNames} from "@react-spectrum/utils";
|
|
4
4
|
import {ClearButton as $kYtTO$ClearButton} from "@react-spectrum/button";
|
|
5
5
|
import $kYtTO$spectrumiconsuiMagnifier from "@spectrum-icons/ui/Magnifier";
|
|
6
|
-
import $kYtTO$react, {
|
|
6
|
+
import $kYtTO$react, {forwardRef as $kYtTO$forwardRef, useRef as $kYtTO$useRef} from "react";
|
|
7
7
|
import {TextFieldBase as $kYtTO$TextFieldBase} from "@react-spectrum/textfield";
|
|
8
8
|
import {useFormProps as $kYtTO$useFormProps} from "@react-spectrum/form";
|
|
9
9
|
import {useProviderProps as $kYtTO$useProviderProps} from "@react-spectrum/provider";
|
|
@@ -34,7 +34,7 @@ function $parcel$interopDefault(a) {
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwardRef)(function SearchField(props, ref) {
|
|
38
38
|
props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
|
|
39
39
|
props = (0, $kYtTO$useProviderProps)(props);
|
|
40
40
|
props = (0, $kYtTO$useFormProps)(props);
|
|
@@ -70,10 +70,7 @@ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
|
|
|
70
70
|
icon: icon,
|
|
71
71
|
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
72
72
|
});
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* A SearchField is a text field designed for searches.
|
|
76
|
-
*/ let $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwardRef)($a6a4ace9217ce6df$var$SearchField);
|
|
73
|
+
});
|
|
77
74
|
|
|
78
75
|
|
|
79
76
|
export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
|
|
@@ -3,7 +3,7 @@ import $kYtTO$search_vars_cssmodulejs from "./search_vars_css.module.js";
|
|
|
3
3
|
import {useSlotProps as $kYtTO$useSlotProps, classNames as $kYtTO$classNames} from "@react-spectrum/utils";
|
|
4
4
|
import {ClearButton as $kYtTO$ClearButton} from "@react-spectrum/button";
|
|
5
5
|
import $kYtTO$spectrumiconsuiMagnifier from "@spectrum-icons/ui/Magnifier";
|
|
6
|
-
import $kYtTO$react, {
|
|
6
|
+
import $kYtTO$react, {forwardRef as $kYtTO$forwardRef, useRef as $kYtTO$useRef} from "react";
|
|
7
7
|
import {TextFieldBase as $kYtTO$TextFieldBase} from "@react-spectrum/textfield";
|
|
8
8
|
import {useFormProps as $kYtTO$useFormProps} from "@react-spectrum/form";
|
|
9
9
|
import {useProviderProps as $kYtTO$useProviderProps} from "@react-spectrum/provider";
|
|
@@ -34,7 +34,7 @@ function $parcel$interopDefault(a) {
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwardRef)(function SearchField(props, ref) {
|
|
38
38
|
props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
|
|
39
39
|
props = (0, $kYtTO$useProviderProps)(props);
|
|
40
40
|
props = (0, $kYtTO$useFormProps)(props);
|
|
@@ -70,10 +70,7 @@ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
|
|
|
70
70
|
icon: icon,
|
|
71
71
|
wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
|
|
72
72
|
});
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* A SearchField is a text field designed for searches.
|
|
76
|
-
*/ let $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwardRef)($a6a4ace9217ce6df$var$SearchField);
|
|
73
|
+
});
|
|
77
74
|
|
|
78
75
|
|
|
79
76
|
export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkBM,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAA+B,EAAE,GAAsB;IAChH,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,4BACF,gCAAC,CAAA,GAAA,+BAAQ;QAAE,eAAY;;IAGzB,IAAI,QACF,OAAO,yBACP,UAAU,oBACV,gBAAgB,eAChB,WAAW,EACX,GAAG,YACJ,GAAG;IAEJ,IAAI,aACF,QAAQ,IAAI,CAAC;IAGf,IAAI,QAAQ,CAAA,GAAA,0BAAkB,EAAE;IAChC,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,oBAAC,gBAAgB,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,qBAAa,EAAE,OAAO,OAAO;IAEjE,IAAI,4BACF,gCAAC,CAAA,GAAA,kBAAU;QACR,GAAG,gBAAgB;QACpB,cAAA;QACA,kBACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,wDAAK,GACL;QAGJ,YAAY;;IAGhB,IAAI,kBAAkB,MAAM,eAAe,IAAK,CAAA,OAAO,SAAS,GAAG,YAAY,SAAQ;IAEvF,qBACE,gCAAC,CAAA,GAAA,oBAAY;QACV,GAAG,UAAU;QACb,GAAG,MAAM;QACV,iBAAiB;QACjB,kBACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,wDAAK,GACL,mBACA,sBACA;YACE,eAAe;YACf,YAAY,MAAM,OAAO;YACzB,4BAA4B,oBAAoB,aAAa,CAAC;YAC9D,0BAA0B,oBAAoB,WAAW,CAAC;QAC5D,GACA;QAGJ,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wDAAK,GAAG;QACnC,KAAK;QACL,UAAU;QACV,YAAY;QACZ,MAAM;QACN,iBAAiB,AAAC,MAAM,KAAK,KAAK,MAAM,CAAC,MAAM,UAAU,GAAI,cAAc;;AAEjF","sources":["packages/@react-spectrum/searchfield/src/SearchField.tsx"],"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\nimport {classNames, useSlotProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport Magnifier from '@spectrum-icons/ui/Magnifier';\nimport React, {forwardRef, ReactElement, Ref, useRef} from 'react';\nimport {SpectrumSearchFieldProps} from '@react-types/searchfield';\nimport styles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\n/**\n * A SearchField is a text field designed for searches.\n */\nexport const SearchField = forwardRef(function SearchField(props: SpectrumSearchFieldProps, ref: Ref<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n props = useFormProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n placeholder,\n ...otherProps\n } = props;\n\n if (placeholder) {\n 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');\n }\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement>(null);\n let {clearButtonProps, ...result} = useSearchField(props, state, inputRef);\n\n let clearButton = (\n <ClearButton\n {...clearButtonProps}\n preventFocus\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ClearButton'\n )\n }\n isDisabled={isDisabled} />\n );\n\n let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);\n\n return (\n <TextFieldBase\n {...otherProps}\n {...result}\n validationState={validationState}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n {\n 'is-disabled': isDisabled,\n 'is-quiet': props.isQuiet,\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n UNSAFE_className\n )\n }\n inputClassName={classNames(styles, 'spectrum-Search-input')}\n ref={ref}\n inputRef={inputRef}\n isDisabled={isDisabled}\n icon={icon}\n wrapperChildren={(state.value !== '' && !props.isReadOnly) ? clearButton : undefined} />\n );\n}) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;\n"],"names":[],"version":3,"file":"SearchField.module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TextFieldRef } from "@react-types/textfield";
|
|
|
4
4
|
/**
|
|
5
5
|
* A SearchField is a text field designed for searches.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export const SearchField: (props: SpectrumSearchFieldProps & {
|
|
8
8
|
ref?: Ref<TextFieldRef>;
|
|
9
9
|
}) => ReactElement;
|
|
10
10
|
export type { SpectrumSearchFieldProps } from '@react-types/searchfield';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;
|
|
1
|
+
{"mappings":";;;AAyBA;;GAEG;AACH,OAAO,MAAM,aAiEP,CAAC,KAAK,EAAE,wBAAwB,GAAG;IAAC,GAAG,CAAC,EAAE,IAAI,YAAY,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;AC9EpF,YAAY,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-spectrum/searchfield/src/packages/@react-spectrum/searchfield/src/SearchField.tsx","packages/@react-spectrum/searchfield/src/packages/@react-spectrum/searchfield/src/index.ts","packages/@react-spectrum/searchfield/src/index.ts"],"sourcesContent":[null,null,"/*\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/// <reference types=\"css-module-types\" />\n\nexport {SearchField} from './SearchField';\nexport type {SpectrumSearchFieldProps} from '@react-types/searchfield';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/searchfield",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.13",
|
|
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.
|
|
40
|
-
"@react-spectrum/button": "^3.16.
|
|
41
|
-
"@react-spectrum/form": "^3.7.
|
|
42
|
-
"@react-spectrum/textfield": "^3.
|
|
43
|
-
"@react-spectrum/utils": "^3.12.
|
|
44
|
-
"@react-stately/searchfield": "^3.5.
|
|
45
|
-
"@react-types/searchfield": "^3.
|
|
46
|
-
"@react-types/textfield": "^3.
|
|
47
|
-
"@spectrum-icons/ui": "^3.6.
|
|
39
|
+
"@react-aria/searchfield": "^3.8.1",
|
|
40
|
+
"@react-spectrum/button": "^3.16.11",
|
|
41
|
+
"@react-spectrum/form": "^3.7.12",
|
|
42
|
+
"@react-spectrum/textfield": "^3.13.0",
|
|
43
|
+
"@react-spectrum/utils": "^3.12.2",
|
|
44
|
+
"@react-stately/searchfield": "^3.5.10",
|
|
45
|
+
"@react-types/searchfield": "^3.6.0",
|
|
46
|
+
"@react-types/textfield": "^3.12.0",
|
|
47
|
+
"@spectrum-icons/ui": "^3.6.13",
|
|
48
48
|
"@swc/helpers": "^0.5.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -53,10 +53,11 @@
|
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@react-spectrum/provider": "^3.0.0",
|
|
56
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
56
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
57
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
57
58
|
},
|
|
58
59
|
"publishConfig": {
|
|
59
60
|
"access": "public"
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726"
|
|
62
63
|
}
|
package/src/SearchField.tsx
CHANGED
|
@@ -23,7 +23,10 @@ import {useProviderProps} from '@react-spectrum/provider';
|
|
|
23
23
|
import {useSearchField} from '@react-aria/searchfield';
|
|
24
24
|
import {useSearchFieldState} from '@react-stately/searchfield';
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* A SearchField is a text field designed for searches.
|
|
28
|
+
*/
|
|
29
|
+
export const SearchField = forwardRef(function SearchField(props: SpectrumSearchFieldProps, ref: Ref<TextFieldRef>) {
|
|
27
30
|
props = useSlotProps(props, 'searchfield');
|
|
28
31
|
props = useProviderProps(props);
|
|
29
32
|
props = useFormProps(props);
|
|
@@ -88,10 +91,4 @@ function SearchField(props: SpectrumSearchFieldProps, ref: Ref<TextFieldRef>) {
|
|
|
88
91
|
icon={icon}
|
|
89
92
|
wrapperChildren={(state.value !== '' && !props.isReadOnly) ? clearButton : undefined} />
|
|
90
93
|
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* A SearchField is a text field designed for searches.
|
|
95
|
-
*/
|
|
96
|
-
let _SearchField = forwardRef(SearchField) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;
|
|
97
|
-
export {_SearchField as SearchField};
|
|
94
|
+
}) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;
|