@react-spectrum/searchfield 3.0.0-nightly.1248 → 3.0.0-nightly.1261

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.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,qBAAmB,wBADJ;AAEf,0BAAwB,6BAFT;AAGf,cAAY,iBAHG;AAIf,2BAAyB,8BAJV;AAKf,8BAA4B,iCALb;AAMf,4BAA0B,+BANX;AAOf,+BAA6B,kCAPd;AAQf,kCAAgC,qCARjB;AASf,oCAAkC,uCATnB;AAUf,wBAAsB;AAVP,CAAjB;;;ACwBA,SAASG,2CAAT,CAAqBC,KAArB,EAAsDC,GAAtD,EAAoF;AAClFD,EAAAA,KAAK,GAAGE,YAAY,CAACF,KAAD,EAAQ,aAAR,CAApB;AACAA,EAAAA,KAAK,GAAGG,gBAAgB,CAACH,KAAD,CAAxB;;AACA,MAAII,WAAW,gBACb,qBAAC,yBAAD,OADF;;AAIA,MAAI;AACFC,IAAAA,IAAI,GAAGD,WADL;AAEFE,IAAAA,UAFE;AAGFC,IAAAA;AAHE,MAKAP,KALJ;AAAA,MAIKQ,UAJL,oDAKIR,KALJ;;AAOA,MAAIS,KAAK,GAAGC,mBAAmB,CAACV,KAAD,CAA/B;AACA,MAAIW,QAAQ,GAAGC,MAAM,EAArB;AACA,MAAI;AAACC,IAAAA,UAAD;AAAaC,IAAAA,UAAb;AAAyBC,IAAAA,gBAAzB;AAA2CC,IAAAA,gBAA3C;AAA6DC,IAAAA;AAA7D,MAAkFC,cAAc,CAAClB,KAAD,EAAQS,KAAR,EAAeE,QAAf,CAApG;;AAEA,MAAIQ,WAAW,gBACb,qBAAC,WAAD,kCACMJ,gBADN;AAEE,IAAA,YAAY,MAFd;AAGE,IAAA,gBAAgB,EACdK,UAAU,qDAER,sBAFQ,CAJd;AASE,IAAA,UAAU,EAAEd;AATd,KADF;;AAaA,sBACE,qBAAC,aAAD,kCACME,UADN;AAEE,IAAA,UAAU,EAAEK,UAFd;AAGE,IAAA,UAAU,EAAEC,UAHd;AAIE,IAAA,gBAAgB,EAAEE,gBAJpB;AAKE,IAAA,iBAAiB,EAAEC,iBALrB;AAME,IAAA,gBAAgB,EACdG,UAAU,qDAER,iBAFQ,EAGR,oBAHQ,EAIR;AACE,qBAAed,UADjB;AAEE,kBAAYN,KAAK,CAACqB,OAFpB;AAGE,kCAA4BrB,KAAK,CAACsB,eAAN,KAA0B,SAHxD;AAIE,gCAA0BtB,KAAK,CAACsB,eAAN,KAA0B;AAJtD,KAJQ,EAURf,gBAVQ,CAPd;AAoBE,IAAA,cAAc,EAAEa,UAAU,qDAAS,uBAAT,CApB5B;AAqBE,IAAA,GAAG,EAAEnB,GArBP;AAsBE,IAAA,QAAQ,EAAEU,QAtBZ;AAuBE,IAAA,UAAU,EAAEL,UAvBd;AAwBE,IAAA,IAAI,EAAED,IAxBR;AAyBE,IAAA,eAAe,EAAGI,KAAK,CAACc,KAAN,KAAgB,EAAhB,IAAsB,CAACvB,KAAK,CAACwB,UAA9B,IAA6CL;AAzBhE,KADF;AA4BD;AAED;;;;;AAGA,IAAIM,WAAY,gBAAGC,UAAU,CAAC3B,2CAAD,CAA7B","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/search/vars.css","./packages/@react-spectrum/searchfield/src/SearchField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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@import './index.css';\n","/*\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, RefObject, 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 {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\nfunction SearchField(props: SpectrumSearchFieldProps, ref: RefObject<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n ...otherProps\n } = props;\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>();\n let {labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps} = 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 return (\n <TextFieldBase\n {...otherProps}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\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': props.validationState === 'invalid',\n 'spectrum-Search--valid': props.validationState === 'valid'\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} />\n );\n}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField);\nexport {_SearchField as SearchField};\n"],"names":["$parcel$interopDefault","a","__esModule","default","SearchField","props","ref","useSlotProps","useProviderProps","defaultIcon","icon","isDisabled","UNSAFE_className","otherProps","state","useSearchFieldState","inputRef","useRef","labelProps","inputProps","clearButtonProps","descriptionProps","errorMessageProps","useSearchField","clearButton","classNames","isQuiet","validationState","value","isReadOnly","_SearchField","forwardRef"],"version":3,"file":"main.js.map"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AAaA,sBACE,qBAAC,aAAD,kCACME,UADN;AAEE,IAAA,UAAU,EAAEK,UAFd;AAGE,IAAA,UAAU,EAAEC,UAHd;AAIE,IAAA,gBAAgB,EAAEE,gBAJpB;AAKE,IAAA,iBAAiB,EAAEC,iBALrB;AAME,IAAA,gBAAgB,EACdG,UAAU,qDAER,iBAFQ,EAGR,oBAHQ,EAIR;AACE,qBAAed,UADjB;AAEE,kBAAYN,KAAK,CAACqB,OAFpB;AAGE,kCAA4BrB,KAAK,CAACsB,eAAN,KAA0B,SAHxD;AAIE,gCAA0BtB,KAAK,CAACsB,eAAN,KAA0B;AAJtD,KAJQ,EAURf,gBAVQ,CAPd;AAoBE,IAAA,cAAc,EAAEa,UAAU,qDAAS,uBAAT,CApB5B;AAqBE,IAAA,GAAG,EAAEnB,GArBP;AAsBE,IAAA,QAAQ,EAAEU,QAtBZ;AAuBE,IAAA,UAAU,EAAEL,UAvBd;AAwBE,IAAA,IAAI,EAAED,IAxBR;AAyBE,IAAA,eAAe,EAAGI,KAAK,CAACc,KAAN,KAAgB,EAAhB,IAAsB,CAACvB,KAAK,CAACwB,UAA9B,IAA6CL;AAzBhE,KADF;AA4BD;AAED;;;;;AAGA,IAAIM,WAAY,gBAAGC,UAAU,CAAC3B,2CAAD,CAA7B","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/search/vars.css","./packages/@react-spectrum/searchfield/src/SearchField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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@import './index.css';\n","/*\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, RefObject, 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 {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\nfunction SearchField(props: SpectrumSearchFieldProps, ref: RefObject<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n ...otherProps\n } = props;\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps} = 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 return (\n <TextFieldBase\n {...otherProps}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\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': props.validationState === 'invalid',\n 'spectrum-Search--valid': props.validationState === 'valid'\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} />\n );\n}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField);\nexport {_SearchField as SearchField};\n"],"names":["$parcel$interopDefault","a","__esModule","default","SearchField","props","ref","useSlotProps","useProviderProps","defaultIcon","icon","isDisabled","UNSAFE_className","otherProps","state","useSearchFieldState","inputRef","useRef","labelProps","inputProps","clearButtonProps","descriptionProps","errorMessageProps","useSearchField","clearButton","classNames","isQuiet","validationState","value","isReadOnly","_SearchField","forwardRef"],"version":3,"file":"main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;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,gDAER,iBAFQ,EAGR,oBAHQ,EAIR;AACE,qBAAed,UADjB;AAEE,kBAAYN,KAAK,CAACqB,OAFpB;AAGE,kCAA4BrB,KAAK,CAACsB,eAAN,KAA0B,SAHxD;AAIE,gCAA0BtB,KAAK,CAACsB,eAAN,KAA0B;AAJtD,KAJQ,EAURf,gBAVQ,CAPd;AAoBE,IAAA,cAAc,EAAEa,UAAU,gDAAS,uBAAT,CApB5B;AAqBE,IAAA,GAAG,EAAEnB,GArBP;AAsBE,IAAA,QAAQ,EAAEU,QAtBZ;AAuBE,IAAA,UAAU,EAAEL,UAvBd;AAwBE,IAAA,IAAI,EAAED,IAxBR;AAyBE,IAAA,eAAe,EAAGI,KAAK,CAACc,KAAN,KAAgB,EAAhB,IAAsB,CAACvB,KAAK,CAACwB,UAA9B,IAA6CL;AAzBhE,KADF;AA4BD;AAED;;;;;OAGA,IAAIM,WAAY,gBAAGC,UAAU,CAAC3B,8CAAD,CAA7B","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/search/vars.css","./packages/@react-spectrum/searchfield/src/SearchField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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@import './index.css';\n","/*\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, RefObject, 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 {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\nfunction SearchField(props: SpectrumSearchFieldProps, ref: RefObject<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n ...otherProps\n } = props;\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>();\n let {labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps} = 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 return (\n <TextFieldBase\n {...otherProps}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\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': props.validationState === 'invalid',\n 'spectrum-Search--valid': props.validationState === 'valid'\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} />\n );\n}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField);\nexport {_SearchField as SearchField};\n"],"names":["$parcel$interopDefault","a","__esModule","default","SearchField","props","ref","useSlotProps","useProviderProps","defaultIcon","icon","isDisabled","UNSAFE_className","otherProps","state","useSearchFieldState","inputRef","useRef","labelProps","inputProps","clearButtonProps","descriptionProps","errorMessageProps","useSearchField","clearButton","classNames","isQuiet","validationState","value","isReadOnly","_SearchField","forwardRef"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,uCAAiB;AACf,qBAAmB,wBADJ;AAEf,0BAAwB,6BAFT;AAGf,cAAY,iBAHG;AAIf,2BAAyB,8BAJV;AAKf,8BAA4B,iCALb;AAMf,4BAA0B,+BANX;AAOf,+BAA6B,kCAPd;AAQf,kCAAgC,qCARjB;AASf,oCAAkC,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AURf,gBAVQ,CAPd;AAoBE,IAAA,cAAc,EAAEa,UAAU,gDAAS,uBAAT,CApB5B;AAqBE,IAAA,GAAG,EAAEnB,GArBP;AAsBE,IAAA,QAAQ,EAAEU,QAtBZ;AAuBE,IAAA,UAAU,EAAEL,UAvBd;AAwBE,IAAA,IAAI,EAAED,IAxBR;AAyBE,IAAA,eAAe,EAAGI,KAAK,CAACc,KAAN,KAAgB,EAAhB,IAAsB,CAACvB,KAAK,CAACwB,UAA9B,IAA6CL;AAzBhE,KADF;AA4BD;AAED;;;;;OAGA,IAAIM,WAAY,gBAAGC,UAAU,CAAC3B,8CAAD,CAA7B","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/search/vars.css","./packages/@react-spectrum/searchfield/src/SearchField.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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@import './index.css';\n","/*\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, RefObject, 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 {useProviderProps} from '@react-spectrum/provider';\nimport {useSearchField} from '@react-aria/searchfield';\nimport {useSearchFieldState} from '@react-stately/searchfield';\n\nfunction SearchField(props: SpectrumSearchFieldProps, ref: RefObject<TextFieldRef>) {\n props = useSlotProps(props, 'searchfield');\n props = useProviderProps(props);\n let defaultIcon = (\n <Magnifier data-testid=\"searchicon\" />\n );\n\n let {\n icon = defaultIcon,\n isDisabled,\n UNSAFE_className,\n ...otherProps\n } = props;\n\n let state = useSearchFieldState(props);\n let inputRef = useRef<HTMLInputElement>();\n let {labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps} = 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 return (\n <TextFieldBase\n {...otherProps}\n labelProps={labelProps}\n inputProps={inputProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\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': props.validationState === 'invalid',\n 'spectrum-Search--valid': props.validationState === 'valid'\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} />\n );\n}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField);\nexport {_SearchField as SearchField};\n"],"names":["$parcel$interopDefault","a","__esModule","default","SearchField","props","ref","useSlotProps","useProviderProps","defaultIcon","icon","isDisabled","UNSAFE_className","otherProps","state","useSearchFieldState","inputRef","useRef","labelProps","inputProps","clearButtonProps","descriptionProps","errorMessageProps","useSearchField","clearButton","classNames","isQuiet","validationState","value","isReadOnly","_SearchField","forwardRef"],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/searchfield",
3
- "version": "3.0.0-nightly.1248+0d007bca9",
3
+ "version": "3.0.0-nightly.1261+2731ebc7d",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,18 +32,18 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/searchfield": "3.0.0-nightly.1248+0d007bca9",
36
- "@react-spectrum/button": "3.0.0-nightly.1248+0d007bca9",
37
- "@react-spectrum/textfield": "3.0.0-nightly.1248+0d007bca9",
38
- "@react-spectrum/utils": "3.0.0-nightly.1248+0d007bca9",
39
- "@react-stately/searchfield": "3.0.0-nightly.1248+0d007bca9",
40
- "@react-types/searchfield": "3.0.0-nightly.1248+0d007bca9",
41
- "@react-types/textfield": "3.0.0-nightly.1248+0d007bca9",
42
- "@spectrum-icons/ui": "3.0.0-nightly.1248+0d007bca9"
35
+ "@react-aria/searchfield": "3.0.0-nightly.1261+2731ebc7d",
36
+ "@react-spectrum/button": "3.0.0-nightly.1261+2731ebc7d",
37
+ "@react-spectrum/textfield": "3.0.0-nightly.1261+2731ebc7d",
38
+ "@react-spectrum/utils": "3.0.0-nightly.1261+2731ebc7d",
39
+ "@react-stately/searchfield": "3.0.0-nightly.1261+2731ebc7d",
40
+ "@react-types/searchfield": "3.0.0-nightly.1261+2731ebc7d",
41
+ "@react-types/textfield": "3.0.0-nightly.1261+2731ebc7d",
42
+ "@spectrum-icons/ui": "3.0.0-nightly.1261+2731ebc7d"
43
43
  },
44
44
  "devDependencies": {
45
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1248+0d007bca9",
46
- "@react-spectrum/test-utils": "3.0.0-nightly.1248+0d007bca9"
45
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1261+2731ebc7d",
46
+ "@react-spectrum/test-utils": "3.0.0-nightly.1261+2731ebc7d"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@react-spectrum/provider": "^3.0.0",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "0d007bca9417c4b7b86fafd5842871bf997bd4c0"
55
+ "gitHead": "2731ebc7d1992b167e3bbab6171e28f2b0adb7fa"
56
56
  }
@@ -37,7 +37,7 @@ function SearchField(props: SpectrumSearchFieldProps, ref: RefObject<TextFieldRe
37
37
  } = props;
38
38
 
39
39
  let state = useSearchFieldState(props);
40
- let inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>();
40
+ let inputRef = useRef<HTMLInputElement>();
41
41
  let {labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps} = useSearchField(props, state, inputRef);
42
42
 
43
43
  let clearButton = (