@telefonica/mistica 16.5.0 → 16.6.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.
Files changed (74) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/callout.js +27 -15
  3. package/dist/card.css-mistica.js +5 -5
  4. package/dist/card.d.ts +9 -1
  5. package/dist/card.js +611 -475
  6. package/dist/community/advanced-data-card.css-mistica.js +14 -11
  7. package/dist/community/advanced-data-card.css.d.ts +1 -0
  8. package/dist/community/advanced-data-card.d.ts +1 -1
  9. package/dist/community/advanced-data-card.js +172 -85
  10. package/dist/cover-hero.css-mistica.js +14 -11
  11. package/dist/cover-hero.css.d.ts +1 -0
  12. package/dist/cover-hero.d.ts +1 -0
  13. package/dist/cover-hero.js +101 -59
  14. package/dist/empty-state.js +24 -15
  15. package/dist/header.css-mistica.js +6 -3
  16. package/dist/header.css.d.ts +1 -0
  17. package/dist/header.d.ts +3 -2
  18. package/dist/header.js +148 -79
  19. package/dist/hero.css-mistica.js +11 -8
  20. package/dist/hero.css.d.ts +1 -0
  21. package/dist/hero.d.ts +2 -1
  22. package/dist/hero.js +102 -68
  23. package/dist/highlighted-card.js +32 -23
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +4 -0
  26. package/dist/maybe-dismissable.js +8 -5
  27. package/dist/meter.d.ts +23 -0
  28. package/dist/meter.js +400 -0
  29. package/dist/package-version.js +1 -1
  30. package/dist/sheet-common.css-mistica.js +16 -10
  31. package/dist/sheet-common.css.d.ts +3 -1
  32. package/dist/sheet-common.js +78 -70
  33. package/dist/sheet-info.css-mistica.js +15 -4
  34. package/dist/sheet-info.css.d.ts +2 -0
  35. package/dist/sheet-info.d.ts +3 -0
  36. package/dist/sheet-info.js +61 -43
  37. package/dist/sheet-native.js +59 -48
  38. package/dist/sheet-types.d.ts +6 -1
  39. package/dist/sheet-web.js +6 -4
  40. package/dist/text-tokens.d.ts +10 -0
  41. package/dist/text-tokens.js +54 -38
  42. package/dist/theme-context-provider.js +60 -50
  43. package/dist/theme.d.ts +3 -2
  44. package/dist/utils/headings.d.ts +2 -0
  45. package/dist/utils/headings.js +11 -0
  46. package/dist/utils/types.d.ts +1 -0
  47. package/dist-es/callout.js +55 -43
  48. package/dist-es/card.css-mistica.js +2 -2
  49. package/dist-es/card.js +721 -588
  50. package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
  51. package/dist-es/community/advanced-data-card.js +217 -130
  52. package/dist-es/cover-hero.css-mistica.js +3 -3
  53. package/dist-es/cover-hero.js +132 -90
  54. package/dist-es/empty-state.js +40 -31
  55. package/dist-es/header.css-mistica.js +2 -2
  56. package/dist-es/header.js +174 -104
  57. package/dist-es/hero.css-mistica.js +2 -2
  58. package/dist-es/hero.js +150 -115
  59. package/dist-es/highlighted-card.js +36 -27
  60. package/dist-es/index.js +1839 -1838
  61. package/dist-es/maybe-dismissable.js +17 -14
  62. package/dist-es/meter.js +346 -0
  63. package/dist-es/package-version.js +1 -1
  64. package/dist-es/sheet-common.css-mistica.js +2 -2
  65. package/dist-es/sheet-common.js +124 -116
  66. package/dist-es/sheet-info.css-mistica.js +2 -2
  67. package/dist-es/sheet-info.js +74 -56
  68. package/dist-es/sheet-native.js +59 -48
  69. package/dist-es/sheet-web.js +10 -8
  70. package/dist-es/style.css +1 -1
  71. package/dist-es/text-tokens.js +30 -20
  72. package/dist-es/theme-context-provider.js +88 -78
  73. package/dist-es/utils/headings.js +2 -0
  74. package/package.json +2 -1
