@telefonica/mistica 10.5.1 → 10.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/button-group.d.ts +9 -0
  3. package/dist/button-group.js +67 -0
  4. package/dist/button-group.js.flow +11 -0
  5. package/dist/button.d.ts +1 -1
  6. package/dist/button.js +1 -1
  7. package/dist/button.js.flow +1 -1
  8. package/dist/callout.d.ts +2 -1
  9. package/dist/callout.js +15 -21
  10. package/dist/callout.js.flow +2 -3
  11. package/dist/card.d.ts +1 -1
  12. package/dist/card.js +41 -48
  13. package/dist/date-field.js +8 -0
  14. package/dist/date-time-field.js +8 -0
  15. package/dist/date-time-picker.d.ts +1 -0
  16. package/dist/date-time-picker.js +55 -20
  17. package/dist/date-time-picker.js.flow +1 -0
  18. package/dist/decimal-field.d.ts +1 -0
  19. package/dist/decimal-field.js.flow +1 -0
  20. package/dist/empty-state-card.d.ts +4 -3
  21. package/dist/empty-state-card.js +18 -24
  22. package/dist/empty-state-card.js.flow +2 -3
  23. package/dist/empty-state.d.ts +2 -2
  24. package/dist/empty-state.js +51 -9
  25. package/dist/feedback.d.ts +2 -7
  26. package/dist/feedback.js +38 -60
  27. package/dist/feedback.js.flow +2 -6
  28. package/dist/header.js +37 -67
  29. package/dist/index.d.ts +4 -1
  30. package/dist/index.js +28 -0
  31. package/dist/index.js.flow +4 -0
  32. package/dist/month-field.d.ts +9 -0
  33. package/dist/month-field.js +192 -0
  34. package/dist/month-field.js.flow +13 -0
  35. package/dist/navigation-bar.js +102 -72
  36. package/dist/progress-bar.d.ts +1 -0
  37. package/dist/progress-bar.js +11 -6
  38. package/dist/progress-bar.js.flow +4 -1
  39. package/dist/skins/blau.d.ts +37 -0
  40. package/dist/skins/blau.js +238 -0
  41. package/dist/skins/blau.js.flow +39 -0
  42. package/dist/skins/constants.d.ts +1 -0
  43. package/dist/skins/constants.js +4 -2
  44. package/dist/skins/constants.js.flow +1 -0
  45. package/dist/skins/telefonica.js +1 -1
  46. package/dist/skins/types.d.ts +1 -1
  47. package/dist/skins/types.js.flow +7 -1
  48. package/dist/skins/utils.js +5 -0
  49. package/dist/stepper.js +1 -1
  50. package/dist/text-field-base.js +8 -1
  51. package/dist/theme.d.ts +1 -0
  52. package/dist/theme.js +8 -4
  53. package/dist/theme.js.flow +1 -0
  54. package/dist/utils/time.d.ts +1 -0
  55. package/dist/utils/time.js +9 -1
  56. package/dist/utils/time.js.flow +1 -0
  57. package/dist-es/button-group.js +54 -0
  58. package/dist-es/button.js +1 -1
  59. package/dist-es/callout.js +15 -21
  60. package/dist-es/card.js +40 -47
  61. package/dist-es/date-field.js +7 -0
  62. package/dist-es/date-time-field.js +7 -0
  63. package/dist-es/date-time-picker.js +56 -22
  64. package/dist-es/empty-state-card.js +17 -23
  65. package/dist-es/empty-state.js +16 -9
  66. package/dist-es/feedback.js +37 -60
  67. package/dist-es/header.js +37 -67
  68. package/dist-es/index.js +4 -1
  69. package/dist-es/month-field.js +120 -0
  70. package/dist-es/navigation-bar.js +102 -72
  71. package/dist-es/progress-bar.js +11 -6
  72. package/dist-es/skins/blau.js +225 -0
  73. package/dist-es/skins/constants.js +2 -1
  74. package/dist-es/skins/telefonica.js +1 -1
  75. package/dist-es/skins/utils.js +5 -1
  76. package/dist-es/stepper.js +1 -1
  77. package/dist-es/text-field-base.js +8 -1
  78. package/dist-es/theme.js +8 -4
  79. package/dist-es/utils/time.js +5 -0
  80. package/package.json +1 -1
package/dist-es/header.js CHANGED
@@ -16,47 +16,16 @@ import GridLayout from './grid-layout';
16
16
  import { useScreenSize, useTheme } from './hooks';
17
17
  import OverscrollColor from './overscroll-color-context';
