@telefonica/mistica 13.2.3 → 13.4.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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>M
7
+ get: ()=>O
8
8
  });
9
9
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
10
10
  const _formContextJs = require("./form-context.js");
@@ -14,6 +14,7 @@ const _iconCloseRegularJs = /*#__PURE__*/ _interopRequireDefault(require("./gene
14
14
  const _iconButtonJs = /*#__PURE__*/ _interopRequireDefault(require("./icon-button.js"));
15
15
  const _hooksJs = require("./hooks.js");
16
16
  const _domJs = require("./utils/dom.js");
17
+ const _commonJs = require("./utils/common.js");
17
18
  const _jsxRuntimeJs = require("./_virtual/jsx-runtime.js");
18
19
  function _interopRequireDefault(obj) {
19
20
  return obj && obj.__esModule ? obj : {
@@ -138,8 +139,8 @@ function _objectWithoutPropertiesLoose(source, excluded) {
138
139
  }
139
140
  return target;
140
141
  }
141
- const M = (_param)=>{
142
- var { disabled: m , error: u , helperText: p , name: d , optional: n , validate: I , onChange: e , onChangeValue: r , onBlur: x , value: a , defaultValue: y } = _param, S = _objectWithoutProperties(_param, [
142
+ const O = /*#__PURE__*/ _react.forwardRef((_param, S)=>{
143
+ var { disabled: a , error: u , helperText: p , name: d , optional: n , validate: I , onChange: e , onChangeValue: t , onBlur: R , value: l , defaultValue: x } = _param, y = _objectWithoutProperties(_param, [
143
144
  "disabled",
144
145
  "error",
145
146
  "helperText",
@@ -152,45 +153,45 @@ const M = (_param)=>{
152
153
  "value",
153
154
  "defaultValue"
154
155
  ]);
155
- const P = (0, _hooksJs.useTheme)(), t = _react.useRef(), [R, b] = _react.useState(y || ""), i = typeof a < "u", f = i ? a : R, l = _react.useCallback((o, F)=>{
156
- i || b(o), r == null || r(o, F);
156
+ const b = (0, _hooksJs.useTheme)(), o = _react.useRef(), [P, v] = _react.useState(x || ""), i = typeof l < "u", m = i ? l : P, f = _react.useCallback((s, h)=>{
157
+ i || v(s), t == null || t(s, h);
157
158
  }, [
158
159
  i,
159
- r
160
- ]), v = _react.useCallback(()=>{
161
- l("", ""), t.current && (e == null || e((0, _domJs.createChangeEvent)(t.current, "")), t.current.focus());
160
+ t
161
+ ]), B = _react.useCallback(()=>{
162
+ f("", ""), o.current && (e == null || e((0, _domJs.createChangeEvent)(o.current, "")), o.current.focus());
162
163
  }, [
163
- l,
164
+ f,
164
165
  e
165
- ]), B = (0, _formContextJs.useFieldProps)({
166
+ ]), F = (0, _formContextJs.useFieldProps)({
166
167
  name: d,
167
- value: f,
168
+ value: m,
168
169
  defaultValue: void 0,
169
- processValue: (o)=>o,
170
+ processValue: (s)=>s,
170
171
  helperText: p,
171
172
  optional: n,
172
173
  error: u,
173
- disabled: m,
174
- onBlur: x,
174
+ disabled: a,
175
+ onBlur: R,
175
176
  validate: I,
176
177
  onChange: e,
177
- onChangeValue: l
178
+ onChangeValue: f
178
179
  });
179
180
  return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_textFieldBaseJs.TextFieldBaseAutosuggest, _objectSpreadProps(_objectSpread({
180
- ref: t,
181
+ ref: (0, _commonJs.combineRefs)(o, S),
181
182
  startIcon: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconSearchJs.default, {}),
182
- endIcon: f ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconButtonJs.default, {
183
+ endIcon: m ? /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconButtonJs.default, {
183
184
  size: 48,
184
185
  style: {
185
186
  display: "flex",
186
187
  padding: 12,
187
188
  margin: -12
188
189
  },
189
- "aria-label": P.texts.formSearchClear,
190
- onPress: v,
190
+ "aria-label": b.texts.formSearchClear,
191
+ onPress: B,
191
192
  children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconCloseRegularJs.default, {})
192
193
  }) : void 0
193
- }, S, B), {
194
+ }, y, F), {
194
195
  type: "search"
195
196
  }));
196
- };
197
+ });
package/dist/video.js CHANGED
@@ -9,7 +9,7 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- RATIO: ()=>F,
12
+ RATIO: ()=>C,
13
13
  default: ()=>j
14
14
  });
15
15
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
@@ -138,13 +138,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
138
138
  }
139
139
  return target;
140
140
  }
