@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.
- package/README.md +2 -2
- package/dist/button-group.d.ts +2 -1
- package/dist/button-group.js +35 -4
- package/dist/button-group.js.flow +2 -1
- package/dist/button-layout.d.ts +2 -1
- package/dist/button-layout.js +22 -4
- package/dist/button-layout.js.flow +2 -1
- package/dist/button.js +110 -32
- package/dist/carousel.js +36 -29
- package/dist/container-type-context.d.ts +5 -0
- package/dist/container-type-context.js +49 -0
- package/dist/container-type-context.js.flow +7 -0
- package/dist/dialog.d.ts +21 -4
- package/dist/dialog.js +51 -26
- package/dist/dialog.js.flow +17 -4
- package/dist/generated/mistica-icons/icon-gift-light.js +1 -1
- package/dist/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-intranet-light.js +1 -1
- package/dist/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-support-agent-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
- package/dist/generated/mistica-icons/icon-world-device-filled.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-filled.js +109 -0
- package/dist/generated/mistica-icons/icon-world-device-filled.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-world-device-light.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-light.js +115 -0
- package/dist/generated/mistica-icons/icon-world-device-light.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.js +109 -0
- package/dist/generated/mistica-icons/icon-world-device-regular.js.flow +6 -0
- package/dist/grid-layout.d.ts +16 -0
- package/dist/grid-layout.js +173 -68
- package/dist/grid-layout.js.flow +33 -1
- package/dist/header.d.ts +3 -1
- package/dist/header.js +4 -2
- package/dist/header.js.flow +7 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js.flow +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +58 -0
- package/dist/index.js.flow +11 -1
- package/dist/navigation-bar.js +121 -96
- package/dist/navigation-breadcrumbs.d.ts +7 -0
- package/dist/navigation-breadcrumbs.js +108 -29
- package/dist/navigation-breadcrumbs.js.flow +3 -0
- package/dist/overscroll-color-context.d.ts +1 -1
- package/dist/overscroll-color-context.js +12 -14
- package/dist/overscroll-color-context.js.flow +1 -1
- package/dist/package-version.js +1 -1
- package/dist/responsive-layout.js +13 -8
- package/dist/screen-size-context-provider.js +17 -5
- package/dist/screen-size-context.d.ts +1 -0
- package/dist/screen-size-context.js +2 -1
- package/dist/screen-size-context.js.flow +1 -0
- package/dist/skeleton-base.d.ts +9 -0
- package/dist/skeleton-base.js +75 -0
- package/dist/skeleton-base.js.flow +11 -0
- package/dist/skeletons.d.ts +21 -0
- package/dist/skeletons.js +232 -0
- package/dist/skeletons.js.flow +29 -0
- package/dist/skins/blau.js +1 -1
- package/dist/skins/movistar.js +1 -1
- package/dist/skins/o2-classic.js +1 -1
- package/dist/skins/o2.js +1 -1
- package/dist/skins/telefonica.js +2 -2
- package/dist/skins/utils.d.ts +2 -0
- package/dist/skins/utils.js +34 -1
- package/dist/skins/utils.js.flow +2 -0
- package/dist/skins/vivo.js +1 -1
- package/dist/snackbar.js +5 -4
- package/dist/tabs.d.ts +2 -1
- package/dist/tabs.js +22 -4
- package/dist/tabs.js.flow +2 -1
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.js.flow +6 -0
- package/dist-es/button-group.js +34 -4
- package/dist-es/button-layout.js +21 -4
- package/dist-es/button.js +110 -32
- package/dist-es/carousel.js +36 -29
- package/dist-es/container-type-context.js +21 -0
- package/dist-es/dialog.js +51 -25
- package/dist-es/generated/mistica-icons/icon-gift-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-hand-snap-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-intranet-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-support-agent-premium-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-support-agent-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tag-discount-euro-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tips-and-tricks-regular.js +2 -2
- package/dist-es/generated/mistica-icons/icon-world-device-filled.js +85 -0
- package/dist-es/generated/mistica-icons/icon-world-device-light.js +91 -0
- package/dist-es/generated/mistica-icons/icon-world-device-regular.js +85 -0
- package/dist-es/grid-layout.js +167 -68
- package/dist-es/header.js +4 -2
- package/dist-es/index.js +5 -1
- package/dist-es/navigation-bar.js +121 -96
- package/dist-es/navigation-breadcrumbs.js +106 -30
- package/dist-es/overscroll-color-context.js +12 -14
- package/dist-es/package-version.js +1 -1
- package/dist-es/responsive-layout.js +13 -8
- package/dist-es/screen-size-context-provider.js +17 -5
- package/dist-es/screen-size-context.js +2 -1
- package/dist-es/skeleton-base.js +43 -0
- package/dist-es/skeletons.js +196 -0
- package/dist-es/skins/blau.js +1 -1
- package/dist-es/skins/movistar.js +1 -1
- package/dist-es/skins/o2-classic.js +1 -1
- package/dist-es/skins/o2.js +1 -1
- package/dist-es/skins/telefonica.js +2 -2
- package/dist-es/skins/utils.js +12 -0
- package/dist-es/skins/vivo.js +1 -1
- package/dist-es/snackbar.js +6 -5
- package/dist-es/tabs.js +21 -4
- package/package.json +2 -2
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.SkeletonRectangle = exports.SkeletonRow = exports.SkeletonCircle = exports.SkeletonText = exports.SkeletonLine = void 0;
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _skeletonBase = _interopRequireDefault(require("./skeleton-base"));
|
|
9
|
+
var _jss = require("./jss");
|
|
10
|
+
var _stack = _interopRequireDefault(require("./stack"));
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _dom = require("./utils/dom");
|
|
13
|
+
function _interopRequireDefault(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function _interopRequireWildcard(obj) {
|
|
19
|
+
if (obj && obj.__esModule) {
|
|
20
|
+
return obj;
|
|
21
|
+
} else {
|
|
22
|
+
var newObj = {};
|
|
23
|
+
if (obj != null) {
|
|
24
|
+
for(var key in obj){
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
26
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
27
|
+
if (desc.get || desc.set) {
|
|
28
|
+
Object.defineProperty(newObj, key, desc);
|
|
29
|
+
} else {
|
|
30
|
+
newObj[key] = obj[key];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
newObj.default = obj;
|
|
36
|
+
return newObj;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function _defineProperty(obj, key, value) {
|
|
40
|
+
if (key in obj) {
|
|
41
|
+
Object.defineProperty(obj, key, {
|
|
42
|
+
value: value,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
obj[key] = value;
|
|
49
|
+
}
|
|
50
|
+
return obj;
|
|
51
|
+
}
|
|
52
|
+
function _objectSpread(target) {
|
|
53
|
+
var _arguments = arguments, _loop = function(i) {
|
|
54
|
+
var source = _arguments[i] != null ? _arguments[i] : {};
|
|
55
|
+
var ownKeys = Object.keys(source);
|
|
56
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
57
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
58
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
ownKeys.forEach(function(key) {
|
|
62
|
+
_defineProperty(target, key, source[key]);
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
for(var i = 1; i < arguments.length; i++)_loop(i);
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
var transition = "1.5s linear";
|
|
69
|
+
var useAnimation = (0, _jss).createUseStyles(function() {
|
|
70
|
+
return {
|
|
71
|
+
animation: {
|
|
72
|
+
animation: "$pulse ".concat(transition, " infinite")
|
|
73
|
+
},
|
|
74
|
+
"@keyframes pulse": {
|
|
75
|
+
"0%": {
|
|
76
|
+
opacity: 1
|
|
77
|
+
},
|
|
78
|
+
"50%": {
|
|
79
|
+
opacity: 0.5
|
|
80
|
+
},
|
|
81
|
+
"100%": {
|
|
82
|
+
opacity: 1
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
var useSkeletonStyles = (0, _jss).createUseStyles(function() {
|
|
88
|
+
return {
|
|
89
|
+
wrap: {
|
|
90
|
+
borderRadius: 8,
|
|
91
|
+
height: function height(param) {
|
|
92
|
+
var _height = param.height, height1 = _height === void 0 ? 8 : _height;
|
|
93
|
+
return height1;
|
|
94
|
+
},
|
|
95
|
+
width: function width(param) {
|
|
96
|
+
var _width = param.width, width1 = _width === void 0 ? "100%" : _width;
|
|
97
|
+
return width1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
var SkeletonLine = function SkeletonLine(param) {
|
|
103
|
+
var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
104
|
+
var animationClasses = useAnimation();
|
|
105
|
+
var styleClass = useSkeletonStyles({
|
|
106
|
+
width: width
|
|
107
|
+
});
|
|
108
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
109
|
+
className: "".concat(animationClasses.animation, " ").concat(styleClass.wrap),
|
|
110
|
+
role: "status",
|
|
111
|
+
"aria-hidden": ariaLabel === undefined,
|
|
112
|
+
"aria-busy": ariaLabel !== undefined,
|
|
113
|
+
"aria-label": ariaLabel
|
|
114
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
115
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {})
|
|
116
|
+
}));
|
|
117
|
+
};
|
|
118
|
+
exports.SkeletonLine = SkeletonLine;
|
|
119
|
+
var SkeletonText = function SkeletonText(param) {
|
|
120
|
+
var ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
121
|
+
var animationClasses = useAnimation();
|
|
122
|
+
var styleClass = useSkeletonStyles({
|
|
123
|
+
height: "fit-content"
|
|
124
|
+
});
|
|
125
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, _objectSpread({
|
|
126
|
+
className: "".concat(animationClasses.animation, " ").concat(styleClass.wrap),
|
|
127
|
+
space: 16,
|
|
128
|
+
role: "status",
|
|
129
|
+
"aria-hidden": ariaLabel === undefined,
|
|
130
|
+
"aria-busy": ariaLabel !== undefined,
|
|
131
|
+
"aria-label": ariaLabel
|
|
132
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
133
|
+
children: [
|
|
134
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {}),
|
|
135
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {}),
|
|
136
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
137
|
+
width: "75%"
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
exports.SkeletonText = SkeletonText;
|
|
143
|
+
var SkeletonCircle = function SkeletonCircle(param) {
|
|
144
|
+
var ariaLabel = param.ariaLabel, _size = param.size, size = _size === void 0 ? 40 : _size, dataAttributes = param.dataAttributes;
|
|
145
|
+
var animationClasses = useAnimation();
|
|
146
|
+
var styleClass = useSkeletonStyles({
|
|
147
|
+
width: size,
|
|
148
|
+
height: size
|
|
149
|
+
});
|
|
150
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
151
|
+
className: (0, _classnames).default(animationClasses.animation, styleClass.wrap),
|
|
152
|
+
role: "status",
|
|
153
|
+
"aria-hidden": ariaLabel === undefined,
|
|
154
|
+
"aria-busy": ariaLabel !== undefined,
|
|
155
|
+
"aria-label": ariaLabel
|
|
156
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
157
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
158
|
+
height: size,
|
|
159
|
+
width: size,
|
|
160
|
+
radius: "50%"
|
|
161
|
+
})
|
|
162
|
+
}));
|
|
163
|
+
};
|
|
164
|
+
exports.SkeletonCircle = SkeletonCircle;
|
|
165
|
+
var useSkeletonRowStyles = (0, _jss).createUseStyles(function() {
|
|
166
|
+
return {
|
|
167
|
+
row: {
|
|
168
|
+
display: "flex",
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
justifyContent: "center"
|
|
171
|
+
},
|
|
172
|
+
circle: {
|
|
173
|
+
flexShrink: 0,
|
|
174
|
+
flexGrow: 0
|
|
175
|
+
},
|
|
176
|
+
line: {
|
|
177
|
+
flexShrink: 1,
|
|
178
|
+
marginLeft: 16
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
var SkeletonRow = function SkeletonRow(param) {
|
|
183
|
+
var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
184
|
+
var animationClasses = useAnimation();
|
|
185
|
+
var styleClass = useSkeletonStyles({
|
|
186
|
+
width: width,
|
|
187
|
+
height: "100%"
|
|
188
|
+
});
|
|
189
|
+
var rowClass = useSkeletonRowStyles();
|
|
190
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", _objectSpread({
|
|
191
|
+
className: (0, _classnames).default(animationClasses.animation, styleClass.wrap, rowClass.row),
|
|
192
|
+
role: "status",
|
|
193
|
+
"aria-hidden": ariaLabel === undefined,
|
|
194
|
+
"aria-busy": ariaLabel !== undefined,
|
|
195
|
+
"aria-label": ariaLabel
|
|
196
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
197
|
+
children: [
|
|
198
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
199
|
+
height: 40,
|
|
200
|
+
width: 40,
|
|
201
|
+
radius: "50%",
|
|
202
|
+
className: rowClass.circle
|
|
203
|
+
}),
|
|
204
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
205
|
+
width: width,
|
|
206
|
+
className: rowClass.line
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
}));
|
|
210
|
+
};
|
|
211
|
+
exports.SkeletonRow = SkeletonRow;
|
|
212
|
+
var SkeletonRectangle = function SkeletonRectangle(param) {
|
|
213
|
+
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;
|
|
214
|
+
var animationClasses = useAnimation();
|
|
215
|
+
var styleClass = useSkeletonStyles({
|
|
216
|
+
width: width,
|
|
217
|
+
height: "100%"
|
|
218
|
+
});
|
|
219
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
220
|
+
className: (0, _classnames).default(animationClasses.animation, styleClass.wrap),
|
|
221
|
+
role: "status",
|
|
222
|
+
"aria-hidden": true,
|
|
223
|
+
"aria-busy": true,
|
|
224
|
+
"aria-label": ariaLabel
|
|
225
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
226
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
227
|
+
height: height,
|
|
228
|
+
width: width
|
|
229
|
+
})
|
|
230
|
+
}));
|
|
231
|
+
};
|
|
232
|
+
exports.SkeletonRectangle = SkeletonRectangle;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import type { DataAttributes } from "./utils/types";
|
|
5
|
+
declare type SkeletonLineProps = {
|
|
6
|
+
width?: string | number,
|
|
7
|
+
ariaLabel?: string,
|
|
8
|
+
dataAttributes?: DataAttributes,
|
|
9
|
+
};
|
|
10
|
+
declare export var SkeletonLine: (x: SkeletonLineProps) => React.Node;
|
|
11
|
+
declare type SkeletonTextProps = $Diff<SkeletonLineProps, { width: any }>;
|
|
12
|
+
declare export var SkeletonText: (x: SkeletonTextProps) => React.Node;
|
|
13
|
+
declare type SkeletonCircleProps = {
|
|
14
|
+
...$Diff<SkeletonLineProps, { width: any }>,
|
|
15
|
+
...{
|
|
16
|
+
size?: number | string,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
declare export var SkeletonCircle: (x: SkeletonCircleProps) => React.Node;
|
|
20
|
+
declare type SkeletonRowProps = SkeletonLineProps;
|
|
21
|
+
declare export var SkeletonRow: (x: SkeletonRowProps) => React.Node;
|
|
22
|
+
declare type SkeletonRectangleProps = {
|
|
23
|
+
...SkeletonLineProps,
|
|
24
|
+
...{
|
|
25
|
+
height: number | string,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
declare export var SkeletonRectangle: (x: SkeletonRectangleProps) => React.Node;
|
|
29
|
+
declare export {};
|
package/dist/skins/blau.js
CHANGED
|
@@ -178,7 +178,7 @@ var getBlauSkin = function getBlauSkin() {
|
|
|
178
178
|
textLink: palette.blauPurple30,
|
|
179
179
|
textLinkInverse: palette.blauPurple30,
|
|
180
180
|
// CONTROLS
|
|
181
|
-
control: palette.
|
|
181
|
+
control: palette.darkModeGrey6,
|
|
182
182
|
loadingBar: palette.blauBluePrimary,
|
|
183
183
|
loadingBarBackground: palette.darkModeGrey,
|
|
184
184
|
toggleAndroidInactive: palette.grey5,
|
package/dist/skins/movistar.js
CHANGED
|
@@ -60,7 +60,7 @@ var getMovistarSkin = function getMovistarSkin(variant) {
|
|
|
60
60
|
backgroundContainer: palette.white,
|
|
61
61
|
backgroundBrand: palette.movistarBlue,
|
|
62
62
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
63
|
-
backgroundSkeleton: palette.
|
|
63
|
+
backgroundSkeleton: palette.grey2,
|
|
64
64
|
backgroundSkeletonInverse: palette.movistarBlue55,
|
|
65
65
|
navigationBarBackground: palette.movistarBlue,
|
|
66
66
|
backgroundAlternative: palette.grey1,
|
package/dist/skins/o2-classic.js
CHANGED
|
@@ -68,7 +68,7 @@ var getO2ClassicSkin = function getO2ClassicSkin() {
|
|
|
68
68
|
backgroundContainer: palette.white,
|
|
69
69
|
backgroundBrand: "linear-gradient(to bottom, ".concat(palette.o2Blue, ", ").concat(palette.o2GradientSecond, " 51%, ").concat(palette.o2GradientThird, " 72%, ").concat(palette.o2GradientFourth, ")"),
|
|
70
70
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
71
|
-
backgroundSkeleton: palette.
|
|
71
|
+
backgroundSkeleton: palette.grey2,
|
|
72
72
|
backgroundSkeletonInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
73
73
|
navigationBarBackground: palette.o2Blue,
|
|
74
74
|
backgroundAlternative: palette.grey1,
|
package/dist/skins/o2.js
CHANGED
|
@@ -58,7 +58,7 @@ var getO2Skin = function getO2Skin() {
|
|
|
58
58
|
backgroundContainer: palette.white,
|
|
59
59
|
backgroundBrand: palette.o2BluePrimary,
|
|
60
60
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
61
|
-
backgroundSkeleton: palette.
|
|
61
|
+
backgroundSkeleton: palette.grey2,
|
|
62
62
|
backgroundSkeletonInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
63
63
|
navigationBarBackground: palette.o2BluePrimary,
|
|
64
64
|
backgroundAlternative: palette.grey1,
|
package/dist/skins/telefonica.js
CHANGED
|
@@ -54,7 +54,7 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
54
54
|
backgroundContainer: palette.white,
|
|
55
55
|
backgroundBrand: palette.telefonicaBlue,
|
|
56
56
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
57
|
-
backgroundSkeleton: palette.
|
|
57
|
+
backgroundSkeleton: palette.grey2,
|
|
58
58
|
backgroundSkeletonInverse: palette.telefonicaBlue70,
|
|
59
59
|
navigationBarBackground: palette.telefonicaBlue,
|
|
60
60
|
backgroundAlternative: palette.grey1,
|
|
@@ -177,7 +177,7 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
177
177
|
textButtonSecondaryInverseSelected: palette.grey4,
|
|
178
178
|
textLink: palette.telefonicaBlue,
|
|
179
179
|
textLinkInverse: palette.telefonicaBlue,
|
|
180
|
-
control: palette.
|
|
180
|
+
control: palette.darkModeGrey6,
|
|
181
181
|
controlActivated: palette.telefonicaBlue,
|
|
182
182
|
loadingBar: palette.telefonicaBlue,
|
|
183
183
|
loadingBarBackground: (0, _color).applyAlpha(palette.white, 0.05),
|
package/dist/skins/utils.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { KnownSkin, KnownSkinName } from './types';
|
|
2
3
|
export declare const getSkinByName: (name: KnownSkinName, variant?: "prominent" | undefined) => KnownSkin;
|
|
4
|
+
export declare const flattenChildren: (children: React.ReactNode) => Array<React.ReactNode>;
|
package/dist/skins/utils.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports.getSkinByName = void 0;
|
|
5
|
+
exports.flattenChildren = exports.getSkinByName = void 0;
|
|
6
|
+
var React = _interopRequireWildcard(require("react"));
|
|
6
7
|
var _constants = require("./constants");
|
|
7
8
|
var _blau = require("./blau");
|
|
8
9
|
var _telefonica = require("./telefonica");
|
|
@@ -10,6 +11,27 @@ var _vivo = require("./vivo");
|
|
|
10
11
|
var _o2 = require("./o2");
|
|
11
12
|
var _o2Classic = require("./o2-classic");
|
|
12
13
|
var _movistar = require("./movistar");
|
|
14
|
+
function _interopRequireWildcard(obj) {
|
|
15
|
+
if (obj && obj.__esModule) {
|
|
16
|
+
return obj;
|
|
17
|
+
} else {
|
|
18
|
+
var newObj = {};
|
|
19
|
+
if (obj != null) {
|
|
20
|
+
for(var key in obj){
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
22
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
23
|
+
if (desc.get || desc.set) {
|
|
24
|
+
Object.defineProperty(newObj, key, desc);
|
|
25
|
+
} else {
|
|
26
|
+
newObj[key] = obj[key];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
newObj.default = obj;
|
|
32
|
+
return newObj;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
13
35
|
var getSkinByName = function getSkinByName(name, variant) {
|
|
14
36
|
switch(name){
|
|
15
37
|
case _constants.BLAU_SKIN:
|
|
@@ -32,3 +54,14 @@ var getSkinByName = function getSkinByName(name, variant) {
|
|
|
32
54
|
}
|
|
33
55
|
};
|
|
34
56
|
exports.getSkinByName = getSkinByName;
|
|
57
|
+
var flattenChildren = function(children) {
|
|
58
|
+
var childrenArray = React.Children.toArray(children);
|
|
59
|
+
return childrenArray.reduce(function(flatChildren, child) {
|
|
60
|
+
if (child.type === React.Fragment) {
|
|
61
|
+
return flatChildren.concat(flattenChildren(child.props.children));
|
|
62
|
+
}
|
|
63
|
+
flatChildren.push(child);
|
|
64
|
+
return flatChildren;
|
|
65
|
+
}, []);
|
|
66
|
+
};
|
|
67
|
+
exports.flattenChildren = flattenChildren;
|
package/dist/skins/utils.js.flow
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import type { KnownSkin, KnownSkinName } from "./types";
|
|
4
5
|
declare export var getSkinByName: (
|
|
5
6
|
name: KnownSkinName,
|
|
6
7
|
variant?: "prominent" | void
|
|
7
8
|
) => KnownSkin;
|
|
9
|
+
declare export var flattenChildren: (children: React.Node) => Array<React.Node>;
|
package/dist/skins/vivo.js
CHANGED
|
@@ -52,7 +52,7 @@ var getVivoSkin = function getVivoSkin() {
|
|
|
52
52
|
backgroundContainer: palette.white,
|
|
53
53
|
backgroundBrand: palette.vivoPurple,
|
|
54
54
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
55
|
-
backgroundSkeleton: palette.
|
|
55
|
+
backgroundSkeleton: palette.grey2,
|
|
56
56
|
backgroundSkeletonInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
57
57
|
backgroundFeedbackBottom: palette.vivoPurple,
|
|
58
58
|
navigationBarBackground: palette.vivoPurple,
|
package/dist/snackbar.js
CHANGED
|
@@ -10,6 +10,7 @@ var _touchable = _interopRequireDefault(require("./touchable"));
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _webviewBridge = require("@tef-novum/webview-bridge");
|
|
12
12
|
var _hooks = require("./hooks");
|
|
13
|
+
var _text = require("./text");
|
|
13
14
|
function _interopRequireDefault(obj) {
|
|
14
15
|
return obj && obj.__esModule ? obj : {
|
|
15
16
|
default: obj
|
|
@@ -146,9 +147,6 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
146
147
|
transition: "transform ".concat(TRANSITION_TIME_IN_MS, "ms ease-in-out, opacity ").concat(TRANSITION_TIME_IN_MS, "ms ease-in-out")
|
|
147
148
|
},
|
|
148
149
|
snackbarContent: {
|
|
149
|
-
fontSize: 14,
|
|
150
|
-
lineHeight: "20px",
|
|
151
|
-
color: theme.colors.textPrimaryInverse,
|
|
152
150
|
display: "flex",
|
|
153
151
|
flexDirection: function flexDirection(param) {
|
|
154
152
|
var isLongButton = param.isLongButton;
|
|
@@ -201,6 +199,7 @@ var SnackbarComponent = function SnackbarComponent(param) {
|
|
|
201
199
|
var ref1 = (0, _hooks).useElementDimensions(), buttonWidth = ref1.width, buttonRef = ref1.ref;
|
|
202
200
|
var isDesktopOrBigger = (0, _hooks).useScreenSize().isDesktopOrBigger;
|
|
203
201
|
var longButtonWidth = isDesktopOrBigger ? 160 : 128;
|
|
202
|
+
var colors = (0, _hooks).useTheme().colors;
|
|
204
203
|
var classes = useStyles({
|
|
205
204
|
type: type,
|
|
206
205
|
isOpen: isOpen,
|
|
@@ -236,7 +235,9 @@ var SnackbarComponent = function SnackbarComponent(param) {
|
|
|
236
235
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
237
236
|
className: classes.snackbarContent,
|
|
238
237
|
children: [
|
|
239
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
238
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
|
|
239
|
+
regular: true,
|
|
240
|
+
color: colors.textPrimaryInverse,
|
|
240
241
|
children: message
|
|
241
242
|
}),
|
|
242
243
|
buttonText && /*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, {
|
package/dist/tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { TrackingEvent } from './utils/types';
|
|
2
|
+
import type { DataAttributes, TrackingEvent } from './utils/types';
|
|
3
3
|
export declare type TabsProps = {
|
|
4
4
|
selectedIndex: number;
|
|
5
5
|
onChange: (selectedIndex: number) => void;
|
|
@@ -10,6 +10,7 @@ export declare type TabsProps = {
|
|
|
10
10
|
readonly 'aria-controls'?: string;
|
|
11
11
|
}>;
|
|
12
12
|
children?: void;
|
|
13
|
+
dataAttributes?: DataAttributes;
|
|
13
14
|
};
|
|
14
15
|
declare const Tabs: React.FC<TabsProps>;
|
|
15
16
|
export default Tabs;
|
package/dist/tabs.js
CHANGED
|
@@ -13,6 +13,7 @@ var _hooks = require("./hooks");
|
|
|
13
13
|
var _text = require("./text");
|
|
14
14
|
var _css = require("./utils/css");
|
|
15
15
|
var _platform = require("./utils/platform");
|
|
16
|
+
var _dom = require("./utils/dom");
|
|
16
17
|
function _interopRequireDefault(obj) {
|
|
17
18
|
return obj && obj.__esModule ? obj : {
|
|
18
19
|
default: obj
|
|
@@ -87,6 +88,22 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
87
88
|
function _nonIterableRest() {
|
|
88
89
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
89
90
|
}
|
|
91
|
+
function _objectSpread(target) {
|
|
92
|
+
var _arguments = arguments, _loop = function(i) {
|
|
93
|
+
var source = _arguments[i] != null ? _arguments[i] : {};
|
|
94
|
+
var ownKeys = Object.keys(source);
|
|
95
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
96
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
97
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
ownKeys.forEach(function(key) {
|
|
101
|
+
_defineProperty(target, key, source[key]);
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
for(var i = 1; i < arguments.length; i++)_loop(i);
|
|
105
|
+
return target;
|
|
106
|
+
}
|
|
90
107
|
function _slicedToArray(arr, i) {
|
|
91
108
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
92
109
|
}
|
|
@@ -189,7 +206,7 @@ var useStyles = (0, _jss).createUseStyles(function(param1) {
|
|
|
189
206
|
};
|
|
190
207
|
});
|
|
191
208
|
var Tabs = function Tabs(param2) {
|
|
192
|
-
var selectedIndex = param2.selectedIndex, onChange = param2.onChange, tabs = param2.tabs;
|
|
209
|
+
var selectedIndex = param2.selectedIndex, onChange = param2.onChange, tabs = param2.tabs, dataAttributes = param2.dataAttributes;
|
|
193
210
|
var id = (0, _hooks).useAriaId();
|
|
194
211
|
var ref = (0, _hooks).useElementDimensions(), width = ref.width, ref1 = ref.ref;
|
|
195
212
|
var animatedLineRef = React.useRef(null);
|
|
@@ -225,11 +242,12 @@ var Tabs = function Tabs(param2) {
|
|
|
225
242
|
}, LINE_ANIMATION_DURATION_MS);
|
|
226
243
|
}
|
|
227
244
|
};
|
|
228
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
245
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
229
246
|
id: id,
|
|
230
247
|
role: "tablist",
|
|
231
248
|
ref: ref1,
|
|
232
|
-
className: classes.outerBorder
|
|
249
|
+
className: classes.outerBorder
|
|
250
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
233
251
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_responsiveLayout.default, {
|
|
234
252
|
fullWidth: true,
|
|
235
253
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
@@ -281,7 +299,7 @@ var Tabs = function Tabs(param2) {
|
|
|
281
299
|
]
|
|
282
300
|
})
|
|
283
301
|
})
|
|
284
|
-
});
|
|
302
|
+
}));
|
|
285
303
|
};
|
|
286
304
|
var _default = Tabs;
|
|
287
305
|
exports.default = _default;
|
package/dist/tabs.js.flow
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import type { TrackingEvent } from "./utils/types";
|
|
4
|
+
import type { DataAttributes, TrackingEvent } from "./utils/types";
|
|
5
5
|
export type TabsProps = {
|
|
6
6
|
selectedIndex: number,
|
|
7
7
|
onChange: (selectedIndex: number) => void,
|
|
@@ -11,6 +11,7 @@ export type TabsProps = {
|
|
|
11
11
|
+icon?: React.Node,
|
|
12
12
|
+"aria-controls"?: string,
|
|
13
13
|
}>,
|
|
14
|
+
dataAttributes?: DataAttributes,
|
|
14
15
|
};
|
|
15
16
|
declare var Tabs: React.ComponentType<TabsProps>;
|
|
16
17
|
declare export default typeof Tabs;
|
package/dist/utils/types.d.ts
CHANGED
package/dist/utils/types.js.flow
CHANGED
|
@@ -11,5 +11,11 @@ export type IconProps = {
|
|
|
11
11
|
className?: string,
|
|
12
12
|
style?: CssStyle,
|
|
13
13
|
};
|
|
14
|
+
export type ContainerType =
|
|
15
|
+
| "desktop-small-column"
|
|
16
|
+
| "desktop-medium-column"
|
|
17
|
+
| "desktop-wide-column"
|
|
18
|
+
| "tablet-column"
|
|
19
|
+
| "mobile-column";
|
|
14
20
|
|
|
15
21
|
import { type CssStyle } from "../__css_types__.js.flow";
|
package/dist-es/button-group.js
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
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
30
|
import * as React from "react";
|
|
3
31
|
import { createUseStyles } from "./jss";
|
|
4
32
|
import classNames from "classnames";
|
|
33
|
+
import { getPrefixedDataAttributes } from "./utils/dom";
|
|
5
34
|
var buttonLayoutSpacing = 16;
|
|
6
35
|
var buttonLinkPadding = 12;
|
|
7
36
|
var useStyles = createUseStyles(function() {
|
|
@@ -34,14 +63,15 @@ var useStyles = createUseStyles(function() {
|
|
|
34
63
|
};
|
|
35
64
|
});
|
|
36
65
|
var ButtonGroup = function(param) {
|
|
37
|
-
var primaryButton = param.primaryButton, secondaryButton = param.secondaryButton, link = param.link;
|
|
66
|
+
var primaryButton = param.primaryButton, secondaryButton = param.secondaryButton, link = param.link, dataAttributes = param.dataAttributes;
|
|
38
67
|
var anyAction = !!primaryButton || !!secondaryButton || !!link;
|
|
39
68
|
var bothButtons = !!primaryButton && !!secondaryButton;
|
|
40
69
|
var classes = useStyles({
|
|
41
70
|
bothButtons: bothButtons
|
|
42
71
|
});
|
|
43
|
-
return anyAction ? /*#__PURE__*/ _jsxs("div", {
|
|
44
|
-
className: classNames(classes.inline, classes.container)
|
|
72
|
+
return anyAction ? /*#__PURE__*/ _jsxs("div", _objectSpread({
|
|
73
|
+
className: classNames(classes.inline, classes.container)
|
|
74
|
+
}, getPrefixedDataAttributes(dataAttributes), {
|
|
45
75
|
children: [
|
|
46
76
|
(primaryButton || secondaryButton) && /*#__PURE__*/ _jsxs("div", {
|
|
47
77
|
className: classNames(classes.inline, classes.buttons),
|
|
@@ -59,6 +89,6 @@ var ButtonGroup = function(param) {
|
|
|
59
89
|
children: link
|
|
60
90
|
})
|
|
61
91
|
]
|
|
62
|
-
}) : null;
|
|
92
|
+
})) : null;
|
|
63
93
|
};
|
|
64
94
|
export default ButtonGroup;
|