18
18
  import { Text8, Text7, Text6, Text3 } from './text';
19
- import ButtonLayout from './button-layout';
20
- var useButtonLayoutStyles = createUseStyles(function () {
21
- return {
22
- inlineBlockContainer: {
23
- // this inline block makes the parent grow with the width of its bigger children
24
- // this, toggether with applying width 100% to the buttons, allows us to have two
25
- // sibling buttons with the same width (the width of the bigger one).
26
- display: 'inline-block'
27
- },
28
- button: {
29
- '& > *': {
30
- width: '100%'
31
- }
32
- }
33
- };
34
- });
35
-
36
- var MobileHeaderButtonLayout = function MobileHeaderButtonLayout(_ref) {
37
- var children = _ref.children;
38
- var classes = useButtonLayoutStyles();
39
- return /*#__PURE__*/React.createElement("div", {
40
- className: classes.inlineBlockContainer
41
- }, /*#__PURE__*/React.createElement(Stack, {
42
- space: 16
43
- }, React.Children.toArray(children).filter(Boolean).map(function (button, idx) {
44
- return /*#__PURE__*/React.createElement("div", {
45
- key: idx,
46
- className: classes.button
47
- }, button);
48
- })));
49
- };
50
-
51
- export var Header = function Header(_ref2) {
52
- var pretitle = _ref2.pretitle,
53
- title = _ref2.title,
54
- preamount = _ref2.preamount,
55
- amount = _ref2.amount,
56
- button = _ref2.button,
57
- subtitle = _ref2.subtitle,
58
- isErrorAmount = _ref2.isErrorAmount,
59
- secondaryButton = _ref2.secondaryButton;
19
+ import ButtonGroup from './button-group';
20
+ export var Header = function Header(_ref) {
21
+ var pretitle = _ref.pretitle,
22
+ title = _ref.title,
23
+ preamount = _ref.preamount,
24
+ amount = _ref.amount,
25
+ button = _ref.button,
26
+ subtitle = _ref.subtitle,
27
+ isErrorAmount = _ref.isErrorAmount,
28
+ secondaryButton = _ref.secondaryButton;
60
29
 
61
30
  var _useScreenSize = useScreenSize(),
62
31
  isTabletOrSmaller = _useScreenSize.isTabletOrSmaller;
@@ -81,14 +50,16 @@ export var Header = function Header(_ref2) {
81
50
 
82
51
  return /*#__PURE__*/React.createElement(Stack, {
83
52
  space: isTabletOrSmaller ? 24 : 32
84
- }, (title || pretitle) && /*#__PURE__*/React.createElement(Stack, {
53
+ }, (title || pretitle) && /*#__PURE__*/React.createElement(Box, {
54
+ paddingRight: 16
55
+ }, /*#__PURE__*/React.createElement(Stack, {
85
56
  space: 8
86
57
  }, pretitle && renderRichText(pretitle, {
87
58
  color: theme.colors.textPrimary
88
59
  }), /*#__PURE__*/React.createElement(Text6, {
89
60
  role: "heading",
90
61
  "aria-level": 2
91
- }, title)), (preamount || amount || button || subtitle) && /*#__PURE__*/React.createElement(Stack, {
62
+ }, title))), (preamount || amount || button || subtitle) && /*#__PURE__*/React.createElement(Stack, {
92
63
  space: 16
93
64
  }, (preamount || amount) && /*#__PURE__*/React.createElement(Stack, {
94
65
  space: 8
@@ -96,14 +67,15 @@ export var Header = function Header(_ref2) {
96
67
  color: theme.colors.textPrimary
97
68
  }), /*#__PURE__*/React.createElement(Text8, {
98
69
  color: isErrorAmount && !isInverse ? theme.colors.highlight : theme.colors.textPrimary
99
- }, amount)), (button || secondaryButton) && (isTabletOrSmaller ? /*#__PURE__*/React.createElement(MobileHeaderButtonLayout, null, button, secondaryButton) : /*#__PURE__*/React.createElement(ButtonLayout, {
100
- align: "left"
101
- }, button, secondaryButton)), subtitle && renderRichText(subtitle, {})));
70
+ }, amount)), (button || secondaryButton) && /*#__PURE__*/React.createElement(ButtonGroup, {
71
+ primaryButton: button,
72
+ secondaryButton: secondaryButton
73
+ }), subtitle && renderRichText(subtitle, {})));
102
74
  };
