@react-spectrum/searchfield 3.0.0-nightly.1998 → 3.0.0-nightly.2005

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.
Files changed (2) hide show
  1. package/dist/import.mjs +125 -0
  2. package/package.json +17 -12
@@ -0,0 +1,125 @@
1
+ import "./main.css";
2
+ import {useSlotProps as $hlecP$useSlotProps, classNames as $hlecP$classNames} from "@react-spectrum/utils";
3
+ import {ClearButton as $hlecP$ClearButton} from "@react-spectrum/button";
4
+ import $hlecP$spectrumiconsuiMagnifier from "@spectrum-icons/ui/Magnifier";
5
+ import $hlecP$react, {useRef as $hlecP$useRef, forwardRef as $hlecP$forwardRef} from "react";
6
+ import {TextFieldBase as $hlecP$TextFieldBase} from "@react-spectrum/textfield";
7
+ import {useProviderProps as $hlecP$useProviderProps} from "@react-spectrum/provider";
8
+ import {useSearchField as $hlecP$useSearchField} from "@react-aria/searchfield";
9
+ import {useSearchFieldState as $hlecP$useSearchFieldState} from "@react-stately/searchfield";
10
+
11
+ function $parcel$interopDefault(a) {
12
+ return a && a.__esModule ? a.default : a;
13
+ }
14
+ function $parcel$export(e, n, v, s) {
15
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
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
+ */ /// <reference types="css-module-types" />
28
+ /*
29
+ * Copyright 2020 Adobe. All rights reserved.
30
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
31
+ * you may not use this file except in compliance with the License. You may obtain a copy
32
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
33
+ *
34
+ * Unless required by applicable law or agreed to in writing, software distributed under
35
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
36
+ * OF ANY KIND, either express or implied. See the License for the specific language
37
+ * governing permissions and limitations under the License.
38
+ */
39
+
40
+
41
+
42
+ var $5589e2270a5c2f51$exports = {};
43
+
44
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search", () => $5589e2270a5c2f51$export$713911d754e1e4ae, (v) => $5589e2270a5c2f51$export$713911d754e1e4ae = v);
45
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-ClearButton", () => $5589e2270a5c2f51$export$b752ce409e5660c, (v) => $5589e2270a5c2f51$export$b752ce409e5660c = v);
46
+ $parcel$export($5589e2270a5c2f51$exports, "is-quiet", () => $5589e2270a5c2f51$export$6d5c5433f0da4241, (v) => $5589e2270a5c2f51$export$6d5c5433f0da4241 = v);
47
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-input", () => $5589e2270a5c2f51$export$50e02603f2d97ae1, (v) => $5589e2270a5c2f51$export$50e02603f2d97ae1 = v);
48
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--invalid", () => $5589e2270a5c2f51$export$77a6151a0b46a6a3, (v) => $5589e2270a5c2f51$export$77a6151a0b46a6a3 = v);
49
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--valid", () => $5589e2270a5c2f51$export$aa81e3ab40f37567, (v) => $5589e2270a5c2f51$export$aa81e3ab40f37567 = v);
50
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search--loadable", () => $5589e2270a5c2f51$export$9c74d64afae3b2d4, (v) => $5589e2270a5c2f51$export$9c74d64afae3b2d4 = v);
51
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-circleLoader", () => $5589e2270a5c2f51$export$70ae4353602451dc, (v) => $5589e2270a5c2f51$export$70ae4353602451dc = v);
52
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Search-validationIcon", () => $5589e2270a5c2f51$export$938f0981825eae6e, (v) => $5589e2270a5c2f51$export$938f0981825eae6e = v);
53
+ $parcel$export($5589e2270a5c2f51$exports, "spectrum-Textfield", () => $5589e2270a5c2f51$export$2c8a10299d8b3418, (v) => $5589e2270a5c2f51$export$2c8a10299d8b3418 = v);
54
+ var $5589e2270a5c2f51$export$713911d754e1e4ae;
55
+ var $5589e2270a5c2f51$export$b752ce409e5660c;
56
+ var $5589e2270a5c2f51$export$6d5c5433f0da4241;
57
+ var $5589e2270a5c2f51$export$50e02603f2d97ae1;
58
+ var $5589e2270a5c2f51$export$77a6151a0b46a6a3;
59
+ var $5589e2270a5c2f51$export$aa81e3ab40f37567;
60
+ var $5589e2270a5c2f51$export$9c74d64afae3b2d4;
61
+ var $5589e2270a5c2f51$export$70ae4353602451dc;
62
+ var $5589e2270a5c2f51$export$938f0981825eae6e;
63
+ var $5589e2270a5c2f51$export$2c8a10299d8b3418;
64
+ $5589e2270a5c2f51$export$713911d754e1e4ae = "spectrum-Search_d3c0f3";
65
+ $5589e2270a5c2f51$export$b752ce409e5660c = "spectrum-ClearButton_d3c0f3";
66
+ $5589e2270a5c2f51$export$6d5c5433f0da4241 = "is-quiet_d3c0f3";
67
+ $5589e2270a5c2f51$export$50e02603f2d97ae1 = "spectrum-Search-input_d3c0f3";
68
+ $5589e2270a5c2f51$export$77a6151a0b46a6a3 = "spectrum-Search--invalid_d3c0f3";
69
+ $5589e2270a5c2f51$export$aa81e3ab40f37567 = "spectrum-Search--valid_d3c0f3";
70
+ $5589e2270a5c2f51$export$9c74d64afae3b2d4 = "spectrum-Search--loadable_d3c0f3";
71
+ $5589e2270a5c2f51$export$70ae4353602451dc = "spectrum-Search-circleLoader_d3c0f3";
72
+ $5589e2270a5c2f51$export$938f0981825eae6e = "spectrum-Search-validationIcon_d3c0f3";
73
+ $5589e2270a5c2f51$export$2c8a10299d8b3418 = "spectrum-Textfield_d3c0f3";
74
+
75
+
76
+
77
+
78
+
79
+
80
+ function $a6a4ace9217ce6df$var$SearchField(props, ref) {
81
+ props = (0, $hlecP$useSlotProps)(props, "searchfield");
82
+ props = (0, $hlecP$useProviderProps)(props);
83
+ let defaultIcon = /*#__PURE__*/ (0, $hlecP$react).createElement((0, $hlecP$spectrumiconsuiMagnifier), {
84
+ "data-testid": "searchicon"
85
+ });
86
+ let { icon: icon = defaultIcon , isDisabled: isDisabled , UNSAFE_className: UNSAFE_className , placeholder: placeholder , ...otherProps } = props;
87
+ 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");
88
+ let state = (0, $hlecP$useSearchFieldState)(props);
89
+ let inputRef = (0, $hlecP$useRef)();
90
+ let { labelProps: labelProps , inputProps: inputProps , clearButtonProps: clearButtonProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $hlecP$useSearchField)(props, state, inputRef);
91
+ let clearButton = /*#__PURE__*/ (0, $hlecP$react).createElement((0, $hlecP$ClearButton), {
92
+ ...clearButtonProps,
93
+ preventFocus: true,
94
+ UNSAFE_className: (0, $hlecP$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5589e2270a5c2f51$exports))), "spectrum-ClearButton"),
95
+ isDisabled: isDisabled
96
+ });
97
+ return /*#__PURE__*/ (0, $hlecP$react).createElement((0, $hlecP$TextFieldBase), {
98
+ ...otherProps,
99
+ labelProps: labelProps,
100
+ inputProps: inputProps,
101
+ descriptionProps: descriptionProps,
102
+ errorMessageProps: errorMessageProps,
103
+ UNSAFE_className: (0, $hlecP$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5589e2270a5c2f51$exports))), "spectrum-Search", "spectrum-Textfield", {
104
+ "is-disabled": isDisabled,
105
+ "is-quiet": props.isQuiet,
106
+ "spectrum-Search--invalid": props.validationState === "invalid" && !isDisabled,
107
+ "spectrum-Search--valid": props.validationState === "valid" && !isDisabled
108
+ }, UNSAFE_className),
109
+ inputClassName: (0, $hlecP$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5589e2270a5c2f51$exports))), "spectrum-Search-input"),
110
+ ref: ref,
111
+ inputRef: inputRef,
112
+ isDisabled: isDisabled,
113
+ icon: icon,
114
+ wrapperChildren: state.value !== "" && !props.isReadOnly && clearButton
115
+ });
116
+ }
117
+ /**
118
+ * A SearchField is a text field designed for searches.
119
+ */ let $a6a4ace9217ce6df$export$b94867ecbd698f21 = /*#__PURE__*/ (0, $hlecP$forwardRef)($a6a4ace9217ce6df$var$SearchField);
120
+
121
+
122
+
123
+
124
+ export {$a6a4ace9217ce6df$export$b94867ecbd698f21 as SearchField};
125
+ //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/searchfield",
3
- "version": "3.0.0-nightly.1998+72ee92f6d",
3
+ "version": "3.0.0-nightly.2005+93b3c951e",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
8
13
  "types": "dist/types.d.ts",
