@telefonica/mistica 14.37.0 → 14.39.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 (66) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/carousel.js +46 -43
  3. package/dist/chip.js +51 -34
  4. package/dist/empty-state-card.js +24 -18
  5. package/dist/image.css-mistica.js +7 -4
  6. package/dist/image.css.d.ts +1 -0
  7. package/dist/image.js +69 -58
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +7 -0
  10. package/dist/inline.css-mistica.js +14 -12
  11. package/dist/inline.css.d.ts +5 -1
  12. package/dist/inline.d.ts +4 -2
  13. package/dist/inline.js +31 -16
  14. package/dist/loading-bar.css-mistica.js +6 -18
  15. package/dist/loading-bar.css.d.ts +1 -4
  16. package/dist/loading-bar.js +22 -27
  17. package/dist/loading-screen.css-mistica.js +51 -0
  18. package/dist/loading-screen.css.d.ts +11 -0
  19. package/dist/loading-screen.css.ts.vanilla.css-mistica.js +11 -0
  20. package/dist/loading-screen.d.ts +28 -0
  21. package/dist/loading-screen.js +398 -0
  22. package/dist/logo.css-mistica.js +21 -5
  23. package/dist/logo.css.d.ts +7 -0
  24. package/dist/logo.d.ts +2 -2
  25. package/dist/logo.js +86 -61
  26. package/dist/navigation-bar.css-mistica.js +43 -37
  27. package/dist/navigation-bar.css.d.ts +3 -1
  28. package/dist/navigation-bar.js +165 -209
  29. package/dist/package-version.js +1 -1
  30. package/dist/tabs.css.d.ts +1 -1
  31. package/dist/vivinho-loading-animation/in-lottie.json.js +1479 -0
  32. package/dist/vivinho-loading-animation/index.d.ts +8 -0
  33. package/dist/vivinho-loading-animation/index.js +119 -0
  34. package/dist/vivinho-loading-animation/out-lottie.json.js +2143 -0
  35. package/dist/vivinho-loading-animation/pulse-lottie.json.js +2017 -0
  36. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +20 -0
  37. package/dist/vivinho-loading-animation/vivinho-loading-animation.css.d.ts +2 -0
  38. package/dist/vivinho-loading-animation/vivinho-loading-animation.css.ts.vanilla.css-mistica.js +11 -0
  39. package/dist/vivinho-loading-animation/wave-lottie.json.js +10207 -0
  40. package/dist-es/carousel.js +46 -43
  41. package/dist-es/chip.js +78 -61
  42. package/dist-es/empty-state-card.js +41 -35
  43. package/dist-es/image.css-mistica.js +2 -2
  44. package/dist-es/image.js +86 -76
  45. package/dist-es/index.js +1782 -1781
  46. package/dist-es/inline.css-mistica.js +7 -8
  47. package/dist-es/inline.js +39 -24
  48. package/dist-es/loading-bar.css-mistica.js +2 -2
  49. package/dist-es/loading-bar.js +22 -32
  50. package/dist-es/loading-screen.css-mistica.js +7 -0
  51. package/dist-es/loading-screen.css.ts.vanilla.css-mistica.js +2 -0
  52. package/dist-es/loading-screen.js +335 -0
  53. package/dist-es/logo.css-mistica.js +7 -2
  54. package/dist-es/logo.js +110 -85
  55. package/dist-es/navigation-bar.css-mistica.js +19 -19
  56. package/dist-es/navigation-bar.js +219 -263
  57. package/dist-es/package-version.js +1 -1
  58. package/dist-es/style.css +1 -1
  59. package/dist-es/vivinho-loading-animation/in-lottie.json.js +1426 -0
  60. package/dist-es/vivinho-loading-animation/index.js +64 -0
  61. package/dist-es/vivinho-loading-animation/out-lottie.json.js +2090 -0
  62. package/dist-es/vivinho-loading-animation/pulse-lottie.json.js +1964 -0
  63. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -0
  64. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css.ts.vanilla.css-mistica.js +2 -0
  65. package/dist-es/vivinho-loading-animation/wave-lottie.json.js +10154 -0
  66. package/package.json +2 -1
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ isLoading?: boolean;
4
+ onCloseStart?: () => void;
5
+ onCloseEnd?: () => void;
6
+ };
7
+ declare const VivinhoLoadingAnimation: ({ isLoading, onCloseStart, onCloseEnd }: Props) => JSX.Element;
8
+ export default VivinhoLoadingAnimation;
@@ -0,0 +1,119 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function() {
9
+ return F;
10
+ }
11
+ });
12
+ const _jsxruntime = require("react/jsx-runtime");
13
+ const _lottiereact = /*#__PURE__*/ _interop_require_default(require("lottie-react"));
14
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
15
+ const _inlottiejson = /*#__PURE__*/ _interop_require_default(require("./in-lottie.json.js"));
16
+ const _pulselottiejson = /*#__PURE__*/ _interop_require_default(require("./pulse-lottie.json.js"));
17
+ const _wavelottiejson = /*#__PURE__*/ _interop_require_default(require("./wave-lottie.json.js"));
18
+ const _outlottiejson = /*#__PURE__*/ _interop_require_default(require("./out-lottie.json.js"));
19
+ const _vivinholoadinganimationcssmistica = require("./vivinho-loading-animation.css-mistica.js");
20
+ function _interop_require_default(obj) {
21
+ return obj && obj.__esModule ? obj : {
22
+ default: obj
23
+ };
24
+ }
25
+ function _getRequireWildcardCache(nodeInterop) {
26
+ if (typeof WeakMap !== "function") return null;
27
+ var cacheBabelInterop = new WeakMap();
28
+ var cacheNodeInterop = new WeakMap();
29
+ return (_getRequireWildcardCache = function(nodeInterop) {
30
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
31
+ })(nodeInterop);
32
+ }
33
+ function _interop_require_wildcard(obj, nodeInterop) {
34
+ if (!nodeInterop && obj && obj.__esModule) {
35
+ return obj;
36
+ }
37
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
38
+ return {
39
+ default: obj
40
+ };
41
+ }
42
+ var cache = _getRequireWildcardCache(nodeInterop);
43
+ if (cache && cache.has(obj)) {
44
+ return cache.get(obj);
45
+ }
46
+ var newObj = {
47
+ __proto__: null
48
+ };
49
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
50
+ for(var key in obj){
51
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
52
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
53
+ if (desc && (desc.get || desc.set)) {
54
+ Object.defineProperty(newObj, key, desc);
55
+ } else {
56
+ newObj[key] = obj[key];
57
+ }
58
+ }
59
+ }
60
+ newObj.default = obj;
61
+ if (cache) {
62
+ cache.set(obj, newObj);
63
+ }
64
+ return newObj;
65
+ }
66
+ const F = (param)=>{
67
+ let { isLoading: p, onCloseStart: e, onCloseEnd: a } = param;
68
+ const [m, n] = _react.useState("in"), [f, r] = _react.useState([]), s = ()=>{
69
+ r((t)=>{
70
+ if (!t.length) return [
71
+ 0
72
+ ];
73
+ const c = t[t.length - 1];
74
+ return [
75
+ ...t,
76
+ c + 1
77
+ ];
78
+ });
79
+ }, u = ()=>{
80
+ r((t)=>t.slice(1));
81
+ };
82
+ return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
83
+ className: _vivinholoadinganimationcssmistica.container,
84
+ children: [
85
+ f.map((t)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
86
+ className: m === "out" ? _vivinholoadinganimationcssmistica.waveFadeOut : void 0,
87
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_lottiereact.default, {
88
+ animationData: _wavelottiejson.default,
89
+ loop: !1,
90
+ onComplete: ()=>{
91
+ u();
92
+ }
93
+ })
94
+ }, t)),
95
+ m === "in" ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_lottiereact.default, {
96
+ animationData: _inlottiejson.default,
97
+ loop: !1,
98
+ onComplete: ()=>{
99
+ p ? (setTimeout(()=>{
100
+ s();
101
+ }, 800), n("loop")) : (e == null || e(), n("out"));
102
+ }
103
+ }) : m === "loop" ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_lottiereact.default, {
104
+ animationData: _pulselottiejson.default,
105
+ onLoopComplete: ()=>{
106
+ p ? setTimeout(()=>{
107
+ s();
108
+ }, 800) : (e == null || e(), n("out"));
109
+ }
110
+ }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_lottiereact.default, {
111
+ animationData: _outlottiejson.default,
112
+ loop: !1,
113
+ onComplete: ()=>{
114
+ a == null || a();
115
+ }
116
+ })
117
+ ]
118
+ });
119
+ };