@kaizen/components 1.44.0 → 1.45.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.
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import { GenericProps, ButtonFormAttributes, WorkingProps, WorkingUndefinedProps, ButtonBadgeProps } from "../GenericButton";
1
+ import React from "react";
2
+ import { GenericProps, ButtonFormAttributes, WorkingProps, WorkingUndefinedProps, ButtonBadgeProps, ButtonRef } from "../GenericButton";
3
3
  export type IconButtonProps = GenericProps & ButtonFormAttributes & (WorkingProps | WorkingUndefinedProps) & {
4
4
  label: string;
5
5
  primary?: boolean;
@@ -17,14 +17,4 @@ export type IconButtonProps = GenericProps & ButtonFormAttributes & (WorkingProp
17
17
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
18
18
  * {@link https://cultureamp.design/?path=/docs/components-iconbutton--docs Storybook}
19
19
  */
20
- export declare const IconButton: {
21
- (props: IconButtonProps): JSX.Element;
22
- defaultProps: {
23
- primary: boolean;
24
- destructive: boolean;
25
- disabled: boolean;
26
- reversed: boolean;
27
- secondary: boolean;
28
- };
29
- displayName: string;
30
- };
20
+ export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<ButtonRef | undefined>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.44.0",
3
+ "version": "1.45.0",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -108,8 +108,8 @@
108
108
  "ts-node": "^10.9.2",
109
109
  "ts-patch": "^3.1.2",
110
110
  "typescript-transform-paths": "^3.4.7",
111
- "@kaizen/tailwind": "1.2.6",
112
- "@kaizen/design-tokens": "10.3.20"
111
+ "@kaizen/design-tokens": "10.3.20",
112
+ "@kaizen/tailwind": "1.2.6"
113
113
  },
114
114
  "peerDependencies": {
115
115
  "@cultureamp/i18n-react-intl": "^2.5.5",
@@ -1,4 +1,4 @@
1
- import React from "react"
1
+ import React, { forwardRef, Ref } from "react"
2
2
  import {
3
3
  GenericButton,
4
4
  GenericProps,
@@ -6,6 +6,7 @@ import {
6
6
  WorkingProps,
7
7
  WorkingUndefinedProps,
8
8
  ButtonBadgeProps,
9
+ ButtonRef,
9
10
  } from "../GenericButton"
10
11
 
11
12
  export type IconButtonProps = GenericProps &
@@ -28,8 +29,10 @@ export type IconButtonProps = GenericProps &
28
29
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
29
30
  * {@link https://cultureamp.design/?path=/docs/components-iconbutton--docs Storybook}
30
31
  */
31
- export const IconButton = (props: IconButtonProps): JSX.Element => (
32
- <GenericButton iconButton {...props} />
32
+ export const IconButton = forwardRef(
33
+ (props: IconButtonProps, ref: Ref<ButtonRef | undefined>): JSX.Element => (
34
+ <GenericButton iconButton {...props} ref={ref} />
35
+ )
33
36
  )
34
37
 
35
38
  IconButton.defaultProps = {