@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
@@ -14,16 +14,21 @@ var palette = {
14
14
  vivoPurpleLight20: '#E0CCEB',
15
15
  vivoPurpleLight10: '#EFE5F4',
16
16
  vivoGreen: '#99CC33',
17
- vivoGreenDark: '#33A14A',
18
- vivoGreenLight40: '#D6EAAD',
17
+ vivoGreenDark: '#225C3D',
18
+ vivoGreenLight30: '#91AE9E',
19
+ vivoGreenLight10: '#EDF8E8',
19
20
  vivoBlue: '#00ABDB',
20
21
  orange: '#FF9900',
21
- orangeDark: '#FA6324',
22
- orangeLight: '#FFD699',
22
+ orangeDark: '#972A1D',
23
+ orangeLight10: '#FFEFE1',
24
+ orangeLight40: '#FFB84C',
23
25
  pink: '#EB3D7D',
24
26
  pepper: '#CC1F59',
25
27
  pepperDark: '#B71D63',
28
+ pepperDark80: '#8F2052',
29
+ pepperLight40: '#DB628B',
26
30
  pepperLight30: '#F7B1CB',
31
+ pepperLight10: '#FCE4EF',
27
32
  grey1: '#F6F6F6',
28
33
  grey2: '#EEEEEE',
29
34
  grey3: '#DDDDDD',
@@ -127,7 +132,20 @@ var getVivoSkin = function getVivoSkin() {
127
132
  textNavigationSearchBarHint: palette.vivoPurpleLight50,
128
133
  textNavigationSearchBarText: palette.white,
129
134
  textAppBar: palette.grey4,
130
- textAppBarSelected: palette.vivoPurple
135
+ textAppBarSelected: palette.vivoPurple,
136
+ // TAGS
137
+ tagBackgroundSuccess: palette.vivoGreenLight10,
138
+ tagBackgroundWarning: palette.orangeLight10,
139
+ tagBackgroundError: palette.pepperLight10,
140
+ tagBackgroundPromo: palette.vivoPurpleLight10,
141
+ tagBackgroundActive: palette.vivoPurpleLight10,
142
+ tagBackgroundInactive: palette.grey1,
143
+ textTagSuccess: palette.vivoGreenDark,
144
+ textTagWarning: palette.orangeDark,
145
+ textTagError: palette.pepperDark80,
146
+ textTagPromo: palette.vivoPurple,
147
+ textTagActive: palette.vivoPurple,
148
+ textTagInactive: palette.grey5
131
149
  },
132
150
  darkModeColors: {
133
151
  appBarBackground: palette.darkModeGrey,
@@ -195,7 +213,20 @@ var getVivoSkin = function getVivoSkin() {
195
213
  textNavigationSearchBarHint: palette.grey4,
196
214
  textNavigationSearchBarText: palette.grey2,
197
215
  textAppBar: palette.grey5,
198
- textAppBarSelected: palette.grey2
216
+ textAppBarSelected: palette.grey2,
217
+ // TAGS
218
+ tagBackgroundSuccess: (0, _color).applyAlpha(palette.white, 0.05),
219
+ tagBackgroundWarning: (0, _color).applyAlpha(palette.white, 0.05),
220
+ tagBackgroundError: (0, _color).applyAlpha(palette.white, 0.05),
221
+ tagBackgroundPromo: (0, _color).applyAlpha(palette.white, 0.05),
222
+ tagBackgroundActive: (0, _color).applyAlpha(palette.white, 0.05),
223
+ tagBackgroundInactive: (0, _color).applyAlpha(palette.white, 0.05),
224
+ textTagSuccess: palette.vivoGreenLight30,
225
+ textTagWarning: palette.orangeLight40,
226
+ textTagError: palette.pepperLight40,
227
+ textTagPromo: palette.vivoPurpleLight50,
228
+ textTagActive: palette.vivoPurpleLight50,
229
+ textTagInactive: palette.grey4
199
230
  }
200
231
  };
201
232
  };
