@react-spectrum/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.
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,CAAC,SAAS,CAAC;IAC9B,sBAAsB,CAAC,MAAM,YAAc,CAAC,UAAU,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AAC5F;;ADHA;;AEAA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,mBAAmB,CAAC,qBAAqB,CAAC;IAC1C,sBAAsB,CAAC,MAAM,YAAc,CAAC,qBAAqB,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AACvG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,IAAI,CAAC;IACnC,mBAAmB,CAAC,aAAa,CAAC;IAClC,sBAAsB,CAAC,MAAM,YAAc,CAAC,cAAc,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AAChG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,UAAU,CAAC;IACzC,mBAAmB,CAAC,UAAU,CAAC;IAC/B,sBAAsB,CAAC,MAAM,YAAc,CAAC,UAAU,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AAC5F;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,mBAAmB,CAAC,cAAc,CAAC;IACnC,sBAAsB,CAAC,MAAM,YAAc,CAAC,eAAe,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AACjG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB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um/tag/intl/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","packages/@react-spectrum/tag/src/Tag.tsx"],"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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\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 {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection} from '@react-stately/list';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useTagGroupState} from '@react-stately/tag';\n\nexport interface SpectrumTagGroupProps<T> extends AriaTagGroupProps<T>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n allowsRemoving,\n onRemove,\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useTagGroupState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});\n let keyboardDelegate = useMemo(() => (\n isCollapsed\n ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)\n : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)\n ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n if (!currContainerRef || !currTagsRef) {\n return;\n }\n\n let tags = [...currTagsRef.children];\n let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n // Count rows and show tags until we hit the maxRows.\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n let tagStyle = window.getComputedStyle(tags[0]);\n let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;\n return {\n visibleTagCount: index,\n showCollapseButton: index < state.collection.size,\n maxHeight\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = [...state.collection];\n if (maxRows != null && isCollapsed) {\n visibleTags = visibleTags.slice(0, tagState.visibleTagCount);\n }\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}\n ref={containerRef}\n className={classNames(styles, 'spectrum-Tags-container')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.rendered}\n </Tag>\n ))}\n </div>\n {showActions &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\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 \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\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\n@import './index.css';\n@import './skin.css';\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 {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagProps} from '@react-types/tag';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport interface SpectrumTagProps<T> extends TagProps<T> {\n state: TagGroupState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n allowsRemoving,\n item,\n state,\n onRemove,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let ref = useRef();\n let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({\n ...props,\n allowsRemoving,\n item,\n onRemove\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content'), ...labelProps},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;AEVD,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,CAAC,SAAS,CAAC;IAC9B,UAAU,CAAC,IAAI,CAAC;IAChB,sBAAsB,CAAC,MAAM,YAAc,CAAC,UAAU,EAAE,UAAU,OAAO,KAAK,UAAU,CAAC,CAAC;AAC5F;;;;ACJA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,mBAAmB,CAAC,qBAAqB,CAAC;IAC1C,UAAU,CAAC,SAAS,CAAC;IACrB,sBAAsB,CA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AE,CAAA,GAAA,gEAAK,GAAG;qBAC5C,gCAAC;QACC,KAAK;QACJ,GAAG,SAAS;QACb,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OAC7B,YAAY,IAAI,CAAA,qBACf,gCAAC,CAAA,GAAA,yCAAE;YACA,GAAG,KAAK,KAAK;YACd,KAAK,KAAK;YACV,MAAM;YACN,OAAO;WACN,KAAK,YAGT,yBACC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OAChC,uBAKR,eAAe,CAAC,yBACf,gCAAC,CAAA,GAAA,eAAO;QAAE,YAAY;qBACpB,gCAAC;QACC,MAAK;QACL,KAAK;QACL,IAAI;QACJ,cAAY,gBAAgB,OAAO;QACnC,mBAAiB,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,UAAU,CAAC;QAC/C,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OAC7B,SAAS,oCACR,gCAAC,CAAA,GAAA,mBAAW;QACV,SAAA;QACA,SAAS;QACT,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OACpC,cACC,gBAAgB,OAAO,sBAAsB;QAAC,UAAU,MAAM,WAAW;IAAI,KAC7E,gBAAgB,OAAO,qBAI5B,eAAe,0BACd,gCAAC,CAAA,GAAA,mBAAW;QACV,SAAA;QACA,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,WAAW;;CD7QlC","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/src/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","packages/@react-spectrum/tag/src/Tag.tsx"],"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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\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 {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumLabelableProps, StyleProps, Validation} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing, FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nconst TAG_STYLES = {\n medium: {\n height: 24,\n margin: 4\n },\n large: {\n height: 30,\n margin: 5\n }\n};\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'selectionMode' | 'disallowEmptySelection' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionBehavior' | 'disabledKeys'>, StyleProps, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, Omit<Validation, 'isRequired'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Sets what the TagGroup should render when there are no tags to display. */\n renderEmptyState?: () => JSX.Element,\n /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */\n maxRows?: number\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition,\n renderEmptyState = () => stringFormatter.format('noTags')\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let {scale} = useProvider();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false});\n let keyboardDelegate = useMemo(() => {\n let collection = isCollapsed\n ? new ListCollection([...state.collection].slice(0, tagState.visibleTagCount))\n : new ListCollection([...state.collection]);\n return new ListKeyboardDelegate({\n collection,\n ref: domRef,\n direction,\n orientation: 'horizontal'\n });\n }, [direction, isCollapsed, state.collection, tagState.visibleTagCount, domRef]) as ListKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n let actionsRef = useRef(null);\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n let currActionsRef: HTMLDivElement | null = actionsRef.current;\n if (!currContainerRef || !currTagsRef || !currActionsRef || state.collection.size === 0) {\n return {\n visibleTagCount: 0,\n showCollapseButton: false\n };\n }\n\n // Count rows and show tags until we hit the maxRows.\n let tags = [...currTagsRef.children];\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttons = [...currActionsRef.children];\n if (buttons.length > 0 && rowCount >= maxRows) {\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += TAG_STYLES[scale].margin * 2 * buttons.length;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += TAG_STYLES[scale].margin;\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n }\n\n return {\n visibleTagCount: Math.max(index, 1),\n showCollapseButton: index < state.collection.size\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, scale, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = useMemo(() =>\n [...state.collection].slice(0, isCollapsed ? tagState.visibleTagCount : state.collection.size),\n [isCollapsed, state.collection, tagState.visibleTagCount]\n );\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n let isEmpty = state.collection.size === 0;\n\n let containerStyle = useMemo(() => {\n if (maxRows == null || !isCollapsed || isEmpty) {\n return undefined;\n }\n let maxHeight = (TAG_STYLES[scale].height + (TAG_STYLES[scale].margin * 2)) * maxRows;\n return {maxHeight, overflow: 'hidden'};\n }, [isCollapsed, maxRows, isEmpty, scale]);\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n ref={containerRef}\n style={containerStyle}\n className={\n classNames(\n styles,\n 'spectrum-Tags-container',\n {\n 'spectrum-Tags-container--empty': isEmpty\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}>\n {item.rendered}\n </Tag>\n ))}\n {isEmpty && (\n <div className={classNames(styles, 'spectrum-Tags-empty-state')}>\n {renderEmptyState()}\n </div>\n )}\n </div>\n </FocusRing>\n {showActions && !isEmpty &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n ref={actionsRef}\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\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 \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"noTags\": \"بدون\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"noTags\": \"Нито един\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"noTags\": \"Žádný\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"noTags\": \"Ingen\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"noTags\": \"Keine\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"noTags\": \"Κανένα\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\",\n \"noTags\": \"None\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"noTags\": \"Ninguno\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"noTags\": \"Puudub\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"noTags\": \"Ei mitään\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"noTags\": \"Aucun\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"noTags\": \"ללא\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"noTags\": \"Nema\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"noTags\": \"Egyik sem\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"noTags\": \"Nessuno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"noTags\": \"なし\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"noTags\": \"없음\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"noTags\": \"Nėra\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"noTags\": \"Nav\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"noTags\": \"Ingen\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"noTags\": \"Geen\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"noTags\": \"Brak\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"noTags\": \"Nenhum\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"noTags\": \"Nenhum\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"noTags\": \"Niciuna\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"noTags\": \"Нет\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"noTags\": \"Žiadne\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"noTags\": \"Nič\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"noTags\": \"Ne postoji\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"noTags\": \"Ingen\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"noTags\": \"Hiçbiri\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"noTags\": \"Немає\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"noTags\": \"无\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"noTags\": \"無\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\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\n@import './index.css';\n@import './skin.css';\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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let ref = useRef();\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import { AriaTagGroupProps } from "@react-aria/tag";
2
- import { DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps } from "@react-types/shared";
2
+ import { DOMRef, SpectrumLabelableProps, StyleProps, Validation } from "@react-types/shared";
3
3
  import { ReactElement } from "react";
