@commercetools-uikit/secondary-icon-button 19.8.0 → 19.10.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/commercetools-uikit-secondary-icon-button.cjs.dev.js +1 -1
- package/dist/commercetools-uikit-secondary-icon-button.cjs.prod.js +1 -1
- package/dist/commercetools-uikit-secondary-icon-button.esm.js +1 -1
- package/dist/declarations/src/secondary-icon-button.d.ts +38 -1
- package/package.json +6 -6
|
@@ -130,7 +130,7 @@ SecondaryIconButton.defaultProps = {
|
|
|
130
130
|
var SecondaryIconButton$1 = SecondaryIconButton;
|
|
131
131
|
|
|
132
132
|
// NOTE: This string will be replaced on build time with the package version.
|
|
133
|
-
var version = "19.
|
|
133
|
+
var version = "19.10.0";
|
|
134
134
|
|
|
135
135
|
exports["default"] = SecondaryIconButton$1;
|
|
136
136
|
exports.version = version;
|
|
@@ -114,7 +114,7 @@ SecondaryIconButton.defaultProps = {
|
|
|
114
114
|
var SecondaryIconButton$1 = SecondaryIconButton;
|
|
115
115
|
|
|
116
116
|
// NOTE: This string will be replaced on build time with the package version.
|
|
117
|
-
var version = "19.
|
|
117
|
+
var version = "19.10.0";
|
|
118
118
|
|
|
119
119
|
exports["default"] = SecondaryIconButton$1;
|
|
120
120
|
exports.version = version;
|
|
@@ -110,6 +110,6 @@ SecondaryIconButton.defaultProps = {
|
|
|
110
110
|
var SecondaryIconButton$1 = SecondaryIconButton;
|
|
111
111
|
|
|
112
112
|
// NOTE: This string will be replaced on build time with the package version.
|
|
113
|
-
var version = "19.
|
|
113
|
+
var version = "19.10.0";
|
|
114
114
|
|
|
115
115
|
export { SecondaryIconButton$1 as default, version };
|
|
@@ -1,16 +1,53 @@
|
|
|
1
1
|
import { type MouseEvent, type KeyboardEvent, type ElementType, type ReactElement, type ComponentPropsWithRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use sizes from `TSizes` instead.
|
|
4
|
+
*/
|
|
2
5
|
type TLegacySizes = 'small' | 'medium' | 'big';
|
|
6
|
+
/**
|
|
7
|
+
* Available sizes for the SecondaryIconButton.
|
|
8
|
+
*/
|
|
3
9
|
type TSizes = '10' | '20' | '30' | '40';
|
|
4
10
|
export type TSecondaryButtonIconProps<TStringOrComponent extends ElementType = 'button'> = {
|
|
11
|
+
/**
|
|
12
|
+
* You may pass in a string like "a" to have the button element render an anchor tag, or
|
|
13
|
+
* you could pass in a React Component, like a `Link`.
|
|
14
|
+
* <br />
|
|
15
|
+
* The `<SecondaryIconButton>` additionally accepts any props or attributes specific to the given element or component.
|
|
16
|
+
*/
|
|
5
17
|
as?: TStringOrComponent;
|
|
18
|
+
/**
|
|
19
|
+
* Used as the HTML type attribute.
|
|
20
|
+
*/
|
|
6
21
|
type?: 'submit' | 'reset' | 'button';
|
|
22
|
+
/**
|
|
23
|
+
* An <Icon /> component.
|
|
24
|
+
*/
|
|
7
25
|
icon?: ReactElement;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates the color scheme of the button.
|
|
28
|
+
*/
|
|
8
29
|
color?: 'solid' | 'primary' | 'info';
|
|
30
|
+
/**
|
|
31
|
+
* Should describe what the button does, for accessibility purposes (screen-reader users)
|
|
32
|
+
*/
|
|
9
33
|
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Tells when the button should present a disabled state.
|
|
36
|
+
*/
|
|
10
37
|
isDisabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates the size of the icon. Available sizes are '10', '20', '30', '40'.
|
|
40
|
+
*/
|
|
11
41
|
size?: TLegacySizes | TSizes;
|
|
42
|
+
/**
|
|
43
|
+
* Handler when the button is clicked.
|
|
44
|
+
*/
|
|
12
45
|
onClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
13
|
-
} &
|
|
46
|
+
} & /**
|
|
47
|
+
* Include any props derived from the React component passed to the `as` prop.
|
|
48
|
+
* For example, given `as={Link}`, all props of the `<Link>` component are allowed to be
|
|
49
|
+
* passed to `<SecondaryIconButton>`: <SecondaryIconButton as={Link} to="/foo" label="Foo" />.
|
|
50
|
+
*/ ComponentPropsWithRef<TStringOrComponent>;
|
|
14
51
|
declare const SecondaryIconButton: {
|
|
15
52
|
<TStringOrComponent extends ElementType = "button">(props: TSecondaryButtonIconProps<TStringOrComponent>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
53
|
displayName: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/secondary-icon-button",
|
|
3
3
|
"description": "Secondary Icon Buttons are \"icon-only\" buttons and a restricted version of the `<IconButton>`. They trigger an action when clicked (`onClick` prop). You must also pass a label for accessibility reasons.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.10.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/spacings": "19.
|
|
27
|
-
"@commercetools-uikit/text": "19.
|
|
28
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/accessible-button": "19.10.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.10.0",
|
|
26
|
+
"@commercetools-uikit/spacings": "19.10.0",
|
|
27
|
+
"@commercetools-uikit/text": "19.10.0",
|
|
28
|
+
"@commercetools-uikit/utils": "19.10.0",
|
|
29
29
|
"@emotion/react": "^11.10.5",
|
|
30
30
|
"@emotion/styled": "^11.10.5",
|
|
31
31
|
"lodash": "4.17.21",
|