@telefonica/mistica 10.16.0 → 10.20.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/CHANGELOG.md +36 -0
- package/dist/button.js +24 -8
- package/dist/card.d.ts +10 -1
- package/dist/card.js +29 -29
- package/dist/card.js.flow +16 -1
- package/dist/credit-card-expiration-field.js +2 -7
- package/dist/credit-card-number-field.js +2 -2
- package/dist/cvv-field.js +2 -2
- package/dist/date-field.js +2 -2
- package/dist/date-time-field.js +2 -2
- package/dist/date-time-picker.js +2 -2
- package/dist/decimal-field.js +2 -7
- package/dist/email-field.js +2 -7
- package/dist/feedback.js +5 -8
- package/dist/header.d.ts +2 -0
- package/dist/header.js.flow +5 -0
- package/dist/iban-field.js +2 -7
- package/dist/icons/icon-success.js +14 -6
- package/dist/image.d.ts +25 -4
- package/dist/image.js +67 -9
- package/dist/image.js.flow +33 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -0
- package/dist/index.js.flow +3 -0
- package/dist/integer-field.js +2 -7
- package/dist/menu.js +34 -27
- package/dist/month-field.js +2 -2
- package/dist/package-version.js +1 -1
- package/dist/password-field.js +2 -2
- package/dist/phone-number-field.js +2 -7
- package/dist/search-field.js +2 -2
- package/dist/section-title.d.ts +1 -3
- package/dist/section-title.js.flow +1 -2
- package/dist/select.js +2 -2
- package/dist/skins/blau.d.ts +6 -3
- package/dist/skins/blau.js +34 -5
- package/dist/skins/blau.js.flow +6 -3
- package/dist/skins/movistar.d.ts +21 -11
- package/dist/skins/movistar.js +76 -40
- package/dist/skins/movistar.js.flow +21 -11
- package/dist/skins/o2-classic.d.ts +21 -9
- package/dist/skins/o2-classic.js +64 -26
- package/dist/skins/o2-classic.js.flow +21 -9
- package/dist/skins/o2.d.ts +19 -17
- package/dist/skins/o2.js +68 -40
- package/dist/skins/o2.js.flow +19 -17
- package/dist/skins/telefonica.d.ts +18 -13
- package/dist/skins/telefonica.js +76 -45
- package/dist/skins/telefonica.js.flow +18 -13
- package/dist/skins/types.d.ts +12 -0
- package/dist/skins/types.js.flow +12 -0
- package/dist/skins/vivo.d.ts +9 -4
- package/dist/skins/vivo.js +37 -6
- package/dist/skins/vivo.js.flow +9 -4
- package/dist/tag.d.ts +6 -1
- package/dist/tag.js +133 -24
- package/dist/tag.js.flow +15 -1
- package/dist/text-field-base.d.ts +3 -2
- package/dist/text-field-base.js +8 -8
- package/dist/text-field-base.js.flow +6 -2
- package/dist/text-field.js +2 -7
- package/dist/text.d.ts +4 -0
- package/dist/text.js +13 -6
- package/dist/text.js.flow +10 -0
- package/dist/video.d.ts +32 -0
- package/dist/video.js +161 -0
- package/dist/video.js.flow +50 -0
- package/dist-es/button.js +24 -8
- package/dist-es/card.js +30 -30
- package/dist-es/credit-card-expiration-field.js +2 -2
- package/dist-es/credit-card-number-field.js +2 -2
- package/dist-es/cvv-field.js +2 -2
- package/dist-es/date-field.js +2 -2
- package/dist-es/date-time-field.js +2 -2
- package/dist-es/date-time-picker.js +2 -2
- package/dist-es/decimal-field.js +2 -2
- package/dist-es/email-field.js +2 -2
- package/dist-es/feedback.js +5 -8
- package/dist-es/iban-field.js +2 -2
- package/dist-es/icons/icon-success.js +14 -6
- package/dist-es/image.js +41 -8
- package/dist-es/index.js +2 -0
- package/dist-es/integer-field.js +2 -2
- package/dist-es/menu.js +35 -28
- package/dist-es/month-field.js +2 -2
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.js +2 -2
- package/dist-es/phone-number-field.js +2 -2
- package/dist-es/search-field.js +2 -2
- package/dist-es/select.js +2 -2
- package/dist-es/skins/blau.js +36 -5
- package/dist-es/skins/movistar.js +78 -40
- package/dist-es/skins/o2-classic.js +66 -26
- package/dist-es/skins/o2.js +70 -40
- package/dist-es/skins/telefonica.js +78 -45
- package/dist-es/skins/vivo.js +39 -6
- package/dist-es/tag.js +130 -26
- package/dist-es/text-field-base.js +7 -6
- package/dist-es/text-field.js +2 -2
- package/dist-es/text.js +13 -6
- package/dist-es/video.js +123 -0
- package/package.json +1 -1
package/dist-es/image.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import { createUseStyles } from './jss';
|
|
3
4
|
function _objectWithoutProperties(source, excluded) {
|
|
4
5
|
if (source == null) return {
|
|
@@ -30,38 +31,70 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
30
31
|
}
|
|
31
32
|
return target;
|
|
32
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* This context is used internally to disable the border radius. This is useful for example
|
|
36
|
+
* when using the Image component inside a Card
|
|
37
|
+
*/ var DisableBorderRadiusContext = /*#__PURE__*/ React.createContext(false);
|
|
38
|
+
export var useDisableBorderRadius = function() {
|
|
39
|
+
return React.useContext(DisableBorderRadiusContext);
|
|
40
|
+
};
|
|
41
|
+
export var DisableBorderRadiusProvider = function(param) {
|
|
42
|
+
var children = param.children;
|
|
43
|
+
/*#__PURE__*/ return _jsx(DisableBorderRadiusContext.Provider, {
|
|
44
|
+
value: true,
|
|
45
|
+
children: children
|
|
46
|
+
});
|
|
47
|
+
};
|
|
33
48
|
var useStyles = createUseStyles(function() {
|
|
34
49
|
return {
|
|
35
50
|
image: {
|
|
36
|
-
borderRadius:
|
|
51
|
+
borderRadius: function(param) {
|
|
52
|
+
var noBorderRadius = param.noBorderRadius;
|
|
53
|
+
return noBorderRadius ? 0 : 4;
|
|
54
|
+
},
|
|
37
55
|
display: 'block',
|
|
38
56
|
objectFit: 'cover',
|
|
39
57
|
maxWidth: '100%',
|
|
40
|
-
maxHeight: '100%'
|
|
58
|
+
maxHeight: '100%',
|
|
59
|
+
aspectRatio: function(param) {
|
|
60
|
+
var aspectRatio = param.aspectRatio;
|
|
61
|
+
return aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : 'unset';
|
|
62
|
+
}
|
|
41
63
|
}
|
|
42
64
|
};
|
|
43
65
|
});
|
|
44
|
-
var RATIO = {
|
|
66
|
+
export var RATIO = {
|
|
45
67
|
'1:1': 1,
|
|
46
68
|
'16:9': 16 / 9,
|
|
47
69
|
'7:10': 7 / 10
|
|
48
70
|
};
|
|
49
|
-
var Image = function(_param) {
|
|
50
|
-
var
|
|
51
|
-
var
|
|
71
|
+
var Image = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
72
|
+
var _aspectRatio = _param.aspectRatio, aspectRatio = _aspectRatio === void 0 ? '1:1' : _aspectRatio, _alt = _param.alt, alt = _alt === void 0 ? '' : _alt, props = _objectWithoutProperties(_param, ["aspectRatio", "alt"]);
|
|
73
|
+
var noBorderRadius = useDisableBorderRadius();
|
|
74
|
+
var classes = useStyles({
|
|
75
|
+
noBorderRadius: noBorderRadius,
|
|
76
|
+
aspectRatio: !props.width && !props.height ? RATIO[aspectRatio] : undefined
|
|
77
|
+
});
|
|
78
|
+
var url = props.src || props.url;
|
|
52
79
|
var width = props.width;
|
|
53
80
|
var height = props.height;
|
|
54
|
-
if (props.width !== undefined) {
|
|
81
|
+
if (props.width !== undefined && props.height !== undefined) {
|
|
82
|
+
width = props.width;
|
|
83
|
+
height = props.height;
|
|
84
|
+
} else if (props.width !== undefined) {
|
|
55
85
|
height = props.width / RATIO[aspectRatio];
|
|
56
86
|
} else if (props.height !== undefined) {
|
|
57
87
|
width = props.height * RATIO[aspectRatio];
|
|
88
|
+
} else {
|
|
89
|
+
width = '100%';
|
|
58
90
|
}
|
|
59
91
|
return(/*#__PURE__*/ _jsx("img", {
|
|
92
|
+
ref: ref,
|
|
60
93
|
src: url,
|
|
61
94
|
className: classes.image,
|
|
62
95
|
alt: alt,
|
|
63
96
|
width: width,
|
|
64
97
|
height: height
|
|
65
98
|
}));
|
|
66
|
-
};
|
|
99
|
+
});
|
|
67
100
|
export default Image;
|
package/dist-es/index.js
CHANGED
|
@@ -56,10 +56,12 @@ export { default as Callout } from './callout';
|
|
|
56
56
|
export { useModalState } from './modal-context-provider';
|
|
57
57
|
export { NavigationBar, MainNavigationBar, FunnelNavigationBar, NavigationBarActionGroup, NavigationBarAction, NavigationBarLogo } from './navigation-bar';
|
|
58
58
|
export { default as Image } from './image';
|
|
59
|
+
export { default as Video } from './video';
|
|
59
60
|
// Forms
|
|
60
61
|
export { default as Form } from './form';
|
|
61
62
|
export { default as Select } from './select';
|
|
62
63
|
export { default as TextField } from './text-field';
|
|
64
|
+
export { TextFieldBase } from './text-field-base';
|
|
63
65
|
export { default as SearchField } from './search-field';
|
|
64
66
|
export { default as EmailField } from './email-field';
|
|
65
67
|
export { default as PhoneNumberField } from './phone-number-field';
|
package/dist-es/integer-field.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFieldProps } from './form-context';
|
|
3
3
|
import { useTheme } from './hooks';
|
|
4
|
-
import
|
|
4
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
5
5
|
function _defineProperty(obj, key, value) {
|
|
6
6
|
if (key in obj) {
|
|
7
7
|
Object.defineProperty(obj, key, {
|
|
@@ -110,7 +110,7 @@ var IntegerField = function(_param) {
|
|
|
110
110
|
onChange: onChange,
|
|
111
111
|
onChangeValue: onChangeValue
|
|
112
112
|
});
|
|
113
|
-
return(/*#__PURE__*/ _jsx(
|
|
113
|
+
return(/*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, _objectSpread({
|
|
114
114
|
}, rest, fieldProps, {
|
|
115
115
|
inputComponent: IntegerInput
|
|
116
116
|
})));
|
package/dist-es/menu.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ESC, TAB } from './utils/key-codes';
|
|
4
|
-
import Overlay from './overlay';
|
|
5
4
|
import { createUseStyles } from './jss';
|
|
6
5
|
import { cancelEvent } from './utils/dom';
|
|
6
|
+
import Overlay from './overlay';
|
|
7
7
|
function _arrayWithHoles(arr) {
|
|
8
8
|
if (Array.isArray(arr)) return arr;
|
|
9
9
|
}
|
|
@@ -69,6 +69,7 @@ var useStyles = createUseStyles(function(param) {
|
|
|
69
69
|
var colors = param.colors;
|
|
70
70
|
return {
|
|
71
71
|
menuContainer: {
|
|
72
|
+
zIndex: 12,
|
|
72
73
|
margin: 0,
|
|
73
74
|
padding: 0,
|
|
74
75
|
listStyleType: 'none',
|
|
@@ -77,13 +78,17 @@ var useStyles = createUseStyles(function(param) {
|
|
|
77
78
|
var itemsComputedProps = param.itemsComputedProps;
|
|
78
79
|
return itemsComputedProps.top;
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
+
bottom: function(param) {
|
|
82
|
+
var itemsComputedProps = param.itemsComputedProps;
|
|
83
|
+
return itemsComputedProps.bottom;
|
|
84
|
+
},
|
|
85
|
+
right: function(param) {
|
|
81
86
|
var itemsComputedProps = param.itemsComputedProps;
|
|
82
|
-
return itemsComputedProps.
|
|
87
|
+
return itemsComputedProps.right;
|
|
83
88
|
},
|
|
84
89
|
width: function(param) {
|
|
85
|
-
var
|
|
86
|
-
return width !== null && width !== void 0 ? width :
|
|
90
|
+
var width = param.width;
|
|
91
|
+
return width !== null && width !== void 0 ? width : '100%';
|
|
87
92
|
},
|
|
88
93
|
borderRadius: 4,
|
|
89
94
|
boxShadow: '0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)',
|
|
@@ -124,28 +129,27 @@ var Menu = function(param) {
|
|
|
124
129
|
return;
|
|
125
130
|
}
|
|
126
131
|
var MARGIN_THRESHOLD = 12;
|
|
127
|
-
var topTarget = targetRect.top, widthTarget = targetRect.width,
|
|
132
|
+
var topTarget = targetRect.top, widthTarget = targetRect.width, height = targetRect.height;
|
|
128
133
|
var top = topTarget + height;
|
|
129
134
|
var ref;
|
|
130
135
|
var spaceTaken = (ref = parseInt(window.getComputedStyle(menu).getPropertyValue('height'))) !== null && ref !== void 0 ? ref : 0;
|
|
131
|
-
var
|
|
136
|
+
var rightDirection = position === 'left' ? 'auto' : "calc(100% - ".concat(widthTarget, "px)");
|
|
132
137
|
// if it doesn't fit on bottom
|
|
133
138
|
if (top + spaceTaken + MARGIN_THRESHOLD > window.innerHeight) {
|
|
134
139
|
var availableSpaceBottom = window.innerHeight - top;
|
|
135
140
|
if (topTarget /* this is the available space on top */ > availableSpaceBottom) {
|
|
136
|
-
var newTop = topTarget - spaceTaken;
|
|
137
141
|
setItemsComputedProps({
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
top:
|
|
141
|
-
maxHeight: topTarget
|
|
142
|
+
right: rightDirection,
|
|
143
|
+
bottom: '100%',
|
|
144
|
+
top: 'auto',
|
|
145
|
+
maxHeight: Math.min(topTarget, MAX_HEIGHT_DEFAULT),
|
|
142
146
|
transformOrigin: 'center bottom'
|
|
143
147
|
});
|
|
144
148
|
} else {
|
|
145
149
|
setItemsComputedProps({
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
150
|
+
top: '100%',
|
|
151
|
+
bottom: 'auto',
|
|
152
|
+
right: rightDirection,
|
|
149
153
|
maxHeight: Math.min(window.innerHeight - top - MARGIN_THRESHOLD, MAX_HEIGHT_DEFAULT),
|
|
150
154
|
transformOrigin: 'center top'
|
|
151
155
|
});
|
|
@@ -153,9 +157,9 @@ var Menu = function(param) {
|
|
|
153
157
|
} else {
|
|
154
158
|
// if it fits on bottom
|
|
155
159
|
setItemsComputedProps({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
160
|
+
top: '100%',
|
|
161
|
+
bottom: 'auto',
|
|
162
|
+
right: rightDirection,
|
|
159
163
|
maxHeight: Math.min(window.innerHeight - top - MARGIN_THRESHOLD, MAX_HEIGHT_DEFAULT),
|
|
160
164
|
transformOrigin: 'center top'
|
|
161
165
|
});
|
|
@@ -223,20 +227,23 @@ var Menu = function(param) {
|
|
|
223
227
|
document.removeEventListener('keydown', handleKeyDown, false);
|
|
224
228
|
};
|
|
225
229
|
});
|
|
226
|
-
return(/*#__PURE__*/ _jsxs(
|
|
230
|
+
return(/*#__PURE__*/ _jsxs("div", {
|
|
231
|
+
style: {
|
|
232
|
+
position: 'relative'
|
|
233
|
+
},
|
|
227
234
|
children: [
|
|
228
|
-
renderTarget(_objectSpread({
|
|
229
|
-
}, targetProps, {
|
|
230
|
-
isMenuOpen: isMenuOpen
|
|
231
|
-
})),
|
|
232
235
|
isMenuOpen ? /*#__PURE__*/ _jsx(Overlay, {
|
|
233
236
|
onPress: function(e) {
|
|
234
|
-
setIsMenuOpen(false);
|
|
235
237
|
cancelEvent(e);
|
|
238
|
+
setIsMenuOpen(false);
|
|
236
239
|
},
|
|
237
|
-
disableScroll: true
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
disableScroll: true
|
|
241
|
+
}) : null,
|
|
242
|
+
renderTarget(_objectSpread({
|
|
243
|
+
}, targetProps, {
|
|
244
|
+
isMenuOpen: isMenuOpen
|
|
245
|
+
})),
|
|
246
|
+
isMenuOpen ? renderMenu(menuProps) : null
|
|
240
247
|
]
|
|
241
248
|
}));
|
|
242
249
|
};
|
package/dist-es/month-field.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useFieldProps } from './form-context';
|
|
4
|
-
import
|
|
4
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
5
5
|
import { isInputTypeSupported } from './utils/dom';
|
|
6
6
|
import { isServerSide } from './utils/environment';
|
|
7
7
|
import IconCalendarRegular from './generated/mistica-icons/icon-calendar-regular';
|
|
@@ -113,7 +113,7 @@ var DateField = function(_param) {
|
|
|
113
113
|
onChange: onChange,
|
|
114
114
|
onChangeValue: onChangeValue
|
|
115
115
|
});
|
|
116
|
-
var nativePicker = /*#__PURE__*/ _jsx(
|
|
116
|
+
var nativePicker = /*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, _objectSpread({
|
|
117
117
|
}, rest, fieldProps, {
|
|
118
118
|
min: min ? getLocalYearMonthString(min) : undefined,
|
|
119
119
|
max: max ? getLocalYearMonthString(max) : undefined,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
|
|
2
|
-
export var PACKAGE_VERSION = '10.
|
|
2
|
+
export var PACKAGE_VERSION = '10.20.0';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useFieldProps } from './form-context';
|
|
4
|
-
import
|
|
4
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
5
5
|
import { useTheme } from './hooks';
|
|
6
6
|
import IconButton from './icon-button';
|
|
7
7
|
import Visibility from './icons/icon-visibility';
|
|
@@ -174,7 +174,7 @@ var PasswordField = function(_param) {
|
|
|
174
174
|
onChange: onChange,
|
|
175
175
|
onChangeValue: onChangeValue
|
|
176
176
|
});
|
|
177
|
-
return(/*#__PURE__*/ _jsx(
|
|
177
|
+
return(/*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, _objectSpread({
|
|
178
178
|
}, rest, fieldProps, {
|
|
179
179
|
type: isVisible ? 'text' : 'password',
|
|
180
180
|
inputRef: function(field) {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useRifm } from 'rifm';
|
|
4
4
|
import { formatAsYouType, formatToE164, parse, getRegionCodeForCountryCode } from '@telefonica/libphonenumber';
|
|
5
5
|
import { useFieldProps } from './form-context';
|
|
6
|
-
import
|
|
6
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
7
7
|
import { useTheme } from './hooks';
|
|
8
8
|
import { createChangeEvent } from './utils/dom';
|
|
9
9
|
import { combineRefs } from './utils/common';
|
|
@@ -199,7 +199,7 @@ var PhoneNumberField = function(_param) {
|
|
|
199
199
|
onChange: onChange,
|
|
200
200
|
onChangeValue: onChangeValue
|
|
201
201
|
});
|
|
202
|
-
return(/*#__PURE__*/ _jsx(
|
|
202
|
+
return(/*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, _objectSpread({
|
|
203
203
|
}, rest, fieldProps, {
|
|
204
204
|
type: "phone",
|
|
205
205
|
inputProps: {
|
package/dist-es/search-field.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useFieldProps } from './form-context';
|
|
4
|
-
import
|
|
4
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
5
5
|
import IconSearch from './icons/icon-search';
|
|
6
6
|
import IconCloseRegular from './generated/mistica-icons/icon-close-regular';
|
|
7
7
|
import IconButton from './icon-button';
|
|
@@ -139,7 +139,7 @@ var SearchField = function(_param) {
|
|
|
139
139
|
onChange: onChange,
|
|
140
140
|
onChangeValue: handleChangeValue
|
|
141
141
|
});
|
|
142
|
-
return(/*#__PURE__*/ _jsx(
|
|
142
|
+
return(/*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, _objectSpread({
|
|
143
143
|
ref: inputRef,
|
|
144
144
|
startIcon: /*#__PURE__*/ _jsx(IconSearch, {
|
|
145
145
|
}),
|
package/dist-es/select.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useAriaId, useTheme } from './hooks';
|
|
|
5
5
|
import { DOWN, ENTER, ESC, SPACE, TAB, UP } from './utils/key-codes';
|
|
6
6
|
import { FieldContainer, HelperText, Label } from './text-field-components';
|
|
7
7
|
import ChevronDownRegular from './generated/mistica-icons/icon-chevron-down-regular';
|
|
8
|
-
import
|
|
8
|
+
import { TextFieldBaseAutosuggest } from './text-field-base';
|
|
9
9
|
import Overlay from './overlay';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { isAndroid, isIos } from './utils/platform';
|
|
@@ -515,7 +515,7 @@ var Select = function(param) {
|
|
|
515
515
|
ref: focusableRef
|
|
516
516
|
}, !disabled && containerActiveProps, {
|
|
517
517
|
children: [
|
|
518
|
-
/*#__PURE__*/ _jsx(
|
|
518
|
+
/*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, {
|
|
519
519
|
style: {
|
|
520
520
|
visibility: 'hidden'
|
|
521
521
|
},
|
package/dist-es/skins/blau.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { applyAlpha } from '../utils/color';
|
|
2
2
|
import { BLAU_SKIN } from './constants';
|
|
3
|
+
// https://github.com/Telefonica/mistica-design/blob/production/tokens/blau-constants.json
|
|
4
|
+
// https://github.com/Telefonica/mistica-design/blob/production/tokens/blau-skin-schema.json
|
|
3
5
|
export var palette = {
|
|
4
6
|
blauBluePrimary: '#00B6F1',
|
|
5
7
|
blauBluePrimary10: '#F7FDFF',
|
|
@@ -15,16 +17,19 @@ export var palette = {
|
|
|
15
17
|
blauPurple30: '#BB89D9',
|
|
16
18
|
blauYellow: '#FFA922',
|
|
17
19
|
blauYellow10: '#FFF6E9',
|
|
20
|
+
blauYellow40: '#FFC364',
|
|
18
21
|
blauYellow60: '#F09500',
|
|
19
22
|
blauYellow70: '#996614',
|
|
23
|
+
blauGreen: '#30D300',
|
|
24
|
+
blauGreen10: '#EAFBE5',
|
|
25
|
+
blauGreen30: '#97E980',
|
|
26
|
+
blauGreen70: '#1D7F00',
|
|
20
27
|
blauRed: '#F64417',
|
|
21
28
|
blauRed10: '#FEECE8',
|
|
22
29
|
blauRed20: '#FCC7B9',
|
|
23
30
|
blauRed30: '#FA9E87',
|
|
31
|
+
blauRed40: '#F97C5D',
|
|
24
32
|
blauRed70: '#C93712',
|
|
25
|
-
blauGreen: '#30D300',
|
|
26
|
-
blauGreen10: '#EAFBE5',
|
|
27
|
-
blauGreen70: '#1D7F00',
|
|
28
33
|
grey1: '#F5F9FA',
|
|
29
34
|
grey2: '#E7E7E7',
|
|
30
35
|
grey3: '#B8B8B8',
|
|
@@ -126,7 +131,20 @@ export var getBlauSkin = function() {
|
|
|
126
131
|
textNavigationSearchBarHint: palette.blauBlueSecondary20,
|
|
127
132
|
textNavigationSearchBarText: palette.white,
|
|
128
133
|
textAppBar: palette.grey5,
|
|
129
|
-
textAppBarSelected: palette.blauBlueSecondary60
|
|
134
|
+
textAppBarSelected: palette.blauBlueSecondary60,
|
|
135
|
+
// TAGS
|
|
136
|
+
tagBackgroundSuccess: palette.blauGreen10,
|
|
137
|
+
tagBackgroundWarning: palette.blauYellow10,
|
|
138
|
+
tagBackgroundError: palette.blauRed10,
|
|
139
|
+
tagBackgroundPromo: palette.blauPurple10,
|
|
140
|
+
tagBackgroundActive: palette.blauBlueSecondary10,
|
|
141
|
+
tagBackgroundInactive: palette.grey2,
|
|
142
|
+
textTagSuccess: palette.blauGreen70,
|
|
143
|
+
textTagWarning: palette.blauYellow70,
|
|
144
|
+
textTagError: palette.blauRed70,
|
|
145
|
+
textTagPromo: palette.blauPurple,
|
|
146
|
+
textTagActive: palette.blauBlueSecondary,
|
|
147
|
+
textTagInactive: palette.grey5
|
|
130
148
|
},
|
|
131
149
|
darkModeColors: {
|
|
132
150
|
// BACKGROUNDS
|
|
@@ -188,7 +206,20 @@ export var getBlauSkin = function() {
|
|
|
188
206
|
textNavigationSearchBarHint: palette.grey4,
|
|
189
207
|
textNavigationSearchBarText: palette.grey2,
|
|
190
208
|
textAppBar: palette.grey5,
|
|
191
|
-
textAppBarSelected: palette.grey2
|
|
209
|
+
textAppBarSelected: palette.grey2,
|
|
210
|
+
// TAGS
|
|
211
|
+
tagBackgroundSuccess: applyAlpha(palette.white, 0.05),
|
|
212
|
+
tagBackgroundWarning: applyAlpha(palette.white, 0.05),
|
|
213
|
+
tagBackgroundError: applyAlpha(palette.white, 0.05),
|
|
214
|
+
tagBackgroundPromo: applyAlpha(palette.white, 0.05),
|
|
215
|
+
tagBackgroundActive: applyAlpha(palette.white, 0.05),
|
|
216
|
+
tagBackgroundInactive: applyAlpha(palette.white, 0.05),
|
|
217
|
+
textTagSuccess: palette.blauGreen30,
|
|
218
|
+
textTagWarning: palette.blauYellow40,
|
|
219
|
+
textTagError: palette.blauRed40,
|
|
220
|
+
textTagPromo: palette.blauPurple30,
|
|
221
|
+
textTagActive: palette.blauBluePrimary30,
|
|
222
|
+
textTagInactive: palette.grey4
|
|
192
223
|
}
|
|
193
224
|
};
|
|
194
225
|
};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import { applyAlpha } from '../utils/color';
|
|
2
2
|
import { MOVISTAR_SKIN } from './constants';
|
|
3
|
+
// https://github.com/Telefonica/mistica-design/blob/production/tokens/movistar-skin-schema.json
|
|
4
|
+
// https://github.com/Telefonica/mistica-design/blob/production/tokens/movistar-constants.json
|
|
3
5
|
export var palette = {
|
|
4
6
|
movistarBlue: '#019DF4',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
movistarBlue10: '#E6F5FD',
|
|
8
|
+
movistarBlue20: '#B3E1FB',
|
|
9
|
+
movistarBlue30: '#80CEF9',
|
|
10
|
+
movistarBlue40: '#4DBAF7',
|
|
11
|
+
movistarBlue55: '#008EDD',
|
|
9
12
|
movistarGreen: '#5CB615',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
movistarGreen10: '#EFF8E8',
|
|
14
|
+
movistarGreen30: '#ADDA8A',
|
|
15
|
+
movistarGreen40: '#8DCC5B',
|
|
16
|
+
movistarGreen60: '#499110',
|
|
17
|
+
movistarGreen70: '#407F0F',
|
|
13
18
|
pepper: '#FF374A',
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
pepper10: '#FFEBED',
|
|
20
|
+
pepper20: '#FFC3C8',
|
|
21
|
+
pepper40: '#FF7380',
|
|
22
|
+
pepper55: '#D73241',
|
|
23
|
+
pepper70: '#B22634',
|
|
16
24
|
egg: '#F28D15',
|
|
17
|
-
|
|
25
|
+
egg10: '#FEF4E8',
|
|
26
|
+
egg40: '#F6AF5B',
|
|
27
|
+
egg80: '#6D3F09',
|
|
18
28
|
pink: '#E63780',
|
|
19
29
|
purple: '#A13EA1',
|
|
30
|
+
purple10: '#F6ECF6',
|
|
31
|
+
purple40: '#BD78BD',
|
|
32
|
+
purple70: '#712B71',
|
|
20
33
|
grey1: '#F6F6F6',
|
|
21
34
|
grey2: '#EEEEEE',
|
|
22
35
|
grey3: '#DDDDDD',
|
|
@@ -31,8 +44,7 @@ export var palette = {
|
|
|
31
44
|
movistarProminentBlueLight70: '#546874',
|
|
32
45
|
// specific for dark mode:
|
|
33
46
|
darkModeBlack: '#191919',
|
|
34
|
-
darkModeGrey: '#242424'
|
|
35
|
-
darkModeMovistarBlueDark: '#4C7389'
|
|
47
|
+
darkModeGrey: '#242424'
|
|
36
48
|
};
|
|
37
49
|
export var getMovistarSkin = function(variant) {
|
|
38
50
|
var skin = {
|
|
@@ -45,7 +57,7 @@ export var getMovistarSkin = function(variant) {
|
|
|
45
57
|
backgroundBrand: palette.movistarBlue,
|
|
46
58
|
backgroundOverlay: applyAlpha(palette.grey6, 0.6),
|
|
47
59
|
backgroundSkeleton: palette.grey1,
|
|
48
|
-
backgroundSkeletonInverse: palette.
|
|
60
|
+
backgroundSkeletonInverse: palette.movistarBlue55,
|
|
49
61
|
navigationBarBackground: palette.movistarBlue,
|
|
50
62
|
backgroundAlternative: palette.grey1,
|
|
51
63
|
backgroundFeedbackBottom: palette.movistarBlue,
|
|
@@ -57,50 +69,50 @@ export var getMovistarSkin = function(variant) {
|
|
|
57
69
|
borderSelected: palette.movistarGreen,
|
|
58
70
|
// BUTTONS
|
|
59
71
|
buttonDangerBackground: palette.pepper,
|
|
60
|
-
buttonDangerBackgroundSelected: palette.
|
|
61
|
-
buttonDangerBackgroundHover: palette.
|
|
62
|
-
buttonLinkBackgroundSelected: palette.
|
|
72
|
+
buttonDangerBackgroundSelected: palette.pepper55,
|
|
73
|
+
buttonDangerBackgroundHover: palette.pepper55,
|
|
74
|
+
buttonLinkBackgroundSelected: palette.movistarBlue10,
|
|
63
75
|
buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
|
|
64
76
|
buttonPrimaryBackground: palette.movistarGreen,
|
|
65
77
|
buttonPrimaryBackgroundInverse: palette.white,
|
|
66
|
-
buttonPrimaryBackgroundSelected: palette.
|
|
67
|
-
buttonPrimaryBackgroundHover: palette.
|
|
68
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
78
|
+
buttonPrimaryBackgroundSelected: palette.movistarGreen60,
|
|
79
|
+
buttonPrimaryBackgroundHover: palette.movistarGreen60,
|
|
80
|
+
buttonPrimaryBackgroundSelectedInverse: palette.movistarBlue30,
|
|
69
81
|
buttonSecondaryBackground: palette.movistarGreen,
|
|
70
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
82
|
+
buttonSecondaryBackgroundSelected: palette.movistarGreen60,
|
|
71
83
|
buttonSecondaryBorderInverse: palette.white,
|
|
72
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
84
|
+
buttonSecondaryBorderSelectedInverse: palette.movistarBlue30,
|
|
73
85
|
textButtonPrimary: palette.white,
|
|
74
86
|
textButtonPrimaryInverse: palette.movistarBlue,
|
|
75
87
|
textButtonPrimaryInverseSelected: palette.movistarBlue,
|
|
76
88
|
textButtonSecondary: palette.movistarGreen,
|
|
77
|
-
textButtonSecondarySelected: palette.
|
|
89
|
+
textButtonSecondarySelected: palette.movistarGreen60,
|
|
78
90
|
textButtonSecondaryInverse: palette.white,
|
|
79
91
|
textButtonSecondaryInverseSelected: palette.white,
|
|
80
92
|
textLink: palette.movistarBlue,
|
|
81
93
|
textLinkInverse: palette.white,
|
|
82
94
|
textLinkDanger: palette.pepper,
|
|
83
|
-
textLinkSnackbar: palette.
|
|
95
|
+
textLinkSnackbar: palette.movistarBlue30,
|
|
84
96
|
// CONTROLS
|
|
85
97
|
control: palette.grey3,
|
|
86
98
|
controlActivated: palette.movistarBlue,
|
|
87
99
|
controlError: palette.pepper,
|
|
88
|
-
loadingBar: palette.
|
|
89
|
-
loadingBarBackground: palette.
|
|
100
|
+
loadingBar: palette.movistarBlue30,
|
|
101
|
+
loadingBarBackground: palette.movistarBlue55,
|
|
90
102
|
toggleAndroidInactive: palette.grey2,
|
|
91
|
-
toggleAndroidBackgroundActive: palette.
|
|
103
|
+
toggleAndroidBackgroundActive: palette.movistarBlue20,
|
|
92
104
|
iosControlKnob: palette.white,
|
|
93
105
|
// DIVIDERS
|
|
94
106
|
divider: palette.grey2,
|
|
95
|
-
dividerInverse: palette.
|
|
107
|
+
dividerInverse: palette.movistarBlue55,
|
|
96
108
|
navigationBarDivider: palette.movistarBlue,
|
|
97
109
|
// FEEDBACKS
|
|
98
|
-
badge: palette.
|
|
110
|
+
badge: palette.pepper55,
|
|
99
111
|
feedbackErrorBackground: palette.pepper,
|
|
100
112
|
feedbackInfoBackground: palette.grey6,
|
|
101
113
|
// GLOBAL
|
|
102
114
|
brand: palette.movistarBlue,
|
|
103
|
-
brandDark: palette.
|
|
115
|
+
brandDark: palette.movistarBlue55,
|
|
104
116
|
inverse: palette.white,
|
|
105
117
|
neutralHigh: palette.grey6,
|
|
106
118
|
neutralMedium: palette.grey5,
|
|
@@ -118,11 +130,24 @@ export var getMovistarSkin = function(variant) {
|
|
|
118
130
|
warning: palette.egg,
|
|
119
131
|
// BARS TEXTS
|
|
120
132
|
textNavigationBarPrimary: palette.white,
|
|
121
|
-
textNavigationBarSecondary: palette.
|
|
122
|
-
textNavigationSearchBarHint: palette.
|
|
133
|
+
textNavigationBarSecondary: palette.movistarBlue20,
|
|
134
|
+
textNavigationSearchBarHint: palette.movistarBlue20,
|
|
123
135
|
textNavigationSearchBarText: palette.white,
|
|
124
136
|
textAppBar: palette.grey4,
|
|
125
|
-
textAppBarSelected: palette.movistarBlue
|
|
137
|
+
textAppBarSelected: palette.movistarBlue,
|
|
138
|
+
// TAGS
|
|
139
|
+
tagBackgroundSuccess: palette.movistarGreen10,
|
|
140
|
+
tagBackgroundWarning: palette.egg10,
|
|
141
|
+
tagBackgroundError: palette.pepper10,
|
|
142
|
+
tagBackgroundPromo: palette.purple10,
|
|
143
|
+
tagBackgroundActive: palette.movistarBlue10,
|
|
144
|
+
tagBackgroundInactive: palette.grey1,
|
|
145
|
+
textTagSuccess: palette.movistarGreen70,
|
|
146
|
+
textTagWarning: palette.egg80,
|
|
147
|
+
textTagError: palette.pepper70,
|
|
148
|
+
textTagPromo: palette.purple70,
|
|
149
|
+
textTagActive: palette.movistarBlue,
|
|
150
|
+
textTagInactive: palette.grey5
|
|
126
151
|
},
|
|
127
152
|
darkModeColors: {
|
|
128
153
|
brand: palette.movistarBlue,
|
|
@@ -143,13 +168,13 @@ export var getMovistarSkin = function(variant) {
|
|
|
143
168
|
buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
|
|
144
169
|
buttonPrimaryBackground: palette.movistarGreen,
|
|
145
170
|
buttonPrimaryBackgroundInverse: palette.movistarGreen,
|
|
146
|
-
buttonPrimaryBackgroundSelected: palette.
|
|
147
|
-
buttonPrimaryBackgroundHover: palette.
|
|
148
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
171
|
+
buttonPrimaryBackgroundSelected: palette.movistarGreen60,
|
|
172
|
+
buttonPrimaryBackgroundHover: palette.movistarGreen60,
|
|
173
|
+
buttonPrimaryBackgroundSelectedInverse: palette.movistarGreen60,
|
|
149
174
|
buttonSecondaryBackground: palette.movistarGreen,
|
|
150
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
175
|
+
buttonSecondaryBackgroundSelected: palette.movistarGreen60,
|
|
151
176
|
buttonSecondaryBorderInverse: palette.movistarGreen,
|
|
152
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
177
|
+
buttonSecondaryBorderSelectedInverse: palette.movistarGreen60,
|
|
153
178
|
textButtonPrimary: palette.grey2,
|
|
154
179
|
textButtonPrimaryInverse: palette.grey2,
|
|
155
180
|
textButtonPrimaryInverseSelected: palette.grey2,
|
|
@@ -164,7 +189,7 @@ export var getMovistarSkin = function(variant) {
|
|
|
164
189
|
loadingBar: palette.movistarBlue,
|
|
165
190
|
loadingBarBackground: applyAlpha(palette.white, 0.05),
|
|
166
191
|
toggleAndroidInactive: palette.grey4,
|
|
167
|
-
toggleAndroidBackgroundActive: palette.
|
|
192
|
+
toggleAndroidBackgroundActive: palette.movistarBlue20,
|
|
168
193
|
iosControlKnob: palette.grey2,
|
|
169
194
|
divider: applyAlpha(palette.white, 0.05),
|
|
170
195
|
dividerInverse: applyAlpha(palette.white, 0.05),
|
|
@@ -178,13 +203,26 @@ export var getMovistarSkin = function(variant) {
|
|
|
178
203
|
textPrimaryInverse: palette.grey2,
|
|
179
204
|
textSecondary: palette.grey4,
|
|
180
205
|
textSecondaryInverse: palette.grey4,
|
|
181
|
-
textAmount: palette.
|
|
206
|
+
textAmount: palette.movistarBlue30,
|
|
182
207
|
textNavigationBarPrimary: palette.grey2,
|
|
183
208
|
textNavigationBarSecondary: palette.grey4,
|
|
184
209
|
textNavigationSearchBarHint: palette.grey4,
|
|
185
210
|
textNavigationSearchBarText: palette.grey2,
|
|
186
211
|
textAppBar: palette.grey5,
|
|
187
|
-
textAppBarSelected: palette.grey2
|
|
212
|
+
textAppBarSelected: palette.grey2,
|
|
213
|
+
// TAGS
|
|
214
|
+
tagBackgroundSuccess: applyAlpha(palette.white, 0.05),
|
|
215
|
+
tagBackgroundWarning: applyAlpha(palette.white, 0.05),
|
|
216
|
+
tagBackgroundError: applyAlpha(palette.white, 0.05),
|
|
217
|
+
tagBackgroundPromo: applyAlpha(palette.white, 0.05),
|
|
218
|
+
tagBackgroundActive: applyAlpha(palette.white, 0.05),
|
|
219
|
+
tagBackgroundInactive: applyAlpha(palette.white, 0.05),
|
|
220
|
+
textTagSuccess: palette.movistarGreen40,
|
|
221
|
+
textTagWarning: palette.egg40,
|
|
222
|
+
textTagError: palette.pepper40,
|
|
223
|
+
textTagPromo: palette.purple40,
|
|
224
|
+
textTagActive: palette.movistarBlue40,
|
|
225
|
+
textTagInactive: palette.grey4
|
|
188
226
|
}
|
|
189
227
|
};
|
|
190
228
|
if (variant === 'prominent') {
|