@telefonica/mistica 14.31.0 → 14.32.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.
@@ -10,10 +10,10 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  AdvancedDataCard: function() {
13
- return ve;
13
+ return Ne;
14
14
  },
15
15
  default: function() {
16
- return Oe;
16
+ return je;
17
17
  }
18
18
  });
19
19
  const _jsxruntime = require("react/jsx-runtime");
@@ -128,58 +128,101 @@ function _object_spread_props(target, source) {
128
128
  }
129
129
  return target;
130
130
  }
131
- const ge = (param)=>{
132
- let { headline: i , pretitle: a , pretitleAs: n = "p" , pretitleLinesMax: h , title: s , titleAs: c = "h3" , titleLinesMax: d , subtitle: l , subtitleLinesMax: o , description: r , descriptionLinesMax: m } = param;
133
- const { textPresets: N } = (0, _hooks.useTheme)();
131
+ function _object_without_properties(source, excluded) {
132
+ if (source == null) return {};
133
+ var target = _object_without_properties_loose(source, excluded);
134
+ var key, i;
135
+ if (Object.getOwnPropertySymbols) {
136
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
137
+ for(i = 0; i < sourceSymbolKeys.length; i++){
138
+ key = sourceSymbolKeys[i];
139
+ if (excluded.indexOf(key) >= 0) continue;
140
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
141
+ target[key] = source[key];
142
+ }
143
+ }
144
+ return target;
145
+ }
146
+ function _object_without_properties_loose(source, excluded) {
147
+ if (source == null) return {};
148
+ var target = {};
149
+ var sourceKeys = Object.keys(source);
150
+ var key, i;
151
+ for(i = 0; i < sourceKeys.length; i++){
152
+ key = sourceKeys[i];
153
+ if (excluded.indexOf(key) >= 0) continue;
154
+ target[key] = source[key];
155
+ }
156
+ return target;
157
+ }
158
+ const fe = (_param)=>{
159
+ var { headline: a , pretitle: i , pretitleAs: s = "p" , pretitleLinesMax: p , title: d , titleAs: c = "h3" , titleLinesMax: l , subtitle: h , subtitleLinesMax: o , description: t , descriptionLinesMax: u , ariaLabel: x } = _param, n = _object_without_properties(_param, [
160
+ "headline",
161
+ "pretitle",
162
+ "pretitleAs",
163
+ "pretitleLinesMax",
164
+ "title",
165
+ "titleAs",
166
+ "titleLinesMax",
167
+ "subtitle",
168
+ "subtitleLinesMax",
169
+ "description",
170
+ "descriptionLinesMax",
171
+ "ariaLabel"
172
+ ]);
173
+ const { textPresets: y } = (0, _hooks.useTheme)();
134
174
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
135
175
  space: 4,
136
176
  children: [
137
- i,
138
- /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
139
- space: 4,
140
- children: [
141
- a && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
142
- color: _skincontractcssmistica.vars.colors.textPrimary,
143
- truncate: h,
144
- as: n,
145
- regular: !0,
146
- hyphens: "auto",
147
- children: a
148
- }),
149
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
150
- mobileSize: 18,
151
- mobileLineHeight: "24px",
152
- desktopSize: 20,
153
- desktopLineHeight: "28px",
154
- truncate: d,
155
- weight: N.cardTitle.weight,
156
- as: c,
157
- hyphens: "auto",
158
- children: s
159
- }),
160
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
161
- color: _skincontractcssmistica.vars.colors.textPrimary,
162
- truncate: o,
163
- as: "p",
164
- regular: !0,
165
- hyphens: "auto",
166
- children: l
167
- })
168
- ]
177
+ a,
178
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, _object_spread_props(_object_spread({
179
+ tabIndex: 0,
180
+ maybe: !0,
181
+ className: (0, _classnames.default)(_advanceddatacardcssmistica.touchableArea)
182
+ }, n), {
183
+ "aria-label": x,
184
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {})
185
+ })),
186
+ i && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
187
+ color: _skincontractcssmistica.vars.colors.textPrimary,
188
+ truncate: p,
189
+ as: s,
190
+ regular: !0,
191
+ hyphens: "auto",
192
+ children: i
169
193
  }),
