@telefonica/mistica 12.5.0 → 12.7.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/dist/carousel.js +5 -3
- package/dist/dialog.d.ts +20 -5
- package/dist/dialog.js +39 -14
- package/dist/dialog.js.flow +24 -7
- package/dist/fixed-footer-layout.js +31 -9
- package/dist/generated/mistica-icons/icon-buy-data-light.js +5 -11
- package/dist/generated/mistica-icons/icon-buy-data-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-eco-light.js +1 -1
- package/dist/generated/mistica-icons/icon-justice-regular.js +1 -1
- package/dist/generated/mistica-icons/icon-tokens-filled.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-tokens-filled.js +109 -0
- package/dist/generated/mistica-icons/icon-tokens-filled.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-tokens-light.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-tokens-light.js +109 -0
- package/dist/generated/mistica-icons/icon-tokens-light.js.flow +6 -0
- package/dist/generated/mistica-icons/icon-tokens-regular.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-tokens-regular.js +109 -0
- package/dist/generated/mistica-icons/icon-tokens-regular.js.flow +6 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.js +16 -3
- package/dist/hooks.js.flow +3 -0
- package/dist/image.d.ts +2 -0
- package/dist/image.js +118 -80
- package/dist/image.js.flow +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28 -0
- package/dist/index.js.flow +4 -0
- package/dist/navigation-bar.js +7 -9
- package/dist/package-version.js +1 -1
- package/dist/skeletons.d.ts +5 -2
- package/dist/skeletons.js +50 -87
- package/dist/skeletons.js.flow +4 -4
- package/dist/skins/o2.js +1 -1
- package/dist/text-field-base.d.ts +0 -1
- package/dist/text-field-base.js +23 -5
- package/dist/text-field-base.js.flow +0 -1
- package/dist/text-field-components.d.ts +1 -0
- package/dist/text-field-components.js +7 -3
- package/dist/text-field-components.js.flow +1 -0
- package/dist/text-link.js +2 -1
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +2 -1
- package/dist/theme.js.flow +2 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +234 -78
- package/dist/tooltip.js.flow +2 -0
- package/dist/touchable.d.ts +1 -0
- package/dist/touchable.js +6 -1
- package/dist/touchable.js.flow +1 -0
- package/dist/utils/aspect-ratio-support.d.ts +10 -0
- package/dist/utils/aspect-ratio-support.js +115 -1
- package/dist/utils/aspect-ratio-support.js.flow +14 -0
- package/dist/video.js +20 -79
- package/dist-es/carousel.js +5 -3
- package/dist-es/dialog.js +40 -15
- package/dist-es/fixed-footer-layout.js +32 -10
- package/dist-es/generated/mistica-icons/icon-buy-data-light.js +6 -12
- package/dist-es/generated/mistica-icons/icon-buy-data-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-eco-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-justice-regular.js +1 -1
- package/dist-es/generated/mistica-icons/icon-tokens-filled.js +85 -0
- package/dist-es/generated/mistica-icons/icon-tokens-light.js +85 -0
- package/dist-es/generated/mistica-icons/icon-tokens-regular.js +85 -0
- package/dist-es/hooks.js +14 -2
- package/dist-es/image.js +115 -83
- package/dist-es/index.js +4 -0
- package/dist-es/navigation-bar.js +7 -9
- package/dist-es/package-version.js +1 -1
- package/dist-es/skeletons.js +50 -87
- package/dist-es/skins/o2.js +1 -1
- package/dist-es/text-field-base.js +25 -7
- package/dist-es/text-field-components.js +7 -3
- package/dist-es/text-link.js +3 -1
- package/dist-es/theme.js +2 -1
- package/dist-es/tooltip.js +234 -78
- package/dist-es/touchable.js +6 -1
- package/dist-es/utils/aspect-ratio-support.js +112 -0
- package/dist-es/video.js +21 -81
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -854,6 +854,12 @@ Object.defineProperty(exports, "useIsInViewport", {
|
|
|
854
854
|
return _hooks.useIsInViewport;
|
|
855
855
|
}
|
|
856
856
|
});
|
|
857
|
+
Object.defineProperty(exports, "pxToRem", {
|
|
858
|
+
enumerable: true,
|
|
859
|
+
get: function() {
|
|
860
|
+
return _css.pxToRem;
|
|
861
|
+
}
|
|
862
|
+
});
|
|
857
863
|
Object.defineProperty(exports, "TrackingConfig", {
|
|
858
864
|
enumerable: true,
|
|
859
865
|
get: function() {
|
|
@@ -9884,6 +9890,24 @@ Object.defineProperty(exports, "IconTkRegular", {
|
|
|
9884
9890
|
return _iconTkRegular.default;
|
|
9885
9891
|
}
|
|
9886
9892
|
});
|
|
9893
|
+
Object.defineProperty(exports, "IconTokensFilled", {
|
|
9894
|
+
enumerable: true,
|
|
9895
|
+
get: function() {
|
|
9896
|
+
return _iconTokensFilled.default;
|
|
9897
|
+
}
|
|
9898
|
+
});
|
|
9899
|
+
Object.defineProperty(exports, "IconTokensLight", {
|
|
9900
|
+
enumerable: true,
|
|
9901
|
+
get: function() {
|
|
9902
|
+
return _iconTokensLight.default;
|
|
9903
|
+
}
|
|
9904
|
+
});
|
|
9905
|
+
Object.defineProperty(exports, "IconTokensRegular", {
|
|
9906
|
+
enumerable: true,
|
|
9907
|
+
get: function() {
|
|
9908
|
+
return _iconTokensRegular.default;
|
|
9909
|
+
}
|
|
9910
|
+
});
|
|
9887
9911
|
Object.defineProperty(exports, "IconTongueFilled", {
|
|
9888
9912
|
enumerable: true,
|
|
9889
9913
|
get: function() {
|
|
@@ -10868,6 +10892,7 @@ var _iconSuccessVivo = _interopRequireDefault(require("./icons/icon-success-vivo
|
|
|
10868
10892
|
var _skeletons = require("./skeletons");
|
|
10869
10893
|
var _circle = _interopRequireDefault(require("./circle"));
|
|
10870
10894
|
var _hooks = require("./hooks");
|
|
10895
|
+
var _css = require("./utils/css");
|
|
10871
10896
|
var _analytics = require("./utils/analytics");
|
|
10872
10897
|
var _documentVisibility = require("./utils/document-visibility");
|
|
10873
10898
|
var _themeVariantContext = require("./theme-variant-context");
|
|
@@ -12360,6 +12385,9 @@ var _iconTipsAndTricksRegular = _interopRequireDefault(require("./generated/mist
|
|
|
12360
12385
|
var _iconTkFilled = _interopRequireDefault(require("./generated/mistica-icons/icon-tk-filled"));
|
|
12361
12386
|
var _iconTkLight = _interopRequireDefault(require("./generated/mistica-icons/icon-tk-light"));
|
|
12362
12387
|
var _iconTkRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-tk-regular"));
|
|
12388
|
+
var _iconTokensFilled = _interopRequireDefault(require("./generated/mistica-icons/icon-tokens-filled"));
|
|
12389
|
+
var _iconTokensLight = _interopRequireDefault(require("./generated/mistica-icons/icon-tokens-light"));
|
|
12390
|
+
var _iconTokensRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-tokens-regular"));
|
|
12363
12391
|
var _iconTongueFilled = _interopRequireDefault(require("./generated/mistica-icons/icon-tongue-filled"));
|
|
12364
12392
|
var _iconTongueLight = _interopRequireDefault(require("./generated/mistica-icons/icon-tongue-light"));
|
|
12365
12393
|
var _iconTongueRegular = _interopRequireDefault(require("./generated/mistica-icons/icon-tongue-regular"));
|
package/dist/index.js.flow
CHANGED
|
@@ -154,6 +154,7 @@ declare export {
|
|
|
154
154
|
useIsInViewport,
|
|
155
155
|
} from "./hooks";
|
|
156
156
|
export type { ThemeConfig, ColorScheme, EventFormat } from "./theme";
|
|
157
|
+
declare export { pxToRem } from "./utils/css";
|
|
157
158
|
declare export { TrackingConfig, useTrackingConfig } from "./utils/analytics";
|
|
158
159
|
declare export { useDocumentVisibility } from "./utils/document-visibility";
|
|
159
160
|
declare export {
|
|
@@ -1666,6 +1667,9 @@ declare export { default as IconTipsAndTricksRegular } from "./generated/mistica
|
|
|
1666
1667
|
declare export { default as IconTkFilled } from "./generated/mistica-icons/icon-tk-filled";
|
|
1667
1668
|
declare export { default as IconTkLight } from "./generated/mistica-icons/icon-tk-light";
|
|
1668
1669
|
declare export { default as IconTkRegular } from "./generated/mistica-icons/icon-tk-regular";
|
|
1670
|
+
declare export { default as IconTokensFilled } from "./generated/mistica-icons/icon-tokens-filled";
|
|
1671
|
+
declare export { default as IconTokensLight } from "./generated/mistica-icons/icon-tokens-light";
|
|
1672
|
+
declare export { default as IconTokensRegular } from "./generated/mistica-icons/icon-tokens-regular";
|
|
1669
1673
|
declare export { default as IconTongueFilled } from "./generated/mistica-icons/icon-tongue-filled";
|
|
1670
1674
|
declare export { default as IconTongueLight } from "./generated/mistica-icons/icon-tongue-light";
|
|
1671
1675
|
declare export { default as IconTongueRegular } from "./generated/mistica-icons/icon-tongue-regular";
|
package/dist/navigation-bar.js
CHANGED
|
@@ -387,8 +387,6 @@ var BurgerMenuIcon = function BurgerMenuIcon(param) {
|
|
|
387
387
|
};
|
|
388
388
|
var NAVBAR_ZINDEX = 25;
|
|
389
389
|
var BURGER_ZINDEX = 26;
|
|
390
|
-
var DESKTOP_NAVBAR_HEIGHT = 80;
|
|
391
|
-
var MOBILE_NAVBAR_HEIGHT = 56;
|
|
392
390
|
var BURGER_MENU_ANIMATION_DURATION_MS = 300;
|
|
393
391
|
var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
394
392
|
var shadowAlpha = theme.isDarkMode ? 1 : 0.2;
|
|
@@ -415,7 +413,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
415
413
|
var isInverse = param.isInverse;
|
|
416
414
|
return isInverse ? theme.colors.navigationBarBackground : theme.colors.background;
|
|
417
415
|
},
|
|
418
|
-
height:
|
|
416
|
+
height: theme.dimensions.headerDesktopHeight,
|
|
419
417
|
padding: "16px 0",
|
|
420
418
|
borderBottomStyle: "solid",
|
|
421
419
|
borderBottomWidth: function borderBottomWidth(param) {
|
|
@@ -432,11 +430,11 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
432
430
|
var isMenuOpen = param.isMenuOpen, isInverse = param.isInverse;
|
|
433
431
|
return isMenuOpen || isInverse && !theme.isDarkMode ? "transparent" : theme.colors.divider;
|
|
434
432
|
},
|
|
435
|
-
height:
|
|
433
|
+
height: theme.dimensions.headerMobileHeight,
|
|
436
434
|
padding: "8px 0"
|
|
437
435
|
}),
|
|
438
436
|
section: _defineProperty({
|
|
439
|
-
height:
|
|
437
|
+
height: theme.dimensions.headerDesktopHeight,
|
|
440
438
|
display: "flex",
|
|
441
439
|
alignItems: "center",
|
|
442
440
|
padding: "0 8px",
|
|
@@ -457,17 +455,17 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
457
455
|
}
|
|
458
456
|
},
|
|
459
457
|
spacer: _defineProperty({
|
|
460
|
-
height:
|
|
458
|
+
height: theme.dimensions.headerDesktopHeight
|
|
461
459
|
}, theme.mq.tabletOrSmaller, {
|
|
462
|
-
height:
|
|
460
|
+
height: theme.dimensions.headerMobileHeight
|
|
463
461
|
}),
|
|
464
462
|
burgerMenu: {
|
|
465
463
|
zIndex: BURGER_ZINDEX,
|
|
466
464
|
position: "fixed",
|
|
467
|
-
top:
|
|
465
|
+
top: theme.dimensions.headerMobileHeight,
|
|
468
466
|
left: 0,
|
|
469
467
|
right: 0,
|
|
470
|
-
height: "calc(100vh - ".concat(
|
|
468
|
+
height: "calc(100vh - ".concat(theme.dimensions.headerMobileHeight, "px)"),
|
|
471
469
|
overflowY: "auto",
|
|
472
470
|
background: theme.colors.background,
|
|
473
471
|
boxShadow: function boxShadow(param) {
|
package/dist/package-version.js
CHANGED
package/dist/skeletons.d.ts
CHANGED
|
@@ -14,8 +14,11 @@ declare type SkeletonCircleProps = Omit<SkeletonLineProps, 'width'> & {
|
|
|
14
14
|
export declare const SkeletonCircle: ({ ariaLabel, size, dataAttributes }: SkeletonCircleProps) => JSX.Element;
|
|
15
15
|
declare type SkeletonRowProps = SkeletonLineProps;
|
|
16
16
|
export declare const SkeletonRow: ({ width, ariaLabel, dataAttributes }: SkeletonRowProps) => JSX.Element;
|
|
17
|
-
declare type SkeletonRectangleProps =
|
|
18
|
-
|
|
17
|
+
declare type SkeletonRectangleProps = {
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
dataAttributes?: DataAttributes;
|
|
20
|
+
width?: number | string;
|
|
21
|
+
height?: number | string;
|
|
19
22
|
};
|
|
20
23
|
export declare const SkeletonRectangle: ({ width, height, ariaLabel, dataAttributes, }: SkeletonRectangleProps) => JSX.Element;
|
|
21
24
|
export {};
|
package/dist/skeletons.js
CHANGED
|
@@ -8,7 +8,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _skeletonBase = _interopRequireDefault(require("./skeleton-base"));
|
|
9
9
|
var _jss = require("./jss");
|
|
10
10
|
var _stack = _interopRequireDefault(require("./stack"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _dom = require("./utils/dom");
|
|
13
12
|
function _interopRequireDefault(obj) {
|
|
14
13
|
return obj && obj.__esModule ? obj : {
|
|
@@ -69,6 +68,8 @@ var transition = "1.5s linear";
|
|
|
69
68
|
var useAnimation = (0, _jss).createUseStyles(function() {
|
|
70
69
|
return {
|
|
71
70
|
animation: {
|
|
71
|
+
width: "100%",
|
|
72
|
+
height: "100%",
|
|
72
73
|
animation: "$pulse ".concat(transition, " infinite")
|
|
73
74
|
},
|
|
74
75
|
"@keyframes pulse": {
|
|
@@ -84,75 +85,52 @@ var useAnimation = (0, _jss).createUseStyles(function() {
|
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
87
|
});
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
wrap: {
|
|
90
|
-
borderRadius: 8,
|
|
91
|
-
height: function height(param) {
|
|
92
|
-
var _height = param.height, height1 = _height === void 0 ? 8 : _height;
|
|
93
|
-
return height1;
|
|
94
|
-
},
|
|
95
|
-
width: function width(param) {
|
|
96
|
-
var _width = param.width, width1 = _width === void 0 ? "100%" : _width;
|
|
97
|
-
return width1;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
});
|
|
102
|
-
var SkeletonLine = function SkeletonLine(param) {
|
|
103
|
-
var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
88
|
+
var SkeletonAnimation = function SkeletonAnimation(param) {
|
|
89
|
+
var children = param.children, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
104
90
|
var animationClasses = useAnimation();
|
|
105
|
-
var styleClass = useSkeletonStyles({
|
|
106
|
-
width: width
|
|
107
|
-
});
|
|
108
91
|
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
109
|
-
className:
|
|
92
|
+
className: animationClasses.animation,
|
|
110
93
|
role: "status",
|
|
94
|
+
"aria-busy": true,
|
|
111
95
|
"aria-hidden": ariaLabel === undefined,
|
|
112
|
-
"aria-busy": ariaLabel !== undefined,
|
|
113
96
|
"aria-label": ariaLabel
|
|
114
97
|
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
115
|
-
children:
|
|
98
|
+
children: children
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
var SkeletonLine = function SkeletonLine(param) {
|
|
102
|
+
var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
103
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx(SkeletonAnimation, _objectSpread({
|
|
104
|
+
ariaLabel: ariaLabel
|
|
105
|
+
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
106
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
107
|
+
width: width
|
|
108
|
+
})
|
|
116
109
|
}));
|
|
117
110
|
};
|
|
118
111
|
exports.SkeletonLine = SkeletonLine;
|
|
119
112
|
var SkeletonText = function SkeletonText(param) {
|
|
120
113
|
var ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
height: "fit-content"
|
|
124
|
-
});
|
|
125
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, _objectSpread({
|
|
126
|
-
className: "".concat(animationClasses.animation, " ").concat(styleClass.wrap),
|
|
127
|
-
space: 16,
|
|
128
|
-
role: "status",
|
|
129
|
-
"aria-hidden": ariaLabel === undefined,
|
|
130
|
-
"aria-busy": ariaLabel !== undefined,
|
|
131
|
-
"aria-label": ariaLabel
|
|
114
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx(SkeletonAnimation, _objectSpread({
|
|
115
|
+
ariaLabel: ariaLabel
|
|
132
116
|
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
133
|
-
children:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
117
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsxs(_stack.default, {
|
|
118
|
+
space: 16,
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {}),
|
|
121
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {}),
|
|
122
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
123
|
+
width: "75%"
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
})
|
|
140
127
|
}));
|
|
141
128
|
};
|
|
142
129
|
exports.SkeletonText = SkeletonText;
|
|
143
130
|
var SkeletonCircle = function SkeletonCircle(param) {
|
|
144
131
|
var ariaLabel = param.ariaLabel, _size = param.size, size = _size === void 0 ? 40 : _size, dataAttributes = param.dataAttributes;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
width: size,
|
|
148
|
-
height: size
|
|
149
|
-
});
|
|
150
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
151
|
-
className: (0, _classnames).default(animationClasses.animation, styleClass.wrap),
|
|
152
|
-
role: "status",
|
|
153
|
-
"aria-hidden": ariaLabel === undefined,
|
|
154
|
-
"aria-busy": ariaLabel !== undefined,
|
|
155
|
-
"aria-label": ariaLabel
|
|
132
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx(SkeletonAnimation, _objectSpread({
|
|
133
|
+
ariaLabel: ariaLabel
|
|
156
134
|
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
157
135
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
158
136
|
height: size,
|
|
@@ -181,47 +159,32 @@ var useSkeletonRowStyles = (0, _jss).createUseStyles(function() {
|
|
|
181
159
|
});
|
|
182
160
|
var SkeletonRow = function SkeletonRow(param) {
|
|
183
161
|
var _width = param.width, width = _width === void 0 ? "100%" : _width, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
184
|
-
var animationClasses = useAnimation();
|
|
185
|
-
var styleClass = useSkeletonStyles({
|
|
186
|
-
width: width,
|
|
187
|
-
height: "100%"
|
|
188
|
-
});
|
|
189
162
|
var rowClass = useSkeletonRowStyles();
|
|
190
|
-
return /*#__PURE__*/ (0, _jsxRuntime).
|
|
191
|
-
|
|
192
|
-
role: "status",
|
|
193
|
-
"aria-hidden": ariaLabel === undefined,
|
|
194
|
-
"aria-busy": ariaLabel !== undefined,
|
|
195
|
-
"aria-label": ariaLabel
|
|
163
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx(SkeletonAnimation, _objectSpread({
|
|
164
|
+
ariaLabel: ariaLabel
|
|
196
165
|
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
197
|
-
children:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
166
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
167
|
+
className: rowClass.row,
|
|
168
|
+
children: [
|
|
169
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
170
|
+
height: 40,
|
|
171
|
+
width: 40,
|
|
172
|
+
radius: "50%",
|
|
173
|
+
className: rowClass.circle
|
|
174
|
+
}),
|
|
175
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
176
|
+
width: width,
|
|
177
|
+
className: rowClass.line
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
})
|
|
209
181
|
}));
|
|
210
182
|
};
|
|
211
183
|
exports.SkeletonRow = SkeletonRow;
|
|
212
184
|
var SkeletonRectangle = function SkeletonRectangle(param) {
|
|
213
185
|
var _width = param.width, width = _width === void 0 ? "100%" : _width, _height = param.height, height = _height === void 0 ? "100%" : _height, ariaLabel = param.ariaLabel, dataAttributes = param.dataAttributes;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
width: width,
|
|
217
|
-
height: "100%"
|
|
218
|
-
});
|
|
219
|
-
return /*#__PURE__*/ (0, _jsxRuntime).jsx("div", _objectSpread({
|
|
220
|
-
className: (0, _classnames).default(animationClasses.animation, styleClass.wrap),
|
|
221
|
-
role: "status",
|
|
222
|
-
"aria-hidden": true,
|
|
223
|
-
"aria-busy": true,
|
|
224
|
-
"aria-label": ariaLabel
|
|
186
|
+
return /*#__PURE__*/ (0, _jsxRuntime).jsx(SkeletonAnimation, _objectSpread({
|
|
187
|
+
ariaLabel: ariaLabel
|
|
225
188
|
}, (0, _dom).getPrefixedDataAttributes(dataAttributes), {
|
|
226
189
|
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_skeletonBase.default, {
|
|
227
190
|
height: height,
|
package/dist/skeletons.js.flow
CHANGED
|
@@ -20,10 +20,10 @@ declare export var SkeletonCircle: (x: SkeletonCircleProps) => React.Node;
|
|
|
20
20
|
declare type SkeletonRowProps = SkeletonLineProps;
|
|
21
21
|
declare export var SkeletonRow: (x: SkeletonRowProps) => React.Node;
|
|
22
22
|
declare type SkeletonRectangleProps = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
ariaLabel?: string,
|
|
24
|
+
dataAttributes?: DataAttributes,
|
|
25
|
+
width?: number | string,
|
|
26
|
+
height?: number | string,
|
|
27
27
|
};
|
|
28
28
|
declare export var SkeletonRectangle: (x: SkeletonRectangleProps) => React.Node;
|
|
29
29
|
declare export {};
|
package/dist/skins/o2.js
CHANGED
|
@@ -73,7 +73,7 @@ var getO2Skin = function getO2Skin() {
|
|
|
73
73
|
buttonDangerBackground: palette.pepper,
|
|
74
74
|
buttonDangerBackgroundSelected: palette.pepper60,
|
|
75
75
|
buttonDangerBackgroundHover: palette.pepper60,
|
|
76
|
-
buttonLinkBackgroundSelected: palette.
|
|
76
|
+
buttonLinkBackgroundSelected: palette.o2BluePrimary10,
|
|
77
77
|
buttonLinkBackgroundSelectedInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
78
78
|
buttonPrimaryBackground: palette.o2BluePrimary,
|
|
79
79
|
buttonPrimaryBackgroundInverse: palette.white,
|
package/dist/text-field-base.js
CHANGED
|
@@ -205,6 +205,7 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
205
205
|
},
|
|
206
206
|
textArea: _objectSpread((_obj = {
|
|
207
207
|
resize: "none",
|
|
208
|
+
padding: 0,
|
|
208
209
|
marginTop: function marginTop(param) {
|
|
209
210
|
var hasLabel = param.hasLabel;
|
|
210
211
|
return hasLabel ? 28 : 16;
|
|
@@ -302,7 +303,10 @@ var useStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
302
303
|
position: "absolute"
|
|
303
304
|
},
|
|
304
305
|
prefix: (_obj2 = {
|
|
305
|
-
alignSelf:
|
|
306
|
+
alignSelf: function alignSelf(param) {
|
|
307
|
+
var prefixAlignSelf = param.prefixAlignSelf;
|
|
308
|
+
return prefixAlignSelf;
|
|
309
|
+
},
|
|
306
310
|
paddingTop: function paddingTop(param) {
|
|
307
311
|
var hasLabel = param.hasLabel;
|
|
308
312
|
return hasLabel ? 28 : 16;
|
|
@@ -347,7 +351,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
347
351
|
"fullWidth"
|
|
348
352
|
]);
|
|
349
353
|
var id = (0, _hooks).useAriaId(idProp);
|
|
350
|
-
var _$
|
|
354
|
+
var _$ref4 = _slicedToArray(React.useState((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.length) || (value === null || value === void 0 ? void 0 : value.length) ? "filled" : "default"), 2), inputState = _$ref4[0], setInputState = _$ref4[1];
|
|
351
355
|
var colors = (0, _hooks).useTheme().colors;
|
|
352
356
|
var isTabletOrSmaller = (0, _hooks).useScreenSize().isTabletOrSmaller;
|
|
353
357
|
var _$ref1;
|
|
@@ -356,6 +360,18 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
356
360
|
// this shrinkLabel override is a workaround because I was unable to find a way to hide date
|
|
357
361
|
// and date-time native placeholders when the input is not required
|
|
358
362
|
var shrinkLabel = shrinkLabelProp || (rest.type === "date" || rest.type === "datetime-local" || rest.type === "month") && !rest.required;
|
|
363
|
+
var _$ref3 = _slicedToArray(React.useState("baseline"), 2), prefixAlignSelf = _$ref3[0], setPrefixAlignSelf = _$ref3[1];
|
|
364
|
+
(0, _hooks).useIsomorphicLayoutEffect(function() {
|
|
365
|
+
/**
|
|
366
|
+
* Safari check to workaround https://jira.tid.es/browse/WEB-648
|
|
367
|
+
* For some reason it is super hard to align the prefix text with the input text
|
|
368
|
+
* and get the same result in chrome and safari
|
|
369
|
+
*
|
|
370
|
+
* Using an effect to set the style to avoid problems with SSR
|
|
371
|
+
*/ if ((0, _platform).isSafari()) {
|
|
372
|
+
setPrefixAlignSelf("initial");
|
|
373
|
+
}
|
|
374
|
+
}, []);
|
|
359
375
|
var classes = useStyles({
|
|
360
376
|
inputState: inputState,
|
|
361
377
|
error: error,
|
|
@@ -366,7 +382,8 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
366
382
|
prefix: prefix,
|
|
367
383
|
multiline: multiline,
|
|
368
384
|
type: rest.type,
|
|
369
|
-
disabled: rest.disabled
|
|
385
|
+
disabled: rest.disabled,
|
|
386
|
+
prefixAlignSelf: prefixAlignSelf
|
|
370
387
|
});
|
|
371
388
|
React.useEffect(function() {
|
|
372
389
|
if (inputState !== "focused" && (value === null || value === void 0 ? void 0 : value.length)) {
|
|
@@ -425,6 +442,7 @@ var TextFieldBase = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
425
442
|
multiline: multiline,
|
|
426
443
|
fullWidth: fullWidth,
|
|
427
444
|
fieldRef: fieldRef,
|
|
445
|
+
readOnly: rest.readOnly,
|
|
428
446
|
children: [
|
|
429
447
|
startIcon && /*#__PURE__*/ (0, _jsxRuntime).jsx("div", {
|
|
430
448
|
className: classes.startIcon,
|
|
@@ -534,10 +552,10 @@ var TextFieldBaseAutosuggest = /*#__PURE__*/ React.forwardRef(function(_param, r
|
|
|
534
552
|
"getSuggestions",
|
|
535
553
|
"id"
|
|
536
554
|
]);
|
|
537
|
-
var _$
|
|
555
|
+
var _$ref6 = _slicedToArray(React.useState([]), 2), suggestions = _$ref6[0], setSuggestions = _$ref6[1];
|
|
538
556
|
var inputRef = React.useRef(null);
|
|
539
557
|
var classes = useSuggestionsStyles();
|
|
540
|
-
var _$
|
|
558
|
+
var _$ref5 = (0, _hooks).useTheme(), platformOverrides = _$ref5.platformOverrides, texts = _$ref5.texts;
|
|
541
559
|
var id = (0, _hooks).useAriaId(idProp);
|
|
542
560
|
var autoSuggestId = (0, _hooks).useAriaId();
|
|
543
561
|
if (getSuggestions && (props.value === undefined || props.defaultValue !== undefined)) {
|
|
@@ -297,15 +297,19 @@ var useFieldContainerStyles = (0, _jss).createUseStyles(function(theme) {
|
|
|
297
297
|
var multiline = param.multiline;
|
|
298
298
|
return multiline ? 152 : 56;
|
|
299
299
|
}
|
|
300
|
-
}), _defineProperty(_obj1, "display", "flex"), _defineProperty(_obj1, "position", "relative"), _defineProperty(_obj1, "backgroundColor",
|
|
300
|
+
}), _defineProperty(_obj1, "display", "flex"), _defineProperty(_obj1, "position", "relative"), _defineProperty(_obj1, "backgroundColor", function(param) {
|
|
301
|
+
var readOnly = param.readOnly;
|
|
302
|
+
return readOnly ? theme.colors.neutralLow : theme.colors.backgroundContainer;
|
|
303
|
+
}), _obj1)
|
|
301
304
|
};
|
|
302
305
|
});
|
|
303
306
|
var FieldContainer = function FieldContainer(param) {
|
|
304
|
-
var multiline = param.multiline, disabled = param.disabled, children = param.children, helperText = param.helperText, className = param.className, fieldRef = param.fieldRef, fullWidth = param.fullWidth;
|
|
307
|
+
var multiline = param.multiline, disabled = param.disabled, children = param.children, helperText = param.helperText, className = param.className, fieldRef = param.fieldRef, fullWidth = param.fullWidth, readOnly = param.readOnly;
|
|
305
308
|
var classes = useFieldContainerStyles({
|
|
306
309
|
multiline: multiline,
|
|
307
310
|
fullWidth: fullWidth,
|
|
308
|
-
disabled: disabled
|
|
311
|
+
disabled: disabled,
|
|
312
|
+
readOnly: readOnly
|
|
309
313
|
});
|
|
310
314
|
return /*#__PURE__*/ (0, _jsxRuntime).jsxs("div", {
|
|
311
315
|
className: classes.fieldContainer,
|
package/dist/text-link.js
CHANGED
|
@@ -101,7 +101,7 @@ var useStyles = (0, _jss).createUseStyles(function(param) {
|
|
|
101
101
|
textLink: (_obj = {
|
|
102
102
|
width: "auto",
|
|
103
103
|
lineHeight: "inherit",
|
|
104
|
-
display: "inline
|
|
104
|
+
display: "inline",
|
|
105
105
|
color: colors.textLink,
|
|
106
106
|
wordBreak: "break-word",
|
|
107
107
|
cursor: "pointer"
|
|
@@ -155,6 +155,7 @@ var TextLink = function TextLink(_param) {
|
|
|
155
155
|
var _trackingEvent;
|
|
156
156
|
var _obj;
|
|
157
157
|
return /*#__PURE__*/ (0, _jsxRuntime).jsx(_touchable.default, _objectSpread({}, props, {
|
|
158
|
+
as: props.onPress ? "a" : undefined,
|
|
158
159
|
trackingEvent: (_trackingEvent = props.trackingEvent) !== null && _trackingEvent !== void 0 ? _trackingEvent : props.trackEvent ? createDefaultTrackingEvent() : undefined,
|
|
159
160
|
disabled: disabled || formStatus === "sending",
|
|
160
161
|
className: (0, _classnames).default(classes.textLink, className, (_obj = {}, _defineProperty(_obj, classes.small, small), _defineProperty(_obj, classes.inverse, isInverse), _obj)),
|
package/dist/theme.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ declare const TEXTS_ES: {
|
|
|
40
40
|
export declare const getTexts: (locale: Locale) => typeof TEXTS_ES;
|
|
41
41
|
export declare const dimensions: {
|
|
42
42
|
headerMobileHeight: number;
|
|
43
|
+
headerDesktopHeight: number;
|
|
43
44
|
};
|
|
44
45
|
export declare const mediaQueriesConfig: {
|
|
45
46
|
tabletMinWidth: number;
|
|
@@ -124,6 +125,7 @@ export declare type Theme = {
|
|
|
124
125
|
};
|
|
125
126
|
dimensions: {
|
|
126
127
|
headerMobileHeight: number;
|
|
128
|
+
headerDesktopHeight: number;
|
|
127
129
|
};
|
|
128
130
|
mq: MediaQueries;
|
|
129
131
|
colors: Colors;
|
package/dist/theme.js
CHANGED
|
@@ -232,7 +232,8 @@ var getTexts = function getTexts(locale) {
|
|
|
232
232
|
};
|
|
233
233
|
exports.getTexts = getTexts;
|
|
234
234
|
var dimensions = {
|
|
235
|
-
headerMobileHeight: 56
|
|
235
|
+
headerMobileHeight: 56,
|
|
236
|
+
headerDesktopHeight: 80
|
|
236
237
|
};
|
|
237
238
|
exports.dimensions = dimensions;
|
|
238
239
|
var mediaQueriesConfig = {
|
package/dist/theme.js.flow
CHANGED
|
@@ -42,6 +42,7 @@ declare var TEXTS_ES: {
|
|
|
42
42
|
declare export var getTexts: (locale: Locale) => typeof TEXTS_ES;
|
|
43
43
|
declare export var dimensions: {
|
|
44
44
|
headerMobileHeight: number,
|
|
45
|
+
headerDesktopHeight: number,
|
|
45
46
|
};
|
|
46
47
|
declare export var mediaQueriesConfig: {
|
|
47
48
|
tabletMinWidth: number,
|
|
@@ -128,6 +129,7 @@ export type Theme = {
|
|
|
128
129
|
},
|
|
129
130
|
dimensions: {
|
|
130
131
|
headerMobileHeight: number,
|
|
132
|
+
headerDesktopHeight: number,
|
|
131
133
|
},
|
|
132
134
|
mq: MediaQueries,
|
|
133
135
|
colors: Colors,
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
declare type Position = 'top' | 'bottom' | 'left' | 'right';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
extra?: React.ReactNode;
|
|
5
6
|
description?: string;
|
|
6
7
|
target: React.ReactNode;
|
|
7
8
|
title?: string;
|
|
8
9
|
position?: Position;
|
|
9
10
|
width?: number;
|
|
10
11
|
targetLabel: string;
|
|
12
|
+
delay?: boolean;
|
|
11
13
|
};
|
|
12
14
|
declare const Tooltip: React.FC<Props>;
|
|
13
15
|
export default Tooltip;
|