@telefonica/mistica 12.2.0 → 12.4.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.
Files changed (45) hide show
  1. package/dist/card.js +0 -6
  2. package/dist/carousel.js +36 -29
  3. package/dist/container-type-context.d.ts +5 -0
  4. package/dist/container-type-context.js +49 -0
  5. package/dist/container-type-context.js.flow +7 -0
  6. package/dist/grid-layout.js +77 -33
  7. package/dist/highlighted-card.js +0 -2
  8. package/dist/hooks.d.ts +1 -1
  9. package/dist/hooks.js.flow +1 -1
  10. package/dist/list.js +0 -4
  11. package/dist/navigation-breadcrumbs.d.ts +7 -0
  12. package/dist/navigation-breadcrumbs.js +108 -29
  13. package/dist/navigation-breadcrumbs.js.flow +3 -0
  14. package/dist/package-version.js +1 -1
  15. package/dist/responsive-layout.js +13 -8
  16. package/dist/screen-size-context-provider.js +17 -5
  17. package/dist/screen-size-context.d.ts +1 -0
  18. package/dist/screen-size-context.js +2 -1
  19. package/dist/screen-size-context.js.flow +1 -0
  20. package/dist/snackbar.js +5 -4
  21. package/dist/tabs.js +1 -0
  22. package/dist/text-field-base.js +1 -0
  23. package/dist/text.d.ts +1 -0
  24. package/dist/text.js +6 -1
  25. package/dist/text.js.flow +1 -0
  26. package/dist/title.js +1 -0
  27. package/dist/utils/types.d.ts +1 -0
  28. package/dist/utils/types.js.flow +6 -0
  29. package/dist-es/card.js +0 -6
  30. package/dist-es/carousel.js +36 -29
  31. package/dist-es/container-type-context.js +21 -0
  32. package/dist-es/grid-layout.js +72 -33
  33. package/dist-es/highlighted-card.js +0 -2
  34. package/dist-es/list.js +0 -4
  35. package/dist-es/navigation-breadcrumbs.js +106 -30
  36. package/dist-es/package-version.js +1 -1
  37. package/dist-es/responsive-layout.js +13 -8
  38. package/dist-es/screen-size-context-provider.js +17 -5
  39. package/dist-es/screen-size-context.js +2 -1
  40. package/dist-es/snackbar.js +6 -5
  41. package/dist-es/tabs.js +1 -0
  42. package/dist-es/text-field-base.js +1 -0
  43. package/dist-es/text.js +6 -1
  44. package/dist-es/title.js +1 -0
  45. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { useScreenSize } from "./hooks";
3
+ var ContainerTypeContext = /*#__PURE__*/ React.createContext(null);
4
+ export var useContainerType = function() {
5
+ var containerType = React.useContext(ContainerTypeContext);
6
+ var ref = useScreenSize(), isTablet = ref.isTablet, isDesktopOrBigger = ref.isDesktopOrBigger, isLargeDesktop = ref.isLargeDesktop;
7
+ if (containerType) {
8
+ return containerType;
9
+ }
10
+ if (isLargeDesktop) {
11
+ return "desktop-wide-column";
12
+ }
13
+ if (isDesktopOrBigger) {
14
+ return "desktop-medium-column";
15
+ }
16
+ if (isTablet) {
17
+ return "tablet-column";
18
+ }
19
+ return "mobile-column";
20
+ };
21
+ export default ContainerTypeContext;
@@ -28,6 +28,8 @@ function _objectSpread(target) {
28
28
  }
29
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
30
  import * as React from "react";
31
+ import { useScreenSize } from "./hooks";
32
+ import ContainerTypeContext from "./container-type-context";
31
33
  import { createUseStyles } from "./jss";
32
34
  import { getPrefixedDataAttributes } from "./utils/dom";