170
- r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
171
- truncate: m,
194
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
195
+ mobileSize: 18,
196
+ mobileLineHeight: "24px",
197
+ desktopSize: 20,
198
+ desktopLineHeight: "28px",
199
+ truncate: l,
200
+ weight: y.cardTitle.weight,
201
+ as: c,
202
+ hyphens: "auto",
203
+ children: d
204
+ }),
205
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
206
+ color: _skincontractcssmistica.vars.colors.textPrimary,
207
+ truncate: o,
208
+ as: "p",
209
+ regular: !0,
210
+ hyphens: "auto",
211
+ children: h
212
+ }),
213
+ t && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
214
+ truncate: u,
172
215
  as: "p",
173
216
  regular: !0,
174
217
  color: _skincontractcssmistica.vars.colors.textSecondary,
175
218
  hyphens: "auto",
176
- children: r
219
+ children: t
177
220
  })
178
221
  ]
179
222
  });
180
- }, fe = (param)=>{
181
- let { button: i , footerImage: a , footerText: n , footerTextLinesMax: h , buttonLink: s } = param;
182
- const c = !!i, d = !!a, l = !!n, o = !!s, r = c && (d || l) && o, m = o && !r ? "178px" : "";
223
+ }, ve = (param)=>{
224
+ let { button: a , footerImage: i , footerText: s , footerTextLinesMax: p , buttonLink: d } = param;
225
+ const c = !!a, l = !!i, h = !!s, o = !!d, t = c && (l || h) && o, u = o && !t ? "178px" : "";
183
226
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
184
227
  children: [
185
228
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
@@ -187,148 +230,166 @@ const ge = (param)=>{
187
230
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
188
231
  }),
189
232
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
190
- className: (0, _classnames.default)(_advanceddatacardcssmistica.actions, _advanceddatacardcssmistica.actionsVariants[r ? "mobile" : "default"]),
233
+ className: (0, _classnames.default)(_advanceddatacardcssmistica.actions, _advanceddatacardcssmistica.actionsVariants[t ? "mobile" : "default"]),
191
234
  children: [
192
235
  c && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
193
236
  className: (0, _classnames.default)(_advanceddatacardcssmistica.marginRightButton, _advanceddatacardcssmistica.buttonMobile),
194
- children: i
237
+ children: a
195
238
  }),
196
239
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
197
- className: (0, _classnames.default)(_advanceddatacardcssmistica.footerDirection, r ? _advanceddatacardcssmistica.marginRightAuto : (0, _sprinklescssmistica.sprinkles)({
240
+ className: (0, _classnames.default)(_advanceddatacardcssmistica.footerDirection, t ? _advanceddatacardcssmistica.marginRightAuto : (0, _sprinklescssmistica.sprinkles)({
198
241
  paddingTop: 16
199
242
  })),
200
243
  children: [
201
- d && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
244
+ l && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
202
245
  paddingRight: 16,
203
246
  className: (0, _sprinklescssmistica.sprinkles)({
204
247
  alignItems: "center",
205
248
  display: "flex"
206
249
  }),
207
- children: a
250
+ children: i
208
251
  }),
209
- l && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
252
+ h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
210
253
  style: {
211
- maxWidth: m
254
+ maxWidth: u
212
255
  },
213
256
  className: _advanceddatacardcssmistica.footerText,
214
257
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
215
- truncate: h,
258
+ truncate: p,
216
259
  regular: !0,
217
- children: n
260
+ children: s
218
261
  })
219
262
  })
220
263
  ]
221
264
  }),
222
265
  o && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
223
- className: (0, _classnames.default)(_advanceddatacardcssmistica.adjustButtonLink, r ? _advanceddatacardcssmistica.button : _advanceddatacardcssmistica.buttonMobile),
224
- children: s
266
+ className: (0, _classnames.default)(_advanceddatacardcssmistica.adjustButtonLink, t ? _advanceddatacardcssmistica.button : _advanceddatacardcssmistica.buttonMobile),
267
+ children: d
225
268
  })
