@zendeskgarden/react-buttons 9.0.0-next.1 → 9.0.0-next.11

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 (35) hide show
  1. package/README.md +0 -27
  2. package/dist/esm/elements/Anchor.js +54 -0
  3. package/dist/esm/elements/Button.js +49 -0
  4. package/dist/esm/elements/ChevronButton.js +27 -0
  5. package/dist/esm/elements/IconButton.js +50 -0
  6. package/dist/esm/elements/SplitButton.js +29 -0
  7. package/dist/esm/elements/ToggleButton.js +30 -0
  8. package/dist/esm/elements/ToggleIconButton.js +32 -0
  9. package/dist/esm/elements/components/EndIcon.js +28 -0
  10. package/dist/esm/elements/components/StartIcon.js +28 -0
  11. package/dist/esm/index.js +13 -0
  12. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/new-window-stroke.svg.js +27 -0
  13. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
  14. package/dist/esm/styled/StyledAnchor.js +27 -0
  15. package/dist/esm/styled/StyledButton.js +316 -0
  16. package/dist/esm/styled/StyledExternalIcon.js +23 -0
  17. package/dist/esm/styled/StyledIcon.js +31 -0
  18. package/dist/esm/styled/StyledIconButton.js +61 -0
  19. package/dist/esm/styled/StyledSplitButton.js +22 -0
  20. package/dist/esm/types/index.js +9 -0
  21. package/dist/esm/utils/useSplitButtonContext.js +14 -0
  22. package/dist/index.cjs.js +296 -195
  23. package/dist/typings/elements/Button.d.ts +1 -7
  24. package/dist/typings/elements/components/EndIcon.d.ts +1 -1
  25. package/dist/typings/elements/components/StartIcon.d.ts +1 -1
  26. package/dist/typings/index.d.ts +2 -3
  27. package/dist/typings/styled/StyledAnchor.d.ts +1 -1
  28. package/dist/typings/styled/StyledIcon.d.ts +4 -4
  29. package/dist/typings/styled/{StyledButtonGroup.d.ts → StyledSplitButton.d.ts} +1 -1
  30. package/dist/typings/styled/index.d.ts +1 -1
  31. package/dist/typings/types/index.d.ts +1 -13
  32. package/package.json +6 -7
  33. package/dist/index.esm.js +0 -559
  34. package/dist/typings/elements/ButtonGroup.d.ts +0 -14
  35. package/dist/typings/utils/useButtonGroupContext.d.ts +0 -14
@@ -4,16 +4,10 @@
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 React, { SVGAttributes } from 'react';
7
+ 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
- /**
12
- * @deprecated use IButtonStartIconProps or IButtonEndIconProps instead
13
- */
14
- export interface IIconProps extends SVGAttributes<SVGSVGElement> {
15
- isRotated?: boolean;
16
- }
17
11
  /**
18
12
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
19
13
  */
@@ -10,6 +10,6 @@ import { IButtonIconProps } from '../../types';
10
10
  * @extends SVGAttributes<SVGElement>
11
11
  */
12
12
  export declare const EndIcon: {
13
- (props: IButtonIconProps): React.JSX.Element;
13
+ ({ isRotated, ...props }: IButtonIconProps): React.JSX.Element;
14
14
  displayName: string;
15
15
  };
@@ -10,6 +10,6 @@ import { IButtonIconProps } from '../../types';
10
10
  * @extends SVGAttributes<SVGElement>
11
11
  */
12
12
  export declare const StartIcon: {
13
- (props: IButtonIconProps): React.JSX.Element;
13
+ ({ isRotated, ...props }: IButtonIconProps): React.JSX.Element;
14
14
  displayName: string;
15
15
  };
@@ -4,12 +4,11 @@
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
- export { Button, type IIconProps } from './elements/Button';
7
+ export { Button } from './elements/Button';
8
8
  export { Anchor } from './elements/Anchor';
9
- export { ButtonGroup } from './elements/ButtonGroup';
10
9
  export { ChevronButton } from './elements/ChevronButton';
11
10
  export { IconButton } from './elements/IconButton';
12
11
  export { SplitButton } from './elements/SplitButton';
13
12
  export { ToggleButton } from './elements/ToggleButton';
14
13
  export { ToggleIconButton } from './elements/ToggleIconButton';
15
- export type { IButtonProps, IButtonIconProps as IButtonEndIconProps, IButtonIconProps as IButtonStartIconProps, IAnchorProps, IIconButtonProps, IIconButtonProps as IChevronButtonProps, IToggleButtonProps, IToggleIconButtonProps, IButtonGroupProps } from './types';
14
+ export type { IButtonProps, IButtonIconProps as IButtonEndIconProps, IButtonIconProps as IButtonStartIconProps, IAnchorProps, IIconButtonProps, IIconButtonProps as IChevronButtonProps, IToggleButtonProps, IToggleIconButtonProps } from './types';
@@ -14,4 +14,4 @@ export declare const StyledAnchor: import("styled-components").StyledComponent<"
14
14
  dir: "rtl" | undefined;