33
35
  var useStyles = createUseStyles(function(theme) {
@@ -127,18 +129,28 @@ var GridLayout = function(props) {
127
129
  verticalSpace: (_verticalSpace = props.verticalSpace) !== null && _verticalSpace !== void 0 ? _verticalSpace : 0
128
130
  });
129
131
  var dataAttributes = getPrefixedDataAttributes(props.dataAttributes);
132
+ var ref = useScreenSize(), isMobile = ref.isMobile, isTablet = ref.isTablet;
133
+ var getContainerType = function(containerType) {
134
+ return isMobile ? "mobile-column" : isTablet ? "tablet-column" : containerType;
135
+ };
130
136
  if (props.template === "6+6") {
131
137
  return /*#__PURE__*/ _jsxs("div", _objectSpread({
132
138
  className: classes.grid
133
139
  }, dataAttributes, {
134
140
  children: [
135
- /*#__PURE__*/ _jsx("div", {
136
- className: classes.span6,
137
- children: props.left
141
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
142
+ value: getContainerType("desktop-medium-column"),
143
+ children: /*#__PURE__*/ _jsx("div", {
144
+ className: classes.span6,
145
+ children: props.left
146
+ })
138
147
  }),
139
- /*#__PURE__*/ _jsx("div", {
140
- className: classes.span6,
141
- children: props.right
148
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
149
+ value: getContainerType("desktop-medium-column"),
150
+ children: /*#__PURE__*/ _jsx("div", {
151
+ className: classes.span6,
152
+ children: props.right
153
+ })
142
154
  })
143
155
  ]
144
156
  }));
@@ -148,13 +160,19 @@ var GridLayout = function(props) {
148
160
  className: classes.grid
149
161
  }, dataAttributes, {
150
162
  children: [
151
- /*#__PURE__*/ _jsx("div", {
152
- className: classes.span8,
153
- children: props.left
163
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
164
+ value: getContainerType("desktop-medium-column"),
165
+ children: /*#__PURE__*/ _jsx("div", {
166
+ className: classes.span8,
167
+ children: props.left
168
+ })
154
169
  }),
155
- /*#__PURE__*/ _jsx("div", {
156
- className: classes.span4,
157
- children: props.right
170
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
171
+ value: getContainerType("desktop-small-column"),
172
+ children: /*#__PURE__*/ _jsx("div", {
173
+ className: classes.span4,
174
+ children: props.right
175
+ })
158
176
  })
159
177
  ]
160
178
  }));
