@telefonica/mistica 10.16.0 → 10.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/button.js +24 -8
  3. package/dist/card.d.ts +10 -1
  4. package/dist/card.js +29 -29
  5. package/dist/card.js.flow +16 -1
  6. package/dist/credit-card-expiration-field.js +2 -7
  7. package/dist/credit-card-number-field.js +2 -2
  8. package/dist/cvv-field.js +2 -2
  9. package/dist/date-field.js +2 -2
  10. package/dist/date-time-field.js +2 -2
  11. package/dist/date-time-picker.js +2 -2
  12. package/dist/decimal-field.js +2 -7
  13. package/dist/email-field.js +2 -7
  14. package/dist/feedback.js +5 -8
  15. package/dist/header.d.ts +2 -0
  16. package/dist/header.js.flow +5 -0
  17. package/dist/iban-field.js +2 -7
  18. package/dist/icons/icon-success.js +14 -6
  19. package/dist/image.d.ts +25 -4
  20. package/dist/image.js +67 -9
  21. package/dist/image.js.flow +33 -4
  22. package/dist/index.d.ts +3 -0
  23. package/dist/index.js +14 -0
  24. package/dist/index.js.flow +3 -0
  25. package/dist/integer-field.js +2 -7
  26. package/dist/menu.js +34 -27
  27. package/dist/month-field.js +2 -2
  28. package/dist/package-version.js +1 -1
  29. package/dist/password-field.js +2 -2
  30. package/dist/phone-number-field.js +2 -7
  31. package/dist/search-field.js +2 -2
  32. package/dist/section-title.d.ts +1 -3
  33. package/dist/section-title.js.flow +1 -2
  34. package/dist/select.js +2 -2
  35. package/dist/skins/blau.d.ts +6 -3
  36. package/dist/skins/blau.js +34 -5
  37. package/dist/skins/blau.js.flow +6 -3
  38. package/dist/skins/movistar.d.ts +21 -11
  39. package/dist/skins/movistar.js +76 -40
  40. package/dist/skins/movistar.js.flow +21 -11
  41. package/dist/skins/o2-classic.d.ts +21 -9
  42. package/dist/skins/o2-classic.js +64 -26
  43. package/dist/skins/o2-classic.js.flow +21 -9
  44. package/dist/skins/o2.d.ts +19 -17
  45. package/dist/skins/o2.js +68 -40
  46. package/dist/skins/o2.js.flow +19 -17
  47. package/dist/skins/telefonica.d.ts +18 -13
  48. package/dist/skins/telefonica.js +76 -45
  49. package/dist/skins/telefonica.js.flow +18 -13
  50. package/dist/skins/types.d.ts +12 -0
  51. package/dist/skins/types.js.flow +12 -0
  52. package/dist/skins/vivo.d.ts +9 -4
  53. package/dist/skins/vivo.js +37 -6
  54. package/dist/skins/vivo.js.flow +9 -4
  55. package/dist/tag.d.ts +6 -1
  56. package/dist/tag.js +133 -24
  57. package/dist/tag.js.flow +15 -1
  58. package/dist/text-field-base.d.ts +3 -2
  59. package/dist/text-field-base.js +8 -8
  60. package/dist/text-field-base.js.flow +6 -2
  61. package/dist/text-field.js +2 -7
  62. package/dist/text.d.ts +4 -0
  63. package/dist/text.js +13 -6
  64. package/dist/text.js.flow +10 -0
  65. package/dist/video.d.ts +32 -0
  66. package/dist/video.js +161 -0
  67. package/dist/video.js.flow +50 -0
  68. package/dist-es/button.js +24 -8
  69. package/dist-es/card.js +30 -30
  70. package/dist-es/credit-card-expiration-field.js +2 -2
  71. package/dist-es/credit-card-number-field.js +2 -2
  72. package/dist-es/cvv-field.js +2 -2
  73. package/dist-es/date-field.js +2 -2
  74. package/dist-es/date-time-field.js +2 -2
  75. package/dist-es/date-time-picker.js +2 -2
  76. package/dist-es/decimal-field.js +2 -2
  77. package/dist-es/email-field.js +2 -2
  78. package/dist-es/feedback.js +5 -8
  79. package/dist-es/iban-field.js +2 -2
  80. package/dist-es/icons/icon-success.js +14 -6
  81. package/dist-es/image.js +41 -8
  82. package/dist-es/index.js +2 -0
  83. package/dist-es/integer-field.js +2 -2
  84. package/dist-es/menu.js +35 -28
  85. package/dist-es/month-field.js +2 -2
  86. package/dist-es/package-version.js +1 -1
  87. package/dist-es/password-field.js +2 -2
  88. package/dist-es/phone-number-field.js +2 -2
  89. package/dist-es/search-field.js +2 -2
  90. package/dist-es/select.js +2 -2
  91. package/dist-es/skins/blau.js +36 -5
  92. package/dist-es/skins/movistar.js +78 -40
  93. package/dist-es/skins/o2-classic.js +66 -26
  94. package/dist-es/skins/o2.js +70 -40
  95. package/dist-es/skins/telefonica.js +78 -45
  96. package/dist-es/skins/vivo.js +39 -6
  97. package/dist-es/tag.js +130 -26
  98. package/dist-es/text-field-base.js +7 -6
  99. package/dist-es/text-field.js +2 -2
  100. package/dist-es/text.js +13 -6
  101. package/dist-es/video.js +123 -0
  102. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ # [10.20.0](https://github.com/Telefonica/mistica-web/compare/v10.19.0...v10.20.0) (2022-01-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Tags:** Tag component evolution ([#372](https://github.com/Telefonica/mistica-web/issues/372)) ([0db48b1](https://github.com/Telefonica/mistica-web/commit/0db48b15525b67c574b90c8c450b35ef155ca199))