@@ -10,16 +10,21 @@ declare export var palette: {
10
10
  +vivoPurpleLight20: "#E0CCEB",
11
11
  +vivoPurpleLight10: "#EFE5F4",
12
12
  +vivoGreen: "#99CC33",
13
- +vivoGreenDark: "#33A14A",
14
- +vivoGreenLight40: "#D6EAAD",
13
+ +vivoGreenDark: "#225C3D",
14
+ +vivoGreenLight30: "#91AE9E",
15
+ +vivoGreenLight10: "#EDF8E8",
15
16
  +vivoBlue: "#00ABDB",
16
17
  +orange: "#FF9900",
17
- +orangeDark: "#FA6324",
18
- +orangeLight: "#FFD699",
18
+ +orangeDark: "#972A1D",
19
+ +orangeLight10: "#FFEFE1",
20
+ +orangeLight40: "#FFB84C",
19
21
  +pink: "#EB3D7D",
20
22
  +pepper: "#CC1F59",
21
23
  +pepperDark: "#B71D63",
24
+ +pepperDark80: "#8F2052",
25
+ +pepperLight40: "#DB628B",
22
26
  +pepperLight30: "#F7B1CB",
27
+ +pepperLight10: "#FCE4EF",
23
28
  +grey1: "#F6F6F6",
24
29
  +grey2: "#EEEEEE",
25
30
  +grey3: "#DDDDDD",
package/dist/tag.d.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import * as React from 'react';
2
+ import type { IconProps } from './utils/types';
3
+ export declare type TagType = 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
2
4
  export declare type TagProps = {
5
+ type?: 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
3
6
  children: string;
4
- color: string;
7
+ Icon?: React.FC<IconProps>;
8
+ /** @deprecated use type prop */
9
+ color?: string;
5
10
  };
6
11
  declare const Tag: React.FC<TagProps>;
7
12
  export default Tag;
package/dist/tag.js CHANGED
@@ -4,48 +4,157 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  exports.default = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
+ var _box = _interopRequireDefault(require("./box"));
7
8
  var _hooks = require("./hooks");
8
9
  var _jss = require("./jss");
9
10
  var _text = require("./text");
10
11
  var _themeVariantContext = require("./theme-variant-context");
12
+ var _css = require("./utils/css");
13
+ function _interopRequireDefault(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
18
+ function _arrayWithHoles(arr) {
19
+ if (Array.isArray(arr)) return arr;
20
+ }
21
+ function _iterableToArrayLimit(arr, i) {
22
+ var _arr = [];
23
+ var _n = true;
24
+ var _d = false;
25
+ var _e = undefined;
26
+ try {
27
+ for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
28
+ _arr.push(_s.value);
29
+ if (i && _arr.length === i) break;
30
+ }
31
+ } catch (err) {
32
+ _d = true;
33
+ _e = err;
34
+ } finally{
35
+ try {
36
+ if (!_n && _i["return"] != null) _i["return"]();
37
+ } finally{
38
+ if (_d) throw _e;
39
+ }
40
+ }
41
+ return _arr;
42
+ }
43
+ function _nonIterableRest() {
44
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
45
+ }
46
+ function _slicedToArray(arr, i) {
47
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
48
+ }
11
49
  var useStyles = (0, _jss).createUseStyles(function() {
12
50
  return {
13
51
  tag: {
14
- backgroundColor: function backgroundColor(param) {
15
- var color = param.color;
16
- return color;
17
- },
18
- padding: '2px 8px',
19
- borderRadius: 2,
20
- minWidth: 48,
21
52
  display: 'inline-flex',
53
+ flexDirection: 'row',
22
54
  alignItems: 'center',
23
- justifyContent: 'center'
55
+ borderRadius: 50,
56
+ justifyContent: 'center',
57
+ minWidth: 56,
58
+ padding: function padding(param) {
59
+ var hasIcon = param.hasIcon;
60
+ return "4px 12px 4px ".concat(hasIcon ? 8 : 12, "px");
61
+ },
62
+ // FIXME: remove this style and use an inline style for the icon once WEB-338 gets merged
63
+ '& svg': {
64
+ display: 'block'
65
+ }
24
66
  }
25
67
  };
26
68
  });
27
69
  var Tag = function Tag(param) {
28
- var children = param.children, color = param.color;
70
+ var Icon = param.Icon, children = param.children, _type = param.type, type = _type === void 0 ? 'promo' : _type, color = param.color;
29
71
  var classes = useStyles({
30
- color: color
72
+ hasIcon: !!Icon
31
73
  });
32
74
  var ref = (0, _hooks).useTheme(), colors = ref.colors, isDarkMode = ref.isDarkMode;
33
- // Hardcode black text in darkmode because there isn't a black text color constant that we can use in dark mode
34
- var blackText = isDarkMode ? '#313235' : colors.textPrimary;
35
- var textColor = color === colors.inverse ? blackText : colors.textPrimaryInverse;
36
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx("span", {
37
- className: classes.tag,
38
- children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_themeVariantContext.ThemeVariant, {
75
+ var isInverse = (0, _themeVariantContext).useIsInverseVariant();
76
+ if (!children) {
77
+ return null;
78
+ }
79
+ /**
80
+ * Legacy implementation
81
+ *
82
+ * @deprecated to be removed in the next major version
83
+ */ if (color) {
84
+ // Hardcode black text in darkmode because there isn't a black text color constant that we can use in dark mode
85
+ var blackText = isDarkMode ? '#313235' : colors.textPrimary;
86
+ var textColor = color === colors.inverse ? blackText : colors.textPrimaryInverse;
87
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_themeVariantContext.ThemeVariant, {
39
88
  isInverse: false,
40
- children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text, {
41
- color: textColor,
42
- size: 12,
43
- lineHeight: 16,
44
- weight: "regular",
45
- uppercase: true,
46
- children: children
89
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx("span", {
90
+ className: classes.tag,
91
+ style: {
92
+ background: color
93
+ },
94
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text, {
95
+ color: textColor,
96
+ size: 14,
97
+ lineHeight: 20,
98
+ weight: "medium",
99
+ truncate: true,
100
+ children: children
101
+ })
102
+ })
103
+ }));
104
+ }
105
+ var tagTypeToColors = {
106
+ promo: [
107
+ colors.textTagPromo,
108
+ colors.tagBackgroundPromo
109
+ ],
110
+ active: [
111
+ colors.textTagActive,
112
+ colors.tagBackgroundActive
113
+ ],
114
+ inactive: [
115
+ colors.textTagInactive,
116
+ colors.tagBackgroundInactive
117
+ ],
118
+ success: [
119
+ colors.textTagSuccess,
120
+ colors.tagBackgroundSuccess
121
+ ],
122
+ warning: [
123
+ colors.textTagWarning,
124
+ colors.tagBackgroundWarning
125
+ ],
126
+ error: [
127
+ colors.textTagError,
128
+ colors.tagBackgroundError
129
+ ]
130
+ };
131
+ var _type1 = _slicedToArray(tagTypeToColors[type], 2), textColor = _type1[0], backgroundColor = _type1[1];
132
+ var shouldUseInverseBackground = isInverse && !isDarkMode;
133
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsxs("span", {
134
+ className: classes.tag,
135
+ style: {
136
+ background: shouldUseInverseBackground ? colors.inverse : backgroundColor
137
+ },
138
+ children: [
139
+ Icon && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
140
+ paddingRight: 4,
141
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(Icon, {
142
+ color: textColor,
143
+ size: (0, _css).pxToRem(16)
144
+ })
145
+ }),
146
+ /*#__PURE__*/ (0, _jsxRuntime).jsx(_themeVariantContext.ThemeVariant, {
147
+ isInverse: false,
148
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text, {
149
+ color: textColor,
150
+ size: 14,
151
+ lineHeight: 20,
152
+ weight: "medium",
153
+ truncate: true,
154
+ children: children
155
+ })
47
156
  })
48
- })
157
+ ]
49
158
  }));
