@react-spectrum/tag 3.0.0-nightly.3180 → 3.0.0-rc.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAoC;AACpC,GAA6B;AAC7B,GAAmC;AACnC,GAAsC;AACtC,GAAgC;AAChC,GAAoC;AACpC,GAAqC;AACrC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4B;AAC5B,GAAwC;AACxC,GAAyC;AACzC,GAA+C;AAC/C,GAAiC;AACjC,GAA+C;AAC/C,GAA4B;AAjB5B,yCAA+B,GAAG,CAAsB;AACxD,yCAAoC,GAAG,CAA2B;AAClE,yCAA6B,GAAG,CAAoB;AACpD,yCAAmC,GAAG,CAA0B;AAChE,yCAAsC,GAAG,CAA6B;AACtE,yCAAgC,GAAG,CAAuB;AAC1D,yCAAoC,GAAG,CAA2B;AAClE,yCAAqC,GAAG,CAA4B;AACpE,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;AACpD,yCAA4B,GAAG,CAAmB;AAClD,yCAAwC,GAAG,CAA+B;AAC1E,yCAAyC,GAAG,CAAgC;AAC5E,yCAA+C,GAAG,CAAsC;AACxF,yCAAiC,GAAG,CAAwB;AAC5D,yCAA+C,GAAG,CAAsC;AACxF,yCAA4B,GAAG,CAAmB;;;;;;;;;;;;SCMlC,yCAAG,CAAI,KAA0B,EAAE,CAAC;IAClD,KAAK,CAAC,CAAC,WACL,QAAQ,eACR,UAAU,gBACV,WAAW,SACX,IAAI,UACJ,KAAK,aACL,QAAQ,MACL,UAAU,CACf,CAAC,GAAG,KAAK;IAET,EAAa,AAAb,WAAa;IACb,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oBAAa,CAAC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,EAAE,MAAM;IAChB,KAAK,CAAC,CAAC,gBAAA,aAAa,EAAA,CAAC,GAAG,kBAAW,CAAC,KAAK,EAAE,SAAS;IAEpD,EAAiE,AAAjE,+DAAiE;IACjE,EAA6D,AAA7D,2DAA6D;IAC7D,GAAG,CAAC,CAAC,WAAA,QAAQ,MAAK,cAAc,CAAA,CAAC,GAAG,SAAS;IAC7C,MAAM,0CACH,CAAG;WACE,iBAAU,CAAC,UAAU,EAAE,aAAa,EAAE,cAAc;QACxD,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAa,cAAE,UAAU;QAC3B,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,GAAG,EAAE,MAAM;OACV,CAAC;WAAG,cAAc;IAAA,CAAC,CAAC,GAAG,EAAC,IAAI;;wDAC1B,yCAAG;eACE,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK;YAC5B,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,UAAU,IAAI,KAAK,CAAC,YAAY,CAAC,GAAG,QAAC,IAAI,aAAJ,IAAI,KAAJ,IAAI,CAAJ,CAAgB,GAAhB,IAAI,CAAJ,CAAgB,GAAhB,IAAI,CAAE,UAAU,CAAC,CAAC,uBAAlB,IAAI,CAAJ,CAAwB,GAAxB,IAAI,CAAJ,CAAwB,OAAH,GAAG;YACzE,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,QAAQ;WACjB,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ;;AAKtC,CAAC;AAED,KAAK,CAAC,yCAAS,iBAAG,YAAK,CAAC,UAAU,CAAC,8BAAQ","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","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\n/// <reference types=\"css-module-types\" />\n\nexport * 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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useMemo} from 'react';\nimport {SpectrumTagGroupProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {useGrid} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n isDisabled,\n isRemovable,\n onRemove,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let {direction} = useLocale();\n let listState = useListState(props);\n let gridCollection = useMemo(() => new GridCollection({\n columnCount: isRemovable ? 2 : 1,\n items: [...listState.collection].map(item => {\n let childNodes = [{\n ...item,\n index: 0,\n type: 'cell'\n }];\n\n // add column of clear buttons if removable\n if (isRemovable) {\n childNodes.push({\n key: `remove-${item.key}`,\n type: 'cell',\n index: 1,\n value: null,\n level: 0,\n rendered: null,\n textValue: item.textValue, // TODO localize?\n hasChildNodes: false,\n childNodes: []\n });\n }\n\n return {\n type: 'item',\n childNodes\n };\n })\n }), [listState.collection, isRemovable]);\n let state = useGridState({\n ...props,\n collection: gridCollection,\n focusMode: 'cell'\n });\n let keyboardDelegate = new TagKeyboardDelegate({\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n ref: domRef,\n direction,\n focusMode: 'cell'\n });\n let {gridProps} = useGrid({\n ...props,\n keyboardDelegate\n }, state, domRef);\n const {tagGroupProps} = useTagGroup(props, listState);\n\n // Don't want the grid to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherGridProps} = gridProps;\n return (\n <div\n {...mergeProps(styleProps, tagGroupProps, otherGridProps)}\n className={\n classNames(\n styles,\n 'spectrum-Tags',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n ref={domRef}>\n {[...gridCollection].map(item => (\n <Tag\n {...item.childNodes[0].props}\n key={item.key}\n item={item}\n state={state}\n isDisabled={isDisabled || state.disabledKeys.has(item?.childNodes[0]?.key)}\n isRemovable={isRemovable}\n onRemove={onRemove}>\n {item.childNodes[0].rendered}\n </Tag>\n ))}\n </div>\n );\n}\n\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as 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\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, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumTagProps} from '@react-types/tag';\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';\nimport {useTag} from '@react-aria/tag';\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n children,\n isDisabled,\n isRemovable,\n item,\n state,\n onRemove,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let labelRef = useRef();\n let tagRef = useRef();\n let tagRowRef = useRef();\n let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({\n ...props,\n isDisabled,\n isFocused,\n isRemovable,\n item,\n onRemove,\n tagRef,\n tagRowRef\n }, state);\n\n return (\n <div\n {...tagRowProps}>\n <div\n {...mergeProps(tagProps, hoverProps, focusProps)}\n role=\"gridcell\"\n className={classNames(\n styles,\n 'spectrum-Tags-item',\n {\n 'is-disabled': isDisabled,\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'not-removable': !isRemovable,\n 'is-hovered': isHovered\n },\n styleProps.className\n )}>\n <SlotProvider\n slots={{\n tagLabel: {UNSAFE_className: classNames(styles, 'spectrum-Tag-label')},\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': isRemovable})}\n }}>\n {typeof children === 'string' ? <div ref={labelRef} {...labelProps}><Text>{children}</Text></div> : children}\n {isRemovable && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n props = useSlotProps(props, 'tagRemoveButton');\n let {styleProps} = useStyleProps(props);\n let clearBtnRef = useRef();\n\n return (\n <span\n {...styleProps}\n ref={clearBtnRef}>\n <ClearButton\n preventFocus\n {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
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,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,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,kBAAkB,GAI9C,eAAe,0BACd,gCAAC,CAAA,GAAA,mBAAW;QACV,SAAA,IAAO;QACP,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;CD5NlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/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"}
package/dist/types.d.ts CHANGED
@@ -1,8 +1,16 @@
1
- import { DOMRef } from "@react-types/shared";
1
+ import { AriaTagGroupProps } from "@react-aria/tag";
2
+ import { DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps } from "@react-types/shared";
2
3
  import { ReactElement } from "react";