7
+
8
+ # [10.19.0](https://github.com/Telefonica/mistica-web/compare/v10.18.0...v10.19.0) (2022-01-24)
9
+
10
+
11
+ ### Features
12
+
13
+ * **Feedback:** Update animated success icon for O2 ([#397](https://github.com/Telefonica/mistica-web/issues/397)) ([c0952cd](https://github.com/Telefonica/mistica-web/commit/c0952cdf10779f097359754b8f8d1addccb05713))
14
+ * **Image:** Added forward ref to Image component. ([#399](https://github.com/Telefonica/mistica-web/issues/399)) ([c78008f](https://github.com/Telefonica/mistica-web/commit/c78008f33d0a7979ead1760b01169a3e5bc65c1e))
15
+ * **SectionTitle:** Changed right prop to React.Node ([#398](https://github.com/Telefonica/mistica-web/issues/398)) ([d94b986](https://github.com/Telefonica/mistica-web/commit/d94b98636a834291af46f3b51223de97aaf79e41))
16
+
17
+ # [10.18.0](https://github.com/Telefonica/mistica-web/compare/v10.17.0...v10.18.0) (2022-01-21)
18
+
19
+
20
+ ### Features
21
+
22
+ * **Video:** Video component and Video support in Media Cards ([#391](https://github.com/Telefonica/mistica-web/issues/391)) ([a830a9b](https://github.com/Telefonica/mistica-web/commit/a830a9b2f364d9f17245aba02cfbbfee678a064b))
23
+
24
+ # [10.17.0](https://github.com/Telefonica/mistica-web/compare/v10.16.0...v10.17.0) (2022-01-18)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **Menu:** Menu component improvements ([#392](https://github.com/Telefonica/mistica-web/issues/392)) ([d8f1098](https://github.com/Telefonica/mistica-web/commit/d8f10988c7273da71645768c22d3a106dae0f15e))
30
+
31
+
32
+ ### Features
33
+
34
+ * **Feedback:** show info/error icons in vivo ([c60e3a3](https://github.com/Telefonica/mistica-web/commit/c60e3a391174f0f6ff6e40c5bd795f2f950b5d69))
35
+ * **TextFieldBase:** expose internal TextFieldBase component for advanced usage ([e917a99](https://github.com/Telefonica/mistica-web/commit/e917a99379d5f7fedddb0d5727cffd88af5a1d0f))
36
+
1
37
  # [10.16.0](https://github.com/Telefonica/mistica-web/compare/v10.15.0...v10.16.0) (2022-01-17)
2
38
 
3
39
 
package/dist/button.js CHANGED
@@ -396,6 +396,11 @@ var Button = function Button(props) {
396
396
  disabled: props.disabled || showSpinner || isFormSending,
397
397
  role: 'button'
398
398
  };
399
+ if (process.env.NODE_ENV !== 'production') {
400
+ if (props.to === '' || props.href === '') {
401
+ throw Error('to or href props are empty strings');
402
+ }
403
+ }
399
404
  if (props.fake) {
400
405
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
401
406
  maybe: true
@@ -419,22 +424,25 @@ var Button = function Button(props) {
419
424
  onPress: props.onPress
420
425
  })));
421
426
  }
422
- if (props.to) {
427
+ if (props.to || props.to === '') {
423
428
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
424
429
  }, commonProps, {
425
430
  to: props.to,
426
431
  fullPageOnWebView: props.fullPageOnWebView
427
432
  })));
428
433
  }
429
- if (props.href) {
434
+ if (props.href || props.href === '') {
430
435
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
431
436
  }, commonProps, {
432
437
  href: props.href,
433
438
  newTab: props.newTab
434
439
  })));
435
440
  }
436
- // this cannot happen
437
- throw Error('Bad button props');
441
+ if (process.env.NODE_ENV !== 'production') {
442
+ // this cannot happen
443
+ throw Error('Bad button props');
444
+ }
445
+ return null;
438
446
  };
439
447
  var useButtonLinkStyles = (0, _jss).createUseStyles(function(theme) {
440
448
  var padding = 6;
@@ -491,6 +499,11 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
491
499
  children: props.children
492
500
  })
493
501
  };
502
+ if (process.env.NODE_ENV !== 'production') {
503
+ if (props.to === '' || props.href === '') {
504
+ throw Error('to or href props are empty strings');
505
+ }
506
+ }
494
507
  if (props.onPress) {
495
508
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
496
509
  ref: ref
@@ -498,7 +511,7 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
498
511
  onPress: props.onPress
499
512
  })));
