@telefonica/mistica 12.1.0 → 12.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.
Files changed (114) hide show
  1. package/README.md +2 -2
  2. package/dist/button-group.d.ts +2 -1
  3. package/dist/button-group.js +35 -4
  4. package/dist/button-group.js.flow +2 -1
  5. package/dist/button-layout.d.ts +2 -1
  6. package/dist/button-layout.js +22 -4
  7. package/dist/button-layout.js.flow +2 -1
  8. package/dist/button.js +110 -32
  9. package/dist/carousel.js +36 -29
  10. package/dist/container-type-context.d.ts +5 -0
  11. package/dist/container-type-context.js +49 -0
  12. package/dist/container-type-context.js.flow +7 -0
  13. package/dist/dialog.d.ts +21 -4
  14. package/dist/dialog.js +51 -26
  15. package/dist/dialog.js.flow +17 -4
  16. package/dist/generated/mistica-icons/icon-gift-light.js +1 -1
  17. package/dist/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
  18. package/dist/generated/mistica-icons/icon-intranet-light.js +1 -1
  19. package/dist/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
  20. package/dist/generated/mistica-icons/icon-support-agent-regular.js +1 -1
  21. package/dist/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
  22. package/dist/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
  23. package/dist/generated/mistica-icons/icon-world-device-filled.d.ts +4 -0
  24. package/dist/generated/mistica-icons/icon-world-device-filled.js +109 -0
  25. package/dist/generated/mistica-icons/icon-world-device-filled.js.flow +6 -0
  26. package/dist/generated/mistica-icons/icon-world-device-light.d.ts +4 -0
  27. package/dist/generated/mistica-icons/icon-world-device-light.js +115 -0
  28. package/dist/generated/mistica-icons/icon-world-device-light.js.flow +6 -0
  29. package/dist/generated/mistica-icons/icon-world-device-regular.d.ts +4 -0
  30. package/dist/generated/mistica-icons/icon-world-device-regular.js +109 -0
  31. package/dist/generated/mistica-icons/icon-world-device-regular.js.flow +6 -0
  32. package/dist/grid-layout.d.ts +16 -0
  33. package/dist/grid-layout.js +173 -68
  34. package/dist/grid-layout.js.flow +33 -1
  35. package/dist/header.d.ts +3 -1
  36. package/dist/header.js +4 -2
  37. package/dist/header.js.flow +7 -1
  38. package/dist/hooks.d.ts +1 -1
  39. package/dist/hooks.js.flow +1 -1
  40. package/dist/index.d.ts +5 -1
  41. package/dist/index.js +58 -0
  42. package/dist/index.js.flow +11 -1
  43. package/dist/navigation-bar.js +121 -96
  44. package/dist/navigation-breadcrumbs.d.ts +7 -0
  45. package/dist/navigation-breadcrumbs.js +108 -29
  46. package/dist/navigation-breadcrumbs.js.flow +3 -0
  47. package/dist/overscroll-color-context.d.ts +1 -1
  48. package/dist/overscroll-color-context.js +12 -14
  49. package/dist/overscroll-color-context.js.flow +1 -1
  50. package/dist/package-version.js +1 -1
  51. package/dist/responsive-layout.js +13 -8
  52. package/dist/screen-size-context-provider.js +17 -5
  53. package/dist/screen-size-context.d.ts +1 -0
  54. package/dist/screen-size-context.js +2 -1
  55. package/dist/screen-size-context.js.flow +1 -0
  56. package/dist/skeleton-base.d.ts +9 -0
  57. package/dist/skeleton-base.js +75 -0
  58. package/dist/skeleton-base.js.flow +11 -0
  59. package/dist/skeletons.d.ts +21 -0
  60. package/dist/skeletons.js +232 -0
  61. package/dist/skeletons.js.flow +29 -0
  62. package/dist/skins/blau.js +1 -1
  63. package/dist/skins/movistar.js +1 -1
  64. package/dist/skins/o2-classic.js +1 -1
  65. package/dist/skins/o2.js +1 -1
  66. package/dist/skins/telefonica.js +2 -2
  67. package/dist/skins/utils.d.ts +2 -0
  68. package/dist/skins/utils.js +34 -1
  69. package/dist/skins/utils.js.flow +2 -0
  70. package/dist/skins/vivo.js +1 -1
  71. package/dist/snackbar.js +5 -4
  72. package/dist/tabs.d.ts +2 -1
  73. package/dist/tabs.js +22 -4
  74. package/dist/tabs.js.flow +2 -1
  75. package/dist/utils/types.d.ts +1 -0
  76. package/dist/utils/types.js.flow +6 -0
  77. package/dist-es/button-group.js +34 -4
  78. package/dist-es/button-layout.js +21 -4
  79. package/dist-es/button.js +110 -32
  80. package/dist-es/carousel.js +36 -29
  81. package/dist-es/container-type-context.js +21 -0
  82. package/dist-es/dialog.js +51 -25
  83. package/dist-es/generated/mistica-icons/icon-gift-light.js +1 -1
  84. package/dist-es/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
  85. package/dist-es/generated/mistica-icons/icon-intranet-light.js +1 -1
  86. package/dist-es/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
  87. package/dist-es/generated/mistica-icons/icon-support-agent-regular.js +1 -1
  88. package/dist-es/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
  89. package/dist-es/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
  90. package/dist-es/generated/mistica-icons/icon-world-device-filled.js +85 -0
  91. package/dist-es/generated/mistica-icons/icon-world-device-light.js +91 -0
  92. package/dist-es/generated/mistica-icons/icon-world-device-regular.js +85 -0
  93. package/dist-es/grid-layout.js +167 -68
  94. package/dist-es/header.js +4 -2
  95. package/dist-es/index.js +5 -1
  96. package/dist-es/navigation-bar.js +121 -96
  97. package/dist-es/navigation-breadcrumbs.js +106 -30
  98. package/dist-es/overscroll-color-context.js +12 -14
  99. package/dist-es/package-version.js +1 -1
  100. package/dist-es/responsive-layout.js +13 -8
  101. package/dist-es/screen-size-context-provider.js +17 -5
  102. package/dist-es/screen-size-context.js +2 -1
  103. package/dist-es/skeleton-base.js +43 -0
  104. package/dist-es/skeletons.js +196 -0
  105. package/dist-es/skins/blau.js +1 -1
  106. package/dist-es/skins/movistar.js +1 -1
  107. package/dist-es/skins/o2-classic.js +1 -1
  108. package/dist-es/skins/o2.js +1 -1
  109. package/dist-es/skins/telefonica.js +2 -2
  110. package/dist-es/skins/utils.js +12 -0
  111. package/dist-es/skins/vivo.js +1 -1
  112. package/dist-es/snackbar.js +6 -5
  113. package/dist-es/tabs.js +21 -4
  114. package/package.json +2 -2
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useIsInverseVariant } from "./theme-variant-context";
3
+ import * as React from "react";
4
+ import { createUseStyles } from "./jss";
5
+ import classnames from "classnames";
6
+ var useSkeletonBaseStyles = createUseStyles(function(param1) {
7
+ var colors = param1.colors;
8
+ return {
9
+ skeletonBase: {
10
+ borderRadius: function(param) {
11
+ var radius = param.radius;
12
+ return radius;
13
+ },
14
+ height: function(param) {
15
+ var height = param.height;
16
+ return height;
17
+ },
18
+ width: function(param) {
19
+ var width = param.width;
20
+ return width;
21
+ },
22
+ background: function(param) {
23
+ var isInverse = param.isInverse;
24
+ return isInverse ? colors.backgroundSkeletonInverse : colors.backgroundSkeleton;
25
+ }
26
+ }
27
+ };
28
+ });
29
+ var SkeletonBase = function(param) {
30
+ var _width = param.width, width = _width === void 0 ? "100%" : _width, _height = param.height, height = _height === void 0 ? 8 : _height, _radius = param.radius, radius = _radius === void 0 ? 8 : _radius, className = param.className;
31
+ var isInverse = useIsInverseVariant();
32
+ var classes = useSkeletonBaseStyles({
33
+ isInverse: isInverse,
34
+ width: width,
35
+ height: height,
36
+ radius: radius
37
+ });
38
+ return /*#__PURE__*/ _jsx("div", {
39
+ className: classnames(classes.skeletonBase, className),
40
+ "aria-hidden": true
41
+ });
42
+ };
43
+ export default SkeletonBase;
@@ -0,0 +1,196 @@
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
+ }
29
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
+ // https://www.figma.com/file/w7E0mmB92eio0zHw7h9iS2/%5BREADY%5D-Skeletons-Specs?node-id=986%3A1161
31
+ import * as React from "react";
32
+ import SkeletonBase from "./skeleton-base";
33
+ import { createUseStyles } from "./jss";
34
+ import Stack from "./stack";
35
+ import classNames from "classnames";
36
+ import { getPrefixedDataAttributes } from "./utils/dom";
37
+ var transition = "1.5s linear";
38
+ var useAnimation = createUseStyles(function() {
39
+ return {
40
+ animation: {
41
+ animation: "$pulse ".concat(transition, " infinite")
42
+ },
43
+ "@keyframes pulse": {
44
+ "0%": {
45
+ opacity: 1
46
+ },
47
+ "50%": {
48
+ opacity: 0.5
49
+ },
50
+ "100%": {
51
+ opacity: 1
52
+ }
53
+ }
54
+ };
55
+ });
56
+ var useSkeletonStyles = createUseStyles(function() {
57
+ return {
58
+ wrap: {
59
+ borderRadius: 8,
60
+ height: function(param) {
61
+ var _height = param.height, height = _height === void 0 ? 8 : _height;
62
+ return height;
63
+ },
64
+ width: function(param) {
65
+ var _width = param.width, width = _width === void 0 ? "100%" : _width;
66
+ return width;
67
+ }
68
+ }
69
+ };
70
+ });
71
+ export var SkeletonLine = function(param) {
72
+ var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
73
+ var animationClasses = useAnimation();
74
+ var styleClass = useSkeletonStyles({
75
+ width: width
76
+ });
77
+ return /*#__PURE__*/ _jsx("div", _objectSpread({
78
+ className: "".concat(animationClasses.animation, " ").concat(styleClass.wrap),
79
+ role: "status",
80
+ "aria-hidden": ariaLabel === undefined,
81
+ "aria-busy": ariaLabel !== undefined,
82
+ "aria-label": ariaLabel
83
+ }, getPrefixedDataAttributes(dataAttributes), {
84
+ children: /*#__PURE__*/ _jsx(SkeletonBase, {})
85
+ }));
86
+ };
87
+ export var SkeletonText = function(param) {
88
+ var ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
89
+ var animationClasses = useAnimation();
90
+ var styleClass = useSkeletonStyles({
91
+ height: "fit-content"
92
+ });
93
+ return /*#__PURE__*/ _jsxs(Stack, _objectSpread({
94
+ className: "".concat(animationClasses.animation, " ").concat(styleClass.wrap),
95
+ space: 16,
96
+ role: "status",
97
+ "aria-hidden": ariaLabel === undefined,
98
+ "aria-busy": ariaLabel !== undefined,
99
+ "aria-label": ariaLabel
100
+ }, getPrefixedDataAttributes(dataAttributes), {
101
+ children: [
102
+ /*#__PURE__*/ _jsx(SkeletonBase, {}),
103
+ /*#__PURE__*/ _jsx(SkeletonBase, {}),
104
+ /*#__PURE__*/ _jsx(SkeletonBase, {
105
+ width: "75%"
106
+ })
107
+ ]
108
+ }));
109
+ };
110
+ export var SkeletonCircle = function(param) {
111
+ var ariaLabel = param.ariaLabel, _size = param.size, size = _size === void 0 ? 40 : _size, dataAttributes = param.dataAttributes;
112
+ var animationClasses = useAnimation();
113
+ var styleClass = useSkeletonStyles({
114
+ width: size,
115
+ height: size
116
+ });
117
+ return /*#__PURE__*/ _jsx("div", _objectSpread({
118
+ className: classNames(animationClasses.animation, styleClass.wrap),
119
+ role: "status",
120
+ "aria-hidden": ariaLabel === undefined,
121
+ "aria-busy": ariaLabel !== undefined,
122
+ "aria-label": ariaLabel
123
+ }, getPrefixedDataAttributes(dataAttributes), {
124
+ children: /*#__PURE__*/ _jsx(SkeletonBase, {
125
+ height: size,
126
+ width: size,
127
+ radius: "50%"
128
+ })
129
+ }));
130
+ };
131
+ var useSkeletonRowStyles = createUseStyles(function() {
132
+ return {
133
+ row: {
134
+ display: "flex",
135
+ alignItems: "center",
136
+ justifyContent: "center"
137
+ },
138
+ circle: {
139
+ flexShrink: 0,
140
+ flexGrow: 0
141
+ },
142
+ line: {
143
+ flexShrink: 1,
144
+ marginLeft: 16
145
+ }
146
+ };
147
+ });
148
+ export var SkeletonRow = function(param) {
149
+ var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
150
+ var animationClasses = useAnimation();
151
+ var styleClass = useSkeletonStyles({
152
+ width: width,
153
+ height: "100%"
154
+ });
155
+ var rowClass = useSkeletonRowStyles();
156
+ return /*#__PURE__*/ _jsxs("div", _objectSpread({
157
+ className: classNames(animationClasses.animation, styleClass.wrap, rowClass.row),
158
+ role: "status",
159
+ "aria-hidden": ariaLabel === undefined,
160
+ "aria-busy": ariaLabel !== undefined,
161
+ "aria-label": ariaLabel
162
+ }, getPrefixedDataAttributes(dataAttributes), {
163
+ children: [
164
+ /*#__PURE__*/ _jsx(SkeletonBase, {
165
+ height: 40,
166
+ width: 40,
167
+ radius: "50%",
168
+ className: rowClass.circle
169
+ }),
170
+ /*#__PURE__*/ _jsx(SkeletonBase, {
171
+ width: width,
172
+ className: rowClass.line
173
+ })
174
+ ]
175
+ }));
176
+ };
177
+ export var SkeletonRectangle = function(param) {
178
+ var _width = param.width, width = _width === void 0 ? "100%" : _width, _height = param.height, height = _height === void 0 ? "100%" : _height, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
179
+ var animationClasses = useAnimation();
180
+ var styleClass = useSkeletonStyles({
181
+ width: width,
182
+ height: "100%"
183
+ });
184
+ return /*#__PURE__*/ _jsx("div", _objectSpread({
185
+ className: classNames(animationClasses.animation, styleClass.wrap),
186
+ role: "status",
187
+ "aria-hidden": true,
188
+ "aria-busy": true,
189
+ "aria-label": ariaLabel
190
+ }, getPrefixedDataAttributes(dataAttributes), {
191
+ children: /*#__PURE__*/ _jsx(SkeletonBase, {
192
+ height: height,
193
+ width: width
194
+ })
195
+ }));
196
+ };
@@ -174,7 +174,7 @@ export var getBlauSkin = function() {
174
174
  textLink: palette.blauPurple30,
175
175
  textLinkInverse: palette.blauPurple30,
176
176
  // CONTROLS
177
- control: palette.darkModeGrey,
177
+ control: palette.darkModeGrey6,
178
178
  loadingBar: palette.blauBluePrimary,
179
179
  loadingBarBackground: palette.darkModeGrey,
180
180
  toggleAndroidInactive: palette.grey5,
@@ -56,7 +56,7 @@ export var getMovistarSkin = function(variant) {
56
56
  backgroundContainer: palette.white,
57
57
  backgroundBrand: palette.movistarBlue,
58
58
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
59
- backgroundSkeleton: palette.grey1,
59
+ backgroundSkeleton: palette.grey2,
60
60
  backgroundSkeletonInverse: palette.movistarBlue55,
61
61
  navigationBarBackground: palette.movistarBlue,
62
62
  backgroundAlternative: palette.grey1,
@@ -64,7 +64,7 @@ export var getO2ClassicSkin = function() {
64
64
  backgroundContainer: palette.white,
65
65
  backgroundBrand: "linear-gradient(to bottom, ".concat(palette.o2Blue, ", ").concat(palette.o2GradientSecond, " 51%, ").concat(palette.o2GradientThird, " 72%, ").concat(palette.o2GradientFourth, ")"),
66
66
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
67
- backgroundSkeleton: palette.grey1,
67
+ backgroundSkeleton: palette.grey2,
68
68
  backgroundSkeletonInverse: applyAlpha(palette.white, 0.2),
69
69
  navigationBarBackground: palette.o2Blue,
70
70
  backgroundAlternative: palette.grey1,
@@ -54,7 +54,7 @@ export var getO2Skin = function() {
54
54
  backgroundContainer: palette.white,
55
55
  backgroundBrand: palette.o2BluePrimary,
56
56
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
57
- backgroundSkeleton: palette.grey1,
57
+ backgroundSkeleton: palette.grey2,
58
58
  backgroundSkeletonInverse: applyAlpha(palette.white, 0.2),
59
59
  navigationBarBackground: palette.o2BluePrimary,
60
60
  backgroundAlternative: palette.grey1,
@@ -50,7 +50,7 @@ export var getTelefonicaSkin = function() {
50
50
  backgroundContainer: palette.white,
51
51
  backgroundBrand: palette.telefonicaBlue,
52
52
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
53
- backgroundSkeleton: palette.grey1,
53
+ backgroundSkeleton: palette.grey2,
54
54
  backgroundSkeletonInverse: palette.telefonicaBlue70,
55
55
  navigationBarBackground: palette.telefonicaBlue,
56
56
  backgroundAlternative: palette.grey1,
@@ -173,7 +173,7 @@ export var getTelefonicaSkin = function() {
173
173
  textButtonSecondaryInverseSelected: palette.grey4,
174
174
  textLink: palette.telefonicaBlue,
175
175
  textLinkInverse: palette.telefonicaBlue,
176
- control: palette.darkModeGrey,
176
+ control: palette.darkModeGrey6,
177
177
  controlActivated: palette.telefonicaBlue,
178
178
  loadingBar: palette.telefonicaBlue,
179
179
  loadingBarBackground: applyAlpha(palette.white, 0.05),
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import { BLAU_SKIN, TELEFONICA_SKIN, VIVO_SKIN, O2_SKIN, O2_CLASSIC_SKIN, MOVISTAR_SKIN } from "./constants";
2
3
  import { getBlauSkin } from "./blau";
3
4
  import { getTelefonicaSkin } from "./telefonica";
@@ -26,3 +27,14 @@ export var getSkinByName = function(name, variant) {
26
27
  }
27
28
  }
28
29
  };
30
+ // copied/adapted from https://github.com/gregberge/react-flatten-children/blob/master/src/index.tsx
31
+ export var flattenChildren = function(children) {
32
+ var childrenArray = React.Children.toArray(children);
33
+ return childrenArray.reduce(function(flatChildren, child) {
34
+ if (child.type === React.Fragment) {
35
+ return flatChildren.concat(flattenChildren(child.props.children));
36
+ }
37
+ flatChildren.push(child);
38
+ return flatChildren;
39
+ }, []);
40
+ };
@@ -48,7 +48,7 @@ export var getVivoSkin = function() {
48
48
  backgroundContainer: palette.white,
49
49
  backgroundBrand: palette.vivoPurple,
50
50
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
51
- backgroundSkeleton: palette.grey1,
51
+ backgroundSkeleton: palette.grey2,
52
52
  backgroundSkeletonInverse: applyAlpha(palette.white, 0.2),
53
53
  backgroundFeedbackBottom: palette.vivoPurple,
54
54
  navigationBarBackground: palette.vivoPurple,
@@ -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
@@ -46,6 +46,21 @@ function _iterableToArrayLimit(arr, i) {
46
46
  function _nonIterableRest() {
47
47
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
48
  }
49
+ function _objectSpread(target) {
50
+ for(var i = 1; i < arguments.length; i++){
51
+ var source = arguments[i] != null ? arguments[i] : {};
52
+ var ownKeys = Object.keys(source);
53
+ if (typeof Object.getOwnPropertySymbols === "function") {
54
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
55
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
56
+ }));
57
+ }
58
+ ownKeys.forEach(function(key) {
59
+ _defineProperty(target, key, source[key]);
60
+ });
61
+ }
62
+ return target;
63
+ }
49
64
  function _slicedToArray(arr, i) {
50
65
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
51
66
  }
@@ -67,6 +82,7 @@ import { useAriaId, useElementDimensions } from "./hooks";
67
82
  import { Text3 } from "./text";
68
83
  import { pxToRem } from "./utils/css";
69
84
  import { isRunningAcceptanceTest } from "./utils/platform";
85
+ import { getPrefixedDataAttributes } from "./utils/dom";
70
86
  var TAB_MAX_WIDTH = 284;
71
87
  var TAB_HEIGHT = 56;
72
88
  var LINE_ANIMATION_DURATION_MS = isRunningAcceptanceTest() ? 0 : 300;
@@ -158,7 +174,7 @@ var useStyles = createUseStyles(function(param1) {
158
174
  };
159
175
  });
160
176
  var Tabs = function(param2) {
161
- var selectedIndex = param2.selectedIndex, onChange = param2.onChange, tabs = param2.tabs;
177
+ var selectedIndex = param2.selectedIndex, onChange = param2.onChange, tabs = param2.tabs, dataAttributes = param2.dataAttributes;
162
178
  var id = useAriaId();
163
179
  var ref = useElementDimensions(), width = ref.width, ref1 = ref.ref;
164
180
  var animatedLineRef = React.useRef(null);
@@ -194,11 +210,12 @@ var Tabs = function(param2) {
194
210
  }, LINE_ANIMATION_DURATION_MS);
195
211
  }
196
212
  };
