@react-spectrum/actiongroup 3.5.2-nightly.3349 → 3.5.2-nightly.3353

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -409,6 +409,7 @@ function $9f46a6387592b67c$var$ActionGroupItem({ item: item , state: state , isD
409
409
  let { hoverProps: hoverProps , isHovered: isHovered } = $8vZTF$reactariainteractions.useHover({
410
410
  isDisabled: isDisabled
411
411
  });
412
+ let domProps = $8vZTF$reactariautils.filterDOMProps(item.props);
412
413
  if (onAction && !isDisabled) buttonProps = $8vZTF$reactariautils.mergeProps(buttonProps, {
413
414
  onPress: ()=>onAction(item.key)
414
415
  });
@@ -426,7 +427,7 @@ function $9f46a6387592b67c$var$ActionGroupItem({ item: item , state: state , isD
426
427
  ]);
427
428
  let button = // Use a PressResponder to send DOM props through.
428
429
  // ActionButton doesn't allow overriding the role by default.
429
- /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactariainteractions.PressResponder, $8vZTF$reactariautils.mergeProps(buttonProps, hoverProps), /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactspectrumutils.ClearSlots, null, /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactspectrumutils.SlotProvider, {
430
+ /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactariainteractions.PressResponder, $8vZTF$reactariautils.mergeProps(buttonProps, hoverProps, domProps), /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactspectrumutils.ClearSlots, null, /*#__PURE__*/ ($parcel$interopDefault($8vZTF$react)).createElement($8vZTF$reactspectrumutils.SlotProvider, {
430
431
  slots: {
431
432
  text: {
432
433
  id: hideButtonText ? textId : null,
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAW,CAAC,OAAoB,EAAE,eAAwB,EAAE,kBAA2B,EAAE,CAAC;IACjG,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO;IAC3C,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,eAAe,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,SAAS,MAAM,kBAAkB,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,YAAY;AACzI,CAAC;SAEQ,8BAAQ,CAAC,KAAa,EAAE,CAAC;IAChC,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE;IAC/B,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM;AACnC,CAAC","sources":["packages/@react-spectrum/actiongroup/src/index.ts","packages/@react-spectrum/actiongroup/src/ActionGroup.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@adobe/spectrum-css-temp/components/actiongroup/vars.css"],"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 './ActionGroup';\nexport {Item} from '@react-stately/collections';\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 {AriaLabelingProps, DOMProps, DOMRef, Node, StyleProps} from '@react-types/shared';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n ClearSlots,\n SlotProvider,\n useDOMRef,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {filterDOMProps, mergeProps, useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {ListState, useListState} from '@react-stately/list';\nimport More from '@spectrum-icons/workflow/More';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {forwardRef, Key, ReactElement, ReactNode, useCallback, useMemo, useRef, useState} from 'react';\nimport {SpectrumActionGroupProps} from '@react-types/actiongroup';\nimport styles from '@adobe/spectrum-css-temp/components/actiongroup/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useActionGroup} from '@react-aria/actiongroup';\nimport {useActionGroupItem} from '@react-aria/actiongroup';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionGroup<T extends object>(props: SpectrumActionGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionGroup');\n\n let {\n isEmphasized,\n density,\n isJustified,\n isDisabled,\n orientation = 'horizontal',\n isQuiet,\n staticColor,\n overflowMode = 'wrap',\n onAction,\n buttonLabelBehavior,\n summaryIcon,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n let state = useListState({...props, suppressTextValueWarning: true});\n let {actionGroupProps} = useActionGroup(props, state, domRef);\n let isVertical = orientation === 'vertical';\n let providerProps = {isEmphasized, isDisabled, isQuiet};\n let {styleProps} = useStyleProps(props);\n\n // Only hide button text if every item contains more than just plain text (we assume an icon).\n let isIconCollapsible = useMemo(() => [...state.collection].every(item => typeof item.rendered !== 'string'), [state.collection]);\n let [{visibleItems, hideButtonText, isMeasuring}, setVisibleItems] = useValueEffect({\n visibleItems: state.collection.size,\n hideButtonText: buttonLabelBehavior === 'hide' && isIconCollapsible,\n isMeasuring: false\n });\n\n let selectionMode = state.selectionManager.selectionMode;\n let updateOverflow = useCallback(() => {\n if (overflowMode === 'wrap') {\n return;\n }\n\n if (orientation === 'vertical' && selectionMode !== 'none') {\n // Collapsing vertical action groups with selection is currently unsupported by Spectrum.\n return;\n }\n\n let computeVisibleItems = (visibleItems: number) => {\n let listItems = Array.from(domRef.current.children) as HTMLLIElement[];\n let containerSize = orientation === 'horizontal' ? wrapperRef.current.offsetWidth : wrapperRef.current.offsetHeight;\n let isShowingMenu = visibleItems < state.collection.size;\n let calculatedSize = 0;\n let newVisibleItems = 0;\n\n if (isShowingMenu) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(listItems.pop(), false, true)\n : outerHeight(listItems.pop(), false, true);\n }\n\n for (let [i, item] of listItems.entries()) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(item, i === 0, i === listItems.length - 1)\n : outerHeight(item, i === 0, i === listItems.length - 1);\n if (calculatedSize <= containerSize) {\n newVisibleItems++;\n } else {\n break;\n }\n }\n\n // If selection is enabled, and not all of the items fit, collapse all of them into a dropdown\n // immediately rather than having some visible and some not.\n if (selectionMode !== 'none' && newVisibleItems < state.collection.size) {\n return 0;\n }\n\n return newVisibleItems;\n };\n\n setVisibleItems(function *() {\n let hideButtonText = buttonLabelBehavior === 'hide' && isIconCollapsible;\n\n // Update to show all items.\n yield {\n visibleItems: state.collection.size,\n hideButtonText,\n isMeasuring: true\n };\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(state.collection.size);\n let isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n\n // If not all of the buttons fit, and buttonLabelBehavior is 'collapse', then first try hiding\n // the button text and only showing icons. Only if that still doesn't fit collapse into a menu.\n if (newVisibleItems < state.collection.size && buttonLabelBehavior === 'collapse' && isIconCollapsible) {\n yield {\n visibleItems: state.collection.size,\n hideButtonText: true,\n isMeasuring: true\n };\n\n newVisibleItems = computeVisibleItems(state.collection.size);\n isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n hideButtonText = true;\n }\n\n yield {\n visibleItems: newVisibleItems,\n hideButtonText,\n isMeasuring\n };\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (isMeasuring) {\n yield {\n visibleItems: computeVisibleItems(newVisibleItems),\n hideButtonText,\n isMeasuring: false\n };\n }\n });\n }, [domRef, state.collection, setVisibleItems, overflowMode, selectionMode, buttonLabelBehavior, isIconCollapsible, orientation]);\n\n // Watch the parent element for size changes. Watching only the action group itself may not work\n // in all scenarios because it may not shrink when available space is reduced.\n let parentRef = useMemo(() => ({\n get current() {\n return wrapperRef.current.parentElement;\n }\n }), [wrapperRef]);\n useResizeObserver({ref: overflowMode !== 'wrap' ? parentRef : null, onResize: updateOverflow});\n useLayoutEffect(updateOverflow, [updateOverflow, state.collection]);\n\n let children = [...state.collection];\n let menuItem = null;\n let menuProps = {};\n\n // If there are no visible items, don't apply any props to the action group container\n // and pass all aria labeling props through to the menu button.\n if (overflowMode === 'collapse' && visibleItems === 0) {\n menuProps = filterDOMProps(props, {labelable: true});\n actionGroupProps = {};\n }\n\n if (overflowMode === 'collapse' && visibleItems < state.collection.size) {\n let menuChildren = children.slice(visibleItems);\n children = children.slice(0, visibleItems);\n menuItem = (\n <ActionGroupMenu\n {...menuProps}\n items={menuChildren}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n state={state}\n summaryIcon={summaryIcon}\n hideButtonText={hideButtonText}\n isOnlyItem={visibleItems === 0}\n orientation={orientation} />\n );\n }\n\n let style = {\n ...styleProps.style,\n // While measuring, take up as much space as possible.\n flexBasis: isMeasuring ? '100%' : undefined\n };\n\n return (\n <div {...styleProps} style={style} className={classNames(styles, 'flex-container', styleProps.className)} ref={wrapperRef}>\n <div\n {...actionGroupProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'flex-gap',\n 'spectrum-ActionGroup',\n {\n 'spectrum-ActionGroup--quiet': isQuiet,\n 'spectrum-ActionGroup--vertical': isVertical,\n 'spectrum-ActionGroup--compact': density === 'compact',\n 'spectrum-ActionGroup--justified': isJustified && !isMeasuring,\n 'spectrum-ActionGroup--overflowCollapse': overflowMode === 'collapse'\n },\n otherProps.UNSAFE_className\n )\n }>\n <Provider {...providerProps}>\n {children.map((item) => (\n <ActionGroupItem\n key={item.key}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n item={item}\n state={state}\n hideButtonText={hideButtonText}\n orientation={orientation} />\n ))}\n {menuItem}\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * An ActionGroup is a grouping of ActionButtons that are related to one another.\n */\nconst _ActionGroup = forwardRef(ActionGroup) as <T>(props: SpectrumActionGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionGroup as ActionGroup};\n\ninterface ActionGroupItemProps<T> extends DOMProps, StyleProps {\n item: Node<T>,\n state: ListState<T>,\n isDisabled: boolean,\n isEmphasized: boolean,\n staticColor?: 'white' | 'black',\n hideButtonText?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor, onAction, hideButtonText, orientation}: ActionGroupItemProps<T>) {\n let ref = useRef();\n let {buttonProps} = useActionGroupItem({key: item.key}, state);\n isDisabled = isDisabled || state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n if (onAction && !isDisabled) {\n buttonProps = mergeProps(buttonProps, {\n onPress: () => onAction(item.key)\n });\n }\n\n // If button text is hidden, we need to show it as a tooltip instead, so\n // go find the text element in the DOM after rendering.\n let textId = useId();\n let [textContent, setTextContent] = useState('');\n useLayoutEffect(() => {\n if (hideButtonText) {\n setTextContent(document.getElementById(textId)?.textContent);\n }\n }, [hideButtonText, item.rendered, textId]);\n\n let button = (\n // Use a PressResponder to send DOM props through.\n // ActionButton doesn't allow overriding the role by default.\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText\n }\n }}>\n <ActionButton\n ref={ref}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n {\n 'is-selected': isSelected,\n 'is-hovered': isHovered,\n 'spectrum-ActionGroup-item--iconOnly': hideButtonText,\n 'spectrum-ActionGroup-item--isDisabled': isDisabled\n },\n classNames(\n buttonStyles,\n {\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'is-selected': isSelected\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}\n aria-label={item['aria-label']}\n aria-labelledby={item['aria-label'] == null && hideButtonText ? textId : undefined}>\n {item.rendered}\n </ActionButton>\n </SlotProvider>\n </ClearSlots>\n </PressResponder>\n );\n\n if (hideButtonText && textContent) {\n button = (\n <TooltipTrigger placement={orientation === 'vertical' ? 'end' : 'top'}>\n {button}\n <Tooltip>{textContent}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.wrapper) {\n button = item.wrapper(button);\n }\n\n return button;\n}\n\ninterface ActionGroupMenuProps<T> extends AriaLabelingProps {\n state: ListState<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n staticColor?: 'white' | 'black',\n items: Node<T>[],\n hideButtonText?: boolean,\n summaryIcon?: ReactNode,\n isOnlyItem?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupMenu<T>({state, isDisabled, isEmphasized, staticColor, items, onAction, summaryIcon, hideButtonText, isOnlyItem, orientation, ...otherProps}: ActionGroupMenuProps<T>) {\n // Use the key of the first item within the menu as the key of the button.\n // The key must actually exist in the collection for focus to work correctly.\n let key = items[0].key;\n let {buttonProps} = useActionGroupItem({key}, state);\n\n // The menu button shouldn't act like an actual action group item.\n delete buttonProps.onPress;\n delete buttonProps.role;\n delete buttonProps['aria-checked'];\n\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // If no aria-label or aria-labelledby is given, provide a default one.\n let ariaLabel = otherProps['aria-label'] || (otherProps['aria-labelledby'] ? null : '…');\n let ariaLabelledby = otherProps['aria-labelledby'];\n let textId = useId();\n let id = useId();\n\n // Summary icon only applies when selection is enabled.\n if (state.selectionManager.selectionMode === 'none') {\n summaryIcon = null;\n }\n\n let iconOnly = false;\n\n // If there is a selection, show the selected state on the menu button.\n let isSelected = state.selectionManager.selectionMode !== 'none' && !state.selectionManager.isEmpty;\n\n // If single selection and empty selection is not allowed, swap the contents of the button to the selected item (like a Picker).\n if (!summaryIcon && state.selectionManager.selectionMode === 'single' && state.selectionManager.disallowEmptySelection) {\n let selectedItem = state.collection.getItem(state.selectionManager.firstSelectedKey);\n if (selectedItem) {\n summaryIcon = selectedItem.rendered;\n if (typeof summaryIcon === 'string') {\n summaryIcon = <Text>{summaryIcon}</Text>;\n }\n iconOnly = hideButtonText;\n ariaLabelledby = `${ariaLabelledby ?? id} ${textId}`;\n }\n }\n\n if (summaryIcon) {\n // If there's a custom summary icon, also add a chevron.\n summaryIcon = (\n <>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-ActionGroup-menu-chevron')} />\n <span className={classNames(styles, 'spectrum-ActionGroup-menu-contents', {'spectrum-ActionGroup-item--iconOnly': iconOnly})}>\n {summaryIcon}\n </span>\n </>\n );\n }\n\n return (\n // Use a PressResponder to send DOM props through.\n <MenuTrigger align={isOnlyItem ? 'start' : 'end'} direction={orientation === 'vertical' ? 'end' : 'bottom'}>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText,\n UNSAFE_className: classNames(styles, 'spectrum-ActionGroup-menu-text')\n }\n }}>\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ActionButton\n {...otherProps}\n id={id}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n 'spectrum-ActionGroup-menu',\n {\n 'is-hovered': isHovered,\n 'is-selected': isSelected\n },\n classNames(\n buttonStyles,\n {\n 'is-selected': isSelected,\n 'spectrum-ActionButton--emphasized': isEmphasized\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}>\n {summaryIcon || <More />}\n </ActionButton>\n </PressResponder>\n </SlotProvider>\n <Menu\n items={items}\n disabledKeys={state.disabledKeys}\n selectionMode={state.selectionManager.selectionMode}\n selectedKeys={state.selectionManager.selectedKeys}\n disallowEmptySelection={state.selectionManager.disallowEmptySelection}\n onSelectionChange={(keys) => state.selectionManager.setSelectedKeys(keys)}\n onAction={onAction}>\n {node => <Item textValue={node.textValue}>{node.rendered}</Item>}\n </Menu>\n </MenuTrigger>\n );\n}\n\nfunction outerWidth(element: HTMLElement, ignoreLeftMargin: boolean, ignoreRightMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetWidth + (ignoreLeftMargin ? 0 : toNumber(style.marginLeft)) + (ignoreRightMargin ? 0 : toNumber(style.marginRight));\n}\n\n\nfunction outerHeight(element: HTMLElement, ignoreTopMargin: boolean, ignoreBottomMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetHeight + (ignoreTopMargin ? 0 : toNumber(style.marginTop)) + (ignoreBottomMargin ? 0 : toNumber(style.marginBottom));\n}\n\nfunction toNumber(value: string) {\n let parsed = parseInt(value, 10);\n return isNaN(parsed) ? 0 : parsed;\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\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAyB;AACzB,GAA6C;AAC7C,GAAsD;AACtD,GAA6C;AAC7C,GAA4B;AAC5B,GAA2B;AAC3B,GAAsC;AACtC,GAA0C;AAC1C,GAA4C;AAC5C,GAA0C;AAC1C,GAAiD;AACjD,GAAwC;AACxC,GAA6B;AAC7B,GAAoD;AACpD,GAAoD;AACpD,GAA2C;AAC3C,GAA0C;AAC1C,GAAgC;AAChC,GAA+C;AAjC/C,yCAAiC,GAAG,CAAwB;AAC5D,wCAAuC,GAAG,CAA8B;AACxE,yCAAsC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-spectrum/actiongroup/src/ActionGroup.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@adobe/spectrum-css-temp/components/actiongroup/vars.css"],"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 './ActionGroup';\nexport {Item} from '@react-stately/collections';\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 {AriaLabelingProps, DOMProps, DOMRef, Node, StyleProps} from '@react-types/shared';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n ClearSlots,\n SlotProvider,\n useDOMRef,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {filterDOMProps, mergeProps, useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {ListState, useListState} from '@react-stately/list';\nimport More from '@spectrum-icons/workflow/More';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {forwardRef, Key, ReactElement, ReactNode, useCallback, useMemo, useRef, useState} from 'react';\nimport {SpectrumActionGroupProps} from '@react-types/actiongroup';\nimport styles from '@adobe/spectrum-css-temp/components/actiongroup/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useActionGroup} from '@react-aria/actiongroup';\nimport {useActionGroupItem} from '@react-aria/actiongroup';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionGroup<T extends object>(props: SpectrumActionGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionGroup');\n\n let {\n isEmphasized,\n density,\n isJustified,\n isDisabled,\n orientation = 'horizontal',\n isQuiet,\n staticColor,\n overflowMode = 'wrap',\n onAction,\n buttonLabelBehavior,\n summaryIcon,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n let state = useListState({...props, suppressTextValueWarning: true});\n let {actionGroupProps} = useActionGroup(props, state, domRef);\n let isVertical = orientation === 'vertical';\n let providerProps = {isEmphasized, isDisabled, isQuiet};\n let {styleProps} = useStyleProps(props);\n\n // Only hide button text if every item contains more than just plain text (we assume an icon).\n let isIconCollapsible = useMemo(() => [...state.collection].every(item => typeof item.rendered !== 'string'), [state.collection]);\n let [{visibleItems, hideButtonText, isMeasuring}, setVisibleItems] = useValueEffect({\n visibleItems: state.collection.size,\n hideButtonText: buttonLabelBehavior === 'hide' && isIconCollapsible,\n isMeasuring: false\n });\n\n let selectionMode = state.selectionManager.selectionMode;\n let updateOverflow = useCallback(() => {\n if (overflowMode === 'wrap') {\n return;\n }\n\n if (orientation === 'vertical' && selectionMode !== 'none') {\n // Collapsing vertical action groups with selection is currently unsupported by Spectrum.\n return;\n }\n\n let computeVisibleItems = (visibleItems: number) => {\n let listItems = Array.from(domRef.current.children) as HTMLLIElement[];\n let containerSize = orientation === 'horizontal' ? wrapperRef.current.offsetWidth : wrapperRef.current.offsetHeight;\n let isShowingMenu = visibleItems < state.collection.size;\n let calculatedSize = 0;\n let newVisibleItems = 0;\n\n if (isShowingMenu) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(listItems.pop(), false, true)\n : outerHeight(listItems.pop(), false, true);\n }\n\n for (let [i, item] of listItems.entries()) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(item, i === 0, i === listItems.length - 1)\n : outerHeight(item, i === 0, i === listItems.length - 1);\n if (calculatedSize <= containerSize) {\n newVisibleItems++;\n } else {\n break;\n }\n }\n\n // If selection is enabled, and not all of the items fit, collapse all of them into a dropdown\n // immediately rather than having some visible and some not.\n if (selectionMode !== 'none' && newVisibleItems < state.collection.size) {\n return 0;\n }\n\n return newVisibleItems;\n };\n\n setVisibleItems(function *() {\n let hideButtonText = buttonLabelBehavior === 'hide' && isIconCollapsible;\n\n // Update to show all items.\n yield {\n visibleItems: state.collection.size,\n hideButtonText,\n isMeasuring: true\n };\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(state.collection.size);\n let isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n\n // If not all of the buttons fit, and buttonLabelBehavior is 'collapse', then first try hiding\n // the button text and only showing icons. Only if that still doesn't fit collapse into a menu.\n if (newVisibleItems < state.collection.size && buttonLabelBehavior === 'collapse' && isIconCollapsible) {\n yield {\n visibleItems: state.collection.size,\n hideButtonText: true,\n isMeasuring: true\n };\n\n newVisibleItems = computeVisibleItems(state.collection.size);\n isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n hideButtonText = true;\n }\n\n yield {\n visibleItems: newVisibleItems,\n hideButtonText,\n isMeasuring\n };\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (isMeasuring) {\n yield {\n visibleItems: computeVisibleItems(newVisibleItems),\n hideButtonText,\n isMeasuring: false\n };\n }\n });\n }, [domRef, state.collection, setVisibleItems, overflowMode, selectionMode, buttonLabelBehavior, isIconCollapsible, orientation]);\n\n // Watch the parent element for size changes. Watching only the action group itself may not work\n // in all scenarios because it may not shrink when available space is reduced.\n let parentRef = useMemo(() => ({\n get current() {\n return wrapperRef.current.parentElement;\n }\n }), [wrapperRef]);\n useResizeObserver({ref: overflowMode !== 'wrap' ? parentRef : null, onResize: updateOverflow});\n useLayoutEffect(updateOverflow, [updateOverflow, state.collection]);\n\n let children = [...state.collection];\n let menuItem = null;\n let menuProps = {};\n\n // If there are no visible items, don't apply any props to the action group container\n // and pass all aria labeling props through to the menu button.\n if (overflowMode === 'collapse' && visibleItems === 0) {\n menuProps = filterDOMProps(props, {labelable: true});\n actionGroupProps = {};\n }\n\n if (overflowMode === 'collapse' && visibleItems < state.collection.size) {\n let menuChildren = children.slice(visibleItems);\n children = children.slice(0, visibleItems);\n menuItem = (\n <ActionGroupMenu\n {...menuProps}\n items={menuChildren}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n state={state}\n summaryIcon={summaryIcon}\n hideButtonText={hideButtonText}\n isOnlyItem={visibleItems === 0}\n orientation={orientation} />\n );\n }\n\n let style = {\n ...styleProps.style,\n // While measuring, take up as much space as possible.\n flexBasis: isMeasuring ? '100%' : undefined\n };\n\n return (\n <div {...styleProps} style={style} className={classNames(styles, 'flex-container', styleProps.className)} ref={wrapperRef}>\n <div\n {...actionGroupProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'flex-gap',\n 'spectrum-ActionGroup',\n {\n 'spectrum-ActionGroup--quiet': isQuiet,\n 'spectrum-ActionGroup--vertical': isVertical,\n 'spectrum-ActionGroup--compact': density === 'compact',\n 'spectrum-ActionGroup--justified': isJustified && !isMeasuring,\n 'spectrum-ActionGroup--overflowCollapse': overflowMode === 'collapse'\n },\n otherProps.UNSAFE_className\n )\n }>\n <Provider {...providerProps}>\n {children.map((item) => (\n <ActionGroupItem\n key={item.key}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n item={item}\n state={state}\n hideButtonText={hideButtonText}\n orientation={orientation} />\n ))}\n {menuItem}\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * An ActionGroup is a grouping of ActionButtons that are related to one another.\n */\nconst _ActionGroup = forwardRef(ActionGroup) as <T>(props: SpectrumActionGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionGroup as ActionGroup};\n\ninterface ActionGroupItemProps<T> extends DOMProps, StyleProps {\n item: Node<T>,\n state: ListState<T>,\n isDisabled: boolean,\n isEmphasized: boolean,\n staticColor?: 'white' | 'black',\n hideButtonText?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor, onAction, hideButtonText, orientation}: ActionGroupItemProps<T>) {\n let ref = useRef();\n let {buttonProps} = useActionGroupItem({key: item.key}, state);\n isDisabled = isDisabled || state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domProps = filterDOMProps(item.props);\n\n if (onAction && !isDisabled) {\n buttonProps = mergeProps(buttonProps, {\n onPress: () => onAction(item.key)\n });\n }\n\n // If button text is hidden, we need to show it as a tooltip instead, so\n // go find the text element in the DOM after rendering.\n let textId = useId();\n let [textContent, setTextContent] = useState('');\n useLayoutEffect(() => {\n if (hideButtonText) {\n setTextContent(document.getElementById(textId)?.textContent);\n }\n }, [hideButtonText, item.rendered, textId]);\n\n let button = (\n // Use a PressResponder to send DOM props through.\n // ActionButton doesn't allow overriding the role by default.\n <PressResponder {...mergeProps(buttonProps, hoverProps, domProps)}>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText\n }\n }}>\n <ActionButton\n ref={ref}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n {\n 'is-selected': isSelected,\n 'is-hovered': isHovered,\n 'spectrum-ActionGroup-item--iconOnly': hideButtonText,\n 'spectrum-ActionGroup-item--isDisabled': isDisabled\n },\n classNames(\n buttonStyles,\n {\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'is-selected': isSelected\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}\n aria-label={item['aria-label']}\n aria-labelledby={item['aria-label'] == null && hideButtonText ? textId : undefined}>\n {item.rendered}\n </ActionButton>\n </SlotProvider>\n </ClearSlots>\n </PressResponder>\n );\n\n if (hideButtonText && textContent) {\n button = (\n <TooltipTrigger placement={orientation === 'vertical' ? 'end' : 'top'}>\n {button}\n <Tooltip>{textContent}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.wrapper) {\n button = item.wrapper(button);\n }\n\n return button;\n}\n\ninterface ActionGroupMenuProps<T> extends AriaLabelingProps {\n state: ListState<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n staticColor?: 'white' | 'black',\n items: Node<T>[],\n hideButtonText?: boolean,\n summaryIcon?: ReactNode,\n isOnlyItem?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupMenu<T>({state, isDisabled, isEmphasized, staticColor, items, onAction, summaryIcon, hideButtonText, isOnlyItem, orientation, ...otherProps}: ActionGroupMenuProps<T>) {\n // Use the key of the first item within the menu as the key of the button.\n // The key must actually exist in the collection for focus to work correctly.\n let key = items[0].key;\n let {buttonProps} = useActionGroupItem({key}, state);\n\n // The menu button shouldn't act like an actual action group item.\n delete buttonProps.onPress;\n delete buttonProps.role;\n delete buttonProps['aria-checked'];\n\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // If no aria-label or aria-labelledby is given, provide a default one.\n let ariaLabel = otherProps['aria-label'] || (otherProps['aria-labelledby'] ? null : '…');\n let ariaLabelledby = otherProps['aria-labelledby'];\n let textId = useId();\n let id = useId();\n\n // Summary icon only applies when selection is enabled.\n if (state.selectionManager.selectionMode === 'none') {\n summaryIcon = null;\n }\n\n let iconOnly = false;\n\n // If there is a selection, show the selected state on the menu button.\n let isSelected = state.selectionManager.selectionMode !== 'none' && !state.selectionManager.isEmpty;\n\n // If single selection and empty selection is not allowed, swap the contents of the button to the selected item (like a Picker).\n if (!summaryIcon && state.selectionManager.selectionMode === 'single' && state.selectionManager.disallowEmptySelection) {\n let selectedItem = state.collection.getItem(state.selectionManager.firstSelectedKey);\n if (selectedItem) {\n summaryIcon = selectedItem.rendered;\n if (typeof summaryIcon === 'string') {\n summaryIcon = <Text>{summaryIcon}</Text>;\n }\n iconOnly = hideButtonText;\n ariaLabelledby = `${ariaLabelledby ?? id} ${textId}`;\n }\n }\n\n if (summaryIcon) {\n // If there's a custom summary icon, also add a chevron.\n summaryIcon = (\n <>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-ActionGroup-menu-chevron')} />\n <span className={classNames(styles, 'spectrum-ActionGroup-menu-contents', {'spectrum-ActionGroup-item--iconOnly': iconOnly})}>\n {summaryIcon}\n </span>\n </>\n );\n }\n\n return (\n // Use a PressResponder to send DOM props through.\n <MenuTrigger align={isOnlyItem ? 'start' : 'end'} direction={orientation === 'vertical' ? 'end' : 'bottom'}>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText,\n UNSAFE_className: classNames(styles, 'spectrum-ActionGroup-menu-text')\n }\n }}>\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ActionButton\n {...otherProps}\n id={id}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n 'spectrum-ActionGroup-menu',\n {\n 'is-hovered': isHovered,\n 'is-selected': isSelected\n },\n classNames(\n buttonStyles,\n {\n 'is-selected': isSelected,\n 'spectrum-ActionButton--emphasized': isEmphasized\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}>\n {summaryIcon || <More />}\n </ActionButton>\n </PressResponder>\n </SlotProvider>\n <Menu\n items={items}\n disabledKeys={state.disabledKeys}\n selectionMode={state.selectionManager.selectionMode}\n selectedKeys={state.selectionManager.selectedKeys}\n disallowEmptySelection={state.selectionManager.disallowEmptySelection}\n onSelectionChange={(keys) => state.selectionManager.setSelectedKeys(keys)}\n onAction={onAction}>\n {node => <Item textValue={node.textValue}>{node.rendered}</Item>}\n </Menu>\n </MenuTrigger>\n );\n}\n\nfunction outerWidth(element: HTMLElement, ignoreLeftMargin: boolean, ignoreRightMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetWidth + (ignoreLeftMargin ? 0 : toNumber(style.marginLeft)) + (ignoreRightMargin ? 0 : toNumber(style.marginRight));\n}\n\n\nfunction outerHeight(element: HTMLElement, ignoreTopMargin: boolean, ignoreBottomMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetHeight + (ignoreTopMargin ? 0 : toNumber(style.marginTop)) + (ignoreBottomMargin ? 0 : toNumber(style.marginBottom));\n}\n\nfunction toNumber(value: string) {\n let parsed = parseInt(value, 10);\n return isNaN(parsed) ? 0 : parsed;\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\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -391,6 +391,7 @@ function $a04ee251ffcc2690$var$ActionGroupItem({ item: item , state: state , isD
391
391
  let { hoverProps: hoverProps , isHovered: isHovered } = $8i8bG$useHover({
392
392
  isDisabled: isDisabled
393
393
  });
394
+ let domProps = $8i8bG$filterDOMProps(item.props);
394
395
  if (onAction && !isDisabled) buttonProps = $8i8bG$mergeProps(buttonProps, {
395
396
  onPress: ()=>onAction(item.key)
396
397
  });
@@ -408,7 +409,7 @@ function $a04ee251ffcc2690$var$ActionGroupItem({ item: item , state: state , isD
408
409
  ]);
409
410
  let button = // Use a PressResponder to send DOM props through.
410
411
  // ActionButton doesn't allow overriding the role by default.
411
- /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$PressResponder, $8i8bG$mergeProps(buttonProps, hoverProps), /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$ClearSlots, null, /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$SlotProvider, {
412
+ /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$PressResponder, $8i8bG$mergeProps(buttonProps, hoverProps, domProps), /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$ClearSlots, null, /*#__PURE__*/ $8i8bG$react.createElement($8i8bG$SlotProvider, {
412
413
  slots: {
413
414
  text: {
414
415
  id: hideButtonText ? textId : null,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAy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AAY;AACzI,CAAC;SAEQ,8BAAQ,CAAC,KAAa,EAAE,CAAC;IAChC,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE;IAC/B,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM;AACnC,CAAC","sources":["packages/@react-spectrum/actiongroup/src/index.ts","packages/@react-spectrum/actiongroup/src/ActionGroup.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@adobe/spectrum-css-temp/components/actiongroup/vars.css"],"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 './ActionGroup';\nexport {Item} from '@react-stately/collections';\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 {AriaLabelingProps, DOMProps, DOMRef, Node, StyleProps} from '@react-types/shared';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n ClearSlots,\n SlotProvider,\n useDOMRef,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {filterDOMProps, mergeProps, useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {ListState, useListState} from '@react-stately/list';\nimport More from '@spectrum-icons/workflow/More';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {forwardRef, Key, ReactElement, ReactNode, useCallback, useMemo, useRef, useState} from 'react';\nimport {SpectrumActionGroupProps} from '@react-types/actiongroup';\nimport styles from '@adobe/spectrum-css-temp/components/actiongroup/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useActionGroup} from '@react-aria/actiongroup';\nimport {useActionGroupItem} from '@react-aria/actiongroup';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionGroup<T extends object>(props: SpectrumActionGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionGroup');\n\n let {\n isEmphasized,\n density,\n isJustified,\n isDisabled,\n orientation = 'horizontal',\n isQuiet,\n staticColor,\n overflowMode = 'wrap',\n onAction,\n buttonLabelBehavior,\n summaryIcon,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n let state = useListState({...props, suppressTextValueWarning: true});\n let {actionGroupProps} = useActionGroup(props, state, domRef);\n let isVertical = orientation === 'vertical';\n let providerProps = {isEmphasized, isDisabled, isQuiet};\n let {styleProps} = useStyleProps(props);\n\n // Only hide button text if every item contains more than just plain text (we assume an icon).\n let isIconCollapsible = useMemo(() => [...state.collection].every(item => typeof item.rendered !== 'string'), [state.collection]);\n let [{visibleItems, hideButtonText, isMeasuring}, setVisibleItems] = useValueEffect({\n visibleItems: state.collection.size,\n hideButtonText: buttonLabelBehavior === 'hide' && isIconCollapsible,\n isMeasuring: false\n });\n\n let selectionMode = state.selectionManager.selectionMode;\n let updateOverflow = useCallback(() => {\n if (overflowMode === 'wrap') {\n return;\n }\n\n if (orientation === 'vertical' && selectionMode !== 'none') {\n // Collapsing vertical action groups with selection is currently unsupported by Spectrum.\n return;\n }\n\n let computeVisibleItems = (visibleItems: number) => {\n let listItems = Array.from(domRef.current.children) as HTMLLIElement[];\n let containerSize = orientation === 'horizontal' ? wrapperRef.current.offsetWidth : wrapperRef.current.offsetHeight;\n let isShowingMenu = visibleItems < state.collection.size;\n let calculatedSize = 0;\n let newVisibleItems = 0;\n\n if (isShowingMenu) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(listItems.pop(), false, true)\n : outerHeight(listItems.pop(), false, true);\n }\n\n for (let [i, item] of listItems.entries()) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(item, i === 0, i === listItems.length - 1)\n : outerHeight(item, i === 0, i === listItems.length - 1);\n if (calculatedSize <= containerSize) {\n newVisibleItems++;\n } else {\n break;\n }\n }\n\n // If selection is enabled, and not all of the items fit, collapse all of them into a dropdown\n // immediately rather than having some visible and some not.\n if (selectionMode !== 'none' && newVisibleItems < state.collection.size) {\n return 0;\n }\n\n return newVisibleItems;\n };\n\n setVisibleItems(function *() {\n let hideButtonText = buttonLabelBehavior === 'hide' && isIconCollapsible;\n\n // Update to show all items.\n yield {\n visibleItems: state.collection.size,\n hideButtonText,\n isMeasuring: true\n };\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(state.collection.size);\n let isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n\n // If not all of the buttons fit, and buttonLabelBehavior is 'collapse', then first try hiding\n // the button text and only showing icons. Only if that still doesn't fit collapse into a menu.\n if (newVisibleItems < state.collection.size && buttonLabelBehavior === 'collapse' && isIconCollapsible) {\n yield {\n visibleItems: state.collection.size,\n hideButtonText: true,\n isMeasuring: true\n };\n\n newVisibleItems = computeVisibleItems(state.collection.size);\n isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n hideButtonText = true;\n }\n\n yield {\n visibleItems: newVisibleItems,\n hideButtonText,\n isMeasuring\n };\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (isMeasuring) {\n yield {\n visibleItems: computeVisibleItems(newVisibleItems),\n hideButtonText,\n isMeasuring: false\n };\n }\n });\n }, [domRef, state.collection, setVisibleItems, overflowMode, selectionMode, buttonLabelBehavior, isIconCollapsible, orientation]);\n\n // Watch the parent element for size changes. Watching only the action group itself may not work\n // in all scenarios because it may not shrink when available space is reduced.\n let parentRef = useMemo(() => ({\n get current() {\n return wrapperRef.current.parentElement;\n }\n }), [wrapperRef]);\n useResizeObserver({ref: overflowMode !== 'wrap' ? parentRef : null, onResize: updateOverflow});\n useLayoutEffect(updateOverflow, [updateOverflow, state.collection]);\n\n let children = [...state.collection];\n let menuItem = null;\n let menuProps = {};\n\n // If there are no visible items, don't apply any props to the action group container\n // and pass all aria labeling props through to the menu button.\n if (overflowMode === 'collapse' && visibleItems === 0) {\n menuProps = filterDOMProps(props, {labelable: true});\n actionGroupProps = {};\n }\n\n if (overflowMode === 'collapse' && visibleItems < state.collection.size) {\n let menuChildren = children.slice(visibleItems);\n children = children.slice(0, visibleItems);\n menuItem = (\n <ActionGroupMenu\n {...menuProps}\n items={menuChildren}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n state={state}\n summaryIcon={summaryIcon}\n hideButtonText={hideButtonText}\n isOnlyItem={visibleItems === 0}\n orientation={orientation} />\n );\n }\n\n let style = {\n ...styleProps.style,\n // While measuring, take up as much space as possible.\n flexBasis: isMeasuring ? '100%' : undefined\n };\n\n return (\n <div {...styleProps} style={style} className={classNames(styles, 'flex-container', styleProps.className)} ref={wrapperRef}>\n <div\n {...actionGroupProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'flex-gap',\n 'spectrum-ActionGroup',\n {\n 'spectrum-ActionGroup--quiet': isQuiet,\n 'spectrum-ActionGroup--vertical': isVertical,\n 'spectrum-ActionGroup--compact': density === 'compact',\n 'spectrum-ActionGroup--justified': isJustified && !isMeasuring,\n 'spectrum-ActionGroup--overflowCollapse': overflowMode === 'collapse'\n },\n otherProps.UNSAFE_className\n )\n }>\n <Provider {...providerProps}>\n {children.map((item) => (\n <ActionGroupItem\n key={item.key}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n item={item}\n state={state}\n hideButtonText={hideButtonText}\n orientation={orientation} />\n ))}\n {menuItem}\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * An ActionGroup is a grouping of ActionButtons that are related to one another.\n */\nconst _ActionGroup = forwardRef(ActionGroup) as <T>(props: SpectrumActionGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionGroup as ActionGroup};\n\ninterface ActionGroupItemProps<T> extends DOMProps, StyleProps {\n item: Node<T>,\n state: ListState<T>,\n isDisabled: boolean,\n isEmphasized: boolean,\n staticColor?: 'white' | 'black',\n hideButtonText?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor, onAction, hideButtonText, orientation}: ActionGroupItemProps<T>) {\n let ref = useRef();\n let {buttonProps} = useActionGroupItem({key: item.key}, state);\n isDisabled = isDisabled || state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n if (onAction && !isDisabled) {\n buttonProps = mergeProps(buttonProps, {\n onPress: () => onAction(item.key)\n });\n }\n\n // If button text is hidden, we need to show it as a tooltip instead, so\n // go find the text element in the DOM after rendering.\n let textId = useId();\n let [textContent, setTextContent] = useState('');\n useLayoutEffect(() => {\n if (hideButtonText) {\n setTextContent(document.getElementById(textId)?.textContent);\n }\n }, [hideButtonText, item.rendered, textId]);\n\n let button = (\n // Use a PressResponder to send DOM props through.\n // ActionButton doesn't allow overriding the role by default.\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText\n }\n }}>\n <ActionButton\n ref={ref}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n {\n 'is-selected': isSelected,\n 'is-hovered': isHovered,\n 'spectrum-ActionGroup-item--iconOnly': hideButtonText,\n 'spectrum-ActionGroup-item--isDisabled': isDisabled\n },\n classNames(\n buttonStyles,\n {\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'is-selected': isSelected\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}\n aria-label={item['aria-label']}\n aria-labelledby={item['aria-label'] == null && hideButtonText ? textId : undefined}>\n {item.rendered}\n </ActionButton>\n </SlotProvider>\n </ClearSlots>\n </PressResponder>\n );\n\n if (hideButtonText && textContent) {\n button = (\n <TooltipTrigger placement={orientation === 'vertical' ? 'end' : 'top'}>\n {button}\n <Tooltip>{textContent}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.wrapper) {\n button = item.wrapper(button);\n }\n\n return button;\n}\n\ninterface ActionGroupMenuProps<T> extends AriaLabelingProps {\n state: ListState<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n staticColor?: 'white' | 'black',\n items: Node<T>[],\n hideButtonText?: boolean,\n summaryIcon?: ReactNode,\n isOnlyItem?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupMenu<T>({state, isDisabled, isEmphasized, staticColor, items, onAction, summaryIcon, hideButtonText, isOnlyItem, orientation, ...otherProps}: ActionGroupMenuProps<T>) {\n // Use the key of the first item within the menu as the key of the button.\n // The key must actually exist in the collection for focus to work correctly.\n let key = items[0].key;\n let {buttonProps} = useActionGroupItem({key}, state);\n\n // The menu button shouldn't act like an actual action group item.\n delete buttonProps.onPress;\n delete buttonProps.role;\n delete buttonProps['aria-checked'];\n\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // If no aria-label or aria-labelledby is given, provide a default one.\n let ariaLabel = otherProps['aria-label'] || (otherProps['aria-labelledby'] ? null : '…');\n let ariaLabelledby = otherProps['aria-labelledby'];\n let textId = useId();\n let id = useId();\n\n // Summary icon only applies when selection is enabled.\n if (state.selectionManager.selectionMode === 'none') {\n summaryIcon = null;\n }\n\n let iconOnly = false;\n\n // If there is a selection, show the selected state on the menu button.\n let isSelected = state.selectionManager.selectionMode !== 'none' && !state.selectionManager.isEmpty;\n\n // If single selection and empty selection is not allowed, swap the contents of the button to the selected item (like a Picker).\n if (!summaryIcon && state.selectionManager.selectionMode === 'single' && state.selectionManager.disallowEmptySelection) {\n let selectedItem = state.collection.getItem(state.selectionManager.firstSelectedKey);\n if (selectedItem) {\n summaryIcon = selectedItem.rendered;\n if (typeof summaryIcon === 'string') {\n summaryIcon = <Text>{summaryIcon}</Text>;\n }\n iconOnly = hideButtonText;\n ariaLabelledby = `${ariaLabelledby ?? id} ${textId}`;\n }\n }\n\n if (summaryIcon) {\n // If there's a custom summary icon, also add a chevron.\n summaryIcon = (\n <>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-ActionGroup-menu-chevron')} />\n <span className={classNames(styles, 'spectrum-ActionGroup-menu-contents', {'spectrum-ActionGroup-item--iconOnly': iconOnly})}>\n {summaryIcon}\n </span>\n </>\n );\n }\n\n return (\n // Use a PressResponder to send DOM props through.\n <MenuTrigger align={isOnlyItem ? 'start' : 'end'} direction={orientation === 'vertical' ? 'end' : 'bottom'}>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText,\n UNSAFE_className: classNames(styles, 'spectrum-ActionGroup-menu-text')\n }\n }}>\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ActionButton\n {...otherProps}\n id={id}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n 'spectrum-ActionGroup-menu',\n {\n 'is-hovered': isHovered,\n 'is-selected': isSelected\n },\n classNames(\n buttonStyles,\n {\n 'is-selected': isSelected,\n 'spectrum-ActionButton--emphasized': isEmphasized\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}>\n {summaryIcon || <More />}\n </ActionButton>\n </PressResponder>\n </SlotProvider>\n <Menu\n items={items}\n disabledKeys={state.disabledKeys}\n selectionMode={state.selectionManager.selectionMode}\n selectedKeys={state.selectionManager.selectedKeys}\n disallowEmptySelection={state.selectionManager.disallowEmptySelection}\n onSelectionChange={(keys) => state.selectionManager.setSelectedKeys(keys)}\n onAction={onAction}>\n {node => <Item textValue={node.textValue}>{node.rendered}</Item>}\n </Menu>\n </MenuTrigger>\n );\n}\n\nfunction outerWidth(element: HTMLElement, ignoreLeftMargin: boolean, ignoreRightMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetWidth + (ignoreLeftMargin ? 0 : toNumber(style.marginLeft)) + (ignoreRightMargin ? 0 : toNumber(style.marginRight));\n}\n\n\nfunction outerHeight(element: HTMLElement, ignoreTopMargin: boolean, ignoreBottomMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetHeight + (ignoreTopMargin ? 0 : toNumber(style.marginTop)) + (ignoreBottomMargin ? 0 : toNumber(style.marginBottom));\n}\n\nfunction toNumber(value: string) {\n let parsed = parseInt(value, 10);\n return isNaN(parsed) ? 0 : parsed;\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\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAiC;AACjC,GAAuC;AACvC,GAAsC;AACtC,GAAsC;AACtC,GAAsC;AACtC,GAA4B;AAC5B,GAA+B;AAC/B,GAAmD;AACnD,GAAoD;AACpD,GAA4B;AAC5B,GAAuC;AACvC,GAA6C;AAC7C,GAA4C;AAC5C,GAA8C;AAC9C,GAA6B;AAC7B,GAAyB;AACzB,GAA6C;AAC7C,GAAsD;AACtD,GAA6C;AAC7C,GAA4B;AAC5B,GAA2B;AAC3B,GAAsC;AACtC,GAA0C;AAC1C,GAA4C;AAC5C,GAA0C;AAC1C,GAAiD;AACjD,GAAwC;AACxC,GAA6B;AAC7B,GAAoD;AACpD,GAAoD;AACpD,GAA2C;AAC3C,GAA0C;AAC1C,GAAgC;AAChC,GAA+C;AAjC/C,yCAAiC,GAAG,CAAwB;AAC5D,wCAAuC,GAAG,CAA8B;AACxE,yCAAsC,GAAG,CAA6B;AACtE,yCAAsC,GAAG,CAA6B;AACtE,wCAAsC,GAAG,CAA6B;AACtE,yCAA4B,GAAG,CAAmB;AAClD,yCAA+B,GAAG,CAAsB;AACxD,yCAAmD,GAAG,CAA0C;AAChG,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,yCAA6C,GAAG,CAAoC;AACpF,yCAA4C,GAAG,CAAmC;AAClF,yCAA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AAI;YAAC,SAAS,EAAE,IAAI,CAAC,SAAS;WAAG,IAAI,CAAC,QAAQ;;AAIhE,CAAC;SAEQ,gCAAU,CAAC,OAAoB,EAAE,gBAAyB,EAAE,iBAA0B,EAAE,CAAC;IAChG,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO;IAC3C,MAAM,CAAC,OAAO,CAAC,WAAW,IAAI,gBAAgB,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,UAAU,MAAM,iBAAiB,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,WAAW;AACxI,CAAC;SAGQ,iCAAW,CAAC,OAAoB,EAAE,eAAwB,EAAE,kBAA2B,EAAE,CAAC;IACjG,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO;IAC3C,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,eAAe,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,SAAS,MAAM,kBAAkB,GAAG,CAAC,GAAG,8BAAQ,CAAC,KAAK,CAAC,YAAY;AACzI,CAAC;SAEQ,8BAAQ,CAAC,KAAa,EAAE,CAAC;IAChC,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE;IAC/B,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM;AACnC,CAAC","sources":["packages/@react-spectrum/actiongroup/src/index.ts","packages/@react-spectrum/actiongroup/src/ActionGroup.tsx","packages/@adobe/spectrum-css-temp/components/button/vars.css","packages/@adobe/spectrum-css-temp/components/actiongroup/vars.css"],"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 './ActionGroup';\nexport {Item} from '@react-stately/collections';\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 {AriaLabelingProps, DOMProps, DOMRef, Node, StyleProps} from '@react-types/shared';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {\n classNames,\n ClearSlots,\n SlotProvider,\n useDOMRef,\n useSlotProps,\n useStyleProps\n} from '@react-spectrum/utils';\nimport {filterDOMProps, mergeProps, useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {Item, Menu, MenuTrigger} from '@react-spectrum/menu';\nimport {ListState, useListState} from '@react-stately/list';\nimport More from '@spectrum-icons/workflow/More';\nimport {PressResponder, useHover} from '@react-aria/interactions';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {forwardRef, Key, ReactElement, ReactNode, useCallback, useMemo, useRef, useState} from 'react';\nimport {SpectrumActionGroupProps} from '@react-types/actiongroup';\nimport styles from '@adobe/spectrum-css-temp/components/actiongroup/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {Tooltip, TooltipTrigger} from '@react-spectrum/tooltip';\nimport {useActionGroup} from '@react-aria/actiongroup';\nimport {useActionGroupItem} from '@react-aria/actiongroup';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionGroup<T extends object>(props: SpectrumActionGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionGroup');\n\n let {\n isEmphasized,\n density,\n isJustified,\n isDisabled,\n orientation = 'horizontal',\n isQuiet,\n staticColor,\n overflowMode = 'wrap',\n onAction,\n buttonLabelBehavior,\n summaryIcon,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n let state = useListState({...props, suppressTextValueWarning: true});\n let {actionGroupProps} = useActionGroup(props, state, domRef);\n let isVertical = orientation === 'vertical';\n let providerProps = {isEmphasized, isDisabled, isQuiet};\n let {styleProps} = useStyleProps(props);\n\n // Only hide button text if every item contains more than just plain text (we assume an icon).\n let isIconCollapsible = useMemo(() => [...state.collection].every(item => typeof item.rendered !== 'string'), [state.collection]);\n let [{visibleItems, hideButtonText, isMeasuring}, setVisibleItems] = useValueEffect({\n visibleItems: state.collection.size,\n hideButtonText: buttonLabelBehavior === 'hide' && isIconCollapsible,\n isMeasuring: false\n });\n\n let selectionMode = state.selectionManager.selectionMode;\n let updateOverflow = useCallback(() => {\n if (overflowMode === 'wrap') {\n return;\n }\n\n if (orientation === 'vertical' && selectionMode !== 'none') {\n // Collapsing vertical action groups with selection is currently unsupported by Spectrum.\n return;\n }\n\n let computeVisibleItems = (visibleItems: number) => {\n let listItems = Array.from(domRef.current.children) as HTMLLIElement[];\n let containerSize = orientation === 'horizontal' ? wrapperRef.current.offsetWidth : wrapperRef.current.offsetHeight;\n let isShowingMenu = visibleItems < state.collection.size;\n let calculatedSize = 0;\n let newVisibleItems = 0;\n\n if (isShowingMenu) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(listItems.pop(), false, true)\n : outerHeight(listItems.pop(), false, true);\n }\n\n for (let [i, item] of listItems.entries()) {\n calculatedSize += orientation === 'horizontal'\n ? outerWidth(item, i === 0, i === listItems.length - 1)\n : outerHeight(item, i === 0, i === listItems.length - 1);\n if (calculatedSize <= containerSize) {\n newVisibleItems++;\n } else {\n break;\n }\n }\n\n // If selection is enabled, and not all of the items fit, collapse all of them into a dropdown\n // immediately rather than having some visible and some not.\n if (selectionMode !== 'none' && newVisibleItems < state.collection.size) {\n return 0;\n }\n\n return newVisibleItems;\n };\n\n setVisibleItems(function *() {\n let hideButtonText = buttonLabelBehavior === 'hide' && isIconCollapsible;\n\n // Update to show all items.\n yield {\n visibleItems: state.collection.size,\n hideButtonText,\n isMeasuring: true\n };\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(state.collection.size);\n let isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n\n // If not all of the buttons fit, and buttonLabelBehavior is 'collapse', then first try hiding\n // the button text and only showing icons. Only if that still doesn't fit collapse into a menu.\n if (newVisibleItems < state.collection.size && buttonLabelBehavior === 'collapse' && isIconCollapsible) {\n yield {\n visibleItems: state.collection.size,\n hideButtonText: true,\n isMeasuring: true\n };\n\n newVisibleItems = computeVisibleItems(state.collection.size);\n isMeasuring = newVisibleItems < state.collection.size && newVisibleItems > 0;\n hideButtonText = true;\n }\n\n yield {\n visibleItems: newVisibleItems,\n hideButtonText,\n isMeasuring\n };\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (isMeasuring) {\n yield {\n visibleItems: computeVisibleItems(newVisibleItems),\n hideButtonText,\n isMeasuring: false\n };\n }\n });\n }, [domRef, state.collection, setVisibleItems, overflowMode, selectionMode, buttonLabelBehavior, isIconCollapsible, orientation]);\n\n // Watch the parent element for size changes. Watching only the action group itself may not work\n // in all scenarios because it may not shrink when available space is reduced.\n let parentRef = useMemo(() => ({\n get current() {\n return wrapperRef.current.parentElement;\n }\n }), [wrapperRef]);\n useResizeObserver({ref: overflowMode !== 'wrap' ? parentRef : null, onResize: updateOverflow});\n useLayoutEffect(updateOverflow, [updateOverflow, state.collection]);\n\n let children = [...state.collection];\n let menuItem = null;\n let menuProps = {};\n\n // If there are no visible items, don't apply any props to the action group container\n // and pass all aria labeling props through to the menu button.\n if (overflowMode === 'collapse' && visibleItems === 0) {\n menuProps = filterDOMProps(props, {labelable: true});\n actionGroupProps = {};\n }\n\n if (overflowMode === 'collapse' && visibleItems < state.collection.size) {\n let menuChildren = children.slice(visibleItems);\n children = children.slice(0, visibleItems);\n menuItem = (\n <ActionGroupMenu\n {...menuProps}\n items={menuChildren}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n state={state}\n summaryIcon={summaryIcon}\n hideButtonText={hideButtonText}\n isOnlyItem={visibleItems === 0}\n orientation={orientation} />\n );\n }\n\n let style = {\n ...styleProps.style,\n // While measuring, take up as much space as possible.\n flexBasis: isMeasuring ? '100%' : undefined\n };\n\n return (\n <div {...styleProps} style={style} className={classNames(styles, 'flex-container', styleProps.className)} ref={wrapperRef}>\n <div\n {...actionGroupProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'flex-gap',\n 'spectrum-ActionGroup',\n {\n 'spectrum-ActionGroup--quiet': isQuiet,\n 'spectrum-ActionGroup--vertical': isVertical,\n 'spectrum-ActionGroup--compact': density === 'compact',\n 'spectrum-ActionGroup--justified': isJustified && !isMeasuring,\n 'spectrum-ActionGroup--overflowCollapse': overflowMode === 'collapse'\n },\n otherProps.UNSAFE_className\n )\n }>\n <Provider {...providerProps}>\n {children.map((item) => (\n <ActionGroupItem\n key={item.key}\n onAction={onAction}\n isDisabled={isDisabled}\n isEmphasized={isEmphasized}\n staticColor={staticColor}\n item={item}\n state={state}\n hideButtonText={hideButtonText}\n orientation={orientation} />\n ))}\n {menuItem}\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * An ActionGroup is a grouping of ActionButtons that are related to one another.\n */\nconst _ActionGroup = forwardRef(ActionGroup) as <T>(props: SpectrumActionGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionGroup as ActionGroup};\n\ninterface ActionGroupItemProps<T> extends DOMProps, StyleProps {\n item: Node<T>,\n state: ListState<T>,\n isDisabled: boolean,\n isEmphasized: boolean,\n staticColor?: 'white' | 'black',\n hideButtonText?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor, onAction, hideButtonText, orientation}: ActionGroupItemProps<T>) {\n let ref = useRef();\n let {buttonProps} = useActionGroupItem({key: item.key}, state);\n isDisabled = isDisabled || state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let domProps = filterDOMProps(item.props);\n\n if (onAction && !isDisabled) {\n buttonProps = mergeProps(buttonProps, {\n onPress: () => onAction(item.key)\n });\n }\n\n // If button text is hidden, we need to show it as a tooltip instead, so\n // go find the text element in the DOM after rendering.\n let textId = useId();\n let [textContent, setTextContent] = useState('');\n useLayoutEffect(() => {\n if (hideButtonText) {\n setTextContent(document.getElementById(textId)?.textContent);\n }\n }, [hideButtonText, item.rendered, textId]);\n\n let button = (\n // Use a PressResponder to send DOM props through.\n // ActionButton doesn't allow overriding the role by default.\n <PressResponder {...mergeProps(buttonProps, hoverProps, domProps)}>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText\n }\n }}>\n <ActionButton\n ref={ref}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n {\n 'is-selected': isSelected,\n 'is-hovered': isHovered,\n 'spectrum-ActionGroup-item--iconOnly': hideButtonText,\n 'spectrum-ActionGroup-item--isDisabled': isDisabled\n },\n classNames(\n buttonStyles,\n {\n 'spectrum-ActionButton--emphasized': isEmphasized,\n 'is-selected': isSelected\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}\n aria-label={item['aria-label']}\n aria-labelledby={item['aria-label'] == null && hideButtonText ? textId : undefined}>\n {item.rendered}\n </ActionButton>\n </SlotProvider>\n </ClearSlots>\n </PressResponder>\n );\n\n if (hideButtonText && textContent) {\n button = (\n <TooltipTrigger placement={orientation === 'vertical' ? 'end' : 'top'}>\n {button}\n <Tooltip>{textContent}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n if (item.wrapper) {\n button = item.wrapper(button);\n }\n\n return button;\n}\n\ninterface ActionGroupMenuProps<T> extends AriaLabelingProps {\n state: ListState<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n staticColor?: 'white' | 'black',\n items: Node<T>[],\n hideButtonText?: boolean,\n summaryIcon?: ReactNode,\n isOnlyItem?: boolean,\n orientation?: 'horizontal' | 'vertical',\n onAction: (key: Key) => void\n}\n\nfunction ActionGroupMenu<T>({state, isDisabled, isEmphasized, staticColor, items, onAction, summaryIcon, hideButtonText, isOnlyItem, orientation, ...otherProps}: ActionGroupMenuProps<T>) {\n // Use the key of the first item within the menu as the key of the button.\n // The key must actually exist in the collection for focus to work correctly.\n let key = items[0].key;\n let {buttonProps} = useActionGroupItem({key}, state);\n\n // The menu button shouldn't act like an actual action group item.\n delete buttonProps.onPress;\n delete buttonProps.role;\n delete buttonProps['aria-checked'];\n\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n // If no aria-label or aria-labelledby is given, provide a default one.\n let ariaLabel = otherProps['aria-label'] || (otherProps['aria-labelledby'] ? null : '…');\n let ariaLabelledby = otherProps['aria-labelledby'];\n let textId = useId();\n let id = useId();\n\n // Summary icon only applies when selection is enabled.\n if (state.selectionManager.selectionMode === 'none') {\n summaryIcon = null;\n }\n\n let iconOnly = false;\n\n // If there is a selection, show the selected state on the menu button.\n let isSelected = state.selectionManager.selectionMode !== 'none' && !state.selectionManager.isEmpty;\n\n // If single selection and empty selection is not allowed, swap the contents of the button to the selected item (like a Picker).\n if (!summaryIcon && state.selectionManager.selectionMode === 'single' && state.selectionManager.disallowEmptySelection) {\n let selectedItem = state.collection.getItem(state.selectionManager.firstSelectedKey);\n if (selectedItem) {\n summaryIcon = selectedItem.rendered;\n if (typeof summaryIcon === 'string') {\n summaryIcon = <Text>{summaryIcon}</Text>;\n }\n iconOnly = hideButtonText;\n ariaLabelledby = `${ariaLabelledby ?? id} ${textId}`;\n }\n }\n\n if (summaryIcon) {\n // If there's a custom summary icon, also add a chevron.\n summaryIcon = (\n <>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-ActionGroup-menu-chevron')} />\n <span className={classNames(styles, 'spectrum-ActionGroup-menu-contents', {'spectrum-ActionGroup-item--iconOnly': iconOnly})}>\n {summaryIcon}\n </span>\n </>\n );\n }\n\n return (\n // Use a PressResponder to send DOM props through.\n <MenuTrigger align={isOnlyItem ? 'start' : 'end'} direction={orientation === 'vertical' ? 'end' : 'bottom'}>\n <SlotProvider\n slots={{\n text: {\n id: hideButtonText ? textId : null,\n isHidden: hideButtonText,\n UNSAFE_className: classNames(styles, 'spectrum-ActionGroup-menu-text')\n }\n }}>\n <PressResponder {...mergeProps(buttonProps, hoverProps)}>\n <ActionButton\n {...otherProps}\n id={id}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-ActionGroup-item',\n 'spectrum-ActionGroup-menu',\n {\n 'is-hovered': isHovered,\n 'is-selected': isSelected\n },\n classNames(\n buttonStyles,\n {\n 'is-selected': isSelected,\n 'spectrum-ActionButton--emphasized': isEmphasized\n }\n )\n )\n }\n isDisabled={isDisabled}\n staticColor={staticColor}>\n {summaryIcon || <More />}\n </ActionButton>\n </PressResponder>\n </SlotProvider>\n <Menu\n items={items}\n disabledKeys={state.disabledKeys}\n selectionMode={state.selectionManager.selectionMode}\n selectedKeys={state.selectionManager.selectedKeys}\n disallowEmptySelection={state.selectionManager.disallowEmptySelection}\n onSelectionChange={(keys) => state.selectionManager.setSelectedKeys(keys)}\n onAction={onAction}>\n {node => <Item textValue={node.textValue}>{node.rendered}</Item>}\n </Menu>\n </MenuTrigger>\n );\n}\n\nfunction outerWidth(element: HTMLElement, ignoreLeftMargin: boolean, ignoreRightMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetWidth + (ignoreLeftMargin ? 0 : toNumber(style.marginLeft)) + (ignoreRightMargin ? 0 : toNumber(style.marginRight));\n}\n\n\nfunction outerHeight(element: HTMLElement, ignoreTopMargin: boolean, ignoreBottomMargin: boolean) {\n let style = window.getComputedStyle(element);\n return element.offsetHeight + (ignoreTopMargin ? 0 : toNumber(style.marginTop)) + (ignoreBottomMargin ? 0 : toNumber(style.marginBottom));\n}\n\nfunction toNumber(value: string) {\n let parsed = parseInt(value, 10);\n return isNaN(parsed) ? 0 : parsed;\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\n@import './index.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/actiongroup",
3
- "version": "3.5.2-nightly.3349+9fbc8ad80",
3
+ "version": "3.5.2-nightly.3353+700ad3b9b",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,28 +32,28 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/actiongroup": "3.3.2-nightly.3349+9fbc8ad80",
36
- "@react-aria/button": "3.0.0-nightly.1649+9fbc8ad80",
37
- "@react-aria/focus": "3.0.0-nightly.1649+9fbc8ad80",
38
- "@react-aria/interactions": "3.0.0-nightly.1649+9fbc8ad80",
39
- "@react-aria/selection": "3.0.0-nightly.1649+9fbc8ad80",
40
- "@react-aria/utils": "3.0.0-nightly.1649+9fbc8ad80",
41
- "@react-spectrum/button": "3.0.0-nightly.1649+9fbc8ad80",
42
- "@react-spectrum/form": "3.0.0-nightly.1649+9fbc8ad80",
43
- "@react-spectrum/menu": "3.7.2-nightly.3349+9fbc8ad80",
44
- "@react-spectrum/text": "3.2.2-nightly.3349+9fbc8ad80",
45
- "@react-spectrum/tooltip": "3.0.0-nightly.1649+9fbc8ad80",
46
- "@react-spectrum/utils": "3.0.0-nightly.1649+9fbc8ad80",
47
- "@react-stately/collections": "3.0.0-nightly.1649+9fbc8ad80",
48
- "@react-stately/list": "3.5.2-nightly.3349+9fbc8ad80",
49
- "@react-types/actiongroup": "3.3.2-nightly.3349+9fbc8ad80",
50
- "@react-types/button": "3.5.2-nightly.3349+9fbc8ad80",
51
- "@react-types/shared": "3.0.0-nightly.1649+9fbc8ad80",
52
- "@spectrum-icons/ui": "3.0.0-nightly.1649+9fbc8ad80",
53
- "@spectrum-icons/workflow": "3.0.0-nightly.1649+9fbc8ad80"
35
+ "@react-aria/actiongroup": "3.3.2-nightly.3353+700ad3b9b",
36
+ "@react-aria/button": "3.0.0-nightly.1653+700ad3b9b",
37
+ "@react-aria/focus": "3.0.0-nightly.1653+700ad3b9b",
38
+ "@react-aria/interactions": "3.0.0-nightly.1653+700ad3b9b",
39
+ "@react-aria/selection": "3.0.0-nightly.1653+700ad3b9b",
40
+ "@react-aria/utils": "3.0.0-nightly.1653+700ad3b9b",
41
+ "@react-spectrum/button": "3.0.0-nightly.1653+700ad3b9b",
42
+ "@react-spectrum/form": "3.0.0-nightly.1653+700ad3b9b",
43
+ "@react-spectrum/menu": "3.7.2-nightly.3353+700ad3b9b",
44
+ "@react-spectrum/text": "3.2.2-nightly.3353+700ad3b9b",
45
+ "@react-spectrum/tooltip": "3.0.0-nightly.1653+700ad3b9b",
46
+ "@react-spectrum/utils": "3.0.0-nightly.1653+700ad3b9b",
47
+ "@react-stately/collections": "3.0.0-nightly.1653+700ad3b9b",
48
+ "@react-stately/list": "3.5.2-nightly.3353+700ad3b9b",
49
+ "@react-types/actiongroup": "3.3.2-nightly.3353+700ad3b9b",
50
+ "@react-types/button": "3.5.2-nightly.3353+700ad3b9b",
51
+ "@react-types/shared": "3.0.0-nightly.1653+700ad3b9b",
52
+ "@spectrum-icons/ui": "3.0.0-nightly.1653+700ad3b9b",
53
+ "@spectrum-icons/workflow": "3.0.0-nightly.1653+700ad3b9b"
54
54
  },
55
55
  "devDependencies": {
56
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1649+9fbc8ad80"
56
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1653+700ad3b9b"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@react-spectrum/provider": "^3.2.0",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "9fbc8ad8014f5489659ae4ebbb8a60e117adb8c3"
66
+ "gitHead": "700ad3b9b6d663863f275aaf0a2b68eb9ad8e11e"
67
67
  }
@@ -271,6 +271,7 @@ function ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor,
271
271
  isDisabled = isDisabled || state.disabledKeys.has(item.key);
272
272
  let isSelected = state.selectionManager.isSelected(item.key);
273
273
  let {hoverProps, isHovered} = useHover({isDisabled});
274
+ let domProps = filterDOMProps(item.props);
274
275
 
275
276
  if (onAction && !isDisabled) {
276
277
  buttonProps = mergeProps(buttonProps, {
@@ -291,7 +292,7 @@ function ActionGroupItem<T>({item, state, isDisabled, isEmphasized, staticColor,
291
292
  let button = (
292
293
  // Use a PressResponder to send DOM props through.
293
294
  // ActionButton doesn't allow overriding the role by default.
294
- <PressResponder {...mergeProps(buttonProps, hoverProps)}>
295
+ <PressResponder {...mergeProps(buttonProps, hoverProps, domProps)}>
295
296
  <ClearSlots>
296
297
  <SlotProvider
297
298
  slots={{