500
513
  }
501
- if (props.to) {
514
+ if (props.to || props.to === '') {
502
515
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
503
516
  ref: ref
504
517
  }, commonProps, {
@@ -506,7 +519,7 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
506
519
  fullPageOnWebView: props.fullPageOnWebView
507
520
  })));
508
521
  }
509
- if (props.href) {
522
+ if (props.href || props.href === '') {
510
523
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({
511
524
  ref: ref
512
525
  }, commonProps, {
@@ -514,8 +527,11 @@ var ButtonLink = /*#__PURE__*/ React.forwardRef(function(props, ref) {
514
527
  newTab: props.newTab
515
528
  })));
516
529
  }
517
- // this cannot happen
518
- throw Error('Bad button props');
530
+ if (process.env.NODE_ENV !== 'production') {
531
+ // this cannot happen
532
+ throw Error('Bad button props');
533
+ }
534
+ return null;
519
535
  });
520
536
  exports.ButtonLink = ButtonLink;
521
537
  var ButtonPrimary = function ButtonPrimary(props) {
package/dist/card.d.ts CHANGED
@@ -1,9 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import Tag from './tag';
3
3
  import { ButtonLink, ButtonPrimary } from './button';
4
+ import Video from './video';
5
+ import Image from './image';
4
6
  import type { ButtonProps, ButtonLinkProps } from './button';
5
7
  import type { DataAttributes } from './utils/types';
6
8
  import type { TagProps } from './tag';
9
+ import type { VideoProps } from './video';
10
+ import type { ImageProps } from './image';
11
+ /** @deprecated */
7
12
  declare type CardMedia = {
8
13
  src: string;
9
14
  aspectRatio: number;
@@ -18,7 +23,11 @@ declare type CardMedia = {
18
23
  height?: undefined;
19
24
  };
20
25
  declare type MediaCardProps = {
21
- media: CardMedia;
26
+ media: CardMedia | (React.ReactElement<ImageProps, typeof Image> & {
27
+ src?: undefined;
28
+ }) | (React.ReactElement<VideoProps, typeof Video> & {
29
+ src?: undefined;
30
+ });
22
31
  headline?: string | React.ReactElement<TagProps, typeof Tag>;
23
32
  pretitle?: string;
24
33
  title?: string;
package/dist/card.js CHANGED
@@ -13,6 +13,7 @@ var _text = require("./text");
13
13
  var _jss = require("./jss");
14
14
  var _boxed = require("./boxed");
15
15
  var _buttonGroup = _interopRequireDefault(require("./button-group"));
16
+ var _image = require("./image");
16
17
  function _interopRequireDefault(obj) {
17
18
  return obj && obj.__esModule ? obj : {
18
19
  default: obj
@@ -46,8 +47,7 @@ var useCardContentStyles = (0, _jss).createUseStyles(function() {
46
47
  actions: {
47
48
  flex: 1,
48
49
  display: 'flex',
49
- alignItems: 'flex-end',
50
- marginTop: 16
50
+ alignItems: 'flex-end'
51
51
  }
52
52
  };
53
53
  });
@@ -61,32 +61,30 @@ var CardContent = function CardContent(param) {
61
61
  }
62
62
  if (typeof headline === 'string') {
63
63
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_tag.default, {
64
- color: theme.colors.promo,
64
+ type: "promo",
65
65
  children: headline
66
66
  }));
67
67
  }
68
68
  return headline;
69
69
  };
70
- return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_jsxRuntime.Fragment, {
70
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
71
+ space: 16,
71
72
  children: [
72
73
  /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
73
- space: 16,
74
+ space: 8,
74
75
  children: [
75
- /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
76
- space: 8,
77
- children: [
78
- (headline || pretitle || title || subtitle) && /*#__PURE__*/ (0, _jsxRuntime).jsx("header", {
79
- children: /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
76
+ (headline || pretitle || title || subtitle) && /*#__PURE__*/ (0, _jsxRuntime).jsx("header", {
77
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
78
+ space: 16,
79
+ children: [
80
+ renderHeadline(),
81
+ /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
80
82
  space: 4,
81
83
  children: [
82
- renderHeadline(),
83
- pretitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
84
- paddingTop: 4,
85
- children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
86
- regular: true,
87
- uppercase: true,
88
- children: pretitle
89
- })
84
+ pretitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
85
+ regular: true,
86
+ uppercase: true,
87
+ children: pretitle
90
88
  }),
91
89
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text4, {
92
90
  as: "h1",
@@ -99,20 +97,20 @@ var CardContent = function CardContent(param) {
99
97
  })
100
98
  ]
101
99
  })
102
- }),
103
- description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
104
- as: "p",
105
- regular: true,
106
- color: theme.colors.textSecondary,
107
- children: description
108
- })
109
- ]
100
+ ]
101
+ })
110
102
  }),