50
159
  };
51
160
  var _default = Tag;
package/dist/tag.js.flow CHANGED
@@ -1,9 +1,23 @@
1
1
  // @flow
2
2
 
3
3
  import * as React from "react";
4
+ import type { IconProps } from "./utils/types";
5
+ export type TagType =
6
+ | "promo"
7
+ | "active"
8
+ | "inactive"
9
+ | "success"
10
+ | "warning"
11
+ | "error";
4
12
  export type TagProps = {
13
+ type?: "promo" | "active" | "inactive" | "success" | "warning" | "error",
5
14
  children: string,
6
- color: string,
15
+ Icon?: React.ComponentType<IconProps>,
16
+
17
+ /**
18
+ * @deprecated use type prop
19
+ */
20
+ color?: string,
7
21
  };
8
22
  declare var Tag: React.ComponentType<TagProps>;
9
23
  declare export default typeof Tag;
@@ -71,5 +71,6 @@ interface TextFieldBaseProps {
71
71
  min?: string;
72
72
  max?: string;
73
73
  }
74
- declare const TextFieldBase: React.ForwardRefExoticComponent<TextFieldBaseProps & React.RefAttributes<any>>;
75
- export default TextFieldBase;
74
+ export declare const TextFieldBase: React.ForwardRefExoticComponent<TextFieldBaseProps & React.RefAttributes<any>>;
75
+ export declare const TextFieldBaseAutosuggest: React.ForwardRefExoticComponent<TextFieldBaseProps & React.RefAttributes<any>>;
76
+ export {};
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = void 0;
5
+ exports.TextFieldBase = exports.TextFieldBaseAutosuggest = void 0;
6
6
  var _jsxRuntime = require("react/jsx-runtime");
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _jss = require("./jss");
@@ -315,7 +315,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
315
315
  }), _defineProperty(_obj2, "transition", 'opacity 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms'), _obj2)