197
- return /*#__PURE__*/ _jsx("div", {
213
+ return /*#__PURE__*/ _jsx("div", _objectSpread({
198
214
  id: id,
199
215
  role: "tablist",
200
216
  ref: ref1,
201
- className: classes.outerBorder,
217
+ className: classes.outerBorder
218
+ }, getPrefixedDataAttributes(dataAttributes), {
202
219
  children: /*#__PURE__*/ _jsx(ResponsiveLayout, {
203
220
  fullWidth: true,
204
221
  children: /*#__PURE__*/ _jsxs("div", {
@@ -250,6 +267,6 @@ var Tabs = function(param2) {
250
267
  ]
251
268
  })
252
269
  })
253
- });
270
+ }));
254
271
  };
255
272
  export default Tabs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "12.1.0",
3
+ "version": "12.3.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -79,7 +79,7 @@
79
79
  "@telefonica/acceptance-testing": "^2.7.0",
80
80
  "@telefonica/eslint-config": "^1.0.7",
81
81
  "@telefonica/prettier-config": "^1.1.0",
82
- "@telefonica/ts-to-flow": "1.2.0",
82
+ "@telefonica/ts-to-flow": "1.2.2",
83
83
  "@testing-library/jest-dom": "^5.16.3",
84
84
  "@testing-library/react": "^12.1.4",
85
85
  "@testing-library/user-event": "^13.5.0",