@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 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 === "") {
@@ -59,6 +59,7 @@ export type ButtonProps =
59
59
  | HrefButtonProps;
60
60
  declare type ButtonLinkCommonProps = {
61
61
  children: React.Node,
62
+ disabled?: boolean,
62
63
  trackingEvent?: TrackingEvent | $ReadOnlyArray<TrackingEvent>,
63
64
  trackEvent?: boolean,
64
65
 
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  exports.PACKAGE_VERSION = void 0;
6
- var PACKAGE_VERSION = "11.5.1";
6
+ var PACKAGE_VERSION = "11.6.0";
7
7
  exports.PACKAGE_VERSION = PACKAGE_VERSION;
@@ -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.5.1";
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "11.5.1",
3
+ "version": "11.6.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",