226
269
  ]
227
270
  })
228
271
  ]
229
272
  });
230
- }, ve = /*#__PURE__*/ _react.forwardRef((param, _)=>{
231
- let { onPress: i , stackingGroup: a , headline: n , pretitle: h , pretitleAs: s , pretitleLinesMax: c , title: d , titleAs: l , titleLinesMax: o , subtitle: r , subtitleLinesMax: m , description: N , descriptionLinesMax: P , extra: p , extraDividerPadding: O = 24 , button: b , footerImage: C , footerText: A , footerTextLinesMax: j , buttonLink: B , dataAttributes: k , actions: g , "aria-label": H , onClose: S } = param;
232
- const z = !!i, E = {
233
- button: b,
234
- footerImage: C,
235
- footerText: A,
236
- footerTextLinesMax: j,
237
- buttonLink: B
238
- }, w = !!b || !!C || !!A || !!B, D = !!(p != null && p.length), L = ((g == null ? void 0 : g.length) || 0) + (S ? 1 : 0), W = {
273
+ }, Ne = /*#__PURE__*/ _react.forwardRef((_param, _)=>{
274
+ var { stackingGroup: a , headline: i , pretitle: s , pretitleAs: p , pretitleLinesMax: d , title: c , titleAs: l , titleLinesMax: h , subtitle: o , subtitleLinesMax: t , description: u , descriptionLinesMax: x , extra: n , extraDividerPadding: y = 24 , button: A , footerImage: b , footerText: B , footerTextLinesMax: z , buttonLink: S , dataAttributes: H , actions: g , "aria-label": w , onClose: D } = _param, f = _object_without_properties(_param, [
275
+ "stackingGroup",
276
+ "headline",
277
+ "pretitle",
278
+ "pretitleAs",
279
+ "pretitleLinesMax",
280
+ "title",
281
+ "titleAs",
282
+ "titleLinesMax",
283
+ "subtitle",
284
+ "subtitleLinesMax",
285
+ "description",
286
+ "descriptionLinesMax",
287
+ "extra",
288
+ "extraDividerPadding",
289
+ "button",
290
+ "footerImage",
291
+ "footerText",
292
+ "footerTextLinesMax",
293
+ "buttonLink",
294
+ "dataAttributes",
295
+ "actions",
296
+ "aria-label",
297
+ "onClose"
298
+ ]);
299
+ const E = !!f.href || !!f.onPress || !!f.to, W = {
300
+ button: A,
301
+ footerImage: b,
302
+ footerText: B,
303
+ footerTextLinesMax: z,
304
+ buttonLink: S
305
+ }, I = !!A || !!b || !!B || !!S, R = !!(n != null && n.length), G = ((g == null ? void 0 : g.length) || 0) + (D ? 1 : 0), L = {
239
306
  marginRight: -16,
240
307
  marginTop: -24,
241
- width: _card.TOP_ACTION_BUTTON_SIZE * L
308
+ width: _card.TOP_ACTION_BUTTON_SIZE * G
242
309
  };
243
310
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("section", _object_spread_props(_object_spread({
244
311
  className: (0, _sprinklescssmistica.sprinkles)({
245
312
  position: "relative",
246
313
  height: "100%"
247
314
  })
248
- }, (0, _dom.getPrefixedDataAttributes)(k, "AdvancedDataCard")), {
315
+ }, (0, _dom.getPrefixedDataAttributes)(H, "AdvancedDataCard")), {
249
316
  ref: _,
317
+ "aria-label": w,
250
318
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
251
319
  className: _advanceddatacardcssmistica.dataCard,
252
320
  children: [
253
321
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
254
322
  className: _advanceddatacardcssmistica.touchableContainer,
255
323
  children: [
256
- /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.default, {
257
- onPress: i,
258
- tabIndex: 0,
259
- maybe: !0,
260
- className: _advanceddatacardcssmistica.touchable,
261
- "aria-label": H,
262
- children: [
263
- z && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
264
- className: _advanceddatacardcssmistica.touchableCardOverlay
265
- }),
266
- /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
267
- className: (0, _classnames.default)(_advanceddatacardcssmistica.cardContentStyle, !w && !D ? _advanceddatacardcssmistica.minHeight : ""),
268
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
269
- paddingTop: 8,
270
- children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
271
- space: 0,
324
+ E && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
325
+ className: _advanceddatacardcssmistica.touchableCardOverlay
326
+ }),
327
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
328
+ className: (0, _classnames.default)(_advanceddatacardcssmistica.cardContentStyle, !I && !R ? _advanceddatacardcssmistica.minHeight : ""),
329
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
330
+ paddingTop: 8,
331
+ children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
332
+ space: 0,
333
+ children: [
334
+ /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
335
+ space: 8,
272
336
  children: [
273
- /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
274
- space: 8,
275
- children: [
276
- a,
277
- /* @__PURE__ */ (0, _jsxruntime.jsx)(ge, {
278
- headline: n,
279
- pretitle: h,
280
- pretitleAs: s,
281
- pretitleLinesMax: c,
282
- title: d,
283
- titleAs: l,
284
- titleLinesMax: o,
285
- subtitle: r,
286
- subtitleLinesMax: m,
287
- description: N,
288
- descriptionLinesMax: P
289
- })
290
- ]
291
- }),
292
- !a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
293
- style: W
294
- })
337
+ a,
338
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(fe, _object_spread({
339
+ headline: i,
340
+ pretitle: s,
341
+ pretitleAs: p,
342
+ pretitleLinesMax: d,
343
+ title: c,
344
+ titleAs: l,
345
+ titleLinesMax: h,
346
+ subtitle: o,
347
+ subtitleLinesMax: t,
348
+ description: u,
349
+ descriptionLinesMax: x,
350
+ ariaLabel: w
351
+ }, f))
295
352
  ]
353
+ }),
354
+ !a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
355
+ style: L
296
356
  })
