@telefonica/mistica 14.1.0 → 14.3.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.
package/dist-es/header.js CHANGED
@@ -77,172 +77,180 @@ function _objectWithoutPropertiesLoose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import d from "./box.js";
81
- import l from "./stack.js";
80
+ import p from "./box.js";
81
+ import n from "./stack.js";
82
82
  import { useIsInverseVariant as P } from "./theme-variant-context.js";
83
- import S from "./responsive-layout.js";
84
- import T from "./grid-layout.js";
85
- import { useScreenSize as h } from "./hooks.js";
86
- import v from "./overscroll-color-context.js";
87
- import { Text6 as B, Text3 as u, Text8 as R, Text7 as j } from "./text.js";
88
- import G from "./button-group.js";
89
- import { vars as p } from "./skins/skin-contract.css-mistica.js";
90
- import { jsxs as t, jsx as r } from "./_virtual/jsx-runtime.js";
91
- const J = (param)=>{
92
- let { pretitle: i , title: e , description: o , dataAttributes: n , preamount: c , amount: s , button: a , subtitle: g , isErrorAmount: H , secondaryButton: x } = param;
93
- const { isTabletOrSmaller: L } = h(), O = P(), f = (m, y)=>{
94
- if (typeof m == "string") return /* @__PURE__ */ r(u, _objectSpreadProps(_objectSpread({
83
+ import x from "./responsive-layout.js";
84
+ import v from "./grid-layout.js";
85
+ import { useScreenSize as f } from "./hooks.js";
86
+ import B from "./overscroll-color-context.js";
87
+ import { Text6 as H, Text3 as T, Text8 as R, Text7 as j } from "./text.js";
88
+ import A from "./button-group.js";
89
+ import { vars as d } from "./skins/skin-contract.css-mistica.js";
90
+ import { jsxs as o, jsx as r, Fragment as C } from "./_virtual/jsx-runtime.js";
91
+ const N = (param)=>{
92
+ let { pretitle: l , title: e , description: t , dataAttributes: i , preamount: c , amount: m , button: h , subtitle: a , isErrorAmount: s , secondaryButton: y } = param;
93
+ const { isTabletOrSmaller: L } = f(), O = P(), u = (g, S)=>{
94
+ if (typeof g == "string") return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
95
95
  regular: !0
96
- }, y), {
97
- children: m
96
+ }, S), {
97
+ children: g
98
98
  }));
99
- const { text: M } = m, I = _objectWithoutProperties(m, [
99
+ const { text: G } = g, k = _objectWithoutProperties(g, [
100
100
  "text"
101
101
  ]);
102
- return /* @__PURE__ */ r(u, _objectSpreadProps(_objectSpread({
102
+ return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
103
103
  regular: !0
104
- }, y, I), {
105
- children: m.text
104
+ }, S, k), {
105
+ children: g.text
106
106
  }));
107
107
  };
108
- return /* @__PURE__ */ t(l, {
108
+ return /* @__PURE__ */ o(n, {
109
109
  space: L ? 24 : 32,
110
- dataAttributes: n,
110
+ dataAttributes: i,
111
111
  children: [
112
- (e || i || o) && /* @__PURE__ */ r(d, {
112
+ (e || l || t) && /* @__PURE__ */ r(p, {
113
113
  paddingRight: 16,
114
- children: /* @__PURE__ */ t(l, {
114
+ children: /* @__PURE__ */ o(n, {
115
115
  space: 8,
116
116
  children: [
117
- i && f(i, {
118
- color: p.colors.textPrimary
117
+ l && u(l, {
118
+ color: d.colors.textPrimary
119
119
  }),
120
- /* @__PURE__ */ r(B, {
120
+ /* @__PURE__ */ r(H, {
121
121
  role: "heading",
122
122
  "aria-level": 2,
123
123
  children: e
124
124
  }),
125
- o && /* @__PURE__ */ r(u, {
125
+ t && /* @__PURE__ */ r(T, {
126
126
  regular: !0,
127
- color: p.colors.textSecondary,
128
- children: o
127
+ color: d.colors.textSecondary,
128
+ children: t
129
129
  })
130
130
  ]
131
131
  })
132
132
  }),
133
- (c || s || a || g) && /* @__PURE__ */ t(l, {
133
+ (c || m || h || a) && /* @__PURE__ */ o(n, {
134
134
  space: 16,
135
135
  children: [
136
- (c || s) && /* @__PURE__ */ t(l, {
136
+ (c || m) && /* @__PURE__ */ o(n, {
137
137
  space: 8,
138
138
  children: [
139
- c && f(c, {
140
- color: p.colors.textPrimary
139
+ c && u(c, {
140
+ color: d.colors.textPrimary
141
141
  }),
142
142
  /* @__PURE__ */ r(R, {
143
- color: H && !O ? p.colors.highlight : p.colors.textPrimary,
144
- children: s
143
+ color: s && !O ? d.colors.highlight : d.colors.textPrimary,
144
+ children: m
145
145
  })
146
146
  ]
147
147
  }),
148
- (a || x) && /* @__PURE__ */ r(G, {
149
- primaryButton: a,
150
- secondaryButton: x
148
+ (h || y) && /* @__PURE__ */ r(A, {
149
+ primaryButton: h,
150
+ secondaryButton: y
151
151
  }),
152
- g && f(g, {})
152
+ a && u(a, {})
153
153
  ]
154
154
  })
155
155
  ]
156
156
  });
157
- }, K = (param)=>{
158
- let { title: i , description: e , button: o } = param;
159
- const { isTabletOrSmaller: n } = h();
160
- return /* @__PURE__ */ t(l, {
157
+ }, Q = (param)=>{
158
+ let { title: l , description: e , button: t } = param;
159
+ const { isTabletOrSmaller: i } = f();
160
+ return /* @__PURE__ */ o(n, {
161
161
  space: 32,
162
162
  children: [
163
- /* @__PURE__ */ t(l, {
164
- space: n ? 12 : 16,
163
+ /* @__PURE__ */ o(n, {
164
+ space: i ? 12 : 16,
165
165
  children: [
166
- i && /* @__PURE__ */ r(j, {
166
+ l && /* @__PURE__ */ r(j, {
167
167
  role: "heading",
168
168
  "aria-level": 1,
169
- children: i
169
+ children: l
170
170
  }),
171
- e && /* @__PURE__ */ r(B, {
171
+ e && /* @__PURE__ */ r(H, {
172
172
  children: e
173
173
  })
174
174
  ]
175
175
  }),
176
- o
176
+ t
177
177
  ]
178
178
  });
179
- }, N = (param)=>{
180
- let { isInverse: i = !0 , breadcrumbs: e , header: o , extra: n , sideBySideExtraOnDesktop: c = !1 , dataAttributes: s } = param;
181
- const { isTabletOrSmaller: a } = h();
182
- return /* @__PURE__ */ t(S, {
183
- isInverse: i,
184
- dataAttributes: _objectSpread({
185
- "component-name": "HeaderLayout"
186
- }, s),
179
+ }, U = (param)=>{
180
+ let { isInverse: l = !0 , breadcrumbs: e , header: t , extra: i , sideBySideExtraOnDesktop: c = !1 , dataAttributes: m , bleed: h = !1 } = param;
181
+ const { isTabletOrSmaller: a } = f(), s = h && l;
182
+ return /* @__PURE__ */ o(C, {
187
183
  children: [
188
- /* @__PURE__ */ r(v, {}),
189
- a ? /* @__PURE__ */ r(d, {
190
- paddingTop: o ? 32 : 0,
191
- paddingBottom: 24,
192
- children: /* @__PURE__ */ t(l, {
193
- space: 24,
194
- children: [
195
- o,
196
- n
197
- ]
198
- })
199
- }) : c ? /* @__PURE__ */ r(d, {
200
- paddingTop: e ? 16 : 48,
201
- paddingBottom: 48,
202
- children: /* @__PURE__ */ r(T, {
203
- template: "6+6",
204
- left: /* @__PURE__ */ t(l, {
205
- space: 32,
206
- children: [
207
- e,
208
- o
209
- ]
210
- }),
211
- right: n
212
- })
213
- }) : /* @__PURE__ */ r(d, {
214
- paddingTop: e ? 16 : 48,
215
- paddingBottom: 48,
216
- children: /* @__PURE__ */ t(l, {
217
- space: a ? 24 : 32,
218
- children: [
219
- /* @__PURE__ */ t(l, {
220
- space: 32,
184
+ /* @__PURE__ */ o(x, {
185
+ isInverse: l,
186
+ dataAttributes: _objectSpread({
187
+ "component-name": "HeaderLayout"
188
+ }, m),
189
+ children: [
190
+ /* @__PURE__ */ r(B, {}),
191
+ a ? /* @__PURE__ */ r(p, {
192
+ paddingTop: t ? 32 : 0,
193
+ paddingBottom: 24,
194
+ children: /* @__PURE__ */ o(n, {
195
+ space: 24,
221
196
  children: [
222
- e,
223
- o
197
+ t,
198
+ !s && i
224
199
  ]
225
- }),
226
- n
227
- ]
228
- })
200
+ })
201
+ }) : c ? /* @__PURE__ */ r(p, {
202
+ paddingTop: e ? 16 : 48,
203
+ paddingBottom: 48,
204
+ children: /* @__PURE__ */ r(v, {
205
+ template: "6+6",
206
+ left: /* @__PURE__ */ o(n, {
207
+ space: 32,
208
+ children: [
209
+ e,
210
+ t
211
+ ]
212
+ }),
213
+ right: i
214
+ })
215
+ }) : /* @__PURE__ */ r(p, {
216
+ paddingTop: e ? 16 : 48,
217
+ paddingBottom: s ? 32 : 48,
218
+ children: /* @__PURE__ */ o(n, {
219
+ space: a ? 24 : 32,
220
+ children: [
221
+ /* @__PURE__ */ o(n, {
222
+ space: 32,
223
+ children: [
224
+ e,
225
+ t
226
+ ]
227
+ }),
228
+ !s && i
229
+ ]
230
+ })
231
+ })
232
+ ]
233
+ }),
234
+ s && i && (a || !c) && /* @__PURE__ */ r(x, {
235
+ backgroundColor: `linear-gradient(to bottom, ${d.colors.backgroundBrand} 40px, ${d.colors.background} 0%)`,
236
+ children: i
229
237
  })
230
238
  ]
231
239
  });
232
- }, Q = (param)=>{
233
- let { isInverse: i = !0 , children: e } = param;
234
- const { isTabletOrSmaller: o } = h();
235
- return /* @__PURE__ */ t(S, {
236
- isInverse: i,
240
+ }, W = (param)=>{
241
+ let { isInverse: l = !0 , children: e } = param;
242
+ const { isTabletOrSmaller: t } = f();
243
+ return /* @__PURE__ */ o(x, {
244
+ isInverse: l,
237
245
  children: [
238
- /* @__PURE__ */ r(v, {}),
239
- o ? /* @__PURE__ */ r(d, {
246
+ /* @__PURE__ */ r(B, {}),
247
+ t ? /* @__PURE__ */ r(p, {
240
248
  paddingTop: 12,
241
249
  paddingBottom: 24,
242
250
  children: e
243
- }) : /* @__PURE__ */ r(T, {
251
+ }) : /* @__PURE__ */ r(v, {
244
252
  template: "6+6",
245
- left: /* @__PURE__ */ r(d, {
253
+ left: /* @__PURE__ */ r(p, {
246
254
  paddingY: 48,
247
255
  children: e
248
256
  }),
@@ -251,4 +259,4 @@ const J = (param)=>{
251
259
  ]
252
260
  });
253
261
  };
254
- export { J as Header, N as HeaderLayout, K as MainSectionHeader, Q as MainSectionHeaderLayout };
262
+ export { N as Header, U as HeaderLayout, Q as MainSectionHeader, W as MainSectionHeaderLayout };
@@ -77,21 +77,21 @@ function _objectWithoutPropertiesLoose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import * as u from "react";
80
+ import * as g from "react";
81
81
  import { useIsInverseVariant as b } from "./theme-variant-context.js";
82
82
  import v from "./box.js";
83
83
  import { BaseTouchable as c } from "./touchable.js";
84
84
  import { Text4 as w, Text2 as x } from "./text.js";
85
85
  import { Boxed as k } from "./boxed.js";
86
- import C, { useIsDismissable as I } from "./maybe-dismissable.js";
86
+ import I, { useIsDismissable as C } from "./maybe-dismissable.js";
87
87
  import { container as E, textContainerVariant as N, imageContent as P, touchableContainer as s } from "./highlighted-card.css-mistica.js";
88
88
  import { vars as T } from "./skins/skin-contract.css-mistica.js";
89
89
  import { jsxs as d, jsx as t, Fragment as y } from "./_virtual/jsx-runtime.js";
90
- const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
91
- var h;
92
- const { title: a , description: r , imageUrl: o , imageFit: l } = e, f = b(), g = (h = e.isInverse) != null ? h : f, m = I(), n = /* @__PURE__ */ d(k, {
90
+ const R = /*#__PURE__*/ g.forwardRef((e, i)=>{
91
+ var u;
92
+ const { title: a , description: r , imageUrl: o , imageFit: l } = e, h = b(), f = (u = e.isInverse) != null ? u : h, m = C(), n = /* @__PURE__ */ d(k, {
93
93
  ref: i,
94
- isInverse: g,
94
+ isInverse: f,
95
95
  className: E,
96
96
  dataAttributes: _objectSpread({
97
97
  "component-name": "HighlightedCard"
@@ -135,7 +135,8 @@ const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
135
135
  o && /* @__PURE__ */ t("div", {
136
136
  className: P,
137
137
  style: {
138
- background: `url(${o}) no-repeat`,
138
+ backgroundImage: `url(${o})`,
139
+ backgroundRepeat: "no-repeat",
139
140
  backgroundSize: l === "fit" ? "contain" : "cover",
140
141
  backgroundPosition: l === "fit" ? "bottom right" : `center ${l === "fill-center" ? "center" : "right"}`
141
142
  }
@@ -160,16 +161,16 @@ const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
160
161
  className: s,
161
162
  children: n
162
163
  }) : n;
163
- }), F = /*#__PURE__*/ u.forwardRef((_param, a)=>{
164
+ }), F = /*#__PURE__*/ g.forwardRef((_param, a)=>{
164
165
  var { "aria-label": e } = _param, i = _objectWithoutProperties(_param, [
165
166
  "aria-label"
166
167
  ]);
167
168
  const r = e != null ? e : i.title;
168
- return /* @__PURE__ */ t(C, {
169
+ return /* @__PURE__ */ t(I, {
169
170
  onClose: i.onClose,
170
171
  "aria-label": r,
171
172
  width: i.width,
172
- children: /* @__PURE__ */ t(V, _objectSpreadProps(_objectSpread({}, i), {
173
+ children: /* @__PURE__ */ t(R, _objectSpreadProps(_objectSpread({}, i), {
173
174
  "aria-label": r,
174
175
  ref: a
175
176
  }))