@react-stately/searchfield 3.1.1 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,25 +1,42 @@
1
- var {
2
- useControlledState
3
- } = require("@react-stately/utils");
4
-
5
- /**
6
- * Provides state management for a search field.
7
- */
8
- function useSearchFieldState(props) {
9
- let [value, setValue] = useControlledState($f7e1711a9e517c942ab938ede655$var$toString(props.value), $f7e1711a9e517c942ab938ede655$var$toString(props.defaultValue) || '', props.onChange);
10
- return {
11
- value,
12
- setValue
13
- };
14
- }
1
+ var $96tyi$reactstatelyutils = require("@react-stately/utils");
2
+
3
+ function $parcel$exportWildcard(dest, source) {
4
+ Object.keys(source).forEach(function(key) {
5
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
6
+ return;
7
+ }
8
+
9
+ Object.defineProperty(dest, key, {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return source[key];
13
+ }
14
+ });
15
+ });
15
16
 
16
- exports.useSearchFieldState = useSearchFieldState;
17
+ return dest;
18
+ }
19
+ function $parcel$export(e, n, v, s) {
20
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
21
+ }
22
+ var $1c3ce833ba887099$exports = {};
17
23
 
18
- function $f7e1711a9e517c942ab938ede655$var$toString(val) {
19
- if (val == null) {
20
- return;
21
- }
24
+ $parcel$export($1c3ce833ba887099$exports, "useSearchFieldState", () => $1c3ce833ba887099$export$3f8be18b0f41eaf2);
22
25
 
23
- return val.toString();
26
+ function $1c3ce833ba887099$export$3f8be18b0f41eaf2(props) {
27
+ let [value, setValue] = $96tyi$reactstatelyutils.useControlledState($1c3ce833ba887099$var$toString(props.value), $1c3ce833ba887099$var$toString(props.defaultValue) || '', props.onChange);
28
+ return {
29
+ value: value,
30
+ setValue: setValue
31
+ };
24
32
  }
33
+ function $1c3ce833ba887099$var$toString(val) {
34
+ if (val == null) return;
35
+ return val.toString();
36
+ }
37
+
38
+
39
+ $parcel$exportWildcard(module.exports, $1c3ce833ba887099$exports);
40
+
41
+
25
42
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;AAuBA;;;AAGO,SAASA,mBAAT,CAA6BC,KAA7B,EAAwE;AAC7E,MAAI,CAACC,KAAD,EAAQC,QAAR,IAAoBC,kBAAkB,CAACC,0CAAQ,CAACJ,KAAK,CAACC,KAAP,CAAT,EAAwBG,0CAAQ,CAACJ,KAAK,CAACK,YAAP,CAAR,IAAgC,EAAxD,EAA4DL,KAAK,CAACM,QAAlE,CAA1C;AAEA,SAAO;AACLL,IAAAA,KADK;AAELC,IAAAA;AAFK,GAAP;AAID;;;;AAED,SAASE,0CAAT,CAAkBG,GAAlB,EAAuB;AACrB,MAAIA,GAAG,IAAI,IAAX,EAAiB;AACf;AACD;;AAED,SAAOA,GAAG,CAACH,QAAJ,EAAP;AACD","sources":["./packages/@react-stately/searchfield/src/useSearchFieldState.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\nimport {SearchFieldProps} from '@react-types/searchfield';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface SearchFieldState {\n /** The current value of the search field. */\n readonly value: string,\n\n /** Sets the value of the search field. */\n setValue(value: string): void\n}\n\n/**\n * Provides state management for a search field.\n */\nexport function useSearchFieldState(props: SearchFieldProps): SearchFieldState {\n let [value, setValue] = useControlledState(toString(props.value), toString(props.defaultValue) || '', props.onChange);\n\n return {\n value,\n setValue\n };\n}\n\nfunction toString(val) {\n if (val == null) {\n return;\n }\n\n return val.toString();\n}\n"],"names":["useSearchFieldState","props","value","setValue","useControlledState","toString","defaultValue","onChange","val"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;SC0BgB,yCAAmB,CAAC,KAAuB,EAAoB,CAAC;IAC9E,GAAG,EAAE,KAAK,EAAE,QAAQ,IAAI,2CAAkB,CAAC,8BAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,8BAAQ,CAAC,KAAK,CAAC,YAAY,KAAK,CAAE,GAAE,KAAK,CAAC,QAAQ;IAEpH,MAAM,CAAC,CAAC;eACN,KAAK;kBACL,QAAQ;IACV,CAAC;AACH,CAAC;SAEQ,8BAAQ,CAAC,GAAG,EAAE,CAAC;IACtB,EAAE,EAAE,GAAG,IAAI,IAAI,EACb,MAAM;IAGR,MAAM,CAAC,GAAG,CAAC,QAAQ;AACrB,CAAC","sources":["packages/@react-stately/searchfield/src/index.ts","packages/@react-stately/searchfield/src/useSearchFieldState.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\nexport * from './useSearchFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {SearchFieldProps} from '@react-types/searchfield';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface SearchFieldState {\n /** The current value of the search field. */\n readonly value: string,\n\n /** Sets the value of the search field. */\n setValue(value: string): void\n}\n\n/**\n * Provides state management for a search field.\n */\nexport function useSearchFieldState(props: SearchFieldProps): SearchFieldState {\n let [value, setValue] = useControlledState(toString(props.value), toString(props.defaultValue) || '', props.onChange);\n\n return {\n value,\n setValue\n };\n}\n\nfunction toString(val) {\n if (val == null) {\n return;\n }\n\n return val.toString();\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,21 +1,26 @@
1
- import { useControlledState } from "@react-stately/utils";
1
+ import {useControlledState as $crNRK$useControlledState} from "@react-stately/utils";
2
2
 
3
- /**
4
- * Provides state management for a search field.
5
- */
6
- export function useSearchFieldState(props) {
7
- let [value, setValue] = useControlledState($a9d4cb04630987986dd69a33031$var$toString(props.value), $a9d4cb04630987986dd69a33031$var$toString(props.defaultValue) || '', props.onChange);
8
- return {
9
- value,
10
- setValue
11
- };
3
+ function $parcel$export(e, n, v, s) {
4
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
5
  }
6
+ var $3d10b34efa3e069c$exports = {};
13
7
 
14
- function $a9d4cb04630987986dd69a33031$var$toString(val) {
15
- if (val == null) {
16
- return;
17
- }
8
+ $parcel$export($3d10b34efa3e069c$exports, "useSearchFieldState", () => $3d10b34efa3e069c$export$3f8be18b0f41eaf2);
18
9
 
19
- return val.toString();
10
+ function $3d10b34efa3e069c$export$3f8be18b0f41eaf2(props) {
11
+ let [value, setValue] = $crNRK$useControlledState($3d10b34efa3e069c$var$toString(props.value), $3d10b34efa3e069c$var$toString(props.defaultValue) || '', props.onChange);
12
+ return {
13
+ value: value,
14
+ setValue: setValue
15
+ };
20
16
  }
17
+ function $3d10b34efa3e069c$var$toString(val) {
18
+ if (val == null) return;
19
+ return val.toString();
20
+ }
21
+
22
+
23
+
24
+
25
+ export {$3d10b34efa3e069c$export$3f8be18b0f41eaf2 as useSearchFieldState};
21
26
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;AAuBA;;;OAGO,SAASA,mBAAT,CAA6BC,KAA7B,EAAwE;AAC7E,MAAI,CAACC,KAAD,EAAQC,QAAR,IAAoBC,kBAAkB,CAACC,yCAAQ,CAACJ,KAAK,CAACC,KAAP,CAAT,EAAwBG,yCAAQ,CAACJ,KAAK,CAACK,YAAP,CAAR,IAAgC,EAAxD,EAA4DL,KAAK,CAACM,QAAlE,CAA1C;AAEA,SAAO;AACLL,IAAAA,KADK;AAELC,IAAAA;AAFK,GAAP;AAID;;AAED,SAASE,yCAAT,CAAkBG,GAAlB,EAAuB;AACrB,MAAIA,GAAG,IAAI,IAAX,EAAiB;AACf;AACD;;AAED,SAAOA,GAAG,CAACH,QAAJ,EAAP;AACD","sources":["./packages/@react-stately/searchfield/src/useSearchFieldState.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\nimport {SearchFieldProps} from '@react-types/searchfield';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface SearchFieldState {\n /** The current value of the search field. */\n readonly value: string,\n\n /** Sets the value of the search field. */\n setValue(value: string): void\n}\n\n/**\n * Provides state management for a search field.\n */\nexport function useSearchFieldState(props: SearchFieldProps): SearchFieldState {\n let [value, setValue] = useControlledState(toString(props.value), toString(props.defaultValue) || '', props.onChange);\n\n return {\n value,\n setValue\n };\n}\n\nfunction toString(val) {\n if (val == null) {\n return;\n }\n\n return val.toString();\n}\n"],"names":["useSearchFieldState","props","value","setValue","useControlledState","toString","defaultValue","onChange","val"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;SC0BgB,yCAAmB,CAAC,KAAuB,EAAoB,CAAC;IAC9E,GAAG,EAAE,KAAK,EAAE,QAAQ,IAAI,yBAAkB,CAAC,8BAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,8BAAQ,CAAC,KAAK,CAAC,YAAY,KAAK,CAAE,GAAE,KAAK,CAAC,QAAQ;IAEpH,MAAM,CAAC,CAAC;eACN,KAAK;kBACL,QAAQ;IACV,CAAC;AACH,CAAC;SAEQ,8BAAQ,CAAC,GAAG,EAAE,CAAC;IACtB,EAAE,EAAE,GAAG,IAAI,IAAI,EACb,MAAM;IAGR,MAAM,CAAC,GAAG,CAAC,QAAQ;AACrB,CAAC","sources":["packages/@react-stately/searchfield/src/index.ts","packages/@react-stately/searchfield/src/useSearchFieldState.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\nexport * from './useSearchFieldState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {SearchFieldProps} from '@react-types/searchfield';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface SearchFieldState {\n /** The current value of the search field. */\n readonly value: string,\n\n /** Sets the value of the search field. */\n setValue(value: string): void\n}\n\n/**\n * Provides state management for a search field.\n */\nexport function useSearchFieldState(props: SearchFieldProps): SearchFieldState {\n let [value, setValue] = useControlledState(toString(props.value), toString(props.defaultValue) || '', props.onChange);\n\n return {\n value,\n setValue\n };\n}\n\nfunction toString(val) {\n if (val == null) {\n return;\n }\n\n return val.toString();\n}\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;AAeA;IACE,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED;A;GAEG;AACH,oCAAoC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAO7E","sources":["./packages/@react-stately/searchfield/src/packages/@react-stately/searchfield/src/useSearchFieldState.ts","./packages/@react-stately/searchfield/src/packages/@react-stately/searchfield/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";AAeA;IACE,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED;;GAEG;AACH,oCAAoC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAO7E","sources":["packages/@react-stately/searchfield/src/packages/@react-stately/searchfield/src/useSearchFieldState.ts","packages/@react-stately/searchfield/src/packages/@react-stately/searchfield/src/index.ts","packages/@react-stately/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\nexport * from './useSearchFieldState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/searchfield",
3
- "version": "3.1.1",
3
+ "version": "3.1.5",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-stately/utils": "^3.1.1",
22
- "@react-types/searchfield": "^3.1.1",
23
- "@react-types/shared": "^3.2.1"
21
+ "@react-stately/utils": "^3.4.1",
22
+ "@react-types/searchfield": "^3.1.4",
23
+ "@react-types/shared": "^3.11.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "0778f71a3c13e1e24388a23b6d525e3b9f5b98f1"
31
+ "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
32
32
  }