@react-stately/searchfield 3.3.3 → 3.3.4

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
@@ -5,9 +5,29 @@ function $parcel$export(e, n, v, s) {
5
5
  }
6
6
 
7
7
  $parcel$export(module.exports, "useSearchFieldState", () => $1fa0a0eef7fd0825$export$3f8be18b0f41eaf2);
8
-
8
+ /*
9
+ * Copyright 2020 Adobe. All rights reserved.
10
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License. You may obtain a copy
12
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software distributed under
15
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
16
+ * OF ANY KIND, either express or implied. See the License for the specific language
17
+ * governing permissions and limitations under the License.
18
+ */ /*
19
+ * Copyright 2020 Adobe. All rights reserved.
20
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License. You may obtain a copy
22
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
23
+ *
24
+ * Unless required by applicable law or agreed to in writing, software distributed under
25
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
26
+ * OF ANY KIND, either express or implied. See the License for the specific language
27
+ * governing permissions and limitations under the License.
28
+ */
9
29
  function $1fa0a0eef7fd0825$export$3f8be18b0f41eaf2(props) {
10
- let [value, setValue] = $lgnI8$reactstatelyutils.useControlledState($1fa0a0eef7fd0825$var$toString(props.value), $1fa0a0eef7fd0825$var$toString(props.defaultValue) || '', props.onChange);
30
+ let [value, setValue] = (0, $lgnI8$reactstatelyutils.useControlledState)($1fa0a0eef7fd0825$var$toString(props.value), $1fa0a0eef7fd0825$var$toString(props.defaultValue) || "", props.onChange);
11
31
  return {
12
32
  value: value,
13
33
  setValue: setValue
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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 {useSearchFieldState} from './useSearchFieldState';\n\nexport type {SearchFieldProps} from '@react-types/searchfield';\nexport type {SearchFieldState} 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"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAcO,SAAS,0CAAoB,KAAuB,EAAoB;IAC7E,IAAI,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,2CAAkB,AAAD,EAAE,+BAAS,MAAM,KAAK,GAAG,+BAAS,MAAM,YAAY,KAAK,IAAI,MAAM,QAAQ;IAEpH,OAAO;eACL;kBACA;IACF;AACF;AAEA,SAAS,+BAAS,GAAG,EAAE;IACrB,IAAI,OAAO,IAAI,EACb;IAGF,OAAO,IAAI,QAAQ;AACrB;;CD/BC,GAED","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 {useSearchFieldState} from './useSearchFieldState';\n\nexport type {SearchFieldProps} from '@react-types/searchfield';\nexport type {SearchFieldState} 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,8 +1,28 @@
1
1
  import {useControlledState as $ihOoW$useControlledState} from "@react-stately/utils";
2
2
 
3
-
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
+ */ /*
14
+ * Copyright 2020 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */
4
24
  function $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2(props) {
5
- let [value, setValue] = $ihOoW$useControlledState($0b2218c4e3fe7d7e$var$toString(props.value), $0b2218c4e3fe7d7e$var$toString(props.defaultValue) || '', props.onChange);
25
+ let [value, setValue] = (0, $ihOoW$useControlledState)($0b2218c4e3fe7d7e$var$toString(props.value), $0b2218c4e3fe7d7e$var$toString(props.defaultValue) || "", props.onChange);
6
26
  return {
7
27
  value: value,
8
28
  setValue: setValue
@@ -1 +1 @@
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 {useSearchFieldState} from './useSearchFieldState';\n\nexport type {SearchFieldProps} from '@react-types/searchfield';\nexport type {SearchFieldState} 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
+ {"mappings":";;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;AAcO,SAAS,0CAAoB,KAAuB,EAAoB;IAC7E,IAAI,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,yBAAkB,AAAD,EAAE,+BAAS,MAAM,KAAK,GAAG,+BAAS,MAAM,YAAY,KAAK,IAAI,MAAM,QAAQ;IAEpH,OAAO;eACL;kBACA;IACF;AACF;AAEA,SAAS,+BAAS,GAAG,EAAE;IACrB,IAAI,OAAO,IAAI,EACb;IAGF,OAAO,IAAI,QAAQ;AACrB;;CD/BC,GAED","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 {useSearchFieldState} from './useSearchFieldState';\n\nexport type {SearchFieldProps} from '@react-types/searchfield';\nexport type {SearchFieldState} 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/searchfield",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -17,10 +17,10 @@
17
17
  "url": "https://github.com/adobe/react-spectrum"
18
18
  },
19
19
  "dependencies": {
20
- "@babel/runtime": "^7.6.2",
21
- "@react-stately/utils": "^3.5.1",
22
- "@react-types/searchfield": "^3.3.5",
23
- "@react-types/shared": "^3.16.0"
20
+ "@react-stately/utils": "^3.5.2",
21
+ "@react-types/searchfield": "^3.3.6",
22
+ "@react-types/shared": "^3.16.0",
23
+ "@swc/helpers": "^0.4.14"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "2954307ddbefe149241685440c81f80ece6b2c83"
31
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
32
32
  }