@telefonica/mistica 10.19.0 → 10.22.1

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 (62) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/button-layout.js +30 -17
  3. package/dist/button.js +24 -8
  4. package/dist/card.js +25 -28
  5. package/dist/chip.d.ts +9 -0
  6. package/dist/chip.js +111 -0
  7. package/dist/chip.js.flow +11 -0
  8. package/dist/form.js +1 -1
  9. package/dist/header.d.ts +2 -0
  10. package/dist/header.js.flow +5 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.js +7 -0
  13. package/dist/index.js.flow +2 -0
  14. package/dist/package-version.js +1 -1
  15. package/dist/skins/blau.d.ts +6 -3
  16. package/dist/skins/blau.js +34 -5
  17. package/dist/skins/blau.js.flow +6 -3
  18. package/dist/skins/movistar.d.ts +21 -11
  19. package/dist/skins/movistar.js +76 -40
  20. package/dist/skins/movistar.js.flow +21 -11
  21. package/dist/skins/o2-classic.d.ts +21 -9
  22. package/dist/skins/o2-classic.js +64 -26
  23. package/dist/skins/o2-classic.js.flow +21 -9
  24. package/dist/skins/o2.d.ts +19 -17
  25. package/dist/skins/o2.js +68 -40
  26. package/dist/skins/o2.js.flow +19 -17
  27. package/dist/skins/telefonica.d.ts +18 -13
  28. package/dist/skins/telefonica.js +76 -45
  29. package/dist/skins/telefonica.js.flow +18 -13
  30. package/dist/skins/types.d.ts +12 -0
  31. package/dist/skins/types.js.flow +12 -0
  32. package/dist/skins/vivo.d.ts +9 -4
  33. package/dist/skins/vivo.js +37 -6
  34. package/dist/skins/vivo.js.flow +9 -4
  35. package/dist/tag.d.ts +6 -1
  36. package/dist/tag.js +133 -24
  37. package/dist/tag.js.flow +15 -1
  38. package/dist/text.d.ts +4 -0
  39. package/dist/text.js +13 -6
  40. package/dist/text.js.flow +10 -0
  41. package/dist/theme-context-provider.js +8 -2
  42. package/dist/theme.d.ts +2 -0
  43. package/dist/theme.js.flow +2 -0
  44. package/dist/touchable.js +3 -2
  45. package/dist-es/button-layout.js +30 -17
  46. package/dist-es/button.js +24 -8
  47. package/dist-es/card.js +26 -29
  48. package/dist-es/chip.js +100 -0
  49. package/dist-es/form.js +1 -1
  50. package/dist-es/index.js +1 -0
  51. package/dist-es/package-version.js +1 -1
  52. package/dist-es/skins/blau.js +36 -5
  53. package/dist-es/skins/movistar.js +78 -40
  54. package/dist-es/skins/o2-classic.js +66 -26
  55. package/dist-es/skins/o2.js +70 -40
  56. package/dist-es/skins/telefonica.js +78 -45
  57. package/dist-es/skins/vivo.js +39 -6
  58. package/dist-es/tag.js +130 -26
  59. package/dist-es/text.js +13 -6
  60. package/dist-es/theme-context-provider.js +8 -2
  61. package/dist-es/touchable.js +3 -2
  62. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,37 @@