103
- export var MainSectionHeader = function MainSectionHeader(_ref3) {
104
- var title = _ref3.title,
105
- description = _ref3.description,
106
- button = _ref3.button;
75
+ export var MainSectionHeader = function MainSectionHeader(_ref2) {
76
+ var title = _ref2.title,
77
+ description = _ref2.description,
78
+ button = _ref2.button;
107
79
 
108
80
  var _useScreenSize2 = useScreenSize(),
109
81
  isTabletOrSmaller = _useScreenSize2.isTabletOrSmaller;
@@ -120,8 +92,8 @@ export var MainSectionHeader = function MainSectionHeader(_ref3) {
120
92
  var useHeaderLayoutStyles = createUseStyles(function (theme) {
121
93
  return {
122
94
  background: {
123
- background: function background(_ref4) {
124
- var isInverse = _ref4.isInverse;
95
+ background: function background(_ref3) {
96
+ var isInverse = _ref3.isInverse;
125
97
  return isInverse ? theme.colors.backgroundBrand : 'initial';
126
98
  }
127
99
  },
@@ -130,14 +102,14 @@ var useHeaderLayoutStyles = createUseStyles(function (theme) {
130
102
  }
131
103
  };
132
104
  });
133
- export var HeaderLayout = function HeaderLayout(_ref5) {
134
- var _ref5$isInverse = _ref5.isInverse,
135
- isInverse = _ref5$isInverse === void 0 ? true : _ref5$isInverse,
136
- breadcrumbs = _ref5.breadcrumbs,
137
- header = _ref5.header,
138
- extra = _ref5.extra,
139
- _ref5$sideBySideExtra = _ref5.sideBySideExtraOnDesktop,
140
- sideBySideExtraOnDesktop = _ref5$sideBySideExtra === void 0 ? false : _ref5$sideBySideExtra;
105
+ export var HeaderLayout = function HeaderLayout(_ref4) {
106
+ var _ref4$isInverse = _ref4.isInverse,
107
+ isInverse = _ref4$isInverse === void 0 ? true : _ref4$isInverse,
108
+ breadcrumbs = _ref4.breadcrumbs,
109
+ header = _ref4.header,
110
+ extra = _ref4.extra,
111
+ _ref4$sideBySideExtra = _ref4.sideBySideExtraOnDesktop,
112
+ sideBySideExtraOnDesktop = _ref4$sideBySideExtra === void 0 ? false : _ref4$sideBySideExtra;
141
113
  var classes = useHeaderLayoutStyles({
142
114
  isInverse: isInverse
143
115
  });
@@ -154,9 +126,7 @@ export var HeaderLayout = function HeaderLayout(_ref5) {
154
126
  paddingBottom: 24
155
127
  }, /*#__PURE__*/React.createElement(Stack, {
156
128
  space: 24
157
- }, /*#__PURE__*/React.createElement(Box, {
158
- paddingRight: 16
159
- }, header), extra)) : sideBySideExtraOnDesktop ? /*#__PURE__*/React.createElement(Box, {
129
+ }, header, extra)) : sideBySideExtraOnDesktop ? /*#__PURE__*/React.createElement(Box, {
160
130
  paddingTop: breadcrumbs ? 16 : 48,
161
131
  paddingBottom: 48
162
132
  }, /*#__PURE__*/React.createElement(GridLayout, null, /*#__PURE__*/React.createElement("div", {
@@ -176,10 +146,10 @@ export var HeaderLayout = function HeaderLayout(_ref5) {
176
146
  space: 32
177
147
  }, breadcrumbs, header), extra))))));
178
148
  };
179
- export var MainSectionHeaderLayout = function MainSectionHeaderLayout(_ref6) {
180
- var _ref6$isInverse = _ref6.isInverse,
181
- isInverse = _ref6$isInverse === void 0 ? true : _ref6$isInverse,
182
- children = _ref6.children;
149
+ export var MainSectionHeaderLayout = function MainSectionHeaderLayout(_ref5) {
150
+ var _ref5$isInverse = _ref5.isInverse,
151
+ isInverse = _ref5$isInverse === void 0 ? true : _ref5$isInverse,
152
+ children = _ref5.children;
183
153
  var classes = useHeaderLayoutStyles({
184
154
  isInverse: isInverse
185
155
  });
package/dist-es/index.js CHANGED
@@ -68,6 +68,7 @@ export { default as CreditCardExpirationField } from './credit-card-expiration-f
68
68
  export { default as CreditCardFields } from './credit-card-fields';
69
69
  export { default as CvvField } from './cvv-field';
70
70
  export { default as DateField } from './date-field';
71
+ export { default as MonthField } from './month-field';
71
72
  export { default as DateTimeField } from './date-time-field';
72
73
  export { default as IntegerField } from './integer-field';
73
74
  export { default as DecimalField } from './decimal-field';
@@ -87,18 +88,20 @@ export { default as IconSuccessVivo } from './icons/icon-success-vivo';
87
88
  export { default as Circle } from './circle';
88
89
  export { useTheme, useScreenSize, useElementDimensions, useAriaId, useWindowSize, useWindowHeight, useWindowWidth } from './hooks';
89
90
  export { ThemeVariant, useIsInverseVariant } from './theme-variant-context';
90
- export { VIVO_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN } from './skins/constants';
91
+ export { VIVO_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN, BLAU_SKIN } from './skins/constants';
91
92
  export { getSkinByName } from './skins/utils';
92
93
  export { getVivoSkin } from './skins/vivo';
93
94
  export { getMovistarSkin } from './skins/movistar';
94
95
  export { getO2Skin } from './skins/o2';
95
96
  export { getO2ClassicSkin } from './skins/o2-classic';
96
97
  export { getTelefonicaSkin } from './skins/telefonica';
98
+ export { getBlauSkin } from './skins/blau';
97
99
  export { palette as vivoPalette } from './skins/vivo';
98
100
  export { palette as movistarPalette } from './skins/movistar';
99
101
  export { palette as o2Palette } from './skins/o2';
100
102
  export { palette as o2ClassicPalette } from './skins/o2-classic';
101
103
  export { palette as telefonicaPalette } from './skins/telefonica';
104
+ export { palette as blauPalette } from './skins/blau';
102
105
 
103
106
  // Check there is only one version of mistica installed in the page.
104
107
  if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined') {
@@ -0,0 +1,120 @@
1
+ var _excluded = ["disabled", "error", "helperText", "name", "optional", "validate", "onChange", "onChangeValue", "onBlur", "value", "defaultValue", "min", "max"];
2
+
3
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+
9
+ import * as React from 'react';
10
+ import { useFieldProps } from './form-context';
11
+ import TextFieldBase from './text-field-base';
12
+ import { isInputTypeSupported } from './utils/dom';
13
+ import { isServerSide } from './utils/environment';
14
+ import IconCalendarRegular from './generated/mistica-icons/icon-calendar-regular';
15
+ import { getLocalYearMonthString } from './utils/time';
16
+ import { useTheme } from './hooks';
17
+ var ReactDateTimePicker = /*#__PURE__*/React.lazy(function () {
18
+ return import(
19
+ /* webpackChunkName: "date-time-picker" */
20
+ './date-time-picker');
21
+ });
22
+
23
+ var DateField = function DateField(_ref) {
24
+ var disabled = _ref.disabled,
25
+ error = _ref.error,
26
+ helperText = _ref.helperText,
27
+ name = _ref.name,
28
+ optional = _ref.optional,
29
+ validateProp = _ref.validate,
30
+ onChange = _ref.onChange,
31
+ onChangeValueProp = _ref.onChangeValue,
32
+ onBlur = _ref.onBlur,
33
+ value = _ref.value,
34
+ defaultValue = _ref.defaultValue,
35
+ min = _ref.min,
36
+ max = _ref.max,
37
+ rest = _objectWithoutProperties(_ref, _excluded);
38
+
39
+ var processValue = function processValue(value) {
40
+ return value;
41
+ };
42
+
43
+ var hasNativePicker = React.useMemo(function () {
44
+ return isInputTypeSupported('month');
45
+ }, []);
46
+
47
+ var _useTheme = useTheme(),
48
+ texts = _useTheme.texts;
49
+
50
+ var isInRange = function isInRange(value) {
51
+ if (min && value && value < getLocalYearMonthString(min)) {
52
+ return false;
53
+ }
54
+
55
+ if (max && value && value > getLocalYearMonthString(max)) {
56
+ return false;
57
+ }
58
+
59
+ return true;
60
+ };
61
+
62
+ var validate = function validate(value, rawValue) {
63
+ if (!isInRange(value)) {
64
+ return texts.formDateOutOfRangeError;
65
+ }
66
+
67
+ return validateProp === null || validateProp === void 0 ? void 0 : validateProp(value, rawValue);
68
+ };
69
+
70
+ var onChangeValue = function onChangeValue(value, rawValue) {
71
+ if (isInRange(value)) {
72
+ onChangeValueProp === null || onChangeValueProp === void 0 ? void 0 : onChangeValueProp(value, rawValue);
73
+ } // if not in range, onChangeValue is not called
74
+
75
+ };
76
+
77
+ var fieldProps = useFieldProps({
78
+ name: name,
79
+ value: value,
80
+ defaultValue: defaultValue,
81
+ processValue: processValue,
82
+ helperText: helperText,
83
+ optional: optional,
84
+ error: error,
85
+ disabled: disabled,
86
+ onBlur: onBlur,
87
+ validate: validate,
88
+ onChange: onChange,
89
+ onChangeValue: onChangeValue
90
+ });
91
+ var nativePicker = /*#__PURE__*/React.createElement(TextFieldBase, _extends({}, rest, fieldProps, {
92
+ min: min ? getLocalYearMonthString(min) : undefined,
93
+ max: max ? getLocalYearMonthString(max) : undefined,
94
+ type: "month",
95
+ endIconOverlay: /*#__PURE__*/React.createElement("div", {
96
+ style: {
97
+ position: 'absolute',
98
+ top: 16,
99
+ right: 16,
100
+ pointerEvents: 'none'
101
+ }
102
+ }, /*#__PURE__*/React.createElement(IconCalendarRegular, null))
103
+ }));
104
+
105
+ if (hasNativePicker || isServerSide()) {
106
+ return nativePicker;
107
+ }
108
+
109
+ return /*#__PURE__*/React.createElement(React.Suspense, {
110
+ fallback: nativePicker
111
+ }, /*#__PURE__*/React.createElement(ReactDateTimePicker, _extends({}, rest, fieldProps, {
112
+ optional: optional,
113
+ isValidDate: function isValidDate(currentDate) {
114
+ return isInRange(getLocalYearMonthString(currentDate.toDate()));
115
+ },
116
+ mode: "year-month"
117
+ })));
118
+ };
119
+
120
+ export default DateField;
@@ -162,13 +162,38 @@ var TelefonicaLogo = function TelefonicaLogo(_ref4) {
162
162
  })));