4
- export interface SpectrumTagGroupProps<T> extends AriaTagGroupProps<T>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {
4
+ export interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'selectionMode' | 'disallowEmptySelection' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionBehavior' | 'disabledKeys'>, StyleProps, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, Omit<Validation, 'isRequired'> {
5
5
  /** The label to display on the action button. */
6
6
  actionLabel?: string;
7
7
  /** Handler that is called when the action button is pressed. */
8
8
  onAction?: () => void;
9
+ /** Sets what the TagGroup should render when there are no tags to display. */
10
+ renderEmptyState?: () => JSX.Element;
11
+ /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */
12
+ maxRows?: number;
9
13
  }
10
14
  /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
11
15
  export const TagGroup: <T>(props: SpectrumTagGroupProps<T> & {
@@ -1 +1 @@
1
- {"mappings":";;;AC8BA,uCAAuC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,EAAE,UAAU,EAAE,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,CAAC;IACtJ,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAkMD,8IAA8I;AAC9I,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;ACzNtI,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC","sources":["packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/Tag.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;ACyCA,uCAAuC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,eAAe,GAAG,wBAAwB,GAAG,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,cAAc,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,GAAG,oBAAoB,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;IAC3U,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,IAAI,OAAO,CAAC;IACrC,2HAA2H;IAC3H,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAoOD,8IAA8I;AAC9I,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AC1QtI,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC","sources":["packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/Tag.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/tag",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.1.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,22 +36,21 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/focus": "^3.12.0",
40
- "@react-aria/i18n": "^3.7.1",
41
- "@react-aria/interactions": "^3.15.0",
42
- "@react-aria/tag": "3.0.0-rc.0",
43
- "@react-aria/utils": "^3.16.0",
44
- "@react-spectrum/button": "^3.12.1",
45
- "@react-spectrum/form": "^3.6.1",
46
- "@react-spectrum/label": "^3.12.0",
47
- "@react-spectrum/text": "^3.4.1",
48
- "@react-spectrum/utils": "^3.9.1",
49
- "@react-stately/collections": "^3.7.0",
50
- "@react-stately/list": "^3.8.0",
51
- "@react-stately/tag": "3.0.0-rc.0",
52
- "@react-types/shared": "^3.18.0",
53
- "@react-types/tag": "3.0.0-rc.0",
54
- "@swc/helpers": "^0.4.14"
39
+ "@react-aria/focus": "^3.13.0",
40
+ "@react-aria/i18n": "^3.8.0",
41
+ "@react-aria/interactions": "^3.16.0",
42
+ "@react-aria/selection": "^3.16.0",
43
+ "@react-aria/tag": "^3.1.0",
44
+ "@react-aria/utils": "^3.18.0",
45
+ "@react-spectrum/button": "^3.12.3",
46
+ "@react-spectrum/form": "^3.6.3",
47
+ "@react-spectrum/label": "^3.13.0",
48
+ "@react-spectrum/text": "^3.4.3",
49
+ "@react-spectrum/utils": "^3.10.0",
50
+ "@react-stately/collections": "^3.9.0",
51
+ "@react-stately/list": "^3.9.0",
52
+ "@react-types/shared": "^3.18.1",
53
+ "@swc/helpers": "^0.5.0"
55
54
  },
56
55
  "devDependencies": {
57
56
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -63,5 +62,5 @@
63
62
  "publishConfig": {
64
63
  "access": "public"
65
64
  },
66
- "gitHead": "9d1ba9bd8ebcd63bf3495ade16d349bcb71795ce"
65
+ "gitHead": "504e40e0a50c1b20ed0fb3ba9561a263b6d5565e"
67
66
  }
package/src/Tag.tsx CHANGED
@@ -10,28 +10,25 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import {AriaTagProps, useTag} from '@react-aria/tag';
13
14
  import {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';
14
15
  import {ClearButton} from '@react-spectrum/button';
16
+ import type {ListState} from '@react-stately/list';
15
17
  import {mergeProps} from '@react-aria/utils';
16
18
  import React, {useRef} from 'react';
17
19
  import styles from '@adobe/spectrum-css-temp/components/tags/vars.css';
18
- import type {TagGroupState} from '@react-stately/tag';
19
- import {TagProps} from '@react-types/tag';
20
20
  import {Text} from '@react-spectrum/text';
21
21
  import {useFocusRing} from '@react-aria/focus';
22
22
  import {useHover} from '@react-aria/interactions';
23
- import {useTag} from '@react-aria/tag';
24
23
 
25
- export interface SpectrumTagProps<T> extends TagProps<T> {
26
- state: TagGroupState<T>
24
+ export interface SpectrumTagProps<T> extends AriaTagProps<T> {
25
+ state: ListState<T>
27
26
  }
28
27
 
29
28
  export function Tag<T>(props: SpectrumTagProps<T>) {
30
29
  const {
31
- allowsRemoving,
32
30
  item,
33
31
  state,
34
- onRemove,
35
32
  ...otherProps
36
33
  } = props;
37
34
 
@@ -40,11 +37,9 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
40
37
  let {hoverProps, isHovered} = useHover({});
41
38
  let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});
42
39
  let ref = useRef();
43
- let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({
40
+ let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({
44
41
  ...props,
45
- allowsRemoving,
46
- item,
47
- onRemove
42
+ item
48
43
  }, state, ref);
49
44
 
50
45
  return (
@@ -68,7 +63,7 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
68
63
  <SlotProvider
69
64
  slots={{
70
65
  icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},
71
- text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content'), ...labelProps},
66
+ text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},
72
67
  avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}
73
68
  }}>
74
69
  {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}
package/src/TagGroup.tsx CHANGED
@@ -11,59 +11,81 @@
11
11
  */
12
12
 
13
13
  import {ActionButton} from '@react-spectrum/button';
14
- import {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';
14
+ import {AriaTagGroupProps, useTagGroup} from '@react-aria/tag';
15
15
  import {classNames, useDOMRef} from '@react-spectrum/utils';
16
- import {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';
16
+ import {DOMRef, SpectrumLabelableProps, StyleProps, Validation} from '@react-types/shared';
17
17
  import {Field} from '@react-spectrum/label';
18
- import {FocusScope} from '@react-aria/focus';
18
+ import {FocusRing, FocusScope} from '@react-aria/focus';
19
19
  // @ts-ignore
20
20
  import intlMessages from '../intl/*.json';
21
- import {ListCollection} from '@react-stately/list';
22
- import {Provider, useProviderProps} from '@react-spectrum/provider';
21
+ import {ListCollection, useListState} from '@react-stately/list';
22
+ import {ListKeyboardDelegate} from '@react-aria/selection';
23
+ import {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';
23
24
  import React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';
24
25
  import styles from '@adobe/spectrum-css-temp/components/tags/vars.css';
25
26
  import {Tag} from './Tag';
26
27
  import {useFormProps} from '@react-spectrum/form';
27
28
  import {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';
28
29
  import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';
29
- import {useTagGroupState} from '@react-stately/tag';
30
30
 
31
- export interface SpectrumTagGroupProps<T> extends AriaTagGroupProps<T>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {
31
+ const TAG_STYLES = {
32
+ medium: {
33
+ height: 24,
34
+ margin: 4
35
+ },
36
+ large: {
37
+ height: 30,
38
+ margin: 5
39
+ }
40
+ };
41
+
42
+ export interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'selectionMode' | 'disallowEmptySelection' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionBehavior' | 'disabledKeys'>, StyleProps, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, Omit<Validation, 'isRequired'> {
32
43
  /** The label to display on the action button. */
33
44
  actionLabel?: string,
34
45
  /** Handler that is called when the action button is pressed. */
35
- onAction?: () => void
46
+ onAction?: () => void,
47
+ /** Sets what the TagGroup should render when there are no tags to display. */
48
+ renderEmptyState?: () => JSX.Element,
49
+ /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */
50
+ maxRows?: number
36
51
  }
37
52
 
38
53
  function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {
39
54
  props = useProviderProps(props);
40
55
  props = useFormProps(props);
41
56
  let {
42
- allowsRemoving,
43
- onRemove,
44
57
  maxRows,
45
58
  children,
46
59
  actionLabel,
47
60
  onAction,
48
- labelPosition
61
+ labelPosition,
62
+ renderEmptyState = () => stringFormatter.format('noTags')
49
63
  } = props;
50
64
  let domRef = useDOMRef(ref);
51
65
  let containerRef = useRef(null);
52
66
  let tagsRef = useRef(null);
53
67
  let {direction} = useLocale();
68
+ let {scale} = useProvider();
54
69
  let stringFormatter = useLocalizedStringFormatter(intlMessages);
55
70
  let [isCollapsed, setIsCollapsed] = useState(maxRows != null);
56
- let state = useTagGroupState(props);
57
- let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});
58
- let keyboardDelegate = useMemo(() => (
59
- isCollapsed
60
- ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)
61
- : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)
62
- ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;
71
+ let state = useListState(props);
72
+ let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false});
73
+ let keyboardDelegate = useMemo(() => {
74
+ let collection = isCollapsed
75
+ ? new ListCollection([...state.collection].slice(0, tagState.visibleTagCount))
76
+ : new ListCollection([...state.collection]);
77
+ return new ListKeyboardDelegate({
78
+ collection,
79
+ ref: domRef,
80
+ direction,
81
+ orientation: 'horizontal'
82
+ });
83
+ }, [direction, isCollapsed, state.collection, tagState.visibleTagCount, domRef]) as ListKeyboardDelegate<T>;
63
84
  // Remove onAction from props so it doesn't make it into useGridList.
64
85
  delete props.onAction;
65
86
  let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);
66
87
  let actionsId = useId();
88
+ let actionsRef = useRef(null);
67
89
 
68
90
  let updateVisibleTagCount = useCallback(() => {
69
91
  if (maxRows > 0) {
@@ -71,17 +93,20 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
71
93
  // Refs can be null at runtime.
72
94
  let currContainerRef: HTMLDivElement | null = containerRef.current;
73
95
  let currTagsRef: HTMLDivElement | null = tagsRef.current;
74
- if (!currContainerRef || !currTagsRef) {
75
- return;
96
+ let currActionsRef: HTMLDivElement | null = actionsRef.current;
97
+ if (!currContainerRef || !currTagsRef || !currActionsRef || state.collection.size === 0) {
98
+ return {
99
+ visibleTagCount: 0,
100
+ showCollapseButton: false
101
+ };
76
102
  }
77
103
 
104
+ // Count rows and show tags until we hit the maxRows.
78
105
  let tags = [...currTagsRef.children];
79
- let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];
80
106
  let currY = -Infinity;
81
107
  let rowCount = 0;
82
108
  let index = 0;
83
109
  let tagWidths: number[] = [];
84
- // Count rows and show tags until we hit the maxRows.
85
110
  for (let tag of tags) {
86
111
  let {width, y} = tag.getBoundingClientRect();
87
112
 
@@ -98,36 +123,37 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
98
123
  }
99
124
 
100
125
  // Remove tags until there is space for the collapse button and action button (if present) on the last row.
101
- let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);
102
- buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;
103
- let end = direction === 'ltr' ? 'right' : 'left';
104
- let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];
105
- let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];
106
- lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);
107
- let availableWidth = containerEnd - lastTagEnd;
108
-
109
- while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {
110
- availableWidth += tagWidths.pop();
111
- index--;
126
+ let buttons = [...currActionsRef.children];
127
+ if (buttons.length > 0 && rowCount >= maxRows) {
128
+ let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);
129
+ buttonsWidth += TAG_STYLES[scale].margin * 2 * buttons.length;
130
+ let end = direction === 'ltr' ? 'right' : 'left';
131
+ let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];
132
+ let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];
133
+ lastTagEnd += TAG_STYLES[scale].margin;
134
+ let availableWidth = containerEnd - lastTagEnd;
135
+
136
+ while (availableWidth < buttonsWidth && index > 0) {
137
+ availableWidth += tagWidths.pop();
138
+ index--;
139
+ }
112
140
  }
113
- let tagStyle = window.getComputedStyle(tags[0]);
114
- let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;
141
+
115
142
  return {
116
- visibleTagCount: index,
117
- showCollapseButton: index < state.collection.size,
118
- maxHeight
143
+ visibleTagCount: Math.max(index, 1),
144
+ showCollapseButton: index < state.collection.size
119
145
  };
120
146
  };
121
147
 
122
148
  setTagState(function *() {
123
149
  // Update to show all items.
124
- yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};
150
+ yield {visibleTagCount: state.collection.size, showCollapseButton: true};
125
151
 
126
152
  // Measure, and update to show the items until maxRows is reached.
127
153
  yield computeVisibleTagCount();
128
154
  });
