@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.
@@ -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: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> & {
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("..").IButtonProps & {
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 getHeight: (props: IButtonProps & ThemeProps<DefaultTheme>) => string;
10
- /**
11
- * 1. FF <input type="submit"> fix
12
- * 2. <a> element reset
13
- * 3. Shifting :focus-visible from LVHFA order to preserve `text-decoration` on hover
14
- */
15
- export declare const StyledButton: import("styled-components").StyledComponent<"button", DefaultTheme, IButtonProps, never>;
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) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
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 { IButtonProps } from '../types';
9
- export declare const StyledIconButton: import("styled-components").StyledComponent<"button", DefaultTheme, {
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
- } & IButtonProps, "data-garden-id" | "data-garden-version">;
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 * from './StyledButton';
8
+ export { StyledButton } from './StyledButton';
9
9
  export * from './StyledSplitButton';
10
10
  export * from './StyledExternalIcon';
11
11
  export * from './StyledIcon';
12
- export * from './StyledIconButton';
12
+ export { StyledIconButton } from './StyledIconButton';
@@ -53,4 +53,6 @@ export interface IAnchorProps extends Pick<IButtonProps, 'isDanger'>, AnchorHTML
53
53
  * making that icon accessible to assistive technology
54
54
  **/
55
55
  externalIconLabel?: string;
56
+ /** Determines if the anchor has underline styling */
57
+ isUnderlined?: boolean;
56
58
  }
@@ -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.0.0-next.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.0.0",
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": ">=16.8.0",
32
- "react-dom": ">=16.8.0",
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.0.0-next.9",
37
- "@zendeskgarden/svg-icons": "7.0.0"
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": "771281b562d376a6aee04b0cd71dd888b3ae4a1d"
49
+ "gitHead": "a2842d18615ad057d75988fde4df5a0c79d2714e"
50
50
  }