@telefonica/mistica 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button-group.js +1 -1
- package/dist/button.js +4 -3
- package/dist/card.d.ts +4 -0
- package/dist/card.js +7 -2
- package/dist/card.js.flow +4 -0
- package/dist/carousel.d.ts +4 -0
- package/dist/carousel.js +6 -3
- package/dist/carousel.js.flow +6 -0
- package/dist/checkbox.js +2 -1
- package/dist/generated/mistica-icons/icon-photo-camera-filled.js +38 -18
- package/dist/generated/mistica-icons/icon-photo-camera-light.js +30 -16
- package/dist/generated/mistica-icons/icon-process-loading-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-shield-cross-light.js +1 -1
- package/dist/generated/mistica-icons/icon-shop-light.js +1 -1
- package/dist/generated/mistica-icons/icon-talk-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-tongue-light.js +1 -1
- package/dist/generated/mistica-icons/icon-trash-can-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-umbrella-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-web-filled.js +1 -1
- package/dist/package-version.js +1 -1
- package/dist/popover.d.ts +2 -1
- package/dist/popover.js +58 -63
- package/dist/popover.js.flow +2 -1
- package/dist/skins/blau.js +1 -1
- package/dist/spinner.js +0 -1
- package/dist/text-link.js +16 -8
- package/dist-es/button-group.js +1 -1
- package/dist-es/button.js +4 -3
- package/dist-es/card.js +7 -2
- package/dist-es/carousel.js +6 -3
- package/dist-es/checkbox.js +2 -1
- package/dist-es/generated/mistica-icons/icon-photo-camera-filled.js +38 -18
- package/dist-es/generated/mistica-icons/icon-photo-camera-light.js +30 -16
- package/dist-es/generated/mistica-icons/icon-process-loading-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-shield-cross-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-shop-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-talk-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tongue-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-trash-can-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-umbrella-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-web-filled.js +1 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +59 -64
- package/dist-es/skins/blau.js +1 -1
- package/dist-es/spinner.js +0 -1
- package/dist-es/text-link.js +16 -8
- package/package.json +1 -1
package/dist-es/popover.js
CHANGED
|
@@ -75,9 +75,13 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
75
75
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
76
76
|
import * as React from "react";
|
|
77
77
|
import { createUseStyles } from "./jss";
|
|
78
|
-
import
|
|
78
|
+
import IconCloseRegular from "./generated/mistica-icons/icon-close-regular";
|
|
79
79
|
import IconButton from "./icon-button";
|
|
80
80
|
import { useTheme, useScreenSize } from "./hooks";
|
|
81
|
+
import Stack from "./stack";
|
|
82
|
+
import Box from "./box";
|
|
83
|
+
import Inline from "./inline";
|
|
84
|
+
import { Text3, Text2 } from "./text";
|
|
81
85
|
// Zeplin definition:
|
|
82
86
|
// https://app.zeplin.io/project/5c9b6f097168bc065782b5c3/screen/5d15d87e46571573089f2863
|
|
83
87
|
var defaultPositionDesktop = "bottom";
|
|
@@ -99,7 +103,7 @@ var useStyles = createUseStyles(function(theme) {
|
|
|
99
103
|
top: 0,
|
|
100
104
|
left: "50%",
|
|
101
105
|
transform: "translate(-50%, -50%) rotate(45deg)",
|
|
102
|
-
border: "1px solid ".concat(theme.colors.
|
|
106
|
+
border: "1px solid ".concat(theme.colors.border),
|
|
103
107
|
borderRadius: 2,
|
|
104
108
|
boxShadow: function(param) {
|
|
105
109
|
var position = param.position;
|
|
@@ -122,46 +126,27 @@ var useStyles = createUseStyles(function(theme) {
|
|
|
122
126
|
zIndex: 9,
|
|
123
127
|
boxShadow: "0 2px 4px 0 rgba(0, 0, 0, ".concat(shadowAlpha, ")"),
|
|
124
128
|
backgroundColor: theme.colors.backgroundContainer,
|
|
125
|
-
border: "1px solid ".concat(theme.colors.
|
|
129
|
+
border: "1px solid ".concat(theme.colors.border),
|
|
126
130
|
borderRadius: 8
|
|
127
131
|
},
|
|
128
|
-
|
|
129
|
-
marginBottom: 4,
|
|
130
|
-
color: theme.colors.textPrimary,
|
|
131
|
-
fontWeight: 400,
|
|
132
|
-
lineHeight: 1.5,
|
|
133
|
-
fontSize: 16
|
|
134
|
-
},
|
|
135
|
-
boxContainer: {
|
|
136
|
-
position: "relative",
|
|
132
|
+
textAlign: {
|
|
137
133
|
display: "flex",
|
|
138
|
-
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
height: "100%"
|
|
136
|
+
},
|
|
137
|
+
boxContent: {
|
|
138
|
+
display: "flex"
|
|
139
139
|
},
|
|
140
140
|
textContent: {
|
|
141
|
-
|
|
142
|
-
flexDirection: "column",
|
|
143
|
-
margin: 16,
|
|
144
|
-
marginRight: 8,
|
|
145
|
-
justifyContent: "center",
|
|
141
|
+
textAlign: "left",
|
|
146
142
|
width: "100%",
|
|
147
143
|
wordBreak: "break-word"
|
|
148
144
|
},
|
|
149
|
-
assetContent: {
|
|
150
|
-
width: 40,
|
|
151
|
-
minWidth: 40,
|
|
152
|
-
height: 40,
|
|
153
|
-
margin: 16,
|
|
154
|
-
marginRight: 0
|
|
155
|
-
},
|
|
156
|
-
text: {
|
|
157
|
-
color: theme.colors.textSecondary,
|
|
158
|
-
textAlign: "left",
|
|
159
|
-
lineHeight: 1.42857142,
|
|
160
|
-
fontSize: 14
|
|
161
|
-
},
|
|
162
145
|
closeButtonIcon: {
|
|
163
|
-
|
|
164
|
-
|
|
146
|
+
position: "absolute",
|
|
147
|
+
top: 8,
|
|
148
|
+
right: 8,
|
|
149
|
+
zIndex: 1
|
|
165
150
|
}
|
|
166
151
|
};
|
|
167
152
|
});
|
|
@@ -246,7 +231,7 @@ var getTargetPosition = function(targetWrapper) {
|
|
|
246
231
|
} : null;
|
|
247
232
|
};
|
|
248
233
|
var Popover = function(param) {
|
|
249
|
-
var description = param.description, title = param.title, onClose = param.onClose, trackingEvent = param.trackingEvent, position = param.position, width = param.width, target = param.target, asset = param.asset, _isVisible = param.isVisible, isVisible = _isVisible === void 0 ? true : _isVisible;
|
|
234
|
+
var description = param.description, title = param.title, onClose = param.onClose, trackingEvent = param.trackingEvent, position = param.position, width = param.width, target = param.target, asset = param.asset, _isVisible = param.isVisible, isVisible = _isVisible === void 0 ? true : _isVisible, extra = param.extra;
|
|
250
235
|
var ref = useTheme(), texts = ref.texts, colors = ref.colors, isIos = ref.isIos;
|
|
251
236
|
var isTabletOrSmaller = useScreenSize().isTabletOrSmaller;
|
|
252
237
|
var ref1 = _slicedToArray(React.useState(null), 2), targetPosition = ref1[0], setTargetPosition = ref1[1];
|
|
@@ -287,40 +272,50 @@ var Popover = function(param) {
|
|
|
287
272
|
className: classes.arrow
|
|
288
273
|
})
|
|
289
274
|
}),
|
|
290
|
-
/*#__PURE__*/ _jsxs(
|
|
291
|
-
|
|
275
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
276
|
+
padding: 16,
|
|
292
277
|
children: [
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
278
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
279
|
+
paddingRight: 24,
|
|
280
|
+
className: classes.boxContent,
|
|
281
|
+
children: /*#__PURE__*/ _jsxs(Inline, {
|
|
282
|
+
space: 16,
|
|
283
|
+
children: [
|
|
284
|
+
asset,
|
|
285
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
286
|
+
className: classes.textAlign,
|
|
287
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
288
|
+
space: 4,
|
|
289
|
+
className: classes.textContent,
|
|
290
|
+
children: [
|
|
291
|
+
title && /*#__PURE__*/ _jsx(Text3, {
|
|
292
|
+
regular: true,
|
|
293
|
+
children: title
|
|
294
|
+
}),
|
|
295
|
+
/*#__PURE__*/ _jsx(Text2, {
|
|
296
|
+
regular: true,
|
|
297
|
+
color: colors.textSecondary,
|
|
298
|
+
children: description
|
|
299
|
+
})
|
|
300
|
+
]
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
]
|
|
304
|
+
})
|
|
309
305
|
}),
|
|
310
|
-
/*#__PURE__*/ _jsx(
|
|
306
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
311
307
|
className: classes.closeButtonIcon,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
color: colors.neutralHigh
|
|
321
|
-
})
|
|
308
|
+
onPress: function(e) {
|
|
309
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
310
|
+
e.stopPropagation();
|
|
311
|
+
},
|
|
312
|
+
trackingEvent: trackingEvent,
|
|
313
|
+
"aria-label": texts.modalClose,
|
|
314
|
+
children: /*#__PURE__*/ _jsx(IconCloseRegular, {
|
|
315
|
+
color: colors.neutralHigh
|
|
322
316
|
})
|
|
323
|
-
})
|
|
317
|
+
}),
|
|
318
|
+
extra
|
|
324
319
|
]
|
|
325
320
|
})
|
|
326
321
|
]
|
package/dist-es/skins/blau.js
CHANGED
|
@@ -53,7 +53,7 @@ export var getBlauSkin = function() {
|
|
|
53
53
|
backgroundBrand: palette.blauBluePrimary,
|
|
54
54
|
backgroundOverlay: applyAlpha(palette.blauBlueSecondary, 0.75),
|
|
55
55
|
backgroundSkeleton: palette.grey2,
|
|
56
|
-
backgroundSkeletonInverse: palette.white,
|
|
56
|
+
backgroundSkeletonInverse: applyAlpha(palette.white, 0.2),
|
|
57
57
|
navigationBarBackground: palette.blauBluePrimary,
|
|
58
58
|
backgroundAlternative: palette.blauBluePrimary20,
|
|
59
59
|
backgroundFeedbackBottom: palette.blauBluePrimary,
|
package/dist-es/spinner.js
CHANGED
package/dist-es/text-link.js
CHANGED
|
@@ -62,25 +62,33 @@ import { useIsInverseVariant } from "./theme-variant-context";
|
|
|
62
62
|
import { useForm } from "./form-context";
|
|
63
63
|
import { getTextFromChildren } from "./utils/common";
|
|
64
64
|
import { eventActions, eventCategories, eventNames, useTrackingConfig } from "./utils/analytics";
|
|
65
|
-
var useStyles = createUseStyles(function(
|
|
65
|
+
var useStyles = createUseStyles(function(param) {
|
|
66
|
+
var colors = param.colors, isDarkMode = param.isDarkMode, mq = param.mq;
|
|
66
67
|
var _obj;
|
|
67
68
|
return {
|
|
68
69
|
textLink: (_obj = {
|
|
69
70
|
width: "auto",
|
|
70
71
|
lineHeight: "inherit",
|
|
71
72
|
display: "inline-block",
|
|
72
|
-
color:
|
|
73
|
-
wordBreak: "break-word"
|
|
74
|
-
|
|
73
|
+
color: colors.textLink,
|
|
74
|
+
wordBreak: "break-word",
|
|
75
|
+
cursor: "pointer"
|
|
76
|
+
}, _defineProperty(_obj, mq.supportsHover, {
|
|
75
77
|
"&:hover:not([disabled])": {
|
|
76
78
|
textDecoration: "underline"
|
|
77
79
|
}
|
|
78
80
|
}), _defineProperty(_obj, "&[disabled]", {
|
|
79
|
-
opacity: 0.5
|
|
81
|
+
opacity: 0.5,
|
|
82
|
+
textDecoration: "none"
|
|
80
83
|
}), _obj),
|
|
81
|
-
inverse: {
|
|
82
|
-
color:
|
|
83
|
-
|
|
84
|
+
inverse: _defineProperty({
|
|
85
|
+
color: colors.textLinkInverse,
|
|
86
|
+
textDecoration: isDarkMode ? "none" : "underline"
|
|
87
|
+
}, mq.supportsHover, {
|
|
88
|
+
"&:hover:not([disabled])": {
|
|
89
|
+
textDecorationThickness: isDarkMode ? 1 : 2
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
84
92
|
small: {
|
|
85
93
|
fontSize: 14
|
|
86
94
|
}
|