129
155
  }
130
- }, [maxRows, setTagState, direction, state.collection.size]);
156
+ }, [maxRows, setTagState, direction, scale, state.collection.size]);
131
157
 
132
158
  useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});
133
159
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -139,10 +165,10 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
139
165
  // eslint-disable-next-line react-hooks/exhaustive-deps
140
166
  }, []);
141
167
 
142
- let visibleTags = [...state.collection];
143
- if (maxRows != null && isCollapsed) {
144
- visibleTags = visibleTags.slice(0, tagState.visibleTagCount);
145
- }
168
+ let visibleTags = useMemo(() =>
169
+ [...state.collection].slice(0, isCollapsed ? tagState.visibleTagCount : state.collection.size),
170
+ [isCollapsed, state.collection, tagState.visibleTagCount]
171
+ );
146
172
 
147
173
  let handlePressCollapse = () => {
148
174
  // Prevents button from losing focus if focusedKey got collapsed.
@@ -151,6 +177,15 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
151
177
  };
152
178
 
153
179
  let showActions = tagState.showCollapseButton || (actionLabel && onAction);
180
+ let isEmpty = state.collection.size === 0;
181
+
182
+ let containerStyle = useMemo(() => {
183
+ if (maxRows == null || !isCollapsed || isEmpty) {
184
+ return undefined;
185
+ }
186
+ let maxHeight = (TAG_STYLES[scale].height + (TAG_STYLES[scale].margin * 2)) * maxRows;
187
+ return {maxHeight, overflow: 'hidden'};
188
+ }, [isCollapsed, maxRows, isEmpty, scale]);
154
189
 
