@react-spectrum/searchfield 3.0.0-nightly.1658 → 3.0.0-nightly.1663

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 CHANGED
@@ -8,31 +8,14 @@ var $kYnKt$reactspectrumprovider = require("@react-spectrum/provider");
8
8
  var $kYnKt$reactariasearchfield = require("@react-aria/searchfield");
9
9
  var $kYnKt$reactstatelysearchfield = require("@react-stately/searchfield");
10
10
 
11
- function $parcel$exportWildcard(dest, source) {
12
- Object.keys(source).forEach(function(key) {
13
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
14
- return;
15
- }
16
-
17
- Object.defineProperty(dest, key, {
18
- enumerable: true,
19
- get: function get() {
20
- return source[key];
21
- }
22
- });
23
- });
24
-
25
- return dest;
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
26
13
  }
27
14
  function $parcel$interopDefault(a) {
28
15
  return a && a.__esModule ? a.default : a;
29
16
  }
30
- function $parcel$export(e, n, v, s) {
31
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
32
- }
33
- var $111fe330b4c1f3ac$exports = {};
34
17
 
35
- $parcel$export($111fe330b4c1f3ac$exports, "SearchField", () => $111fe330b4c1f3ac$export$b94867ecbd698f21);
18
+ $parcel$export(module.exports, "SearchField", () => $111fe330b4c1f3ac$export$b94867ecbd698f21);
36
19
 
37
20
 
38
21
 
