@telefonica/mistica 11.6.0 → 11.9.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/avatar.d.ts +14 -0
- package/dist/avatar.js +239 -0
- package/dist/avatar.js.flow +16 -0
- package/dist/badge.d.ts +2 -0
- package/dist/badge.js +24 -7
- package/dist/badge.js.flow +2 -0
- package/dist/button.js +35 -10
- package/dist/image.d.ts +3 -1
- package/dist/image.js +76 -11
- package/dist/image.js.flow +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -2
- package/dist/index.js.flow +3 -1
- package/dist/package-version.js +1 -1
- package/dist/password-field.js +9 -8
- package/dist/placeholder.d.ts +0 -4
- package/dist/placeholder.js +1 -13
- package/dist/placeholder.js.flow +0 -4
- package/dist/section-title.d.ts +3 -0
- package/dist/section-title.js +3 -1
- package/dist/section-title.js.flow +3 -0
- package/dist/text-link.js +18 -5
- package/dist/text.js +8 -2
- package/dist/theme-context-provider.js +2 -1
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js.flow +2 -0
- package/dist/title.d.ts +13 -0
- package/dist/title.js +87 -0
- package/dist/title.js.flow +18 -0
- package/dist/utils/analytics.d.ts +3 -0
- package/dist/utils/analytics.js +5 -1
- package/dist/utils/analytics.js.flow +3 -0
- package/dist/video.d.ts +1 -1
- package/dist/video.js +8 -6
- package/dist/video.js.flow +1 -1
- package/dist-es/avatar.js +208 -0
- package/dist-es/badge.js +24 -7
- package/dist-es/button.js +36 -11
- package/dist-es/image.js +77 -11
- package/dist-es/index.js +3 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.js +9 -8
- package/dist-es/placeholder.js +0 -11
- package/dist-es/section-title.js +3 -1
- package/dist-es/text-link.js +19 -6
- package/dist-es/text.js +8 -2
- package/dist-es/theme-context-provider.js +2 -1
- package/dist-es/title.js +54 -0
- package/dist-es/utils/analytics.js +5 -0
- package/dist-es/video.js +8 -6
- package/package.json +3 -3
- package/dist/icons/icon-visibility-off.d.ts +0 -7
- package/dist/icons/icon-visibility-off.js +0 -49
- package/dist/icons/icon-visibility-off.js.flow +0 -9
- package/dist/icons/icon-visibility.d.ts +0 -7
- package/dist/icons/icon-visibility.js +0 -49
- package/dist/icons/icon-visibility.js.flow +0 -9
- package/dist-es/icons/icon-visibility-off.js +0 -22
- package/dist-es/icons/icon-visibility.js +0 -22
|
@@ -173,7 +173,8 @@ var ThemeContextProvider = function(param) {
|
|
|
173
173
|
analytics: _objectSpread({
|
|
174
174
|
logEvent: function() {
|
|
175
175
|
return Promise.resolve();
|
|
176
|
-
}
|
|
176
|
+
},
|
|
177
|
+
eventFormat: "universal-analytics"
|
|
177
178
|
}, theme.analytics),
|
|
178
179
|
dimensions: _objectSpread({}, dimensions, theme.dimensions),
|
|
179
180
|
mq: createMediaQueries((_mediaQueries = theme.mediaQueries) !== null && _mediaQueries !== void 0 ? _mediaQueries : mediaQueriesConfig),
|
package/dist-es/title.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Text1, Text2, Text5 } from "./text";
|
|
4
|
+
import { useTheme } from "./hooks";
|
|
5
|
+
import Inline from "./inline";
|
|
6
|
+
import Box from "./box";
|
|
7
|
+
var TitleLayout = function(param) {
|
|
8
|
+
var title = param.title, right = param.right;
|
|
9
|
+
if (!right) {
|
|
10
|
+
return title;
|
|
11
|
+
}
|
|
12
|
+
return /*#__PURE__*/ _jsxs(Inline, {
|
|
13
|
+
space: "between",
|
|
14
|
+
alignItems: "baseline",
|
|
15
|
+
children: [
|
|
16
|
+
title,
|
|
17
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
18
|
+
paddingLeft: 16,
|
|
19
|
+
children: /*#__PURE__*/ _jsx(Text2, {
|
|
20
|
+
regular: true,
|
|
21
|
+
children: right
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export var Title1 = function(param) {
|
|
28
|
+
var children = param.children, _as = param.as, as = _as === void 0 ? "h3" : _as, id = param.id, right = param.right, dataAttributes = param.dataAttributes;
|
|
29
|
+
var theme = useTheme();
|
|
30
|
+
return /*#__PURE__*/ _jsx(TitleLayout, {
|
|
31
|
+
title: /*#__PURE__*/ _jsx(Text1, {
|
|
32
|
+
color: theme.colors.textSecondary,
|
|
33
|
+
transform: "uppercase",
|
|
34
|
+
medium: true,
|
|
35
|
+
as: as,
|
|
36
|
+
id: id,
|
|
37
|
+
dataAttributes: dataAttributes,
|
|
38
|
+
children: children
|
|
39
|
+
}),
|
|
40
|
+
right: right
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export var Title2 = function(param) {
|
|
44
|
+
var children = param.children, _as = param.as, as = _as === void 0 ? "h3" : _as, id = param.id, right = param.right, dataAttributes = param.dataAttributes;
|
|
45
|
+
return /*#__PURE__*/ _jsx(TitleLayout, {
|
|
46
|
+
title: /*#__PURE__*/ _jsx(Text5, {
|
|
47
|
+
as: as,
|
|
48
|
+
id: id,
|
|
49
|
+
dataAttributes: dataAttributes,
|
|
50
|
+
children: children
|
|
51
|
+
}),
|
|
52
|
+
right: right
|
|
53
|
+
});
|
|
54
|
+
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
// Universal Analytics (legacy)
|
|
1
2
|
export var eventCategories = {
|
|
2
3
|
userInteraction: "user_interaction"
|
|
3
4
|
};
|
|
4
5
|
export var eventActions = {
|
|
5
6
|
linkTapped: "link_tapped"
|
|
6
7
|
};
|
|
8
|
+
// Google analytics 4
|
|
9
|
+
export var eventNames = {
|
|
10
|
+
userInteraction: "user_interaction"
|
|
11
|
+
};
|
package/dist-es/video.js
CHANGED
|
@@ -73,17 +73,18 @@ var useStyles = createUseStyles(function() {
|
|
|
73
73
|
objectFit: "cover",
|
|
74
74
|
maxWidth: "100%",
|
|
75
75
|
maxHeight: "100%",
|
|
76
|
+
borderRadius: function(param) {
|
|
77
|
+
var noBorderRadius = param.noBorderRadius;
|
|
78
|
+
return noBorderRadius ? 0 : 4;
|
|
79
|
+
},
|
|
76
80
|
"@supports (aspect-ratio: 1 / 1)": {
|
|
77
|
-
borderRadius: function(param) {
|
|
78
|
-
var noBorderRadius = param.noBorderRadius;
|
|
79
|
-
return noBorderRadius ? 0 : 4;
|
|
80
|
-
},
|
|
81
81
|
aspectRatio: function(param) {
|
|
82
82
|
var aspectRatio = param.aspectRatio;
|
|
83
83
|
return aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : "unset";
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"$wrapper &": {
|
|
87
|
+
borderRadius: 0,
|
|
87
88
|
position: "absolute",
|
|
88
89
|
width: "100%",
|
|
89
90
|
height: "100%",
|
|
@@ -127,9 +128,10 @@ var Video = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
127
128
|
]);
|
|
128
129
|
var supportsAspectRatio = useSupportsAspectRatio();
|
|
129
130
|
var noBorderRadius = useDisableBorderRadius();
|
|
130
|
-
// if width or height are numeric, we can calculate the other with the ratio without css
|
|
131
|
-
var withCssAspectRatio = typeof props.width !== "number" && typeof props.height !== "number";
|
|
132
131
|
var ratio = typeof aspectRatio === "number" ? aspectRatio : RATIO[aspectRatio];
|
|
132
|
+
// if width or height are numeric, we can calculate the other with the ratio without css
|
|
133
|
+
// if aspect ratio is 0, we use the original video proportions
|
|
134
|
+
var withCssAspectRatio = typeof props.width !== "number" && typeof props.height !== "number" && ratio !== 0;
|
|
133
135
|
var classes = useStyles({
|
|
134
136
|
noBorderRadius: noBorderRadius,
|
|
135
137
|
aspectRatio: withCssAspectRatio ? ratio : undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telefonica/mistica",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@swc/core": "^1.2.160",
|
|
78
78
|
"@swc/jest": "^0.2.20",
|
|
79
79
|
"@telefonica/acceptance-testing": "^2.7.0",
|
|
80
|
-
"@telefonica/eslint-config": "^1.0.
|
|
80
|
+
"@telefonica/eslint-config": "^1.0.7",
|
|
81
81
|
"@telefonica/prettier-config": "^1.1.0",
|
|
82
82
|
"@telefonica/ts-to-flow": "1.2.0",
|
|
83
83
|
"@testing-library/jest-dom": "^5.16.3",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"@juggle/resize-observer": "^3.3.1",
|
|
126
|
-
"@tef-novum/webview-bridge": "^3.
|
|
126
|
+
"@tef-novum/webview-bridge": "^3.5.0",
|
|
127
127
|
"@telefonica/libphonenumber": "^2.8.1",
|
|
128
128
|
"classnames": "^2.3.1",
|
|
129
129
|
"jss": "^10.9.0",
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
function _interopRequireWildcard(obj) {
|
|
9
|
-
if (obj && obj.__esModule) {
|
|
10
|
-
return obj;
|
|
11
|
-
} else {
|
|
12
|
-
var newObj = {};
|
|
13
|
-
if (obj != null) {
|
|
14
|
-
for(var key in obj){
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
16
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
17
|
-
if (desc.get || desc.set) {
|
|
18
|
-
Object.defineProperty(newObj, key, desc);
|
|
19
|
-
} else {
|
|
20
|
-
newObj[key] = obj[key];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
newObj.default = obj;
|
|
26
|
-
return newObj;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
var IconVisibilityOff = function IconVisibilityOff(param) {
|
|
30
|
-
var _role = param.role, role = _role === void 0 ? "presentation" : _role, _size = param.size, size = _size === void 0 ? 24 : _size;
|
|
31
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("svg", {
|
|
32
|
-
role: role,
|
|
33
|
-
width: size,
|
|
34
|
-
height: size,
|
|
35
|
-
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
36
|
-
children: [
|
|
37
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx("path", {
|
|
38
|
-
d: "M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",
|
|
39
|
-
fill: "none"
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx("path", {
|
|
42
|
-
fill: "#757575",
|
|
43
|
-
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
|
|
44
|
-
})
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
var _default = IconVisibilityOff;
|
|
49
|
-
exports.default = _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
function _interopRequireWildcard(obj) {
|
|
9
|
-
if (obj && obj.__esModule) {
|
|
10
|
-
return obj;
|
|
11
|
-
} else {
|
|
12
|
-
var newObj = {};
|
|
13
|
-
if (obj != null) {
|
|
14
|
-
for(var key in obj){
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
16
|
-
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
17
|
-
if (desc.get || desc.set) {
|
|
18
|
-
Object.defineProperty(newObj, key, desc);
|
|
19
|
-
} else {
|
|
20
|
-
newObj[key] = obj[key];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
newObj.default = obj;
|
|
26
|
-
return newObj;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
var IconVisibility = function IconVisibility(param) {
|
|
30
|
-
var _role = param.role, role = _role === void 0 ? "presentation" : _role, _size = param.size, size = _size === void 0 ? 24 : _size;
|
|
31
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("svg", {
|
|
32
|
-
role: role,
|
|
33
|
-
width: size,
|
|
34
|
-
height: size,
|
|
35
|
-
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
36
|
-
children: [
|
|
37
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx("path", {
|
|
38
|
-
d: "M0 0h24v24H0z",
|
|
39
|
-
fill: "none"
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ (0, _jsxRuntime).jsx("path", {
|
|
42
|
-
fill: "#757575",
|
|
43
|
-
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
|
|
44
|
-
})
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
var _default = IconVisibility;
|
|
49
|
-
exports.default = _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
var IconVisibilityOff = function(param) {
|
|
4
|
-
var _role = param.role, role = _role === void 0 ? "presentation" : _role, _size = param.size, size = _size === void 0 ? 24 : _size;
|
|
5
|
-
return /*#__PURE__*/ _jsxs("svg", {
|
|
6
|
-
role: role,
|
|
7
|
-
width: size,
|
|
8
|
-
height: size,
|
|
9
|
-
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
10
|
-
children: [
|
|
11
|
-
/*#__PURE__*/ _jsx("path", {
|
|
12
|
-
d: "M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z",
|
|
13
|
-
fill: "none"
|
|
14
|
-
}),
|
|
15
|
-
/*#__PURE__*/ _jsx("path", {
|
|
16
|
-
fill: "#757575",
|
|
17
|
-
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
|
|
18
|
-
})
|
|
19
|
-
]
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
export default IconVisibilityOff;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
var IconVisibility = function(param) {
|
|
4
|
-
var _role = param.role, role = _role === void 0 ? "presentation" : _role, _size = param.size, size = _size === void 0 ? 24 : _size;
|
|
5
|
-
return /*#__PURE__*/ _jsxs("svg", {
|
|
6
|
-
role: role,
|
|
7
|
-
width: size,
|
|
8
|
-
height: size,
|
|
9
|
-
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
10
|
-
children: [
|
|
11
|
-
/*#__PURE__*/ _jsx("path", {
|
|
12
|
-
d: "M0 0h24v24H0z",
|
|
13
|
-
fill: "none"
|
|
14
|
-
}),
|
|
15
|
-
/*#__PURE__*/ _jsx("path", {
|
|
16
|
-
fill: "#757575",
|
|
17
|
-
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
|
|
18
|
-
})
|
|
19
|
-
]
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
export default IconVisibility;
|