package/dist/hero.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return dr;
9
+ return fe;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -26,6 +26,7 @@ const _dom = require("./utils/dom.js");
26
26
  const _themevariantcontext = require("./theme-variant-context.js");
27
27
  const _css = require("./utils/css.js");
28
28
  const _responsivelayout = require("./responsive-layout.js");
29
+ const _headings = require("./utils/headings.js");
29
30
  function _interop_require_default(obj) {
30
31
  return obj && obj.__esModule ? obj : {
31
32
  default: obj
@@ -151,24 +152,45 @@ function _object_without_properties_loose(source, excluded) {
151
152
  }
152
153
  return target;
153
154
  }
154
- const O = {
155
+ const w = {
155
156
  default: _skincontractcssmistica.vars.colors.background,
156
157
  alternative: _skincontractcssmistica.vars.colors.backgroundAlternative,
157
158
  brand: _skincontractcssmistica.vars.colors.backgroundBrand,
158
159
  "brand-secondary": _skincontractcssmistica.vars.colors.backgroundBrandSecondary,
159
160
  none: "transparent"
160
- }, k = (param)=>{
161
- let { children: e, isInverse: o, backgroundColor: t } = param;
161
+ }, I = (param)=>{
162
+ let { children: r, isInverse: t, backgroundColor: a } = param;
162
163
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.InternalResponsiveLayout, {
163
- isInverse: o,
164
+ isInverse: t,
164
165
  className: _herocssmistica.layout,
165
166
  innerDivClassName: _herocssmistica.layout,
166
167
  shouldExpandWhenNested: !0,
167
- backgroundColor: t !== null && t !== void 0 ? t : "transparent",
168
- children: e
168
+ backgroundColor: a !== null && a !== void 0 ? a : "transparent",
169
+ children: r
169
170
  });
170
171
  }, x = (param)=>{
171
- let { headline: e, title: o, titleAs: t = "h1", pretitle: l, description: c, descriptionLinesMax: a, extra: n, button: d, secondaryButton: p, buttonLink: s } = param;
172
+ let { headline: r, title: t, titleAs: a = "h1", pretitle: l, pretitleAs: c, description: o, descriptionLinesMax: m, extra: p, button: f, secondaryButton: u, buttonLink: n } = param;
173
+ const v = t ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text8, {
174
+ as: a,
175
+ dataAttributes: {
176
+ testid: "title"
177
+ },
178
+ children: t
179
+ }) : void 0, i = l ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
180
+ as: c,
181
+ regular: !0,
182
+ dataAttributes: {
183
+ testid: "pretitle"
184
+ },
185
+ children: l
186
+ }) : void 0, h = r ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
187
+ "data-testid": "headline",
188
+ style: {
189
+ paddingBottom: 16,
190
+ order: -1
191
+ },
192
+ children: r
193
+ }) : void 0;
172
194
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)("section", {
173
195
  className: _herocssmistica.contentContainer,
174
196
  children: [
@@ -177,47 +199,63 @@ const O = {
177
199
  /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
178
200
  space: 16,
179
201
  children: [
180
- e && e,
181
- /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
182
- space: 8,
183
- children: [
184
- l && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
185
- as: "p",
186
- regular: !0,
187
- children: l
188
- }),
189
- o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text8, {
190
- as: t,
191
- children: o
192
- })
193
- ]
202
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
203
+ className: _herocssmistica.flexColumn,
204
+ children: (0, _headings.isBiggerHeading)(a, c) ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
205
+ children: [
206
+ v,
207
+ h,
208
+ i && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
209
+ style: {
210
+ paddingBottom: t ? 8 : 0,
211
+ order: -1
212
+ },
213
+ children: i
214
+ })
215
+ ]
216
+ }) : /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
217
+ children: [
218
+ i && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
219
+ style: {
220
+ paddingBottom: t ? 8 : 0
221
+ },
222
+ children: i
223
+ }),
224
+ h,
225
+ v
226
+ ]
227
+ })
194
228
  }),
195
- c && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
229
+ o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
196
230
  as: "p",
197
231
  regular: !0,