111
- extra && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
112
- children: extra
103
+ description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
104
+ as: "p",
105
+ regular: true,
106
+ color: theme.colors.textSecondary,
107
+ children: description
113
108
  })
114
109
  ]
115
110
  }),
111
+ extra && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
112
+ children: extra
113
+ }),
116
114
  (button || buttonLink) && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
117
115
  className: classes.actions,
118
116
  children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_buttonGroup.default, {
@@ -174,8 +172,10 @@ var MediaCard = /*#__PURE__*/ React.forwardRef(function(param, ref) {
174
172
  className: classes.mediaCard,
175
173
  "aria-label": ariaLabel,
176
174
  children: [
177
- /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
175
+ typeof media.src === 'string' ? /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
178
176
  className: classes.media
177
+ }) : /*#__PURE__*/ (0, _jsxRuntime).jsx(_image.DisableBorderRadiusProvider, {
178
+ children: media
179
179
  }),
180
180
  /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
181
181
  className: classes.content,
package/dist/card.js.flow CHANGED
@@ -3,7 +3,13 @@
3
3
  import * as React from "react";
4
4
  import Tag from "./tag";
5
5
  import { ButtonLink, ButtonPrimary } from "./button";
6
+ import Video from "./video";
7
+ import Image from "./image";
6
8
  import type { DataAttributes } from "./utils/types";
9
+
10
+ /**
11
+ * @deprecated
12
+ */
7
13
  declare type CardMedia =
8
14
  | {
9
15
  src: string,
@@ -15,7 +21,16 @@ declare type CardMedia =
15
21
  }
16
22
  | { src: string };
17
23
  declare type MediaCardProps = {
18
- media: CardMedia,
24
+ media:
25
+ | CardMedia
26
+ | {
27
+ ...React.Element<typeof Image>,
28
+ ...{},
29
+ }
30
+ | {
31
+ ...React.Element<typeof Video>,
32
+ ...{},
33
+ },
19
34
  headline?: string | React.Element<typeof Tag>,
20
35
  pretitle?: string,
21
36
  title?: string,
@@ -7,12 +7,7 @@ var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _formContext = require("./form-context");
9
9
  var _hooks = require("./hooks");
10
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
11
- function _interopRequireDefault(obj) {
12
- return obj && obj.__esModule ? obj : {
13
- default: obj
14
- };
15
- }
10
+ var _textFieldBase = require("./text-field-base");
16
11
  function _interopRequireWildcard(obj) {
17
12
  if (obj && obj.__esModule) {
18
13
  return obj;
@@ -243,7 +238,7 @@ var CreditCardExpirationField = function CreditCardExpirationField(_param) {
243
238
  onChange: onChange,
244
239
  onChangeValue: onChangeValue
245
240
  });
246
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
241
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
247
242
  }, rest, fieldProps, {
248
243
  onChange: function onChange(event) {
249
244
  fieldProps.onChange(event);
@@ -8,7 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _formContext = require("./form-context");
9
9
  var _hooks = require("./hooks");
10
10
  var _creditCard = require("./utils/credit-card");
11
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
11
+ var _textFieldBase = require("./text-field-base");
12
12
  var _iconCreditcard = _interopRequireDefault(require("./icons/icon-creditcard"));
13
13
  var _iconVisa = _interopRequireDefault(require("./icons/icon-visa"));
14
14
  var _iconMastercard = _interopRequireDefault(require("./icons/icon-mastercard"));
@@ -358,7 +358,7 @@ var CreditCardNumberField = function CreditCardNumberField(_param) {
358
358
  onChangeValue: onChangeValue
359
359
  });
360
360
  var ref2;
361
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
361
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
362
362
  }, rest, fieldProps, {
363
363
  onChange: function onChange(event) {
364
364
  fieldProps.onChange(event);
package/dist/cvv-field.js CHANGED
@@ -12,7 +12,7 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
12
12
  var _iconButton = _interopRequireDefault(require("./icon-button"));
13
13
  var _iconInfoCvv = _interopRequireDefault(require("./icons/icon-info-cvv"));
14
14
  var _formContext = require("./form-context");
15
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
15
+ var _textFieldBase = require("./text-field-base");
16
16
  var _integerField = require("./integer-field");
17
17
  function _interopRequireDefault(obj) {
18
18
  return obj && obj.__esModule ? obj : {
@@ -178,7 +178,7 @@ var CvvField = function CvvField(_param) {
178
178
  onChange: onChange,
179
179
  onChangeValue: onChangeValue
180
180
  });
181
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
181
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
182
182
  }, rest, fieldProps, {
183
183
  maxLength: maxLength,
184
184
  onChange: function onChange(event) {
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _formContext = require("./form-context");
9
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
9
+ var _textFieldBase = require("./text-field-base");
10
10
  var _dom = require("./utils/dom");
11
11
  var _environment = require("./utils/environment");
12
12
  var _iconCalendarRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-calendar-regular"));
@@ -168,7 +168,7 @@ var DateField = function DateField(_param) {
168
168
  onChange: onChange,
169
169
  onChangeValue: onChangeValue
170
170
  });
171
- var nativePicker = /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
171
+ var nativePicker = /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
172
172
  }, rest, fieldProps, {
173
173
  min: min ? (0, _time).getLocalDateString(min) : undefined,
174
174
  max: max ? (0, _time).getLocalDateString(max) : undefined,
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _formContext = require("./form-context");
9
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
9
+ var _textFieldBase = require("./text-field-base");
10
10
  var _dom = require("./utils/dom");
11
11
  var _environment = require("./utils/environment");
12
12
  var _time = require("./utils/time");
@@ -169,7 +169,7 @@ var FormDateField = function FormDateField(_param) {
169
169
  onChange: onChange,
170
170
  onChangeValue: onChangeValue
171
171
  });
172
- var nativePicker = /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
172
+ var nativePicker = /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
173
173
  }, rest, fieldProps, {
174
174
  min: min ? (0, _time).getLocalDateTimeString(min) : undefined,
175
175
  max: max ? (0, _time).getLocalDateTimeString(max) : undefined,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  exports.default = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
8
+ var _textFieldBase = require("./text-field-base");
9
9
  var _iconCalendarRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-calendar-regular"));
10
10
  var _reactDatetime = _interopRequireDefault(require("react-datetime"));
11
11
  var _overlay = _interopRequireDefault(require("./overlay"));
@@ -408,7 +408,7 @@ var DateTimePicker = function DateTimePicker(_param) {
408
408
  };
409
409
  return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_jsxRuntime.Fragment, {
410
410
  children: [
411
- /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
411
+ /*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
412
412
  }, rest, {
413
413
  style: {
414
414
  cursor: 'default'
@@ -7,15 +7,10 @@ var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _formContext = require("./form-context");
9
9
  var _hooks = require("./hooks");
10
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
10
+ var _textFieldBase = require("./text-field-base");
11
11
  var _dom = require("./utils/dom");
12
12
  var _rifm = require("rifm");
13
13
  var _common = require("./utils/common");
14
- function _interopRequireDefault(obj) {
15
- return obj && obj.__esModule ? obj : {
16
- default: obj
17
- };
18
- }
19
14
  function _interopRequireWildcard(obj) {
20
15
  if (obj && obj.__esModule) {
21
16
  return obj;
@@ -244,7 +239,7 @@ var DecimalField = function DecimalField(_param) {
244
239
  onChange: onChange,
245
240
  onChangeValue: onChangeValue
246
241
  });
247
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
242
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
248
243
  }, rest, fieldProps, {
249
244
  inputComponent: DecimalInput,
250
245
  inputProps: {
@@ -6,12 +6,7 @@ exports.default = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  var _formContext = require("./form-context");
8
8
  var _hooks = require("./hooks");
9
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
10
- function _interopRequireDefault(obj) {
11
- return obj && obj.__esModule ? obj : {
12
- default: obj
13
- };
14
- }
9
+ var _textFieldBase = require("./text-field-base");
15
10
  function _defineProperty(obj, key, value) {
16
11
  if (key in obj) {
17
12
  Object.defineProperty(obj, key, {
@@ -116,7 +111,7 @@ var EmailField = function EmailField(_param) {
116
111
  onChange: onChange,
117
112
  onChangeValue: onChangeValue
118
113
  });
119
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
114
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
120
115
  }, rest, fieldProps, {
121
116
  type: "email",
122
117
  inputMode: "email",
package/dist/feedback.js CHANGED
@@ -459,13 +459,12 @@ var ErrorFeedbackScreen = function ErrorFeedbackScreen(_param) {
459
459
  "children",
460
460
  "errorReference"
461
461
  ]);
462
- var ref = (0, _hooks).useTheme(), skinName = ref.skinName, colors = ref.colors;
463
- var hasIcon = skinName !== _constants.VIVO_SKIN;
462
+ var ref = (0, _hooks).useTheme(), colors = ref.colors;
464
463
  return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(FeedbackScreen, _objectSpread({
465
464
  }, otherProps, {
466
465
  hapticFeedback: "error",
467
- icon: hasIcon ? /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconError.default, {
468
- }) : undefined,
466
+ icon: /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconError.default, {
467
+ }),
469
468
  animateText: true,
470
469
  children: [
471
470
  children,
@@ -479,12 +478,10 @@ var ErrorFeedbackScreen = function ErrorFeedbackScreen(_param) {
479
478
  };
480
479
  exports.ErrorFeedbackScreen = ErrorFeedbackScreen;
481
480
  var InfoFeedbackScreen = function InfoFeedbackScreen(props) {
482
- var ref = (0, _hooks).useTheme(), skinName = ref.skinName;
483
- var hasIcon = skinName !== _constants.VIVO_SKIN;
484
481
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(FeedbackScreen, _objectSpread({
485
482
  }, props, {
486
- icon: hasIcon ? /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconInfo.default, {
487
- }) : undefined
483
+ icon: /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconInfo.default, {
484
+ })
488
485
  })));
489
486
  };
490
487
  exports.InfoFeedbackScreen = InfoFeedbackScreen;
package/dist/header.d.ts CHANGED
@@ -6,7 +6,9 @@ import type { TextPresetProps } from './text';
6
6
  import type { NavigationBreadcrumbsProps } from './navigation-breadcrumbs';
7
7
  declare type OverridableTextProps = {
8
8
  color?: TextPresetProps['color'];
9
+ /** @deprecated use decoration prop */
9
10
  textDecoration?: TextPresetProps['textDecoration'];
11
+ decoration?: TextPresetProps['decoration'];
10
12
  truncate?: TextPresetProps['truncate'];
11
13
  };
12
14
  declare type RichText = string | ({
@@ -6,7 +6,12 @@ import { ButtonPrimary, ButtonSecondary } from "./button";
6
6
  import type { TextPresetProps } from "./text";
7
7
  declare type OverridableTextProps = {
8
8
  color?: $PropertyType<TextPresetProps, "color">,
9
+
10
+ /**
11
+ * @deprecated use decoration prop
12
+ */
9
13
  textDecoration?: $PropertyType<TextPresetProps, "textDecoration">,
14
+ decoration?: $PropertyType<TextPresetProps, "decoration">,
10
15
  truncate?: $PropertyType<TextPresetProps, "truncate">,
11
16
  };
12
17
  declare type RichText =
@@ -7,15 +7,10 @@ var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _rifm = require("rifm");
9
9
  var _formContext = require("./form-context");
10
- var _textFieldBase = _interopRequireDefault(require("./text-field-base"));
10
+ var _textFieldBase = require("./text-field-base");
11
11
  var _dom = require("./utils/dom");
12
12
  var _common = require("./utils/common");
13
13
  var _hooks = require("./hooks");
14
- function _interopRequireDefault(obj) {
15
- return obj && obj.__esModule ? obj : {
16
- default: obj
17
- };
18
- }
19
14
  function _interopRequireWildcard(obj) {
20
15
  if (obj && obj.__esModule) {
21
16
  return obj;
@@ -297,7 +292,7 @@ var IbanField = function IbanField(_param) {
297
292
  onChange: onChange,
298
293
  onChangeValue: onChangeValue
299
294
  });
300
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
295
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
301
296
  }, rest, fieldProps, {
302
297
  inputComponent: IbanInput
303
298
  })));
@@ -70,21 +70,29 @@ var IconSuccessO2 = function IconSuccessO2(param) {
70
70
  children: /*#__PURE__*/ (0, _jsxRuntime).jsxs("g", {
71
71
  className: (0, _classnames).default(_defineProperty({
72
72
  }, classes.iconContainer, !color)),
73
- strokeWidth: "2",
74
73
  strokeLinecap: "round",
75
74
  strokeLinejoin: "round",
76
75
  children: [
77
76
  /*#__PURE__*/ (0, _jsxRuntime).jsx("path", _objectSpread({
78
77
  fill: "none",
78
+ strokeWidth: "2",
79
79
  stroke: color ? color : undefined,
80
- strokeMiterlimit: "10",
81
- d: "M21.7,35.6l2.8,2.8c1.1,1.1,2.9,1.1,4.1,0l17.3-17.3"
82
- }, !skipAnimation && (0, _animation).mergeProperties((0, _animation).getAnimateDrawLineProps('33', '0.9s', platformOverrides), (0, _animation).getAnimateHopInProps('0.9s', platformOverrides)))),
80
+ d: "M45.64 53.84A25.599 25.599 0 0 1 32 57.75C17.78 57.75 6.25 46.22 6.25 32S17.78 6.25 32 6.25 57.75 17.78 57.75 32c0 5.13-1.5 9.92-4.09 13.93"
81
+ }, !skipAnimation && (0, _animation).getAnimateDrawLineProps('202', '0.3s', platformOverrides))),
83
82
  /*#__PURE__*/ (0, _jsxRuntime).jsx("path", _objectSpread({
84
83
  fill: "none",
84
+ strokeWidth: "2",
85
+ stroke: color ? color : undefined,
86
+ d: "m19.33 30.39 9.88 10.95 18.13-19.23"
87
+ }, !skipAnimation && (0, _animation).mergeProperties((0, _animation).getAnimateDrawLineProps('44', '0.6s', platformOverrides), (0, _animation).getAnimateHopInProps('0.6', platformOverrides)))),
88
+ /*#__PURE__*/ (0, _jsxRuntime).jsx("circle", _objectSpread({
89
+ fill: "none",
90
+ strokeWidth: "2",
85
91
  stroke: color ? color : undefined,
86
- d: "M49.1,57.9C44.2,61.1,38.3,63,32,63C14.9,63,1,49.1,1,32C1,14.9,14.9,1,32,1c17.1,0,31,13.9,31,31c0,7.5-2.6,14.3-7.1,19.7"
87
- }, !skipAnimation && (0, _animation).getAnimateDrawLineProps('186', '0.5s', platformOverrides)))
92
+ cx: "50.18",
93
+ cy: "50.1",
94
+ r: ".89"
95
+ }, !skipAnimation && (0, _animation).getAnimateDrawLineProps('180', '0.2s', platformOverrides)))
88
96
  ]
89
97
  })