@@ -117,7 +100,6 @@ function $111fe330b4c1f3ac$var$SearchField(props, ref) {
117
100
  */ let $111fe330b4c1f3ac$export$b94867ecbd698f21 = /*#__PURE__*/ $kYnKt$react.forwardRef($111fe330b4c1f3ac$var$SearchField);
118
101
 
119
102
 
120
- $parcel$exportWildcard(module.exports, $111fe330b4c1f3ac$exports);
121
103
 
122
104
 
123
105
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;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M,EACN,CAAsB;QAG1B,UAAU,EAAE,UAAU;;IAG1B,MAAM,oEACH,2CAAa;WACR,UAAU;QACd,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,gBAAgB,EACd,oCAAU,CACR,gEAAM,EACN,CAAiB,kBACjB,CAAoB,qBACpB,CAAC;YACC,CAAa,cAAE,UAAU;YACzB,CAAU,WAAE,KAAK,CAAC,OAAO;YACzB,CAA0B,2BAAE,KAAK,CAAC,eAAe,KAAK,CAAS;YAC/D,CAAwB,yBAAE,KAAK,CAAC,eAAe,KAAK,CAAO;QAC7D,CAAC,EACD,gBAAgB;QAGpB,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAuB;QAC1D,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,IAAI;QACV,eAAe,EAAG,KAAK,CAAC,KAAK,KAAK,CAAE,MAAK,KAAK,CAAC,UAAU,IAAK,WAAW;;AAE/E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,uBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/searchfield/src/index.ts","packages/@react-spectrum/searchfield/src/SearchField.tsx","packages/@adobe/spectrum-css-temp/components/search/vars.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/// <reference types=\"css-module-types\" />\n\nexport * from './SearchField';\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 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>();\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","/*\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"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAsC;AACtC,GAA0B;AAC1B,GAAuC;AACvC,GAA0C;AAC1C,GAAwC;AACxC,GAA2C;AAC3C,GAA8C;AAC9C,GAAgD;AAChD,GAAoC;AATpC,yCAAiC,GAAG,CAAwB;AAC5D,wCAAsC,GAAG,CAA6B;AACtE,yCAA0B,GAAG,CAAiB;AAC9C,yCAAuC,GAAG,CAA8B;AACxE,yCAA0C,GAAG,CAAiC;AAC9E,yCAAwC,GAAG,CAA+B;AAC1E,yCAA2C,GAAG,CAAkC;AAChF,yCAA8C,GAAG,CAAqC;AACtF,yCAAgD,GAAG,CAAuC;AAC1F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,cAAc,EAAE,oCAAU,CAAC,gEAAM,EAAE,CAAuB;QAC1D,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,IAAI;QACV,eAAe,EAAG,KAAK,CAAC,KAAK,KAAK,CAAE,MAAK,KAAK,CAAC,UAAU,IAAK,WAAW;;AAE/E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,uBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/searchfield/src/index.ts","packages/@react-spectrum/searchfield/src/SearchField.tsx","packages/@adobe/spectrum-css-temp/components/search/vars.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/// <reference types=\"css-module-types\" />\n\nexport {SearchField} from './SearchField';\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 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>();\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","/*\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"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -14,9 +14,6 @@ function $parcel$interopDefault(a) {
14
14
  function $parcel$export(e, n, v, s) {
15
15
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
16
  }
17
- var $a6a4ace9217ce6df$exports = {};
18
-
19
- $parcel$export($a6a4ace9217ce6df$exports, "SearchField", () => $a6a4ace9217ce6df$export$b94867ecbd698f21);
20
17
 
21
18
 
22
19
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAsC;AACtC,GAA0B;AAC1B,GAAuC;AACvC,GAA0C;AAC1C,GAAwC;AACxC,GAA2C;AAC3C,GAA8C;AAC9C,GAAgD;AAChD,GAAoC;AATpC,yCAAiC,GAAG,CAAwB;AAC5D,wCAAsC,GAAG,CAA6B;AACtE,yCAA0B,GAAG,CAAiB;AAC9C,yCAAuC,GAAG,CAA8B;AACxE,yCAA0C,GAAG,CAAiC;AAC9E,yCAAwC,GAAG,CAA+B;AAC1E,yCAA2C,GAAG,CAAkC;AAChF,yCAA8C,GAAG,CAAqC;AACtF,yCAAgD,GAAG,CAAuC;AAC1F,yCAAoC,GAAG,CAA2B;;;;;;;SDezD,iCAAW,CAAC,KAA+B,EAAE,GAA4B,EAAE,CAAC;IACnF,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAa;IACzC,KAAK,GAAG,uBAAgB,CAAC,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AK,CAAC,KAAK,KAAK,CAAE,MAAK,KAAK,CAAC,UAAU,IAAK,WAAW;;AAE/E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,iBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/searchfield/src/index.ts","packages/@react-spectrum/searchfield/src/SearchField.tsx","packages/@adobe/spectrum-css-temp/components/search/vars.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/// <reference types=\"css-module-types\" />\n\nexport * from './SearchField';\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 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>();\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","/*\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"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAsC;AACtC,GAA0B;AAC1B,GAAuC;AACvC,GAA0C;AAC1C,GAAwC;AACxC,GAA2C;AAC3C,GAA8C;AAC9C,GAAgD;AAChD,GAAoC;AATpC,yCAAiC,GAAG,CAAwB;AAC5D,wCAAsC,GAAG,CAA6B;AACtE,yCAA0B,GAAG,CAAiB;AAC9C,yCAAuC,GAAG,CAA8B;AACxE,yCAA0C,GAAG,CAAiC;AAC9E,yCAAwC,GAAG,CAA+B;AAC1E,yCAA2C,GAAG,CAAkC;AAChF,yCAA8C,GAAG,CAAqC;AACtF,yCAAgD,GAAG,CAAuC;AAC1F,yCAAoC,GAAG,CAA2B;;;;;;;SDezD,iCAAW,CAAC,KAA+B,EAAE,GAA4B,EAAE,CAAC;IACnF,KAAK,GAAG,mBAAY,CAAC,KAAK,EAAE,CAAa;IACzC,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,WAAW,4CACZ,+BAAS;QAAC,CAAW,cAAC,CAAY;;IAGrC,GAAG,CAAC,CAAC,OACH,IAAI,GAAG,WAAW,eAClB,UAAU,qBACV,gBAAgB,gBAChB,WAAW,MACR,UAAU,CACf,CAAC,GAAG,KAAK;IAET,EAAE,EAAE,WAAW,EACb,OAAO,CAAC,IAAI,CAAC,CAA6L;IAG5M,GAAG,CAAC,KAAK,GAAG,0BAAmB,CAAC,KAAK;IACrC,GAAG,CAAC,QAAQ,GAAG,aAAM;IACrB,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,qBAAE,gBAAgB,qBAAE,gBAAgB,sBAAE,iBAAiB,EAAA,CAAC,GAAG,qBAAc,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ;IAE3H,GAAG,CAAC,WAAW,4CACZ,kBAAW;WACN,gBAAgB;QACpB,YAAY,EAAZ,IAAY;QACZ,gBAAgB,EACd,iBAAU,CACR,gEAAM,EACN,CAAsB;QAG1B,UAAU,EAAE,UAAU;;IAG1B,MAAM,0CACH,oBAAa;WACR,UAAU;QACd,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,gBAAgB;QAClC,iBAAiB,EAAE,iBAAiB;QACpC,gBAAgB,EACd,iBAAU,CACR,gEAAM,EACN,CAAiB,kBACjB,CAAoB,qBACpB,CAAC;YACC,CAAa,cAAE,UAAU;YACzB,CAAU,WAAE,KAAK,CAAC,OAAO;YACzB,CAA0B,2BAAE,KAAK,CAAC,eAAe,KAAK,CAAS;YAC/D,CAAwB,yBAAE,KAAK,CAAC,eAAe,KAAK,CAAO;QAC7D,CAAC,EACD,gBAAgB;QAGpB,cAAc,EAAE,iBAAU,CAAC,gEAAM,EAAE,CAAuB;QAC1D,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,IAAI;QACV,eAAe,EAAG,KAAK,CAAC,KAAK,KAAK,CAAE,MAAK,KAAK,CAAC,UAAU,IAAK,WAAW;;AAE/E,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,GAAG,CAAC,yCAAY,iBAAG,iBAAU,CAAC,iCAAW","sources":["packages/@react-spectrum/searchfield/src/index.ts","packages/@react-spectrum/searchfield/src/SearchField.tsx","packages/@adobe/spectrum-css-temp/components/search/vars.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/// <reference types=\"css-module-types\" />\n\nexport {SearchField} from './SearchField';\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 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>();\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","/*\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"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;AA0FA;;GAEG;AACH,OAAA,IAAI,0GAAsC,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 * from './SearchField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AA0FA;;GAEG;AACH,OAAA,IAAI,0GAAsC,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';\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.0.0-nightly.1658+a5a9d95db",
3
+ "version": "3.0.0-nightly.1663+2a6c48eb0",
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.1658+a5a9d95db",
36
- "@react-spectrum/button": "3.0.0-nightly.1658+a5a9d95db",
37
- "@react-spectrum/textfield": "3.0.0-nightly.1658+a5a9d95db",
38
- "@react-spectrum/utils": "3.0.0-nightly.1658+a5a9d95db",
39
- "@react-stately/searchfield": "3.0.0-nightly.1658+a5a9d95db",
40
- "@react-types/searchfield": "3.0.0-nightly.1658+a5a9d95db",
41
- "@react-types/textfield": "3.0.0-nightly.1658+a5a9d95db",
42
- "@spectrum-icons/ui": "3.0.0-nightly.1658+a5a9d95db"
35
+ "@react-aria/searchfield": "3.0.0-nightly.1663+2a6c48eb0",
36
+ "@react-spectrum/button": "3.0.0-nightly.1663+2a6c48eb0",
37
+ "@react-spectrum/textfield": "3.0.0-nightly.1663+2a6c48eb0",
38
+ "@react-spectrum/utils": "3.0.0-nightly.1663+2a6c48eb0",
39
+ "@react-stately/searchfield": "3.0.0-nightly.1663+2a6c48eb0",
40
+ "@react-types/searchfield": "3.0.0-nightly.1663+2a6c48eb0",
41
+ "@react-types/textfield": "3.0.0-nightly.1663+2a6c48eb0",
42
+ "@spectrum-icons/ui": "3.0.0-nightly.1663+2a6c48eb0"
43
43
  },
44
44
  "devDependencies": {
45
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1658+a5a9d95db",
46
- "@react-spectrum/test-utils": "3.0.0-nightly.1658+a5a9d95db"
45
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1663+2a6c48eb0",
46
+ "@react-spectrum/test-utils": "3.0.0-nightly.1663+2a6c48eb0"
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": "a5a9d95db94da277dca6267cca8bbe55dd6ccc69"
55
+ "gitHead": "2a6c48eb0099671cf9b530ec3d75882c549e9cb5"
56
56
  }
package/src/index.ts CHANGED
@@ -12,4 +12,4 @@
12
12
 
13
13
  /// <reference types="css-module-types" />
14
14
 
15
- export * from './SearchField';
15
+ export {SearchField} from './SearchField';