@react-spectrum/searchfield 3.0.0-nightly-641446f65-240905

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @react-spectrum/searchfield
2
+
3
+ This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,85 @@
1
+ require("./vars.433a4daa.css");
2
+ var $1e139f06a0a4b696$exports = require("./search_vars_css.main.js");
3
+ var $anRgD$reactspectrumutils = require("@react-spectrum/utils");
4
+ var $anRgD$reactspectrumbutton = require("@react-spectrum/button");
5
+ var $anRgD$spectrumiconsuiMagnifier = require("@spectrum-icons/ui/Magnifier");
6
+ var $anRgD$react = require("react");
7
+ var $anRgD$reactspectrumtextfield = require("@react-spectrum/textfield");
8
+ var $anRgD$reactspectrumform = require("@react-spectrum/form");
9
+ var $anRgD$reactspectrumprovider = require("@react-spectrum/provider");
10
+ var $anRgD$reactariasearchfield = require("@react-aria/searchfield");
11
+ var $anRgD$reactstatelysearchfield = require("@react-stately/searchfield");
12
+
13
+
14
+ function $parcel$interopDefault(a) {
15
+ return a && a.__esModule ? a.default : a;
16
+ }
17
+
18
+ function $parcel$export(e, n, v, s) {
19
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
20
+ }
21
+
22
+ $parcel$export(module.exports, "SearchField", () => $111fe330b4c1f3ac$export$b94867ecbd698f21);
23
+ /*
24
+ * Copyright 2020 Adobe. All rights reserved.
25
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
+ * you may not use this file except in compliance with the License. You may obtain a copy
27
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software distributed under
30
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
+ * OF ANY KIND, either express or implied. See the License for the specific language
32
+ * governing permissions and limitations under the License.
33
+ */
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ function $111fe330b4c1f3ac$var$SearchField(props, ref) {
44
+ props = (0, $anRgD$reactspectrumutils.useSlotProps)(props, 'searchfield');
45
+ props = (0, $anRgD$reactspectrumprovider.useProviderProps)(props);
46
+ props = (0, $anRgD$reactspectrumform.useFormProps)(props);
47
+ let defaultIcon = /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, ($parcel$interopDefault($anRgD$spectrumiconsuiMagnifier))), {
48
+ "data-testid": "searchicon"
49
+ });
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');
52
+ let state = (0, $anRgD$reactstatelysearchfield.useSearchFieldState)(props);
53
+ let inputRef = (0, $anRgD$react.useRef)(null);
54
+ let { clearButtonProps: clearButtonProps, ...result } = (0, $anRgD$reactariasearchfield.useSearchField)(props, state, inputRef);
55
+ let clearButton = /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, $anRgD$reactspectrumbutton.ClearButton), {
56
+ ...clearButtonProps,
57
+ preventFocus: true,
58
+ UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-ClearButton'),
59
+ isDisabled: isDisabled
60
+ });
61
+ let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
62
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($anRgD$react))).createElement((0, $anRgD$reactspectrumtextfield.TextFieldBase), {
63
+ ...otherProps,
64
+ ...result,
65
+ validationState: validationState,
66
+ UNSAFE_className: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search', 'spectrum-Textfield', {
67
+ 'is-disabled': isDisabled,
68
+ 'is-quiet': props.isQuiet,
69
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
70
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
71
+ }, UNSAFE_className),
72
+ inputClassName: (0, $anRgD$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search-input'),
73
+ ref: ref,
74
+ inputRef: inputRef,
75
+ isDisabled: isDisabled,
76
+ icon: icon,
77
+ wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
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);
83
+
84
+
85
+ //# sourceMappingURL=SearchField.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,SAAS,kCAAY,KAA+B,EAAE,GAAsB;IAC1E,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;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","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\nfunction 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}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;\nexport {_SearchField as SearchField};\n"],"names":[],"version":3,"file":"SearchField.main.js.map"}
@@ -0,0 +1,80 @@
1
+ import "./vars.433a4daa.css";
2
+ import $kYtTO$search_vars_cssmodulejs from "./search_vars_css.mjs";
3
+ import {useSlotProps as $kYtTO$useSlotProps, classNames as $kYtTO$classNames} from "@react-spectrum/utils";
4
+ import {ClearButton as $kYtTO$ClearButton} from "@react-spectrum/button";
5
+ import $kYtTO$spectrumiconsuiMagnifier from "@spectrum-icons/ui/Magnifier";
6
+ import $kYtTO$react, {useRef as $kYtTO$useRef, forwardRef as $kYtTO$forwardRef} from "react";
7
+ import {TextFieldBase as $kYtTO$TextFieldBase} from "@react-spectrum/textfield";
8
+ import {useFormProps as $kYtTO$useFormProps} from "@react-spectrum/form";
9
+ import {useProviderProps as $kYtTO$useProviderProps} from "@react-spectrum/provider";
10
+ import {useSearchField as $kYtTO$useSearchField} from "@react-aria/searchfield";
11
+ import {useSearchFieldState as $kYtTO$useSearchFieldState} from "@react-stately/searchfield";
12
+
13
+
14
+ function $parcel$interopDefault(a) {
15
+ return a && a.__esModule ? a.default : a;
16
+ }
17
+ /*
18
+ * Copyright 2020 Adobe. All rights reserved.
19
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
+ * you may not use this file except in compliance with the License. You may obtain a copy
21
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing, software distributed under
24
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
+ * OF ANY KIND, either express or implied. See the License for the specific language
26
+ * governing permissions and limitations under the License.
27
+ */
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
38
+ props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
39
+ props = (0, $kYtTO$useProviderProps)(props);
40
+ props = (0, $kYtTO$useFormProps)(props);
41
+ let defaultIcon = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$spectrumiconsuiMagnifier), {
42
+ "data-testid": "searchicon"
43
+ });
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');
46
+ let state = (0, $kYtTO$useSearchFieldState)(props);
47
+ let inputRef = (0, $kYtTO$useRef)(null);
48
+ let { clearButtonProps: clearButtonProps, ...result } = (0, $kYtTO$useSearchField)(props, state, inputRef);
49
+ let clearButton = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$ClearButton), {
50
+ ...clearButtonProps,
51
+ preventFocus: true,
52
+ UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
53
+ isDisabled: isDisabled
54
+ });
55
+ let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
56
+ return /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$TextFieldBase), {
57
+ ...otherProps,
58
+ ...result,
59
+ validationState: validationState,
60
+ UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Textfield', {
61
+ 'is-disabled': isDisabled,
62
+ 'is-quiet': props.isQuiet,
63
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
64
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
65
+ }, UNSAFE_className),
66
+ inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search-input'),
67
+ ref: ref,
68
+ inputRef: inputRef,
69
+ isDisabled: isDisabled,
70
+ icon: icon,
71
+ wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
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);
77
+
78
+
79
+ export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
80
+ //# sourceMappingURL=SearchField.module.js.map
@@ -0,0 +1,80 @@
1
+ import "./vars.433a4daa.css";
2
+ import $kYtTO$search_vars_cssmodulejs from "./search_vars_css.module.js";
3
+ import {useSlotProps as $kYtTO$useSlotProps, classNames as $kYtTO$classNames} from "@react-spectrum/utils";
4
+ import {ClearButton as $kYtTO$ClearButton} from "@react-spectrum/button";
5
+ import $kYtTO$spectrumiconsuiMagnifier from "@spectrum-icons/ui/Magnifier";
6
+ import $kYtTO$react, {useRef as $kYtTO$useRef, forwardRef as $kYtTO$forwardRef} from "react";
7
+ import {TextFieldBase as $kYtTO$TextFieldBase} from "@react-spectrum/textfield";
8
+ import {useFormProps as $kYtTO$useFormProps} from "@react-spectrum/form";
9
+ import {useProviderProps as $kYtTO$useProviderProps} from "@react-spectrum/provider";
10
+ import {useSearchField as $kYtTO$useSearchField} from "@react-aria/searchfield";
11
+ import {useSearchFieldState as $kYtTO$useSearchFieldState} from "@react-stately/searchfield";
12
+
13
+
14
+ function $parcel$interopDefault(a) {
15
+ return a && a.__esModule ? a.default : a;
16
+ }
17
+ /*
18
+ * Copyright 2020 Adobe. All rights reserved.
19
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
+ * you may not use this file except in compliance with the License. You may obtain a copy
21
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing, software distributed under
24
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
+ * OF ANY KIND, either express or implied. See the License for the specific language
26
+ * governing permissions and limitations under the License.
27
+ */
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
38
+ props = (0, $kYtTO$useSlotProps)(props, 'searchfield');
39
+ props = (0, $kYtTO$useProviderProps)(props);
40
+ props = (0, $kYtTO$useFormProps)(props);
41
+ let defaultIcon = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$spectrumiconsuiMagnifier), {
42
+ "data-testid": "searchicon"
43
+ });
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');
46
+ let state = (0, $kYtTO$useSearchFieldState)(props);
47
+ let inputRef = (0, $kYtTO$useRef)(null);
48
+ let { clearButtonProps: clearButtonProps, ...result } = (0, $kYtTO$useSearchField)(props, state, inputRef);
49
+ let clearButton = /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$ClearButton), {
50
+ ...clearButtonProps,
51
+ preventFocus: true,
52
+ UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
53
+ isDisabled: isDisabled
54
+ });
55
+ let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
56
+ return /*#__PURE__*/ (0, $kYtTO$react).createElement((0, $kYtTO$TextFieldBase), {
57
+ ...otherProps,
58
+ ...result,
59
+ validationState: validationState,
60
+ UNSAFE_className: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Textfield', {
61
+ 'is-disabled': isDisabled,
62
+ 'is-quiet': props.isQuiet,
63
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
64
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
65
+ }, UNSAFE_className),
66
+ inputClassName: (0, $kYtTO$classNames)((0, ($parcel$interopDefault($kYtTO$search_vars_cssmodulejs))), 'spectrum-Search-input'),
67
+ ref: ref,
68
+ inputRef: inputRef,
69
+ isDisabled: isDisabled,
70
+ icon: icon,
71
+ wrapperChildren: state.value !== '' && !props.isReadOnly ? clearButton : undefined
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);
77
+
78
+
79
+ export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
80
+ //# sourceMappingURL=SearchField.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAeD,SAAS,kCAAY,KAA+B,EAAE,GAAsB;IAC1E,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;AAEA;;CAEC,GACD,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","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\nfunction 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}\n\n/**\n * A SearchField is a text field designed for searches.\n */\nlet _SearchField = forwardRef(SearchField) as (props: SpectrumSearchFieldProps & {ref?: Ref<TextFieldRef>}) => ReactElement;\nexport {_SearchField as SearchField};\n"],"names":[],"version":3,"file":"SearchField.module.js.map"}
@@ -0,0 +1,18 @@
1
+ import {SearchField as $a6a4ace9217ce6df$export$b94867ecbd698f21} from "./SearchField.mjs";
2
+
3
+ /*
4
+ * Copyright 2020 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */ /// <reference types="css-module-types" />
14
+
15
+
16
+
17
+ export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
18
+ //# sourceMappingURL=module.js.map
package/dist/main.js ADDED
@@ -0,0 +1,23 @@
1
+ var $111fe330b4c1f3ac$exports = require("./SearchField.main.js");
2
+
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "SearchField", () => $111fe330b4c1f3ac$exports.SearchField);
9
+ /*
10
+ * Copyright 2020 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */ /// <reference types="css-module-types" />
20
+
21
+
22
+
23
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/searchfield/src/index.ts"],"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';\nexport type {SpectrumSearchFieldProps} from '@react-types/searchfield';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,18 @@
1
+ import {SearchField as $a6a4ace9217ce6df$export$b94867ecbd698f21} from "./SearchField.module.js";
2
+
3
+ /*
4
+ * Copyright 2020 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */ /// <reference types="css-module-types" />
14
+
15
+
16
+
17
+ export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
18
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/searchfield/src/index.ts"],"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';\nexport type {SpectrumSearchFieldProps} from '@react-types/searchfield';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,53 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+
6
+ $parcel$export(module.exports, "focus-ring", () => $1e139f06a0a4b696$export$f39a09f249340e2a, (v) => $1e139f06a0a4b696$export$f39a09f249340e2a = v);
7
+ $parcel$export(module.exports, "i18nFontFamily", () => $1e139f06a0a4b696$export$8c4ee2c50c22c514, (v) => $1e139f06a0a4b696$export$8c4ee2c50c22c514 = v);
8
+ $parcel$export(module.exports, "is-quiet", () => $1e139f06a0a4b696$export$6d5c5433f0da4241, (v) => $1e139f06a0a4b696$export$6d5c5433f0da4241 = v);
9
+ $parcel$export(module.exports, "spectrum-ClearButton", () => $1e139f06a0a4b696$export$b752ce409e5660c, (v) => $1e139f06a0a4b696$export$b752ce409e5660c = v);
10
+ $parcel$export(module.exports, "spectrum-FocusRing-ring", () => $1e139f06a0a4b696$export$4109102f950813a6, (v) => $1e139f06a0a4b696$export$4109102f950813a6 = v);
11
+ $parcel$export(module.exports, "spectrum-FocusRing", () => $1e139f06a0a4b696$export$24c7f46a6e3605dd, (v) => $1e139f06a0a4b696$export$24c7f46a6e3605dd = v);
12
+ $parcel$export(module.exports, "spectrum-FocusRing--quiet", () => $1e139f06a0a4b696$export$2927016961429360, (v) => $1e139f06a0a4b696$export$2927016961429360 = v);
13
+ $parcel$export(module.exports, "spectrum-Search", () => $1e139f06a0a4b696$export$713911d754e1e4ae, (v) => $1e139f06a0a4b696$export$713911d754e1e4ae = v);
14
+ $parcel$export(module.exports, "spectrum-Search--invalid", () => $1e139f06a0a4b696$export$77a6151a0b46a6a3, (v) => $1e139f06a0a4b696$export$77a6151a0b46a6a3 = v);
15
+ $parcel$export(module.exports, "spectrum-Search--loadable", () => $1e139f06a0a4b696$export$9c74d64afae3b2d4, (v) => $1e139f06a0a4b696$export$9c74d64afae3b2d4 = v);
16
+ $parcel$export(module.exports, "spectrum-Search--valid", () => $1e139f06a0a4b696$export$aa81e3ab40f37567, (v) => $1e139f06a0a4b696$export$aa81e3ab40f37567 = v);
17
+ $parcel$export(module.exports, "spectrum-Search-circleLoader", () => $1e139f06a0a4b696$export$70ae4353602451dc, (v) => $1e139f06a0a4b696$export$70ae4353602451dc = v);
18
+ $parcel$export(module.exports, "spectrum-Search-input", () => $1e139f06a0a4b696$export$50e02603f2d97ae1, (v) => $1e139f06a0a4b696$export$50e02603f2d97ae1 = v);
19
+ $parcel$export(module.exports, "spectrum-Search-validationIcon", () => $1e139f06a0a4b696$export$938f0981825eae6e, (v) => $1e139f06a0a4b696$export$938f0981825eae6e = v);
20
+ $parcel$export(module.exports, "spectrum-Textfield", () => $1e139f06a0a4b696$export$2c8a10299d8b3418, (v) => $1e139f06a0a4b696$export$2c8a10299d8b3418 = v);
21
+ var $1e139f06a0a4b696$export$f39a09f249340e2a;
22
+ var $1e139f06a0a4b696$export$8c4ee2c50c22c514;
23
+ var $1e139f06a0a4b696$export$6d5c5433f0da4241;
24
+ var $1e139f06a0a4b696$export$b752ce409e5660c;
25
+ var $1e139f06a0a4b696$export$4109102f950813a6;
26
+ var $1e139f06a0a4b696$export$24c7f46a6e3605dd;
27
+ var $1e139f06a0a4b696$export$2927016961429360;
28
+ var $1e139f06a0a4b696$export$713911d754e1e4ae;
29
+ var $1e139f06a0a4b696$export$77a6151a0b46a6a3;
30
+ var $1e139f06a0a4b696$export$9c74d64afae3b2d4;
31
+ var $1e139f06a0a4b696$export$aa81e3ab40f37567;
32
+ var $1e139f06a0a4b696$export$70ae4353602451dc;
33
+ var $1e139f06a0a4b696$export$50e02603f2d97ae1;
34
+ var $1e139f06a0a4b696$export$938f0981825eae6e;
35
+ var $1e139f06a0a4b696$export$2c8a10299d8b3418;
36
+ $1e139f06a0a4b696$export$f39a09f249340e2a = `SOkmSG_focus-ring`;
37
+ $1e139f06a0a4b696$export$8c4ee2c50c22c514 = `SOkmSG_i18nFontFamily`;
38
+ $1e139f06a0a4b696$export$6d5c5433f0da4241 = `SOkmSG_is-quiet`;
39
+ $1e139f06a0a4b696$export$b752ce409e5660c = `SOkmSG_spectrum-ClearButton`;
40
+ $1e139f06a0a4b696$export$4109102f950813a6 = `SOkmSG_spectrum-FocusRing-ring`;
41
+ $1e139f06a0a4b696$export$24c7f46a6e3605dd = `SOkmSG_spectrum-FocusRing ${$1e139f06a0a4b696$export$4109102f950813a6}`;
42
+ $1e139f06a0a4b696$export$2927016961429360 = `SOkmSG_spectrum-FocusRing--quiet`;
43
+ $1e139f06a0a4b696$export$713911d754e1e4ae = `SOkmSG_spectrum-Search`;
44
+ $1e139f06a0a4b696$export$77a6151a0b46a6a3 = `SOkmSG_spectrum-Search--invalid`;
45
+ $1e139f06a0a4b696$export$9c74d64afae3b2d4 = `SOkmSG_spectrum-Search--loadable`;
46
+ $1e139f06a0a4b696$export$aa81e3ab40f37567 = `SOkmSG_spectrum-Search--valid`;
47
+ $1e139f06a0a4b696$export$70ae4353602451dc = `SOkmSG_spectrum-Search-circleLoader`;
48
+ $1e139f06a0a4b696$export$50e02603f2d97ae1 = `SOkmSG_spectrum-Search-input`;
49
+ $1e139f06a0a4b696$export$938f0981825eae6e = `SOkmSG_spectrum-Search-validationIcon`;
50
+ $1e139f06a0a4b696$export$2c8a10299d8b3418 = `SOkmSG_spectrum-Textfield`;
51
+
52
+
53
+ //# sourceMappingURL=search_vars_css.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA6B,CAAC,eAAe,CAAC;AAC9C,2CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAoC,CAAC,sBAAsB,CAAC;AAC5D,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA0C,CAAC,4BAA4B,CAAC;AACxE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAuC,CAAC,yBAAyB,CAAC","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":"search_vars_css.main.js.map"}
@@ -0,0 +1,55 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ var $5589e2270a5c2f51$exports = {};
6
+
7
+ $parcel$export($5589e2270a5c2f51$exports, "focus-ring", () => $5589e2270a5c2f51$export$f39a09f249340e2a, (v) => $5589e2270a5c2f51$export$f39a09f249340e2a = v);
8
+ $parcel$export($5589e2270a5c2f51$exports, "i18nFontFamily", () => $5589e2270a5c2f51$export$8c4ee2c50c22c514, (v) => $5589e2270a5c2f51$export$8c4ee2c50c22c514 = v);
9
+ $parcel$export($5589e2270a5c2f51$exports, "is-quiet", () => $5589e2270a5c2f51$export$6d5c5433f0da4241, (v) => $5589e2270a5c2f51$export$6d5c5433f0da4241 = v);
10
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-ClearButton", () => $5589e2270a5c2f51$export$b752ce409e5660c, (v) => $5589e2270a5c2f51$export$b752ce409e5660c = v);
11
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing-ring", () => $5589e2270a5c2f51$export$4109102f950813a6, (v) => $5589e2270a5c2f51$export$4109102f950813a6 = v);
12
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing", () => $5589e2270a5c2f51$export$24c7f46a6e3605dd, (v) => $5589e2270a5c2f51$export$24c7f46a6e3605dd = v);
13
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing--quiet", () => $5589e2270a5c2f51$export$2927016961429360, (v) => $5589e2270a5c2f51$export$2927016961429360 = v);
14
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search", () => $5589e2270a5c2f51$export$713911d754e1e4ae, (v) => $5589e2270a5c2f51$export$713911d754e1e4ae = v);
15
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--invalid", () => $5589e2270a5c2f51$export$77a6151a0b46a6a3, (v) => $5589e2270a5c2f51$export$77a6151a0b46a6a3 = v);
16
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--loadable", () => $5589e2270a5c2f51$export$9c74d64afae3b2d4, (v) => $5589e2270a5c2f51$export$9c74d64afae3b2d4 = v);
17
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--valid", () => $5589e2270a5c2f51$export$aa81e3ab40f37567, (v) => $5589e2270a5c2f51$export$aa81e3ab40f37567 = v);
18
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-circleLoader", () => $5589e2270a5c2f51$export$70ae4353602451dc, (v) => $5589e2270a5c2f51$export$70ae4353602451dc = v);
19
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-input", () => $5589e2270a5c2f51$export$50e02603f2d97ae1, (v) => $5589e2270a5c2f51$export$50e02603f2d97ae1 = v);
20
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-validationIcon", () => $5589e2270a5c2f51$export$938f0981825eae6e, (v) => $5589e2270a5c2f51$export$938f0981825eae6e = v);
21
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Textfield", () => $5589e2270a5c2f51$export$2c8a10299d8b3418, (v) => $5589e2270a5c2f51$export$2c8a10299d8b3418 = v);
22
+ var $5589e2270a5c2f51$export$f39a09f249340e2a;
23
+ var $5589e2270a5c2f51$export$8c4ee2c50c22c514;
24
+ var $5589e2270a5c2f51$export$6d5c5433f0da4241;
25
+ var $5589e2270a5c2f51$export$b752ce409e5660c;
26
+ var $5589e2270a5c2f51$export$4109102f950813a6;
27
+ var $5589e2270a5c2f51$export$24c7f46a6e3605dd;
28
+ var $5589e2270a5c2f51$export$2927016961429360;
29
+ var $5589e2270a5c2f51$export$713911d754e1e4ae;
30
+ var $5589e2270a5c2f51$export$77a6151a0b46a6a3;
31
+ var $5589e2270a5c2f51$export$9c74d64afae3b2d4;
32
+ var $5589e2270a5c2f51$export$aa81e3ab40f37567;
33
+ var $5589e2270a5c2f51$export$70ae4353602451dc;
34
+ var $5589e2270a5c2f51$export$50e02603f2d97ae1;
35
+ var $5589e2270a5c2f51$export$938f0981825eae6e;
36
+ var $5589e2270a5c2f51$export$2c8a10299d8b3418;
37
+ $5589e2270a5c2f51$export$f39a09f249340e2a = `SOkmSG_focus-ring`;
38
+ $5589e2270a5c2f51$export$8c4ee2c50c22c514 = `SOkmSG_i18nFontFamily`;
39
+ $5589e2270a5c2f51$export$6d5c5433f0da4241 = `SOkmSG_is-quiet`;
40
+ $5589e2270a5c2f51$export$b752ce409e5660c = `SOkmSG_spectrum-ClearButton`;
41
+ $5589e2270a5c2f51$export$4109102f950813a6 = `SOkmSG_spectrum-FocusRing-ring`;
42
+ $5589e2270a5c2f51$export$24c7f46a6e3605dd = `SOkmSG_spectrum-FocusRing ${$5589e2270a5c2f51$export$4109102f950813a6}`;
43
+ $5589e2270a5c2f51$export$2927016961429360 = `SOkmSG_spectrum-FocusRing--quiet`;
44
+ $5589e2270a5c2f51$export$713911d754e1e4ae = `SOkmSG_spectrum-Search`;
45
+ $5589e2270a5c2f51$export$77a6151a0b46a6a3 = `SOkmSG_spectrum-Search--invalid`;
46
+ $5589e2270a5c2f51$export$9c74d64afae3b2d4 = `SOkmSG_spectrum-Search--loadable`;
47
+ $5589e2270a5c2f51$export$aa81e3ab40f37567 = `SOkmSG_spectrum-Search--valid`;
48
+ $5589e2270a5c2f51$export$70ae4353602451dc = `SOkmSG_spectrum-Search-circleLoader`;
49
+ $5589e2270a5c2f51$export$50e02603f2d97ae1 = `SOkmSG_spectrum-Search-input`;
50
+ $5589e2270a5c2f51$export$938f0981825eae6e = `SOkmSG_spectrum-Search-validationIcon`;
51
+ $5589e2270a5c2f51$export$2c8a10299d8b3418 = `SOkmSG_spectrum-Textfield`;
52
+
53
+
54
+ export {$5589e2270a5c2f51$exports as default};
55
+ //# sourceMappingURL=search_vars_css.module.js.map
@@ -0,0 +1,55 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ var $5589e2270a5c2f51$exports = {};
6
+
7
+ $parcel$export($5589e2270a5c2f51$exports, "focus-ring", () => $5589e2270a5c2f51$export$f39a09f249340e2a, (v) => $5589e2270a5c2f51$export$f39a09f249340e2a = v);
8
+ $parcel$export($5589e2270a5c2f51$exports, "i18nFontFamily", () => $5589e2270a5c2f51$export$8c4ee2c50c22c514, (v) => $5589e2270a5c2f51$export$8c4ee2c50c22c514 = v);
9
+ $parcel$export($5589e2270a5c2f51$exports, "is-quiet", () => $5589e2270a5c2f51$export$6d5c5433f0da4241, (v) => $5589e2270a5c2f51$export$6d5c5433f0da4241 = v);
10
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-ClearButton", () => $5589e2270a5c2f51$export$b752ce409e5660c, (v) => $5589e2270a5c2f51$export$b752ce409e5660c = v);
11
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing-ring", () => $5589e2270a5c2f51$export$4109102f950813a6, (v) => $5589e2270a5c2f51$export$4109102f950813a6 = v);
12
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing", () => $5589e2270a5c2f51$export$24c7f46a6e3605dd, (v) => $5589e2270a5c2f51$export$24c7f46a6e3605dd = v);
13
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-FocusRing--quiet", () => $5589e2270a5c2f51$export$2927016961429360, (v) => $5589e2270a5c2f51$export$2927016961429360 = v);
14
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search", () => $5589e2270a5c2f51$export$713911d754e1e4ae, (v) => $5589e2270a5c2f51$export$713911d754e1e4ae = v);
15
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--invalid", () => $5589e2270a5c2f51$export$77a6151a0b46a6a3, (v) => $5589e2270a5c2f51$export$77a6151a0b46a6a3 = v);
16
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--loadable", () => $5589e2270a5c2f51$export$9c74d64afae3b2d4, (v) => $5589e2270a5c2f51$export$9c74d64afae3b2d4 = v);
17
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--valid", () => $5589e2270a5c2f51$export$aa81e3ab40f37567, (v) => $5589e2270a5c2f51$export$aa81e3ab40f37567 = v);
18
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-circleLoader", () => $5589e2270a5c2f51$export$70ae4353602451dc, (v) => $5589e2270a5c2f51$export$70ae4353602451dc = v);
19
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-input", () => $5589e2270a5c2f51$export$50e02603f2d97ae1, (v) => $5589e2270a5c2f51$export$50e02603f2d97ae1 = v);
20
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-validationIcon", () => $5589e2270a5c2f51$export$938f0981825eae6e, (v) => $5589e2270a5c2f51$export$938f0981825eae6e = v);
21
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Textfield", () => $5589e2270a5c2f51$export$2c8a10299d8b3418, (v) => $5589e2270a5c2f51$export$2c8a10299d8b3418 = v);
22
+ var $5589e2270a5c2f51$export$f39a09f249340e2a;
23
+ var $5589e2270a5c2f51$export$8c4ee2c50c22c514;
24
+ var $5589e2270a5c2f51$export$6d5c5433f0da4241;
25
+ var $5589e2270a5c2f51$export$b752ce409e5660c;
26
+ var $5589e2270a5c2f51$export$4109102f950813a6;
27
+ var $5589e2270a5c2f51$export$24c7f46a6e3605dd;
28
+ var $5589e2270a5c2f51$export$2927016961429360;
29
+ var $5589e2270a5c2f51$export$713911d754e1e4ae;
30
+ var $5589e2270a5c2f51$export$77a6151a0b46a6a3;
31
+ var $5589e2270a5c2f51$export$9c74d64afae3b2d4;
32
+ var $5589e2270a5c2f51$export$aa81e3ab40f37567;
33
+ var $5589e2270a5c2f51$export$70ae4353602451dc;
34
+ var $5589e2270a5c2f51$export$50e02603f2d97ae1;
35
+ var $5589e2270a5c2f51$export$938f0981825eae6e;
36
+ var $5589e2270a5c2f51$export$2c8a10299d8b3418;
37
+ $5589e2270a5c2f51$export$f39a09f249340e2a = `SOkmSG_focus-ring`;
38
+ $5589e2270a5c2f51$export$8c4ee2c50c22c514 = `SOkmSG_i18nFontFamily`;
39
+ $5589e2270a5c2f51$export$6d5c5433f0da4241 = `SOkmSG_is-quiet`;
40
+ $5589e2270a5c2f51$export$b752ce409e5660c = `SOkmSG_spectrum-ClearButton`;
41
+ $5589e2270a5c2f51$export$4109102f950813a6 = `SOkmSG_spectrum-FocusRing-ring`;
42
+ $5589e2270a5c2f51$export$24c7f46a6e3605dd = `SOkmSG_spectrum-FocusRing ${$5589e2270a5c2f51$export$4109102f950813a6}`;
43
+ $5589e2270a5c2f51$export$2927016961429360 = `SOkmSG_spectrum-FocusRing--quiet`;
44
+ $5589e2270a5c2f51$export$713911d754e1e4ae = `SOkmSG_spectrum-Search`;
45
+ $5589e2270a5c2f51$export$77a6151a0b46a6a3 = `SOkmSG_spectrum-Search--invalid`;
46
+ $5589e2270a5c2f51$export$9c74d64afae3b2d4 = `SOkmSG_spectrum-Search--loadable`;
47
+ $5589e2270a5c2f51$export$aa81e3ab40f37567 = `SOkmSG_spectrum-Search--valid`;
48
+ $5589e2270a5c2f51$export$70ae4353602451dc = `SOkmSG_spectrum-Search-circleLoader`;
49
+ $5589e2270a5c2f51$export$50e02603f2d97ae1 = `SOkmSG_spectrum-Search-input`;
50
+ $5589e2270a5c2f51$export$938f0981825eae6e = `SOkmSG_spectrum-Search-validationIcon`;
51
+ $5589e2270a5c2f51$export$2c8a10299d8b3418 = `SOkmSG_spectrum-Textfield`;
52
+
53
+
54
+ export {$5589e2270a5c2f51$exports as default};
55
+ //# sourceMappingURL=search_vars_css.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAdA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA6B,CAAC,eAAe,CAAC;AAC9C,2CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAoC,CAAC,sBAAsB,CAAC;AAC5D,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAA0C,CAAC,4BAA4B,CAAC;AACxE,4CAAmD,CAAC,qCAAqC,CAAC;AAC1F,4CAAuC,CAAC,yBAAyB,CAAC","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":"search_vars_css.module.js.map"}
@@ -0,0 +1,12 @@
1
+ import { ReactElement, Ref } from "react";
2
+ import { SpectrumSearchFieldProps } from "@react-types/searchfield";
3
+ import { TextFieldRef } from "@react-types/textfield";
4
+ /**
5
+ * A SearchField is a text field designed for searches.
6
+ */
7
+ export let SearchField: (props: SpectrumSearchFieldProps & {
8
+ ref?: Ref<TextFieldRef>;
9
+ }) => ReactElement;
10
+ export type { SpectrumSearchFieldProps } from '@react-types/searchfield';
11
+
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;AA4FA;;GAEG;AACH,OAAA,IAAI,aAA0C,CAAC,KAAK,EAAE,wBAAwB,GAAG;IAAC,GAAG,CAAC,EAAE,IAAI,YAAY,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC;AChF5H,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"}
@@ -0,0 +1,223 @@
1
+ .SOkmSG_i18nFontFamily {
2
+ font-synthesis: weight;
3
+ font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
4
+ }
5
+
6
+ .SOkmSG_i18nFontFamily:lang(ar) {
7
+ font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
8
+ }
9
+
10
+ .SOkmSG_i18nFontFamily:lang(he) {
11
+ font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
12
+ }
13
+
14
+ .SOkmSG_i18nFontFamily:lang(zh) {
15
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
16
+ }
17
+
18
+ .SOkmSG_i18nFontFamily:lang(zh-Hans) {
19
+ font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
20
+ }
21
+
22
+ .SOkmSG_i18nFontFamily:lang(zh-Hant) {
23
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
24
+ }
25
+
26
+ .SOkmSG_i18nFontFamily:lang(zh-SG), .SOkmSG_i18nFontFamily:lang(zh-CN) {
27
+ font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
28
+ }
29
+
30
+ .SOkmSG_i18nFontFamily:lang(ko) {
31
+ font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
32
+ }
33
+
34
+ .SOkmSG_i18nFontFamily:lang(ja) {
35
+ font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
36
+ }
37
+
38
+ .SOkmSG_spectrum-FocusRing-ring {
39
+ --spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
40
+ --spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
41
+ --spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
42
+ --spectrum-focus-ring-border-size: 0px;
43
+ --spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
44
+ }
45
+
46
+ .SOkmSG_spectrum-FocusRing-ring:after {
47
+ border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
48
+ content: "";
49
+ margin: calc(-1 * var(--spectrum-focus-ring-border-size));
50
+ pointer-events: none;
51
+ transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
52
+ display: block;
53
+ position: absolute;
54
+ inset: 0;
55
+ }
56
+
57
+ .SOkmSG_spectrum-FocusRing.SOkmSG_focus-ring:after {
58
+ margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
59
+ box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
60
+ }
61
+
62
+ .SOkmSG_spectrum-FocusRing--quiet:after {
63
+ border-radius: 0;
64
+ }
65
+
66
+ .SOkmSG_spectrum-FocusRing--quiet.SOkmSG_focus-ring:after {
67
+ margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
68
+ box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
69
+ }
70
+
71
+ @media (forced-colors: active) {
72
+ .SOkmSG_spectrum-FocusRing, .SOkmSG_spectrum-FocusRing-ring, .SOkmSG_spectrum-FocusRing--quiet {
73
+ --spectrum-high-contrast-focus-ring-color: Highlight;
74
+ }
75
+
76
+ :is(.SOkmSG_spectrum-FocusRing, .SOkmSG_spectrum-FocusRing-ring, .SOkmSG_spectrum-FocusRing--quiet):after {
77
+ forced-color-adjust: none;
78
+ }
79
+ }
80
+
81
+ .SOkmSG_spectrum-Search {
82
+ --spectrum-textfield-border-radius: var(--spectrum-search-border-radius, var(--spectrum-alias-border-radius-regular));
83
+ position: relative;
84
+ }
85
+
86
+ .SOkmSG_spectrum-Search .SOkmSG_spectrum-ClearButton {
87
+ padding: var(--spectrum-search-clear-button-padding);
88
+ --spectrum-clearbutton-medium-background-color-hover: var(--spectrum-search-clear-button-background-color-hover);
89
+ --spectrum-clearbutton-medium-background-color-key-focus: var(--spectrum-search-clear-button-background-color-key-focus);
90
+ --spectrum-clearbutton-medium-background-color-down: var(--spectrum-search-clear-button-background-color-down);
91
+ background-clip: content-box;
92
+ position: absolute;
93
+ top: 0;
94
+ }
95
+
96
+ .SOkmSG_spectrum-Search .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
97
+ right: 0;
98
+ }
99
+
100
+ .SOkmSG_spectrum-Search .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
101
+ right: 0;
102
+ }
103
+
104
+ .SOkmSG_spectrum-Search .SOkmSG_spectrum-ClearButton:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
105
+ left: 0;
106
+ }
107
+
108
+ .SOkmSG_spectrum-Search .SOkmSG_spectrum-ClearButton:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
109
+ left: 0;
110
+ }
111
+
112
+ .SOkmSG_spectrum-Search.SOkmSG_is-quiet .SOkmSG_spectrum-Search-input {
113
+ padding-inline-end: var(--spectrum-global-dimension-size-350);
114
+ }
115
+
116
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--invalid .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
117
+ right: calc(var(--spectrum-icon-alert-medium-width, var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)));
118
+ }
119
+
120
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--invalid .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
121
+ right: calc(var(--spectrum-icon-alert-medium-width, var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)));
122
+ }
123
+
124
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--invalid .SOkmSG_spectrum-ClearButton:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
125
+ left: calc(var(--spectrum-icon-alert-medium-width, var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)));
126
+ }
127
+
128
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--invalid .SOkmSG_spectrum-ClearButton:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
129
+ left: calc(var(--spectrum-icon-alert-medium-width, var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)));
130
+ }
131
+
132
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--valid .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
133
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
134
+ }
135
+
136
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--valid .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
137
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
138
+ }
139
+
140
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--valid .SOkmSG_spectrum-ClearButton:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
141
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
142
+ }
143
+
144
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--valid .SOkmSG_spectrum-ClearButton:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
145
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
146
+ }
147
+
148
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
149
+ right: 0;
150
+ }
151
+
152
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-ClearButton:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
153
+ right: 0;
154
+ }
155
+
156
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-ClearButton:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
157
+ left: 0;
158
+ }
159
+
160
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-ClearButton:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
161
+ left: 0;
162
+ }
163
+
164
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-circleLoader:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
165
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
166
+ }
167
+
168
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-circleLoader:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
169
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
170
+ }
171
+
172
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-circleLoader:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
173
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
174
+ }
175
+
176
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-circleLoader:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
177
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
178
+ }
179
+
180
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-validationIcon {
181
+ padding-inline-end: 0;
182
+ }
183
+
184
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-validationIcon:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
185
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
186
+ }
187
+
188
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-validationIcon:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
189
+ right: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
190
+ }
191
+
192
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-validationIcon:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
193
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
194
+ }
195
+
196
+ .SOkmSG_spectrum-Search.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-validationIcon:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
197
+ left: calc(var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) / 2 + var(--spectrum-global-dimension-size-150));
198
+ }
199
+
200
+ .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input {
201
+ -webkit-appearance: none;
202
+ outline-offset: -2px;
203
+ text-indent: 0;
204
+ padding-inline-end: var(--spectrum-global-dimension-size-350);
205
+ display: block;
206
+ }
207
+
208
+ .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input::-webkit-search-cancel-button {
209
+ -webkit-appearance: none;
210
+ }
211
+
212
+ .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input::-webkit-search-decoration {
213
+ -webkit-appearance: none;
214
+ }
215
+
216
+ .SOkmSG_spectrum-Textfield.SOkmSG_spectrum-Search--invalid .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input {
217
+ padding-inline-end: calc(var(--spectrum-global-dimension-size-350) + var(--spectrum-textfield-padding-x, var(--spectrum-global-dimension-size-150)) + var(--spectrum-icon-alert-medium-width, var(--spectrum-global-dimension-size-225)) + var(--spectrum-textfield-icon-margin-left, var(--spectrum-global-dimension-size-150)));
218
+ }
219
+
220
+ .SOkmSG_spectrum-Textfield.SOkmSG_spectrum-Search--valid .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input, .SOkmSG_spectrum-Textfield.SOkmSG_spectrum-Search--loadable .SOkmSG_spectrum-Search-input.SOkmSG_spectrum-Search-input {
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
+ }
223
+ /*# sourceMappingURL=vars.433a4daa.css.map */
@@ -0,0 +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.433a4daa.css.map"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@react-spectrum/searchfield",
3
+ "version": "3.0.0-nightly-641446f65-240905",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "main": "dist/main.js",
7
+ "module": "dist/module.js",
8
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
13
+ "types": "dist/types.d.ts",
14
+ "source": "src/index.ts",
15
+ "files": [
16
+ "dist",
17
+ "src"
18
+ ],
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "targets": {
23
+ "main": {
24
+ "includeNodeModules": [
25
+ "@adobe/spectrum-css-temp"
26
+ ]
27
+ },
28
+ "module": {
29
+ "includeNodeModules": [
30
+ "@adobe/spectrum-css-temp"
31
+ ]
32
+ }
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/adobe/react-spectrum"
37
+ },
38
+ "dependencies": {
39
+ "@react-aria/searchfield": "^3.0.0-nightly-641446f65-240905",
40
+ "@react-spectrum/button": "^3.0.0-nightly-641446f65-240905",
41
+ "@react-spectrum/form": "^3.0.0-nightly-641446f65-240905",
42
+ "@react-spectrum/textfield": "^3.0.0-nightly-641446f65-240905",
43
+ "@react-spectrum/utils": "^3.0.0-nightly-641446f65-240905",
44
+ "@react-stately/searchfield": "^3.0.0-nightly-641446f65-240905",
45
+ "@react-types/searchfield": "^3.0.0-nightly-641446f65-240905",
46
+ "@react-types/textfield": "^3.0.0-nightly-641446f65-240905",
47
+ "@spectrum-icons/ui": "^3.0.0-nightly-641446f65-240905",
48
+ "@swc/helpers": "^0.5.0"
49
+ },
50
+ "devDependencies": {
51
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
52
+ "@react-spectrum/test-utils-internal": "3.0.0-alpha.1"
53
+ },
54
+ "peerDependencies": {
55
+ "@react-spectrum/provider": "^3.0.0-nightly-641446f65-240905",
56
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public"
60
+ },
61
+ "stableVersion": "3.8.8"
62
+ }
@@ -0,0 +1,97 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {classNames, useSlotProps} from '@react-spectrum/utils';
14
+ import {ClearButton} from '@react-spectrum/button';
15
+ import Magnifier from '@spectrum-icons/ui/Magnifier';
16
+ import React, {forwardRef, ReactElement, Ref, useRef} from 'react';
17
+ import {SpectrumSearchFieldProps} from '@react-types/searchfield';
18
+ import styles from '@adobe/spectrum-css-temp/components/search/vars.css';
19
+ import {TextFieldBase} from '@react-spectrum/textfield';
20
+ import {TextFieldRef} from '@react-types/textfield';
21
+ import {useFormProps} from '@react-spectrum/form';
22
+ import {useProviderProps} from '@react-spectrum/provider';
23
+ import {useSearchField} from '@react-aria/searchfield';
24
+ import {useSearchFieldState} from '@react-stately/searchfield';
25
+
26
+ function SearchField(props: SpectrumSearchFieldProps, ref: Ref<TextFieldRef>) {
27
+ props = useSlotProps(props, 'searchfield');
28
+ props = useProviderProps(props);
29
+ props = useFormProps(props);
30
+ let defaultIcon = (
31
+ <Magnifier data-testid="searchicon" />
32
+ );
33
+
34
+ let {
35
+ icon = defaultIcon,
36
+ isDisabled,
37
+ UNSAFE_className,
38
+ placeholder,
39
+ ...otherProps
40
+ } = props;
41
+
42
+ if (placeholder) {
43
+ 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');
44
+ }
45
+
46
+ let state = useSearchFieldState(props);
47
+ let inputRef = useRef<HTMLInputElement>(null);
48
+ let {clearButtonProps, ...result} = useSearchField(props, state, inputRef);
49
+
50
+ let clearButton = (
51
+ <ClearButton
52
+ {...clearButtonProps}
53
+ preventFocus
54
+ UNSAFE_className={
55
+ classNames(
56
+ styles,
57
+ 'spectrum-ClearButton'
58
+ )
59
+ }
60
+ isDisabled={isDisabled} />
61
+ );
62
+
63
+ let validationState = props.validationState || (result.isInvalid ? 'invalid' : undefined);
64
+
65
+ return (
66
+ <TextFieldBase
67
+ {...otherProps}
68
+ {...result}
69
+ validationState={validationState}
70
+ UNSAFE_className={
71
+ classNames(
72
+ styles,
73
+ 'spectrum-Search',
74
+ 'spectrum-Textfield',
75
+ {
76
+ 'is-disabled': isDisabled,
77
+ 'is-quiet': props.isQuiet,
78
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
79
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
80
+ },
81
+ UNSAFE_className
82
+ )
83
+ }
84
+ inputClassName={classNames(styles, 'spectrum-Search-input')}
85
+ ref={ref}
86
+ inputRef={inputRef}
87
+ isDisabled={isDisabled}
88
+ icon={icon}
89
+ wrapperChildren={(state.value !== '' && !props.isReadOnly) ? clearButton : undefined} />
90
+ );
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};
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ /// <reference types="css-module-types" />
14
+
15
+ export {SearchField} from './SearchField';
16
+ export type {SpectrumSearchFieldProps} from '@react-types/searchfield';