@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { GetSkin } from './types';
|
|
2
|
+
export declare const palette: {
|
|
3
|
+
readonly blauBluePrimary: "#00B6F1";
|
|
4
|
+
readonly blauBluePrimary10: "#F7FDFF";
|
|
5
|
+
readonly blauBluePrimary20: "#E5F6FD";
|
|
6
|
+
readonly blauBluePrimary30: "#B3E9FB";
|
|
7
|
+
readonly blauBlueSecondary: "#0072BC";
|
|
8
|
+
readonly blauBlueSecondary10: "#E5F1F9";
|
|
9
|
+
readonly blauBlueSecondary20: "#B2D4EC";
|
|
10
|
+
readonly blauBlueSecondary30: "#80B7DF";
|
|
11
|
+
readonly blauBlueSecondary60: "#005A99";
|
|
12
|
+
readonly blauPurple: "#7814B3";
|
|
13
|
+
readonly blauPurple10: "#F1E7F7";
|
|
14
|
+
readonly blauPurple30: "#BB89D9";
|
|
15
|
+
readonly blauYellow: "#FFA922";
|
|
16
|
+
readonly blauYellow10: "#FFF6E9";
|
|
17
|
+
readonly blauYellow60: "#F09500";
|
|
18
|
+
readonly blauYellow70: "#996614";
|
|
19
|
+
readonly blauRed: "#F64417";
|
|
20
|
+
readonly blauRed10: "#FEECE8";
|
|
21
|
+
readonly blauRed20: "#FCC7B9";
|
|
22
|
+
readonly blauRed30: "#FA9E87";
|
|
23
|
+
readonly blauRed70: "#C93712";
|
|
24
|
+
readonly blauGreen: "#30D300";
|
|
25
|
+
readonly blauGreen10: "#EAFBE5";
|
|
26
|
+
readonly blauGreen70: "#1D7F00";
|
|
27
|
+
readonly grey1: "#F5F9FA";
|
|
28
|
+
readonly grey2: "#E7E7E7";
|
|
29
|
+
readonly grey3: "#B8B8B8";
|
|
30
|
+
readonly grey4: "#A0A0A0";
|
|
31
|
+
readonly grey5: "#808285";
|
|
32
|
+
readonly grey6: "#000000";
|
|
33
|
+
readonly white: "#FFFFFF";
|
|
34
|
+
readonly darkModeBlack: "#191919";
|
|
35
|
+
readonly darkModeGrey: "#242424";
|
|
36
|
+
};
|
|
37
|
+
export declare const getBlauSkin: GetSkin;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBlauSkin = exports.palette = void 0;
|
|
7
|
+
|
|
8
|
+
var _color = require("../utils/color");
|
|
9
|
+
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
|
|
12
|
+
var palette = {
|
|
13
|
+
blauBluePrimary: '#00B6F1',
|
|
14
|
+
blauBluePrimary10: '#F7FDFF',
|
|
15
|
+
blauBluePrimary20: '#E5F6FD',
|
|
16
|
+
blauBluePrimary30: '#B3E9FB',
|
|
17
|
+
blauBlueSecondary: '#0072BC',
|
|
18
|
+
blauBlueSecondary10: '#E5F1F9',
|
|
19
|
+
blauBlueSecondary20: '#B2D4EC',
|
|
20
|
+
blauBlueSecondary30: '#80B7DF',
|
|
21
|
+
blauBlueSecondary60: '#005A99',
|
|
22
|
+
blauPurple: '#7814B3',
|
|
23
|
+
blauPurple10: '#F1E7F7',
|
|
24
|
+
blauPurple30: '#BB89D9',
|
|
25
|
+
blauYellow: '#FFA922',
|
|
26
|
+
blauYellow10: '#FFF6E9',
|
|
27
|
+
blauYellow60: '#F09500',
|
|
28
|
+
blauYellow70: '#996614',
|
|
29
|
+
blauRed: '#F64417',
|
|
30
|
+
blauRed10: '#FEECE8',
|
|
31
|
+
blauRed20: '#FCC7B9',
|
|
32
|
+
blauRed30: '#FA9E87',
|
|
33
|
+
blauRed70: '#C93712',
|
|
34
|
+
blauGreen: '#30D300',
|
|
35
|
+
blauGreen10: '#EAFBE5',
|
|
36
|
+
blauGreen70: '#1D7F00',
|
|
37
|
+
grey1: '#F5F9FA',
|
|
38
|
+
grey2: '#E7E7E7',
|
|
39
|
+
grey3: '#B8B8B8',
|
|
40
|
+
grey4: '#A0A0A0',
|
|
41
|
+
grey5: '#808285',
|
|
42
|
+
grey6: '#000000',
|
|
43
|
+
white: '#FFFFFF',
|
|
44
|
+
// specific for dark mode:
|
|
45
|
+
darkModeBlack: '#191919',
|
|
46
|
+
darkModeGrey: '#242424'
|
|
47
|
+
};
|
|
48
|
+
exports.palette = palette;
|
|
49
|
+
|
|
50
|
+
var getBlauSkin = function getBlauSkin() {
|
|
51
|
+
return {
|
|
52
|
+
name: _constants.BLAU_SKIN,
|
|
53
|
+
colors: {
|
|
54
|
+
// BACKGROUNDS
|
|
55
|
+
appBarBackground: palette.white,
|
|
56
|
+
background: palette.white,
|
|
57
|
+
backgroundContainer: palette.white,
|
|
58
|
+
backgroundBrand: palette.blauBluePrimary,
|
|
59
|
+
backgroundOverlay: (0, _color.applyAlpha)(palette.blauBlueSecondary, 0.75),
|
|
60
|
+
backgroundSkeleton: palette.grey2,
|
|
61
|
+
backgroundSkeletonInverse: palette.white,
|
|
62
|
+
navigationBarBackground: palette.blauBluePrimary,
|
|
63
|
+
backgroundAlternative: palette.blauBluePrimary20,
|
|
64
|
+
backgroundFeedbackBottom: palette.blauBluePrimary,
|
|
65
|
+
skeletonWave: palette.grey2,
|
|
66
|
+
// BORDERS
|
|
67
|
+
borderLight: palette.grey1,
|
|
68
|
+
border: palette.grey2,
|
|
69
|
+
borderDark: palette.grey5,
|
|
70
|
+
borderSelected: palette.blauBlueSecondary60,
|
|
71
|
+
// BUTTONS
|
|
72
|
+
buttonDangerBackground: palette.blauRed,
|
|
73
|
+
buttonDangerBackgroundDisabled: palette.blauRed20,
|
|
74
|
+
buttonDangerBackgroundSelected: palette.blauRed70,
|
|
75
|
+
buttonDangerBackgroundHover: palette.blauRed70,
|
|
76
|
+
buttonLinkBackgroundSelected: palette.blauPurple10,
|
|
77
|
+
buttonLinkBackgroundSelectedInverse: (0, _color.applyAlpha)(palette.white, 0.3),
|
|
78
|
+
buttonPrimaryBackground: palette.blauBlueSecondary,
|
|
79
|
+
buttonPrimaryBackgroundDisabled: palette.blauBlueSecondary20,
|
|
80
|
+
buttonPrimaryBackgroundDisabledInverse: palette.blauBlueSecondary30,
|
|
81
|
+
buttonPrimaryBackgroundInverse: palette.white,
|
|
82
|
+
buttonPrimaryBackgroundSelected: palette.blauBlueSecondary60,
|
|
83
|
+
buttonPrimaryBackgroundHover: palette.blauBlueSecondary60,
|
|
84
|
+
buttonPrimaryBackgroundSelectedInverse: palette.blauBluePrimary30,
|
|
85
|
+
buttonSecondaryBackground: palette.blauBlueSecondary,
|
|
86
|
+
buttonSecondaryBackgroundDisabled: palette.blauBlueSecondary20,
|
|
87
|
+
buttonSecondaryBackgroundSelected: palette.blauBlueSecondary60,
|
|
88
|
+
buttonSecondaryBorderDisabledInverse: palette.blauBlueSecondary20,
|
|
89
|
+
buttonSecondaryBorderInverse: palette.white,
|
|
90
|
+
buttonSecondaryBorderSelectedInverse: palette.blauBluePrimary30,
|
|
91
|
+
textButtonPrimary: palette.white,
|
|
92
|
+
textButtonPrimaryDisabled: palette.white,
|
|
93
|
+
textButtonPrimaryInverse: palette.blauBlueSecondary,
|
|
94
|
+
textButtonPrimaryInverseDisabled: palette.blauBluePrimary10,
|
|
95
|
+
textButtonPrimaryInverseSelected: palette.blauBlueSecondary60,
|
|
96
|
+
textButtonSecondary: palette.blauBlueSecondary,
|
|
97
|
+
textButtonSecondaryDisabled: palette.blauBlueSecondary30,
|
|
98
|
+
textButtonSecondarySelected: palette.blauBlueSecondary60,
|
|
99
|
+
textButtonSecondaryInverse: palette.white,
|
|
100
|
+
textButtonSecondaryInverseDisabled: palette.blauBlueSecondary20,
|
|
101
|
+
textButtonSecondaryInverseSelected: palette.white,
|
|
102
|
+
textLink: palette.blauPurple,
|
|
103
|
+
textLinkInverse: palette.white,
|
|
104
|
+
textLinkDanger: palette.blauRed,
|
|
105
|
+
textLinkDangerDisabled: palette.blauRed20,
|
|
106
|
+
textLinkDisabled: palette.blauPurple30,
|
|
107
|
+
textLinkSnackbar: palette.blauPurple30,
|
|
108
|
+
// CONTROLS
|
|
109
|
+
control: palette.grey2,
|
|
110
|
+
controlActivated: palette.blauBlueSecondary,
|
|
111
|
+
controlError: palette.blauRed,
|
|
112
|
+
loadingBar: palette.blauBlueSecondary,
|
|
113
|
+
loadingBarBackground: palette.blauBlueSecondary10,
|
|
114
|
+
loadingBarInverse: palette.blauBlueSecondary,
|
|
115
|
+
// Deprecated. Remove
|
|
116
|
+
loadingBarBackgroundInverse: palette.blauBlueSecondary10,
|
|
117
|
+
// Deprecated. Remove
|
|
118
|
+
toggleAndroidInactive: palette.grey2,
|
|
119
|
+
toggleAndroidBackgroundActive: palette.blauBlueSecondary10,
|
|
120
|
+
iosControlKnob: palette.white,
|
|
121
|
+
// DIVIDERS
|
|
122
|
+
divider: palette.grey2,
|
|
123
|
+
dividerInverse: (0, _color.applyAlpha)(palette.white, 0.2),
|
|
124
|
+
navigationBarDivider: palette.blauBluePrimary,
|
|
125
|
+
// FEEDBACKS
|
|
126
|
+
badge: palette.blauRed,
|
|
127
|
+
feedbackErrorBackground: palette.blauRed,
|
|
128
|
+
feedbackInfoBackground: palette.grey6,
|
|
129
|
+
// GLOBAL
|
|
130
|
+
brand: palette.blauBluePrimary,
|
|
131
|
+
brandDark: palette.blauBlueSecondary,
|
|
132
|
+
inverse: palette.white,
|
|
133
|
+
neutralHigh: palette.grey6,
|
|
134
|
+
neutralMedium: palette.grey5,
|
|
135
|
+
neutralLow: palette.grey2,
|
|
136
|
+
textPrimary: palette.grey6,
|
|
137
|
+
textPrimaryInverse: palette.white,
|
|
138
|
+
textSecondary: palette.grey5,
|
|
139
|
+
textSecondaryInverse: palette.white,
|
|
140
|
+
textDisabled: palette.grey3,
|
|
141
|
+
textAmount: palette.blauBlueSecondary,
|
|
142
|
+
// STATES
|
|
143
|
+
error: palette.blauRed,
|
|
144
|
+
success: palette.blauGreen,
|
|
145
|
+
warning: palette.blauYellow,
|
|
146
|
+
promo: palette.blauPurple,
|
|
147
|
+
highlight: palette.blauBluePrimary,
|
|
148
|
+
// BARS TEXTS
|
|
149
|
+
textNavigationBarPrimary: palette.white,
|
|
150
|
+
textNavigationBarSecondary: palette.blauBlueSecondary20,
|
|
151
|
+
textNavigationSearchBarHint: palette.blauBlueSecondary20,
|
|
152
|
+
textNavigationSearchBarText: palette.white,
|
|
153
|
+
textAppBar: palette.grey5,
|
|
154
|
+
textAppBarSelected: palette.blauBlueSecondary60
|
|
155
|
+
},
|
|
156
|
+
darkModeColors: {
|
|
157
|
+
// BACKGROUNDS
|
|
158
|
+
backgroundBrand: palette.darkModeBlack,
|
|
159
|
+
background: palette.darkModeBlack,
|
|
160
|
+
appBarBackground: palette.darkModeGrey,
|
|
161
|
+
backgroundContainer: palette.darkModeGrey,
|
|
162
|
+
backgroundAlternative: palette.darkModeGrey,
|
|
163
|
+
backgroundOverlay: (0, _color.applyAlpha)(palette.darkModeGrey, 0.8),
|
|
164
|
+
backgroundSkeleton: palette.darkModeGrey,
|
|
165
|
+
backgroundSkeletonInverse: palette.darkModeGrey,
|
|
166
|
+
backgroundFeedbackBottom: palette.darkModeBlack,
|
|
167
|
+
navigationBarBackground: palette.darkModeBlack,
|
|
168
|
+
skeletonWave: palette.grey5,
|
|
169
|
+
// BORDERS
|
|
170
|
+
borderLight: palette.darkModeBlack,
|
|
171
|
+
border: palette.darkModeGrey,
|
|
172
|
+
// BUTTONS
|
|
173
|
+
buttonDangerBackgroundDisabled: palette.darkModeGrey,
|
|
174
|
+
buttonLinkBackgroundSelected: (0, _color.applyAlpha)(palette.blauPurple, 0.3),
|
|
175
|
+
buttonLinkBackgroundSelectedInverse: (0, _color.applyAlpha)(palette.blauPurple, 0.3),
|
|
176
|
+
buttonPrimaryBackgroundDisabled: palette.darkModeGrey,
|
|
177
|
+
buttonPrimaryBackgroundDisabledInverse: palette.darkModeGrey,
|
|
178
|
+
buttonPrimaryBackgroundInverse: palette.blauBlueSecondary,
|
|
179
|
+
buttonPrimaryBackgroundSelected: palette.blauBlueSecondary60,
|
|
180
|
+
buttonSecondaryBackgroundDisabled: palette.darkModeGrey,
|
|
181
|
+
buttonSecondaryBorderDisabledInverse: palette.darkModeGrey,
|
|
182
|
+
buttonSecondaryBorderInverse: palette.blauBluePrimary,
|
|
183
|
+
buttonSecondaryBorderSelectedInverse: palette.blauBlueSecondary60,
|
|
184
|
+
textButtonPrimary: palette.grey2,
|
|
185
|
+
textButtonPrimaryDisabled: palette.grey5,
|
|
186
|
+
textButtonPrimaryInverse: palette.grey2,
|
|
187
|
+
textButtonPrimaryInverseDisabled: palette.grey5,
|
|
188
|
+
textButtonPrimaryInverseSelected: palette.grey2,
|
|
189
|
+
textButtonSecondary: palette.grey2,
|
|
190
|
+
textButtonSecondaryDisabled: palette.grey5,
|
|
191
|
+
textButtonSecondarySelected: palette.blauBlueSecondary60,
|
|
192
|
+
textButtonSecondaryInverse: palette.grey2,
|
|
193
|
+
textButtonSecondaryInverseDisabled: palette.grey5,
|
|
194
|
+
textButtonSecondaryInverseSelected: palette.blauBlueSecondary60,
|
|
195
|
+
textLink: palette.blauPurple30,
|
|
196
|
+
textLinkInverse: palette.blauPurple30,
|
|
197
|
+
textLinkDisabled: palette.grey5,
|
|
198
|
+
textLinkDangerDisabled: palette.grey5,
|
|
199
|
+
// CONTROLS
|
|
200
|
+
control: palette.darkModeGrey,
|
|
201
|
+
loadingBar: palette.blauBluePrimary,
|
|
202
|
+
loadingBarBackground: palette.darkModeGrey,
|
|
203
|
+
toggleAndroidInactive: palette.grey5,
|
|
204
|
+
// web only
|
|
205
|
+
toggleAndroidBackgroundActive: palette.blauBlueSecondary30,
|
|
206
|
+
// web only
|
|
207
|
+
iosControlKnob: palette.grey2,
|
|
208
|
+
// web only
|
|
209
|
+
// DIVIDERS
|
|
210
|
+
divider: (0, _color.applyAlpha)(palette.white, 0.05),
|
|
211
|
+
dividerInverse: (0, _color.applyAlpha)(palette.white, 0.05),
|
|
212
|
+
navigationBarDivider: palette.darkModeBlack,
|
|
213
|
+
// GLOBAL
|
|
214
|
+
brand: palette.blauBluePrimary,
|
|
215
|
+
brandDark: palette.grey5,
|
|
216
|
+
inverse: palette.grey2,
|
|
217
|
+
neutralHigh: palette.grey2,
|
|
218
|
+
neutralMedium: palette.grey5,
|
|
219
|
+
neutralLow: palette.darkModeGrey,
|
|
220
|
+
textPrimary: palette.grey2,
|
|
221
|
+
textPrimaryInverse: palette.grey2,
|
|
222
|
+
textSecondary: palette.grey4,
|
|
223
|
+
textSecondaryInverse: palette.grey4,
|
|
224
|
+
textDisabled: palette.grey5,
|
|
225
|
+
textAmount: palette.blauBlueSecondary,
|
|
226
|
+
textNavigationBarPrimary: palette.grey2,
|
|
227
|
+
textNavigationBarSecondary: palette.grey4,
|
|
228
|
+
textNavigationSearchBarHint: palette.grey4,
|
|
229
|
+
// iOS
|
|
230
|
+
textNavigationSearchBarText: palette.grey2,
|
|
231
|
+
// iOS
|
|
232
|
+
textAppBar: palette.grey5,
|
|
233
|
+
textAppBarSelected: palette.grey2
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
exports.getBlauSkin = getBlauSkin;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import type { GetSkin } from "./types";
|
|
4
|
+
declare export var palette: {
|
|
5
|
+
+blauBluePrimary: "#00B6F1",
|
|
6
|
+
+blauBluePrimary10: "#F7FDFF",
|
|
7
|
+
+blauBluePrimary20: "#E5F6FD",
|
|
8
|
+
+blauBluePrimary30: "#B3E9FB",
|
|
9
|
+
+blauBlueSecondary: "#0072BC",
|
|
10
|
+
+blauBlueSecondary10: "#E5F1F9",
|
|
11
|
+
+blauBlueSecondary20: "#B2D4EC",
|
|
12
|
+
+blauBlueSecondary30: "#80B7DF",
|
|
13
|
+
+blauBlueSecondary60: "#005A99",
|
|
14
|
+
+blauPurple: "#7814B3",
|
|
15
|
+
+blauPurple10: "#F1E7F7",
|
|
16
|
+
+blauPurple30: "#BB89D9",
|
|
17
|
+
+blauYellow: "#FFA922",
|
|
18
|
+
+blauYellow10: "#FFF6E9",
|
|
19
|
+
+blauYellow60: "#F09500",
|
|
20
|
+
+blauYellow70: "#996614",
|
|
21
|
+
+blauRed: "#F64417",
|
|
22
|
+
+blauRed10: "#FEECE8",
|
|
23
|
+
+blauRed20: "#FCC7B9",
|
|
24
|
+
+blauRed30: "#FA9E87",
|
|
25
|
+
+blauRed70: "#C93712",
|
|
26
|
+
+blauGreen: "#30D300",
|
|
27
|
+
+blauGreen10: "#EAFBE5",
|
|
28
|
+
+blauGreen70: "#1D7F00",
|
|
29
|
+
+grey1: "#F5F9FA",
|
|
30
|
+
+grey2: "#E7E7E7",
|
|
31
|
+
+grey3: "#B8B8B8",
|
|
32
|
+
+grey4: "#A0A0A0",
|
|
33
|
+
+grey5: "#808285",
|
|
34
|
+
+grey6: "#000000",
|
|
35
|
+
+white: "#FFFFFF",
|
|
36
|
+
+darkModeBlack: "#191919",
|
|
37
|
+
+darkModeGrey: "#242424",
|
|
38
|
+
};
|
|
39
|
+
declare export var getBlauSkin: GetSkin;
|
package/dist/skins/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TELEFONICA_SKIN = exports.VIVO_SKIN = exports.O2_CLASSIC_SKIN = exports.O2_SKIN = exports.MOVISTAR_SKIN = void 0;
|
|
6
|
+
exports.BLAU_SKIN = exports.TELEFONICA_SKIN = exports.VIVO_SKIN = exports.O2_CLASSIC_SKIN = exports.O2_SKIN = exports.MOVISTAR_SKIN = void 0;
|
|
7
7
|
var MOVISTAR_SKIN = 'Movistar';
|
|
8
8
|
exports.MOVISTAR_SKIN = MOVISTAR_SKIN;
|
|
9
9
|
var O2_SKIN = 'O2';
|
|
@@ -13,4 +13,6 @@ exports.O2_CLASSIC_SKIN = O2_CLASSIC_SKIN;
|
|
|
13
13
|
var VIVO_SKIN = 'Vivo';
|
|
14
14
|
exports.VIVO_SKIN = VIVO_SKIN;
|
|
15
15
|
var TELEFONICA_SKIN = 'Telefonica';
|
|
16
|
-
exports.TELEFONICA_SKIN = TELEFONICA_SKIN;
|
|
16
|
+
exports.TELEFONICA_SKIN = TELEFONICA_SKIN;
|
|
17
|
+
var BLAU_SKIN = 'Blau';
|
|
18
|
+
exports.BLAU_SKIN = BLAU_SKIN;
|
package/dist/skins/telefonica.js
CHANGED
|
@@ -199,7 +199,7 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
199
199
|
textLink: palette.telefonicaBlue,
|
|
200
200
|
textLinkInverse: palette.telefonicaBlue,
|
|
201
201
|
textLinkDisabled: palette.grey6,
|
|
202
|
-
control: palette.
|
|
202
|
+
control: palette.darkModeGrey,
|
|
203
203
|
controlActivated: palette.telefonicaBlue,
|
|
204
204
|
loadingBar: palette.telefonicaBlue,
|
|
205
205
|
loadingBarBackground: (0, _color.applyAlpha)(palette.white, 0.05),
|
package/dist/skins/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type SkinVariant = 'prominent';
|
|
2
|
-
export declare type SkinName = 'Movistar' | 'O2' | 'O2-classic' | 'Vivo' | 'Telefonica';
|
|
2
|
+
export declare type SkinName = 'Movistar' | 'O2' | 'O2-classic' | 'Vivo' | 'Telefonica' | 'Blau';
|
|
3
3
|
export declare type GetSkin = (variant?: SkinVariant) => Skin;
|
|
4
4
|
export declare type Skin = {
|
|
5
5
|
name: SkinName;
|
package/dist/skins/types.js.flow
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
export type SkinVariant = "prominent";
|
|
4
|
-
export type SkinName =
|
|
4
|
+
export type SkinName =
|
|
5
|
+
| "Movistar"
|
|
6
|
+
| "O2"
|
|
7
|
+
| "O2-classic"
|
|
8
|
+
| "Vivo"
|
|
9
|
+
| "Telefonica"
|
|
10
|
+
| "Blau";
|
|
5
11
|
export type GetSkin = (variant?: SkinVariant) => Skin;
|
|
6
12
|
export type Skin = {
|
|
7
13
|
name: SkinName,
|
package/dist/skins/utils.js
CHANGED
|
@@ -7,6 +7,8 @@ exports.getSkinByName = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _constants = require("./constants");
|
|
9
9
|
|
|
10
|
+
var _blau = require("./blau");
|
|
11
|
+
|
|
10
12
|
var _telefonica = require("./telefonica");
|
|
11
13
|
|
|
12
14
|
var _vivo = require("./vivo");
|
|
@@ -19,6 +21,9 @@ var _movistar = require("./movistar");
|
|
|
19
21
|
|
|
20
22
|
var getSkinByName = function getSkinByName(name, variant) {
|
|
21
23
|
switch (name) {
|
|
24
|
+
case _constants.BLAU_SKIN:
|
|
25
|
+
return (0, _blau.getBlauSkin)(variant);
|
|
26
|
+
|
|
22
27
|
case _constants.TELEFONICA_SKIN:
|
|
23
28
|
return (0, _telefonica.getTelefonicaSkin)(variant);
|
|
24
29
|
|
package/dist/stepper.js
CHANGED
package/dist/text-field-base.js
CHANGED
|
@@ -315,6 +315,10 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
315
315
|
// Chrome: hide value if not valid or focused
|
|
316
316
|
// `opacity: 0` is needed when min/max is set and some parts of the date are disabled
|
|
317
317
|
// be sure to check that case when updating these styles
|
|
318
|
+
'&[type="month"]:not(:valid):not(:focus)::-webkit-datetime-edit': {
|
|
319
|
+
color: 'transparent',
|
|
320
|
+
opacity: 0
|
|
321
|
+
},
|
|
318
322
|
'&[type="date"]:not(:valid):not(:focus)::-webkit-datetime-edit': {
|
|
319
323
|
color: 'transparent',
|
|
320
324
|
opacity: 0
|
|
@@ -325,6 +329,9 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
325
329
|
},
|
|
326
330
|
// Firefox: hide value if not valid or focused
|
|
327
331
|
// Only apply when Firefox, otherwise it breaks styles in safari mobile
|
|
332
|
+
'&[type="month"]:not(:valid):not(:focus)': (0, _platform.isFirefox)() ? {
|
|
333
|
+
color: 'transparent'
|
|
334
|
+
} : {},
|
|
328
335
|
'&[type="date"]:not(:valid):not(:focus)': (0, _platform.isFirefox)() ? {
|
|
329
336
|
color: 'transparent'
|
|
330
337
|
} : {},
|
|
@@ -439,7 +446,7 @@ var TextFieldBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref14, ref
|
|
|
439
446
|
var hasLabel = !!label || !rest.required; // this shrinkLabel override is a workaround because I was unable to find a way to hide date
|
|
440
447
|
// and date-time native placeholders when the input is not required
|
|
441
448
|
|
|
442
|
-
var shrinkLabel = shrinkLabelProp || (rest.type === 'date' || rest.type === 'datetime-local') && !rest.required;
|
|
449
|
+
var shrinkLabel = shrinkLabelProp || (rest.type === 'date' || rest.type === 'datetime-local' || rest.type === 'month') && !rest.required;
|
|
443
450
|
var classes = useStyles({
|
|
444
451
|
inputState: inputState,
|
|
445
452
|
error: error,
|
package/dist/theme.d.ts
CHANGED
package/dist/theme.js
CHANGED
|
@@ -96,7 +96,8 @@ var TEXTS_ES = {
|
|
|
96
96
|
menuLabelSuffix: 'menú',
|
|
97
97
|
openNavigationMenu: 'Abrir menú de navegación',
|
|
98
98
|
closeNavigationMenu: 'Cerrar menú de navegación',
|
|
99
|
-
backNavigationBar: 'Atrás'
|
|
99
|
+
backNavigationBar: 'Atrás',
|
|
100
|
+
clearButton: 'Borrar'
|
|
100
101
|
};
|
|
101
102
|
var TEXTS_EN = {
|
|
102
103
|
expirationDatePlaceholder: 'MM/YY',
|
|
@@ -125,7 +126,8 @@ var TEXTS_EN = {
|
|
|
125
126
|
menuLabelSuffix: 'menu',
|
|
126
127
|
openNavigationMenu: 'Open navigation menu',
|
|
127
128
|
closeNavigationMenu: 'Close navigation menu',
|
|
128
|
-
backNavigationBar: 'Back'
|
|
129
|
+
backNavigationBar: 'Back',
|
|
130
|
+
clearButton: 'Clear'
|
|
129
131
|
};
|
|
130
132
|
var TEXTS_DE = {
|
|
131
133
|
expirationDatePlaceholder: 'MM/JJ',
|
|
@@ -154,7 +156,8 @@ var TEXTS_DE = {
|
|
|
154
156
|
menuLabelSuffix: 'Menü',
|
|
155
157
|
openNavigationMenu: 'Navigationsmenü öffnen',
|
|
156
158
|
closeNavigationMenu: 'Navigationsmenü schließen',
|
|
157
|
-
backNavigationBar: 'Zurück'
|
|
159
|
+
backNavigationBar: 'Zurück',
|
|
160
|
+
clearButton: 'Löschen'
|
|
158
161
|
};
|
|
159
162
|
var TEXTS_PT = {
|
|
160
163
|
expirationDatePlaceholder: 'MM/AA',
|
|
@@ -183,7 +186,8 @@ var TEXTS_PT = {
|
|
|
183
186
|
menuLabelSuffix: 'menu',
|
|
184
187
|
openNavigationMenu: 'Abrir menu de navegação',
|
|
185
188
|
closeNavigationMenu: 'Fechar menu de navegação',
|
|
186
|
-
backNavigationBar: 'Voltar'
|
|
189
|
+
backNavigationBar: 'Voltar',
|
|
190
|
+
clearButton: 'Apagar'
|
|
187
191
|
};
|
|
188
192
|
|
|
189
193
|
var getTexts = function getTexts(locale) {
|
package/dist/theme.js.flow
CHANGED
package/dist/utils/time.d.ts
CHANGED
package/dist/utils/time.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getLocalDateTimeString = exports.getLocalDateString = void 0;
|
|
6
|
+
exports.getLocalDateTimeString = exports.getLocalYearMonthString = exports.getLocalDateString = void 0;
|
|
7
7
|
|
|
8
8
|
var getLocalDateString = function getLocalDateString(date) {
|
|
9
9
|
var yyyy = date.getFullYear();
|
|
@@ -14,6 +14,14 @@ var getLocalDateString = function getLocalDateString(date) {
|
|
|
14
14
|
|
|
15
15
|
exports.getLocalDateString = getLocalDateString;
|
|
16
16
|
|
|
17
|
+
var getLocalYearMonthString = function getLocalYearMonthString(date) {
|
|
18
|
+
var yyyy = date.getFullYear();
|
|
19
|
+
var mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
20
|
+
return "".concat(yyyy, "-").concat(mm);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.getLocalYearMonthString = getLocalYearMonthString;
|
|
24
|
+
|
|
17
25
|
var getLocalDateTimeString = function getLocalDateTimeString(date) {
|
|
18
26
|
var h = String(date.getHours()).padStart(2, '0');
|
|
19
27
|
var m = String(date.getMinutes()).padStart(2, '0');
|
package/dist/utils/time.js.flow
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createUseStyles } from './jss';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
var buttonLayoutSpacing = 16;
|
|
5
|
+
var buttonLinkPadding = 6;
|
|
6
|
+
var useStyles = createUseStyles(function () {
|
|
7
|
+
return {
|
|
8
|
+
inline: {
|
|
9
|
+
display: 'inline-flex',
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
flexWrap: 'wrap',
|
|
12
|
+
alignItems: 'center'
|
|
13
|
+
},
|
|
14
|
+
container: {
|
|
15
|
+
marginTop: -buttonLayoutSpacing,
|
|
16
|
+
marginLeft: -buttonLayoutSpacing - buttonLinkPadding
|
|
17
|
+
},
|
|
18
|
+
buttons: {
|
|
19
|
+
marginLeft: buttonLinkPadding,
|
|
20
|
+
'& > div': {
|
|
21
|
+
marginTop: buttonLayoutSpacing,
|
|
22
|
+
marginLeft: buttonLayoutSpacing
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
link: {
|
|
26
|
+
marginTop: buttonLayoutSpacing,
|
|
27
|
+
marginLeft: buttonLayoutSpacing,
|
|
28
|
+
width: function width(_ref) {
|
|
29
|
+
var bothButtons = _ref.bothButtons;
|
|
30
|
+
return bothButtons ? '100%' : 'auto';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
var ButtonGroup = function ButtonGroup(_ref2) {
|
|
37
|
+
var primaryButton = _ref2.primaryButton,
|
|
38
|
+
secondaryButton = _ref2.secondaryButton,
|
|
39
|
+
link = _ref2.link;
|
|
40
|
+
var anyAction = !!primaryButton || !!secondaryButton || !!link;
|
|
41
|
+
var bothButtons = !!primaryButton && !!secondaryButton;
|
|
42
|
+
var classes = useStyles({
|
|
43
|
+
bothButtons: bothButtons
|
|
44
|
+
});
|
|
45
|
+
return anyAction ? /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: classNames(classes.inline, classes.container)
|
|
47
|
+
}, (primaryButton || secondaryButton) && /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: classNames(classes.inline, classes.buttons)
|
|
49
|
+
}, primaryButton && /*#__PURE__*/React.createElement("div", null, primaryButton), secondaryButton && /*#__PURE__*/React.createElement("div", null, secondaryButton)), link && /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: classes.link
|
|
51
|
+
}, link)) : null;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default ButtonGroup;
|
package/dist-es/button.js
CHANGED
|
@@ -28,7 +28,7 @@ import { useForm } from './form-context';
|
|
|
28
28
|
import { pxToRem } from './utils/css';
|
|
29
29
|
import { Text, Text2, Text3 } from './text';
|
|
30
30
|
import Box from './box';
|
|
31
|
-
export var BUTTON_MIN_WIDTH =
|
|
31
|
+
export var BUTTON_MIN_WIDTH = 136;
|
|
32
32
|
var transitionTiming = '0.3s cubic-bezier(0.77, 0, 0.175, 1)';
|
|
33
33
|
var BORDER_PX = 1.5;
|
|
34
34
|
var SPINNER_MARGIN_PX = 8;
|
package/dist-es/callout.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Text2, Text3 } from './text';
|
|
|
9
9
|
import IconClose from './icons/icon-close';
|
|
10
10
|
import IconButton from './icon-button';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
|
-
import
|
|
12
|
+
import ButtonGroup from './button-group';
|
|
13
13
|
var useStyles = createUseStyles(function (_ref) {
|
|
14
14
|
var colors = _ref.colors;
|
|
15
15
|
return {
|
|
@@ -34,24 +34,19 @@ var useStyles = createUseStyles(function (_ref) {
|
|
|
34
34
|
},
|
|
35
35
|
overInverse: {
|
|
36
36
|
background: colors.backgroundContainer
|
|
37
|
-
},
|
|
38
|
-
actions: {
|
|
39
|
-
marginLeft: function marginLeft(_ref2) {
|
|
40
|
-
var needsButtonLinkAlignment = _ref2.needsButtonLinkAlignment;
|
|
41
|
-
return needsButtonLinkAlignment ? -6 : 0;
|
|
42
|
-
}
|
|
43
37
|
}
|
|
44
38
|
};
|
|
45
39
|
});
|
|
46
40
|
|
|
47
|
-
var Callout = function Callout(
|
|
48
|
-
var title =
|
|
49
|
-
description =
|
|
50
|
-
icon =
|
|
51
|
-
onClose =
|
|
52
|
-
button =
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
var Callout = function Callout(_ref2) {
|
|
42
|
+
var title = _ref2.title,
|
|
43
|
+
description = _ref2.description,
|
|
44
|
+
icon = _ref2.icon,
|
|
45
|
+
onClose = _ref2.onClose,
|
|
46
|
+
button = _ref2.button,
|
|
47
|
+
secondaryButton = _ref2.secondaryButton,
|
|
48
|
+
buttonLink = _ref2.buttonLink,
|
|
49
|
+
ariaLabel = _ref2['aria-label'];
|
|
55
50
|
var needsButtonLinkAlignment = buttonLink && !button;
|
|
56
51
|
var isInverse = useIsInverseVariant();
|
|
57
52
|
var classes = useStyles({
|
|
@@ -80,12 +75,11 @@ var Callout = function Callout(_ref3) {
|
|
|
80
75
|
as: "p",
|
|
81
76
|
regular: true,
|
|
82
77
|
color: colors.textSecondary
|
|
83
|
-
}, description)), (button || buttonLink) && /*#__PURE__*/React.createElement(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, button, buttonLink)))), onClose && /*#__PURE__*/React.createElement(IconButton, {
|
|
78
|
+
}, description)), (button || secondaryButton || buttonLink) && /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
79
|
+
primaryButton: button,
|
|
80
|
+
secondaryButton: secondaryButton,
|
|
81
|
+
link: buttonLink
|
|
82
|
+
}))), onClose && /*#__PURE__*/React.createElement(IconButton, {
|
|
89
83
|
size: 40,
|
|
90
84
|
style: {
|
|
91
85
|
display: 'flex',
|