@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.
@@ -50,224 +50,285 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { jsx as e, jsxs as t, Fragment as M } from "react/jsx-runtime";
53
+ function _object_without_properties(source, excluded) {
54
+ if (source == null) return {};
55
+ var target = _object_without_properties_loose(source, excluded);
56
+ var key, i;
57
+ if (Object.getOwnPropertySymbols) {
58
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
59
+ for(i = 0; i < sourceSymbolKeys.length; i++){
60
+ key = sourceSymbolKeys[i];
61
+ if (excluded.indexOf(key) >= 0) continue;
62
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
63
+ target[key] = source[key];
64
+ }
65
+ }
66
+ return target;
67
+ }
68
+ function _object_without_properties_loose(source, excluded) {
69
+ if (source == null) return {};
70
+ var target = {};
71
+ var sourceKeys = Object.keys(source);
72
+ var key, i;
73
+ for(i = 0; i < sourceKeys.length; i++){
74
+ key = sourceKeys[i];
75
+ if (excluded.indexOf(key) >= 0) continue;
76
+ target[key] = source[key];
77
+ }
78
+ return target;
79
+ }
80
+ import { jsx as e, jsxs as r, Fragment as P } from "react/jsx-runtime";
54
81
  import * as U from "react";
55
82
  import { Boxed as V } from "../boxed.js";
