@react-spectrum/searchfield 3.8.13 → 3.8.15

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.
@@ -1,4 +1,4 @@
1
- require("./vars.9afd4902.css");
1
+ require("./searchfield.2a1341cb.css");
2
2
  var $1e139f06a0a4b696$exports = require("./search_vars_css.main.js");
3
3
  var $anRgD$reactspectrumutils = require("@react-spectrum/utils");
4
4
  var $anRgD$reactspectrumbutton = require("@react-spectrum/button");
@@ -48,7 +48,7 @@ const $111fe330b4c1f3ac$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $anRgD$react
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('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');
51
+ if (placeholder && process.env.NODE_ENV !== 'production') 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);
@@ -1 +1 @@
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"}
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,eAAe,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC1C,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 && process.env.NODE_ENV !== 'production') {\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"}
@@ -1,4 +1,4 @@
1
- import "./vars.9afd4902.css";
1
+ import "./searchfield.2a1341cb.css";
2
2
  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";
@@ -42,7 +42,7 @@ const $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwa
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('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');
45
+ if (placeholder && process.env.NODE_ENV !== 'production') 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);
@@ -1,4 +1,4 @@
1
- import "./vars.9afd4902.css";
1
+ import "./searchfield.2a1341cb.css";
2
2
  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";
@@ -42,7 +42,7 @@ const $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $kYtTO$forwa
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('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');
45
+ if (placeholder && process.env.NODE_ENV !== 'production') 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);
@@ -1 +1 @@
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"}
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,eAAe,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC1C,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 && process.env.NODE_ENV !== 'production') {\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"}
@@ -220,4 +220,4 @@
220
220
  ._7mdQq_spectrum-Textfield._7mdQq_spectrum-Search--valid ._7mdQq_spectrum-Search-input._7mdQq_spectrum-Search-input, ._7mdQq_spectrum-Textfield._7mdQq_spectrum-Search--loadable ._7mdQq_spectrum-Search-input._7mdQq_spectrum-Search-input {
221
221
  padding-inline-end: calc(var(--spectrum-global-dimension-size-350) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-icon-margin-left, var(--spectrum-global-dimension-size-150)));
222
222
  }
223
- /*# sourceMappingURL=vars.9afd4902.css.map */
223
+ /*# sourceMappingURL=searchfield.2a1341cb.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAQJ;;;;;AAIE;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAYA;;;;AAIA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAIA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAMF;;;;;;;;AAgBE;;;;AAAA;;;;AAKA;;;;AAIA","sources":["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@import './index.css';\n"],"names":[],"version":3,"file":"vars.9afd4902.css.map"}
1
+ {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAQJ;;;;;AAIE;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAYA;;;;AAIA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAIA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAMF;;;;;;;;AAgBE;;;;AAAA;;;;AAKA;;;;AAIA","sources":["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@import './index.css';\n"],"names":[],"version":3,"file":"searchfield.2a1341cb.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/searchfield",
3
- "version": "3.8.13",
3
+ "version": "3.8.15",
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.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",
39
+ "@react-aria/searchfield": "^3.8.3",
40
+ "@react-spectrum/button": "^3.16.13",
41
+ "@react-spectrum/form": "^3.7.14",
42
+ "@react-spectrum/textfield": "^3.13.2",
43
+ "@react-spectrum/utils": "^3.12.4",
44
+ "@react-stately/searchfield": "^3.5.11",
45
+ "@react-types/searchfield": "^3.6.1",
46
+ "@react-types/textfield": "^3.12.1",
47
+ "@spectrum-icons/ui": "^3.6.15",
48
48
  "@swc/helpers": "^0.5.0"
49
49
  },
50
50
  "devDependencies": {
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726"
62
+ "gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
63
63
  }
@@ -42,7 +42,7 @@ export const SearchField = forwardRef(function SearchField(props: SpectrumSearch
42
42
  ...otherProps
43
43
  } = props;
44
44
 
45
- if (placeholder) {
45
+ if (placeholder && process.env.NODE_ENV !== 'production') {
46
46
  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');
47
47
  }
48
48