163
163
  };
164
164
 
165
- export var NavigationBarLogo = function NavigationBarLogo(_ref5) {
166
- var _size;
167
-
165
+ var BlauLogo = function BlauLogo(_ref5) {
168
166
  var size = _ref5.size;
169
167
 
170
168
  var _useTheme5 = useTheme(),
171
- skinName = _useTheme5.skinName;
169
+ colors = _useTheme5.colors,
170
+ isDarkMode = _useTheme5.isDarkMode;
171
+
172
+ var isInverse = useIsInverseVariant();
173
+ var color = isInverse && !isDarkMode ? colors.inverse : colors.brand;
174
+ return /*#__PURE__*/React.createElement("svg", {
175
+ height: size,
176
+ viewBox: "0 0 100 44",
177
+ role: "presentation"
178
+ }, /*#__PURE__*/React.createElement("g", {
179
+ fill: "none",
180
+ fillRule: "evenodd"
181
+ }, /*#__PURE__*/React.createElement("path", {
182
+ fill: colors.textLink,
183
+ d: "M0 35.184h100v8.2h-100z"
184
+ }), /*#__PURE__*/React.createElement("path", {
185
+ fill: color,
186
+ d: "M24.878 13.321c3.448 1.331 5.278 3.588 5.069 7.436-.209 5.009-4.11 8.47-9.216 8.47h-19.731v-7.763h2.775v-13.698h-2.775v-7.766h19.814c4.319 0 7.768 3.674 7.636 8.017-.044 2.334-1.284 4.513-3.572 5.304zm-8.959-6.218h-2.583v4.114h2.583c2.544 0 2.716-4.114 0-4.114zm3.249 12.427c0-1.193-.771-2.381-2.546-2.381h-3.286v4.764h3.286c1.728 0 2.546-1.173 2.546-2.383zm11.554-19.53v7.766h2.75v21.46h10.043v-29.226h-12.793zm41.708 29.227h-9.421l-.206-2.17c-1.535 1.879-3.82 2.545-5.973 2.588-14.283.166-14.283-23.542 0-23.38 2.152 0 4.438.669 5.973 2.547l.207-2.175h9.42v22.59zm-10-11.275c0-4.383-6.183-4.339-6.183 0 .001 4.344 6.183 4.387 6.183 0zm37.513-11.316h-9.959v12.194c0 1.672-1.246 2.463-2.491 2.463-1.25 0-2.246-.831-2.246-2.421v-12.236h-9.965v12.282c0 6.057 2.364 10.562 9.051 10.729 2.199.041 4.485-.672 6.06-2.674l.211 2.254 9.342.015v-22.606h-.003z"
187
+ })));
188
+ };
189
+
190
+ export var NavigationBarLogo = function NavigationBarLogo(_ref6) {
191
+ var _size;
192
+
193
+ var size = _ref6.size;
194
+
195
+ var _useTheme6 = useTheme(),
196
+ skinName = _useTheme6.skinName;
172
197
 
173
198
  var _useScreenSize = useScreenSize(),
174
199
  isTabletOrSmaller = _useScreenSize.isTabletOrSmaller;
@@ -197,6 +222,11 @@ export var NavigationBarLogo = function NavigationBarLogo(_ref5) {
197
222
  size: size
198
223
  });
199
224
 
225
+ case 'Blau':
226
+ return /*#__PURE__*/React.createElement(BlauLogo, {
227
+ size: size
228
+ });
229
+
200
230
  default:
201
231
  return null;
202
232
  }