9
14
  "source": "src/index.ts",
10
15
  "files": [
@@ -31,19 +36,19 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@react-aria/searchfield": "3.0.0-nightly.1998+72ee92f6d",
35
- "@react-spectrum/button": "3.0.0-nightly.1998+72ee92f6d",
36
- "@react-spectrum/textfield": "3.0.0-nightly.1998+72ee92f6d",
37
- "@react-spectrum/utils": "3.0.0-nightly.1998+72ee92f6d",
38
- "@react-stately/searchfield": "3.0.0-nightly.1998+72ee92f6d",
39
- "@react-types/searchfield": "3.0.0-nightly.1998+72ee92f6d",
40
- "@react-types/textfield": "3.0.0-nightly.1998+72ee92f6d",
41
- "@spectrum-icons/ui": "3.0.0-nightly.1998+72ee92f6d",
39
+ "@react-aria/searchfield": "3.0.0-nightly.2005+93b3c951e",
40
+ "@react-spectrum/button": "3.0.0-nightly.2005+93b3c951e",
41
+ "@react-spectrum/textfield": "3.0.0-nightly.2005+93b3c951e",
42
+ "@react-spectrum/utils": "3.0.0-nightly.2005+93b3c951e",
43
+ "@react-stately/searchfield": "3.0.0-nightly.2005+93b3c951e",
44
+ "@react-types/searchfield": "3.0.0-nightly.2005+93b3c951e",
45
+ "@react-types/textfield": "3.0.0-nightly.2005+93b3c951e",
46
+ "@spectrum-icons/ui": "3.0.0-nightly.2005+93b3c951e",
42
47
  "@swc/helpers": "^0.4.14"
43
48
  },
44
49
  "devDependencies": {
45
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1998+72ee92f6d",
46
- "@react-spectrum/test-utils": "3.0.0-nightly.1998+72ee92f6d"
50
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2005+93b3c951e",
51
+ "@react-spectrum/test-utils": "3.0.0-nightly.2005+93b3c951e"
47
52
  },
48
53
  "peerDependencies": {
49
54
  "@react-spectrum/provider": "^3.0.0",
@@ -52,5 +57,5 @@
52
57
  "publishConfig": {
53
58
  "access": "public"
54
59
  },
55
- "gitHead": "72ee92f6d497163468a80642ccb96576f822f365"
60
+ "gitHead": "93b3c951eb784b14183f9988f2d188b34de8f42d"
56
61
  }