@react-types/actiongroup 3.4.22 → 3.5.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.
Files changed (2) hide show
  1. package/package.json +7 -4
  2. package/src/index.d.ts +2 -62
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/actiongroup",
3
- "version": "3.4.22",
3
+ "version": "3.5.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,13 +9,16 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.33.0"
12
+ "@react-aria/actiongroup": "^3.8.0",
13
+ "@react-spectrum/actiongroup": "^3.12.0"
13
14
  },
14
15
  "peerDependencies": {
15
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
+ "@react-spectrum/provider": "^3.0.0",
17
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
18
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
19
  },
17
20
  "publishConfig": {
18
21
  "access": "public"
19
22
  },
20
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
23
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
21
24
  }
package/src/index.d.ts CHANGED
@@ -10,65 +10,5 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {AriaLabelingProps, DOMProps, ItemElement, ItemRenderer, Key, MultipleSelection, Orientation, StyleProps} from '@react-types/shared';
14
- import {ReactElement} from 'react';
15
-
16
- // Not extending CollectionBase to avoid async loading props
17
- export interface ActionGroupProps<T> extends MultipleSelection {
18
- /**
19
- * The axis the ActionGroup should align with.
20
- * @default 'horizontal'
21
- */
22
- orientation?: Orientation,
23
- /** An list of `Item` elements or a function. If the latter, a list of items must be provided using the `items` prop. */
24
- children: ItemElement<T> | ItemElement<T>[] | ItemRenderer<T>,
25
- /** A list of items to display as children. Must be used with a function as the sole child. */
26
- items?: Iterable<T>,
27
- /** A list of keys to disable. */
28
- disabledKeys?: Iterable<Key>,
29
- /**
30
- * Whether the ActionGroup is disabled.
31
- * Shows that a selection exists, but is not available in that circumstance.
32
- */
33
- isDisabled?: boolean,
34
- /**
35
- * Invoked when an action is taken on a child. Especially useful when `selectionMode` is none.
36
- * The sole argument `key` is the key for the item.
37
- */
38
- onAction?: (key: Key) => void
39
- }
40
-
41
- export interface AriaActionGroupProps<T> extends ActionGroupProps<T>, DOMProps, AriaLabelingProps {}
42
-
43
- export interface SpectrumActionGroupProps<T> extends AriaActionGroupProps<T>, StyleProps {
44
- /** Whether the ActionButtons should be displayed with a [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
45
- isEmphasized?: boolean,
46
- /**
47
- * Sets the amount of space between buttons.
48
- * @default 'regular'
49
- */
50
- density?: 'compact' | 'regular',
51
- /** Whether the ActionButtons should be justified in their container. */
52
- isJustified?: boolean,
53
- /** Whether ActionButtons should use the [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */
54
- isQuiet?: boolean,
55
- /** The static color style to apply. Useful when the ActionGroup appears over a color background. */
56
- staticColor?: 'white' | 'black',
57
- /**
58
- * Defines the behavior of the ActionGroup when the buttons do not fit in the available space.
59
- * When set to 'wrap', the items wrap to form a new line. When set to 'collapse', the items that
60
- * do not fit are collapsed into a dropdown menu.
61
- * @default 'wrap'
62
- */
63
- overflowMode?: 'wrap' | 'collapse',
64
- /**
65
- * Defines when the text within the buttons should be hidden and only the icon should be shown.
66
- * When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is visible
67
- * if space is available, and hidden when space is limited. The text is always visible when the item
68
- * is collapsed into a menu.
69
- * @default 'show'
70
- */
71
- buttonLabelBehavior?: 'show' | 'collapse' | 'hide',
72
- /** The icon displayed in the dropdown menu button when a selectable ActionGroup is collapsed. */
73
- summaryIcon?: ReactElement
74
- }
13
+ export {ActionGroupProps, AriaActionGroupProps} from '@react-aria/actiongroup';
14
+ export {SpectrumActionGroupProps} from '@react-spectrum/actiongroup';