@telefonica/mistica 12.3.0 → 12.5.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
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { TouchableElement } from './touchable';
2
3
  import type { DataAttributes, RendersElement, RendersNullableElement, TrackingEvent } from './utils/types';
3
4
  import type { Location } from 'history';
4
5
  export declare const BUTTON_MIN_WIDTH = 136;
@@ -84,10 +85,10 @@ interface ButtonLinkToProps extends ButtonLinkCommonProps {
84
85
  href?: undefined;
85
86
  }
86
87
  export declare type ButtonLinkProps = ButtonLinkOnPressProps | ButtonLinkHrefProps | ButtonLinkToProps;
87
- export declare const ButtonLink: React.ForwardRefExoticComponent<ButtonLinkProps & React.RefAttributes<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>>;
88
- export declare const ButtonPrimary: React.FC<ButtonProps>;
89
- export declare const ButtonSecondary: React.FC<ButtonProps>;
90
- export declare const ButtonDanger: React.FC<ButtonProps>;
88
+ export declare const ButtonLink: React.ForwardRefExoticComponent<ButtonLinkProps & React.RefAttributes<TouchableElement>>;
89
+ export declare const ButtonPrimary: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<TouchableElement>>;
90
+ export declare const ButtonSecondary: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<TouchableElement>>;
91
+ export declare const ButtonDanger: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<TouchableElement>>;
91
92
  export declare type ButtonElement = RendersElement<typeof ButtonPrimary> | RendersElement<typeof ButtonSecondary> | RendersElement<typeof ButtonDanger>;
92
93
  export declare type NullableButtonElement = RendersNullableElement<typeof ButtonPrimary> | RendersNullableElement<typeof ButtonSecondary> | RendersNullableElement<typeof ButtonDanger>;
93
94
  export {};
package/dist/button.js CHANGED
@@ -346,9 +346,9 @@ var renderButtonContent = function renderButtonContent(param) {
346
346
  });
347
347
  return resultChildrenArr;
348
348
  };