198
232
  color: _skincontractcssmistica.vars.colors.textSecondary,
199
- truncate: a,
200
- children: c
233
+ truncate: m,
234
+ dataAttributes: {
235
+ testid: "description"
236
+ },
237
+ children: o
201
238
  })
202
239
  ]
203
240
  }),
204
- n && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
205
- children: n
241
+ p && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
242
+ "data-testid": "slot",
243
+ children: p
206
244
  })
207
245
  ]
208
246
  }),
209
- (d || s) && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
247
+ (f || n) && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
210
248
  className: _herocssmistica.actions,
211
249
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
212
- primaryButton: d,
213
- secondaryButton: p,
214
- link: s
250
+ primaryButton: f,
251
+ secondaryButton: u,
252
+ link: n
215
253
  })
216
254
  })
217
255
  ]
218
256
  });
219
- }, F = /*#__PURE__*/ _react.forwardRef((_param, d)=>{
220
- var { height: e, background: o = "default", media: t, desktopMediaPosition: l = "left", dataAttributes: c, noPaddingY: a } = _param, n = _object_without_properties(_param, [
257
+ }, X = /*#__PURE__*/ _react.forwardRef((_param, p)=>{
258
+ var { height: r, background: t = "default", media: a, desktopMediaPosition: l = "left", dataAttributes: c, noPaddingY: o } = _param, m = _object_without_properties(_param, [
221
259
  "height",
222
260
  "background",
223
261
  "media",
@@ -225,39 +263,37 @@ const O = {
225
263
  "dataAttributes",
226
264
  "noPaddingY"
227
265
  ]);
228
- const { isTabletOrSmaller: p } = (0, _hooks.useScreenSize)(), s = (0, _carousel.useSlideshowContext)(), u = !!(s != null && s.withBullets), w = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), B = o === "none" ? w : o === "brand" || o === "brand-secondary";
229
- if (p) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.ResetResponsiveLayout, {
266
+ const { isTabletOrSmaller: f } = (0, _hooks.useScreenSize)(), u = (0, _carousel.useSlideshowContext)(), n = !!(u != null && u.withBullets), v = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), i = t === "none" ? v : t === "brand" || t === "brand-secondary";
267
+ if (f) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.ResetResponsiveLayout, {
230
268
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
231
269
  style: (0, _css.applyCssVars)({
232
270
  [_imagecssmistica.vars.mediaBorderRadius]: "0px"
233
271
  }),
234
- children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(_object_spread({
235
- "component-name": "Hero"
236
- }, c))), {
237
- ref: d,
238
- style: _object_spread({}, e === "100vh" ? {
272
+ children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(c, "Hero")), {
273
+ ref: p,
274
+ style: _object_spread({}, r === "100vh" ? {
239
275
  maxHeight: "-webkit-fill-available"
240
276
  } : {}, (0, _css.applyCssVars)({
241
- [_herocssmistica.vars.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
277
+ [_herocssmistica.vars.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
242
278
  [_imagecssmistica.vars.mediaBorderRadius]: "0px"
243
279
  })),
244
280
  className: (0, _classnames.default)(_herocssmistica.container, _herocssmistica.containerMobile, {
245
- [_herocssmistica.containerMinHeight]: !a
281
+ [_herocssmistica.containerMinHeight]: !o
246
282
  }),
247
283
  children: [
248
- t,
249
- /* @__PURE__ */ (0, _jsxruntime.jsx)(k, {
250
- isInverse: B,
251
- backgroundColor: O[o],
284
+ a,
285
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(I, {
286
+ isInverse: i,
287
+ backgroundColor: w[t],
252
288
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
253
289
  className: _herocssmistica.expandedContent,
254
290
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
255
291
  style: {
256
292
  paddingTop: 24,
257
- paddingBottom: u ? 48 : a ? 0 : 24
293
+ paddingBottom: n ? 48 : o ? 0 : 24
258
294
  },
259
295
  className: _herocssmistica.layout,
260
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
296
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, m))
261
297
  })
262
298
  })
263
299
  })
@@ -265,44 +301,42 @@ const O = {
265
301
  }))
266
302
  })
267
303
  });
268
- const I = l === "left" ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
304
+ const h = l === "left" ? a : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
269
305
  paddingRight: 24,
270
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
271
- }), L = l === "right" ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
306
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, m))
307
+ }), L = l === "right" ? a : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
272
308
  paddingLeft: 24,