316
316
  };
317
317
  });
318
- var TextFieldBaseComponent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
318
+ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
319
319
  var error = _param.error, helperText = _param.helperText, label = _param.label, inputProps = _param.inputProps, inputRef = _param.inputRef, defaultValue = _param.defaultValue, value = _param.value, onFocus = _param.onFocus, onBlur = _param.onBlur, inputComponent = _param.inputComponent, prefix = _param.prefix, startIcon = _param.startIcon, endIcon = _param.endIcon, endIconOverlay = _param.endIconOverlay, shrinkLabelProp = _param.shrinkLabel, _multiline = _param.multiline, multiline = _multiline === void 0 ? false : _multiline, focus = _param.focus, fieldRef = _param.fieldRef, maxLength = _param.maxLength, idProp = _param.id, autoCompleteProp = _param.autoComplete, fullWidth = _param.fullWidth, rest = _objectWithoutProperties(_param, [
320
320
  "error",
321
321
  "helperText",
@@ -489,6 +489,7 @@ var TextFieldBaseComponent = /*#__PURE__*/ React.forwardRef(function(_param, ref
489
489
  ]
490
490
  }));
491
491
  });
492
+ exports.TextFieldBase = TextFieldBase;
492
493
  var useSuggestionsStyles = (0, _jss).createUseStyles(function() {
493
494
  return {
494
495
  menuItem: {
@@ -523,7 +524,7 @@ var Autosuggest = /*#__PURE__*/ React.lazy(function() {
523
524
  return _interopRequireWildcard(require(/* webpackChunkName: "react-autosuggest" */ 'react-autosuggest'));
524
525
  });
525
526
  });
526
- var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
527
+ var TextFieldBaseAutosuggest = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
527
528
  var getSuggestions = _param.getSuggestions, idProp = _param.id, props = _objectWithoutProperties(_param, [
528
529
  "getSuggestions",
529
530
  "id"
@@ -538,7 +539,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
538
539
  throw Error('Fields with suggestions must be used in controlled mode');
539
540
  }
540
541
  return getSuggestions ? /*#__PURE__*/ (0, _jsxRuntime).jsx(React.Suspense, {
541
- fallback: /*#__PURE__*/ (0, _jsxRuntime).jsx(TextFieldBaseComponent, _objectSpread({
542
+ fallback: /*#__PURE__*/ (0, _jsxRuntime).jsx(TextFieldBase, _objectSpread({
542
543
  }, props, {
543
544
  // This label override while loading is needed in acceptance tests because
544
545
  // while the test is typing, the component could be remounted.
@@ -571,7 +572,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
571
572
  }
572
573
  }),
573
574
  renderInputComponent: function renderInputComponent(inputProps) {
574
- /*#__PURE__*/ return (0, _jsxRuntime).jsx(TextFieldBaseComponent, _objectSpread({
575
+ /*#__PURE__*/ return (0, _jsxRuntime).jsx(TextFieldBase, _objectSpread({
575
576
  }, inputProps, {
576
577
  inputRef: (0, _common).combineRefs(inputRef, props.inputRef, ref)
577
578
  }));
@@ -611,11 +612,10 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
611
612
  }));
612
613
  }
613
614
  })
614
- }) : /*#__PURE__*/ (0, _jsxRuntime).jsx(TextFieldBaseComponent, _objectSpread({
615
+ }) : /*#__PURE__*/ (0, _jsxRuntime).jsx(TextFieldBase, _objectSpread({
615
616
  }, props, {
616
617
  id: id,
617
618
  ref: ref
618
619
  }));
619
620
  });
620
- var _default = TextFieldBase;
621
- exports.default = _default;
621
+ exports.TextFieldBaseAutosuggest = TextFieldBaseAutosuggest;
@@ -97,10 +97,14 @@ declare type TextFieldBaseProps = {
97
97
  min?: string,
98
98
  max?: string,
99
99
  };
100
- declare var TextFieldBase: React.ComponentType<{
100
+ declare export var TextFieldBase: React.ComponentType<{
101
101
  ...TextFieldBaseProps,
102
102
  ...{},
103
103
  }>;
104
- declare export default typeof TextFieldBase;
104
+ declare export var TextFieldBaseAutosuggest: React.ComponentType<{
105
+ ...TextFieldBaseProps,
106
+ ...{},
107
+ }>;
108
+ declare export {};
105
109
 
106
110
  import { type CssStyle } from "./__types__.js.flow";
@@ -6,13 +6,8 @@ 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 _common = require("./utils/common");
11
- function _interopRequireDefault(obj) {
12
- return obj && obj.__esModule ? obj : {
13
- default: obj
14
- };
15
- }
16
11
  function _interopRequireWildcard(obj) {
17
12
  if (obj && obj.__esModule) {
18
13
  return obj;
@@ -152,7 +147,7 @@ var TextField = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
152
147
  onChange: onChange,
153
148
  onChangeValue: onChangeValue
154
149
  });
155
- return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.default, _objectSpread({
150
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_textFieldBase.TextFieldBaseAutosuggest, _objectSpread({
156
151
  }, rest, fieldProps, {
157
152
  onClick: onPress,
158
153
  inputRef: (0, _common).combineRefs(inputRef, fieldProps.inputRef, ref),
package/dist/text.d.ts CHANGED
@@ -2,9 +2,13 @@ import * as React from 'react';
2
2
  declare type FontWeight = 'light' | 'regular' | 'medium';
3
3
  export interface TextPresetProps {
4
4
  color?: string;
5
+ /** @deprecated use decoration prop */
5
6
  textDecoration?: 'underline' | 'line-through' | 'none';
7
+ decoration?: 'underline' | 'line-through' | 'inherit' | 'none';
8
+ transform?: 'uppercase' | 'capitalize' | 'lowercase' | 'inherit' | 'none';
6
9
  children?: React.ReactNode;
7
10
  truncate?: boolean | number;
11
+ /** @deprecated use transform */
8
12
  uppercase?: boolean;
9
13
  wordBreak?: boolean;
10
14
  id?: string;
package/dist/text.js CHANGED
@@ -86,7 +86,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
86
86
  }
87
87
  return 'initial';
88
88
  };
89
- var _color, _textDecoration;
89
+ var _color, _decoration;
90
90
  return {
91
91
  text: _defineProperty({
92
92
  lineHeight: function lineHeight(param) {
@@ -94,8 +94,14 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
94
94
  return (0, _css).pxToRem(desktopLineHeight);
95
95
  },
96
96
  textTransform: function textTransform(param) {
97
- var uppercase = param.uppercase;
98
- return uppercase ? 'uppercase' : 'inherit';
97
+ var uppercase = param.uppercase, transform = param.transform;
98
+ if (uppercase) {
99
+ return 'uppercase';
100
+ }
101
+ if (transform) {
102
+ return transform;
103
+ }
104
+ return 'inherit';
99
105
  },
100
106
  fontSize: function fontSize(param) {
101
107
  var desktopSize = param.desktopSize;
@@ -110,7 +116,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
110
116
  return isInverse ? (_color = inverseColorsMap[color1]) !== null && _color !== void 0 ? _color : color1 : color1;
111
117
  },
112
118
  textDecoration: function textDecoration(p) {
113
- return (_textDecoration = p.textDecoration) !== null && _textDecoration !== void 0 ? _textDecoration : 'inherit';
119
+ return (_decoration = p.decoration) !== null && _decoration !== void 0 ? _decoration : 'inherit';
114
120
  },
115
121
  letterSpacing: function letterSpacing(param) {
116
122
  var letterSpacing1 = param.letterSpacing;
@@ -146,7 +152,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
146
152
  };
147
153
  });
148
154
  var Text = function Text(param) {
149
- var weight = param.weight, color = param.color, textDecoration = param.textDecoration, truncate = param.truncate, uppercase = param.uppercase, wordBreak = param.wordBreak, _as = param.as, as = _as === void 0 ? 'span' : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param['aria-level'];
155
+ var weight = param.weight, color = param.color, textDecoration = param.textDecoration, _decoration = param.decoration, decoration = _decoration === void 0 ? textDecoration : _decoration, truncate = param.truncate, uppercase = param.uppercase, transform = param.transform, wordBreak = param.wordBreak, _as = param.as, as = _as === void 0 ? 'span' : _as, children = param.children, size = param.size, _mobileSize = param.mobileSize, mobileSize = _mobileSize === void 0 ? size : _mobileSize, _desktopSize = param.desktopSize, desktopSize = _desktopSize === void 0 ? size : _desktopSize, lineHeight = param.lineHeight, _mobileLineHeight = param.mobileLineHeight, mobileLineHeight = _mobileLineHeight === void 0 ? lineHeight : _mobileLineHeight, _desktopLineHeight = param.desktopLineHeight, desktopLineHeight = _desktopLineHeight === void 0 ? lineHeight : _desktopLineHeight, letterSpacing = param.letterSpacing, id = param.id, role = param.role, ariaLevel = param['aria-level'];
150
156
  var isInverse = (0, _themeVariantContext).useIsInverseVariant();
151
157
  var classes = useStyles({
152
158
  isInverse: isInverse,
@@ -156,8 +162,9 @@ var Text = function Text(param) {
156
162
  desktopLineHeight: desktopLineHeight,
157
163
  weight: weight,
158
164
  color: color,
159
- textDecoration: textDecoration,
165
+ decoration: decoration,
160
166
  uppercase: uppercase,
167
+ transform: transform,
161
168
  wordBreak: wordBreak,
162
169
  letterSpacing: letterSpacing,
163
170
  truncate: truncate
package/dist/text.js.flow CHANGED
@@ -4,9 +4,19 @@ import * as React from "react";
4
4
  declare type FontWeight = "light" | "regular" | "medium";
5
5
  export type TextPresetProps = {
6
6
  color?: string,
7
+
8
+ /**
9
+ * @deprecated use decoration prop
10
+ */
7
11
  textDecoration?: "underline" | "line-through" | "none",
12
+ decoration?: "underline" | "line-through" | "inherit" | "none",
13
+ transform?: "uppercase" | "capitalize" | "lowercase" | "inherit" | "none",
8
14
  children?: React.Node,
9
15
  truncate?: boolean | number,
16
+
17
+ /**
18
+ * @deprecated use transform
19
+ */
10
20
  uppercase?: boolean,
11
21
  wordBreak?: boolean,
12
22
  id?: string,
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ export declare type AspectRatio = '1:1' | '16:9' | '12:5';
3
+ export declare const RATIO: {
4
+ '1:1': number;
5
+ '16:9': number;
6
+ '12:5': number;
7
+ };
8
+ declare type VideoSource = {
9
+ src: string;
10
+ type?: string;
11
+ };
12
+ export declare type VideoProps = {
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
+ /** accepts multiple sources */
19
+ src: string | Array<string> | VideoSource | Array<VideoSource>;
20
+ /** defaults to true */
21
+ loop?: boolean;
22
+ /** defaults to true */
23
+ muted?: boolean;
24
+ /** defaults to true */
25
+ autoPlay?: boolean;
26
+ poster?: string;
27
+ children?: void;
28
+ /** defaults to none */
29
+ preload?: 'none' | 'metadata' | 'auto';
30
+ };
31
+ declare const Video: React.ForwardRefExoticComponent<VideoProps & React.RefAttributes<HTMLVideoElement>>;
32
+ export default Video;