90
98
  }));
package/dist/image.d.ts CHANGED
@@ -1,14 +1,35 @@
1
1
  import * as React from 'react';
2
- declare type AspectRatio = '1:1' | '16:9' | '7:10';
3
- declare type Props = {
2
+ export declare const useDisableBorderRadius: () => boolean;
3
+ export declare const DisableBorderRadiusProvider: React.FC;
4
+ export declare type AspectRatio = '1:1' | '16:9' | '7:10';
5
+ export declare const RATIO: {
6
+ '1:1': number;
7
+ '16:9': number;
8
+ '7:10': number;
9
+ };
10
+ export declare type ImageProps = {
11
+ src: string;
12
+ url?: undefined;
13
+ /** defaults to 100% when no width and no height are given */
14
+ width?: number;
15
+ height?: number;
16
+ /** defaults to 1:1, if both width and height are given, aspectRatio is ignored */
17
+ aspectRatio?: AspectRatio;
18
+ /** defaults to empty string */
19
+ alt?: string;
20
+ children?: void;
21
+ };
22
+ /** @deprecated */
23
+ declare type DeprecatedImageProps = {
4
24
  url: string;
25
+ src?: undefined;
5
26
  width?: number;
6
27
  height?: number;
7
- /** defaults to 1:1 */
28
+ /** defaults to 1:1, if both width and height are given, aspectRatio is ignored */
8
29
  aspectRatio?: AspectRatio;
9
30
  /** defaults to empty string */
10
31
  alt?: string;
11
32
  children?: void;
12
33
  };
13
- declare const Image: React.FC<Props>;
34
+ declare const Image: React.ForwardRefExoticComponent<(ImageProps | DeprecatedImageProps) & React.RefAttributes<HTMLImageElement>>;
14
35
  export default Image;