@zendeskgarden/react-buttons 9.0.0-next.9 → 9.1.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.
- package/dist/esm/elements/Anchor.js +10 -5
- package/dist/esm/elements/Button.js +30 -12
- package/dist/esm/elements/ChevronButton.js +3 -8
- package/dist/esm/elements/IconButton.js +22 -10
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/new-window-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +1 -1
- package/dist/esm/styled/StyledAnchor.js +4 -7
- package/dist/esm/styled/StyledButton.js +239 -76
- package/dist/esm/styled/StyledExternalIcon.js +2 -5
- package/dist/esm/styled/StyledIcon.js +2 -5
- package/dist/esm/styled/StyledIconButton.js +38 -16
- package/dist/esm/styled/StyledSplitButton.js +2 -5
- package/dist/index.cjs.js +344 -141
- package/dist/typings/elements/Button.d.ts +3 -1
- package/dist/typings/styled/StyledAnchor.d.ts +1 -8
- package/dist/typings/styled/StyledButton.d.ts +16 -7
- package/dist/typings/styled/StyledIcon.d.ts +1 -2
- package/dist/typings/styled/StyledIconButton.d.ts +4 -3
- package/dist/typings/styled/index.d.ts +2 -2
- package/dist/typings/types/index.d.ts +2 -0
- package/dist/typings/utils/useSplitButtonContext.d.ts +0 -1
- package/package.json +7 -7
|
@@ -8,10 +8,12 @@ import React from 'react';
|
|
|
8
8
|
import { IButtonProps } from '../types';
|
|
9
9
|
import { StartIcon } from './components/StartIcon';
|
|
10
10
|
import { EndIcon } from './components/EndIcon';
|
|
11
|
+
declare const ButtonComponent: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
12
|
/**
|
|
12
13
|
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
13
14
|
*/
|
|
14
|
-
export declare const Button:
|
|
15
|
+
export declare const Button: typeof ButtonComponent & {
|
|
15
16
|
EndIcon: typeof EndIcon;
|
|
16
17
|
StartIcon: typeof StartIcon;
|
|
17
18
|
};
|
|
19
|
+
export {};
|
|
@@ -7,11 +7,4 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Accepts all `<a>` props
|
|
9
9
|
*/
|
|
10
|
-
export declare const StyledAnchor: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("
|
|
11
|
-
'data-garden-id': string;
|
|
12
|
-
'data-garden-version': string;
|
|
13
|
-
as: string;
|
|
14
|
-
dir: "rtl" | undefined;
|
|
15
|
-
isLink: boolean;
|
|
16
|
-
type: undefined;
|
|
17
|
-
}, "type" | "dir" | "as" | "data-garden-id" | "data-garden-version" | "isLink">;
|
|
10
|
+
export declare const StyledAnchor: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("./StyledButton").IStyledButtonProps, never>;
|
|
@@ -4,12 +4,21 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
7
8
|
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
9
|
import { IButtonProps } from '../types';
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export declare const COMPONENT_ID = "buttons.button";
|
|
11
|
+
export interface IStyledButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
$isUnderlined?: boolean;
|
|
13
|
+
$isDanger?: boolean;
|
|
14
|
+
$size?: IButtonProps['size'];
|
|
15
|
+
$isStretched?: boolean;
|
|
16
|
+
$isNeutral?: boolean;
|
|
17
|
+
$isPrimary?: boolean;
|
|
18
|
+
$isBasic?: boolean;
|
|
19
|
+
$isLink?: boolean;
|
|
20
|
+
$isPill?: boolean;
|
|
21
|
+
$focusInset?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const getHeight: (props: IStyledButtonProps & ThemeProps<DefaultTheme>) => string;
|
|
24
|
+
export declare const StyledButton: import("styled-components").StyledComponent<"button", DefaultTheme, IStyledButtonProps, never>;
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
import { DefaultTheme } from 'styled-components';
|
|
9
8
|
interface IStyledIconProps {
|
|
10
9
|
$isRotated: boolean;
|
|
11
10
|
$position?: 'start' | 'end';
|
|
12
11
|
}
|
|
13
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) =>
|
|
12
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
|
|
14
13
|
'data-garden-id': string;
|
|
15
14
|
'data-garden-version': string;
|
|
16
15
|
} & IStyledIconProps, "data-garden-id" | "data-garden-version">;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
import {
|
|
9
|
-
export declare const
|
|
8
|
+
import { IStyledButtonProps } from './StyledButton';
|
|
9
|
+
export declare const COMPONENT_ID = "buttons.icon_button";
|
|
10
|
+
export declare const StyledIconButton: import("styled-components").StyledComponent<"button", DefaultTheme, IStyledButtonProps & {
|
|
10
11
|
'data-garden-id': string;
|
|
11
12
|
'data-garden-version': string;
|
|
12
|
-
}
|
|
13
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
export * from './StyledAnchor';
|
|
8
|
-
export
|
|
8
|
+
export { StyledButton } from './StyledButton';
|
|
9
9
|
export * from './StyledSplitButton';
|
|
10
10
|
export * from './StyledExternalIcon';
|
|
11
11
|
export * from './StyledIcon';
|
|
12
|
-
export
|
|
12
|
+
export { StyledIconButton } from './StyledIconButton';
|
|
@@ -4,6 +4,5 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare const SplitButtonContext: import("react").Context<boolean | undefined>;
|
|
9
8
|
export declare const useSplitButtonContext: () => boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-buttons",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Components relating to buttons in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
25
|
-
"polished": "^4.
|
|
25
|
+
"polished": "^4.3.1",
|
|
26
26
|
"prop-types": "^15.5.7",
|
|
27
27
|
"react-merge-refs": "^2.0.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@zendeskgarden/react-theming": ">=9.0.0-next",
|
|
31
|
-
"react": "
|
|
32
|
-
"react-dom": "
|
|
31
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
32
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
33
33
|
"styled-components": "^5.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^9.
|
|
37
|
-
"@zendeskgarden/svg-icons": "7.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.1.0",
|
|
37
|
+
"@zendeskgarden/svg-icons": "7.3.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
40
40
|
"components",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"zendeskgarden:src": "src/index.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a2842d18615ad057d75988fde4df5a0c79d2714e"
|
|
50
50
|
}
|