@telefonica/mistica 10.1.0 → 10.4.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/README.md +2 -2
- package/dist/card.d.ts +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.flow +1 -1
- package/dist/icon-button.js +4 -6
- package/dist/list.js +9 -14
- package/dist/navigation-bar.d.ts +1 -0
- package/dist/navigation-bar.js +89 -95
- package/dist/navigation-bar.js.flow +1 -0
- package/dist/password-field.js +16 -8
- package/dist/select.js +67 -63
- 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 +1 -1
- package/dist/skins/vivo.js +1 -1
- package/dist/tabs.js +10 -8
- package/dist/text-field-base.js +60 -46
- package/dist/text-field-components.d.ts +1 -0
- package/dist/text-field-components.js +18 -9
- package/dist/text-field-components.js.flow +1 -0
- package/dist/text-link.js +20 -23
- package/dist/theme-context-provider.js +2 -2
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js.flow +1 -0
- package/dist/utils/media-queries.d.ts +1 -0
- package/dist/utils/media-queries.js +6 -1
- package/dist/utils/media-queries.js.flow +1 -0
- package/dist-es/card.js +1 -1
- package/dist-es/icon-button.js +4 -5
- package/dist-es/list.js +9 -14
- package/dist-es/navigation-bar.js +89 -95
- package/dist-es/password-field.js +16 -8
- package/dist-es/select.js +67 -63
- 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 +1 -1
- package/dist-es/skins/vivo.js +1 -1
- package/dist-es/tabs.js +10 -8
- package/dist-es/text-field-base.js +60 -46
- package/dist-es/text-field-components.js +18 -9
- package/dist-es/text-link.js +7 -10
- package/dist-es/theme-context-provider.js +2 -2
- package/dist-es/utils/media-queries.js +6 -1
- package/package.json +1 -1
package/dist/text-link.js
CHANGED
|
@@ -43,21 +43,6 @@ function _extends() {
|
|
|
43
43
|
return _extends.apply(this, arguments);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function _defineProperty(obj, key, value) {
|
|
47
|
-
if (key in obj) {
|
|
48
|
-
Object.defineProperty(obj, key, {
|
|
49
|
-
value: value,
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
obj[key] = value;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return obj;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
46
|
function _objectWithoutProperties(source, excluded) {
|
|
62
47
|
if (source == null) return {};
|
|
63
48
|
|
|
@@ -94,22 +79,34 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
94
79
|
return target;
|
|
95
80
|
}
|
|
96
81
|
|
|
82
|
+
function _defineProperty(obj, key, value) {
|
|
83
|
+
if (key in obj) {
|
|
84
|
+
Object.defineProperty(obj, key, {
|
|
85
|
+
value: value,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true
|
|
89
|
+
});
|
|
90
|
+
} else {
|
|
91
|
+
obj[key] = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
97
|
var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
98
98
|
return {
|
|
99
|
-
textLink: {
|
|
99
|
+
textLink: _defineProperty({
|
|
100
100
|
width: 'auto',
|
|
101
101
|
lineHeight: 'inherit',
|
|
102
102
|
display: 'inline-block',
|
|
103
103
|
color: theme.colors.textLink,
|
|
104
|
-
wordBreak: 'break-word'
|
|
104
|
+
wordBreak: 'break-word'
|
|
105
|
+
}, theme.mq.supportsHover, {
|
|
105
106
|
'&:hover': {
|
|
106
|
-
textDecoration: 'underline'
|
|
107
|
-
// Revert hover effect in touch devices
|
|
108
|
-
'@media (pointer: coarse)': {
|
|
109
|
-
textDecoration: 'initial'
|
|
110
|
-
}
|
|
107
|
+
textDecoration: 'underline'
|
|
111
108
|
}
|
|
112
|
-
},
|
|
109
|
+
}),
|
|
113
110
|
inverse: {
|
|
114
111
|
color: theme.colors.textLinkInverse
|
|
115
112
|
},
|
|
@@ -227,7 +227,7 @@ var ThemeContextProvider = function ThemeContextProvider(_ref) {
|
|
|
227
227
|
}, []);
|
|
228
228
|
var isOsDarkModeEnabled = useIsOsDarkModeEnabled();
|
|
229
229
|
var contextTheme = React.useMemo(function () {
|
|
230
|
-
var _theme$colorScheme, _theme$Link; // TODO: In next major version we could change this to "auto" by default
|
|
230
|
+
var _theme$colorScheme, _theme$mediaQueries, _theme$Link; // TODO: In next major version we could change this to "auto" by default
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
var colorScheme = (_theme$colorScheme = theme.colorScheme) !== null && _theme$colorScheme !== void 0 ? _theme$colorScheme : 'light';
|
|
@@ -254,7 +254,7 @@ var ThemeContextProvider = function ThemeContextProvider(_ref) {
|
|
|
254
254
|
}
|
|
255
255
|
}, theme.analytics),
|
|
256
256
|
dimensions: _objectSpread(_objectSpread({}, _theme.dimensions), theme.dimensions),
|
|
257
|
-
mq:
|
|
257
|
+
mq: (0, _mediaQueries.createMediaQueries)((_theme$mediaQueries = theme.mediaQueries) !== null && _theme$mediaQueries !== void 0 ? _theme$mediaQueries : _theme.mediaQueriesConfig),
|
|
258
258
|
colors: colors,
|
|
259
259
|
Link: (_theme$Link = theme.Link) !== null && _theme$Link !== void 0 ? _theme$Link : _theme.AnchorLink,
|
|
260
260
|
isDarkMode: isDarkModeEnabled,
|
package/dist/theme.d.ts
CHANGED
package/dist/theme.js.flow
CHANGED
|
@@ -17,7 +17,12 @@ var createMediaQueries = function createMediaQueries(_ref) {
|
|
|
17
17
|
largeDesktop: "@media only screen " + "and (min-height: ".concat(desktopOrTabletMinHeight, "px) ") + "and (min-width: ".concat(largeDesktopMinWidth, "px)"),
|
|
18
18
|
tabletOrBigger: "@media only screen " + "and (min-height: ".concat(desktopOrTabletMinHeight, "px) ") + "and (min-width: ".concat(tabletMinWidth, "px)"),
|
|
19
19
|
tabletOrSmaller: "@media only screen and (max-width: ".concat(desktopMinWidth - 1, "px), ") + "(max-height: ".concat(desktopOrTabletMinHeight - 1, "px)"),
|
|
20
|
-
desktopOrBigger: "@media only screen " + "and (min-height: ".concat(desktopOrTabletMinHeight, "px) ") + "and (min-width: ".concat(desktopMinWidth, "px)")
|
|
20
|
+
desktopOrBigger: "@media only screen " + "and (min-height: ".concat(desktopOrTabletMinHeight, "px) ") + "and (min-width: ".concat(desktopMinWidth, "px)"),
|
|
21
|
+
// Only apply hover effect to user agents using fine pointer devices (a mouse, for example)
|
|
22
|
+
// Also enabled for (pointer: none) for acceptance tests, where (pointer: fine) doesn't match.
|
|
23
|
+
// WARNING: you may be tempted to use @media (hover: hover) instead, but that doesn't work as expected in some android browsers.
|
|
24
|
+
// See: https://hover-pointer-media-query.glitch.me/ and https://github.com/mui-org/material-ui/issues/15736
|
|
25
|
+
supportsHover: '@media (pointer: fine), (pointer: none)'
|
|
21
26
|
};
|
|
22
27
|
};
|
|
23
28
|
|
package/dist-es/card.js
CHANGED
|
@@ -67,7 +67,7 @@ var CardContent = function CardContent(_ref2) {
|
|
|
67
67
|
regular: true
|
|
68
68
|
}, title), /*#__PURE__*/React.createElement(Text2, {
|
|
69
69
|
regular: true
|
|
70
|
-
}, subtitle))), /*#__PURE__*/React.createElement(Text2, {
|
|
70
|
+
}, subtitle))), description && /*#__PURE__*/React.createElement(Text2, {
|
|
71
71
|
as: "p",
|
|
72
72
|
regular: true,
|
|
73
73
|
color: theme.colors.textSecondary
|
package/dist-es/icon-button.js
CHANGED
|
@@ -8,7 +8,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8
8
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import Touchable from './touchable';
|
|
11
|
-
import { getPrefixedDataAttributes } from './utils/dom';
|
|
12
11
|
var ICON_SIZE_1 = 24;
|
|
13
12
|
|
|
14
13
|
var getButtonStyle = function getButtonStyle(backgroundUrl, size, backgroundColor, iconSize, disabled) {
|
|
@@ -51,14 +50,14 @@ var IconButton = function IconButton(props) {
|
|
|
51
50
|
iconSize = props.iconSize,
|
|
52
51
|
_props$size = props.size,
|
|
53
52
|
size = _props$size === void 0 ? ICON_SIZE_1 : _props$size;
|
|
54
|
-
|
|
55
|
-
var commonProps = _objectSpread({
|
|
53
|
+
var commonProps = {
|
|
56
54
|
className: props.className || '',
|
|
57
55
|
disabled: props.disabled,
|
|
58
56
|
style: _objectSpread(_objectSpread({}, getButtonStyle(icon, size, backgroundColor, iconSize, props.disabled)), props.style),
|
|
59
57
|
trackingEvent: props.trackingEvent,
|
|
60
|
-
'aria-live': props['aria-live']
|
|
61
|
-
|
|
58
|
+
'aria-live': props['aria-live'],
|
|
59
|
+
dataAttributes: props.dataAttributes
|
|
60
|
+
};
|
|
62
61
|
|
|
63
62
|
if (props.href) {
|
|
64
63
|
return /*#__PURE__*/React.createElement(Touchable, _extends({}, commonProps, {
|
package/dist-es/list.js
CHANGED
|
@@ -38,22 +38,17 @@ import { Boxed } from './boxed';
|
|
|
38
38
|
import Divider from './divider';
|
|
39
39
|
import { getPrefixedDataAttributes } from './utils/dom';
|
|
40
40
|
var useStyles = createUseStyles(function (_ref) {
|
|
41
|
-
var colors = _ref.colors
|
|
41
|
+
var colors = _ref.colors,
|
|
42
|
+
mq = _ref.mq;
|
|
42
43
|
return {
|
|
43
|
-
hover: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'@media (pointer: fine), (pointer: none)': {
|
|
49
|
-
'&:hover': {
|
|
50
|
-
background: function background(_ref2) {
|
|
51
|
-
var isInverse = _ref2.isInverse;
|
|
52
|
-
return isInverse ? 'initial' : colors.backgroundAlternative;
|
|
53
|
-
}
|
|
44
|
+
hover: _defineProperty({}, mq.supportsHover, {
|
|
45
|
+
'&:hover': {
|
|
46
|
+
background: function background(_ref2) {
|
|
47
|
+
var isInverse = _ref2.isInverse;
|
|
48
|
+
return isInverse ? 'initial' : colors.backgroundAlternative;
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
|
-
},
|
|
51
|
+
}),
|
|
57
52
|
rowContent: {
|
|
58
53
|
width: '100%',
|
|
59
54
|
cursor: 'pointer'
|
|
@@ -415,7 +410,7 @@ var RowContent = function RowContent(props) {
|
|
|
415
410
|
|
|
416
411
|
return /*#__PURE__*/React.createElement(Box, {
|
|
417
412
|
paddingX: 16,
|
|
418
|
-
className: classNames(
|
|
413
|
+
className: classNames(classes.rowContent, classes.hover, classes.hoverDisabled),
|
|
419
414
|
role: role
|
|
420
415
|
}, props.right ? renderContent({
|
|
421
416
|
type: 'custom',
|
|
@@ -270,44 +270,43 @@ var useStyles = createUseStyles(function (theme) {
|
|
|
270
270
|
},
|
|
271
271
|
height: DESKTOP_NAVBAR_HEIGHT,
|
|
272
272
|
padding: '16px 0',
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
borderBottomStyle: 'solid',
|
|
274
|
+
borderBottomWidth: function borderBottomWidth(_ref9) {
|
|
275
|
+
var withBorder = _ref9.withBorder;
|
|
276
|
+
return withBorder ? 1 : 0;
|
|
277
|
+
},
|
|
278
|
+
borderColor: function borderColor(_ref10) {
|
|
279
|
+
var isInverse = _ref10.isInverse;
|
|
277
280
|
return isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
|
|
278
281
|
}
|
|
279
282
|
}, theme.mq.tabletOrSmaller, {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
+
transition: 'border-color 300ms',
|
|
284
|
+
borderColor: function borderColor(_ref11) {
|
|
285
|
+
var isMenuOpen = _ref11.isMenuOpen,
|
|
286
|
+
isInverse = _ref11.isInverse;
|
|
283
287
|
return isMenuOpen || isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
|
|
284
288
|
},
|
|
285
289
|
height: MOBILE_NAVBAR_HEIGHT,
|
|
286
290
|
padding: '8px 0'
|
|
287
291
|
}),
|
|
288
|
-
section: {
|
|
292
|
+
section: _defineProperty({
|
|
289
293
|
height: DESKTOP_NAVBAR_HEIGHT,
|
|
290
294
|
display: 'flex',
|
|
291
295
|
alignItems: 'center',
|
|
292
296
|
padding: '0 8px',
|
|
293
297
|
borderBottom: "2px solid transparent",
|
|
294
|
-
transition: 'border-color 300ms ease-in-out'
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
'&:hover span': {
|
|
301
|
-
color: function color(_ref11) {
|
|
302
|
-
var isInverse = _ref11.isInverse;
|
|
303
|
-
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
304
|
-
}
|
|
298
|
+
transition: 'border-color 300ms ease-in-out'
|
|
299
|
+
}, theme.mq.supportsHover, {
|
|
300
|
+
'&:hover span': {
|
|
301
|
+
color: function color(_ref12) {
|
|
302
|
+
var isInverse = _ref12.isInverse;
|
|
303
|
+
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
305
304
|
}
|
|
306
305
|
}
|
|
307
|
-
},
|
|
306
|
+
}),
|
|
308
307
|
selectedSection: {
|
|
309
|
-
borderColor: function borderColor(
|
|
310
|
-
var isInverse =
|
|
308
|
+
borderColor: function borderColor(_ref13) {
|
|
309
|
+
var isInverse = _ref13.isInverse;
|
|
311
310
|
return isInverse ? theme.colors.inverse : theme.colors.controlActivated;
|
|
312
311
|
}
|
|
313
312
|
},
|
|
@@ -325,8 +324,8 @@ var useStyles = createUseStyles(function (theme) {
|
|
|
325
324
|
height: "calc(100vh - ".concat(MOBILE_NAVBAR_HEIGHT, "px)"),
|
|
326
325
|
overflowY: 'auto',
|
|
327
326
|
background: theme.colors.background,
|
|
328
|
-
boxShadow: function boxShadow(
|
|
329
|
-
var menuTransitionState =
|
|
327
|
+
boxShadow: function boxShadow(_ref14) {
|
|
328
|
+
var menuTransitionState = _ref14.menuTransitionState;
|
|
330
329
|
return menuTransitionState !== 'closed' ? "6px 0 4px -4px rgba(0, 0, 0, ".concat(shadowAlpha, ")") : 'none';
|
|
331
330
|
},
|
|
332
331
|
transition: "transform ".concat(BURGER_MENU_ANIMATION_DURATION_MS, "ms ease-out")
|
|
@@ -343,37 +342,32 @@ var useStyles = createUseStyles(function (theme) {
|
|
|
343
342
|
burgerMenuExitActive: {
|
|
344
343
|
transform: 'translate(-100vw)'
|
|
345
344
|
},
|
|
346
|
-
iconButton: {
|
|
347
|
-
color: function color(
|
|
348
|
-
var isInverse =
|
|
345
|
+
iconButton: _defineProperty({
|
|
346
|
+
color: function color(_ref15) {
|
|
347
|
+
var isInverse = _ref15.isInverse;
|
|
349
348
|
return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
'&:hover': {
|
|
357
|
-
color: function color(_ref15) {
|
|
358
|
-
var isInverse = _ref15.isInverse;
|
|
359
|
-
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
360
|
-
}
|
|
349
|
+
}
|
|
350
|
+
}, theme.mq.supportsHover, {
|
|
351
|
+
'&:hover': {
|
|
352
|
+
color: function color(_ref16) {
|
|
353
|
+
var isInverse = _ref16.isInverse;
|
|
354
|
+
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
361
355
|
}
|
|
362
356
|
}
|
|
363
|
-
}
|
|
357
|
+
})
|
|
364
358
|
};
|
|
365
359
|
});
|
|
366
|
-
export var MainNavigationBar = function MainNavigationBar(
|
|
360
|
+
export var MainNavigationBar = function MainNavigationBar(_ref17) {
|
|
367
361
|
var _logo;
|
|
368
362
|
|
|
369
|
-
var sections =
|
|
370
|
-
selectedIndex =
|
|
371
|
-
right =
|
|
372
|
-
logo =
|
|
373
|
-
|
|
374
|
-
isInverse =
|
|
375
|
-
|
|
376
|
-
topFixed =
|
|
363
|
+
var sections = _ref17.sections,
|
|
364
|
+
selectedIndex = _ref17.selectedIndex,
|
|
365
|
+
right = _ref17.right,
|
|
366
|
+
logo = _ref17.logo,
|
|
367
|
+
_ref17$isInverse = _ref17.isInverse,
|
|
368
|
+
isInverse = _ref17$isInverse === void 0 ? false : _ref17$isInverse,
|
|
369
|
+
_ref17$topFixed = _ref17.topFixed,
|
|
370
|
+
topFixed = _ref17$topFixed === void 0 ? true : _ref17$topFixed;
|
|
377
371
|
|
|
378
372
|
var _useTheme6 = useTheme(),
|
|
379
373
|
texts = _useTheme6.texts;
|
|
@@ -392,7 +386,8 @@ export var MainNavigationBar = function MainNavigationBar(_ref16) {
|
|
|
392
386
|
var classes = useStyles({
|
|
393
387
|
isMenuOpen: isMenuOpen,
|
|
394
388
|
isInverse: isInverse,
|
|
395
|
-
menuTransitionState: menuTransitionState
|
|
389
|
+
menuTransitionState: menuTransitionState,
|
|
390
|
+
withBorder: true
|
|
396
391
|
});
|
|
397
392
|
|
|
398
393
|
var _useScreenSize2 = useScreenSize(),
|
|
@@ -491,9 +486,9 @@ export var MainNavigationBar = function MainNavigationBar(_ref16) {
|
|
|
491
486
|
alignItems: "center"
|
|
492
487
|
}, logo, /*#__PURE__*/React.createElement("nav", null, /*#__PURE__*/React.createElement(Inline, {
|
|
493
488
|
space: 32
|
|
494
|
-
}, sections.map(function (
|
|
495
|
-
var title =
|
|
496
|
-
touchableProps = _objectWithoutProperties(
|
|
489
|
+
}, sections.map(function (_ref18, idx) {
|
|
490
|
+
var title = _ref18.title,
|
|
491
|
+
touchableProps = _objectWithoutProperties(_ref18, _excluded);
|
|
497
492
|
|
|
498
493
|
return /*#__PURE__*/React.createElement(Touchable, _extends({}, touchableProps, {
|
|
499
494
|
key: idx,
|
|
@@ -505,22 +500,25 @@ export var MainNavigationBar = function MainNavigationBar(_ref16) {
|
|
|
505
500
|
className: classes.spacer
|
|
506
501
|
}));
|
|
507
502
|
};
|
|
508
|
-
export var NavigationBar = function NavigationBar(
|
|
509
|
-
var onBack =
|
|
510
|
-
title =
|
|
511
|
-
right =
|
|
512
|
-
|
|
513
|
-
isInverse =
|
|
514
|
-
|
|
515
|
-
topFixed =
|
|
516
|
-
paddingX =
|
|
503
|
+
export var NavigationBar = function NavigationBar(_ref19) {
|
|
504
|
+
var onBack = _ref19.onBack,
|
|
505
|
+
title = _ref19.title,
|
|
506
|
+
right = _ref19.right,
|
|
507
|
+
_ref19$isInverse = _ref19.isInverse,
|
|
508
|
+
isInverse = _ref19$isInverse === void 0 ? false : _ref19$isInverse,
|
|
509
|
+
_ref19$topFixed = _ref19.topFixed,
|
|
510
|
+
topFixed = _ref19$topFixed === void 0 ? true : _ref19$topFixed,
|
|
511
|
+
paddingX = _ref19.paddingX,
|
|
512
|
+
_ref19$withBorder = _ref19.withBorder,
|
|
513
|
+
withBorder = _ref19$withBorder === void 0 ? true : _ref19$withBorder;
|
|
517
514
|
|
|
518
515
|
var _useTheme7 = useTheme(),
|
|
519
516
|
texts = _useTheme7.texts;
|
|
520
517
|
|
|
521
518
|
var classes = useStyles({
|
|
522
519
|
isInverse: isInverse,
|
|
523
|
-
paddingX: paddingX !== null && paddingX !== void 0 ? paddingX : 0
|
|
520
|
+
paddingX: paddingX !== null && paddingX !== void 0 ? paddingX : 0,
|
|
521
|
+
withBorder: withBorder
|
|
524
522
|
});
|
|
525
523
|
var content = /*#__PURE__*/React.createElement(Inline, {
|
|
526
524
|
space: "between",
|
|
@@ -550,15 +548,16 @@ export var NavigationBar = function NavigationBar(_ref18) {
|
|
|
550
548
|
className: classes.spacer
|
|
551
549
|
}));
|
|
552
550
|
};
|
|
553
|
-
export var FunnelNavigationBar = function FunnelNavigationBar(
|
|
554
|
-
var logo =
|
|
555
|
-
right =
|
|
556
|
-
|
|
557
|
-
isInverse =
|
|
558
|
-
|
|
559
|
-
topFixed =
|
|
551
|
+
export var FunnelNavigationBar = function FunnelNavigationBar(_ref20) {
|
|
552
|
+
var logo = _ref20.logo,
|
|
553
|
+
right = _ref20.right,
|
|
554
|
+
_ref20$isInverse = _ref20.isInverse,
|
|
555
|
+
isInverse = _ref20$isInverse === void 0 ? false : _ref20$isInverse,
|
|
556
|
+
_ref20$topFixed = _ref20.topFixed,
|
|
557
|
+
topFixed = _ref20$topFixed === void 0 ? true : _ref20$topFixed;
|
|
560
558
|
var classes = useStyles({
|
|
561
|
-
isInverse: isInverse
|
|
559
|
+
isInverse: isInverse,
|
|
560
|
+
withBorder: true
|
|
562
561
|
});
|
|
563
562
|
return /*#__PURE__*/React.createElement(ThemeVariant, {
|
|
564
563
|
isInverse: isInverse
|
|
@@ -582,8 +581,8 @@ var useNavigationBarActionGroupStyles = createUseStyles(function () {
|
|
|
582
581
|
}
|
|
583
582
|
};
|
|
584
583
|
});
|
|
585
|
-
export var NavigationBarActionGroup = function NavigationBarActionGroup(
|
|
586
|
-
var children =
|
|
584
|
+
export var NavigationBarActionGroup = function NavigationBarActionGroup(_ref21) {
|
|
585
|
+
var children = _ref21.children;
|
|
587
586
|
var classes = useNavigationBarActionGroupStyles();
|
|
588
587
|
return /*#__PURE__*/React.createElement("div", {
|
|
589
588
|
className: classes.lineHeightFix
|
|
@@ -594,38 +593,33 @@ export var NavigationBarActionGroup = function NavigationBarActionGroup(_ref20)
|
|
|
594
593
|
};
|
|
595
594
|
var useNavigationBarActionStyles = createUseStyles(function (theme) {
|
|
596
595
|
return {
|
|
597
|
-
touchable: {
|
|
596
|
+
touchable: _defineProperty({
|
|
598
597
|
lineHeight: 0,
|
|
599
598
|
'& svg': {
|
|
600
|
-
color: function color(
|
|
601
|
-
var isInverse =
|
|
599
|
+
color: function color(_ref22) {
|
|
600
|
+
var isInverse = _ref22.isInverse;
|
|
602
601
|
return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
|
|
603
602
|
}
|
|
603
|
+
}
|
|
604
|
+
}, theme.mq.supportsHover, {
|
|
605
|
+
'&:hover span': {
|
|
606
|
+
color: function color(_ref23) {
|
|
607
|
+
var isInverse = _ref23.isInverse;
|
|
608
|
+
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
609
|
+
}
|
|
604
610
|
},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
'@media (pointer: fine), (pointer: none)': {
|
|
610
|
-
'&:hover span': {
|
|
611
|
-
color: function color(_ref22) {
|
|
612
|
-
var isInverse = _ref22.isInverse;
|
|
613
|
-
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
'&:hover svg': {
|
|
617
|
-
color: function color(_ref23) {
|
|
618
|
-
var isInverse = _ref23.isInverse;
|
|
619
|
-
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
620
|
-
}
|
|
611
|
+
'&:hover svg': {
|
|
612
|
+
color: function color(_ref24) {
|
|
613
|
+
var isInverse = _ref24.isInverse;
|
|
614
|
+
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
621
615
|
}
|
|
622
616
|
}
|
|
623
|
-
}
|
|
617
|
+
})
|
|
624
618
|
};
|
|
625
619
|
});
|
|
626
|
-
export var NavigationBarAction = function NavigationBarAction(
|
|
627
|
-
var children =
|
|
628
|
-
touchableProps = _objectWithoutProperties(
|
|
620
|
+
export var NavigationBarAction = function NavigationBarAction(_ref25) {
|
|
621
|
+
var children = _ref25.children,
|
|
622
|
+
touchableProps = _objectWithoutProperties(_ref25, _excluded2);
|
|
629
623
|
|
|
630
624
|
var isInverse = useIsInverseVariant();
|
|
631
625
|
var classes = useNavigationBarActionStyles({
|
|
@@ -28,9 +28,9 @@ import IconButton from './icon-button';
|
|
|
28
28
|
import Visibility from './icons/icon-visibility';
|
|
29
29
|
import VisibilityOff from './icons/icon-visibility-off';
|
|
30
30
|
import { createUseStyles } from './jss';
|
|
31
|
-
var usePasswordAdornmentStyles = createUseStyles(function () {
|
|
31
|
+
var usePasswordAdornmentStyles = createUseStyles(function (theme) {
|
|
32
32
|
return {
|
|
33
|
-
shadow: _defineProperty({},
|
|
33
|
+
shadow: _defineProperty({}, theme.mq.supportsHover, {
|
|
34
34
|
'&:hover': {
|
|
35
35
|
backgroundColor: 'rgba(0, 0, 0, 0.08)'
|
|
36
36
|
}
|
|
@@ -87,6 +87,8 @@ var PasswordField = function PasswordField(_ref2) {
|
|
|
87
87
|
isVisible = _React$useState2[0],
|
|
88
88
|
setIsVisible = _React$useState2[1];
|
|
89
89
|
|
|
90
|
+
var caretPositionRef = React.useRef(0);
|
|
91
|
+
|
|
90
92
|
var _inputRef = React.useRef(null);
|
|
91
93
|
|
|
92
94
|
var processValue = function processValue(value) {
|
|
@@ -97,16 +99,22 @@ var PasswordField = function PasswordField(_ref2) {
|
|
|
97
99
|
var input = _inputRef.current;
|
|
98
100
|
|
|
99
101
|
if (input) {
|
|
100
|
-
input.
|
|
102
|
+
if (input.selectionStart !== null) {
|
|
103
|
+
caretPositionRef.current = input.selectionStart;
|
|
104
|
+
}
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
var v = input.value;
|
|
104
|
-
input.value = '';
|
|
105
|
-
input.value = v;
|
|
106
|
-
}, 0);
|
|
106
|
+
input.focus();
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
React.useEffect(function () {
|
|
111
|
+
var input = _inputRef.current;
|
|
112
|
+
|
|
113
|
+
if (input) {
|
|
114
|
+
input.selectionStart = caretPositionRef.current;
|
|
115
|
+
input.selectionEnd = caretPositionRef.current;
|
|
116
|
+
}
|
|
117
|
+
}, [isVisible, caretPositionRef, _inputRef]);
|
|
110
118
|
var fieldProps = useFieldProps({
|
|
111
119
|
name: name,
|
|
112
120
|
value: value,
|