1
+ ## [10.22.1](https://github.com/Telefonica/mistica-web/compare/v10.22.0...v10.22.1) (2022-02-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Form fields:** use rawValue to check if a form field is empty ([#408](https://github.com/Telefonica/mistica-web/issues/408)) ([50a5d37](https://github.com/Telefonica/mistica-web/commit/50a5d37179903ed69f1aa33ac6b7e5d6b1f10a6f))
7
+
8
+ # [10.22.0](https://github.com/Telefonica/mistica-web/compare/v10.21.0...v10.22.0) (2022-02-02)
9
+
10
+
11
+ ### Features
12
+
13
+ * **Chip:** new component ([#395](https://github.com/Telefonica/mistica-web/issues/395)) ([37f1be2](https://github.com/Telefonica/mistica-web/commit/37f1be2322ad3913b3084fb6a14539629a9a81b4))
14
+
15
+ # [10.21.0](https://github.com/Telefonica/mistica-web/compare/v10.20.0...v10.21.0) (2022-01-27)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **ButtonLayout:** missed button press in button layout when gaining focus ([#396](https://github.com/Telefonica/mistica-web/issues/396)) ([9f3bba5](https://github.com/Telefonica/mistica-web/commit/9f3bba57affeac7b89c7dc831d00ce4ef33cdb5f))
21
+ * **ButtonLayout:** unstable in acceptance tests ([#404](https://github.com/Telefonica/mistica-web/issues/404)) ([11d4772](https://github.com/Telefonica/mistica-web/commit/11d4772c49d5f35bfcfa4ead6826782eccde5a18))
22
+
23
+
24
+ ### Features
25
+
26
+ * **Touchable:** WEB-435 add hrefDecorator to theme ([#401](https://github.com/Telefonica/mistica-web/issues/401)) ([21a45ee](https://github.com/Telefonica/mistica-web/commit/21a45ee84259af4ccca2a5adf2a7242b442d2874))
27
+
28
+ # [10.20.0](https://github.com/Telefonica/mistica-web/compare/v10.19.0...v10.20.0) (2022-01-24)
29
+
30
+
31
+ ### Features
32
+
33
+ * **Tags:** Tag component evolution ([#372](https://github.com/Telefonica/mistica-web/issues/372)) ([0db48b1](https://github.com/Telefonica/mistica-web/commit/0db48b15525b67c574b90c8c450b35ef155ca199))
34
+
1
35
  # [10.19.0](https://github.com/Telefonica/mistica-web/compare/v10.18.0...v10.19.0) (2022-01-24)
2
36
 
3
37
 
@@ -9,6 +9,7 @@ var _jss = require("./jss");
9
9
  var _hooks = require("./hooks");
10
10
  var _button = require("./button");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
12
13
  function _interopRequireDefault(obj) {
13
14
  return obj && obj.__esModule ? obj : {
14
15
  default: obj
@@ -207,28 +208,29 @@ var buttonsRange = [
207
208
  var ButtonLayout = function ButtonLayout(param) {
208
209
  var children = param.children, _align = param.align, align = _align === void 0 ? 'full-width' : _align, link = param.link, _withMargins = param.withMargins, withMargins = _withMargins === void 0 ? false : _withMargins;
209
210
  var ref = (0, _hooks).useScreenSize(), isTabletOrSmaller = ref.isTabletOrSmaller;
210
- var ref1 = _slicedToArray(React.useState(true), 2), isMeasuring = ref1[0], setIsMeasuring = ref1[1];
211
211
  var childrenCount = React.Children.count(children);
212
- var ref2 = _slicedToArray(React.useState(0), 2), buttonWidth = ref2[0], setButtonWidth = ref2[1];
213
- var updateButtonWidth = function updateButtonWidth(buttonWidth) {
212
+ var ref1 = _slicedToArray(React.useState({
213
+ isMeasuring: true,
214
+ buttonWidth: 0
215
+ }), 2), buttonStatus = ref1[0], setButtonStatus = ref1[1];
216
+ var updateButtonStatus = function updateButtonStatus(param) {
217
+ var isMeasuring = param.isMeasuring, buttonWidth = param.buttonWidth;
214
218
  if (process.env.NODE_ENV !== 'test') {
215
- setButtonWidth(buttonWidth);
216
- }
217
- };
218
- var updateIsMeasuring = function updateIsMeasuring(isMeasuring) {
219
- if (process.env.NODE_ENV !== 'test') {
220
- setIsMeasuring(isMeasuring);
219
+ setButtonStatus({
220
+ isMeasuring: isMeasuring,
221
+ buttonWidth: buttonWidth
222
+ });
221
223
  }
222
224
  };
223
225
  var classes = useStyles({
224
- buttonWidth: buttonWidth,
226
+ buttonWidth: buttonStatus.buttonWidth,
225
227
  isTabletOrSmaller: isTabletOrSmaller,
226
228
  align: align,
227
229
  childrenCount: childrenCount
228
230
  });
229
231
  var wrapperElRef = React.useRef(null);
230
232
  (0, _hooks).useIsomorphicLayoutEffect(function() {
231
- if (isMeasuring) {
233
+ if (buttonStatus.isMeasuring) {
232
234
  var req = window.requestAnimationFrame(function() {
233
235
  if (wrapperElRef.current) {
234
236
  var childrenWidths = Array.from(wrapperElRef.current.children).map(function(el) {
@@ -243,8 +245,10 @@ var ButtonLayout = function ButtonLayout(param) {
243
245
  var maxChildWidth = Math.ceil((_Math = Math).max.apply(_Math, _toConsumableArray(childrenWidths).concat([
244
246
  _button.BUTTON_MIN_WIDTH
245
247
  ])));
246
- updateButtonWidth(maxChildWidth);
247
- updateIsMeasuring(false);
248
+ updateButtonStatus({
249
+ isMeasuring: false,
250
+ buttonWidth: maxChildWidth
251
+ });
248
252
  }
249
253
  });
250
254
  return function() {
@@ -255,11 +259,20 @@ var ButtonLayout = function ButtonLayout(param) {
255
259
  };
256
260
  }, [
257
261
  classes.link,
258
- isMeasuring
262
+ buttonStatus
259
263
  ]);
260
- var calcLayout = React.useCallback(function() {
261
- updateButtonWidth(0);
262
- updateIsMeasuring(true);
264
+ /**
265
+ * Multiple calls to calcLayout are debounced to workaround an issue that can be reproduced in chrome when pressing
266
+ * the button during a focus/visibility change. For example, pressing the button having the focus on the devTools.
267
+ */ var calcLayout = React.useMemo(function() {
268
+ return (0, _debounce).default(function() {
269
+ updateButtonStatus({
270
+ isMeasuring: true,
271
+ buttonWidth: 0
272
+ });
273
+ }, 5, {
274
+ maxWait: 50
275
+ });
263
276
  }, []);
264
277
  useOnChildrenChangeEffect(wrapperElRef.current, calcLayout);
265
278
  useOnFontsReadyEffect(calcLayout);
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.js CHANGED
@@ -47,8 +47,7 @@ var useCardContentStyles = (0, _jss).createUseStyles(function() {
47
47
  actions: {
48
48
  flex: 1,
49
49
  display: 'flex',
50
- alignItems: 'flex-end',
51
- marginTop: 16
50
+ alignItems: 'flex-end'
52
51
  }
53
52
  };
54
53
  });
@@ -62,32 +61,30 @@ var CardContent = function CardContent(param) {
62
61
  }
63
62
  if (typeof headline === 'string') {
64
63
  return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_tag.default, {
65
- color: theme.colors.promo,
64
+ type: "promo",
66
65
  children: headline
67
66
  }));
68
67
  }
69
68
  return headline;
70
69
  };
71
- return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_jsxRuntime.Fragment, {
70
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
71
+ space: 16,
72
72
  children: [
73
73
  /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
74
- space: 16,
74
+ space: 8,
75
75
  children: [
76
- /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
77
- space: 8,
78
- children: [
79
- (headline || pretitle || title || subtitle) && /*#__PURE__*/ (0, _jsxRuntime).jsx("header", {
80
- 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, {
81
82
  space: 4,
82
83
  children: [
83
- renderHeadline(),
84
- pretitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
85
- paddingTop: 4,
86
- children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
87
- regular: true,
88
- uppercase: true,
89
- children: pretitle
90
- })
84
+ pretitle && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text1, {
85
+ regular: true,
86
+ uppercase: true,
87
+ children: pretitle
91
88
  }),
92
89
  /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text4, {
93
90
  as: "h1",
@@ -100,20 +97,20 @@ var CardContent = function CardContent(param) {
100
97
  })
101
98
  ]
102
99
  })
103
- }),
104
- description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
105
- as: "p",
106
- regular: true,
107
- color: theme.colors.textSecondary,
108
- children: description
109
- })
110
- ]
100
+ ]
101
+ })
111
102
  }),
112
- extra && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
113
- children: extra
103
+ description && /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
104
+ as: "p",
105
+ regular: true,
106
+ color: theme.colors.textSecondary,
107
+ children: description
114
108
  })
115
109
  ]
116
110
  }),
111
+ extra && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
112
+ children: extra
113
+ }),
117
114
  (button || buttonLink) && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
118
115
  className: classes.actions,
119
116
  children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_buttonGroup.default, {
package/dist/chip.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import type { IconProps } from './utils/types';
3
+ declare type ChipProps = {
4
+ children: string;
5
+ Icon?: React.FC<IconProps>;
6
+ onClose?: () => void;
7
+ };
8
+ declare const Chip: React.FC<ChipProps>;
9
+ export default Chip;
package/dist/chip.js ADDED
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.default = void 0;
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ var _jss = require("./jss");
8
+ var _hooks = require("./hooks");
9
+ var _box = _interopRequireDefault(require("./box"));
10
+ var _text = require("./text");
11
+ var _iconButton = _interopRequireDefault(require("./icon-button"));
12
+ var _iconCloseRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-close-regular"));
13
+ var _css = require("./utils/css");
14
+ function _interopRequireDefault(obj) {
15
+ return obj && obj.__esModule ? obj : {
16
+ default: obj
17
+ };
18
+ }
19
+ function _defineProperty(obj, key, value) {
20
+ if (key in obj) {
21
+ Object.defineProperty(obj, key, {
22
+ value: value,
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true
26
+ });
27
+ } else {
28
+ obj[key] = value;
29
+ }
30
+ return obj;
31
+ }
32
+ var useStyles = (0, _jss).createUseStyles(function(param) {
33
+ var colors = param.colors, mq = param.mq;
34
+ return {
35
+ container: _defineProperty({
36
+ display: 'inline-flex',
37
+ justifyContent: 'center',
38
+ alignItems: 'center',
39
+ border: "1px solid ".concat(colors.border),
40
+ borderRadius: 20,
41
+ backgroundColor: colors.backgroundContainer,
42
+ minHeight: 32,
43
+ minWidth: 56,
44
+ cursor: 'default',
45
+ color: colors.neutralMedium,
46
+ '& > span': {
47
+ color: colors.textPrimary
48
+ }
49
+ }, mq.supportsHover, {
50
+ '&:hover': {
51
+ borderColor: function borderColor(param) {
52
+ var isDarkMode = param.isDarkMode;
53
+ return isDarkMode ? colors.background : colors.tagBackgroundActive;
54
+ },
55
+ color: colors.controlActivated,
56
+ backgroundColor: colors.tagBackgroundActive
57
+ },
58
+ '&:hover > span': {
59
+ color: colors.textLink
60
+ }
61
+ })
62
+ };
63
+ });
64
+ var Chip = function Chip(param) {
65
+ var children = param.children, Icon = param.Icon, onClose = param.onClose;
66
+ var ref = (0, _hooks).useTheme(), texts = ref.texts, isDarkMode = ref.isDarkMode;
67
+ var classes = useStyles({
68
+ isDarkMode: isDarkMode
69
+ });
70
+ return(/*#__PURE__*/ (0, _jsxRuntime).jsxs(_box.default, {
71
+ className: classes.container,
72
+ paddingLeft: Icon ? 8 : 12,
73
+ paddingRight: onClose ? 0 : 12,
74
+ children: [
75
+ Icon && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
76
+ paddingRight: 4,
77
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(Icon, {
78
+ color: "currentColor",
79
+ size: (0, _css).pxToRem(16)
80
+ })
81
+ }),
82
+ /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text2, {
83
+ medium: true,
84
+ truncate: 1,
85
+ color: "currentColor",
86
+ children: children
87
+ }),
88
+ onClose ? /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
89
+ paddingLeft: 4,
90
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconButton.default, {
91
+ size: 24,
92
+ style: {
93
+ display: 'flex',
94
+ justifyContent: 'center',
95
+ alignItems: 'center'
96
+ },
97
+ "aria-label": texts.closeButtonLabel,
98
+ onPress: function onPress() {
99
+ return onClose();
100
+ },
101
+ children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_iconCloseRegular.default, {
102
+ size: 16,
103
+ color: "currentColor"
104
+ })
105
+ })
106
+ }) : null
107
+ ]
108
+ }));
109
+ };
110
+ var _default = Chip;
111
+ exports.default = _default;
@@ -0,0 +1,11 @@
1
+ // @flow
2
+
3
+ import * as React from "react";
4
+ import type { IconProps } from "./utils/types";
5
+ declare type ChipProps = {
6
+ children: string,
7
+ Icon?: React.ComponentType<IconProps>,
8
+ onClose?: () => void,
9
+ };
10
+ declare var Chip: React.ComponentType<ChipProps>;
11
+ declare export default typeof Chip;
package/dist/form.js CHANGED
@@ -182,7 +182,7 @@ var Form = function Form(param) {
182
182
  if (input.disabled) {
183
183
  continue;
184
184
  }
185
- if (input.required && !input.value.trim()) {
185
+ if (input.required && !rawValues[name].trim()) {
186
186
  errors[name] = texts.formFieldErrorIsMandatory;
187
187
  } else {
188
188
  var error = validator === null || validator === void 0 ? void 0 : validator(values[name], rawValues[name]);
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 =
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export { default as MasterDetailLayout } from './master-detail-layout';
34
34
  export { default as NavigationBreadcrumbs } from './navigation-breadcrumbs';
35
35
  export { default as Text, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, Text9, Text10 } from './text';
36
36
  export { default as Tag } from './tag';
37
+ export type { TagType } from './tag';
37
38
  export { default as SectionTitle } from './section-title';
38
39
  export { Placeholder, AvatarPlaceholder } from './placeholder';
39
40
  export { RowList, Row, BoxedRowList, BoxedRow } from './list';
@@ -55,6 +56,7 @@ export { default as Callout } from './callout';
55
56
  export { useModalState } from './modal-context-provider';
56
57
  export { NavigationBar, MainNavigationBar, FunnelNavigationBar, NavigationBarActionGroup, NavigationBarAction, NavigationBarLogo, } from './navigation-bar';
57
58
  export { default as Image } from './image';
59
+ export { default as Chip } from './chip';
58
60
  export { default as Video } from './video';
59
61
  export { default as Form } from './form';
60
62
  export { default as Select } from './select';
package/dist/index.js CHANGED
@@ -566,6 +566,12 @@ Object.defineProperty(exports, "Image", {
566
566
  return _image.default;
567
567
  }
568
568
  });
569
+ Object.defineProperty(exports, "Chip", {
570
+ enumerable: true,
571
+ get: function() {
572
+ return _chip.default;
573
+ }
574
+ });
569
575
  Object.defineProperty(exports, "Video", {
570
576
  enumerable: true,
571
577
  get: function() {
@@ -8304,6 +8310,7 @@ var _callout = _interopRequireDefault(require("./callout"));
8304
8310
  var _modalContextProvider = require("./modal-context-provider");
8305
8311
  var _navigationBar = require("./navigation-bar");
8306
8312
  var _image = _interopRequireDefault(require("./image"));
8313
+ var _chip = _interopRequireDefault(require("./chip"));
8307
8314
  var _video = _interopRequireDefault(require("./video"));
8308
8315
  var _form = _interopRequireDefault(require("./form"));
8309
8316
  var _select = _interopRequireDefault(require("./select"));
@@ -70,6 +70,7 @@ declare export {
70
70
  Text10,
71
71
  } from "./text";
72
72
  declare export { default as Tag } from "./tag";
73
+ export type { TagType } from "./tag";
73
74
  declare export { default as SectionTitle } from "./section-title";
74
75
  declare export { Placeholder, AvatarPlaceholder } from "./placeholder";
75
76
  declare export { RowList, Row, BoxedRowList, BoxedRow } from "./list";
@@ -98,6 +99,7 @@ declare export {
98
99
  NavigationBarLogo,
99
100
  } from "./navigation-bar";
100
101
  declare export { default as Image } from "./image";
102
+ declare export { default as Chip } from "./chip";
101
103
  declare export { default as Video } from "./video";
102
104
  declare export { default as Form } from "./form";
103
105
  declare export { default as Select } from "./select";
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  exports.PACKAGE_VERSION = void 0;
6
- var PACKAGE_VERSION = '10.19.0';
6
+ var PACKAGE_VERSION = '10.22.1';
7
7
  exports.PACKAGE_VERSION = PACKAGE_VERSION;
@@ -14,16 +14,19 @@ export declare const palette: {
14
14
  readonly blauPurple30: "#BB89D9";
15
15
  readonly blauYellow: "#FFA922";
16
16
  readonly blauYellow10: "#FFF6E9";
17
+ readonly blauYellow40: "#FFC364";
17
18
  readonly blauYellow60: "#F09500";
18
19
  readonly blauYellow70: "#996614";
20
+ readonly blauGreen: "#30D300";
21
+ readonly blauGreen10: "#EAFBE5";
22
+ readonly blauGreen30: "#97E980";
23
+ readonly blauGreen70: "#1D7F00";
19
24
  readonly blauRed: "#F64417";
20
25
  readonly blauRed10: "#FEECE8";
21
26
  readonly blauRed20: "#FCC7B9";
22
27
  readonly blauRed30: "#FA9E87";
28
+ readonly blauRed40: "#F97C5D";
23
29
  readonly blauRed70: "#C93712";
24
- readonly blauGreen: "#30D300";
25
- readonly blauGreen10: "#EAFBE5";
26
- readonly blauGreen70: "#1D7F00";
27
30
  readonly grey1: "#F5F9FA";
28
31
  readonly grey2: "#E7E7E7";
29
32
  readonly grey3: "#B8B8B8";
@@ -20,16 +20,19 @@ var palette = {
20
20
  blauPurple30: '#BB89D9',
21
21
  blauYellow: '#FFA922',
22
22
  blauYellow10: '#FFF6E9',
23
+ blauYellow40: '#FFC364',
23
24
  blauYellow60: '#F09500',
24
25
  blauYellow70: '#996614',
26
+ blauGreen: '#30D300',
27
+ blauGreen10: '#EAFBE5',
28
+ blauGreen30: '#97E980',
29
+ blauGreen70: '#1D7F00',
25
30
  blauRed: '#F64417',
26
31
  blauRed10: '#FEECE8',
27
32
  blauRed20: '#FCC7B9',
28
33
  blauRed30: '#FA9E87',
34
+ blauRed40: '#F97C5D',
29
35
  blauRed70: '#C93712',
30
- blauGreen: '#30D300',
31
- blauGreen10: '#EAFBE5',
32
- blauGreen70: '#1D7F00',
33
36
  grey1: '#F5F9FA',
34
37
  grey2: '#E7E7E7',
35
38
  grey3: '#B8B8B8',
@@ -132,7 +135,20 @@ var getBlauSkin = function getBlauSkin() {
132
135
  textNavigationSearchBarHint: palette.blauBlueSecondary20,
133
136
  textNavigationSearchBarText: palette.white,
134
137
  textAppBar: palette.grey5,
135
- textAppBarSelected: palette.blauBlueSecondary60
138
+ textAppBarSelected: palette.blauBlueSecondary60,
139
+ // TAGS
140
+ tagBackgroundSuccess: palette.blauGreen10,
141
+ tagBackgroundWarning: palette.blauYellow10,
142
+ tagBackgroundError: palette.blauRed10,
143
+ tagBackgroundPromo: palette.blauPurple10,
144
+ tagBackgroundActive: palette.blauBlueSecondary10,
145
+ tagBackgroundInactive: palette.grey2,
146
+ textTagSuccess: palette.blauGreen70,
147
+ textTagWarning: palette.blauYellow70,
148
+ textTagError: palette.blauRed70,
149
+ textTagPromo: palette.blauPurple,
150
+ textTagActive: palette.blauBlueSecondary,
151
+ textTagInactive: palette.grey5
136
152
  },
137
153
  darkModeColors: {
138
154
  // BACKGROUNDS
@@ -194,7 +210,20 @@ var getBlauSkin = function getBlauSkin() {
194
210
  textNavigationSearchBarHint: palette.grey4,
195
211
  textNavigationSearchBarText: palette.grey2,
196
212
  textAppBar: palette.grey5,
197
- textAppBarSelected: palette.grey2
213
+ textAppBarSelected: palette.grey2,
214
+ // TAGS
215
+ tagBackgroundSuccess: (0, _color).applyAlpha(palette.white, 0.05),
216
+ tagBackgroundWarning: (0, _color).applyAlpha(palette.white, 0.05),
217
+ tagBackgroundError: (0, _color).applyAlpha(palette.white, 0.05),
218
+ tagBackgroundPromo: (0, _color).applyAlpha(palette.white, 0.05),
219
+ tagBackgroundActive: (0, _color).applyAlpha(palette.white, 0.05),
220
+ tagBackgroundInactive: (0, _color).applyAlpha(palette.white, 0.05),
221
+ textTagSuccess: palette.blauGreen30,
222
+ textTagWarning: palette.blauYellow40,
223
+ textTagError: palette.blauRed40,
224
+ textTagPromo: palette.blauPurple30,
225
+ textTagActive: palette.blauBluePrimary30,
226
+ textTagInactive: palette.grey4
198
227
  }
199
228
  };
200
229
  };
@@ -16,16 +16,19 @@ declare export var palette: {
16
16
  +blauPurple30: "#BB89D9",
17
17
  +blauYellow: "#FFA922",
18
18
  +blauYellow10: "#FFF6E9",
19
+ +blauYellow40: "#FFC364",
19
20
  +blauYellow60: "#F09500",
20
21
  +blauYellow70: "#996614",
22
+ +blauGreen: "#30D300",
23
+ +blauGreen10: "#EAFBE5",
24
+ +blauGreen30: "#97E980",
25
+ +blauGreen70: "#1D7F00",
21
26
  +blauRed: "#F64417",
22
27
  +blauRed10: "#FEECE8",
23
28
  +blauRed20: "#FCC7B9",
24
29
  +blauRed30: "#FA9E87",
30
+ +blauRed40: "#F97C5D",
25
31
  +blauRed70: "#C93712",
26
- +blauGreen: "#30D300",
27
- +blauGreen10: "#EAFBE5",
28
- +blauGreen70: "#1D7F00",
29
32
  +grey1: "#F5F9FA",
30
33
  +grey2: "#E7E7E7",
31
34
  +grey3: "#B8B8B8",