@commercetools-uikit/flat-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.
@@ -153,7 +153,7 @@ FlatButton.defaultProps = defaultProps;
153
153
  var FlatButton$1 = FlatButton;
154
154
 
155
155
  // NOTE: This string will be replaced on build time with the package version.
156
- var version = "19.8.0";
156
+ var version = "19.10.0";
157
157
 
158
158
  exports["default"] = FlatButton$1;
159
159
  exports.version = version;
@@ -128,7 +128,7 @@ FlatButton.defaultProps = defaultProps;
128
128
  var FlatButton$1 = FlatButton;
129
129
 
130
130
  // NOTE: This string will be replaced on build time with the package version.
131
- var version = "19.8.0";
131
+ var version = "19.10.0";
132
132
 
133
133
  exports["default"] = FlatButton$1;
134
134
  exports.version = version;
@@ -134,6 +134,6 @@ FlatButton.defaultProps = defaultProps;
134
134
  var FlatButton$1 = FlatButton;
135
135
 
136
136
  // NOTE: This string will be replaced on build time with the package version.
137
- var version = "19.8.0";
137
+ var version = "19.10.0";
138
138
 
139
139
  export { FlatButton$1 as default, version };
@@ -1,14 +1,47 @@
1
1
  import { type MouseEvent, type KeyboardEvent, type ElementType, type ReactElement, ComponentPropsWithRef } from 'react';
2
2
  export type TFlatButtonProps<TStringOrComponent extends ElementType = 'button'> = {
3
+ /**
4
+ * You may pass in a string like "a" to have the button element render an anchor tag, or
5
+ * you could pass in a React Component, like a `Link`.
6
+ * <br />
7
+ * The `<FlatButton>` additionally accepts any props or attributes specific to the given element or component.
8
+ */
3
9
  as?: TStringOrComponent;
10
+ /**
11
+ * Indicates the color scheme of the button.
12
+ */
4
13
  tone?: 'primary' | 'secondary' | 'inverted' | 'critical';
14
+ /**
15
+ * Used as the HTML `type` attribute.
16
+ */
5
17
  type?: 'submit' | 'reset' | 'button';
18
+ /**
19
+ * Should describe what the button is for.
20
+ */
6
21
  label: string;
22
+ /**
23
+ * Handler when the button is clicked.
24
+ */
7
25
  onClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
26
+ /**
27
+ * The icon of the button.
28
+ */
8
29
  icon?: ReactElement;
30
+ /**
31
+ * The position of the icon.
32
+ */
9
33
  iconPosition?: 'left' | 'right';
34
+ /**
35
+ * Determines if the button is disabled.
36
+ * <br />
37
+ * Note that this influences the `tone` and `onClick` will not be triggered in this state.
38
+ */
10
39
  isDisabled?: boolean;
11
- } & ComponentPropsWithRef<TStringOrComponent>;
40
+ } & /**
41
+ * Include any props derived from the React component passed to the `as` prop.
42
+ * For example, given `as={Link}`, all props of the `<Link>` component are allowed to be
43
+ * passed to `<FlatButton>`: <FlatButton as={Link} to="/foo" label="Foo" />.
44
+ */ ComponentPropsWithRef<TStringOrComponent>;
12
45
  declare const FlatButton: {
13
46
  <TStringOrComponent extends ElementType = "button">(props: TFlatButtonProps<TStringOrComponent>): import("@emotion/react/jsx-runtime").JSX.Element;
14
47
  displayName: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/flat-button",
3
3
  "description": "Flat buttons are minimal and a flat variation of primary and secondary buttons.",
4
- "version": "19.8.0",
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.8.0",
25
- "@commercetools-uikit/design-system": "19.8.0",
26
- "@commercetools-uikit/spacings-inline": "19.8.0",
27
- "@commercetools-uikit/text": "19.8.0",
28
- "@commercetools-uikit/utils": "19.8.0",
24
+ "@commercetools-uikit/accessible-button": "19.10.0",
25
+ "@commercetools-uikit/design-system": "19.10.0",
26
+ "@commercetools-uikit/spacings-inline": "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",