273
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
309
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, m))
274
310
  });
275
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(_object_spread({
276
- "component-name": "Hero"
277
- }, c))), {
278
- ref: d,
279
- style: _object_spread_props(_object_spread({}, e === "100vh" ? {
311
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(c, "Hero")), {
312
+ ref: p,
313
+ style: _object_spread_props(_object_spread({}, r === "100vh" ? {
280
314
  maxHeight: "-webkit-fill-available"
281
315
  } : {}, (0, _css.applyCssVars)({
282
- [_herocssmistica.vars.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
316
+ [_herocssmistica.vars.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
283
317
  [_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.container
284
318
  })), {
285
- background: O[o]
319
+ background: w[t]
286
320
  }),
287
321
  className: _herocssmistica.hero,
288
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(k, {
289
- isInverse: B,
322
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(I, {
323
+ isInverse: i,
290
324
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_gridlayout.default, {
291
325
  template: "6+6",
292
326
  left: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
293
327
  style: {
294
- paddingTop: a ? 0 : 56,
295
- paddingBottom: a && !u ? 0 : 56
328
+ paddingTop: o ? 0 : 56,
329
+ paddingBottom: o && !n ? 0 : 56
296
330
  },
297
331
  className: (0, _classnames.default)(_herocssmistica.container, _herocssmistica.containerDesktop, {
298
- [_herocssmistica.containerMinHeight]: !a
332
+ [_herocssmistica.containerMinHeight]: !o
299
333
  }),
300
- children: I
334
+ children: h
301
335
  }),
302
336
  right: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
303
337
  style: {
304
- paddingTop: a ? 0 : 56,
305
- paddingBottom: a && !u ? 0 : 56
338
+ paddingTop: o ? 0 : 56,
339
+ paddingBottom: o && !n ? 0 : 56
306
340
  },
307
341
  className: (0, _classnames.default)(_herocssmistica.container, _herocssmistica.containerDesktop),
308
342
  children: L
@@ -310,4 +344,4 @@ const O = {
310
344
  })
311
345
  })
312
346
  }));
313
- }), dr = F;
347
+ }), fe = X;
@@ -146,9 +146,9 @@ function _object_without_properties_loose(source, excluded) {
146
146
  }
147
147
  return target;
148
148
  }
149
- const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
150
- var _n_isInverse;
151
- const { title: s, description: r, imageUrl: a, imageFit: o, imageAlt: m, titleAs: f = "h3", width: d, dataAttributes: b, titleLinesMax: v, descriptionLinesMax: x } = n, t = _object_without_properties(n, [
149
+ const B = /*#__PURE__*/ _react.forwardRef((s, e)=>{
150
+ var _s_isInverse;
151
+ const { title: o, description: r, imageUrl: a, imageFit: n, imageAlt: c, titleAs: b = "h3", width: m, dataAttributes: f, titleLinesMax: v, descriptionLinesMax: x } = s, t = _object_without_properties(s, [
152
152
  "title",
153
153
  "description",
154
154
  "imageUrl",
@@ -159,14 +159,15 @@ const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
159
159
  "dataAttributes",
160
160
  "titleLinesMax",
161
161
  "descriptionLinesMax"
162
- ]), I = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), p = (_n_isInverse = n.isInverse) !== null && _n_isInverse !== void 0 ? _n_isInverse : I, h = (0, _maybedismissable.useIsDismissable)(), { textPresets: w } = (0, _hooks.useTheme)(), c = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
162
+ ]), p = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), I = (_s_isInverse = s.isInverse) !== null && _s_isInverse !== void 0 ? _s_isInverse : p, h = (0, _maybedismissable.useIsDismissable)(), { textPresets: w } = (0, _hooks.useTheme)(), d = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
163
163
  ref: e,
