@react-aria/tag 3.0.0-rc.0 → 3.1.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 +91 -117
- package/dist/main.js +88 -115
- package/dist/main.js.map +1 -1
- package/dist/module.js +91 -117
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +35 -39
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -13
- package/src/index.ts +0 -2
- package/src/useTag.ts +39 -36
- package/src/useTagGroup.ts +51 -16
- package/src/TagKeyboardDelegate.ts +0 -79
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED,AAGO,MAAM;IASX,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW;IACpC;IAEA,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU;IACnC;IAEA,cAAc,GAAQ,EAAE;QACtB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,aAAa,GAAQ,EAAE;QACrB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,YAAY,GAAG,EAAE;QACf,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,WACH;QAGF,qBAAqB;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAElC,IAAI,OAAO,IAAI,EACb,OAAO;aAEP,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW;IAEtC;IAEA,YAAY,GAAG,EAAE;QACf,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,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CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE,KAAK;IACpD,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAc,AAAD,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO;QACL,WAAW,CAAA,GAAA,gCAAU,AAAD,EAAE,WAAW,UAAU;YACzC,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,SAAS,IAAI;YAC3C,eAAe,KAAK;YACpB,iBAAiB;YACjB,aAAa,gBAAgB,WAAW,KAAK;YAC7C,GAAG,gBAAgB;YACnB,GAAG,UAAU;QACf;oBACA;0BACA;2BACA;IACF;AACF;;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.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 {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, TagAria} from './useTag';\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 {Collection, Direction, KeyboardDelegate} from '@react-types/shared';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> implements KeyboardDelegate {\n private collection: Collection<T>;\n private direction: Direction;\n\n constructor(collection: Collection<T>, direction: Direction) {\n this.collection = collection;\n this.direction = direction;\n }\n\n getFirstKey() {\n return this.collection.getFirstKey();\n }\n\n getLastKey() {\n return this.collection.getLastKey();\n }\n \n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the next item\n key = this.collection.getKeyAfter(key);\n\n if (key != null) {\n return key;\n } else {\n return this.collection.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the previous item\n key = this.collection.getKeyBefore(key);\n if (key != null) {\n return key;\n } else {\n return this.collection.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaLabelingProps, DOMAttributes, DOMProps, FocusableElement} from '@react-types/shared';\nimport {chain, filterDOMProps, mergeProps, useDescription, useId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagProps} from '@react-types/tag';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n /** Props for the tag visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes,\n /** Props for the tag row element. */\n rowProps: DOMAttributes,\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps\n}\n\nexport interface AriaTagProps<T> extends TagProps<T>, DOMProps, AriaLabelingProps {}\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 `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: AriaTagProps<T>, state: TagGroupState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {\n allowsRemoving,\n item\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let labelId = useId();\n let buttonId = useId();\n\n let {rowProps, gridCellProps} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n\n let onRemove = chain(props.onRemove, state.onRemove);\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace') {\n onRemove(item.key);\n e.preventDefault();\n }\n };\n\n let modality: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\n }\n let description = allowsRemoving && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';\n let descProps = useDescription(description);\n\n let domProps = filterDOMProps(props);\n let isFocused = item.key === state.selectionManager.focusedKey;\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel', {label: item.textValue}),\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId,\n onPress: () => allowsRemoving && onRemove ? onRemove(item.key) : null,\n excludeFromTabOrder: true\n },\n labelProps: {\n id: labelId\n },\n rowProps: {\n ...rowProps,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: allowsRemoving ? onKeyDown : null,\n 'aria-describedby': descProps['aria-describedby']\n },\n gridCellProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"removeButtonLabel\": \"إزالة\",\n \"removeDescription\": \"اضغط على مفتاح DELETE لإزالة علامة.\"\n}\n","{\n \"removeButtonLabel\": \"Премахване\",\n \"removeDescription\": \"Натиснете Delete, за да премахнете маркера.\"\n}\n","{\n \"removeButtonLabel\": \"Odebrat\",\n \"removeDescription\": \"Stisknutím klávesy Delete odeberete značku.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Tryk på Slet for at fjerne tag.\"\n}\n","{\n \"removeButtonLabel\": \"Entfernen\",\n \"removeDescription\": \"Auf „Löschen“ drücken, um das Tag zu entfernen.\"\n}\n","{\n \"removeButtonLabel\": \"Κατάργηση\",\n \"removeDescription\": \"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"removeDescription\": \"Press Delete to remove tag.\",\n \"removeButtonLabel\": \"Remove\"\n}\n","{\n \"removeButtonLabel\": \"Quitar\",\n \"removeDescription\": \"Pulse Eliminar para quitar la etiqueta.\"\n}\n","{\n \"removeButtonLabel\": \"Eemalda\",\n \"removeDescription\": \"Sildi eemaldamiseks vajutage kustutusklahvi Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Poista\",\n \"removeDescription\": \"Poista tunniste painamalla Poista-painiketta.\"\n}\n","{\n \"removeButtonLabel\": \"Supprimer\",\n \"removeDescription\": \"Appuyez sur Supprimer pour supprimer l’étiquette.\"\n}\n","{\n \"removeButtonLabel\": \"הסר\",\n \"removeDescription\": \"לחץ על מחק כדי להסיר תג.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Delete za uklanjanje oznake.\"\n}\n","{\n \"removeButtonLabel\": \"Eltávolítás\",\n \"removeDescription\": \"Nyomja meg a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"removeButtonLabel\": \"Rimuovi\",\n \"removeDescription\": \"Premi Elimina per rimuovere il tag.\"\n}\n","{\n \"removeButtonLabel\": \"削除\",\n \"removeDescription\": \"タグを削除するには、Delete キーを押します。\"\n}\n","{\n \"removeButtonLabel\": \"제거\",\n \"removeDescription\": \"태그를 제거하려면 Delete 키를 누르십시오.\"\n}\n","{\n \"removeButtonLabel\": \"Pašalinti\",\n \"removeDescription\": \"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.\"\n}\n","{\n \"removeButtonLabel\": \"Noņemt\",\n \"removeDescription\": \"Nospiediet Delete [Dzēst], lai noņemtu tagu.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Trykk på Slett for å fjerne taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Verwijderen\",\n \"removeDescription\": \"Druk op Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"removeButtonLabel\": \"Usuń\",\n \"removeDescription\": \"Naciśnij Usuń, aby usunąć znacznik.\"\n}\n","{\n \"removeButtonLabel\": \"Remover\",\n \"removeDescription\": \"Pressione Delete para remover a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n","{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n","{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n","{\n \"removeButtonLabel\": \"删除\",\n \"removeDescription\": \"按下“删除”以删除标记。\"\n}\n","{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\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 {AriaLabelingProps, DOMAttributes, DOMProps, Validation} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {RefObject, useState} from 'react';\nimport {TagGroupProps} from '@react-types/tag';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useGridList} from '@react-aria/gridlist';\nimport {useLocale} from '@react-aria/i18n';\n\nexport interface TagGroupAria {\n /** Props for the tag grouping element. */\n gridProps: DOMAttributes,\n /** Props for the tag group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the tag group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\nexport interface AriaTagGroupProps<T> extends TagGroupProps<T>, DOMProps, AriaLabelingProps, Validation {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: TagKeyboardDelegate<T>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, or other items, with support for keyboard navigation and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupProps<T>, state: TagGroupState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new TagKeyboardDelegate(state.collection, direction);\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField(props);\n let {gridProps} = useGridList({...props, ...fieldProps, keyboardDelegate}, state, ref);\n\n // Don't want the grid to be focusable or accessible via keyboard\n delete gridProps.tabIndex;\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n gridProps: mergeProps(gridProps, domProps, {\n role: state.collection.size ? 'grid' : null,\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps,\n ...fieldProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps\n };\n}\n"],"names":[],"version":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CAAA,GAAA,gCAAS,EAAE,UAAU,UAAU;YACvC,UAAU,AAAC,aAAa,MAAM,iBAAiB,cAAc,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,MAAM;QACT,gBAAgB,CAAC,CAAC;IACpB;AACF;;CD7FC","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json"],"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 {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, TagAria} from './useTag';\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 {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, FocusableElement, Node} from '@react-types/shared';\nimport {filterDOMProps, 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);\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 delete states.descriptionProps;\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: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\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(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, {\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 ...states,\n allowsRemoving: !!onRemove\n };\n}\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 {AriaLabelingProps, CollectionBase, DOMAttributes, DOMProps, HelpTextProps, KeyboardDelegate, LabelableProps, MultipleSelection, SelectionBehavior} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject, useEffect, useRef, useState} from 'react';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport type {ListState} from '@react-stately/list';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useGridList} from '@react-aria/gridlist';\nimport {useLocale} from '@react-aria/i18n';\n\nexport interface TagGroupAria {\n /** Props for the tag grouping element. */\n gridProps: DOMAttributes,\n /** Props for the tag group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the tag group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\nexport interface AriaTagGroupProps<T> extends CollectionBase<T>, MultipleSelection, DOMProps, LabelableProps, AriaLabelingProps, HelpTextProps {\n /** How multiple selection should behave in the collection. */\n selectionBehavior?: SelectionBehavior,\n /** Handler that is called when a user deletes a tag. */\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport interface AriaTagGroupOptions<T> extends Omit<AriaTagGroupProps<T>, 'children'> {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\ninterface HookData {\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport const hookData = new WeakMap<ListState<any>, HookData>();\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new ListKeyboardDelegate({\n collection: state.collection,\n ref,\n orientation: 'horizontal',\n direction,\n disabledKeys: state.disabledKeys\n });\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span'\n });\n let {gridProps} = useGridList({\n ...props,\n ...fieldProps,\n keyboardDelegate,\n shouldFocusWrap: true\n }, state, ref);\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n\n // If the last tag is removed, focus the container.\n let prevCount = useRef(state.collection.size);\n useEffect(() => {\n if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) {\n ref.current.focus();\n }\n prevCount.current = state.collection.size;\n }, [state.collection.size, isFocusWithin, ref]);\n\n hookData.set(state, {onRemove: props.onRemove});\n\n return {\n gridProps: mergeProps(gridProps, domProps, {\n role: state.collection.size ? 'grid' : null,\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps,\n ...fieldProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps\n };\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"removeButtonLabel\": \"إزالة\",\n \"removeDescription\": \"اضغط على مفتاح DELETE لإزالة علامة.\"\n}\n","{\n \"removeButtonLabel\": \"Премахване\",\n \"removeDescription\": \"Натиснете Delete, за да премахнете маркера.\"\n}\n","{\n \"removeButtonLabel\": \"Odebrat\",\n \"removeDescription\": \"Stisknutím klávesy Delete odeberete značku.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Tryk på Slet for at fjerne tag.\"\n}\n","{\n \"removeButtonLabel\": \"Entfernen\",\n \"removeDescription\": \"Auf „Löschen“ drücken, um das Tag zu entfernen.\"\n}\n","{\n \"removeButtonLabel\": \"Κατάργηση\",\n \"removeDescription\": \"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"removeDescription\": \"Press Delete to remove tag.\",\n \"removeButtonLabel\": \"Remove\"\n}\n","{\n \"removeButtonLabel\": \"Quitar\",\n \"removeDescription\": \"Pulse Eliminar para quitar la etiqueta.\"\n}\n","{\n \"removeButtonLabel\": \"Eemalda\",\n \"removeDescription\": \"Sildi eemaldamiseks vajutage kustutusklahvi Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Poista\",\n \"removeDescription\": \"Poista tunniste painamalla Poista-painiketta.\"\n}\n","{\n \"removeButtonLabel\": \"Supprimer\",\n \"removeDescription\": \"Appuyez sur Supprimer pour supprimer l’étiquette.\"\n}\n","{\n \"removeButtonLabel\": \"הסר\",\n \"removeDescription\": \"לחץ על מחק כדי להסיר תג.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Delete za uklanjanje oznake.\"\n}\n","{\n \"removeButtonLabel\": \"Eltávolítás\",\n \"removeDescription\": \"Nyomja meg a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"removeButtonLabel\": \"Rimuovi\",\n \"removeDescription\": \"Premi Elimina per rimuovere il tag.\"\n}\n","{\n \"removeButtonLabel\": \"削除\",\n \"removeDescription\": \"タグを削除するには、Delete キーを押します。\"\n}\n","{\n \"removeButtonLabel\": \"제거\",\n \"removeDescription\": \"태그를 제거하려면 Delete 키를 누르십시오.\"\n}\n","{\n \"removeButtonLabel\": \"Pašalinti\",\n \"removeDescription\": \"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.\"\n}\n","{\n \"removeButtonLabel\": \"Noņemt\",\n \"removeDescription\": \"Nospiediet Delete [Dzēst], lai noņemtu tagu.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Trykk på Slett for å fjerne taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Verwijderen\",\n \"removeDescription\": \"Druk op Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"removeButtonLabel\": \"Usuń\",\n \"removeDescription\": \"Naciśnij Usuń, aby usunąć znacznik.\"\n}\n","{\n \"removeButtonLabel\": \"Remover\",\n \"removeDescription\": \"Pressione Delete para remover a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n","{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n","{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n","{\n \"removeButtonLabel\": \"删除\",\n \"removeDescription\": \"按下“删除”以删除标记。\"\n}\n","{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {useId as $aIvin$useId,
|
|
1
|
+
import {useId as $aIvin$useId, useDescription as $aIvin$useDescription, filterDOMProps as $aIvin$filterDOMProps, mergeProps as $aIvin$mergeProps} from "@react-aria/utils";
|
|
2
2
|
import {useGridListItem as $aIvin$useGridListItem, useGridList as $aIvin$useGridList} from "@react-aria/gridlist";
|
|
3
3
|
import {useInteractionModality as $aIvin$useInteractionModality, useFocusWithin as $aIvin$useFocusWithin} from "@react-aria/interactions";
|
|
4
4
|
import {useLocalizedStringFormatter as $aIvin$useLocalizedStringFormatter, useLocale as $aIvin$useLocale} from "@react-aria/i18n";
|
|
5
|
-
import {useState as $aIvin$useState} from "react";
|
|
5
|
+
import {useState as $aIvin$useState, useRef as $aIvin$useRef, useEffect as $aIvin$useEffect} from "react";
|
|
6
|
+
import {ListKeyboardDelegate as $aIvin$ListKeyboardDelegate} from "@react-aria/selection";
|
|
6
7
|
import {useField as $aIvin$useField} from "@react-aria/label";
|
|
7
8
|
|
|
8
9
|
function $parcel$interopDefault(a) {
|
|
@@ -28,48 +29,7 @@ function $parcel$interopDefault(a) {
|
|
|
28
29
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
29
30
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
30
31
|
* governing permissions and limitations under the License.
|
|
31
|
-
*/
|
|
32
|
-
getFirstKey() {
|
|
33
|
-
return this.collection.getFirstKey();
|
|
34
|
-
}
|
|
35
|
-
getLastKey() {
|
|
36
|
-
return this.collection.getLastKey();
|
|
37
|
-
}
|
|
38
|
-
getKeyRightOf(key) {
|
|
39
|
-
return this.direction === "rtl" ? this.getKeyAbove(key) : this.getKeyBelow(key);
|
|
40
|
-
}
|
|
41
|
-
getKeyLeftOf(key) {
|
|
42
|
-
return this.direction === "rtl" ? this.getKeyBelow(key) : this.getKeyAbove(key);
|
|
43
|
-
}
|
|
44
|
-
getKeyBelow(key) {
|
|
45
|
-
let startItem = this.collection.getItem(key);
|
|
46
|
-
if (!startItem) return;
|
|
47
|
-
// Find the next item
|
|
48
|
-
key = this.collection.getKeyAfter(key);
|
|
49
|
-
if (key != null) return key;
|
|
50
|
-
else return this.collection.getFirstKey();
|
|
51
|
-
}
|
|
52
|
-
getKeyAbove(key) {
|
|
53
|
-
let startItem = this.collection.getItem(key);
|
|
54
|
-
if (!startItem) return;
|
|
55
|
-
// Find the previous item
|
|
56
|
-
key = this.collection.getKeyBefore(key);
|
|
57
|
-
if (key != null) return key;
|
|
58
|
-
else return this.collection.getLastKey();
|
|
59
|
-
}
|
|
60
|
-
getKeyPageAbove(key) {
|
|
61
|
-
return this.getKeyAbove(key);
|
|
62
|
-
}
|
|
63
|
-
getKeyPageBelow(key) {
|
|
64
|
-
return this.getKeyBelow(key);
|
|
65
|
-
}
|
|
66
|
-
constructor(collection, direction){
|
|
67
|
-
this.collection = collection;
|
|
68
|
-
this.direction = direction;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
32
|
+
*/
|
|
73
33
|
/*
|
|
74
34
|
* Copyright 2020 Adobe. All rights reserved.
|
|
75
35
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -81,7 +41,67 @@ function $parcel$interopDefault(a) {
|
|
|
81
41
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
82
42
|
* governing permissions and limitations under the License.
|
|
83
43
|
*/
|
|
84
|
-
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
const $d7323bca8d074eeb$export$653eddfc964b0f8a = new WeakMap();
|
|
51
|
+
function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
52
|
+
let { direction: direction } = (0, $aIvin$useLocale)();
|
|
53
|
+
let keyboardDelegate = props.keyboardDelegate || new (0, $aIvin$ListKeyboardDelegate)({
|
|
54
|
+
collection: state.collection,
|
|
55
|
+
ref: ref,
|
|
56
|
+
orientation: "horizontal",
|
|
57
|
+
direction: direction,
|
|
58
|
+
disabledKeys: state.disabledKeys
|
|
59
|
+
});
|
|
60
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $aIvin$useField)({
|
|
61
|
+
...props,
|
|
62
|
+
labelElementType: "span"
|
|
63
|
+
});
|
|
64
|
+
let { gridProps: gridProps } = (0, $aIvin$useGridList)({
|
|
65
|
+
...props,
|
|
66
|
+
...fieldProps,
|
|
67
|
+
keyboardDelegate: keyboardDelegate,
|
|
68
|
+
shouldFocusWrap: true
|
|
69
|
+
}, state, ref);
|
|
70
|
+
let [isFocusWithin, setFocusWithin] = (0, $aIvin$useState)(false);
|
|
71
|
+
let { focusWithinProps: focusWithinProps } = (0, $aIvin$useFocusWithin)({
|
|
72
|
+
onFocusWithinChange: setFocusWithin
|
|
73
|
+
});
|
|
74
|
+
let domProps = (0, $aIvin$filterDOMProps)(props);
|
|
75
|
+
// If the last tag is removed, focus the container.
|
|
76
|
+
let prevCount = (0, $aIvin$useRef)(state.collection.size);
|
|
77
|
+
(0, $aIvin$useEffect)(()=>{
|
|
78
|
+
if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) ref.current.focus();
|
|
79
|
+
prevCount.current = state.collection.size;
|
|
80
|
+
}, [
|
|
81
|
+
state.collection.size,
|
|
82
|
+
isFocusWithin,
|
|
83
|
+
ref
|
|
84
|
+
]);
|
|
85
|
+
$d7323bca8d074eeb$export$653eddfc964b0f8a.set(state, {
|
|
86
|
+
onRemove: props.onRemove
|
|
87
|
+
});
|
|
88
|
+
return {
|
|
89
|
+
gridProps: (0, $aIvin$mergeProps)(gridProps, domProps, {
|
|
90
|
+
role: state.collection.size ? "grid" : null,
|
|
91
|
+
"aria-atomic": false,
|
|
92
|
+
"aria-relevant": "additions",
|
|
93
|
+
"aria-live": isFocusWithin ? "polite" : "off",
|
|
94
|
+
...focusWithinProps,
|
|
95
|
+
...fieldProps
|
|
96
|
+
}),
|
|
97
|
+
labelProps: labelProps,
|
|
98
|
+
descriptionProps: descriptionProps,
|
|
99
|
+
errorMessageProps: errorMessageProps
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
var $3bb15cc24d006ec5$exports = {};
|
|
85
105
|
var $84925f526f90eebd$exports = {};
|
|
86
106
|
$84925f526f90eebd$exports = {
|
|
87
107
|
"removeButtonLabel": `إزالة`,
|
|
@@ -320,7 +340,7 @@ $09cd168ab18773f4$exports = {
|
|
|
320
340
|
};
|
|
321
341
|
|
|
322
342
|
|
|
323
|
-
$
|
|
343
|
+
$3bb15cc24d006ec5$exports = {
|
|
324
344
|
"ar-AE": $84925f526f90eebd$exports,
|
|
325
345
|
"bg-BG": $c0650163dc1b6f9d$exports,
|
|
326
346
|
"cs-CZ": $b2b55661291de587$exports,
|
|
@@ -362,105 +382,59 @@ $4d1b62e0e67c00a4$exports = {
|
|
|
362
382
|
|
|
363
383
|
|
|
364
384
|
function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
365
|
-
let {
|
|
366
|
-
let stringFormatter = (0, $aIvin$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
367
|
-
let labelId = (0, $aIvin$useId)();
|
|
385
|
+
let { item: item } = props;
|
|
386
|
+
let stringFormatter = (0, $aIvin$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($3bb15cc24d006ec5$exports))));
|
|
368
387
|
let buttonId = (0, $aIvin$useId)();
|
|
369
|
-
let {
|
|
388
|
+
let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
|
|
389
|
+
let { rowProps: rowProps , gridCellProps: gridCellProps , ...states } = (0, $aIvin$useGridListItem)({
|
|
370
390
|
node: item
|
|
371
391
|
}, state, ref);
|
|
372
392
|
// We want the group to handle keyboard navigation between tags.
|
|
373
393
|
delete rowProps.onKeyDownCapture;
|
|
374
|
-
|
|
394
|
+
delete states.descriptionProps;
|
|
375
395
|
let onKeyDown = (e)=>{
|
|
376
396
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
377
|
-
onRemove(item.key);
|
|
378
397
|
e.preventDefault();
|
|
398
|
+
if (state.selectionManager.isSelected(item.key)) onRemove(new Set(state.selectionManager.selectedKeys));
|
|
399
|
+
else onRemove(new Set([
|
|
400
|
+
item.key
|
|
401
|
+
]));
|
|
379
402
|
}
|
|
380
403
|
};
|
|
381
404
|
let modality = (0, $aIvin$useInteractionModality)();
|
|
382
405
|
if (modality === "virtual" && typeof window !== "undefined" && "ontouchstart" in window) modality = "touch";
|
|
383
|
-
let description =
|
|
406
|
+
let description = onRemove && (modality === "keyboard" || modality === "virtual") ? stringFormatter.format("removeDescription") : "";
|
|
384
407
|
let descProps = (0, $aIvin$useDescription)(description);
|
|
385
|
-
let domProps = (0, $aIvin$filterDOMProps)(props);
|
|
386
408
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
409
|
+
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
410
|
+
let domProps = (0, $aIvin$filterDOMProps)(props);
|
|
387
411
|
return {
|
|
388
412
|
removeButtonProps: {
|
|
389
|
-
"aria-label": stringFormatter.format("removeButtonLabel",
|
|
390
|
-
|
|
391
|
-
}),
|
|
392
|
-
"aria-labelledby": `${buttonId} ${labelId}`,
|
|
413
|
+
"aria-label": stringFormatter.format("removeButtonLabel"),
|
|
414
|
+
"aria-labelledby": `${buttonId} ${rowProps.id}`,
|
|
393
415
|
id: buttonId,
|
|
394
|
-
onPress: ()=>
|
|
416
|
+
onPress: ()=>onRemove ? onRemove(new Set([
|
|
417
|
+
item.key
|
|
418
|
+
])) : null,
|
|
395
419
|
excludeFromTabOrder: true
|
|
396
420
|
},
|
|
397
|
-
|
|
398
|
-
id: labelId
|
|
399
|
-
},
|
|
400
|
-
rowProps: {
|
|
401
|
-
...rowProps,
|
|
421
|
+
rowProps: (0, $aIvin$mergeProps)(rowProps, domProps, {
|
|
402
422
|
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
403
|
-
onKeyDown:
|
|
423
|
+
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
404
424
|
"aria-describedby": descProps["aria-describedby"]
|
|
405
|
-
},
|
|
406
|
-
gridCellProps: (0, $aIvin$mergeProps)(
|
|
425
|
+
}),
|
|
426
|
+
gridCellProps: (0, $aIvin$mergeProps)(gridCellProps, {
|
|
407
427
|
"aria-errormessage": props["aria-errormessage"],
|
|
408
428
|
"aria-label": props["aria-label"]
|
|
409
|
-
})
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
/*
|
|
415
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
416
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
417
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
418
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
419
|
-
*
|
|
420
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
421
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
422
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
423
|
-
* governing permissions and limitations under the License.
|
|
424
|
-
*/
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
432
|
-
let { direction: direction } = (0, $aIvin$useLocale)();
|
|
433
|
-
let keyboardDelegate = props.keyboardDelegate || new (0, $542448901dbd2c36$export$b00754732e683b92)(state.collection, direction);
|
|
434
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $aIvin$useField)(props);
|
|
435
|
-
let { gridProps: gridProps } = (0, $aIvin$useGridList)({
|
|
436
|
-
...props,
|
|
437
|
-
...fieldProps,
|
|
438
|
-
keyboardDelegate: keyboardDelegate
|
|
439
|
-
}, state, ref);
|
|
440
|
-
// Don't want the grid to be focusable or accessible via keyboard
|
|
441
|
-
delete gridProps.tabIndex;
|
|
442
|
-
let [isFocusWithin, setFocusWithin] = (0, $aIvin$useState)(false);
|
|
443
|
-
let { focusWithinProps: focusWithinProps } = (0, $aIvin$useFocusWithin)({
|
|
444
|
-
onFocusWithinChange: setFocusWithin
|
|
445
|
-
});
|
|
446
|
-
let domProps = (0, $aIvin$filterDOMProps)(props);
|
|
447
|
-
return {
|
|
448
|
-
gridProps: (0, $aIvin$mergeProps)(gridProps, domProps, {
|
|
449
|
-
role: state.collection.size ? "grid" : null,
|
|
450
|
-
"aria-atomic": false,
|
|
451
|
-
"aria-relevant": "additions",
|
|
452
|
-
"aria-live": isFocusWithin ? "polite" : "off",
|
|
453
|
-
...focusWithinProps,
|
|
454
|
-
...fieldProps
|
|
455
429
|
}),
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
errorMessageProps: errorMessageProps
|
|
430
|
+
...states,
|
|
431
|
+
allowsRemoving: !!onRemove
|
|
459
432
|
};
|
|
460
433
|
}
|
|
461
434
|
|
|
462
435
|
|
|
463
436
|
|
|
464
437
|
|
|
465
|
-
|
|
438
|
+
|
|
439
|
+
export {$fc6126c82a4601f1$export$3f568fff7dff2f03 as useTag, $d7323bca8d074eeb$export$4f8b5cda58b7e8ff as useTagGroup};
|
|
466
440
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED,AAGO,MAAM;IASX,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW;IACpC;IAEA,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU;IACnC;IAEA,cAAc,GAAQ,EAAE;QACtB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,aAAa,GAAQ,EAAE;QACrB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,YAAY,GAAG,EAAE;QACf,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,WACH;QAGF,qBAAqB;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAElC,IAAI,OAAO,IAAI,E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G,CAAA,GAAA,kBAAW,AAAD,EAAE;QAAC,GAAG,KAAK;QAAE,GAAG,UAAU;0BAAE;IAAgB,GAAG,OAAO;IAElF,iEAAiE;IACjE,OAAO,UAAU,QAAQ;IAEzB,IAAI,CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE,KAAK;IACpD,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,qBAAc,AAAD,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAC9B,OAAO;QACL,WAAW,CAAA,GAAA,iBAAU,AAAD,EAAE,WAAW,UAAU;YACzC,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,SAAS,IAAI;YAC3C,eAAe,KAAK;YACpB,iBAAiB;YACjB,aAAa,gBAAgB,WAAW,KAAK;YAC7C,GAAG,gBAAgB;YACnB,GAAG,UAAU;QACf;oBACA;0BACA;2BACA;IACF;AACF;;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.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 {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, TagAria} from './useTag';\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 {Collection, Direction, KeyboardDelegate} from '@react-types/shared';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> implements KeyboardDelegate {\n private collection: Collection<T>;\n private direction: Direction;\n\n constructor(collection: Collection<T>, direction: Direction) {\n this.collection = collection;\n this.direction = direction;\n }\n\n getFirstKey() {\n return this.collection.getFirstKey();\n }\n\n getLastKey() {\n return this.collection.getLastKey();\n }\n \n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the next item\n key = this.collection.getKeyAfter(key);\n\n if (key != null) {\n return key;\n } else {\n return this.collection.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the previous item\n key = this.collection.getKeyBefore(key);\n if (key != null) {\n return key;\n } else {\n return this.collection.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\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 {AriaButtonProps} from '@react-types/button';\nimport {AriaLabelingProps, DOMAttributes, DOMProps, FocusableElement} from '@react-types/shared';\nimport {chain, filterDOMProps, mergeProps, useDescription, useId} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagProps} from '@react-types/tag';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n /** Props for the tag visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes,\n /** Props for the tag row element. */\n rowProps: DOMAttributes,\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps\n}\n\nexport interface AriaTagProps<T> extends TagProps<T>, DOMProps, AriaLabelingProps {}\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 `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: AriaTagProps<T>, state: TagGroupState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {\n allowsRemoving,\n item\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let labelId = useId();\n let buttonId = useId();\n\n let {rowProps, gridCellProps} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n\n let onRemove = chain(props.onRemove, state.onRemove);\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace') {\n onRemove(item.key);\n e.preventDefault();\n }\n };\n\n let modality: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\n }\n let description = allowsRemoving && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';\n let descProps = useDescription(description);\n\n let domProps = filterDOMProps(props);\n let isFocused = item.key === state.selectionManager.focusedKey;\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel', {label: item.textValue}),\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId,\n onPress: () => allowsRemoving && onRemove ? onRemove(item.key) : null,\n excludeFromTabOrder: true\n },\n labelProps: {\n id: labelId\n },\n rowProps: {\n ...rowProps,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: allowsRemoving ? onKeyDown : null,\n 'aria-describedby': descProps['aria-describedby']\n },\n gridCellProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"removeButtonLabel\": \"إزالة\",\n \"removeDescription\": \"اضغط على مفتاح DELETE لإزالة علامة.\"\n}\n","{\n \"removeButtonLabel\": \"Премахване\",\n \"removeDescription\": \"Натиснете Delete, за да премахнете маркера.\"\n}\n","{\n \"removeButtonLabel\": \"Odebrat\",\n \"removeDescription\": \"Stisknutím klávesy Delete odeberete značku.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Tryk på Slet for at fjerne tag.\"\n}\n","{\n \"removeButtonLabel\": \"Entfernen\",\n \"removeDescription\": \"Auf „Löschen“ drücken, um das Tag zu entfernen.\"\n}\n","{\n \"removeButtonLabel\": \"Κατάργηση\",\n \"removeDescription\": \"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"removeDescription\": \"Press Delete to remove tag.\",\n \"removeButtonLabel\": \"Remove\"\n}\n","{\n \"removeButtonLabel\": \"Quitar\",\n \"removeDescription\": \"Pulse Eliminar para quitar la etiqueta.\"\n}\n","{\n \"removeButtonLabel\": \"Eemalda\",\n \"removeDescription\": \"Sildi eemaldamiseks vajutage kustutusklahvi Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Poista\",\n \"removeDescription\": \"Poista tunniste painamalla Poista-painiketta.\"\n}\n","{\n \"removeButtonLabel\": \"Supprimer\",\n \"removeDescription\": \"Appuyez sur Supprimer pour supprimer l’étiquette.\"\n}\n","{\n \"removeButtonLabel\": \"הסר\",\n \"removeDescription\": \"לחץ על מחק כדי להסיר תג.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Delete za uklanjanje oznake.\"\n}\n","{\n \"removeButtonLabel\": \"Eltávolítás\",\n \"removeDescription\": \"Nyomja meg a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"removeButtonLabel\": \"Rimuovi\",\n \"removeDescription\": \"Premi Elimina per rimuovere il tag.\"\n}\n","{\n \"removeButtonLabel\": \"削除\",\n \"removeDescription\": \"タグを削除するには、Delete キーを押します。\"\n}\n","{\n \"removeButtonLabel\": \"제거\",\n \"removeDescription\": \"태그를 제거하려면 Delete 키를 누르십시오.\"\n}\n","{\n \"removeButtonLabel\": \"Pašalinti\",\n \"removeDescription\": \"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.\"\n}\n","{\n \"removeButtonLabel\": \"Noņemt\",\n \"removeDescription\": \"Nospiediet Delete [Dzēst], lai noņemtu tagu.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Trykk på Slett for å fjerne taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Verwijderen\",\n \"removeDescription\": \"Druk op Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"removeButtonLabel\": \"Usuń\",\n \"removeDescription\": \"Naciśnij Usuń, aby usunąć znacznik.\"\n}\n","{\n \"removeButtonLabel\": \"Remover\",\n \"removeDescription\": \"Pressione Delete para remover a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n","{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n","{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n","{\n \"removeButtonLabel\": \"删除\",\n \"removeDescription\": \"按下“删除”以删除标记。\"\n}\n","{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\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 {AriaLabelingProps, DOMAttributes, DOMProps, Validation} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {RefObject, useState} from 'react';\nimport {TagGroupProps} from '@react-types/tag';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useGridList} from '@react-aria/gridlist';\nimport {useLocale} from '@react-aria/i18n';\n\nexport interface TagGroupAria {\n /** Props for the tag grouping element. */\n gridProps: DOMAttributes,\n /** Props for the tag group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the tag group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\nexport interface AriaTagGroupProps<T> extends TagGroupProps<T>, DOMProps, AriaLabelingProps, Validation {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: TagKeyboardDelegate<T>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, or other items, with support for keyboard navigation and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupProps<T>, state: TagGroupState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new TagKeyboardDelegate(state.collection, direction);\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField(props);\n let {gridProps} = useGridList({...props, ...fieldProps, keyboardDelegate}, state, ref);\n\n // Don't want the grid to be focusable or accessible via keyboard\n delete gridProps.tabIndex;\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n gridProps: mergeProps(gridProps, domProps, {\n role: state.collection.size ? 'grid' : null,\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps,\n ...fieldProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;ACVD;;;;;;;;;;CAUC;;;;;;;AA0CM,MAAM,4CAAW,IAAI;AASrB,SAAS,0CAAe,KAA6B,EAAE,KAAmB,EAAE,GAA2B;IAC5G,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,mBAAmB,MAAM,oBAAoB,IAAI,CAAA,GAAA,2BAAmB,EAAE;QACxE,YAAY,MAAM;aAClB;QACA,aAAa;mBACb;QACA,cAAc,MAAM;IACtB;IACA,IAAI,cAAC,WAAU,cAAE,WAAU,oBAAE,iBAAgB,qBAAE,kBAAiB,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAC3E,GAAG,KAAK;QACR,kBAAkB;IACpB;IACA,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE;QAC5B,GAAG,KAAK;QACR,GAAG,UAAU;0BACb;QACA,iBAAiB;IACnB,GAAG,OAAO;IAEV,IAAI,CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE;IAC/C,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE;IAE9B,mDAAmD;IACnD,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE,MAAM,WAAW;IACxC,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,UAAU,KAAK,MAAM,WAAW,SAAS,KAAK,eAC1D,IAAI,QAAQ;QAEd,UAAU,UAAU,MAAM,WAAW;IACvC,GAAG;QAAC,MAAM,WA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AE,SAAS,GAAG,CAAC;YAC/C,IAAI;YACJ,SAAS,IAAM,WAAW,SAAS,IAAI,IAAI;oBAAC,KAAK;iBAAI,KAAK;YAC1D,qBAAqB;QACvB;QACA,UAAU,CAAA,GAAA,iBAAS,EAAE,UAAU,UAAU;YACvC,UAAU,AAAC,aAAa,MAAM,iBAAiB,cAAc,OAAQ,IAAI;YACzE,WAAW,WAAW,YAAY;YAClC,oBAAoB,SAAS,CAAC,mBAAmB;QACnD;QACA,eAAe,CAAA,GAAA,iBAAS,EAAE,eAAe;YACvC,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,MAAM;QACT,gBAAgB,CAAC,CAAC;IACpB;AACF;;CD7FC","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json"],"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 {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, TagAria} from './useTag';\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 {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, FocusableElement, Node} from '@react-types/shared';\nimport {filterDOMProps, 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);\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 delete states.descriptionProps;\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: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\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(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, {\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 ...states,\n allowsRemoving: !!onRemove\n };\n}\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 {AriaLabelingProps, CollectionBase, DOMAttributes, DOMProps, HelpTextProps, KeyboardDelegate, LabelableProps, MultipleSelection, SelectionBehavior} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject, useEffect, useRef, useState} from 'react';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport type {ListState} from '@react-stately/list';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useGridList} from '@react-aria/gridlist';\nimport {useLocale} from '@react-aria/i18n';\n\nexport interface TagGroupAria {\n /** Props for the tag grouping element. */\n gridProps: DOMAttributes,\n /** Props for the tag group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the tag group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\nexport interface AriaTagGroupProps<T> extends CollectionBase<T>, MultipleSelection, DOMProps, LabelableProps, AriaLabelingProps, HelpTextProps {\n /** How multiple selection should behave in the collection. */\n selectionBehavior?: SelectionBehavior,\n /** Handler that is called when a user deletes a tag. */\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport interface AriaTagGroupOptions<T> extends Omit<AriaTagGroupProps<T>, 'children'> {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\ninterface HookData {\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport const hookData = new WeakMap<ListState<any>, HookData>();\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new ListKeyboardDelegate({\n collection: state.collection,\n ref,\n orientation: 'horizontal',\n direction,\n disabledKeys: state.disabledKeys\n });\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span'\n });\n let {gridProps} = useGridList({\n ...props,\n ...fieldProps,\n keyboardDelegate,\n shouldFocusWrap: true\n }, state, ref);\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n\n // If the last tag is removed, focus the container.\n let prevCount = useRef(state.collection.size);\n useEffect(() => {\n if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) {\n ref.current.focus();\n }\n prevCount.current = state.collection.size;\n }, [state.collection.size, isFocusWithin, ref]);\n\n hookData.set(state, {onRemove: props.onRemove});\n\n return {\n gridProps: mergeProps(gridProps, domProps, {\n role: state.collection.size ? 'grid' : null,\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps,\n ...fieldProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps\n };\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"removeButtonLabel\": \"إزالة\",\n \"removeDescription\": \"اضغط على مفتاح DELETE لإزالة علامة.\"\n}\n","{\n \"removeButtonLabel\": \"Премахване\",\n \"removeDescription\": \"Натиснете Delete, за да премахнете маркера.\"\n}\n","{\n \"removeButtonLabel\": \"Odebrat\",\n \"removeDescription\": \"Stisknutím klávesy Delete odeberete značku.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Tryk på Slet for at fjerne tag.\"\n}\n","{\n \"removeButtonLabel\": \"Entfernen\",\n \"removeDescription\": \"Auf „Löschen“ drücken, um das Tag zu entfernen.\"\n}\n","{\n \"removeButtonLabel\": \"Κατάργηση\",\n \"removeDescription\": \"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"removeDescription\": \"Press Delete to remove tag.\",\n \"removeButtonLabel\": \"Remove\"\n}\n","{\n \"removeButtonLabel\": \"Quitar\",\n \"removeDescription\": \"Pulse Eliminar para quitar la etiqueta.\"\n}\n","{\n \"removeButtonLabel\": \"Eemalda\",\n \"removeDescription\": \"Sildi eemaldamiseks vajutage kustutusklahvi Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Poista\",\n \"removeDescription\": \"Poista tunniste painamalla Poista-painiketta.\"\n}\n","{\n \"removeButtonLabel\": \"Supprimer\",\n \"removeDescription\": \"Appuyez sur Supprimer pour supprimer l’étiquette.\"\n}\n","{\n \"removeButtonLabel\": \"הסר\",\n \"removeDescription\": \"לחץ על מחק כדי להסיר תג.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Delete za uklanjanje oznake.\"\n}\n","{\n \"removeButtonLabel\": \"Eltávolítás\",\n \"removeDescription\": \"Nyomja meg a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"removeButtonLabel\": \"Rimuovi\",\n \"removeDescription\": \"Premi Elimina per rimuovere il tag.\"\n}\n","{\n \"removeButtonLabel\": \"削除\",\n \"removeDescription\": \"タグを削除するには、Delete キーを押します。\"\n}\n","{\n \"removeButtonLabel\": \"제거\",\n \"removeDescription\": \"태그를 제거하려면 Delete 키를 누르십시오.\"\n}\n","{\n \"removeButtonLabel\": \"Pašalinti\",\n \"removeDescription\": \"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.\"\n}\n","{\n \"removeButtonLabel\": \"Noņemt\",\n \"removeDescription\": \"Nospiediet Delete [Dzēst], lai noņemtu tagu.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Trykk på Slett for å fjerne taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Verwijderen\",\n \"removeDescription\": \"Druk op Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"removeButtonLabel\": \"Usuń\",\n \"removeDescription\": \"Naciśnij Usuń, aby usunąć znacznik.\"\n}\n","{\n \"removeButtonLabel\": \"Remover\",\n \"removeDescription\": \"Pressione Delete para remover a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n","{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n","{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n","{\n \"removeButtonLabel\": \"删除\",\n \"removeDescription\": \"按下“删除”以删除标记。\"\n}\n","{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|