@react-aria/tag 3.3.2 → 3.4.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/ar-AE.main.js +7 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +9 -0
- package/dist/ar-AE.module.js +9 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +7 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +9 -0
- package/dist/bg-BG.module.js +9 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +7 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +9 -0
- package/dist/cs-CZ.module.js +9 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +7 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +9 -0
- package/dist/da-DK.module.js +9 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +7 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +9 -0
- package/dist/de-DE.module.js +9 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +7 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +9 -0
- package/dist/el-GR.module.js +9 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +7 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +9 -0
- package/dist/en-US.module.js +9 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +7 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +9 -0
- package/dist/es-ES.module.js +9 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +7 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +9 -0
- package/dist/et-EE.module.js +9 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +7 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +9 -0
- package/dist/fi-FI.module.js +9 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +7 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +9 -0
- package/dist/fr-FR.module.js +9 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +7 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +9 -0
- package/dist/he-IL.module.js +9 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +7 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +9 -0
- package/dist/hr-HR.module.js +9 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +7 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +9 -0
- package/dist/hu-HU.module.js +9 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +2 -427
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +7 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +9 -0
- package/dist/it-IT.module.js +9 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +7 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +9 -0
- package/dist/ja-JP.module.js +9 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +7 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +9 -0
- package/dist/ko-KR.module.js +9 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +7 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +9 -0
- package/dist/lt-LT.module.js +9 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +7 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +9 -0
- package/dist/lv-LV.module.js +9 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +4 -429
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -427
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +7 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +9 -0
- package/dist/nb-NO.module.js +9 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +7 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +9 -0
- package/dist/nl-NL.module.js +9 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +7 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +9 -0
- package/dist/pl-PL.module.js +9 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +7 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +9 -0
- package/dist/pt-BR.module.js +9 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +7 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +9 -0
- package/dist/pt-PT.module.js +9 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +7 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +9 -0
- package/dist/ro-RO.module.js +9 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +7 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +9 -0
- package/dist/ru-RU.module.js +9 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +7 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +9 -0
- package/dist/sk-SK.module.js +9 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +7 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +9 -0
- package/dist/sl-SI.module.js +9 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +7 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +9 -0
- package/dist/sr-SP.module.js +9 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +7 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +9 -0
- package/dist/sv-SE.module.js +9 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +7 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +9 -0
- package/dist/tr-TR.module.js +9 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +7 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +9 -0
- package/dist/uk-UA.module.js +9 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useTag.main.js +88 -0
- package/dist/useTag.main.js.map +1 -0
- package/dist/useTag.mjs +83 -0
- package/dist/useTag.module.js +83 -0
- package/dist/useTag.module.js.map +1 -0
- package/dist/useTagGroup.main.js +89 -0
- package/dist/useTagGroup.main.js.map +1 -0
- package/dist/useTagGroup.mjs +83 -0
- package/dist/useTagGroup.module.js +83 -0
- package/dist/useTagGroup.module.js.map +1 -0
- package/dist/zh-CN.main.js +7 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +9 -0
- package/dist/zh-CN.module.js +9 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +7 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +9 -0
- package/dist/zh-TW.module.js +9 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/package.json +11 -11
- package/src/useTagGroup.ts +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,QAAQ,CAAC;IACjD,qBAAqB,CAAC,iCAAiC,CAAC;AAC1D","sources":["packages/@react-aria/tag/intl/pt-PT.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n"],"names":[],"version":3,"file":"pt-PT.main.js.map"}
|
package/dist/pt-PT.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,QAAQ,CAAC;IACjD,qBAAqB,CAAC,iCAAiC,CAAC;AAC1D","sources":["packages/@react-aria/tag/intl/pt-PT.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n"],"names":[],"version":3,"file":"pt-PT.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,0BAAW,CAAC;IACpD,qBAAqB,CAAC,yEAAuD,CAAC;AAChF","sources":["packages/@react-aria/tag/intl/ro-RO.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n"],"names":[],"version":3,"file":"ro-RO.main.js.map"}
|
package/dist/ro-RO.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $d8c38c691b006187$exports = {};
|
|
2
|
+
$d8c38c691b006187$exports = {
|
|
3
|
+
"removeButtonLabel": `\xcendep\u{103}rta\u{163}i`,
|
|
4
|
+
"removeDescription": `Ap\u{103}sa\u{21B}i pe Delete (\u{218}tergere) pentru a elimina eticheta.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$d8c38c691b006187$exports as default};
|
|
9
|
+
//# sourceMappingURL=ro-RO.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $d8c38c691b006187$exports = {};
|
|
2
|
+
$d8c38c691b006187$exports = {
|
|
3
|
+
"removeButtonLabel": `\xcendep\u{103}rta\u{163}i`,
|
|
4
|
+
"removeDescription": `Ap\u{103}sa\u{21B}i pe Delete (\u{218}tergere) pentru a elimina eticheta.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$d8c38c691b006187$exports as default};
|
|
9
|
+
//# sourceMappingURL=ro-RO.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,0BAAW,CAAC;IACpD,qBAAqB,CAAC,yEAAuD,CAAC;AAChF","sources":["packages/@react-aria/tag/intl/ro-RO.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"removeButtonLabel": `\u{423}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C}`,
|
|
3
|
+
"removeDescription": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} DELETE, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{443}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C} \u{442}\u{435}\u{433}.`
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=ru-RU.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,iDAAO,CAAC;IAChD,qBAAqB,CAAC,sKAAkC,CAAC;AAC3D","sources":["packages/@react-aria/tag/intl/ru-RU.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n"],"names":[],"version":3,"file":"ru-RU.main.js.map"}
|
package/dist/ru-RU.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $ed9b4bf7ce1fb1d7$exports = {};
|
|
2
|
+
$ed9b4bf7ce1fb1d7$exports = {
|
|
3
|
+
"removeButtonLabel": `\u{423}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C}`,
|
|
4
|
+
"removeDescription": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} DELETE, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{443}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C} \u{442}\u{435}\u{433}.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$ed9b4bf7ce1fb1d7$exports as default};
|
|
9
|
+
//# sourceMappingURL=ru-RU.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $ed9b4bf7ce1fb1d7$exports = {};
|
|
2
|
+
$ed9b4bf7ce1fb1d7$exports = {
|
|
3
|
+
"removeButtonLabel": `\u{423}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C}`,
|
|
4
|
+
"removeDescription": `\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} DELETE, \u{447}\u{442}\u{43E}\u{431}\u{44B} \u{443}\u{434}\u{430}\u{43B}\u{438}\u{442}\u{44C} \u{442}\u{435}\u{433}.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$ed9b4bf7ce1fb1d7$exports as default};
|
|
9
|
+
//# sourceMappingURL=ru-RU.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,iDAAO,CAAC;IAChD,qBAAqB,CAAC,sKAAkC,CAAC;AAC3D","sources":["packages/@react-aria/tag/intl/ru-RU.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,kBAAS,CAAC;IAClD,qBAAqB,CAAC,0EAAkD,CAAC;AAC3E","sources":["packages/@react-aria/tag/intl/sk-SK.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
|
package/dist/sk-SK.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $51d8721afda4d678$exports = {};
|
|
2
|
+
$51d8721afda4d678$exports = {
|
|
3
|
+
"removeButtonLabel": `Odstr\xe1ni\u{165}`,
|
|
4
|
+
"removeDescription": `Ak chcete odstr\xe1ni\u{165} zna\u{10D}ku, stla\u{10D}te kl\xe1ves Delete.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$51d8721afda4d678$exports as default};
|
|
9
|
+
//# sourceMappingURL=sk-SK.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $51d8721afda4d678$exports = {};
|
|
2
|
+
$51d8721afda4d678$exports = {
|
|
3
|
+
"removeButtonLabel": `Odstr\xe1ni\u{165}`,
|
|
4
|
+
"removeDescription": `Ak chcete odstr\xe1ni\u{165} zna\u{10D}ku, stla\u{10D}te kl\xe1ves Delete.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$51d8721afda4d678$exports as default};
|
|
9
|
+
//# sourceMappingURL=sk-SK.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,kBAAS,CAAC;IAClD,qBAAqB,CAAC,0EAAkD,CAAC;AAC3E","sources":["packages/@react-aria/tag/intl/sk-SK.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n"],"names":[],"version":3,"file":"sk-SK.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,QAAQ,CAAC;IACjD,qBAAqB,CAAC,wCAAwC,CAAC;AACjE","sources":["packages/@react-aria/tag/intl/sl-SI.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
|
package/dist/sl-SI.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $fd37a27baae493e8$exports = {};
|
|
2
|
+
$fd37a27baae493e8$exports = {
|
|
3
|
+
"removeButtonLabel": `Odstrani`,
|
|
4
|
+
"removeDescription": `Pritisnite Delete, da odstranite oznako.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$fd37a27baae493e8$exports as default};
|
|
9
|
+
//# sourceMappingURL=sl-SI.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,QAAQ,CAAC;IACjD,qBAAqB,CAAC,wCAAwC,CAAC;AACjE","sources":["packages/@react-aria/tag/intl/sl-SI.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,MAAM,CAAC;IAC/C,qBAAqB,CAAC,iDAA2C,CAAC;AACpE","sources":["packages/@react-aria/tag/intl/sr-SP.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
|
package/dist/sr-SP.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $5505a1ca71ffd6f4$exports = {};
|
|
2
|
+
$5505a1ca71ffd6f4$exports = {
|
|
3
|
+
"removeButtonLabel": `Ukloni`,
|
|
4
|
+
"removeDescription": `Pritisnite Obri\u{161}i da biste uklonili oznaku.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$5505a1ca71ffd6f4$exports as default};
|
|
9
|
+
//# sourceMappingURL=sr-SP.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $5505a1ca71ffd6f4$exports = {};
|
|
2
|
+
$5505a1ca71ffd6f4$exports = {
|
|
3
|
+
"removeButtonLabel": `Ukloni`,
|
|
4
|
+
"removeDescription": `Pritisnite Obri\u{161}i da biste uklonili oznaku.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$5505a1ca71ffd6f4$exports as default};
|
|
9
|
+
//# sourceMappingURL=sr-SP.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,MAAM,CAAC;IAC/C,qBAAqB,CAAC,iDAA2C,CAAC;AACpE","sources":["packages/@react-aria/tag/intl/sr-SP.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,OAAO,CAAC;IAChD,qBAAqB,CAAC,6CAAuC,CAAC;AAChE","sources":["packages/@react-aria/tag/intl/sv-SE.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
|
package/dist/sv-SE.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $33670e148c84ad02$exports = {};
|
|
2
|
+
$33670e148c84ad02$exports = {
|
|
3
|
+
"removeButtonLabel": `Ta bort`,
|
|
4
|
+
"removeDescription": `Tryck p\xe5 Radera f\xf6r att ta bort taggen.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$33670e148c84ad02$exports as default};
|
|
9
|
+
//# sourceMappingURL=sv-SE.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $33670e148c84ad02$exports = {};
|
|
2
|
+
$33670e148c84ad02$exports = {
|
|
3
|
+
"removeButtonLabel": `Ta bort`,
|
|
4
|
+
"removeDescription": `Tryck p\xe5 Radera f\xf6r att ta bort taggen.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$33670e148c84ad02$exports as default};
|
|
9
|
+
//# sourceMappingURL=sv-SE.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,OAAO,CAAC;IAChD,qBAAqB,CAAC,6CAAuC,CAAC;AAChE","sources":["packages/@react-aria/tag/intl/sv-SE.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,YAAM,CAAC;IAC/C,qBAAqB,CAAC,6DAAwC,CAAC;AACjE","sources":["packages/@react-aria/tag/intl/tr-TR.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
|
package/dist/tr-TR.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $0bf46fdcdd7cb5f6$exports = {};
|
|
2
|
+
$0bf46fdcdd7cb5f6$exports = {
|
|
3
|
+
"removeButtonLabel": `Kald\u{131}r`,
|
|
4
|
+
"removeDescription": `Etiketi kald\u{131}rmak i\xe7in Sil tu\u{15F}una bas\u{131}n.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$0bf46fdcdd7cb5f6$exports as default};
|
|
9
|
+
//# sourceMappingURL=tr-TR.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $0bf46fdcdd7cb5f6$exports = {};
|
|
2
|
+
$0bf46fdcdd7cb5f6$exports = {
|
|
3
|
+
"removeButtonLabel": `Kald\u{131}r`,
|
|
4
|
+
"removeDescription": `Etiketi kald\u{131}rmak i\xe7in Sil tu\u{15F}una bas\u{131}n.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$0bf46fdcdd7cb5f6$exports as default};
|
|
9
|
+
//# sourceMappingURL=tr-TR.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,YAAM,CAAC;IAC/C,qBAAqB,CAAC,6DAAwC,CAAC;AACjE","sources":["packages/@react-aria/tag/intl/tr-TR.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAsBA;IACE,0CAA0C;IAC1C,SAAS,EAAE,aAAa,CAAC;IACzB,wDAAwD;IACxD,UAAU,EAAE,aAAa,CAAC;IAC1B,2DAA2D;IAC3D,gBAAgB,EAAE,aAAa,CAAC;IAChC,6DAA6D;IAC7D,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED,mCAAmC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC;IAClK,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpC,sCAAsC;IACtC,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED,8BAAqC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,UAAU,CAAC;IACpF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC;AAQD;;;;;;GAMG;AACH,4BAA4B,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,YAAY,
|
|
1
|
+
{"mappings":";;;;;AAsBA;IACE,0CAA0C;IAC1C,SAAS,EAAE,aAAa,CAAC;IACzB,wDAAwD;IACxD,UAAU,EAAE,aAAa,CAAC;IAC1B,2DAA2D;IAC3D,gBAAgB,EAAE,aAAa,CAAC;IAChC,6DAA6D;IAC7D,iBAAiB,EAAE,aAAa,CAAA;CACjC;AAED,mCAAmC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC;IAClK,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpC,sCAAsC;IACtC,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED,8BAAqC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,UAAU,CAAC;IACpF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC;AAQD;;;;;;GAMG;AACH,4BAA4B,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,YAAY,CAoD5H;ACzFD,wBAAyB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC;IACtE,qCAAqC;IACrC,QAAQ,EAAE,aAAa,CAAC;IACxB,sCAAsC;IACtC,aAAa,EAAE,aAAa,CAAC;IAC7B,uCAAuC;IACvC,iBAAiB,EAAE,eAAe,CAAC;IACnC,sCAAsC;IACtC,cAAc,EAAE,OAAO,CAAA;CACxB;AAED,8BAA8B,CAAC;IAC7B,mGAAmG;IACnG,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;CACd;AAED;;;;;GAKG;AACH,uBAAuB,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,OAAO,CAyDhH","sources":["packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/index.ts"],"sourcesContent":[null,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 {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, TagAria} from './useTag';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"removeButtonLabel": `\u{412}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438}`,
|
|
3
|
+
"removeDescription": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Delete, \u{449}\u{43E}\u{431} \u{432}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438} \u{442}\u{435}\u{433}.`
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=uk-UA.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,wDAAQ,CAAC;IACjD,qBAAqB,CAAC,6KAAmC,CAAC;AAC5D","sources":["packages/@react-aria/tag/intl/uk-UA.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
|
package/dist/uk-UA.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $9d9765222bc08ca2$exports = {};
|
|
2
|
+
$9d9765222bc08ca2$exports = {
|
|
3
|
+
"removeButtonLabel": `\u{412}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438}`,
|
|
4
|
+
"removeDescription": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Delete, \u{449}\u{43E}\u{431} \u{432}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438} \u{442}\u{435}\u{433}.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$9d9765222bc08ca2$exports as default};
|
|
9
|
+
//# sourceMappingURL=uk-UA.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $9d9765222bc08ca2$exports = {};
|
|
2
|
+
$9d9765222bc08ca2$exports = {
|
|
3
|
+
"removeButtonLabel": `\u{412}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438}`,
|
|
4
|
+
"removeDescription": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Delete, \u{449}\u{43E}\u{431} \u{432}\u{438}\u{43B}\u{443}\u{447}\u{438}\u{442}\u{438} \u{442}\u{435}\u{433}.`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$9d9765222bc08ca2$exports as default};
|
|
9
|
+
//# sourceMappingURL=uk-UA.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,wDAAQ,CAAC;IACjD,qBAAqB,CAAC,6KAAmC,CAAC;AAC5D","sources":["packages/@react-aria/tag/intl/uk-UA.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var $09704b0efefe5140$exports = require("./useTagGroup.main.js");
|
|
2
|
+
var $b6a2538ff098a9ff$exports = require("./intlStrings.main.js");
|
|
3
|
+
var $8p8DL$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $8p8DL$reactariagridlist = require("@react-aria/gridlist");
|
|
5
|
+
var $8p8DL$reactariainteractions = require("@react-aria/interactions");
|
|
6
|
+
var $8p8DL$reactariai18n = require("@react-aria/i18n");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "useTag", () => $a442534c81d8ad16$export$3f568fff7dff2f03);
|
|
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
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
35
|
+
let { item: item } = props;
|
|
36
|
+
let stringFormatter = (0, $8p8DL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b6a2538ff098a9ff$exports))), "@react-aria/tag");
|
|
37
|
+
let buttonId = (0, $8p8DL$reactariautils.useId)();
|
|
38
|
+
let { onRemove: onRemove } = (0, $09704b0efefe5140$exports.hookData).get(state) || {};
|
|
39
|
+
let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $8p8DL$reactariagridlist.useGridListItem)({
|
|
40
|
+
node: item
|
|
41
|
+
}, state, ref);
|
|
42
|
+
// We want the group to handle keyboard navigation between tags.
|
|
43
|
+
delete rowProps.onKeyDownCapture;
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
+
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
46
|
+
let onKeyDown = (e)=>{
|
|
47
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
50
|
+
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
51
|
+
item.key
|
|
52
|
+
]));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
let modality = (0, $8p8DL$reactariainteractions.useInteractionModality)();
|
|
56
|
+
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
|
|
57
|
+
let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
|
|
58
|
+
let descProps = (0, $8p8DL$reactariautils.useDescription)(description);
|
|
59
|
+
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
60
|
+
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
61
|
+
let domProps = (0, $8p8DL$reactariautils.filterDOMProps)(item.props);
|
|
62
|
+
let linkProps = (0, $8p8DL$reactariautils.getSyntheticLinkProps)(item.props);
|
|
63
|
+
return {
|
|
64
|
+
removeButtonProps: {
|
|
65
|
+
"aria-label": stringFormatter.format("removeButtonLabel"),
|
|
66
|
+
"aria-labelledby": `${buttonId} ${rowProps.id}`,
|
|
67
|
+
id: buttonId,
|
|
68
|
+
onPress: ()=>onRemove ? onRemove(new Set([
|
|
69
|
+
item.key
|
|
70
|
+
])) : null,
|
|
71
|
+
excludeFromTabOrder: true
|
|
72
|
+
},
|
|
73
|
+
rowProps: (0, $8p8DL$reactariautils.mergeProps)(rowProps, domProps, linkProps, {
|
|
74
|
+
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
75
|
+
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
76
|
+
"aria-describedby": descProps["aria-describedby"]
|
|
77
|
+
}),
|
|
78
|
+
gridCellProps: (0, $8p8DL$reactariautils.mergeProps)(gridCellProps, {
|
|
79
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
80
|
+
"aria-label": props["aria-label"]
|
|
81
|
+
}),
|
|
82
|
+
...stateWithoutDescription,
|
|
83
|
+
allowsRemoving: !!onRemove
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=useTag.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAsCM,SAAS,0CAAU,KAAsB,EAAE,KAAmB,EAAE,GAAgC;IACrG,IAAI,QAAC,IAAI,EAAC,GAAG;IACb,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,WAAW,CAAA,GAAA,2BAAI;IAEnB,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,kCAAO,EAAE,GAAG,CAAC,UAAU,CAAC;IACzC,IAAI,YAAC,QAAQ,iBAAE,aAAa,EAAE,GAAG,QAAO,GAAG,CAAA,GAAA,wCAAc,EAAE;QACzD,MAAM;IACR,GAAG,OAAO;IAEV,gEAAgE;IAChE,OAAO,SAAS,gBAAgB;IAChC,6DAA6D;IAC7D,IAAI,EAAC,kBAAkB,CAAC,EAAE,GAAG,yBAAwB,GAAG;IAExD,IAAI,YAAY,CAAC;QACf,IAAI,EAAE,GAAG,KAAK,YAAY,EAAE,GAAG,KAAK,aAAa;YAC/C,EAAE,cAAc;YAChB,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC,KAAK,GAAG,GAC5C,qBAAA,+BAAA,SAAW,IAAI,IAAI,MAAM,gBAAgB,CAAC,YAAY;iBAEtD,qBAAA,+BAAA,SAAW,IAAI,IAAI;gBAAC,KAAK,GAAG;aAAC;QAEjC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mDAAqB;IACpC,IAAI,aAAa,aAAe,OAAO,WAAW,eAAe,kBAAkB,QACjF,WAAW;IAEb,IAAI,cAAc,YAAa,CAAA,aAAa,cAAc,aAAa,SAAQ,IAAK,gBAAgB,MAAM,CAAC,uBAAuB;IAClI,IAAI,YAAY,CAAA,GAAA,oCAAa,EAAE;IAE/B,IAAI,YAAY,KAAK,GAAG,KAAK,MAAM,gBAAgB,CAAC,UAAU;IAC9D,sEAAsE;IACtE,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,KAAK,KAAK;IACxC,IAAI,YAAY,CAAA,GAAA,2CAAoB,EAAE,KAAK,KAAK;IAChD,OAAO;QACL,mBAAmB;YACjB,cAAc,gBAAgB,MAAM,CAAC;YACrC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YAC/C,IAAI;YACJ,SAAS,IAAM,WAAW,SAAS,IAAI,IAAI;oBAAC,KAAK,GAAG;iBAAC,KAAK;YAC1D,qBAAqB;QACvB;QACA,UAAU,CAAA,GAAA,gCAAS,EAAE,UAAU,UAAU,WAAW;YAClD,UAAU,AAAC,aAAa,MAAM,gBAAgB,CAAC,UAAU,IAAI,OAAQ,IAAI;YACzE,WAAW,WAAW,YAAY;YAClC,oBAAoB,SAAS,CAAC,mBAAmB;QACnD;QACA,eAAe,CAAA,GAAA,gCAAS,EAAE,eAAe;YACvC,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,uBAAuB;QAC1B,gBAAgB,CAAC,CAAC;IACpB;AACF","sources":["packages/@react-aria/tag/src/useTag.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 {DOMAttributes, FocusableElement, Node} from '@react-types/shared';\nimport {filterDOMProps, getSyntheticLinkProps, mergeProps, useDescription, useId} from '@react-aria/utils';\nimport {hookData} from './useTagGroup';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {ListState} from '@react-stately/list';\nimport {SelectableItemStates} from '@react-aria/selection';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria extends Omit<SelectableItemStates, 'hasAction'> {\n /** Props for the tag row element. */\n rowProps: DOMAttributes,\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes,\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps,\n /** Whether the tag can be removed. */\n allowsRemoving: boolean\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag component.\n * @param props - Props to be applied to the tag.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: AriaTagProps<T>, state: ListState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {descriptionProps: _, ...stateWithoutDescription} = states;\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace') {\n e.preventDefault();\n if (state.selectionManager.isSelected(item.key)) {\n onRemove?.(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove?.(new Set([item.key]));\n }\n }\n };\n\n let modality = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'pointer';\n }\n let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';\n let descProps = useDescription(description);\n\n let isFocused = item.key === state.selectionManager.focusedKey;\n // @ts-ignore - data attributes are ok but TS doesn't know about them.\n let domProps = filterDOMProps(item.props);\n let linkProps = getSyntheticLinkProps(item.props);\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n id: buttonId,\n onPress: () => onRemove ? onRemove(new Set([item.key])) : null,\n excludeFromTabOrder: true\n },\n rowProps: mergeProps(rowProps, domProps, linkProps, {\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: onRemove ? onKeyDown : undefined,\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...stateWithoutDescription,\n allowsRemoving: !!onRemove\n };\n}\n"],"names":[],"version":3,"file":"useTag.main.js.map"}
|
package/dist/useTag.mjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {hookData as $d7323bca8d074eeb$export$653eddfc964b0f8a} from "./useTagGroup.mjs";
|
|
2
|
+
import $ioKwR$intlStringsmodulejs from "./intlStrings.mjs";
|
|
3
|
+
import {useId as $ioKwR$useId, useDescription as $ioKwR$useDescription, filterDOMProps as $ioKwR$filterDOMProps, getSyntheticLinkProps as $ioKwR$getSyntheticLinkProps, mergeProps as $ioKwR$mergeProps} from "@react-aria/utils";
|
|
4
|
+
import {useGridListItem as $ioKwR$useGridListItem} from "@react-aria/gridlist";
|
|
5
|
+
import {useInteractionModality as $ioKwR$useInteractionModality} from "@react-aria/interactions";
|
|
6
|
+
import {useLocalizedStringFormatter as $ioKwR$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
29
|
+
let { item: item } = props;
|
|
30
|
+
let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), "@react-aria/tag");
|
|
31
|
+
let buttonId = (0, $ioKwR$useId)();
|
|
32
|
+
let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
|
|
33
|
+
let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $ioKwR$useGridListItem)({
|
|
34
|
+
node: item
|
|
35
|
+
}, state, ref);
|
|
36
|
+
// We want the group to handle keyboard navigation between tags.
|
|
37
|
+
delete rowProps.onKeyDownCapture;
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
+
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
40
|
+
let onKeyDown = (e)=>{
|
|
41
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
44
|
+
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
45
|
+
item.key
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
let modality = (0, $ioKwR$useInteractionModality)();
|
|
50
|
+
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "pointer";
|
|
51
|
+
let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
|
|
52
|
+
let descProps = (0, $ioKwR$useDescription)(description);
|
|
53
|
+
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
54
|
+
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
55
|
+
let domProps = (0, $ioKwR$filterDOMProps)(item.props);
|
|
56
|
+
let linkProps = (0, $ioKwR$getSyntheticLinkProps)(item.props);
|
|
57
|
+
return {
|
|
58
|
+
removeButtonProps: {
|
|
59
|
+
"aria-label": stringFormatter.format("removeButtonLabel"),
|
|
60
|
+
"aria-labelledby": `${buttonId} ${rowProps.id}`,
|
|
61
|
+
id: buttonId,
|
|
62
|
+
onPress: ()=>onRemove ? onRemove(new Set([
|
|
63
|
+
item.key
|
|
64
|
+
])) : null,
|
|
65
|
+
excludeFromTabOrder: true
|
|
66
|
+
},
|
|
67
|
+
rowProps: (0, $ioKwR$mergeProps)(rowProps, domProps, linkProps, {
|
|
68
|
+
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
69
|
+
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
70
|
+
"aria-describedby": descProps["aria-describedby"]
|
|
71
|
+
}),
|
|
72
|
+
gridCellProps: (0, $ioKwR$mergeProps)(gridCellProps, {
|
|
73
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
74
|
+
"aria-label": props["aria-label"]
|
|
75
|
+
}),
|
|
76
|
+
...stateWithoutDescription,
|
|
77
|
+
allowsRemoving: !!onRemove
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
export {$fc6126c82a4601f1$export$3f568fff7dff2f03 as useTag};
|
|
83
|
+
//# sourceMappingURL=useTag.mjs.map
|