@commercetools-uikit/icon-button 12.2.2 → 12.2.9
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/README.md +1 -2
- package/dist/commercetools-uikit-icon-button.cjs.dev.js +49 -47
- package/dist/commercetools-uikit-icon-button.cjs.prod.js +37 -36
- package/dist/commercetools-uikit-icon-button.esm.js +35 -32
- package/dist/declarations/src/icon-button.d.ts +20 -20
- package/dist/declarations/src/icon-button.styles.d.ts +8 -8
- package/dist/declarations/src/index.d.ts +2 -2
- package/dist/declarations/src/version.d.ts +2 -2
- package/package.json +9 -13
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare type TIconButtonProps<TStringOrComponent extends
|
|
3
|
-
as?: TStringOrComponent;
|
|
4
|
-
type?: 'button' | 'reset' | 'submit';
|
|
5
|
-
label: string;
|
|
6
|
-
icon?:
|
|
7
|
-
isToggleButton?: boolean;
|
|
8
|
-
isToggled?: boolean;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
onClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
-
shape?: 'round' | 'square';
|
|
12
|
-
theme?: 'default' | 'primary' | 'info';
|
|
13
|
-
size?: 'small' | 'medium' | 'big';
|
|
14
|
-
} &
|
|
15
|
-
declare const IconButton: {
|
|
16
|
-
<TStringOrComponent extends
|
|
17
|
-
defaultProps: Pick<TIconButtonProps<"button">, "size" | "type" | "theme" | "shape" | "isToggleButton">;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
export default IconButton;
|
|
1
|
+
import { MouseEvent, KeyboardEvent, ElementType, ReactElement, ComponentPropsWithRef } from 'react';
|
|
2
|
+
export declare type TIconButtonProps<TStringOrComponent extends ElementType = 'button'> = {
|
|
3
|
+
as?: TStringOrComponent;
|
|
4
|
+
type?: 'button' | 'reset' | 'submit';
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactElement;
|
|
7
|
+
isToggleButton?: boolean;
|
|
8
|
+
isToggled?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
11
|
+
shape?: 'round' | 'square';
|
|
12
|
+
theme?: 'default' | 'primary' | 'info';
|
|
13
|
+
size?: 'small' | 'medium' | 'big';
|
|
14
|
+
} & ComponentPropsWithRef<TStringOrComponent>;
|
|
15
|
+
declare const IconButton: {
|
|
16
|
+
<TStringOrComponent extends ElementType<any> = "button">(props: TIconButtonProps<TStringOrComponent>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
+
defaultProps: Pick<TIconButtonProps<"button">, "size" | "type" | "theme" | "shape" | "isToggleButton">;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export default IconButton;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { TIconButtonProps } from './icon-button';
|
|
2
|
-
declare const getIconThemeColor: (props: Pick<TIconButtonProps, 'isToggleButton' | 'isToggled' | 'theme' | 'isDisabled' | 'icon'>) => any;
|
|
3
|
-
declare const getStateStyles: (isDisabled: TIconButtonProps['isDisabled'], isActive: boolean, theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles | (false | import("@emotion/utils").SerializedStyles | undefined)[];
|
|
4
|
-
declare const getShapeStyles: (shape: TIconButtonProps['shape'], size: TIconButtonProps['size']) => import("@emotion/utils").SerializedStyles;
|
|
5
|
-
declare const getSizeStyles: (size: TIconButtonProps['size']) => import("@emotion/utils").SerializedStyles;
|
|
6
|
-
declare const getThemeStyles: (theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles;
|
|
7
|
-
declare const getHoverStyles: (isDisabled: TIconButtonProps['isDisabled'], theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles;
|
|
8
|
-
export { getStateStyles, getHoverStyles, getShapeStyles, getSizeStyles, getThemeStyles, getIconThemeColor, };
|
|
1
|
+
import type { TIconButtonProps } from './icon-button';
|
|
2
|
+
declare const getIconThemeColor: (props: Pick<TIconButtonProps, 'isToggleButton' | 'isToggled' | 'theme' | 'isDisabled' | 'icon'>) => any;
|
|
3
|
+
declare const getStateStyles: (isDisabled: TIconButtonProps['isDisabled'], isActive: boolean, theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles | (false | import("@emotion/utils").SerializedStyles | undefined)[];
|
|
4
|
+
declare const getShapeStyles: (shape: TIconButtonProps['shape'], size: TIconButtonProps['size']) => import("@emotion/utils").SerializedStyles;
|
|
5
|
+
declare const getSizeStyles: (size: TIconButtonProps['size']) => import("@emotion/utils").SerializedStyles;
|
|
6
|
+
declare const getThemeStyles: (theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles;
|
|
7
|
+
declare const getHoverStyles: (isDisabled: TIconButtonProps['isDisabled'], theme: TIconButtonProps['theme']) => import("@emotion/utils").SerializedStyles;
|
|
8
|
+
export { getStateStyles, getHoverStyles, getShapeStyles, getSizeStyles, getThemeStyles, getIconThemeColor, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './icon-button';
|
|
2
|
-
export { default as version } from './version';
|
|
1
|
+
export { default } from './icon-button';
|
|
2
|
+
export { default as version } from './version';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: "__@UI_KIT_PACKAGE/VERSION_OF_RELEASE__";
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/icon-button",
|
|
3
3
|
"description": "Icon buttons are icon-only buttons. They trigger an action when clicked (`onClick` prop). You must also pass a label for accessibility reasons.",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.9",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
12
|
"keywords": ["javascript", "design system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -19,20 +18,17 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-icon-button.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-icon-button.esm.js",
|
|
21
20
|
"files": ["dist"],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prepare": "../../../../scripts/version.js replace"
|
|
24
|
-
},
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "7.
|
|
27
|
-
"@babel/runtime-corejs3": "7.
|
|
28
|
-
"@commercetools-uikit/accessible-button": "12.2.
|
|
29
|
-
"@commercetools-uikit/design-system": "12.2.
|
|
30
|
-
"@commercetools-uikit/spacings": "12.2.
|
|
31
|
-
"@commercetools-uikit/text": "12.2.
|
|
32
|
-
"@commercetools-uikit/utils": "12.2.
|
|
22
|
+
"@babel/runtime": "7.16.5",
|
|
23
|
+
"@babel/runtime-corejs3": "7.16.5",
|
|
24
|
+
"@commercetools-uikit/accessible-button": "12.2.9",
|
|
25
|
+
"@commercetools-uikit/design-system": "12.2.9",
|
|
26
|
+
"@commercetools-uikit/spacings": "12.2.9",
|
|
27
|
+
"@commercetools-uikit/text": "12.2.9",
|
|
28
|
+
"@commercetools-uikit/utils": "12.2.9",
|
|
33
29
|
"@emotion/react": "^11.4.0",
|
|
34
30
|
"@emotion/styled": "^11.3.0",
|
|
35
|
-
"common-tags": "1.8.
|
|
31
|
+
"common-tags": "1.8.2",
|
|
36
32
|
"lodash": "4.17.21",
|
|
37
33
|
"prop-types": "15.7.2"
|
|
38
34
|
},
|