@commercetools-uikit/accessible-button 19.11.0 → 19.12.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.
|
@@ -68,9 +68,9 @@ const defaultProps = {
|
|
|
68
68
|
isToggled: false
|
|
69
69
|
};
|
|
70
70
|
const AccessibleButton = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
71
|
-
process.env.NODE_ENV !== "production" ? utils.warning(props.as ? reactIs.isValidElementType(props.as) : true,
|
|
72
|
-
process.env.NODE_ENV !== "production" ? utils.warning(!(props.as && props.type !== 'button'),
|
|
73
|
-
process.env.NODE_ENV !== "production" ? utils.warning(!(props.isToggleButton && props.isToggled === undefined),
|
|
71
|
+
process.env.NODE_ENV !== "production" ? utils.warning(props.as ? reactIs.isValidElementType(props.as) : true, `ui-kit/AccessibleButton: "as" must be a valid element type.`) : void 0;
|
|
72
|
+
process.env.NODE_ENV !== "production" ? utils.warning(!(props.as && props.type !== 'button'), `ui-kit/AccessibleButton: "type" does not have any effect when "as" is set.`) : void 0;
|
|
73
|
+
process.env.NODE_ENV !== "production" ? utils.warning(!(props.isToggleButton && props.isToggled === undefined), `ui-kit/AccessibleButton: "isToggled" is required if "isToggleButton" is "true"`) : void 0;
|
|
74
74
|
const isButton = !props.as || props.as === 'button';
|
|
75
75
|
const onClick = props.onClick;
|
|
76
76
|
const handleClick = react.useCallback(event => {
|
|
@@ -51,9 +51,9 @@ const defaultProps = {
|
|
|
51
51
|
isToggled: false
|
|
52
52
|
};
|
|
53
53
|
const AccessibleButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
54
|
-
process.env.NODE_ENV !== "production" ? warning(props.as ? isValidElementType(props.as) : true,
|
|
55
|
-
process.env.NODE_ENV !== "production" ? warning(!(props.as && props.type !== 'button'),
|
|
56
|
-
process.env.NODE_ENV !== "production" ? warning(!(props.isToggleButton && props.isToggled === undefined),
|
|
54
|
+
process.env.NODE_ENV !== "production" ? warning(props.as ? isValidElementType(props.as) : true, `ui-kit/AccessibleButton: "as" must be a valid element type.`) : void 0;
|
|
55
|
+
process.env.NODE_ENV !== "production" ? warning(!(props.as && props.type !== 'button'), `ui-kit/AccessibleButton: "type" does not have any effect when "as" is set.`) : void 0;
|
|
56
|
+
process.env.NODE_ENV !== "production" ? warning(!(props.isToggleButton && props.isToggled === undefined), `ui-kit/AccessibleButton: "isToggled" is required if "isToggleButton" is "true"`) : void 0;
|
|
57
57
|
const isButton = !props.as || props.as === 'button';
|
|
58
58
|
const onClick = props.onClick;
|
|
59
59
|
const handleClick = useCallback(event => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const normalizedButtonStyles: import("@emotion/
|
|
2
|
-
declare const getNormalizedButtonStyles: () => import("@emotion/
|
|
1
|
+
declare const normalizedButtonStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
+
declare const getNormalizedButtonStyles: () => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export { normalizedButtonStyles, getNormalizedButtonStyles };
|
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.
|
|
4
|
+
"version": "19.12.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.
|
|
25
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/design-system": "19.12.0",
|
|
25
|
+
"@commercetools-uikit/utils": "19.12.0",
|
|
26
26
|
"@emotion/react": "^11.10.5",
|
|
27
27
|
"@emotion/styled": "^11.10.5",
|
|
28
28
|
"@types/react-is": "^17.0.3",
|