297
- })
298
- }),
299
- /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
300
- style: {
301
- flexGrow: 1
302
- }
303
- }),
304
- D && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
305
- paddingTop: 16,
306
- paddingBottom: 24,
307
- width: "100%",
308
- children: p.map((G, I)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
309
- children: [
310
- /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
311
- className: _advanceddatacardcssmistica.paddingX,
312
- children: G
313
- }),
314
- I + 1 !== p.length && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
315
- paddingY: O,
316
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
317
- })
318
- ]
319
- }, I))
357
+ ]
320
358
  })
321
- ]
359
+ })
360
+ }),
361
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
362
+ style: {
363
+ flexGrow: 1
364
+ }
365
+ }),
366
+ R && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
367
+ paddingTop: 16,
368
+ paddingBottom: 24,
369
+ width: "100%",
370
+ className: _advanceddatacardcssmistica.zindex,
371
+ children: n.map((M, F)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
372
+ children: [
373
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
374
+ className: _advanceddatacardcssmistica.paddingX,
375
+ children: M
376
+ }),
377
+ F + 1 !== n.length && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
378
+ paddingY: y,
379
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
380
+ })
381
+ ]
382
+ }, F))
322
383
  }),
323
384
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_card.CardActionsGroup, {
324
385
  actions: g,
325
- onClose: S,
386
+ onClose: D,
326
387
  padding: 7
327
388
  })
328
389
  ]
329
390
  }),
330
- w && /* @__PURE__ */ (0, _jsxruntime.jsx)(fe, _object_spread({}, E))
391
+ I && /* @__PURE__ */ (0, _jsxruntime.jsx)(ve, _object_spread({}, W))
331
392
  ]
332
393
  })
333
394
  }));
334
- }), Oe = ve;
395
+ }), je = Ne;
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "PACKAGE_VERSION", {
8
8
  return o;
9
9
  }
10
10
  });
11
- const o = "14.31.0";
11
+ const o = "14.32.0";