3
- import { SpectrumTagGroupProps } from "@react-types/tag";
4
+ export interface SpectrumTagGroupProps<T> extends AriaTagGroupProps<T>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {
5
+ /** The label to display on the action button. */
6
+ actionLabel?: string;
7
+ /** Handler that is called when the action button is pressed. */
8
+ onAction?: () => void;
9
+ }
10
+ /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
4
11
  export const TagGroup: <T>(props: SpectrumTagGroupProps<T> & {
5
12
  ref?: DOMRef<HTMLDivElement>;
6
13
  }) => ReactElement;
14
+ export { Item } from '@react-stately/collections';
7
15
 
8
16
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;ACwHA,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,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\n/// <reference types=\"css-module-types\" />\n\nexport * from './TagGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
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"}
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@react-spectrum/tag",
3
- "version": "3.0.0-nightly.3180+0bba35ae3",
3
+ "version": "3.0.0-rc.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
+ "exports": {
9
+ "types": "./dist/types.d.ts",
10
+ "import": "./dist/import.mjs",
11
+ "require": "./dist/main.js"
12
+ },
8
13
  "types": "dist/types.d.ts",
9
14
  "source": "src/index.ts",
10
15
  "files": [
@@ -31,32 +36,32 @@
31
36
  "url": "https://github.com/adobe/react-spectrum"
32
37
  },
33
38
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "3.0.0-nightly.1481+0bba35ae3",
36
- "@react-aria/grid": "3.2.5-nightly.3180+0bba35ae3",
37
- "@react-aria/i18n": "3.0.0-nightly.1481+0bba35ae3",
38
- "@react-aria/interactions": "3.0.0-nightly.1481+0bba35ae3",
39
- "@react-aria/tag": "3.0.0-nightly.3180+0bba35ae3",
40
- "@react-aria/utils": "3.0.0-nightly.1481+0bba35ae3",
41
- "@react-spectrum/button": "3.0.0-nightly.1481+0bba35ae3",
42
- "@react-spectrum/text": "3.1.7-nightly.3180+0bba35ae3",
43
- "@react-spectrum/utils": "3.0.0-nightly.1481+0bba35ae3",
44
- "@react-stately/collections": "3.0.0-nightly.1481+0bba35ae3",
45
- "@react-stately/grid": "3.1.4-nightly.3180+0bba35ae3",
46
- "@react-stately/list": "3.4.5-nightly.3180+0bba35ae3",
47
- "@react-types/shared": "3.0.0-nightly.1481+0bba35ae3",
48
- "@react-types/tag": "3.0.0-nightly.3180+0bba35ae3",
49
- "@spectrum-icons/workflow": "3.0.0-nightly.1481+0bba35ae3"
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"
50
55
  },