141
- const F = {
141
+ const C = {
142
142
  "1:1": 1,
143
143
  "16:9": 16 / 9,
144
144
  "12:5": 12 / 5,
145
145
  "4:3": 4 / 3
146
- }, N = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", j = /*#__PURE__*/ _react.forwardRef((_param, l)=>{
147
- var { src: t , poster: i , autoPlay: o = !(0, _platformJs.isRunningAcceptanceTest)() , muted: d = !0 , loop: m = !0 , preload: u = "none" , aspectRatio: A = "1:1" , dataAttributes: f } = _param, n = _objectWithoutProperties(_param, [
146
+ }, F = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", j = /*#__PURE__*/ _react.forwardRef((_param, l)=>{
147
+ 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, [
148
148
  "src",
149
149
  "poster",
150
150
  "autoPlay",
@@ -154,9 +154,9 @@ const F = {
154
154
  "aspectRatio",
155
155
  "dataAttributes"
156
156
  ]);
157
- const R = (0, _imageJs.useDisableBorderRadius)(), p = typeof A == "number" ? A : F[A], a = _react.useRef(null);
157
+ const R = (0, _imageJs.useMediaBorderRadius)(), p = typeof A == "number" ? A : C[A], d = _react.useRef(null);
158
158
  _react.useEffect(()=>{
159
- const e = a.current;
159
+ const e = d.current;
160
160
  e && o && e.paused && e.play();
161
161
  }, [
162
162
  o
@@ -165,20 +165,20 @@ const F = {
165
165
  t
166
166
  ]).map((e)=>typeof e == "string" ? {
167
167
  src: e
168
- } : e), c = /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("video", _objectSpreadProps(_objectSpread({
169
- ref: (0, _commonJs.combineRefs)(l, a),
168
+ } : e), a = /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("video", _objectSpreadProps(_objectSpread({
169
+ ref: (0, _commonJs.combineRefs)(l, d),
170
170
  playsInline: !0,
171
171
  disablePictureInPicture: !0,
172
172
  disableRemotePlayback: !0,
173
173
  autoPlay: o,
174
- muted: d,
174
+ muted: c,
175
175
  loop: m,
176
176
  className: _videoCssMisticaJs.video,
177
177
  preload: u,
178
- poster: i || N
178
+ poster: i || F
179
179
  }, (0, _domJs.getPrefixedDataAttributes)(f)), {
180
180
  style: {
181
- borderRadius: R ? 0 : 8
181
+ borderRadius: R ? 8 : 0
182
182
  },
183
183
  children: g.map((param, b)=>/* @__PURE__ */ {
184
184
  let { src: e , type: h } = param;
@@ -200,7 +200,7 @@ const F = {
200
200
  backgroundSize: "cover",
201
201
  backgroundPosition: "50% 50%"
202
202
  },
203
- children: c
204
- }) : c
203
+ children: a
204
+ }) : a
205
205
  });
206
206
  });
package/dist-es/card.js CHANGED
@@ -80,19 +80,19 @@ function _objectWithoutPropertiesLoose(source, excluded) {
80
80
  import * as y from "react";
81
81
  import R from "./tag.js";
82
82
  import b from "./stack.js";
83
- import D from "./box.js";
83
+ import N from "./box.js";
84
84
  import { Text2 as C, Text1 as j, Text4 as k } from "./text.js";
85
85
  import { Boxed as T } from "./boxed.js";
86
86
  import A from "./button-group.js";
87
- import { DisableBorderRadiusProvider as H } from "./image.js";
88
- import N, { useIsDismissable as G } from "./maybe-dismissable.js";
87
+ import { MediaBorderRadiusProvider as H } from "./image.js";
88
+ import D, { useIsDismissable as G } from "./maybe-dismissable.js";
89
89
  import { BaseTouchable as q } from "./touchable.js";
90
90
  import { vars as w } from "./skins/skin-contract.css-mistica.js";
91
91
  import { boxed as B, mediaCard as z, mediaCardContent as E, dataCard as F, snapCardTouchableHover as I, snapCardTouchableHoverTransparent as J, snapCard as K, actions as O } from "./card.css-mistica.js";
92
92
  import { useTheme as Q } from "./hooks.js";
93
93
  import { sprinkles as U } from "./sprinkles.css-mistica.js";
94
94
  import { jsx as r, jsxs as o } from "./_virtual/jsx-runtime.js";
95
- const S = (param)=>{
95
+ const M = (param)=>{
96
96
  let { headline: e , pretitle: a , pretitleLinesMax: t , title: n , titleLinesMax: h , subtitle: d , subtitleLinesMax: u , description: s , descriptionLinesMax: l , extra: i , button: c , buttonLink: m } = param;
97
97
  const p = ()=>e ? typeof e == "string" ? /* @__PURE__ */ r(R, {
98
98
  type: "promo",
@@ -166,7 +166,7 @@ const S = (param)=>{
166
166
  })
167
167
  ]
168
168
  });
169
- }, M = (param)=>{
169
+ }, S = (param)=>{
170
170
  let { "aria-label": e , className: a , children: t } = param;
171
171
  return G() ? /* @__PURE__ */ r("div", {
172
172
  className: a,
@@ -177,28 +177,29 @@ const S = (param)=>{
177
177
  children: t
178
178
  });
179
179
  }, nr = /*#__PURE__*/ y.forwardRef((param, x)=>/* @__PURE__ */ {
180
- let { media: e , headline: a , pretitle: t , pretitleLinesMax: n , subtitle: h , subtitleLinesMax: d , title: u , titleLinesMax: s , description: l , descriptionLinesMax: i , extra: c , button: m , buttonLink: p , dataAttributes: g , "aria-label": f , onClose: v } = param;
181
- return r(N, {
182
- onClose: v,
180
+ let { media: e , headline: a , pretitle: t , pretitleLinesMax: n , subtitle: h , subtitleLinesMax: d , title: u , titleLinesMax: s , description: l , descriptionLinesMax: i , extra: c , button: m , buttonLink: p , dataAttributes: v , "aria-label": f , onClose: g } = param;
181
+ return r(D, {
182
+ onClose: g,
183
183
  "aria-label": f,
184
184
  children: /* @__PURE__ */ r(T, {
185
185
  className: B,
186
186
  dataAttributes: _objectSpread({
187
187
  "component-name": "MediaCard"
188
- }, g),
188
+ }, v),
189
189
  ref: x,
190
190
  width: "100%",
191
191
  height: "100%",
192
- children: /* @__PURE__ */ o(M, {
192
+ children: /* @__PURE__ */ o(S, {
193
193
  className: z,
194
194
  "aria-label": f,
195
195
  children: [
196
196
  /* @__PURE__ */ r(H, {
197
+ value: !1,
197
198
  children: e
198
199
  }),
199
200
  /* @__PURE__ */ r("div", {
200
201
  className: E,
201
- children: /* @__PURE__ */ r(S, {
202
+ children: /* @__PURE__ */ r(M, {
202
203
  headline: a,
203
204
  pretitle: t,
204
205
  pretitleLinesMax: n,
@@ -218,27 +219,27 @@ const S = (param)=>{
218
219
  })
219
220
  });
220
221
  }), or = /*#__PURE__*/ y.forwardRef((param, x)=>/* @__PURE__ */ {
221
- let { icon: e , headline: a , pretitle: t , pretitleLinesMax: n , title: h , titleLinesMax: d , subtitle: u , subtitleLinesMax: s , description: l , descriptionLinesMax: i , extra: c , button: m , buttonLink: p , dataAttributes: g , "aria-label": f , onClose: v } = param;
222
- return r(N, {
222
+ let { icon: e , headline: a , pretitle: t , pretitleLinesMax: n , title: h , titleLinesMax: d , subtitle: u , subtitleLinesMax: s , description: l , descriptionLinesMax: i , extra: c , button: m , buttonLink: p , dataAttributes: v , "aria-label": f , onClose: g } = param;
223
+ return r(D, {
223
224
  "aria-label": f,
224
- onClose: v,
225
+ onClose: g,
225
226
  children: /* @__PURE__ */ r(T, {
226
227
  className: B,
227
228
  dataAttributes: _objectSpread({
228
229
  "component-name": "DataCard"
229
- }, g),
230
+ }, v),
230
231
  ref: x,
231
232
  width: "100%",
232
233
  height: "100%",
233
- children: /* @__PURE__ */ o(M, {
234
+ children: /* @__PURE__ */ o(S, {
234
235
  className: F,
235
236
  "aria-label": f,
236
237
  children: [
237
- e && /* @__PURE__ */ r(D, {
238
+ e && /* @__PURE__ */ r(N, {
238
239
  paddingBottom: 16,
239
240
  children: e
240
241
  }),
241
- /* @__PURE__ */ r(S, {
242
+ /* @__PURE__ */ r(M, {
242
243
  headline: a,
243
244
  pretitle: t,
244
245
  pretitleLinesMax: n,
@@ -288,7 +289,7 @@ const S = (param)=>{
288
289
  children: [
289
290
  /* @__PURE__ */ o("div", {
290
291
  children: [
291
- e && /* @__PURE__ */ r(D, {
292
+ e && /* @__PURE__ */ r(N, {
292
293
  paddingBottom: 16,
293
294
  children: e
294
295
  }),
@@ -2,10 +2,10 @@ import "./sprinkles.css.ts.vanilla.js";
2
2
  import "./responsive-layout.css.ts.vanilla.js";
3
3
  import "./grid-layout.css.ts.vanilla.js";
4
4
  import "./carousel.css.ts.vanilla.js";
5
- var a = "_1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf3k", y = "_1abcu72 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf3l", r = "_1abcu72 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf40", c = "_1abcu75 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f", e = "_1abcu7l _1abcu7b _1y2v1nf5g _1y2v1nf8i", u = "_1y2v1nf5g _1y2v1nf5p", b = "_1y2v1nf8u _1y2v1nf5b", s = "_1abcu7o", t = "_1abcu7s _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c", o = "_1abcu7r _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c", l = "_1abcu7m", i = "_1abcu7n", p = "_1abcu7v _1abcu7b _1y2v1nf5g _1y2v1nf8i", d = "_1abcu715 _1y2v1nf5c _1y2v1nfb0 _1y2v1nf5g _1y2v1nf5p _1y2v1nf7n", g = "_1y2v1nf5b", m = "_1abcu7x _1y2v1nf7n _1y2v1nf5y", w = "_1abcu713 _1abcu7z _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9e _1y2v1nf5c _1y2v1nfam", h = "_1abcu711 _1abcu7z _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9e _1y2v1nf5c _1y2v1nfa8", x = {
5
+ var a = "_1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf3k", y = "_1abcu72 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf3l", r = "_1abcu72 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f _1y2v1nf40", c = "_1abcu75 _1abcu71 _1y2v1nf7s _1y2v1nf87 _1y2v1nf9f", u = "_1abcu7l _1abcu7b _1y2v1nf5g _1y2v1nf8i", e = "_1y2v1nf5g _1y2v1nf5p", b = "_1y2v1nf8u _1y2v1nf5b", s = "_1abcu7o", t = "_1abcu7s _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c", o = "_1abcu7r _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c", l = "_1abcu7m", i = "_1abcu7n", p = "_1abcu7v _1abcu7b _1y2v1nf5g _1y2v1nf8i", d = "_1abcu713 _1y2v1nf5c _1y2v1nfb0 _1y2v1nf5g _1y2v1nf5p _1y2v1nf7n", g = "_1y2v1nf5b", m = "_1abcu7x _1y2v1nf7n _1y2v1nf5y", w = "_1abcu711 _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c _1y2v1nfam", h = "_1abcu7z _1abcu7q _1abcu7d _1y2v1nf5g _1y2v1nf5v _1y2v1nf5p _1y2v1nf9f _1y2v1nf2p _1y2v1nf7x _1y2v1nf8c _1y2v1nf9d _1y2v1nf5c _1y2v1nfa8", x = {
6
6
  itemsPerPageMobile: "var(--_1abcu7g)",
7
7
  itemsPerPageTablet: "var(--_1abcu7h)",
8
8
  itemsPerPageDesktop: "var(--_1abcu7i)",
9
9
  gap: "var(--_1abcu7j)"
10
10
  };
11
- export { a as bullet, y as bulletActive, r as bulletActiveInverse, c as bulletInverse, e as carousel, u as carouselBullets, b as carouselContainer, s as carouselItem, t as carouselNextArrowButton, o as carouselPrevArrowButton, l as carouselWithScroll, i as centeredCarousel, p as slideshow, d as slideshowBullets, g as slideshowContainer, m as slideshowItem, w as slideshowNextArrowButton, h as slideshowPrevArrowButton, x as vars };
11
+ export { a as bullet, y as bulletActive, r as bulletActiveInverse, c as bulletInverse, u as carousel, e as carouselBullets, b as carouselContainer, s as carouselItem, t as carouselNextArrowButton, o as carouselPrevArrowButton, l as carouselWithScroll, i as centeredCarousel, p as slideshow, d as slideshowBullets, g as slideshowContainer, m as slideshowItem, w as slideshowNextArrowButton, h as slideshowPrevArrowButton, x as vars };