164
- isInverse: p,
164
+ variant: I ? "inverse" : "default",
165
165
  className: _highlightedcardcssmistica.container,
166
166
  dataAttributes: _object_spread({
167
- "component-name": "HighlightedCard"
168
- }, b),
169
- width: d ? `${d}px` : "100%",
167
+ "component-name": "HighlightedCard",
168
+ testid: "HighlightedCard"
169
+ }, f),
170
+ width: m ? `${m}px` : "100%",
170
171
  minHeight: "100%",
171
172
  children: [
172
173
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
@@ -177,12 +178,15 @@ const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
177
178
  /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
178
179
  space: 8,
179
180
  children: [
180
- !!s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
181
+ !!o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
181
182
  truncate: v,
182
183
  weight: w.cardTitle.weight,
183
- as: f,
184
+ as: b,
184
185
  hyphens: "auto",
185
- children: s
186
+ dataAttributes: {
187
+ testid: "title"
188
+ },
189
+ children: o
186
190
  })),
187
191
  !!r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
188
192
  regular: !0,
@@ -190,6 +194,9 @@ const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
190
194
  truncate: x,
191
195
  as: "p",
192
196
  hyphens: "auto",
197
+ dataAttributes: {
198
+ testid: "description"
199
+ },
193
200
  children: r
194
201
  })
195
202
  ]
@@ -207,38 +214,40 @@ const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
207
214
  })
208
215
  ]
209
216
  }),
210
- a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, m ? {
217
+ a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
218
+ "data-testid": "image"
219
+ }, c ? {
211
220
  role: "img",
212
- "aria-label": m
221
+ "aria-label": c
213
222
  } : {}), {
214
223
  className: _highlightedcardcssmistica.imageContent,
215
224
  style: {
216
225
  backgroundImage: `url(${a})`,
217
226
  backgroundRepeat: "no-repeat",
218
- backgroundSize: o === "fit" ? "contain" : "cover",
219
- backgroundPosition: o === "fit" ? "bottom right" : `center ${o === "fill-center" ? "center" : "right"}`
227
+ backgroundSize: n === "fit" ? "contain" : "cover",
228
+ backgroundPosition: n === "fit" ? "bottom right" : `center ${n === "fill-center" ? "center" : "right"}`
220
229
  }
221
230
  }))
222
231
  ]
223
232
  });
224
- return t.button ? c : t.onPress || t.to || t.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, t), {
233
+ return t.button ? d : t.onPress || t.to || t.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, t), {
225
234
  className: _highlightedcardcssmistica.touchableContainer,
226
- children: c
227
- })) : c;
228
- }), F = /*#__PURE__*/ _react.forwardRef((_param, s)=>{
229
- var { "aria-label": n } = _param, e = _object_without_properties(_param, [
235
+ children: d
236
+ })) : d;
237
+ }), F = /*#__PURE__*/ _react.forwardRef((_param, o)=>{
238
+ var { "aria-label": s } = _param, e = _object_without_properties(_param, [
230
239
  "aria-label"
231
240
  ]);
232
241
  var _e_isInverse;
233
- const r = n || e.title || e.description, a = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), o = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
242
+ const r = s || e.title || e.description, a = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), n = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
234
243
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_maybedismissable.default, {
235
244
  onClose: e.onClose,
236
245
  "aria-label": r,
237
246
  width: e.width,
238
- variant: e.imageUrl ? "media" : o ? "inverse" : void 0,
247
+ variant: e.imageUrl ? "media" : n ? "inverse" : void 0,
239
248
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(B, _object_spread_props(_object_spread({}, e), {
240
249
  "aria-label": r,
241
- ref: s
250
+ ref: o
242
251
  }))
243
252
  });
244
253
  }), X = F;
package/dist/index.d.ts CHANGED
@@ -57,6 +57,7 @@ export { default as HorizontalScroll } from './horizontal-scroll';
57
57
  export { default as HighlightedCard } from './highlighted-card';
58
58
  export { default as Stepper } from './stepper';
59
59
  export { ProgressBar, ProgressBarStepped } from './progress-bar';
60
+ export { default as Meter } from './meter';
60
61
  export { Rating, InfoRating } from './rating';
