@commercetools-uikit/accessible-button 19.9.0 → 19.11.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.
@@ -130,7 +130,7 @@ AccessibleButton.defaultProps = defaultProps;
130
130
  var AccessibleButton$1 = AccessibleButton;
131
131
 
132
132
  // NOTE: This string will be replaced on build time with the package version.
133
- var version = "19.9.0";
133
+ var version = "19.11.0";
134
134
 
135
135
  exports["default"] = AccessibleButton$1;
136
136
  exports.getNormalizedButtonStyles = getNormalizedButtonStyles;
@@ -117,7 +117,7 @@ AccessibleButton.defaultProps = defaultProps;
117
117
  var AccessibleButton$1 = AccessibleButton;
118
118
 
119
119
  // NOTE: This string will be replaced on build time with the package version.
120
- var version = "19.9.0";
120
+ var version = "19.11.0";
121
121
 
122
122
  exports["default"] = AccessibleButton$1;
123
123
  exports.getNormalizedButtonStyles = getNormalizedButtonStyles;
@@ -113,6 +113,6 @@ AccessibleButton.defaultProps = defaultProps;
113
113
  var AccessibleButton$1 = AccessibleButton;
114
114
 
115
115
  // NOTE: This string will be replaced on build time with the package version.
116
- var version = "19.9.0";
116
+ var version = "19.11.0";
117
117
 
118
118
  export { AccessibleButton$1 as default, getNormalizedButtonStyles, version };
@@ -1,15 +1,53 @@
1
1
  import { ReactNode, KeyboardEvent, ComponentType, MouseEvent } from 'react';
2
2
  export type TAccessibleButtonProps = {
3
+ /**
4
+ * By default the component renders a `button` element. You can pass an optional `React.ElemenType`
5
+ * in case this needs to be rendered as a different element.
6
+ */
3
7
  as?: string | ComponentType;
8
+ /**
9
+ * The ID of the element.
10
+ */
4
11
  id?: string;
12
+ /**
13
+ * The [type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) of the `button` element.
14
+ */
5
15
  type?: 'submit' | 'reset' | 'button';
16
+ /**
17
+ * The aria-label value.
18
+ */
6
19
  label: string;
20
+ /**
21
+ * Any React node.
22
+ */
7
23
  children: ReactNode;
24
+ /**
25
+ * If `true`, indicates that this is a toggle button.
26
+ */
8
27
  isToggleButton?: boolean;
28
+ /**
29
+ * If `true`, indicates that this element is in a toggled state.
30
+ * <br/>
31
+ * This prop is only used if `isToggleButton` is `true`.
32
+ */
9
33
  isToggled?: boolean;
34
+ /**
35
+ * If `true`, indicates that the element is in a disabled state.
36
+ */
10
37
  isDisabled?: boolean;
38
+ /**
39
+ * Allow to override the styles by passing a `className` prop.
40
+ * <br/>
41
+ * Custom styles can also be passed using the [`css` prop from emotion](https://emotion.sh/docs/css-prop#style-precedence).
42
+ */
11
43
  className?: string;
44
+ /**
45
+ * Event handler when the button is clicked, or the user presses `ENTER` or `SPACE`.
46
+ */
12
47
  onClick?: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
48
+ /**
49
+ * Any HTML attributes to be forwarded to the HTML element.
50
+ */
13
51
  buttonAttributes?: Record<string, unknown>;
14
52
  };
15
53
  declare const AccessibleButton: import("react").ForwardRefExoticComponent<TAccessibleButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/accessible-button",
3
3
  "description": "A React component that you can use to wrap your buttons in an accessible <button/> element.",
4
- "version": "19.9.0",
4
+ "version": "19.11.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/design-system": "19.9.0",
25
- "@commercetools-uikit/utils": "19.9.0",
24
+ "@commercetools-uikit/design-system": "19.11.0",
25
+ "@commercetools-uikit/utils": "19.11.0",
26
26
  "@emotion/react": "^11.10.5",
27
27
  "@emotion/styled": "^11.10.5",
28
28
  "@types/react-is": "^17.0.3",