155
190
  return (
156
191
  <FocusScope>
@@ -162,7 +197,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
162
197
  showErrorIcon
163
198
  ref={domRef}
164
199
  elementType="span"
165
- UNSAFE_className={
200
+ wrapperClassName={
166
201
  classNames(
167
202
  styles,
168
203
  'spectrum-Tags-fieldWrapper',
@@ -172,29 +207,43 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
172
207
  )
173
208
  }>
174
209
  <div
175
- style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}
176
210
  ref={containerRef}
177
- className={classNames(styles, 'spectrum-Tags-container')}>
178
- <div
179
- ref={tagsRef}
180
- {...gridProps}
181
- className={classNames(styles, 'spectrum-Tags')}>
182
- {visibleTags.map(item => (
183
- <Tag
184
- {...item.props}
185
- key={item.key}
186
- item={item}
187
- state={state}
188
- allowsRemoving={allowsRemoving}
189
- onRemove={onRemove}>
190
- {item.rendered}
191
- </Tag>
192
- ))}
193
- </div>
194
- {showActions &&
211
+ style={containerStyle}
212
+ className={
213
+ classNames(
214
+ styles,
215
+ 'spectrum-Tags-container',
216
+ {
217
+ 'spectrum-Tags-container--empty': isEmpty
218
+ }
219
+ )
220
+ }>
221
+ <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>
222
+ <div
223
+ ref={tagsRef}
224
+ {...gridProps}
225
+ className={classNames(styles, 'spectrum-Tags')}>
226
+ {visibleTags.map(item => (
227
+ <Tag
228
+ {...item.props}
229
+ key={item.key}
230
+ item={item}
231
+ state={state}>
232
+ {item.rendered}
233
+ </Tag>
234
+ ))}
235
+ {isEmpty && (
236
+ <div className={classNames(styles, 'spectrum-Tags-empty-state')}>
237
+ {renderEmptyState()}
238
+ </div>
239
+ )}
240
+ </div>
241
+ </FocusRing>
242
+ {showActions && !isEmpty &&
195
243
  <Provider isDisabled={false}>
196
244
  <div
197
245
  role="group"
246
+ ref={actionsRef}
198
247
  id={actionsId}
199
248
  aria-label={stringFormatter.format('actions')}
200
249
  aria-labelledby={`${gridProps.id} ${actionsId}`}