61
62
  export { VerticalMosaic, HorizontalMosaic } from './mosaic';
62
63
  export { Timer, TextTimer } from './timer';
package/dist/index.js CHANGED
@@ -5574,6 +5574,9 @@ _export(exports, {
5574
5574
  MenuSection: function() {
5575
5575
  return _menu.MenuSection;
5576
5576
  },
5577
+ Meter: function() {
5578
+ return _meter.default;
5579
+ },
5577
5580
  MonthField: function() {
5578
5581
  return _monthfield.default;
5579
5582
  },
@@ -6054,6 +6057,7 @@ const _horizontalscroll = /*#__PURE__*/ _interop_require_default(require("./hori
6054
6057
  const _highlightedcard = /*#__PURE__*/ _interop_require_default(require("./highlighted-card.js"));
6055
6058
  const _stepper = /*#__PURE__*/ _interop_require_default(require("./stepper.js"));
6056
6059
  const _progressbar = require("./progress-bar.js");
6060
+ const _meter = /*#__PURE__*/ _interop_require_default(require("./meter.js"));
6057
6061
  const _rating = require("./rating.js");
6058
6062
  const _mosaic = require("./mosaic.js");
6059
6063
  const _timer = require("./timer.js");
@@ -72,9 +72,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
72
72
  return newObj;
73
73
  }
74
74
  const a = /*#__PURE__*/ _react.createContext(!1), M = ()=>_react.useContext(a), C = (param)=>{
75
- let { children: s, width: r, onClose: t, "aria-label": i, variant: m } = param;
75
+ let { children: e, width: r, onClose: s, "aria-label": i, variant: m } = param;
76
76
  const { texts: l, t: n } = (0, _hooks.useTheme)();
77
- return t ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("section", {
77
+ return s ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("section", {
78
78
  className: _maybedismissablecssmistica.dismissableContainer,
79
79
  "aria-label": i,
80
80
  style: {
@@ -84,14 +84,17 @@ const a = /*#__PURE__*/ _react.createContext(!1), M = ()=>_react.useContext(a),
84
84
  children: [
85
85
  /* @__PURE__ */ (0, _jsxruntime.jsx)(a.Provider, {
86
86
  value: !0,
87
- children: s
87
+ children: e
88
88
  }),
89
89
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
90
90
  variant: m,
91
91
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
92
92
  className: _maybedismissablecssmistica.dismissableButton,
93
93
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, {
94
- onPress: t,
94
+ dataAttributes: {
95
+ testid: "closeButton"
96
+ },
97
+ onPress: s,
95
98
  "aria-label": l.closeButtonLabel || n(_texttokens.closeButtonLabel),
96
99
  small: !0,
97
100
  Icon: _iconcloseregular.default
@@ -100,6 +103,6 @@ const a = /*#__PURE__*/ _react.createContext(!1), M = ()=>_react.useContext(a),
100
103
  })
101
104
  ]
102
105
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
103
- children: s
106
+ children: e
104
107
  });
105
108
  }, N = C;
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import type { DataAttributes } from './utils/types';
3
+ declare const TYPE_LINEAR = "linear";
4
+ declare const TYPE_ANGULAR = "angular";
5
+ declare const TYPE_CIRCULAR = "circular";
6
+ export type MeterType = typeof TYPE_LINEAR | typeof TYPE_ANGULAR | typeof TYPE_CIRCULAR;
7
+ type MeterProps = {
8
+ type?: MeterType;
9
+ /** Position of the meter. 0 is at the start, 100 is at the end. The sum of the values must not exceed 100. */
10
+ values: Array<number>;
11
+ width?: number | string;
12
+ colors?: Array<string>;
13
+ reverse?: boolean;
14
+ dataAttributes?: DataAttributes;
15
+ 'aria-hidden'?: boolean | 'true' | 'false';
16
+ 'aria-label'?: string;
17
+ 'aria-labelledby'?: string;
18
+ };
19
+ /**
20
+ * This wrapper is to force a remount when some specific props change
21
+ */
22
+ declare const Meter: (props: MeterProps) => JSX.Element;
23
+ export default Meter;