@react-types/actiongroup
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-4980928d3-240906
{ | ||
"name": "@react-types/actiongroup", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-nightly-4980928d3-240906", | ||
"description": "Spectrum UI components in React", | ||
@@ -9,10 +9,9 @@ "license": "Apache-2.0", | ||
"type": "git", | ||
"url": "https://github.com/adobe-private/react-spectrum-v3" | ||
"url": "https://github.com/adobe/react-spectrum" | ||
}, | ||
"dependencies": { | ||
"@react-types/button": "^3.0.0-rc.2", | ||
"@react-types/shared": "^3.0.0-rc.2" | ||
"@react-types/shared": "^3.0.0-nightly-4980928d3-240906" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
}, | ||
@@ -22,3 +21,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
} | ||
"stableVersion": "3.4.11" | ||
} |
@@ -6,3 +6,3 @@ /* | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
@@ -14,21 +14,63 @@ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
import {DOMProps, ItemElement, ItemRenderer, MultipleSelection, Orientation, StyleProps} from '@react-types/shared'; | ||
import {Key} from 'react'; | ||
import {AriaLabelingProps, DOMProps, ItemElement, ItemRenderer, Key, MultipleSelection, Orientation, StyleProps} from '@react-types/shared'; | ||
import {ReactElement} from 'react'; | ||
// Not extending CollectionBase to avoid async loading props | ||
export interface ActionGroupProps<T> extends DOMProps, StyleProps, MultipleSelection { | ||
export interface ActionGroupProps<T> extends MultipleSelection { | ||
/** | ||
* The axis the ActionGroup should align with. | ||
* @default 'horizontal' | ||
*/ | ||
orientation?: Orientation, | ||
/** An list of `Item` elements or a function. If the latter, a list of items must be provided using the `items` prop. */ | ||
children: ItemElement<T> | ItemElement<T>[] | ItemRenderer<T>, | ||
/** A list of items to display as children. Must be used with a function as the sole child. */ | ||
items?: Iterable<T>, | ||
itemKey?: string, | ||
/** A list of keys to disable. */ | ||
disabledKeys?: Iterable<Key>, | ||
isDisabled?: boolean | ||
/** | ||
* Whether the ActionGroup is disabled. | ||
* Shows that a selection exists, but is not available in that circumstance. | ||
*/ | ||
isDisabled?: boolean, | ||
/** | ||
* Invoked when an action is taken on a child. Especially useful when `selectionMode` is none. | ||
* The sole argument `key` is the key for the item. | ||
*/ | ||
onAction?: (key: Key) => void | ||
} | ||
export interface SpectrumActionGroupProps<T> extends ActionGroupProps<T> { | ||
export interface AriaActionGroupProps<T> extends ActionGroupProps<T>, DOMProps, AriaLabelingProps {} | ||
export interface SpectrumActionGroupProps<T> extends AriaActionGroupProps<T>, StyleProps { | ||
/** Whether the ActionButtons should be displayed with a [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ | ||
isEmphasized?: boolean, | ||
isConnected?: boolean | ||
/** | ||
* Sets the amount of space between buttons. | ||
* @default 'regular' | ||
*/ | ||
density?: 'compact' | 'regular', | ||
/** Whether the ActionButtons should be justified in their container. */ | ||
isJustified?: boolean, | ||
/** Whether ActionButtons should use the [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ | ||
isQuiet?: boolean, | ||
holdAffordance?: boolean | ||
/** The static color style to apply. Useful when the ActionGroup appears over a color background. */ | ||
staticColor?: 'white' | 'black', | ||
/** | ||
* Defines the behavior of the ActionGroup when the buttons do not fit in the available space. | ||
* When set to 'wrap', the items wrap to form a new line. When set to 'collapse', the items that | ||
* do not fit are collapsed into a dropdown menu. | ||
* @default 'wrap' | ||
*/ | ||
overflowMode?: 'wrap' | 'collapse', | ||
/** | ||
* Defines when the text within the buttons should be hidden and only the icon should be shown. | ||
* When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is visible | ||
* if space is available, and hidden when space is limited. The text is always visible when the item | ||
* is collapsed into a menu. | ||
* @default 'show' | ||
*/ | ||
buttonLabelBehavior?: 'show' | 'collapse' | 'hide', | ||
/** The icon displayed in the dropdown menu button when a selectable ActionGroup is collapsed. */ | ||
summaryIcon?: ReactElement | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
2
70
0
3
32
4185
35699
240
+ Addedreact@19.0.0(transitive)
- Removed@react-types/button@^3.0.0-rc.2
- Removed@react-types/button@3.10.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)