51
56
  "devDependencies": {
52
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1481+0bba35ae3"
57
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
53
58
  },
54
59
  "peerDependencies": {
55
60
  "@react-spectrum/provider": "^3.0.0",
56
- "react": "^16.8.0 || ^17.0.0-rc.1"
61
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
57
62
  },
58
63
  "publishConfig": {
59
64
  "access": "public"
60
65
  },
61
- "gitHead": "0bba35ae36b5d220570385215860d3ca3b549656"
66
+ "gitHead": "9d1ba9bd8ebcd63bf3495ade16d349bcb71795ce"
62
67
  }
package/src/Tag.tsx CHANGED
@@ -10,22 +10,25 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {classNames, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';
13
+ import {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';
14
14
  import {ClearButton} from '@react-spectrum/button';
15
15
  import {mergeProps} from '@react-aria/utils';
16
16
  import React, {useRef} from 'react';
17
- import {SpectrumTagProps} from '@react-types/tag';
18
17
  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';
19
20
  import {Text} from '@react-spectrum/text';
20
21
  import {useFocusRing} from '@react-aria/focus';
21
22
  import {useHover} from '@react-aria/interactions';
22
23
  import {useTag} from '@react-aria/tag';
23
24
 
25
+ export interface SpectrumTagProps<T> extends TagProps<T> {
26
+ state: TagGroupState<T>
27
+ }
28
+
24
29
  export function Tag<T>(props: SpectrumTagProps<T>) {
25
30
  const {
26
- children,
27
- isDisabled,
28
- isRemovable,
31
+ allowsRemoving,
29
32
  item,
30
33
  state,
31
34
  onRemove,
@@ -34,48 +37,44 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
34
37
 
35
38
  // @ts-ignore
36
39
  let {styleProps} = useStyleProps(otherProps);
37
- let {hoverProps, isHovered} = useHover({isDisabled});
40
+ let {hoverProps, isHovered} = useHover({});
38
41
  let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});
39
- let labelRef = useRef();
40
- let tagRef = useRef();
41
- let tagRowRef = useRef();
42
- let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({
42
+ let ref = useRef();
43
+ let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({
43
44
  ...props,
44
- isDisabled,
45
- isFocused,
46
- isRemovable,
45
+ allowsRemoving,
47
46
  item,
48
- onRemove,
49
- tagRef,
50
- tagRowRef
51
- }, state);
47
+ onRemove
48
+ }, state, ref);
52
49
 
53
50
  return (
54
51
  <div
55
- {...tagRowProps}>
56
- <div
57
- {...mergeProps(tagProps, hoverProps, focusProps)}
58
- role="gridcell"
59
- className={classNames(
52
+ {...mergeProps(rowProps, hoverProps, focusProps)}
53
+ className={classNames(
60
54
  styles,
61
- 'spectrum-Tags-item',
62
- {
63
- 'is-disabled': isDisabled,
64
- 'focus-ring': isFocusVisible,
65
- 'is-focused': isFocused,
66
- 'not-removable': !isRemovable,
67
- 'is-hovered': isHovered
68
- },
55
+ 'spectrum-Tag',
56
+ {
57
+ 'focus-ring': isFocusVisible,
58
+ 'is-focused': isFocused,
59
+ 'is-hovered': isHovered,
60
+ 'spectrum-Tag--removable': allowsRemoving
61
+ },
69
62
  styleProps.className
70
- )}>
63
+ )}
64
+ ref={ref}>
65
+ <div
66
+ className={classNames(styles, 'spectrum-Tag-cell')}
67
+ {...gridCellProps}>
71
68
  <SlotProvider
72
69
  slots={{
73
- tagLabel: {UNSAFE_className: classNames(styles, 'spectrum-Tag-label')},
74
70
  icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},
75
- text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': isRemovable})}
71
+ text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content'), ...labelProps},
72
+ avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}
76
73
  }}>
77
- {typeof children === 'string' ? <div ref={labelRef} {...labelProps}><Text>{children}</Text></div> : children}
78
- {isRemovable && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}
74
+ {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}
75
+ <ClearSlots>
76
+ {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}
77
+ </ClearSlots>
79
78
  </SlotProvider>
80
79
  </div>
81
80
  </div>
@@ -83,17 +82,11 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
83
82
  }
84
83
 
85
84
  function TagRemoveButton(props) {
86
- props = useSlotProps(props, 'tagRemoveButton');
87
85
  let {styleProps} = useStyleProps(props);
88
- let clearBtnRef = useRef();
89
86
 
90
87
  return (
91
- <span
92
- {...styleProps}
93
- ref={clearBtnRef}>
94
- <ClearButton
95
- preventFocus
96
- {...props} />
88
+ <span {...styleProps}>
89
+ <ClearButton {...props} />
97
90
  </span>
98
91
  );
99
92
  }