@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.
- package/CHANGELOG.md +40 -0
- package/dist/button-group.d.ts +9 -0
- package/dist/button-group.js +67 -0
- package/dist/button-group.js.flow +11 -0
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -1
- package/dist/button.js.flow +1 -1
- package/dist/callout.d.ts +2 -1
- package/dist/callout.js +15 -21
- package/dist/callout.js.flow +2 -3
- package/dist/card.d.ts +1 -1
- package/dist/card.js +41 -48
- package/dist/date-field.js +8 -0
- package/dist/date-time-field.js +8 -0
- package/dist/date-time-picker.d.ts +1 -0
- package/dist/date-time-picker.js +55 -20
- package/dist/date-time-picker.js.flow +1 -0
- package/dist/decimal-field.d.ts +1 -0
- package/dist/decimal-field.js.flow +1 -0
- package/dist/empty-state-card.d.ts +4 -3
- package/dist/empty-state-card.js +18 -24
- package/dist/empty-state-card.js.flow +2 -3
- package/dist/empty-state.d.ts +2 -2
- package/dist/empty-state.js +51 -9
- package/dist/feedback.d.ts +2 -7
- package/dist/feedback.js +38 -60
- package/dist/feedback.js.flow +2 -6
- package/dist/header.js +37 -67
- package/dist/index.d.ts +4 -1
- package/dist/index.js +28 -0
- package/dist/index.js.flow +4 -0
- package/dist/month-field.d.ts +9 -0
- package/dist/month-field.js +192 -0
- package/dist/month-field.js.flow +13 -0
- package/dist/navigation-bar.js +102 -72
- package/dist/progress-bar.d.ts +1 -0
- package/dist/progress-bar.js +11 -6
- package/dist/progress-bar.js.flow +4 -1
- package/dist/skins/blau.d.ts +37 -0
- package/dist/skins/blau.js +238 -0
- package/dist/skins/blau.js.flow +39 -0
- package/dist/skins/constants.d.ts +1 -0
- package/dist/skins/constants.js +4 -2
- package/dist/skins/constants.js.flow +1 -0
- package/dist/skins/telefonica.js +1 -1
- package/dist/skins/types.d.ts +1 -1
- package/dist/skins/types.js.flow +7 -1
- package/dist/skins/utils.js +5 -0
- package/dist/stepper.js +1 -1
- package/dist/text-field-base.js +8 -1
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +8 -4
- package/dist/theme.js.flow +1 -0
- package/dist/utils/time.d.ts +1 -0
- package/dist/utils/time.js +9 -1
- package/dist/utils/time.js.flow +1 -0
- package/dist-es/button-group.js +54 -0
- package/dist-es/button.js +1 -1
- package/dist-es/callout.js +15 -21
- package/dist-es/card.js +40 -47
- package/dist-es/date-field.js +7 -0
- package/dist-es/date-time-field.js +7 -0
- package/dist-es/date-time-picker.js +56 -22
- package/dist-es/empty-state-card.js +17 -23
- package/dist-es/empty-state.js +16 -9
- package/dist-es/feedback.js +37 -60
- package/dist-es/header.js +37 -67
- package/dist-es/index.js +4 -1
- package/dist-es/month-field.js +120 -0
- package/dist-es/navigation-bar.js +102 -72
- package/dist-es/progress-bar.js +11 -6
- package/dist-es/skins/blau.js +225 -0
- package/dist-es/skins/constants.js +2 -1
- package/dist-es/skins/telefonica.js +1 -1
- package/dist-es/skins/utils.js +5 -1
- package/dist-es/stepper.js +1 -1
- package/dist-es/text-field-base.js +8 -1
- package/dist-es/theme.js +8 -4
- package/dist-es/utils/time.js +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -635,6 +635,12 @@ Object.defineProperty(exports, "DateField", {
|
|
|
635
635
|
return _dateField.default;
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
|
+
Object.defineProperty(exports, "MonthField", {
|
|
639
|
+
enumerable: true,
|
|
640
|
+
get: function get() {
|
|
641
|
+
return _monthField.default;
|
|
642
|
+
}
|
|
643
|
+
});
|
|
638
644
|
Object.defineProperty(exports, "DateTimeField", {
|
|
639
645
|
enumerable: true,
|
|
640
646
|
get: function get() {
|
|
@@ -809,6 +815,12 @@ Object.defineProperty(exports, "TELEFONICA_SKIN", {
|
|
|
809
815
|
return _constants.TELEFONICA_SKIN;
|
|
810
816
|
}
|
|
811
817
|
});
|
|
818
|
+
Object.defineProperty(exports, "BLAU_SKIN", {
|
|
819
|
+
enumerable: true,
|
|
820
|
+
get: function get() {
|
|
821
|
+
return _constants.BLAU_SKIN;
|
|
822
|
+
}
|
|
823
|
+
});
|
|
812
824
|
Object.defineProperty(exports, "getSkinByName", {
|
|
813
825
|
enumerable: true,
|
|
814
826
|
get: function get() {
|
|
@@ -875,6 +887,18 @@ Object.defineProperty(exports, "telefonicaPalette", {
|
|
|
875
887
|
return _telefonica.palette;
|
|
876
888
|
}
|
|
877
889
|
});
|
|
890
|
+
Object.defineProperty(exports, "getBlauSkin", {
|
|
891
|
+
enumerable: true,
|
|
892
|
+
get: function get() {
|
|
893
|
+
return _blau.getBlauSkin;
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
Object.defineProperty(exports, "blauPalette", {
|
|
897
|
+
enumerable: true,
|
|
898
|
+
get: function get() {
|
|
899
|
+
return _blau.palette;
|
|
900
|
+
}
|
|
901
|
+
});
|
|
878
902
|
Object.defineProperty(exports, "IconAcademicFilled", {
|
|
879
903
|
enumerable: true,
|
|
880
904
|
get: function get() {
|
|
@@ -7926,6 +7950,8 @@ var _cvvField = _interopRequireDefault(require("./cvv-field"));
|
|
|
7926
7950
|
|
|
7927
7951
|
var _dateField = _interopRequireDefault(require("./date-field"));
|
|
7928
7952
|
|
|
7953
|
+
var _monthField = _interopRequireDefault(require("./month-field"));
|
|
7954
|
+
|
|
7929
7955
|
var _dateTimeField = _interopRequireDefault(require("./date-time-field"));
|
|
7930
7956
|
|
|
7931
7957
|
var _integerField = _interopRequireDefault(require("./integer-field"));
|
|
@@ -7974,6 +8000,8 @@ var _o2Classic = require("./skins/o2-classic");
|
|
|
7974
8000
|
|
|
7975
8001
|
var _telefonica = require("./skins/telefonica");
|
|
7976
8002
|
|
|
8003
|
+
var _blau = require("./skins/blau");
|
|
8004
|
+
|
|
7977
8005
|
var _iconAcademicFilled = _interopRequireDefault(require("./generated/mistica-icons/icon-academic-filled"));
|
|
7978
8006
|
|
|
7979
8007
|
var _iconAcademicLight = _interopRequireDefault(require("./generated/mistica-icons/icon-academic-light"));
|
package/dist/index.js.flow
CHANGED
|
@@ -109,6 +109,7 @@ declare export { default as CreditCardExpirationField } from "./credit-card-expi
|
|
|
109
109
|
declare export { default as CreditCardFields } from "./credit-card-fields";
|
|
110
110
|
declare export { default as CvvField } from "./cvv-field";
|
|
111
111
|
declare export { default as DateField } from "./date-field";
|
|
112
|
+
declare export { default as MonthField } from "./month-field";
|
|
112
113
|
declare export { default as DateTimeField } from "./date-time-field";
|
|
113
114
|
declare export { default as IntegerField } from "./integer-field";
|
|
114
115
|
declare export { default as DecimalField } from "./decimal-field";
|
|
@@ -145,6 +146,7 @@ declare export {
|
|
|
145
146
|
O2_SKIN,
|
|
146
147
|
MOVISTAR_SKIN,
|
|
147
148
|
TELEFONICA_SKIN,
|
|
149
|
+
BLAU_SKIN,
|
|
148
150
|
} from "./skins/constants";
|
|
149
151
|
declare export { getSkinByName } from "./skins/utils";
|
|
150
152
|
declare export { getVivoSkin } from "./skins/vivo";
|
|
@@ -152,11 +154,13 @@ declare export { getMovistarSkin } from "./skins/movistar";
|
|
|
152
154
|
declare export { getO2Skin } from "./skins/o2";
|
|
153
155
|
declare export { getO2ClassicSkin } from "./skins/o2-classic";
|
|
154
156
|
declare export { getTelefonicaSkin } from "./skins/telefonica";
|
|
157
|
+
declare export { getBlauSkin } from "./skins/blau";
|
|
155
158
|
declare export { palette as vivoPalette } from "./skins/vivo";
|
|
156
159
|
declare export { palette as movistarPalette } from "./skins/movistar";
|
|
157
160
|
declare export { palette as o2Palette } from "./skins/o2";
|
|
158
161
|
declare export { palette as o2ClassicPalette } from "./skins/o2-classic";
|
|
159
162
|
declare export { palette as telefonicaPalette } from "./skins/telefonica";
|
|
163
|
+
declare export { palette as blauPalette } from "./skins/blau";
|
|
160
164
|
declare export { Locale } from "./utils/locale";
|
|
161
165
|
declare export { TrackingEvent } from "./utils/types";
|
|
162
166
|
declare export { RegionCode } from "./utils/region-code";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CommonFormFieldProps } from './text-field-base';
|
|
3
|
+
export interface DateFieldProps extends CommonFormFieldProps {
|
|
4
|
+
onChangeValue?: (value: string, rawValue: string) => void;
|
|
5
|
+
min?: Date;
|
|
6
|
+
max?: Date;
|
|
7
|
+
}
|
|
8
|
+
declare const DateField: React.FC<DateFieldProps>;
|
|
9
|
+
export default DateField;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _formContext = require("./form-context");
|
|
13
|
+
|
|
14
|
+
var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
|
|
15
|
+
|
|
16
|
+
var _dom = require("./utils/dom");
|
|
17
|
+
|
|
18
|
+
var _environment = require("./utils/environment");
|
|
19
|
+
|
|
20
|
+
var _iconCalendarRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-calendar-regular"));
|
|
21
|
+
|
|
22
|
+
var _time = require("./utils/time");
|
|
23
|
+
|
|
24
|
+
var _hooks = require("./hooks");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
var _excluded = ["disabled", "error", "helperText", "name", "optional", "validate", "onChange", "onChangeValue", "onBlur", "value", "defaultValue", "min", "max"];
|
|
33
|
+
|
|
34
|
+
function _extends() {
|
|
35
|
+
_extends = Object.assign || function (target) {
|
|
36
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
37
|
+
var source = arguments[i];
|
|
38
|
+
|
|
39
|
+
for (var key in source) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
41
|
+
target[key] = source[key];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return target;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return _extends.apply(this, arguments);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function _objectWithoutProperties(source, excluded) {
|
|
53
|
+
if (source == null) return {};
|
|
54
|
+
|
|
55
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
56
|
+
|
|
57
|
+
var key, i;
|
|
58
|
+
|
|
59
|
+
if (Object.getOwnPropertySymbols) {
|
|
60
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
61
|
+
|
|
62
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
63
|
+
key = sourceSymbolKeys[i];
|
|
64
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
65
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
66
|
+
target[key] = source[key];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
74
|
+
if (source == null) return {};
|
|
75
|
+
var target = {};
|
|
76
|
+
var sourceKeys = Object.keys(source);
|
|
77
|
+
var key, i;
|
|
78
|
+
|
|
79
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
80
|
+
key = sourceKeys[i];
|
|
81
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
82
|
+
target[key] = source[key];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return target;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var ReactDateTimePicker = /*#__PURE__*/React.lazy(function () {
|
|
89
|
+
return import(
|
|
90
|
+
/* webpackChunkName: "date-time-picker" */
|
|
91
|
+
'./date-time-picker');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
var DateField = function DateField(_ref) {
|
|
95
|
+
var disabled = _ref.disabled,
|
|
96
|
+
error = _ref.error,
|
|
97
|
+
helperText = _ref.helperText,
|
|
98
|
+
name = _ref.name,
|
|
99
|
+
optional = _ref.optional,
|
|
100
|
+
validateProp = _ref.validate,
|
|
101
|
+
onChange = _ref.onChange,
|
|
102
|
+
onChangeValueProp = _ref.onChangeValue,
|
|
103
|
+
onBlur = _ref.onBlur,
|
|
104
|
+
value = _ref.value,
|
|
105
|
+
defaultValue = _ref.defaultValue,
|
|
106
|
+
min = _ref.min,
|
|
107
|
+
max = _ref.max,
|
|
108
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
109
|
+
|
|
110
|
+
var processValue = function processValue(value) {
|
|
111
|
+
return value;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var hasNativePicker = React.useMemo(function () {
|
|
115
|
+
return (0, _dom.isInputTypeSupported)('month');
|
|
116
|
+
}, []);
|
|
117
|
+
|
|
118
|
+
var _useTheme = (0, _hooks.useTheme)(),
|
|
119
|
+
texts = _useTheme.texts;
|
|
120
|
+
|
|
121
|
+
var isInRange = function isInRange(value) {
|
|
122
|
+
if (min && value && value < (0, _time.getLocalYearMonthString)(min)) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (max && value && value > (0, _time.getLocalYearMonthString)(max)) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return true;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
var validate = function validate(value, rawValue) {
|
|
134
|
+
if (!isInRange(value)) {
|
|
135
|
+
return texts.formDateOutOfRangeError;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return validateProp === null || validateProp === void 0 ? void 0 : validateProp(value, rawValue);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
var onChangeValue = function onChangeValue(value, rawValue) {
|
|
142
|
+
if (isInRange(value)) {
|
|
143
|
+
onChangeValueProp === null || onChangeValueProp === void 0 ? void 0 : onChangeValueProp(value, rawValue);
|
|
144
|
+
} // if not in range, onChangeValue is not called
|
|
145
|
+
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
var fieldProps = (0, _formContext.useFieldProps)({
|
|
149
|
+
name: name,
|
|
150
|
+
value: value,
|
|
151
|
+
defaultValue: defaultValue,
|
|
152
|
+
processValue: processValue,
|
|
153
|
+
helperText: helperText,
|
|
154
|
+
optional: optional,
|
|
155
|
+
error: error,
|
|
156
|
+
disabled: disabled,
|
|
157
|
+
onBlur: onBlur,
|
|
158
|
+
validate: validate,
|
|
159
|
+
onChange: onChange,
|
|
160
|
+
onChangeValue: onChangeValue
|
|
161
|
+
});
|
|
162
|
+
var nativePicker = /*#__PURE__*/React.createElement(_textFieldBase.default, _extends({}, rest, fieldProps, {
|
|
163
|
+
min: min ? (0, _time.getLocalYearMonthString)(min) : undefined,
|
|
164
|
+
max: max ? (0, _time.getLocalYearMonthString)(max) : undefined,
|
|
165
|
+
type: "month",
|
|
166
|
+
endIconOverlay: /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
style: {
|
|
168
|
+
position: 'absolute',
|
|
169
|
+
top: 16,
|
|
170
|
+
right: 16,
|
|
171
|
+
pointerEvents: 'none'
|
|
172
|
+
}
|
|
173
|
+
}, /*#__PURE__*/React.createElement(_iconCalendarRegular.default, null))
|
|
174
|
+
}));
|
|
175
|
+
|
|
176
|
+
if (hasNativePicker || (0, _environment.isServerSide)()) {
|
|
177
|
+
return nativePicker;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return /*#__PURE__*/React.createElement(React.Suspense, {
|
|
181
|
+
fallback: nativePicker
|
|
182
|
+
}, /*#__PURE__*/React.createElement(ReactDateTimePicker, _extends({}, rest, fieldProps, {
|
|
183
|
+
optional: optional,
|
|
184
|
+
isValidDate: function isValidDate(currentDate) {
|
|
185
|
+
return isInRange((0, _time.getLocalYearMonthString)(currentDate.toDate()));
|
|
186
|
+
},
|
|
187
|
+
mode: "year-month"
|
|
188
|
+
})));
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
var _default = DateField;
|
|
192
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import type { CommonFormFieldProps } from "./text-field-base";
|
|
5
|
+
export type DateFieldProps = {|
|
|
6
|
+
...$Exact<CommonFormFieldProps>,
|
|
7
|
+
|
|
8
|
+
onChangeValue?: (value: string, rawValue: string) => void,
|
|
9
|
+
min?: Date,
|
|
10
|
+
max?: Date,
|
|
11
|
+
|};
|
|
12
|
+
declare var DateField: React.ComponentType<DateFieldProps>;
|
|
13
|
+
declare export default typeof DateField;
|
package/dist/navigation-bar.js
CHANGED
|
@@ -307,13 +307,38 @@ var TelefonicaLogo = function TelefonicaLogo(_ref4) {
|
|
|
307
307
|
})));
|
|
308
308
|
};
|
|
309
309
|
|
|
310
|
-
var
|
|
311
|
-
var _size;
|
|
312
|
-
|
|
310
|
+
var BlauLogo = function BlauLogo(_ref5) {
|
|
313
311
|
var size = _ref5.size;
|
|
314
312
|
|
|
315
313
|
var _useTheme5 = (0, _hooks.useTheme)(),
|
|
316
|
-
|
|
314
|
+
colors = _useTheme5.colors,
|
|
315
|
+
isDarkMode = _useTheme5.isDarkMode;
|
|
316
|
+
|
|
317
|
+
var isInverse = (0, _themeVariantContext.useIsInverseVariant)();
|
|
318
|
+
var color = isInverse && !isDarkMode ? colors.inverse : colors.brand;
|
|
319
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
320
|
+
height: size,
|
|
321
|
+
viewBox: "0 0 100 44",
|
|
322
|
+
role: "presentation"
|
|
323
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
324
|
+
fill: "none",
|
|
325
|
+
fillRule: "evenodd"
|
|
326
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
327
|
+
fill: colors.textLink,
|
|
328
|
+
d: "M0 35.184h100v8.2h-100z"
|
|
329
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
330
|
+
fill: color,
|
|
331
|
+
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"
|
|
332
|
+
})));
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
var NavigationBarLogo = function NavigationBarLogo(_ref6) {
|
|
336
|
+
var _size;
|
|
337
|
+
|
|
338
|
+
var size = _ref6.size;
|
|
339
|
+
|
|
340
|
+
var _useTheme6 = (0, _hooks.useTheme)(),
|
|
341
|
+
skinName = _useTheme6.skinName;
|
|
317
342
|
|
|
318
343
|
var _useScreenSize = (0, _hooks.useScreenSize)(),
|
|
319
344
|
isTabletOrSmaller = _useScreenSize.isTabletOrSmaller;
|
|
@@ -342,6 +367,11 @@ var NavigationBarLogo = function NavigationBarLogo(_ref5) {
|
|
|
342
367
|
size: size
|
|
343
368
|
});
|
|
344
369
|
|
|
370
|
+
case 'Blau':
|
|
371
|
+
return /*#__PURE__*/React.createElement(BlauLogo, {
|
|
372
|
+
size: size
|
|
373
|
+
});
|
|
374
|
+
|
|
345
375
|
default:
|
|
346
376
|
return null;
|
|
347
377
|
}
|
|
@@ -372,8 +402,8 @@ var useBurgerStyles = (0, _jss.createUseStyles)(function () {
|
|
|
372
402
|
};
|
|
373
403
|
});
|
|
374
404
|
|
|
375
|
-
var BurgerMenuIcon = function BurgerMenuIcon(
|
|
376
|
-
var isOpen =
|
|
405
|
+
var BurgerMenuIcon = function BurgerMenuIcon(_ref7) {
|
|
406
|
+
var isOpen = _ref7.isOpen;
|
|
377
407
|
var classes = useBurgerStyles();
|
|
378
408
|
return /*#__PURE__*/React.createElement("div", {
|
|
379
409
|
className: classes.burgerIconContainer,
|
|
@@ -402,8 +432,8 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
402
432
|
},
|
|
403
433
|
notFixedPadding: {
|
|
404
434
|
width: '100%',
|
|
405
|
-
padding: function padding(
|
|
406
|
-
var paddingX =
|
|
435
|
+
padding: function padding(_ref8) {
|
|
436
|
+
var paddingX = _ref8.paddingX;
|
|
407
437
|
return "0 ".concat(paddingX, "px");
|
|
408
438
|
}
|
|
409
439
|
},
|
|
@@ -411,26 +441,26 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
411
441
|
width: '100%',
|
|
412
442
|
display: 'flex',
|
|
413
443
|
alignItems: 'center',
|
|
414
|
-
background: function background(
|
|
415
|
-
var isInverse =
|
|
444
|
+
background: function background(_ref9) {
|
|
445
|
+
var isInverse = _ref9.isInverse;
|
|
416
446
|
return isInverse ? theme.colors.navigationBarBackground : theme.colors.background;
|
|
417
447
|
},
|
|
418
448
|
height: DESKTOP_NAVBAR_HEIGHT,
|
|
419
449
|
padding: '16px 0',
|
|
420
450
|
borderBottomStyle: 'solid',
|
|
421
|
-
borderBottomWidth: function borderBottomWidth(
|
|
422
|
-
var withBorder =
|
|
451
|
+
borderBottomWidth: function borderBottomWidth(_ref10) {
|
|
452
|
+
var withBorder = _ref10.withBorder;
|
|
423
453
|
return withBorder ? 1 : 0;
|
|
424
454
|
},
|
|
425
|
-
borderColor: function borderColor(
|
|
426
|
-
var isInverse =
|
|
455
|
+
borderColor: function borderColor(_ref11) {
|
|
456
|
+
var isInverse = _ref11.isInverse;
|
|
427
457
|
return isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
|
|
428
458
|
}
|
|
429
459
|
}, theme.mq.tabletOrSmaller, {
|
|
430
460
|
transition: 'border-color 300ms',
|
|
431
|
-
borderColor: function borderColor(
|
|
432
|
-
var isMenuOpen =
|
|
433
|
-
isInverse =
|
|
461
|
+
borderColor: function borderColor(_ref12) {
|
|
462
|
+
var isMenuOpen = _ref12.isMenuOpen,
|
|
463
|
+
isInverse = _ref12.isInverse;
|
|
434
464
|
return isMenuOpen || isInverse && !theme.isDarkMode ? 'transparent' : theme.colors.divider;
|
|
435
465
|
},
|
|
436
466
|
height: MOBILE_NAVBAR_HEIGHT,
|
|
@@ -445,15 +475,15 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
445
475
|
transition: 'border-color 300ms ease-in-out'
|
|
446
476
|
}, theme.mq.supportsHover, {
|
|
447
477
|
'&:hover span': {
|
|
448
|
-
color: function color(
|
|
449
|
-
var isInverse =
|
|
478
|
+
color: function color(_ref13) {
|
|
479
|
+
var isInverse = _ref13.isInverse;
|
|
450
480
|
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
451
481
|
}
|
|
452
482
|
}
|
|
453
483
|
}),
|
|
454
484
|
selectedSection: {
|
|
455
|
-
borderColor: function borderColor(
|
|
456
|
-
var isInverse =
|
|
485
|
+
borderColor: function borderColor(_ref14) {
|
|
486
|
+
var isInverse = _ref14.isInverse;
|
|
457
487
|
return isInverse ? theme.colors.inverse : theme.colors.controlActivated;
|
|
458
488
|
}
|
|
459
489
|
},
|
|
@@ -471,8 +501,8 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
471
501
|
height: "calc(100vh - ".concat(MOBILE_NAVBAR_HEIGHT, "px)"),
|
|
472
502
|
overflowY: 'auto',
|
|
473
503
|
background: theme.colors.background,
|
|
474
|
-
boxShadow: function boxShadow(
|
|
475
|
-
var menuTransitionState =
|
|
504
|
+
boxShadow: function boxShadow(_ref15) {
|
|
505
|
+
var menuTransitionState = _ref15.menuTransitionState;
|
|
476
506
|
return menuTransitionState !== 'closed' ? "6px 0 4px -4px rgba(0, 0, 0, ".concat(shadowAlpha, ")") : 'none';
|
|
477
507
|
},
|
|
478
508
|
transition: "transform ".concat(BURGER_MENU_ANIMATION_DURATION_MS, "ms ease-out")
|
|
@@ -490,14 +520,14 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
490
520
|
transform: 'translate(-100vw)'
|
|
491
521
|
},
|
|
492
522
|
iconButton: _defineProperty({
|
|
493
|
-
color: function color(
|
|
494
|
-
var isInverse =
|
|
523
|
+
color: function color(_ref16) {
|
|
524
|
+
var isInverse = _ref16.isInverse;
|
|
495
525
|
return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
|
|
496
526
|
}
|
|
497
527
|
}, theme.mq.supportsHover, {
|
|
498
528
|
'&:hover': {
|
|
499
|
-
color: function color(
|
|
500
|
-
var isInverse =
|
|
529
|
+
color: function color(_ref17) {
|
|
530
|
+
var isInverse = _ref17.isInverse;
|
|
501
531
|
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
502
532
|
}
|
|
503
533
|
}
|
|
@@ -505,20 +535,20 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
505
535
|
};
|
|
506
536
|
});
|
|
507
537
|
|
|
508
|
-
var MainNavigationBar = function MainNavigationBar(
|
|
538
|
+
var MainNavigationBar = function MainNavigationBar(_ref18) {
|
|
509
539
|
var _logo;
|
|
510
540
|
|
|
511
|
-
var sections =
|
|
512
|
-
selectedIndex =
|
|
513
|
-
right =
|
|
514
|
-
logo =
|
|
515
|
-
|
|
516
|
-
isInverse =
|
|
517
|
-
|
|
518
|
-
topFixed =
|
|
541
|
+
var sections = _ref18.sections,
|
|
542
|
+
selectedIndex = _ref18.selectedIndex,
|
|
543
|
+
right = _ref18.right,
|
|
544
|
+
logo = _ref18.logo,
|
|
545
|
+
_ref18$isInverse = _ref18.isInverse,
|
|
546
|
+
isInverse = _ref18$isInverse === void 0 ? false : _ref18$isInverse,
|
|
547
|
+
_ref18$topFixed = _ref18.topFixed,
|
|
548
|
+
topFixed = _ref18$topFixed === void 0 ? true : _ref18$topFixed;
|
|
519
549
|
|
|
520
|
-
var
|
|
521
|
-
texts =
|
|
550
|
+
var _useTheme7 = (0, _hooks.useTheme)(),
|
|
551
|
+
texts = _useTheme7.texts;
|
|
522
552
|
|
|
523
553
|
var _React$useState = React.useState(false),
|
|
524
554
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -634,9 +664,9 @@ var MainNavigationBar = function MainNavigationBar(_ref17) {
|
|
|
634
664
|
alignItems: "center"
|
|
635
665
|
}, logo, /*#__PURE__*/React.createElement("nav", null, /*#__PURE__*/React.createElement(_inline.default, {
|
|
636
666
|
space: 32
|
|
637
|
-
}, sections.map(function (
|
|
638
|
-
var title =
|
|
639
|
-
touchableProps = _objectWithoutProperties(
|
|
667
|
+
}, sections.map(function (_ref19, idx) {
|
|
668
|
+
var title = _ref19.title,
|
|
669
|
+
touchableProps = _objectWithoutProperties(_ref19, _excluded);
|
|
640
670
|
|
|
641
671
|
return /*#__PURE__*/React.createElement(_touchable.default, _extends({}, touchableProps, {
|
|
642
672
|
key: idx,
|
|
@@ -651,20 +681,20 @@ var MainNavigationBar = function MainNavigationBar(_ref17) {
|
|
|
651
681
|
|
|
652
682
|
exports.MainNavigationBar = MainNavigationBar;
|
|
653
683
|
|
|
654
|
-
var NavigationBar = function NavigationBar(
|
|
655
|
-
var onBack =
|
|
656
|
-
title =
|
|
657
|
-
right =
|
|
658
|
-
|
|
659
|
-
isInverse =
|
|
660
|
-
|
|
661
|
-
topFixed =
|
|
662
|
-
paddingX =
|
|
663
|
-
|
|
664
|
-
withBorder =
|
|
684
|
+
var NavigationBar = function NavigationBar(_ref20) {
|
|
685
|
+
var onBack = _ref20.onBack,
|
|
686
|
+
title = _ref20.title,
|
|
687
|
+
right = _ref20.right,
|
|
688
|
+
_ref20$isInverse = _ref20.isInverse,
|
|
689
|
+
isInverse = _ref20$isInverse === void 0 ? false : _ref20$isInverse,
|
|
690
|
+
_ref20$topFixed = _ref20.topFixed,
|
|
691
|
+
topFixed = _ref20$topFixed === void 0 ? true : _ref20$topFixed,
|
|
692
|
+
paddingX = _ref20.paddingX,
|
|
693
|
+
_ref20$withBorder = _ref20.withBorder,
|
|
694
|
+
withBorder = _ref20$withBorder === void 0 ? true : _ref20$withBorder;
|
|
665
695
|
|
|
666
|
-
var
|
|
667
|
-
texts =
|
|
696
|
+
var _useTheme8 = (0, _hooks.useTheme)(),
|
|
697
|
+
texts = _useTheme8.texts;
|
|
668
698
|
|
|
669
699
|
var classes = useStyles({
|
|
670
700
|
isInverse: isInverse,
|
|
@@ -702,13 +732,13 @@ var NavigationBar = function NavigationBar(_ref19) {
|
|
|
702
732
|
|
|
703
733
|
exports.NavigationBar = NavigationBar;
|
|
704
734
|
|
|
705
|
-
var FunnelNavigationBar = function FunnelNavigationBar(
|
|
706
|
-
var logo =
|
|
707
|
-
right =
|
|
708
|
-
|
|
709
|
-
isInverse =
|
|
710
|
-
|
|
711
|
-
topFixed =
|
|
735
|
+
var FunnelNavigationBar = function FunnelNavigationBar(_ref21) {
|
|
736
|
+
var logo = _ref21.logo,
|
|
737
|
+
right = _ref21.right,
|
|
738
|
+
_ref21$isInverse = _ref21.isInverse,
|
|
739
|
+
isInverse = _ref21$isInverse === void 0 ? false : _ref21$isInverse,
|
|
740
|
+
_ref21$topFixed = _ref21.topFixed,
|
|
741
|
+
topFixed = _ref21$topFixed === void 0 ? true : _ref21$topFixed;
|
|
712
742
|
var classes = useStyles({
|
|
713
743
|
isInverse: isInverse,
|
|
714
744
|
withBorder: true
|
|
@@ -738,8 +768,8 @@ var useNavigationBarActionGroupStyles = (0, _jss.createUseStyles)(function () {
|
|
|
738
768
|
};
|
|
739
769
|
});
|
|
740
770
|
|
|
741
|
-
var NavigationBarActionGroup = function NavigationBarActionGroup(
|
|
742
|
-
var children =
|
|
771
|
+
var NavigationBarActionGroup = function NavigationBarActionGroup(_ref22) {
|
|
772
|
+
var children = _ref22.children;
|
|
743
773
|
var classes = useNavigationBarActionGroupStyles();
|
|
744
774
|
return /*#__PURE__*/React.createElement("div", {
|
|
745
775
|
className: classes.lineHeightFix
|
|
@@ -755,21 +785,21 @@ var useNavigationBarActionStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
755
785
|
touchable: _defineProperty({
|
|
756
786
|
lineHeight: 0,
|
|
757
787
|
'& svg': {
|
|
758
|
-
color: function color(
|
|
759
|
-
var isInverse =
|
|
788
|
+
color: function color(_ref23) {
|
|
789
|
+
var isInverse = _ref23.isInverse;
|
|
760
790
|
return isInverse ? theme.colors.inverse : theme.colors.neutralHigh;
|
|
761
791
|
}
|
|
762
792
|
}
|
|
763
793
|
}, theme.mq.supportsHover, {
|
|
764
794
|
'&:hover span': {
|
|
765
|
-
color: function color(
|
|
766
|
-
var isInverse =
|
|
795
|
+
color: function color(_ref24) {
|
|
796
|
+
var isInverse = _ref24.isInverse;
|
|
767
797
|
return isInverse ? theme.colors.textSecondaryInverse : theme.colors.textSecondary;
|
|
768
798
|
}
|
|
769
799
|
},
|
|
770
800
|
'&:hover svg': {
|
|
771
|
-
color: function color(
|
|
772
|
-
var isInverse =
|
|
801
|
+
color: function color(_ref25) {
|
|
802
|
+
var isInverse = _ref25.isInverse;
|
|
773
803
|
return isInverse ? theme.colors.inverse : theme.colors.neutralMedium;
|
|
774
804
|
}
|
|
775
805
|
}
|
|
@@ -777,9 +807,9 @@ var useNavigationBarActionStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
777
807
|
};
|
|
778
808
|
});
|
|
779
809
|
|
|
780
|
-
var NavigationBarAction = function NavigationBarAction(
|
|
781
|
-
var children =
|
|
782
|
-
touchableProps = _objectWithoutProperties(
|
|
810
|
+
var NavigationBarAction = function NavigationBarAction(_ref26) {
|
|
811
|
+
var children = _ref26.children,
|
|
812
|
+
touchableProps = _objectWithoutProperties(_ref26, _excluded2);
|
|
783
813
|
|
|
784
814
|
var isInverse = (0, _themeVariantContext.useIsInverseVariant)();
|
|
785
815
|
var classes = useNavigationBarActionStyles({
|
package/dist/progress-bar.d.ts
CHANGED
package/dist/progress-bar.js
CHANGED
|
@@ -26,12 +26,15 @@ var useStyles = (0, _jss.createUseStyles)(function (_ref) {
|
|
|
26
26
|
},
|
|
27
27
|
bar: {
|
|
28
28
|
height: '100%',
|
|
29
|
-
backgroundColor:
|
|
29
|
+
backgroundColor: function backgroundColor(_ref2) {
|
|
30
|
+
var color = _ref2.color;
|
|
31
|
+
return color !== null && color !== void 0 ? color : colors.controlActivated;
|
|
32
|
+
},
|
|
30
33
|
transition: "max-width ".concat(transition),
|
|
31
34
|
animation: "$bar ".concat(transition),
|
|
32
35
|
borderRadius: 2,
|
|
33
|
-
maxWidth: function maxWidth(
|
|
34
|
-
var progressPercent =
|
|
36
|
+
maxWidth: function maxWidth(_ref3) {
|
|
37
|
+
var progressPercent = _ref3.progressPercent;
|
|
35
38
|
return "".concat(progressPercent, "%");
|
|
36
39
|
}
|
|
37
40
|
},
|
|
@@ -43,10 +46,12 @@ var useStyles = (0, _jss.createUseStyles)(function (_ref) {
|
|
|
43
46
|
};
|
|
44
47
|
});
|
|
45
48
|
|
|
46
|
-
var ProgressBar = function ProgressBar(
|
|
47
|
-
var progressPercent =
|
|
49
|
+
var ProgressBar = function ProgressBar(_ref4) {
|
|
50
|
+
var progressPercent = _ref4.progressPercent,
|
|
51
|
+
color = _ref4.color;
|
|
48
52
|
var classes = useStyles({
|
|
49
|
-
progressPercent: progressPercent
|
|
53
|
+
progressPercent: progressPercent,
|
|
54
|
+
color: color
|
|
50
55
|
});
|
|
51
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
57
|
className: classes.barBackground,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
declare type Props = {
|
|
4
|
+
declare type Props = {
|
|
5
|
+
progressPercent: number,
|
|
6
|
+
color?: string,
|
|
7
|
+
};
|
|
5
8
|
declare var ProgressBar: React.ComponentType<Props>;
|
|
6
9
|
declare export default typeof ProgressBar;
|