@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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
|
|
3
|
-
import type { ButtonProps } from './button';
|
|
3
|
+
import type { ButtonProps, ButtonLinkProps } from './button';
|
|
4
4
|
import type { DataAttributes } from './utils/types';
|
|
5
5
|
interface CommonProps {
|
|
6
6
|
title: string;
|
|
7
|
-
button?: React.ReactElement<ButtonProps, typeof ButtonPrimary
|
|
8
|
-
|
|
7
|
+
button?: React.ReactElement<ButtonProps, typeof ButtonPrimary>;
|
|
8
|
+
secondaryButton?: React.ReactElement<ButtonProps, typeof ButtonSecondary>;
|
|
9
|
+
buttonLink?: React.ReactElement<ButtonLinkProps, typeof ButtonLink>;
|
|
9
10
|
description?: string;
|
|
10
11
|
children?: void;
|
|
11
12
|
'aria-label'?: string;
|
package/dist/empty-state-card.js
CHANGED
|
@@ -15,14 +15,14 @@ var _boxed = require("./boxed");
|
|
|
15
15
|
|
|
16
16
|
var _hooks = require("./hooks");
|
|
17
17
|
|
|
18
|
-
var _inline = _interopRequireDefault(require("./inline"));
|
|
19
|
-
|
|
20
18
|
var _jss = require("./jss");
|
|
21
19
|
|
|
22
20
|
var _stack = _interopRequireDefault(require("./stack"));
|
|
23
21
|
|
|
24
22
|
var _text = require("./text");
|
|
25
23
|
|
|
24
|
+
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
25
|
+
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
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); }
|
|
@@ -61,27 +61,22 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
61
61
|
}, theme.mq.tabletOrSmaller, {
|
|
62
62
|
width: 64,
|
|
63
63
|
height: 64
|
|
64
|
-
})
|
|
65
|
-
actions: {
|
|
66
|
-
marginLeft: function marginLeft(_ref) {
|
|
67
|
-
var needsButtonLinkAlignment = _ref.needsButtonLinkAlignment;
|
|
68
|
-
return needsButtonLinkAlignment ? -6 : 0;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
64
|
+
})
|
|
71
65
|
};
|
|
72
66
|
});
|
|
73
67
|
|
|
74
|
-
var EmptyStateCard = function EmptyStateCard(
|
|
68
|
+
var EmptyStateCard = function EmptyStateCard(_ref) {
|
|
75
69
|
var _button$props, _image2;
|
|
76
70
|
|
|
77
|
-
var title =
|
|
78
|
-
description =
|
|
79
|
-
button =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
var title = _ref.title,
|
|
72
|
+
description = _ref.description,
|
|
73
|
+
button = _ref.button,
|
|
74
|
+
secondaryButton = _ref.secondaryButton,
|
|
75
|
+
buttonLink = _ref.buttonLink,
|
|
76
|
+
icon = _ref.icon,
|
|
77
|
+
imageUrl = _ref.imageUrl,
|
|
78
|
+
ariaLabel = _ref['aria-label'],
|
|
79
|
+
dataAttributes = _ref.dataAttributes;
|
|
85
80
|
|
|
86
81
|
var _useTheme = (0, _hooks.useTheme)(),
|
|
87
82
|
colors = _useTheme.colors;
|
|
@@ -127,12 +122,11 @@ var EmptyStateCard = function EmptyStateCard(_ref2) {
|
|
|
127
122
|
}, title), /*#__PURE__*/React.createElement(_text.Text2, {
|
|
128
123
|
regular: true,
|
|
129
124
|
color: colors.textSecondary
|
|
130
|
-
}, description))), (button || buttonLink) && /*#__PURE__*/React.createElement(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}, button, buttonLink))))));
|
|
125
|
+
}, description))), (button || secondaryButton || buttonLink) && /*#__PURE__*/React.createElement(_buttonGroup.default, {
|
|
126
|
+
primaryButton: button,
|
|
127
|
+
secondaryButton: secondaryButton,
|
|
128
|
+
link: buttonLink
|
|
129
|
+
})))));
|
|
136
130
|
};
|
|
137
131
|
|
|
138
132
|
var _default = EmptyStateCard;
|
|
@@ -5,9 +5,8 @@ import { ButtonLink, ButtonPrimary, ButtonSecondary } from "./button";
|
|
|
5
5
|
import type { DataAttributes } from "./utils/types";
|
|
6
6
|
declare type CommonProps = {|
|
|
7
7
|
title: string,
|
|
8
|
-
button?:
|
|
9
|
-
|
|
10
|
-
| React.Element<typeof ButtonSecondary>,
|
|
8
|
+
button?: React.Element<typeof ButtonPrimary>,
|
|
9
|
+
secondaryButton?: React.Element<typeof ButtonSecondary>,
|
|
11
10
|
buttonLink?: React.Element<typeof ButtonLink>,
|
|
12
11
|
description?: string,
|
|
13
12
|
"aria-label"?: string,
|
package/dist/empty-state.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonPrimary, ButtonSecondary, ButtonLink } from './button';
|
|
2
|
+
import { ButtonPrimary, ButtonSecondary, ButtonLink, ButtonLinkProps } from './button';
|
|
3
3
|
import type { ButtonProps } from './button';
|
|
4
4
|
import type { DataAttributes } from './utils/types';
|
|
5
5
|
interface BaseProps {
|
|
6
6
|
title: string;
|
|
7
7
|
button?: React.ReactElement<ButtonProps, typeof ButtonPrimary> | React.ReactElement<ButtonProps, typeof ButtonSecondary>;
|
|
8
|
-
buttonLink?: React.ReactElement<
|
|
8
|
+
buttonLink?: React.ReactElement<ButtonLinkProps, typeof ButtonLink>;
|
|
9
9
|
description?: string;
|
|
10
10
|
children?: void;
|
|
11
11
|
'aria-label'?: string;
|
package/dist/empty-state.js
CHANGED
|
@@ -13,6 +13,8 @@ var _box = _interopRequireDefault(require("./box"));
|
|
|
13
13
|
|
|
14
14
|
var _boxed = require("./boxed");
|
|
15
15
|
|
|
16
|
+
var _button = require("./button");
|
|
17
|
+
|
|
16
18
|
var _hooks = require("./hooks");
|
|
17
19
|
|
|
18
20
|
var _stack = _interopRequireDefault(require("./stack"));
|
|
@@ -21,7 +23,7 @@ var _text = require("./text");
|
|
|
21
23
|
|
|
22
24
|
var _jss = require("./jss");
|
|
23
25
|
|
|
24
|
-
var
|
|
26
|
+
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
25
27
|
|
|
26
28
|
var _dom = require("./utils/dom");
|
|
27
29
|
|
|
@@ -49,6 +51,44 @@ function _extends() {
|
|
|
49
51
|
return _extends.apply(this, arguments);
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
function ownKeys(object, enumerableOnly) {
|
|
55
|
+
var keys = Object.keys(object);
|
|
56
|
+
|
|
57
|
+
if (Object.getOwnPropertySymbols) {
|
|
58
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
59
|
+
|
|
60
|
+
if (enumerableOnly) {
|
|
61
|
+
symbols = symbols.filter(function (sym) {
|
|
62
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
keys.push.apply(keys, symbols);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return keys;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _objectSpread(target) {
|
|
73
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
74
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
75
|
+
|
|
76
|
+
if (i % 2) {
|
|
77
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
78
|
+
_defineProperty(target, key, source[key]);
|
|
79
|
+
});
|
|
80
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
81
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
82
|
+
} else {
|
|
83
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
84
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
|
|
52
92
|
function _defineProperty(obj, key, value) {
|
|
53
93
|
if (key in obj) {
|
|
54
94
|
Object.defineProperty(obj, key, {
|
|
@@ -151,6 +191,14 @@ var EmptyState = function EmptyState(_ref2) {
|
|
|
151
191
|
});
|
|
152
192
|
}
|
|
153
193
|
|
|
194
|
+
var buttons = _objectSpread({}, (button === null || button === void 0 ? void 0 : button.type) === _button.ButtonPrimary ? {
|
|
195
|
+
primaryButton: button
|
|
196
|
+
} : {
|
|
197
|
+
secondaryButton: button
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
buttons.link = buttonLink;
|
|
201
|
+
|
|
154
202
|
if (isTabletOrSmaller) {
|
|
155
203
|
var _ref3, _largeImage;
|
|
156
204
|
|
|
@@ -169,10 +217,7 @@ var EmptyState = function EmptyState(_ref2) {
|
|
|
169
217
|
light: true,
|
|
170
218
|
as: "p",
|
|
171
219
|
color: colors.textSecondary
|
|
172
|
-
}, description)), button && /*#__PURE__*/React.createElement(
|
|
173
|
-
space: 16,
|
|
174
|
-
alignItems: "center"
|
|
175
|
-
}, button, buttonLink)));
|
|
220
|
+
}, description)), button && /*#__PURE__*/React.createElement(_buttonGroup.default, buttons)));
|
|
176
221
|
}
|
|
177
222
|
|
|
178
223
|
return /*#__PURE__*/React.createElement(_boxed.Boxed, {
|
|
@@ -195,10 +240,7 @@ var EmptyState = function EmptyState(_ref2) {
|
|
|
195
240
|
light: true,
|
|
196
241
|
as: "p",
|
|
197
242
|
color: colors.textSecondary
|
|
198
|
-
}, description)), button && /*#__PURE__*/React.createElement(
|
|
199
|
-
space: 16,
|
|
200
|
-
alignItems: "center"
|
|
201
|
-
}, button, buttonLink)))), largeImageUrl && /*#__PURE__*/React.createElement("div", {
|
|
243
|
+
}, description)), button && /*#__PURE__*/React.createElement(_buttonGroup.default, buttons)))), largeImageUrl && /*#__PURE__*/React.createElement("div", {
|
|
202
244
|
className: classes.desktopImage
|
|
203
245
|
})));
|
|
204
246
|
};
|
package/dist/feedback.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonPrimary, ButtonSecondary, ButtonLink } from './button';
|
|
3
|
-
import type { ButtonProps, ButtonLinkProps } from './button';
|
|
4
2
|
import type { DataAttributes } from './utils/types';
|
|
3
|
+
import type { ButtonGroupProps } from './button-group';
|
|
5
4
|
declare type HapticFeedback = 'error' | 'success';
|
|
6
|
-
declare type FeedbackButtonsProps =
|
|
7
|
-
primaryButton?: React.ReactElement<ButtonProps, typeof ButtonPrimary>;
|
|
8
|
-
secondaryButton?: React.ReactElement<ButtonProps, typeof ButtonSecondary>;
|
|
9
|
-
link?: React.ReactElement<ButtonLinkProps, typeof ButtonLink>;
|
|
10
|
-
};
|
|
5
|
+
declare type FeedbackButtonsProps = ButtonGroupProps;
|
|
11
6
|
interface FeedbackProps extends FeedbackButtonsProps {
|
|
12
7
|
title: string;
|
|
13
8
|
description?: string | Array<string>;
|
package/dist/feedback.js
CHANGED
|
@@ -45,6 +45,8 @@ var _stack = _interopRequireDefault(require("./stack"));
|
|
|
45
45
|
|
|
46
46
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
47
47
|
|
|
48
|
+
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
49
|
+
|
|
48
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
51
|
|
|
50
52
|
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); }
|
|
@@ -155,7 +157,6 @@ var checkHasButtons = function checkHasButtons(_ref) {
|
|
|
155
157
|
return !!primaryButton || !!secondaryButton;
|
|
156
158
|
};
|
|
157
159
|
|
|
158
|
-
var buttonLayoutSpacing = 16;
|
|
159
160
|
var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
160
161
|
return {
|
|
161
162
|
background: {
|
|
@@ -240,18 +241,6 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
240
241
|
transitionDelay: '0.6s',
|
|
241
242
|
opacity: 1,
|
|
242
243
|
transform: 'translate(0, 0)'
|
|
243
|
-
},
|
|
244
|
-
buttonsContainer: {
|
|
245
|
-
display: 'flex',
|
|
246
|
-
justifyContent: 'flex-start',
|
|
247
|
-
flexWrap: 'wrap',
|
|
248
|
-
margin: -buttonLayoutSpacing / 2,
|
|
249
|
-
'& > *': {
|
|
250
|
-
margin: buttonLayoutSpacing / 2
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
link: {
|
|
254
|
-
width: '100%'
|
|
255
244
|
}
|
|
256
245
|
};
|
|
257
246
|
});
|
|
@@ -332,30 +321,19 @@ var renderFeedbackBody = function renderFeedbackBody(_ref9, animateText, appear,
|
|
|
332
321
|
}, normalizedDescription), children));
|
|
333
322
|
};
|
|
334
323
|
|
|
335
|
-
var renderInlineFeedbackBody = function renderInlineFeedbackBody(feedbackBody,
|
|
336
|
-
var
|
|
337
|
-
secondaryButton = _ref10.secondaryButton,
|
|
338
|
-
link = _ref10.link;
|
|
339
|
-
var hasButtons = checkHasButtons({
|
|
340
|
-
primaryButton: primaryButton,
|
|
341
|
-
secondaryButton: secondaryButton,
|
|
342
|
-
link: link
|
|
343
|
-
});
|
|
324
|
+
var renderInlineFeedbackBody = function renderInlineFeedbackBody(feedbackBody, buttons) {
|
|
325
|
+
var hasButtons = checkHasButtons(buttons);
|
|
344
326
|
return /*#__PURE__*/React.createElement(_stack.default, {
|
|
345
327
|
space: 24
|
|
346
|
-
}, feedbackBody, hasButtons && /*#__PURE__*/React.createElement(
|
|
347
|
-
className: classes.buttonsContainer
|
|
348
|
-
}, primaryButton, secondaryButton, link && /*#__PURE__*/React.createElement("div", {
|
|
349
|
-
className: classes.link
|
|
350
|
-
}, link)));
|
|
328
|
+
}, feedbackBody, hasButtons && /*#__PURE__*/React.createElement(_buttonGroup.default, buttons));
|
|
351
329
|
};
|
|
352
330
|
|
|
353
|
-
var renderFeedbackInDesktop = function renderFeedbackInDesktop(
|
|
354
|
-
var isInverse =
|
|
355
|
-
inlineFeedbackBody =
|
|
356
|
-
classes =
|
|
357
|
-
imageUrl =
|
|
358
|
-
dataAttributes =
|
|
331
|
+
var renderFeedbackInDesktop = function renderFeedbackInDesktop(_ref10) {
|
|
332
|
+
var isInverse = _ref10.isInverse,
|
|
333
|
+
inlineFeedbackBody = _ref10.inlineFeedbackBody,
|
|
334
|
+
classes = _ref10.classes,
|
|
335
|
+
imageUrl = _ref10.imageUrl,
|
|
336
|
+
dataAttributes = _ref10.dataAttributes;
|
|
359
337
|
return /*#__PURE__*/React.createElement(_boxed.Boxed, {
|
|
360
338
|
isInverse: isInverse,
|
|
361
339
|
dataAttributes: dataAttributes
|
|
@@ -370,21 +348,21 @@ var renderFeedbackInDesktop = function renderFeedbackInDesktop(_ref11) {
|
|
|
370
348
|
})));
|
|
371
349
|
};
|
|
372
350
|
|
|
373
|
-
var FeedbackScreen = function FeedbackScreen(
|
|
374
|
-
var title =
|
|
375
|
-
description =
|
|
376
|
-
children =
|
|
377
|
-
primaryButton =
|
|
378
|
-
secondaryButton =
|
|
379
|
-
link =
|
|
380
|
-
hapticFeedback =
|
|
381
|
-
icon =
|
|
382
|
-
|
|
383
|
-
animateText =
|
|
384
|
-
unstable_inlineInDesktop =
|
|
385
|
-
imageUrl =
|
|
386
|
-
imageFit =
|
|
387
|
-
dataAttributes =
|
|
351
|
+
var FeedbackScreen = function FeedbackScreen(_ref11) {
|
|
352
|
+
var title = _ref11.title,
|
|
353
|
+
description = _ref11.description,
|
|
354
|
+
children = _ref11.children,
|
|
355
|
+
primaryButton = _ref11.primaryButton,
|
|
356
|
+
secondaryButton = _ref11.secondaryButton,
|
|
357
|
+
link = _ref11.link,
|
|
358
|
+
hapticFeedback = _ref11.hapticFeedback,
|
|
359
|
+
icon = _ref11.icon,
|
|
360
|
+
_ref11$animateText = _ref11.animateText,
|
|
361
|
+
animateText = _ref11$animateText === void 0 ? false : _ref11$animateText,
|
|
362
|
+
unstable_inlineInDesktop = _ref11.unstable_inlineInDesktop,
|
|
363
|
+
imageUrl = _ref11.imageUrl,
|
|
364
|
+
imageFit = _ref11.imageFit,
|
|
365
|
+
dataAttributes = _ref11.dataAttributes;
|
|
388
366
|
useHapticFeedback(hapticFeedback);
|
|
389
367
|
var isInverse = (0, _themeVariantContext.useIsInverseVariant)();
|
|
390
368
|
|
|
@@ -440,7 +418,7 @@ var FeedbackScreen = function FeedbackScreen(_ref12) {
|
|
|
440
418
|
primaryButton: primaryButton,
|
|
441
419
|
secondaryButton: secondaryButton,
|
|
442
420
|
link: link
|
|
443
|
-
}
|
|
421
|
+
});
|
|
444
422
|
|
|
445
423
|
if (!isTabletOrSmaller && unstable_inlineInDesktop) {
|
|
446
424
|
return inlineFeedbackBody;
|
|
@@ -524,16 +502,16 @@ var InfoFeedbackScreen = function InfoFeedbackScreen(props) {
|
|
|
524
502
|
|
|
525
503
|
exports.InfoFeedbackScreen = InfoFeedbackScreen;
|
|
526
504
|
|
|
527
|
-
var SuccessFeedback = function SuccessFeedback(
|
|
528
|
-
var title =
|
|
529
|
-
description =
|
|
530
|
-
children =
|
|
531
|
-
primaryButton =
|
|
532
|
-
secondaryButton =
|
|
533
|
-
link =
|
|
534
|
-
imageUrl =
|
|
535
|
-
imageFit =
|
|
536
|
-
dataAttributes =
|
|
505
|
+
var SuccessFeedback = function SuccessFeedback(_ref12) {
|
|
506
|
+
var title = _ref12.title,
|
|
507
|
+
description = _ref12.description,
|
|
508
|
+
children = _ref12.children,
|
|
509
|
+
primaryButton = _ref12.primaryButton,
|
|
510
|
+
secondaryButton = _ref12.secondaryButton,
|
|
511
|
+
link = _ref12.link,
|
|
512
|
+
imageUrl = _ref12.imageUrl,
|
|
513
|
+
imageFit = _ref12.imageFit,
|
|
514
|
+
dataAttributes = _ref12.dataAttributes;
|
|
537
515
|
useHapticFeedback('success');
|
|
538
516
|
|
|
539
517
|
var _useScreenSize3 = (0, _hooks.useScreenSize)(),
|
|
@@ -569,7 +547,7 @@ var SuccessFeedback = function SuccessFeedback(_ref13) {
|
|
|
569
547
|
primaryButton: primaryButton,
|
|
570
548
|
secondaryButton: secondaryButton,
|
|
571
549
|
link: link
|
|
572
|
-
}
|
|
550
|
+
});
|
|
573
551
|
return /*#__PURE__*/React.createElement(_themeVariantContext.ThemeVariant, {
|
|
574
552
|
isInverse: true
|
|
575
553
|
}, isTabletOrSmaller ? /*#__PURE__*/React.createElement(_responsiveLayout.default, {
|
package/dist/feedback.js.flow
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { ButtonPrimary, ButtonSecondary, ButtonLink } from "./button";
|
|
5
4
|
import type { DataAttributes } from "./utils/types";
|
|
5
|
+
import type { ButtonGroupProps } from "./button-group";
|
|
6
6
|
declare type HapticFeedback = "error" | "success";
|
|
7
|
-
declare type FeedbackButtonsProps =
|
|
8
|
-
primaryButton?: React.Element<typeof ButtonPrimary>,
|
|
9
|
-
secondaryButton?: React.Element<typeof ButtonSecondary>,
|
|
10
|
-
link?: React.Element<typeof ButtonLink>,
|
|
11
|
-
};
|
|
7
|
+
declare type FeedbackButtonsProps = ButtonGroupProps;
|
|
12
8
|
declare type FeedbackProps = {|
|
|
13
9
|
...$Exact<FeedbackButtonsProps>,
|
|
14
10
|
|
package/dist/header.js
CHANGED
|
@@ -27,7 +27,7 @@ var _overscrollColorContext = _interopRequireDefault(require("./overscroll-color
|
|
|
27
27
|
|
|
28
28
|
var _text = require("./text");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -91,46 +91,15 @@ function _extends() {
|
|
|
91
91
|
return _extends.apply(this, arguments);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
'& > *': {
|
|
104
|
-
width: '100%'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
var MobileHeaderButtonLayout = function MobileHeaderButtonLayout(_ref) {
|
|
111
|
-
var children = _ref.children;
|
|
112
|
-
var classes = useButtonLayoutStyles();
|
|
113
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
114
|
-
className: classes.inlineBlockContainer
|
|
115
|
-
}, /*#__PURE__*/React.createElement(_stack.default, {
|
|
116
|
-
space: 16
|
|
117
|
-
}, React.Children.toArray(children).filter(Boolean).map(function (button, idx) {
|
|
118
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
key: idx,
|
|
120
|
-
className: classes.button
|
|
121
|
-
}, button);
|
|
122
|
-
})));
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
var Header = function Header(_ref2) {
|
|
126
|
-
var pretitle = _ref2.pretitle,
|
|
127
|
-
title = _ref2.title,
|
|
128
|
-
preamount = _ref2.preamount,
|
|
129
|
-
amount = _ref2.amount,
|
|
130
|
-
button = _ref2.button,
|
|
131
|
-
subtitle = _ref2.subtitle,
|
|
132
|
-
isErrorAmount = _ref2.isErrorAmount,
|
|
133
|
-
secondaryButton = _ref2.secondaryButton;
|
|
94
|
+
var Header = function Header(_ref) {
|
|
95
|
+
var pretitle = _ref.pretitle,
|
|
96
|
+
title = _ref.title,
|
|
97
|
+
preamount = _ref.preamount,
|
|
98
|
+
amount = _ref.amount,
|
|
99
|
+
button = _ref.button,
|
|
100
|
+
subtitle = _ref.subtitle,
|
|
101
|
+
isErrorAmount = _ref.isErrorAmount,
|
|
102
|
+
secondaryButton = _ref.secondaryButton;
|
|
134
103
|
|
|
135
104
|
var _useScreenSize = (0, _hooks.useScreenSize)(),
|
|
136
105
|
isTabletOrSmaller = _useScreenSize.isTabletOrSmaller;
|
|
@@ -155,14 +124,16 @@ var Header = function Header(_ref2) {
|
|
|
155
124
|
|
|
156
125
|
return /*#__PURE__*/React.createElement(_stack.default, {
|
|
157
126
|
space: isTabletOrSmaller ? 24 : 32
|
|
158
|
-
}, (title || pretitle) && /*#__PURE__*/React.createElement(
|
|
127
|
+
}, (title || pretitle) && /*#__PURE__*/React.createElement(_box.default, {
|
|
128
|
+
paddingRight: 16
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_stack.default, {
|
|
159
130
|
space: 8
|
|
160
131
|
}, pretitle && renderRichText(pretitle, {
|
|
161
132
|
color: theme.colors.textPrimary
|
|
162
133
|
}), /*#__PURE__*/React.createElement(_text.Text6, {
|
|
163
134
|
role: "heading",
|
|
164
135
|
"aria-level": 2
|
|
165
|
-
}, title)), (preamount || amount || button || subtitle) && /*#__PURE__*/React.createElement(_stack.default, {
|
|
136
|
+
}, title))), (preamount || amount || button || subtitle) && /*#__PURE__*/React.createElement(_stack.default, {
|
|
166
137
|
space: 16
|
|
167
138
|
}, (preamount || amount) && /*#__PURE__*/React.createElement(_stack.default, {
|
|
168
139
|
space: 8
|
|
@@ -170,17 +141,18 @@ var Header = function Header(_ref2) {
|
|
|
170
141
|
color: theme.colors.textPrimary
|
|
171
142
|
}), /*#__PURE__*/React.createElement(_text.Text8, {
|
|
172
143
|
color: isErrorAmount && !isInverse ? theme.colors.highlight : theme.colors.textPrimary
|
|
173
|
-
}, amount)), (button || secondaryButton) &&
|
|
174
|
-
|
|
175
|
-
|
|
144
|
+
}, amount)), (button || secondaryButton) && /*#__PURE__*/React.createElement(_buttonGroup.default, {
|
|
145
|
+
primaryButton: button,
|
|
146
|
+
secondaryButton: secondaryButton
|
|
147
|
+
}), subtitle && renderRichText(subtitle, {})));
|
|
176
148
|
};
|
|
177
149
|
|
|
178
150
|
exports.Header = Header;
|
|
179
151
|
|
|
180
|
-
var MainSectionHeader = function MainSectionHeader(
|
|
181
|
-
var title =
|
|
182
|
-
description =
|
|
183
|
-
button =
|
|
152
|
+
var MainSectionHeader = function MainSectionHeader(_ref2) {
|
|
153
|
+
var title = _ref2.title,
|
|
154
|
+
description = _ref2.description,
|
|
155
|
+
button = _ref2.button;
|
|
184
156
|
|
|
185
157
|
var _useScreenSize2 = (0, _hooks.useScreenSize)(),
|
|
186
158
|
isTabletOrSmaller = _useScreenSize2.isTabletOrSmaller;
|
|
@@ -199,8 +171,8 @@ exports.MainSectionHeader = MainSectionHeader;
|
|
|
199
171
|
var useHeaderLayoutStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
200
172
|
return {
|
|
201
173
|
background: {
|
|
202
|
-
background: function background(
|
|
203
|
-
var isInverse =
|
|
174
|
+
background: function background(_ref3) {
|
|
175
|
+
var isInverse = _ref3.isInverse;
|
|
204
176
|
return isInverse ? theme.colors.backgroundBrand : 'initial';
|
|
205
177
|
}
|
|
206
178
|
},
|
|
@@ -210,14 +182,14 @@ var useHeaderLayoutStyles = (0, _jss.createUseStyles)(function (theme) {
|
|
|
210
182
|
};
|
|
211
183
|
});
|
|
212
184
|
|
|
213
|
-
var HeaderLayout = function HeaderLayout(
|
|
214
|
-
var
|
|
215
|
-
isInverse =
|
|
216
|
-
breadcrumbs =
|
|
217
|
-
header =
|
|
218
|
-
extra =
|
|
219
|
-
|
|
220
|
-
sideBySideExtraOnDesktop =
|
|
185
|
+
var HeaderLayout = function HeaderLayout(_ref4) {
|
|
186
|
+
var _ref4$isInverse = _ref4.isInverse,
|
|
187
|
+
isInverse = _ref4$isInverse === void 0 ? true : _ref4$isInverse,
|
|
188
|
+
breadcrumbs = _ref4.breadcrumbs,
|
|
189
|
+
header = _ref4.header,
|
|
190
|
+
extra = _ref4.extra,
|
|
191
|
+
_ref4$sideBySideExtra = _ref4.sideBySideExtraOnDesktop,
|
|
192
|
+
sideBySideExtraOnDesktop = _ref4$sideBySideExtra === void 0 ? false : _ref4$sideBySideExtra;
|
|
221
193
|
var classes = useHeaderLayoutStyles({
|
|
222
194
|
isInverse: isInverse
|
|
223
195
|
});
|
|
@@ -234,9 +206,7 @@ var HeaderLayout = function HeaderLayout(_ref5) {
|
|
|
234
206
|
paddingBottom: 24
|
|
235
207
|
}, /*#__PURE__*/React.createElement(_stack.default, {
|
|
236
208
|
space: 24
|
|
237
|
-
}, /*#__PURE__*/React.createElement(_box.default, {
|
|
238
|
-
paddingRight: 16
|
|
239
|
-
}, header), extra)) : sideBySideExtraOnDesktop ? /*#__PURE__*/React.createElement(_box.default, {
|
|
209
|
+
}, header, extra)) : sideBySideExtraOnDesktop ? /*#__PURE__*/React.createElement(_box.default, {
|
|
240
210
|
paddingTop: breadcrumbs ? 16 : 48,
|
|
241
211
|
paddingBottom: 48
|
|
242
212
|
}, /*#__PURE__*/React.createElement(_gridLayout.default, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -259,10 +229,10 @@ var HeaderLayout = function HeaderLayout(_ref5) {
|
|
|
259
229
|
|
|
260
230
|
exports.HeaderLayout = HeaderLayout;
|
|
261
231
|
|
|
262
|
-
var MainSectionHeaderLayout = function MainSectionHeaderLayout(
|
|
263
|
-
var
|
|
264
|
-
isInverse =
|
|
265
|
-
children =
|
|
232
|
+
var MainSectionHeaderLayout = function MainSectionHeaderLayout(_ref5) {
|
|
233
|
+
var _ref5$isInverse = _ref5.isInverse,
|
|
234
|
+
isInverse = _ref5$isInverse === void 0 ? true : _ref5$isInverse,
|
|
235
|
+
children = _ref5.children;
|
|
266
236
|
var classes = useHeaderLayoutStyles({
|
|
267
237
|
isInverse: isInverse
|
|
268
238
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export { default as CreditCardExpirationField } from './credit-card-expiration-f
|
|
|
66
66
|
export { default as CreditCardFields } from './credit-card-fields';
|
|
67
67
|
export { default as CvvField } from './cvv-field';
|
|
68
68
|
export { default as DateField } from './date-field';
|
|
69
|
+
export { default as MonthField } from './month-field';
|
|
69
70
|
export { default as DateTimeField } from './date-time-field';
|
|
70
71
|
export { default as IntegerField } from './integer-field';
|
|
71
72
|
export { default as DecimalField } from './decimal-field';
|
|
@@ -85,18 +86,20 @@ export { useTheme, useScreenSize, useElementDimensions, useAriaId, useWindowSize
|
|
|
85
86
|
export type { ThemeConfig, ColorScheme } from './theme';
|
|
86
87
|
export { ThemeVariant, useIsInverseVariant } from './theme-variant-context';
|
|
87
88
|
export type { Skin, SkinName } from './skins/types';
|
|
88
|
-
export { VIVO_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN } from './skins/constants';
|
|
89
|
+
export { VIVO_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN, BLAU_SKIN, } from './skins/constants';
|
|
89
90
|
export { getSkinByName } from './skins/utils';
|
|
90
91
|
export { getVivoSkin } from './skins/vivo';
|
|
91
92
|
export { getMovistarSkin } from './skins/movistar';
|
|
92
93
|
export { getO2Skin } from './skins/o2';
|
|
93
94
|
export { getO2ClassicSkin } from './skins/o2-classic';
|
|
94
95
|
export { getTelefonicaSkin } from './skins/telefonica';
|
|
96
|
+
export { getBlauSkin } from './skins/blau';
|
|
95
97
|
export { palette as vivoPalette } from './skins/vivo';
|
|
96
98
|
export { palette as movistarPalette } from './skins/movistar';
|
|
97
99
|
export { palette as o2Palette } from './skins/o2';
|
|
98
100
|
export { palette as o2ClassicPalette } from './skins/o2-classic';
|
|
99
101
|
export { palette as telefonicaPalette } from './skins/telefonica';
|
|
102
|
+
export { palette as blauPalette } from './skins/blau';
|
|
100
103
|
export type { Locale } from './utils/locale';
|
|
101
104
|
export type { TrackingEvent } from './utils/types';
|
|
102
105
|
export type { RegionCode } from './utils/region-code';
|