@telefonica/mistica 13.6.0 → 14.0.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.
@@ -9,8 +9,8 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- default: ()=>ut,
13
- useIsOsDarkModeEnabled: ()=>Q
12
+ default: ()=>pt,
13
+ useIsOsDarkModeEnabled: ()=>U
14
14
  });
15
15
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
16
16
  const _dynamic = require("@vanilla-extract/dynamic");
@@ -101,16 +101,16 @@ function _objectSpread(target) {
101
101
  }
102
102
  return target;
103
103
  }
104
- const K = "(prefers-color-scheme: dark)", Q = ()=>{
104
+ const Q = "(prefers-color-scheme: dark)", U = ()=>{
105
105
  const [t, c] = _react.useState(!1);
106
106
  return (0, _hooksJs.useIsomorphicLayoutEffect)(()=>{
107
107
  if (!window.matchMedia) return;
108
- const r = window.matchMedia(K), s = ()=>{
109
- c(r.matches);
108
+ const o = window.matchMedia(Q), i = ()=>{
109
+ c(o.matches);
110
110
  };
111
- return r.addListener(s), s(), ()=>r.removeListener(s);
111
+ return o.addListener(i), i(), ()=>o.removeListener(i);
112
112
  }, []), t;
113
- }, U = ()=>(t)=>t, o = {
113
+ }, X = ()=>(t)=>t, r = {
114
114
  text5: {
115
115
  weight: "light"
116
116
  },
@@ -128,14 +128,17 @@ const K = "(prefers-color-scheme: dark)", Q = ()=>{
128
128
  },
129
129
  text10: {
130
130
  weight: "light"
131
+ },
132
+ cardTitle: {
133
+ weight: "regular"
131
134
  }
132
- }, X = (t)=>({
135
+ }, Y = (t)=>({
133
136
  headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? _themeJs.NAVBAR_HEIGHT_MOBILE : t == null ? void 0 : t.headerMobileHeight
134
- }), ut = (param)=>{
135
- let { theme: t , children: c , as: r } = param;
137
+ }), pt = (param)=>{
138
+ let { theme: t , children: c , as: o } = param;
136
139
  var v;
137
- const s = _react.useRef(1), D = _react.useCallback(()=>`aria-id-hook-${s.current++}`, []), C = Q(), u = (v = t.colorScheme) != null ? v : "auto", I = t.skin.colors, w = _objectSpread({}, t.skin.colors, t.skin.darkModeColors), f = u === "auto" && C || u === "dark", p = f ? w : I, g = _react.useMemo(()=>{
138
- var i, n, d, x, m, h, M, P;
140
+ const i = _react.useRef(1), D = _react.useCallback(()=>`aria-id-hook-${i.current++}`, []), w = U(), u = (v = t.colorScheme) != null ? v : "auto", C = t.skin.colors, I = _objectSpread({}, t.skin.colors, t.skin.darkModeColors), f = u === "auto" && w || u === "dark", p = f ? I : C, g = _react.useMemo(()=>{
141
+ var s, n, d, x, m, h, P, M, b;
139
142
  const l = _objectSpread({
140
143
  platform: (0, _platformJs.getPlatform)(),
141
144
  insideNovumNativeApp: (0, _platformJs.isInsideNovumNativeApp)()
@@ -149,29 +152,30 @@ const K = "(prefers-color-scheme: dark)", Q = ()=>{
149
152
  logEvent: ()=>Promise.resolve(),
150
153
  eventFormat: "universal-analytics"
151
154
  }, t.analytics),
152
- dimensions: _objectSpread({}, _themeJs.dimensions, X(t.dimensions)),
155
+ dimensions: _objectSpread({}, _themeJs.dimensions, Y(t.dimensions)),
153
156
  textPresets: {
154
- text5: _objectSpread({}, o.text5, (i = t.skin.textPresets) == null ? void 0 : i.text5),
155
- text6: _objectSpread({}, o.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
156
- text7: _objectSpread({}, o.text7, (d = t.skin.textPresets) == null ? void 0 : d.text7),
157
- text8: _objectSpread({}, o.text8, (x = t.skin.textPresets) == null ? void 0 : x.text8),
158
- text9: _objectSpread({}, o.text9, (m = t.skin.textPresets) == null ? void 0 : m.text9),
159
- text10: _objectSpread({}, o.text10, (h = t.skin.textPresets) == null ? void 0 : h.text10)
157
+ text5: _objectSpread({}, r.text5, (s = t.skin.textPresets) == null ? void 0 : s.text5),
158
+ text6: _objectSpread({}, r.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
159
+ text7: _objectSpread({}, r.text7, (d = t.skin.textPresets) == null ? void 0 : d.text7),
160
+ text8: _objectSpread({}, r.text8, (x = t.skin.textPresets) == null ? void 0 : x.text8),
161
+ text9: _objectSpread({}, r.text9, (m = t.skin.textPresets) == null ? void 0 : m.text9),
162
+ text10: _objectSpread({}, r.text10, (h = t.skin.textPresets) == null ? void 0 : h.text10),
163
+ cardTitle: _objectSpread({}, r.cardTitle, (P = t.skin.textPresets) == null ? void 0 : P.cardTitle)
160
164
  },
161
165
  Link: (M = t.Link) != null ? M : _themeJs.AnchorLink,
162
166
  isDarkMode: f,
163
167
  isIos: (0, _platformJs.getPlatform)(l) === "ios",
164
- useHrefDecorator: (P = t.useHrefDecorator) != null ? P : U,
168
+ useHrefDecorator: (b = t.useHrefDecorator) != null ? b : X,
165
169
  useId: t.useId
166
170
  };
167
171
  }, [
168
172
  t,
169
173
  f
170
174
  ]), E = Object.fromEntries(Object.entries(p).map((param)=>{
171
- let [l, i] = param;
175
+ let [l, s] = param;
172
176
  let n = "";
173
- if (i.startsWith("#")) {
174
- const [d, x, m] = (0, _colorJs.fromHexToRgb)(i);
177
+ if (s.startsWith("#")) {
178
+ const [d, x, m] = (0, _colorJs.fromHexToRgb)(s);
175
179
  n = `${d}, ${x}, ${m}`;
176
180
  }
177
181
  return [
@@ -195,7 +199,7 @@ const K = "(prefers-color-scheme: dark)", Q = ()=>{
195
199
  value: D,
196
200
  children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_screenSizeContextProviderJs.default, {
197
201
  children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_dialogJs.default, {
198
- children: r ? /*#__PURE__*/ _react.createElement(r, {
202
+ children: o ? /*#__PURE__*/ _react.createElement(o, {
199
203
  style: k
200
204
  }, c) : /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_jsxRuntimeJs.Fragment, {
201
205
  children: [
package/dist/video.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import type { DataAttributes } from './utils/types';
3
- export type AspectRatio = '1:1' | '16:9' | '12:5' | '4:3';
3
+ export type AspectRatio = '1:1' | '16:9' | '4:3';
4
4
  export declare const RATIO: {
5
5
  '1:1': number;
6
6
  '16:9': number;
7
- '12:5': number;
8
7
  '4:3': number;
9
8
  };
10
9
  type VideoSource = {
package/dist/video.js CHANGED
@@ -141,7 +141,6 @@ function _objectWithoutPropertiesLoose(source, excluded) {
141
141
  const C = {
142
142
  "1:1": 1,
143
143
  "16:9": 16 / 9,
144
- "12:5": 12 / 5,
145
144
  "4:3": 4 / 3
146
145
  }, F = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", j = /*#__PURE__*/ _react.forwardRef((_param, l)=>{
147
146
  var { src: t , poster: i , autoPlay: o = !(0, _platformJs.isRunningAcceptanceTest)() , muted: c = !0 , loop: m = !0 , preload: u = "none" , aspectRatio: A = "1:1" , dataAttributes: f } = _param, n = _objectWithoutProperties(_param, [