@commercetools-uikit/accessible-button 20.2.3 → 20.3.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.
|
@@ -72,9 +72,9 @@ const AccessibleButton = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
72
72
|
_ref$isToggled = _ref.isToggled,
|
|
73
73
|
isToggled = _ref$isToggled === void 0 ? false : _ref$isToggled,
|
|
74
74
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
75
|
-
process.env.NODE_ENV !== "production" ? utils.warning(props.as ? reactIs.isValidElementType(props.as) : true,
|
|
76
|
-
process.env.NODE_ENV !== "production" ? utils.warning(!(props.as && type !== 'button'),
|
|
77
|
-
process.env.NODE_ENV !== "production" ? utils.warning(!(isToggleButton && isToggled === undefined),
|
|
75
|
+
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;
|
|
76
|
+
process.env.NODE_ENV !== "production" ? utils.warning(!(props.as && type !== 'button'), "ui-kit/AccessibleButton: \"type\" does not have any effect when \"as\" is set.") : void 0;
|
|
77
|
+
process.env.NODE_ENV !== "production" ? utils.warning(!(isToggleButton && isToggled === undefined), "ui-kit/AccessibleButton: \"isToggled\" is required if \"isToggleButton\" is \"true\"") : void 0;
|
|
78
78
|
const isButton = !props.as || props.as === 'button';
|
|
79
79
|
const onClick = props.onClick;
|
|
80
80
|
const handleClick = react.useCallback(event => {
|
|
@@ -133,7 +133,7 @@ AccessibleButton.displayName = 'AccessibleButton';
|
|
|
133
133
|
var AccessibleButton$1 = AccessibleButton;
|
|
134
134
|
|
|
135
135
|
// NOTE: This string will be replaced on build time with the package version.
|
|
136
|
-
var version = "20.
|
|
136
|
+
var version = "20.3.0";
|
|
137
137
|
|
|
138
138
|
exports["default"] = AccessibleButton$1;
|
|
139
139
|
exports.getNormalizedButtonStyles = getNormalizedButtonStyles;
|
|
@@ -121,7 +121,7 @@ AccessibleButton.displayName = 'AccessibleButton';
|
|
|
121
121
|
var AccessibleButton$1 = AccessibleButton;
|
|
122
122
|
|
|
123
123
|
// NOTE: This string will be replaced on build time with the package version.
|
|
124
|
-
var version = "20.
|
|
124
|
+
var version = "20.3.0";
|
|
125
125
|
|
|
126
126
|
exports["default"] = AccessibleButton$1;
|
|
127
127
|
exports.getNormalizedButtonStyles = getNormalizedButtonStyles;
|
|
@@ -55,9 +55,9 @@ const AccessibleButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
55
55
|
_ref$isToggled = _ref.isToggled,
|
|
56
56
|
isToggled = _ref$isToggled === void 0 ? false : _ref$isToggled,
|
|
57
57
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
-
process.env.NODE_ENV !== "production" ? warning(props.as ? isValidElementType(props.as) : true,
|
|
59
|
-
process.env.NODE_ENV !== "production" ? warning(!(props.as && type !== 'button'),
|
|
60
|
-
process.env.NODE_ENV !== "production" ? warning(!(isToggleButton && isToggled === undefined),
|
|
58
|
+
process.env.NODE_ENV !== "production" ? warning(props.as ? isValidElementType(props.as) : true, "ui-kit/AccessibleButton: \"as\" must be a valid element type.") : void 0;
|
|
59
|
+
process.env.NODE_ENV !== "production" ? warning(!(props.as && type !== 'button'), "ui-kit/AccessibleButton: \"type\" does not have any effect when \"as\" is set.") : void 0;
|
|
60
|
+
process.env.NODE_ENV !== "production" ? warning(!(isToggleButton && isToggled === undefined), "ui-kit/AccessibleButton: \"isToggled\" is required if \"isToggleButton\" is \"true\"") : void 0;
|
|
61
61
|
const isButton = !props.as || props.as === 'button';
|
|
62
62
|
const onClick = props.onClick;
|
|
63
63
|
const handleClick = useCallback(event => {
|
|
@@ -116,6 +116,6 @@ AccessibleButton.displayName = 'AccessibleButton';
|
|
|
116
116
|
var AccessibleButton$1 = AccessibleButton;
|
|
117
117
|
|
|
118
118
|
// NOTE: This string will be replaced on build time with the package version.
|
|
119
|
-
var version = "20.
|
|
119
|
+
var version = "20.3.0";
|
|
120
120
|
|
|
121
121
|
export { AccessibleButton$1 as default, getNormalizedButtonStyles, version };
|
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": "20.
|
|
4
|
+
"version": "20.3.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/design-system": "20.
|
|
25
|
-
"@commercetools-uikit/utils": "20.
|
|
24
|
+
"@commercetools-uikit/design-system": "20.3.0",
|
|
25
|
+
"@commercetools-uikit/utils": "20.3.0",
|
|
26
26
|
"@emotion/react": "^11.10.5",
|
|
27
27
|
"@emotion/styled": "^11.10.5",
|
|
28
28
|
"@types/react-is": "^19.0.0",
|
|
29
29
|
"lodash": "4.17.21",
|
|
30
|
-
"react-is": "19.
|
|
30
|
+
"react-is": "19.2.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"react": "19.
|
|
33
|
+
"react": "19.2.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "19.x"
|