@react-aria/searchfield 3.8.11 → 3.9.0
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/import.mjs +2 -2
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/package.json +15 -18
- package/src/index.ts +3 -3
- package/dist/ar-AE.main.js +0 -6
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -8
- package/dist/ar-AE.module.js +0 -8
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -6
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -8
- package/dist/bg-BG.module.js +0 -8
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -6
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -8
- package/dist/cs-CZ.module.js +0 -8
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -6
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -8
- package/dist/da-DK.module.js +0 -8
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -6
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -8
- package/dist/de-DE.module.js +0 -8
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -6
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -8
- package/dist/el-GR.module.js +0 -8
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -6
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -8
- package/dist/en-US.module.js +0 -8
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -6
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -8
- package/dist/es-ES.module.js +0 -8
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -6
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -8
- package/dist/et-EE.module.js +0 -8
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -6
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -8
- package/dist/fi-FI.module.js +0 -8
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -6
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -8
- package/dist/fr-FR.module.js +0 -8
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -6
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -8
- package/dist/he-IL.module.js +0 -8
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -6
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -8
- package/dist/hr-HR.module.js +0 -8
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -6
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -8
- package/dist/hu-HU.module.js +0 -8
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -6
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -8
- package/dist/it-IT.module.js +0 -8
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -6
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -8
- package/dist/ja-JP.module.js +0 -8
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -6
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -8
- package/dist/ko-KR.module.js +0 -8
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -6
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -8
- package/dist/lt-LT.module.js +0 -8
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -6
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -8
- package/dist/lv-LV.module.js +0 -8
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -6
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -8
- package/dist/nb-NO.module.js +0 -8
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -6
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -8
- package/dist/nl-NL.module.js +0 -8
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -6
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -8
- package/dist/pl-PL.module.js +0 -8
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -6
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -8
- package/dist/pt-BR.module.js +0 -8
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -6
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -8
- package/dist/pt-PT.module.js +0 -8
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -6
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -8
- package/dist/ro-RO.module.js +0 -8
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -6
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -8
- package/dist/ru-RU.module.js +0 -8
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -6
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -8
- package/dist/sk-SK.module.js +0 -8
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -6
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -8
- package/dist/sl-SI.module.js +0 -8
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -6
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -8
- package/dist/sr-SP.module.js +0 -8
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -6
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -8
- package/dist/sv-SE.module.js +0 -8
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -6
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -8
- package/dist/tr-TR.module.js +0 -8
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -27
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -6
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -8
- package/dist/uk-UA.module.js +0 -8
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/useSearchField.main.js +0 -93
- package/dist/useSearchField.main.js.map +0 -1
- package/dist/useSearchField.mjs +0 -88
- package/dist/useSearchField.module.js +0 -88
- package/dist/useSearchField.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -6
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -8
- package/dist/zh-CN.module.js +0 -8
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -6
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -8
- package/dist/zh-TW.module.js +0 -8
- package/dist/zh-TW.module.js.map +0 -1
- package/src/useSearchField.ts +0 -131
package/dist/pt-BR.main.js
DELETED
package/dist/pt-BR.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,eAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/pt-BR.json"],"sourcesContent":["{\n \"Clear search\": \"Limpar pesquisa\"\n}\n"],"names":[],"version":3,"file":"pt-BR.main.js.map"}
|
package/dist/pt-BR.mjs
DELETED
package/dist/pt-BR.module.js
DELETED
package/dist/pt-BR.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,eAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/pt-BR.json"],"sourcesContent":["{\n \"Clear search\": \"Limpar pesquisa\"\n}\n"],"names":[],"version":3,"file":"pt-BR.module.js.map"}
|
package/dist/pt-PT.main.js
DELETED
package/dist/pt-PT.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,eAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/pt-PT.json"],"sourcesContent":["{\n \"Clear search\": \"Limpar pesquisa\"\n}\n"],"names":[],"version":3,"file":"pt-PT.main.js.map"}
|
package/dist/pt-PT.mjs
DELETED
package/dist/pt-PT.module.js
DELETED
package/dist/pt-PT.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,eAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/pt-PT.json"],"sourcesContent":["{\n \"Clear search\": \"Limpar pesquisa\"\n}\n"],"names":[],"version":3,"file":"pt-PT.module.js.map"}
|
package/dist/ro-RO.main.js
DELETED
package/dist/ro-RO.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,mCAAiB,CAAC;AACvD","sources":["packages/@react-aria/searchfield/intl/ro-RO.json"],"sourcesContent":["{\n \"Clear search\": \"Ştergeţi căutarea\"\n}\n"],"names":[],"version":3,"file":"ro-RO.main.js.map"}
|
package/dist/ro-RO.mjs
DELETED
package/dist/ro-RO.module.js
DELETED
package/dist/ro-RO.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,mCAAiB,CAAC;AACvD","sources":["packages/@react-aria/searchfield/intl/ro-RO.json"],"sourcesContent":["{\n \"Clear search\": \"Ştergeţi căutarea\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
|
package/dist/ru-RU.main.js
DELETED
package/dist/ru-RU.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,4FAAc,CAAC;AACpD","sources":["packages/@react-aria/searchfield/intl/ru-RU.json"],"sourcesContent":["{\n \"Clear search\": \"Очистить поиск\"\n}\n"],"names":[],"version":3,"file":"ru-RU.main.js.map"}
|
package/dist/ru-RU.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var $701c918a4653e946$exports = {};
|
|
2
|
-
$701c918a4653e946$exports = {
|
|
3
|
-
"Clear search": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{44C} \u{43F}\u{43E}\u{438}\u{441}\u{43A}`
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {$701c918a4653e946$exports as default};
|
|
8
|
-
//# sourceMappingURL=ru-RU.module.js.map
|
package/dist/ru-RU.module.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var $701c918a4653e946$exports = {};
|
|
2
|
-
$701c918a4653e946$exports = {
|
|
3
|
-
"Clear search": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{44C} \u{43F}\u{43E}\u{438}\u{441}\u{43A}`
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {$701c918a4653e946$exports as default};
|
|
8
|
-
//# sourceMappingURL=ru-RU.module.js.map
|
package/dist/ru-RU.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,4FAAc,CAAC;AACpD","sources":["packages/@react-aria/searchfield/intl/ru-RU.json"],"sourcesContent":["{\n \"Clear search\": \"Очистить поиск\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
|
package/dist/sk-SK.main.js
DELETED
package/dist/sk-SK.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,mCAAoB,CAAC;AAC1D","sources":["packages/@react-aria/searchfield/intl/sk-SK.json"],"sourcesContent":["{\n \"Clear search\": \"Vymazať vyhľadávanie\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
|
package/dist/sk-SK.mjs
DELETED
package/dist/sk-SK.module.js
DELETED
package/dist/sk-SK.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,mCAAoB,CAAC;AAC1D","sources":["packages/@react-aria/searchfield/intl/sk-SK.json"],"sourcesContent":["{\n \"Clear search\": \"Vymazať vyhľadávanie\"\n}\n"],"names":[],"version":3,"file":"sk-SK.module.js.map"}
|
package/dist/sl-SI.main.js
DELETED
package/dist/sl-SI.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/sl-SI.json"],"sourcesContent":["{\n \"Clear search\": \"Počisti iskanje\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
|
package/dist/sl-SI.mjs
DELETED
package/dist/sl-SI.module.js
DELETED
package/dist/sl-SI.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/sl-SI.json"],"sourcesContent":["{\n \"Clear search\": \"Počisti iskanje\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
|
package/dist/sr-SP.main.js
DELETED
package/dist/sr-SP.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/sr-SP.json"],"sourcesContent":["{\n \"Clear search\": \"Obriši pretragu\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
|
package/dist/sr-SP.mjs
DELETED
package/dist/sr-SP.module.js
DELETED
package/dist/sr-SP.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/sr-SP.json"],"sourcesContent":["{\n \"Clear search\": \"Obriši pretragu\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
|
package/dist/sv-SE.main.js
DELETED
package/dist/sv-SE.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,gBAAa,CAAC;AACnD","sources":["packages/@react-aria/searchfield/intl/sv-SE.json"],"sourcesContent":["{\n \"Clear search\": \"Rensa sökning\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
|
package/dist/sv-SE.mjs
DELETED
package/dist/sv-SE.module.js
DELETED
package/dist/sv-SE.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,gBAAa,CAAC;AACnD","sources":["packages/@react-aria/searchfield/intl/sv-SE.json"],"sourcesContent":["{\n \"Clear search\": \"Rensa sökning\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
|
package/dist/tr-TR.main.js
DELETED
package/dist/tr-TR.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/tr-TR.json"],"sourcesContent":["{\n \"Clear search\": \"Aramayı temizle\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
|
package/dist/tr-TR.mjs
DELETED
package/dist/tr-TR.module.js
DELETED
package/dist/tr-TR.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,qBAAe,CAAC;AACrD","sources":["packages/@react-aria/searchfield/intl/tr-TR.json"],"sourcesContent":["{\n \"Clear search\": \"Aramayı temizle\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AriaButtonProps } from "@react-types/button";
|
|
2
|
-
import { AriaSearchFieldProps } from "@react-types/searchfield";
|
|
3
|
-
import { DOMAttributes, RefObject, ValidationResult } from "@react-types/shared";
|
|
4
|
-
import { InputHTMLAttributes, LabelHTMLAttributes } from "react";
|
|
5
|
-
import { SearchFieldState } from "@react-stately/searchfield";
|
|
6
|
-
export interface SearchFieldAria extends ValidationResult {
|
|
7
|
-
/** Props for the text field's visible label element (if any). */
|
|
8
|
-
labelProps: LabelHTMLAttributes<HTMLLabelElement>;
|
|
9
|
-
/** Props for the input element. */
|
|
10
|
-
inputProps: InputHTMLAttributes<HTMLInputElement>;
|
|
11
|
-
/** Props for the clear button. */
|
|
12
|
-
clearButtonProps: AriaButtonProps;
|
|
13
|
-
/** Props for the searchfield's description element, if any. */
|
|
14
|
-
descriptionProps: DOMAttributes;
|
|
15
|
-
/** Props for the searchfield's error message element, if any. */
|
|
16
|
-
errorMessageProps: DOMAttributes;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Provides the behavior and accessibility implementation for a search field.
|
|
20
|
-
* @param props - Props for the search field.
|
|
21
|
-
* @param state - State for the search field, as returned by `useSearchFieldState`.
|
|
22
|
-
* @param inputRef - A ref to the input element.
|
|
23
|
-
*/
|
|
24
|
-
export function useSearchField(props: AriaSearchFieldProps, state: SearchFieldState, inputRef: RefObject<HTMLInputElement | null>): SearchFieldAria;
|
|
25
|
-
export type { AriaSearchFieldProps } from '@react-types/searchfield';
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;AAuBA,gCAAiC,SAAQ,gBAAgB;IACvD,iEAAiE;IACjE,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mCAAmC;IACnC,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,kCAAkC;IAClC,gBAAgB,EAAE,eAAe,CAAC;IAClC,+DAA+D;IAC/D,gBAAgB,EAAE,aAAa,CAAC;IAChC,iEAAiE;IACjE,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED;;;;;GAKG;AACH,+BACE,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAC3C,eAAe,CAoFjB;ACtHD,YAAY,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-aria/searchfield/src/packages/@react-aria/searchfield/src/useSearchField.ts","packages/@react-aria/searchfield/src/packages/@react-aria/searchfield/src/index.ts","packages/@react-aria/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 */\nexport {useSearchField} from './useSearchField';\nexport type {AriaSearchFieldProps} from '@react-types/searchfield';\nexport type {SearchFieldAria} from './useSearchField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/dist/uk-UA.main.js
DELETED
package/dist/uk-UA.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,gBAAgB,CAAC,4FAAc,CAAC;AACpD","sources":["packages/@react-aria/searchfield/intl/uk-UA.json"],"sourcesContent":["{\n \"Clear search\": \"Очистити пошук\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
|
package/dist/uk-UA.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var $2d999353ca652e34$exports = {};
|
|
2
|
-
$2d999353ca652e34$exports = {
|
|
3
|
-
"Clear search": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{438} \u{43F}\u{43E}\u{448}\u{443}\u{43A}`
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {$2d999353ca652e34$exports as default};
|
|
8
|
-
//# sourceMappingURL=uk-UA.module.js.map
|
package/dist/uk-UA.module.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var $2d999353ca652e34$exports = {};
|
|
2
|
-
$2d999353ca652e34$exports = {
|
|
3
|
-
"Clear search": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{438} \u{43F}\u{43E}\u{448}\u{443}\u{43A}`
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {$2d999353ca652e34$exports as default};
|
|
8
|
-
//# sourceMappingURL=uk-UA.module.js.map
|
package/dist/uk-UA.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,gBAAgB,CAAC,4FAAc,CAAC;AACpD","sources":["packages/@react-aria/searchfield/intl/uk-UA.json"],"sourcesContent":["{\n \"Clear search\": \"Очистити пошук\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
var $8e80a08ea739bb00$exports = require("./intlStrings.main.js");
|
|
2
|
-
var $2KtRb$reactariautils = require("@react-aria/utils");
|
|
3
|
-
var $2KtRb$reactariai18n = require("@react-aria/i18n");
|
|
4
|
-
var $2KtRb$reactariatextfield = require("@react-aria/textfield");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function $parcel$interopDefault(a) {
|
|
8
|
-
return a && a.__esModule ? a.default : a;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function $parcel$export(e, n, v, s) {
|
|
12
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
$parcel$export(module.exports, "useSearchField", () => $ccae92a71d96d51a$export$9bb30bbe003b82e0);
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function $ccae92a71d96d51a$export$9bb30bbe003b82e0(props, state, inputRef) {
|
|
31
|
-
let stringFormatter = (0, $2KtRb$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($8e80a08ea739bb00$exports))), '@react-aria/searchfield');
|
|
32
|
-
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit, onClear: onClear, type: type = 'search' } = props;
|
|
33
|
-
let onKeyDown = (e)=>{
|
|
34
|
-
const key = e.key;
|
|
35
|
-
if (key === 'Enter' && (isDisabled || isReadOnly)) e.preventDefault();
|
|
36
|
-
if (isDisabled || isReadOnly) return;
|
|
37
|
-
// for backward compatibility;
|
|
38
|
-
// otherwise, "Enter" on an input would trigger a form submit, the default browser behavior
|
|
39
|
-
if (key === 'Enter' && onSubmit) {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
onSubmit(state.value);
|
|
42
|
-
}
|
|
43
|
-
if (key === 'Escape') {
|
|
44
|
-
// Also check the inputRef value for the case where the value was set directly on the input element instead of going through
|
|
45
|
-
// the hook
|
|
46
|
-
if (state.value === '' && (!inputRef.current || inputRef.current.value === '')) e.continuePropagation();
|
|
47
|
-
else {
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
state.setValue('');
|
|
50
|
-
if (onClear) onClear();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
let onClearButtonClick = ()=>{
|
|
55
|
-
state.setValue('');
|
|
56
|
-
if (onClear) onClear();
|
|
57
|
-
};
|
|
58
|
-
let onPressStart = ()=>{
|
|
59
|
-
var // this is in PressStart for mobile so that touching the clear button doesn't remove focus from
|
|
60
|
-
// the input and close the keyboard
|
|
61
|
-
_inputRef_current;
|
|
62
|
-
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
63
|
-
};
|
|
64
|
-
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $2KtRb$reactariatextfield.useTextField)({
|
|
65
|
-
...props,
|
|
66
|
-
value: state.value,
|
|
67
|
-
onChange: state.setValue,
|
|
68
|
-
onKeyDown: !isReadOnly ? (0, $2KtRb$reactariautils.chain)(onKeyDown, props.onKeyDown) : props.onKeyDown,
|
|
69
|
-
type: type
|
|
70
|
-
}, inputRef);
|
|
71
|
-
return {
|
|
72
|
-
labelProps: labelProps,
|
|
73
|
-
inputProps: {
|
|
74
|
-
...inputProps,
|
|
75
|
-
// already handled by useSearchFieldState
|
|
76
|
-
defaultValue: undefined
|
|
77
|
-
},
|
|
78
|
-
clearButtonProps: {
|
|
79
|
-
'aria-label': stringFormatter.format('Clear search'),
|
|
80
|
-
excludeFromTabOrder: true,
|
|
81
|
-
preventFocusOnPress: true,
|
|
82
|
-
isDisabled: isDisabled || isReadOnly,
|
|
83
|
-
onPress: onClearButtonClick,
|
|
84
|
-
onPressStart: onPressStart
|
|
85
|
-
},
|
|
86
|
-
descriptionProps: descriptionProps,
|
|
87
|
-
errorMessageProps: errorMessageProps,
|
|
88
|
-
...validation
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=useSearchField.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAgCM,SAAS,0CACd,KAA2B,EAC3B,KAAuB,EACvB,QAA4C;IAE5C,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,cACF,UAAU,cACV,UAAU,YACV,QAAQ,WACR,OAAO,QACP,OAAO,UACR,GAAG;IAEJ,IAAI,YAAY,CAAC;QACf,MAAM,MAAM,EAAE,GAAG;QAEjB,IAAI,QAAQ,WAAY,CAAA,cAAc,UAAS,GAC7C,EAAE,cAAc;QAGlB,IAAI,cAAc,YAChB;QAGF,8BAA8B;QAC9B,2FAA2F;QAC3F,IAAI,QAAQ,WAAW,UAAU;YAC/B,EAAE,cAAc;YAChB,SAAS,MAAM,KAAK;QACtB;QAEA,IAAI,QAAQ;YACV,4HAA4H;YAC5H,WAAW;YACX,IAAI,MAAM,KAAK,KAAK,MAAO,CAAA,CAAC,SAAS,OAAO,IAAI,SAAS,OAAO,CAAC,KAAK,KAAK,EAAC,GAC1E,EAAE,mBAAmB;iBAChB;gBACL,EAAE,cAAc;gBAChB,MAAM,QAAQ,CAAC;gBACf,IAAI,SACF;YAEJ;;IAEJ;IAEA,IAAI,qBAAqB;QACvB,MAAM,QAAQ,CAAC;QAEf,IAAI,SACF;IAEJ;IAEA,IAAI,eAAe;YACjB,+FAA+F;QAC/F,mCAAmC;QACnC;SAAA,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,KAAK;IACzB;IAEA,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,sCAAW,EAAE;QAC9F,GAAG,KAAK;QACR,OAAO,MAAM,KAAK;QAClB,UAAU,MAAM,QAAQ;QACxB,WAAW,CAAC,aAAa,CAAA,GAAA,2BAAI,EAAE,WAAW,MAAM,SAAS,IAAI,MAAM,SAAS;cAC5E;IACF,GAAG;IAEH,OAAO;oBACL;QACA,YAAY;YACV,GAAG,UAAU;YACb,yCAAyC;YACzC,cAAc;QAChB;QACA,kBAAkB;YAChB,cAAc,gBAAgB,MAAM,CAAC;YACrC,qBAAqB;YACrB,qBAAqB;YACrB,YAAY,cAAc;YAC1B,SAAS;0BACT;QACF;0BACA;2BACA;QACA,GAAG,UAAU;IACf;AACF","sources":["packages/@react-aria/searchfield/src/useSearchField.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 {AriaButtonProps} from '@react-types/button';\nimport {AriaSearchFieldProps} from '@react-types/searchfield';\nimport {chain} from '@react-aria/utils';\nimport {DOMAttributes, RefObject, ValidationResult} from '@react-types/shared';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {SearchFieldState} from '@react-stately/searchfield';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTextField} from '@react-aria/textfield';\n\nexport interface SearchFieldAria extends ValidationResult {\n /** Props for the text field's visible label element (if any). */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Props for the clear button. */\n clearButtonProps: AriaButtonProps,\n /** Props for the searchfield's description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the searchfield's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a search field.\n * @param props - Props for the search field.\n * @param state - State for the search field, as returned by `useSearchFieldState`.\n * @param inputRef - A ref to the input element.\n */\nexport function useSearchField(\n props: AriaSearchFieldProps,\n state: SearchFieldState,\n inputRef: RefObject<HTMLInputElement | null>\n): SearchFieldAria {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/searchfield');\n let {\n isDisabled,\n isReadOnly,\n onSubmit,\n onClear,\n type = 'search'\n } = props;\n\n let onKeyDown = (e) => {\n const key = e.key;\n\n if (key === 'Enter' && (isDisabled || isReadOnly)) {\n e.preventDefault();\n }\n\n if (isDisabled || isReadOnly) {\n return;\n }\n\n // for backward compatibility;\n // otherwise, \"Enter\" on an input would trigger a form submit, the default browser behavior\n if (key === 'Enter' && onSubmit) {\n e.preventDefault();\n onSubmit(state.value);\n }\n\n if (key === 'Escape') {\n // Also check the inputRef value for the case where the value was set directly on the input element instead of going through\n // the hook\n if (state.value === '' && (!inputRef.current || inputRef.current.value === '')) {\n e.continuePropagation();\n } else {\n e.preventDefault();\n state.setValue('');\n if (onClear) {\n onClear();\n }\n }\n }\n };\n\n let onClearButtonClick = () => {\n state.setValue('');\n\n if (onClear) {\n onClear();\n }\n };\n\n let onPressStart = () => {\n // this is in PressStart for mobile so that touching the clear button doesn't remove focus from\n // the input and close the keyboard\n inputRef.current?.focus();\n };\n\n let {labelProps, inputProps, descriptionProps, errorMessageProps, ...validation} = useTextField({\n ...props,\n value: state.value,\n onChange: state.setValue,\n onKeyDown: !isReadOnly ? chain(onKeyDown, props.onKeyDown) : props.onKeyDown,\n type\n }, inputRef);\n\n return {\n labelProps,\n inputProps: {\n ...inputProps,\n // already handled by useSearchFieldState\n defaultValue: undefined\n },\n clearButtonProps: {\n 'aria-label': stringFormatter.format('Clear search'),\n excludeFromTabOrder: true,\n preventFocusOnPress: true,\n isDisabled: isDisabled || isReadOnly,\n onPress: onClearButtonClick,\n onPressStart\n },\n descriptionProps,\n errorMessageProps,\n ...validation\n };\n}\n"],"names":[],"version":3,"file":"useSearchField.main.js.map"}
|
package/dist/useSearchField.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import $kTEqN$intlStringsmodulejs from "./intlStrings.mjs";
|
|
2
|
-
import {chain as $kTEqN$chain} from "@react-aria/utils";
|
|
3
|
-
import {useLocalizedStringFormatter as $kTEqN$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
4
|
-
import {useTextField as $kTEqN$useTextField} from "@react-aria/textfield";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function $parcel$interopDefault(a) {
|
|
8
|
-
return a && a.__esModule ? a.default : a;
|
|
9
|
-
}
|
|
10
|
-
/*
|
|
11
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
17
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
18
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19
|
-
* governing permissions and limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
function $4d52238874b24f86$export$9bb30bbe003b82e0(props, state, inputRef) {
|
|
25
|
-
let stringFormatter = (0, $kTEqN$useLocalizedStringFormatter)((0, ($parcel$interopDefault($kTEqN$intlStringsmodulejs))), '@react-aria/searchfield');
|
|
26
|
-
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit, onClear: onClear, type: type = 'search' } = props;
|
|
27
|
-
let onKeyDown = (e)=>{
|
|
28
|
-
const key = e.key;
|
|
29
|
-
if (key === 'Enter' && (isDisabled || isReadOnly)) e.preventDefault();
|
|
30
|
-
if (isDisabled || isReadOnly) return;
|
|
31
|
-
// for backward compatibility;
|
|
32
|
-
// otherwise, "Enter" on an input would trigger a form submit, the default browser behavior
|
|
33
|
-
if (key === 'Enter' && onSubmit) {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
onSubmit(state.value);
|
|
36
|
-
}
|
|
37
|
-
if (key === 'Escape') {
|
|
38
|
-
// Also check the inputRef value for the case where the value was set directly on the input element instead of going through
|
|
39
|
-
// the hook
|
|
40
|
-
if (state.value === '' && (!inputRef.current || inputRef.current.value === '')) e.continuePropagation();
|
|
41
|
-
else {
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
state.setValue('');
|
|
44
|
-
if (onClear) onClear();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
let onClearButtonClick = ()=>{
|
|
49
|
-
state.setValue('');
|
|
50
|
-
if (onClear) onClear();
|
|
51
|
-
};
|
|
52
|
-
let onPressStart = ()=>{
|
|
53
|
-
var // this is in PressStart for mobile so that touching the clear button doesn't remove focus from
|
|
54
|
-
// the input and close the keyboard
|
|
55
|
-
_inputRef_current;
|
|
56
|
-
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
57
|
-
};
|
|
58
|
-
let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $kTEqN$useTextField)({
|
|
59
|
-
...props,
|
|
60
|
-
value: state.value,
|
|
61
|
-
onChange: state.setValue,
|
|
62
|
-
onKeyDown: !isReadOnly ? (0, $kTEqN$chain)(onKeyDown, props.onKeyDown) : props.onKeyDown,
|
|
63
|
-
type: type
|
|
64
|
-
}, inputRef);
|
|
65
|
-
return {
|
|
66
|
-
labelProps: labelProps,
|
|
67
|
-
inputProps: {
|
|
68
|
-
...inputProps,
|
|
69
|
-
// already handled by useSearchFieldState
|
|
70
|
-
defaultValue: undefined
|
|
71
|
-
},
|
|
72
|
-
clearButtonProps: {
|
|
73
|
-
'aria-label': stringFormatter.format('Clear search'),
|
|
74
|
-
excludeFromTabOrder: true,
|
|
75
|
-
preventFocusOnPress: true,
|
|
76
|
-
isDisabled: isDisabled || isReadOnly,
|
|
77
|
-
onPress: onClearButtonClick,
|
|
78
|
-
onPressStart: onPressStart
|
|
79
|
-
},
|
|
80
|
-
descriptionProps: descriptionProps,
|
|
81
|
-
errorMessageProps: errorMessageProps,
|
|
82
|
-
...validation
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
export {$4d52238874b24f86$export$9bb30bbe003b82e0 as useSearchField};
|
|
88
|
-
//# sourceMappingURL=useSearchField.module.js.map
|