56
- import { sprinkles as T } from "../sprinkles.css-mistica.js";
57
- import x from "../stack.js";
58
- import { dataCard as X, touchableContainer as Y, touchable as Z, touchableCardOverlay as q, cardContentStyle as J, minHeight as K, paddingX as Q, divider as $, actions as ee, actionsVariants as te, marginRightButton as re, buttonMobile as R, footerDirection as ae, marginRightAuto as ie, footerText as oe, adjustButtonLink as ne, button as se } from "./advanced-data-card.css-mistica.js";
59
- import F from "../divider.js";
60
- import { Text2 as f, Text as ce } from "../text.js";
61
- import { vars as y } from "../skins/skin-contract.css-mistica.js";
62
- import v from "../box.js";
63
- import de from "../touchable.js";
64
- import u from "classnames";
65
- import { CardActionsGroup as le, TOP_ACTION_BUTTON_SIZE as he } from "../card.js";
66
- import { useTheme as me } from "../hooks.js";
67
- import { getPrefixedDataAttributes as pe } from "../utils/dom.js";
68
- import ue from "../inline.js";
69
- const ge = (param)=>{
70
- 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;
71
- const { textPresets: N } = me();
72
- return /* @__PURE__ */ t(x, {
83
+ import { sprinkles as C } from "../sprinkles.css-mistica.js";
84
+ import j from "../stack.js";
85
+ import { dataCard as X, touchableContainer as Y, touchableCardOverlay as Z, cardContentStyle as q, minHeight as J, zindex as K, paddingX as Q, touchableArea as $, divider as ee, actions as te, actionsVariants as re, marginRightButton as ae, buttonMobile as O, footerDirection as ie, marginRightAuto as oe, footerText as ne, adjustButtonLink as se, button as de } from "./advanced-data-card.css-mistica.js";
86
+ import k from "../divider.js";
87
+ import { Text2 as v, Text as ce } from "../text.js";
88
+ import { vars as T } from "../skins/skin-contract.css-mistica.js";
89
+ import N from "../box.js";
90
+ import le from "../touchable.js";
91
+ import m from "classnames";
92
+ import { CardActionsGroup as he, TOP_ACTION_BUTTON_SIZE as me } from "../card.js";
93
+ import { useTheme as pe } from "../hooks.js";
94
+ import { getPrefixedDataAttributes as ue } from "../utils/dom.js";
95
+ import ge from "../inline.js";
96
+ const fe = (_param)=>{
97
+ 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, [
98
+ "headline",
99
+ "pretitle",
100
+ "pretitleAs",
101
+ "pretitleLinesMax",
102
+ "title",
103
+ "titleAs",
104
+ "titleLinesMax",
105
+ "subtitle",
106
+ "subtitleLinesMax",
107
+ "description",
108
+ "descriptionLinesMax",
109
+ "ariaLabel"
110
+ ]);
111
+ const { textPresets: y } = pe();
112
+ return /* @__PURE__ */ r(j, {
73
113
  space: 4,
74
114
  children: [
75
- i,
76
- /* @__PURE__ */ t(x, {
77
- space: 4,
78
- children: [
79
- a && /* @__PURE__ */ e(f, {
80
- color: y.colors.textPrimary,
81
- truncate: h,
82
- as: n,
83
- regular: !0,
84
- hyphens: "auto",
85
- children: a
86
- }),
87
- /* @__PURE__ */ e(ce, {
88
- mobileSize: 18,
89
- mobileLineHeight: "24px",
90
- desktopSize: 20,
91
- desktopLineHeight: "28px",
92
- truncate: d,
93
- weight: N.cardTitle.weight,
94
- as: c,
95
- hyphens: "auto",
96
- children: s
97
- }),
98
- /* @__PURE__ */ e(f, {
99
- color: y.colors.textPrimary,
100
- truncate: o,
101
- as: "p",
102
- regular: !0,
103
- hyphens: "auto",
104
- children: l
105
- })
106
- ]
115
+ a,
116
+ /* @__PURE__ */ e(le, _object_spread_props(_object_spread({
117
+ tabIndex: 0,
118
+ maybe: !0,
119
+ className: m($)
120
+ }, n), {
121
+ "aria-label": x,
122
+ children: /* @__PURE__ */ e(P, {})
123
+ })),
124
+ i && /* @__PURE__ */ e(v, {
125
+ color: T.colors.textPrimary,
126
+ truncate: p,
127
+ as: s,
128
+ regular: !0,
129
+ hyphens: "auto",
130
+ children: i
107
131
  }),
108
- r && /* @__PURE__ */ e(f, {
109
- truncate: m,
132
+ /* @__PURE__ */ e(ce, {
133
+ mobileSize: 18,
134
+ mobileLineHeight: "24px",
135
+ desktopSize: 20,
136
+ desktopLineHeight: "28px",
137
+ truncate: l,
138
+ weight: y.cardTitle.weight,
139
+ as: c,
140
+ hyphens: "auto",
141
+ children: d
142
+ }),
143
+ /* @__PURE__ */ e(v, {
144
+ color: T.colors.textPrimary,
145
+ truncate: o,
146
+ as: "p",
147
+ regular: !0,
148
+ hyphens: "auto",
149
+ children: h
150
+ }),
151
+ t && /* @__PURE__ */ e(v, {
152
+ truncate: u,
110
153
  as: "p",
111
154
  regular: !0,
112
- color: y.colors.textSecondary,
155
+ color: T.colors.textSecondary,
113
156
  hyphens: "auto",
114
- children: r
157
+ children: t
115
158
  })
116
159
  ]
117
160
  });
118
- }, fe = (param)=>{
119
- let { button: i , footerImage: a , footerText: n , footerTextLinesMax: h , buttonLink: s } = param;
120
- const c = !!i, d = !!a, l = !!n, o = !!s, r = c && (d || l) && o, m = o && !r ? "178px" : "";
121
- return /* @__PURE__ */ t(M, {
161
+ }, ve = (param)=>{
162
+ let { button: a , footerImage: i , footerText: s , footerTextLinesMax: p , buttonLink: d } = param;
163
+ const c = !!a, l = !!i, h = !!s, o = !!d, t = c && (l || h) && o, u = o && !t ? "178px" : "";
164
+ return /* @__PURE__ */ r(P, {
122
165
  children: [
123
166
  /* @__PURE__ */ e("div", {
124
- className: $,
125
- children: /* @__PURE__ */ e(F, {})
167
+ className: ee,
168
+ children: /* @__PURE__ */ e(k, {})
126
169
  }),
127
- /* @__PURE__ */ t("div", {
128
- className: u(ee, te[r ? "mobile" : "default"]),
170
+ /* @__PURE__ */ r("div", {
171
+ className: m(te, re[t ? "mobile" : "default"]),
129
172
  children: [
130
173
  c && /* @__PURE__ */ e("div", {
131
- className: u(re, R),
132
- children: i
174
+ className: m(ae, O),
175
+ children: a
133
176
  }),
134
- /* @__PURE__ */ t("div", {
135
- className: u(ae, r ? ie : T({
177
+ /* @__PURE__ */ r("div", {
178
+ className: m(ie, t ? oe : C({
136
179
  paddingTop: 16
137
180
  })),
138
181
  children: [
139
- d && /* @__PURE__ */ e(v, {
182
+ l && /* @__PURE__ */ e(N, {
140
183
  paddingRight: 16,
141
- className: T({
184
+ className: C({
142
185
  alignItems: "center",
143
186
  display: "flex"
144
187
  }),
145
- children: a
188
+ children: i
146
189
  }),
147
- l && /* @__PURE__ */ e("div", {
190
+ h && /* @__PURE__ */ e("div", {
148
191
  style: {
149
- maxWidth: m
192
+ maxWidth: u
150
193
  },
151
- className: oe,
152
- children: /* @__PURE__ */ e(f, {
153
- truncate: h,
194
+ className: ne,
195
+ children: /* @__PURE__ */ e(v, {
196
+ truncate: p,
154
197
  regular: !0,
155
- children: n
198
+ children: s
156
199
  })
157
200
  })
158
201
  ]
159
202
  }),
160
203
  o && /* @__PURE__ */ e("div", {
161
- className: u(ne, r ? se : R),
162
- children: s
204
+ className: m(se, t ? de : O),
205
+ children: d
163
206
  })
164
207
  ]
165
208
  })
166
209
  ]
167
210
  });
168
- }, ve = /*#__PURE__*/ U.forwardRef((param, _)=>{
169
- 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;
170
- const z = !!i, E = {
171
- button: b,
172
- footerImage: C,
173
- footerText: A,
174
- footerTextLinesMax: j,
175
- buttonLink: B
176
- }, w = !!b || !!C || !!A || !!B, D = !!(p != null && p.length), L = ((g == null ? void 0 : g.length) || 0) + (S ? 1 : 0), W = {
211
+ }, Ne = /*#__PURE__*/ U.forwardRef((_param, _)=>{
212
+ 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, [
213
+ "stackingGroup",
214
+ "headline",
215
+ "pretitle",
216
+ "pretitleAs",
217
+ "pretitleLinesMax",
218
+ "title",
219
+ "titleAs",
220
+ "titleLinesMax",
221
+ "subtitle",
222
+ "subtitleLinesMax",
223
+ "description",
224
+ "descriptionLinesMax",
225
+ "extra",
226
+ "extraDividerPadding",
227
+ "button",
228
+ "footerImage",
229
+ "footerText",
230
+ "footerTextLinesMax",
231
+ "buttonLink",
232
+ "dataAttributes",
233
+ "actions",
234
+ "aria-label",
235
+ "onClose"
236
+ ]);
237
+ const E = !!f.href || !!f.onPress || !!f.to, W = {
238
+ button: A,
239
+ footerImage: b,
240
+ footerText: B,
241
+ footerTextLinesMax: z,
242
+ buttonLink: S
243
+ }, I = !!A || !!b || !!B || !!S, R = !!(n != null && n.length), G = ((g == null ? void 0 : g.length) || 0) + (D ? 1 : 0), L = {
177
244
  marginRight: -16,
178
245
  marginTop: -24,
179
- width: he * L
246
+ width: me * G
180
247
  };
181
248
  return /* @__PURE__ */ e("section", _object_spread_props(_object_spread({
182
- className: T({
249
+ className: C({
183
250
  position: "relative",
184
251
  height: "100%"
185
252
  })
186
- }, pe(k, "AdvancedDataCard")), {
253
+ }, ue(H, "AdvancedDataCard")), {
187
254
  ref: _,
188
- children: /* @__PURE__ */ t(V, {
255
+ "aria-label": w,
256
+ children: /* @__PURE__ */ r(V, {
189
257
  className: X,
190
258
  children: [
191
- /* @__PURE__ */ t("div", {
259
+ /* @__PURE__ */ r("div", {
192
260
  className: Y,
193
261
  children: [
194
- /* @__PURE__ */ t(de, {
195
- onPress: i,
196
- tabIndex: 0,
197
- maybe: !0,
198
- className: Z,
199
- "aria-label": H,
200
- children: [
201
- z && /* @__PURE__ */ e("div", {
202
- className: q
203
- }),
204
- /* @__PURE__ */ e("div", {
205
- className: u(J, !w && !D ? K : ""),
206
- children: /* @__PURE__ */ e(v, {
207
- paddingTop: 8,
208
- children: /* @__PURE__ */ t(ue, {
209
- space: 0,
262
+ E && /* @__PURE__ */ e("div", {
263
+ className: Z
264
+ }),
265
+ /* @__PURE__ */ e("div", {
266
+ className: m(q, !I && !R ? J : ""),
267
+ children: /* @__PURE__ */ e(N, {
268
+ paddingTop: 8,
269
+ children: /* @__PURE__ */ r(ge, {
270
+ space: 0,
271
+ children: [
272
+ /* @__PURE__ */ r(j, {
273
+ space: 8,
210
274
  children: [
211
- /* @__PURE__ */ t(x, {
212
- space: 8,
213
- children: [
214
- a,
215
- /* @__PURE__ */ e(ge, {
216
- headline: n,
217
- pretitle: h,
218
- pretitleAs: s,
219
- pretitleLinesMax: c,
220
- title: d,
221
- titleAs: l,
222
- titleLinesMax: o,
223
- subtitle: r,
224
- subtitleLinesMax: m,
225
- description: N,
226
- descriptionLinesMax: P
227
- })
228
- ]
229
- }),
230
- !a && /* @__PURE__ */ e("div", {
231
- style: W
232
- })
275
+ a,
276
+ /* @__PURE__ */ e(fe, _object_spread({
277
+ headline: i,
278
+ pretitle: s,
279
+ pretitleAs: p,
280
+ pretitleLinesMax: d,
281
+ title: c,
282
+ titleAs: l,
283
+ titleLinesMax: h,
284
+ subtitle: o,
285
+ subtitleLinesMax: t,
286
+ description: u,
287
+ descriptionLinesMax: x,
288
+ ariaLabel: w
289
+ }, f))
233
290
  ]
291
+ }),
292
+ !a && /* @__PURE__ */ e("div", {
293
+ style: L
234
294
  })
235
- })
236
- }),
237
- /* @__PURE__ */ e("div", {
238
- style: {
239
- flexGrow: 1
240
- }
241
- }),
242
- D && /* @__PURE__ */ e(v, {
243
- paddingTop: 16,
244
- paddingBottom: 24,
245
- width: "100%",
246
- children: p.map((G, I)=>/* @__PURE__ */ t("div", {
247
- children: [
248
- /* @__PURE__ */ e("div", {
249
- className: Q,
250
- children: G
251
- }),
252
- I + 1 !== p.length && /* @__PURE__ */ e(v, {
253
- paddingY: O,
254
- children: /* @__PURE__ */ e(F, {})
255
- })
256
- ]
257
- }, I))
295
+ ]
258
296
  })
259
- ]
297
+ })
298
+ }),
299
+ /* @__PURE__ */ e("div", {
300
+ style: {
301
+ flexGrow: 1
302
+ }
303
+ }),
304
+ R && /* @__PURE__ */ e(N, {
305
+ paddingTop: 16,
306
+ paddingBottom: 24,
307
+ width: "100%",
308
+ className: K,
309
+ children: n.map((M, F)=>/* @__PURE__ */ r("div", {
310
+ children: [
311
+ /* @__PURE__ */ e("div", {
312
+ className: Q,
313
+ children: M
314
+ }),
315
+ F + 1 !== n.length && /* @__PURE__ */ e(N, {
316
+ paddingY: y,
317
+ children: /* @__PURE__ */ e(k, {})
318
+ })
319
+ ]
320
+ }, F))
260
321
  }),
261
- /* @__PURE__ */ e(le, {
322
+ /* @__PURE__ */ e(he, {
262
323
  actions: g,
263
- onClose: S,
324
+ onClose: D,
264
325
  padding: 7
265
326
  })
266
327
  ]
267
328
  }),
268
- w && /* @__PURE__ */ e(fe, _object_spread({}, E))
329
+ I && /* @__PURE__ */ e(ve, _object_spread({}, W))
269
330
  ]
270
331
  })
271
332
  }));
272
- }), Oe = ve;
273
- export { ve as AdvancedDataCard, Oe as default };
333
+ }), je = Ne;
334
+ export { Ne as AdvancedDataCard, je as default };
@@ -1,2 +1,2 @@
1
- const o = "14.31.0";
1
+ const o = "14.32.0";
2
2
  export { o as PACKAGE_VERSION };