15
15
  isLink: boolean;
16
16
  type: undefined;
17
- }, "type" | "dir" | "data-garden-id" | "data-garden-version" | "as" | "isLink">;
17
+ }, "type" | "dir" | "as" | "data-garden-id" | "data-garden-version" | "isLink">;
@@ -4,13 +4,13 @@
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" />
7
8
  import { DefaultTheme } from 'styled-components';
8
- import React from 'react';
9
9
  interface IStyledIconProps {
10
- isRotated: boolean;
11
- position?: 'start' | 'end';
10
+ $isRotated: boolean;
11
+ $position?: 'start' | 'end';
12
12
  }
13
- export declare const StyledIcon: import("styled-components").StyledComponent<({ children, isRotated, theme, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
13
+ export declare const StyledIcon: import("styled-components").StyledComponent<({ children, theme, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
14
14
  'data-garden-id': string;
15
15
  'data-garden-version': string;
16
16
  } & IStyledIconProps, "data-garden-id" | "data-garden-version">;
@@ -7,7 +7,7 @@
7
7
  /**
8
8
  * Accepts all `<div>` props
9
9
  */
10
- export declare const StyledButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
10
+ export declare const StyledSplitButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
11
11
  'data-garden-id': string;
12
12
  'data-garden-version': string;
13
13
  }, "data-garden-id" | "data-garden-version">;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export * from './StyledAnchor';
8
8
  export * from './StyledButton';
9
- export * from './StyledButtonGroup';
9
+ export * from './StyledSplitButton';
10
10
  export * from './StyledExternalIcon';
11
11
  export * from './StyledIcon';
12
12
  export * from './StyledIconButton';
@@ -4,7 +4,7 @@
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 { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, SVGAttributes } from 'react';
7
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, SVGAttributes } from 'react';
8
8
  export declare const SIZE: readonly ["small", "medium", "large"];
9
9
  export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
10
10
  /** Applies danger styling */
@@ -25,8 +25,6 @@ export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
25
25
  isPill?: boolean;
26
26
  /** Applies inset `box-shadow` styling on focus */
27
27
  focusInset?: boolean;
28
- /** @ignore prop used by `ButtonGroup` */
29
- isSelected?: boolean;
30
28
  }
31
29
  export interface IToggleButtonProps extends IButtonProps {
32
30
  /**
@@ -56,13 +54,3 @@ export interface IAnchorProps extends Pick<IButtonProps, 'isDanger'>, AnchorHTML
56
54
  **/
57
55
  externalIconLabel?: string;
58
56
  }
59
- export interface IButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
60
- /** Defines the currently selected button in the group */
61
- selectedItem?: any;
62
- /**
63
- * Handles button selection
64
- *
65
- * @param {any} item The selected item
66
- */
67
- onSelect?: (item: any) => void;
68
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-buttons",
3
- "version": "9.0.0-next.1",
3
+ "version": "9.0.0-next.11",
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>",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/zendeskgarden/react-components/issues"
11
11
  },
12
12
  "main": "dist/index.cjs.js",
13
- "module": "dist/index.esm.js",
13
+ "module": "dist/esm/index.js",
14
14
  "files": [
15
15
  "dist"
16
16
  ],
@@ -21,20 +21,19 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@zendeskgarden/container-selection": "^3.0.0",
25
24
  "@zendeskgarden/container-utilities": "^2.0.0",
26
25
  "polished": "^4.0.0",
27
26
  "prop-types": "^15.5.7",
28
27
  "react-merge-refs": "^2.0.0"
29
28
  },
30
29
  "peerDependencies": {
31
- "@zendeskgarden/react-theming": "^8.67.0",
30
+ "@zendeskgarden/react-theming": ">=9.0.0-next",
32
31
  "react": ">=16.8.0",
33
32
  "react-dom": ">=16.8.0",
34
- "styled-components": "^5.1.0"
33
+ "styled-components": "^5.3.1"
35
34
  },
36
35
  "devDependencies": {
37
- "@zendeskgarden/react-theming": "^9.0.0-next.1",
36
+ "@zendeskgarden/react-theming": "^9.0.0-next.11",
38
37
  "@zendeskgarden/svg-icons": "7.0.0"
39
38
  },
40
39
  "keywords": [
@@ -47,5 +46,5 @@
47
46
  "access": "public"
48
47
  },
49
48
  "zendeskgarden:src": "src/index.ts",
50
- "gitHead": "a9e4e776bf6ad8860a198fc24f27b2b5cbc83320"
49
+ "gitHead": "0de1cc664807bd993ccd3beeb78e8fd1f3828320"
51
50
  }