@aws-amplify/ui-react 5.1.0 → 5.1.1
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/{Field-22c78eb5.js → Field-fb9d2ffe.js} +1 -1
- package/dist/esm/PrimitiveCatalog.mjs +1 -1
- package/dist/esm/primitives/Button/Button.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +1034 -48
- package/dist/types/primitives/Menu/MenuButton.d.ts +2 -2
- package/dist/types/primitives/types/button.d.ts +8 -0
- package/dist/types/primitives/types/menu.d.ts +6 -2
- package/dist/types/primitives/types/toggleButton.d.ts +2 -2
- package/dist/types/primitives/types/view.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const MenuButton: ForwardRefPrimitive<
|
|
1
|
+
import { BaseMenuButtonProps, ForwardRefPrimitive } from '../types';
|
|
2
|
+
export declare const MenuButton: ForwardRefPrimitive<BaseMenuButtonProps, 'button'>;
|
|
@@ -5,8 +5,14 @@ import { FlexContainerStyleProps } from './flex';
|
|
|
5
5
|
export type ButtonSizes = Sizes;
|
|
6
6
|
export type ButtonTypes = 'button' | 'reset' | 'submit';
|
|
7
7
|
export type ButtonVariations = 'primary' | 'link' | 'menu' | 'warning' | 'destructive';
|
|
8
|
+
export type ButtonColorTheme = 'info' | 'error' | 'warning' | 'success' | 'overlay';
|
|
8
9
|
/** @deprecated For internal use only */
|
|
9
10
|
export interface BaseButtonProps extends BaseViewProps, FlexContainerStyleProps {
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* Changes the color scheme of the button
|
|
14
|
+
*/
|
|
15
|
+
colorTheme?: ButtonColorTheme;
|
|
10
16
|
/**
|
|
11
17
|
* @description
|
|
12
18
|
* If `true`, the button will be disabled.
|
|
@@ -54,3 +60,5 @@ export interface BaseButtonProps extends BaseViewProps, FlexContainerStyleProps
|
|
|
54
60
|
variation?: ButtonVariations;
|
|
55
61
|
}
|
|
56
62
|
export type ButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseButtonProps, Element>;
|
|
63
|
+
/** @deprecated For internal use only */
|
|
64
|
+
export type BaseButtonPropsWithoutColorTheme = Omit<BaseButtonProps, 'colorTheme'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseButtonPropsWithoutColorTheme } from './button';
|
|
3
3
|
import { BaseFlexProps } from './flex';
|
|
4
4
|
import { Sizes } from './base';
|
|
5
5
|
import { ElementType, PrimitiveProps } from './view';
|
|
@@ -45,7 +45,7 @@ export interface BaseMenuProps extends BaseFlexProps {
|
|
|
45
45
|
}
|
|
46
46
|
export type MenuProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseMenuProps, Element>;
|
|
47
47
|
/** @deprecated For internal use only */
|
|
48
|
-
export interface BaseMenuItemProps extends
|
|
48
|
+
export interface BaseMenuItemProps extends BaseButtonPropsWithoutColorTheme {
|
|
49
49
|
/**
|
|
50
50
|
* @description
|
|
51
51
|
* Accepts any number of MenuItem components
|
|
@@ -53,3 +53,7 @@ export interface BaseMenuItemProps extends BaseButtonProps {
|
|
|
53
53
|
children?: React.ReactNode;
|
|
54
54
|
}
|
|
55
55
|
export type MenuItemProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseMenuItemProps, Element>;
|
|
56
|
+
/** @deprecated For internal use only */
|
|
57
|
+
export interface BaseMenuButtonProps extends BaseButtonPropsWithoutColorTheme {
|
|
58
|
+
}
|
|
59
|
+
export type MenuButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseMenuButtonProps, Element>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseButtonPropsWithoutColorTheme } from './button';
|
|
2
2
|
import { ElementType, PrimitiveProps } from './view';
|
|
3
3
|
/** @deprecated For internal use only */
|
|
4
|
-
export interface BaseToggleButtonProps extends
|
|
4
|
+
export interface BaseToggleButtonProps extends BaseButtonPropsWithoutColorTheme {
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
7
|
* Controls the selected state of the ToggleButton
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { MergeProps } from '@aws-amplify/ui-react-core';
|
|
2
3
|
import { AriaProps, BaseComponentProps } from './base';
|
|
3
4
|
import { BaseStyleProps } from './style';
|
|
4
5
|
export type IsAny<Type> = (Type extends never ? true : false) extends false ? false : true;
|
|
5
|
-
type MergeProps<A, B> = A & Omit<B, keyof A>;
|
|
6
6
|
export type ElementType = React.ElementType;
|
|
7
7
|
type AsProp<Element extends ElementType> = {
|
|
8
8
|
/**
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "5.1.
|
|
1
|
+
export declare const VERSION = "5.1.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@aws-amplify/ui": "5.7.
|
|
51
|
-
"@aws-amplify/ui-react-core": "2.1.
|
|
50
|
+
"@aws-amplify/ui": "5.7.1",
|
|
51
|
+
"@aws-amplify/ui-react-core": "2.1.30",
|
|
52
52
|
"@radix-ui/react-accordion": "1.0.0",
|
|
53
53
|
"@radix-ui/react-direction": "1.0.0",
|
|
54
54
|
"@radix-ui/react-dropdown-menu": "1.0.0",
|