349
- var Button = function Button(props) {
349
+ var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
350
350
  var eventFormat = (0, _analytics).useTrackingConfig().eventFormat;
351
- var ref = (0, _formContext).useForm(), formStatus = ref.formStatus, formId = ref.formId;
351
+ var _$ref = (0, _formContext).useForm(), formStatus = _$ref.formStatus, formId = _$ref.formId;
352
352
  var isInverse = (0, _themeVariantContext).useIsInverseVariant();
353
353
  var classes = props.classes, loadingText = props.loadingText;
354
354
  var isSubmitButton = !!props.submit;
@@ -358,7 +358,7 @@ var Button = function Button(props) {
358
358
  // specially in iPhone). But we want the spinner to be visible during the show/hide animation.
359
359
  // * When showSpinner prop is true, state is changed immediately.
360
360
  // * When the transition ends this state is updated again if needed
361
- var ref1 = _slicedToArray(React.useState(!!showSpinner), 2), shouldRenderSpinner = ref1[0], setShouldRenderSpinner = ref1[1];
361
+ var _$ref1 = _slicedToArray(React.useState(!!showSpinner), 2), shouldRenderSpinner = _$ref1[0], setShouldRenderSpinner = _$ref1[1];
362
362
  React.useEffect(function() {
363
363
  if (showSpinner && !shouldRenderSpinner) {
364
364
  setShouldRenderSpinner(true);
@@ -405,6 +405,7 @@ var Button = function Button(props) {
405
405
  var _trackingEvent;
406
406
  var _obj;
407
407
  var commonProps = {
408
+ ref: ref,
408
409
  className: (0, _classnames).default(classes.button, props.className, (_obj = {}, _defineProperty(_obj, classes.small, props.small), _defineProperty(_obj, classes.inverse, isInverse), _defineProperty(_obj, classes.light, !isInverse), _defineProperty(_obj, classes.isLoading, showSpinner), _obj)),
409
410
  style: _objectSpread({
410
411
  cursor: props.fake ? "pointer" : undefined
@@ -518,7 +519,7 @@ var Button = function Button(props) {
518
519
  throw Error("Bad button props");
519
520
  }
520
521
  return null;
521
- };
522
+ });
522
523
  var useButtonLinkStyles = (0, _jss).createUseStyles(function(theme) {
523
524
  var paddingY = 6;
524
525
  var paddingX = 12;
@@ -645,27 +646,30 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
645
646
  return null;
646
647
  });
647
648
  exports.ButtonLink = ButtonLink;
648
- var ButtonPrimary = function ButtonPrimary(props) {
649
+ var ButtonPrimary = /*#__PURE__*/ React.forwardRef(function(props, ref) {
649
650
  var classes = usePrimaryButtonStyles();
650
651
  return /*#__PURE__*/ (0, _jsxRuntime).jsx(Button, _objectSpread({}, props, {
652
+ ref: ref,
651
653
  classes: classes,
652
654
  type: "primary"
653
655
  }));
654
- };
656
+ });
655
657
  exports.ButtonPrimary = ButtonPrimary;
656
- var ButtonSecondary = function ButtonSecondary(props) {
658
+ var ButtonSecondary = /*#__PURE__*/ React.forwardRef(function(props, ref) {
657
659
  var classes = useSecondaryButtonStyles();
658
660
  return /*#__PURE__*/ (0, _jsxRuntime).jsx(Button, _objectSpread({}, props, {
661
+ ref: ref,
659
662
  classes: classes,
660
663
  type: "secondary"
661
664
  }));
662
- };
665
+ });
663
666
  exports.ButtonSecondary = ButtonSecondary;
664
- var ButtonDanger = function ButtonDanger(props) {
667
+ var ButtonDanger = /*#__PURE__*/ React.forwardRef(function(props, ref) {
665
668
  var classes = useDangerButtonStyles();
666
669
  return /*#__PURE__*/ (0, _jsxRuntime).jsx(Button, _objectSpread({}, props, {
670
+ ref: ref,
667
671
  classes: classes,
668
672
  type: "danger"
669
673
  }));
670
- };
674
+ });
671
675
  exports.ButtonDanger = ButtonDanger;
@@ -1,6 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import * as React from "react";
4
+ import type { TouchableElement } from "./touchable";
4
5
  import type {
5
6
  DataAttributes,
6
7
  RendersElement,
@@ -87,10 +88,10 @@ export type ButtonLinkProps =
87
88
  | ButtonLinkOnPressProps
88
89
  | ButtonLinkHrefProps
89
90
  | ButtonLinkToProps;
90
- declare export var ButtonLink: React.AbstractComponent<ButtonLinkProps, HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;
91
- declare export var ButtonPrimary: React.ComponentType<ButtonProps>;
92
- declare export var ButtonSecondary: React.ComponentType<ButtonProps>;
93
- declare export var ButtonDanger: React.ComponentType<ButtonProps>;
91
+ declare export var ButtonLink: React.AbstractComponent<ButtonLinkProps, TouchableElement>;
92
+ declare export var ButtonPrimary: React.AbstractComponent<ButtonProps, TouchableElement>;
93
+ declare export var ButtonSecondary: React.AbstractComponent<ButtonProps, TouchableElement>;
94
+ declare export var ButtonDanger: React.AbstractComponent<ButtonProps, TouchableElement>;
94
95
  export type ButtonElement =
95
96
  | RendersElement<typeof ButtonPrimary>
96
97
  | RendersElement<typeof ButtonSecondary>
package/dist/card.js CHANGED
@@ -138,7 +138,6 @@ var CardContent = function CardContent(param) {
138
138
  space: 4,
139
139
  children: [
140
140
  pretitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
141
- wordBreak: true,
142
141
  truncate: pretitleLinesMax,
143
142
  as: "div",
144
143
  regular: true,
@@ -146,14 +145,12 @@ var CardContent = function CardContent(param) {
146
145
  children: pretitle
147
146
  }),
148
147
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text4, {
149
- wordBreak: true,
150
148
  truncate: titleLinesMax,
151
149
  as: "h1",
152
150
  regular: true,
153
151
  children: title
154
152
  }),
155
153
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
156
- wordBreak: true,
157
154
  truncate: subtitleLinesMax,
158
155
  as: "div",
159
156
  regular: true,
@@ -165,7 +162,6 @@ var CardContent = function CardContent(param) {
165
162
  })
166
163
  }),
167
164
  description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
168
- wordBreak: true,
169
165
  truncate: descriptionLinesMax,
170
166
  as: "p",
171
167
  regular: true,
@@ -396,14 +392,12 @@ var SnapCard = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
396
392
  space: 4,
397
393
  children: [
398
394
  title && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
399
- wordBreak: true,
400
395
  truncate: titleLinesMax,
401
396
  as: "h1",
402
397
  regular: true,
403
398
  children: title
404
399
  }),
405
400
  subtitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
406
- wordBreak: true,
407
401
  truncate: subtitleLinesMax,
408
402
  regular: true,
409
403
  color: colors.textSecondary,
@@ -169,7 +169,6 @@ var Content = function Content(props) {
169
169
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text4, {
170
170
  as: "h1",
171
171
  regular: true,
172
- wordBreak: true,
173
172
  truncate: props.titleLinesMax,
174
173
  children: title
175
174
  }),
@@ -178,7 +177,6 @@ var Content = function Content(props) {
178
177
  children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
179
178
  regular: true,
180
179
  color: theme.colors.textSecondary,
181
- wordBreak: true,
182
180
  truncate: props.descriptionLinesMax,
183
181
  as: "p",
184
182
  children: description
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { default as ThemeContext } from './theme-context';
3
3
  export { default as ThemeContextProvider } from './theme-context-provider';
4
4
  export { default as ScreenReaderOnly } from './screen-reader-only';
5
5
  export { default as Touchable } from './touchable';
6
+ export type { TouchableElement } from './touchable';
6
7
  export { default as Spinner } from './spinner';
7
8
  export { default as FadeIn } from './fade-in';
8
9
  export { ButtonPrimary, ButtonSecondary, ButtonDanger, ButtonLink } from './button';
@@ -5,6 +5,7 @@ declare export { default as ThemeContext } from "./theme-context";
5
5
  declare export { default as ThemeContextProvider } from "./theme-context-provider";
6
6
  declare export { default as ScreenReaderOnly } from "./screen-reader-only";
7
7
  declare export { default as Touchable } from "./touchable";
8
+ export type { TouchableElement } from "./touchable";
8
9
  declare export { default as Spinner } from "./spinner";
9
10
  declare export { default as FadeIn } from "./fade-in";
10
11
  declare export {
package/dist/list.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { TouchableElement } from './touchable';
2
3
  import type { DataAttributes, TrackingEvent } from './utils/types';
3
4
  interface CommonProps {
4
5
  children?: void;
@@ -107,7 +108,7 @@ interface OnPressRowContentProps extends CommonProps {
107
108
  right?: Right;
108
109
  }
109
110
  declare type RowContentProps = BasicRowContentProps | SwitchRowContentProps | RadioRowContentProps | CheckboxRowContentProps | HrefRowContentProps | ToRowContentProps | OnPressRowContentProps;
110
- export declare const Row: React.ForwardRefExoticComponent<RowContentProps & React.RefAttributes<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>>;
111
+ export declare const Row: React.ForwardRefExoticComponent<RowContentProps & React.RefAttributes<TouchableElement>>;
111
112
  declare type RowListProps = {
112
113
  children: React.ReactNode;
113
114
  ariaLabelledby?: string;
package/dist/list.js CHANGED
@@ -278,7 +278,6 @@ var Content = function Content(param) {
278
278
  space: 4,
279
279
  children: [
280
280
  headline && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
281
- wordBreak: true,
282
281
  regular: true,
283
282
  color: colors.textPrimary,
284
283
  children: headline
@@ -287,7 +286,6 @@ var Content = function Content(param) {
287
286
  space: 2,
288
287
  children: [
289
288
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text3, {
290
- wordBreak: true,
291
289
  regular: true,
292
290
  color: colors.textPrimary,
293
291
  truncate: titleLinesMax,
@@ -295,14 +293,12 @@ var Content = function Content(param) {
295
293
  children: title
296
294
  }),
297
295
  subtitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
298
- wordBreak: true,
299
296
  regular: true,
300
297
  color: colors.textSecondary,
301
298
  truncate: subtitleLinesMax,
302
299
  children: subtitle
303
300
  }),
304
301
  description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
305
- wordBreak: true,
306
302
  regular: true,
307
303
  color: colors.textSecondary,
308
304
  truncate: descriptionLinesMax,
package/dist/list.js.flow CHANGED
@@ -1,6 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import * as React from "react";
4
+ import type { TouchableElement } from "./touchable";
4
5
  import type { DataAttributes, TrackingEvent } from "./utils/types";
5
6
  declare type CommonProps = {
6
7
  headline?: string | React.Node,
@@ -76,7 +77,7 @@ declare type RowContentProps =
76
77
  | HrefRowContentProps
77
78
  | ToRowContentProps
78
79
  | OnPressRowContentProps;
79
- declare export var Row: React.AbstractComponent<RowContentProps, HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;
80
+ declare export var Row: React.AbstractComponent<RowContentProps, TouchableElement>;
80
81
  declare type RowListProps = {
81
82
  children: React.Node,
82
83
  ariaLabelledby?: string,
@@ -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 = "12.3.0";
6
+ var PACKAGE_VERSION = "12.5.0";
7
7
  exports.PACKAGE_VERSION = PACKAGE_VERSION;
package/dist/tabs.js CHANGED
@@ -285,6 +285,7 @@ var Tabs = function Tabs(param2) {
285
285
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text3, {
286
286
  medium: true,
287
287
  color: "inherit",
288
+ wordBreak: false,
288
289
  children: text
289
290
  })
290
291
  ]
@@ -435,6 +435,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
435
435
  children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text3, {
436
436
  color: colors.textSecondary,
437
437
  regular: true,
438
+ wordBreak: false,
438
439
  children: prefix
439
440
  })
440
441
  }),
package/dist/text.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface TextPresetProps {
8
8
  children?: React.ReactNode;
9
9
  truncate?: boolean | number;
10
10
  wordBreak?: boolean;
11
+ hyphens?: 'auto' | 'manual' | 'none';
11
12
  id?: string;
12
13
  as?: React.ComponentType<any> | string;
13
14
  role?: string;
package/dist/text.js CHANGED
@@ -128,6 +128,10 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
128
128
  return wordBreak1 ? "break-word" : "inherit";
129
129
  }
130
130
  },
131
+ hyphens: function hyphens(param) {
132
+ var hyphens1 = param.hyphens;
133
+ return hyphens1;
134
+ },
131
135
  // Needed to reset the default browser margin that adds to p, h1, h2... elements.
132
136
  margin: 0
133
137
  }, theme.mq.tabletOrSmaller, {
@@ -161,7 +165,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
161
165
  };
162
166
  });
163
167
  var Text = function Text(param) {
164
- var weight = param.weight, color = param.color, decoration = param.decoration, truncate = param.truncate, transform = param.transform, wordBreak = param.wordBreak, _as = param.as, as = _as === void 0 ? "span" : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param["aria-level"], dataAttributes = param.dataAttributes;
168
+ var weight = param.weight, color = param.color, decoration = param.decoration, truncate = param.truncate, transform = param.transform, _wordBreak = param.wordBreak, wordBreak = _wordBreak === void 0 ? true : _wordBreak, hyphens = param.hyphens, _as = param.as, as = _as === void 0 ? "span" : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param["aria-level"], dataAttributes = param.dataAttributes;
165
169
  var isInverse = (0, _themeVariantContext).useIsInverseVariant();
166
170
  var classes = useStyles({
167
171
  isInverse: isInverse,
@@ -174,6 +178,7 @@ var Text = function Text(param) {
174
178
  decoration: decoration,
175
179
  transform: transform,
176
180
  wordBreak: wordBreak,
181
+ hyphens: hyphens,
177
182
  letterSpacing: letterSpacing,
178
183
  truncate: truncate
179
184
  });
package/dist/text.js.flow CHANGED
@@ -10,6 +10,7 @@ export type TextPresetProps = {
10
10
  children?: React.Node,
11
11
  truncate?: boolean | number,
12
12
  wordBreak?: boolean,
13
+ hyphens?: "auto" | "manual" | "none",
13
14
  id?: string,
14
15
  as?: React.ComponentType<any> | string,
15
16
  role?: string,
package/dist/title.js CHANGED
@@ -66,6 +66,7 @@ var Title1 = function Title1(param) {
66
66
  as: as,
67
67
  id: id,
68
68
  dataAttributes: dataAttributes,
69
+ wordBreak: false,
69
70
  children: children
70
71
  }),
71
72
  right: right
@@ -66,5 +66,6 @@ export interface PropsMaybeOnPress extends CommonProps {
66
66
  formId?: string;
67
67
  }
68
68
  export declare type Props = PropsHref | PropsTo | PropsOnPress | PropsMaybeHref | PropsMaybeTo | PropsMaybeOnPress;
69
- declare const Touchable: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>>;
69
+ export declare type TouchableElement = HTMLDivElement | HTMLAnchorElement | HTMLButtonElement;
70
+ declare const Touchable: React.ForwardRefExoticComponent<Props & React.RefAttributes<TouchableElement>>;
70
71
  export default Touchable;
@@ -71,7 +71,11 @@ export type Props =
71
71
  | PropsMaybeHref
72
72
  | PropsMaybeTo
73
73
  | PropsMaybeOnPress;
74
- declare var Touchable: React.AbstractComponent<Props, HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;
74
+ export type TouchableElement =
75
+ | HTMLDivElement
76
+ | HTMLAnchorElement
77
+ | HTMLButtonElement;
78
+ declare var Touchable: React.AbstractComponent<Props, TouchableElement>;
75
79
  declare export default typeof Touchable;
76
80
 
77
81
  import { type CssStyle } from "./__css_types__.js.flow";
package/dist-es/button.js CHANGED
@@ -313,9 +313,9 @@ var renderButtonContent = function(param) {
313
313
  });
314
314
  return resultChildrenArr;
315
315
  };
316
- var Button = function(props) {
316
+ var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
317
317
  var eventFormat = useTrackingConfig().eventFormat;
318
- var ref = useForm(), formStatus = ref.formStatus, formId = ref.formId;
318
+ var _$ref = useForm(), formStatus = _$ref.formStatus, formId = _$ref.formId;
319
319
  var isInverse = useIsInverseVariant();
320
320
  var classes = props.classes, loadingText = props.loadingText;
321
321
  var isSubmitButton = !!props.submit;
@@ -325,7 +325,7 @@ var Button = function(props) {
325
325
  // specially in iPhone). But we want the spinner to be visible during the show/hide animation.
326
326
  // * When showSpinner prop is true, state is changed immediately.
327
327
  // * When the transition ends this state is updated again if needed
328
- var ref1 = _slicedToArray(React.useState(!!showSpinner), 2), shouldRenderSpinner = ref1[0], setShouldRenderSpinner = ref1[1];
328
+ var _$ref1 = _slicedToArray(React.useState(!!showSpinner), 2), shouldRenderSpinner = _$ref1[0], setShouldRenderSpinner = _$ref1[1];
329
329
  React.useEffect(function() {
330
330
  if (showSpinner && !shouldRenderSpinner) {
331
331
  setShouldRenderSpinner(true);
@@ -372,6 +372,7 @@ var Button = function(props) {
372
372
  var _trackingEvent;
373
373
  var _obj;
374
374
  var commonProps = {
375
+ ref: ref,
375
376
  className: classnames(classes.button, props.className, (_obj = {}, _defineProperty(_obj, classes.small, props.small), _defineProperty(_obj, classes.inverse, isInverse), _defineProperty(_obj, classes.light, !isInverse), _defineProperty(_obj, classes.isLoading, showSpinner), _obj)),
376
377
  style: _objectSpread({
377
378
  cursor: props.fake ? "pointer" : undefined
@@ -485,7 +486,7 @@ var Button = function(props) {
485
486
  throw Error("Bad button props");
486
487
  }
487
488
  return null;
488
- };
489
+ });
489
490
  var useButtonLinkStyles = createUseStyles(function(theme) {
490
491
  var paddingY = 6;
491
492
  var paddingX = 12;
@@ -611,24 +612,27 @@ export var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
611
612
  }
612
613
  return null;
613
614
  });
614
- export var ButtonPrimary = function(props) {
615
+ export var ButtonPrimary = /*#__PURE__*/ React.forwardRef(function(props, ref) {
615
616
  var classes = usePrimaryButtonStyles();
616
617
  return /*#__PURE__*/ _jsx(Button, _objectSpread({}, props, {
618
+ ref: ref,
617
619
  classes: classes,
618
620
  type: "primary"
619
621
  }));
620
- };
621
- export var ButtonSecondary = function(props) {
622
+ });
623
+ export var ButtonSecondary = /*#__PURE__*/ React.forwardRef(function(props, ref) {
622
624
  var classes = useSecondaryButtonStyles();
623
625
  return /*#__PURE__*/ _jsx(Button, _objectSpread({}, props, {
626
+ ref: ref,
624
627
  classes: classes,
625
628
  type: "secondary"
626
629
  }));
627
- };
628
- export var ButtonDanger = function(props) {
630
+ });
631
+ export var ButtonDanger = /*#__PURE__*/ React.forwardRef(function(props, ref) {
629
632
  var classes = useDangerButtonStyles();
630
633
  return /*#__PURE__*/ _jsx(Button, _objectSpread({}, props, {
634
+ ref: ref,
631
635
  classes: classes,
632
636
  type: "danger"
633
637
  }));
634
- };
638
+ });
package/dist-es/card.js CHANGED
@@ -106,7 +106,6 @@ var CardContent = function(param) {
106
106
  space: 4,
107
107
  children: [
108
108
  pretitle && /*#__PURE__*/ _jsx(Text1, {
109
- wordBreak: true,
110
109
  truncate: pretitleLinesMax,
111
110
  as: "div",
112
111
  regular: true,
@@ -114,14 +113,12 @@ var CardContent = function(param) {
114
113
  children: pretitle
115
114
  }),
116
115
  /*#__PURE__*/ _jsx(Text4, {
117
- wordBreak: true,
118
116
  truncate: titleLinesMax,
119
117
  as: "h1",
120
118
  regular: true,
121
119
  children: title
122
120
  }),
123
121
  /*#__PURE__*/ _jsx(Text2, {
124
- wordBreak: true,
125
122
  truncate: subtitleLinesMax,
126
123
  as: "div",
127
124
  regular: true,
@@ -133,7 +130,6 @@ var CardContent = function(param) {
133
130
  })
134
131
  }),
135
132
  description && /*#__PURE__*/ _jsx(Text2, {
136
- wordBreak: true,
137
133
  truncate: descriptionLinesMax,
138
134
  as: "p",
139
135
  regular: true,
@@ -363,14 +359,12 @@ var SnapCard = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
363
359
  space: 4,
364
360
  children: [
365
361
  title && /*#__PURE__*/ _jsx(Text2, {
366
- wordBreak: true,
367
362
  truncate: titleLinesMax,
368
363
  as: "h1",
369
364
  regular: true,
370
365
  children: title
371
366
  }),
372
367
  subtitle && /*#__PURE__*/ _jsx(Text2, {
373
- wordBreak: true,
374
368
  truncate: subtitleLinesMax,
375
369
  regular: true,
376
370
  color: colors.textSecondary,
@@ -137,7 +137,6 @@ var Content = function(props) {
137
137
  /*#__PURE__*/ _jsx(Text4, {
138
138
  as: "h1",
139
139
  regular: true,
140
- wordBreak: true,
141
140
  truncate: props.titleLinesMax,
142
141
  children: title
143
142
  }),
@@ -146,7 +145,6 @@ var Content = function(props) {
146
145
  children: /*#__PURE__*/ _jsx(Text2, {
147
146
  regular: true,
148
147
  color: theme.colors.textSecondary,
149
- wordBreak: true,
150
148
  truncate: props.descriptionLinesMax,
151
149
  as: "p",
152
150
  children: description
package/dist-es/list.js CHANGED
@@ -251,7 +251,6 @@ var Content = function(param) {
251
251
  space: 4,
252
252
  children: [
253
253
  headline && /*#__PURE__*/ _jsx(Text1, {
254
- wordBreak: true,
255
254
  regular: true,
256
255
  color: colors.textPrimary,
257
256
  children: headline
@@ -260,7 +259,6 @@ var Content = function(param) {
260
259
  space: 2,
261
260
  children: [
262
261
  /*#__PURE__*/ _jsx(Text3, {
263
- wordBreak: true,
264
262
  regular: true,
265
263
  color: colors.textPrimary,
266
264
  truncate: titleLinesMax,
@@ -268,14 +266,12 @@ var Content = function(param) {
268
266
  children: title
269
267
  }),
270
268
  subtitle && /*#__PURE__*/ _jsx(Text2, {
271
- wordBreak: true,
272
269
  regular: true,
273
270
  color: colors.textSecondary,
274
271
  truncate: subtitleLinesMax,
275
272
  children: subtitle
276
273
  }),
277
274
  description && /*#__PURE__*/ _jsx(Text2, {
278
- wordBreak: true,
279
275
  regular: true,
280
276
  color: colors.textSecondary,
281
277
  truncate: descriptionLinesMax,
@@ -1,2 +1,2 @@
1
1
  // DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
2
- export var PACKAGE_VERSION = "12.3.0";
2
+ export var PACKAGE_VERSION = "12.5.0";
package/dist-es/tabs.js CHANGED
@@ -253,6 +253,7 @@ var Tabs = function(param2) {
253
253
  /*#__PURE__*/ _jsx(Text3, {
254
254
  medium: true,
255
255
  color: "inherit",
256
+ wordBreak: false,
256
257
  children: text
257
258
  })
258
259
  ]
@@ -403,6 +403,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
403
403
  children: /*#__PURE__*/ _jsx(Text3, {
404
404
  color: colors.textSecondary,
405
405
  regular: true,
406
+ wordBreak: false,
406
407
  children: prefix
407
408
  })
408
409
  }),
package/dist-es/text.js CHANGED
@@ -96,6 +96,10 @@ var useStyles = createUseStyles(function(theme) {
96
96
  return wordBreak ? "break-word" : "inherit";
97
97
  }
98
98
  },
99
+ hyphens: function(param) {
100
+ var hyphens = param.hyphens;
101
+ return hyphens;
102
+ },
99
103
  // Needed to reset the default browser margin that adds to p, h1, h2... elements.
100
104
  margin: 0
101
105
  }, theme.mq.tabletOrSmaller, {
@@ -129,7 +133,7 @@ var useStyles = createUseStyles(function(theme) {
129
133
  };
130
134
  });
131
135
  export var Text = function(param) {
132
- var weight = param.weight, color = param.color, decoration = param.decoration, truncate = param.truncate, transform = param.transform, wordBreak = param.wordBreak, _as = param.as, as = _as === void 0 ? "span" : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param["aria-level"], dataAttributes = param.dataAttributes;
136
+ var weight = param.weight, color = param.color, decoration = param.decoration, truncate = param.truncate, transform = param.transform, _wordBreak = param.wordBreak, wordBreak = _wordBreak === void 0 ? true : _wordBreak, hyphens = param.hyphens, _as = param.as, as = _as === void 0 ? "span" : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param["aria-level"], dataAttributes = param.dataAttributes;
133
137
  var isInverse = useIsInverseVariant();
134
138
  var classes = useStyles({
135
139
  isInverse: isInverse,
@@ -142,6 +146,7 @@ export var Text = function(param) {
142
146
  decoration: decoration,
143
147
  transform: transform,
144
148
  wordBreak: wordBreak,
149
+ hyphens: hyphens,
145
150
  letterSpacing: letterSpacing,
146
151
  truncate: truncate
147
152
  });
package/dist-es/title.js CHANGED
@@ -35,6 +35,7 @@ export var Title1 = function(param) {
35
35
  as: as,
36
36
  id: id,
37
37
  dataAttributes: dataAttributes,
38
+ wordBreak: false,
38
39
  children: children
39
40
  }),
40
41
  right: right
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "12.3.0",
3
+ "version": "12.5.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",