@@ -225,8 +255,8 @@ var useBurgerStyles = createUseStyles(function () {
225
255
  };
226
256
  });
227
257
 
228
- var BurgerMenuIcon = function BurgerMenuIcon(_ref6) {
229
- var isOpen = _ref6.isOpen;
258
+ var BurgerMenuIcon = function BurgerMenuIcon(_ref7) {
259
+ var isOpen = _ref7.isOpen;
230
260
  var classes = useBurgerStyles();
231
261
  return /*#__PURE__*/React.createElement("div", {
232
262
  className: classes.burgerIconContainer,
@@ -255,8 +285,8 @@ var useStyles = createUseStyles(function (theme) {
255
285
  },
256
286
  notFixedPadding: {
257
287
  width: '100%',
258
- padding: function padding(_ref7) {
259
- var paddingX = _ref7.paddingX;
288
+ padding: function padding(_ref8) {
289
+ var paddingX = _ref8.paddingX;
260
290
  return "0 ".concat(paddingX, "px");
261
291
  }
262
292
  },
@@ -264,26 +294,26 @@ var useStyles = createUseStyles(function (theme) {
264
294
  width: '100%',
265
295
  display: 'flex',
266
296
  alignItems: 'center',
267
- background: function background(_ref8) {
268
- var isInverse = _ref8.isInverse;
297
+ background: function background(_ref9) {
298
+ var isInverse = _ref9.isInverse;
269
299
  return isInverse ? theme.colors.navigationBarBackground : theme.colors.background;
270
300
  },
271
301
  height: DESKTOP_NAVBAR_HEIGHT,
272
302
  padding: '16px 0',
273
303
  borderBottomStyle: 'solid',
274
- borderBottomWidth: function borderBottomWidth(_ref9) {
275
- var withBorder = _ref9.withBorder;
304
+ borderBottomWidth: function borderBottomWidth(_ref10) {
305
+ var withBorder = _ref10.withBorder;
276
306
  return withBorder ? 1 : 0;
277
307
  },
278
- borderColor: function borderColor(_ref10) {
279
- var isInverse = _ref10.isInverse;
308
+ borderColor: function borderColor(_ref11) {
309
+ var isInverse = _ref11.isInverse;
280
310
  return isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
281
311
  }
282
312
  }, theme.mq.tabletOrSmaller, {
283
313
  transition: 'border-color 300ms',
284
- borderColor: function borderColor(_ref11) {
285
- var isMenuOpen = _ref11.isMenuOpen,
286
- isInverse = _ref11.isInverse;
314
+ borderColor: function borderColor(_ref12) {
315
+ var isMenuOpen = _ref12.isMenuOpen,
316
+ isInverse = _ref12.isInverse;
287
317
  return isMenuOpen || isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
288
318
  },
289
319
  height: MOBILE_NAVBAR_HEIGHT,
@@ -298,15 +328,15 @@ var useStyles = createUseStyles(function (theme) {
298
328
  transition: 'border-color 300ms ease-in-out'
299
329
  }, theme.mq.supportsHover, {
300
330
  '&:hover span': {
301
- color: function color(_ref12) {
302
- var isInverse = _ref12.isInverse;
331
+ color: function color(_ref13) {
332
+ var isInverse = _ref13.isInverse;
303
333
  return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
304
334
  }
305
335
  }
306
336
  }),
307
337
  selectedSection: {
308
- borderColor: function borderColor(_ref13) {
309
- var isInverse = _ref13.isInverse;
338
+ borderColor: function borderColor(_ref14) {
339
+ var isInverse = _ref14.isInverse;
310
340
  return isInverse ? theme.colors.inverse : theme.colors.controlActivated;
311
341
  }
312
342
  },
@@ -324,8 +354,8 @@ var useStyles = createUseStyles(function (theme) {
324
354
  height: "calc(100vh - ".concat(MOBILE_NAVBAR_HEIGHT, "px)"),
325
355
  overflowY: 'auto',
326
356
  background: theme.colors.background,
327
- boxShadow: function boxShadow(_ref14) {
328
- var menuTransitionState = _ref14.menuTransitionState;
357
+ boxShadow: function boxShadow(_ref15) {
358
+ var menuTransitionState = _ref15.menuTransitionState;
329
359
  return menuTransitionState !== 'closed' ? "6px 0 4px -4px rgba(0, 0, 0, ".concat(shadowAlpha, ")") : 'none';
330
360
  },
331
361
  transition: "transform ".concat(BURGER_MENU_ANIMATION_DURATION_MS, "ms ease-out")
@@ -343,34 +373,34 @@ var useStyles = createUseStyles(function (theme) {
343
373
  transform: 'translate(-100vw)'
344
374
  },
345
375
  iconButton: _defineProperty({
346
- color: function color(_ref15) {
347
- var isInverse = _ref15.isInverse;
376
+ color: function color(_ref16) {
377
+ var isInverse = _ref16.isInverse;
348
378
  return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
349
379
  }
350
380
  }, theme.mq.supportsHover, {
351
381
  '&:hover': {
352
- color: function color(_ref16) {
353
- var isInverse = _ref16.isInverse;
382
+ color: function color(_ref17) {
383
+ var isInverse = _ref17.isInverse;
354
384
  return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
355
385
  }
356
386
  }
357
387
  })
358
388
  };
359
389
  });
360
- export var MainNavigationBar = function MainNavigationBar(_ref17) {
390
+ export var MainNavigationBar = function MainNavigationBar(_ref18) {
361
391
  var _logo;
362
392
 
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;
393
+ var sections = _ref18.sections,
394
+ selectedIndex = _ref18.selectedIndex,
395
+ right = _ref18.right,
396
+ logo = _ref18.logo,
397
+ _ref18$isInverse = _ref18.isInverse,
398
+ isInverse = _ref18$isInverse === void 0 ? false : _ref18$isInverse,
399
+ _ref18$topFixed = _ref18.topFixed,
400
+ topFixed = _ref18$topFixed === void 0 ? true : _ref18$topFixed;
371
401
 
372
- var _useTheme6 = useTheme(),
373
- texts = _useTheme6.texts;
402
+ var _useTheme7 = useTheme(),
403
+ texts = _useTheme7.texts;
374
404
 
375
405
  var _React$useState = React.useState(false),
376
406
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -486,9 +516,9 @@ export var MainNavigationBar = function MainNavigationBar(_ref17) {
486
516
  alignItems: "center"
487
517
  }, logo, /*#__PURE__*/React.createElement("nav", null, /*#__PURE__*/React.createElement(Inline, {
488
518
  space: 32
489
- }, sections.map(function (_ref18, idx) {
490
- var title = _ref18.title,
491
- touchableProps = _objectWithoutProperties(_ref18, _excluded);
519
+ }, sections.map(function (_ref19, idx) {
520
+ var title = _ref19.title,
521
+ touchableProps = _objectWithoutProperties(_ref19, _excluded);
492
522
 
493
523
  return /*#__PURE__*/React.createElement(Touchable, _extends({}, touchableProps, {
494
524
  key: idx,
@@ -500,20 +530,20 @@ export var MainNavigationBar = function MainNavigationBar(_ref17) {
500
530
  className: classes.spacer
501
531
  }));
502
532
  };
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;
533
+ export var NavigationBar = function NavigationBar(_ref20) {
534
+ var onBack = _ref20.onBack,
535
+ title = _ref20.title,
536
+ right = _ref20.right,
537
+ _ref20$isInverse = _ref20.isInverse,
538
+ isInverse = _ref20$isInverse === void 0 ? false : _ref20$isInverse,
539
+ _ref20$topFixed = _ref20.topFixed,
540
+ topFixed = _ref20$topFixed === void 0 ? true : _ref20$topFixed,
541
+ paddingX = _ref20.paddingX,
542
+ _ref20$withBorder = _ref20.withBorder,
543
+ withBorder = _ref20$withBorder === void 0 ? true : _ref20$withBorder;
514
544
 
515
- var _useTheme7 = useTheme(),
516
- texts = _useTheme7.texts;
545
+ var _useTheme8 = useTheme(),
546
+ texts = _useTheme8.texts;
517
547
 
518
548
  var classes = useStyles({
519
549
  isInverse: isInverse,
@@ -548,13 +578,13 @@ export var NavigationBar = function NavigationBar(_ref19) {
548
578
  className: classes.spacer
549
579
  }));
550
580
  };
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;
581
+ export var FunnelNavigationBar = function FunnelNavigationBar(_ref21) {
582
+ var logo = _ref21.logo,
583
+ right = _ref21.right,
584
+ _ref21$isInverse = _ref21.isInverse,
585
+ isInverse = _ref21$isInverse === void 0 ? false : _ref21$isInverse,
586
+ _ref21$topFixed = _ref21.topFixed,
587
+ topFixed = _ref21$topFixed === void 0 ? true : _ref21$topFixed;
558
588
  var classes = useStyles({
559
589
  isInverse: isInverse,
560
590
  withBorder: true
@@ -581,8 +611,8 @@ var useNavigationBarActionGroupStyles = createUseStyles(function () {
581
611
  }
582
612
  };
583
613
  });
584
- export var NavigationBarActionGroup = function NavigationBarActionGroup(_ref21) {
585
- var children = _ref21.children;
614
+ export var NavigationBarActionGroup = function NavigationBarActionGroup(_ref22) {
615
+ var children = _ref22.children;
586
616
  var classes = useNavigationBarActionGroupStyles();
587
617
  return /*#__PURE__*/React.createElement("div", {
588
618
  className: classes.lineHeightFix
@@ -596,30 +626,30 @@ var useNavigationBarActionStyles = createUseStyles(function (theme) {
596
626
  touchable: _defineProperty({
597
627
  lineHeight: 0,
598
628
  '& svg': {
599
- color: function color(_ref22) {
600
- var isInverse = _ref22.isInverse;
629
+ color: function color(_ref23) {
630
+ var isInverse = _ref23.isInverse;
601
631
  return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
602
632
  }
603
633
  }
604
634
  }, theme.mq.supportsHover, {
605
635
  '&:hover span': {
606
- color: function color(_ref23) {
607
- var isInverse = _ref23.isInverse;
636
+ color: function color(_ref24) {
637
+ var isInverse = _ref24.isInverse;
608
638
  return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
609
639
  }
610
640
  },
611
641
  '&:hover svg': {
612
- color: function color(_ref24) {
613
- var isInverse = _ref24.isInverse;
642
+ color: function color(_ref25) {
643
+ var isInverse = _ref25.isInverse;
614
644
  return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
615
645
  }
616
646
  }
617
647
  })
618
648
  };
619
649
  });
620
- export var NavigationBarAction = function NavigationBarAction(_ref25) {
621
- var children = _ref25.children,
622
- touchableProps = _objectWithoutProperties(_ref25, _excluded2);
650
+ export var NavigationBarAction = function NavigationBarAction(_ref26) {
651
+ var children = _ref26.children,
652
+ touchableProps = _objectWithoutProperties(_ref26, _excluded2);
623
653
 
624
654
  var isInverse = useIsInverseVariant();
625
655
  var classes = useNavigationBarActionStyles({
@@ -11,12 +11,15 @@ var useStyles = createUseStyles(function (_ref) {
11
11
  },
12
12
  bar: {
13
13
  height: '100%',
14
- backgroundColor: colors.controlActivated,
14
+ backgroundColor: function backgroundColor(_ref2) {
15
+ var color = _ref2.color;
16
+ return color !== null && color !== void 0 ? color : colors.controlActivated;
17
+ },
15
18
  transition: "max-width ".concat(transition),
16
19
  animation: "$bar ".concat(transition),
17
20
  borderRadius: 2,
18
- maxWidth: function maxWidth(_ref2) {
19
- var progressPercent = _ref2.progressPercent;
21
+ maxWidth: function maxWidth(_ref3) {
22
+ var progressPercent = _ref3.progressPercent;
20
23
  return "".concat(progressPercent, "%");
21
24
  }
22
25
  },
@@ -28,10 +31,12 @@ var useStyles = createUseStyles(function (_ref) {
28
31
  };
29
32
  });
30
33
 
31
- var ProgressBar = function ProgressBar(_ref3) {
32
- var progressPercent = _ref3.progressPercent;
34
+ var ProgressBar = function ProgressBar(_ref4) {
35
+ var progressPercent = _ref4.progressPercent,
36
+ color = _ref4.color;
33
37
  var classes = useStyles({
34
- progressPercent: progressPercent
38
+ progressPercent: progressPercent,
39
+ color: color
35
40
  });
36
41
  return /*#__PURE__*/React.createElement("div", {
37
42
  className: classes.barBackground,