@@ -164,16 +182,22 @@ var GridLayout = function(props) {
164
182
  className: classes.grid
165
183
  }, dataAttributes, {
166
184
  children: [
167
- /*#__PURE__*/ _jsx("div", {
168
- className: classes.span4,
169
- children: props.left
185
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
186
+ value: getContainerType("desktop-small-column"),
187
+ children: /*#__PURE__*/ _jsx("div", {
188
+ className: classes.span4,
189
+ children: props.left
190
+ })
170
191
  }),
171
192
  /*#__PURE__*/ _jsx("div", {
172
193
  className: classes.span1
173
194
  }),
174
- /*#__PURE__*/ _jsx("div", {
175
- className: classes.span6,
176
- children: props.right
195
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
196
+ value: getContainerType("desktop-medium-column"),
197
+ children: /*#__PURE__*/ _jsx("div", {
198
+ className: classes.span6,
199
+ children: props.right
200
+ })
177
201
  }),
178
202
  /*#__PURE__*/ _jsx("div", {
179
203
  className: classes.span1
@@ -189,16 +213,22 @@ var GridLayout = function(props) {
189
213
  /*#__PURE__*/ _jsx("div", {
190
214
  className: classes.span1
191
215
  }),
192
- /*#__PURE__*/ _jsx("div", {
193
- className: classes.span5,
194
- children: props.left
216
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
217
+ value: getContainerType("desktop-small-column"),
218
+ children: /*#__PURE__*/ _jsx("div", {
219
+ className: classes.span5,
220
+ children: props.left
221
+ })
195
222
  }),
196
223
  /*#__PURE__*/ _jsx("div", {
197
224
  className: classes.span1
198
225
  }),
199
- /*#__PURE__*/ _jsx("div", {
200
- className: classes.span4,
201
- children: props.right
226
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
227
+ value: getContainerType("desktop-small-column"),
228
+ children: /*#__PURE__*/ _jsx("div", {
229
+ className: classes.span4,
230
+ children: props.right
231
+ })
202
232
  }),
203
233
  /*#__PURE__*/ _jsx("div", {
204
234
  className: classes.span1
@@ -211,13 +241,19 @@ var GridLayout = function(props) {
211
241
  className: classes.grid
212
242
  }, dataAttributes, {
213
243
  children: [
214
- /*#__PURE__*/ _jsx("div", {
215
- className: classes.span3,
216
- children: props.left
244
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
245
+ value: getContainerType("desktop-small-column"),
246
+ children: /*#__PURE__*/ _jsx("div", {
247
+ className: classes.span3,
248
+ children: props.left
249
+ })
217
250
  }),
218
- /*#__PURE__*/ _jsx("div", {
219
- className: classes.span9,
220
- children: props.right
251
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
252
+ value: getContainerType("desktop-medium-column"),
253
+ children: /*#__PURE__*/ _jsx("div", {
254
+ className: classes.span9,
255
+ children: props.right
256
+ })
221
257
  })
222
258
  ]
223
259
  }));
@@ -230,9 +266,12 @@ var GridLayout = function(props) {
230
266
  /*#__PURE__*/ _jsx("div", {
231
267
  className: classes.span1
232
268
  }),
233
- /*#__PURE__*/ _jsx("div", {
234
- className: classes.span10,
235
- children: props.children
269
+ /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
270
+ value: getContainerType("desktop-wide-column"),
271
+ children: /*#__PURE__*/ _jsx("div", {
272
+ className: classes.span10,
273
+ children: props.children
274
+ })
236
275
  }),
237
276
  /*#__PURE__*/ _jsx("div", {
238
277
  className: classes.span1
@@ -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,41 +1,117 @@
1
+ function _defineProperty(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _objectSpread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _defineProperty(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
1
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
30
+ /**
31
+ * Figma: https://www.figma.com/file/BctaFHf0PVPX2uwRSl8taf/Breadcrumbs?node-id=2%3A61
32
+ * Accessibility: https://www.w3.org/WAI/ARIA/apg/example-index/breadcrumb/index.html
33
+ */ import * as React from "react";
3
34
  import { Text1 } from "./text";
4
35
  import { useTheme } from "./hooks";
36
+ import { createUseStyles } from "./jss";
37
+ import { getPrefixedDataAttributes } from "./utils/dom";
38
+ import TextLink from "./text-link";
39
+ import { useIsInverseVariant } from "./theme-variant-context";
5
40
  var BREADCRUMB_SEPARATOR = " / ";
41
+ var useStyles = createUseStyles(function() {
42
+ return {
43
+ link: {
44
+ "&:hover": {
45
+ textDecoration: "underline"
46
+ }
47
+ },
48
+ current: {
49
+ textDecoration: "none",
50
+ pointerEvents: "none"
51
+ },
52
+ list: {
53
+ padding: 0,
54
+ margin: 0,
55
+ listStyleType: "none",
56
+ "& > li": {
57
+ display: "inline"
58
+ }
59
+ }
60
+ };
61
+ });
6
62
  var NavigationBreadcrumbs = function(param1) {
7
- var title1 = param1.title, breadcrumbs = param1.breadcrumbs;
8
- var theme = useTheme();
9
- var Link = theme.Link;
10
- return /*#__PURE__*/ _jsxs("div", {
11
- children: [
12
- breadcrumbs.map(function(param, index) {
13
- var title = param.title, url = param.url;
14
- return /*#__PURE__*/ _jsxs(React.Fragment, {
15
- children: [
16
- /*#__PURE__*/ _jsx(Link, {
17
- style: {
18
- textDecoration: "none"
19
- },
20
- to: url,
21
- children: /*#__PURE__*/ _jsx(Text1, {
63
+ var title1 = param1.title, breadcrumbs = param1.breadcrumbs, dataAttributes = param1.dataAttributes, tmp = param1["aria-label"], ariaLabel = tmp === void 0 ? "Breadcrumb" : tmp;
64
+ var colors = useTheme().colors;
65
+ var classes = useStyles();
66
+ var isInverse = useIsInverseVariant();
67
+ return /*#__PURE__*/ _jsx("nav", _objectSpread({
68
+ "aria-label": ariaLabel
69
+ }, getPrefixedDataAttributes(dataAttributes), {
70
+ children: /*#__PURE__*/ _jsxs("ol", {
71
+ className: classes.list,
72
+ children: [
73
+ breadcrumbs.map(function(param, index) {
74
+ var title = param.title, url = param.url;
75
+ return /*#__PURE__*/ _jsxs("li", {
76
+ children: [
77
+ /*#__PURE__*/ _jsx(Text1, {
22
78
  regular: true,
23
- children: title
79
+ children: /*#__PURE__*/ _jsx(TextLink, {
80
+ to: url,
81
+ style: {
82
+ color: isInverse ? colors.textPrimaryInverse : colors.textPrimary
83
+ },
84
+ className: classes.link,
85
+ children: title
86
+ })
87
+ }),
88
+ /*#__PURE__*/ _jsx("span", {
89
+ role: "presentation",
90
+ children: /*#__PURE__*/ _jsx(Text1, {
91
+ regular: true,
92
+ children: BREADCRUMB_SEPARATOR
93
+ })
24
94
  })
25
- }),
26
- /*#__PURE__*/ _jsx(Text1, {
95
+ ]
96
+ }, index);
97
+ }),
98
+ /*#__PURE__*/ _jsx("li", {
99
+ children: /*#__PURE__*/ _jsx("a", {
100
+ "aria-current": "page",
101
+ href: "#",
102
+ className: classes.current,
103
+ onClick: function(e) {
104
+ e.preventDefault();
105
+ },
106
+ children: /*#__PURE__*/ _jsx(Text1, {
27
107
  regular: true,
28
- children: BREADCRUMB_SEPARATOR
108
+ color: isInverse ? colors.textSecondaryInverse : colors.textSecondary,
109
+ children: title1
29
110
  })
30
- ]
31
- }, index);
32
- }),
33
- /*#__PURE__*/ _jsx(Text1, {
34
- regular: true,
35
- color: theme.colors.textSecondary,
36
- children: title1
37
- })
38
- ]
39
- });
111
+ })
112
+ })
113
+ ]
114
+ })
115
+ }));
40
116
  };
41
117
  export default NavigationBreadcrumbs;
@@ -1,2 +1,2 @@
1
1
  // DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
2
- export var PACKAGE_VERSION = "12.2.0";
2
+ export var PACKAGE_VERSION = "12.4.0";
@@ -32,6 +32,7 @@ import { createUseStyles } from "./jss";
32
32
  import classnames from "classnames";
33
33
  import { useScreenSize } from "./hooks";
34
34
  import { getPrefixedDataAttributes } from "./utils/dom";
35
+ import ContainerTypeContext from "./container-type-context";
35
36
  var MOBILE_SIDE_MARGIN = 16;
36
37
  var TABLET_SIDE_MARGIN = 32;
37
38
  var SMALL_DESKTOP_SIDE_MARGIN = 40;
@@ -76,16 +77,20 @@ var ResponsiveLayout = function(param) {
76
77
  var classes = useStyles();
77
78
  var ref = useScreenSize(), isMobile = ref.isMobile, isTablet = ref.isTablet;
78
79
  var sideMargin = isMobile ? MOBILE_SIDE_MARGIN : isTablet ? TABLET_SIDE_MARGIN : null;
80
+ var containerType = isMobile ? "mobile-column" : isTablet ? "tablet-column" : "desktop-wide-column";
79
81
  return /*#__PURE__*/ _jsx(ResponsiveLayoutMarginContext.Provider, {
80
82
  value: sideMargin,
81
- children: /*#__PURE__*/ _jsx("div", _objectSpread({
82
- className: classnames(classes.container, className)
83
- }, getPrefixedDataAttributes(dataAttributes), {
84
- children: /*#__PURE__*/ _jsx("div", {
85
- className: classnames(classes.layout, _defineProperty({}, classes.layoutFullWidth, fullWidth)),
86
- children: children
87
- })
88
- }))
83
+ children: /*#__PURE__*/ _jsx(ContainerTypeContext.Provider, {
84
+ value: containerType,
85
+ children: /*#__PURE__*/ _jsx("div", _objectSpread({
86
+ className: classnames(classes.container, className)
87
+ }, getPrefixedDataAttributes(dataAttributes), {
88
+ children: /*#__PURE__*/ _jsx("div", {
89
+ className: classnames(classes.layout, _defineProperty({}, classes.layoutFullWidth, fullWidth)),
90
+ children: children
91
+ })
92
+ }))
93
+ })
89
94
  });
90
95
  };
91
96
  export default ResponsiveLayout;
@@ -68,13 +68,15 @@ var ScreenSizeContextProvider = function(param1) {
68
68
  mobile: stripMedia(theme.mq.mobile),
69
69
  tablet: stripMedia(theme.mq.tablet),
70
70
  tabletOrBigger: stripMedia(theme.mq.tabletOrBigger),
71
- tabletOrSmaller: stripMedia(theme.mq.tabletOrSmaller)
71
+ tabletOrSmaller: stripMedia(theme.mq.tabletOrSmaller),
72
+ largueDesktop: stripMedia(theme.mq.largeDesktop)
72
73
  };
73
74
  }, [
74
75
  theme.mq.mobile,
75
76
  theme.mq.tablet,
76
77
  theme.mq.tabletOrBigger,
77
- theme.mq.tabletOrSmaller
78
+ theme.mq.tabletOrSmaller,
79
+ theme.mq.largeDesktop,
78
80
  ]);
79
81
  var ref1 = _slicedToArray(React.useState(function() {
80
82
  return !isServerSide && window.matchMedia(mediaQueries.mobile).matches;
@@ -88,6 +90,9 @@ var ScreenSizeContextProvider = function(param1) {
88
90
  var ref4 = _slicedToArray(React.useState(function() {
89
91
  return !isServerSide && window.matchMedia(mediaQueries.tabletOrSmaller).matches;
90
92
  }), 2), isTabletOrSmaller = ref4[0], setIsTabletOrSmaller = ref4[1];
93
+ var ref5 = _slicedToArray(React.useState(function() {
94
+ return !isServerSide && window.matchMedia(mediaQueries.largueDesktop).matches;
95
+ }), 2), isLargeDesktop = ref5[0], setIsLargeDesktop = ref5[1];
91
96
  useIsomorphicLayoutEffect(function() {
92
97
  if (!window.matchMedia) {
93
98
  return;
@@ -108,6 +113,10 @@ var ScreenSizeContextProvider = function(param1) {
108
113
  [
109
114
  mediaQueries.tabletOrSmaller,
110
115
  setIsTabletOrSmaller
116
+ ],
117
+ [
118
+ mediaQueries.largueDesktop,
119
+ setIsLargeDesktop
111
120
  ],
112
121
  ];
113
122
  var cleanupFunctions = entries.map(function(param) {
@@ -131,7 +140,8 @@ var ScreenSizeContextProvider = function(param1) {
131
140
  mediaQueries.mobile,
132
141
  mediaQueries.tablet,
133
142
  mediaQueries.tabletOrBigger,
134
- mediaQueries.tabletOrSmaller
143
+ mediaQueries.tabletOrSmaller,
144
+ mediaQueries.largueDesktop,
135
145
  ]);
136
146
  var value = React.useMemo(function() {
137
147
  return {
@@ -139,13 +149,15 @@ var ScreenSizeContextProvider = function(param1) {
139
149
  isTablet: isTablet,
140
150
  isTabletOrBigger: isTabletOrBigger,
141
151
  isTabletOrSmaller: isTabletOrSmaller,
142
- isDesktopOrBigger: !isTabletOrSmaller
152
+ isDesktopOrBigger: !isTabletOrSmaller,
153
+ isLargeDesktop: isLargeDesktop
143
154
  };
144
155
  }, [
145
156
  isMobile,
146
157
  isTablet,
147
158
  isTabletOrBigger,
148
- isTabletOrSmaller
159
+ isTabletOrSmaller,
160
+ isLargeDesktop
149
161
  ]);
150
162
  return /*#__PURE__*/ _jsx(ScreenSizeContext.Provider, {
151
163
  value: value,
@@ -4,6 +4,7 @@ var ScreenSizeContext = /*#__PURE__*/ React.createContext({
4
4
  isTablet: false,
5
5
  isTabletOrBigger: false,
6
6
  isTabletOrSmaller: false,
7
- isDesktopOrBigger: false
7
+ isDesktopOrBigger: false,
8
+ isLargeDesktop: false
8
9
  });
9
10
  export default ScreenSizeContext;
@@ -63,7 +63,8 @@ import { createUseStyles } from "./jss";
63
63
  import Touchable from "./touchable";
64
64
  import classNames from "classnames";
65
65
  import { isWebViewBridgeAvailable, nativeMessage } from "@tef-novum/webview-bridge";
66
- import { useElementDimensions, useScreenSize } from "./hooks";
66
+ import { useElementDimensions, useScreenSize, useTheme } from "./hooks";
67
+ import { Text2 } from "./text";
67
68
  var PADDING_Y = 14;
68
69
  var PADDING_X = 16;
69
70
  var TRANSITION_TIME_IN_MS = 300;
@@ -115,9 +116,6 @@ var useStyles = createUseStyles(function(theme) {
115
116
  transition: "transform ".concat(TRANSITION_TIME_IN_MS, "ms ease-in-out, opacity ").concat(TRANSITION_TIME_IN_MS, "ms ease-in-out")
116
117
  },
117
118
  snackbarContent: {
118
- fontSize: 14,
119
- lineHeight: "20px",
120
- color: theme.colors.textPrimaryInverse,
121
119
  display: "flex",
122
120
  flexDirection: function(param) {
123
121
  var isLongButton = param.isLongButton;
@@ -170,6 +168,7 @@ var SnackbarComponent = function(param) {
170
168
  var ref1 = useElementDimensions(), buttonWidth = ref1.width, buttonRef = ref1.ref;
171
169
  var isDesktopOrBigger = useScreenSize().isDesktopOrBigger;
172
170
  var longButtonWidth = isDesktopOrBigger ? 160 : 128;
171
+ var colors = useTheme().colors;
173
172
  var classes = useStyles({
174
173
  type: type,
175
174
  isOpen: isOpen,
@@ -205,7 +204,9 @@ var SnackbarComponent = function(param) {
205
204
  children: /*#__PURE__*/ _jsxs("div", {
206
205
  className: classes.snackbarContent,
207
206
  children: [
208
- /*#__PURE__*/ _jsx("span", {
207
+ /*#__PURE__*/ _jsx(Text2, {
208
+ regular: true,
209
+ color: colors.textPrimaryInverse,
209
210
  children: message
210
211
  }),
211
212
  buttonText && /*#__PURE__*/ _jsx(Touchable, {
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.2.0",
3
+ "version": "12.4.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",