@telefonica/mistica 11.5.1 → 11.6.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/button.d.ts +1 -0
- package/dist/button.js +5 -2
- package/dist/button.js.flow +1 -0
- package/dist/package-version.js +1 -1
- package/dist/responsive-layout.js +3 -1
- package/dist-es/button.js +5 -2
- package/dist-es/package-version.js +1 -1
- package/dist-es/responsive-layout.js +3 -1
- package/package.json +1 -1
package/dist/button.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export interface SubmitButtonProps extends CommonProps {
|
|
|
59
59
|
export declare type ButtonProps = FakeButtonProps | SubmitButtonProps | ToButtonProps | OnPressButtonProps | HrefButtonProps;
|
|
60
60
|
interface ButtonLinkCommonProps {
|
|
61
61
|
children: React.ReactNode;
|
|
62
|
+
disabled?: boolean;
|
|
62
63
|
trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
|
|
63
64
|
trackEvent?: boolean;
|
|
64
65
|
/** "data-" prefix is automatically added. For example, use "testid" instead of "data-testid" */
|
package/dist/button.js
CHANGED
|
@@ -472,7 +472,8 @@ var useButtonLinkStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
472
472
|
"@media (pointer: coarse)": {
|
|
473
473
|
backgroundColor: "initial"
|
|
474
474
|
}
|
|
475
|
-
}
|
|
475
|
+
},
|
|
476
|
+
"&[disabled]": disabledStyle
|
|
476
477
|
},
|
|
477
478
|
inverse: {
|
|
478
479
|
color: theme.colors.textLinkInverse,
|
|
@@ -492,6 +493,7 @@ var useButtonLinkStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
492
493
|
};
|
|
493
494
|
});
|
|
494
495
|
var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
496
|
+
var formStatus = (0, _formContext).useForm().formStatus;
|
|
495
497
|
var classes = useButtonLinkStyles();
|
|
496
498
|
var isInverse = (0, _themeVariantContext).useIsInverseVariant();
|
|
497
499
|
var _trackingEvent;
|
|
@@ -509,7 +511,8 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
509
511
|
truncate: 1,
|
|
510
512
|
color: "inherit",
|
|
511
513
|
children: props.children
|
|
512
|
-
})
|
|
514
|
+
}),
|
|
515
|
+
disabled: props.disabled || formStatus === "sending"
|
|
513
516
|
};
|
|
514
517
|
if (process.env.NODE_ENV !== "production") {
|
|
515
518
|
if (props.to === "" || props.href === "") {
|
package/dist/button.js.flow
CHANGED
package/dist/package-version.js
CHANGED
|
@@ -58,7 +58,9 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
58
58
|
width: "100%"
|
|
59
59
|
},
|
|
60
60
|
layout: (_obj = {
|
|
61
|
-
margin: "auto"
|
|
61
|
+
margin: "auto",
|
|
62
|
+
paddingLeft: "env(safe-area-inset-left)",
|
|
63
|
+
paddingRight: "env(safe-area-inset-right)"
|
|
62
64
|
}, _defineProperty(_obj, theme.mq.largeDesktop, {
|
|
63
65
|
width: LARGE_DESKTOP_MAX_WIDTH
|
|
64
66
|
}), _defineProperty(_obj, theme.mq.desktop, {
|
package/dist-es/button.js
CHANGED
|
@@ -439,7 +439,8 @@ var useButtonLinkStyles = createUseStyles(function(theme) {
|
|
|
439
439
|
"@media (pointer: coarse)": {
|
|
440
440
|
backgroundColor: "initial"
|
|
441
441
|
}
|
|
442
|
-
}
|
|
442
|
+
},
|
|
443
|
+
"&[disabled]": disabledStyle
|
|
443
444
|
},
|
|
444
445
|
inverse: {
|
|
445
446
|
color: theme.colors.textLinkInverse,
|
|
@@ -459,6 +460,7 @@ var useButtonLinkStyles = createUseStyles(function(theme) {
|
|
|
459
460
|
};
|
|
460
461
|
});
|
|
461
462
|
export var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
463
|
+
var formStatus = useForm().formStatus;
|
|
462
464
|
var classes = useButtonLinkStyles();
|
|
463
465
|
var isInverse = useIsInverseVariant();
|
|
464
466
|
var _trackingEvent;
|
|
@@ -476,7 +478,8 @@ export var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
476
478
|
truncate: 1,
|
|
477
479
|
color: "inherit",
|
|
478
480
|
children: props.children
|
|
479
|
-
})
|
|
481
|
+
}),
|
|
482
|
+
disabled: props.disabled || formStatus === "sending"
|
|
480
483
|
};
|
|
481
484
|
if (process.env.NODE_ENV !== "production") {
|
|
482
485
|
if (props.to === "" || props.href === "") {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
|
|
2
|
-
export var PACKAGE_VERSION = "11.
|
|
2
|
+
export var PACKAGE_VERSION = "11.6.0";
|
|
@@ -27,7 +27,9 @@ var useStyles = createUseStyles(function(theme) {
|
|
|
27
27
|
width: "100%"
|
|
28
28
|
},
|
|
29
29
|
layout: (_obj = {
|
|
30
|
-
margin: "auto"
|
|
30
|
+
margin: "auto",
|
|
31
|
+
paddingLeft: "env(safe-area-inset-left)",
|
|
32
|
+
paddingRight: "env(safe-area-inset-right)"
|
|
31
33
|
}, _defineProperty(_obj, theme.mq.largeDesktop, {
|
|
32
34
|
width: LARGE_DESKTOP_MAX_WIDTH
|
|
33
35
|
}), _defineProperty(_obj, theme.mq.desktop, {
|